diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index dfde7fdf30781c..ab2287a7abd15c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -178,3 +178,5 @@ # Web Standards /lib/internal/bootstrap/web/* @nodejs/web-standards /lib/internal/navigator.js @nodejs/web-standards +/test/fixtures/wpt/ @nodejs/web-standards +/test/wpt/ @nodejs/web-standards diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.yml b/.github/ISSUE_TEMPLATE/1-bug-report.yml index 496d06d3ad70b8..72292b65430d7a 100644 --- a/.github/ISSUE_TEMPLATE/1-bug-report.yml +++ b/.github/ISSUE_TEMPLATE/1-bug-report.yml @@ -27,7 +27,11 @@ body: - type: textarea attributes: label: What steps will reproduce the bug? - description: Enter details about your bug, preferably a simple code snippet that can be run using `node` directly without installing third-party dependencies. + description: > + Enter details about your bug, preferably a simple code snippet that can + be run using `node` directly without installing third-party dependencies + or downloading code from the internet (i.e. no ZIP archive, no GitHub + repository, etc.). - type: textarea attributes: label: How often does it reproduce? Is there a required condition? diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml index ea6df99e2c1c0f..c941a88cd43fbd 100644 --- a/.github/workflows/build-tarball.yml +++ b/.github/workflows/build-tarball.yml @@ -43,7 +43,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -69,7 +69,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml index 3dcbf7e7b72ab6..32dd31fbaf219a 100644 --- a/.github/workflows/build-windows.yml +++ b/.github/workflows/build-windows.yml @@ -42,7 +42,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Install deps diff --git a/.github/workflows/coverage-linux-without-intl.yml b/.github/workflows/coverage-linux-without-intl.yml index c29ca32c1a75cc..f54433408bfd29 100644 --- a/.github/workflows/coverage-linux-without-intl.yml +++ b/.github/workflows/coverage-linux-without-intl.yml @@ -45,7 +45,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml index 557ede95d4dcc7..9d1c1b25ad6792 100644 --- a/.github/workflows/coverage-linux.yml +++ b/.github/workflows/coverage-linux.yml @@ -45,7 +45,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/coverage-windows.yml b/.github/workflows/coverage-windows.yml index 994b30c29e70c5..e837fa04a30e5f 100644 --- a/.github/workflows/coverage-windows.yml +++ b/.github/workflows/coverage-windows.yml @@ -45,7 +45,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Install deps diff --git a/.github/workflows/daily-wpt-fyi.yml b/.github/workflows/daily-wpt-fyi.yml index 0b0077025839ec..96947ca22eb561 100644 --- a/.github/workflows/daily-wpt-fyi.yml +++ b/.github/workflows/daily-wpt-fyi.yml @@ -33,7 +33,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml index a7446bff522116..c3de444958e396 100644 --- a/.github/workflows/linters.yml +++ b/.github/workflows/linters.yml @@ -44,7 +44,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -64,7 +64,7 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -122,7 +122,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information @@ -139,7 +139,7 @@ jobs: with: persist-credentials: false - name: Use Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml index 9cd389da74682b..7905b2185eaca5 100644 --- a/.github/workflows/scorecard.yml +++ b/.github/workflows/scorecard.yml @@ -33,7 +33,7 @@ jobs: steps: - name: Harden Runner - uses: step-security/harden-runner@8ca2b8b2ece13480cda6dacd3511b49857a23c09 # v2.5.1 + uses: step-security/harden-runner@eb238b55efaa70779f274895e782ed17c84f2895 # v2.6.1 with: egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs @@ -43,7 +43,7 @@ jobs: persist-credentials: false - name: Run analysis - uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.2.0 + uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1 with: results_file: results.sarif results_format: sarif @@ -73,6 +73,6 @@ jobs: # Upload the results to GitHub's code scanning dashboard. - name: Upload to code-scanning - uses: github/codeql-action/upload-sarif@ddccb873888234080b77e9bc2d4764d5ccaaccf9 # v2.21.9 + uses: github/codeql-action/upload-sarif@407ffafae6a767df3e0230c3df91b6443ae8df75 # v2.22.8 with: sarif_file: results.sarif diff --git a/.github/workflows/test-asan.yml b/.github/workflows/test-asan.yml index 55448d5ed4f642..4db69c4c9ab90b 100644 --- a/.github/workflows/test-asan.yml +++ b/.github/workflows/test-asan.yml @@ -51,7 +51,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/test-internet.yml b/.github/workflows/test-internet.yml index dc35ba4175032a..3d92b245eb19f5 100644 --- a/.github/workflows/test-internet.yml +++ b/.github/workflows/test-internet.yml @@ -44,7 +44,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index ca4f9ed92578fb..2f9e13caf67cfb 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -38,7 +38,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml index 35d47f16bebcba..cef03a2bb6decc 100644 --- a/.github/workflows/test-macos.yml +++ b/.github/workflows/test-macos.yml @@ -44,7 +44,7 @@ jobs: with: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - name: Environment Information diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml index d252e445d48aaa..d29a0f9be67c97 100644 --- a/.github/workflows/tools.yml +++ b/.github/workflows/tools.yml @@ -36,6 +36,7 @@ on: - ngtcp2 - postject - root-certificates + - simdjson - simdutf - undici - uvwasi @@ -252,6 +253,14 @@ jobs: label: crypto, notable-change run: | node ./tools/dep_updaters/update-root-certs.mjs -v -f "$GITHUB_ENV" + - id: simdjson + subsystem: deps + label: dependencies + run: | + ./tools/dep_updaters/update-simdjson.sh > temp-output + cat temp-output + tail -n1 temp-output | grep "NEW_VERSION=" >> "$GITHUB_ENV" || true + rm temp-output - id: simdutf subsystem: deps label: dependencies @@ -291,7 +300,7 @@ jobs: persist-credentials: false - name: Set up Python ${{ env.PYTHON_VERSION }} if: matrix.id == 'icu' && (github.event_name == 'schedule' || inputs.id == 'all' || inputs.id == matrix.id) - uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0 + uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1 with: python-version: ${{ env.PYTHON_VERSION }} - run: ${{ matrix.run }} diff --git a/.github/workflows/update-release-links.yml b/.github/workflows/update-release-links.yml new file mode 100644 index 00000000000000..3eaa61260545e8 --- /dev/null +++ b/.github/workflows/update-release-links.yml @@ -0,0 +1,20 @@ +name: Update release links + +on: + workflow_dispatch: + release: + types: [released] + +permissions: + contents: read + +jobs: + update-release-links: + if: github.repository == 'nodejs/node' + runs-on: ubuntu-latest + steps: + - name: Trigger update-links workflow on nodejs/release-cloudflare-worker + run: | + gh workflow run update-links.yml --repo nodejs/release-cloudflare-worker + env: + GITHUB_TOKEN: ${{ secrets.GH_USER_TOKEN }} diff --git a/.mailmap b/.mailmap index 24ff039703b9c1..9535707681f48a 100644 --- a/.mailmap +++ b/.mailmap @@ -583,6 +583,7 @@ xiaoyu <306766053@qq.com> Xu Meng Xuguang Mei Yael Hermon +Yagiz Nizipli Yang Guo Yash Ladha <18033231+yashLadha@users.noreply.github.com> Yash Ladha diff --git a/BUILD.gn b/BUILD.gn new file mode 100644 index 00000000000000..1ed186b597eece --- /dev/null +++ b/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +node_gn_build("node") { +} diff --git a/BUILDING.md b/BUILDING.md index 46827af7c40cbf..4249f45abbfe06 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -462,6 +462,12 @@ make docopen This will open a file URL to a one-page version of all the browsable HTML documents using the default browser. +```bash +make docclean +``` + +This will clean previously built doc. + To test if Node.js was built correctly: ```bash diff --git a/CHANGELOG.md b/CHANGELOG.md index 31f230b045d9e3..b8ef04e8becdd1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -36,11 +36,15 @@ release. -21.1.0
+21.4.0
+21.3.0
+21.2.0
+21.1.0
21.0.0
-20.9.0
+20.10.0
+20.9.0
20.8.1
20.8.0
20.7.0
@@ -56,7 +60,8 @@ release. 20.0.0
-18.18.2
+18.19.0
+18.18.2
18.18.1
18.18.0
18.17.1
diff --git a/GOVERNANCE.md b/GOVERNANCE.md index 6ba1ef2daf2c3d..d29012745ea87f 100644 --- a/GOVERNANCE.md +++ b/GOVERNANCE.md @@ -151,8 +151,9 @@ Provide a summary of the nominee's contributions. For example: Mention @nodejs/collaborators in the issue to notify other collaborators about the nomination. -The nomination passes if no collaborators oppose it after one week. Otherwise, -the nomination fails. +The nomination passes if no collaborators oppose it after one week. In the case +of an objection, the TSC is responsible for working with the individuals +involved and finding a resolution. There are steps a nominator can take in advance to make a nomination as frictionless as possible. To request feedback from other collaborators in diff --git a/LICENSE b/LICENSE index 511343a8dfd4bb..0dbfa8fb849796 100644 --- a/LICENSE +++ b/LICENSE @@ -132,52 +132,45 @@ The externally maintained libraries used by Node.js are: - ICU, located at deps/icu-small, is licensed as follows: """ - UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE - - See Terms of Use - for definitions of Unicode Inc.’s Data Files and Software. - - NOTICE TO USER: Carefully read the following legal agreement. - BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S - DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), - YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE - TERMS AND CONDITIONS OF THIS AGREEMENT. - IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE - THE DATA FILES OR SOFTWARE. + UNICODE LICENSE V3 COPYRIGHT AND PERMISSION NOTICE - Copyright © 1991-2023 Unicode, Inc. All rights reserved. - Distributed under the Terms of Use in https://www.unicode.org/copyright.html. + Copyright © 2016-2023 Unicode, Inc. - Permission is hereby granted, free of charge, to any person obtaining - a copy of the Unicode data files and any associated documentation - (the "Data Files") or Unicode software and any associated documentation - (the "Software") to deal in the Data Files or Software - without restriction, including without limitation the rights to use, - copy, modify, merge, publish, distribute, and/or sell copies of - the Data Files or Software, and to permit persons to whom the Data Files - or Software are furnished to do so, provided that either - (a) this copyright and permission notice appear with all copies - of the Data Files or Software, or - (b) this copyright and permission notice appear in associated - Documentation. - - THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF - ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE - WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND - NONINFRINGEMENT OF THIRD PARTY RIGHTS. - IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS - NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL - DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, - DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER - TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR - PERFORMANCE OF THE DATA FILES OR SOFTWARE. + NOTICE TO USER: Carefully read the following legal agreement. BY + DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR + SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE + TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT + DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. - Except as contained in this notice, the name of a copyright holder - shall not be used in advertising or otherwise to promote the sale, - use or other dealings in these Data Files or Software without prior - written authorization of the copyright holder. + Permission is hereby granted, free of charge, to any person obtaining a + copy of data files and any associated documentation (the "Data Files") or + software and any associated documentation (the "Software") to deal in the + Data Files or Software without restriction, including without limitation + the rights to use, copy, modify, merge, publish, distribute, and/or sell + copies of the Data Files or Software, and to permit persons to whom the + Data Files or Software are furnished to do so, provided that either (a) + this copyright and permission notice appear with all copies of the Data + Files or Software, or (b) this copyright and permission notice appear in + associated Documentation. + + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY + KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF + THIRD PARTY RIGHTS. + + IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE + BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, + OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, + WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, + ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA + FILES OR SOFTWARE. + + Except as contained in this notice, the name of a copyright holder shall + not be used in advertising or otherwise to promote the sale, use or other + dealings in these Data Files or Software without prior written + authorization of the copyright holder. ---------------------------------------------------------------------- @@ -1316,6 +1309,211 @@ The externally maintained libraries used by Node.js are: jloup@gzip.org madler@alumni.caltech.edu """ +- simdjson, located at deps/simdjson, is licensed as follows: + """ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2023 The simdjson authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + """ + - simdutf, located at deps/simdutf, is licensed as follows: """ Copyright 2021 The simdutf authors @@ -2153,9 +2351,9 @@ The externally maintained libraries used by Node.js are: - base64, located at deps/base64/base64/, is licensed as follows: """ Copyright (c) 2005-2007, Nick Galbreath - Copyright (c) 2013-2019, Alfred Klomp - Copyright (c) 2015-2017, Wojciech Mula + Copyright (c) 2015-2018, Wojciech Muła Copyright (c) 2016-2017, Matthieu Darbois + Copyright (c) 2013-2022, Alfred Klomp All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.md b/README.md index 2d933a125580eb..8cfddba3b61b56 100644 --- a/README.md +++ b/README.md @@ -165,15 +165,13 @@ For information about the governance of the Node.js project, see * [aduh95](https://github.com/aduh95) - **Antoine du Hamel** <> (he/him) * [anonrig](https://github.com/anonrig) - - **Yagiz Nizipli** <> (he/him) + **Yagiz Nizipli** <> (he/him) * [apapirovski](https://github.com/apapirovski) - **Anatoli Papirovski** <> (he/him) * [benjamingr](https://github.com/benjamingr) - **Benjamin Gruenbaum** <> * [BridgeAR](https://github.com/BridgeAR) - **Ruben Bridgewater** <> (he/him) -* [cjihrig](https://github.com/cjihrig) - - **Colin Ihrig** <> (he/him) * [GeoffreyBooth](https://github.com/geoffreybooth) - **Geoffrey Booth** <> (he/him) * [gireeshpunathil](https://github.com/gireeshpunathil) - @@ -213,6 +211,8 @@ For information about the governance of the Node.js project, see **Ben Noordhuis** <> * [ChALkeR](https://github.com/ChALkeR) - **Сковорода Никита Андреевич** <> (he/him) +* [cjihrig](https://github.com/cjihrig) - + **Colin Ihrig** <> (he/him) * [codebytere](https://github.com/codebytere) - **Shelley Vohr** <> (she/her) * [danbev](https://github.com/danbev) - @@ -288,7 +288,7 @@ For information about the governance of the Node.js project, see * [aduh95](https://github.com/aduh95) - **Antoine du Hamel** <> (he/him) * [anonrig](https://github.com/anonrig) - - **Yagiz Nizipli** <> (he/him) + **Yagiz Nizipli** <> (he/him) * [antsmartian](https://github.com/antsmartian) - **Anto Aravinth** <> (he/him) * [apapirovski](https://github.com/apapirovski) - @@ -348,7 +348,7 @@ For information about the governance of the Node.js project, see * [F3n67u](https://github.com/F3n67u) - **Feng Yu** <> (he/him) * [Flarna](https://github.com/Flarna) - - **Gerhard Stöbich** <> (he/they) + **Gerhard Stöbich** <> (he/they) * [gabrielschulhof](https://github.com/gabrielschulhof) - **Gabriel Schulhof** <> * [gengjiawen](https://github.com/gengjiawen) - @@ -367,8 +367,6 @@ For information about the governance of the Node.js project, see **Zeyu "Alex" Yang** <> (he/him) * [iansu](https://github.com/iansu) - **Ian Sutherland** <> -* [JacksonTian](https://github.com/JacksonTian) - - **Jackson Tian** <> * [JakobJingleheimer](https://github.com/JakobJingleheimer) - **Jacob Smith** <> (he/him) * [jasnell](https://github.com/jasnell) - @@ -419,6 +417,8 @@ For information about the governance of the Node.js project, see **Alba Mendez** <> (she/her) * [MoLow](https://github.com/MoLow) - **Moshe Atlow** <> (he/him) +* [MrJithil](https://github.com/MrJithil) - + **Jithil P Ponnan** <> (he/him) * [mscdex](https://github.com/mscdex) - **Brian White** <> * [MylesBorins](https://github.com/MylesBorins) - @@ -567,6 +567,8 @@ For information about the governance of the Node.js project, see **Isaac Z. Schlueter** <> * [italoacasas](https://github.com/italoacasas) - **Italo A. Casas** <> (he/him) +* [JacksonTian](https://github.com/JacksonTian) - + **Jackson Tian** <> * [jasongin](https://github.com/jasongin) - **Jason Ginchereau** <> * [jbergstroem](https://github.com/jbergstroem) - @@ -713,6 +715,8 @@ maintaining the Node.js project. **Qingyu Deng** <> * [bmuenzenmeyer](https://github.com/bmuenzenmeyer) - **Brian Muenzenmeyer** <> (he/him) +* [CanadaHonk](https://github.com/CanadaHonk) - + **Oliver Medhurst** <> (they/them) * [daeyeon](https://github.com/daeyeon) - **Daeyeon Jeong** <> (he/him) * [F3n67u](https://github.com/F3n67u) - diff --git a/benchmark/crypto/aes-gcm-throughput.js b/benchmark/crypto/aes-gcm-throughput.js index 0ac88f6e6ee5ea..cf249c6b6d832a 100644 --- a/benchmark/crypto/aes-gcm-throughput.js +++ b/benchmark/crypto/aes-gcm-throughput.js @@ -3,7 +3,7 @@ const common = require('../common.js'); const crypto = require('crypto'); const keylen = { 'aes-128-gcm': 16, 'aes-192-gcm': 24, 'aes-256-gcm': 32 }; const bench = common.createBenchmark(main, { - n: [500], + n: [2500], cipher: ['aes-128-gcm', 'aes-192-gcm', 'aes-256-gcm'], len: [1024, 4 * 1024, 16 * 1024, 64 * 1024, 256 * 1024, 1024 * 1024], }); diff --git a/benchmark/crypto/create-hash.js b/benchmark/crypto/create-hash.js new file mode 100644 index 00000000000000..119534d5c24f83 --- /dev/null +++ b/benchmark/crypto/create-hash.js @@ -0,0 +1,22 @@ +'use strict'; + +const common = require('../common.js'); +const { createHash } = require('crypto'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + n: [1e5], +}); + +function main({ n }) { + const array = []; + for (let i = 0; i < n; ++i) { + array.push(null); + } + bench.start(); + for (let i = 0; i < n; ++i) { + array[i] = createHash('sha1'); + } + bench.end(n); + assert.strictEqual(typeof array[n - 1], 'object'); +} diff --git a/benchmark/crypto/get-ciphers.js b/benchmark/crypto/get-ciphers.js index 0ace9b49820db8..e3cd955a983dd2 100644 --- a/benchmark/crypto/get-ciphers.js +++ b/benchmark/crypto/get-ciphers.js @@ -3,7 +3,7 @@ const common = require('../common.js'); const bench = common.createBenchmark(main, { - n: [1, 5000], + n: [1, 500000], v: ['crypto', 'tls'], }); diff --git a/benchmark/crypto/hkdf.js b/benchmark/crypto/hkdf.js index 61ae33cac0a0f6..98aa83594e2278 100644 --- a/benchmark/crypto/hkdf.js +++ b/benchmark/crypto/hkdf.js @@ -14,7 +14,7 @@ const bench = common.createBenchmark(main, { salt: ['', 'salt'], info: ['', 'info'], hash: ['sha256', 'sha512'], - n: [1e3], + n: [1e4], }); function measureSync(n, size, salt, info, hash, key) { diff --git a/benchmark/crypto/randomBytes.js b/benchmark/crypto/randomBytes.js index 50ad3f08387566..a47080a017d250 100644 --- a/benchmark/crypto/randomBytes.js +++ b/benchmark/crypto/randomBytes.js @@ -3,14 +3,21 @@ const common = require('../common.js'); const { randomBytes } = require('crypto'); +// Add together with imports +const assert = require('assert'); + +let _cryptoResult; + const bench = common.createBenchmark(main, { - size: [64, 1024, 8192, 512 * 1024], - n: [1e3], + size: [64, 1024, 8 * 1024, 16 * 1024], + n: [1e5], }); function main({ n, size }) { bench.start(); for (let i = 0; i < n; ++i) - randomBytes(size); + _cryptoResult = randomBytes(size); bench.end(n); + // Avoid V8 deadcode (elimination) + assert.ok(_cryptoResult); } diff --git a/benchmark/crypto/webcrypto-digest.js b/benchmark/crypto/webcrypto-digest.js index e2e6f55c6fdd1f..f5ef8e6bc49385 100644 --- a/benchmark/crypto/webcrypto-digest.js +++ b/benchmark/crypto/webcrypto-digest.js @@ -8,7 +8,7 @@ const bench = common.createBenchmark(main, { sync: ['createHash', 'subtle'], data: [10, 20, 50, 100], method: ['SHA-1', 'SHA-256', 'SHA-384', 'SHA-512'], - n: [1e3], + n: [1e5], }); const kMethods = { diff --git a/benchmark/error/hidestackframes-noerr.js b/benchmark/error/hidestackframes-noerr.js new file mode 100644 index 00000000000000..9e662f6a620f13 --- /dev/null +++ b/benchmark/error/hidestackframes-noerr.js @@ -0,0 +1,62 @@ +'use strict'; + +const common = require('../common.js'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + type: [ + 'hide-stackframes', + 'direct-call', + ], + n: [1e7], +}, { + flags: ['--expose-internals'], +}); + +function main({ n, type }) { + const { + hideStackFrames, + codes: { + ERR_INVALID_ARG_TYPE, + }, + } = require('internal/errors'); + + const testfn = (value) => { + if (typeof value !== 'number') { + throw new ERR_INVALID_ARG_TYPE('Benchmark', 'number', value); + } + }; + + const hideStackFramesTestfn = hideStackFrames((value) => { + if (typeof value !== 'number') { + throw new ERR_INVALID_ARG_TYPE.HideStackFrameError('Benchmark', 'number', value); + } + }); + + const fn = type === 'hide-stackframe' ? hideStackFramesTestfn : testfn; + + const value = 42; + + const length = 1024; + const array = []; + const errCase = false; + + for (let i = 0; i < length; ++i) { + array.push(fn(value)); + } + + bench.start(); + + for (let i = 0; i < n; i++) { + const index = i % length; + array[index] = fn(value); + } + + bench.end(n); + + // Verify the entries to prevent dead code elimination from making + // the benchmark invalid. + for (let i = 0; i < length; ++i) { + assert.strictEqual(typeof array[i], errCase ? 'object' : 'undefined'); + } +} diff --git a/benchmark/error/hidestackframes-throw.js b/benchmark/error/hidestackframes-throw.js new file mode 100644 index 00000000000000..c7147e39ba57a3 --- /dev/null +++ b/benchmark/error/hidestackframes-throw.js @@ -0,0 +1,87 @@ +'use strict'; + +const common = require('../common.js'); +const assert = require('assert'); + +const bench = common.createBenchmark(main, { + type: [ + 'hide-stackframes', + 'direct-call', + ], + double: ['true', 'false'], + n: [1e5], +}, { + flags: ['--expose-internals'], +}); + +function main({ n, type, double }) { + const { + hideStackFrames, + codes: { + ERR_INVALID_ARG_TYPE, + }, + } = require('internal/errors'); + + const value = 'err'; + + const testfn = (value) => { + if (typeof value !== 'number') { + throw new ERR_INVALID_ARG_TYPE('Benchmark', 'number', value); + } + }; + + const hideStackFramesTestfn = hideStackFrames((value) => { + if (typeof value !== 'number') { + throw new ERR_INVALID_ARG_TYPE.HideStackFrameError('Benchmark', 'number', value); + } + }); + + function doubleTestfn(value) { + testfn(value); + } + + const doubleHideStackFramesTestfn = hideStackFrames((value) => { + hideStackFramesTestfn.withoutStackTrace(value); + }); + + const fn = type === 'hide-stackframe' ? + double === 'true' ? + doubleHideStackFramesTestfn : + hideStackFramesTestfn : + double === 'true' ? + doubleTestfn : + testfn; + + const length = 1024; + const array = []; + let errCase = false; + + // Warm up. + for (let i = 0; i < length; ++i) { + try { + fn(value); + } catch (e) { + errCase = true; + array.push(e); + } + } + + bench.start(); + + for (let i = 0; i < n; i++) { + const index = i % length; + try { + fn(value); + } catch (e) { + array[index] = e; + } + } + + bench.end(n); + + // Verify the entries to prevent dead code elimination from making + // the benchmark invalid. + for (let i = 0; i < length; ++i) { + assert.strictEqual(typeof array[i], errCase ? 'object' : 'undefined'); + } +} diff --git a/benchmark/error/hidestackframes.js b/benchmark/error/hidestackframes.js deleted file mode 100644 index b28be725a30969..00000000000000 --- a/benchmark/error/hidestackframes.js +++ /dev/null @@ -1,45 +0,0 @@ -'use strict'; - -const common = require('../common.js'); - -const bench = common.createBenchmark(main, { - type: ['hide-stackframes-throw', 'direct-call-throw', - 'hide-stackframes-noerr', 'direct-call-noerr'], - n: [10e4], -}, { - flags: ['--expose-internals'], -}); - -function main({ n, type }) { - const { - hideStackFrames, - codes: { - ERR_INVALID_ARG_TYPE, - }, - } = require('internal/errors'); - - const testfn = (value) => { - if (typeof value !== 'number') { - throw new ERR_INVALID_ARG_TYPE('Benchmark', 'number', value); - } - }; - - let fn = testfn; - if (type.startsWith('hide-stackframe')) - fn = hideStackFrames(testfn); - let value = 42; - if (type.endsWith('-throw')) - value = 'err'; - - bench.start(); - - for (let i = 0; i < n; i++) { - try { - fn(value); - } catch { - // No-op - } - } - - bench.end(n); -} diff --git a/benchmark/esm/import-meta.js b/benchmark/esm/import-meta.js new file mode 100644 index 00000000000000..fd371cf60ed6a3 --- /dev/null +++ b/benchmark/esm/import-meta.js @@ -0,0 +1,32 @@ +'use strict'; + +const path = require('path'); +const { pathToFileURL, fileURLToPath } = require('url'); +const common = require('../common'); +const assert = require('assert'); +const bench = common.createBenchmark(main, { + n: [1000], +}); + +const file = pathToFileURL( + path.resolve(__filename, '../../fixtures/esm-dir-file.mjs'), +); +async function load(array, n) { + for (let i = 0; i < n; i++) { + array[i] = await import(`${file}?i=${i}`); + } + return array; +} + +function main({ n }) { + const array = []; + for (let i = 0; i < n; ++i) { + array.push({ dirname: '', filename: '', i: 0 }); + } + + bench.start(); + load(array, n).then((arr) => { + bench.end(n); + assert.strictEqual(arr[n - 1].filename, fileURLToPath(file)); + }); +} diff --git a/benchmark/fixtures/esm-dir-file.mjs b/benchmark/fixtures/esm-dir-file.mjs index d5dafc5c46697e..a1028d57afd56b 100644 --- a/benchmark/fixtures/esm-dir-file.mjs +++ b/benchmark/fixtures/esm-dir-file.mjs @@ -1,3 +1,2 @@ -import assert from 'assert'; -assert.ok(import.meta.dirname); -assert.ok(import.meta.filename); +export const dirname = import.meta.dirname; +export const filename = import.meta.filename; diff --git a/benchmark/fixtures/load-esm-dir-file.js b/benchmark/fixtures/load-esm-dir-file.js deleted file mode 100644 index a4115dd39e0489..00000000000000 --- a/benchmark/fixtures/load-esm-dir-file.js +++ /dev/null @@ -1,5 +0,0 @@ -(async function () { - for (let i = 0; i < 1000; i += 1) { - await import(`./esm-dir-file.mjs?i=${i}`); - } -}()); diff --git a/benchmark/fixtures/require-builtins.js b/benchmark/fixtures/require-builtins.js index 685eef1875b301..872c6aa302c70e 100644 --- a/benchmark/fixtures/require-builtins.js +++ b/benchmark/fixtures/require-builtins.js @@ -23,7 +23,6 @@ const list = [ 'path', 'perf_hooks', 'process', - 'punycode', 'querystring', 'readline', 'repl', diff --git a/benchmark/fs/bench-readvSync.js b/benchmark/fs/bench-readvSync.js new file mode 100644 index 00000000000000..c163429b5f6212 --- /dev/null +++ b/benchmark/fs/bench-readvSync.js @@ -0,0 +1,58 @@ +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const assert = require('assert'); +const tmpdir = require('../../test/common/tmpdir'); +tmpdir.refresh(); + +const exptectedBuff = Buffer.from('Benchmark Data'); +const expectedLength = exptectedBuff.length; + +const bufferArr = [Buffer.alloc(expectedLength)]; + +const filename = tmpdir.resolve('readv_sync.txt'); +fs.writeFileSync(filename, exptectedBuff); + +const bench = common.createBenchmark(main, { + type: ['valid', 'invalid'], + n: [1e5], +}); + +function main({ n, type }) { + let fd; + let result; + + switch (type) { + case 'valid': + fd = fs.openSync(filename, 'r'); + + bench.start(); + for (let i = 0; i < n; i++) { + result = fs.readvSync(fd, bufferArr, 0); + } + + bench.end(n); + assert.strictEqual(result, expectedLength); + fs.closeSync(fd); + break; + case 'invalid': { + fd = 1 << 30; + let hasError = false; + bench.start(); + for (let i = 0; i < n; i++) { + try { + result = fs.readvSync(fd, bufferArr, 0); + } catch { + hasError = true; + } + } + + bench.end(n); + assert(hasError); + break; + } + default: + throw new Error('Invalid type'); + } +} diff --git a/benchmark/fs/bench-rmdirSync.js b/benchmark/fs/bench-rmdirSync.js new file mode 100644 index 00000000000000..48103439274371 --- /dev/null +++ b/benchmark/fs/bench-rmdirSync.js @@ -0,0 +1,42 @@ +'use strict'; + +const common = require('../common'); +const fs = require('fs'); +const tmpdir = require('../../test/common/tmpdir'); +tmpdir.refresh(); + +const bench = common.createBenchmark(main, { + type: ['existing', 'non-existing'], + n: [1e4], +}); + +function main({ n, type }) { + switch (type) { + case 'existing': { + for (let i = 0; i < n; i++) { + fs.mkdirSync(tmpdir.resolve(`rmdirsync-bench-dir-${i}`)); + } + + bench.start(); + for (let i = 0; i < n; i++) { + fs.rmdirSync(tmpdir.resolve(`rmdirsync-bench-dir-${i}`)); + } + bench.end(n); + break; + } + case 'non-existing': { + bench.start(); + for (let i = 0; i < n; i++) { + try { + fs.rmdirSync(tmpdir.resolve(`.non-existent-folder-${i}`)); + } catch { + // do nothing + } + } + bench.end(n); + break; + } + default: + new Error('Invalid type'); + } +} diff --git a/benchmark/fs/bench-statSync-failure.js b/benchmark/fs/bench-statSync-failure.js index de6128d8fc1845..b1005a78a7f6e0 100644 --- a/benchmark/fs/bench-statSync-failure.js +++ b/benchmark/fs/bench-statSync-failure.js @@ -5,21 +5,29 @@ const fs = require('fs'); const path = require('path'); const bench = common.createBenchmark(main, { - n: [1e6], - statSyncType: ['throw', 'noThrow'], + n: [1e4], + statSyncType: ['fstatSync', 'lstatSync', 'statSync'], + throwType: [ 'throw', 'noThrow' ], +}, { + // fstatSync does not support throwIfNoEntry + combinationFilter: ({ statSyncType, throwType }) => !(statSyncType === 'fstatSync' && throwType === 'noThrow'), }); -function main({ n, statSyncType }) { - const arg = path.join(__dirname, 'non.existent'); +function main({ n, statSyncType, throwType }) { + const arg = (statSyncType === 'fstatSync' ? + (1 << 30) : + path.join(__dirname, 'non.existent')); + + const fn = fs[statSyncType]; bench.start(); for (let i = 0; i < n; i++) { - if (statSyncType === 'noThrow') { - fs.statSync(arg, { throwIfNoEntry: false }); + if (throwType === 'noThrow') { + fn(arg, { throwIfNoEntry: false }); } else { try { - fs.statSync(arg); + fn(arg); } catch { // Continue regardless of error. } diff --git a/benchmark/fs/bench-statSync.js b/benchmark/fs/bench-statSync.js index 4ec2e860fb6ba7..e6680fe7cb85fe 100644 --- a/benchmark/fs/bench-statSync.js +++ b/benchmark/fs/bench-statSync.js @@ -4,7 +4,7 @@ const common = require('../common'); const fs = require('fs'); const bench = common.createBenchmark(main, { - n: [1e6], + n: [1e4], statSyncType: ['fstatSync', 'lstatSync', 'statSync'], }); diff --git a/benchmark/fs/bench-writeFileSync.js b/benchmark/fs/bench-writeFileSync.js new file mode 100644 index 00000000000000..29c16f4aa2a12d --- /dev/null +++ b/benchmark/fs/bench-writeFileSync.js @@ -0,0 +1,43 @@ +'use strict'; + +const common = require('../common.js'); +const fs = require('fs'); +const tmpdir = require('../../test/common/tmpdir'); +tmpdir.refresh(); + +// Some variants are commented out as they do not show a change and just slow +const bench = common.createBenchmark(main, { + encoding: ['utf8'], + useFd: ['true', 'false'], + length: [1024, 102400, 1024 * 1024], + + // useBuffer: ['true', 'false'], + useBuffer: ['false'], + + // func: ['appendFile', 'writeFile'], + func: ['writeFile'], + + n: [1e3], +}); + +function main({ n, func, encoding, length, useFd, useBuffer }) { + tmpdir.refresh(); + const enc = encoding === 'undefined' ? undefined : encoding; + const path = tmpdir.resolve(`.writefilesync-file-${Date.now()}`); + + useFd = useFd === 'true'; + const file = useFd ? fs.openSync(path, 'w') : path; + + let data = 'a'.repeat(length); + if (useBuffer === 'true') data = Buffer.from(data, encoding); + + const fn = fs[func + 'Sync']; + + bench.start(); + for (let i = 0; i < n; ++i) { + fn(file, data, enc); + } + bench.end(n); + + if (useFd) fs.closeSync(file); +} diff --git a/benchmark/misc/startup-cli-version.js b/benchmark/misc/startup-cli-version.js new file mode 100644 index 00000000000000..52ab6bc9f582f3 --- /dev/null +++ b/benchmark/misc/startup-cli-version.js @@ -0,0 +1,51 @@ +'use strict'; +const common = require('../common.js'); +const { spawnSync } = require('child_process'); +const path = require('path'); + +// This benchmarks the startup of various CLI tools that are already +// checked into the source code. We use --version because the output +// tends to be minimal and fewer operations are done to generate +// these so that the startup cost is still dominated by a more +// indispensible part of the CLI. +const bench = common.createBenchmark(main, { + cli: [ + 'tools/node_modules/eslint/bin/eslint.js', + 'deps/npm/bin/npm-cli.js', + 'deps/corepack/dist/corepack.js', + ], + count: [30], +}); + +function spawnProcess(cli, bench, state) { + const cmd = process.execPath || process.argv[0]; + while (state.finished < state.count) { + const child = spawnSync(cmd, [cli, '--version'], { + env: { npm_config_loglevel: 'silent', ...process.env }, + }); + // Log some information for debugging if it fails, which it shouldn't. + if (child.status !== 0) { + console.log('---- STDOUT ----'); + console.log(child.stdout.toString()); + console.log('---- STDERR ----'); + console.log(child.stderr.toString()); + throw new Error(`Child process stopped with exit code ${child.status}`); + } + state.finished++; + if (state.finished === 0) { + // Finished warmup. + bench.start(); + } + + if (state.finished === state.count) { + bench.end(state.count); + } + } +} + +function main({ count, cli }) { + cli = path.resolve(__dirname, '../../', cli); + const warmup = 3; + const state = { count, finished: -warmup }; + spawnProcess(cli, bench, state); +} diff --git a/benchmark/misc/startup.js b/benchmark/misc/startup.js index f55be1a7902e4f..07c0701d128899 100644 --- a/benchmark/misc/startup.js +++ b/benchmark/misc/startup.js @@ -9,7 +9,6 @@ const bench = common.createBenchmark(main, { script: [ 'benchmark/fixtures/require-builtins', 'test/fixtures/semicolon', - 'benchmark/fixtures/load-esm-dir-file', ], mode: ['process', 'worker'], count: [30], diff --git a/benchmark/perf_hooks/now.js b/benchmark/perf_hooks/now.js new file mode 100644 index 00000000000000..7132196c430125 --- /dev/null +++ b/benchmark/perf_hooks/now.js @@ -0,0 +1,23 @@ +'use strict'; + +const assert = require('assert'); +const common = require('../common.js'); + +const bench = common.createBenchmark(main, { + n: [1e6], +}); + +function main({ n }) { + const arr = []; + for (let i = 0; i < n; ++i) { + arr.push(performance.now()); + } + + bench.start(); + for (let i = 0; i < n; i++) { + arr[i] = performance.now(); + } + bench.end(n); + + assert.strictEqual(arr.length, n); +} diff --git a/benchmark/perf_hooks/performance-observer.js b/benchmark/perf_hooks/performance-observer.js index 42a94932860c38..d943c4547e0431 100644 --- a/benchmark/perf_hooks/performance-observer.js +++ b/benchmark/perf_hooks/performance-observer.js @@ -13,7 +13,7 @@ function randomFn() { } const bench = common.createBenchmark(main, { - n: [1e5], + n: [1e6], pending: [1, 10], }, { options: ['--expose-internals'], diff --git a/benchmark/perf_hooks/resourcetiming.js b/benchmark/perf_hooks/resourcetiming.js index 51c4778d20065f..69ee06c92cbd9f 100644 --- a/benchmark/perf_hooks/resourcetiming.js +++ b/benchmark/perf_hooks/resourcetiming.js @@ -50,7 +50,7 @@ function createTimingInfo({ } const bench = common.createBenchmark(main, { - n: [1e5], + n: [1e6], observe: ['resource'], }); diff --git a/benchmark/perf_hooks/timerfied.js b/benchmark/perf_hooks/timerfied.js index 50be0a47fc1b5a..f1cc62637187dd 100644 --- a/benchmark/perf_hooks/timerfied.js +++ b/benchmark/perf_hooks/timerfied.js @@ -13,7 +13,7 @@ function randomFn() { } const bench = common.createBenchmark(main, { - n: [1e5], + n: [1e6], observe: ['function'], }); diff --git a/benchmark/perf_hooks/usertiming.js b/benchmark/perf_hooks/usertiming.js index 24a53a116785df..92017861d58c4a 100644 --- a/benchmark/perf_hooks/usertiming.js +++ b/benchmark/perf_hooks/usertiming.js @@ -8,7 +8,7 @@ const { } = require('perf_hooks'); const bench = common.createBenchmark(main, { - n: [1e5], + n: [1e6], observe: ['all', 'measure'], }); diff --git a/benchmark/url/usvstring.js b/benchmark/url/usvstring.js deleted file mode 100644 index 93a50846fb999f..00000000000000 --- a/benchmark/url/usvstring.js +++ /dev/null @@ -1,27 +0,0 @@ -'use strict'; -const common = require('../common.js'); - -const inputs = { - valid: 'adsfadsfadsf', - validsurr: '\uda23\ude23\uda1f\udfaa\ud800\udfff\uda23\ude23\uda1f\udfaa' + - '\ud800\udfff', - someinvalid: 'asasfdfasd\uda23', - allinvalid: '\udc45\uda23 \udf00\udc00 \udfaa\uda12 \udc00\udfaa', - nonstring: { toString() { return 'asdf'; } }, -}; -const bench = common.createBenchmark(main, { - input: Object.keys(inputs), - n: [5e7], -}, { - flags: ['--expose-internals'], -}); - -function main({ input, n }) { - const { toUSVString } = require('internal/url'); - const str = inputs[input]; - - bench.start(); - for (let i = 0; i < n; i++) - toUSVString(str); - bench.end(n); -} diff --git a/benchmark/util/format.js b/benchmark/util/format.js index 4078fe5e3da7cd..dfbb6c3372a23b 100644 --- a/benchmark/util/format.js +++ b/benchmark/util/format.js @@ -18,7 +18,7 @@ const inputs = { }; const bench = common.createBenchmark(main, { - n: [1e5], + n: [1e6], type: Object.keys(inputs), }); diff --git a/benchmark/util/inspect-array.js b/benchmark/util/inspect-array.js index 7b2394d80e9cfe..ed40f5c4324ac3 100644 --- a/benchmark/util/inspect-array.js +++ b/benchmark/util/inspect-array.js @@ -4,7 +4,7 @@ const common = require('../common'); const util = require('util'); const bench = common.createBenchmark(main, { - n: [5e2], + n: [5e3], len: [1e2, 1e5], type: [ 'denseArray', diff --git a/benchmark/util/inspect.js b/benchmark/util/inspect.js index ace4e588ae5135..8e453b9e226ee8 100644 --- a/benchmark/util/inspect.js +++ b/benchmark/util/inspect.js @@ -9,7 +9,7 @@ const opts = { none: undefined, }; const bench = common.createBenchmark(main, { - n: [2e4], + n: [8e4], method: [ 'Object', 'Object_empty', diff --git a/benchmark/util/normalize-encoding.js b/benchmark/util/normalize-encoding.js index cd65caca4a4056..204ea67c54ce1a 100644 --- a/benchmark/util/normalize-encoding.js +++ b/benchmark/util/normalize-encoding.js @@ -21,7 +21,7 @@ const inputs = [ const bench = common.createBenchmark(main, { input: inputs.concat(Object.keys(groupedInputs)), - n: [1e5], + n: [1e6], }, { flags: '--expose-internals', }); diff --git a/benchmark/util/splice-one.js b/benchmark/util/splice-one.js index 6a5a634640add4..211e4fad571835 100644 --- a/benchmark/util/splice-one.js +++ b/benchmark/util/splice-one.js @@ -3,7 +3,7 @@ const common = require('../common'); const bench = common.createBenchmark(main, { - n: [1e5], + n: [5e6], pos: ['start', 'middle', 'end'], size: [10, 100, 500], }, { flags: ['--expose-internals'] }); diff --git a/benchmark/util/text-decoder.js b/benchmark/util/text-decoder.js index f85dd4db008ed8..dd4f02016df077 100644 --- a/benchmark/util/text-decoder.js +++ b/benchmark/util/text-decoder.js @@ -6,8 +6,8 @@ const bench = common.createBenchmark(main, { encoding: ['utf-8', 'latin1', 'iso-8859-3'], ignoreBOM: [0, 1], fatal: [0, 1], - len: [256, 1024 * 16, 1024 * 512], - n: [1e2], + len: [256, 1024 * 16, 1024 * 128], + n: [1e3], type: ['SharedArrayBuffer', 'ArrayBuffer', 'Buffer'], }); diff --git a/benchmark/util/to-usv-string.js b/benchmark/util/to-usv-string.js deleted file mode 100644 index 22d23d3198d124..00000000000000 --- a/benchmark/util/to-usv-string.js +++ /dev/null @@ -1,21 +0,0 @@ -'use strict'; - -const common = require('../common'); - -const BASE = 'string\ud801'; - -const bench = common.createBenchmark(main, { - n: [1e5], - size: [10, 100, 500], -}); - -function main({ n, size }) { - const { toUSVString } = require('util'); - const str = BASE.repeat(size); - - bench.start(); - for (let i = 0; i < n; i++) { - toUSVString(str); - } - bench.end(n); -} diff --git a/benchmark/util/type-check.js b/benchmark/util/type-check.js index 2bb956f4ed87ee..269c2a4e9c1374 100644 --- a/benchmark/util/type-check.js +++ b/benchmark/util/type-check.js @@ -29,7 +29,7 @@ const bench = common.createBenchmark(main, { type: Object.keys(args), version: ['native', 'js'], argument: ['true', 'false-primitive', 'false-object'], - n: [1e5], + n: [1e6], }, { flags: ['--expose-internals', '--no-warnings'], }); diff --git a/benchmark/websocket/simple.js b/benchmark/websocket/simple.js new file mode 100644 index 00000000000000..1147602a7b1ea7 --- /dev/null +++ b/benchmark/websocket/simple.js @@ -0,0 +1,100 @@ +'use strict'; + +const common = require('../common.js'); +const crypto = require('crypto'); +const http = require('http'); +const { WebSocket } = require('../../deps/undici/undici'); + +const GUID = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11'; + +const configs = { + size: [64, 16 * 1024, 128 * 1024, 1024 * 1024], + useBinary: ['true', 'false'], + roundtrips: [5000, 1000, 100], +}; + +const bench = common.createBenchmark(main, configs); + +function createFrame(data, opcode) { + let infoLength = 2; + let payloadLength = data.length; + + if (payloadLength >= 65536) { + infoLength += 8; + payloadLength = 127; + } else if (payloadLength > 125) { + infoLength += 2; + payloadLength = 126; + } + + const info = Buffer.alloc(infoLength); + + info[0] = opcode | 0x80; + info[1] = payloadLength; + + if (payloadLength === 126) { + info.writeUInt16BE(data.length, 2); + } else if (payloadLength === 127) { + info[2] = info[3] = 0; + info.writeUIntBE(data.length, 4, 6); + } + + return Buffer.concat([info, data]); +} + +function main(conf) { + const frame = createFrame(Buffer.alloc(conf.size).fill('.'), conf.useBinary === 'true' ? 2 : 1); + const server = http.createServer(); + server.on('upgrade', (req, socket) => { + const key = crypto + .createHash('sha1') + .update(req.headers['sec-websocket-key'] + GUID) + .digest('base64'); + + let bytesReceived = 0; + let roundtrip = 0; + + socket.on('data', function onData(chunk) { + bytesReceived += chunk.length; + + if (bytesReceived === frame.length + 4) { // +4 for the mask. + // Message completely received. + bytesReceived = 0; + + if (++roundtrip === conf.roundtrips) { + socket.removeListener('data', onData); + socket.resume(); + socket.end(); + server.close(); + + bench.end(conf.roundtrips); + } else { + socket.write(frame); + } + } + }); + + socket.write( + [ + 'HTTP/1.1 101 Switching Protocols', + 'Upgrade: websocket', + 'Connection: Upgrade', + `Sec-WebSocket-Accept: ${key}`, + '\r\n', + ].join('\r\n'), + ); + + socket.write(frame); + }); + + server.listen(0, () => { + const ws = new WebSocket(`ws://localhost:${server.address().port}`); + ws.addEventListener('open', () => { + bench.start(); + }); + + ws.addEventListener('message', (event) => { + ws.send(event.data); + }); + }); +} diff --git a/common.gypi b/common.gypi index c51dbca5e74c5b..28522c9fbf83b4 100644 --- a/common.gypi +++ b/common.gypi @@ -36,7 +36,7 @@ # Reset this number to 0 on major V8 upgrades. # Increment by one for each non-official patch applied to deps/v8. - 'v8_embedder_string': '-node.15', + 'v8_embedder_string': '-node.17', ##### V8 defaults for Node.js ##### @@ -75,8 +75,16 @@ 'v8_win64_unwinding_info': 1, - # TODO(refack): make v8-perfetto happen + # Variables controlling external defines exposed in public headers. + 'v8_enable_conservative_stack_scanning%': 0, + 'v8_enable_direct_local%': 0, + 'v8_enable_map_packing%': 0, + 'v8_enable_pointer_compression_shared_cage%': 0, + 'v8_enable_sandbox%': 0, + 'v8_enable_v8_checks%': 0, + 'v8_enable_zone_compression%': 0, 'v8_use_perfetto': 0, + 'tsan%': 0, ##### end V8 defaults ##### @@ -134,7 +142,7 @@ }], ], }, - 'defines': [ 'DEBUG', '_DEBUG', 'V8_ENABLE_CHECKS' ], + 'defines': [ 'DEBUG', '_DEBUG' ], 'cflags': [ '-g', '-O0' ], 'conditions': [ ['OS in "aix os400"', { @@ -257,11 +265,8 @@ } }, - # Defines these mostly for node-gyp to pickup, and warn addon authors of - # imminent V8 deprecations, also to sync how dependencies are configured. + # Defines these mostly for node-gyp to pickup. 'defines': [ - 'V8_DEPRECATION_WARNINGS', - 'V8_IMMINENT_DEPRECATION_WARNINGS', '_GLIBCXX_USE_CXX11_ABI=1', ], @@ -369,15 +374,50 @@ }], ], }], + # The defines bellow must include all things from the external_v8_defines + # list in v8/BUILD.gn. + ['v8_enable_v8_checks == 1', { + 'defines': ['V8_ENABLE_CHECKS'], + }], ['v8_enable_pointer_compression == 1', { - 'defines': [ - 'V8_COMPRESS_POINTERS', - 'V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE', - ], + 'defines': ['V8_COMPRESS_POINTERS'], + }], + ['v8_enable_pointer_compression_shared_cage == 1', { + 'defines': ['V8_COMPRESS_POINTERS_IN_SHARED_CAGE'], + }], + ['v8_enable_pointer_compression == 1 and v8_enable_pointer_compression_shared_cage != 1', { + 'defines': ['V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE'], }], ['v8_enable_pointer_compression == 1 or v8_enable_31bit_smis_on_64bit_arch == 1', { 'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH'], }], + ['v8_enable_zone_compression == 1', { + 'defines': ['V8_COMPRESS_ZONES',], + }], + ['v8_enable_sandbox == 1', { + 'defines': ['V8_ENABLE_SANDBOX',], + }], + ['v8_deprecation_warnings == 1', { + 'defines': ['V8_DEPRECATION_WARNINGS',], + }], + ['v8_imminent_deprecation_warnings == 1', { + 'defines': ['V8_IMMINENT_DEPRECATION_WARNINGS',], + }], + ['v8_use_perfetto == 1', { + 'defines': ['V8_USE_PERFETTO',], + }], + ['v8_enable_map_packing == 1', { + 'defines': ['V8_MAP_PACKING',], + }], + ['tsan == 1', { + 'defines': ['V8_IS_TSAN',], + }], + ['v8_enable_conservative_stack_scanning == 1', { + 'defines': ['V8_ENABLE_CONSERVATIVE_STACK_SCANNING',], + }], + ['v8_enable_direct_local == 1', { + 'defines': ['V8_ENABLE_DIRECT_LOCAL',], + }], ['OS == "win"', { 'defines': [ 'WIN32', diff --git a/configure.py b/configure.py index be95decd5668f2..84b016cd853080 100755 --- a/configure.py +++ b/configure.py @@ -812,6 +812,12 @@ help='Enable V8 transparent hugepage support. This feature is only '+ 'available on Linux platform.') +parser.add_argument('--v8-enable-maglev', + action='store_true', + dest='v8_enable_maglev', + default=None, + help='Enable V8 Maglev compiler. Not available on all platforms.') + parser.add_argument('--v8-enable-short-builtin-calls', action='store_true', dest='v8_enable_short_builtin_calls', @@ -1494,10 +1500,12 @@ def configure_v8(o): o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables. o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks. o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1 + o['variables']['v8_enable_maglev'] = 1 if options.v8_enable_maglev else 0 o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0 o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0 o['variables']['v8_enable_shared_ro_heap'] = 0 if options.enable_pointer_compression or options.disable_shared_ro_heap else 1 o['variables']['v8_enable_extensible_ro_snapshot'] = 0 + o['variables']['v8_enable_v8_checks'] = 1 if options.debug else 0 o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0 o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform) o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8) diff --git a/deps/ada/BUILD.gn b/deps/ada/BUILD.gn new file mode 100644 index 00000000000000..e92ac3a3beac14 --- /dev/null +++ b/deps/ada/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +ada_gn_build("ada") { +} diff --git a/deps/ada/ada.cpp b/deps/ada/ada.cpp index 909fd50034d4fe..449046ff41d3ca 100644 --- a/deps/ada/ada.cpp +++ b/deps/ada/ada.cpp @@ -1,4 +1,4 @@ -/* auto-generated on 2023-10-22 19:50:50 -0400. Do not edit! */ +/* auto-generated on 2023-11-19 13:35:02 -0500. Do not edit! */ /* begin file src/ada.cpp */ #include "ada.h" /* begin file src/checkers.cpp */ @@ -7,62 +7,79 @@ namespace ada::checkers { ada_really_inline ada_constexpr bool is_ipv4(std::string_view view) noexcept { - size_t last_dot = view.rfind('.'); - if (last_dot == view.size() - 1) { + // The string is not empty and does not contain upper case ASCII characters. + // + // Optimization. To be considered as a possible ipv4, the string must end + // with 'x' or a lowercase hex character. + // Most of the time, this will be false so this simple check will save a lot + // of effort. + char last_char = view.back(); + // If the address ends with a dot, we need to prune it (special case). + if (last_char == '.') { view.remove_suffix(1); - last_dot = view.rfind('.'); + if (view.empty()) { + return false; + } + last_char = view.back(); } - std::string_view number = - (last_dot == std::string_view::npos) ? view : view.substr(last_dot + 1); - if (number.empty()) { + bool possible_ipv4 = (last_char >= '0' && last_char <= '9') || + (last_char >= 'a' && last_char <= 'f') || + last_char == 'x'; + if (!possible_ipv4) { return false; } + // From the last character, find the last dot. + size_t last_dot = view.rfind('.'); + if (last_dot != std::string_view::npos) { + // We have at least one dot. + view = view.substr(last_dot + 1); + } /** Optimization opportunity: we have basically identified the last number of the ipv4 if we return true here. We might as well parse it and have at least one number parsed when we get to parse_ipv4. */ - if (std::all_of(number.begin(), number.end(), ada::checkers::is_digit)) { + if (std::all_of(view.begin(), view.end(), ada::checkers::is_digit)) { return true; } - return (checkers::has_hex_prefix(number) && - std::all_of(number.begin() + 2, number.end(), - ada::unicode::is_lowercase_hex)); + // It could be hex (0x), but not if there is a single character. + if (view.size() == 1) { + return false; + } + // It must start with 0x. + if (!std::equal(view.begin(), view.begin() + 2, "0x")) { + return false; + } + // We must allow "0x". + if (view.size() == 2) { + return true; + } + // We have 0x followed by some characters, we need to check that they are + // hexadecimals. + return std::all_of(view.begin() + 2, view.end(), + ada::unicode::is_lowercase_hex); } // for use with path_signature, we include all characters that need percent // encoding. -static constexpr uint8_t path_signature_table[256] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 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, 2, 0, 0, 0, - 1, 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, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; -static_assert(path_signature_table[uint8_t('?')] == 1); -static_assert(path_signature_table[uint8_t('`')] == 1); -static_assert(path_signature_table[uint8_t('{')] == 1); -static_assert(path_signature_table[uint8_t('}')] == 1); -// -static_assert(path_signature_table[uint8_t(' ')] == 1); -static_assert(path_signature_table[uint8_t('?')] == 1); -static_assert(path_signature_table[uint8_t('"')] == 1); -static_assert(path_signature_table[uint8_t('#')] == 1); -static_assert(path_signature_table[uint8_t('<')] == 1); -static_assert(path_signature_table[uint8_t('>')] == 1); -static_assert(path_signature_table[uint8_t('\\')] == 2); -static_assert(path_signature_table[uint8_t('.')] == 4); -static_assert(path_signature_table[uint8_t('%')] == 8); - -// -static_assert(path_signature_table[0] == 1); -static_assert(path_signature_table[31] == 1); -static_assert(path_signature_table[127] == 1); -static_assert(path_signature_table[128] == 1); -static_assert(path_signature_table[255] == 1); +static constexpr std::array path_signature_table = + []() constexpr { + std::array result{}; + for (size_t i = 0; i < 256; i++) { + if (i <= 0x20 || i == 0x22 || i == 0x23 || i == 0x3c || i == 0x3e || + i == 0x3f || i == 0x60 || i == 0x7b || i == 0x7b || i == 0x7d || + i > 0x7e) { + result[i] = 1; + } else if (i == 0x25) { + result[i] = 8; + } else if (i == 0x2e) { + result[i] = 4; + } else if (i == 0x5c) { + result[i] = 2; + } else { + result[i] = 0; + } + } + return result; + }(); ada_really_inline constexpr uint8_t path_signature( std::string_view input) noexcept { @@ -9912,56 +9929,36 @@ ada_really_inline bool has_tabs_or_newline( // U+0020 SPACE, U+0023 (#), U+002F (/), U+003A (:), U+003C (<), U+003E (>), // U+003F (?), U+0040 (@), U+005B ([), U+005C (\), U+005D (]), U+005E (^), or // U+007C (|). -constexpr static bool is_forbidden_host_code_point_table[] = { - 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 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, 1, 1, 1, 1, 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, 0, 1, 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, 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, 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, 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, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; -static_assert(sizeof(is_forbidden_host_code_point_table) == 256); +constexpr static std::array is_forbidden_host_code_point_table = + []() constexpr { + std::array result{}; + for (uint8_t c : {'\0', '\x09', '\x0a', '\x0d', ' ', '#', '/', ':', '<', + '>', '?', '@', '[', '\\', ']', '^', '|'}) { + result[c] = true; + } + return result; + }(); ada_really_inline constexpr bool is_forbidden_host_code_point( const char c) noexcept { return is_forbidden_host_code_point_table[uint8_t(c)]; } -static_assert(unicode::is_forbidden_host_code_point('\0')); -static_assert(unicode::is_forbidden_host_code_point('\t')); -static_assert(unicode::is_forbidden_host_code_point('\n')); -static_assert(unicode::is_forbidden_host_code_point('\r')); -static_assert(unicode::is_forbidden_host_code_point(' ')); -static_assert(unicode::is_forbidden_host_code_point('#')); -static_assert(unicode::is_forbidden_host_code_point('/')); -static_assert(unicode::is_forbidden_host_code_point(':')); -static_assert(unicode::is_forbidden_host_code_point('?')); -static_assert(unicode::is_forbidden_host_code_point('@')); -static_assert(unicode::is_forbidden_host_code_point('[')); -static_assert(unicode::is_forbidden_host_code_point('?')); -static_assert(unicode::is_forbidden_host_code_point('<')); -static_assert(unicode::is_forbidden_host_code_point('>')); -static_assert(unicode::is_forbidden_host_code_point('\\')); -static_assert(unicode::is_forbidden_host_code_point(']')); -static_assert(unicode::is_forbidden_host_code_point('^')); -static_assert(unicode::is_forbidden_host_code_point('|')); - -constexpr static uint8_t is_forbidden_domain_code_point_table[] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 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, 1, 1, 1, 1, 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, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; +constexpr static std::array is_forbidden_domain_code_point_table = + []() constexpr { + std::array result{}; + for (uint8_t c : {'\0', '\x09', '\x0a', '\x0d', ' ', '#', '/', ':', '<', + '>', '?', '@', '[', '\\', ']', '^', '|', '%'}) { + result[c] = true; + } + for (uint8_t c = 0; c <= 32; c++) { + result[c] = true; + } + for (size_t c = 127; c < 255; c++) { + result[c] = true; + } + return result; + }(); static_assert(sizeof(is_forbidden_domain_code_point_table) == 256); @@ -9986,22 +9983,24 @@ ada_really_inline constexpr bool contains_forbidden_domain_code_point( return accumulator; } -constexpr static uint8_t is_forbidden_domain_code_point_table_or_upper[] = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 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, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; - -static_assert(sizeof(is_forbidden_domain_code_point_table_or_upper) == 256); -static_assert(is_forbidden_domain_code_point_table_or_upper[uint8_t('A')] == 2); -static_assert(is_forbidden_domain_code_point_table_or_upper[uint8_t('Z')] == 2); +constexpr static std::array + is_forbidden_domain_code_point_table_or_upper = []() constexpr { + std::array result{}; + for (uint8_t c : {'\0', '\x09', '\x0a', '\x0d', ' ', '#', '/', ':', '<', + '>', '?', '@', '[', '\\', ']', '^', '|', '%'}) { + result[c] = 1; + } + for (uint8_t c = 'A'; c <= 'Z'; c++) { + result[c] = 2; + } + for (uint8_t c = 0; c <= 32; c++) { + result[c] = 1; + } + for (size_t c = 127; c < 255; c++) { + result[c] = 1; + } + return result; + }(); ada_really_inline constexpr uint8_t contains_forbidden_domain_code_point_or_upper(const char* input, @@ -10025,41 +10024,22 @@ contains_forbidden_domain_code_point_or_upper(const char* input, return accumulator; } -static_assert(unicode::is_forbidden_domain_code_point('%')); -static_assert(unicode::is_forbidden_domain_code_point('\x7f')); -static_assert(unicode::is_forbidden_domain_code_point('\0')); -static_assert(unicode::is_forbidden_domain_code_point('\t')); -static_assert(unicode::is_forbidden_domain_code_point('\n')); -static_assert(unicode::is_forbidden_domain_code_point('\r')); -static_assert(unicode::is_forbidden_domain_code_point(' ')); -static_assert(unicode::is_forbidden_domain_code_point('#')); -static_assert(unicode::is_forbidden_domain_code_point('/')); -static_assert(unicode::is_forbidden_domain_code_point(':')); -static_assert(unicode::is_forbidden_domain_code_point('?')); -static_assert(unicode::is_forbidden_domain_code_point('@')); -static_assert(unicode::is_forbidden_domain_code_point('[')); -static_assert(unicode::is_forbidden_domain_code_point('?')); -static_assert(unicode::is_forbidden_domain_code_point('<')); -static_assert(unicode::is_forbidden_domain_code_point('>')); -static_assert(unicode::is_forbidden_domain_code_point('\\')); -static_assert(unicode::is_forbidden_domain_code_point(']')); -static_assert(unicode::is_forbidden_domain_code_point('^')); -static_assert(unicode::is_forbidden_domain_code_point('|')); - -constexpr static bool is_alnum_plus_table[] = { - 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, - 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 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, 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, 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, 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, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; - -static_assert(sizeof(is_alnum_plus_table) == 256); +// std::isalnum(c) || c == '+' || c == '-' || c == '.') is true for +constexpr static std::array is_alnum_plus_table = []() constexpr { + std::array result{}; + for (size_t c = 0; c < 256; c++) { + if (c >= '0' && c <= '9') { + result[c] = true; + } else if (c >= 'a' && c <= 'z') { + result[c] = true; + } else if (c >= 'A' && c <= 'Z') { + result[c] = true; + } else if (c == '+' || c == '-' || c == '.') { + result[c] = true; + } + } + return result; +}(); ada_really_inline constexpr bool is_alnum_plus(const char c) noexcept { return is_alnum_plus_table[uint8_t(c)]; @@ -10067,13 +10047,6 @@ ada_really_inline constexpr bool is_alnum_plus(const char c) noexcept { // following under most compilers: return // return (std::isalnum(c) || c == '+' || c == '-' || c == '.'); } -static_assert(unicode::is_alnum_plus('+')); -static_assert(unicode::is_alnum_plus('-')); -static_assert(unicode::is_alnum_plus('.')); -static_assert(unicode::is_alnum_plus('0')); -static_assert(unicode::is_alnum_plus('1')); -static_assert(unicode::is_alnum_plus('a')); -static_assert(unicode::is_alnum_plus('b')); ada_really_inline constexpr bool is_ascii_hex_digit(const char c) noexcept { return (c >= '0' && c <= '9') || (c >= 'A' && c <= 'F') || @@ -10617,155 +10590,302 @@ ada_really_inline void resize(std::string_view& input, size_t pos) noexcept { input.remove_suffix(input.size() - pos); } -// Reverse the byte order. -ada_really_inline uint64_t swap_bytes(uint64_t val) noexcept { - // performance: this often compiles to a single instruction (e.g., bswap) - return ((((val)&0xff00000000000000ull) >> 56) | - (((val)&0x00ff000000000000ull) >> 40) | - (((val)&0x0000ff0000000000ull) >> 24) | - (((val)&0x000000ff00000000ull) >> 8) | - (((val)&0x00000000ff000000ull) << 8) | - (((val)&0x0000000000ff0000ull) << 24) | - (((val)&0x000000000000ff00ull) << 40) | - (((val)&0x00000000000000ffull) << 56)); -} - -ada_really_inline uint64_t swap_bytes_if_big_endian(uint64_t val) noexcept { - // performance: under little-endian systems (most systems), this function - // is free (just returns the input). -#if ADA_IS_BIG_ENDIAN - return swap_bytes(val); -#else - return val; // unchanged (trivial) -#endif +// computes the number of trailing zeroes +// this is a private inline function only defined in this source file. +ada_really_inline int trailing_zeroes(uint32_t input_num) noexcept { +#ifdef ADA_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward(&ret, input_num); + return (int)ret; +#else // ADA_REGULAR_VISUAL_STUDIO + return __builtin_ctzl(input_num); +#endif // ADA_REGULAR_VISUAL_STUDIO } // starting at index location, this finds the next location of a character // :, /, \\, ? or [. If none is found, view.size() is returned. // For use within get_host_delimiter_location. +#if ADA_NEON +// The ada_make_uint8x16_t macro is necessary because Visual Studio does not +// support direct initialization of uint8x16_t. See +// https://developercommunity.visualstudio.com/t/error-C2078:-too-many-initializers-whe/402911?q=backend+neon +#ifndef ada_make_uint8x16_t +#define ada_make_uint8x16_t(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, \ + x13, x14, x15, x16) \ + ([=]() { \ + static uint8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8, \ + x9, x10, x11, x12, x13, x14, x15, x16}; \ + return vld1q_u8(array); \ + }()) +#endif + ada_really_inline size_t find_next_host_delimiter_special( std::string_view view, size_t location) noexcept { - // performance: if you plan to call find_next_host_delimiter more than once, - // you *really* want find_next_host_delimiter to be inlined, because - // otherwise, the constants may get reloaded each time (bad). - auto has_zero_byte = [](uint64_t v) { - return ((v - 0x0101010101010101) & ~(v)&0x8080808080808080); - }; - auto index_of_first_set_byte = [](uint64_t v) { - return ((((v - 1) & 0x101010101010101) * 0x101010101010101) >> 56) - 1; - }; - auto broadcast = [](uint8_t v) -> uint64_t { - return 0x101010101010101ull * v; + // first check for short strings in which case we do it naively. + if (view.size() - location < 16) { // slow path + for (size_t i = location; i < view.size(); i++) { + if (view[i] == ':' || view[i] == '/' || view[i] == '\\' || + view[i] == '?' || view[i] == '[') { + return i; + } + } + return size_t(view.size()); + } + auto to_bitmask = [](uint8x16_t input) -> uint16_t { + uint8x16_t bit_mask = + ada_make_uint8x16_t(0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x01, + 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80); + uint8x16_t minput = vandq_u8(input, bit_mask); + uint8x16_t tmp = vpaddq_u8(minput, minput); + tmp = vpaddq_u8(tmp, tmp); + tmp = vpaddq_u8(tmp, tmp); + return vgetq_lane_u16(vreinterpretq_u16_u8(tmp), 0); }; + + // fast path for long strings (expected to be common) size_t i = location; - uint64_t mask1 = broadcast(':'); - uint64_t mask2 = broadcast('/'); - uint64_t mask3 = broadcast('\\'); - uint64_t mask4 = broadcast('?'); - uint64_t mask5 = broadcast('['); - // This loop will get autovectorized under many optimizing compilers, - // so you get actually SIMD! - for (; i + 7 < view.size(); i += 8) { - uint64_t word{}; - // performance: the next memcpy translates into a single CPU instruction. - memcpy(&word, view.data() + i, sizeof(word)); - // performance: on little-endian systems (most systems), this next line is - // free. - word = swap_bytes_if_big_endian(word); - uint64_t xor1 = word ^ mask1; - uint64_t xor2 = word ^ mask2; - uint64_t xor3 = word ^ mask3; - uint64_t xor4 = word ^ mask4; - uint64_t xor5 = word ^ mask5; - uint64_t is_match = has_zero_byte(xor1) | has_zero_byte(xor2) | - has_zero_byte(xor3) | has_zero_byte(xor4) | - has_zero_byte(xor5); - if (is_match) { - return size_t(i + index_of_first_set_byte(is_match)); + uint8x16_t low_mask = + ada_make_uint8x16_t(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x04, 0x04, 0x00, 0x00, 0x03); + uint8x16_t high_mask = + ada_make_uint8x16_t(0x00, 0x00, 0x02, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); + uint8x16_t fmask = vmovq_n_u8(0xf); + uint8x16_t zero{0}; + for (; i + 15 < view.size(); i += 16) { + uint8x16_t word = vld1q_u8((const uint8_t*)view.data() + i); + uint8x16_t lowpart = vqtbl1q_u8(low_mask, vandq_u8(word, fmask)); + uint8x16_t highpart = vqtbl1q_u8(high_mask, vshrq_n_u8(word, 4)); + uint8x16_t classify = vandq_u8(lowpart, highpart); + if (vmaxvq_u8(classify) != 0) { + uint8x16_t is_zero = vceqq_u8(classify, zero); + uint16_t is_non_zero = ~to_bitmask(is_zero); + return i + trailing_zeroes(is_non_zero); } } + if (i < view.size()) { - uint64_t word{}; - // performance: the next memcpy translates into a function call, but - // that is difficult to avoid. Might be a bit expensive. - memcpy(&word, view.data() + i, view.size() - i); - word = swap_bytes_if_big_endian(word); - uint64_t xor1 = word ^ mask1; - uint64_t xor2 = word ^ mask2; - uint64_t xor3 = word ^ mask3; - uint64_t xor4 = word ^ mask4; - uint64_t xor5 = word ^ mask5; - uint64_t is_match = has_zero_byte(xor1) | has_zero_byte(xor2) | - has_zero_byte(xor3) | has_zero_byte(xor4) | - has_zero_byte(xor5); - if (is_match) { - return size_t(i + index_of_first_set_byte(is_match)); + uint8x16_t word = + vld1q_u8((const uint8_t*)view.data() + view.length() - 16); + uint8x16_t lowpart = vqtbl1q_u8(low_mask, vandq_u8(word, fmask)); + uint8x16_t highpart = vqtbl1q_u8(high_mask, vshrq_n_u8(word, 4)); + uint8x16_t classify = vandq_u8(lowpart, highpart); + if (vmaxvq_u8(classify) != 0) { + uint8x16_t is_zero = vceqq_u8(classify, zero); + uint16_t is_non_zero = ~to_bitmask(is_zero); + return view.length() - 16 + trailing_zeroes(is_non_zero); } } - return view.size(); + return size_t(view.size()); } +#elif ADA_SSE2 +ada_really_inline size_t find_next_host_delimiter_special( + std::string_view view, size_t location) noexcept { + // first check for short strings in which case we do it naively. + if (view.size() - location < 16) { // slow path + for (size_t i = location; i < view.size(); i++) { + if (view[i] == ':' || view[i] == '/' || view[i] == '\\' || + view[i] == '?' || view[i] == '[') { + return i; + } + } + return size_t(view.size()); + } + // fast path for long strings (expected to be common) + size_t i = location; + const __m128i mask1 = _mm_set1_epi8(':'); + const __m128i mask2 = _mm_set1_epi8('/'); + const __m128i mask3 = _mm_set1_epi8('\\'); + const __m128i mask4 = _mm_set1_epi8('?'); + const __m128i mask5 = _mm_set1_epi8('['); + + for (; i + 15 < view.size(); i += 16) { + __m128i word = _mm_loadu_si128((const __m128i*)(view.data() + i)); + __m128i m1 = _mm_cmpeq_epi8(word, mask1); + __m128i m2 = _mm_cmpeq_epi8(word, mask2); + __m128i m3 = _mm_cmpeq_epi8(word, mask3); + __m128i m4 = _mm_cmpeq_epi8(word, mask4); + __m128i m5 = _mm_cmpeq_epi8(word, mask5); + __m128i m = _mm_or_si128( + _mm_or_si128(_mm_or_si128(m1, m2), _mm_or_si128(m3, m4)), m5); + int mask = _mm_movemask_epi8(m); + if (mask != 0) { + return i + trailing_zeroes(mask); + } + } + if (i < view.size()) { + __m128i word = + _mm_loadu_si128((const __m128i*)(view.data() + view.length() - 16)); + __m128i m1 = _mm_cmpeq_epi8(word, mask1); + __m128i m2 = _mm_cmpeq_epi8(word, mask2); + __m128i m3 = _mm_cmpeq_epi8(word, mask3); + __m128i m4 = _mm_cmpeq_epi8(word, mask4); + __m128i m5 = _mm_cmpeq_epi8(word, mask5); + __m128i m = _mm_or_si128( + _mm_or_si128(_mm_or_si128(m1, m2), _mm_or_si128(m3, m4)), m5); + int mask = _mm_movemask_epi8(m); + if (mask != 0) { + return view.length() - 16 + trailing_zeroes(mask); + } + } + return size_t(view.length()); +} +#else +// : / [ \\ ? +static constexpr std::array special_host_delimiters = + []() constexpr { + std::array result{}; + for (int i : {':', '/', '[', '\\', '?'}) { + result[i] = 1; + } + return result; + }(); +// credit: @the-moisrex recommended a table-based approach +ada_really_inline size_t find_next_host_delimiter_special( + std::string_view view, size_t location) noexcept { + auto const str = view.substr(location); + for (auto pos = str.begin(); pos != str.end(); ++pos) { + if (special_host_delimiters[(uint8_t)*pos]) { + return pos - str.begin() + location; + } + } + return size_t(view.size()); +} +#endif // starting at index location, this finds the next location of a character // :, /, ? or [. If none is found, view.size() is returned. // For use within get_host_delimiter_location. +#if ADA_NEON ada_really_inline size_t find_next_host_delimiter(std::string_view view, size_t location) noexcept { - // performance: if you plan to call find_next_host_delimiter more than once, - // you *really* want find_next_host_delimiter to be inlined, because - // otherwise, the constants may get reloaded each time (bad). - auto has_zero_byte = [](uint64_t v) { - return ((v - 0x0101010101010101) & ~(v)&0x8080808080808080); - }; - auto index_of_first_set_byte = [](uint64_t v) { - return ((((v - 1) & 0x101010101010101) * 0x101010101010101) >> 56) - 1; - }; - auto broadcast = [](uint8_t v) -> uint64_t { - return 0x101010101010101ull * v; + // first check for short strings in which case we do it naively. + if (view.size() - location < 16) { // slow path + for (size_t i = location; i < view.size(); i++) { + if (view[i] == ':' || view[i] == '/' || view[i] == '?' || + view[i] == '[') { + return i; + } + } + return size_t(view.size()); + } + auto to_bitmask = [](uint8x16_t input) -> uint16_t { + uint8x16_t bit_mask = + ada_make_uint8x16_t(0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, 0x01, + 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80); + uint8x16_t minput = vandq_u8(input, bit_mask); + uint8x16_t tmp = vpaddq_u8(minput, minput); + tmp = vpaddq_u8(tmp, tmp); + tmp = vpaddq_u8(tmp, tmp); + return vgetq_lane_u16(vreinterpretq_u16_u8(tmp), 0); }; + + // fast path for long strings (expected to be common) size_t i = location; - uint64_t mask1 = broadcast(':'); - uint64_t mask2 = broadcast('/'); - uint64_t mask4 = broadcast('?'); - uint64_t mask5 = broadcast('['); - // This loop will get autovectorized under many optimizing compilers, - // so you get actually SIMD! - for (; i + 7 < view.size(); i += 8) { - uint64_t word{}; - // performance: the next memcpy translates into a single CPU instruction. - memcpy(&word, view.data() + i, sizeof(word)); - // performance: on little-endian systems (most systems), this next line is - // free. - word = swap_bytes_if_big_endian(word); - uint64_t xor1 = word ^ mask1; - uint64_t xor2 = word ^ mask2; - uint64_t xor4 = word ^ mask4; - uint64_t xor5 = word ^ mask5; - uint64_t is_match = has_zero_byte(xor1) | has_zero_byte(xor2) | - has_zero_byte(xor4) | has_zero_byte(xor5); - if (is_match) { - return size_t(i + index_of_first_set_byte(is_match)); + uint8x16_t low_mask = + ada_make_uint8x16_t(0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x01, 0x04, 0x00, 0x00, 0x00, 0x03); + uint8x16_t high_mask = + ada_make_uint8x16_t(0x00, 0x00, 0x02, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00); + uint8x16_t fmask = vmovq_n_u8(0xf); + uint8x16_t zero{0}; + for (; i + 15 < view.size(); i += 16) { + uint8x16_t word = vld1q_u8((const uint8_t*)view.data() + i); + uint8x16_t lowpart = vqtbl1q_u8(low_mask, vandq_u8(word, fmask)); + uint8x16_t highpart = vqtbl1q_u8(high_mask, vshrq_n_u8(word, 4)); + uint8x16_t classify = vandq_u8(lowpart, highpart); + if (vmaxvq_u8(classify) != 0) { + uint8x16_t is_zero = vceqq_u8(classify, zero); + uint16_t is_non_zero = ~to_bitmask(is_zero); + return i + trailing_zeroes(is_non_zero); + } + } + + if (i < view.size()) { + uint8x16_t word = + vld1q_u8((const uint8_t*)view.data() + view.length() - 16); + uint8x16_t lowpart = vqtbl1q_u8(low_mask, vandq_u8(word, fmask)); + uint8x16_t highpart = vqtbl1q_u8(high_mask, vshrq_n_u8(word, 4)); + uint8x16_t classify = vandq_u8(lowpart, highpart); + if (vmaxvq_u8(classify) != 0) { + uint8x16_t is_zero = vceqq_u8(classify, zero); + uint16_t is_non_zero = ~to_bitmask(is_zero); + return view.length() - 16 + trailing_zeroes(is_non_zero); + } + } + return size_t(view.size()); +} +#elif ADA_SSE2 +ada_really_inline size_t find_next_host_delimiter(std::string_view view, + size_t location) noexcept { + // first check for short strings in which case we do it naively. + if (view.size() - location < 16) { // slow path + for (size_t i = location; i < view.size(); i++) { + if (view[i] == ':' || view[i] == '/' || view[i] == '?' || + view[i] == '[') { + return i; + } + } + return size_t(view.size()); + } + // fast path for long strings (expected to be common) + size_t i = location; + const __m128i mask1 = _mm_set1_epi8(':'); + const __m128i mask2 = _mm_set1_epi8('/'); + const __m128i mask4 = _mm_set1_epi8('?'); + const __m128i mask5 = _mm_set1_epi8('['); + + for (; i + 15 < view.size(); i += 16) { + __m128i word = _mm_loadu_si128((const __m128i*)(view.data() + i)); + __m128i m1 = _mm_cmpeq_epi8(word, mask1); + __m128i m2 = _mm_cmpeq_epi8(word, mask2); + __m128i m4 = _mm_cmpeq_epi8(word, mask4); + __m128i m5 = _mm_cmpeq_epi8(word, mask5); + __m128i m = _mm_or_si128(_mm_or_si128(m1, m2), _mm_or_si128(m4, m5)); + int mask = _mm_movemask_epi8(m); + if (mask != 0) { + return i + trailing_zeroes(mask); } } if (i < view.size()) { - uint64_t word{}; - // performance: the next memcpy translates into a function call, but - // that is difficult to avoid. Might be a bit expensive. - memcpy(&word, view.data() + i, view.size() - i); - // performance: on little-endian systems (most systems), this next line is - // free. - word = swap_bytes_if_big_endian(word); - uint64_t xor1 = word ^ mask1; - uint64_t xor2 = word ^ mask2; - uint64_t xor4 = word ^ mask4; - uint64_t xor5 = word ^ mask5; - uint64_t is_match = has_zero_byte(xor1) | has_zero_byte(xor2) | - has_zero_byte(xor4) | has_zero_byte(xor5); - if (is_match) { - return size_t(i + index_of_first_set_byte(is_match)); + __m128i word = + _mm_loadu_si128((const __m128i*)(view.data() + view.length() - 16)); + __m128i m1 = _mm_cmpeq_epi8(word, mask1); + __m128i m2 = _mm_cmpeq_epi8(word, mask2); + __m128i m4 = _mm_cmpeq_epi8(word, mask4); + __m128i m5 = _mm_cmpeq_epi8(word, mask5); + __m128i m = _mm_or_si128(_mm_or_si128(m1, m2), _mm_or_si128(m4, m5)); + int mask = _mm_movemask_epi8(m); + if (mask != 0) { + return view.length() - 16 + trailing_zeroes(mask); + } + } + return size_t(view.length()); +} +#else +// : / [ ? +static constexpr std::array host_delimiters = []() constexpr { + std::array result{}; + for (int i : {':', '/', '?', '['}) { + result[i] = 1; + } + return result; +}(); +// credit: @the-moisrex recommended a table-based approach +ada_really_inline size_t find_next_host_delimiter(std::string_view view, + size_t location) noexcept { + auto const str = view.substr(location); + for (auto pos = str.begin(); pos != str.end(); ++pos) { + if (host_delimiters[(uint8_t)*pos]) { + return pos - str.begin() + location; } } - return view.size(); + return size_t(view.size()); } +#endif ada_really_inline std::pair get_host_delimiter_location( const bool is_special, std::string_view& view) noexcept { @@ -11040,101 +11160,47 @@ ada_really_inline void strip_trailing_spaces_from_opaque_path( url.update_base_pathname(path); } +// @ / \\ ? +static constexpr std::array authority_delimiter_special = + []() constexpr { + std::array result{}; + for (int i : {'@', '/', '\\', '?'}) { + result[i] = 1; + } + return result; + }(); +// credit: @the-moisrex recommended a table-based approach ada_really_inline size_t find_authority_delimiter_special(std::string_view view) noexcept { - auto has_zero_byte = [](uint64_t v) { - return ((v - 0x0101010101010101) & ~(v)&0x8080808080808080); - }; - auto index_of_first_set_byte = [](uint64_t v) { - return ((((v - 1) & 0x101010101010101) * 0x101010101010101) >> 56) - 1; - }; - auto broadcast = [](uint8_t v) -> uint64_t { - return 0x101010101010101ull * v; - }; - size_t i = 0; - uint64_t mask1 = broadcast('@'); - uint64_t mask2 = broadcast('/'); - uint64_t mask3 = broadcast('?'); - uint64_t mask4 = broadcast('\\'); - - for (; i + 7 < view.size(); i += 8) { - uint64_t word{}; - memcpy(&word, view.data() + i, sizeof(word)); - word = swap_bytes_if_big_endian(word); - uint64_t xor1 = word ^ mask1; - uint64_t xor2 = word ^ mask2; - uint64_t xor3 = word ^ mask3; - uint64_t xor4 = word ^ mask4; - uint64_t is_match = has_zero_byte(xor1) | has_zero_byte(xor2) | - has_zero_byte(xor3) | has_zero_byte(xor4); - if (is_match) { - return size_t(i + index_of_first_set_byte(is_match)); - } - } - - if (i < view.size()) { - uint64_t word{}; - memcpy(&word, view.data() + i, view.size() - i); - word = swap_bytes_if_big_endian(word); - uint64_t xor1 = word ^ mask1; - uint64_t xor2 = word ^ mask2; - uint64_t xor3 = word ^ mask3; - uint64_t xor4 = word ^ mask4; - uint64_t is_match = has_zero_byte(xor1) | has_zero_byte(xor2) | - has_zero_byte(xor3) | has_zero_byte(xor4); - if (is_match) { - return size_t(i + index_of_first_set_byte(is_match)); + // performance note: we might be able to gain further performance + // with SIMD instrinsics. + for (auto pos = view.begin(); pos != view.end(); ++pos) { + if (authority_delimiter_special[(uint8_t)*pos]) { + return pos - view.begin(); } } - - return view.size(); + return size_t(view.size()); } +// @ / ? +static constexpr std::array authority_delimiter = []() constexpr { + std::array result{}; + for (int i : {'@', '/', '?'}) { + result[i] = 1; + } + return result; +}(); +// credit: @the-moisrex recommended a table-based approach ada_really_inline size_t find_authority_delimiter(std::string_view view) noexcept { - auto has_zero_byte = [](uint64_t v) { - return ((v - 0x0101010101010101) & ~(v)&0x8080808080808080); - }; - auto index_of_first_set_byte = [](uint64_t v) { - return ((((v - 1) & 0x101010101010101) * 0x101010101010101) >> 56) - 1; - }; - auto broadcast = [](uint8_t v) -> uint64_t { - return 0x101010101010101ull * v; - }; - size_t i = 0; - uint64_t mask1 = broadcast('@'); - uint64_t mask2 = broadcast('/'); - uint64_t mask3 = broadcast('?'); - - for (; i + 7 < view.size(); i += 8) { - uint64_t word{}; - memcpy(&word, view.data() + i, sizeof(word)); - word = swap_bytes_if_big_endian(word); - uint64_t xor1 = word ^ mask1; - uint64_t xor2 = word ^ mask2; - uint64_t xor3 = word ^ mask3; - uint64_t is_match = - has_zero_byte(xor1) | has_zero_byte(xor2) | has_zero_byte(xor3); - if (is_match) { - return size_t(i + index_of_first_set_byte(is_match)); - } - } - - if (i < view.size()) { - uint64_t word{}; - memcpy(&word, view.data() + i, view.size() - i); - word = swap_bytes_if_big_endian(word); - uint64_t xor1 = word ^ mask1; - uint64_t xor2 = word ^ mask2; - uint64_t xor3 = word ^ mask3; - uint64_t is_match = - has_zero_byte(xor1) | has_zero_byte(xor2) | has_zero_byte(xor3); - if (is_match) { - return size_t(i + index_of_first_set_byte(is_match)); + // performance note: we might be able to gain further performance + // with SIMD instrinsics. + for (auto pos = view.begin(); pos != view.end(); ++pos) { + if (authority_delimiter[(uint8_t)*pos]) { + return pos - view.begin(); } } - - return view.size(); + return size_t(view.size()); } } // namespace ada::helpers @@ -11143,6 +11209,7 @@ namespace ada { ada_warn_unused std::string to_string(ada::state state) { return ada::helpers::get_state(state); } +#undef ada_make_uint8x16_t } // namespace ada /* end file src/helpers.cpp */ /* begin file src/url.cpp */ diff --git a/deps/ada/ada.h b/deps/ada/ada.h index 6d98b37075f892..a4aa39d17046ad 100644 --- a/deps/ada/ada.h +++ b/deps/ada/ada.h @@ -1,4 +1,4 @@ -/* auto-generated on 2023-10-22 19:50:50 -0400. Do not edit! */ +/* auto-generated on 2023-11-19 13:35:02 -0500. Do not edit! */ /* begin file include/ada.h */ /** * @file ada.h @@ -1670,18 +1670,6 @@ template ada_really_inline void strip_trailing_spaces_from_opaque_path( url_type& url) noexcept; -/** - * @private - * Reverse the order of the bytes. - */ -ada_really_inline uint64_t swap_bytes(uint64_t val) noexcept; - -/** - * @private - * Reverse the order of the bytes but only if the system is big endian - */ -ada_really_inline uint64_t swap_bytes_if_big_endian(uint64_t val) noexcept; - /** * @private * Finds the delimiter of a view in authority state. @@ -5032,7 +5020,9 @@ ada_really_inline bool begins_with(std::string_view view, std::string_view prefix); /** - * Returns true if an input is an ipv4 address. + * Returns true if an input is an ipv4 address. It is assumed that the string + * does not contain uppercase ASCII characters (the input should have been + * lowered cased before calling this function) and is not empty. */ ada_really_inline ada_constexpr bool is_ipv4(std::string_view view) noexcept; @@ -7088,14 +7078,14 @@ url_search_params_entries_iter::next() { #ifndef ADA_ADA_VERSION_H #define ADA_ADA_VERSION_H -#define ADA_VERSION "2.7.2" +#define ADA_VERSION "2.7.4" namespace ada { enum { ADA_VERSION_MAJOR = 2, ADA_VERSION_MINOR = 7, - ADA_VERSION_REVISION = 2, + ADA_VERSION_REVISION = 4, }; } // namespace ada diff --git a/deps/ada/unofficial.gni b/deps/ada/unofficial.gni new file mode 100644 index 00000000000000..d3d14193c5a154 --- /dev/null +++ b/deps/ada/unofficial.gni @@ -0,0 +1,29 @@ +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +import("../../node.gni") +import("$node_v8_path/gni/v8.gni") + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("ada_gn_build") { + config("ada_config") { + include_dirs = [ "." ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("ada.gyp") ], + "scope", + [ "ada.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":ada_config" ] + sources = gypi_values.ada_sources + } +} diff --git a/deps/base64/BUILD.gn b/deps/base64/BUILD.gn new file mode 100644 index 00000000000000..172dd960910439 --- /dev/null +++ b/deps/base64/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +base64_gn_build("base64") { +} diff --git a/deps/base64/base64.gyp b/deps/base64/base64.gyp index 06b20a142b1679..5d0a0c05dc2a08 100644 --- a/deps/base64/base64.gyp +++ b/deps/base64/base64.gyp @@ -49,6 +49,7 @@ 'HAVE_SSE42=1', 'HAVE_AVX=1', 'HAVE_AVX2=1', + 'HAVE_AVX512=1', ], 'dependencies': [ 'base64_ssse3', @@ -56,6 +57,7 @@ 'base64_sse42', 'base64_avx', 'base64_avx2', + 'base64_avx512', ], }, { 'sources': [ @@ -64,6 +66,7 @@ 'base64/lib/arch/sse42/codec.c', 'base64/lib/arch/avx/codec.c', 'base64/lib/arch/avx2/codec.c', + 'base64/lib/arch/avx512/codec.c', ], }], ], @@ -165,6 +168,30 @@ ], }, + { + 'target_name': 'base64_avx512', + 'type': 'static_library', + 'include_dirs': [ 'base64/include', 'base64/lib' ], + 'sources': [ 'base64/lib/arch/avx512/codec.c' ], + 'defines': [ 'BASE64_STATIC_DEFINE', 'HAVE_AVX512=1' ], + 'conditions': [ + [ 'OS!="win"', { + 'cflags': [ '-mavx512vl', '-mavx512vbmi' ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ '-mavx512vl', '-mavx512vbmi' ] + }, + }, { + 'msvs_settings': { + 'VCCLCompilerTool': { + 'AdditionalOptions': [ + '/arch:AVX512' + ], + }, + }, + }], + ], + }, + { 'target_name': 'base64_neon32', 'type': 'static_library', diff --git a/deps/base64/base64/.gitignore b/deps/base64/base64/.gitignore index 837a2306a6294b..bb7b160deb3702 100644 --- a/deps/base64/base64/.gitignore +++ b/deps/base64/base64/.gitignore @@ -1,12 +1 @@ -*.o -bin/base64 -lib/config.h -test/benchmark -test/test_base64 - -# visual studio symbol db, etc. -.vs/ -# build directory used by CMakePresets -out/ -# private cmake presets -CMakeUserPresets.json +# Intentionally empty diff --git a/deps/base64/base64/CMakeLists.txt b/deps/base64/base64/CMakeLists.txt index 56076e47a6aa3a..be1de665a2cd59 100644 --- a/deps/base64/base64/CMakeLists.txt +++ b/deps/base64/base64/CMakeLists.txt @@ -17,7 +17,7 @@ if (POLICY CMP0127) cmake_policy(SET CMP0127 NEW) endif() -project(base64 LANGUAGES C VERSION 0.5.0) +project(base64 LANGUAGES C VERSION 0.5.1) include(GNUInstallDirs) include(CMakeDependentOption) @@ -62,6 +62,8 @@ cmake_dependent_option(BASE64_WITH_AVX "add AVX codepath" ON ${_IS_X86} OFF) add_feature_info(AVX BASE64_WITH_AVX "add AVX codepath") cmake_dependent_option(BASE64_WITH_AVX2 "add AVX 2 codepath" ON ${_IS_X86} OFF) add_feature_info(AVX2 BASE64_WITH_AVX2 "add AVX2 codepath") +cmake_dependent_option(BASE64_WITH_AVX512 "add AVX 512 codepath" ON ${_IS_X86} OFF) +add_feature_info(AVX512 BASE64_WITH_AVX512 "add AVX512 codepath") cmake_dependent_option(BASE64_WITH_NEON32 "add NEON32 codepath" OFF _TARGET_ARCH_arm OFF) add_feature_info(NEON32 BASE64_WITH_NEON32 "add NEON32 codepath") @@ -118,6 +120,7 @@ add_library(base64 lib/arch/sse42/codec.c lib/arch/avx/codec.c lib/arch/avx2/codec.c + lib/arch/avx512/codec.c lib/arch/neon32/codec.c lib/arch/neon64/codec.c @@ -206,6 +209,7 @@ if (_TARGET_ARCH STREQUAL "x86" OR _TARGET_ARCH STREQUAL "x64") configure_codec(SSE42 __SSSE4_2__) configure_codec(AVX) configure_codec(AVX2) + configure_codec(AVX512) elseif (_TARGET_ARCH STREQUAL "arm") set(BASE64_NEON32_CFLAGS "${COMPILE_FLAGS_NEON32}" CACHE STRING "the NEON32 compile flags (for 'lib/arch/neon32/codec.c')") diff --git a/deps/base64/base64/LICENSE b/deps/base64/base64/LICENSE index 9446393a82a847..109d6521b122c0 100644 --- a/deps/base64/base64/LICENSE +++ b/deps/base64/base64/LICENSE @@ -1,7 +1,7 @@ Copyright (c) 2005-2007, Nick Galbreath -Copyright (c) 2013-2019, Alfred Klomp -Copyright (c) 2015-2017, Wojciech Mula +Copyright (c) 2015-2018, Wojciech Muła Copyright (c) 2016-2017, Matthieu Darbois +Copyright (c) 2013-2022, Alfred Klomp All rights reserved. Redistribution and use in source and binary forms, with or without diff --git a/deps/base64/base64/Makefile b/deps/base64/base64/Makefile index 2bb01e204fcfac..bcb944551ae881 100644 --- a/deps/base64/base64/Makefile +++ b/deps/base64/base64/Makefile @@ -4,6 +4,7 @@ CFLAGS += -std=c99 -O3 -Wall -Wextra -pedantic OBJCOPY ?= objcopy OBJS = \ + lib/arch/avx512/codec.o \ lib/arch/avx2/codec.o \ lib/arch/generic/codec.o \ lib/arch/neon32/codec.o \ @@ -16,6 +17,7 @@ OBJS = \ lib/codec_choose.o \ lib/tables/tables.o +HAVE_AVX512 = 0 HAVE_AVX2 = 0 HAVE_NEON32 = 0 HAVE_NEON64 = 0 @@ -26,6 +28,9 @@ HAVE_AVX = 0 # The user should supply compiler flags for the codecs they want to build. # Check which codecs we're going to include: +ifdef AVX512_CFLAGS + HAVE_AVX512 = 1 +endif ifdef AVX2_CFLAGS HAVE_AVX2 = 1 endif @@ -64,7 +69,8 @@ lib/libbase64.o: $(OBJS) $(OBJCOPY) --keep-global-symbols=lib/exports.txt $@ lib/config.h: - @echo "#define HAVE_AVX2 $(HAVE_AVX2)" > $@ + @echo "#define HAVE_AVX512 $(HAVE_AVX512)" > $@ + @echo "#define HAVE_AVX2 $(HAVE_AVX2)" >> $@ @echo "#define HAVE_NEON32 $(HAVE_NEON32)" >> $@ @echo "#define HAVE_NEON64 $(HAVE_NEON64)" >> $@ @echo "#define HAVE_SSSE3 $(HAVE_SSSE3)" >> $@ @@ -75,6 +81,7 @@ lib/config.h: $(OBJS): lib/config.h $(OBJS): CFLAGS += -Ilib +lib/arch/avx512/codec.o: CFLAGS += $(AVX512_CFLAGS) lib/arch/avx2/codec.o: CFLAGS += $(AVX2_CFLAGS) lib/arch/neon32/codec.o: CFLAGS += $(NEON32_CFLAGS) lib/arch/neon64/codec.o: CFLAGS += $(NEON64_CFLAGS) diff --git a/deps/base64/base64/README.md b/deps/base64/base64/README.md index b953c324c9dc1e..ae0a914965e101 100644 --- a/deps/base64/base64/README.md +++ b/deps/base64/base64/README.md @@ -3,7 +3,7 @@ [![Build Status](https://github.com/aklomp/base64/actions/workflows/test.yml/badge.svg)](https://github.com/aklomp/base64/actions/workflows/test.yml) This is an implementation of a base64 stream encoding/decoding library in C99 -with SIMD (AVX2, NEON, AArch64/NEON, SSSE3, SSE4.1, SSE4.2, AVX) and +with SIMD (AVX2, AVX512, NEON, AArch64/NEON, SSSE3, SSE4.1, SSE4.2, AVX) and [OpenMP](http://www.openmp.org) acceleration. It also contains wrapper functions to encode/decode simple length-delimited strings. This library aims to be: @@ -19,6 +19,10 @@ will pick an optimized codec that lets it encode/decode 12 or 24 bytes at a time, which gives a speedup of four or more times compared to the "plain" bytewise codec. +AVX512 support is only for encoding at present, utilizing the AVX512 VL and VBMI +instructions. Decoding part reused AVX2 implementations. For CPUs later than +Cannonlake (manufactured in 2018) supports these instructions. + NEON support is hardcoded to on or off at compile time, because portable runtime feature detection is unavailable on ARM. @@ -59,6 +63,9 @@ optimizations described by Wojciech Muła in a [articles](http://0x80.pl/notesen/2016-01-17-sse-base64-decoding.html). His own code is [here](https://github.com/WojciechMula/toys/tree/master/base64). +The AVX512 encoder is based on code from Wojciech Muła's +[base64simd](https://github.com/WojciechMula/base64simd) library. + The OpenMP implementation was added by Ferry Toth (@htot) from [Exalon Delft](http://www.exalondelft.nl). ## Building @@ -76,8 +83,8 @@ To compile just the "plain" library without SIMD codecs, type: make lib/libbase64.o ``` -Optional SIMD codecs can be included by specifying the `AVX2_CFLAGS`, `NEON32_CFLAGS`, `NEON64_CFLAGS`, -`SSSE3_CFLAGS`, `SSE41_CFLAGS`, `SSE42_CFLAGS` and/or `AVX_CFLAGS` environment variables. +Optional SIMD codecs can be included by specifying the `AVX2_CFLAGS`, `AVX512_CFLAGS`, +`NEON32_CFLAGS`, `NEON64_CFLAGS`, `SSSE3_CFLAGS`, `SSE41_CFLAGS`, `SSE42_CFLAGS` and/or `AVX_CFLAGS` environment variables. A typical build invocation on x86 looks like this: ```sh @@ -93,6 +100,15 @@ Example: AVX2_CFLAGS=-mavx2 make ``` +### AVX512 + +To build and include the AVX512 codec, set the `AVX512_CFLAGS` environment variable to a value that will turn on AVX512 support in your compiler, typically `-mavx512vl -mavx512vbmi`. +Example: + +```sh +AVX512_CFLAGS="-mavx512vl -mavx512vbmi" make +``` + The codec will only be used if runtime feature detection shows that the target machine supports AVX2. ### SSSE3 @@ -208,6 +224,7 @@ Mainly there for testing purposes, this is also useful on ARM where the only way The following constants can be used: - `BASE64_FORCE_AVX2` +- `BASE64_FORCE_AVX512` - `BASE64_FORCE_NEON32` - `BASE64_FORCE_NEON64` - `BASE64_FORCE_PLAIN` @@ -434,7 +451,7 @@ x86 processors | i7-4770 @ 3.4 GHz DDR1600 OPENMP 4 thread | 4884\* | 7099\* | 4917\* | 7057\* | 4799\* | 7143\* | 4902\* | 7219\* | | i7-4770 @ 3.4 GHz DDR1600 OPENMP 8 thread | 5212\* | 8849\* | 5284\* | 9099\* | 5289\* | 9220\* | 4849\* | 9200\* | | i7-4870HQ @ 2.5 GHz | 1471\* | 3066\* | 6721\* | 6962\* | 7015\* | 8267\* | 8328\* | 11576\* | -| i5-4590S @ 3.0 GHz | 3356 | 3197 | 4363 | 6104 | 4243 | 6233 | 4160 | 6344 | +| i5-4590S @ 3.0 GHz | 3356 | 3197 | 4363 | 6104 | 4243\* | 6233 | 4160\* | 6344 | | Xeon X5570 @ 2.93 GHz | 2161 | 1508 | 3160 | 3915 | - | - | - | - | | Pentium4 @ 3.4 GHz | 896 | 740 | - | - | - | - | - | - | | Atom N270 | 243 | 266 | 508 | 387 | - | - | - | - | diff --git a/deps/base64/base64/bin/base64.c b/deps/base64/base64/bin/base64.c index e4384fe885d3eb..98d6b3cbab560c 100644 --- a/deps/base64/base64/bin/base64.c +++ b/deps/base64/base64/bin/base64.c @@ -1,128 +1,477 @@ -#include // size_t -#include // fopen() -#include // strlen() +#define _XOPEN_SOURCE // IOV_MAX + +#include +#include +#include +#include +#include #include +#include +#include +#include #include "../include/libbase64.h" -#define BUFSIZE 1024 * 1024 +// Size of the buffer for the "raw" (not base64-encoded) data in bytes. +#define BUFFER_RAW_SIZE (1024 * 1024) -static char buf[BUFSIZE]; -static char out[(BUFSIZE * 5) / 3]; // Technically 4/3 of input, but take some margin -size_t nread; -size_t nout; +// Size of the buffer for the base64-encoded data in bytes. The base64-encoded +// data is 4/3 the size of the input, with some margin to be sure. +#define BUFFER_ENC_SIZE (BUFFER_RAW_SIZE * 4 / 3 + 16) -static int -enc (FILE *fp) +// Global config structure. +struct config { + + // Name by which the program was called on the command line. + const char *name; + + // Name of the input file for logging purposes. + const char *file; + + // Input file handle. + FILE *fp; + + // Wrap width in characters, for encoding only. + size_t wrap; + + // Whether to run in decode mode. + bool decode; + + // Whether to just print the help text and exit. + bool print_help; +}; + +// Input/output buffer structure. +struct buffer { + + // Runtime-allocated buffer for raw (unencoded) data. + char *raw; + + // Runtime-allocated buffer for base64-encoded data. + char *enc; +}; + +static bool +buffer_alloc (const struct config *config, struct buffer *buf) +{ + if ((buf->raw = malloc(BUFFER_RAW_SIZE)) == NULL || + (buf->enc = malloc(BUFFER_ENC_SIZE)) == NULL) { + free(buf->raw); + fprintf(stderr, "%s: malloc: %s\n", + config->name, strerror(errno)); + return false; + } + + return true; +} + +static void +buffer_free (struct buffer *buf) +{ + free(buf->raw); + free(buf->enc); +} + +static bool +writev_retry (const struct config *config, struct iovec *iov, size_t nvec) +{ + // Writing nothing always succeeds. + if (nvec == 0) { + return true; + } + + while (true) { + ssize_t nwrite; + + // Try to write the vectors to stdout. + if ((nwrite = writev(1, iov, nvec)) < 0) { + + // Retry on EINTR. + if (errno == EINTR) { + continue; + } + + // Quit on other errors. + fprintf(stderr, "%s: writev: %s\n", + config->name, strerror(errno)); + return false; + } + + // The return value of `writev' is the number of bytes written. + // To check for success, we traverse the list and remove all + // written vectors. The call succeeded if the list is empty. + while (true) { + + // Retry if this vector is not or partially written. + if (iov->iov_len > (size_t) nwrite) { + char *base = iov->iov_base; + + iov->iov_base = (size_t) nwrite + base; + iov->iov_len -= (size_t) nwrite; + break; + } + + // Move to the next vector. + nwrite -= iov->iov_len; + iov++; + + // Return successfully if all vectors were written. + if (--nvec == 0) { + return true; + } + } + } +} + +static inline bool +iov_append (const struct config *config, struct iovec *iov, + size_t *nvec, char *base, const size_t len) +{ + // Add the buffer to the IO vector array. + iov[*nvec].iov_base = base; + iov[*nvec].iov_len = len; + + // Increment the array index. Flush the array if it is full. + if (++(*nvec) == IOV_MAX) { + if (writev_retry(config, iov, IOV_MAX) == false) { + return false; + } + *nvec = 0; + } + + return true; +} + +static bool +write_stdout (const struct config *config, const char *buf, size_t len) +{ + while (len > 0) { + ssize_t nwrite; + + // Try to write the buffer to stdout. + if ((nwrite = write(1, buf, len)) < 0) { + + // Retry on EINTR. + if (errno == EINTR) { + continue; + } + + // Quit on other errors. + fprintf(stderr, "%s: write: %s\n", + config->name, strerror(errno)); + return false; + } + + // Update the buffer position. + buf += (size_t) nwrite; + len -= (size_t) nwrite; + } + + return true; +} + +static bool +write_wrapped (const struct config *config, char *buf, size_t len) +{ + static size_t col = 0; + + // Special case: if buf is NULL, print final trailing newline. + if (buf == NULL) { + if (config->wrap > 0 && col > 0) { + return write_stdout(config, "\n", 1); + } + return true; + } + + // If no wrap width is given, write the entire buffer. + if (config->wrap == 0) { + return write_stdout(config, buf, len); + } + + // Statically allocated IO vector buffer. + static struct iovec iov[IOV_MAX]; + size_t nvec = 0; + + while (len > 0) { + + // Number of characters to fill the current line. + size_t nwrite = config->wrap - col; + + // Do not write more data than is available. + if (nwrite > len) { + nwrite = len; + } + + // Append the data to the IO vector array. + if (iov_append(config, iov, &nvec, buf, nwrite) == false) { + return false; + } + + // Advance the buffer. + len -= nwrite; + buf += nwrite; + col += nwrite; + + // If the line is full, append a newline. + if (col == config->wrap) { + if (iov_append(config, iov, &nvec, "\n", 1) == false) { + return false; + } + col = 0; + } + } + + // Write the remaining vectors. + if (writev_retry(config, iov, nvec) == false) { + return false; + } + + return true; +} + +static bool +encode (const struct config *config, struct buffer *buf) { - int ret = 1; + size_t nread, nout; struct base64_state state; + // Initialize the encoder's state structure. base64_stream_encode_init(&state, 0); - while ((nread = fread(buf, 1, BUFSIZE, fp)) > 0) { - base64_stream_encode(&state, buf, nread, out, &nout); - if (nout) { - fwrite(out, nout, 1, stdout); - } - if (feof(fp)) { - break; + // Read raw data into the buffer. + while ((nread = fread(buf->raw, 1, BUFFER_RAW_SIZE, config->fp)) > 0) { + + // Encode the raw input into the encoded buffer. + base64_stream_encode(&state, buf->raw, nread, buf->enc, &nout); + + // Append the encoded data to the output stream. + if (write_wrapped(config, buf->enc, nout) == false) { + return false; } } - if (ferror(fp)) { - fprintf(stderr, "read error\n"); - ret = 0; - goto out; + + // Check for stream errors. + if (ferror(config->fp)) { + fprintf(stderr, "%s: %s: read error\n", + config->name, config->file); + return false; } - base64_stream_encode_final(&state, out, &nout); - if (nout) { - fwrite(out, nout, 1, stdout); + // Finalize the encoding by adding proper stream terminators. + base64_stream_encode_final(&state, buf->enc, &nout); + + // Append this tail to the output stream. + if (write_wrapped(config, buf->enc, nout) == false) { + return false; } -out: fclose(fp); - fclose(stdout); - return ret; + + // Print optional trailing newline. + if (write_wrapped(config, NULL, 0) == false) { + return false; + } + + return true; } static int -dec (FILE *fp) +decode (const struct config *config, struct buffer *buf) { - int ret = 1; + size_t nread, nout; struct base64_state state; + // Initialize the decoder's state structure. base64_stream_decode_init(&state, 0); - while ((nread = fread(buf, 1, BUFSIZE, fp)) > 0) { - if (!base64_stream_decode(&state, buf, nread, out, &nout)) { - fprintf(stderr, "decoding error\n"); - ret = 0; - goto out; - } - if (nout) { - fwrite(out, nout, 1, stdout); + // Read encoded data into the buffer. Use the smallest buffer size to + // be on the safe side: the decoded output will fit the raw buffer. + while ((nread = fread(buf->enc, 1, BUFFER_RAW_SIZE, config->fp)) > 0) { + + // Decode the input into the raw buffer. + if (base64_stream_decode(&state, buf->enc, nread, + buf->raw, &nout) == 0) { + fprintf(stderr, "%s: %s: decoding error\n", + config->name, config->file); + return false; } - if (feof(fp)) { - break; + + // Append the raw data to the output stream. + if (write_stdout(config, buf->raw, nout) == false) { + return false; } } - if (ferror(fp)) { - fprintf(stderr, "read error\n"); - ret = 0; + + // Check for stream errors. + if (ferror(config->fp)) { + fprintf(stderr, "%s: %s: read error\n", + config->name, config->file); + return false; } -out: fclose(fp); - fclose(stdout); - return ret; + + return true; } -int -main (int argc, char **argv) +static void +usage (FILE *fp, const struct config *config) { - char *file; - FILE *fp; - int decode = 0; - - // Parse options: - for (;;) - { - int c; - int opt_index = 0; - static struct option opt_long[] = { - { "decode", 0, 0, 'd' }, - { 0, 0, 0, 0 } - }; - if ((c = getopt_long(argc, argv, "d", opt_long, &opt_index)) == -1) { + const char *usage = + "Usage: %s [OPTION]... [FILE]\n" + "If no FILE is given or is specified as '-', " + "read from standard input.\n" + "Options:\n" + " -d, --decode Decode a base64 stream.\n" + " -h, --help Print this help text.\n" + " -w, --wrap=COLS Wrap encoded lines at this column. " + "Default 76, 0 to disable.\n"; + + fprintf(fp, usage, config->name); +} + +static bool +get_wrap (struct config *config, const char *str) +{ + char *eptr; + + // Reject empty strings. + if (*str == '\0') { + return false; + } + + // Convert the input string to a signed long. + const long wrap = strtol(str, &eptr, 10); + + // Reject negative numbers. + if (wrap < 0) { + return false; + } + + // Reject strings containing non-digits. + if (*eptr != '\0') { + return false; + } + + config->wrap = (size_t) wrap; + return true; +} + +static bool +parse_opts (int argc, char **argv, struct config *config) +{ + int c; + static const struct option opts[] = { + { "decode", no_argument, NULL, 'd' }, + { "help", no_argument, NULL, 'h' }, + { "wrap", required_argument, NULL, 'w' }, + { NULL } + }; + + // Remember the program's name. + config->name = *argv; + + // Parse command line options. + while ((c = getopt_long(argc, argv, ":dhw:", opts, NULL)) != -1) { + switch (c) { + case 'd': + config->decode = true; break; - } - switch (c) - { - case 'd': - decode = 1; - break; + + case 'h': + config->print_help = true; + return true; + + case 'w': + if (get_wrap(config, optarg) == false) { + fprintf(stderr, + "%s: invalid wrap value '%s'\n", + config->name, optarg); + return false; + } + break; + + case ':': + fprintf(stderr, "%s: missing argument for '%c'\n", + config->name, optopt); + return false; + + default: + fprintf(stderr, "%s: unknown option '%c'\n", + config->name, optopt); + return false; } } - // No options left on command line? Read from stdin: + // Return successfully if no filename was given. if (optind >= argc) { - fp = stdin; + return true; } - // One option left on command line? Treat it as a file: - else if (optind + 1 == argc) { - file = argv[optind]; - if (strcmp(file, "-") == 0) { - fp = stdin; - } - else if ((fp = fopen(file, "rb")) == NULL) { - printf("cannot open %s\n", file); - return 1; - } + // Return unsuccessfully if more than one filename was given. + if (optind + 1 < argc) { + fprintf(stderr, "%s: too many files\n", config->name); + return false; + } + + // For compatibility with GNU Coreutils base64, treat a filename of '-' + // as standard input. + if (strcmp(argv[optind], "-") == 0) { + return true; + } + + // Save the name of the file. + config->file = argv[optind]; + + // Open the file. + if ((config->fp = fopen(config->file, "rb")) == NULL) { + fprintf(stderr, "%s: %s: %s\n", + config->name, config->file, strerror(errno)); + return false; + } + + return true; +} + +int +main (int argc, char **argv) +{ + // Default program config. + struct config config = { + .file = "stdin", + .fp = stdin, + .wrap = 76, + .decode = false, + .print_help = false, + }; + struct buffer buf; + + // Parse options from the command line. + if (parse_opts(argc, argv, &config) == false) { + usage(stderr, &config); + return 1; } - // More than one option left on command line? Syntax error: - else { - printf("Usage: %s \n", argv[0]); + // Return early if the user just wanted the help text. + if (config.print_help) { + usage(stdout, &config); + return 0; + } + + // Allocate buffers. + if (buffer_alloc(&config, &buf) == false) { return 1; } - // Invert return codes to create shell return code: - return (decode) ? !dec(fp) : !enc(fp); + // Encode or decode the input based on the user's choice. + const bool ret = config.decode + ? decode(&config, &buf) + : encode(&config, &buf); + + // Free the buffers. + buffer_free(&buf); + + // Close the input file. + fclose(config.fp); + + // Close the output stream. + fclose(stdout); + + // That's all, folks. + return ret ? 0 : 1; } diff --git a/deps/base64/base64/cmake/Modules/TargetSIMDInstructionSet.cmake b/deps/base64/base64/cmake/Modules/TargetSIMDInstructionSet.cmake index ba1f6e51815eec..485080905319a6 100644 --- a/deps/base64/base64/cmake/Modules/TargetSIMDInstructionSet.cmake +++ b/deps/base64/base64/cmake/Modules/TargetSIMDInstructionSet.cmake @@ -21,6 +21,7 @@ macro(define_SIMD_compile_flags) set(COMPILE_FLAGS_SSE42 "-msse4.2") set(COMPILE_FLAGS_AVX "-mavx") set(COMPILE_FLAGS_AVX2 "-mavx2") + set(COMPILE_FLAGS_AVX512 "-mavx512vl -mavx512vbmi") #arm set(COMPILE_FLAGS_NEON32 "-mfpu=neon") @@ -30,5 +31,6 @@ macro(define_SIMD_compile_flags) set(COMPILE_FLAGS_SSE42 " ") set(COMPILE_FLAGS_AVX "/arch:AVX") set(COMPILE_FLAGS_AVX2 "/arch:AVX2") + set(COMPILE_FLAGS_AVX512 "/arch:AVX512") endif() endmacro(define_SIMD_compile_flags) diff --git a/deps/base64/base64/cmake/config.h.in b/deps/base64/base64/cmake/config.h.in index 8530d1e13d4801..c7faa94bc0903d 100644 --- a/deps/base64/base64/cmake/config.h.in +++ b/deps/base64/base64/cmake/config.h.in @@ -16,6 +16,9 @@ #cmakedefine01 BASE64_WITH_AVX2 #define HAVE_AVX2 BASE64_WITH_AVX2 +#cmakedefine01 BASE64_WITH_AVX512 +#define HAVE_AVX512 BASE64_WITH_AVX512 + #cmakedefine01 BASE64_WITH_NEON32 #define HAVE_NEON32 BASE64_WITH_NEON32 diff --git a/deps/base64/base64/include/libbase64.h b/deps/base64/base64/include/libbase64.h index d470a82f1028dc..c5908973c5e73c 100644 --- a/deps/base64/base64/include/libbase64.h +++ b/deps/base64/base64/include/libbase64.h @@ -53,6 +53,7 @@ extern "C" { #define BASE64_FORCE_SSE41 (1 << 5) #define BASE64_FORCE_SSE42 (1 << 6) #define BASE64_FORCE_AVX (1 << 7) +#define BASE64_FORCE_AVX512 (1 << 8) struct base64_state { int eof; diff --git a/deps/base64/base64/lib/arch/avx/codec.c b/deps/base64/base64/lib/arch/avx/codec.c index a7a963d8358918..b069618e29463e 100644 --- a/deps/base64/base64/lib/arch/avx/codec.c +++ b/deps/base64/base64/lib/arch/avx/codec.c @@ -11,11 +11,25 @@ #if HAVE_AVX #include +// Only enable inline assembly on supported compilers and on 64-bit CPUs. +#ifndef BASE64_AVX_USE_ASM +# if (defined(__GNUC__) || defined(__clang__)) && BASE64_WORDSIZE == 64 +# define BASE64_AVX_USE_ASM 1 +# else +# define BASE64_AVX_USE_ASM 0 +# endif +#endif + #include "../ssse3/dec_reshuffle.c" #include "../ssse3/dec_loop.c" -#include "../ssse3/enc_translate.c" -#include "../ssse3/enc_reshuffle.c" -#include "../ssse3/enc_loop.c" + +#if BASE64_AVX_USE_ASM +# include "enc_loop_asm.c" +#else +# include "../ssse3/enc_translate.c" +# include "../ssse3/enc_reshuffle.c" +# include "../ssse3/enc_loop.c" +#endif #endif // HAVE_AVX @@ -23,7 +37,17 @@ BASE64_ENC_FUNCTION(avx) { #if HAVE_AVX #include "../generic/enc_head.c" + + // For supported compilers, use a hand-optimized inline assembly + // encoder. Otherwise fall back on the SSSE3 encoder, but compiled with + // AVX flags to generate better optimized AVX code. + +#if BASE64_AVX_USE_ASM + enc_loop_avx(&s, &slen, &o, &olen); +#else enc_loop_ssse3(&s, &slen, &o, &olen); +#endif + #include "../generic/enc_tail.c" #else BASE64_ENC_STUB diff --git a/deps/base64/base64/lib/arch/avx/enc_loop_asm.c b/deps/base64/base64/lib/arch/avx/enc_loop_asm.c new file mode 100644 index 00000000000000..979269af57740e --- /dev/null +++ b/deps/base64/base64/lib/arch/avx/enc_loop_asm.c @@ -0,0 +1,264 @@ +// Apologies in advance for combining the preprocessor with inline assembly, +// two notoriously gnarly parts of C, but it was necessary to avoid a lot of +// code repetition. The preprocessor is used to template large sections of +// inline assembly that differ only in the registers used. If the code was +// written out by hand, it would become very large and hard to audit. + +// Generate a block of inline assembly that loads register R0 from memory. The +// offset at which the register is loaded is set by the given round. +#define LOAD(R0, ROUND) \ + "vlddqu ("#ROUND" * 12)(%[src]), %["R0"] \n\t" + +// Generate a block of inline assembly that deinterleaves and shuffles register +// R0 using preloaded constants. Outputs in R0 and R1. +#define SHUF(R0, R1, R2) \ + "vpshufb %[lut0], %["R0"], %["R1"] \n\t" \ + "vpand %["R1"], %[msk0], %["R2"] \n\t" \ + "vpand %["R1"], %[msk2], %["R1"] \n\t" \ + "vpmulhuw %["R2"], %[msk1], %["R2"] \n\t" \ + "vpmullw %["R1"], %[msk3], %["R1"] \n\t" \ + "vpor %["R1"], %["R2"], %["R1"] \n\t" + +// Generate a block of inline assembly that takes R0 and R1 and translates +// their contents to the base64 alphabet, using preloaded constants. +#define TRAN(R0, R1, R2) \ + "vpsubusb %[n51], %["R1"], %["R0"] \n\t" \ + "vpcmpgtb %[n25], %["R1"], %["R2"] \n\t" \ + "vpsubb %["R2"], %["R0"], %["R0"] \n\t" \ + "vpshufb %["R0"], %[lut1], %["R2"] \n\t" \ + "vpaddb %["R1"], %["R2"], %["R0"] \n\t" + +// Generate a block of inline assembly that stores the given register R0 at an +// offset set by the given round. +#define STOR(R0, ROUND) \ + "vmovdqu %["R0"], ("#ROUND" * 16)(%[dst]) \n\t" + +// Generate a block of inline assembly that generates a single self-contained +// encoder round: fetch the data, process it, and store the result. Then update +// the source and destination pointers. +#define ROUND() \ + LOAD("a", 0) \ + SHUF("a", "b", "c") \ + TRAN("a", "b", "c") \ + STOR("a", 0) \ + "add $12, %[src] \n\t" \ + "add $16, %[dst] \n\t" + +// Define a macro that initiates a three-way interleaved encoding round by +// preloading registers a, b and c from memory. +// The register graph shows which registers are in use during each step, and +// is a visual aid for choosing registers for that step. Symbol index: +// +// + indicates that a register is loaded by that step. +// | indicates that a register is in use and must not be touched. +// - indicates that a register is decommissioned by that step. +// x indicates that a register is used as a temporary by that step. +// V indicates that a register is an input or output to the macro. +// +#define ROUND_3_INIT() /* a b c d e f */ \ + LOAD("a", 0) /* + */ \ + SHUF("a", "d", "e") /* | + x */ \ + LOAD("b", 1) /* | + | */ \ + TRAN("a", "d", "e") /* | | - x */ \ + LOAD("c", 2) /* V V V */ + +// Define a macro that translates, shuffles and stores the input registers A, B +// and C, and preloads registers D, E and F for the next round. +// This macro can be arbitrarily daisy-chained by feeding output registers D, E +// and F back into the next round as input registers A, B and C. The macro +// carefully interleaves memory operations with data operations for optimal +// pipelined performance. + +#define ROUND_3(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ + LOAD(D, (ROUND + 3)) /* V V V + */ \ + SHUF(B, E, F) /* | | | | + x */ \ + STOR(A, (ROUND + 0)) /* - | | | | */ \ + TRAN(B, E, F) /* | | | - x */ \ + LOAD(E, (ROUND + 4)) /* | | | + */ \ + SHUF(C, A, F) /* + | | | | x */ \ + STOR(B, (ROUND + 1)) /* | - | | | */ \ + TRAN(C, A, F) /* - | | | x */ \ + LOAD(F, (ROUND + 5)) /* | | | + */ \ + SHUF(D, A, B) /* + x | | | | */ \ + STOR(C, (ROUND + 2)) /* | - | | | */ \ + TRAN(D, A, B) /* - x V V V */ + +// Define a macro that terminates a ROUND_3 macro by taking pre-loaded +// registers D, E and F, and translating, shuffling and storing them. +#define ROUND_3_END(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ + SHUF(E, A, B) /* + x V V V */ \ + STOR(D, (ROUND + 3)) /* | - | | */ \ + TRAN(E, A, B) /* - x | | */ \ + SHUF(F, C, D) /* + x | | */ \ + STOR(E, (ROUND + 4)) /* | - | */ \ + TRAN(F, C, D) /* - x | */ \ + STOR(F, (ROUND + 5)) /* - */ + +// Define a type A round. Inputs are a, b, and c, outputs are d, e, and f. +#define ROUND_3_A(ROUND) \ + ROUND_3(ROUND, "a", "b", "c", "d", "e", "f") + +// Define a type B round. Inputs and outputs are swapped with regard to type A. +#define ROUND_3_B(ROUND) \ + ROUND_3(ROUND, "d", "e", "f", "a", "b", "c") + +// Terminating macro for a type A round. +#define ROUND_3_A_LAST(ROUND) \ + ROUND_3_A(ROUND) \ + ROUND_3_END(ROUND, "a", "b", "c", "d", "e", "f") + +// Terminating macro for a type B round. +#define ROUND_3_B_LAST(ROUND) \ + ROUND_3_B(ROUND) \ + ROUND_3_END(ROUND, "d", "e", "f", "a", "b", "c") + +// Suppress clang's warning that the literal string in the asm statement is +// overlong (longer than the ISO-mandated minimum size of 4095 bytes for C99 +// compilers). It may be true, but the goal here is not C99 portability. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverlength-strings" + +static inline void +enc_loop_avx (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) +{ + // For a clearer explanation of the algorithm used by this function, + // please refer to the plain (not inline assembly) implementation. This + // function follows the same basic logic. + + if (*slen < 16) { + return; + } + + // Process blocks of 12 bytes at a time. Input is read in blocks of 16 + // bytes, so "reserve" four bytes from the input buffer to ensure that + // we never read beyond the end of the input buffer. + size_t rounds = (*slen - 4) / 12; + + *slen -= rounds * 12; // 12 bytes consumed per round + *olen += rounds * 16; // 16 bytes produced per round + + // Number of times to go through the 36x loop. + size_t loops = rounds / 36; + + // Number of rounds remaining after the 36x loop. + rounds %= 36; + + // Lookup tables. + const __m128i lut0 = _mm_set_epi8( + 10, 11, 9, 10, 7, 8, 6, 7, 4, 5, 3, 4, 1, 2, 0, 1); + + const __m128i lut1 = _mm_setr_epi8( + 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0); + + // Temporary registers. + __m128i a, b, c, d, e, f; + + __asm__ volatile ( + + // If there are 36 rounds or more, enter a 36x unrolled loop of + // interleaved encoding rounds. The rounds interleave memory + // operations (load/store) with data operations (table lookups, + // etc) to maximize pipeline throughput. + " test %[loops], %[loops] \n\t" + " jz 18f \n\t" + " jmp 36f \n\t" + " \n\t" + ".balign 64 \n\t" + "36: " ROUND_3_INIT() + " " ROUND_3_A( 0) + " " ROUND_3_B( 3) + " " ROUND_3_A( 6) + " " ROUND_3_B( 9) + " " ROUND_3_A(12) + " " ROUND_3_B(15) + " " ROUND_3_A(18) + " " ROUND_3_B(21) + " " ROUND_3_A(24) + " " ROUND_3_B(27) + " " ROUND_3_A_LAST(30) + " add $(12 * 36), %[src] \n\t" + " add $(16 * 36), %[dst] \n\t" + " dec %[loops] \n\t" + " jnz 36b \n\t" + + // Enter an 18x unrolled loop for rounds of 18 or more. + "18: cmp $18, %[rounds] \n\t" + " jl 9f \n\t" + " " ROUND_3_INIT() + " " ROUND_3_A(0) + " " ROUND_3_B(3) + " " ROUND_3_A(6) + " " ROUND_3_B(9) + " " ROUND_3_A_LAST(12) + " sub $18, %[rounds] \n\t" + " add $(12 * 18), %[src] \n\t" + " add $(16 * 18), %[dst] \n\t" + + // Enter a 9x unrolled loop for rounds of 9 or more. + "9: cmp $9, %[rounds] \n\t" + " jl 6f \n\t" + " " ROUND_3_INIT() + " " ROUND_3_A(0) + " " ROUND_3_B_LAST(3) + " sub $9, %[rounds] \n\t" + " add $(12 * 9), %[src] \n\t" + " add $(16 * 9), %[dst] \n\t" + + // Enter a 6x unrolled loop for rounds of 6 or more. + "6: cmp $6, %[rounds] \n\t" + " jl 55f \n\t" + " " ROUND_3_INIT() + " " ROUND_3_A_LAST(0) + " sub $6, %[rounds] \n\t" + " add $(12 * 6), %[src] \n\t" + " add $(16 * 6), %[dst] \n\t" + + // Dispatch the remaining rounds 0..5. + "55: cmp $3, %[rounds] \n\t" + " jg 45f \n\t" + " je 3f \n\t" + " cmp $1, %[rounds] \n\t" + " jg 2f \n\t" + " je 1f \n\t" + " jmp 0f \n\t" + + "45: cmp $4, %[rounds] \n\t" + " je 4f \n\t" + + // Block of non-interlaced encoding rounds, which can each + // individually be jumped to. Rounds fall through to the next. + "5: " ROUND() + "4: " ROUND() + "3: " ROUND() + "2: " ROUND() + "1: " ROUND() + "0: \n\t" + + // Outputs (modified). + : [rounds] "+r" (rounds), + [loops] "+r" (loops), + [src] "+r" (*s), + [dst] "+r" (*o), + [a] "=&x" (a), + [b] "=&x" (b), + [c] "=&x" (c), + [d] "=&x" (d), + [e] "=&x" (e), + [f] "=&x" (f) + + // Inputs (not modified). + : [lut0] "x" (lut0), + [lut1] "x" (lut1), + [msk0] "x" (_mm_set1_epi32(0x0FC0FC00)), + [msk1] "x" (_mm_set1_epi32(0x04000040)), + [msk2] "x" (_mm_set1_epi32(0x003F03F0)), + [msk3] "x" (_mm_set1_epi32(0x01000010)), + [n51] "x" (_mm_set1_epi8(51)), + [n25] "x" (_mm_set1_epi8(25)) + + // Clobbers. + : "cc", "memory" + ); +} + +#pragma GCC diagnostic pop diff --git a/deps/base64/base64/lib/arch/avx2/codec.c b/deps/base64/base64/lib/arch/avx2/codec.c index 0498548b80d286..8a2aa4a6071500 100644 --- a/deps/base64/base64/lib/arch/avx2/codec.c +++ b/deps/base64/base64/lib/arch/avx2/codec.c @@ -11,11 +11,25 @@ #if HAVE_AVX2 #include +// Only enable inline assembly on supported compilers and on 64-bit CPUs. +#ifndef BASE64_AVX2_USE_ASM +# if (defined(__GNUC__) || defined(__clang__)) && BASE64_WORDSIZE == 64 +# define BASE64_AVX2_USE_ASM 1 +# else +# define BASE64_AVX2_USE_ASM 0 +# endif +#endif + #include "dec_reshuffle.c" #include "dec_loop.c" -#include "enc_translate.c" -#include "enc_reshuffle.c" -#include "enc_loop.c" + +#if BASE64_AVX2_USE_ASM +# include "enc_loop_asm.c" +#else +# include "enc_translate.c" +# include "enc_reshuffle.c" +# include "enc_loop.c" +#endif #endif // HAVE_AVX2 diff --git a/deps/base64/base64/lib/arch/avx2/enc_loop_asm.c b/deps/base64/base64/lib/arch/avx2/enc_loop_asm.c new file mode 100644 index 00000000000000..eb775a1d1f03d0 --- /dev/null +++ b/deps/base64/base64/lib/arch/avx2/enc_loop_asm.c @@ -0,0 +1,291 @@ +// Apologies in advance for combining the preprocessor with inline assembly, +// two notoriously gnarly parts of C, but it was necessary to avoid a lot of +// code repetition. The preprocessor is used to template large sections of +// inline assembly that differ only in the registers used. If the code was +// written out by hand, it would become very large and hard to audit. + +// Generate a block of inline assembly that loads register R0 from memory. The +// offset at which the register is loaded is set by the given round and a +// constant offset. +#define LOAD(R0, ROUND, OFFSET) \ + "vlddqu ("#ROUND" * 24 + "#OFFSET")(%[src]), %["R0"] \n\t" + +// Generate a block of inline assembly that deinterleaves and shuffles register +// R0 using preloaded constants. Outputs in R0 and R1. +#define SHUF(R0, R1, R2) \ + "vpshufb %[lut0], %["R0"], %["R1"] \n\t" \ + "vpand %["R1"], %[msk0], %["R2"] \n\t" \ + "vpand %["R1"], %[msk2], %["R1"] \n\t" \ + "vpmulhuw %["R2"], %[msk1], %["R2"] \n\t" \ + "vpmullw %["R1"], %[msk3], %["R1"] \n\t" \ + "vpor %["R1"], %["R2"], %["R1"] \n\t" + +// Generate a block of inline assembly that takes R0 and R1 and translates +// their contents to the base64 alphabet, using preloaded constants. +#define TRAN(R0, R1, R2) \ + "vpsubusb %[n51], %["R1"], %["R0"] \n\t" \ + "vpcmpgtb %[n25], %["R1"], %["R2"] \n\t" \ + "vpsubb %["R2"], %["R0"], %["R0"] \n\t" \ + "vpshufb %["R0"], %[lut1], %["R2"] \n\t" \ + "vpaddb %["R1"], %["R2"], %["R0"] \n\t" + +// Generate a block of inline assembly that stores the given register R0 at an +// offset set by the given round. +#define STOR(R0, ROUND) \ + "vmovdqu %["R0"], ("#ROUND" * 32)(%[dst]) \n\t" + +// Generate a block of inline assembly that generates a single self-contained +// encoder round: fetch the data, process it, and store the result. Then update +// the source and destination pointers. +#define ROUND() \ + LOAD("a", 0, -4) \ + SHUF("a", "b", "c") \ + TRAN("a", "b", "c") \ + STOR("a", 0) \ + "add $24, %[src] \n\t" \ + "add $32, %[dst] \n\t" + +// Define a macro that initiates a three-way interleaved encoding round by +// preloading registers a, b and c from memory. +// The register graph shows which registers are in use during each step, and +// is a visual aid for choosing registers for that step. Symbol index: +// +// + indicates that a register is loaded by that step. +// | indicates that a register is in use and must not be touched. +// - indicates that a register is decommissioned by that step. +// x indicates that a register is used as a temporary by that step. +// V indicates that a register is an input or output to the macro. +// +#define ROUND_3_INIT() /* a b c d e f */ \ + LOAD("a", 0, -4) /* + */ \ + SHUF("a", "d", "e") /* | + x */ \ + LOAD("b", 1, -4) /* | + | */ \ + TRAN("a", "d", "e") /* | | - x */ \ + LOAD("c", 2, -4) /* V V V */ + +// Define a macro that translates, shuffles and stores the input registers A, B +// and C, and preloads registers D, E and F for the next round. +// This macro can be arbitrarily daisy-chained by feeding output registers D, E +// and F back into the next round as input registers A, B and C. The macro +// carefully interleaves memory operations with data operations for optimal +// pipelined performance. + +#define ROUND_3(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ + LOAD(D, (ROUND + 3), -4) /* V V V + */ \ + SHUF(B, E, F) /* | | | | + x */ \ + STOR(A, (ROUND + 0)) /* - | | | | */ \ + TRAN(B, E, F) /* | | | - x */ \ + LOAD(E, (ROUND + 4), -4) /* | | | + */ \ + SHUF(C, A, F) /* + | | | | x */ \ + STOR(B, (ROUND + 1)) /* | - | | | */ \ + TRAN(C, A, F) /* - | | | x */ \ + LOAD(F, (ROUND + 5), -4) /* | | | + */ \ + SHUF(D, A, B) /* + x | | | | */ \ + STOR(C, (ROUND + 2)) /* | - | | | */ \ + TRAN(D, A, B) /* - x V V V */ + +// Define a macro that terminates a ROUND_3 macro by taking pre-loaded +// registers D, E and F, and translating, shuffling and storing them. +#define ROUND_3_END(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ + SHUF(E, A, B) /* + x V V V */ \ + STOR(D, (ROUND + 3)) /* | - | | */ \ + TRAN(E, A, B) /* - x | | */ \ + SHUF(F, C, D) /* + x | | */ \ + STOR(E, (ROUND + 4)) /* | - | */ \ + TRAN(F, C, D) /* - x | */ \ + STOR(F, (ROUND + 5)) /* - */ + +// Define a type A round. Inputs are a, b, and c, outputs are d, e, and f. +#define ROUND_3_A(ROUND) \ + ROUND_3(ROUND, "a", "b", "c", "d", "e", "f") + +// Define a type B round. Inputs and outputs are swapped with regard to type A. +#define ROUND_3_B(ROUND) \ + ROUND_3(ROUND, "d", "e", "f", "a", "b", "c") + +// Terminating macro for a type A round. +#define ROUND_3_A_LAST(ROUND) \ + ROUND_3_A(ROUND) \ + ROUND_3_END(ROUND, "a", "b", "c", "d", "e", "f") + +// Terminating macro for a type B round. +#define ROUND_3_B_LAST(ROUND) \ + ROUND_3_B(ROUND) \ + ROUND_3_END(ROUND, "d", "e", "f", "a", "b", "c") + +// Suppress clang's warning that the literal string in the asm statement is +// overlong (longer than the ISO-mandated minimum size of 4095 bytes for C99 +// compilers). It may be true, but the goal here is not C99 portability. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverlength-strings" + +static inline void +enc_loop_avx2 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) +{ + // For a clearer explanation of the algorithm used by this function, + // please refer to the plain (not inline assembly) implementation. This + // function follows the same basic logic. + + if (*slen < 32) { + return; + } + + // Process blocks of 24 bytes at a time. Because blocks are loaded 32 + // bytes at a time an offset of -4, ensure that there will be at least + // 4 remaining bytes after the last round, so that the final read will + // not pass beyond the bounds of the input buffer. + size_t rounds = (*slen - 4) / 24; + + *slen -= rounds * 24; // 24 bytes consumed per round + *olen += rounds * 32; // 32 bytes produced per round + + // Pre-decrement the number of rounds to get the number of rounds + // *after* the first round, which is handled as a special case. + rounds--; + + // Number of times to go through the 36x loop. + size_t loops = rounds / 36; + + // Number of rounds remaining after the 36x loop. + rounds %= 36; + + // Lookup tables. + const __m256i lut0 = _mm256_set_epi8( + 10, 11, 9, 10, 7, 8, 6, 7, 4, 5, 3, 4, 1, 2, 0, 1, + 14, 15, 13, 14, 11, 12, 10, 11, 8, 9, 7, 8, 5, 6, 4, 5); + + const __m256i lut1 = _mm256_setr_epi8( + 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0, + 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0); + + // Temporary registers. + __m256i a, b, c, d, e; + + // Temporary register f doubles as the shift mask for the first round. + __m256i f = _mm256_setr_epi32(0, 0, 1, 2, 3, 4, 5, 6); + + __asm__ volatile ( + + // The first loop iteration requires special handling to ensure + // that the read, which is normally done at an offset of -4, + // does not underflow the buffer. Load the buffer at an offset + // of 0 and permute the input to achieve the same effect. + LOAD("a", 0, 0) + "vpermd %[a], %[f], %[a] \n\t" + + // Perform the standard shuffling and translation steps. + SHUF("a", "b", "c") + TRAN("a", "b", "c") + + // Store the result and increment the source and dest pointers. + "vmovdqu %[a], (%[dst]) \n\t" + "add $24, %[src] \n\t" + "add $32, %[dst] \n\t" + + // If there are 36 rounds or more, enter a 36x unrolled loop of + // interleaved encoding rounds. The rounds interleave memory + // operations (load/store) with data operations (table lookups, + // etc) to maximize pipeline throughput. + " test %[loops], %[loops] \n\t" + " jz 18f \n\t" + " jmp 36f \n\t" + " \n\t" + ".balign 64 \n\t" + "36: " ROUND_3_INIT() + " " ROUND_3_A( 0) + " " ROUND_3_B( 3) + " " ROUND_3_A( 6) + " " ROUND_3_B( 9) + " " ROUND_3_A(12) + " " ROUND_3_B(15) + " " ROUND_3_A(18) + " " ROUND_3_B(21) + " " ROUND_3_A(24) + " " ROUND_3_B(27) + " " ROUND_3_A_LAST(30) + " add $(24 * 36), %[src] \n\t" + " add $(32 * 36), %[dst] \n\t" + " dec %[loops] \n\t" + " jnz 36b \n\t" + + // Enter an 18x unrolled loop for rounds of 18 or more. + "18: cmp $18, %[rounds] \n\t" + " jl 9f \n\t" + " " ROUND_3_INIT() + " " ROUND_3_A(0) + " " ROUND_3_B(3) + " " ROUND_3_A(6) + " " ROUND_3_B(9) + " " ROUND_3_A_LAST(12) + " sub $18, %[rounds] \n\t" + " add $(24 * 18), %[src] \n\t" + " add $(32 * 18), %[dst] \n\t" + + // Enter a 9x unrolled loop for rounds of 9 or more. + "9: cmp $9, %[rounds] \n\t" + " jl 6f \n\t" + " " ROUND_3_INIT() + " " ROUND_3_A(0) + " " ROUND_3_B_LAST(3) + " sub $9, %[rounds] \n\t" + " add $(24 * 9), %[src] \n\t" + " add $(32 * 9), %[dst] \n\t" + + // Enter a 6x unrolled loop for rounds of 6 or more. + "6: cmp $6, %[rounds] \n\t" + " jl 55f \n\t" + " " ROUND_3_INIT() + " " ROUND_3_A_LAST(0) + " sub $6, %[rounds] \n\t" + " add $(24 * 6), %[src] \n\t" + " add $(32 * 6), %[dst] \n\t" + + // Dispatch the remaining rounds 0..5. + "55: cmp $3, %[rounds] \n\t" + " jg 45f \n\t" + " je 3f \n\t" + " cmp $1, %[rounds] \n\t" + " jg 2f \n\t" + " je 1f \n\t" + " jmp 0f \n\t" + + "45: cmp $4, %[rounds] \n\t" + " je 4f \n\t" + + // Block of non-interlaced encoding rounds, which can each + // individually be jumped to. Rounds fall through to the next. + "5: " ROUND() + "4: " ROUND() + "3: " ROUND() + "2: " ROUND() + "1: " ROUND() + "0: \n\t" + + // Outputs (modified). + : [rounds] "+r" (rounds), + [loops] "+r" (loops), + [src] "+r" (*s), + [dst] "+r" (*o), + [a] "=&x" (a), + [b] "=&x" (b), + [c] "=&x" (c), + [d] "=&x" (d), + [e] "=&x" (e), + [f] "+x" (f) + + // Inputs (not modified). + : [lut0] "x" (lut0), + [lut1] "x" (lut1), + [msk0] "x" (_mm256_set1_epi32(0x0FC0FC00)), + [msk1] "x" (_mm256_set1_epi32(0x04000040)), + [msk2] "x" (_mm256_set1_epi32(0x003F03F0)), + [msk3] "x" (_mm256_set1_epi32(0x01000010)), + [n51] "x" (_mm256_set1_epi8(51)), + [n25] "x" (_mm256_set1_epi8(25)) + + // Clobbers. + : "cc", "memory" + ); +} + +#pragma GCC diagnostic pop diff --git a/deps/base64/base64/lib/arch/avx512/codec.c b/deps/base64/base64/lib/arch/avx512/codec.c new file mode 100644 index 00000000000000..664120853d4316 --- /dev/null +++ b/deps/base64/base64/lib/arch/avx512/codec.c @@ -0,0 +1,42 @@ +#include +#include +#include + +#include "../../../include/libbase64.h" +#include "../../tables/tables.h" +#include "../../codecs.h" +#include "config.h" +#include "../../env.h" + +#if HAVE_AVX512 +#include + +#include "../avx2/dec_reshuffle.c" +#include "../avx2/dec_loop.c" +#include "enc_reshuffle_translate.c" +#include "enc_loop.c" + +#endif // HAVE_AVX512 + +BASE64_ENC_FUNCTION(avx512) +{ +#if HAVE_AVX512 + #include "../generic/enc_head.c" + enc_loop_avx512(&s, &slen, &o, &olen); + #include "../generic/enc_tail.c" +#else + BASE64_ENC_STUB +#endif +} + +// Reuse AVX2 decoding. Not supporting AVX512 at present +BASE64_DEC_FUNCTION(avx512) +{ +#if HAVE_AVX512 + #include "../generic/dec_head.c" + dec_loop_avx2(&s, &slen, &o, &olen); + #include "../generic/dec_tail.c" +#else + BASE64_DEC_STUB +#endif +} diff --git a/deps/base64/base64/lib/arch/avx512/enc_loop.c b/deps/base64/base64/lib/arch/avx512/enc_loop.c new file mode 100644 index 00000000000000..4c71e160ae820a --- /dev/null +++ b/deps/base64/base64/lib/arch/avx512/enc_loop.c @@ -0,0 +1,61 @@ +static inline void +enc_loop_avx512_inner (const uint8_t **s, uint8_t **o) +{ + // Load input. + __m512i src = _mm512_loadu_si512((__m512i *) *s); + + // Reshuffle, translate, store. + src = enc_reshuffle_translate(src); + _mm512_storeu_si512((__m512i *) *o, src); + + *s += 48; + *o += 64; +} + +static inline void +enc_loop_avx512 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) +{ + if (*slen < 64) { + return; + } + + // Process blocks of 48 bytes at a time. Because blocks are loaded 64 + // bytes at a time, ensure that there will be at least 24 remaining + // bytes after the last round, so that the final read will not pass + // beyond the bounds of the input buffer. + size_t rounds = (*slen - 24) / 48; + + *slen -= rounds * 48; // 48 bytes consumed per round + *olen += rounds * 64; // 64 bytes produced per round + + while (rounds > 0) { + if (rounds >= 8) { + enc_loop_avx512_inner(s, o); + enc_loop_avx512_inner(s, o); + enc_loop_avx512_inner(s, o); + enc_loop_avx512_inner(s, o); + enc_loop_avx512_inner(s, o); + enc_loop_avx512_inner(s, o); + enc_loop_avx512_inner(s, o); + enc_loop_avx512_inner(s, o); + rounds -= 8; + continue; + } + if (rounds >= 4) { + enc_loop_avx512_inner(s, o); + enc_loop_avx512_inner(s, o); + enc_loop_avx512_inner(s, o); + enc_loop_avx512_inner(s, o); + rounds -= 4; + continue; + } + if (rounds >= 2) { + enc_loop_avx512_inner(s, o); + enc_loop_avx512_inner(s, o); + rounds -= 2; + continue; + } + enc_loop_avx512_inner(s, o); + break; + } +} diff --git a/deps/base64/base64/lib/arch/avx512/enc_reshuffle_translate.c b/deps/base64/base64/lib/arch/avx512/enc_reshuffle_translate.c new file mode 100644 index 00000000000000..5c332bb24ca4e3 --- /dev/null +++ b/deps/base64/base64/lib/arch/avx512/enc_reshuffle_translate.c @@ -0,0 +1,50 @@ +// AVX512 algorithm is based on permutevar and multishift. The code is based on +// https://github.com/WojciechMula/base64simd which is under BSD-2 license. + +static inline __m512i +enc_reshuffle_translate (const __m512i input) +{ + // 32-bit input + // [ 0 0 0 0 0 0 0 0|c1 c0 d5 d4 d3 d2 d1 d0| + // b3 b2 b1 b0 c5 c4 c3 c2|a5 a4 a3 a2 a1 a0 b5 b4] + // output order [1, 2, 0, 1] + // [b3 b2 b1 b0 c5 c4 c3 c2|c1 c0 d5 d4 d3 d2 d1 d0| + // a5 a4 a3 a2 a1 a0 b5 b4|b3 b2 b1 b0 c3 c2 c1 c0] + + const __m512i shuffle_input = _mm512_setr_epi32(0x01020001, + 0x04050304, + 0x07080607, + 0x0a0b090a, + 0x0d0e0c0d, + 0x10110f10, + 0x13141213, + 0x16171516, + 0x191a1819, + 0x1c1d1b1c, + 0x1f201e1f, + 0x22232122, + 0x25262425, + 0x28292728, + 0x2b2c2a2b, + 0x2e2f2d2e); + + // Reorder bytes + // [b3 b2 b1 b0 c5 c4 c3 c2|c1 c0 d5 d4 d3 d2 d1 d0| + // a5 a4 a3 a2 a1 a0 b5 b4|b3 b2 b1 b0 c3 c2 c1 c0] + const __m512i in = _mm512_permutexvar_epi8(shuffle_input, input); + + // After multishift a single 32-bit lane has following layout + // [c1 c0 d5 d4 d3 d2 d1 d0|b1 b0 c5 c4 c3 c2 c1 c0| + // a1 a0 b5 b4 b3 b2 b1 b0|d1 d0 a5 a4 a3 a2 a1 a0] + // (a = [10:17], b = [4:11], c = [22:27], d = [16:21]) + + // 48, 54, 36, 42, 16, 22, 4, 10 + const __m512i shifts = _mm512_set1_epi64(0x3036242a1016040alu); + __m512i shuffled_in = _mm512_multishift_epi64_epi8(shifts, in); + + // Translate immediatedly after reshuffled. + const __m512i lookup = _mm512_loadu_si512(base64_table_enc_6bit); + + // Translation 6-bit values to ASCII. + return _mm512_permutexvar_epi8(shuffled_in, lookup); +} diff --git a/deps/base64/base64/lib/arch/neon32/enc_loop.c b/deps/base64/base64/lib/arch/neon32/enc_loop.c index e9e8e28525691b..d694b33733cd61 100644 --- a/deps/base64/base64/lib/arch/neon32/enc_loop.c +++ b/deps/base64/base64/lib/arch/neon32/enc_loop.c @@ -100,7 +100,8 @@ enc_loop_neon32_inner_asm (const uint8_t **s, uint8_t **o) [n63] "w" (n63) // Clobbers. - : "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31" + : "d24", "d25", "d26", "d27", "d28", "d29", "d30", "d31", + "cc", "memory" ); } #endif diff --git a/deps/base64/base64/lib/arch/neon64/enc_loop_asm.c b/deps/base64/base64/lib/arch/neon64/enc_loop_asm.c index cf2fd27e80d2ca..182e9cdf4a17db 100644 --- a/deps/base64/base64/lib/arch/neon64/enc_loop_asm.c +++ b/deps/base64/base64/lib/arch/neon64/enc_loop_asm.c @@ -160,7 +160,8 @@ enc_loop_neon64 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) // Clobbers. : "v2", "v3", "v4", "v5", "v8", "v9", "v10", "v11", - "v12", "v13", "v14", "v15" + "v12", "v13", "v14", "v15", + "cc", "memory" ); } diff --git a/deps/base64/base64/lib/arch/sse41/codec.c b/deps/base64/base64/lib/arch/sse41/codec.c index 00645feda836d0..6e5afe30011b7b 100644 --- a/deps/base64/base64/lib/arch/sse41/codec.c +++ b/deps/base64/base64/lib/arch/sse41/codec.c @@ -11,11 +11,25 @@ #if HAVE_SSE41 #include +// Only enable inline assembly on supported compilers and on 64-bit CPUs. +#ifndef BASE64_SSE41_USE_ASM +# if (defined(__GNUC__) || defined(__clang__)) && BASE64_WORDSIZE == 64 +# define BASE64_SSE41_USE_ASM 1 +# else +# define BASE64_SSE41_USE_ASM 0 +# endif +#endif + #include "../ssse3/dec_reshuffle.c" #include "../ssse3/dec_loop.c" -#include "../ssse3/enc_translate.c" -#include "../ssse3/enc_reshuffle.c" -#include "../ssse3/enc_loop.c" + +#if BASE64_SSE41_USE_ASM +# include "../ssse3/enc_loop_asm.c" +#else +# include "../ssse3/enc_translate.c" +# include "../ssse3/enc_reshuffle.c" +# include "../ssse3/enc_loop.c" +#endif #endif // HAVE_SSE41 diff --git a/deps/base64/base64/lib/arch/sse42/codec.c b/deps/base64/base64/lib/arch/sse42/codec.c index cf5d97cfb293ca..dde823b7aa0aa6 100644 --- a/deps/base64/base64/lib/arch/sse42/codec.c +++ b/deps/base64/base64/lib/arch/sse42/codec.c @@ -11,11 +11,25 @@ #if HAVE_SSE42 #include +// Only enable inline assembly on supported compilers and on 64-bit CPUs. +#ifndef BASE64_SSE42_USE_ASM +# if (defined(__GNUC__) || defined(__clang__)) && BASE64_WORDSIZE == 64 +# define BASE64_SSE42_USE_ASM 1 +# else +# define BASE64_SSE42_USE_ASM 0 +# endif +#endif + #include "../ssse3/dec_reshuffle.c" #include "../ssse3/dec_loop.c" -#include "../ssse3/enc_translate.c" -#include "../ssse3/enc_reshuffle.c" -#include "../ssse3/enc_loop.c" + +#if BASE64_SSE42_USE_ASM +# include "../ssse3/enc_loop_asm.c" +#else +# include "../ssse3/enc_translate.c" +# include "../ssse3/enc_reshuffle.c" +# include "../ssse3/enc_loop.c" +#endif #endif // HAVE_SSE42 diff --git a/deps/base64/base64/lib/arch/ssse3/codec.c b/deps/base64/base64/lib/arch/ssse3/codec.c index ad14a4589deb70..a812a2901f4efb 100644 --- a/deps/base64/base64/lib/arch/ssse3/codec.c +++ b/deps/base64/base64/lib/arch/ssse3/codec.c @@ -11,11 +11,27 @@ #if HAVE_SSSE3 #include +// Only enable inline assembly on supported compilers and on 64-bit CPUs. +// 32-bit CPUs with SSSE3 support, such as low-end Atoms, only have eight XMM +// registers, which is not enough to run the inline assembly. +#ifndef BASE64_SSSE3_USE_ASM +# if (defined(__GNUC__) || defined(__clang__)) && BASE64_WORDSIZE == 64 +# define BASE64_SSSE3_USE_ASM 1 +# else +# define BASE64_SSSE3_USE_ASM 0 +# endif +#endif + #include "dec_reshuffle.c" #include "dec_loop.c" -#include "enc_reshuffle.c" -#include "enc_translate.c" -#include "enc_loop.c" + +#if BASE64_SSSE3_USE_ASM +# include "enc_loop_asm.c" +#else +# include "enc_reshuffle.c" +# include "enc_translate.c" +# include "enc_loop.c" +#endif #endif // HAVE_SSSE3 diff --git a/deps/base64/base64/lib/arch/ssse3/enc_loop_asm.c b/deps/base64/base64/lib/arch/ssse3/enc_loop_asm.c new file mode 100644 index 00000000000000..0cdb340a63b7fc --- /dev/null +++ b/deps/base64/base64/lib/arch/ssse3/enc_loop_asm.c @@ -0,0 +1,268 @@ +// Apologies in advance for combining the preprocessor with inline assembly, +// two notoriously gnarly parts of C, but it was necessary to avoid a lot of +// code repetition. The preprocessor is used to template large sections of +// inline assembly that differ only in the registers used. If the code was +// written out by hand, it would become very large and hard to audit. + +// Generate a block of inline assembly that loads register R0 from memory. The +// offset at which the register is loaded is set by the given round. +#define LOAD(R0, ROUND) \ + "lddqu ("#ROUND" * 12)(%[src]), %["R0"] \n\t" + +// Generate a block of inline assembly that deinterleaves and shuffles register +// R0 using preloaded constants. Outputs in R0 and R1. +#define SHUF(R0, R1) \ + "pshufb %[lut0], %["R0"] \n\t" \ + "movdqa %["R0"], %["R1"] \n\t" \ + "pand %[msk0], %["R0"] \n\t" \ + "pand %[msk2], %["R1"] \n\t" \ + "pmulhuw %[msk1], %["R0"] \n\t" \ + "pmullw %[msk3], %["R1"] \n\t" \ + "por %["R1"], %["R0"] \n\t" + +// Generate a block of inline assembly that takes R0 and R1 and translates +// their contents to the base64 alphabet, using preloaded constants. +#define TRAN(R0, R1, R2) \ + "movdqa %["R0"], %["R1"] \n\t" \ + "movdqa %["R0"], %["R2"] \n\t" \ + "psubusb %[n51], %["R1"] \n\t" \ + "pcmpgtb %[n25], %["R2"] \n\t" \ + "psubb %["R2"], %["R1"] \n\t" \ + "movdqa %[lut1], %["R2"] \n\t" \ + "pshufb %["R1"], %["R2"] \n\t" \ + "paddb %["R2"], %["R0"] \n\t" + +// Generate a block of inline assembly that stores the given register R0 at an +// offset set by the given round. +#define STOR(R0, ROUND) \ + "movdqu %["R0"], ("#ROUND" * 16)(%[dst]) \n\t" + +// Generate a block of inline assembly that generates a single self-contained +// encoder round: fetch the data, process it, and store the result. Then update +// the source and destination pointers. +#define ROUND() \ + LOAD("a", 0) \ + SHUF("a", "b") \ + TRAN("a", "b", "c") \ + STOR("a", 0) \ + "add $12, %[src] \n\t" \ + "add $16, %[dst] \n\t" + +// Define a macro that initiates a three-way interleaved encoding round by +// preloading registers a, b and c from memory. +// The register graph shows which registers are in use during each step, and +// is a visual aid for choosing registers for that step. Symbol index: +// +// + indicates that a register is loaded by that step. +// | indicates that a register is in use and must not be touched. +// - indicates that a register is decommissioned by that step. +// x indicates that a register is used as a temporary by that step. +// V indicates that a register is an input or output to the macro. +// +#define ROUND_3_INIT() /* a b c d e f */ \ + LOAD("a", 0) /* + */ \ + SHUF("a", "d") /* | + */ \ + LOAD("b", 1) /* | + | */ \ + TRAN("a", "d", "e") /* | | - x */ \ + LOAD("c", 2) /* V V V */ + +// Define a macro that translates, shuffles and stores the input registers A, B +// and C, and preloads registers D, E and F for the next round. +// This macro can be arbitrarily daisy-chained by feeding output registers D, E +// and F back into the next round as input registers A, B and C. The macro +// carefully interleaves memory operations with data operations for optimal +// pipelined performance. + +#define ROUND_3(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ + LOAD(D, (ROUND + 3)) /* V V V + */ \ + SHUF(B, E) /* | | | | + */ \ + STOR(A, (ROUND + 0)) /* - | | | | */ \ + TRAN(B, E, F) /* | | | - x */ \ + LOAD(E, (ROUND + 4)) /* | | | + */ \ + SHUF(C, A) /* + | | | | */ \ + STOR(B, (ROUND + 1)) /* | - | | | */ \ + TRAN(C, A, F) /* - | | | x */ \ + LOAD(F, (ROUND + 5)) /* | | | + */ \ + SHUF(D, A) /* + | | | | */ \ + STOR(C, (ROUND + 2)) /* | - | | | */ \ + TRAN(D, A, B) /* - x V V V */ + +// Define a macro that terminates a ROUND_3 macro by taking pre-loaded +// registers D, E and F, and translating, shuffling and storing them. +#define ROUND_3_END(ROUND, A,B,C,D,E,F) /* A B C D E F */ \ + SHUF(E, A) /* + V V V */ \ + STOR(D, (ROUND + 3)) /* | - | | */ \ + TRAN(E, A, B) /* - x | | */ \ + SHUF(F, C) /* + | | */ \ + STOR(E, (ROUND + 4)) /* | - | */ \ + TRAN(F, C, D) /* - x | */ \ + STOR(F, (ROUND + 5)) /* - */ + +// Define a type A round. Inputs are a, b, and c, outputs are d, e, and f. +#define ROUND_3_A(ROUND) \ + ROUND_3(ROUND, "a", "b", "c", "d", "e", "f") + +// Define a type B round. Inputs and outputs are swapped with regard to type A. +#define ROUND_3_B(ROUND) \ + ROUND_3(ROUND, "d", "e", "f", "a", "b", "c") + +// Terminating macro for a type A round. +#define ROUND_3_A_LAST(ROUND) \ + ROUND_3_A(ROUND) \ + ROUND_3_END(ROUND, "a", "b", "c", "d", "e", "f") + +// Terminating macro for a type B round. +#define ROUND_3_B_LAST(ROUND) \ + ROUND_3_B(ROUND) \ + ROUND_3_END(ROUND, "d", "e", "f", "a", "b", "c") + +// Suppress clang's warning that the literal string in the asm statement is +// overlong (longer than the ISO-mandated minimum size of 4095 bytes for C99 +// compilers). It may be true, but the goal here is not C99 portability. +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Woverlength-strings" + +static inline void +enc_loop_ssse3 (const uint8_t **s, size_t *slen, uint8_t **o, size_t *olen) +{ + // For a clearer explanation of the algorithm used by this function, + // please refer to the plain (not inline assembly) implementation. This + // function follows the same basic logic. + + if (*slen < 16) { + return; + } + + // Process blocks of 12 bytes at a time. Input is read in blocks of 16 + // bytes, so "reserve" four bytes from the input buffer to ensure that + // we never read beyond the end of the input buffer. + size_t rounds = (*slen - 4) / 12; + + *slen -= rounds * 12; // 12 bytes consumed per round + *olen += rounds * 16; // 16 bytes produced per round + + // Number of times to go through the 36x loop. + size_t loops = rounds / 36; + + // Number of rounds remaining after the 36x loop. + rounds %= 36; + + // Lookup tables. + const __m128i lut0 = _mm_set_epi8( + 10, 11, 9, 10, 7, 8, 6, 7, 4, 5, 3, 4, 1, 2, 0, 1); + + const __m128i lut1 = _mm_setr_epi8( + 65, 71, -4, -4, -4, -4, -4, -4, -4, -4, -4, -4, -19, -16, 0, 0); + + // Temporary registers. + __m128i a, b, c, d, e, f; + + __asm__ volatile ( + + // If there are 36 rounds or more, enter a 36x unrolled loop of + // interleaved encoding rounds. The rounds interleave memory + // operations (load/store) with data operations (table lookups, + // etc) to maximize pipeline throughput. + " test %[loops], %[loops] \n\t" + " jz 18f \n\t" + " jmp 36f \n\t" + " \n\t" + ".balign 64 \n\t" + "36: " ROUND_3_INIT() + " " ROUND_3_A( 0) + " " ROUND_3_B( 3) + " " ROUND_3_A( 6) + " " ROUND_3_B( 9) + " " ROUND_3_A(12) + " " ROUND_3_B(15) + " " ROUND_3_A(18) + " " ROUND_3_B(21) + " " ROUND_3_A(24) + " " ROUND_3_B(27) + " " ROUND_3_A_LAST(30) + " add $(12 * 36), %[src] \n\t" + " add $(16 * 36), %[dst] \n\t" + " dec %[loops] \n\t" + " jnz 36b \n\t" + + // Enter an 18x unrolled loop for rounds of 18 or more. + "18: cmp $18, %[rounds] \n\t" + " jl 9f \n\t" + " " ROUND_3_INIT() + " " ROUND_3_A(0) + " " ROUND_3_B(3) + " " ROUND_3_A(6) + " " ROUND_3_B(9) + " " ROUND_3_A_LAST(12) + " sub $18, %[rounds] \n\t" + " add $(12 * 18), %[src] \n\t" + " add $(16 * 18), %[dst] \n\t" + + // Enter a 9x unrolled loop for rounds of 9 or more. + "9: cmp $9, %[rounds] \n\t" + " jl 6f \n\t" + " " ROUND_3_INIT() + " " ROUND_3_A(0) + " " ROUND_3_B_LAST(3) + " sub $9, %[rounds] \n\t" + " add $(12 * 9), %[src] \n\t" + " add $(16 * 9), %[dst] \n\t" + + // Enter a 6x unrolled loop for rounds of 6 or more. + "6: cmp $6, %[rounds] \n\t" + " jl 55f \n\t" + " " ROUND_3_INIT() + " " ROUND_3_A_LAST(0) + " sub $6, %[rounds] \n\t" + " add $(12 * 6), %[src] \n\t" + " add $(16 * 6), %[dst] \n\t" + + // Dispatch the remaining rounds 0..5. + "55: cmp $3, %[rounds] \n\t" + " jg 45f \n\t" + " je 3f \n\t" + " cmp $1, %[rounds] \n\t" + " jg 2f \n\t" + " je 1f \n\t" + " jmp 0f \n\t" + + "45: cmp $4, %[rounds] \n\t" + " je 4f \n\t" + + // Block of non-interlaced encoding rounds, which can each + // individually be jumped to. Rounds fall through to the next. + "5: " ROUND() + "4: " ROUND() + "3: " ROUND() + "2: " ROUND() + "1: " ROUND() + "0: \n\t" + + // Outputs (modified). + : [rounds] "+r" (rounds), + [loops] "+r" (loops), + [src] "+r" (*s), + [dst] "+r" (*o), + [a] "=&x" (a), + [b] "=&x" (b), + [c] "=&x" (c), + [d] "=&x" (d), + [e] "=&x" (e), + [f] "=&x" (f) + + // Inputs (not modified). + : [lut0] "x" (lut0), + [lut1] "x" (lut1), + [msk0] "x" (_mm_set1_epi32(0x0FC0FC00)), + [msk1] "x" (_mm_set1_epi32(0x04000040)), + [msk2] "x" (_mm_set1_epi32(0x003F03F0)), + [msk3] "x" (_mm_set1_epi32(0x01000010)), + [n51] "x" (_mm_set1_epi8(51)), + [n25] "x" (_mm_set1_epi8(25)) + + // Clobbers. + : "cc", "memory" + ); +} + +#pragma GCC diagnostic pop diff --git a/deps/base64/base64/lib/codec_choose.c b/deps/base64/base64/lib/codec_choose.c index 6a07d6a74cc24f..abef3f2ae9f403 100644 --- a/deps/base64/base64/lib/codec_choose.c +++ b/deps/base64/base64/lib/codec_choose.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "../include/libbase64.h" #include "codecs.h" @@ -10,7 +11,7 @@ #if (__x86_64__ || __i386__ || _M_X86 || _M_X64) #define BASE64_X86 - #if (HAVE_SSSE3 || HAVE_SSE41 || HAVE_SSE42 || HAVE_AVX || HAVE_AVX2) + #if (HAVE_SSSE3 || HAVE_SSE41 || HAVE_SSE42 || HAVE_AVX || HAVE_AVX2 || HAVE_AVX512) #define BASE64_X86_SIMD #endif #endif @@ -31,7 +32,7 @@ __cpuid_count(__level, 0, __eax, __ebx, __ecx, __edx) #else #include - #if HAVE_AVX2 || HAVE_AVX + #if HAVE_AVX512 || HAVE_AVX2 || HAVE_AVX #if ((__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 2) || (__clang_major__ >= 3)) static inline uint64_t _xgetbv (uint32_t index) { @@ -45,6 +46,12 @@ #endif #endif +#ifndef bit_AVX512vl +#define bit_AVX512vl (1 << 31) +#endif +#ifndef bit_AVX512vbmi +#define bit_AVX512vbmi (1 << 1) +#endif #ifndef bit_AVX2 #define bit_AVX2 (1 << 5) #endif @@ -75,6 +82,7 @@ BASE64_ENC_FUNCTION(arch); \ BASE64_DEC_FUNCTION(arch); \ +BASE64_CODEC_FUNCS(avx512) BASE64_CODEC_FUNCS(avx2) BASE64_CODEC_FUNCS(neon32) BASE64_CODEC_FUNCS(neon64) @@ -91,9 +99,10 @@ codec_choose_forced (struct codec *codec, int flags) // always allow it, even if the codec is a no-op. // For testing purposes. - if (!(flags & 0xFF)) { + if (!(flags & 0xFFFF)) { return false; } + if (flags & BASE64_FORCE_AVX2) { codec->enc = base64_stream_encode_avx2; codec->dec = base64_stream_decode_avx2; @@ -134,6 +143,11 @@ codec_choose_forced (struct codec *codec, int flags) codec->dec = base64_stream_decode_avx; return true; } + if (flags & BASE64_FORCE_AVX512) { + codec->enc = base64_stream_encode_avx512; + codec->dec = base64_stream_decode_avx512; + return true; + } return false; } @@ -178,8 +192,8 @@ codec_choose_x86 (struct codec *codec) max_level = __get_cpuid_max(0, NULL); #endif - #if HAVE_AVX2 || HAVE_AVX - // Check for AVX/AVX2 support: + #if HAVE_AVX512 || HAVE_AVX2 || HAVE_AVX + // Check for AVX/AVX2/AVX512 support: // Checking for AVX requires 3 things: // 1) CPUID indicates that the OS uses XSAVE and XRSTORE instructions // (allowing saving YMM registers on context switch) @@ -194,7 +208,17 @@ codec_choose_x86 (struct codec *codec) if (ecx & bit_XSAVE_XRSTORE) { uint64_t xcr_mask; xcr_mask = _xgetbv(_XCR_XFEATURE_ENABLED_MASK); - if (xcr_mask & _XCR_XMM_AND_YMM_STATE_ENABLED_BY_OS) { + if ((xcr_mask & _XCR_XMM_AND_YMM_STATE_ENABLED_BY_OS) == _XCR_XMM_AND_YMM_STATE_ENABLED_BY_OS) { // check multiple bits at once + #if HAVE_AVX512 + if (max_level >= 7) { + __cpuid_count(7, 0, eax, ebx, ecx, edx); + if ((ebx & bit_AVX512vl) && (ecx & bit_AVX512vbmi)) { + codec->enc = base64_stream_encode_avx512; + codec->dec = base64_stream_decode_avx512; + return true; + } + } + #endif #if HAVE_AVX2 if (max_level >= 7) { __cpuid_count(7, 0, eax, ebx, ecx, edx); diff --git a/deps/base64/base64/lib/lib.c b/deps/base64/base64/lib/lib.c index 4703512b87ab46..053931a9918b2b 100644 --- a/deps/base64/base64/lib/lib.c +++ b/deps/base64/base64/lib/lib.c @@ -68,7 +68,7 @@ void base64_stream_decode_init (struct base64_state *state, int flags) { // If any of the codec flags are set, redo choice: - if (codec.dec == NULL || flags & 0xFF) { + if (codec.dec == NULL || flags & 0xFFFF) { codec_choose(&codec, flags); } state->eof = 0; diff --git a/deps/base64/base64/test/Makefile b/deps/base64/base64/test/Makefile index d1045824195edb..c896627e0bd8d6 100644 --- a/deps/base64/base64/test/Makefile +++ b/deps/base64/base64/test/Makefile @@ -11,12 +11,15 @@ else BENCH_LDFLAGS=-lrt endif -.PHONY: clean test +.PHONY: clean test valgrind test: clean test_base64 benchmark ./test_base64 ./benchmark +valgrind: clean test_base64 + valgrind --error-exitcode=2 ./test_base64 + test_base64: test_base64.c codec_supported.o ../lib/libbase64.o $(CC) $(CFLAGS) -o $@ $^ diff --git a/deps/base64/base64/test/ci/analysis.sh b/deps/base64/base64/test/ci/analysis.sh new file mode 100755 index 00000000000000..f7da1857fe05e3 --- /dev/null +++ b/deps/base64/base64/test/ci/analysis.sh @@ -0,0 +1,37 @@ +#!/bin/bash +set -ve + +MACHINE=$(uname -m) +export CC=gcc + +uname -a +clang --version # make analyse +${CC} --version # make -C test valgrind + +for USE_ASSEMBLY in 0 1; do + if [ "${MACHINE}" == "x86_64" ]; then + export SSSE3_CFLAGS="-mssse3 -DBASE64_SSSE3_USE_ASM=${USE_ASSEMBLY}" + export SSE41_CFLAGS="-msse4.1 -DBASE64_SSE41_USE_ASM=${USE_ASSEMBLY}" + export SSE42_CFLAGS="-msse4.2 -DBASE64_SSE42_USE_ASM=${USE_ASSEMBLY}" + export AVX_CFLAGS="-mavx -DBASE64_AVX_USE_ASM=${USE_ASSEMBLY}" + export AVX2_CFLAGS="-mavx2 -DBASE64_AVX2_USE_ASM=${USE_ASSEMBLY}" + # Temporarily disable AVX512; it is not available in CI yet. + # export AVX512_CFLAGS="-mavx512vl -mavx512vbmi" + elif [ "${MACHINE}" == "aarch64" ]; then + export NEON64_CFLAGS="-march=armv8-a" + elif [ "${MACHINE}" == "armv7l" ]; then + export NEON32_CFLAGS="-march=armv7-a -mfloat-abi=hard -mfpu=neon" + fi + + if [ ${USE_ASSEMBLY} -eq 0 ]; then + echo "::group::analyze" + make analyze + echo "::endgroup::" + fi + + echo "::group::valgrind (USE_ASSEMBLY=${USE_ASSEMBLY})" + make clean + make + make -C test valgrind + echo "::endgroup::" +done diff --git a/deps/base64/base64/test/ci/test.sh b/deps/base64/base64/test/ci/test.sh index 066a49f400b95c..fb188418cca0a9 100755 --- a/deps/base64/base64/test/ci/test.sh +++ b/deps/base64/base64/test/ci/test.sh @@ -7,9 +7,11 @@ if [ "${MACHINE}" == "x86_64" ]; then export SSE41_CFLAGS=-msse4.1 export SSE42_CFLAGS=-msse4.2 export AVX_CFLAGS=-mavx - # no AVX2 on GHA macOS + # no AVX2 or AVX512 on GHA macOS if [ "$(uname -s)" != "Darwin" ]; then export AVX2_CFLAGS=-mavx2 + # Temporarily disable AVX512; it is not available in CI yet. + # export AVX512_CFLAGS="-mavx512vl -mavx512vbmi" fi elif [ "${MACHINE}" == "aarch64" ]; then export NEON64_CFLAGS="-march=armv8-a" diff --git a/deps/base64/base64/test/codec_supported.c b/deps/base64/base64/test/codec_supported.c index a027b9943bf8ed..f68c766875abcd 100644 --- a/deps/base64/base64/test/codec_supported.c +++ b/deps/base64/base64/test/codec_supported.c @@ -11,6 +11,7 @@ static char *_codecs[] = , "SSE41" , "SSE42" , "AVX" +, "AVX512" , NULL } ; diff --git a/deps/base64/base64/test/test_base64.c b/deps/base64/base64/test/test_base64.c index bec52d146c824a..94aad2d489b9f7 100644 --- a/deps/base64/base64/test/test_base64.c +++ b/deps/base64/base64/test/test_base64.c @@ -1,6 +1,7 @@ #include #include #include +#include #include "../include/libbase64.h" #include "codec_supported.h" #include "moby_dick.h" @@ -92,7 +93,7 @@ assert_roundtrip (int flags, const char *src) } static int -test_char_table (int flags) +test_char_table (int flags, bool use_malloc) { bool fail = false; char chr[256]; @@ -107,8 +108,24 @@ test_char_table (int flags) for (int i = 0; i < 256; i++) { size_t chrlen = 256 - i; + char* src = &chr[i]; + if (use_malloc) { + src = malloc(chrlen); /* malloc/copy this so valgrind can find out-of-bound access */ + if (src == NULL) { + printf( + "FAIL: encoding @ %d: allocation of %lu bytes failed\n", + i, (unsigned long)chrlen + ); + fail = true; + continue; + } + memcpy(src, &chr[i], chrlen); + } - base64_encode(&chr[i], chrlen, enc, &enclen, BASE64_FORCE_PLAIN); + base64_encode(src, chrlen, enc, &enclen, flags); + if (use_malloc) { + free(src); + } if (!base64_decode(enc, enclen, dec, &declen, flags)) { printf("FAIL: decoding @ %d: decoding error\n", i); @@ -198,6 +215,11 @@ test_streaming (int flags) while (base64_stream_decode(&state, &ref[inpos], (inpos + bs > reflen) ? reflen - inpos : bs, &enc[enclen], &partlen)) { enclen += partlen; inpos += bs; + + // Has the entire buffer been consumed? + if (inpos >= 400) { + break; + } } if (enclen != 256) { printf("FAIL: stream decoding gave incorrect size: " @@ -336,7 +358,8 @@ test_one_codec (const char *codec, int flags) fail |= assert_roundtrip(flags, vec[i].out); } - fail |= test_char_table(flags); + fail |= test_char_table(flags, false); /* test with unaligned input buffer */ + fail |= test_char_table(flags, true); /* test for out-of-bound input read */ fail |= test_streaming(flags); fail |= test_invalid_dec_input(flags); diff --git a/deps/base64/unofficial.gni b/deps/base64/unofficial.gni new file mode 100644 index 00000000000000..269c62d976d6ad --- /dev/null +++ b/deps/base64/unofficial.gni @@ -0,0 +1,159 @@ +# Copyright (c) 2013-2022 GitHub Inc. +# Copyright 2022 the V8 project authors. All rights reserved. +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("base64_gn_build") { + config("base64_external_config") { + include_dirs = [ "base64/include" ] + if (!is_component_build) { + defines = [ "BASE64_STATIC_DEFINE" ] + } + } + + config("base64_internal_config") { + include_dirs = [ "base64/lib" ] + if (is_component_build) { + defines = [ "BASE64_EXPORTS" ] + } else { + defines = [] + } + if (target_cpu == "x86" || target_cpu == "x64") { + defines += [ + "HAVE_SSSE3=1", + "HAVE_SSE41=1", + "HAVE_SSE42=1", + "HAVE_AVX=1", + "HAVE_AVX2=1", + "HAVE_AVX512=1", + ] + } + if (target_cpu == "arm") { + defines += [ "HAVE_NEON32=1" ] + } + if (target_cpu == "arm64") { + defines += [ "HAVE_NEON64=1" ] + } + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-implicit-fallthrough", + "-Wno-shadow", + "-Wno-unused-but-set-variable", + ] + } + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("base64.gyp") ], + "scope", + [ "base64.gyp" ]) + + component(target_name) { + forward_variables_from(invoker, "*") + configs += [ ":base64_internal_config" ] + public_configs = [ ":base64_external_config" ] + sources = gypi_values.base64_sources_common + deps = [ + ":base64_ssse3", + ":base64_sse41", + ":base64_sse42", + ":base64_avx", + ":base64_avx2", + ":base64_avx512", + ":base64_neon32", + ":base64_neon64", + ] + } + + source_set("base64_ssse3") { + configs += [ ":base64_internal_config" ] + sources = [ "base64/lib/arch/ssse3/codec.c" ] + if (target_cpu == "x86" || target_cpu == "x64") { + if (is_clang || !is_win) { + cflags_c = [ "-mssse3" ] + } + } + } + + source_set("base64_sse41") { + configs += [ ":base64_internal_config" ] + sources = [ "base64/lib/arch/sse41/codec.c" ] + if (target_cpu == "x86" || target_cpu == "x64") { + if (is_clang || !is_win) { + cflags_c = [ "-msse4.1" ] + } + } + } + + source_set("base64_sse42") { + configs += [ ":base64_internal_config" ] + sources = [ "base64/lib/arch/sse42/codec.c" ] + if (target_cpu == "x86" || target_cpu == "x64") { + if (is_clang || !is_win) { + cflags_c = [ "-msse4.2" ] + } + } + } + + source_set("base64_avx") { + configs += [ ":base64_internal_config" ] + sources = [ "base64/lib/arch/avx/codec.c" ] + if (target_cpu == "x86" || target_cpu == "x64") { + if (is_clang || !is_win) { + cflags_c = [ "-mavx" ] + } else if (is_win) { + cflags_c = [ "/arch:AVX" ] + } + } + } + + source_set("base64_avx2") { + configs += [ ":base64_internal_config" ] + sources = [ "base64/lib/arch/avx2/codec.c" ] + if (target_cpu == "x86" || target_cpu == "x64") { + if (is_clang || !is_win) { + cflags_c = [ "-mavx2" ] + } else if (is_win) { + cflags_c = [ "/arch:AVX2" ] + } + } + } + + source_set("base64_avx512") { + configs += [ ":base64_internal_config" ] + sources = [ "base64/lib/arch/avx512/codec.c" ] + if (target_cpu == "x86" || target_cpu == "x64") { + if (is_clang || !is_win) { + cflags_c = [ + "-mavx512vl", + "-mavx512vbmi", + ] + } else if (is_win) { + cflags_c = [ "/arch:AVX512" ] + } + } + } + + source_set("base64_neon32") { + configs += [ ":base64_internal_config" ] + sources = [ "base64/lib/arch/neon32/codec.c" ] + if (target_cpu == "arm") { + if (is_clang || !is_win) { + cflags_c = [ "-mfpu=neon" ] + } + } + } + + source_set("base64_neon64") { + configs += [ ":base64_internal_config" ] + sources = [ "base64/lib/arch/neon64/codec.c" ] + # NEON is required in arm64, so no -mfpu flag is needed + } +} diff --git a/deps/brotli/BUILD.gn b/deps/brotli/BUILD.gn new file mode 100644 index 00000000000000..8bdf8ce74d9789 --- /dev/null +++ b/deps/brotli/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +brotli_gn_build("brotli") { +} diff --git a/deps/brotli/unofficial.gni b/deps/brotli/unofficial.gni new file mode 100644 index 00000000000000..ce1df0d14cc01b --- /dev/null +++ b/deps/brotli/unofficial.gni @@ -0,0 +1,45 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Copyright 2019 the V8 project authors. All rights reserved. +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("brotli_gn_build") { + config("brotli_config") { + include_dirs = [ "c/include" ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("brotli.gyp") ], + "scope", + [ "brotli.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":brotli_config" ] + sources = gypi_values.brotli_sources + if (is_linux) { + defines = [ "OS_LINUX" ] + } else if (is_mac) { + defines = [ "OS_MACOSX" ] + } else if (target_os == "freebsd") { + defines = [ "OS_FREEBSD" ] + } + if (!is_win) { + libs = [ "m" ] + } + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-implicit-fallthrough", + "-Wno-unreachable-code", + "-Wno-unreachable-code-return", + ] + } + } +} diff --git a/deps/cares/BUILD.gn b/deps/cares/BUILD.gn new file mode 100644 index 00000000000000..ac19ac73ed1e24 --- /dev/null +++ b/deps/cares/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +cares_gn_build("cares") { +} diff --git a/deps/cares/unofficial.gni b/deps/cares/unofficial.gni new file mode 100644 index 00000000000000..07e2ed65b36deb --- /dev/null +++ b/deps/cares/unofficial.gni @@ -0,0 +1,81 @@ +# Copyright (c) 2013-2019 GitHub Inc. +# Copyright 2019 the V8 project authors. All rights reserved. +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("cares_gn_build") { + config("cares_config") { + include_dirs = [ "include" ] + if (!is_component_build) { + defines = [ "CARES_STATICLIB" ] + } + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("cares.gyp") ], + "scope", + [ "cares.gyp" ]) + + component(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":cares_config" ] + if (is_component_build) { + defines = [ "CARES_BUILDING_LIBRARY" ] + } else { + defines = [] + } + if (is_win) { + defines += [ "CARES_PULL_WS2TCPIP_H=1" ] + } + if (is_posix) { + defines += [ + "_DARWIN_USE_64_BIT_INODE=1", + "_LARGEFILE_SOURCE", + "_FILE_OFFSET_BITS=64", + "_GNU_SOURCE", + "HAVE_CONFIG_H", + ] + } + + include_dirs = [ "src/lib" ] + if (is_win) { + include_dirs += [ "config/win32" ] + } else if (is_linux) { + include_dirs += [ "config/linux" ] + } else if (is_mac) { + include_dirs += [ "config/darwin" ] + } + + if (is_win) { + libs = [ + "ws2_32.lib", + "iphlpapi.lib", + ] + } + + sources = gypi_values.cares_sources_common + if (is_win) { + sources += gypi_values.cares_sources_win + } + if (is_linux) { + sources += [ "config/linux/ares_config.h" ] + } + if (is_mac) { + sources += [ "config/darwin/ares_config.h" ] + } + + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-implicit-fallthrough", + "-Wno-unreachable-code", + ] + } + } +} diff --git a/deps/googletest/BUILD.gn b/deps/googletest/BUILD.gn new file mode 100644 index 00000000000000..de13f3f653b5d5 --- /dev/null +++ b/deps/googletest/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +googletest_gn_build("googletest") { +} diff --git a/deps/googletest/src/gtest.cc b/deps/googletest/src/gtest.cc index 99b22ed327fd91..85d45b58e37c19 100644 --- a/deps/googletest/src/gtest.cc +++ b/deps/googletest/src/gtest.cc @@ -43,6 +43,7 @@ #include #include // NOLINT #include +#include // NOLINT: raise(3) is used on some platforms #include #include #include diff --git a/deps/googletest/unofficial.gni b/deps/googletest/unofficial.gni new file mode 100644 index 00000000000000..e262d1bc1829a1 --- /dev/null +++ b/deps/googletest/unofficial.gni @@ -0,0 +1,41 @@ +# Copyright 2021 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("googletest_gn_build") { + config("googletest_config") { + include_dirs = [ "include" ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("googletest.gyp") ], + "scope", + [ "googletest.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + testonly = true + include_dirs = [ + "include", + ".", + ] + defines = [ + "GTEST_HAS_POSIX_RE=0", + "GTEST_LANG_CXX11=1", + ] + sources = gypi_values.googletest_sources + } + + source_set("gtest_main") { + testonly = true + deps = [ ":googletest" ] + sources = [ "src/gtest_main.cc" ] + public_configs = [ ":googletest_config" ] + } +} diff --git a/deps/histogram/BUILD.gn b/deps/histogram/BUILD.gn new file mode 100644 index 00000000000000..e2f3ee37137a6b --- /dev/null +++ b/deps/histogram/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +histogram_gn_build("histogram") { +} diff --git a/deps/histogram/unofficial.gni b/deps/histogram/unofficial.gni new file mode 100644 index 00000000000000..eedb62049097d7 --- /dev/null +++ b/deps/histogram/unofficial.gni @@ -0,0 +1,38 @@ +# Copyright (c) 2013-2019 GitHub Inc. +# Copyright 2019 the V8 project authors. All rights reserved. +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("histogram_gn_build") { + config("histogram_config") { + include_dirs = [ "include" ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("histogram.gyp") ], + "scope", + [ "histogram.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":histogram_config" ] + sources = gypi_values.histogram_sources + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-atomic-alignment", + "-Wno-incompatible-pointer-types", + "-Wno-unused-function", + ] + } + if (is_linux) { + libs = [ "atomic" ] + } + } +} diff --git a/deps/icu-small/LICENSE b/deps/icu-small/LICENSE index 22472dc2ec219c..9f54372febca06 100644 --- a/deps/icu-small/LICENSE +++ b/deps/icu-small/LICENSE @@ -1,49 +1,42 @@ -UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE - -See Terms of Use -for definitions of Unicode Inc.’s Data Files and Software. - -NOTICE TO USER: Carefully read the following legal agreement. -BY DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S -DATA FILES ("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), -YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE -TERMS AND CONDITIONS OF THIS AGREEMENT. -IF YOU DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE -THE DATA FILES OR SOFTWARE. +UNICODE LICENSE V3 COPYRIGHT AND PERMISSION NOTICE -Copyright © 1991-2023 Unicode, Inc. All rights reserved. -Distributed under the Terms of Use in https://www.unicode.org/copyright.html. - -Permission is hereby granted, free of charge, to any person obtaining -a copy of the Unicode data files and any associated documentation -(the "Data Files") or Unicode software and any associated documentation -(the "Software") to deal in the Data Files or Software -without restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, and/or sell copies of -the Data Files or Software, and to permit persons to whom the Data Files -or Software are furnished to do so, provided that either -(a) this copyright and permission notice appear with all copies -of the Data Files or Software, or -(b) this copyright and permission notice appear in associated -Documentation. - -THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE -WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT OF THIRD PARTY RIGHTS. -IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS -NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL -DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, -DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER -TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR -PERFORMANCE OF THE DATA FILES OR SOFTWARE. - -Except as contained in this notice, the name of a copyright holder -shall not be used in advertising or otherwise to promote the sale, -use or other dealings in these Data Files or Software without prior -written authorization of the copyright holder. +Copyright © 2016-2023 Unicode, Inc. + +NOTICE TO USER: Carefully read the following legal agreement. BY +DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING DATA FILES, AND/OR +SOFTWARE, YOU UNEQUIVOCALLY ACCEPT, AND AGREE TO BE BOUND BY, ALL OF THE +TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU DO NOT AGREE, DO NOT +DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES OR SOFTWARE. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of data files and any associated documentation (the "Data Files") or +software and any associated documentation (the "Software") to deal in the +Data Files or Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, and/or sell +copies of the Data Files or Software, and to permit persons to whom the +Data Files or Software are furnished to do so, provided that either (a) +this copyright and permission notice appear with all copies of the Data +Files or Software, or (b) this copyright and permission notice appear in +associated Documentation. + +THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF +THIRD PARTY RIGHTS. + +IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE +BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, +OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, +ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA +FILES OR SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall +not be used in advertising or otherwise to promote the sale, use or other +dealings in these Data Files or Software without prior written +authorization of the copyright holder. ---------------------------------------------------------------------- diff --git a/deps/icu-small/README-FULL-ICU.txt b/deps/icu-small/README-FULL-ICU.txt index 5913e149bc5749..24c537d5b3adb0 100644 --- a/deps/icu-small/README-FULL-ICU.txt +++ b/deps/icu-small/README-FULL-ICU.txt @@ -1,8 +1,8 @@ ICU sources - auto generated by shrink-icu-src.py This directory contains the ICU subset used by --with-intl=full-icu -It is a strict subset of ICU 73 source files with the following exception(s): -* deps/icu-small/source/data/in/icudt73l.dat.bz2 : compressed data file +It is a strict subset of ICU 74 source files with the following exception(s): +* deps/icu-small/source/data/in/icudt74l.dat.bz2 : compressed data file To rebuild this directory, see ../../tools/icu/README.md diff --git a/deps/icu-small/source/common/BUILD.bazel b/deps/icu-small/source/common/BUILD.bazel index 47d3d24bf5186e..3ecae30c437f08 100644 --- a/deps/icu-small/source/common/BUILD.bazel +++ b/deps/icu-small/source/common/BUILD.bazel @@ -603,12 +603,16 @@ cc_library( "locbased.cpp", "locid.cpp", "loclikely.cpp", + "loclikelysubtags.cpp", "locmap.cpp", + "lsr.cpp", "resbund.cpp", "resource.cpp", "uloc.cpp", "uloc_tag.cpp", "uloc_keytype.cpp", + "ulocale.cpp", + "ulocbuilder.cpp", "uresbund.cpp", "uresdata.cpp", "wintz.cpp", diff --git a/deps/icu-small/source/common/brkeng.cpp b/deps/icu-small/source/common/brkeng.cpp index ce3d09cf23b86b..3f58287532e780 100644 --- a/deps/icu-small/source/common/brkeng.cpp +++ b/deps/icu-small/source/common/brkeng.cpp @@ -21,6 +21,7 @@ #include "unicode/uscript.h" #include "unicode/ucharstrie.h" #include "unicode/bytestrie.h" +#include "unicode/rbbi.h" #include "brkeng.h" #include "cmemory.h" @@ -70,19 +71,21 @@ UnhandledEngine::~UnhandledEngine() { } UBool -UnhandledEngine::handles(UChar32 c) const { +UnhandledEngine::handles(UChar32 c, const char* locale) const { + (void)locale; // Unused return fHandled && fHandled->contains(c); } int32_t UnhandledEngine::findBreaks( UText *text, - int32_t /* startPos */, + int32_t startPos, int32_t endPos, UVector32 &/*foundBreaks*/, UBool /* isPhraseBreaking */, UErrorCode &status) const { if (U_FAILURE(status)) return 0; - UChar32 c = utext_current32(text); + utext_setNativeIndex(text, startPos); + UChar32 c = utext_current32(text); while((int32_t)utext_getNativeIndex(text) < endPos && fHandled->contains(c)) { utext_next32(text); // TODO: recast loop to work with post-increment operations. c = utext_current32(text); @@ -120,41 +123,39 @@ ICULanguageBreakFactory::~ICULanguageBreakFactory() { } } -U_NAMESPACE_END -U_CDECL_BEGIN -static void U_CALLCONV _deleteEngine(void *obj) { - delete (const icu::LanguageBreakEngine *) obj; +void ICULanguageBreakFactory::ensureEngines(UErrorCode& status) { + static UMutex gBreakEngineMutex; + Mutex m(&gBreakEngineMutex); + if (fEngines == nullptr) { + LocalPointer engines(new UStack(uprv_deleteUObject, nullptr, status), status); + if (U_SUCCESS(status)) { + fEngines = engines.orphan(); + } + } } -U_CDECL_END -U_NAMESPACE_BEGIN const LanguageBreakEngine * -ICULanguageBreakFactory::getEngineFor(UChar32 c) { +ICULanguageBreakFactory::getEngineFor(UChar32 c, const char* locale) { const LanguageBreakEngine *lbe = nullptr; UErrorCode status = U_ZERO_ERROR; + ensureEngines(status); + if (U_FAILURE(status) ) { + // Note: no way to return error code to caller. + return nullptr; + } static UMutex gBreakEngineMutex; Mutex m(&gBreakEngineMutex); - - if (fEngines == nullptr) { - LocalPointer engines(new UStack(_deleteEngine, nullptr, status), status); - if (U_FAILURE(status) ) { - // Note: no way to return error code to caller. - return nullptr; - } - fEngines = engines.orphan(); - } else { - int32_t i = fEngines->size(); - while (--i >= 0) { - lbe = (const LanguageBreakEngine *)(fEngines->elementAt(i)); - if (lbe != nullptr && lbe->handles(c)) { - return lbe; - } + int32_t i = fEngines->size(); + while (--i >= 0) { + lbe = (const LanguageBreakEngine *)(fEngines->elementAt(i)); + if (lbe != nullptr && lbe->handles(c, locale)) { + return lbe; } } - + // We didn't find an engine. Create one. - lbe = loadEngineFor(c); + lbe = loadEngineFor(c, locale); if (lbe != nullptr) { fEngines->push((void *)lbe, status); } @@ -162,7 +163,7 @@ ICULanguageBreakFactory::getEngineFor(UChar32 c) { } const LanguageBreakEngine * -ICULanguageBreakFactory::loadEngineFor(UChar32 c) { +ICULanguageBreakFactory::loadEngineFor(UChar32 c, const char*) { UErrorCode status = U_ZERO_ERROR; UScriptCode code = uscript_getScript(c, &status); if (U_SUCCESS(status)) { @@ -299,6 +300,70 @@ ICULanguageBreakFactory::loadDictionaryMatcherFor(UScriptCode script) { return nullptr; } + +void ICULanguageBreakFactory::addExternalEngine( + ExternalBreakEngine* external, UErrorCode& status) { + LocalPointer engine(external, status); + ensureEngines(status); + LocalPointer wrapper( + new BreakEngineWrapper(engine.orphan(), status), status); + static UMutex gBreakEngineMutex; + Mutex m(&gBreakEngineMutex); + fEngines->push(wrapper.getAlias(), status); + wrapper.orphan(); +} + +BreakEngineWrapper::BreakEngineWrapper( + ExternalBreakEngine* engine, UErrorCode &status) : delegate(engine, status) { +} + +BreakEngineWrapper::~BreakEngineWrapper() { +} + +UBool BreakEngineWrapper::handles(UChar32 c, const char* locale) const { + return delegate->isFor(c, locale); +} + +int32_t BreakEngineWrapper::findBreaks( + UText *text, + int32_t startPos, + int32_t endPos, + UVector32 &foundBreaks, + UBool /* isPhraseBreaking */, + UErrorCode &status) const { + if (U_FAILURE(status)) return 0; + int32_t result = 0; + + // Find the span of characters included in the set. + // The span to break begins at the current position in the text, and + // extends towards the start or end of the text, depending on 'reverse'. + + utext_setNativeIndex(text, startPos); + int32_t start = (int32_t)utext_getNativeIndex(text); + int32_t current; + int32_t rangeStart; + int32_t rangeEnd; + UChar32 c = utext_current32(text); + while((current = (int32_t)utext_getNativeIndex(text)) < endPos && delegate->handles(c)) { + utext_next32(text); // TODO: recast loop for postincrement + c = utext_current32(text); + } + rangeStart = start; + rangeEnd = current; + int32_t beforeSize = foundBreaks.size(); + int32_t additionalCapacity = rangeEnd - rangeStart + 1; + // enlarge to contains (rangeEnd-rangeStart+1) more items + foundBreaks.ensureCapacity(beforeSize+additionalCapacity, status); + if (U_FAILURE(status)) return 0; + foundBreaks.setSize(beforeSize + beforeSize+additionalCapacity); + result = delegate->fillBreaks(text, rangeStart, rangeEnd, foundBreaks.getBuffer()+beforeSize, + additionalCapacity, status); + if (U_FAILURE(status)) return 0; + foundBreaks.setSize(beforeSize + result); + utext_setNativeIndex(text, current); + return result; +} + U_NAMESPACE_END #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ diff --git a/deps/icu-small/source/common/brkeng.h b/deps/icu-small/source/common/brkeng.h index 240dc8f4d344a1..42a3d697cfef97 100644 --- a/deps/icu-small/source/common/brkeng.h +++ b/deps/icu-small/source/common/brkeng.h @@ -10,6 +10,7 @@ #ifndef BRKENG_H #define BRKENG_H +#include "unicode/umisc.h" #include "unicode/utypes.h" #include "unicode/uobject.h" #include "unicode/utext.h" @@ -21,6 +22,7 @@ class UnicodeSet; class UStack; class UVector32; class DictionaryMatcher; +class ExternalBreakEngine; /******************************************************************* * LanguageBreakEngine @@ -35,7 +37,7 @@ class DictionaryMatcher; *

LanguageBreakEngines should normally be implemented so as to * be shared between threads without locking.

*/ -class LanguageBreakEngine : public UMemory { +class LanguageBreakEngine : public UObject { public: /** @@ -54,10 +56,11 @@ class LanguageBreakEngine : public UMemory { * a particular kind of break.

* * @param c A character which begins a run that the engine might handle + * @param locale The locale. * @return true if this engine handles the particular character and break * type. */ - virtual UBool handles(UChar32 c) const = 0; + virtual UBool handles(UChar32 c, const char* locale) const = 0; /** *

Find any breaks within a run in the supplied text.

@@ -80,6 +83,35 @@ class LanguageBreakEngine : public UMemory { }; +/******************************************************************* + * BreakEngineWrapper + */ + +/** + *

BreakEngineWrapper implement LanguageBreakEngine by + * a thin wrapper that delegate the task to ExternalBreakEngine + *

+ */ +class BreakEngineWrapper : public LanguageBreakEngine { + public: + + BreakEngineWrapper(ExternalBreakEngine* engine, UErrorCode &status); + + virtual ~BreakEngineWrapper(); + + virtual UBool handles(UChar32 c, const char* locale) const override; + + virtual int32_t findBreaks( UText *text, + int32_t startPos, + int32_t endPos, + UVector32 &foundBreaks, + UBool isPhraseBreaking, + UErrorCode &status) const override; + + private: + LocalPointer delegate; +}; + /******************************************************************* * LanguageBreakFactory */ @@ -125,9 +157,10 @@ class LanguageBreakFactory : public UMemory { * * @param c A character that begins a run for which a LanguageBreakEngine is * sought. + * @param locale The locale. * @return A LanguageBreakEngine with the desired characteristics, or 0. */ - virtual const LanguageBreakEngine *getEngineFor(UChar32 c) = 0; + virtual const LanguageBreakEngine *getEngineFor(UChar32 c, const char* locale) = 0; }; @@ -174,10 +207,11 @@ class UnhandledEngine : public LanguageBreakEngine { * a particular kind of break.

* * @param c A character which begins a run that the engine might handle + * @param locale The locale. * @return true if this engine handles the particular character and break * type. */ - virtual UBool handles(UChar32 c) const override; + virtual UBool handles(UChar32 c, const char* locale) const override; /** *

Find any breaks within a run in the supplied text.

@@ -247,9 +281,18 @@ class ICULanguageBreakFactory : public LanguageBreakFactory { * * @param c A character that begins a run for which a LanguageBreakEngine is * sought. + * @param locale The locale. * @return A LanguageBreakEngine with the desired characteristics, or 0. */ - virtual const LanguageBreakEngine *getEngineFor(UChar32 c) override; + virtual const LanguageBreakEngine *getEngineFor(UChar32 c, const char* locale) override; + + /** + * Add and adopt the engine and return an URegistryKey. + * @param engine The ExternalBreakEngine to be added and adopt. The caller + * pass the ownership and should not release the memory after this. + * @param status the error code. + */ + virtual void addExternalEngine(ExternalBreakEngine* engine, UErrorCode& status); protected: /** @@ -258,9 +301,10 @@ class ICULanguageBreakFactory : public LanguageBreakFactory { * * @param c A character that begins a run for which a LanguageBreakEngine is * sought. + * @param locale The locale. * @return A LanguageBreakEngine with the desired characteristics, or 0. */ - virtual const LanguageBreakEngine *loadEngineFor(UChar32 c); + virtual const LanguageBreakEngine *loadEngineFor(UChar32 c, const char* locale); /** *

Create a DictionaryMatcher for the specified script and break type.

@@ -269,6 +313,9 @@ class ICULanguageBreakFactory : public LanguageBreakFactory { * @return A DictionaryMatcher with the desired characteristics, or nullptr. */ virtual DictionaryMatcher *loadDictionaryMatcherFor(UScriptCode script); + + private: + void ensureEngines(UErrorCode& status); }; U_NAMESPACE_END diff --git a/deps/icu-small/source/common/brkiter.cpp b/deps/icu-small/source/common/brkiter.cpp index 41e4e0dff57888..b452cf2c050083 100644 --- a/deps/icu-small/source/common/brkiter.cpp +++ b/deps/icu-small/source/common/brkiter.cpp @@ -27,6 +27,7 @@ #include "unicode/rbbi.h" #include "unicode/brkiter.h" #include "unicode/udata.h" +#include "unicode/uloc.h" #include "unicode/ures.h" #include "unicode/ustring.h" #include "unicode/filteredbrk.h" @@ -121,8 +122,11 @@ BreakIterator::buildInstance(const Locale& loc, const char *type, UErrorCode &st // If there is a result, set the valid locale and actual locale, and the kind if (U_SUCCESS(status) && result != nullptr) { U_LOCALE_BASED(locBased, *(BreakIterator*)result); + locBased.setLocaleIDs(ures_getLocaleByType(b, ULOC_VALID_LOCALE, &status), actualLocale.data()); + uprv_strncpy(result->requestLocale, loc.getName(), ULOC_FULLNAME_CAPACITY); + result->requestLocale[ULOC_FULLNAME_CAPACITY-1] = 0; // always terminate } ures_close(b); @@ -202,18 +206,20 @@ BreakIterator::getAvailableLocales(int32_t& count) BreakIterator::BreakIterator() { - *validLocale = *actualLocale = 0; + *validLocale = *actualLocale = *requestLocale = 0; } BreakIterator::BreakIterator(const BreakIterator &other) : UObject(other) { uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale)); uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale)); + uprv_strncpy(requestLocale, other.requestLocale, sizeof(requestLocale)); } BreakIterator &BreakIterator::operator =(const BreakIterator &other) { if (this != &other) { uprv_strncpy(actualLocale, other.actualLocale, sizeof(actualLocale)); uprv_strncpy(validLocale, other.validLocale, sizeof(validLocale)); + uprv_strncpy(requestLocale, other.requestLocale, sizeof(requestLocale)); } return *this; } @@ -493,12 +499,18 @@ BreakIterator::makeInstance(const Locale& loc, int32_t kind, UErrorCode& status) Locale BreakIterator::getLocale(ULocDataLocaleType type, UErrorCode& status) const { + if (type == ULOC_REQUESTED_LOCALE) { + return Locale(requestLocale); + } U_LOCALE_BASED(locBased, *this); return locBased.getLocale(type, status); } const char * BreakIterator::getLocaleID(ULocDataLocaleType type, UErrorCode& status) const { + if (type == ULOC_REQUESTED_LOCALE) { + return requestLocale; + } U_LOCALE_BASED(locBased, *this); return locBased.getLocaleID(type, status); } diff --git a/deps/icu-small/source/common/characterproperties.cpp b/deps/icu-small/source/common/characterproperties.cpp index 978e6761cee322..f1e15b488d533d 100644 --- a/deps/icu-small/source/common/characterproperties.cpp +++ b/deps/icu-small/source/common/characterproperties.cpp @@ -169,7 +169,7 @@ void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) { case UPROPS_SRC_INPC: case UPROPS_SRC_INSC: case UPROPS_SRC_VO: - uprops_addPropertyStarts((UPropertySource)src, &sa, &errorCode); + uprops_addPropertyStarts(src, &sa, &errorCode); break; case UPROPS_SRC_EMOJI: { const icu::EmojiProps *ep = icu::EmojiProps::getSingleton(errorCode); @@ -178,6 +178,14 @@ void U_CALLCONV initInclusion(UPropertySource src, UErrorCode &errorCode) { } break; } + case UPROPS_SRC_IDSU: + // New in Unicode 15.1 for just two characters. + sa.add(sa.set, 0x2FFE); + sa.add(sa.set, 0x2FFF + 1); + break; + case UPROPS_SRC_ID_COMPAT_MATH: + uprops_addPropertyStarts(src, &sa, &errorCode); + break; default: errorCode = U_INTERNAL_PROGRAM_ERROR; break; diff --git a/deps/icu-small/source/common/dictbe.cpp b/deps/icu-small/source/common/dictbe.cpp index 0e420c67c5d2ac..3d672c03bfb3ed 100644 --- a/deps/icu-small/source/common/dictbe.cpp +++ b/deps/icu-small/source/common/dictbe.cpp @@ -42,7 +42,7 @@ DictionaryBreakEngine::~DictionaryBreakEngine() { } UBool -DictionaryBreakEngine::handles(UChar32 c) const { +DictionaryBreakEngine::handles(UChar32 c, const char*) const { return fSet.contains(c); } @@ -54,13 +54,13 @@ DictionaryBreakEngine::findBreaks( UText *text, UBool isPhraseBreaking, UErrorCode& status) const { if (U_FAILURE(status)) return 0; - (void)startPos; // TODO: remove this param? int32_t result = 0; // Find the span of characters included in the set. // The span to break begins at the current position in the text, and // extends towards the start or end of the text, depending on 'reverse'. + utext_setNativeIndex(text, startPos); int32_t start = (int32_t)utext_getNativeIndex(text); int32_t current; int32_t rangeStart; diff --git a/deps/icu-small/source/common/dictbe.h b/deps/icu-small/source/common/dictbe.h index a2c761bdc3ac39..e512071fa45d8a 100644 --- a/deps/icu-small/source/common/dictbe.h +++ b/deps/icu-small/source/common/dictbe.h @@ -62,10 +62,11 @@ class DictionaryBreakEngine : public LanguageBreakEngine { * a particular kind of break.

* * @param c A character which begins a run that the engine might handle + * @param locale The locale. * @return true if this engine handles the particular character and break * type. */ - virtual UBool handles(UChar32 c) const override; + virtual UBool handles(UChar32 c, const char* locale) const override; /** *

Find any breaks within a run in the supplied text.

diff --git a/deps/icu-small/source/common/loadednormalizer2impl.cpp b/deps/icu-small/source/common/loadednormalizer2impl.cpp index 768564edc89095..99b8f3e86c6c32 100644 --- a/deps/icu-small/source/common/loadednormalizer2impl.cpp +++ b/deps/icu-small/source/common/loadednormalizer2impl.cpp @@ -143,6 +143,9 @@ static icu::UInitOnce nfkcInitOnce {}; static Norm2AllModes *nfkc_cfSingleton; static icu::UInitOnce nfkc_cfInitOnce {}; +static Norm2AllModes *nfkc_scfSingleton; +static icu::UInitOnce nfkc_scfInitOnce {}; + static UHashtable *cache=nullptr; // UInitOnce singleton initialization function @@ -156,6 +159,8 @@ static void U_CALLCONV initSingletons(const char *what, UErrorCode &errorCode) { nfkcSingleton = Norm2AllModes::createInstance(nullptr, "nfkc", errorCode); } else if (uprv_strcmp(what, "nfkc_cf") == 0) { nfkc_cfSingleton = Norm2AllModes::createInstance(nullptr, "nfkc_cf", errorCode); + } else if (uprv_strcmp(what, "nfkc_scf") == 0) { + nfkc_scfSingleton = Norm2AllModes::createInstance(nullptr, "nfkc_scf", errorCode); } else { UPRV_UNREACHABLE_EXIT; // Unknown singleton } @@ -183,6 +188,10 @@ static UBool U_CALLCONV uprv_loaded_normalizer2_cleanup() { nfkc_cfSingleton = nullptr; nfkc_cfInitOnce.reset(); + delete nfkc_scfSingleton; + nfkc_scfSingleton = nullptr; + nfkc_scfInitOnce.reset(); + uhash_close(cache); cache=nullptr; return true; @@ -213,6 +222,13 @@ Norm2AllModes::getNFKC_CFInstance(UErrorCode &errorCode) { return nfkc_cfSingleton; } +const Norm2AllModes * +Norm2AllModes::getNFKC_SCFInstance(UErrorCode &errorCode) { + if(U_FAILURE(errorCode)) { return nullptr; } + umtx_initOnce(nfkc_scfInitOnce, &initSingletons, "nfkc_scf", errorCode); + return nfkc_scfSingleton; +} + #if !NORM2_HARDCODE_NFC_DATA const Normalizer2 * Normalizer2::getNFCInstance(UErrorCode &errorCode) { @@ -261,6 +277,12 @@ Normalizer2::getNFKCCasefoldInstance(UErrorCode &errorCode) { return allModes!=nullptr ? &allModes->comp : nullptr; } +const Normalizer2 * +Normalizer2::getNFKCSimpleCasefoldInstance(UErrorCode &errorCode) { + const Norm2AllModes *allModes=Norm2AllModes::getNFKC_SCFInstance(errorCode); + return allModes!=nullptr ? &allModes->comp : nullptr; +} + const Normalizer2 * Normalizer2::getInstance(const char *packageName, const char *name, @@ -281,6 +303,8 @@ Normalizer2::getInstance(const char *packageName, allModes=Norm2AllModes::getNFKCInstance(errorCode); } else if(0==uprv_strcmp(name, "nfkc_cf")) { allModes=Norm2AllModes::getNFKC_CFInstance(errorCode); + } else if(0==uprv_strcmp(name, "nfkc_scf")) { + allModes=Norm2AllModes::getNFKC_SCFInstance(errorCode); } } if(allModes==nullptr && U_SUCCESS(errorCode)) { @@ -393,6 +417,11 @@ unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode) { return (const UNormalizer2 *)Normalizer2::getNFKCCasefoldInstance(*pErrorCode); } +U_CAPI const UNormalizer2 * U_EXPORT2 +unorm2_getNFKCSimpleCasefoldInstance(UErrorCode *pErrorCode) { + return (const UNormalizer2 *)Normalizer2::getNFKCSimpleCasefoldInstance(*pErrorCode); +} + U_CAPI const UNormalizer2 * U_EXPORT2 unorm2_getInstance(const char *packageName, const char *name, diff --git a/deps/icu-small/source/common/localefallback_data.h b/deps/icu-small/source/common/localefallback_data.h index d2eb7eaafde4ba..c847edefff5828 100644 --- a/deps/icu-small/source/common/localefallback_data.h +++ b/deps/icu-small/source/common/localefallback_data.h @@ -18,94 +18,93 @@ const char scriptCodeChars[] = "Kana\0Kawi\0Khar\0Khmr\0Kits\0Knda\0Kore\0Lana\0Laoo\0Lepc\0Lina\0" "Linb\0Lisu\0Lyci\0Lydi\0Mand\0Mani\0Marc\0Medf\0Merc\0Mlym\0Modi\0" "Mong\0Mroo\0Mtei\0Mymr\0Narb\0Newa\0Nkoo\0Nshu\0Ogam\0Olck\0Orkh\0" - "Orya\0Osge\0Ougr\0Pauc\0Phli\0Phnx\0Plrd\0Prti\0Rjng\0Rohg\0Runr\0" - "Samr\0Sarb\0Saur\0Sgnw\0Sinh\0Sogd\0Sora\0Soyo\0Syrc\0Tagb\0Takr\0" - "Tale\0Talu\0Taml\0Tang\0Tavt\0Telu\0Tfng\0Thaa\0Thai\0Tibt\0Tnsa\0" - "Toto\0Ugar\0Vaii\0Wcho\0Xpeo\0Xsux\0Yiii\0"; + "Orya\0Osge\0Pauc\0Phli\0Phnx\0Plrd\0Prti\0Rjng\0Rohg\0Runr\0Samr\0" + "Sarb\0Saur\0Sgnw\0Sinh\0Sogd\0Sora\0Soyo\0Syrc\0Tagb\0Takr\0Tale\0" + "Talu\0Taml\0Tang\0Tavt\0Telu\0Tfng\0Thaa\0Thai\0Tibt\0Tnsa\0Toto\0" + "Ugar\0Vaii\0Wcho\0Xpeo\0Xsux\0Yiii\0"; const char dsLocaleIDChars[] = - "aaf\0aao\0aat\0ab\0abh\0abl\0abq\0abv\0acm\0acq\0acw\0acx\0adf\0" - "adp\0adx\0ady\0ae\0aeb\0aec\0aee\0aeq\0afb\0agi\0agj\0agx\0ahg\0" - "aho\0ahr\0aib\0aij\0ain\0aio\0aiq\0ajp\0ajt\0akk\0akv\0alk\0all\0" - "alr\0alt\0alw\0am\0ams\0amw\0ani\0anp\0anr\0anu\0aot\0apc\0apd\0" - "aph\0aqc\0ar\0arc\0arq\0ars\0ary\0arz\0as\0ase\0ask\0atn\0atv\0" - "auj\0auz\0av\0avd\0avl\0awa\0awn\0axm\0ayh\0ayl\0ayn\0ayp\0az_IQ\0" - "az_IR\0az_RU\0azb\0ba\0bal\0bap\0bax\0bbl\0bcq\0bdv\0bdz\0be\0" - "bee\0bej\0bfb\0bfq\0bft\0bfu\0bfw\0bfy\0bfz\0bg\0bgc\0bgd\0bgn\0" - "bgp\0bgq\0bgw\0bgx\0bha\0bhb\0bhd\0bhe\0bhh\0bhi\0bhj\0bhm\0bhn\0" - "bho\0bht\0bhu\0biy\0bjf\0bji\0bjj\0bjm\0blk\0blt\0bmj\0bn\0bns\0" - "bo\0bph\0bpx\0bpy\0bqi\0bra\0brb\0brd\0brh\0brk\0brv\0brx\0bsh\0" - "bsk\0bsq\0bst\0btd\0btm\0btv\0bua\0bwe\0bxm\0bxu\0byh\0byn\0byw\0" - "bzi\0cbn\0ccp\0cde\0cdh\0cdi\0cdj\0cdm\0cdo\0cdz\0ce\0cgk\0chg\0" - "chm\0chr\0chx\0cih\0cja\0cji\0cjm\0cjy\0ckb\0ckt\0clh\0clw\0cmg\0" - "cna\0cnp\0cog\0cop\0cpg\0cr\0crh\0crj\0crk\0crl\0crm\0csh\0csp\0" - "csw\0ctd\0ctg\0ctn\0ctt\0cu\0cuu\0cv\0czh\0czk\0daq\0dar\0dcc\0" - "ddo\0def\0deh\0der\0dgl\0dhi\0dhn\0dho\0dhw\0dka\0dlg\0dmf\0dmk\0" - "dml\0dng\0dnu\0dnv\0doi\0dox\0dre\0drh\0drq\0drs\0dry\0dso\0dty\0" - "dub\0duh\0dus\0dv\0dwk\0dwz\0dz\0dzl\0ecr\0ecy\0egy\0eky\0el\0" - "emg\0emu\0enf\0enh\0era\0esg\0esh\0ett\0eve\0evn\0fa\0fay\0faz\0" - "fia\0fmu\0fub\0gan\0gaq\0gas\0gau\0gbj\0gbk\0gbl\0gbm\0gbz\0gdb\0" - "gdo\0gdx\0gez\0ggg\0ggn\0gha\0ghe\0ghr\0ght\0gig\0gin\0gjk\0gju\0" - "gld\0glh\0glk\0gmv\0gmy\0goe\0gof\0gok\0gom\0gon\0got\0gra\0grc\0" - "grt\0gru\0gu\0gvr\0gwc\0gwf\0gwt\0gyo\0gzi\0ha_CM\0ha_SD\0hac\0" - "hak\0har\0haz\0hbo\0hdy\0he\0hi\0hii\0hit\0hkh\0hlb\0hlu\0hmd\0" - "hmj\0hmq\0hnd\0hne\0hnj\0hnj_AU\0hnj_CN\0hnj_FR\0hnj_GF\0hnj_LA\0" - "hnj_MM\0hnj_SR\0hnj_TH\0hnj_US\0hnj_VN\0hno\0hoc\0hoh\0hoj\0how\0" - "hoy\0hpo\0hrt\0hrz\0hsn\0hss\0htx\0hut\0huy\0huz\0hy\0hyw\0ii\0" - "imy\0inh\0int\0ior\0iru\0isk\0itk\0itl\0iu\0iw\0ja\0jad\0jat\0" - "jbe\0jbn\0jct\0jda\0jdg\0jdt\0jee\0jge\0ji\0jje\0jkm\0jml\0jna\0" - "jnd\0jnl\0jns\0jog\0jpa\0jpr\0jul\0jun\0juy\0jya\0jye\0ka\0kaa\0" - "kap\0kaw\0kbd\0kbu\0kby\0kca\0kdq\0kdt\0ket\0kex\0key\0kfa\0kfb\0" - "kfc\0kfd\0kfe\0kfh\0kfi\0kfk\0kfm\0kfp\0kfq\0kfr\0kfs\0kfx\0kfy\0" - "kgj\0kgy\0khb\0khf\0khg\0khn\0kht\0khv\0khw\0kif\0kim\0kip\0kjg\0" - "kjh\0kjl\0kjo\0kjp\0kjt\0kk\0kk_AF\0kk_CN\0kk_IR\0kk_MN\0kkf\0" - "kkh\0kkt\0kle\0klj\0klr\0km\0kmj\0kmz\0kn\0ko\0koi\0kok\0kpt\0" - "kpy\0kqd\0kqy\0kra\0krc\0krk\0krr\0kru\0krv\0ks\0ksu\0ksw\0ksz\0" - "ktb\0ktl\0ktp\0ku_LB\0kuf\0kum\0kv\0kva\0kvq\0kvt\0kvx\0kvy\0" - "kxc\0kxf\0kxk\0kxl\0kxm\0kxp\0kxv\0ky\0ky_CN\0kyu\0kyv\0kyw\0" - "kzh\0lab\0lad\0lae\0lah\0lbc\0lbe\0lbf\0lbj\0lbm\0lbo\0lbr\0lcp\0" - "lep\0lez\0lhm\0lhs\0lif\0lis\0lkh\0lki\0lmh\0lmn\0lo\0loy\0lpo\0" - "lrc\0lrk\0lrl\0lsa\0lsd\0lss\0luk\0luu\0luv\0luz\0lwl\0lwm\0lya\0" - "lzh\0mag\0mai\0man_GN\0mby\0mde\0mdf\0mdx\0mdy\0mfa\0mfi\0mgp\0" - "mhj\0mid\0mjl\0mjq\0mjr\0mjt\0mju\0mjv\0mjz\0mk\0mkb\0mke\0mki\0" - "mkm\0ml\0mlf\0mn\0mn_CN\0mni\0mnj\0mns\0mnw\0mpz\0mr\0mra\0mrd\0" - "mrj\0mro\0mrr\0ms_CC\0mtm\0mtr\0mud\0muk\0mut\0muv\0muz\0mvf\0" - "mvy\0mvz\0mwr\0mwt\0mww\0my\0mym\0myv\0myz\0mzn\0nan\0nao\0ncd\0" - "ncq\0ndf\0ne\0neg\0neh\0nei\0new\0ngt\0nio\0nit\0niv\0nli\0nlm\0" - "nlx\0nmm\0nnp\0nod\0noe\0nog\0noi\0non\0nos\0npb\0nqo\0nsd\0nsf\0" - "nsk\0nst\0nsv\0nty\0ntz\0nwc\0nwx\0nyl\0nyq\0oaa\0oac\0oar\0oav\0" - "obm\0obr\0odk\0oht\0oj\0ojs\0okm\0oko\0okz\0ola\0ole\0omk\0omp\0" - "omr\0oon\0or\0ort\0oru\0orv\0os\0osa\0osc\0osi\0ota\0otb\0otk\0" - "oty\0oui\0pa\0pa_PK\0pal\0paq\0pbt\0pcb\0pce\0pcf\0pcg\0pch\0" - "pci\0pcj\0peg\0peo\0pgd\0pgg\0pgl\0pgn\0phd\0phk\0phl\0phn\0pho\0" - "phr\0pht\0phv\0phw\0pi\0pka\0pkr\0plk\0pll\0pmh\0pnt\0ppa\0pra\0" + "aaf\0aao\0aat\0ab\0abh\0abl\0abv\0acm\0acq\0acw\0acx\0adf\0adx\0" + "ady\0ae\0aeb\0aec\0aee\0aeq\0afb\0agi\0agj\0agx\0ahg\0aho\0ahr\0" + "aib\0aij\0ain\0aio\0aiq\0ajp\0akk\0akv\0alk\0all\0alr\0alt\0alw\0" + "am\0ams\0amw\0ani\0anp\0anr\0anu\0aot\0apc\0apd\0aph\0aqc\0ar\0" + "arc\0arq\0ars\0ary\0arz\0as\0ase\0ask\0atn\0atv\0auj\0auz\0av\0" + "avd\0avl\0awa\0awn\0axm\0ayh\0ayl\0ayn\0ayp\0az_IQ\0az_IR\0az_RU\0" + "azb\0ba\0bal\0bap\0bax\0bbl\0bcq\0bdv\0bdz\0be\0bee\0bej\0bfb\0" + "bfq\0bft\0bfu\0bfw\0bfy\0bfz\0bg\0bgc\0bgd\0bgn\0bgp\0bgq\0bgw\0" + "bgx\0bha\0bhb\0bhd\0bhe\0bhh\0bhi\0bhj\0bhm\0bhn\0bho\0bht\0bhu\0" + "biy\0bjf\0bjj\0bjm\0blk\0blt\0bmj\0bn\0bns\0bo\0bph\0bpx\0bpy\0" + "bqi\0bra\0brb\0brd\0brh\0brk\0brv\0brx\0bsh\0bsk\0bsq\0bst\0btd\0" + "btm\0btv\0bua\0bwe\0bxm\0bxu\0byh\0byn\0byw\0bzi\0cbn\0ccp\0cde\0" + "cdh\0cdi\0cdj\0cdm\0cdo\0cdz\0ce\0cgk\0chg\0chm\0chr\0chx\0cih\0" + "cja\0cji\0cjm\0cjy\0ckb\0ckt\0clh\0clw\0cmg\0cna\0cnp\0cog\0cop\0" + "cpg\0cr\0crh\0crj\0crk\0crl\0crm\0csh\0csp\0csw\0ctd\0ctg\0ctn\0" + "ctt\0cu\0cuu\0cv\0czh\0czk\0daq\0dar\0dcc\0ddo\0def\0deh\0der\0" + "dhi\0dhn\0dho\0dhw\0dka\0dlg\0dmf\0dmk\0dml\0dng\0dnu\0dnv\0doi\0" + "dox\0dre\0drq\0drs\0dry\0dso\0dty\0dub\0duh\0dus\0dv\0dwk\0dwz\0" + "dz\0dzl\0ecr\0ecy\0egy\0eky\0el\0emg\0emu\0enf\0enh\0era\0esg\0" + "esh\0ett\0eve\0evn\0fa\0fay\0faz\0fia\0fmu\0fub\0gan\0gaq\0gas\0" + "gau\0gbj\0gbk\0gbl\0gbm\0gbz\0gdb\0gdo\0gdx\0gez\0ggg\0gha\0ghe\0" + "ghr\0ght\0gig\0gin\0gjk\0gju\0gld\0glh\0glk\0gmv\0gmy\0goe\0gof\0" + "gok\0gom\0gon\0got\0gra\0grc\0grt\0gru\0gu\0gvr\0gwc\0gwf\0gwt\0" + "gyo\0gzi\0ha_CM\0ha_SD\0hac\0hak\0har\0haz\0hbo\0hdy\0he\0hi\0" + "hii\0hit\0hkh\0hlb\0hlu\0hmd\0hmj\0hmq\0hnd\0hne\0hnj\0hnj_AU\0" + "hnj_CN\0hnj_FR\0hnj_GF\0hnj_LA\0hnj_MM\0hnj_SR\0hnj_TH\0hnj_VN\0" + "hno\0hoc\0hoh\0hoj\0how\0hoy\0hpo\0hrt\0hrz\0hsn\0hss\0htx\0hut\0" + "huy\0huz\0hy\0hyw\0ii\0imy\0inh\0int\0ior\0iru\0isk\0itk\0itl\0" + "iu\0iw\0ja\0jad\0jat\0jbe\0jbn\0jct\0jda\0jdg\0jdt\0jee\0jge\0" + "ji\0jje\0jkm\0jml\0jna\0jnd\0jnl\0jns\0jog\0jpa\0jpr\0jrb\0jrb_MA\0" + "jul\0jun\0juy\0jya\0jye\0ka\0kaa\0kap\0kaw\0kbd\0kbu\0kby\0kca\0" + "kdq\0kdt\0ket\0kex\0key\0kfa\0kfb\0kfc\0kfd\0kfe\0kfh\0kfi\0kfk\0" + "kfm\0kfp\0kfq\0kfr\0kfs\0kfx\0kfy\0kgj\0kgy\0khb\0khf\0khg\0khn\0" + "kht\0khv\0khw\0kif\0kim\0kip\0kjg\0kjh\0kjl\0kjo\0kjp\0kjt\0kk\0" + "kk_AF\0kk_CN\0kk_IR\0kk_MN\0kkf\0kkh\0kkt\0kle\0klj\0klr\0km\0" + "kmj\0kmz\0kn\0ko\0koi\0kok\0kpt\0kpy\0kqd\0kqy\0kra\0krc\0krk\0" + "krr\0kru\0krv\0ks\0ksu\0ksw\0ksz\0ktb\0ktl\0ktp\0ku_LB\0kuf\0" + "kum\0kv\0kva\0kvq\0kvt\0kvx\0kvy\0kxf\0kxk\0kxm\0kxp\0ky\0ky_CN\0" + "kyu\0kyv\0kyw\0lab\0lad\0lae\0lah\0lbc\0lbe\0lbf\0lbj\0lbm\0lbo\0" + "lbr\0lcp\0lep\0lez\0lhm\0lhs\0lif\0lis\0lkh\0lki\0lmh\0lmn\0lo\0" + "loy\0lpo\0lrc\0lrk\0lrl\0lsa\0lsd\0lss\0luk\0luu\0luv\0luz\0lwl\0" + "lwm\0lya\0lzh\0mag\0mai\0man_GN\0mby\0mde\0mdf\0mdx\0mdy\0mfa\0" + "mfi\0mgp\0mhj\0mid\0mjl\0mjq\0mjr\0mjt\0mju\0mjv\0mjz\0mk\0mkb\0" + "mke\0mki\0mkm\0ml\0mlf\0mn\0mn_CN\0mni\0mnj\0mns\0mnw\0mpz\0mr\0" + "mra\0mrd\0mrj\0mro\0mrr\0ms_CC\0mtm\0mtr\0mud\0muk\0mut\0muv\0" + "muz\0mvf\0mvy\0mvz\0mwr\0mwt\0mww\0my\0mym\0myv\0myz\0mzn\0nan\0" + "nao\0ncd\0ncq\0ndf\0ne\0neg\0neh\0nei\0new\0ngt\0nio\0nit\0niv\0" + "nli\0nlm\0nlx\0nmm\0nnp\0nod\0noe\0nog\0noi\0non\0nos\0npb\0nqo\0" + "nsd\0nsf\0nsk\0nst\0nsv\0nty\0ntz\0nwc\0nwx\0nyl\0nyq\0oaa\0oac\0" + "oar\0oav\0obm\0obr\0odk\0oht\0oj\0ojs\0okm\0oko\0okz\0ola\0ole\0" + "omk\0omp\0omr\0oon\0or\0ort\0oru\0orv\0os\0osa\0osc\0osi\0ota\0" + "otb\0otk\0oty\0pa\0pa_PK\0pal\0paq\0pbt\0pcb\0pce\0pcf\0pcg\0" + "pch\0pci\0pcj\0peg\0peo\0pgd\0pgg\0pgl\0pgn\0phd\0phk\0phl\0phn\0" + "pho\0phr\0pht\0phv\0phw\0pi\0pka\0pkr\0plk\0pll\0pmh\0pnt\0pra\0" "prc\0prd\0prp\0prt\0prx\0ps\0psh\0psi\0pst\0pum\0pwo\0pwr\0pww\0" "pyx\0qxq\0raa\0rab\0raf\0rah\0raj\0rav\0rbb\0rdb\0rei\0rhg\0rji\0" - "rjs\0rka\0rki\0rkt\0rmi\0rmt\0rmz\0rsk\0rtw\0ru\0rue\0rut\0rwr\0" - "ryu\0sa\0sah\0sam\0sat\0saz\0sbn\0sbu\0sck\0scl\0scp\0sct\0scu\0" - "scx\0sd\0sd_IN\0sdb\0sdf\0sdg\0sdh\0sds\0sel\0sfm\0sga\0sgh\0" - "sgj\0sgr\0sgt\0sgw\0sgy\0shd\0shi\0shm\0shn\0shu\0shv\0si\0sia\0" - "sip\0siy\0siz\0sjd\0sjp\0sjt\0skb\0skj\0skr\0slq\0smh\0smp\0smu\0" - "smy\0soa\0sog\0soi\0sou\0spt\0spv\0sqo\0sqq\0sqt\0sr\0srb\0srh\0" - "srx\0srz\0ssh\0sss\0sts\0stv\0sty\0suz\0sva\0swb\0swi\0swv\0syc\0" - "syl\0syn\0syr\0syw\0ta\0tab\0taj\0tbk\0tcn\0tco\0tcx\0tcy\0tda\0" - "tdb\0tdd\0tdg\0tdh\0te\0tes\0tg\0tg_PK\0tge\0tgf\0th\0the\0thf\0" - "thi\0thl\0thm\0thq\0thr\0ths\0ti\0tig\0tij\0tin\0tjl\0tjo\0tkb\0" - "tks\0tkt\0tmk\0tmr\0tnv\0tov\0tpu\0tra\0trg\0trm\0trw\0tsd\0tsf\0" - "tsj\0tt\0tth\0tto\0tts\0tvn\0twm\0txg\0txo\0tyr\0tyv\0ude\0udg\0" - "udi\0udm\0ug\0ug_KZ\0ug_MN\0uga\0ugh\0ugo\0uk\0uki\0ulc\0unr\0" - "unr_NP\0unx\0ur\0urk\0ush\0uum\0uz_AF\0uz_CN\0uzs\0vaa\0vaf\0" - "vah\0vai\0vas\0vav\0vay\0vgr\0vmd\0vmh\0wal\0wbk\0wbq\0wbr\0wlo\0" - "wme\0wne\0wni\0wsg\0wsv\0wtm\0wuu\0xal\0xan\0xas\0xco\0xcr\0xdq\0" - "xhe\0xhm\0xis\0xka\0xkc\0xkj\0xkp\0xlc\0xld\0xly\0xmf\0xmn\0xmr\0" - "xna\0xnr\0xpg\0xpi\0xpm\0xpr\0xrm\0xrn\0xsa\0xsr\0xss\0xub\0xuj\0" - "xve\0xvi\0xwo\0xzh\0yai\0ybh\0ybi\0ydg\0yea\0yej\0yeu\0ygp\0yhd\0" - "yi\0yig\0yih\0yiv\0ykg\0yna\0ynk\0yoi\0yoy\0yrk\0ysd\0ysn\0ysp\0" - "ysr\0ysy\0yud\0yue\0yue_CN\0yug\0yux\0ywq\0ywu\0zau\0zba\0zch\0" - "zdj\0zeh\0zen\0zgb\0zgh\0zgm\0zgn\0zh\0zh_AU\0zh_BN\0zh_GB\0zh_GF\0" - "zh_HK\0zh_ID\0zh_MO\0zh_PA\0zh_PF\0zh_PH\0zh_SR\0zh_TH\0zh_TW\0" - "zh_US\0zh_VN\0zhd\0zhx\0zkb\0zko\0zkt\0zkz\0zlj\0zln\0zlq\0zqe\0" - "zrp\0zum\0zyg\0zyn\0zzj\0"; + "rjs\0rka\0rki\0rkt\0rmi\0rmt\0rmz\0rom_BG\0rsk\0rtw\0ru\0rue\0" + "rut\0rwr\0ryu\0sa\0sah\0sam\0sat\0saz\0sbn\0sbu\0sck\0scl\0scl_IN\0" + "scp\0sct\0scu\0scx\0sd\0sd_IN\0sdb\0sdf\0sdg\0sdh\0sds\0sel\0" + "sfm\0sga\0sgh\0sgj\0sgr\0sgt\0sgw\0sgy\0shd\0shi\0shm\0shn\0shu\0" + "shv\0si\0sia\0sip\0siy\0siz\0sjd\0sjp\0sjt\0skb\0skj\0skr\0slq\0" + "smh\0smp\0smu\0smy\0soa\0sog\0soi\0sou\0spt\0spv\0sqo\0sqq\0sqt\0" + "sr\0srb\0srh\0srx\0srz\0ssh\0sss\0sts\0stv\0sty\0suz\0sva\0swb\0" + "swi\0swv\0syc\0syl\0syn\0syr\0syw\0ta\0tab\0taj\0tbk\0tcn\0tco\0" + "tcx\0tcy\0tda\0tdb\0tdd\0tdg\0tdh\0te\0tes\0tg\0tg_PK\0tge\0tgf\0" + "th\0the\0thf\0thi\0thl\0thm\0thq\0thr\0ths\0ti\0tig\0tij\0tin\0" + "tjl\0tjo\0tkb\0tks\0tkt\0tmk\0tmr\0tnv\0tov\0tpu\0tra\0trg\0trm\0" + "trw\0tsd\0tsj\0tt\0tth\0tto\0tts\0tvn\0twm\0txg\0txo\0tyr\0tyv\0" + "ude\0udg\0udi\0udm\0ug\0ug_KZ\0ug_MN\0uga\0ugh\0ugo\0uk\0uki\0" + "ulc\0unr\0unr_NP\0unx\0ur\0urk\0ush\0uum\0uz_AF\0uz_CN\0uzs\0" + "vaa\0vaf\0vah\0vai\0vas\0vav\0vay\0vgr\0vmd\0vmh\0wal\0wbk\0wbq\0" + "wbr\0wlo\0wme\0wne\0wni\0wsg\0wsv\0wtm\0wuu\0xal\0xan\0xas\0xco\0" + "xcr\0xdq\0xhe\0xhm\0xis\0xka\0xkc\0xkj\0xkp\0xlc\0xld\0xly\0xmf\0" + "xmn\0xmr\0xna\0xnr\0xpg\0xpi\0xpm\0xpr\0xrm\0xrn\0xsa\0xsr\0xss\0" + "xub\0xuj\0xve\0xvi\0xwo\0xzh\0yai\0ybh\0ybi\0ydg\0yea\0yej\0yeu\0" + "ygp\0yhd\0yi\0yig\0yih\0yiv\0ykg\0yna\0ynk\0yoi\0yoy\0yrk\0ysd\0" + "ysn\0ysp\0ysr\0ysy\0yud\0yue\0yue_CN\0yug\0yux\0ywq\0ywu\0zau\0" + "zba\0zch\0zdj\0zeh\0zen\0zgb\0zgh\0zgm\0zgn\0zh\0zh_AU\0zh_BN\0" + "zh_GB\0zh_GF\0zh_HK\0zh_ID\0zh_MO\0zh_PA\0zh_PF\0zh_PH\0zh_SR\0" + "zh_TH\0zh_TW\0zh_US\0zh_VN\0zhd\0zhx\0zkb\0zko\0zkt\0zkz\0zlj\0" + "zln\0zlq\0zqe\0zrp\0zum\0zyg\0zyn\0zzj\0"; const int32_t defaultScriptTable[] = { 0, 320, // aaf -> Mlym @@ -113,1033 +112,1022 @@ const int32_t defaultScriptTable[] = { 8, 150, // aat -> Grek 12, 100, // ab -> Cyrl 15, 10, // abh -> Arab - 19, 425, // abl -> Rjng - 23, 100, // abq -> Cyrl - 27, 10, // abv -> Arab - 31, 10, // acm -> Arab - 35, 10, // acq -> Arab - 39, 10, // acw -> Arab - 43, 10, // acx -> Arab - 47, 10, // adf -> Arab - 51, 540, // adp -> Tibt - 55, 540, // adx -> Tibt - 59, 100, // ady -> Cyrl - 63, 25, // ae -> Avst - 66, 10, // aeb -> Arab - 70, 10, // aec -> Arab - 74, 10, // aee -> Arab - 78, 10, // aeq -> Arab - 82, 10, // afb -> Arab - 86, 105, // agi -> Deva - 90, 120, // agj -> Ethi - 94, 100, // agx -> Cyrl - 98, 120, // ahg -> Ethi - 102, 5, // aho -> Ahom - 106, 105, // ahr -> Deva - 110, 10, // aib -> Arab - 114, 185, // aij -> Hebr - 118, 220, // ain -> Kana - 122, 345, // aio -> Mymr - 126, 10, // aiq -> Arab - 130, 10, // ajp -> Arab - 134, 10, // ajt -> Arab - 138, 575, // akk -> Xsux - 142, 100, // akv -> Cyrl - 146, 260, // alk -> Laoo - 150, 320, // all -> Mlym - 154, 100, // alr -> Cyrl - 158, 100, // alt -> Cyrl - 162, 120, // alw -> Ethi - 166, 120, // am -> Ethi - 169, 210, // ams -> Jpan - 173, 480, // amw -> Syrc - 177, 100, // ani -> Cyrl - 181, 105, // anp -> Deva - 185, 105, // anr -> Deva - 189, 120, // anu -> Ethi - 193, 45, // aot -> Beng - 197, 10, // apc -> Arab - 201, 10, // apd -> Arab - 205, 105, // aph -> Deva - 209, 100, // aqc -> Cyrl - 213, 10, // ar -> Arab - 216, 15, // arc -> Armi - 220, 10, // arq -> Arab - 224, 10, // ars -> Arab - 228, 10, // ary -> Arab - 232, 10, // arz -> Arab - 236, 45, // as -> Beng - 239, 455, // ase -> Sgnw - 243, 10, // ask -> Arab - 247, 10, // atn -> Arab - 251, 100, // atv -> Cyrl - 255, 10, // auj -> Arab - 259, 10, // auz -> Arab - 263, 100, // av -> Cyrl - 266, 10, // avd -> Arab - 270, 10, // avl -> Arab - 274, 105, // awa -> Deva - 278, 120, // awn -> Ethi - 282, 20, // axm -> Armn - 286, 10, // ayh -> Arab - 290, 10, // ayl -> Arab - 294, 10, // ayn -> Arab - 298, 10, // ayp -> Arab - 302, 10, // az_IQ -> Arab - 308, 10, // az_IR -> Arab - 314, 100, // az_RU -> Cyrl - 320, 10, // azb -> Arab - 324, 100, // ba -> Cyrl - 327, 10, // bal -> Arab - 331, 105, // bap -> Deva - 335, 30, // bax -> Bamu - 339, 125, // bbl -> Geor - 343, 120, // bcq -> Ethi - 347, 385, // bdv -> Orya - 351, 10, // bdz -> Arab - 355, 100, // be -> Cyrl - 358, 105, // bee -> Deva - 362, 10, // bej -> Arab - 366, 105, // bfb -> Deva - 370, 505, // bfq -> Taml - 374, 10, // bft -> Arab - 378, 540, // bfu -> Tibt - 382, 385, // bfw -> Orya - 386, 105, // bfy -> Deva - 390, 105, // bfz -> Deva - 394, 100, // bg -> Cyrl - 397, 105, // bgc -> Deva - 401, 105, // bgd -> Deva - 405, 10, // bgn -> Arab - 409, 10, // bgp -> Arab - 413, 105, // bgq -> Deva - 417, 105, // bgw -> Deva - 421, 150, // bgx -> Grek - 425, 105, // bha -> Deva - 429, 105, // bhb -> Deva - 433, 105, // bhd -> Deva - 437, 10, // bhe -> Arab - 441, 100, // bhh -> Cyrl - 445, 105, // bhi -> Deva - 449, 105, // bhj -> Deva - 453, 10, // bhm -> Arab - 457, 480, // bhn -> Syrc - 461, 105, // bho -> Deva - 465, 490, // bht -> Takr - 469, 105, // bhu -> Deva - 473, 105, // biy -> Deva - 477, 480, // bjf -> Syrc - 481, 120, // bji -> Ethi - 485, 105, // bjj -> Deva - 489, 10, // bjm -> Arab - 493, 345, // blk -> Mymr - 497, 515, // blt -> Tavt - 501, 105, // bmj -> Deva - 505, 45, // bn -> Beng - 508, 105, // bns -> Deva - 512, 540, // bo -> Tibt - 515, 100, // bph -> Cyrl - 519, 105, // bpx -> Deva - 523, 45, // bpy -> Beng - 527, 10, // bqi -> Arab - 531, 105, // bra -> Deva - 535, 235, // brb -> Khmr - 539, 105, // brd -> Deva - 543, 10, // brh -> Arab - 547, 10, // brk -> Arab - 551, 260, // brv -> Laoo - 555, 105, // brx -> Deva - 559, 10, // bsh -> Arab - 563, 10, // bsk -> Arab - 567, 35, // bsq -> Bass - 571, 120, // bst -> Ethi - 575, 40, // btd -> Batk - 579, 40, // btm -> Batk - 583, 105, // btv -> Deva - 587, 100, // bua -> Cyrl - 591, 345, // bwe -> Mymr - 595, 100, // bxm -> Cyrl - 599, 330, // bxu -> Mong - 603, 105, // byh -> Deva - 607, 120, // byn -> Ethi - 611, 105, // byw -> Deva - 615, 535, // bzi -> Thai - 619, 535, // cbn -> Thai - 623, 60, // ccp -> Cakm - 627, 520, // cde -> Telu - 631, 105, // cdh -> Deva - 635, 155, // cdi -> Gujr - 639, 105, // cdj -> Deva - 643, 105, // cdm -> Deva - 647, 175, // cdo -> Hans - 651, 45, // cdz -> Beng - 655, 100, // ce -> Cyrl - 658, 540, // cgk -> Tibt - 662, 10, // chg -> Arab - 666, 100, // chm -> Cyrl - 670, 80, // chr -> Cher - 674, 105, // chx -> Deva - 678, 105, // cih -> Deva - 682, 10, // cja -> Arab - 686, 100, // cji -> Cyrl - 690, 75, // cjm -> Cham - 694, 175, // cjy -> Hans - 698, 10, // ckb -> Arab - 702, 100, // ckt -> Cyrl - 706, 10, // clh -> Arab - 710, 100, // clw -> Cyrl - 714, 475, // cmg -> Soyo - 718, 540, // cna -> Tibt - 722, 175, // cnp -> Hans - 726, 535, // cog -> Thai - 730, 90, // cop -> Copt - 734, 150, // cpg -> Grek - 738, 65, // cr -> Cans - 741, 100, // crh -> Cyrl - 745, 65, // crj -> Cans - 749, 65, // crk -> Cans - 753, 65, // crl -> Cans - 757, 65, // crm -> Cans - 761, 345, // csh -> Mymr - 765, 175, // csp -> Hans - 769, 65, // csw -> Cans - 773, 400, // ctd -> Pauc - 777, 45, // ctg -> Beng - 781, 105, // ctn -> Deva - 785, 505, // ctt -> Taml - 789, 100, // cu -> Cyrl - 792, 255, // cuu -> Lana - 796, 100, // cv -> Cyrl - 799, 175, // czh -> Hans - 803, 185, // czk -> Hebr - 807, 105, // daq -> Deva - 811, 100, // dar -> Cyrl - 815, 10, // dcc -> Arab - 819, 100, // ddo -> Cyrl - 823, 10, // def -> Arab - 827, 10, // deh -> Arab - 831, 45, // der -> Beng - 835, 10, // dgl -> Arab - 839, 105, // dhi -> Deva - 843, 155, // dhn -> Gujr - 847, 105, // dho -> Deva - 851, 105, // dhw -> Deva - 855, 540, // dka -> Tibt - 859, 100, // dlg -> Cyrl - 863, 310, // dmf -> Medf - 867, 10, // dmk -> Arab - 871, 10, // dml -> Arab - 875, 100, // dng -> Cyrl - 879, 345, // dnu -> Mymr - 883, 345, // dnv -> Mymr - 887, 105, // doi -> Deva - 891, 120, // dox -> Ethi - 895, 540, // dre -> Tibt - 899, 330, // drh -> Mong - 903, 105, // drq -> Deva - 907, 120, // drs -> Ethi - 911, 105, // dry -> Deva - 915, 385, // dso -> Orya - 919, 105, // dty -> Deva - 923, 155, // dub -> Gujr - 927, 105, // duh -> Deva - 931, 105, // dus -> Deva - 935, 530, // dv -> Thaa - 938, 385, // dwk -> Orya - 942, 105, // dwz -> Deva - 946, 540, // dz -> Tibt - 949, 540, // dzl -> Tibt - 953, 150, // ecr -> Grek - 957, 95, // ecy -> Cprt - 961, 110, // egy -> Egyp - 965, 215, // eky -> Kali - 969, 150, // el -> Grek - 972, 105, // emg -> Deva - 976, 105, // emu -> Deva - 980, 100, // enf -> Cyrl - 984, 100, // enh -> Cyrl - 988, 505, // era -> Taml - 992, 135, // esg -> Gonm - 996, 10, // esh -> Arab - 1000, 200, // ett -> Ital - 1004, 100, // eve -> Cyrl - 1008, 100, // evn -> Cyrl - 1012, 10, // fa -> Arab - 1015, 10, // fay -> Arab - 1019, 10, // faz -> Arab - 1023, 10, // fia -> Arab - 1027, 105, // fmu -> Deva - 1031, 10, // fub -> Arab - 1035, 175, // gan -> Hans - 1039, 385, // gaq -> Orya - 1043, 155, // gas -> Gujr - 1047, 520, // gau -> Telu - 1051, 385, // gbj -> Orya - 1055, 105, // gbk -> Deva - 1059, 155, // gbl -> Gujr - 1063, 105, // gbm -> Deva - 1067, 10, // gbz -> Arab - 1071, 385, // gdb -> Orya - 1075, 100, // gdo -> Cyrl - 1079, 105, // gdx -> Deva - 1083, 120, // gez -> Ethi - 1087, 10, // ggg -> Arab - 1091, 105, // ggn -> Deva - 1095, 10, // gha -> Arab - 1099, 105, // ghe -> Deva - 1103, 10, // ghr -> Arab - 1107, 540, // ght -> Tibt - 1111, 10, // gig -> Arab - 1115, 100, // gin -> Cyrl - 1119, 10, // gjk -> Arab - 1123, 10, // gju -> Arab - 1127, 100, // gld -> Cyrl - 1131, 10, // glh -> Arab - 1135, 10, // glk -> Arab - 1139, 120, // gmv -> Ethi - 1143, 275, // gmy -> Linb - 1147, 540, // goe -> Tibt - 1151, 120, // gof -> Ethi - 1155, 105, // gok -> Deva - 1159, 105, // gom -> Deva - 1163, 520, // gon -> Telu - 1167, 140, // got -> Goth - 1171, 105, // gra -> Deva - 1175, 95, // grc -> Cprt - 1179, 45, // grt -> Beng - 1183, 120, // gru -> Ethi - 1187, 155, // gu -> Gujr - 1190, 105, // gvr -> Deva - 1194, 10, // gwc -> Arab - 1198, 10, // gwf -> Arab - 1202, 10, // gwt -> Arab - 1206, 105, // gyo -> Deva - 1210, 10, // gzi -> Arab - 1214, 10, // ha_CM -> Arab - 1220, 10, // ha_SD -> Arab - 1226, 10, // hac -> Arab - 1230, 175, // hak -> Hans - 1234, 120, // har -> Ethi - 1238, 10, // haz -> Arab - 1242, 185, // hbo -> Hebr - 1246, 120, // hdy -> Ethi - 1250, 185, // he -> Hebr - 1253, 105, // hi -> Deva - 1256, 490, // hii -> Takr - 1260, 575, // hit -> Xsux - 1264, 10, // hkh -> Arab - 1268, 105, // hlb -> Deva - 1272, 190, // hlu -> Hluw - 1276, 415, // hmd -> Plrd - 1280, 50, // hmj -> Bopo - 1284, 50, // hmq -> Bopo - 1288, 10, // hnd -> Arab - 1292, 105, // hne -> Deva - 1296, 195, // hnj -> Hmnp - 1300, 260, // hnj_AU -> Laoo - 1307, 260, // hnj_CN -> Laoo - 1314, 260, // hnj_FR -> Laoo - 1321, 260, // hnj_GF -> Laoo - 1328, 260, // hnj_LA -> Laoo - 1335, 260, // hnj_MM -> Laoo - 1342, 260, // hnj_SR -> Laoo - 1349, 260, // hnj_TH -> Laoo - 1356, 195, // hnj_US -> Hmnp - 1363, 260, // hnj_VN -> Laoo - 1370, 10, // hno -> Arab - 1374, 105, // hoc -> Deva - 1378, 10, // hoh -> Arab - 1382, 105, // hoj -> Deva - 1386, 170, // how -> Hani - 1390, 105, // hoy -> Deva - 1394, 345, // hpo -> Mymr - 1398, 480, // hrt -> Syrc - 1402, 10, // hrz -> Arab - 1406, 175, // hsn -> Hans - 1410, 10, // hss -> Arab - 1414, 575, // htx -> Xsux - 1418, 105, // hut -> Deva - 1422, 185, // huy -> Hebr - 1426, 100, // huz -> Cyrl - 1430, 20, // hy -> Armn - 1433, 20, // hyw -> Armn - 1437, 580, // ii -> Yiii - 1440, 285, // imy -> Lyci - 1444, 100, // inh -> Cyrl - 1448, 345, // int -> Mymr - 1452, 120, // ior -> Ethi - 1456, 505, // iru -> Taml - 1460, 10, // isk -> Arab - 1464, 185, // itk -> Hebr - 1468, 100, // itl -> Cyrl - 1472, 65, // iu -> Cans - 1475, 185, // iw -> Hebr - 1478, 210, // ja -> Jpan - 1481, 10, // jad -> Arab - 1485, 10, // jat -> Arab - 1489, 185, // jbe -> Hebr - 1493, 10, // jbn -> Arab - 1497, 100, // jct -> Cyrl - 1501, 540, // jda -> Tibt - 1505, 10, // jdg -> Arab - 1509, 100, // jdt -> Cyrl - 1513, 105, // jee -> Deva - 1517, 125, // jge -> Geor - 1521, 185, // ji -> Hebr - 1524, 165, // jje -> Hang - 1528, 345, // jkm -> Mymr - 1532, 105, // jml -> Deva - 1536, 490, // jna -> Takr - 1540, 10, // jnd -> Arab - 1544, 105, // jnl -> Deva - 1548, 105, // jns -> Deva - 1552, 10, // jog -> Arab - 1556, 185, // jpa -> Hebr - 1560, 185, // jpr -> Hebr - 1564, 105, // jul -> Deva - 1568, 385, // jun -> Orya - 1572, 385, // juy -> Orya - 1576, 540, // jya -> Tibt - 1580, 185, // jye -> Hebr - 1584, 125, // ka -> Geor - 1587, 100, // kaa -> Cyrl - 1591, 100, // kap -> Cyrl - 1595, 225, // kaw -> Kawi - 1599, 100, // kbd -> Cyrl - 1603, 10, // kbu -> Arab - 1607, 10, // kby -> Arab - 1611, 100, // kca -> Cyrl - 1615, 45, // kdq -> Beng - 1619, 535, // kdt -> Thai - 1623, 100, // ket -> Cyrl - 1627, 105, // kex -> Deva - 1631, 520, // key -> Telu - 1635, 245, // kfa -> Knda - 1639, 105, // kfb -> Deva - 1643, 520, // kfc -> Telu - 1647, 245, // kfd -> Knda - 1651, 505, // kfe -> Taml - 1655, 320, // kfh -> Mlym - 1659, 505, // kfi -> Taml - 1663, 105, // kfk -> Deva - 1667, 10, // kfm -> Arab - 1671, 105, // kfp -> Deva - 1675, 105, // kfq -> Deva - 1679, 105, // kfr -> Deva - 1683, 105, // kfs -> Deva - 1687, 105, // kfx -> Deva - 1691, 105, // kfy -> Deva - 1695, 105, // kgj -> Deva - 1699, 105, // kgy -> Deva - 1703, 500, // khb -> Talu - 1707, 535, // khf -> Thai - 1711, 540, // khg -> Tibt - 1715, 105, // khn -> Deva - 1719, 345, // kht -> Mymr - 1723, 100, // khv -> Cyrl - 1727, 10, // khw -> Arab - 1731, 105, // kif -> Deva - 1735, 100, // kim -> Cyrl - 1739, 105, // kip -> Deva - 1743, 260, // kjg -> Laoo - 1747, 100, // kjh -> Cyrl - 1751, 105, // kjl -> Deva - 1755, 105, // kjo -> Deva - 1759, 345, // kjp -> Mymr - 1763, 535, // kjt -> Thai - 1767, 100, // kk -> Cyrl - 1770, 10, // kk_AF -> Arab - 1776, 10, // kk_CN -> Arab - 1782, 10, // kk_IR -> Arab - 1788, 10, // kk_MN -> Arab - 1794, 540, // kkf -> Tibt - 1798, 255, // kkh -> Lana - 1802, 105, // kkt -> Deva - 1806, 105, // kle -> Deva - 1810, 10, // klj -> Arab - 1814, 105, // klr -> Deva - 1818, 235, // km -> Khmr - 1821, 105, // kmj -> Deva - 1825, 10, // kmz -> Arab - 1829, 245, // kn -> Knda - 1832, 250, // ko -> Kore - 1835, 100, // koi -> Cyrl - 1839, 105, // kok -> Deva - 1843, 100, // kpt -> Cyrl - 1847, 100, // kpy -> Cyrl - 1851, 480, // kqd -> Syrc - 1855, 120, // kqy -> Ethi - 1859, 105, // kra -> Deva - 1863, 100, // krc -> Cyrl - 1867, 100, // krk -> Cyrl - 1871, 235, // krr -> Khmr - 1875, 105, // kru -> Deva - 1879, 235, // krv -> Khmr - 1883, 10, // ks -> Arab - 1886, 345, // ksu -> Mymr - 1890, 345, // ksw -> Mymr - 1894, 105, // ksz -> Deva - 1898, 120, // ktb -> Ethi - 1902, 10, // ktl -> Arab - 1906, 415, // ktp -> Plrd - 1910, 10, // ku_LB -> Arab - 1916, 260, // kuf -> Laoo - 1920, 100, // kum -> Cyrl - 1924, 100, // kv -> Cyrl - 1927, 100, // kva -> Cyrl - 1931, 345, // kvq -> Mymr - 1935, 345, // kvt -> Mymr - 1939, 10, // kvx -> Arab - 1943, 215, // kvy -> Kali - 1947, 120, // kxc -> Ethi - 1951, 345, // kxf -> Mymr - 1955, 345, // kxk -> Mymr - 1959, 105, // kxl -> Deva - 1963, 535, // kxm -> Thai - 1967, 10, // kxp -> Arab - 1971, 385, // kxv -> Orya - 1975, 100, // ky -> Cyrl - 1978, 10, // ky_CN -> Arab - 1984, 215, // kyu -> Kali - 1988, 105, // kyv -> Deva - 1992, 105, // kyw -> Deva - 1996, 10, // kzh -> Arab - 2000, 270, // lab -> Lina - 2004, 185, // lad -> Hebr - 2008, 105, // lae -> Deva - 2012, 10, // lah -> Arab - 2016, 280, // lbc -> Lisu - 2020, 100, // lbe -> Cyrl - 2024, 105, // lbf -> Deva - 2028, 540, // lbj -> Tibt - 2032, 105, // lbm -> Deva - 2036, 260, // lbo -> Laoo - 2040, 105, // lbr -> Deva - 2044, 535, // lcp -> Thai - 2048, 265, // lep -> Lepc - 2052, 100, // lez -> Cyrl - 2056, 105, // lhm -> Deva - 2060, 480, // lhs -> Syrc - 2064, 105, // lif -> Deva - 2068, 280, // lis -> Lisu - 2072, 540, // lkh -> Tibt - 2076, 10, // lki -> Arab - 2080, 105, // lmh -> Deva - 2084, 520, // lmn -> Telu - 2088, 260, // lo -> Laoo - 2091, 105, // loy -> Deva - 2095, 415, // lpo -> Plrd - 2099, 10, // lrc -> Arab - 2103, 10, // lrk -> Arab - 2107, 10, // lrl -> Arab - 2111, 10, // lsa -> Arab - 2115, 185, // lsd -> Hebr - 2119, 10, // lss -> Arab - 2123, 540, // luk -> Tibt - 2127, 105, // luu -> Deva - 2131, 10, // luv -> Arab - 2135, 10, // luz -> Arab - 2139, 535, // lwl -> Thai - 2143, 535, // lwm -> Thai - 2147, 540, // lya -> Tibt - 2151, 175, // lzh -> Hans - 2155, 105, // mag -> Deva - 2159, 105, // mai -> Deva - 2163, 360, // man_GN -> Nkoo - 2170, 10, // mby -> Arab - 2174, 10, // mde -> Arab - 2178, 100, // mdf -> Cyrl - 2182, 120, // mdx -> Ethi - 2186, 120, // mdy -> Ethi - 2190, 10, // mfa -> Arab - 2194, 10, // mfi -> Arab - 2198, 105, // mgp -> Deva - 2202, 10, // mhj -> Arab - 2206, 295, // mid -> Mand - 2210, 105, // mjl -> Deva - 2214, 320, // mjq -> Mlym - 2218, 320, // mjr -> Mlym - 2222, 105, // mjt -> Deva - 2226, 520, // mju -> Telu - 2230, 320, // mjv -> Mlym - 2234, 105, // mjz -> Deva - 2238, 100, // mk -> Cyrl - 2241, 105, // mkb -> Deva - 2245, 105, // mke -> Deva - 2249, 10, // mki -> Arab - 2253, 535, // mkm -> Thai - 2257, 320, // ml -> Mlym - 2260, 535, // mlf -> Thai - 2264, 100, // mn -> Cyrl - 2267, 330, // mn_CN -> Mong - 2273, 45, // mni -> Beng - 2277, 10, // mnj -> Arab - 2281, 100, // mns -> Cyrl - 2285, 345, // mnw -> Mymr - 2289, 535, // mpz -> Thai - 2293, 105, // mr -> Deva - 2296, 535, // mra -> Thai - 2300, 105, // mrd -> Deva - 2304, 100, // mrj -> Cyrl - 2308, 335, // mro -> Mroo - 2312, 105, // mrr -> Deva - 2316, 10, // ms_CC -> Arab - 2322, 100, // mtm -> Cyrl - 2326, 105, // mtr -> Deva - 2330, 100, // mud -> Cyrl - 2334, 540, // muk -> Tibt - 2338, 105, // mut -> Deva - 2342, 505, // muv -> Taml - 2346, 120, // muz -> Ethi - 2350, 330, // mvf -> Mong - 2354, 10, // mvy -> Arab - 2358, 120, // mvz -> Ethi - 2362, 105, // mwr -> Deva - 2366, 345, // mwt -> Mymr - 2370, 195, // mww -> Hmnp - 2374, 345, // my -> Mymr - 2377, 120, // mym -> Ethi - 2381, 100, // myv -> Cyrl - 2385, 295, // myz -> Mand - 2389, 10, // mzn -> Arab - 2393, 175, // nan -> Hans - 2397, 105, // nao -> Deva - 2401, 105, // ncd -> Deva - 2405, 260, // ncq -> Laoo - 2409, 100, // ndf -> Cyrl - 2413, 105, // ne -> Deva - 2416, 100, // neg -> Cyrl - 2420, 540, // neh -> Tibt - 2424, 575, // nei -> Xsux - 2428, 105, // new -> Deva - 2432, 260, // ngt -> Laoo - 2436, 100, // nio -> Cyrl - 2440, 520, // nit -> Telu - 2444, 100, // niv -> Cyrl - 2448, 10, // nli -> Arab - 2452, 10, // nlm -> Arab - 2456, 105, // nlx -> Deva - 2460, 105, // nmm -> Deva - 2464, 565, // nnp -> Wcho - 2468, 255, // nod -> Lana - 2472, 105, // noe -> Deva - 2476, 100, // nog -> Cyrl - 2480, 105, // noi -> Deva - 2484, 435, // non -> Runr - 2488, 580, // nos -> Yiii - 2492, 540, // npb -> Tibt - 2496, 360, // nqo -> Nkoo - 2500, 580, // nsd -> Yiii - 2504, 580, // nsf -> Yiii - 2508, 65, // nsk -> Cans - 2512, 545, // nst -> Tnsa - 2516, 580, // nsv -> Yiii - 2520, 580, // nty -> Yiii - 2524, 10, // ntz -> Arab - 2528, 355, // nwc -> Newa - 2532, 105, // nwx -> Deva - 2536, 535, // nyl -> Thai - 2540, 10, // nyq -> Arab - 2544, 100, // oaa -> Cyrl - 2548, 100, // oac -> Cyrl - 2552, 480, // oar -> Syrc - 2556, 125, // oav -> Geor - 2560, 410, // obm -> Phnx - 2564, 345, // obr -> Mymr - 2568, 10, // odk -> Arab - 2572, 575, // oht -> Xsux - 2576, 65, // oj -> Cans - 2579, 65, // ojs -> Cans - 2583, 165, // okm -> Hang - 2587, 170, // oko -> Hani - 2591, 235, // okz -> Khmr - 2595, 105, // ola -> Deva - 2599, 540, // ole -> Tibt - 2603, 100, // omk -> Cyrl - 2607, 340, // omp -> Mtei - 2611, 325, // omr -> Modi - 2615, 105, // oon -> Deva - 2619, 385, // or -> Orya - 2622, 520, // ort -> Telu - 2626, 10, // oru -> Arab - 2630, 100, // orv -> Cyrl - 2634, 100, // os -> Cyrl - 2637, 390, // osa -> Osge - 2641, 200, // osc -> Ital - 2645, 205, // osi -> Java - 2649, 10, // ota -> Arab - 2653, 540, // otb -> Tibt - 2657, 380, // otk -> Orkh - 2661, 145, // oty -> Gran - 2665, 395, // oui -> Ougr - 2669, 160, // pa -> Guru - 2672, 10, // pa_PK -> Arab - 2678, 405, // pal -> Phli - 2682, 100, // paq -> Cyrl - 2686, 10, // pbt -> Arab - 2690, 235, // pcb -> Khmr - 2694, 345, // pce -> Mymr - 2698, 320, // pcf -> Mlym - 2702, 320, // pcg -> Mlym - 2706, 105, // pch -> Deva - 2710, 105, // pci -> Deva - 2714, 520, // pcj -> Telu - 2718, 385, // peg -> Orya - 2722, 570, // peo -> Xpeo - 2726, 230, // pgd -> Khar - 2730, 105, // pgg -> Deva - 2734, 370, // pgl -> Ogam - 2738, 200, // pgn -> Ital - 2742, 105, // phd -> Deva - 2746, 345, // phk -> Mymr - 2750, 10, // phl -> Arab - 2754, 410, // phn -> Phnx - 2758, 260, // pho -> Laoo - 2762, 10, // phr -> Arab - 2766, 535, // pht -> Thai - 2770, 10, // phv -> Arab - 2774, 105, // phw -> Deva - 2778, 460, // pi -> Sinh - 2781, 55, // pka -> Brah - 2785, 320, // pkr -> Mlym - 2789, 10, // plk -> Arab - 2793, 345, // pll -> Mymr - 2797, 55, // pmh -> Brah - 2801, 150, // pnt -> Grek - 2805, 105, // ppa -> Deva - 2809, 230, // pra -> Khar - 2813, 10, // prc -> Arab - 2817, 10, // prd -> Arab - 2821, 155, // prp -> Gujr - 2825, 535, // prt -> Thai - 2829, 10, // prx -> Arab - 2833, 10, // ps -> Arab - 2836, 10, // psh -> Arab - 2840, 10, // psi -> Arab - 2844, 10, // pst -> Arab - 2848, 105, // pum -> Deva - 2852, 345, // pwo -> Mymr - 2856, 105, // pwr -> Deva - 2860, 535, // pww -> Thai - 2864, 345, // pyx -> Mymr - 2868, 10, // qxq -> Arab - 2872, 105, // raa -> Deva - 2876, 105, // rab -> Deva - 2880, 105, // raf -> Deva - 2884, 45, // rah -> Beng - 2888, 105, // raj -> Deva - 2892, 105, // rav -> Deva - 2896, 345, // rbb -> Mymr - 2900, 10, // rdb -> Arab - 2904, 385, // rei -> Orya - 2908, 430, // rhg -> Rohg - 2912, 105, // rji -> Deva - 2916, 105, // rjs -> Deva - 2920, 235, // rka -> Khmr - 2924, 345, // rki -> Mymr - 2928, 45, // rkt -> Beng - 2932, 20, // rmi -> Armn - 2936, 10, // rmt -> Arab - 2940, 345, // rmz -> Mymr - 2944, 100, // rsk -> Cyrl - 2948, 105, // rtw -> Deva - 2952, 100, // ru -> Cyrl - 2955, 100, // rue -> Cyrl - 2959, 100, // rut -> Cyrl - 2963, 105, // rwr -> Deva - 2967, 220, // ryu -> Kana - 2971, 105, // sa -> Deva - 2974, 100, // sah -> Cyrl - 2978, 440, // sam -> Samr - 2982, 375, // sat -> Olck - 2986, 450, // saz -> Saur - 2990, 10, // sbn -> Arab - 2994, 540, // sbu -> Tibt - 2998, 105, // sck -> Deva - 3002, 10, // scl -> Arab - 3006, 105, // scp -> Deva - 3010, 260, // sct -> Laoo - 3014, 490, // scu -> Takr - 3018, 150, // scx -> Grek - 3022, 10, // sd -> Arab - 3025, 105, // sd_IN -> Deva - 3031, 10, // sdb -> Arab - 3035, 10, // sdf -> Arab - 3039, 10, // sdg -> Arab - 3043, 10, // sdh -> Arab - 3047, 10, // sds -> Arab - 3051, 100, // sel -> Cyrl - 3055, 415, // sfm -> Plrd - 3059, 370, // sga -> Ogam - 3063, 100, // sgh -> Cyrl - 3067, 105, // sgj -> Deva - 3071, 10, // sgr -> Arab - 3075, 540, // sgt -> Tibt - 3079, 120, // sgw -> Ethi - 3083, 10, // sgy -> Arab - 3087, 10, // shd -> Arab - 3091, 525, // shi -> Tfng - 3095, 10, // shm -> Arab - 3099, 345, // shn -> Mymr - 3103, 10, // shu -> Arab - 3107, 10, // shv -> Arab - 3111, 460, // si -> Sinh - 3114, 100, // sia -> Cyrl - 3118, 540, // sip -> Tibt - 3122, 10, // siy -> Arab - 3126, 10, // siz -> Arab - 3130, 100, // sjd -> Cyrl - 3134, 105, // sjp -> Deva - 3138, 100, // sjt -> Cyrl - 3142, 535, // skb -> Thai - 3146, 105, // skj -> Deva - 3150, 10, // skr -> Arab - 3154, 10, // slq -> Arab - 3158, 580, // smh -> Yiii - 3162, 440, // smp -> Samr - 3166, 235, // smu -> Khmr - 3170, 10, // smy -> Arab - 3174, 515, // soa -> Tavt - 3178, 465, // sog -> Sogd - 3182, 105, // soi -> Deva - 3186, 535, // sou -> Thai - 3190, 540, // spt -> Tibt - 3194, 385, // spv -> Orya - 3198, 10, // sqo -> Arab - 3202, 260, // sqq -> Laoo - 3206, 10, // sqt -> Arab - 3210, 100, // sr -> Cyrl - 3213, 470, // srb -> Sora - 3217, 10, // srh -> Arab - 3221, 105, // srx -> Deva - 3225, 10, // srz -> Arab - 3229, 10, // ssh -> Arab - 3233, 260, // sss -> Laoo - 3237, 10, // sts -> Arab - 3241, 120, // stv -> Ethi - 3245, 100, // sty -> Cyrl - 3249, 105, // suz -> Deva - 3253, 125, // sva -> Geor - 3257, 10, // swb -> Arab - 3261, 170, // swi -> Hani - 3265, 105, // swv -> Deva - 3269, 480, // syc -> Syrc - 3273, 45, // syl -> Beng - 3277, 480, // syn -> Syrc - 3281, 480, // syr -> Syrc - 3285, 105, // syw -> Deva - 3289, 505, // ta -> Taml - 3292, 100, // tab -> Cyrl - 3296, 105, // taj -> Deva - 3300, 485, // tbk -> Tagb - 3304, 540, // tcn -> Tibt - 3308, 345, // tco -> Mymr - 3312, 505, // tcx -> Taml - 3316, 245, // tcy -> Knda - 3320, 525, // tda -> Tfng - 3324, 105, // tdb -> Deva - 3328, 495, // tdd -> Tale - 3332, 105, // tdg -> Deva - 3336, 105, // tdh -> Deva - 3340, 520, // te -> Telu - 3343, 205, // tes -> Java - 3347, 100, // tg -> Cyrl - 3350, 10, // tg_PK -> Arab - 3356, 105, // tge -> Deva - 3360, 540, // tgf -> Tibt - 3364, 535, // th -> Thai - 3367, 105, // the -> Deva - 3371, 105, // thf -> Deva - 3375, 495, // thi -> Tale - 3379, 105, // thl -> Deva - 3383, 535, // thm -> Thai - 3387, 105, // thq -> Deva - 3391, 105, // thr -> Deva - 3395, 105, // ths -> Deva - 3399, 120, // ti -> Ethi - 3402, 120, // tig -> Ethi - 3406, 105, // tij -> Deva - 3410, 100, // tin -> Cyrl - 3414, 345, // tjl -> Mymr - 3418, 10, // tjo -> Arab - 3422, 105, // tkb -> Deva - 3426, 10, // tks -> Arab - 3430, 105, // tkt -> Deva - 3434, 105, // tmk -> Deva - 3438, 480, // tmr -> Syrc - 3442, 60, // tnv -> Cakm - 3446, 10, // tov -> Arab - 3450, 235, // tpu -> Khmr - 3454, 10, // tra -> Arab - 3458, 185, // trg -> Hebr - 3462, 10, // trm -> Arab - 3466, 10, // trw -> Arab - 3470, 150, // tsd -> Grek - 3474, 105, // tsf -> Deva - 3478, 540, // tsj -> Tibt - 3482, 100, // tt -> Cyrl - 3485, 260, // tth -> Laoo - 3489, 260, // tto -> Laoo - 3493, 535, // tts -> Thai - 3497, 345, // tvn -> Mymr - 3501, 105, // twm -> Deva - 3505, 510, // txg -> Tang - 3509, 550, // txo -> Toto - 3513, 515, // tyr -> Tavt - 3517, 100, // tyv -> Cyrl - 3521, 100, // ude -> Cyrl - 3525, 320, // udg -> Mlym - 3529, 0, // udi -> Aghb - 3533, 100, // udm -> Cyrl - 3537, 10, // ug -> Arab - 3540, 100, // ug_KZ -> Cyrl - 3546, 100, // ug_MN -> Cyrl - 3552, 555, // uga -> Ugar - 3556, 100, // ugh -> Cyrl - 3560, 535, // ugo -> Thai - 3564, 100, // uk -> Cyrl - 3567, 385, // uki -> Orya - 3571, 100, // ulc -> Cyrl - 3575, 45, // unr -> Beng - 3579, 105, // unr_NP -> Deva - 3586, 45, // unx -> Beng - 3590, 10, // ur -> Arab - 3593, 535, // urk -> Thai - 3597, 10, // ush -> Arab - 3601, 150, // uum -> Grek - 3605, 10, // uz_AF -> Arab - 3611, 100, // uz_CN -> Cyrl - 3617, 10, // uzs -> Arab - 3621, 505, // vaa -> Taml - 3625, 10, // vaf -> Arab - 3629, 105, // vah -> Deva - 3633, 560, // vai -> Vaii - 3637, 105, // vas -> Deva - 3641, 105, // vav -> Deva - 3645, 105, // vay -> Deva - 3649, 10, // vgr -> Arab - 3653, 245, // vmd -> Knda - 3657, 10, // vmh -> Arab - 3661, 120, // wal -> Ethi - 3665, 10, // wbk -> Arab - 3669, 520, // wbq -> Telu - 3673, 105, // wbr -> Deva - 3677, 10, // wlo -> Arab - 3681, 105, // wme -> Deva - 3685, 10, // wne -> Arab - 3689, 10, // wni -> Arab - 3693, 130, // wsg -> Gong - 3697, 10, // wsv -> Arab - 3701, 105, // wtm -> Deva - 3705, 175, // wuu -> Hans - 3709, 100, // xal -> Cyrl - 3713, 120, // xan -> Ethi - 3717, 100, // xas -> Cyrl - 3721, 85, // xco -> Chrs - 3725, 70, // xcr -> Cari - 3729, 100, // xdq -> Cyrl - 3733, 10, // xhe -> Arab - 3737, 235, // xhm -> Khmr - 3741, 385, // xis -> Orya - 3745, 10, // xka -> Arab - 3749, 10, // xkc -> Arab - 3753, 10, // xkj -> Arab - 3757, 10, // xkp -> Arab - 3761, 285, // xlc -> Lyci - 3765, 290, // xld -> Lydi - 3769, 115, // xly -> Elym - 3773, 125, // xmf -> Geor - 3777, 300, // xmn -> Mani - 3781, 315, // xmr -> Merc - 3785, 350, // xna -> Narb - 3789, 105, // xnr -> Deva - 3793, 150, // xpg -> Grek - 3797, 370, // xpi -> Ogam - 3801, 100, // xpm -> Cyrl - 3805, 420, // xpr -> Prti - 3809, 100, // xrm -> Cyrl - 3813, 100, // xrn -> Cyrl - 3817, 445, // xsa -> Sarb - 3821, 105, // xsr -> Deva - 3825, 100, // xss -> Cyrl - 3829, 505, // xub -> Taml - 3833, 505, // xuj -> Taml - 3837, 200, // xve -> Ital - 3841, 10, // xvi -> Arab - 3845, 100, // xwo -> Cyrl - 3849, 305, // xzh -> Marc - 3853, 100, // yai -> Cyrl - 3857, 105, // ybh -> Deva - 3861, 105, // ybi -> Deva - 3865, 10, // ydg -> Arab - 3869, 320, // yea -> Mlym - 3873, 150, // yej -> Grek - 3877, 520, // yeu -> Telu - 3881, 415, // ygp -> Plrd - 3885, 185, // yhd -> Hebr - 3889, 185, // yi -> Hebr - 3892, 580, // yig -> Yiii - 3896, 185, // yih -> Hebr - 3900, 580, // yiv -> Yiii - 3904, 100, // ykg -> Cyrl - 3908, 415, // yna -> Plrd - 3912, 100, // ynk -> Cyrl - 3916, 210, // yoi -> Jpan - 3920, 535, // yoy -> Thai - 3924, 100, // yrk -> Cyrl - 3928, 580, // ysd -> Yiii - 3932, 580, // ysn -> Yiii - 3936, 580, // ysp -> Yiii - 3940, 100, // ysr -> Cyrl - 3944, 415, // ysy -> Plrd - 3948, 185, // yud -> Hebr - 3952, 180, // yue -> Hant - 3956, 175, // yue_CN -> Hans - 3963, 100, // yug -> Cyrl - 3967, 100, // yux -> Cyrl - 3971, 415, // ywq -> Plrd - 3975, 415, // ywu -> Plrd - 3979, 540, // zau -> Tibt - 3983, 10, // zba -> Arab - 3987, 170, // zch -> Hani - 3991, 10, // zdj -> Arab - 3995, 170, // zeh -> Hani - 3999, 525, // zen -> Tfng - 4003, 170, // zgb -> Hani - 4007, 525, // zgh -> Tfng - 4011, 170, // zgm -> Hani - 4015, 170, // zgn -> Hani - 4019, 175, // zh -> Hans - 4022, 180, // zh_AU -> Hant - 4028, 180, // zh_BN -> Hant - 4034, 180, // zh_GB -> Hant - 4040, 180, // zh_GF -> Hant - 4046, 180, // zh_HK -> Hant - 4052, 180, // zh_ID -> Hant - 4058, 180, // zh_MO -> Hant - 4064, 180, // zh_PA -> Hant - 4070, 180, // zh_PF -> Hant - 4076, 180, // zh_PH -> Hant - 4082, 180, // zh_SR -> Hant - 4088, 180, // zh_TH -> Hant - 4094, 180, // zh_TW -> Hant - 4100, 180, // zh_US -> Hant - 4106, 180, // zh_VN -> Hant - 4112, 170, // zhd -> Hani - 4116, 365, // zhx -> Nshu - 4120, 100, // zkb -> Cyrl - 4124, 100, // zko -> Cyrl - 4128, 240, // zkt -> Kits - 4132, 100, // zkz -> Cyrl - 4136, 170, // zlj -> Hani - 4140, 170, // zln -> Hani - 4144, 170, // zlq -> Hani - 4148, 170, // zqe -> Hani - 4152, 185, // zrp -> Hebr - 4156, 10, // zum -> Arab - 4160, 170, // zyg -> Hani - 4164, 170, // zyn -> Hani - 4168, 170, // zzj -> Hani + 19, 420, // abl -> Rjng + 23, 10, // abv -> Arab + 27, 10, // acm -> Arab + 31, 10, // acq -> Arab + 35, 10, // acw -> Arab + 39, 10, // acx -> Arab + 43, 10, // adf -> Arab + 47, 535, // adx -> Tibt + 51, 100, // ady -> Cyrl + 55, 25, // ae -> Avst + 58, 10, // aeb -> Arab + 62, 10, // aec -> Arab + 66, 10, // aee -> Arab + 70, 10, // aeq -> Arab + 74, 10, // afb -> Arab + 78, 105, // agi -> Deva + 82, 120, // agj -> Ethi + 86, 100, // agx -> Cyrl + 90, 120, // ahg -> Ethi + 94, 5, // aho -> Ahom + 98, 105, // ahr -> Deva + 102, 10, // aib -> Arab + 106, 185, // aij -> Hebr + 110, 220, // ain -> Kana + 114, 345, // aio -> Mymr + 118, 10, // aiq -> Arab + 122, 10, // ajp -> Arab + 126, 570, // akk -> Xsux + 130, 100, // akv -> Cyrl + 134, 260, // alk -> Laoo + 138, 320, // all -> Mlym + 142, 100, // alr -> Cyrl + 146, 100, // alt -> Cyrl + 150, 120, // alw -> Ethi + 154, 120, // am -> Ethi + 157, 210, // ams -> Jpan + 161, 475, // amw -> Syrc + 165, 100, // ani -> Cyrl + 169, 105, // anp -> Deva + 173, 105, // anr -> Deva + 177, 120, // anu -> Ethi + 181, 45, // aot -> Beng + 185, 10, // apc -> Arab + 189, 10, // apd -> Arab + 193, 105, // aph -> Deva + 197, 100, // aqc -> Cyrl + 201, 10, // ar -> Arab + 204, 15, // arc -> Armi + 208, 10, // arq -> Arab + 212, 10, // ars -> Arab + 216, 10, // ary -> Arab + 220, 10, // arz -> Arab + 224, 45, // as -> Beng + 227, 450, // ase -> Sgnw + 231, 10, // ask -> Arab + 235, 10, // atn -> Arab + 239, 100, // atv -> Cyrl + 243, 10, // auj -> Arab + 247, 10, // auz -> Arab + 251, 100, // av -> Cyrl + 254, 10, // avd -> Arab + 258, 10, // avl -> Arab + 262, 105, // awa -> Deva + 266, 120, // awn -> Ethi + 270, 20, // axm -> Armn + 274, 10, // ayh -> Arab + 278, 10, // ayl -> Arab + 282, 10, // ayn -> Arab + 286, 10, // ayp -> Arab + 290, 10, // az_IQ -> Arab + 296, 10, // az_IR -> Arab + 302, 100, // az_RU -> Cyrl + 308, 10, // azb -> Arab + 312, 100, // ba -> Cyrl + 315, 10, // bal -> Arab + 319, 105, // bap -> Deva + 323, 30, // bax -> Bamu + 327, 125, // bbl -> Geor + 331, 120, // bcq -> Ethi + 335, 385, // bdv -> Orya + 339, 10, // bdz -> Arab + 343, 100, // be -> Cyrl + 346, 105, // bee -> Deva + 350, 10, // bej -> Arab + 354, 105, // bfb -> Deva + 358, 500, // bfq -> Taml + 362, 10, // bft -> Arab + 366, 535, // bfu -> Tibt + 370, 385, // bfw -> Orya + 374, 105, // bfy -> Deva + 378, 105, // bfz -> Deva + 382, 100, // bg -> Cyrl + 385, 105, // bgc -> Deva + 389, 105, // bgd -> Deva + 393, 10, // bgn -> Arab + 397, 10, // bgp -> Arab + 401, 105, // bgq -> Deva + 405, 105, // bgw -> Deva + 409, 150, // bgx -> Grek + 413, 105, // bha -> Deva + 417, 105, // bhb -> Deva + 421, 105, // bhd -> Deva + 425, 10, // bhe -> Arab + 429, 100, // bhh -> Cyrl + 433, 105, // bhi -> Deva + 437, 105, // bhj -> Deva + 441, 10, // bhm -> Arab + 445, 475, // bhn -> Syrc + 449, 105, // bho -> Deva + 453, 485, // bht -> Takr + 457, 105, // bhu -> Deva + 461, 105, // biy -> Deva + 465, 475, // bjf -> Syrc + 469, 105, // bjj -> Deva + 473, 10, // bjm -> Arab + 477, 345, // blk -> Mymr + 481, 510, // blt -> Tavt + 485, 105, // bmj -> Deva + 489, 45, // bn -> Beng + 492, 105, // bns -> Deva + 496, 535, // bo -> Tibt + 499, 100, // bph -> Cyrl + 503, 105, // bpx -> Deva + 507, 45, // bpy -> Beng + 511, 10, // bqi -> Arab + 515, 105, // bra -> Deva + 519, 235, // brb -> Khmr + 523, 105, // brd -> Deva + 527, 10, // brh -> Arab + 531, 10, // brk -> Arab + 535, 260, // brv -> Laoo + 539, 105, // brx -> Deva + 543, 10, // bsh -> Arab + 547, 10, // bsk -> Arab + 551, 35, // bsq -> Bass + 555, 120, // bst -> Ethi + 559, 40, // btd -> Batk + 563, 40, // btm -> Batk + 567, 105, // btv -> Deva + 571, 100, // bua -> Cyrl + 575, 345, // bwe -> Mymr + 579, 100, // bxm -> Cyrl + 583, 330, // bxu -> Mong + 587, 105, // byh -> Deva + 591, 120, // byn -> Ethi + 595, 105, // byw -> Deva + 599, 530, // bzi -> Thai + 603, 530, // cbn -> Thai + 607, 60, // ccp -> Cakm + 611, 515, // cde -> Telu + 615, 105, // cdh -> Deva + 619, 155, // cdi -> Gujr + 623, 105, // cdj -> Deva + 627, 105, // cdm -> Deva + 631, 175, // cdo -> Hans + 635, 45, // cdz -> Beng + 639, 100, // ce -> Cyrl + 642, 535, // cgk -> Tibt + 646, 10, // chg -> Arab + 650, 100, // chm -> Cyrl + 654, 80, // chr -> Cher + 658, 105, // chx -> Deva + 662, 105, // cih -> Deva + 666, 10, // cja -> Arab + 670, 100, // cji -> Cyrl + 674, 75, // cjm -> Cham + 678, 175, // cjy -> Hans + 682, 10, // ckb -> Arab + 686, 100, // ckt -> Cyrl + 690, 10, // clh -> Arab + 694, 100, // clw -> Cyrl + 698, 470, // cmg -> Soyo + 702, 535, // cna -> Tibt + 706, 175, // cnp -> Hans + 710, 530, // cog -> Thai + 714, 90, // cop -> Copt + 718, 150, // cpg -> Grek + 722, 65, // cr -> Cans + 725, 100, // crh -> Cyrl + 729, 65, // crj -> Cans + 733, 65, // crk -> Cans + 737, 65, // crl -> Cans + 741, 65, // crm -> Cans + 745, 345, // csh -> Mymr + 749, 175, // csp -> Hans + 753, 65, // csw -> Cans + 757, 395, // ctd -> Pauc + 761, 45, // ctg -> Beng + 765, 105, // ctn -> Deva + 769, 500, // ctt -> Taml + 773, 100, // cu -> Cyrl + 776, 255, // cuu -> Lana + 780, 100, // cv -> Cyrl + 783, 175, // czh -> Hans + 787, 185, // czk -> Hebr + 791, 105, // daq -> Deva + 795, 100, // dar -> Cyrl + 799, 10, // dcc -> Arab + 803, 100, // ddo -> Cyrl + 807, 10, // def -> Arab + 811, 10, // deh -> Arab + 815, 45, // der -> Beng + 819, 105, // dhi -> Deva + 823, 155, // dhn -> Gujr + 827, 105, // dho -> Deva + 831, 105, // dhw -> Deva + 835, 535, // dka -> Tibt + 839, 100, // dlg -> Cyrl + 843, 310, // dmf -> Medf + 847, 10, // dmk -> Arab + 851, 10, // dml -> Arab + 855, 100, // dng -> Cyrl + 859, 345, // dnu -> Mymr + 863, 345, // dnv -> Mymr + 867, 105, // doi -> Deva + 871, 120, // dox -> Ethi + 875, 535, // dre -> Tibt + 879, 105, // drq -> Deva + 883, 120, // drs -> Ethi + 887, 105, // dry -> Deva + 891, 385, // dso -> Orya + 895, 105, // dty -> Deva + 899, 155, // dub -> Gujr + 903, 105, // duh -> Deva + 907, 105, // dus -> Deva + 911, 525, // dv -> Thaa + 914, 385, // dwk -> Orya + 918, 105, // dwz -> Deva + 922, 535, // dz -> Tibt + 925, 535, // dzl -> Tibt + 929, 150, // ecr -> Grek + 933, 95, // ecy -> Cprt + 937, 110, // egy -> Egyp + 941, 215, // eky -> Kali + 945, 150, // el -> Grek + 948, 105, // emg -> Deva + 952, 105, // emu -> Deva + 956, 100, // enf -> Cyrl + 960, 100, // enh -> Cyrl + 964, 500, // era -> Taml + 968, 135, // esg -> Gonm + 972, 10, // esh -> Arab + 976, 200, // ett -> Ital + 980, 100, // eve -> Cyrl + 984, 100, // evn -> Cyrl + 988, 10, // fa -> Arab + 991, 10, // fay -> Arab + 995, 10, // faz -> Arab + 999, 10, // fia -> Arab + 1003, 105, // fmu -> Deva + 1007, 10, // fub -> Arab + 1011, 175, // gan -> Hans + 1015, 385, // gaq -> Orya + 1019, 155, // gas -> Gujr + 1023, 515, // gau -> Telu + 1027, 385, // gbj -> Orya + 1031, 105, // gbk -> Deva + 1035, 155, // gbl -> Gujr + 1039, 105, // gbm -> Deva + 1043, 10, // gbz -> Arab + 1047, 385, // gdb -> Orya + 1051, 100, // gdo -> Cyrl + 1055, 105, // gdx -> Deva + 1059, 120, // gez -> Ethi + 1063, 10, // ggg -> Arab + 1067, 10, // gha -> Arab + 1071, 105, // ghe -> Deva + 1075, 10, // ghr -> Arab + 1079, 535, // ght -> Tibt + 1083, 10, // gig -> Arab + 1087, 100, // gin -> Cyrl + 1091, 10, // gjk -> Arab + 1095, 10, // gju -> Arab + 1099, 100, // gld -> Cyrl + 1103, 10, // glh -> Arab + 1107, 10, // glk -> Arab + 1111, 120, // gmv -> Ethi + 1115, 275, // gmy -> Linb + 1119, 535, // goe -> Tibt + 1123, 120, // gof -> Ethi + 1127, 105, // gok -> Deva + 1131, 105, // gom -> Deva + 1135, 515, // gon -> Telu + 1139, 140, // got -> Goth + 1143, 105, // gra -> Deva + 1147, 95, // grc -> Cprt + 1151, 45, // grt -> Beng + 1155, 120, // gru -> Ethi + 1159, 155, // gu -> Gujr + 1162, 105, // gvr -> Deva + 1166, 10, // gwc -> Arab + 1170, 10, // gwf -> Arab + 1174, 10, // gwt -> Arab + 1178, 105, // gyo -> Deva + 1182, 10, // gzi -> Arab + 1186, 10, // ha_CM -> Arab + 1192, 10, // ha_SD -> Arab + 1198, 10, // hac -> Arab + 1202, 175, // hak -> Hans + 1206, 120, // har -> Ethi + 1210, 10, // haz -> Arab + 1214, 185, // hbo -> Hebr + 1218, 120, // hdy -> Ethi + 1222, 185, // he -> Hebr + 1225, 105, // hi -> Deva + 1228, 485, // hii -> Takr + 1232, 570, // hit -> Xsux + 1236, 10, // hkh -> Arab + 1240, 105, // hlb -> Deva + 1244, 190, // hlu -> Hluw + 1248, 410, // hmd -> Plrd + 1252, 50, // hmj -> Bopo + 1256, 50, // hmq -> Bopo + 1260, 10, // hnd -> Arab + 1264, 105, // hne -> Deva + 1268, 195, // hnj -> Hmnp + 1272, 260, // hnj_AU -> Laoo + 1279, 260, // hnj_CN -> Laoo + 1286, 260, // hnj_FR -> Laoo + 1293, 260, // hnj_GF -> Laoo + 1300, 260, // hnj_LA -> Laoo + 1307, 260, // hnj_MM -> Laoo + 1314, 260, // hnj_SR -> Laoo + 1321, 260, // hnj_TH -> Laoo + 1328, 260, // hnj_VN -> Laoo + 1335, 10, // hno -> Arab + 1339, 105, // hoc -> Deva + 1343, 10, // hoh -> Arab + 1347, 105, // hoj -> Deva + 1351, 170, // how -> Hani + 1355, 105, // hoy -> Deva + 1359, 345, // hpo -> Mymr + 1363, 475, // hrt -> Syrc + 1367, 10, // hrz -> Arab + 1371, 175, // hsn -> Hans + 1375, 10, // hss -> Arab + 1379, 570, // htx -> Xsux + 1383, 105, // hut -> Deva + 1387, 185, // huy -> Hebr + 1391, 100, // huz -> Cyrl + 1395, 20, // hy -> Armn + 1398, 20, // hyw -> Armn + 1402, 575, // ii -> Yiii + 1405, 285, // imy -> Lyci + 1409, 100, // inh -> Cyrl + 1413, 345, // int -> Mymr + 1417, 120, // ior -> Ethi + 1421, 500, // iru -> Taml + 1425, 10, // isk -> Arab + 1429, 185, // itk -> Hebr + 1433, 100, // itl -> Cyrl + 1437, 65, // iu -> Cans + 1440, 185, // iw -> Hebr + 1443, 210, // ja -> Jpan + 1446, 10, // jad -> Arab + 1450, 10, // jat -> Arab + 1454, 185, // jbe -> Hebr + 1458, 10, // jbn -> Arab + 1462, 100, // jct -> Cyrl + 1466, 535, // jda -> Tibt + 1470, 10, // jdg -> Arab + 1474, 100, // jdt -> Cyrl + 1478, 105, // jee -> Deva + 1482, 125, // jge -> Geor + 1486, 185, // ji -> Hebr + 1489, 165, // jje -> Hang + 1493, 345, // jkm -> Mymr + 1497, 105, // jml -> Deva + 1501, 485, // jna -> Takr + 1505, 10, // jnd -> Arab + 1509, 105, // jnl -> Deva + 1513, 105, // jns -> Deva + 1517, 10, // jog -> Arab + 1521, 185, // jpa -> Hebr + 1525, 185, // jpr -> Hebr + 1529, 185, // jrb -> Hebr + 1533, 10, // jrb_MA -> Arab + 1540, 105, // jul -> Deva + 1544, 385, // jun -> Orya + 1548, 385, // juy -> Orya + 1552, 535, // jya -> Tibt + 1556, 185, // jye -> Hebr + 1560, 125, // ka -> Geor + 1563, 100, // kaa -> Cyrl + 1567, 100, // kap -> Cyrl + 1571, 225, // kaw -> Kawi + 1575, 100, // kbd -> Cyrl + 1579, 10, // kbu -> Arab + 1583, 10, // kby -> Arab + 1587, 100, // kca -> Cyrl + 1591, 45, // kdq -> Beng + 1595, 530, // kdt -> Thai + 1599, 100, // ket -> Cyrl + 1603, 105, // kex -> Deva + 1607, 515, // key -> Telu + 1611, 245, // kfa -> Knda + 1615, 105, // kfb -> Deva + 1619, 515, // kfc -> Telu + 1623, 245, // kfd -> Knda + 1627, 500, // kfe -> Taml + 1631, 320, // kfh -> Mlym + 1635, 500, // kfi -> Taml + 1639, 105, // kfk -> Deva + 1643, 10, // kfm -> Arab + 1647, 105, // kfp -> Deva + 1651, 105, // kfq -> Deva + 1655, 105, // kfr -> Deva + 1659, 105, // kfs -> Deva + 1663, 105, // kfx -> Deva + 1667, 105, // kfy -> Deva + 1671, 105, // kgj -> Deva + 1675, 105, // kgy -> Deva + 1679, 495, // khb -> Talu + 1683, 530, // khf -> Thai + 1687, 535, // khg -> Tibt + 1691, 105, // khn -> Deva + 1695, 345, // kht -> Mymr + 1699, 100, // khv -> Cyrl + 1703, 10, // khw -> Arab + 1707, 105, // kif -> Deva + 1711, 100, // kim -> Cyrl + 1715, 105, // kip -> Deva + 1719, 260, // kjg -> Laoo + 1723, 100, // kjh -> Cyrl + 1727, 105, // kjl -> Deva + 1731, 105, // kjo -> Deva + 1735, 345, // kjp -> Mymr + 1739, 530, // kjt -> Thai + 1743, 100, // kk -> Cyrl + 1746, 10, // kk_AF -> Arab + 1752, 10, // kk_CN -> Arab + 1758, 10, // kk_IR -> Arab + 1764, 10, // kk_MN -> Arab + 1770, 535, // kkf -> Tibt + 1774, 255, // kkh -> Lana + 1778, 105, // kkt -> Deva + 1782, 105, // kle -> Deva + 1786, 10, // klj -> Arab + 1790, 105, // klr -> Deva + 1794, 235, // km -> Khmr + 1797, 105, // kmj -> Deva + 1801, 10, // kmz -> Arab + 1805, 245, // kn -> Knda + 1808, 250, // ko -> Kore + 1811, 100, // koi -> Cyrl + 1815, 105, // kok -> Deva + 1819, 100, // kpt -> Cyrl + 1823, 100, // kpy -> Cyrl + 1827, 475, // kqd -> Syrc + 1831, 120, // kqy -> Ethi + 1835, 105, // kra -> Deva + 1839, 100, // krc -> Cyrl + 1843, 100, // krk -> Cyrl + 1847, 235, // krr -> Khmr + 1851, 105, // kru -> Deva + 1855, 235, // krv -> Khmr + 1859, 10, // ks -> Arab + 1862, 345, // ksu -> Mymr + 1866, 345, // ksw -> Mymr + 1870, 105, // ksz -> Deva + 1874, 120, // ktb -> Ethi + 1878, 10, // ktl -> Arab + 1882, 410, // ktp -> Plrd + 1886, 10, // ku_LB -> Arab + 1892, 260, // kuf -> Laoo + 1896, 100, // kum -> Cyrl + 1900, 100, // kv -> Cyrl + 1903, 100, // kva -> Cyrl + 1907, 345, // kvq -> Mymr + 1911, 345, // kvt -> Mymr + 1915, 10, // kvx -> Arab + 1919, 215, // kvy -> Kali + 1923, 345, // kxf -> Mymr + 1927, 345, // kxk -> Mymr + 1931, 530, // kxm -> Thai + 1935, 10, // kxp -> Arab + 1939, 100, // ky -> Cyrl + 1942, 10, // ky_CN -> Arab + 1948, 215, // kyu -> Kali + 1952, 105, // kyv -> Deva + 1956, 105, // kyw -> Deva + 1960, 270, // lab -> Lina + 1964, 185, // lad -> Hebr + 1968, 105, // lae -> Deva + 1972, 10, // lah -> Arab + 1976, 280, // lbc -> Lisu + 1980, 100, // lbe -> Cyrl + 1984, 105, // lbf -> Deva + 1988, 535, // lbj -> Tibt + 1992, 105, // lbm -> Deva + 1996, 260, // lbo -> Laoo + 2000, 105, // lbr -> Deva + 2004, 530, // lcp -> Thai + 2008, 265, // lep -> Lepc + 2012, 100, // lez -> Cyrl + 2016, 105, // lhm -> Deva + 2020, 475, // lhs -> Syrc + 2024, 105, // lif -> Deva + 2028, 280, // lis -> Lisu + 2032, 535, // lkh -> Tibt + 2036, 10, // lki -> Arab + 2040, 105, // lmh -> Deva + 2044, 515, // lmn -> Telu + 2048, 260, // lo -> Laoo + 2051, 105, // loy -> Deva + 2055, 410, // lpo -> Plrd + 2059, 10, // lrc -> Arab + 2063, 10, // lrk -> Arab + 2067, 10, // lrl -> Arab + 2071, 10, // lsa -> Arab + 2075, 185, // lsd -> Hebr + 2079, 10, // lss -> Arab + 2083, 535, // luk -> Tibt + 2087, 105, // luu -> Deva + 2091, 10, // luv -> Arab + 2095, 10, // luz -> Arab + 2099, 530, // lwl -> Thai + 2103, 530, // lwm -> Thai + 2107, 535, // lya -> Tibt + 2111, 175, // lzh -> Hans + 2115, 105, // mag -> Deva + 2119, 105, // mai -> Deva + 2123, 360, // man_GN -> Nkoo + 2130, 10, // mby -> Arab + 2134, 10, // mde -> Arab + 2138, 100, // mdf -> Cyrl + 2142, 120, // mdx -> Ethi + 2146, 120, // mdy -> Ethi + 2150, 10, // mfa -> Arab + 2154, 10, // mfi -> Arab + 2158, 105, // mgp -> Deva + 2162, 10, // mhj -> Arab + 2166, 295, // mid -> Mand + 2170, 105, // mjl -> Deva + 2174, 320, // mjq -> Mlym + 2178, 320, // mjr -> Mlym + 2182, 105, // mjt -> Deva + 2186, 515, // mju -> Telu + 2190, 320, // mjv -> Mlym + 2194, 105, // mjz -> Deva + 2198, 100, // mk -> Cyrl + 2201, 105, // mkb -> Deva + 2205, 105, // mke -> Deva + 2209, 10, // mki -> Arab + 2213, 530, // mkm -> Thai + 2217, 320, // ml -> Mlym + 2220, 530, // mlf -> Thai + 2224, 100, // mn -> Cyrl + 2227, 330, // mn_CN -> Mong + 2233, 45, // mni -> Beng + 2237, 10, // mnj -> Arab + 2241, 100, // mns -> Cyrl + 2245, 345, // mnw -> Mymr + 2249, 530, // mpz -> Thai + 2253, 105, // mr -> Deva + 2256, 530, // mra -> Thai + 2260, 105, // mrd -> Deva + 2264, 100, // mrj -> Cyrl + 2268, 335, // mro -> Mroo + 2272, 105, // mrr -> Deva + 2276, 10, // ms_CC -> Arab + 2282, 100, // mtm -> Cyrl + 2286, 105, // mtr -> Deva + 2290, 100, // mud -> Cyrl + 2294, 535, // muk -> Tibt + 2298, 105, // mut -> Deva + 2302, 500, // muv -> Taml + 2306, 120, // muz -> Ethi + 2310, 330, // mvf -> Mong + 2314, 10, // mvy -> Arab + 2318, 120, // mvz -> Ethi + 2322, 105, // mwr -> Deva + 2326, 345, // mwt -> Mymr + 2330, 195, // mww -> Hmnp + 2334, 345, // my -> Mymr + 2337, 120, // mym -> Ethi + 2341, 100, // myv -> Cyrl + 2345, 295, // myz -> Mand + 2349, 10, // mzn -> Arab + 2353, 175, // nan -> Hans + 2357, 105, // nao -> Deva + 2361, 105, // ncd -> Deva + 2365, 260, // ncq -> Laoo + 2369, 100, // ndf -> Cyrl + 2373, 105, // ne -> Deva + 2376, 100, // neg -> Cyrl + 2380, 535, // neh -> Tibt + 2384, 570, // nei -> Xsux + 2388, 105, // new -> Deva + 2392, 260, // ngt -> Laoo + 2396, 100, // nio -> Cyrl + 2400, 515, // nit -> Telu + 2404, 100, // niv -> Cyrl + 2408, 10, // nli -> Arab + 2412, 10, // nlm -> Arab + 2416, 105, // nlx -> Deva + 2420, 105, // nmm -> Deva + 2424, 560, // nnp -> Wcho + 2428, 255, // nod -> Lana + 2432, 105, // noe -> Deva + 2436, 100, // nog -> Cyrl + 2440, 105, // noi -> Deva + 2444, 430, // non -> Runr + 2448, 575, // nos -> Yiii + 2452, 535, // npb -> Tibt + 2456, 360, // nqo -> Nkoo + 2460, 575, // nsd -> Yiii + 2464, 575, // nsf -> Yiii + 2468, 65, // nsk -> Cans + 2472, 540, // nst -> Tnsa + 2476, 575, // nsv -> Yiii + 2480, 575, // nty -> Yiii + 2484, 10, // ntz -> Arab + 2488, 355, // nwc -> Newa + 2492, 105, // nwx -> Deva + 2496, 530, // nyl -> Thai + 2500, 10, // nyq -> Arab + 2504, 100, // oaa -> Cyrl + 2508, 100, // oac -> Cyrl + 2512, 475, // oar -> Syrc + 2516, 125, // oav -> Geor + 2520, 405, // obm -> Phnx + 2524, 345, // obr -> Mymr + 2528, 10, // odk -> Arab + 2532, 570, // oht -> Xsux + 2536, 65, // oj -> Cans + 2539, 65, // ojs -> Cans + 2543, 165, // okm -> Hang + 2547, 170, // oko -> Hani + 2551, 235, // okz -> Khmr + 2555, 105, // ola -> Deva + 2559, 535, // ole -> Tibt + 2563, 100, // omk -> Cyrl + 2567, 340, // omp -> Mtei + 2571, 325, // omr -> Modi + 2575, 105, // oon -> Deva + 2579, 385, // or -> Orya + 2582, 515, // ort -> Telu + 2586, 10, // oru -> Arab + 2590, 100, // orv -> Cyrl + 2594, 100, // os -> Cyrl + 2597, 390, // osa -> Osge + 2601, 200, // osc -> Ital + 2605, 205, // osi -> Java + 2609, 10, // ota -> Arab + 2613, 535, // otb -> Tibt + 2617, 380, // otk -> Orkh + 2621, 145, // oty -> Gran + 2625, 160, // pa -> Guru + 2628, 10, // pa_PK -> Arab + 2634, 400, // pal -> Phli + 2638, 100, // paq -> Cyrl + 2642, 10, // pbt -> Arab + 2646, 235, // pcb -> Khmr + 2650, 345, // pce -> Mymr + 2654, 320, // pcf -> Mlym + 2658, 320, // pcg -> Mlym + 2662, 105, // pch -> Deva + 2666, 105, // pci -> Deva + 2670, 515, // pcj -> Telu + 2674, 385, // peg -> Orya + 2678, 565, // peo -> Xpeo + 2682, 230, // pgd -> Khar + 2686, 105, // pgg -> Deva + 2690, 370, // pgl -> Ogam + 2694, 200, // pgn -> Ital + 2698, 105, // phd -> Deva + 2702, 345, // phk -> Mymr + 2706, 10, // phl -> Arab + 2710, 405, // phn -> Phnx + 2714, 260, // pho -> Laoo + 2718, 10, // phr -> Arab + 2722, 530, // pht -> Thai + 2726, 10, // phv -> Arab + 2730, 105, // phw -> Deva + 2734, 455, // pi -> Sinh + 2737, 55, // pka -> Brah + 2741, 320, // pkr -> Mlym + 2745, 10, // plk -> Arab + 2749, 345, // pll -> Mymr + 2753, 55, // pmh -> Brah + 2757, 150, // pnt -> Grek + 2761, 230, // pra -> Khar + 2765, 10, // prc -> Arab + 2769, 10, // prd -> Arab + 2773, 155, // prp -> Gujr + 2777, 530, // prt -> Thai + 2781, 10, // prx -> Arab + 2785, 10, // ps -> Arab + 2788, 10, // psh -> Arab + 2792, 10, // psi -> Arab + 2796, 10, // pst -> Arab + 2800, 105, // pum -> Deva + 2804, 345, // pwo -> Mymr + 2808, 105, // pwr -> Deva + 2812, 530, // pww -> Thai + 2816, 345, // pyx -> Mymr + 2820, 10, // qxq -> Arab + 2824, 105, // raa -> Deva + 2828, 105, // rab -> Deva + 2832, 105, // raf -> Deva + 2836, 45, // rah -> Beng + 2840, 105, // raj -> Deva + 2844, 105, // rav -> Deva + 2848, 345, // rbb -> Mymr + 2852, 10, // rdb -> Arab + 2856, 385, // rei -> Orya + 2860, 425, // rhg -> Rohg + 2864, 105, // rji -> Deva + 2868, 105, // rjs -> Deva + 2872, 235, // rka -> Khmr + 2876, 345, // rki -> Mymr + 2880, 45, // rkt -> Beng + 2884, 20, // rmi -> Armn + 2888, 10, // rmt -> Arab + 2892, 345, // rmz -> Mymr + 2896, 100, // rom_BG -> Cyrl + 2903, 100, // rsk -> Cyrl + 2907, 105, // rtw -> Deva + 2911, 100, // ru -> Cyrl + 2914, 100, // rue -> Cyrl + 2918, 100, // rut -> Cyrl + 2922, 105, // rwr -> Deva + 2926, 220, // ryu -> Kana + 2930, 105, // sa -> Deva + 2933, 100, // sah -> Cyrl + 2937, 435, // sam -> Samr + 2941, 375, // sat -> Olck + 2945, 445, // saz -> Saur + 2949, 10, // sbn -> Arab + 2953, 535, // sbu -> Tibt + 2957, 105, // sck -> Deva + 2961, 10, // scl -> Arab + 2965, 10, // scl_IN -> Arab + 2972, 105, // scp -> Deva + 2976, 260, // sct -> Laoo + 2980, 485, // scu -> Takr + 2984, 150, // scx -> Grek + 2988, 10, // sd -> Arab + 2991, 105, // sd_IN -> Deva + 2997, 10, // sdb -> Arab + 3001, 10, // sdf -> Arab + 3005, 10, // sdg -> Arab + 3009, 10, // sdh -> Arab + 3013, 10, // sds -> Arab + 3017, 100, // sel -> Cyrl + 3021, 410, // sfm -> Plrd + 3025, 370, // sga -> Ogam + 3029, 100, // sgh -> Cyrl + 3033, 105, // sgj -> Deva + 3037, 10, // sgr -> Arab + 3041, 535, // sgt -> Tibt + 3045, 120, // sgw -> Ethi + 3049, 10, // sgy -> Arab + 3053, 10, // shd -> Arab + 3057, 520, // shi -> Tfng + 3061, 10, // shm -> Arab + 3065, 345, // shn -> Mymr + 3069, 10, // shu -> Arab + 3073, 10, // shv -> Arab + 3077, 455, // si -> Sinh + 3080, 100, // sia -> Cyrl + 3084, 535, // sip -> Tibt + 3088, 10, // siy -> Arab + 3092, 10, // siz -> Arab + 3096, 100, // sjd -> Cyrl + 3100, 105, // sjp -> Deva + 3104, 100, // sjt -> Cyrl + 3108, 530, // skb -> Thai + 3112, 105, // skj -> Deva + 3116, 10, // skr -> Arab + 3120, 10, // slq -> Arab + 3124, 575, // smh -> Yiii + 3128, 435, // smp -> Samr + 3132, 235, // smu -> Khmr + 3136, 10, // smy -> Arab + 3140, 510, // soa -> Tavt + 3144, 460, // sog -> Sogd + 3148, 105, // soi -> Deva + 3152, 530, // sou -> Thai + 3156, 535, // spt -> Tibt + 3160, 385, // spv -> Orya + 3164, 10, // sqo -> Arab + 3168, 260, // sqq -> Laoo + 3172, 10, // sqt -> Arab + 3176, 100, // sr -> Cyrl + 3179, 465, // srb -> Sora + 3183, 10, // srh -> Arab + 3187, 105, // srx -> Deva + 3191, 10, // srz -> Arab + 3195, 10, // ssh -> Arab + 3199, 260, // sss -> Laoo + 3203, 10, // sts -> Arab + 3207, 120, // stv -> Ethi + 3211, 100, // sty -> Cyrl + 3215, 105, // suz -> Deva + 3219, 125, // sva -> Geor + 3223, 10, // swb -> Arab + 3227, 170, // swi -> Hani + 3231, 105, // swv -> Deva + 3235, 475, // syc -> Syrc + 3239, 45, // syl -> Beng + 3243, 475, // syn -> Syrc + 3247, 475, // syr -> Syrc + 3251, 105, // syw -> Deva + 3255, 500, // ta -> Taml + 3258, 100, // tab -> Cyrl + 3262, 105, // taj -> Deva + 3266, 480, // tbk -> Tagb + 3270, 535, // tcn -> Tibt + 3274, 345, // tco -> Mymr + 3278, 500, // tcx -> Taml + 3282, 245, // tcy -> Knda + 3286, 520, // tda -> Tfng + 3290, 105, // tdb -> Deva + 3294, 490, // tdd -> Tale + 3298, 105, // tdg -> Deva + 3302, 105, // tdh -> Deva + 3306, 515, // te -> Telu + 3309, 205, // tes -> Java + 3313, 100, // tg -> Cyrl + 3316, 10, // tg_PK -> Arab + 3322, 105, // tge -> Deva + 3326, 535, // tgf -> Tibt + 3330, 530, // th -> Thai + 3333, 105, // the -> Deva + 3337, 105, // thf -> Deva + 3341, 490, // thi -> Tale + 3345, 105, // thl -> Deva + 3349, 530, // thm -> Thai + 3353, 105, // thq -> Deva + 3357, 105, // thr -> Deva + 3361, 105, // ths -> Deva + 3365, 120, // ti -> Ethi + 3368, 120, // tig -> Ethi + 3372, 105, // tij -> Deva + 3376, 100, // tin -> Cyrl + 3380, 345, // tjl -> Mymr + 3384, 10, // tjo -> Arab + 3388, 105, // tkb -> Deva + 3392, 10, // tks -> Arab + 3396, 105, // tkt -> Deva + 3400, 105, // tmk -> Deva + 3404, 475, // tmr -> Syrc + 3408, 60, // tnv -> Cakm + 3412, 10, // tov -> Arab + 3416, 235, // tpu -> Khmr + 3420, 10, // tra -> Arab + 3424, 185, // trg -> Hebr + 3428, 10, // trm -> Arab + 3432, 10, // trw -> Arab + 3436, 150, // tsd -> Grek + 3440, 535, // tsj -> Tibt + 3444, 100, // tt -> Cyrl + 3447, 260, // tth -> Laoo + 3451, 260, // tto -> Laoo + 3455, 530, // tts -> Thai + 3459, 345, // tvn -> Mymr + 3463, 105, // twm -> Deva + 3467, 505, // txg -> Tang + 3471, 545, // txo -> Toto + 3475, 510, // tyr -> Tavt + 3479, 100, // tyv -> Cyrl + 3483, 100, // ude -> Cyrl + 3487, 320, // udg -> Mlym + 3491, 0, // udi -> Aghb + 3495, 100, // udm -> Cyrl + 3499, 10, // ug -> Arab + 3502, 100, // ug_KZ -> Cyrl + 3508, 100, // ug_MN -> Cyrl + 3514, 550, // uga -> Ugar + 3518, 100, // ugh -> Cyrl + 3522, 530, // ugo -> Thai + 3526, 100, // uk -> Cyrl + 3529, 385, // uki -> Orya + 3533, 100, // ulc -> Cyrl + 3537, 45, // unr -> Beng + 3541, 105, // unr_NP -> Deva + 3548, 45, // unx -> Beng + 3552, 10, // ur -> Arab + 3555, 530, // urk -> Thai + 3559, 10, // ush -> Arab + 3563, 150, // uum -> Grek + 3567, 10, // uz_AF -> Arab + 3573, 100, // uz_CN -> Cyrl + 3579, 10, // uzs -> Arab + 3583, 500, // vaa -> Taml + 3587, 10, // vaf -> Arab + 3591, 105, // vah -> Deva + 3595, 555, // vai -> Vaii + 3599, 105, // vas -> Deva + 3603, 105, // vav -> Deva + 3607, 105, // vay -> Deva + 3611, 10, // vgr -> Arab + 3615, 245, // vmd -> Knda + 3619, 10, // vmh -> Arab + 3623, 120, // wal -> Ethi + 3627, 10, // wbk -> Arab + 3631, 515, // wbq -> Telu + 3635, 105, // wbr -> Deva + 3639, 10, // wlo -> Arab + 3643, 105, // wme -> Deva + 3647, 10, // wne -> Arab + 3651, 10, // wni -> Arab + 3655, 130, // wsg -> Gong + 3659, 10, // wsv -> Arab + 3663, 105, // wtm -> Deva + 3667, 175, // wuu -> Hans + 3671, 100, // xal -> Cyrl + 3675, 120, // xan -> Ethi + 3679, 100, // xas -> Cyrl + 3683, 85, // xco -> Chrs + 3687, 70, // xcr -> Cari + 3691, 100, // xdq -> Cyrl + 3695, 10, // xhe -> Arab + 3699, 235, // xhm -> Khmr + 3703, 385, // xis -> Orya + 3707, 10, // xka -> Arab + 3711, 10, // xkc -> Arab + 3715, 10, // xkj -> Arab + 3719, 10, // xkp -> Arab + 3723, 285, // xlc -> Lyci + 3727, 290, // xld -> Lydi + 3731, 115, // xly -> Elym + 3735, 125, // xmf -> Geor + 3739, 300, // xmn -> Mani + 3743, 315, // xmr -> Merc + 3747, 350, // xna -> Narb + 3751, 105, // xnr -> Deva + 3755, 150, // xpg -> Grek + 3759, 370, // xpi -> Ogam + 3763, 100, // xpm -> Cyrl + 3767, 415, // xpr -> Prti + 3771, 100, // xrm -> Cyrl + 3775, 100, // xrn -> Cyrl + 3779, 440, // xsa -> Sarb + 3783, 105, // xsr -> Deva + 3787, 100, // xss -> Cyrl + 3791, 500, // xub -> Taml + 3795, 500, // xuj -> Taml + 3799, 200, // xve -> Ital + 3803, 10, // xvi -> Arab + 3807, 100, // xwo -> Cyrl + 3811, 305, // xzh -> Marc + 3815, 100, // yai -> Cyrl + 3819, 105, // ybh -> Deva + 3823, 105, // ybi -> Deva + 3827, 10, // ydg -> Arab + 3831, 320, // yea -> Mlym + 3835, 150, // yej -> Grek + 3839, 515, // yeu -> Telu + 3843, 410, // ygp -> Plrd + 3847, 185, // yhd -> Hebr + 3851, 185, // yi -> Hebr + 3854, 575, // yig -> Yiii + 3858, 185, // yih -> Hebr + 3862, 575, // yiv -> Yiii + 3866, 100, // ykg -> Cyrl + 3870, 410, // yna -> Plrd + 3874, 100, // ynk -> Cyrl + 3878, 210, // yoi -> Jpan + 3882, 530, // yoy -> Thai + 3886, 100, // yrk -> Cyrl + 3890, 575, // ysd -> Yiii + 3894, 575, // ysn -> Yiii + 3898, 575, // ysp -> Yiii + 3902, 100, // ysr -> Cyrl + 3906, 410, // ysy -> Plrd + 3910, 185, // yud -> Hebr + 3914, 180, // yue -> Hant + 3918, 175, // yue_CN -> Hans + 3925, 100, // yug -> Cyrl + 3929, 100, // yux -> Cyrl + 3933, 410, // ywq -> Plrd + 3937, 410, // ywu -> Plrd + 3941, 535, // zau -> Tibt + 3945, 10, // zba -> Arab + 3949, 170, // zch -> Hani + 3953, 10, // zdj -> Arab + 3957, 170, // zeh -> Hani + 3961, 520, // zen -> Tfng + 3965, 170, // zgb -> Hani + 3969, 520, // zgh -> Tfng + 3973, 170, // zgm -> Hani + 3977, 170, // zgn -> Hani + 3981, 175, // zh -> Hans + 3984, 180, // zh_AU -> Hant + 3990, 180, // zh_BN -> Hant + 3996, 180, // zh_GB -> Hant + 4002, 180, // zh_GF -> Hant + 4008, 180, // zh_HK -> Hant + 4014, 180, // zh_ID -> Hant + 4020, 180, // zh_MO -> Hant + 4026, 180, // zh_PA -> Hant + 4032, 180, // zh_PF -> Hant + 4038, 180, // zh_PH -> Hant + 4044, 180, // zh_SR -> Hant + 4050, 180, // zh_TH -> Hant + 4056, 180, // zh_TW -> Hant + 4062, 180, // zh_US -> Hant + 4068, 180, // zh_VN -> Hant + 4074, 170, // zhd -> Hani + 4078, 365, // zhx -> Nshu + 4082, 100, // zkb -> Cyrl + 4086, 100, // zko -> Cyrl + 4090, 240, // zkt -> Kits + 4094, 100, // zkz -> Cyrl + 4098, 170, // zlj -> Hani + 4102, 170, // zln -> Hani + 4106, 170, // zlq -> Hani + 4110, 170, // zqe -> Hani + 4114, 185, // zrp -> Hebr + 4118, 10, // zum -> Arab + 4122, 170, // zyg -> Hani + 4126, 170, // zyn -> Hani + 4130, 170, // zzj -> Hani }; //====================================================================== @@ -1150,35 +1138,36 @@ const char parentLocaleChars[] = "en_AU\0en_BB\0en_BE\0en_BM\0en_BS\0en_BW\0en_BZ\0en_CC\0en_CH\0" "en_CK\0en_CM\0en_CX\0en_CY\0en_DE\0en_DG\0en_DK\0en_DM\0en_Dsrt\0" "en_ER\0en_FI\0en_FJ\0en_FK\0en_FM\0en_GB\0en_GD\0en_GG\0en_GH\0" - "en_GI\0en_GM\0en_GY\0en_HK\0en_IE\0en_IL\0en_IM\0en_IN\0en_IO\0" - "en_JE\0en_JM\0en_KE\0en_KI\0en_KN\0en_KY\0en_LC\0en_LR\0en_LS\0" - "en_MG\0en_MO\0en_MS\0en_MT\0en_MU\0en_MV\0en_MW\0en_MY\0en_NA\0" - "en_NF\0en_NG\0en_NL\0en_NR\0en_NU\0en_NZ\0en_PG\0en_PK\0en_PN\0" - "en_PW\0en_RW\0en_SB\0en_SC\0en_SD\0en_SE\0en_SG\0en_SH\0en_SI\0" - "en_SL\0en_SS\0en_SX\0en_SZ\0en_Shaw\0en_TC\0en_TK\0en_TO\0en_TT\0" - "en_TV\0en_TZ\0en_UG\0en_VC\0en_VG\0en_VU\0en_WS\0en_ZA\0en_ZM\0" - "en_ZW\0es_419\0es_AR\0es_BO\0es_BR\0es_BZ\0es_CL\0es_CO\0es_CR\0" - "es_CU\0es_DO\0es_EC\0es_GT\0es_HN\0es_MX\0es_NI\0es_PA\0es_PE\0" - "es_PR\0es_PY\0es_SV\0es_US\0es_UY\0es_VE\0ff_Adlm\0ff_Arab\0fr_HT\0" - "ha_Arab\0hi_Latn\0ht\0iu_Latn\0kk_Arab\0ks_Deva\0ku_Arab\0ky_Arab\0" - "ky_Latn\0ml_Arab\0mn_Mong\0mni_Mtei\0ms_Arab\0nb\0nn\0no\0no_NO\0" - "pa_Arab\0pt_AO\0pt_CH\0pt_CV\0pt_FR\0pt_GQ\0pt_GW\0pt_LU\0pt_MO\0" - "pt_MZ\0pt_PT\0pt_ST\0pt_TL\0root\0sat_Deva\0sd_Deva\0sd_Khoj\0" - "sd_Sind\0shi_Latn\0so_Arab\0sr_Latn\0sw_Arab\0tg_Arab\0ug_Cyrl\0" - "uz_Arab\0uz_Cyrl\0vai_Latn\0wo_Arab\0yo_Arab\0yue_Hans\0zh_Hant\0" - "zh_Hant_HK\0zh_Hant_MO\0"; + "en_GI\0en_GM\0en_GY\0en_HK\0en_ID\0en_IE\0en_IL\0en_IM\0en_IN\0" + "en_IO\0en_JE\0en_JM\0en_KE\0en_KI\0en_KN\0en_KY\0en_LC\0en_LR\0" + "en_LS\0en_MG\0en_MO\0en_MS\0en_MT\0en_MU\0en_MV\0en_MW\0en_MY\0" + "en_NA\0en_NF\0en_NG\0en_NL\0en_NR\0en_NU\0en_NZ\0en_PG\0en_PK\0" + "en_PN\0en_PW\0en_RW\0en_SB\0en_SC\0en_SD\0en_SE\0en_SG\0en_SH\0" + "en_SI\0en_SL\0en_SS\0en_SX\0en_SZ\0en_Shaw\0en_TC\0en_TK\0en_TO\0" + "en_TT\0en_TV\0en_TZ\0en_UG\0en_VC\0en_VG\0en_VU\0en_WS\0en_ZA\0" + "en_ZM\0en_ZW\0es_419\0es_AR\0es_BO\0es_BR\0es_BZ\0es_CL\0es_CO\0" + "es_CR\0es_CU\0es_DO\0es_EC\0es_GT\0es_HN\0es_JP\0es_MX\0es_NI\0" + "es_PA\0es_PE\0es_PR\0es_PY\0es_SV\0es_US\0es_UY\0es_VE\0ff_Adlm\0" + "ff_Arab\0fr_HT\0ha_Arab\0hi_Latn\0ht\0iu_Latn\0kk_Arab\0ks_Deva\0" + "ku_Arab\0kxv_Deva\0kxv_Orya\0kxv_Telu\0ky_Arab\0ky_Latn\0ml_Arab\0" + "mn_Mong\0mni_Mtei\0ms_Arab\0nb\0nn\0no\0no_NO\0pa_Arab\0pt_AO\0" + "pt_CH\0pt_CV\0pt_FR\0pt_GQ\0pt_GW\0pt_LU\0pt_MO\0pt_MZ\0pt_PT\0" + "pt_ST\0pt_TL\0root\0sat_Deva\0sd_Deva\0sd_Khoj\0sd_Sind\0shi_Latn\0" + "so_Arab\0sr_Latn\0sw_Arab\0tg_Arab\0ug_Cyrl\0uz_Arab\0uz_Cyrl\0" + "vai_Latn\0wo_Arab\0yo_Arab\0yue_Hans\0zh_Hant\0zh_Hant_HK\0zh_Hant_MO\0" + ""; const int32_t parentLocaleTable[] = { - 0, 1023, // az_Arab -> root - 8, 1023, // az_Cyrl -> root - 16, 1023, // bal_Latn -> root - 25, 1023, // blt_Latn -> root - 34, 1023, // bm_Nkoo -> root - 42, 1023, // bs_Cyrl -> root - 50, 1023, // byn_Latn -> root - 59, 1023, // cu_Glag -> root - 67, 1023, // dje_Arab -> root - 76, 1023, // dyo_Arab -> root + 0, 1062, // az_Arab -> root + 8, 1062, // az_Cyrl -> root + 16, 1062, // bal_Latn -> root + 25, 1062, // blt_Latn -> root + 34, 1062, // bm_Nkoo -> root + 42, 1062, // bs_Cyrl -> root + 50, 1062, // byn_Latn -> root + 59, 1062, // cu_Glag -> root + 67, 1062, // dje_Arab -> root + 76, 1062, // dyo_Arab -> root 92, 85, // en_150 -> en_001 99, 85, // en_AG -> en_001 105, 85, // en_AI -> en_001 @@ -1200,7 +1189,7 @@ const int32_t parentLocaleTable[] = { 201, 85, // en_DG -> en_001 207, 92, // en_DK -> en_150 213, 85, // en_DM -> en_001 - 219, 1023, // en_Dsrt -> root + 219, 1062, // en_Dsrt -> root 227, 85, // en_ER -> en_001 233, 92, // en_FI -> en_150 239, 85, // en_FJ -> en_001 @@ -1214,136 +1203,141 @@ const int32_t parentLocaleTable[] = { 287, 85, // en_GM -> en_001 293, 85, // en_GY -> en_001 299, 85, // en_HK -> en_001 - 305, 85, // en_IE -> en_001 - 311, 85, // en_IL -> en_001 - 317, 85, // en_IM -> en_001 - 323, 85, // en_IN -> en_001 - 329, 85, // en_IO -> en_001 - 335, 85, // en_JE -> en_001 - 341, 85, // en_JM -> en_001 - 347, 85, // en_KE -> en_001 - 353, 85, // en_KI -> en_001 - 359, 85, // en_KN -> en_001 - 365, 85, // en_KY -> en_001 - 371, 85, // en_LC -> en_001 - 377, 85, // en_LR -> en_001 - 383, 85, // en_LS -> en_001 - 389, 85, // en_MG -> en_001 - 395, 85, // en_MO -> en_001 - 401, 85, // en_MS -> en_001 - 407, 85, // en_MT -> en_001 - 413, 85, // en_MU -> en_001 - 419, 85, // en_MV -> en_001 - 425, 85, // en_MW -> en_001 - 431, 85, // en_MY -> en_001 - 437, 85, // en_NA -> en_001 - 443, 85, // en_NF -> en_001 - 449, 85, // en_NG -> en_001 - 455, 92, // en_NL -> en_150 - 461, 85, // en_NR -> en_001 - 467, 85, // en_NU -> en_001 - 473, 85, // en_NZ -> en_001 - 479, 85, // en_PG -> en_001 - 485, 85, // en_PK -> en_001 - 491, 85, // en_PN -> en_001 - 497, 85, // en_PW -> en_001 - 503, 85, // en_RW -> en_001 - 509, 85, // en_SB -> en_001 - 515, 85, // en_SC -> en_001 - 521, 85, // en_SD -> en_001 - 527, 92, // en_SE -> en_150 - 533, 85, // en_SG -> en_001 - 539, 85, // en_SH -> en_001 - 545, 92, // en_SI -> en_150 - 551, 85, // en_SL -> en_001 - 557, 85, // en_SS -> en_001 - 563, 85, // en_SX -> en_001 - 569, 85, // en_SZ -> en_001 - 575, 1023, // en_Shaw -> root - 583, 85, // en_TC -> en_001 - 589, 85, // en_TK -> en_001 - 595, 85, // en_TO -> en_001 - 601, 85, // en_TT -> en_001 - 607, 85, // en_TV -> en_001 - 613, 85, // en_TZ -> en_001 - 619, 85, // en_UG -> en_001 - 625, 85, // en_VC -> en_001 - 631, 85, // en_VG -> en_001 - 637, 85, // en_VU -> en_001 - 643, 85, // en_WS -> en_001 - 649, 85, // en_ZA -> en_001 - 655, 85, // en_ZM -> en_001 - 661, 85, // en_ZW -> en_001 - 674, 667, // es_AR -> es_419 - 680, 667, // es_BO -> es_419 - 686, 667, // es_BR -> es_419 - 692, 667, // es_BZ -> es_419 - 698, 667, // es_CL -> es_419 - 704, 667, // es_CO -> es_419 - 710, 667, // es_CR -> es_419 - 716, 667, // es_CU -> es_419 - 722, 667, // es_DO -> es_419 - 728, 667, // es_EC -> es_419 - 734, 667, // es_GT -> es_419 - 740, 667, // es_HN -> es_419 - 746, 667, // es_MX -> es_419 - 752, 667, // es_NI -> es_419 - 758, 667, // es_PA -> es_419 - 764, 667, // es_PE -> es_419 - 770, 667, // es_PR -> es_419 - 776, 667, // es_PY -> es_419 - 782, 667, // es_SV -> es_419 - 788, 667, // es_US -> es_419 - 794, 667, // es_UY -> es_419 - 800, 667, // es_VE -> es_419 - 806, 1023, // ff_Adlm -> root - 814, 1023, // ff_Arab -> root - 828, 1023, // ha_Arab -> root - 836, 323, // hi_Latn -> en_IN - 844, 822, // ht -> fr_HT - 847, 1023, // iu_Latn -> root - 855, 1023, // kk_Arab -> root - 863, 1023, // ks_Deva -> root - 871, 1023, // ku_Arab -> root - 879, 1023, // ky_Arab -> root - 887, 1023, // ky_Latn -> root - 895, 1023, // ml_Arab -> root - 903, 1023, // mn_Mong -> root - 911, 1023, // mni_Mtei -> root - 920, 1023, // ms_Arab -> root - 928, 934, // nb -> no - 931, 934, // nn -> no - 937, 934, // no_NO -> no - 943, 1023, // pa_Arab -> root - 951, 1005, // pt_AO -> pt_PT - 957, 1005, // pt_CH -> pt_PT - 963, 1005, // pt_CV -> pt_PT - 969, 1005, // pt_FR -> pt_PT - 975, 1005, // pt_GQ -> pt_PT - 981, 1005, // pt_GW -> pt_PT - 987, 1005, // pt_LU -> pt_PT - 993, 1005, // pt_MO -> pt_PT - 999, 1005, // pt_MZ -> pt_PT - 1011, 1005, // pt_ST -> pt_PT - 1017, 1005, // pt_TL -> pt_PT - 1028, 1023, // sat_Deva -> root - 1037, 1023, // sd_Deva -> root - 1045, 1023, // sd_Khoj -> root - 1053, 1023, // sd_Sind -> root - 1061, 1023, // shi_Latn -> root - 1070, 1023, // so_Arab -> root - 1078, 1023, // sr_Latn -> root - 1086, 1023, // sw_Arab -> root - 1094, 1023, // tg_Arab -> root - 1102, 1023, // ug_Cyrl -> root - 1110, 1023, // uz_Arab -> root - 1118, 1023, // uz_Cyrl -> root - 1126, 1023, // vai_Latn -> root - 1135, 1023, // wo_Arab -> root - 1143, 1023, // yo_Arab -> root - 1151, 1023, // yue_Hans -> root - 1160, 1023, // zh_Hant -> root - 1179, 1168, // zh_Hant_MO -> zh_Hant_HK + 305, 85, // en_ID -> en_001 + 311, 85, // en_IE -> en_001 + 317, 85, // en_IL -> en_001 + 323, 85, // en_IM -> en_001 + 329, 85, // en_IN -> en_001 + 335, 85, // en_IO -> en_001 + 341, 85, // en_JE -> en_001 + 347, 85, // en_JM -> en_001 + 353, 85, // en_KE -> en_001 + 359, 85, // en_KI -> en_001 + 365, 85, // en_KN -> en_001 + 371, 85, // en_KY -> en_001 + 377, 85, // en_LC -> en_001 + 383, 85, // en_LR -> en_001 + 389, 85, // en_LS -> en_001 + 395, 85, // en_MG -> en_001 + 401, 85, // en_MO -> en_001 + 407, 85, // en_MS -> en_001 + 413, 85, // en_MT -> en_001 + 419, 85, // en_MU -> en_001 + 425, 85, // en_MV -> en_001 + 431, 85, // en_MW -> en_001 + 437, 85, // en_MY -> en_001 + 443, 85, // en_NA -> en_001 + 449, 85, // en_NF -> en_001 + 455, 85, // en_NG -> en_001 + 461, 92, // en_NL -> en_150 + 467, 85, // en_NR -> en_001 + 473, 85, // en_NU -> en_001 + 479, 85, // en_NZ -> en_001 + 485, 85, // en_PG -> en_001 + 491, 85, // en_PK -> en_001 + 497, 85, // en_PN -> en_001 + 503, 85, // en_PW -> en_001 + 509, 85, // en_RW -> en_001 + 515, 85, // en_SB -> en_001 + 521, 85, // en_SC -> en_001 + 527, 85, // en_SD -> en_001 + 533, 92, // en_SE -> en_150 + 539, 85, // en_SG -> en_001 + 545, 85, // en_SH -> en_001 + 551, 92, // en_SI -> en_150 + 557, 85, // en_SL -> en_001 + 563, 85, // en_SS -> en_001 + 569, 85, // en_SX -> en_001 + 575, 85, // en_SZ -> en_001 + 581, 1062, // en_Shaw -> root + 589, 85, // en_TC -> en_001 + 595, 85, // en_TK -> en_001 + 601, 85, // en_TO -> en_001 + 607, 85, // en_TT -> en_001 + 613, 85, // en_TV -> en_001 + 619, 85, // en_TZ -> en_001 + 625, 85, // en_UG -> en_001 + 631, 85, // en_VC -> en_001 + 637, 85, // en_VG -> en_001 + 643, 85, // en_VU -> en_001 + 649, 85, // en_WS -> en_001 + 655, 85, // en_ZA -> en_001 + 661, 85, // en_ZM -> en_001 + 667, 85, // en_ZW -> en_001 + 680, 673, // es_AR -> es_419 + 686, 673, // es_BO -> es_419 + 692, 673, // es_BR -> es_419 + 698, 673, // es_BZ -> es_419 + 704, 673, // es_CL -> es_419 + 710, 673, // es_CO -> es_419 + 716, 673, // es_CR -> es_419 + 722, 673, // es_CU -> es_419 + 728, 673, // es_DO -> es_419 + 734, 673, // es_EC -> es_419 + 740, 673, // es_GT -> es_419 + 746, 673, // es_HN -> es_419 + 752, 673, // es_JP -> es_419 + 758, 673, // es_MX -> es_419 + 764, 673, // es_NI -> es_419 + 770, 673, // es_PA -> es_419 + 776, 673, // es_PE -> es_419 + 782, 673, // es_PR -> es_419 + 788, 673, // es_PY -> es_419 + 794, 673, // es_SV -> es_419 + 800, 673, // es_US -> es_419 + 806, 673, // es_UY -> es_419 + 812, 673, // es_VE -> es_419 + 818, 1062, // ff_Adlm -> root + 826, 1062, // ff_Arab -> root + 840, 1062, // ha_Arab -> root + 848, 329, // hi_Latn -> en_IN + 856, 834, // ht -> fr_HT + 859, 1062, // iu_Latn -> root + 867, 1062, // kk_Arab -> root + 875, 1062, // ks_Deva -> root + 883, 1062, // ku_Arab -> root + 891, 1062, // kxv_Deva -> root + 900, 1062, // kxv_Orya -> root + 909, 1062, // kxv_Telu -> root + 918, 1062, // ky_Arab -> root + 926, 1062, // ky_Latn -> root + 934, 1062, // ml_Arab -> root + 942, 1062, // mn_Mong -> root + 950, 1062, // mni_Mtei -> root + 959, 1062, // ms_Arab -> root + 967, 973, // nb -> no + 970, 973, // nn -> no + 976, 973, // no_NO -> no + 982, 1062, // pa_Arab -> root + 990, 1044, // pt_AO -> pt_PT + 996, 1044, // pt_CH -> pt_PT + 1002, 1044, // pt_CV -> pt_PT + 1008, 1044, // pt_FR -> pt_PT + 1014, 1044, // pt_GQ -> pt_PT + 1020, 1044, // pt_GW -> pt_PT + 1026, 1044, // pt_LU -> pt_PT + 1032, 1044, // pt_MO -> pt_PT + 1038, 1044, // pt_MZ -> pt_PT + 1050, 1044, // pt_ST -> pt_PT + 1056, 1044, // pt_TL -> pt_PT + 1067, 1062, // sat_Deva -> root + 1076, 1062, // sd_Deva -> root + 1084, 1062, // sd_Khoj -> root + 1092, 1062, // sd_Sind -> root + 1100, 1062, // shi_Latn -> root + 1109, 1062, // so_Arab -> root + 1117, 1062, // sr_Latn -> root + 1125, 1062, // sw_Arab -> root + 1133, 1062, // tg_Arab -> root + 1141, 1062, // ug_Cyrl -> root + 1149, 1062, // uz_Arab -> root + 1157, 1062, // uz_Cyrl -> root + 1165, 1062, // vai_Latn -> root + 1174, 1062, // wo_Arab -> root + 1182, 1062, // yo_Arab -> root + 1190, 1062, // yue_Hans -> root + 1199, 1062, // zh_Hant -> root + 1218, 1207, // zh_Hant_MO -> zh_Hant_HK }; diff --git a/deps/icu-small/source/common/localematcher.cpp b/deps/icu-small/source/common/localematcher.cpp index 5f8c703df713ca..6fc578af118bc0 100644 --- a/deps/icu-small/source/common/localematcher.cpp +++ b/deps/icu-small/source/common/localematcher.cpp @@ -307,7 +307,7 @@ LSR getMaximalLsrOrUnd(const XLikelySubtags &likelySubtags, const Locale &locale if (U_FAILURE(errorCode) || locale.isBogus() || *locale.getName() == 0 /* "und" */) { return UND_LSR; } else { - return likelySubtags.makeMaximizedLsrFrom(locale, errorCode); + return likelySubtags.makeMaximizedLsrFrom(locale, false, errorCode); } } diff --git a/deps/icu-small/source/common/locid.cpp b/deps/icu-small/source/common/locid.cpp index 70a794ae076ea5..64ff63f3611f58 100644 --- a/deps/icu-small/source/common/locid.cpp +++ b/deps/icu-small/source/common/locid.cpp @@ -563,7 +563,7 @@ class AliasDataBuilder { LocalMemory& replacementIndexes, int32_t &length, void (*checkType)(const char* type), - void (*checkReplacement)(const UnicodeString& replacement), + void (*checkReplacement)(const UChar* replacement), UErrorCode &status); // Read the languageAlias data from alias to @@ -700,7 +700,7 @@ AliasDataBuilder::readAlias( LocalMemory& replacementIndexes, int32_t &length, void (*checkType)(const char* type), - void (*checkReplacement)(const UnicodeString& replacement), + void (*checkReplacement)(const UChar* replacement), UErrorCode &status) { if (U_FAILURE(status)) { return; @@ -720,8 +720,8 @@ AliasDataBuilder::readAlias( LocalUResourceBundlePointer res( ures_getNextResource(alias, nullptr, &status)); const char* aliasFrom = ures_getKey(res.getAlias()); - UnicodeString aliasTo = - ures_getUnicodeStringByKey(res.getAlias(), "replacement", &status); + const UChar* aliasTo = + ures_getStringByKey(res.getAlias(), "replacement", nullptr, &status); if (U_FAILURE(status)) return; checkType(aliasFrom); @@ -766,7 +766,7 @@ AliasDataBuilder::readLanguageAlias( #else [](const char*) {}, #endif - [](const UnicodeString&) {}, status); + [](const UChar*) {}, status); } /** @@ -790,12 +790,12 @@ AliasDataBuilder::readScriptAlias( [](const char* type) { U_ASSERT(uprv_strlen(type) == 4); }, - [](const UnicodeString& replacement) { - U_ASSERT(replacement.length() == 4); + [](const UChar* replacement) { + U_ASSERT(u_strlen(replacement) == 4); }, #else [](const char*) {}, - [](const UnicodeString&) { }, + [](const UChar*) { }, #endif status); } @@ -824,7 +824,7 @@ AliasDataBuilder::readTerritoryAlias( #else [](const char*) {}, #endif - [](const UnicodeString&) { }, + [](const UChar*) { }, status); } @@ -851,15 +851,16 @@ AliasDataBuilder::readVariantAlias( U_ASSERT(uprv_strlen(type) != 4 || (type[0] >= '0' && type[0] <= '9')); }, - [](const UnicodeString& replacement) { - U_ASSERT(replacement.length() >= 4 && replacement.length() <= 8); - U_ASSERT(replacement.length() != 4 || - (replacement.charAt(0) >= u'0' && - replacement.charAt(0) <= u'9')); + [](const UChar* replacement) { + int32_t len = u_strlen(replacement); + U_ASSERT(len >= 4 && len <= 8); + U_ASSERT(len != 4 || + (*replacement >= u'0' && + *replacement <= u'9')); }, #else [](const char*) {}, - [](const UnicodeString&) { }, + [](const UChar*) { }, #endif status); } @@ -888,7 +889,7 @@ AliasDataBuilder::readSubdivisionAlias( #else [](const char*) {}, #endif - [](const UnicodeString&) { }, + [](const UChar*) { }, status); } @@ -1066,7 +1067,13 @@ class AliasReplacer { public: AliasReplacer(UErrorCode status) : language(nullptr), script(nullptr), region(nullptr), - extensions(nullptr), variants(status), + extensions(nullptr), + // store value in variants only once + variants(nullptr, + ([](UElement e1, UElement e2) -> UBool { + return 0==uprv_strcmp((const char*)e1.pointer, + (const char*)e2.pointer);}), + status), data(nullptr) { } ~AliasReplacer() { @@ -1652,10 +1659,16 @@ AliasReplacer::replace(const Locale& locale, CharString& out, UErrorCode& status while ((end = uprv_strchr(start, SEP_CHAR)) != nullptr && U_SUCCESS(status)) { *end = NULL_CHAR; // null terminate inside variantsBuff - variants.addElement(start, status); + // do not add "" or duplicate data to variants + if (*start && !variants.contains(start)) { + variants.addElement(start, status); + } start = end + 1; } - variants.addElement(start, status); + // do not add "" or duplicate data to variants + if (*start && !variants.contains(start)) { + variants.addElement(start, status); + } } if (U_FAILURE(status)) { return false; } @@ -2079,6 +2092,10 @@ Locale::addLikelySubtags(UErrorCode& status) { void Locale::minimizeSubtags(UErrorCode& status) { + Locale::minimizeSubtags(false, status); +} +void +Locale::minimizeSubtags(bool favorScript, UErrorCode& status) { if (U_FAILURE(status)) { return; } @@ -2086,7 +2103,7 @@ Locale::minimizeSubtags(UErrorCode& status) { CharString minimizedLocaleID; { CharStringByteSink sink(&minimizedLocaleID); - ulocimp_minimizeSubtags(fullName, sink, &status); + ulocimp_minimizeSubtags(fullName, sink, favorScript, &status); } if (U_FAILURE(status)) { @@ -2402,8 +2419,9 @@ Locale::getLocaleCache() } class KeywordEnumeration : public StringEnumeration { -private: +protected: char *keywords; +private: char *current; int32_t length; UnicodeString currUSKey; @@ -2510,6 +2528,17 @@ class UnicodeKeywordEnumeration : public KeywordEnumeration { if (resultLength != nullptr) *resultLength = 0; return nullptr; } + virtual int32_t count(UErrorCode &/*status*/) const override { + char *kw = keywords; + int32_t result = 0; + while(*kw) { + if (uloc_toUnicodeLocaleKey(kw) != nullptr) { + result++; + } + kw += uprv_strlen(kw)+1; + } + return result; + } }; // Out-of-line virtual destructor to serve as the "key function". diff --git a/deps/icu-small/source/common/loclikely.cpp b/deps/icu-small/source/common/loclikely.cpp index d2a05c63644070..eedfb8149e26d8 100644 --- a/deps/icu-small/source/common/loclikely.cpp +++ b/deps/icu-small/source/common/loclikely.cpp @@ -31,82 +31,10 @@ #include "charstr.h" #include "cmemory.h" #include "cstring.h" +#include "loclikelysubtags.h" #include "ulocimp.h" #include "ustr_imp.h" -/** - * These are the canonical strings for unknown languages, scripts and regions. - **/ -static const char* const unknownLanguage = "und"; -static const char* const unknownScript = "Zzzz"; -static const char* const unknownRegion = "ZZ"; - -/** - * This function looks for the localeID in the likelySubtags resource. - * - * @param localeID The tag to find. - * @param buffer A buffer to hold the matching entry - * @param bufferLength The length of the output buffer - * @return A pointer to "buffer" if found, or a null pointer if not. - */ -static const char* U_CALLCONV -findLikelySubtags(const char* localeID, - char* buffer, - int32_t bufferLength, - UErrorCode* err) { - const char* result = nullptr; - - if (!U_FAILURE(*err)) { - int32_t resLen = 0; - const char16_t* s = nullptr; - UErrorCode tmpErr = U_ZERO_ERROR; - icu::LocalUResourceBundlePointer subtags(ures_openDirect(nullptr, "likelySubtags", &tmpErr)); - if (U_SUCCESS(tmpErr)) { - icu::CharString und; - if (localeID != nullptr) { - if (*localeID == '\0') { - localeID = unknownLanguage; - } else if (*localeID == '_') { - und.append(unknownLanguage, *err); - und.append(localeID, *err); - if (U_FAILURE(*err)) { - return nullptr; - } - localeID = und.data(); - } - } - s = ures_getStringByKey(subtags.getAlias(), localeID, &resLen, &tmpErr); - - if (U_FAILURE(tmpErr)) { - /* - * If a resource is missing, it's not really an error, it's - * just that we don't have any data for that particular locale ID. - */ - if (tmpErr != U_MISSING_RESOURCE_ERROR) { - *err = tmpErr; - } - } - else if (resLen >= bufferLength) { - /* The buffer should never overflow. */ - *err = U_INTERNAL_PROGRAM_ERROR; - } - else { - u_UCharsToChars(s, buffer, resLen + 1); - if (resLen >= 3 && - uprv_strnicmp(buffer, unknownLanguage, 3) == 0 && - (resLen == 3 || buffer[3] == '_')) { - uprv_memmove(buffer, buffer + 3, resLen - 3 + 1); - } - result = buffer; - } - } else { - *err = tmpErr; - } - } - - return result; -} - /** * Append a tag to a buffer, adding the separator if necessary. The buffer * must be large enough to contain the resulting tag plus any separator @@ -360,57 +288,6 @@ createTagStringWithAlternates( } } -/** - * Create a tag string from the supplied parameters. The lang, script and region - * parameters may be nullptr pointers. If they are, their corresponding length parameters - * must be less than or equal to 0. If the lang parameter is an empty string, the - * default value for an unknown language is written to the output buffer. - * - * If the length of the new string exceeds the capacity of the output buffer, - * the function copies as many bytes to the output buffer as it can, and returns - * the error U_BUFFER_OVERFLOW_ERROR. - * - * If an illegal argument is provided, the function returns the error - * U_ILLEGAL_ARGUMENT_ERROR. - * - * @param lang The language tag to use. - * @param langLength The length of the language tag. - * @param script The script tag to use. - * @param scriptLength The length of the script tag. - * @param region The region tag to use. - * @param regionLength The length of the region tag. - * @param trailing Any trailing data to append to the new tag. - * @param trailingLength The length of the trailing data. - * @param sink The output sink receiving the tag string. - * @param err A pointer to a UErrorCode for error reporting. - **/ -static void U_CALLCONV -createTagString( - const char* lang, - int32_t langLength, - const char* script, - int32_t scriptLength, - const char* region, - int32_t regionLength, - const char* trailing, - int32_t trailingLength, - icu::ByteSink& sink, - UErrorCode* err) -{ - createTagStringWithAlternates( - lang, - langLength, - script, - scriptLength, - region, - regionLength, - trailing, - trailingLength, - nullptr, - sink, - err); -} - /** * Parse the language, script, and region subtags from a tag string, and copy the * results into the corresponding output parameters. The buffers are null-terminated, @@ -494,13 +371,6 @@ parseTagString( *scriptLength = subtagLength; if (*scriptLength > 0) { - if (uprv_strnicmp(script, unknownScript, *scriptLength) == 0) { - /** - * If the script part is the "unknown" script, then don't return it. - **/ - *scriptLength = 0; - } - /* * Move past any separator. */ @@ -517,14 +387,7 @@ parseTagString( *regionLength = subtagLength; - if (*regionLength > 0) { - if (uprv_strnicmp(region, unknownRegion, *regionLength) == 0) { - /** - * If the region part is the "unknown" region, then don't return it. - **/ - *regionLength = 0; - } - } else if (*position != 0 && *position != '@') { + if (*regionLength <= 0 && *position != 0 && *position != '@') { /* back up over consumed trailing separator */ --position; } @@ -546,264 +409,6 @@ parseTagString( goto exit; } -static UBool U_CALLCONV -createLikelySubtagsString( - const char* lang, - int32_t langLength, - const char* script, - int32_t scriptLength, - const char* region, - int32_t regionLength, - const char* variants, - int32_t variantsLength, - icu::ByteSink& sink, - UErrorCode* err) { - /** - * ULOC_FULLNAME_CAPACITY will provide enough capacity - * that we can build a string that contains the language, - * script and region code without worrying about overrunning - * the user-supplied buffer. - **/ - char likelySubtagsBuffer[ULOC_FULLNAME_CAPACITY]; - - if(U_FAILURE(*err)) { - goto error; - } - - /** - * Try the language with the script and region first. - **/ - if (scriptLength > 0 && regionLength > 0) { - - const char* likelySubtags = nullptr; - - icu::CharString tagBuffer; - { - icu::CharStringByteSink sink(&tagBuffer); - createTagString( - lang, - langLength, - script, - scriptLength, - region, - regionLength, - nullptr, - 0, - sink, - err); - } - if(U_FAILURE(*err)) { - goto error; - } - - likelySubtags = - findLikelySubtags( - tagBuffer.data(), - likelySubtagsBuffer, - sizeof(likelySubtagsBuffer), - err); - if(U_FAILURE(*err)) { - goto error; - } - - if (likelySubtags != nullptr) { - /* Always use the language tag from the - maximal string, since it may be more - specific than the one provided. */ - createTagStringWithAlternates( - nullptr, - 0, - nullptr, - 0, - nullptr, - 0, - variants, - variantsLength, - likelySubtags, - sink, - err); - return true; - } - } - - /** - * Try the language with just the script. - **/ - if (scriptLength > 0) { - - const char* likelySubtags = nullptr; - - icu::CharString tagBuffer; - { - icu::CharStringByteSink sink(&tagBuffer); - createTagString( - lang, - langLength, - script, - scriptLength, - nullptr, - 0, - nullptr, - 0, - sink, - err); - } - if(U_FAILURE(*err)) { - goto error; - } - - likelySubtags = - findLikelySubtags( - tagBuffer.data(), - likelySubtagsBuffer, - sizeof(likelySubtagsBuffer), - err); - if(U_FAILURE(*err)) { - goto error; - } - - if (likelySubtags != nullptr) { - /* Always use the language tag from the - maximal string, since it may be more - specific than the one provided. */ - createTagStringWithAlternates( - nullptr, - 0, - nullptr, - 0, - region, - regionLength, - variants, - variantsLength, - likelySubtags, - sink, - err); - return true; - } - } - - /** - * Try the language with just the region. - **/ - if (regionLength > 0) { - - const char* likelySubtags = nullptr; - - icu::CharString tagBuffer; - { - icu::CharStringByteSink sink(&tagBuffer); - createTagString( - lang, - langLength, - nullptr, - 0, - region, - regionLength, - nullptr, - 0, - sink, - err); - } - if(U_FAILURE(*err)) { - goto error; - } - - likelySubtags = - findLikelySubtags( - tagBuffer.data(), - likelySubtagsBuffer, - sizeof(likelySubtagsBuffer), - err); - if(U_FAILURE(*err)) { - goto error; - } - - if (likelySubtags != nullptr) { - /* Always use the language tag from the - maximal string, since it may be more - specific than the one provided. */ - createTagStringWithAlternates( - nullptr, - 0, - script, - scriptLength, - nullptr, - 0, - variants, - variantsLength, - likelySubtags, - sink, - err); - return true; - } - } - - /** - * Finally, try just the language. - **/ - { - const char* likelySubtags = nullptr; - - icu::CharString tagBuffer; - { - icu::CharStringByteSink sink(&tagBuffer); - createTagString( - lang, - langLength, - nullptr, - 0, - nullptr, - 0, - nullptr, - 0, - sink, - err); - } - if(U_FAILURE(*err)) { - goto error; - } - - likelySubtags = - findLikelySubtags( - tagBuffer.data(), - likelySubtagsBuffer, - sizeof(likelySubtagsBuffer), - err); - if(U_FAILURE(*err)) { - goto error; - } - - if (likelySubtags != nullptr) { - /* Always use the language tag from the - maximal string, since it may be more - specific than the one provided. */ - createTagStringWithAlternates( - nullptr, - 0, - script, - scriptLength, - region, - regionLength, - variants, - variantsLength, - likelySubtags, - sink, - err); - return true; - } - } - - return false; - -error: - - if (!U_FAILURE(*err)) { - *err = U_ILLEGAL_ARGUMENT_ERROR; - } - - return false; -} - #define CHECK_TRAILING_VARIANT_SIZE(trailing, trailingLength) UPRV_BLOCK_MACRO_BEGIN { \ int32_t count = 0; \ int32_t i; \ @@ -836,7 +441,6 @@ _uloc_addLikelySubtags(const char* localeID, const char* trailing = ""; int32_t trailingLength = 0; int32_t trailingIndex = 0; - UBool success = false; if(U_FAILURE(*err)) { goto error; @@ -862,6 +466,9 @@ _uloc_addLikelySubtags(const char* localeID, goto error; } + if (langLength > 3) { + goto error; + } /* Find the length of the trailing portion. */ while (_isIDSeparator(localeID[trailingIndex])) { @@ -871,30 +478,42 @@ _uloc_addLikelySubtags(const char* localeID, trailingLength = (int32_t)uprv_strlen(trailing); CHECK_TRAILING_VARIANT_SIZE(trailing, trailingLength); - - success = - createLikelySubtagsString( - lang, - langLength, - script, - scriptLength, - region, - regionLength, + { + const icu::XLikelySubtags* likelySubtags = icu::XLikelySubtags::getSingleton(*err); + if(U_FAILURE(*err)) { + goto error; + } + // We need to keep l on the stack because lsr may point into internal + // memory of l. + icu::Locale l = icu::Locale::createFromName(localeID); + if (l.isBogus()) { + goto error; + } + icu::LSR lsr = likelySubtags->makeMaximizedLsrFrom(l, true, *err); + if(U_FAILURE(*err)) { + goto error; + } + const char* language = lsr.language; + if (uprv_strcmp(language, "und") == 0) { + language = ""; + } + createTagStringWithAlternates( + language, + (int32_t)uprv_strlen(language), + lsr.script, + (int32_t)uprv_strlen(lsr.script), + lsr.region, + (int32_t)uprv_strlen(lsr.region), trailing, trailingLength, + nullptr, sink, err); - - if (!success) { - const int32_t localIDLength = (int32_t)uprv_strlen(localeID); - - /* - * If we get here, we need to return localeID. - */ - sink.Append(localeID, localIDLength); + if(U_FAILURE(*err)) { + goto error; + } } - - return success; + return true; error: @@ -913,6 +532,7 @@ static UBool _ulocimp_addLikelySubtags(const char*, icu::ByteSink&, UErrorCode*) static void _uloc_minimizeSubtags(const char* localeID, icu::ByteSink& sink, + bool favorScript, UErrorCode* err) { icu::CharString maximizedTagBuffer; @@ -925,7 +545,6 @@ _uloc_minimizeSubtags(const char* localeID, const char* trailing = ""; int32_t trailingLength = 0; int32_t trailingIndex = 0; - UBool successGetMax = false; if(U_FAILURE(*err)) { goto error; @@ -964,213 +583,38 @@ _uloc_minimizeSubtags(const char* localeID, CHECK_TRAILING_VARIANT_SIZE(trailing, trailingLength); { - icu::CharString base; - { - icu::CharStringByteSink baseSink(&base); - createTagString( - lang, - langLength, - script, - scriptLength, - region, - regionLength, - nullptr, - 0, - baseSink, - err); - } - - /** - * First, we need to first get the maximization - * from AddLikelySubtags. - **/ - { - icu::CharStringByteSink maxSink(&maximizedTagBuffer); - successGetMax = _ulocimp_addLikelySubtags(base.data(), maxSink, err); - } - } - - if(U_FAILURE(*err)) { - goto error; - } - - if (!successGetMax) { - /** - * If we got here, return the locale ID parameter unchanged. - **/ - const int32_t localeIDLength = (int32_t)uprv_strlen(localeID); - sink.Append(localeID, localeIDLength); - return; - } - - // In the following, the lang, script, region are referring to those in - // the maximizedTagBuffer, not the one in the localeID. - langLength = sizeof(lang); - scriptLength = sizeof(script); - regionLength = sizeof(region); - parseTagString( - maximizedTagBuffer.data(), - lang, - &langLength, - script, - &scriptLength, - region, - ®ionLength, - err); - if(U_FAILURE(*err)) { - goto error; - } - - /** - * Start first with just the language. - **/ - { - icu::CharString tagBuffer; - { - icu::CharStringByteSink tagSink(&tagBuffer); - createLikelySubtagsString( - lang, - langLength, - nullptr, - 0, - nullptr, - 0, - nullptr, - 0, - tagSink, - err); - } - + const icu::XLikelySubtags* likelySubtags = icu::XLikelySubtags::getSingleton(*err); if(U_FAILURE(*err)) { goto error; } - else if (!tagBuffer.isEmpty() && - uprv_strnicmp( - maximizedTagBuffer.data(), - tagBuffer.data(), - tagBuffer.length()) == 0) { - - createTagString( - lang, - langLength, - nullptr, - 0, - nullptr, - 0, - trailing, - trailingLength, - sink, - err); - return; - } - } - - /** - * Next, try the language and region. - **/ - if (regionLength > 0) { - - icu::CharString tagBuffer; - { - icu::CharStringByteSink tagSink(&tagBuffer); - createLikelySubtagsString( - lang, - langLength, - nullptr, - 0, - region, - regionLength, - nullptr, - 0, - tagSink, - err); - } - + icu::LSR lsr = likelySubtags->minimizeSubtags( + {lang, langLength}, + {script, scriptLength}, + {region, regionLength}, + favorScript, + *err); if(U_FAILURE(*err)) { goto error; } - else if (!tagBuffer.isEmpty() && - uprv_strnicmp( - maximizedTagBuffer.data(), - tagBuffer.data(), - tagBuffer.length()) == 0) { - - createTagString( - lang, - langLength, - nullptr, - 0, - region, - regionLength, - trailing, - trailingLength, - sink, - err); - return; - } - } - - /** - * Finally, try the language and script. This is our last chance, - * since trying with all three subtags would only yield the - * maximal version that we already have. - **/ - if (scriptLength > 0) { - icu::CharString tagBuffer; - { - icu::CharStringByteSink tagSink(&tagBuffer); - createLikelySubtagsString( - lang, - langLength, - script, - scriptLength, - nullptr, - 0, - nullptr, - 0, - tagSink, - err); - } - + const char* language = lsr.language; + if (uprv_strcmp(language, "und") == 0) { + language = ""; + } + createTagStringWithAlternates( + language, + (int32_t)uprv_strlen(language), + lsr.script, + (int32_t)uprv_strlen(lsr.script), + lsr.region, + (int32_t)uprv_strlen(lsr.region), + trailing, + trailingLength, + nullptr, + sink, + err); if(U_FAILURE(*err)) { goto error; } - else if (!tagBuffer.isEmpty() && - uprv_strnicmp( - maximizedTagBuffer.data(), - tagBuffer.data(), - tagBuffer.length()) == 0) { - - createTagString( - lang, - langLength, - script, - scriptLength, - nullptr, - 0, - trailing, - trailingLength, - sink, - err); - return; - } - } - - { - /** - * If we got here, return the max + trail. - **/ - createTagString( - lang, - langLength, - script, - scriptLength, - region, - regionLength, - trailing, - trailingLength, - sink, - err); return; } @@ -1181,31 +625,6 @@ _uloc_minimizeSubtags(const char* localeID, } } -static int32_t -do_canonicalize(const char* localeID, - char* buffer, - int32_t bufferCapacity, - UErrorCode* err) -{ - int32_t canonicalizedSize = uloc_canonicalize( - localeID, - buffer, - bufferCapacity, - err); - - if (*err == U_STRING_NOT_TERMINATED_WARNING || - *err == U_BUFFER_OVERFLOW_ERROR) { - return canonicalizedSize; - } - else if (U_FAILURE(*err)) { - - return -1; - } - else { - return canonicalizedSize; - } -} - U_CAPI int32_t U_EXPORT2 uloc_addLikelySubtags(const char* localeID, char* maximizedLocaleID, @@ -1239,14 +658,13 @@ static UBool _ulocimp_addLikelySubtags(const char* localeID, icu::ByteSink& sink, UErrorCode* status) { - PreflightingLocaleIDBuffer localeBuffer; - do { - localeBuffer.requestedCapacity = do_canonicalize(localeID, localeBuffer.getBuffer(), - localeBuffer.getCapacity(), status); - } while (localeBuffer.needToTryAgain(status)); - + icu::CharString localeBuffer; + { + icu::CharStringByteSink localeSink(&localeBuffer); + ulocimp_canonicalize(localeID, localeSink, status); + } if (U_SUCCESS(*status)) { - return _uloc_addLikelySubtags(localeBuffer.getBuffer(), sink, status); + return _uloc_addLikelySubtags(localeBuffer.data(), sink, status); } else { return false; } @@ -1271,7 +689,7 @@ uloc_minimizeSubtags(const char* localeID, icu::CheckedArrayByteSink sink( minimizedLocaleID, minimizedLocaleIDCapacity); - ulocimp_minimizeSubtags(localeID, sink, status); + ulocimp_minimizeSubtags(localeID, sink, false, status); int32_t reslen = sink.NumberOfBytesAppended(); if (U_FAILURE(*status)) { @@ -1291,14 +709,14 @@ uloc_minimizeSubtags(const char* localeID, U_CAPI void U_EXPORT2 ulocimp_minimizeSubtags(const char* localeID, icu::ByteSink& sink, + bool favorScript, UErrorCode* status) { - PreflightingLocaleIDBuffer localeBuffer; - do { - localeBuffer.requestedCapacity = do_canonicalize(localeID, localeBuffer.getBuffer(), - localeBuffer.getCapacity(), status); - } while (localeBuffer.needToTryAgain(status)); - - _uloc_minimizeSubtags(localeBuffer.getBuffer(), sink, status); + icu::CharString localeBuffer; + { + icu::CharStringByteSink localeSink(&localeBuffer); + ulocimp_canonicalize(localeID, localeSink, status); + } + _uloc_minimizeSubtags(localeBuffer.data(), sink, favorScript, status); } // Pairs of (language subtag, + or -) for finding out fast if common languages @@ -1374,16 +792,26 @@ ulocimp_getRegionForSupplementalData(const char *localeID, UBool inferRegion, UErrorCode rgStatus = U_ZERO_ERROR; // First check for rg keyword value - int32_t rgLen = uloc_getKeywordValue(localeID, "rg", rgBuf, ULOC_RG_BUFLEN, &rgStatus); - if (U_FAILURE(rgStatus) || rgLen != 6) { + icu::CharString rg; + { + icu::CharStringByteSink sink(&rg); + ulocimp_getKeywordValue(localeID, "rg", sink, &rgStatus); + } + int32_t rgLen = rg.length(); + if (U_FAILURE(rgStatus) || rgLen < 3 || rgLen > 7) { rgLen = 0; } else { - // rgBuf guaranteed to be zero terminated here, with text len 6 - char *rgPtr = rgBuf; - for (; *rgPtr!= 0; rgPtr++) { - *rgPtr = uprv_toupper(*rgPtr); + // chop off the subdivision code (which will generally be "zzzz" anyway) + const char* const data = rg.data(); + if (uprv_isASCIILetter(data[0])) { + rgLen = 2; + rgBuf[0] = uprv_toupper(data[0]); + rgBuf[1] = uprv_toupper(data[1]); + } else { + // assume three-digit region code + rgLen = 3; + uprv_memcpy(rgBuf, data, rgLen); } - rgLen = (uprv_strcmp(rgBuf+2, "ZZZZ") == 0)? 2: 0; } if (rgLen == 0) { diff --git a/deps/icu-small/source/common/loclikelysubtags.cpp b/deps/icu-small/source/common/loclikelysubtags.cpp index e913c66a35b9d0..c2a7011b5093eb 100644 --- a/deps/icu-small/source/common/loclikelysubtags.cpp +++ b/deps/icu-small/source/common/loclikelysubtags.cpp @@ -11,6 +11,7 @@ #include "unicode/locid.h" #include "unicode/uobject.h" #include "unicode/ures.h" +#include "unicode/uscript.h" #include "charstr.h" #include "cstring.h" #include "loclikelysubtags.h" @@ -23,6 +24,7 @@ #include "uniquecharstr.h" #include "uresdata.h" #include "uresimp.h" +#include "uvector.h" U_NAMESPACE_BEGIN @@ -81,11 +83,18 @@ struct XLikelySubtagsData { // Read all strings in the resource bundle and convert them to invariant char *. LocalMemory languageIndexes, regionIndexes, lsrSubtagIndexes; int32_t languagesLength = 0, regionsLength = 0, lsrSubtagsLength = 0; + ResourceArray m49Array; + if (likelyTable.findValue("m49", value)) { + m49Array = value.getArray(errorCode); + } else { + errorCode = U_MISSING_RESOURCE_ERROR; + return; + } if (!readStrings(likelyTable, "languageAliases", value, languageIndexes, languagesLength, errorCode) || !readStrings(likelyTable, "regionAliases", value, regionIndexes, regionsLength, errorCode) || - !readStrings(likelyTable, "lsrs", value, + !readLSREncodedStrings(likelyTable, "lsrnum", value, m49Array, lsrSubtagIndexes,lsrSubtagsLength, errorCode)) { return; } @@ -136,7 +145,7 @@ struct XLikelySubtagsData { if (!readStrings(matchTable, "partitions", value, partitionIndexes, partitionsLength, errorCode) || - !readStrings(matchTable, "paradigms", value, + !readLSREncodedStrings(matchTable, "paradigmnum", value, m49Array, paradigmSubtagIndexes, paradigmSubtagsLength, errorCode)) { return; } @@ -233,10 +242,96 @@ struct XLikelySubtagsData { return false; } for (int i = 0; i < length; ++i) { - stringArray.getValue(i, value); // returns true because i < length - rawIndexes[i] = strings.add(value.getUnicodeString(errorCode), errorCode); + if (stringArray.getValue(i, value)) { // returns true because i < length + int32_t strLength = 0; + rawIndexes[i] = strings.add(value.getString(strLength, errorCode), errorCode); + if (U_FAILURE(errorCode)) { return false; } + } + } + } + return true; + } + UnicodeString toLanguage(int encoded) { + if (encoded == 0) { + return UNICODE_STRING_SIMPLE(""); + } + if (encoded == 1) { + return UNICODE_STRING_SIMPLE("skip"); + } + encoded &= 0x00ffffff; + encoded %= 27*27*27; + char lang[3]; + lang[0] = 'a' + ((encoded % 27) - 1); + lang[1] = 'a' + (((encoded / 27 ) % 27) - 1); + if (encoded / (27 * 27) == 0) { + return UnicodeString(lang, 2, US_INV); + } + lang[2] = 'a' + ((encoded / (27 * 27)) - 1); + return UnicodeString(lang, 3, US_INV); + } + UnicodeString toScript(int encoded) { + if (encoded == 0) { + return UNICODE_STRING_SIMPLE(""); + } + if (encoded == 1) { + return UNICODE_STRING_SIMPLE("script"); + } + encoded = (encoded >> 24) & 0x000000ff; + const char* script = uscript_getShortName(static_cast(encoded)); + if (script == nullptr) { + return UNICODE_STRING_SIMPLE(""); + } + U_ASSERT(uprv_strlen(script) == 4); + return UnicodeString(script, 4, US_INV); + } + UnicodeString m49IndexToCode(const ResourceArray &m49Array, ResourceValue &value, int index, UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { + return UNICODE_STRING_SIMPLE(""); + } + if (m49Array.getValue(index, value)) { + return value.getUnicodeString(errorCode); + } + // "m49" does not include the index. + errorCode = U_MISSING_RESOURCE_ERROR; + return UNICODE_STRING_SIMPLE(""); + } + + UnicodeString toRegion(const ResourceArray& m49Array, ResourceValue &value, int encoded, UErrorCode &errorCode) { + if (encoded == 0 || encoded == 1) { + return UNICODE_STRING_SIMPLE(""); + } + encoded &= 0x00ffffff; + encoded /= 27 * 27 * 27; + encoded %= 27 * 27; + if (encoded < 27) { + // Selected M49 code index, find the code from "m49" resource. + return m49IndexToCode(m49Array, value, encoded, errorCode); + } + char region[2]; + region[0] = 'A' + ((encoded % 27) - 1); + region[1] = 'A' + (((encoded / 27) % 27) - 1); + return UnicodeString(region, 2, US_INV); + } + + bool readLSREncodedStrings(const ResourceTable &table, const char* key, ResourceValue &value, const ResourceArray& m49Array, + LocalMemory &indexes, int32_t &length, UErrorCode &errorCode) { + if (table.findValue(key, value)) { + const int32_t* vectors = value.getIntVector(length, errorCode); + if (U_FAILURE(errorCode)) { return false; } + if (length == 0) { return true; } + int32_t *rawIndexes = indexes.allocateInsteadAndCopy(length * 3); + if (rawIndexes == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + return false; + } + for (int i = 0; i < length; ++i) { + rawIndexes[i*3] = strings.addByValue(toLanguage(vectors[i]), errorCode); + rawIndexes[i*3+1] = strings.addByValue(toScript(vectors[i]), errorCode); + rawIndexes[i*3+2] = strings.addByValue( + toRegion(m49Array, value, vectors[i], errorCode), errorCode); if (U_FAILURE(errorCode)) { return false; } } + length *= 3; } return true; } @@ -245,15 +340,52 @@ struct XLikelySubtagsData { namespace { XLikelySubtags *gLikelySubtags = nullptr; +UVector *gMacroregions = nullptr; UInitOnce gInitOnce {}; UBool U_CALLCONV cleanup() { delete gLikelySubtags; gLikelySubtags = nullptr; + delete gMacroregions; + gMacroregions = nullptr; gInitOnce.reset(); return true; } +static const char16_t RANGE_MARKER = 0x7E; /* '~' */ +UVector* loadMacroregions(UErrorCode &status) { + LocalPointer newMacroRegions(new UVector(uprv_deleteUObject, uhash_compareUnicodeString, status), status); + + LocalUResourceBundlePointer supplementalData(ures_openDirect(nullptr,"supplementalData",&status)); + LocalUResourceBundlePointer idValidity(ures_getByKey(supplementalData.getAlias(),"idValidity",nullptr,&status)); + LocalUResourceBundlePointer regionList(ures_getByKey(idValidity.getAlias(),"region",nullptr,&status)); + LocalUResourceBundlePointer regionMacro(ures_getByKey(regionList.getAlias(),"macroregion",nullptr,&status)); + + if (U_FAILURE(status)) { + return nullptr; + } + + while (U_SUCCESS(status) && ures_hasNext(regionMacro.getAlias())) { + UnicodeString regionName = ures_getNextUnicodeString(regionMacro.getAlias(),nullptr,&status); + int32_t rangeMarkerLocation = regionName.indexOf(RANGE_MARKER); + char16_t buf[6]; + regionName.extract(buf,6,status); + if ( rangeMarkerLocation > 0 ) { + char16_t endRange = regionName.charAt(rangeMarkerLocation+1); + buf[rangeMarkerLocation] = 0; + while ( buf[rangeMarkerLocation-1] <= endRange && U_SUCCESS(status)) { + LocalPointer newRegion(new UnicodeString(buf), status); + newMacroRegions->adoptElement(newRegion.orphan(),status); + buf[rangeMarkerLocation-1]++; + } + } else { + LocalPointer newRegion(new UnicodeString(regionName), status); + newMacroRegions->adoptElement(newRegion.orphan(),status); + } + } + return newMacroRegions.orphan(); +} + } // namespace void U_CALLCONV XLikelySubtags::initLikelySubtags(UErrorCode &errorCode) { @@ -263,10 +395,14 @@ void U_CALLCONV XLikelySubtags::initLikelySubtags(UErrorCode &errorCode) { data.load(errorCode); if (U_FAILURE(errorCode)) { return; } gLikelySubtags = new XLikelySubtags(data); - if (gLikelySubtags == nullptr) { + gMacroregions = loadMacroregions(errorCode); + if (U_FAILURE(errorCode) || gLikelySubtags == nullptr || gMacroregions == nullptr) { + delete gLikelySubtags; + delete gMacroregions; errorCode = U_MEMORY_ALLOCATION_ERROR; return; } + ucln_common_registerCleanup(UCLN_COMMON_LIKELY_SUBTAGS, cleanup); } @@ -317,15 +453,32 @@ XLikelySubtags::~XLikelySubtags() { delete[] lsrs; } -LSR XLikelySubtags::makeMaximizedLsrFrom(const Locale &locale, UErrorCode &errorCode) const { +LSR XLikelySubtags::makeMaximizedLsrFrom(const Locale &locale, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const { + if (locale.isBogus()) { + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + return LSR("", "", "", LSR::EXPLICIT_LSR); + } const char *name = locale.getName(); if (uprv_isAtSign(name[0]) && name[1] == 'x' && name[2] == '=') { // name.startsWith("@x=") // Private use language tag x-subtag-subtag... which CLDR changes to // und-x-subtag-subtag... return LSR(name, "", "", LSR::EXPLICIT_LSR); } - return makeMaximizedLsr(locale.getLanguage(), locale.getScript(), locale.getCountry(), - locale.getVariant(), errorCode); + LSR max = makeMaximizedLsr(locale.getLanguage(), locale.getScript(), locale.getCountry(), + locale.getVariant(), returnInputIfUnmatch, errorCode); + + if (uprv_strlen(max.language) == 0 && + uprv_strlen(max.script) == 0 && + uprv_strlen(max.region) == 0) { + // No match. ICU API mandate us to + // If the provided ULocale instance is already in the maximal form, or + // there is no data available available for maximization, it will be + // returned. + return LSR(locale.getLanguage(), locale.getScript(), locale.getCountry(), LSR::EXPLICIT_LSR, errorCode); + } + return max; } namespace { @@ -338,7 +491,9 @@ const char *getCanonical(const CharStringMap &aliases, const char *alias) { } // namespace LSR XLikelySubtags::makeMaximizedLsr(const char *language, const char *script, const char *region, - const char *variant, UErrorCode &errorCode) const { + const char *variant, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const { // Handle pseudolocales like en-XA, ar-XB, fr-PSCRACK. // They should match only themselves, // not other locales with what looks like the same language and script subtags. @@ -378,64 +533,91 @@ LSR XLikelySubtags::makeMaximizedLsr(const char *language, const char *script, c language = getCanonical(languageAliases, language); // (We have no script mappings.) region = getCanonical(regionAliases, region); - return maximize(language, script, region); + return maximize(language, script, region, returnInputIfUnmatch, errorCode); } -LSR XLikelySubtags::maximize(const char *language, const char *script, const char *region) const { - if (uprv_strcmp(language, "und") == 0) { +LSR XLikelySubtags::maximize(const char *language, const char *script, const char *region, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const { + return maximize({language, (int32_t)uprv_strlen(language)}, + {script, (int32_t)uprv_strlen(script)}, + {region, (int32_t)uprv_strlen(region)}, + returnInputIfUnmatch, + errorCode); +} + +bool XLikelySubtags::isMacroregion(StringPiece& region, UErrorCode& errorCode) const { + // In Java, we use Region class. In C++, since Region is under i18n, + // we read the same data used by Region into gMacroregions avoid dependency + // from common to i18n/region.cpp + if (U_FAILURE(errorCode)) { return false; } + umtx_initOnce(gInitOnce, &XLikelySubtags::initLikelySubtags, errorCode); + if (U_FAILURE(errorCode)) { return false; } + UnicodeString str(UnicodeString::fromUTF8(region)); + return gMacroregions->contains((void *)&str); +} + +LSR XLikelySubtags::maximize(StringPiece language, StringPiece script, StringPiece region, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const { + if (U_FAILURE(errorCode)) { + return LSR(language, script, region, LSR::EXPLICIT_LSR, errorCode); + } + if (language.compare("und") == 0) { language = ""; } - if (uprv_strcmp(script, "Zzzz") == 0) { + if (script.compare("Zzzz") == 0) { script = ""; } - if (uprv_strcmp(region, "ZZ") == 0) { + if (region.compare("ZZ") == 0) { region = ""; } - if (*script != 0 && *region != 0 && *language != 0) { - return LSR(language, script, region, LSR::EXPLICIT_LSR); // already maximized + if (!script.empty() && !region.empty() && !language.empty()) { + return LSR(language, script, region, LSR::EXPLICIT_LSR, errorCode); // already maximized } + bool retainLanguage = false; + bool retainScript = false; + bool retainRegion = false; - uint32_t retainOldMask = 0; BytesTrie iter(trie); uint64_t state; int32_t value; // Small optimization: Array lookup for first language letter. int32_t c0; - if (0 <= (c0 = uprv_lowerOrdinal(language[0])) && c0 <= 25 && - language[1] != 0 && // language.length() >= 2 + if (0 <= (c0 = uprv_lowerOrdinal(language.data()[0])) && c0 <= 25 && + language.length() >= 2 && (state = trieFirstLetterStates[c0]) != 0) { value = trieNext(iter.resetToState64(state), language, 1); } else { value = trieNext(iter, language, 0); } + bool matchLanguage = (value >= 0); + bool matchScript = false; if (value >= 0) { - if (*language != 0) { - retainOldMask |= 4; - } + retainLanguage = !language.empty(); state = iter.getState64(); } else { - retainOldMask |= 4; + retainLanguage = true; iter.resetToState64(trieUndState); // "und" ("*") state = 0; } + if (value >= 0 && !script.empty()) { + matchScript = true; + } if (value > 0) { // Intermediate or final value from just language. if (value == SKIP_SCRIPT) { value = 0; } - if (*script != 0) { - retainOldMask |= 2; - } + retainScript = !script.empty(); } else { value = trieNext(iter, script, 0); if (value >= 0) { - if (*script != 0) { - retainOldMask |= 2; - } + retainScript = !script.empty(); state = iter.getState64(); } else { - retainOldMask |= 2; + retainScript = true; if (state == 0) { iter.resetToState64(trieUndZzzzState); // "und-Zzzz" ("**") } else { @@ -447,19 +629,19 @@ LSR XLikelySubtags::maximize(const char *language, const char *script, const cha } } + bool matchRegion = false; if (value > 0) { // Final value from just language or language+script. - if (*region != 0) { - retainOldMask |= 1; - } + retainRegion = !region.empty(); } else { value = trieNext(iter, region, 0); if (value >= 0) { - if (*region != 0) { - retainOldMask |= 1; + if (!region.empty() && !isMacroregion(region, errorCode)) { + retainRegion = true; + matchRegion = true; } } else { - retainOldMask |= 1; + retainRegion = true; if (state == 0) { value = defaultLsrIndex; } else { @@ -470,28 +652,33 @@ LSR XLikelySubtags::maximize(const char *language, const char *script, const cha } } U_ASSERT(value < lsrsLength); - const LSR &result = lsrs[value]; + const LSR &matched = lsrs[value]; - if (*language == 0) { - language = "und"; + if (returnInputIfUnmatch && + (!(matchLanguage || matchScript || (matchRegion && language.empty())))) { + return LSR("", "", "", LSR::EXPLICIT_LSR, errorCode); // no matching. + } + if (language.empty()) { + language = StringPiece("und"); } - if (retainOldMask == 0) { + if (!(retainLanguage || retainScript || retainRegion)) { // Quickly return a copy of the lookup-result LSR // without new allocation of the subtags. - return LSR(result.language, result.script, result.region, result.flags); + return LSR(matched.language, matched.script, matched.region, matched.flags); } - if ((retainOldMask & 4) == 0) { - language = result.language; + if (!retainLanguage) { + language = matched.language; } - if ((retainOldMask & 2) == 0) { - script = result.script; + if (!retainScript) { + script = matched.script; } - if ((retainOldMask & 1) == 0) { - region = result.region; + if (!retainRegion) { + region = matched.region; } + int32_t retainMask = (retainLanguage ? 4 : 0) + (retainScript ? 2 : 0) + (retainRegion ? 1 : 0); // retainOldMask flags = LSR explicit-subtag flags - return LSR(language, script, region, retainOldMask); + return LSR(language, script, region, retainMask, errorCode); } int32_t XLikelySubtags::compareLikely(const LSR &lsr, const LSR &other, int32_t likelyInfo) const { @@ -627,57 +814,97 @@ int32_t XLikelySubtags::trieNext(BytesTrie &iter, const char *s, int32_t i) { default: return -1; } } +int32_t XLikelySubtags::trieNext(BytesTrie &iter, StringPiece s, int32_t i) { + UStringTrieResult result; + uint8_t c; + if (s.length() == i) { + result = iter.next(u'*'); + } else { + c = s.data()[i]; + for (;;) { + c = uprv_invCharToAscii(c); + // EBCDIC: If s[i] is not an invariant character, + // then c is now 0 and will simply not match anything, which is harmless. + if (i+1 != s.length()) { + if (!USTRINGTRIE_HAS_NEXT(iter.next(c))) { + return -1; + } + c = s.data()[++i]; + } else { + // last character of this subtag + result = iter.next(c | 0x80); + break; + } + } + } + switch (result) { + case USTRINGTRIE_NO_MATCH: return -1; + case USTRINGTRIE_NO_VALUE: return 0; + case USTRINGTRIE_INTERMEDIATE_VALUE: + U_ASSERT(iter.getValue() == SKIP_SCRIPT); + return SKIP_SCRIPT; + case USTRINGTRIE_FINAL_VALUE: return iter.getValue(); + default: return -1; + } +} -// TODO(ICU-20777): Switch Locale/uloc_ likely-subtags API from the old code -// in loclikely.cpp to this new code, including activating this -// minimizeSubtags() function. The LocaleMatcher does not minimize. -#if 0 -LSR XLikelySubtags::minimizeSubtags(const char *languageIn, const char *scriptIn, - const char *regionIn, ULocale.Minimize fieldToFavor, +LSR XLikelySubtags::minimizeSubtags(StringPiece language, StringPiece script, + StringPiece region, + bool favorScript, UErrorCode &errorCode) const { - LSR result = maximize(languageIn, scriptIn, regionIn); - - // We could try just a series of checks, like: - // LSR result2 = addLikelySubtags(languageIn, "", ""); - // if result.equals(result2) return result2; - // However, we can optimize 2 of the cases: - // (languageIn, "", "") - // (languageIn, "", regionIn) - - // value00 = lookup(result.language, "", "") - BytesTrie iter = new BytesTrie(trie); - int value = trieNext(iter, result.language, 0); - U_ASSERT(value >= 0); - if (value == 0) { - value = trieNext(iter, "", 0); - U_ASSERT(value >= 0); - if (value == 0) { - value = trieNext(iter, "", 0); - } - } - U_ASSERT(value > 0); - LSR value00 = lsrs[value]; - boolean favorRegionOk = false; - if (result.script.equals(value00.script)) { //script is default - if (result.region.equals(value00.region)) { - return new LSR(result.language, "", "", LSR.DONT_CARE_FLAGS); - } else if (fieldToFavor == ULocale.Minimize.FAVOR_REGION) { - return new LSR(result.language, "", result.region, LSR.DONT_CARE_FLAGS); - } else { - favorRegionOk = true; + LSR max = maximize(language, script, region, true, errorCode); + if (U_FAILURE(errorCode)) { + return max; + } + // If no match, return it. + if (uprv_strlen(max.language) == 0 && + uprv_strlen(max.script) == 0 && + uprv_strlen(max.region) == 0) { + // No match. ICU API mandate us to + // "If this Locale is already in the minimal form, or not valid, or + // there is no data available for minimization, the Locale will be + // unchanged." + return LSR(language, script, region, LSR::EXPLICIT_LSR, errorCode); + } + // try language + LSR test = maximize(max.language, "", "", true, errorCode); + if (U_FAILURE(errorCode)) { + return max; + } + if (test.isEquivalentTo(max)) { + return LSR(max.language, "", "", LSR::DONT_CARE_FLAGS, errorCode); + } + + if (!favorScript) { + // favor Region + // try language and region + test = maximize(max.language, "", max.region, true, errorCode); + if (U_FAILURE(errorCode)) { + return max; + } + if (test.isEquivalentTo(max)) { + return LSR(max.language, "", max.region, LSR::DONT_CARE_FLAGS, errorCode); } } - - // The last case is not as easy to optimize. - // Maybe do later, but for now use the straightforward code. - LSR result2 = maximize(languageIn, scriptIn, ""); - if (result2.equals(result)) { - return new LSR(result.language, result.script, "", LSR.DONT_CARE_FLAGS); - } else if (favorRegionOk) { - return new LSR(result.language, "", result.region, LSR.DONT_CARE_FLAGS); + // try language and script + test = maximize(max.language, max.script, "", true, errorCode); + if (U_FAILURE(errorCode)) { + return max; + } + if (test.isEquivalentTo(max)) { + return LSR(max.language, max.script, "", LSR::DONT_CARE_FLAGS, errorCode); + } + if (favorScript) { + // try language and region + test = maximize(max.language, "", max.region, true, errorCode); + if (U_FAILURE(errorCode)) { + return max; + } + if (test.isEquivalentTo(max)) { + return LSR(max.language, "", max.region, LSR::DONT_CARE_FLAGS, errorCode); + } } - return result; + return LSR(max.language, max.script, max.region, LSR::DONT_CARE_FLAGS, errorCode); } -#endif U_NAMESPACE_END diff --git a/deps/icu-small/source/common/loclikelysubtags.h b/deps/icu-small/source/common/loclikelysubtags.h index 14a01a5eac7eba..ebd9c153068eb6 100644 --- a/deps/icu-small/source/common/loclikelysubtags.h +++ b/deps/icu-small/source/common/loclikelysubtags.h @@ -11,6 +11,7 @@ #include "unicode/utypes.h" #include "unicode/bytestrie.h" #include "unicode/locid.h" +#include "unicode/stringpiece.h" #include "unicode/uobject.h" #include "unicode/ures.h" #include "charstrmap.h" @@ -47,7 +48,9 @@ class XLikelySubtags final : public UMemory { static const XLikelySubtags *getSingleton(UErrorCode &errorCode); // VisibleForTesting - LSR makeMaximizedLsrFrom(const Locale &locale, UErrorCode &errorCode) const; + LSR makeMaximizedLsrFrom(const Locale &locale, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const; /** * Tests whether lsr is "more likely" than other. @@ -61,13 +64,9 @@ class XLikelySubtags final : public UMemory { */ int32_t compareLikely(const LSR &lsr, const LSR &other, int32_t likelyInfo) const; - // TODO(ICU-20777): Switch Locale/uloc_ likely-subtags API from the old code - // in loclikely.cpp to this new code, including activating this - // minimizeSubtags() function. The LocaleMatcher does not minimize. -#if 0 - LSR minimizeSubtags(const char *languageIn, const char *scriptIn, const char *regionIn, - ULocale.Minimize fieldToFavor, UErrorCode &errorCode) const; -#endif + LSR minimizeSubtags(StringPiece language, StringPiece script, StringPiece region, + bool favorScript, + UErrorCode &errorCode) const; // visible for LocaleDistance const LocaleDistanceData &getDistanceData() const { return distanceData; } @@ -80,16 +79,25 @@ class XLikelySubtags final : public UMemory { static void initLikelySubtags(UErrorCode &errorCode); LSR makeMaximizedLsr(const char *language, const char *script, const char *region, - const char *variant, UErrorCode &errorCode) const; + const char *variant, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const; /** * Raw access to addLikelySubtags. Input must be in canonical format, eg "en", not "eng" or "EN". */ - LSR maximize(const char *language, const char *script, const char *region) const; + LSR maximize(const char *language, const char *script, const char *region, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const; + LSR maximize(StringPiece language, StringPiece script, StringPiece region, + bool returnInputIfUnmatch, + UErrorCode &errorCode) const; int32_t getLikelyIndex(const char *language, const char *script) const; + bool isMacroregion(StringPiece& region, UErrorCode &errorCode) const; static int32_t trieNext(BytesTrie &iter, const char *s, int32_t i); + static int32_t trieNext(BytesTrie &iter, StringPiece s, int32_t i); UResourceBundle *langInfoBundle; // We could store the strings by value, except that if there were few enough strings, diff --git a/deps/icu-small/source/common/locmap.cpp b/deps/icu-small/source/common/locmap.cpp index 7a0e90e8bd93b7..e41cfd1027d056 100644 --- a/deps/icu-small/source/common/locmap.cpp +++ b/deps/icu-small/source/common/locmap.cpp @@ -1170,7 +1170,7 @@ uprv_convertToLCIDPlatform(const char* localeID, UErrorCode* status) // conversion functionality when available. #if U_PLATFORM_HAS_WIN32_API && UCONFIG_USE_WINDOWS_LCID_MAPPING_API int32_t len; - char baseName[ULOC_FULLNAME_CAPACITY] = {}; + icu::CharString baseName; const char * mylocaleID = localeID; // Check any for keywords. @@ -1189,19 +1189,23 @@ uprv_convertToLCIDPlatform(const char* localeID, UErrorCode* status) else { // If the locale ID contains keywords other than collation, just use the base name. - len = uloc_getBaseName(localeID, baseName, UPRV_LENGTHOF(baseName) - 1, status); - - if (U_SUCCESS(*status) && len > 0) { - baseName[len] = 0; - mylocaleID = baseName; + icu::CharStringByteSink sink(&baseName); + ulocimp_getBaseName(localeID, sink, status); + } + if (U_SUCCESS(*status) && !baseName.isEmpty()) + { + mylocaleID = baseName.data(); } } } - char asciiBCP47Tag[LOCALE_NAME_MAX_LENGTH] = {}; // this will change it from de_DE@collation=phonebook to de-DE-u-co-phonebk form - (void)uloc_toLanguageTag(mylocaleID, asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, status); + icu::CharString asciiBCP47Tag; + { + icu::CharStringByteSink sink(&asciiBCP47Tag); + ulocimp_toLanguageTag(mylocaleID, sink, false, status); + } if (U_SUCCESS(*status)) { diff --git a/deps/icu-small/source/common/locresdata.cpp b/deps/icu-small/source/common/locresdata.cpp index 7a0969dff58332..c9d1cdddde4448 100644 --- a/deps/icu-small/source/common/locresdata.cpp +++ b/deps/icu-small/source/common/locresdata.cpp @@ -24,6 +24,8 @@ #include "unicode/putil.h" #include "unicode/uloc.h" #include "unicode/ures.h" +#include "bytesinkutil.h" +#include "charstr.h" #include "cstring.h" #include "ulocimp.h" #include "uresimp.h" @@ -156,16 +158,18 @@ _uloc_getOrientationHelper(const char* localeId, ULayoutType result = ULOC_LAYOUT_UNKNOWN; if (!U_FAILURE(*status)) { - int32_t length = 0; - char localeBuffer[ULOC_FULLNAME_CAPACITY]; - - uloc_canonicalize(localeId, localeBuffer, sizeof(localeBuffer), status); + icu::CharString localeBuffer; + { + icu::CharStringByteSink sink(&localeBuffer); + ulocimp_canonicalize(localeId, sink, status); + } if (!U_FAILURE(*status)) { + int32_t length = 0; const char16_t* const value = uloc_getTableStringWithFallback( nullptr, - localeBuffer, + localeBuffer.data(), "layout", nullptr, key, diff --git a/deps/icu-small/source/common/lsr.cpp b/deps/icu-small/source/common/lsr.cpp index 39eb46df27d04e..bd231ecdb5e3c6 100644 --- a/deps/icu-small/source/common/lsr.cpp +++ b/deps/icu-small/source/common/lsr.cpp @@ -31,6 +31,26 @@ LSR::LSR(char prefix, const char *lang, const char *scr, const char *r, int32_t } } +LSR::LSR(StringPiece lang, StringPiece scr, StringPiece r, int32_t f, + UErrorCode &errorCode) : + language(nullptr), script(nullptr), region(nullptr), + regionIndex(indexForRegion(r.data())), flags(f) { + if (U_SUCCESS(errorCode)) { + CharString data; + data.append(lang, errorCode).append('\0', errorCode); + int32_t scriptOffset = data.length(); + data.append(scr, errorCode).append('\0', errorCode); + int32_t regionOffset = data.length(); + data.append(r, errorCode); + owned = data.cloneData(errorCode); + if (U_SUCCESS(errorCode)) { + language = owned; + script = owned + scriptOffset; + region = owned + regionOffset; + } + } +} + LSR::LSR(LSR &&other) noexcept : language(other.language), script(other.script), region(other.region), owned(other.owned), regionIndex(other.regionIndex), flags(other.flags), diff --git a/deps/icu-small/source/common/lsr.h b/deps/icu-small/source/common/lsr.h index a2f7c8bb155bd3..313286e93d85e2 100644 --- a/deps/icu-small/source/common/lsr.h +++ b/deps/icu-small/source/common/lsr.h @@ -7,6 +7,7 @@ #ifndef __LSR_H__ #define __LSR_H__ +#include "unicode/stringpiece.h" #include "unicode/utypes.h" #include "unicode/uobject.h" #include "cstring.h" @@ -45,6 +46,8 @@ struct LSR final : public UMemory { */ LSR(char prefix, const char *lang, const char *scr, const char *r, int32_t f, UErrorCode &errorCode); + LSR(StringPiece lang, StringPiece scr, StringPiece r, int32_t f, + UErrorCode &errorCode); LSR(LSR &&other) noexcept; LSR(const LSR &other) = delete; inline ~LSR() { diff --git a/deps/icu-small/source/common/norm2_nfc_data.h b/deps/icu-small/source/common/norm2_nfc_data.h index ebe3e6ba90657a..3dada06c573214 100644 --- a/deps/icu-small/source/common/norm2_nfc_data.h +++ b/deps/icu-small/source/common/norm2_nfc_data.h @@ -10,7 +10,7 @@ #ifdef INCLUDED_FROM_NORMALIZER2_CPP static const UVersionInfo norm2_nfc_data_formatVersion={4,0,0,0}; -static const UVersionInfo norm2_nfc_data_dataVersion={0xf,0,0,0}; +static const UVersionInfo norm2_nfc_data_dataVersion={0xf,1,0,0}; static const int32_t norm2_nfc_data_indexes[Normalizer2Impl::IX_COUNT]={ 0x50,0x4cb8,0x8920,0x8a20,0x8a20,0x8a20,0x8a20,0x8a20,0xc0,0x300,0xae2,0x29e0,0x3c66,0xfc00,0x1288,0x3b9c, diff --git a/deps/icu-small/source/common/norm2allmodes.h b/deps/icu-small/source/common/norm2allmodes.h index 6347fba9cb7182..a2cfc89c1a8150 100644 --- a/deps/icu-small/source/common/norm2allmodes.h +++ b/deps/icu-small/source/common/norm2allmodes.h @@ -391,6 +391,7 @@ struct Norm2AllModes : public UMemory { static const Norm2AllModes *getNFCInstance(UErrorCode &errorCode); static const Norm2AllModes *getNFKCInstance(UErrorCode &errorCode); static const Norm2AllModes *getNFKC_CFInstance(UErrorCode &errorCode); + static const Norm2AllModes *getNFKC_SCFInstance(UErrorCode &errorCode); Normalizer2Impl *impl; ComposeNormalizer2 comp; diff --git a/deps/icu-small/source/common/normalizer2impl.h b/deps/icu-small/source/common/normalizer2impl.h index 2cca33d349e1f5..f5ede24fc20aed 100644 --- a/deps/icu-small/source/common/normalizer2impl.h +++ b/deps/icu-small/source/common/normalizer2impl.h @@ -789,7 +789,8 @@ unorm_getFCD16(UChar32 c); * * Normalizer2 .nrm data files provide data for the Unicode Normalization algorithms. * ICU ships with data files for standard Unicode Normalization Forms - * NFC and NFD (nfc.nrm), NFKC and NFKD (nfkc.nrm) and NFKC_Casefold (nfkc_cf.nrm). + * NFC and NFD (nfc.nrm), NFKC and NFKD (nfkc.nrm), + * NFKC_Casefold (nfkc_cf.nrm) and NFKC_Simple_Casefold (nfkc_scf.nrm). * Custom (application-specific) data can be built into additional .nrm files * with the gennorm2 build tool. * ICU ships with one such file, uts46.nrm, for the implementation of UTS #46. diff --git a/deps/icu-small/source/common/propname_data.h b/deps/icu-small/source/common/propname_data.h index 1e247874b6aa66..7bdbe8ec43014d 100644 --- a/deps/icu-small/source/common/propname_data.h +++ b/deps/icu-small/source/common/propname_data.h @@ -11,101 +11,102 @@ U_NAMESPACE_BEGIN -const int32_t PropNameData::indexes[8]={0x20,0x1660,0x5294,0xacd0,0xacd0,0xacd0,0x31,0}; +const int32_t PropNameData::indexes[8]={0x20,0x1690,0x5337,0xae61,0xae61,0xae61,0x31,0}; -const int32_t PropNameData::valueMaps[1424]={ -6,0,0x48,0,0xf1,0x368,0xf1,0x37e,0xf1,0x393,0xf1,0x3a9,0xf1,0x3b4,0xf1,0x3d5, -0xf1,0x3e5,0xf1,0x3f4,0xf1,0x402,0xf1,0x426,0xf1,0x43d,0xf1,0x455,0xf1,0x46c,0xf1,0x47b, -0xf1,0x48a,0xf1,0x49b,0xf1,0x4a9,0xf1,0x4bb,0xf1,0x4d5,0xf1,0x4f0,0xf1,0x505,0xf1,0x522, -0xf1,0x533,0xf1,0x53e,0xf1,0x55d,0xf1,0x573,0xf1,0x584,0xf1,0x594,0xf1,0x5af,0xf1,0x5c8, -0xf1,0x5d9,0xf1,0x5f3,0xf1,0x606,0xf1,0x616,0xf1,0x630,0xf1,0x649,0xf1,0x660,0xf1,0x674, -0xf1,0x68a,0xf1,0x69e,0xf1,0x6b4,0xf1,0x6ce,0xf1,0x6e6,0xf1,0x702,0xf1,0x70a,0xf1,0x712, -0xf1,0x71a,0xf1,0x722,0xf1,0x72b,0xf1,0x738,0xf1,0x74b,0xf1,0x768,0xf1,0x785,0xf1,0x7a2, -0xf1,0x7c0,0xf1,0x7de,0xf1,0x802,0xf1,0x80f,0xf1,0x829,0xf1,0x83e,0xf1,0x859,0xf1,0x870, -0xf1,0x887,0xf1,0x8a9,0xf1,0x8c8,0xf1,0x8e1,0xf1,0x90e,0xf1,0x947,0xf1,0x978,0xf1,0x9a7, -0xf1,0x9d6,0xf1,0x1000,0x1019,0x9eb,0x16d,0xc0b,0x188,0x3279,0xf7,0x3298,0x2d4,0x33d6,0x2ea,0x3430, -0x2f4,0x368d,0x316,0x3fb8,0x382,0x4028,0x38c,0x42c2,0x3bb,0x4300,0x3c3,0x4e45,0x48f,0x4ec3,0x499,0x4ee8, -0x49f,0x4f02,0x4a5,0x4f23,0x4ac,0x4f3d,0xf7,0x4f62,0xf7,0x4f88,0x4b3,0x5032,0x4c9,0x50ab,0x4dc,0x515d, -0x4f7,0x5194,0x4fe,0x5374,0x512,0x57f4,0x53a,0x2000,0x2001,0x5853,0x542,0x3000,0x3001,0x58df,0,0x4000, -0x400e,0x58f1,0,0x58fa,0,0x5914,0,0x5925,0,0x5936,0,0x594c,0,0x5955,0,0x5972, -0,0x5990,0,0x59ae,0,0x59cc,0,0x59e2,0,0x59f6,0,0x5a0c,0,0x7000,0x7001,0x5a25, -0,0x844,0x12,0,1,0x12,0x20,0x862,0x4a,0,1,6,7,8,9,0xa, -0xb,0xc,0xd,0xe,0xf,0x10,0x11,0x12,0x13,0x14,0x15,0x16,0x17,0x18,0x19,0x1a, -0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24,0x54,0x5b,0x67,0x6b,0x76,0x7a, -0x81,0x82,0x84,0x85,0xc8,0xca,0xd6,0xd8,0xda,0xdc,0xde,0xe0,0xe2,0xe4,0xe6,0xe8, -0xe9,0xea,0xf0,0x2e,0x40,0x4c,0x5e,0x68,0x79,0x84,0x91,0x9e,0xab,0xb8,0xc5,0xd2, -0xdf,0xec,0xf9,0x106,0x113,0x120,0x12d,0x13a,0x147,0x154,0x161,0x16e,0x17b,0x188,0x195,0x1a2, -0x1af,0x1bc,0x1c9,0x1d6,0x1e3,0x1f0,0x1fd,0x20c,0x21b,0x22a,0x239,0x248,0x257,0x266,0x275,0x28f, -0x2a3,0x2b7,0x2d2,0x2e1,0x2ea,0x2fa,0x302,0x30b,0x31a,0x323,0x333,0x344,0x355,0xa03,1,0, -0x17,0x9fa,0xa0b,0xa1c,0xa30,0xa47,0xa5f,0xa71,0xa86,0xa9d,0xab2,0xac2,0xad4,0xaf1,0xb0d,0xb1f, -0xb3c,0xb58,0xb74,0xb89,0xb9e,0xbb8,0xbd3,0xbee,0xba5,1,0,0x148,0xc16,0xc23,0xc36,0xc5e, -0xc7c,0xc9a,0xcb2,0xcdd,0xd07,0xd1f,0xd32,0xd45,0xd54,0xd63,0xd72,0xd81,0xd98,0xda9,0xdbc,0xdcf, -0xddc,0xde9,0xdf8,0xe09,0xe1e,0xe2f,0xe3a,0xe43,0xe54,0xe65,0xe78,0xe8a,0xe9d,0xeb0,0xeef,0xefc, -0xf09,0xf16,0xf2b,0xf5b,0xf75,0xf96,0xfc1,0xfe4,0x1042,0x1069,0x1084,0x1093,0x10ba,0x10e2,0x1105,0x1128, -0x1152,0x116b,0x118a,0x11ad,0x11d1,0x11e4,0x11fe,0x1228,0x1240,0x1268,0x1291,0x12a4,0x12b7,0x12ca,0x12f1,0x1300, -0x1320,0x134e,0x136c,0x139a,0x13b6,0x13d1,0x13ea,0x1403,0x1424,0x1454,0x1473,0x1495,0x14c9,0x14f6,0x153b,0x155c, -0x1586,0x15a7,0x15d0,0x15e3,0x1616,0x162d,0x163c,0x164d,0x1678,0x168f,0x16c0,0x16ee,0x1731,0x173c,0x1775,0x1786, -0x1797,0x17a4,0x17b7,0x17f1,0x1815,0x1839,0x1873,0x18ab,0x18d6,0x18ee,0x191a,0x1946,0x1953,0x1962,0x197f,0x19a1, -0x19cf,0x19ef,0x1a16,0x1a3d,0x1a5c,0x1a6f,0x1a80,0x1a91,0x1ab6,0x1adb,0x1b02,0x1b36,0x1b63,0x1b81,0x1b94,0x1bad, -0x1be6,0x1bf5,0x1c15,0x1c37,0x1c59,0x1c70,0x1c87,0x1cb4,0x1ccd,0x1ce6,0x1d17,0x1d41,0x1d5c,0x1d6f,0x1d8e,0x1d97, -0x1daa,0x1dc8,0x1de6,0x1df9,0x1e10,0x1e25,0x1e5a,0x1e7e,0x1e93,0x1ea2,0x1eb5,0x1ed9,0x1ee2,0x1f06,0x1f1d,0x1f30, -0x1f3f,0x1f4a,0x1f6b,0x1f83,0x1f92,0x1fa1,0x1fb0,0x1fc7,0x1fdc,0x1ff1,0x202a,0x203d,0x2059,0x2064,0x2071,0x209f, -0x20c3,0x20e6,0x20f9,0x211b,0x212e,0x2149,0x216c,0x218f,0x21b4,0x21c5,0x21f4,0x2221,0x2238,0x2253,0x2262,0x228d, -0x22c5,0x22ff,0x232d,0x233e,0x234b,0x236f,0x237e,0x239a,0x23b4,0x23d1,0x2409,0x241e,0x244b,0x246a,0x2498,0x24b8, -0x24ec,0x24fb,0x2525,0x2548,0x2573,0x257e,0x258f,0x25aa,0x25ce,0x25db,0x25f0,0x2617,0x2642,0x2679,0x268c,0x269d, -0x26cd,0x26de,0x26ed,0x2702,0x2720,0x2733,0x2746,0x275d,0x277a,0x2785,0x278e,0x27b0,0x27c5,0x27ea,0x2801,0x282a, -0x2845,0x285a,0x2873,0x2894,0x28c9,0x28da,0x290b,0x292f,0x2940,0x2959,0x2964,0x2991,0x29b3,0x29e1,0x2a14,0x2a23, -0x2a34,0x2a51,0x2a93,0x2aba,0x2ac7,0x2adc,0x2b00,0x2b26,0x2b5f,0x2b70,0x2b94,0x2b9f,0x2bac,0x2bbb,0x2be0,0x2c0e, -0x2c2a,0x2c47,0x2c54,0x2c65,0x2c83,0x2ca6,0x2cc3,0x2cd0,0x2cf0,0x2d0d,0x2d2e,0x2d57,0x2d68,0x2d87,0x2da0,0x2db9, -0x2dca,0x2e13,0x2e24,0x2e3d,0x2e6c,0x2e99,0x2ebe,0x2f00,0x2f1c,0x2f2b,0x2f42,0x2f70,0x2f89,0x2fb2,0x2fcc,0x3007, -0x3025,0x3034,0x3054,0x306f,0x3093,0x30af,0x30cd,0x30eb,0x3102,0x3111,0x311c,0x3159,0x316c,0x3196,0x31b6,0x31e4, -0x3208,0x3230,0x3255,0x3260,0x1fa9,1,0,0x12,0x32af,0x32bf,0x32d2,0x32e2,0x32f2,0x3301,0x3311,0x3323, -0x3336,0x3348,0x3358,0x3368,0x3377,0x3386,0x3396,0x33a3,0x33b2,0x33c6,0x2067,1,0,6,0x33eb,0x33f6, -0x3403,0x3410,0x341d,0x3428,0x20ab,1,0,0x1e,0x3445,0x3454,0x3469,0x347e,0x3493,0x34a7,0x34b8,0x34cc, -0x34df,0x34f0,0x3509,0x351b,0x352c,0x3540,0x3553,0x356b,0x357d,0x3588,0x3598,0x35a6,0x35bb,0x35d0,0x35e6,0x3600, -0x3616,0x3626,0x363a,0x364e,0x365f,0x3677,0x22d6,1,0,0x68,0x369f,0x36c2,0x36cb,0x36d8,0x36e3,0x36ec, -0x36f7,0x3700,0x3719,0x371e,0x3727,0x3744,0x374d,0x375a,0x3763,0x3787,0x378e,0x3797,0x37aa,0x37b5,0x37be,0x37c9, -0x37e2,0x37eb,0x37fa,0x3805,0x380e,0x3819,0x3822,0x3829,0x3832,0x383d,0x3846,0x385f,0x3868,0x3875,0x3880,0x3891, -0x389c,0x38b1,0x38c8,0x38d1,0x38da,0x38f3,0x38fe,0x3907,0x3910,0x3927,0x3944,0x394f,0x3960,0x396b,0x3972,0x397f, -0x398c,0x39b9,0x39ce,0x39d7,0x39f2,0x3a15,0x3a36,0x3a57,0x3a7c,0x3aa3,0x3ac4,0x3ae7,0x3b08,0x3b2f,0x3b50,0x3b75, -0x3b94,0x3bb3,0x3bd2,0x3bef,0x3c10,0x3c31,0x3c54,0x3c79,0x3c98,0x3cb7,0x3cd8,0x3cff,0x3d24,0x3d43,0x3d64,0x3d87, -0x3da2,0x3dbb,0x3dd6,0x3def,0x3e0c,0x3e27,0x3e44,0x3e63,0x3e80,0x3e9d,0x3ebc,0x3ed9,0x3ef4,0x3f11,0x3f2e,0x3f61, -0x3f88,0x3f9b,0x2639,1,0,6,0x3fc9,0x3fd8,0x3fe8,0x3ff8,0x4008,0x4019,0x2697,1,0,0x2b, -0x4037,0x4043,0x4051,0x4060,0x406f,0x407f,0x4090,0x40a4,0x40b9,0x40cf,0x40e2,0x40f6,0x4106,0x410f,0x411a,0x412a, -0x4146,0x4158,0x4166,0x4175,0x4181,0x4196,0x41aa,0x41bd,0x41cb,0x41df,0x41ed,0x41f7,0x4209,0x4215,0x4223,0x4233, -0x423a,0x4241,0x4248,0x424f,0x4256,0x426c,0x428d,0x870,0x429f,0x42aa,0x42b9,0x28f0,1,0,4,0x42d3, -0x42de,0x42ea,0x42f4,0x2916,1,0,0xc8,0x430b,0x4318,0x432d,0x433a,0x4349,0x4357,0x4366,0x4375,0x4387, -0x4396,0x43a4,0x43b5,0x43c4,0x43d3,0x43e0,0x43ec,0x43fb,0x440a,0x4414,0x4421,0x442e,0x443d,0x444b,0x445a,0x4466, -0x4470,0x447c,0x448c,0x449c,0x44aa,0x44b6,0x44c7,0x44d3,0x44df,0x44ed,0x44fa,0x4506,0x4513,0xe2f,0x4520,0x452e, -0x4548,0x4551,0x455f,0x456d,0x4579,0x4588,0x4596,0x45a4,0x45b0,0x45bf,0x45cd,0x45db,0x45e8,0x45f7,0x4612,0x4621, -0x4632,0x4643,0x4656,0x4668,0x4677,0x4689,0x4698,0x46a4,0x46af,0x1f3f,0x46bc,0x46c7,0x46d2,0x46dd,0x46e8,0x4703, -0x470e,0x4719,0x4724,0x4737,0x474b,0x4756,0x4765,0x4774,0x477f,0x478a,0x4797,0x47a6,0x47b4,0x47bf,0x47da,0x47e4, -0x47f5,0x4806,0x4815,0x4826,0x4831,0x483c,0x4847,0x4852,0x485d,0x4868,0x4873,0x487d,0x4888,0x4898,0x48a3,0x48b1, -0x48be,0x48c9,0x48d8,0x48e5,0x48f2,0x4901,0x490e,0x491f,0x4931,0x4941,0x494c,0x495f,0x4976,0x4984,0x4991,0x499c, -0x49a9,0x49ba,0x49d6,0x49ec,0x49f7,0x4a14,0x4a24,0x4a33,0x4a3e,0x4a49,0x2059,0x4a55,0x4a60,0x4a78,0x4a88,0x4a97, -0x4aa5,0x4ab3,0x4abe,0x4ac9,0x4add,0x4af4,0x4b0c,0x4b1c,0x4b2c,0x4b3c,0x4b4e,0x4b59,0x4b64,0x4b6e,0x4b7a,0x4b88, -0x4b9b,0x4ba7,0x4bb4,0x4bbf,0x4bdb,0x4be8,0x4bf6,0x4c0f,0x2959,0x4c1e,0x277a,0x4c2b,0x4c39,0x4c4b,0x4c59,0x4c65, -0x4c75,0x2b94,0x4c83,0x4c8f,0x4c9a,0x4ca5,0x4cb0,0x4cc4,0x4cd2,0x4ce9,0x4cf5,0x4d09,0x4d17,0x4d29,0x4d3f,0x4d4d, -0x4d5f,0x4d6d,0x4d8a,0x4d9c,0x4da9,0x4dba,0x4dcc,0x4de6,0x4df3,0x4e06,0x4e17,0x3111,0x4e24,0x3255,0x4e33,0x3370, -1,0,6,0x4e5f,0x4e72,0x4e82,0x4e90,0x4ea1,0x4eb1,0x33cc,0x12,0,1,0x4edb,0x4ee1,0x33d9, -0x12,0,1,0x4edb,0x4ee1,0x33e6,1,0,3,0x4edb,0x4ee1,0x4f1a,0x33fc,1,0,3, -0x4edb,0x4ee1,0x4f1a,0x3412,1,0,0x12,0x4fa4,0x4fae,0x4fba,0x4fc1,0x4fcc,0x4fd1,0x4fd8,0x4fdf,0x4fe8, -0x4fed,0x4ff2,0x5002,0x870,0x429f,0x500e,0x42aa,0x501e,0x42b9,0x34bb,1,0,0xf,0x4fa4,0x5045,0x504f, -0x5059,0x5064,0x4175,0x506e,0x507a,0x5082,0x5089,0x5093,0x4fba,0x4fc1,0x4fd1,0x509d,0x3542,1,0,0x17, -0x4fa4,0x50ba,0x5059,0x50c6,0x50d3,0x50e1,0x4175,0x50ec,0x4fba,0x50fd,0x4fd1,0x510c,0x511a,0x870,0x428d,0x5126, -0x5137,0x429f,0x500e,0x42aa,0x501e,0x42b9,0x5148,0x365f,1,0,3,0x517b,0x5183,0x518b,0x3678,1, -0,0x10,0x51b4,0x51bb,0x51ca,0x51eb,0x520e,0x5219,0x5238,0x524f,0x525c,0x5265,0x5284,0x52b7,0x52d2,0x5301, -0x531e,0x5343,0x3711,1,0,0x24,0x5392,0x539f,0x53b2,0x53bf,0x53ec,0x5411,0x5426,0x5445,0x5466,0x5493, -0x54cc,0x54ef,0x5512,0x553f,0x5574,0x559b,0x55c4,0x55fb,0x562a,0x564b,0x5670,0x567f,0x56a2,0x56b9,0x56c6,0x56d5, -0x56f2,0x570b,0x572e,0x5753,0x576c,0x5781,0x5790,0x57a1,0x57ae,0x57cf,0x38e1,1,0,4,0x580d,0x5818, -0x5830,0x5848,0x391d,0x36,1,2,4,8,0xe,0x10,0x20,0x3e,0x40,0x80,0x100,0x1c0, -0x200,0x400,0x800,0xe00,0x1000,0x2000,0x4000,0x7000,0x8000,0x10000,0x20000,0x40000,0x78001,0x80000,0x100000,0x200000, -0x400000,0x800000,0x1000000,0x2000000,0x4000000,0x8000000,0xf000000,0x10000000,0x20000000,0x30f80000,0x3445,0x3454,0x3469,0x347e,0x5881,0x3493, -0x34a7,0x5877,0x34b8,0x34cc,0x34df,0x5892,0x34f0,0x3509,0x351b,0x58a9,0x352c,0x3540,0x3553,0x58d2,0x356b,0x357d, -0x3588,0x3598,0x586e,0x35a6,0x35bb,0x35d0,0x35e6,0x3600,0x3616,0x3626,0x363a,0x364e,0x58c8,0x365f,0x3677,0x58b3 +const int32_t PropNameData::valueMaps[1436]={ +6,0,0x4b,0,0xf7,0x368,0xf7,0x37e,0xf7,0x393,0xf7,0x3a9,0xf7,0x3b4,0xf7,0x3d5, +0xf7,0x3e5,0xf7,0x3f4,0xf7,0x402,0xf7,0x426,0xf7,0x43d,0xf7,0x455,0xf7,0x46c,0xf7,0x47b, +0xf7,0x48a,0xf7,0x49b,0xf7,0x4a9,0xf7,0x4bb,0xf7,0x4d5,0xf7,0x4f0,0xf7,0x505,0xf7,0x522, +0xf7,0x533,0xf7,0x53e,0xf7,0x55d,0xf7,0x573,0xf7,0x584,0xf7,0x594,0xf7,0x5af,0xf7,0x5c8, +0xf7,0x5d9,0xf7,0x5f3,0xf7,0x606,0xf7,0x616,0xf7,0x630,0xf7,0x649,0xf7,0x660,0xf7,0x674, +0xf7,0x68a,0xf7,0x69e,0xf7,0x6b4,0xf7,0x6ce,0xf7,0x6e6,0xf7,0x702,0xf7,0x70a,0xf7,0x712, +0xf7,0x71a,0xf7,0x722,0xf7,0x72b,0xf7,0x738,0xf7,0x74b,0xf7,0x768,0xf7,0x785,0xf7,0x7a2, +0xf7,0x7c0,0xf7,0x7de,0xf7,0x802,0xf7,0x80f,0xf7,0x829,0xf7,0x83e,0xf7,0x859,0xf7,0x870, +0xf7,0x887,0xf7,0x8a9,0xf7,0x8c8,0xf7,0x8e1,0xf7,0x90e,0xf7,0x947,0xf7,0x978,0xf7,0x9a7, +0xf7,0x9d6,0xf7,0x9eb,0xf7,0xa04,0xf7,0xa2f,0xf7,0x1000,0x1019,0xa60,0x173,0xc80,0x18e,0x331c, +0xfd,0x333b,0x2db,0x3479,0x2f1,0x34d3,0x2fb,0x3730,0x31d,0x405b,0x389,0x40cb,0x393,0x43b0,0x3c7,0x43ee, +0x3cf,0x4f33,0x49b,0x4fb1,0x4a5,0x4fd6,0x4ab,0x4ff0,0x4b1,0x5011,0x4b8,0x502b,0xfd,0x5050,0xfd,0x5076, +0x4bf,0x5120,0x4d5,0x5199,0x4e8,0x524b,0x503,0x5282,0x50a,0x5462,0x51e,0x58e2,0x546,0x2000,0x2001,0x5941, +0x54e,0x3000,0x3001,0x59cd,0,0x4000,0x400e,0x59df,0,0x59e8,0,0x5a02,0,0x5a13,0,0x5a24, +0,0x5a3a,0,0x5a43,0,0x5a60,0,0x5a7e,0,0x5a9c,0,0x5aba,0,0x5ad0,0,0x5ae4, +0,0x5afa,0,0x7000,0x7001,0x5b13,0,0x87a,0x12,0,1,0x12,0x20,0x898,0x4a,0, +1,6,7,8,9,0xa,0xb,0xc,0xd,0xe,0xf,0x10,0x11,0x12,0x13,0x14, +0x15,0x16,0x17,0x18,0x19,0x1a,0x1b,0x1c,0x1d,0x1e,0x1f,0x20,0x21,0x22,0x23,0x24, +0x54,0x5b,0x67,0x6b,0x76,0x7a,0x81,0x82,0x84,0x85,0xc8,0xca,0xd6,0xd8,0xda,0xdc, +0xde,0xe0,0xe2,0xe4,0xe6,0xe8,0xe9,0xea,0xf0,0x2e,0x40,0x4c,0x5e,0x68,0x79,0x84, +0x91,0x9e,0xab,0xb8,0xc5,0xd2,0xdf,0xec,0xf9,0x106,0x113,0x120,0x12d,0x13a,0x147,0x154, +0x161,0x16e,0x17b,0x188,0x195,0x1a2,0x1af,0x1bc,0x1c9,0x1d6,0x1e3,0x1f0,0x1fd,0x20c,0x21b,0x22a, +0x239,0x248,0x257,0x266,0x275,0x28f,0x2a3,0x2b7,0x2d2,0x2e1,0x2ea,0x2fa,0x302,0x30b,0x31a,0x323, +0x333,0x344,0x355,0xa39,1,0,0x17,0xa6f,0xa80,0xa91,0xaa5,0xabc,0xad4,0xae6,0xafb,0xb12, +0xb27,0xb37,0xb49,0xb66,0xb82,0xb94,0xbb1,0xbcd,0xbe9,0xbfe,0xc13,0xc2d,0xc48,0xc63,0xbdb,1, +0,0x149,0xc8b,0xc98,0xcab,0xcd3,0xcf1,0xd0f,0xd27,0xd52,0xd7c,0xd94,0xda7,0xdba,0xdc9,0xdd8, +0xde7,0xdf6,0xe0d,0xe1e,0xe31,0xe44,0xe51,0xe5e,0xe6d,0xe7e,0xe93,0xea4,0xeaf,0xeb8,0xec9,0xeda, +0xeed,0xeff,0xf12,0xf25,0xf64,0xf71,0xf7e,0xf8b,0xfa0,0xfd0,0xfea,0x100b,0x1036,0x1059,0x10b7,0x10de, +0x10f9,0x1108,0x112f,0x1157,0x117a,0x119d,0x11c7,0x11e0,0x11ff,0x1222,0x1246,0x1259,0x1273,0x129d,0x12b5,0x12dd, +0x1306,0x1319,0x132c,0x133f,0x1366,0x1375,0x1395,0x13c3,0x13e1,0x140f,0x142b,0x1446,0x145f,0x1478,0x1499,0x14c9, +0x14e8,0x150a,0x153e,0x156b,0x15b0,0x15d1,0x15fb,0x161c,0x1645,0x1658,0x168b,0x16a2,0x16b1,0x16c2,0x16ed,0x1704, +0x1735,0x1763,0x17a6,0x17b1,0x17ea,0x17fb,0x180c,0x1819,0x182c,0x1866,0x188a,0x18ae,0x18e8,0x1920,0x194b,0x1963, +0x198f,0x19bb,0x19c8,0x19d7,0x19f4,0x1a16,0x1a44,0x1a64,0x1a8b,0x1ab2,0x1ad1,0x1ae4,0x1af5,0x1b06,0x1b2b,0x1b50, +0x1b77,0x1bab,0x1bd8,0x1bf6,0x1c09,0x1c22,0x1c5b,0x1c6a,0x1c8a,0x1cac,0x1cce,0x1ce5,0x1cfc,0x1d29,0x1d42,0x1d5b, +0x1d8c,0x1db6,0x1dd1,0x1de4,0x1e03,0x1e0c,0x1e1f,0x1e3d,0x1e5b,0x1e6e,0x1e85,0x1e9a,0x1ecf,0x1ef3,0x1f08,0x1f17, +0x1f2a,0x1f4e,0x1f57,0x1f7b,0x1f92,0x1fa5,0x1fb4,0x1fbf,0x1fe0,0x1ff8,0x2007,0x2016,0x2025,0x203c,0x2051,0x2066, +0x209f,0x20b2,0x20ce,0x20d9,0x20e6,0x2114,0x2138,0x215b,0x216e,0x2190,0x21a3,0x21be,0x21e1,0x2204,0x2229,0x223a, +0x2269,0x2296,0x22ad,0x22c8,0x22d7,0x2302,0x233a,0x2374,0x23a2,0x23b3,0x23c0,0x23e4,0x23f3,0x240f,0x2429,0x2446, +0x247e,0x2493,0x24c0,0x24df,0x250d,0x252d,0x2561,0x2570,0x259a,0x25bd,0x25e8,0x25f3,0x2604,0x261f,0x2643,0x2650, +0x2665,0x268c,0x26b7,0x26ee,0x2701,0x2712,0x2742,0x2753,0x2762,0x2777,0x2795,0x27a8,0x27bb,0x27d2,0x27ef,0x27fa, +0x2803,0x2825,0x283a,0x285f,0x2876,0x289f,0x28ba,0x28cf,0x28e8,0x2909,0x293e,0x294f,0x2980,0x29a4,0x29b5,0x29ce, +0x29d9,0x2a06,0x2a28,0x2a56,0x2a89,0x2a98,0x2aa9,0x2ac6,0x2b08,0x2b2f,0x2b3c,0x2b51,0x2b75,0x2b9b,0x2bd4,0x2be5, +0x2c09,0x2c14,0x2c21,0x2c30,0x2c55,0x2c83,0x2c9f,0x2cbc,0x2cc9,0x2cda,0x2cf8,0x2d1b,0x2d38,0x2d45,0x2d65,0x2d82, +0x2da3,0x2dcc,0x2ddd,0x2dfc,0x2e15,0x2e2e,0x2e3f,0x2e88,0x2e99,0x2eb2,0x2ee1,0x2f0e,0x2f33,0x2f75,0x2f91,0x2fa0, +0x2fb7,0x2fe5,0x2ffe,0x3027,0x3041,0x307c,0x309a,0x30a9,0x30c9,0x30e4,0x3108,0x3124,0x3142,0x3160,0x3177,0x3186, +0x3191,0x31ce,0x31e1,0x320b,0x322b,0x3259,0x327d,0x32a5,0x32ca,0x32d5,0x32ee,0x1fe5,1,0,0x12,0x3352, +0x3362,0x3375,0x3385,0x3395,0x33a4,0x33b4,0x33c6,0x33d9,0x33eb,0x33fb,0x340b,0x341a,0x3429,0x3439,0x3446,0x3455, +0x3469,0x20a3,1,0,6,0x348e,0x3499,0x34a6,0x34b3,0x34c0,0x34cb,0x20e7,1,0,0x1e,0x34e8, +0x34f7,0x350c,0x3521,0x3536,0x354a,0x355b,0x356f,0x3582,0x3593,0x35ac,0x35be,0x35cf,0x35e3,0x35f6,0x360e,0x3620, +0x362b,0x363b,0x3649,0x365e,0x3673,0x3689,0x36a3,0x36b9,0x36c9,0x36dd,0x36f1,0x3702,0x371a,0x2312,1,0, +0x68,0x3742,0x3765,0x376e,0x377b,0x3786,0x378f,0x379a,0x37a3,0x37bc,0x37c1,0x37ca,0x37e7,0x37f0,0x37fd,0x3806, +0x382a,0x3831,0x383a,0x384d,0x3858,0x3861,0x386c,0x3885,0x388e,0x389d,0x38a8,0x38b1,0x38bc,0x38c5,0x38cc,0x38d5, +0x38e0,0x38e9,0x3902,0x390b,0x3918,0x3923,0x3934,0x393f,0x3954,0x396b,0x3974,0x397d,0x3996,0x39a1,0x39aa,0x39b3, +0x39ca,0x39e7,0x39f2,0x3a03,0x3a0e,0x3a15,0x3a22,0x3a2f,0x3a5c,0x3a71,0x3a7a,0x3a95,0x3ab8,0x3ad9,0x3afa,0x3b1f, +0x3b46,0x3b67,0x3b8a,0x3bab,0x3bd2,0x3bf3,0x3c18,0x3c37,0x3c56,0x3c75,0x3c92,0x3cb3,0x3cd4,0x3cf7,0x3d1c,0x3d3b, +0x3d5a,0x3d7b,0x3da2,0x3dc7,0x3de6,0x3e07,0x3e2a,0x3e45,0x3e5e,0x3e79,0x3e92,0x3eaf,0x3eca,0x3ee7,0x3f06,0x3f23, +0x3f40,0x3f5f,0x3f7c,0x3f97,0x3fb4,0x3fd1,0x4004,0x402b,0x403e,0x2675,1,0,6,0x406c,0x407b,0x408b, +0x409b,0x40ab,0x40bc,0x26d3,1,0,0x30,0x40da,0x40e6,0x40f4,0x4103,0x4112,0x4122,0x4133,0x4147,0x415c, +0x4172,0x4185,0x4199,0x41a9,0x41b2,0x41bd,0x41cd,0x41e9,0x41fb,0x4209,0x4218,0x4224,0x4239,0x424d,0x4260,0x426e, +0x4282,0x4290,0x429a,0x42ac,0x42b8,0x42c6,0x42d6,0x42dd,0x42e4,0x42eb,0x42f2,0x42f9,0x430f,0x4330,0x870,0x4342, +0x434d,0x435c,0x4365,0x4370,0x4383,0x4394,0x43a5,0x2963,1,0,4,0x43c1,0x43cc,0x43d8,0x43e2,0x2989, +1,0,0xc8,0x43f9,0x4406,0x441b,0x4428,0x4437,0x4445,0x4454,0x4463,0x4475,0x4484,0x4492,0x44a3,0x44b2, +0x44c1,0x44ce,0x44da,0x44e9,0x44f8,0x4502,0x450f,0x451c,0x452b,0x4539,0x4548,0x4554,0x455e,0x456a,0x457a,0x458a, +0x4598,0x45a4,0x45b5,0x45c1,0x45cd,0x45db,0x45e8,0x45f4,0x4601,0xea4,0x460e,0x461c,0x4636,0x463f,0x464d,0x465b, +0x4667,0x4676,0x4684,0x4692,0x469e,0x46ad,0x46bb,0x46c9,0x46d6,0x46e5,0x4700,0x470f,0x4720,0x4731,0x4744,0x4756, +0x4765,0x4777,0x4786,0x4792,0x479d,0x1fb4,0x47aa,0x47b5,0x47c0,0x47cb,0x47d6,0x47f1,0x47fc,0x4807,0x4812,0x4825, +0x4839,0x4844,0x4853,0x4862,0x486d,0x4878,0x4885,0x4894,0x48a2,0x48ad,0x48c8,0x48d2,0x48e3,0x48f4,0x4903,0x4914, +0x491f,0x492a,0x4935,0x4940,0x494b,0x4956,0x4961,0x496b,0x4976,0x4986,0x4991,0x499f,0x49ac,0x49b7,0x49c6,0x49d3, +0x49e0,0x49ef,0x49fc,0x4a0d,0x4a1f,0x4a2f,0x4a3a,0x4a4d,0x4a64,0x4a72,0x4a7f,0x4a8a,0x4a97,0x4aa8,0x4ac4,0x4ada, +0x4ae5,0x4b02,0x4b12,0x4b21,0x4b2c,0x4b37,0x20ce,0x4b43,0x4b4e,0x4b66,0x4b76,0x4b85,0x4b93,0x4ba1,0x4bac,0x4bb7, +0x4bcb,0x4be2,0x4bfa,0x4c0a,0x4c1a,0x4c2a,0x4c3c,0x4c47,0x4c52,0x4c5c,0x4c68,0x4c76,0x4c89,0x4c95,0x4ca2,0x4cad, +0x4cc9,0x4cd6,0x4ce4,0x4cfd,0x29ce,0x4d0c,0x27ef,0x4d19,0x4d27,0x4d39,0x4d47,0x4d53,0x4d63,0x2c09,0x4d71,0x4d7d, +0x4d88,0x4d93,0x4d9e,0x4db2,0x4dc0,0x4dd7,0x4de3,0x4df7,0x4e05,0x4e17,0x4e2d,0x4e3b,0x4e4d,0x4e5b,0x4e78,0x4e8a, +0x4e97,0x4ea8,0x4eba,0x4ed4,0x4ee1,0x4ef4,0x4f05,0x3186,0x4f12,0x32ca,0x4f21,0x33e3,1,0,6,0x4f4d, +0x4f60,0x4f70,0x4f7e,0x4f8f,0x4f9f,0x343f,0x12,0,1,0x4fc9,0x4fcf,0x344c,0x12,0,1,0x4fc9, +0x4fcf,0x3459,1,0,3,0x4fc9,0x4fcf,0x5008,0x346f,1,0,3,0x4fc9,0x4fcf,0x5008,0x3485, +1,0,0x12,0x5092,0x509c,0x50a8,0x50af,0x50ba,0x50bf,0x50c6,0x50cd,0x50d6,0x50db,0x50e0,0x50f0,0x870, +0x4342,0x50fc,0x434d,0x510c,0x435c,0x352e,1,0,0xf,0x5092,0x5133,0x513d,0x5147,0x5152,0x4218,0x515c, +0x5168,0x5170,0x5177,0x5181,0x50a8,0x50af,0x50bf,0x518b,0x35b5,1,0,0x17,0x5092,0x51a8,0x5147,0x51b4, +0x51c1,0x51cf,0x4218,0x51da,0x50a8,0x51eb,0x50bf,0x51fa,0x5208,0x870,0x4330,0x5214,0x5225,0x4342,0x50fc,0x434d, +0x510c,0x435c,0x5236,0x36d2,1,0,3,0x5269,0x5271,0x5279,0x36eb,1,0,0x10,0x52a2,0x52a9, +0x52b8,0x52d9,0x52fc,0x5307,0x5326,0x533d,0x534a,0x5353,0x5372,0x53a5,0x53c0,0x53ef,0x540c,0x5431,0x3784,1, +0,0x24,0x5480,0x548d,0x54a0,0x54ad,0x54da,0x54ff,0x5514,0x5533,0x5554,0x5581,0x55ba,0x55dd,0x5600,0x562d, +0x5662,0x5689,0x56b2,0x56e9,0x5718,0x5739,0x575e,0x576d,0x5790,0x57a7,0x57b4,0x57c3,0x57e0,0x57f9,0x581c,0x5841, +0x585a,0x586f,0x587e,0x588f,0x589c,0x58bd,0x3954,1,0,4,0x58fb,0x5906,0x591e,0x5936,0x3990,0x36, +1,2,4,8,0xe,0x10,0x20,0x3e,0x40,0x80,0x100,0x1c0,0x200,0x400,0x800,0xe00, +0x1000,0x2000,0x4000,0x7000,0x8000,0x10000,0x20000,0x40000,0x78001,0x80000,0x100000,0x200000,0x400000,0x800000,0x1000000,0x2000000, +0x4000000,0x8000000,0xf000000,0x10000000,0x20000000,0x30f80000,0x34e8,0x34f7,0x350c,0x3521,0x596f,0x3536,0x354a,0x5965,0x355b,0x356f, +0x3582,0x5980,0x3593,0x35ac,0x35be,0x5997,0x35cf,0x35e3,0x35f6,0x59c0,0x360e,0x3620,0x362b,0x363b,0x595c,0x3649, +0x365e,0x3673,0x3689,0x36a3,0x36b9,0x36c9,0x36dd,0x36f1,0x59b6,0x3702,0x371a,0x59a1 }; -const uint8_t PropNameData::bytesTries[15412]={ +const uint8_t PropNameData::bytesTries[15527]={ 0,0x15,0x6d,0xc3,0xc7,0x73,0xc2,0x12,0x76,0x7a,0x76,0x6a,0x77,0xa2,0x52,0x78, 1,0x64,0x50,0x69,0x10,0x64,1,0x63,0x30,0x73,0x62,0x13,0x74,0x61,0x72,0x74, 0x63,0x60,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x61,0x13,0x69,0x67,0x69,0x74, @@ -166,913 +167,920 @@ const uint8_t PropNameData::bytesTries[15412]={ 0x30,0x77,0x10,0x73,0x77,0x11,0x79,0x6e,0x75,0x12,0x65,0x72,0x6e,1,0x73,0x38, 0x77,0x18,0x68,0x69,0x74,0x65,0x73,0x70,0x61,0x63,0x65,0x77,0x14,0x79,0x6e,0x74, 0x61,0x78,0x75,0x10,0x6d,0x9f,1,0x6d,0x3c,0x75,0x1a,0x6f,0x74,0x61,0x74,0x69, -0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x53,0x12,0x61,0x72,0x6b,0x53,0x66,0xc1,0xf8,0x69, -0xc1,0x3c,0x69,0xa2,0x6f,0x6a,0xa4,9,0x6c,4,0x62,0xc3,8,0x63,0x8c,0x65, +0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x53,0x12,0x61,0x72,0x6b,0x53,0x66,0xc2,0x2e,0x69, +0xc1,0x72,0x69,0xa2,0x6f,0x6a,0xa4,0x3f,0x6c,4,0x62,0xc3,8,0x63,0x8c,0x65, 0x98,0x69,0xa2,0x56,0x6f,2,0x65,0x4b,0x67,0x4c,0x77,0x11,0x65,0x72,0x4c,0x13, 0x63,0x61,0x73,0x65,0x4c,0x16,0x6d,0x61,0x70,0x70,0x69,0x6e,0x67,0xd9,0x40,4, 0x11,0x69,0x63,0x1f,0x61,0x6c,0x6f,0x72,0x64,0x65,0x72,0x65,0x78,0x63,0x65,0x70, 0x74,0x69,0x6f,0x6e,0x4b,0xd8,0x40,4,0x11,0x63,0x63,0xc3,0x10,0x18,0x61,0x64, 0x63,0x61,0x6e,0x6f,0x6e,0x69,0x63,0x1f,0x61,0x6c,0x63,0x6f,0x6d,0x62,0x69,0x6e, 0x69,0x6e,0x67,0x63,0x6c,0x61,0x73,0x73,0xc3,0x10,0x16,0x6e,0x65,0x62,0x72,0x65, -0x61,0x6b,0xc3,8,2,0x64,0x4a,0x6e,0xa2,0x5b,0x73,1,0x63,0xd9,0x40,3, -0x6f,0x16,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0xd9,0x40,3,2,0x63,0x80,0x65, -0x90,0x73,0x40,1,0x62,0x52,0x74,0x46,1,0x61,0x40,0x72,0x1c,0x69,0x6e,0x61, -0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x47,0x11,0x72,0x74,0x41,0x44, -0x1c,0x69,0x6e,0x61,0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x45,0x3e, -0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3f,0x10,0x6f,0x42,0x16,0x67,0x72,0x61, -0x70,0x68,0x69,0x63,0x43,2,0x64,0x2e,0x70,0x86,0x73,0x10,0x63,0xc3,0x17,0x11, -0x69,0x63,1,0x70,0x46,0x73,0x1e,0x79,0x6c,0x6c,0x61,0x62,0x69,0x63,0x63,0x61, -0x74,0x65,0x67,0x6f,0x72,0x79,0xc3,0x17,0x10,0x6f,0x1f,0x73,0x69,0x74,0x69,0x6f, -0x6e,0x61,0x6c,0x63,0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc3,0x16,0x10,0x63,0xc3, -0x16,2,0x67,0xc3,6,0x6f,0x26,0x74,0xc3,7,0x11,0x69,0x6e,1,0x63,0x4a, -0x69,0x11,0x6e,0x67,1,0x67,0x2e,0x74,0x12,0x79,0x70,0x65,0xc3,7,0x13,0x72, -0x6f,0x75,0x70,0xc3,6,0x48,0x15,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x49,0x66,0x86, -0x67,0xa2,0x4a,0x68,3,0x61,0x36,0x65,0x58,0x73,0x68,0x79,0x13,0x70,0x68,0x65, -0x6e,0x3d,0x1f,0x6e,0x67,0x75,0x6c,0x73,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x74, -0x79,0x70,0x65,0xc3,0xb,0x10,0x78,0x3a,0x14,0x64,0x69,0x67,0x69,0x74,0x3b,0x10, -0x74,0xc3,0xb,0x16,0x75,0x6c,0x6c,0x63,0x6f,0x6d,0x70,0x1f,0x6f,0x73,0x69,0x74, -0x69,0x6f,0x6e,0x65,0x78,0x63,0x6c,0x75,0x73,0x69,0x6f,0x6e,0x33,2,0x63,0xa2, -0x44,0x65,0xa2,0x4b,0x72,3,0x61,0x34,0x62,0x84,0x65,0x8a,0x6c,0x12,0x69,0x6e, -0x6b,0x39,0x11,0x70,0x68,0x7c,0x12,0x65,0x6d,0x65,3,0x62,0x5e,0x63,0x30,0x65, -0x48,0x6c,0x12,0x69,0x6e,0x6b,0x39,0x1a,0x6c,0x75,0x73,0x74,0x65,0x72,0x62,0x72, -0x65,0x61,0x6b,0xc3,0x12,0x14,0x78,0x74,0x65,0x6e,0x64,0x37,0x12,0x61,0x73,0x65, -0x35,0x11,0x78,0x74,0x37,0xc2,5,1,0x62,0xc3,0x12,0x6d,0xd9,0x20,0,0x1c, -0x6e,0x65,0x72,0x61,0x6c,0x63,0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc2,5,0x13, -0x6d,0x61,0x73,0x6b,0xd9,0x20,0,0x61,0xa2,0xa2,0x62,0xa2,0xd0,0x63,0xa4,0x4f, -0x64,0xa6,0x1c,0x65,5,0x6d,0x75,0x6d,0x6e,0x70,0xa2,0x6b,0x78,0x10,0x74,0x30, -1,0x65,0x2c,0x70,0x12,0x69,0x63,0x74,0xa1,0x12,0x6e,0x64,0x65,1,0x64,0x24, -0x72,0x31,0x1b,0x70,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0xa1, -0x10,0x6f,1,0x64,0x97,0x6a,0x10,0x69,0x92,3,0x63,0x44,0x6b,0x54,0x6d,0x70, -0x70,0x1a,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x95,0x17,0x6f, -0x6d,0x70,0x6f,0x6e,0x65,0x6e,0x74,0x9b,0x1c,0x65,0x79,0x63,0x61,0x70,0x73,0x65, -0x71,0x75,0x65,0x6e,0x63,0x65,0xa3,0x42,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72, -0x96,0x13,0x62,0x61,0x73,0x65,0x99,0x12,0x72,0x65,0x73,0x95,0x61,0x30,0x62,0x4e, -0x63,0x12,0x6f,0x6d,0x70,0x9b,0xc2,4,0x1b,0x73,0x74,0x61,0x73,0x69,0x61,0x6e, -0x77,0x69,0x64,0x74,0x68,0xc3,4,0x12,0x61,0x73,0x65,0x99,3,0x67,0x44,0x68, -0x4a,0x6c,0x4e,0x73,0x1a,0x63,0x69,0x69,0x68,0x65,0x78,0x64,0x69,0x67,0x69,0x74, -0x23,0x10,0x65,0xd9,0x40,0,0x11,0x65,0x78,0x23,1,0x6e,0x38,0x70,0x11,0x68, -0x61,0x20,0x14,0x62,0x65,0x74,0x69,0x63,0x21,0x11,0x75,0x6d,0x79,5,0x6c,0x22, -0x6c,0x36,0x6d,0x52,0x70,1,0x62,0xd9,0x40,0xd,0x74,0xc3,0x15,2,0x61,0x32, -0x6b,0xc3,1,0x6f,0x11,0x63,0x6b,0xc3,1,0x11,0x6e,0x6b,0x7b,0x10,0x67,0xd9, -0x40,1,0x61,0xa2,0x4f,0x63,0xc3,0,0x69,0x11,0x64,0x69,2,0x63,0x54,0x6d, -0x74,0x70,0x1b,0x61,0x69,0x72,0x65,0x64,0x62,0x72,0x61,0x63,0x6b,0x65,0x74,0xd8, -0x40,0xd,0x13,0x74,0x79,0x70,0x65,0xc3,0x15,0x24,1,0x6c,0x30,0x6f,0x14,0x6e, -0x74,0x72,0x6f,0x6c,0x25,0x12,0x61,0x73,0x73,0xc3,0,0x26,0x14,0x69,0x72,0x72, -0x6f,0x72,1,0x65,0x38,0x69,0x16,0x6e,0x67,0x67,0x6c,0x79,0x70,0x68,0xd9,0x40, -1,0x10,0x64,0x27,0x17,0x73,0x69,0x63,0x65,0x6d,0x6f,0x6a,0x69,0xa3,0x41,6, -0x68,0x7c,0x68,0x54,0x69,0x85,0x6f,0xa2,0x6f,0x77,4,0x63,0x30,0x6b,0x36,0x6c, -0x87,0x74,0x8b,0x75,0x89,1,0x66,0x8d,0x6d,0x8f,0x11,0x63,0x66,0x91,0x18,0x61, -0x6e,0x67,0x65,0x73,0x77,0x68,0x65,0x6e,4,0x63,0x44,0x6c,0x6c,0x6e,0x7e,0x74, -0x98,0x75,0x18,0x70,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x64,0x89,0x12,0x61,0x73, -0x65,1,0x66,0x30,0x6d,0x14,0x61,0x70,0x70,0x65,0x64,0x8f,0x14,0x6f,0x6c,0x64, -0x65,0x64,0x8d,0x18,0x6f,0x77,0x65,0x72,0x63,0x61,0x73,0x65,0x64,0x87,0x1c,0x66, -0x6b,0x63,0x63,0x61,0x73,0x65,0x66,0x6f,0x6c,0x64,0x65,0x64,0x91,0x18,0x69,0x74, -0x6c,0x65,0x63,0x61,0x73,0x65,0x64,0x8b,0x13,0x6d,0x70,0x65,0x78,0x33,0x61,0x2e, -0x63,0xa2,0x48,0x66,0xd9,0x40,2,1,0x6e,0x72,0x73,0x10,0x65,3,0x64,0x83, -0x66,0x3a,0x69,0x4a,0x73,0x17,0x65,0x6e,0x73,0x69,0x74,0x69,0x76,0x65,0x65,0x15, -0x6f,0x6c,0x64,0x69,0x6e,0x67,0xd9,0x40,2,0x17,0x67,0x6e,0x6f,0x72,0x61,0x62, -0x6c,0x65,0x85,0x13,0x6f,0x6e,0x69,0x63,0x1f,0x61,0x6c,0x63,0x6f,0x6d,0x62,0x69, -0x6e,0x69,0x6e,0x67,0x63,0x6c,0x61,0x73,0x73,0xc3,2,0x10,0x63,0xc3,2,3, -0x61,0x30,0x65,0x34,0x69,0xa2,0x41,0x74,0xc3,3,0x11,0x73,0x68,0x29,2,0x63, -0x3a,0x66,0x58,0x70,0x2c,0x16,0x72,0x65,0x63,0x61,0x74,0x65,0x64,0x2d,0x1d,0x6f, -0x6d,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x74,0x79,0x70,0x65,0xc3,3,0x15, -0x61,0x75,0x6c,0x74,0x69,0x67,0x1f,0x6e,0x6f,0x72,0x61,0x62,0x6c,0x65,0x63,0x6f, -0x64,0x65,0x70,0x6f,0x69,0x6e,0x74,0x2b,0x2a,0x10,0x61,0x2e,0x15,0x63,0x72,0x69, -0x74,0x69,0x63,0x2f,3,0x66,0x34,0x6e,0x3e,0x74,0x42,0x79,0x22,0x11,0x65,0x73, -0x23,0x20,0x13,0x61,0x6c,0x73,0x65,0x21,0x20,0x10,0x6f,0x21,0x22,0x12,0x72,0x75, -0x65,0x23,0xb,0x6b,0x5b,0x6f,0x23,0x6f,0x3c,0x72,0x4c,0x76,1,0x69,0x24,0x72, -0x33,0x13,0x72,0x61,0x6d,0x61,0x33,0x10,0x76,0x22,0x14,0x65,0x72,0x6c,0x61,0x79, -0x23,0xa2,0xe2,0x13,0x69,0x67,0x68,0x74,0xa3,0xe2,0x6b,0x58,0x6c,0x74,0x6e,3, -0x6b,0x2f,0x6f,0x30,0x72,0x21,0x75,0x12,0x6b,0x74,0x61,0x2f,0x19,0x74,0x72,0x65, -0x6f,0x72,0x64,0x65,0x72,0x65,0x64,0x21,1,0x61,0x24,0x76,0x31,0x18,0x6e,0x61, -0x76,0x6f,0x69,0x63,0x69,0x6e,0x67,0x31,0xa2,0xe0,0x12,0x65,0x66,0x74,0xa3,0xe0, -0x64,0x45,0x64,0x4e,0x68,0x88,0x69,1,0x6f,0x26,0x73,0xa3,0xf0,0x1a,0x74,0x61, -0x73,0x75,0x62,0x73,0x63,0x72,0x69,0x70,0x74,0xa3,0xf0,2,0x61,0xa3,0xea,0x62, -0xa3,0xe9,0x6f,0x13,0x75,0x62,0x6c,0x65,1,0x61,0x30,0x62,0x13,0x65,0x6c,0x6f, -0x77,0xa3,0xe9,0x13,0x62,0x6f,0x76,0x65,0xa3,0xea,0x12,0x61,0x6e,0x72,0x2c,0x15, -0x65,0x61,0x64,0x69,0x6e,0x67,0x2d,0x61,0xa2,0x7b,0x62,0xa2,0xd4,0x63,0x11,0x63, -0x63,4,0x31,0x3c,0x32,0xa2,0x42,0x33,0xa2,0x56,0x38,0xa2,0x64,0x39,0x10,0x31, -0xa3,0x5b,9,0x35,0xa,0x35,0x3f,0x36,0x41,0x37,0x43,0x38,0x45,0x39,0x47,0x30, -0x30,0x31,0x3c,0x32,0x42,0x33,0x4e,0x34,0x3d,0x34,1,0x33,0xa3,0x67,0x37,0xa3, -0x6b,0x36,0x10,0x38,0xa3,0x76,0x38,1,0x32,0xa3,0x7a,0x39,0xa3,0x81,0x3a,2, -0x30,0xa3,0x82,0x32,0xa3,0x84,0x33,0xa3,0x85,9,0x35,0xa,0x35,0x53,0x36,0x55, -0x37,0x57,0x38,0x59,0x39,0x5b,0x30,0x49,0x31,0x4b,0x32,0x4d,0x33,0x4f,0x34,0x51, -6,0x33,8,0x33,0x63,0x34,0x65,0x35,0x67,0x36,0x69,0x30,0x5d,0x31,0x5f,0x32, -0x61,0x10,0x34,0xa3,0x54,0xa2,0xe6,3,0x62,0xa0,0x6c,0xa3,0xe4,0x72,0xa3,0xe8, -0x74,2,0x61,0x74,0x62,0x7c,0x74,0x14,0x61,0x63,0x68,0x65,0x64,1,0x61,0x3e, -0x62,0x13,0x65,0x6c,0x6f,0x77,0xa2,0xca,0x13,0x6c,0x65,0x66,0x74,0xa3,0xc8,0x13, -0x62,0x6f,0x76,0x65,0xa2,0xd6,0x14,0x72,0x69,0x67,0x68,0x74,0xa3,0xd8,0xa2,0xd6, -0x10,0x72,0xa3,0xd8,0xa2,0xca,0x10,0x6c,0xa3,0xc8,0x12,0x6f,0x76,0x65,0xa2,0xe6, -1,0x6c,0x30,0x72,0x13,0x69,0x67,0x68,0x74,0xa3,0xe8,0x12,0x65,0x66,0x74,0xa3, -0xe4,0xa2,0xdc,2,0x65,0x2c,0x6c,0xa3,0xda,0x72,0xa3,0xde,0x12,0x6c,0x6f,0x77, -0xa2,0xdc,1,0x6c,0x30,0x72,0x13,0x69,0x67,0x68,0x74,0xa3,0xde,0x12,0x65,0x66, -0x74,0xa3,0xda,0xb,0x6e,0xc0,0xca,0x72,0x5f,0x72,0x46,0x73,0xa2,0x48,0x77,1, -0x68,0x24,0x73,0x33,0x17,0x69,0x74,0x65,0x73,0x70,0x61,0x63,0x65,0x33,0x22,1, -0x69,0x30,0x6c,2,0x65,0x3d,0x69,0x4b,0x6f,0x3f,0x18,0x67,0x68,0x74,0x74,0x6f, -0x6c,0x65,0x66,0x74,0x22,2,0x65,0x38,0x69,0x48,0x6f,0x16,0x76,0x65,0x72,0x72, -0x69,0x64,0x65,0x3f,0x17,0x6d,0x62,0x65,0x64,0x64,0x69,0x6e,0x67,0x3d,0x15,0x73, -0x6f,0x6c,0x61,0x74,0x65,0x4b,0x30,0x1e,0x65,0x67,0x6d,0x65,0x6e,0x74,0x73,0x65, -0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x31,0x6e,0xa2,0x41,0x6f,0xa2,0x53,0x70,2, -0x61,0x66,0x64,0x86,0x6f,0x1b,0x70,0x64,0x69,0x72,0x65,0x63,0x74,0x69,0x6f,0x6e, -0x61,0x6c,1,0x66,0x32,0x69,0x15,0x73,0x6f,0x6c,0x61,0x74,0x65,0x4d,0x14,0x6f, -0x72,0x6d,0x61,0x74,0x41,0x1f,0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70, -0x61,0x72,0x61,0x74,0x6f,0x72,0x2f,1,0x66,0x41,0x69,0x4d,1,0x6f,0x28,0x73, -0x10,0x6d,0x43,0x1b,0x6e,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b, -0x43,1,0x6e,0x35,0x74,0x19,0x68,0x65,0x72,0x6e,0x65,0x75,0x74,0x72,0x61,0x6c, -0x35,0x65,0x88,0x65,0x98,0x66,0xa2,0x6a,0x6c,0x20,1,0x65,0x30,0x72,2,0x65, -0x37,0x69,0x49,0x6f,0x39,0x18,0x66,0x74,0x74,0x6f,0x72,0x69,0x67,0x68,0x74,0x20, -2,0x65,0x38,0x69,0x48,0x6f,0x16,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x39,0x17, -0x6d,0x62,0x65,0x64,0x64,0x69,0x6e,0x67,0x37,0x15,0x73,0x6f,0x6c,0x61,0x74,0x65, -0x49,3,0x6e,0x25,0x73,0x27,0x74,0x29,0x75,0x15,0x72,0x6f,0x70,0x65,0x61,0x6e, -2,0x6e,0x3c,0x73,0x46,0x74,0x18,0x65,0x72,0x6d,0x69,0x6e,0x61,0x74,0x6f,0x72, -0x29,0x14,0x75,0x6d,0x62,0x65,0x72,0x25,0x17,0x65,0x70,0x61,0x72,0x61,0x74,0x6f, -0x72,0x27,1,0x69,0x28,0x73,0x10,0x69,0x47,0x1f,0x72,0x73,0x74,0x73,0x74,0x72, -0x6f,0x6e,0x67,0x69,0x73,0x6f,0x6c,0x61,0x74,0x65,0x47,0x61,0x4e,0x62,0x84,0x63, -1,0x6f,0x24,0x73,0x2d,0x1c,0x6d,0x6d,0x6f,0x6e,0x73,0x65,0x70,0x61,0x72,0x61, -0x74,0x6f,0x72,0x2d,2,0x6c,0x3b,0x6e,0x2b,0x72,0x13,0x61,0x62,0x69,0x63,1, -0x6c,0x30,0x6e,0x14,0x75,0x6d,0x62,0x65,0x72,0x2b,0x14,0x65,0x74,0x74,0x65,0x72, -0x3b,0x2e,1,0x6e,0x45,0x6f,0x1c,0x75,0x6e,0x64,0x61,0x72,0x79,0x6e,0x65,0x75, -0x74,0x72,0x61,0x6c,0x45,0,0x16,0x6d,0xc9,0x20,0x74,0xc2,0x30,0x77,0x89,0x77, -0x86,0x79,0xa2,0x46,0x7a,1,0x61,0x58,0x6e,0x1a,0x61,0x6d,0x65,0x6e,0x6e,0x79, -0x6d,0x75,0x73,0x69,0x63,0xa4,0x40,0x19,0x61,0x6c,0x6e,0x6f,0x74,0x61,0x74,0x69, -0x6f,0x6e,0xa5,0x40,0x1c,0x6e,0x61,0x62,0x61,0x7a,0x61,0x72,0x73,0x71,0x75,0x61, -0x72,0x65,0xa5,0x18,0x10,0x61,1,0x6e,0x36,0x72,0x16,0x61,0x6e,0x67,0x63,0x69, -0x74,0x69,0xa3,0xfc,0x12,0x63,0x68,0x6f,0xa5,0x2c,1,0x65,0x88,0x69,2,0x6a, -0x3c,0x72,0x68,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x73,0xa3,0x48,0x12, -0x69,0x6e,0x67,0xa2,0x74,0x1e,0x68,0x65,0x78,0x61,0x67,0x72,0x61,0x6d,0x73,0x79, -0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x74,0x16,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0xa3, -0x49,0x13,0x7a,0x69,0x64,0x69,0xa5,0x34,0x74,0xa2,0x65,0x75,0xa4,0x4f,0x76,3, -0x61,0x3c,0x65,0x80,0x69,0xa2,0x50,0x73,0xa2,0x6c,0x12,0x73,0x75,0x70,0xa3,0x7d, -1,0x69,0xa3,0x9f,0x72,0x1e,0x69,0x61,0x74,0x69,0x6f,0x6e,0x73,0x65,0x6c,0x65, -0x63,0x74,0x6f,0x72,0x73,0xa2,0x6c,0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65, -0x6e,0x74,0xa3,0x7d,1,0x64,0x3c,0x72,0x19,0x74,0x69,0x63,0x61,0x6c,0x66,0x6f, -0x72,0x6d,0x73,0xa3,0x91,0x14,0x69,0x63,0x65,0x78,0x74,0xa2,0xaf,0x16,0x65,0x6e, -0x73,0x69,0x6f,0x6e,0x73,0xa3,0xaf,0x15,0x74,0x68,0x6b,0x75,0x71,0x69,0xa5,0x3f, -5,0x69,0x3f,0x69,0x5a,0x6f,0x8c,0x72,0x1c,0x61,0x6e,0x73,0x70,0x6f,0x72,0x74, -0x61,0x6e,0x64,0x6d,0x61,0x70,0xa2,0xcf,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73, -0xa3,0xcf,2,0x62,0x34,0x66,0x3c,0x72,0x13,0x68,0x75,0x74,0x61,0xa3,0xfb,0x13, -0x65,0x74,0x61,0x6e,0x57,0x14,0x69,0x6e,0x61,0x67,0x68,0xa3,0x90,0x11,0x74,0x6f, -0xa5,0x3d,0x61,0x3e,0x65,0xa2,0xa0,0x68,0x10,0x61,1,0x61,0x24,0x69,0x53,0x11, -0x6e,0x61,0x3d,4,0x67,0x8e,0x69,0xa2,0x49,0x6b,0xa2,0x72,0x6d,0xa2,0x74,0x6e, -0x10,0x67,1,0x73,0x68,0x75,0x10,0x74,0xa4,0x10,1,0x63,0x40,0x73,0x11,0x75, -0x70,0xa4,0x33,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x33,0x18,0x6f,0x6d, -0x70,0x6f,0x6e,0x65,0x6e,0x74,0x73,0xa5,0x11,0x10,0x61,0xa5,0x3c,2,0x61,0x2a, -0x62,0x32,0x73,0xa3,0x60,0x12,0x6c,0x6f,0x67,0xa3,0x62,0x13,0x61,0x6e,0x77,0x61, -0xa3,0x65,3,0x6c,0x52,0x74,0x56,0x76,0x5e,0x78,0x16,0x75,0x61,0x6e,0x6a,0x69, -0x6e,0x67,0xa2,0x7c,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x7c,0x10,0x65, -0xa3,0x70,0x12,0x68,0x61,0x6d,0xa3,0xae,0x12,0x69,0x65,0x74,0xa3,0xb7,0x11,0x72, -0x69,0xa3,0xdc,0x11,0x69,0x6c,0x48,0x12,0x73,0x75,0x70,0xa4,0x2b,0x16,0x70,0x6c, -0x65,0x6d,0x65,0x6e,0x74,0xa5,0x2b,0x13,0x6c,0x75,0x67,0x75,0x4b,2,0x63,0x8c, -0x67,0xa2,0x41,0x6e,0x1f,0x69,0x66,0x69,0x65,0x64,0x63,0x61,0x6e,0x61,0x64,0x69, -0x61,0x6e,0x61,0x62,0x6f,0x1f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x73,0x79,0x6c, -0x6c,0x61,0x62,0x69,0x63,0x73,0x62,0x17,0x65,0x78,0x74,0x65,0x6e,0x64,0x65,0x64, -0xa2,0xad,0x10,0x61,0xa5,0x3e,0x11,0x61,0x73,0x62,0x12,0x65,0x78,0x74,0xa2,0xad, -0x10,0x61,0xa5,0x3e,0x15,0x61,0x72,0x69,0x74,0x69,0x63,0xa3,0x78,0x70,0xc3,0x4b, -0x70,0xa6,0x61,0x72,0xa8,0x1d,0x73,7,0x6f,0xc1,0xbe,0x6f,0xa2,0x69,0x70,0xa2, -0x85,0x75,0xa2,0xa4,0x79,2,0x6c,0x50,0x6d,0x62,0x72,0x12,0x69,0x61,0x63,0x3a, -0x12,0x73,0x75,0x70,0xa4,0x17,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x17, -0x17,0x6f,0x74,0x69,0x6e,0x61,0x67,0x72,0x69,0xa3,0x8f,0x13,0x62,0x6f,0x6c,0x73, -1,0x61,0x4c,0x66,0x10,0x6f,0x1f,0x72,0x6c,0x65,0x67,0x61,0x63,0x79,0x63,0x6f, -0x6d,0x70,0x75,0x74,0x69,0x6e,0x67,0xa5,0x32,0x1f,0x6e,0x64,0x70,0x69,0x63,0x74, -0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x78,0x74,1,0x61,0xa5,0x2a,0x65,0x14, -0x6e,0x64,0x65,0x64,0x61,0xa5,0x2a,2,0x67,0x34,0x72,0x3e,0x79,0x13,0x6f,0x6d, -0x62,0x6f,0xa5,0x16,0x13,0x64,0x69,0x61,0x6e,0xa5,0x23,0x17,0x61,0x73,0x6f,0x6d, -0x70,0x65,0x6e,0x67,0xa3,0xda,1,0x61,0x32,0x65,0x14,0x63,0x69,0x61,0x6c,0x73, -0xa3,0x56,0x12,0x63,0x69,0x6e,0x1f,0x67,0x6d,0x6f,0x64,0x69,0x66,0x69,0x65,0x72, -0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x2d,2,0x6e,0x48,0x70,0x76,0x74,0x1d,0x74, -0x6f,0x6e,0x73,0x69,0x67,0x6e,0x77,0x72,0x69,0x74,0x69,0x6e,0x67,0xa5,6,0x15, -0x64,0x61,0x6e,0x65,0x73,0x65,0xa2,0x9b,0x12,0x73,0x75,0x70,0xa2,0xdb,0x16,0x70, -0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xdb,4,0x61,0xa2,0xa8,0x65,0x5c,0x6d,0x9e, -0x70,0xa2,0x4b,0x73,0x13,0x79,0x6d,0x62,0x6f,0x1f,0x6c,0x73,0x61,0x6e,0x64,0x70, -0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa5,5,0x10,0x72,1,0x61, -0x4e,0x73,0x12,0x63,0x72,0x69,0x1f,0x70,0x74,0x73,0x61,0x6e,0x64,0x73,0x75,0x62, -0x73,0x63,0x72,0x69,0x70,0x74,0x73,0x73,0x14,0x6e,0x64,0x73,0x75,0x62,0x73,0x1b, -0x61,0x74,0x68,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73,0xa3,0x6a,1,0x6c, -0x40,0x75,1,0x61,0x6e,0x6e,0x17,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa3, -0x8e,0x15,0x65,0x6d,0x65,0x6e,0x74,0x61,1,0x6c,0x50,0x72,0x1e,0x79,0x70,0x72, -0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0x61,0x72,0x65,0x61,1,0x61,0xa3,0x6d, -0x62,0xa3,0x6e,3,0x61,0x5c,0x6d,0x78,0x70,0xa2,0x41,0x73,0x13,0x79,0x6d,0x62, -0x6f,0x1f,0x6c,0x73,0x61,0x6e,0x64,0x70,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70, -0x68,0x73,0xa5,5,0x14,0x72,0x72,0x6f,0x77,0x73,2,0x61,0xa3,0x67,0x62,0xa3, -0x68,0x63,0xa3,0xfa,0x13,0x61,0x74,0x68,0x65,0x1f,0x6d,0x61,0x74,0x69,0x63,0x61, -0x6c,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73,0xa3,0x6a,0x19,0x75,0x6e,0x63, -0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x8e,0x61,0x88,0x68,0xa2,0x48,0x69,0xa2, -0x71,0x6d,0x12,0x61,0x6c,0x6c,1,0x66,0x46,0x6b,0x15,0x61,0x6e,0x61,0x65,0x78, -0x74,0xa4,0x29,0x15,0x65,0x6e,0x73,0x69,0x6f,0x6e,0xa5,0x29,0x12,0x6f,0x72,0x6d, -1,0x73,0xa3,0x54,0x76,0x16,0x61,0x72,0x69,0x61,0x6e,0x74,0x73,0xa3,0x54,1, -0x6d,0x36,0x75,0x16,0x72,0x61,0x73,0x68,0x74,0x72,0x61,0xa3,0xa1,0x15,0x61,0x72, -0x69,0x74,0x61,0x6e,0xa3,0xac,1,0x61,0x52,0x6f,0x13,0x72,0x74,0x68,0x61,0x1f, -0x6e,0x64,0x66,0x6f,0x72,0x6d,0x61,0x74,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73, -0xa3,0xf7,1,0x72,0x2e,0x76,0x12,0x69,0x61,0x6e,0xa3,0x79,0x12,0x61,0x64,0x61, -0xa3,0xd9,1,0x64,0x50,0x6e,0x13,0x68,0x61,0x6c,0x61,0x50,0x1d,0x61,0x72,0x63, -0x68,0x61,0x69,0x63,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0xf9,0x13,0x64,0x68, -0x61,0x6d,0xa3,0xf8,5,0x72,0x35,0x72,0x44,0x73,0x64,0x75,1,0x61,0xa3,0x4e, -0x6e,0x17,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x71,0x17,0x69,0x76,0x61,0x74, -0x65,0x75,0x73,0x65,0xa2,0x4e,0x13,0x61,0x72,0x65,0x61,0xa3,0x4e,0x1b,0x61,0x6c, -0x74,0x65,0x72,0x70,0x61,0x68,0x6c,0x61,0x76,0x69,0xa3,0xf6,0x61,0x40,0x68,0x82, -0x6c,0x19,0x61,0x79,0x69,0x6e,0x67,0x63,0x61,0x72,0x64,0x73,0xa3,0xcc,2,0x68, -0x38,0x6c,0x4a,0x75,0x15,0x63,0x69,0x6e,0x68,0x61,0x75,0xa3,0xf5,0x17,0x61,0x77, -0x68,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0xf3,0x15,0x6d,0x79,0x72,0x65,0x6e,0x65,0xa3, -0xf4,1,0x61,0x8e,0x6f,1,0x65,0x74,0x6e,0x16,0x65,0x74,0x69,0x63,0x65,0x78, -0x74,0xa2,0x72,1,0x65,0x2c,0x73,0x11,0x75,0x70,0xa3,0x8d,0x15,0x6e,0x73,0x69, -0x6f,0x6e,0x73,0xa2,0x72,0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, -0xa3,0x8d,0x15,0x6e,0x69,0x63,0x69,0x61,0x6e,0xa3,0x97,1,0x67,0x3e,0x69,0x13, -0x73,0x74,0x6f,0x73,0xa2,0xa6,0x13,0x64,0x69,0x73,0x63,0xa3,0xa6,0x12,0x73,0x70, -0x61,0xa3,0x96,1,0x65,0x5c,0x75,1,0x6d,0x2a,0x6e,0x11,0x69,0x63,0x67,0x10, -0x69,0xa2,0xc0,0x1d,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f, -0x6c,0x73,0xa3,0xc0,0x13,0x6a,0x61,0x6e,0x67,0xa3,0xa3,0x6d,0xa2,0xf0,0x6e,0xa8, -0x23,0x6f,6,0x70,0x63,0x70,0x56,0x72,0x8a,0x73,0xa2,0x4c,0x74,0x10,0x74,0x1f, -0x6f,0x6d,0x61,0x6e,0x73,0x69,0x79,0x61,0x71,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73, -0xa5,0x28,0x18,0x74,0x69,0x63,0x61,0x6c,0x63,0x68,0x61,0x72,0x1f,0x61,0x63,0x74, -0x65,0x72,0x72,0x65,0x63,0x6f,0x67,0x6e,0x69,0x74,0x69,0x6f,0x6e,0x85,1,0x69, -0x46,0x6e,0x1e,0x61,0x6d,0x65,0x6e,0x74,0x61,0x6c,0x64,0x69,0x6e,0x67,0x62,0x61, -0x74,0x73,0xa3,0xf2,0x11,0x79,0x61,0x47,1,0x61,0x30,0x6d,0x13,0x61,0x6e,0x79, -0x61,0xa3,0x7a,0x11,0x67,0x65,0xa5,0xf,0x63,0xa2,0x7b,0x67,0xa2,0x7b,0x6c,1, -0x63,0xa2,0x6c,0x64,6,0x70,0x42,0x70,0x3a,0x73,0x5a,0x74,0x88,0x75,0x14,0x79, -0x67,0x68,0x75,0x72,0xa5,0x3b,0x11,0x65,0x72,1,0x6d,0x2e,0x73,0x12,0x69,0x61, -0x6e,0xa3,0x8c,0x11,0x69,0x63,0xa3,0xf1,0x10,0x6f,1,0x67,0x3a,0x75,0x18,0x74, -0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e,0xa3,0xbb,0x13,0x64,0x69,0x61,0x6e,0xa5, -0x22,0x14,0x75,0x72,0x6b,0x69,0x63,0xa3,0xbf,0x68,0x42,0x69,0x54,0x6e,0x1a,0x6f, -0x72,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e,0xa3,0xf0,0x17,0x75,0x6e,0x67, -0x61,0x72,0x69,0x61,0x6e,0xa5,4,0x14,0x74,0x61,0x6c,0x69,0x63,0xa3,0x58,0x13, -0x68,0x69,0x6b,0x69,0xa3,0x9d,0x10,0x72,0x85,0x12,0x68,0x61,0x6d,0x65,6,0x6f, -0x86,0x6f,0x6c,0x72,0xa2,0x61,0x75,0xa2,0x62,0x79,0x14,0x61,0x6e,0x6d,0x61,0x72, -0x58,0x12,0x65,0x78,0x74,2,0x61,0xa3,0xb6,0x62,0xa3,0xee,0x65,0x13,0x6e,0x64, -0x65,0x64,1,0x61,0xa3,0xb6,0x62,0xa3,0xee,1,0x64,0x52,0x6e,0x15,0x67,0x6f, -0x6c,0x69,0x61,0x6e,0x6a,0x12,0x73,0x75,0x70,0xa4,0xd,0x16,0x70,0x6c,0x65,0x6d, -0x65,0x6e,0x74,0xa5,0xd,0x10,0x69,0xa2,0xec,0x13,0x66,0x69,0x65,0x72,1,0x6c, -0x3c,0x74,0x19,0x6f,0x6e,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0xa3,0x8a,0x15, -0x65,0x74,0x74,0x65,0x72,0x73,0x2d,0x10,0x6f,0xa3,0xed,1,0x6c,0x44,0x73,0x11, -0x69,0x63,0xa2,0x5c,0x18,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5c, -0x13,0x74,0x61,0x6e,0x69,0xa5,3,0x61,0xa2,0x9b,0x65,0xa4,0x4c,0x69,1,0x61, -0xa2,0x8f,0x73,0x10,0x63,5,0x70,0x18,0x70,0xa2,0x71,0x73,0x36,0x74,0x17,0x65, -0x63,0x68,0x6e,0x69,0x63,0x61,0x6c,0x81,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x8f, -0x61,0xa2,0x66,0x65,0x46,0x6d,0x19,0x61,0x74,0x68,0x73,0x79,0x6d,0x62,0x6f,0x6c, -0x73,1,0x61,0xa3,0x66,0x62,0xa3,0x69,0x17,0x6c,0x6c,0x61,0x6e,0x65,0x6f,0x75, -0x73,2,0x6d,0x3a,0x73,0x6c,0x74,0x17,0x65,0x63,0x68,0x6e,0x69,0x63,0x61,0x6c, -0x81,0x11,0x61,0x74,0x1f,0x68,0x65,0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,0x73,0x79, -0x6d,0x62,0x6f,0x6c,0x73,1,0x61,0xa3,0x66,0x62,0xa3,0x69,0x15,0x79,0x6d,0x62, -0x6f,0x6c,0x73,0x8e,0x12,0x61,0x6e,0x64,1,0x61,0x3c,0x70,0x19,0x69,0x63,0x74, -0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa3,0xcd,0x14,0x72,0x72,0x6f,0x77,0x73,0xa3, -0x73,0x10,0x6f,0xa3,0xd8,7,0x72,0x6f,0x72,0x44,0x73,0x4e,0x74,0x62,0x79,0x19, -0x61,0x6e,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0xa5,0x20,0x13,0x63,0x68,0x65, -0x6e,0xa5,0xc,0x18,0x61,0x72,0x61,0x6d,0x67,0x6f,0x6e,0x64,0x69,0xa5,0x14,0x10, -0x68,2,0x61,0x3a,0x65,0x4a,0x6f,0x17,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73, -0x7f,0x16,0x6c,0x70,0x68,0x61,0x6e,0x75,0x6d,0xa3,0x5d,0x16,0x6d,0x61,0x74,0x69, -0x63,0x61,0x6c,1,0x61,0x36,0x6f,0x17,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73, -0x7f,0x11,0x6c,0x70,0x1f,0x68,0x61,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x73,0x79, -0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5d,0x68,0x50,0x6b,0x7e,0x6c,0x88,0x6e,1,0x64, -0x34,0x69,0x15,0x63,0x68,0x61,0x65,0x61,0x6e,0xa3,0xea,0x12,0x61,0x69,0x63,0xa3, -0xc6,1,0x61,0x3e,0x6a,0x12,0x6f,0x6e,0x67,0xa2,0xaa,0x14,0x74,0x69,0x6c,0x65, -0x73,0xa3,0xaa,0x13,0x6a,0x61,0x6e,0x69,0xa3,0xe9,0x13,0x61,0x73,0x61,0x72,0xa5, -0x1f,0x15,0x61,0x79,0x61,0x6c,0x61,0x6d,0x4f,3,0x64,0x6c,0x65,0x7e,0x6e,0xa2, -0x47,0x72,0x14,0x6f,0x69,0x74,0x69,0x63,1,0x63,0x3c,0x68,0x19,0x69,0x65,0x72, -0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0xd7,0x15,0x75,0x72,0x73,0x69,0x76,0x65, -0xa3,0xd6,0x17,0x65,0x66,0x61,0x69,0x64,0x72,0x69,0x6e,0xa5,0x21,0x17,0x74,0x65, -0x69,0x6d,0x61,0x79,0x65,0x6b,0xa2,0xb8,0x12,0x65,0x78,0x74,0xa2,0xd5,0x16,0x65, -0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa3,0xd5,0x18,0x64,0x65,0x6b,0x69,0x6b,0x61,0x6b, -0x75,0x69,0xa3,0xeb,6,0x6b,0x3b,0x6b,0x56,0x6f,0x5a,0x75,0x64,0x79,0x11,0x69, -0x61,0x1f,0x6b,0x65,0x6e,0x67,0x70,0x75,0x61,0x63,0x68,0x75,0x65,0x68,0x6d,0x6f, -0x6e,0x67,0xa5,0x27,0x10,0x6f,0xa3,0x92,0x14,0x62,0x6c,0x6f,0x63,0x6b,0x21,1, -0x6d,0x2c,0x73,0x11,0x68,0x75,0xa5,0x15,0x17,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d, -0x73,0x7b,0x61,0x44,0x62,0x21,0x65,0x10,0x77,1,0x61,0xa5,0xe,0x74,0x14,0x61, -0x69,0x6c,0x75,0x65,0xa3,0x8b,2,0x62,0x3c,0x67,0x4a,0x6e,0x17,0x64,0x69,0x6e, -0x61,0x67,0x61,0x72,0x69,0xa5,0x26,0x15,0x61,0x74,0x61,0x65,0x61,0x6e,0xa3,0xef, -0x16,0x6d,0x75,0x6e,0x64,0x61,0x72,0x69,0xa5,0x47,0x67,0xc4,0x5d,0x6a,0xc1,0xe4, -0x6a,0xa2,0xdf,0x6b,0xa2,0xf8,0x6c,4,0x61,0x54,0x65,0xa2,0x6b,0x69,0xa2,0x82, -0x6f,0xa2,0xc1,0x79,1,0x63,0x2e,0x64,0x12,0x69,0x61,0x6e,0xa3,0xa9,0x12,0x69, -0x61,0x6e,0xa3,0xa7,1,0x6f,0x55,0x74,0x11,0x69,0x6e,1,0x31,0x96,0x65,0x11, -0x78,0x74,6,0x64,0x21,0x64,0xa3,0x95,0x65,0x2c,0x66,0xa5,0x39,0x67,0xa5,0x3a, -0xa2,0xe7,0x13,0x6e,0x64,0x65,0x64,6,0x64,0xc,0x64,0xa3,0x95,0x65,0xa3,0xe7, -0x66,0xa5,0x39,0x67,0xa5,0x3a,0x61,0x2a,0x62,0x29,0x63,0xa3,0x94,0x26,0x18,0x64, -0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x6d,0x24,0x12,0x73,0x75,0x70,0x24,0x16, -0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x25,1,0x70,0x42,0x74,0x1d,0x74,0x65,0x72, -0x6c,0x69,0x6b,0x65,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x79,0x12,0x63,0x68,0x61, -0xa3,0x9c,2,0x6d,0x4e,0x6e,0x54,0x73,0x10,0x75,0xa2,0xb0,0x12,0x73,0x75,0x70, -0xa4,0x31,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x31,0x11,0x62,0x75,0xa3, -0x6f,0x12,0x65,0x61,0x72,1,0x61,0xa3,0xe8,0x62,1,0x69,0x38,0x73,0x17,0x79, -0x6c,0x6c,0x61,0x62,0x61,0x72,0x79,0xa3,0x75,0x17,0x64,0x65,0x6f,0x67,0x72,0x61, -0x6d,0x73,0xa3,0x76,0x1a,0x77,0x73,0x75,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x73, -0xa3,0x4d,0x10,0x61,1,0x6d,0x32,0x76,0x14,0x61,0x6e,0x65,0x73,0x65,0xa3,0xb5, -0x10,0x6f,0x5c,0x12,0x65,0x78,0x74,1,0x61,0xa3,0xb4,0x62,0xa3,0xb9,1,0x61, -0xa2,0x43,0x68,4,0x61,0x40,0x69,0x50,0x6d,0x6e,0x6f,0x86,0x75,0x15,0x64,0x61, -0x77,0x61,0x64,0x69,0xa3,0xe6,0x16,0x72,0x6f,0x73,0x68,0x74,0x68,0x69,0xa3,0x89, -0x1d,0x74,0x61,0x6e,0x73,0x6d,0x61,0x6c,0x6c,0x73,0x63,0x72,0x69,0x70,0x74,0xa5, -0x30,0x11,0x65,0x72,0x68,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x71,0x12, -0x6a,0x6b,0x69,0xa3,0xe5,5,0x74,0x35,0x74,0x34,0x77,0x7a,0x79,0x13,0x61,0x68, -0x6c,0x69,0xa3,0xa2,0x14,0x61,0x6b,0x61,0x6e,0x61,0x9e,1,0x65,0x4c,0x70,0x10, -0x68,0x1f,0x6f,0x6e,0x65,0x74,0x69,0x63,0x65,0x78,0x74,0x65,0x6e,0x73,0x69,0x6f, -0x6e,0x73,0xa3,0x6b,0x11,0x78,0x74,0xa3,0x6b,0x10,0x69,0xa5,0x46,0x69,0xa2,0x4e, -0x6b,0xa2,0x51,0x6e,3,0x61,0x34,0x62,0x84,0x67,0x8a,0x6e,0x12,0x61,0x64,0x61, -0x4d,1,0x65,0x40,0x73,0x11,0x75,0x70,0xa2,0xcb,0x16,0x70,0x6c,0x65,0x6d,0x65, -0x6e,0x74,0xa3,0xcb,0x11,0x78,0x74,2,0x61,0xa5,0x13,0x62,0xa5,0x38,0x65,0x13, -0x6e,0x64,0x65,0x64,1,0x61,0xa5,0x13,0x62,0xa5,0x38,0x11,0x75,0x6e,0xa3,0x42, -0x11,0x78,0x69,0x96,0x17,0x72,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0x97,0x12,0x74, -0x68,0x69,0xa3,0xc1,0x1c,0x74,0x6f,0x76,0x69,0x6b,0x6e,0x75,0x6d,0x65,0x72,0x61, -0x6c,0x73,0xa5,0x45,0x67,0xa2,0xb5,0x68,0xa4,0x84,0x69,3,0x64,0x4c,0x6d,0xa2, -0x55,0x6e,0xa2,0x62,0x70,0x13,0x61,0x65,0x78,0x74,0x2a,0x16,0x65,0x6e,0x73,0x69, -0x6f,0x6e,0x73,0x2b,1,0x63,0x99,0x65,0x17,0x6f,0x67,0x72,0x61,0x70,0x68,0x69, -0x63,1,0x64,0x56,0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa4,0xb,0x1d,0x61, -0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa5,0xb,0x13, -0x65,0x73,0x63,0x72,0x1f,0x69,0x70,0x74,0x69,0x6f,0x6e,0x63,0x68,0x61,0x72,0x61, -0x63,0x74,0x65,0x72,0x73,0x99,0x1c,0x70,0x65,0x72,0x69,0x61,0x6c,0x61,0x72,0x61, -0x6d,0x61,0x69,0x63,0xa3,0xba,1,0x64,0x62,0x73,0x1b,0x63,0x72,0x69,0x70,0x74, -0x69,0x6f,0x6e,0x61,0x6c,0x70,0x61,1,0x68,0x32,0x72,0x14,0x74,0x68,0x69,0x61, -0x6e,0xa3,0xbd,0x13,0x6c,0x61,0x76,0x69,0xa3,0xbe,0x11,0x69,0x63,1,0x6e,0x3e, -0x73,0x1a,0x69,0x79,0x61,0x71,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa5,0x1e,0x19, -0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73,0xa3,0xb2,4,0x65,0x74,0x6c, -0xa2,0x82,0x6f,0xa2,0x9a,0x72,0xa2,0x9e,0x75,2,0x6a,0x34,0x6e,0x3e,0x72,0x14, -0x6d,0x75,0x6b,0x68,0x69,0x43,0x14,0x61,0x72,0x61,0x74,0x69,0x45,0x18,0x6a,0x61, -0x6c,0x61,0x67,0x6f,0x6e,0x64,0x69,0xa5,0x1c,1,0x6e,0xa2,0x46,0x6f,1,0x6d, -0x6e,0x72,0x13,0x67,0x69,0x61,0x6e,0x5a,1,0x65,0x40,0x73,0x11,0x75,0x70,0xa2, -0x87,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x87,0x11,0x78,0x74,0xa4,0x1b, -0x14,0x65,0x6e,0x64,0x65,0x64,0xa5,0x1b,0x1a,0x65,0x74,0x72,0x69,0x63,0x73,0x68, -0x61,0x70,0x65,0x73,0x8c,0x12,0x65,0x78,0x74,0xa2,0xe3,0x14,0x65,0x6e,0x64,0x65, -0x64,0xa3,0xe3,0x1e,0x65,0x72,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, -0x69,0x6f,0x6e,0x71,0x17,0x61,0x67,0x6f,0x6c,0x69,0x74,0x69,0x63,0xa2,0x88,0x12, -0x73,0x75,0x70,0xa4,0xa,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0xa,0x13, -0x74,0x68,0x69,0x63,0xa3,0x59,1,0x61,0x5c,0x65,0x11,0x65,0x6b,0x30,1,0x61, -0x38,0x65,0x11,0x78,0x74,0x6e,0x14,0x65,0x6e,0x64,0x65,0x64,0x6f,0x17,0x6e,0x64, -0x63,0x6f,0x70,0x74,0x69,0x63,0x31,0x13,0x6e,0x74,0x68,0x61,0xa3,0xe4,2,0x61, -0xa2,0x48,0x65,0xa2,0xdf,0x69,1,0x67,0x30,0x72,0x14,0x61,0x67,0x61,0x6e,0x61, -0x9d,0x10,0x68,1,0x70,0x3a,0x73,0x18,0x75,0x72,0x72,0x6f,0x67,0x61,0x74,0x65, -0x73,0xa3,0x4b,1,0x72,0x3c,0x75,0x19,0x73,0x75,0x72,0x72,0x6f,0x67,0x61,0x74, -0x65,0x73,0xa3,0x4c,0x11,0x69,0x76,0x1f,0x61,0x74,0x65,0x75,0x73,0x65,0x73,0x75, -0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4c,2,0x6c,0x32,0x6e,0x9a,0x74, -0x12,0x72,0x61,0x6e,0xa5,2,0x10,0x66,2,0x61,0x58,0x6d,0x70,0x77,0x14,0x69, -0x64,0x74,0x68,0x61,0x1f,0x6e,0x64,0x66,0x75,0x6c,0x6c,0x77,0x69,0x64,0x74,0x68, -0x66,0x6f,0x72,0x6d,0x73,0xa3,0x57,0x1a,0x6e,0x64,0x66,0x75,0x6c,0x6c,0x66,0x6f, -0x72,0x6d,0x73,0xa3,0x57,0x13,0x61,0x72,0x6b,0x73,0xa3,0x52,2,0x67,0x34,0x69, -0xa2,0x45,0x75,0x12,0x6e,0x6f,0x6f,0xa3,0x63,0x11,0x75,0x6c,0xa2,0x4a,2,0x63, -0x3c,0x6a,0x5e,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x73,0xa3,0x4a,0x1f, -0x6f,0x6d,0x70,0x61,0x74,0x69,0x62,0x69,0x6c,0x69,0x74,0x79,0x6a,0x61,0x6d,0x6f, -0xa3,0x41,0x12,0x61,0x6d,0x6f,0x5c,0x17,0x65,0x78,0x74,0x65,0x6e,0x64,0x65,0x64, -1,0x61,0xa3,0xb4,0x62,0xa3,0xb9,0x19,0x66,0x69,0x72,0x6f,0x68,0x69,0x6e,0x67, -0x79,0x61,0xa5,0x1d,0x13,0x62,0x72,0x65,0x77,0x37,0x61,0xa4,0xc,0x62,0xa6,0x59, -0x63,0xa8,0x2e,0x64,0xac,0xe3,0x65,5,0x6d,0xa9,0x6d,0x94,0x6e,0xa2,0x41,0x74, -0x15,0x68,0x69,0x6f,0x70,0x69,0x63,0x5e,1,0x65,0x40,0x73,0x11,0x75,0x70,0xa2, -0x86,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x86,0x11,0x78,0x74,0xa2,0x85, -2,0x61,0xa3,0xc8,0x62,0xa5,0x37,0x65,0x13,0x6e,0x64,0x65,0x64,0xa2,0x85,1, -0x61,0xa3,0xc8,0x62,0xa5,0x37,0x16,0x6f,0x74,0x69,0x63,0x6f,0x6e,0x73,0xa3,0xce, -0x15,0x63,0x6c,0x6f,0x73,0x65,0x64,2,0x61,0x5a,0x63,0x9e,0x69,0x1c,0x64,0x65, -0x6f,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x75,0x70,0xa2,0xc4,0x16,0x70,0x6c, -0x65,0x6d,0x65,0x6e,0x74,0xa3,0xc4,0x16,0x6c,0x70,0x68,0x61,0x6e,0x75,0x6d,0x86, -1,0x65,0x2c,0x73,0x11,0x75,0x70,0xa3,0xc3,0x13,0x72,0x69,0x63,0x73,0x86,0x18, -0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xc3,0x11,0x6a,0x6b,0xa2,0x44, -0x1f,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x61,0x6e,0x64,0x6d,0x6f,0x6e,0x74,0x68, -0x73,0xa3,0x44,0x61,0x4a,0x67,0x76,0x6c,1,0x62,0x30,0x79,0x13,0x6d,0x61,0x69, -0x63,0xa5,0x25,0x13,0x61,0x73,0x61,0x6e,0xa3,0xe2,0x13,0x72,0x6c,0x79,0x64,0x1f, -0x79,0x6e,0x61,0x73,0x74,0x69,0x63,0x63,0x75,0x6e,0x65,0x69,0x66,0x6f,0x72,0x6d, -0xa5,1,0x1f,0x79,0x70,0x74,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c, -0x79,0x70,0x68,1,0x66,0x26,0x73,0xa3,0xc2,0x1c,0x6f,0x72,0x6d,0x61,0x74,0x63, -0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73,0xa5,0x24,7,0x6e,0xc0,0xf2,0x6e,0x3e,0x72, -0xa2,0x5d,0x73,0xa2,0xe5,0x76,0x14,0x65,0x73,0x74,0x61,0x6e,0xa3,0xbc,1,0x61, -0x92,0x63,0x13,0x69,0x65,0x6e,0x74,1,0x67,0x34,0x73,0x15,0x79,0x6d,0x62,0x6f, -0x6c,0x73,0xa3,0xa5,0x13,0x72,0x65,0x65,0x6b,1,0x6d,0x34,0x6e,0x15,0x75,0x6d, -0x62,0x65,0x72,0x73,0xa3,0x7f,0x13,0x75,0x73,0x69,0x63,0xa2,0x7e,0x19,0x61,0x6c, -0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x7e,0x10,0x74,0x1f,0x6f,0x6c,0x69, -0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0xfe,2, -0x61,0x32,0x6d,0xa2,0x7e,0x72,0x12,0x6f,0x77,0x73,0x7d,0x12,0x62,0x69,0x63,0x38, -3,0x65,0x4a,0x6d,0x80,0x70,0xa2,0x50,0x73,0x11,0x75,0x70,0xa2,0x80,0x16,0x70, -0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x80,0x11,0x78,0x74,3,0x61,0xa3,0xd2,0x62, -0xa5,0x35,0x63,0xa5,0x41,0x65,0x13,0x6e,0x64,0x65,0x64,2,0x61,0xa3,0xd2,0x62, -0xa5,0x35,0x63,0xa5,0x41,0x12,0x61,0x74,0x68,0xa2,0xd3,0x18,0x65,0x6d,0x61,0x74, -0x69,0x63,0x61,0x6c,0x61,0x1f,0x6c,0x70,0x68,0x61,0x62,0x65,0x74,0x69,0x63,0x73, -0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xd3,1,0x66,0x42,0x72,0x1e,0x65,0x73,0x65, -0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f,0x72,0x6d,0x73,1,0x61,0xa3,0x51, -0x62,0xa3,0x55,0x14,0x65,0x6e,0x69,0x61,0x6e,0x35,0x12,0x63,0x69,0x69,0x23,0x64, -0x9e,0x65,0xa2,0x42,0x68,0xa2,0x4d,0x6c,1,0x63,0x62,0x70,0x17,0x68,0x61,0x62, -0x65,0x74,0x69,0x63,0x70,1,0x66,0xa3,0x50,0x72,0x1e,0x65,0x73,0x65,0x6e,0x74, -0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x50,0x16,0x68,0x65,0x6d, -0x69,0x63,0x61,0x6c,0xa2,0xd0,0x16,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xd0, -0x12,0x6c,0x61,0x6d,0xa5,7,0x1a,0x67,0x65,0x61,0x6e,0x6e,0x75,0x6d,0x62,0x65, -0x72,0x73,0xa3,0x77,0x11,0x6f,0x6d,0xa3,0xfd,7,0x6f,0x71,0x6f,0x64,0x72,0xa2, -0x41,0x75,0xa2,0x58,0x79,0x1b,0x7a,0x61,0x6e,0x74,0x69,0x6e,0x65,0x6d,0x75,0x73, -0x69,0x63,0xa2,0x5b,0x18,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5b, -1,0x70,0x34,0x78,0x16,0x64,0x72,0x61,0x77,0x69,0x6e,0x67,0x89,0x14,0x6f,0x6d, -0x6f,0x66,0x6f,0xa0,0x12,0x65,0x78,0x74,0xa2,0x43,0x14,0x65,0x6e,0x64,0x65,0x64, -0xa3,0x43,0x10,0x61,1,0x68,0x40,0x69,0x12,0x6c,0x6c,0x65,0x92,0x17,0x70,0x61, -0x74,0x74,0x65,0x72,0x6e,0x73,0x93,0x11,0x6d,0x69,0xa3,0xc9,1,0x67,0x2c,0x68, -0x11,0x69,0x64,0xa3,0x64,0x14,0x69,0x6e,0x65,0x73,0x65,0xa3,0x81,0x61,0x48,0x65, -0xa2,0x4e,0x68,0xa2,0x52,0x6c,0x1a,0x6f,0x63,0x6b,0x65,0x6c,0x65,0x6d,0x65,0x6e, -0x74,0x73,0x8b,3,0x6c,0x34,0x6d,0x40,0x73,0x66,0x74,0x11,0x61,0x6b,0xa3,0xc7, -0x14,0x69,0x6e,0x65,0x73,0x65,0xa3,0x93,0x11,0x75,0x6d,0xa2,0xb1,0x12,0x73,0x75, -0x70,0xa2,0xca,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xca,1,0x69,0x30, -0x73,0x13,0x61,0x76,0x61,0x68,0xa3,0xdd,0x15,0x63,0x6c,0x61,0x74,0x69,0x6e,0x23, -0x14,0x6e,0x67,0x61,0x6c,0x69,0x41,0x16,0x61,0x69,0x6b,0x73,0x75,0x6b,0x69,0xa5, -8,5,0x6f,0xc1,0x60,0x6f,0xa2,0x69,0x75,0xa4,0x24,0x79,1,0x70,0xa2,0x44, -0x72,0x14,0x69,0x6c,0x6c,0x69,0x63,0x32,1,0x65,0x4c,0x73,0x11,0x75,0x70,0xa2, -0x61,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa2,0x61,0x12,0x61,0x72,0x79,0xa3, -0x61,0x11,0x78,0x74,4,0x61,0xa3,0x9e,0x62,0xa3,0xa0,0x63,0xa5,9,0x64,0xa5, -0x43,0x65,0x13,0x6e,0x64,0x65,0x64,3,0x61,0xa3,0x9e,0x62,0xa3,0xa0,0x63,0xa5, -9,0x64,0xa5,0x43,0x10,0x72,1,0x69,0x34,0x6f,0x15,0x6d,0x69,0x6e,0x6f,0x61, -0x6e,0xa5,0x36,0x1a,0x6f,0x74,0x73,0x79,0x6c,0x6c,0x61,0x62,0x61,0x72,0x79,0xa3, -0x7b,3,0x6d,0x5a,0x6e,0xa2,0x95,0x70,0xa2,0xa0,0x75,0x17,0x6e,0x74,0x69,0x6e, -0x67,0x72,0x6f,0x64,0xa2,0x9a,0x17,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0xa3, -0x9a,2,0x62,0x3a,0x6d,0xa2,0x5f,0x70,0x15,0x61,0x74,0x6a,0x61,0x6d,0x6f,0xa3, -0x41,0x14,0x69,0x6e,0x69,0x6e,0x67,2,0x64,0x46,0x68,0x9e,0x6d,0x1d,0x61,0x72, -0x6b,0x73,0x66,0x6f,0x72,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x77,0x1e,0x69,0x61, -0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x6d,0x61,0x72,0x6b,0x73,0x2e,2,0x65, -0x40,0x66,0xa6,0x4c,0x73,0x18,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3, -0x83,0x16,0x78,0x74,0x65,0x6e,0x64,0x65,0x64,0xa3,0xe0,0x17,0x61,0x6c,0x66,0x6d, -0x61,0x72,0x6b,0x73,0xa3,0x52,0x11,0x6f,0x6e,0x1f,0x69,0x6e,0x64,0x69,0x63,0x6e, -0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73,0xa3,0xb2,0x1b,0x74,0x72,0x6f, -0x6c,0x70,0x69,0x63,0x74,0x75,0x72,0x65,0x73,0x83,0x12,0x74,0x69,0x63,0xa2,0x84, -0x1b,0x65,0x70,0x61,0x63,0x74,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0xdf,1, -0x6e,0x3e,0x72,0x1b,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73, -0x75,0x15,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa2,0x98,0x16,0x6e,0x75,0x6d,0x62,0x65, -0x72,0x73,0xa2,0x99,0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, -0x69,0x6f,0x6e,0xa3,0x99,0x61,0xa2,0xe4,0x68,0xa4,0xe,0x6a,0x10,0x6b,0xa2,0x47, -4,0x63,0x8c,0x65,0xa2,0x80,0x72,0xa2,0x9b,0x73,0xa2,0xad,0x75,0x1f,0x6e,0x69, -0x66,0x69,0x65,0x64,0x69,0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa2,0x47, -0x18,0x65,0x78,0x74,0x65,0x6e,0x73,0x69,0x6f,0x6e,7,0x65,0x6b,0x65,0xa5,0, -0x66,0xa5,0x12,0x67,0xa5,0x2e,0x68,0xa5,0x42,0x14,0x6f,0x6d,0x70,0x61,0x74,0xa2, -0x45,1,0x66,0x96,0x69,1,0x62,0x44,0x64,0x17,0x65,0x6f,0x67,0x72,0x61,0x70, -0x68,0x73,0xa2,0x4f,0x12,0x73,0x75,0x70,0xa3,0x5f,0x14,0x69,0x6c,0x69,0x74,0x79, -0xa2,0x45,1,0x66,0x54,0x69,0x18,0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x73, -0xa2,0x4f,0x19,0x73,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x5f,0x13, -0x6f,0x72,0x6d,0x73,0xa3,0x53,0x11,0x78,0x74,7,0x65,0xc,0x65,0xa5,0,0x66, -0xa5,0x12,0x67,0xa5,0x2e,0x68,0xa5,0x42,0x61,0xa3,0x46,0x62,0xa3,0x5e,0x63,0xa3, -0xc5,0x64,0xa3,0xd1,0x19,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0x73,0x75,0x70,0x94, -0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x95,1,0x74,0x50,0x79,0x14,0x6d,0x62, -0x6f,0x6c,0x73,0x9a,0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, -0x69,0x6f,0x6e,0x9b,0x14,0x72,0x6f,0x6b,0x65,0x73,0xa3,0x82,2,0x6e,0x48,0x72, -0x64,0x75,0x1d,0x63,0x61,0x73,0x69,0x61,0x6e,0x61,0x6c,0x62,0x61,0x6e,0x69,0x61, -0x6e,0xa3,0xde,0x1d,0x61,0x64,0x69,0x61,0x6e,0x73,0x79,0x6c,0x6c,0x61,0x62,0x69, -0x63,0x73,0x63,0x12,0x69,0x61,0x6e,0xa3,0xa8,2,0x61,0x3a,0x65,0x4c,0x6f,0x16, -0x72,0x61,0x73,0x6d,0x69,0x61,0x6e,0xa5,0x2d,1,0x6b,0x26,0x6d,0xa3,0xa4,0x11, -0x6d,0x61,0xa3,0xd4,1,0x72,0x38,0x73,0x17,0x73,0x73,0x79,0x6d,0x62,0x6f,0x6c, -0x73,0xa5,0x19,0x13,0x6f,0x6b,0x65,0x65,0x60,0x12,0x73,0x75,0x70,0xa2,0xff,0x16, -0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xff,3,0x65,0x3e,0x69,0x8e,0x6f,0xa2, -0x71,0x75,0x15,0x70,0x6c,0x6f,0x79,0x61,0x6e,0xa3,0xe1,1,0x73,0x60,0x76,0x16, -0x61,0x6e,0x61,0x67,0x61,0x72,0x69,0x3e,0x12,0x65,0x78,0x74,0xa2,0xb3,1,0x61, -0xa5,0x44,0x65,0x13,0x6e,0x64,0x65,0x64,0xa2,0xb3,0x10,0x61,0xa5,0x44,0x13,0x65, -0x72,0x65,0x74,0xa3,0x5a,2,0x61,0x3a,0x6e,0x82,0x76,0x16,0x65,0x73,0x61,0x6b, -0x75,0x72,0x75,0xa5,0x2f,0x18,0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x73,0x2e, -2,0x65,0x30,0x66,0x36,0x73,0x11,0x75,0x70,0xa3,0x83,0x11,0x78,0x74,0xa3,0xe0, -0x18,0x6f,0x72,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x77,0x14,0x67,0x62,0x61,0x74, -0x73,0x91,1,0x67,0x3e,0x6d,0x12,0x69,0x6e,0x6f,0xa2,0xab,0x14,0x74,0x69,0x6c, -0x65,0x73,0xa3,0xab,0x11,0x72,0x61,0xa5,0x1a,8,0x6d,0x5f,0x6d,0x3a,0x6e,0x48, -0x73,0x7a,0x76,0xa2,0x4b,0x77,0x12,0x69,0x64,0x65,0x43,0x11,0x65,0x64,0x32,0x12, -0x69,0x61,0x6c,0x33,2,0x61,0x40,0x62,0x37,0x6f,1,0x62,0x28,0x6e,0x10,0x65, -0x21,0x13,0x72,0x65,0x61,0x6b,0x37,0x10,0x72,0x34,0x12,0x72,0x6f,0x77,0x35,2, -0x6d,0x38,0x71,0x46,0x75,1,0x62,0x3d,0x70,0x3e,0x11,0x65,0x72,0x3f,1,0x61, -0x24,0x6c,0x39,0x11,0x6c,0x6c,0x39,1,0x72,0x3b,0x75,0x12,0x61,0x72,0x65,0x3b, -0x12,0x65,0x72,0x74,0x40,0x13,0x69,0x63,0x61,0x6c,0x41,0x63,0x58,0x65,0x92,0x66, -0x96,0x69,1,0x6e,0x36,0x73,0x10,0x6f,0x30,0x14,0x6c,0x61,0x74,0x65,0x64,0x31, -0x11,0x69,0x74,0x2e,0x12,0x69,0x61,0x6c,0x2f,2,0x61,0x36,0x69,0x48,0x6f,0x10, -0x6d,0x24,0x12,0x70,0x61,0x74,0x25,0x10,0x6e,0x22,0x15,0x6f,0x6e,0x69,0x63,0x61, -0x6c,0x23,0x13,0x72,0x63,0x6c,0x65,0x27,0x11,0x6e,0x63,0x27,2,0x69,0x3a,0x6f, -0x44,0x72,0x10,0x61,0x2c,0x14,0x63,0x74,0x69,0x6f,0x6e,0x2d,0x10,0x6e,0x28,0x11, -0x61,0x6c,0x29,0x11,0x6e,0x74,0x2b,4,0x61,0x3a,0x66,0x4c,0x68,0x5e,0x6e,0x70, -0x77,0x2a,0x12,0x69,0x64,0x65,0x2b,0x22,0x17,0x6d,0x62,0x69,0x67,0x75,0x6f,0x75, -0x73,0x23,0x26,0x17,0x75,0x6c,0x6c,0x77,0x69,0x64,0x74,0x68,0x27,0x24,0x17,0x61, -0x6c,0x66,0x77,0x69,0x64,0x74,0x68,0x25,0x20,1,0x61,0x30,0x65,0x14,0x75,0x74, -0x72,0x61,0x6c,0x21,0x28,0x13,0x72,0x72,0x6f,0x77,0x29,0xd,0x6e,0xc0,0xfb,0x73, -0x6d,0x73,0x3a,0x74,0x98,0x75,0xa2,0x49,0x7a,2,0x6c,0x3b,0x70,0x3d,0x73,0x39, -5,0x6f,0x28,0x6f,0x57,0x70,0x34,0x75,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65, -0x45,0x11,0x61,0x63,1,0x65,0x32,0x69,0x15,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x31, -0x18,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x39,0x63,0x53,0x6b,0x55,0x6d, -0x51,0x1d,0x69,0x74,0x6c,0x65,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72, -0x27,1,0x6e,0x40,0x70,0x1c,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74, -0x74,0x65,0x72,0x23,0x17,0x61,0x73,0x73,0x69,0x67,0x6e,0x65,0x64,0x21,0x6e,0x8a, -0x6f,0xa2,0x47,0x70,8,0x66,0x14,0x66,0x5b,0x69,0x59,0x6f,0x4f,0x72,0x24,0x73, -0x49,0x17,0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0x43,0x61,0x2c,0x63,0x4d,0x64, -0x47,0x65,0x4b,0x1f,0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72, -0x61,0x74,0x6f,0x72,0x3d,2,0x64,0x33,0x6c,0x35,0x6f,0x36,0x1b,0x6e,0x73,0x70, -0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x2d,1,0x70,0x7c,0x74,0x12,0x68, -0x65,0x72,3,0x6c,0x38,0x6e,0x42,0x70,0x4c,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c, -0x57,0x14,0x65,0x74,0x74,0x65,0x72,0x2b,0x14,0x75,0x6d,0x62,0x65,0x72,0x37,0x19, -0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4f,0x1c,0x65,0x6e,0x70,0x75, -0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x49,0x66,0x9e,0x66,0x88,0x69,0xa2, -0x4b,0x6c,0xa2,0x5c,0x6d,4,0x61,0x60,0x63,0x31,0x65,0x2f,0x6e,0x2d,0x6f,0x15, -0x64,0x69,0x66,0x69,0x65,0x72,1,0x6c,0x30,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c, -0x55,0x14,0x65,0x74,0x74,0x65,0x72,0x29,0x17,0x74,0x68,0x73,0x79,0x6d,0x62,0x6f, -0x6c,0x51,1,0x69,0x2e,0x6f,0x13,0x72,0x6d,0x61,0x74,0x41,0x1d,0x6e,0x61,0x6c, -0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x5b,0x10,0x6e,0x1f,0x69, -0x74,0x69,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x59, -6,0x6d,0x18,0x6d,0x29,0x6f,0x28,0x74,0x27,0x75,0x23,0x2a,0x1c,0x77,0x65,0x72, -0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x25,0x65,0x28,0x69,0x3c,0x6c, -0x25,0x19,0x74,0x74,0x65,0x72,0x6e,0x75,0x6d,0x62,0x65,0x72,0x35,0x1a,0x6e,0x65, -0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x3b,0x63,0x44,0x64,0xa2,0x60,0x65, -0x1b,0x6e,0x63,0x6c,0x6f,0x73,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x2f,6,0x6e, -0x39,0x6e,0x46,0x6f,0x4e,0x73,0x45,0x75,0x1b,0x72,0x72,0x65,0x6e,0x63,0x79,0x73, -0x79,0x6d,0x62,0x6f,0x6c,0x53,0x20,0x12,0x74,0x72,0x6c,0x3f,0x42,0x10,0x6e,1, -0x6e,0x2c,0x74,0x12,0x72,0x6f,0x6c,0x3f,0x1f,0x65,0x63,0x74,0x6f,0x72,0x70,0x75, -0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4d,0x63,0x3f,0x66,0x41,0x6c,0x1d, -0x6f,0x73,0x65,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4b,2, -0x61,0x30,0x65,0x4a,0x69,0x12,0x67,0x69,0x74,0x33,0x1c,0x73,0x68,0x70,0x75,0x6e, -0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x47,0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e, -0x75,0x6d,0x62,0x65,0x72,0x33,0,0x13,0x6e,0xc1,0xf,0x74,0x76,0x74,0x4c,0x76, -0x9a,0x77,0xa2,0x48,0x79,0xa2,0x49,0x7a,1,0x61,0x2c,0x68,0x12,0x61,0x69,0x6e, -0x8b,0x11,0x69,0x6e,0x85,2,0x61,0x36,0x65,0x3c,0x68,0x14,0x69,0x6e,0x79,0x65, -0x68,0xa3,0x66,1,0x68,0x71,0x77,0x73,1,0x68,0x28,0x74,0x10,0x68,0x77,0x16, -0x6d,0x61,0x72,0x62,0x75,0x74,0x61,0x74,0x13,0x67,0x6f,0x61,0x6c,0x3d,0x1a,0x65, -0x72,0x74,0x69,0x63,0x61,0x6c,0x74,0x61,0x69,0x6c,0xa3,0x67,0x11,0x61,0x77,0x79, -1,0x65,0x32,0x75,0x11,0x64,0x68,0x80,0x11,0x68,0x65,0x83,0x10,0x68,0x7a,1, -0x62,0x34,0x77,0x16,0x69,0x74,0x68,0x74,0x61,0x69,0x6c,0x7f,0x14,0x61,0x72,0x72, -0x65,0x65,0x7d,0x6e,0xa2,0x4c,0x70,0xa2,0x69,0x71,0xa2,0x69,0x72,0xa2,0x6f,0x73, -5,0x74,0x22,0x74,0x38,0x77,0x4c,0x79,0x16,0x72,0x69,0x61,0x63,0x77,0x61,0x77, -0x6f,0x18,0x72,0x61,0x69,0x67,0x68,0x74,0x77,0x61,0x77,0xa3,0x55,0x15,0x61,0x73, -0x68,0x6b,0x61,0x66,0x6d,0x61,0x2e,0x65,0x38,0x68,0x11,0x69,0x6e,0x6b,0x10,0x64, -0x62,0x11,0x68,0x65,0x65,1,0x65,0x2e,0x6d,0x13,0x6b,0x61,0x74,0x68,0x69,0x10, -0x6e,0x67,2,0x6f,0x2c,0x75,0x50,0x79,0x10,0x61,0x91,1,0x6a,0x28,0x6f,0x10, -0x6e,0x55,0x1a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x67,0x72,0x6f,0x75,0x70,0x21,0x10, -0x6e,0x57,0x10,0x65,0x59,0x10,0x61,1,0x66,0x5b,0x70,0x10,0x68,0x5d,1,0x65, -0x38,0x6f,0x18,0x68,0x69,0x6e,0x67,0x79,0x61,0x79,0x65,0x68,0x93,1,0x68,0x5f, -0x76,0x16,0x65,0x72,0x73,0x65,0x64,0x70,0x65,0x61,0x67,0xc1,0xc7,0x67,0xa4,0x52, -0x68,0xa4,0x59,0x6b,0xa4,0x99,0x6c,0xa4,0xb2,0x6d,2,0x61,0x2e,0x65,0xa4,0x3e, -0x69,0x10,0x6d,0x53,1,0x6c,0xa2,0xe7,0x6e,0x16,0x69,0x63,0x68,0x61,0x65,0x61, -0x6e,0,0x12,0x6e,0x76,0x73,0x51,0x73,0x3e,0x74,0x5c,0x77,0xa0,0x79,0xa2,0x42, -0x7a,0x13,0x61,0x79,0x69,0x6e,0xa3,0x54,0x10,0x61,1,0x64,0x2e,0x6d,0x12,0x65, -0x6b,0x68,0xa3,0x4c,0x11,0x68,0x65,0xa3,0x4b,3,0x61,0x38,0x65,0x3c,0x68,0x4a, -0x77,0x13,0x65,0x6e,0x74,0x79,0xa3,0x51,0x10,0x77,0xa3,0x4d,1,0x6e,0xa3,0x4e, -0x74,0x10,0x68,0xa3,0x4f,0x14,0x61,0x6d,0x65,0x64,0x68,0xa3,0x50,0x11,0x61,0x77, -0xa3,0x52,0x12,0x6f,0x64,0x68,0xa3,0x53,0x6e,0x3a,0x6f,0x40,0x70,0x46,0x71,0x4a, -0x72,0x12,0x65,0x73,0x68,0xa3,0x4a,0x11,0x75,0x6e,0xa3,0x46,0x11,0x6e,0x65,0xa3, -0x47,0x10,0x65,0xa3,0x48,0x12,0x6f,0x70,0x68,0xa3,0x49,0x67,0x33,0x67,0x38,0x68, -0x40,0x6b,0x5e,0x6c,0x66,0x6d,0x11,0x65,0x6d,0xa3,0x45,0x13,0x69,0x6d,0x65,0x6c, -0xa1,1,0x65,0x32,0x75,0x14,0x6e,0x64,0x72,0x65,0x64,0xa3,0x42,0x11,0x74,0x68, -0xa3,0x41,0x12,0x61,0x70,0x68,0xa3,0x43,0x14,0x61,0x6d,0x65,0x64,0x68,0xa3,0x44, -0x61,0x34,0x62,0x4a,0x64,0x50,0x66,0x12,0x69,0x76,0x65,0x9f,1,0x6c,0x2a,0x79, -0x11,0x69,0x6e,0x97,0x12,0x65,0x70,0x68,0x95,0x12,0x65,0x74,0x68,0x99,1,0x61, -0x30,0x68,0x14,0x61,0x6d,0x65,0x64,0x68,0x9d,0x13,0x6c,0x65,0x74,0x68,0x9b,0x15, -0x61,0x79,0x61,0x6c,0x61,0x6d,6,0x6e,0x2c,0x6e,0x34,0x72,0x5e,0x73,0x62,0x74, -0x11,0x74,0x61,0xa3,0x63,2,0x67,0x2e,0x6e,0x32,0x79,0x10,0x61,0xa3,0x60,0x10, -0x61,0xa3,0x5d,1,0x61,0xa3,0x5e,0x6e,0x10,0x61,0xa3,0x5f,0x10,0x61,0xa3,0x61, -0x11,0x73,0x61,0xa3,0x62,0x62,0x3c,0x6a,0x42,0x6c,0x10,0x6c,1,0x61,0xa3,0x5b, -0x6c,0x10,0x61,0xa3,0x5c,0x11,0x68,0x61,0xa3,0x59,0x10,0x61,0xa3,0x5a,0x11,0x65, -0x6d,0x51,0x10,0x61,1,0x66,0x37,0x6d,0x11,0x61,0x6c,0x39,1,0x61,0x40,0x65, -0x3e,1,0x68,0x28,0x74,0x10,0x68,0x45,0x40,0x13,0x67,0x6f,0x61,0x6c,0x43,2, -0x68,0x3b,0x6d,0x5c,0x6e,0x1a,0x69,0x66,0x69,0x72,0x6f,0x68,0x69,0x6e,0x67,0x79, -0x61,1,0x6b,0x2a,0x70,0x10,0x61,0xa3,0x65,0x15,0x69,0x6e,0x6e,0x61,0x79,0x61, -0xa3,0x64,0x1a,0x7a,0x61,0x6f,0x6e,0x68,0x65,0x68,0x67,0x6f,0x61,0x6c,0x3d,2, -0x61,0x3a,0x68,0x44,0x6e,0x17,0x6f,0x74,0x74,0x65,0x64,0x68,0x65,0x68,0x4b,1, -0x66,0x47,0x70,0x10,0x68,0x49,0x12,0x61,0x70,0x68,0x89,0x11,0x61,0x6d,0x4c,0x12, -0x61,0x64,0x68,0x4f,0x61,0x6e,0x62,0xa2,0x54,0x64,0xa2,0x70,0x65,0x31,0x66,2, -0x61,0x3e,0x65,0x4a,0x69,0x19,0x6e,0x61,0x6c,0x73,0x65,0x6d,0x6b,0x61,0x74,0x68, -0x35,0x15,0x72,0x73,0x69,0x79,0x65,0x68,0x8f,0x86,0x10,0x68,0x33,2,0x66,0x3c, -0x69,0x70,0x6c,1,0x61,0x28,0x65,0x10,0x66,0x27,0x11,0x70,0x68,0x25,0x14,0x72, -0x69,0x63,0x61,0x6e,2,0x66,0x30,0x6e,0x36,0x71,0x11,0x61,0x66,0xa3,0x58,0x11, -0x65,0x68,0xa3,0x56,0x12,0x6f,0x6f,0x6e,0xa3,0x57,0x10,0x6e,0x23,1,0x65,0x4a, -0x75,0x10,0x72,0x1f,0x75,0x73,0x68,0x61,0x73,0x6b,0x69,0x79,0x65,0x68,0x62,0x61, -0x72,0x72,0x65,0x65,0x8d,1,0x68,0x29,0x74,0x10,0x68,0x2b,0x11,0x61,0x6c,0x2c, -0x16,0x61,0x74,0x68,0x72,0x69,0x73,0x68,0x2f,7,0x6e,0x2e,0x6e,0x2c,0x72,0x3e, -0x74,0x56,0x75,0x21,0x18,0x6f,0x6e,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x21,0x28, -0x1a,0x69,0x67,0x68,0x74,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x29,0x2a,0x19,0x72, -0x61,0x6e,0x73,0x70,0x61,0x72,0x65,0x6e,0x74,0x2b,0x63,0x23,0x64,0x40,0x6a,0x56, -0x6c,0x26,0x19,0x65,0x66,0x74,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x27,0x24,0x19, -0x75,0x61,0x6c,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x25,0x19,0x6f,0x69,0x6e,0x63, -0x61,0x75,0x73,0x69,0x6e,0x67,0x23,0,0x13,0x6e,0xc0,0xd0,0x73,0x49,0x73,0x48, -0x75,0x78,0x77,0x84,0x78,0x9c,0x7a,0x10,0x77,0x58,1,0x6a,0x75,0x73,0x13,0x70, -0x61,0x63,0x65,0x59,4,0x61,0x51,0x67,0x53,0x70,0x28,0x75,0x30,0x79,0x57,0x54, -0x12,0x61,0x63,0x65,0x55,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x53,0x15,0x6e, -0x6b,0x6e,0x6f,0x77,0x6e,0x21,1,0x6a,0x5d,0x6f,0x17,0x72,0x64,0x6a,0x6f,0x69, -0x6e,0x65,0x72,0x5d,0x10,0x78,0x21,0x6e,0x60,0x6f,0xa2,0x41,0x70,0xa2,0x50,0x71, -0xa2,0x6e,0x72,1,0x65,0x24,0x69,0x6f,0x1e,0x67,0x69,0x6f,0x6e,0x61,0x6c,0x69, -0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x6f,4,0x65,0x3e,0x6c,0x5b,0x6f,0x46, -0x73,0x45,0x75,0x46,0x14,0x6d,0x65,0x72,0x69,0x63,0x47,0x15,0x78,0x74,0x6c,0x69, -0x6e,0x65,0x5b,0x17,0x6e,0x73,0x74,0x61,0x72,0x74,0x65,0x72,0x45,0x10,0x70,0x48, -0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x49,1, -0x6f,0x3e,0x72,0x4c,0x1a,0x65,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63, -0x4d,0x4a,0x1b,0x73,0x74,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63,0x4b, -0x10,0x75,0x4e,0x16,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x4f,0x68,0x7b,0x68,0x50, -0x69,0x86,0x6a,0xa2,0x61,0x6c,0xa2,0x65,0x6d,0x1c,0x61,0x6e,0x64,0x61,0x74,0x6f, -0x72,0x79,0x62,0x72,0x65,0x61,0x6b,0x2d,4,0x32,0x5f,0x33,0x61,0x65,0x34,0x6c, -0x6d,0x79,0x3a,0x13,0x70,0x68,0x65,0x6e,0x3b,0x19,0x62,0x72,0x65,0x77,0x6c,0x65, -0x74,0x74,0x65,0x72,0x6d,2,0x64,0x28,0x6e,0x3c,0x73,0x41,0x3c,0x18,0x65,0x6f, -0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x3d,0x3e,1,0x66,0x3e,0x73,0x11,0x65,0x70, -1,0x61,0x22,0x65,0x14,0x72,0x61,0x62,0x6c,0x65,0x3f,0x18,0x69,0x78,0x6e,0x75, -0x6d,0x65,0x72,0x69,0x63,0x41,2,0x6c,0x63,0x74,0x65,0x76,0x67,1,0x66,0x43, -0x69,0x15,0x6e,0x65,0x66,0x65,0x65,0x64,0x43,0x61,0x40,0x62,0x70,0x63,0xa2,0x55, -0x65,0xa2,0xdb,0x67,0x10,0x6c,0x38,0x11,0x75,0x65,0x39,2,0x69,0x23,0x6c,0x34, -0x6d,0x16,0x62,0x69,0x67,0x75,0x6f,0x75,0x73,0x23,0x24,0x17,0x70,0x68,0x61,0x62, -0x65,0x74,0x69,0x63,0x25,4,0x32,0x27,0x61,0x29,0x62,0x2b,0x6b,0x2d,0x72,0x12, -0x65,0x61,0x6b,2,0x61,0x36,0x62,0x3e,0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73, -0x57,0x13,0x66,0x74,0x65,0x72,0x29,1,0x65,0x2a,0x6f,0x11,0x74,0x68,0x27,0x13, -0x66,0x6f,0x72,0x65,0x2b,7,0x6d,0x51,0x6d,0x33,0x6f,0x28,0x70,0x69,0x72,0x35, -1,0x6d,0x76,0x6e,1,0x64,0x3c,0x74,0x1a,0x69,0x6e,0x67,0x65,0x6e,0x74,0x62, -0x72,0x65,0x61,0x6b,0x2f,0x15,0x69,0x74,0x69,0x6f,0x6e,0x61,0x1f,0x6c,0x6a,0x61, -0x70,0x61,0x6e,0x65,0x73,0x65,0x73,0x74,0x61,0x72,0x74,0x65,0x72,0x6b,1,0x62, -0x3a,0x70,0x19,0x6c,0x65,0x78,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74,0x51,0x18,0x69, -0x6e,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x33,0x61,0x6a,0x62,0x2f,0x6a,0x6b,0x6c, -0x30,0x13,0x6f,0x73,0x65,0x70,1,0x61,0x38,0x75,0x18,0x6e,0x63,0x74,0x75,0x61, -0x74,0x69,0x6f,0x6e,0x31,0x18,0x72,0x65,0x6e,0x74,0x68,0x65,0x73,0x69,0x73,0x69, -0x1b,0x72,0x72,0x69,0x61,0x67,0x65,0x72,0x65,0x74,0x75,0x72,0x6e,0x35,2,0x62, -0x3e,0x6d,0x46,0x78,0x36,0x18,0x63,0x6c,0x61,0x6d,0x61,0x74,0x69,0x6f,0x6e,0x37, -0x70,0x12,0x61,0x73,0x65,0x71,0x72,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x73, -1,0x64,0x42,0x6e,1,0x6f,0x32,0x75,0x26,0x14,0x6d,0x65,0x72,0x69,0x63,0x27, -0x11,0x6e,0x65,0x21,1,0x65,0x2e,0x69,0x24,0x12,0x67,0x69,0x74,0x25,0x22,0x14, -0x63,0x69,0x6d,0x61,0x6c,0x23,0,0x18,0x6e,0xc4,0x6f,0x74,0xc1,0x91,0x77,0x96, -0x77,0xa2,0x4c,0x78,0xa2,0x70,0x79,0xa2,0x7a,0x7a,6,0x73,0x1e,0x73,0x34,0x78, -0x42,0x79,0x48,0x7a,0x11,0x7a,0x7a,0xa3,0x67,0x10,0x79,1,0x65,0xa3,0xae,0x6d, -0xa3,0x81,0x11,0x78,0x78,0xa3,0x66,0x11,0x79,0x79,0x21,0x61,0x30,0x69,0x58,0x6d, -0x11,0x74,0x68,0xa3,0x80,0x10,0x6e,1,0x61,0x26,0x62,0xa3,0xb1,0x1a,0x62,0x61, -0x7a,0x61,0x72,0x73,0x71,0x75,0x61,0x72,0x65,0xa3,0xb1,0x11,0x6e,0x68,0x23,2, -0x61,0x30,0x63,0x5a,0x6f,0x11,0x6c,0x65,0xa3,0x9b,1,0x6e,0x3c,0x72,0x10,0x61, -0xa2,0x92,0x15,0x6e,0x67,0x63,0x69,0x74,0x69,0xa3,0x92,0x12,0x63,0x68,0x6f,0xa3, -0xbc,0x11,0x68,0x6f,0xa3,0xbc,1,0x70,0x2c,0x73,0x11,0x75,0x78,0xa3,0x65,0x11, -0x65,0x6f,0x9b,1,0x65,0x2c,0x69,0x72,0x11,0x69,0x69,0x73,0x11,0x7a,0x69,0xa2, -0xc0,0x11,0x64,0x69,0xa3,0xc0,0x74,0x66,0x75,0xa2,0xde,0x76,1,0x61,0x48,0x69, -1,0x73,0x38,0x74,0x10,0x68,0xa2,0xc5,0x13,0x6b,0x75,0x71,0x69,0xa3,0xc5,0x10, -0x70,0xa3,0x64,0x10,0x69,0xa2,0x63,0x10,0x69,0xa3,0x63,7,0x68,0x3e,0x68,0x34, -0x69,0x48,0x6e,0x86,0x6f,0x11,0x74,0x6f,0xa3,0xc4,0x10,0x61,1,0x61,0x24,0x69, -0x6d,0x6a,0x11,0x6e,0x61,0x6b,2,0x62,0x3a,0x66,0x4a,0x72,0x10,0x68,0xa2,0x9e, -0x12,0x75,0x74,0x61,0xa3,0x9e,1,0x65,0x24,0x74,0x6f,0x12,0x74,0x61,0x6e,0x6f, -0x14,0x69,0x6e,0x61,0x67,0x68,0x99,0x11,0x73,0x61,0xa3,0xc3,0x61,0x36,0x65,0xa2, -0x65,0x66,0xa2,0x71,0x67,0x11,0x6c,0x67,0x75,6,0x6c,0x28,0x6c,0x32,0x6d,0x38, -0x6e,0x44,0x76,0x10,0x74,0xa3,0x7f,1,0x65,0x89,0x75,0x97,1,0x69,0x24,0x6c, -0x67,0x10,0x6c,0x67,0x10,0x67,0xa2,0x9a,1,0x73,0x2a,0x75,0x10,0x74,0xa3,0x9a, -0x10,0x61,0xa3,0xc3,0x67,0x36,0x69,0x52,0x6b,0x10,0x72,0xa2,0x99,0x10,0x69,0xa3, -0x99,1,0x61,0x30,0x62,0x7a,0x13,0x61,0x6e,0x77,0x61,0x7b,0x12,0x6c,0x6f,0x67, -0x75,2,0x6c,0x32,0x74,0x34,0x76,0x12,0x69,0x65,0x74,0xa3,0x7f,0x10,0x65,0x89, -0x12,0x68,0x61,0x6d,0xa3,0x6a,1,0x6c,0x2a,0x6e,0x10,0x67,0xa3,0x62,0x10,0x75, -0x68,0x11,0x67,0x75,0x69,0x11,0x6e,0x67,0x99,1,0x67,0x32,0x6e,0x14,0x6b,0x6e, -0x6f,0x77,0x6e,0xa3,0x67,0x11,0x61,0x72,0x8a,0x13,0x69,0x74,0x69,0x63,0x8b,0x71, -0xc1,0x13,0x71,0xa2,0xde,0x72,0xa2,0xe3,0x73,6,0x69,0x8a,0x69,0x72,0x6f,0xa2, -0x4c,0x75,0xa2,0x75,0x79,1,0x6c,0x46,0x72,4,0x63,0x65,0x65,0xa3,0x5f,0x69, -0x2c,0x6a,0xa3,0x60,0x6e,0xa3,0x61,0x11,0x61,0x63,0x65,0x10,0x6f,0x94,0x16,0x74, -0x69,0x6e,0x61,0x67,0x72,0x69,0x95,2,0x64,0x3c,0x67,0x4c,0x6e,1,0x64,0xa3, -0x91,0x68,0x62,0x12,0x61,0x6c,0x61,0x63,0x10,0x64,0xa2,0xa6,0x12,0x68,0x61,0x6d, -0xa3,0xa6,0x17,0x6e,0x77,0x72,0x69,0x74,0x69,0x6e,0x67,0xa3,0x70,2,0x67,0x3a, -0x72,0x52,0x79,0x10,0x6f,0xa2,0xb0,0x12,0x6d,0x62,0x6f,0xa3,0xb0,1,0x64,0x26, -0x6f,0xa3,0xb8,0xa2,0xb7,0x12,0x69,0x61,0x6e,0xa3,0xb7,0x10,0x61,0xa2,0x98,0x16, -0x73,0x6f,0x6d,0x70,0x65,0x6e,0x67,0xa3,0x98,0x11,0x6e,0x64,0xa2,0x71,0x14,0x61, -0x6e,0x65,0x73,0x65,0xa3,0x71,0x61,0x5c,0x67,0xa2,0x43,0x68,1,0x61,0x2a,0x72, -0x10,0x64,0xa3,0x97,2,0x72,0x28,0x76,0x30,0x77,0x87,0x12,0x61,0x64,0x61,0xa3, -0x97,0x12,0x69,0x61,0x6e,0x87,2,0x6d,0x40,0x72,0x58,0x75,0x10,0x72,0xa2,0x6f, -0x15,0x61,0x73,0x68,0x74,0x72,0x61,0xa3,0x6f,1,0x61,0x26,0x72,0xa3,0x7e,0x14, -0x72,0x69,0x74,0x61,0x6e,0xa3,0x7e,1,0x61,0xa3,0x5e,0x62,0xa3,0x85,0x11,0x6e, -0x77,0xa3,0x70,0x11,0x61,0x61,1,0x63,0x2f,0x69,0x23,3,0x65,0x3e,0x6a,0x48, -0x6f,0x4e,0x75,0x10,0x6e,1,0x69,0x24,0x72,0x61,0x10,0x63,0x61,0x13,0x6a,0x61, -0x6e,0x67,0xa3,0x6e,0x11,0x6e,0x67,0xa3,0x6e,1,0x68,0x2a,0x72,0x10,0x6f,0xa3, -0x5d,0x10,0x67,0xa3,0xb6,0x6e,0xa2,0x83,0x6f,0xa4,1,0x70,5,0x6c,0x1e,0x6c, -0x44,0x72,0x4a,0x73,0x1b,0x61,0x6c,0x74,0x65,0x72,0x70,0x61,0x68,0x6c,0x61,0x76, -0x69,0xa3,0x7b,0x11,0x72,0x64,0xa3,0x5c,0x11,0x74,0x69,0xa3,0x7d,0x61,0x7c,0x65, -0xa2,0x54,0x68,3,0x61,0x3e,0x6c,0x4e,0x6e,0x5e,0x6f,0x16,0x65,0x6e,0x69,0x63, -0x69,0x61,0x6e,0xa3,0x5b,0x10,0x67,0xa2,0x5a,0x12,0x73,0x70,0x61,0xa3,0x5a,2, -0x69,0xa3,0x7a,0x70,0xa3,0x7b,0x76,0xa3,0x7c,0x10,0x78,0xa3,0x5b,2,0x68,0x3e, -0x6c,0x50,0x75,0x10,0x63,0xa2,0xa5,0x14,0x69,0x6e,0x68,0x61,0x75,0xa3,0xa5,0x17, -0x61,0x77,0x68,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0x4b,0x10,0x6d,0xa2,0x90,0x14,0x79, -0x72,0x65,0x6e,0x65,0xa3,0x90,0x11,0x72,0x6d,0xa3,0x59,6,0x6b,0x36,0x6b,0x56, -0x73,0x6e,0x75,0x74,0x79,0x11,0x69,0x61,0x1f,0x6b,0x65,0x6e,0x67,0x70,0x75,0x61, -0x63,0x68,0x75,0x65,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0xba,1,0x67,0x2e,0x6f,0xa2, -0x57,0x10,0x6f,0xa3,0x57,0x10,0x62,0xa3,0x84,0x11,0x68,0x75,0xa3,0x96,0x12,0x73, -0x68,0x75,0xa3,0x96,0x61,0x42,0x62,0x9e,0x65,0x10,0x77,1,0x61,0xa3,0xaa,0x74, -0x14,0x61,0x69,0x6c,0x75,0x65,0x97,3,0x62,0x32,0x67,0x40,0x6e,0x56,0x72,0x10, -0x62,0xa3,0x8e,0x15,0x61,0x74,0x61,0x65,0x61,0x6e,0xa3,0x8f,0x10,0x6d,0xa2,0xc7, -0x15,0x75,0x6e,0x64,0x61,0x72,0x69,0xa3,0xc7,0x10,0x64,0xa2,0xbb,0x16,0x69,0x6e, -0x61,0x67,0x61,0x72,0x69,0xa3,0xbb,0x11,0x61,0x74,0xa3,0x8f,4,0x67,0x3c,0x6c, -0x4e,0x72,0xa2,0x8e,0x73,0xa2,0x9c,0x75,0x11,0x67,0x72,0xa3,0xc2,1,0x61,0x2a, -0x68,0x11,0x61,0x6d,0x5b,0x10,0x6d,0x5b,1,0x63,0xa2,0x6a,0x64,6,0x70,0x41, -0x70,0x3a,0x73,0x58,0x74,0x86,0x75,0x14,0x79,0x67,0x68,0x75,0x72,0xa3,0xc2,0x11, -0x65,0x72,1,0x6d,0x2c,0x73,0x12,0x69,0x61,0x6e,0x9b,0x11,0x69,0x63,0xa3,0x59, -0x10,0x6f,1,0x67,0x3a,0x75,0x18,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e, -0xa3,0x85,0x13,0x64,0x69,0x61,0x6e,0xa3,0xb8,0x14,0x75,0x72,0x6b,0x69,0x63,0xa3, -0x58,0x68,0x42,0x69,0x54,0x6e,0x1a,0x6f,0x72,0x74,0x68,0x61,0x72,0x61,0x62,0x69, -0x61,0x6e,0xa3,0x8e,0x17,0x75,0x6e,0x67,0x61,0x72,0x69,0x61,0x6e,0xa3,0x4c,0x14, -0x74,0x61,0x6c,0x69,0x63,0x5d,1,0x68,0x26,0x6b,0xa3,0x6d,0x12,0x69,0x6b,0x69, -0xa3,0x6d,2,0x69,0x2c,0x6b,0x30,0x79,0x10,0x61,0x5f,0x11,0x79,0x61,0x5f,0x10, -0x68,0xa3,0x58,2,0x61,0x36,0x67,0x3c,0x6d,0x10,0x61,0x84,0x12,0x6e,0x79,0x61, -0x85,0x11,0x67,0x65,0xa3,0xab,0x10,0x65,0xa3,0xab,0x68,0xc3,0x15,0x6b,0xc2,0x2c, -0x6b,0xa4,0x17,0x6c,0xa4,0xba,0x6d,8,0x6f,0x46,0x6f,0x48,0x72,0x74,0x74,0x80, -0x75,0x86,0x79,1,0x61,0x28,0x6d,0x10,0x72,0x59,0x13,0x6e,0x6d,0x61,0x72,0x59, -2,0x64,0x2e,0x6e,0x32,0x6f,0x10,0x6e,0xa3,0x72,0x10,0x69,0xa3,0xa3,0x10,0x67, -0x56,0x14,0x6f,0x6c,0x69,0x61,0x6e,0x57,0x10,0x6f,0xa2,0x95,0x10,0x6f,0xa3,0x95, -0x11,0x65,0x69,0xa3,0x73,0x11,0x6c,0x74,0xa2,0xa4,0x12,0x61,0x6e,0x69,0xa3,0xa4, -0x61,0x36,0x65,0xa2,0x67,0x69,0xa2,0xbd,0x6c,0x11,0x79,0x6d,0x55,6,0x6e,0x38, -0x6e,0x32,0x72,0x5c,0x73,0x6c,0x79,0x10,0x61,0xa3,0x55,1,0x64,0x38,0x69,0xa2, -0x79,0x15,0x63,0x68,0x61,0x65,0x61,0x6e,0xa3,0x79,0xa2,0x54,0x12,0x61,0x69,0x63, -0xa3,0x54,0x10,0x63,0xa2,0xa9,0x12,0x68,0x65,0x6e,0xa3,0xa9,0x18,0x61,0x72,0x61, -0x6d,0x67,0x6f,0x6e,0x64,0x69,0xa3,0xaf,0x68,0x36,0x6b,0x4c,0x6c,0x15,0x61,0x79, -0x61,0x6c,0x61,0x6d,0x55,1,0x61,0x26,0x6a,0xa3,0xa0,0x13,0x6a,0x61,0x6e,0x69, -0xa3,0xa0,0x10,0x61,0xa2,0xb4,0x12,0x73,0x61,0x72,0xa3,0xb4,3,0x64,0x78,0x65, -0x94,0x6e,0xa2,0x42,0x72,1,0x63,0xa3,0x8d,0x6f,0xa2,0x56,0x13,0x69,0x74,0x69, -0x63,1,0x63,0x3c,0x68,0x19,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73, -0xa3,0x56,0x15,0x75,0x72,0x73,0x69,0x76,0x65,0xa3,0x8d,1,0x65,0x26,0x66,0xa3, -0xb5,0x16,0x66,0x61,0x69,0x64,0x72,0x69,0x6e,0xa3,0xb5,0x17,0x74,0x65,0x69,0x6d, -0x61,0x79,0x65,0x6b,0xa3,0x73,0x10,0x64,0xa2,0x8c,0x17,0x65,0x6b,0x69,0x6b,0x61, -0x6b,0x75,0x69,0xa3,0x8c,0x11,0x61,0x6f,0xa3,0x5c,6,0x6e,0x1a,0x6e,0x34,0x6f, -0x38,0x70,0x3e,0x74,0x11,0x68,0x69,0xa3,0x78,0x11,0x64,0x61,0x4b,0x11,0x72,0x65, -0xa3,0x77,0x11,0x65,0x6c,0xa3,0x8a,0x61,0x32,0x68,0xa2,0x44,0x69,0x11,0x74,0x73, -0xa3,0xbf,5,0x74,0x23,0x74,0x34,0x77,0x56,0x79,0x13,0x61,0x68,0x6c,0x69,0xa3, -0x4f,0x14,0x61,0x6b,0x61,0x6e,0x61,0x4c,0x19,0x6f,0x72,0x68,0x69,0x72,0x61,0x67, -0x61,0x6e,0x61,0x8d,0x10,0x69,0xa3,0xc6,0x69,0x38,0x6c,0x40,0x6e,1,0x61,0x4d, -0x6e,0x12,0x61,0x64,0x61,0x4b,0x12,0x74,0x68,0x69,0xa3,0x78,0x10,0x69,0xa3,0x4f, -4,0x61,0x40,0x69,0x52,0x6d,0x70,0x6f,0x7c,0x75,0x15,0x64,0x61,0x77,0x61,0x64, -0x69,0xa3,0x91,0x10,0x72,0x92,0x15,0x6f,0x73,0x68,0x74,0x68,0x69,0x93,0x1d,0x74, -0x61,0x6e,0x73,0x6d,0x61,0x6c,0x6c,0x73,0x63,0x72,0x69,0x70,0x74,0xa3,0xbf,1, -0x65,0x24,0x72,0x4f,0x10,0x72,0x4f,0x10,0x6a,0xa2,0x9d,0x11,0x6b,0x69,0xa3,0x9d, -4,0x61,0x5c,0x65,0x90,0x69,0xa0,0x6f,0xa2,0x5d,0x79,1,0x63,0x34,0x64,0x10, -0x69,0xa2,0x6c,0x11,0x61,0x6e,0xa3,0x6c,0x10,0x69,0xa2,0x6b,0x11,0x61,0x6e,0xa3, -0x6b,2,0x6e,0x42,0x6f,0x46,0x74,3,0x66,0xa3,0x50,0x67,0xa3,0x51,0x69,0x24, -0x6e,0x53,0x10,0x6e,0x53,0x10,0x61,0xa3,0x6a,0x50,0x10,0x6f,0x51,0x11,0x70,0x63, -0xa2,0x52,0x11,0x68,0x61,0xa3,0x52,2,0x6d,0x2e,0x6e,0x36,0x73,0x10,0x75,0xa3, -0x83,0x10,0x62,0x80,0x10,0x75,0x81,2,0x61,0xa3,0x53,0x62,0x83,0x65,0x11,0x61, -0x72,1,0x61,0xa3,0x53,0x62,0x83,0x11,0x6d,0x61,0xa3,0x8b,0x68,0x6e,0x69,0xa2, -0x95,0x6a,2,0x61,0x30,0x70,0x52,0x75,0x11,0x72,0x63,0xa3,0x94,1,0x6d,0x38, -0x76,0x10,0x61,0xa2,0x4e,0x13,0x6e,0x65,0x73,0x65,0xa3,0x4e,0x10,0x6f,0xa3,0xad, -0x11,0x61,0x6e,0xa3,0x69,6,0x6c,0x1e,0x6c,0x34,0x6d,0x3a,0x72,0x48,0x75,0x11, -0x6e,0x67,0xa3,0x4c,0x11,0x75,0x77,0xa3,0x9c,0x10,0x6e,1,0x67,0xa3,0x4b,0x70, -0xa3,0xba,0x11,0x6b,0x74,0x8d,0x61,0x3c,0x65,0xa2,0x43,0x69,0x11,0x72,0x61,0x48, -0x13,0x67,0x61,0x6e,0x61,0x49,1,0x6e,0x34,0x74,0x10,0x72,0xa2,0xa2,0x11,0x61, -0x6e,0xa3,0xa2,0x42,6,0x6f,0xe,0x6f,0x77,0x73,0xa3,0x49,0x74,0xa3,0x4a,0x75, -0x12,0x6e,0x6f,0x6f,0x77,0x62,0xa3,0xac,0x67,0x3e,0x69,0x42,0x19,0x66,0x69,0x72, -0x6f,0x68,0x69,0x6e,0x67,0x79,0x61,0xa3,0xb6,0x44,0x11,0x75,0x6c,0x45,0x11,0x62, -0x72,0x46,0x11,0x65,0x77,0x47,2,0x6d,0x2e,0x6e,0x4a,0x74,0x11,0x61,0x6c,0x5d, -0x1c,0x70,0x65,0x72,0x69,0x61,0x6c,0x61,0x72,0x61,0x6d,0x61,0x69,0x63,0xa3,0x74, -2,0x64,0x66,0x68,0x6a,0x73,0x1b,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x61, -0x6c,0x70,0x61,1,0x68,0x32,0x72,0x14,0x74,0x68,0x69,0x61,0x6e,0xa3,0x7d,0x13, -0x6c,0x61,0x76,0x69,0xa3,0x7a,0x10,0x73,0xa3,0x4d,0x15,0x65,0x72,0x69,0x74,0x65, -0x64,0x23,0x64,0xc1,0xd,0x64,0xa2,0x7a,0x65,0xa2,0xc1,0x67,4,0x65,0x82,0x6c, -0x9a,0x6f,0xa2,0x46,0x72,0xa2,0x55,0x75,2,0x6a,0x3c,0x6e,0x4e,0x72,1,0x6d, -0x24,0x75,0x41,0x13,0x75,0x6b,0x68,0x69,0x41,1,0x61,0x24,0x72,0x3f,0x13,0x72, -0x61,0x74,0x69,0x3f,0x18,0x6a,0x61,0x6c,0x61,0x67,0x6f,0x6e,0x64,0x69,0xa3,0xb3, -0x10,0x6f,1,0x6b,0xa3,0x48,0x72,0x38,0x13,0x67,0x69,0x61,0x6e,0x39,0x11,0x61, -0x67,0x90,0x15,0x6f,0x6c,0x69,0x74,0x69,0x63,0x91,1,0x6e,0x30,0x74,0x10,0x68, -0x3a,0x11,0x69,0x63,0x3b,1,0x67,0xa3,0xb3,0x6d,0xa3,0xaf,1,0x61,0x32,0x65, -1,0x65,0x24,0x6b,0x3d,0x10,0x6b,0x3d,0x10,0x6e,0xa2,0x89,0x12,0x74,0x68,0x61, -0xa3,0x89,4,0x65,0x46,0x69,0x6c,0x6f,0x8c,0x73,0x9a,0x75,0x11,0x70,0x6c,0xa2, -0x87,0x13,0x6f,0x79,0x61,0x6e,0xa3,0x87,1,0x73,0x38,0x76,0x10,0x61,0x34,0x15, -0x6e,0x61,0x67,0x61,0x72,0x69,0x35,0x13,0x65,0x72,0x65,0x74,0x33,1,0x61,0x36, -0x76,0x16,0x65,0x73,0x61,0x6b,0x75,0x72,0x75,0xa3,0xbe,0x10,0x6b,0xa3,0xbe,0x11, -0x67,0x72,0xa2,0xb2,0x10,0x61,0xa3,0xb2,0x11,0x72,0x74,0x33,2,0x67,0x3a,0x6c, -0x72,0x74,0x11,0x68,0x69,0x36,0x13,0x6f,0x70,0x69,0x63,0x37,0x10,0x79,2,0x64, -0xa3,0x45,0x68,0xa3,0x46,0x70,0xa2,0x47,0x1e,0x74,0x69,0x61,0x6e,0x68,0x69,0x65, -0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0x47,1,0x62,0x36,0x79,0x10,0x6d, -0xa2,0xb9,0x12,0x61,0x69,0x63,0xa3,0xb9,0x10,0x61,0xa2,0x88,0x12,0x73,0x61,0x6e, -0xa3,0x88,0x61,0xa2,0xc9,0x62,0xa4,0x2e,0x63,6,0x6f,0x52,0x6f,0x76,0x70,0x92, -0x75,0xa2,0x41,0x79,1,0x70,0x3e,0x72,2,0x69,0x2a,0x6c,0x31,0x73,0xa3,0x44, -0x13,0x6c,0x6c,0x69,0x63,0x31,0x10,0x72,1,0x69,0x34,0x6f,0x15,0x6d,0x69,0x6e, -0x6f,0x61,0x6e,0xa3,0xc1,0x11,0x6f,0x74,0x7f,1,0x6d,0x30,0x70,0x10,0x74,0x2e, -0x11,0x69,0x63,0x2f,0x12,0x6d,0x6f,0x6e,0x21,1,0x6d,0x28,0x72,0x10,0x74,0x7f, -0x10,0x6e,0xa3,0xc1,0x16,0x6e,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa3,0x65,0x61,0x32, -0x68,0xa2,0x41,0x69,0x11,0x72,0x74,0xa3,0x43,3,0x6b,0x4c,0x6e,0x50,0x72,0x76, -0x75,0x1d,0x63,0x61,0x73,0x69,0x61,0x6e,0x61,0x6c,0x62,0x61,0x6e,0x69,0x61,0x6e, -0xa3,0x9f,0x10,0x6d,0xa3,0x76,1,0x61,0x24,0x73,0x71,0x1d,0x64,0x69,0x61,0x6e, -0x61,0x62,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x71,0x10,0x69,0xa2,0x68,0x11, -0x61,0x6e,0xa3,0x68,3,0x61,0x32,0x65,0x44,0x6f,0x52,0x72,0x10,0x73,0xa3,0xbd, -1,0x6b,0x26,0x6d,0xa3,0x42,0x11,0x6d,0x61,0xa3,0x76,0x10,0x72,0x2c,0x13,0x6f, -0x6b,0x65,0x65,0x2d,0x16,0x72,0x61,0x73,0x6d,0x69,0x61,0x6e,0xa3,0xbd,6,0x68, -0x4a,0x68,0x48,0x6e,0x4e,0x72,0x76,0x76,1,0x65,0x2a,0x73,0x10,0x74,0xa3,0x75, -0x13,0x73,0x74,0x61,0x6e,0xa3,0x75,0x11,0x6f,0x6d,0xa3,0xa1,0x11,0x61,0x74,0x1f, -0x6f,0x6c,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73, -0xa3,0x9c,1,0x61,0x3e,0x6d,2,0x65,0x2a,0x69,0xa3,0x74,0x6e,0x27,0x13,0x6e, -0x69,0x61,0x6e,0x27,0x10,0x62,0x24,0x11,0x69,0x63,0x25,0x64,0x30,0x66,0x44,0x67, -0x11,0x68,0x62,0xa3,0x9f,0x10,0x6c,1,0x61,0x26,0x6d,0xa3,0xa7,0x10,0x6d,0xa3, -0xa7,0x11,0x61,0x6b,0xa3,0x93,6,0x6c,0x3c,0x6c,0x52,0x6f,0x56,0x72,0x66,0x75, -1,0x67,0x30,0x68,1,0x64,0x79,0x69,0x10,0x64,0x79,0x10,0x69,0x8e,0x13,0x6e, -0x65,0x73,0x65,0x8f,0x11,0x69,0x73,0xa1,0x11,0x70,0x6f,0x2a,0x13,0x6d,0x6f,0x66, -0x6f,0x2b,0x10,0x61,1,0x68,0x2e,0x69,0x7c,0x12,0x6c,0x6c,0x65,0x7d,0xa2,0x41, -0x11,0x6d,0x69,0xa3,0x41,0x61,0x48,0x65,0x9c,0x68,1,0x61,0x2a,0x6b,0x10,0x73, -0xa3,0xa8,0x15,0x69,0x6b,0x73,0x75,0x6b,0x69,0xa3,0xa8,3,0x6c,0x3a,0x6d,0x48, -0x73,0x54,0x74,1,0x61,0x24,0x6b,0x9f,0x10,0x6b,0x9f,0x10,0x69,0x9c,0x13,0x6e, -0x65,0x73,0x65,0x9d,0x10,0x75,0xa2,0x82,0x10,0x6d,0xa3,0x82,0x10,0x73,0xa2,0x86, -0x13,0x61,0x76,0x61,0x68,0xa3,0x86,0x11,0x6e,0x67,0x28,0x12,0x61,0x6c,0x69,0x29, -3,0x6c,0x42,0x6e,0x90,0x74,0xa2,0x46,0x76,0x24,0x17,0x6f,0x77,0x65,0x6c,0x6a, -0x61,0x6d,0x6f,0x25,0x22,1,0x65,0x54,0x76,0x28,1,0x73,0x38,0x74,0x2a,0x17, -0x73,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x2b,0x16,0x79,0x6c,0x6c,0x61,0x62,0x6c, -0x65,0x29,0x18,0x61,0x64,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x23,1,0x61,0x21, -0x6f,0x1a,0x74,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x62,0x6c,0x65,0x21,0x26,0x1a, -0x72,0x61,0x69,0x6c,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x27,1,0x6e,0x2c,0x79, -0x22,0x11,0x65,0x73,0x23,0x20,0x10,0x6f,0x21,1,0x6e,0x2c,0x79,0x22,0x11,0x65, -0x73,0x23,0x20,0x10,0x6f,0x21,2,0x6d,0x30,0x6e,0x3a,0x79,0x22,0x11,0x65,0x73, -0x23,0x24,0x13,0x61,0x79,0x62,0x65,0x25,0x20,0x10,0x6f,0x21,2,0x6d,0x30,0x6e, -0x3a,0x79,0x22,0x11,0x65,0x73,0x23,0x24,0x13,0x61,0x79,0x62,0x65,0x25,0x20,0x10, -0x6f,0x21,0xb,0x72,0x39,0x76,0xc,0x76,0x33,0x78,0x2a,0x7a,0x11,0x77,0x6a,0x43, -0x10,0x78,0x21,0x72,0x28,0x73,0x50,0x74,0x31,1,0x65,0x24,0x69,0x39,0x1e,0x67, -0x69,0x6f,0x6e,0x61,0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x39,1, -0x6d,0x35,0x70,0x18,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x35,0x6c,0x1f, -0x6c,0x3c,0x6f,0x4a,0x70,1,0x70,0x37,0x72,0x14,0x65,0x70,0x65,0x6e,0x64,0x37, -0x28,1,0x66,0x2b,0x76,0x2c,0x10,0x74,0x2f,0x13,0x74,0x68,0x65,0x72,0x21,0x63, -0x4c,0x65,0x64,0x67,1,0x61,0x3a,0x6c,0x19,0x75,0x65,0x61,0x66,0x74,0x65,0x72, -0x7a,0x77,0x6a,0x41,0x10,0x7a,0x41,2,0x6e,0x23,0x6f,0x24,0x72,0x25,0x14,0x6e, -0x74,0x72,0x6f,0x6c,0x23,2,0x62,0x34,0x6d,0x4e,0x78,0x26,0x13,0x74,0x65,0x6e, -0x64,0x27,0x3a,1,0x61,0x24,0x67,0x3d,0x11,0x73,0x65,0x3a,0x12,0x67,0x61,0x7a, -0x3d,0x3e,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x3f,9,0x6e,0x4a,0x6e,0x34, -0x6f,0x44,0x73,0x60,0x75,0x94,0x78,0x10,0x78,0x21,0x10,0x75,0x2a,0x14,0x6d,0x65, -0x72,0x69,0x63,0x2b,1,0x6c,0x2c,0x74,0x12,0x68,0x65,0x72,0x21,0x14,0x65,0x74, -0x74,0x65,0x72,0x2d,3,0x63,0x36,0x65,0x46,0x70,0x31,0x74,0x32,0x12,0x65,0x72, -0x6d,0x33,0x3c,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3d,0x2e,0x10,0x70,0x2f, -0x10,0x70,0x34,0x12,0x70,0x65,0x72,0x35,0x61,0x46,0x63,0x52,0x65,0x64,0x66,0x72, -0x6c,2,0x65,0x2d,0x66,0x3b,0x6f,0x28,0x12,0x77,0x65,0x72,0x29,0x10,0x74,0x22, -0x12,0x65,0x72,0x6d,0x23,1,0x6c,0x24,0x72,0x37,0x24,0x12,0x6f,0x73,0x65,0x25, -0x10,0x78,0x38,0x13,0x74,0x65,0x6e,0x64,0x39,0x10,0x6f,0x26,0x13,0x72,0x6d,0x61, -0x74,0x27,0,0x10,0x6c,0x88,0x72,0x40,0x72,0x36,0x73,0x5e,0x77,0x7a,0x78,0x8a, -0x7a,0x11,0x77,0x6a,0x4b,1,0x65,0x24,0x69,0x3b,0x1e,0x67,0x69,0x6f,0x6e,0x61, -0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x3b,1,0x69,0x24,0x71,0x3f, -0x18,0x6e,0x67,0x6c,0x65,0x71,0x75,0x6f,0x74,0x65,0x3f,0x17,0x73,0x65,0x67,0x73, -0x70,0x61,0x63,0x65,0x4d,0x10,0x78,0x21,0x6c,0x36,0x6d,0x3c,0x6e,0x76,0x6f,0x13, -0x74,0x68,0x65,0x72,0x21,1,0x65,0x23,0x66,0x35,3,0x62,0x37,0x69,0x28,0x6c, -0x29,0x6e,0x2b,0x10,0x64,1,0x6c,0x34,0x6e,0x11,0x75,0x6d,0x2a,0x12,0x6c,0x65, -0x74,0x37,0x14,0x65,0x74,0x74,0x65,0x72,0x29,2,0x65,0x36,0x6c,0x39,0x75,0x2c, -0x14,0x6d,0x65,0x72,0x69,0x63,0x2d,0x14,0x77,0x6c,0x69,0x6e,0x65,0x39,0x66,0x3f, -0x66,0x40,0x67,0x4e,0x68,0x70,0x6b,0x10,0x61,0x26,0x15,0x74,0x61,0x6b,0x61,0x6e, -0x61,0x27,0x10,0x6f,0x24,0x13,0x72,0x6d,0x61,0x74,0x25,1,0x61,0x3a,0x6c,0x19, -0x75,0x65,0x61,0x66,0x74,0x65,0x72,0x7a,0x77,0x6a,0x49,0x10,0x7a,0x49,1,0x65, -0x24,0x6c,0x3d,0x19,0x62,0x72,0x65,0x77,0x6c,0x65,0x74,0x74,0x65,0x72,0x3d,0x61, -0x86,0x63,0x92,0x64,0x94,0x65,2,0x62,0x44,0x6d,0x5e,0x78,0x2e,0x13,0x74,0x65, -0x6e,0x64,0x32,0x15,0x6e,0x75,0x6d,0x6c,0x65,0x74,0x2f,0x42,1,0x61,0x24,0x67, -0x45,0x11,0x73,0x65,0x42,0x12,0x67,0x61,0x7a,0x45,0x46,0x16,0x6f,0x64,0x69,0x66, -0x69,0x65,0x72,0x47,0x15,0x6c,0x65,0x74,0x74,0x65,0x72,0x23,0x10,0x72,0x31,1, -0x6f,0x24,0x71,0x41,0x18,0x75,0x62,0x6c,0x65,0x71,0x75,0x6f,0x74,0x65,0x41,2, -0x63,0x32,0x6e,0x3c,0x6f,0x22,0x12,0x70,0x65,0x6e,0x23,0x24,0x13,0x6c,0x6f,0x73, -0x65,0x25,0x20,0x12,0x6f,0x6e,0x65,0x21,6,0x6f,0x65,0x6f,0x4a,0x72,0x5c,0x74, -0x64,0x76,0x1d,0x69,0x73,0x75,0x61,0x6c,0x6f,0x72,0x64,0x65,0x72,0x6c,0x65,0x66, -0x74,0x3d,0x18,0x76,0x65,0x72,0x73,0x74,0x72,0x75,0x63,0x6b,0x2d,0x13,0x69,0x67, -0x68,0x74,0x2f,0x11,0x6f,0x70,0x30,0x12,0x61,0x6e,0x64,2,0x62,0x32,0x6c,0x62, -0x72,0x13,0x69,0x67,0x68,0x74,0x3b,0x14,0x6f,0x74,0x74,0x6f,0x6d,0x32,0x12,0x61, -0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x35,0x12,0x65,0x66,0x74, -0x3f,0x12,0x65,0x66,0x74,0x36,0x17,0x61,0x6e,0x64,0x72,0x69,0x67,0x68,0x74,0x39, -0x62,0x2c,0x6c,0x5c,0x6e,0x10,0x61,0x21,0x14,0x6f,0x74,0x74,0x6f,0x6d,0x22,0x12, -0x61,0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x27,0x12,0x65,0x66, -0x74,0x25,0x12,0x65,0x66,0x74,0x28,0x17,0x61,0x6e,0x64,0x72,0x69,0x67,0x68,0x74, -0x2b,0xd,0x6e,0xaa,0x72,0x70,0x72,0x92,0x73,0xa2,0x46,0x74,0xa2,0x54,0x76,1, -0x69,0x60,0x6f,0x12,0x77,0x65,0x6c,0x62,1,0x64,0x3a,0x69,0x19,0x6e,0x64,0x65, -0x70,0x65,0x6e,0x64,0x65,0x6e,0x74,0x67,0x17,0x65,0x70,0x65,0x6e,0x64,0x65,0x6e, -0x74,0x65,1,0x72,0x2e,0x73,0x13,0x61,0x72,0x67,0x61,0x61,0x12,0x61,0x6d,0x61, -0x5f,0x1d,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x73,0x68,0x69,0x66,0x74,0x65,0x72, -0x57,0x1e,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x6d,0x6f,0x64,0x69,0x66,0x69,0x65, -0x72,0x59,0x12,0x6f,0x6e,0x65,1,0x6c,0x2c,0x6d,0x12,0x61,0x72,0x6b,0x5d,0x14, -0x65,0x74,0x74,0x65,0x72,0x5b,0x6e,0x3c,0x6f,0x7c,0x70,0x18,0x75,0x72,0x65,0x6b, -0x69,0x6c,0x6c,0x65,0x72,0x55,1,0x6f,0x4c,0x75,1,0x6b,0x3c,0x6d,0x12,0x62, -0x65,0x72,0x50,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x53,0x11,0x74,0x61,0x4f,0x16, -0x6e,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x4d,0x13,0x74,0x68,0x65,0x72,0x21,0x67,0x3e, -0x67,0x4a,0x69,0x64,0x6a,0x82,0x6d,0x1d,0x6f,0x64,0x69,0x66,0x79,0x69,0x6e,0x67, -0x6c,0x65,0x74,0x74,0x65,0x72,0x4b,0x1c,0x65,0x6d,0x69,0x6e,0x61,0x74,0x69,0x6f, -0x6e,0x6d,0x61,0x72,0x6b,0x45,0x1e,0x6e,0x76,0x69,0x73,0x69,0x62,0x6c,0x65,0x73, -0x74,0x61,0x63,0x6b,0x65,0x72,0x47,0x14,0x6f,0x69,0x6e,0x65,0x72,0x49,0x61,0xa2, -0xba,0x62,0xa2,0xc0,0x63,1,0x61,0xa2,0xa2,0x6f,0x16,0x6e,0x73,0x6f,0x6e,0x61, -0x6e,0x74,0x2a,8,0x6b,0x67,0x6b,0x48,0x6d,0x52,0x70,0x5c,0x73,0xa2,0x42,0x77, -0x19,0x69,0x74,0x68,0x73,0x74,0x61,0x63,0x6b,0x65,0x72,0x43,0x14,0x69,0x6c,0x6c, -0x65,0x72,0x35,0x14,0x65,0x64,0x69,0x61,0x6c,0x37,1,0x6c,0x52,0x72,0x10,0x65, -1,0x63,0x2e,0x66,0x13,0x69,0x78,0x65,0x64,0x3d,0x19,0x65,0x64,0x69,0x6e,0x67, -0x72,0x65,0x70,0x68,0x61,0x3b,0x18,0x61,0x63,0x65,0x68,0x6f,0x6c,0x64,0x65,0x72, -0x39,0x10,0x75,1,0x62,0x3e,0x63,0x1b,0x63,0x65,0x65,0x64,0x69,0x6e,0x67,0x72, -0x65,0x70,0x68,0x61,0x41,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x64,0x3f,0x64,0x4c,0x66, -0x52,0x68,0x5a,0x69,0x1e,0x6e,0x69,0x74,0x69,0x61,0x6c,0x70,0x6f,0x73,0x74,0x66, -0x69,0x78,0x65,0x64,0x33,0x12,0x65,0x61,0x64,0x2d,0x13,0x69,0x6e,0x61,0x6c,0x2f, -0x18,0x65,0x61,0x64,0x6c,0x65,0x74,0x74,0x65,0x72,0x31,0x1d,0x6e,0x74,0x69,0x6c, -0x6c,0x61,0x74,0x69,0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x29,0x16,0x76,0x61,0x67,0x72, -0x61,0x68,0x61,0x23,1,0x69,0x4a,0x72,0x10,0x61,0x1f,0x68,0x6d,0x69,0x6a,0x6f, -0x69,0x6e,0x69,0x6e,0x67,0x6e,0x75,0x6d,0x62,0x65,0x72,0x27,0x12,0x6e,0x64,0x75, -0x25,2,0x72,0x38,0x74,0x46,0x75,0x26,0x15,0x70,0x72,0x69,0x67,0x68,0x74,0x27, -0x20,0x15,0x6f,0x74,0x61,0x74,0x65,0x64,0x21,1,0x72,0x24,0x75,0x25,0x22,0x18, -0x61,0x6e,0x73,0x66,0x6f,0x72,0x6d,0x65,0x64,1,0x72,0x32,0x75,0x15,0x70,0x72, -0x69,0x67,0x68,0x74,0x25,0x15,0x6f,0x74,0x61,0x74,0x65,0x64,0x23,0xd,0x6e,0xc1, -0x86,0x73,0xa8,0x73,0x4c,0x74,0xa2,0x76,0x75,0xa2,0x83,0x7a,0xd8,0x70,0,2, -0x6c,0xd9,0x20,0,0x70,0xd9,0x40,0,0x73,0xc3,0,0xfe,0xf,0,0,0, -7,0x6f,0x3c,0x6f,0xff,8,0,0,0,0x70,0x3a,0x75,0x6e,0x79,0x13,0x6d, -0x62,0x6f,0x6c,0xff,0xf,0,0,0,0x11,0x61,0x63,1,0x65,0x34,0x69,0x15, -0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa5,0,0x18,0x73,0x65,0x70,0x61,0x72,0x61,0x74, -0x6f,0x72,0xc3,0,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0xe1,0,0,0x63, -0xff,2,0,0,0,0x65,0x38,0x6b,0xff,4,0,0,0,0x6d,0xff,1, -0,0,0,0x16,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xd9,0x70,0,0x1d,0x69, -0x74,0x6c,0x65,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x31,1,0x6e, -0x40,0x70,0x1c,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72, -0x25,0x17,0x61,0x73,0x73,0x69,0x67,0x6e,0x65,0x64,0x23,0x6e,0xa2,0x69,0x6f,0xa2, -0x89,0x70,0xfe,0x30,0xf8,0,0,9,0x69,0x33,0x69,0xff,0x10,0,0,0, -0x6f,0xfd,0x80,0,0,0x72,0x54,0x73,0xf9,0,0,0x75,0x12,0x6e,0x63,0x74, -0xfe,0x30,0xf8,0,0,0x15,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff,0x30,0xf8,0, -0,0x17,0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0xdd,0,0,0x61,0x48,0x63, -0xfd,0x40,0,0,0x64,0xe9,0,0,0x65,0xfd,0x20,0,0,0x66,0xff,0x20, -0,0,0,0x1f,0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72, -0x61,0x74,0x6f,0x72,0xd9,0x40,0,0xbe,0,3,0x64,0xa7,0,0x6c,0xab,0, -0x6f,0x30,0x75,0x13,0x6d,0x62,0x65,0x72,0xbf,0,0xb2,0,0x1b,0x6e,0x73,0x70, -0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa1,1,0x70,0x92,0x74,0x12,0x68, -0x65,0x72,0xe6,0x80,1,3,0x6c,0x40,0x6e,0x4a,0x70,0x56,0x73,0x14,0x79,0x6d, -0x62,0x6f,0x6c,0xff,8,0,0,0,0x14,0x65,0x74,0x74,0x65,0x72,0x61,0x14, -0x75,0x6d,0x62,0x65,0x72,0xb3,0,0x19,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69, -0x6f,0x6e,0xfd,0x80,0,0,0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75,0x61, -0x74,0x69,0x6f,0x6e,0xf9,0,0,0x66,0xc0,0xc4,0x66,0xa2,0x47,0x69,0xa2,0x64, -0x6c,0xa2,0x79,0x6d,0xa4,0xc0,4,0x61,0x6c,0x63,0xa5,0,0x65,0xa3,0x80,0x6e, -0xa1,0x6f,0x15,0x64,0x69,0x66,0x69,0x65,0x72,1,0x6c,0x38,0x73,0x14,0x79,0x6d, -0x62,0x6f,0x6c,0xff,4,0,0,0,0x14,0x65,0x74,0x74,0x65,0x72,0x41,1, -0x72,0x3c,0x74,0x16,0x68,0x73,0x79,0x6d,0x62,0x6f,0x6c,0xff,1,0,0,0, -0x10,0x6b,0xa5,0xc0,1,0x69,0x32,0x6f,0x13,0x72,0x6d,0x61,0x74,0xdb,0,0, -0x1d,0x6e,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff, -0x20,0,0,0,0x10,0x6e,0x1f,0x69,0x74,0x69,0x61,0x6c,0x70,0x75,0x6e,0x63, -0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff,0x10,0,0,0,0x9c,7,0x6d,0x18, -0x6d,0x41,0x6f,0x28,0x74,0x31,0x75,0x25,0x60,0x1c,0x77,0x65,0x72,0x63,0x61,0x73, -0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x29,0x63,0x3d,0x65,0x28,0x69,0x42,0x6c,0x29, -0x13,0x74,0x74,0x65,0x72,0x9c,0x15,0x6e,0x75,0x6d,0x62,0x65,0x72,0xab,0,0x1a, -0x6e,0x65,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xd9,0x20,0,0x63,0x46, -0x64,0xa2,0x96,0x65,0x1b,0x6e,0x63,0x6c,0x6f,0x73,0x69,0x6e,0x67,0x6d,0x61,0x72, -0x6b,0xa3,0x80,0xe6,0x80,1,7,0x6e,0x57,0x6e,0x52,0x6f,0x5e,0x73,0xe1,0, -0,0x75,0x1b,0x72,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f,0x6c,0xff, -2,0,0,0,0x22,0x12,0x74,0x72,0x6c,0xd9,0x80,0,0xdc,0,0,1, -0x6d,0x62,0x6e,1,0x6e,0x30,0x74,0x12,0x72,0x6f,0x6c,0xd9,0x80,0,0x1f,0x65, -0x63,0x74,0x6f,0x72,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xfd, -0x40,0,0,0x19,0x62,0x69,0x6e,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa5,0xc0, -0x61,0x58,0x63,0xd9,0x80,0,0x66,0xdb,0,0,0x6c,0x1d,0x6f,0x73,0x65,0x70, -0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xfd,0x20,0,0,0x18,0x73, -0x65,0x64,0x6c,0x65,0x74,0x74,0x65,0x72,0x3d,2,0x61,0x32,0x65,0x50,0x69,0x12, -0x67,0x69,0x74,0xa7,0,0x1c,0x73,0x68,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, -0x69,0x6f,0x6e,0xe9,0,0,0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e,0x75,0x6d,0x62, -0x65,0x72,0xa7,0 +0x61,0x6b,0xc3,8,2,0x64,0x4a,0x6e,0xa2,0x91,0x73,1,0x63,0xd9,0x40,3, +0x6f,0x16,0x63,0x6f,0x6d,0x6d,0x65,0x6e,0x74,0xd9,0x40,3,2,0x63,0xa2,0x44, +0x65,0xa2,0x6c,0x73,0x40,2,0x62,0x48,0x74,0x64,0x75,0xa2,0x48,0x1b,0x6e,0x61, +0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0xa3,0x48,0x44,0x1c,0x69,0x6e, +0x61,0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x45,0x46,1,0x61,0x40, +0x72,0x1c,0x69,0x6e,0x61,0x72,0x79,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x47, +0x11,0x72,0x74,0x41,0x3e,0x10,0x6f,1,0x6d,0x30,0x6e,0x14,0x74,0x69,0x6e,0x75, +0x65,0x3f,0x16,0x70,0x61,0x74,0x6d,0x61,0x74,0x68,1,0x63,0x30,0x73,0x13,0x74, +0x61,0x72,0x74,0xa3,0x49,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0xa3,0x4a,0x10, +0x6f,0x42,0x16,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x43,2,0x64,0x2e,0x70,0x86, +0x73,0x10,0x63,0xc3,0x17,0x11,0x69,0x63,1,0x70,0x46,0x73,0x1e,0x79,0x6c,0x6c, +0x61,0x62,0x69,0x63,0x63,0x61,0x74,0x65,0x67,0x6f,0x72,0x79,0xc3,0x17,0x10,0x6f, +0x1f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x63,0x61,0x74,0x65,0x67,0x6f,0x72, +0x79,0xc3,0x16,0x10,0x63,0xc3,0x16,2,0x67,0xc3,6,0x6f,0x26,0x74,0xc3,7, +0x11,0x69,0x6e,1,0x63,0x4a,0x69,0x11,0x6e,0x67,1,0x67,0x2e,0x74,0x12,0x79, +0x70,0x65,0xc3,7,0x13,0x72,0x6f,0x75,0x70,0xc3,6,0x48,0x15,0x6f,0x6e,0x74, +0x72,0x6f,0x6c,0x49,0x66,0x86,0x67,0xa2,0x4a,0x68,3,0x61,0x36,0x65,0x58,0x73, +0x68,0x79,0x13,0x70,0x68,0x65,0x6e,0x3d,0x1f,0x6e,0x67,0x75,0x6c,0x73,0x79,0x6c, +0x6c,0x61,0x62,0x6c,0x65,0x74,0x79,0x70,0x65,0xc3,0xb,0x10,0x78,0x3a,0x14,0x64, +0x69,0x67,0x69,0x74,0x3b,0x10,0x74,0xc3,0xb,0x16,0x75,0x6c,0x6c,0x63,0x6f,0x6d, +0x70,0x1f,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x65,0x78,0x63,0x6c,0x75,0x73,0x69, +0x6f,0x6e,0x33,2,0x63,0xa2,0x44,0x65,0xa2,0x4b,0x72,3,0x61,0x34,0x62,0x84, +0x65,0x8a,0x6c,0x12,0x69,0x6e,0x6b,0x39,0x11,0x70,0x68,0x7c,0x12,0x65,0x6d,0x65, +3,0x62,0x5e,0x63,0x30,0x65,0x48,0x6c,0x12,0x69,0x6e,0x6b,0x39,0x1a,0x6c,0x75, +0x73,0x74,0x65,0x72,0x62,0x72,0x65,0x61,0x6b,0xc3,0x12,0x14,0x78,0x74,0x65,0x6e, +0x64,0x37,0x12,0x61,0x73,0x65,0x35,0x11,0x78,0x74,0x37,0xc2,5,1,0x62,0xc3, +0x12,0x6d,0xd9,0x20,0,0x1c,0x6e,0x65,0x72,0x61,0x6c,0x63,0x61,0x74,0x65,0x67, +0x6f,0x72,0x79,0xc2,5,0x13,0x6d,0x61,0x73,0x6b,0xd9,0x20,0,0x61,0xa2,0xa2, +0x62,0xa2,0xd0,0x63,0xa4,0x4f,0x64,0xa6,0x1c,0x65,5,0x6d,0x75,0x6d,0x6e,0x70, +0xa2,0x6b,0x78,0x10,0x74,0x30,1,0x65,0x2c,0x70,0x12,0x69,0x63,0x74,0xa1,0x12, +0x6e,0x64,0x65,1,0x64,0x24,0x72,0x31,0x1b,0x70,0x69,0x63,0x74,0x6f,0x67,0x72, +0x61,0x70,0x68,0x69,0x63,0xa1,0x10,0x6f,1,0x64,0x97,0x6a,0x10,0x69,0x92,3, +0x63,0x44,0x6b,0x54,0x6d,0x70,0x70,0x1a,0x72,0x65,0x73,0x65,0x6e,0x74,0x61,0x74, +0x69,0x6f,0x6e,0x95,0x17,0x6f,0x6d,0x70,0x6f,0x6e,0x65,0x6e,0x74,0x9b,0x1c,0x65, +0x79,0x63,0x61,0x70,0x73,0x65,0x71,0x75,0x65,0x6e,0x63,0x65,0xa3,0x42,0x16,0x6f, +0x64,0x69,0x66,0x69,0x65,0x72,0x96,0x13,0x62,0x61,0x73,0x65,0x99,0x12,0x72,0x65, +0x73,0x95,0x61,0x30,0x62,0x4e,0x63,0x12,0x6f,0x6d,0x70,0x9b,0xc2,4,0x1b,0x73, +0x74,0x61,0x73,0x69,0x61,0x6e,0x77,0x69,0x64,0x74,0x68,0xc3,4,0x12,0x61,0x73, +0x65,0x99,3,0x67,0x44,0x68,0x4a,0x6c,0x4e,0x73,0x1a,0x63,0x69,0x69,0x68,0x65, +0x78,0x64,0x69,0x67,0x69,0x74,0x23,0x10,0x65,0xd9,0x40,0,0x11,0x65,0x78,0x23, +1,0x6e,0x38,0x70,0x11,0x68,0x61,0x20,0x14,0x62,0x65,0x74,0x69,0x63,0x21,0x11, +0x75,0x6d,0x79,5,0x6c,0x22,0x6c,0x36,0x6d,0x52,0x70,1,0x62,0xd9,0x40,0xd, +0x74,0xc3,0x15,2,0x61,0x32,0x6b,0xc3,1,0x6f,0x11,0x63,0x6b,0xc3,1,0x11, +0x6e,0x6b,0x7b,0x10,0x67,0xd9,0x40,1,0x61,0xa2,0x4f,0x63,0xc3,0,0x69,0x11, +0x64,0x69,2,0x63,0x54,0x6d,0x74,0x70,0x1b,0x61,0x69,0x72,0x65,0x64,0x62,0x72, +0x61,0x63,0x6b,0x65,0x74,0xd8,0x40,0xd,0x13,0x74,0x79,0x70,0x65,0xc3,0x15,0x24, +1,0x6c,0x30,0x6f,0x14,0x6e,0x74,0x72,0x6f,0x6c,0x25,0x12,0x61,0x73,0x73,0xc3, +0,0x26,0x14,0x69,0x72,0x72,0x6f,0x72,1,0x65,0x38,0x69,0x16,0x6e,0x67,0x67, +0x6c,0x79,0x70,0x68,0xd9,0x40,1,0x10,0x64,0x27,0x17,0x73,0x69,0x63,0x65,0x6d, +0x6f,0x6a,0x69,0xa3,0x41,6,0x68,0x7c,0x68,0x54,0x69,0x85,0x6f,0xa2,0x6f,0x77, +4,0x63,0x30,0x6b,0x36,0x6c,0x87,0x74,0x8b,0x75,0x89,1,0x66,0x8d,0x6d,0x8f, +0x11,0x63,0x66,0x91,0x18,0x61,0x6e,0x67,0x65,0x73,0x77,0x68,0x65,0x6e,4,0x63, +0x44,0x6c,0x6c,0x6e,0x7e,0x74,0x98,0x75,0x18,0x70,0x70,0x65,0x72,0x63,0x61,0x73, +0x65,0x64,0x89,0x12,0x61,0x73,0x65,1,0x66,0x30,0x6d,0x14,0x61,0x70,0x70,0x65, +0x64,0x8f,0x14,0x6f,0x6c,0x64,0x65,0x64,0x8d,0x18,0x6f,0x77,0x65,0x72,0x63,0x61, +0x73,0x65,0x64,0x87,0x1c,0x66,0x6b,0x63,0x63,0x61,0x73,0x65,0x66,0x6f,0x6c,0x64, +0x65,0x64,0x91,0x18,0x69,0x74,0x6c,0x65,0x63,0x61,0x73,0x65,0x64,0x8b,0x13,0x6d, +0x70,0x65,0x78,0x33,0x61,0x2e,0x63,0xa2,0x48,0x66,0xd9,0x40,2,1,0x6e,0x72, +0x73,0x10,0x65,3,0x64,0x83,0x66,0x3a,0x69,0x4a,0x73,0x17,0x65,0x6e,0x73,0x69, +0x74,0x69,0x76,0x65,0x65,0x15,0x6f,0x6c,0x64,0x69,0x6e,0x67,0xd9,0x40,2,0x17, +0x67,0x6e,0x6f,0x72,0x61,0x62,0x6c,0x65,0x85,0x13,0x6f,0x6e,0x69,0x63,0x1f,0x61, +0x6c,0x63,0x6f,0x6d,0x62,0x69,0x6e,0x69,0x6e,0x67,0x63,0x6c,0x61,0x73,0x73,0xc3, +2,0x10,0x63,0xc3,2,3,0x61,0x30,0x65,0x34,0x69,0xa2,0x41,0x74,0xc3,3, +0x11,0x73,0x68,0x29,2,0x63,0x3a,0x66,0x58,0x70,0x2c,0x16,0x72,0x65,0x63,0x61, +0x74,0x65,0x64,0x2d,0x1d,0x6f,0x6d,0x70,0x6f,0x73,0x69,0x74,0x69,0x6f,0x6e,0x74, +0x79,0x70,0x65,0xc3,3,0x15,0x61,0x75,0x6c,0x74,0x69,0x67,0x1f,0x6e,0x6f,0x72, +0x61,0x62,0x6c,0x65,0x63,0x6f,0x64,0x65,0x70,0x6f,0x69,0x6e,0x74,0x2b,0x2a,0x10, +0x61,0x2e,0x15,0x63,0x72,0x69,0x74,0x69,0x63,0x2f,3,0x66,0x34,0x6e,0x3e,0x74, +0x42,0x79,0x22,0x11,0x65,0x73,0x23,0x20,0x13,0x61,0x6c,0x73,0x65,0x21,0x20,0x10, +0x6f,0x21,0x22,0x12,0x72,0x75,0x65,0x23,0xb,0x6b,0x5b,0x6f,0x23,0x6f,0x3c,0x72, +0x4c,0x76,1,0x69,0x24,0x72,0x33,0x13,0x72,0x61,0x6d,0x61,0x33,0x10,0x76,0x22, +0x14,0x65,0x72,0x6c,0x61,0x79,0x23,0xa2,0xe2,0x13,0x69,0x67,0x68,0x74,0xa3,0xe2, +0x6b,0x58,0x6c,0x74,0x6e,3,0x6b,0x2f,0x6f,0x30,0x72,0x21,0x75,0x12,0x6b,0x74, +0x61,0x2f,0x19,0x74,0x72,0x65,0x6f,0x72,0x64,0x65,0x72,0x65,0x64,0x21,1,0x61, +0x24,0x76,0x31,0x18,0x6e,0x61,0x76,0x6f,0x69,0x63,0x69,0x6e,0x67,0x31,0xa2,0xe0, +0x12,0x65,0x66,0x74,0xa3,0xe0,0x64,0x45,0x64,0x4e,0x68,0x88,0x69,1,0x6f,0x26, +0x73,0xa3,0xf0,0x1a,0x74,0x61,0x73,0x75,0x62,0x73,0x63,0x72,0x69,0x70,0x74,0xa3, +0xf0,2,0x61,0xa3,0xea,0x62,0xa3,0xe9,0x6f,0x13,0x75,0x62,0x6c,0x65,1,0x61, +0x30,0x62,0x13,0x65,0x6c,0x6f,0x77,0xa3,0xe9,0x13,0x62,0x6f,0x76,0x65,0xa3,0xea, +0x12,0x61,0x6e,0x72,0x2c,0x15,0x65,0x61,0x64,0x69,0x6e,0x67,0x2d,0x61,0xa2,0x7b, +0x62,0xa2,0xd4,0x63,0x11,0x63,0x63,4,0x31,0x3c,0x32,0xa2,0x42,0x33,0xa2,0x56, +0x38,0xa2,0x64,0x39,0x10,0x31,0xa3,0x5b,9,0x35,0xa,0x35,0x3f,0x36,0x41,0x37, +0x43,0x38,0x45,0x39,0x47,0x30,0x30,0x31,0x3c,0x32,0x42,0x33,0x4e,0x34,0x3d,0x34, +1,0x33,0xa3,0x67,0x37,0xa3,0x6b,0x36,0x10,0x38,0xa3,0x76,0x38,1,0x32,0xa3, +0x7a,0x39,0xa3,0x81,0x3a,2,0x30,0xa3,0x82,0x32,0xa3,0x84,0x33,0xa3,0x85,9, +0x35,0xa,0x35,0x53,0x36,0x55,0x37,0x57,0x38,0x59,0x39,0x5b,0x30,0x49,0x31,0x4b, +0x32,0x4d,0x33,0x4f,0x34,0x51,6,0x33,8,0x33,0x63,0x34,0x65,0x35,0x67,0x36, +0x69,0x30,0x5d,0x31,0x5f,0x32,0x61,0x10,0x34,0xa3,0x54,0xa2,0xe6,3,0x62,0xa0, +0x6c,0xa3,0xe4,0x72,0xa3,0xe8,0x74,2,0x61,0x74,0x62,0x7c,0x74,0x14,0x61,0x63, +0x68,0x65,0x64,1,0x61,0x3e,0x62,0x13,0x65,0x6c,0x6f,0x77,0xa2,0xca,0x13,0x6c, +0x65,0x66,0x74,0xa3,0xc8,0x13,0x62,0x6f,0x76,0x65,0xa2,0xd6,0x14,0x72,0x69,0x67, +0x68,0x74,0xa3,0xd8,0xa2,0xd6,0x10,0x72,0xa3,0xd8,0xa2,0xca,0x10,0x6c,0xa3,0xc8, +0x12,0x6f,0x76,0x65,0xa2,0xe6,1,0x6c,0x30,0x72,0x13,0x69,0x67,0x68,0x74,0xa3, +0xe8,0x12,0x65,0x66,0x74,0xa3,0xe4,0xa2,0xdc,2,0x65,0x2c,0x6c,0xa3,0xda,0x72, +0xa3,0xde,0x12,0x6c,0x6f,0x77,0xa2,0xdc,1,0x6c,0x30,0x72,0x13,0x69,0x67,0x68, +0x74,0xa3,0xde,0x12,0x65,0x66,0x74,0xa3,0xda,0xb,0x6e,0xc0,0xca,0x72,0x5f,0x72, +0x46,0x73,0xa2,0x48,0x77,1,0x68,0x24,0x73,0x33,0x17,0x69,0x74,0x65,0x73,0x70, +0x61,0x63,0x65,0x33,0x22,1,0x69,0x30,0x6c,2,0x65,0x3d,0x69,0x4b,0x6f,0x3f, +0x18,0x67,0x68,0x74,0x74,0x6f,0x6c,0x65,0x66,0x74,0x22,2,0x65,0x38,0x69,0x48, +0x6f,0x16,0x76,0x65,0x72,0x72,0x69,0x64,0x65,0x3f,0x17,0x6d,0x62,0x65,0x64,0x64, +0x69,0x6e,0x67,0x3d,0x15,0x73,0x6f,0x6c,0x61,0x74,0x65,0x4b,0x30,0x1e,0x65,0x67, +0x6d,0x65,0x6e,0x74,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x31,0x6e,0xa2, +0x41,0x6f,0xa2,0x53,0x70,2,0x61,0x66,0x64,0x86,0x6f,0x1b,0x70,0x64,0x69,0x72, +0x65,0x63,0x74,0x69,0x6f,0x6e,0x61,0x6c,1,0x66,0x32,0x69,0x15,0x73,0x6f,0x6c, +0x61,0x74,0x65,0x4d,0x14,0x6f,0x72,0x6d,0x61,0x74,0x41,0x1f,0x72,0x61,0x67,0x72, +0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x2f,1,0x66,0x41, +0x69,0x4d,1,0x6f,0x28,0x73,0x10,0x6d,0x43,0x1b,0x6e,0x73,0x70,0x61,0x63,0x69, +0x6e,0x67,0x6d,0x61,0x72,0x6b,0x43,1,0x6e,0x35,0x74,0x19,0x68,0x65,0x72,0x6e, +0x65,0x75,0x74,0x72,0x61,0x6c,0x35,0x65,0x88,0x65,0x98,0x66,0xa2,0x6a,0x6c,0x20, +1,0x65,0x30,0x72,2,0x65,0x37,0x69,0x49,0x6f,0x39,0x18,0x66,0x74,0x74,0x6f, +0x72,0x69,0x67,0x68,0x74,0x20,2,0x65,0x38,0x69,0x48,0x6f,0x16,0x76,0x65,0x72, +0x72,0x69,0x64,0x65,0x39,0x17,0x6d,0x62,0x65,0x64,0x64,0x69,0x6e,0x67,0x37,0x15, +0x73,0x6f,0x6c,0x61,0x74,0x65,0x49,3,0x6e,0x25,0x73,0x27,0x74,0x29,0x75,0x15, +0x72,0x6f,0x70,0x65,0x61,0x6e,2,0x6e,0x3c,0x73,0x46,0x74,0x18,0x65,0x72,0x6d, +0x69,0x6e,0x61,0x74,0x6f,0x72,0x29,0x14,0x75,0x6d,0x62,0x65,0x72,0x25,0x17,0x65, +0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x27,1,0x69,0x28,0x73,0x10,0x69,0x47,0x1f, +0x72,0x73,0x74,0x73,0x74,0x72,0x6f,0x6e,0x67,0x69,0x73,0x6f,0x6c,0x61,0x74,0x65, +0x47,0x61,0x4e,0x62,0x84,0x63,1,0x6f,0x24,0x73,0x2d,0x1c,0x6d,0x6d,0x6f,0x6e, +0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0x2d,2,0x6c,0x3b,0x6e,0x2b,0x72, +0x13,0x61,0x62,0x69,0x63,1,0x6c,0x30,0x6e,0x14,0x75,0x6d,0x62,0x65,0x72,0x2b, +0x14,0x65,0x74,0x74,0x65,0x72,0x3b,0x2e,1,0x6e,0x45,0x6f,0x1c,0x75,0x6e,0x64, +0x61,0x72,0x79,0x6e,0x65,0x75,0x74,0x72,0x61,0x6c,0x45,0,0x16,0x6d,0xc9,0x20, +0x74,0xc2,0x30,0x77,0x89,0x77,0x86,0x79,0xa2,0x46,0x7a,1,0x61,0x58,0x6e,0x1a, +0x61,0x6d,0x65,0x6e,0x6e,0x79,0x6d,0x75,0x73,0x69,0x63,0xa4,0x40,0x19,0x61,0x6c, +0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0xa5,0x40,0x1c,0x6e,0x61,0x62,0x61,0x7a, +0x61,0x72,0x73,0x71,0x75,0x61,0x72,0x65,0xa5,0x18,0x10,0x61,1,0x6e,0x36,0x72, +0x16,0x61,0x6e,0x67,0x63,0x69,0x74,0x69,0xa3,0xfc,0x12,0x63,0x68,0x6f,0xa5,0x2c, +1,0x65,0x88,0x69,2,0x6a,0x3c,0x72,0x68,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62, +0x6c,0x65,0x73,0xa3,0x48,0x12,0x69,0x6e,0x67,0xa2,0x74,0x1e,0x68,0x65,0x78,0x61, +0x67,0x72,0x61,0x6d,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x74,0x16,0x61,0x64, +0x69,0x63,0x61,0x6c,0x73,0xa3,0x49,0x13,0x7a,0x69,0x64,0x69,0xa5,0x34,0x74,0xa2, +0x65,0x75,0xa4,0x4f,0x76,3,0x61,0x3c,0x65,0x80,0x69,0xa2,0x50,0x73,0xa2,0x6c, +0x12,0x73,0x75,0x70,0xa3,0x7d,1,0x69,0xa3,0x9f,0x72,0x1e,0x69,0x61,0x74,0x69, +0x6f,0x6e,0x73,0x65,0x6c,0x65,0x63,0x74,0x6f,0x72,0x73,0xa2,0x6c,0x19,0x73,0x75, +0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x7d,1,0x64,0x3c,0x72,0x19,0x74, +0x69,0x63,0x61,0x6c,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x91,0x14,0x69,0x63,0x65,0x78, +0x74,0xa2,0xaf,0x16,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa3,0xaf,0x15,0x74,0x68, +0x6b,0x75,0x71,0x69,0xa5,0x3f,5,0x69,0x3f,0x69,0x5a,0x6f,0x8c,0x72,0x1c,0x61, +0x6e,0x73,0x70,0x6f,0x72,0x74,0x61,0x6e,0x64,0x6d,0x61,0x70,0xa2,0xcf,0x16,0x73, +0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xcf,2,0x62,0x34,0x66,0x3c,0x72,0x13,0x68, +0x75,0x74,0x61,0xa3,0xfb,0x13,0x65,0x74,0x61,0x6e,0x57,0x14,0x69,0x6e,0x61,0x67, +0x68,0xa3,0x90,0x11,0x74,0x6f,0xa5,0x3d,0x61,0x3e,0x65,0xa2,0xa0,0x68,0x10,0x61, +1,0x61,0x24,0x69,0x53,0x11,0x6e,0x61,0x3d,4,0x67,0x8e,0x69,0xa2,0x49,0x6b, +0xa2,0x72,0x6d,0xa2,0x74,0x6e,0x10,0x67,1,0x73,0x68,0x75,0x10,0x74,0xa4,0x10, +1,0x63,0x40,0x73,0x11,0x75,0x70,0xa4,0x33,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e, +0x74,0xa5,0x33,0x18,0x6f,0x6d,0x70,0x6f,0x6e,0x65,0x6e,0x74,0x73,0xa5,0x11,0x10, +0x61,0xa5,0x3c,2,0x61,0x2a,0x62,0x32,0x73,0xa3,0x60,0x12,0x6c,0x6f,0x67,0xa3, +0x62,0x13,0x61,0x6e,0x77,0x61,0xa3,0x65,3,0x6c,0x52,0x74,0x56,0x76,0x5e,0x78, +0x16,0x75,0x61,0x6e,0x6a,0x69,0x6e,0x67,0xa2,0x7c,0x16,0x73,0x79,0x6d,0x62,0x6f, +0x6c,0x73,0xa3,0x7c,0x10,0x65,0xa3,0x70,0x12,0x68,0x61,0x6d,0xa3,0xae,0x12,0x69, +0x65,0x74,0xa3,0xb7,0x11,0x72,0x69,0xa3,0xdc,0x11,0x69,0x6c,0x48,0x12,0x73,0x75, +0x70,0xa4,0x2b,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0x2b,0x13,0x6c,0x75, +0x67,0x75,0x4b,2,0x63,0x8c,0x67,0xa2,0x41,0x6e,0x1f,0x69,0x66,0x69,0x65,0x64, +0x63,0x61,0x6e,0x61,0x64,0x69,0x61,0x6e,0x61,0x62,0x6f,0x1f,0x72,0x69,0x67,0x69, +0x6e,0x61,0x6c,0x73,0x79,0x6c,0x6c,0x61,0x62,0x69,0x63,0x73,0x62,0x17,0x65,0x78, +0x74,0x65,0x6e,0x64,0x65,0x64,0xa2,0xad,0x10,0x61,0xa5,0x3e,0x11,0x61,0x73,0x62, +0x12,0x65,0x78,0x74,0xa2,0xad,0x10,0x61,0xa5,0x3e,0x15,0x61,0x72,0x69,0x74,0x69, +0x63,0xa3,0x78,0x70,0xc3,0x4b,0x70,0xa6,0x61,0x72,0xa8,0x1d,0x73,7,0x6f,0xc1, +0xbe,0x6f,0xa2,0x69,0x70,0xa2,0x85,0x75,0xa2,0xa4,0x79,2,0x6c,0x50,0x6d,0x62, +0x72,0x12,0x69,0x61,0x63,0x3a,0x12,0x73,0x75,0x70,0xa4,0x17,0x16,0x70,0x6c,0x65, +0x6d,0x65,0x6e,0x74,0xa5,0x17,0x17,0x6f,0x74,0x69,0x6e,0x61,0x67,0x72,0x69,0xa3, +0x8f,0x13,0x62,0x6f,0x6c,0x73,1,0x61,0x4c,0x66,0x10,0x6f,0x1f,0x72,0x6c,0x65, +0x67,0x61,0x63,0x79,0x63,0x6f,0x6d,0x70,0x75,0x74,0x69,0x6e,0x67,0xa5,0x32,0x1f, +0x6e,0x64,0x70,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x78,0x74, +1,0x61,0xa5,0x2a,0x65,0x14,0x6e,0x64,0x65,0x64,0x61,0xa5,0x2a,2,0x67,0x34, +0x72,0x3e,0x79,0x13,0x6f,0x6d,0x62,0x6f,0xa5,0x16,0x13,0x64,0x69,0x61,0x6e,0xa5, +0x23,0x17,0x61,0x73,0x6f,0x6d,0x70,0x65,0x6e,0x67,0xa3,0xda,1,0x61,0x32,0x65, +0x14,0x63,0x69,0x61,0x6c,0x73,0xa3,0x56,0x12,0x63,0x69,0x6e,0x1f,0x67,0x6d,0x6f, +0x64,0x69,0x66,0x69,0x65,0x72,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x2d,2,0x6e, +0x48,0x70,0x76,0x74,0x1d,0x74,0x6f,0x6e,0x73,0x69,0x67,0x6e,0x77,0x72,0x69,0x74, +0x69,0x6e,0x67,0xa5,6,0x15,0x64,0x61,0x6e,0x65,0x73,0x65,0xa2,0x9b,0x12,0x73, +0x75,0x70,0xa2,0xdb,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xdb,4,0x61, +0xa2,0xa8,0x65,0x5c,0x6d,0x9e,0x70,0xa2,0x4b,0x73,0x13,0x79,0x6d,0x62,0x6f,0x1f, +0x6c,0x73,0x61,0x6e,0x64,0x70,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73, +0xa5,5,0x10,0x72,1,0x61,0x4e,0x73,0x12,0x63,0x72,0x69,0x1f,0x70,0x74,0x73, +0x61,0x6e,0x64,0x73,0x75,0x62,0x73,0x63,0x72,0x69,0x70,0x74,0x73,0x73,0x14,0x6e, +0x64,0x73,0x75,0x62,0x73,0x1b,0x61,0x74,0x68,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f, +0x72,0x73,0xa3,0x6a,1,0x6c,0x40,0x75,1,0x61,0x6e,0x6e,0x17,0x63,0x74,0x75, +0x61,0x74,0x69,0x6f,0x6e,0xa3,0x8e,0x15,0x65,0x6d,0x65,0x6e,0x74,0x61,1,0x6c, +0x50,0x72,0x1e,0x79,0x70,0x72,0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0x61,0x72, +0x65,0x61,1,0x61,0xa3,0x6d,0x62,0xa3,0x6e,3,0x61,0x5c,0x6d,0x78,0x70,0xa2, +0x41,0x73,0x13,0x79,0x6d,0x62,0x6f,0x1f,0x6c,0x73,0x61,0x6e,0x64,0x70,0x69,0x63, +0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa5,5,0x14,0x72,0x72,0x6f,0x77,0x73, +2,0x61,0xa3,0x67,0x62,0xa3,0x68,0x63,0xa3,0xfa,0x13,0x61,0x74,0x68,0x65,0x1f, +0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,0x73, +0xa3,0x6a,0x19,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x8e,0x61, +0x88,0x68,0xa2,0x48,0x69,0xa2,0x71,0x6d,0x12,0x61,0x6c,0x6c,1,0x66,0x46,0x6b, +0x15,0x61,0x6e,0x61,0x65,0x78,0x74,0xa4,0x29,0x15,0x65,0x6e,0x73,0x69,0x6f,0x6e, +0xa5,0x29,0x12,0x6f,0x72,0x6d,1,0x73,0xa3,0x54,0x76,0x16,0x61,0x72,0x69,0x61, +0x6e,0x74,0x73,0xa3,0x54,1,0x6d,0x36,0x75,0x16,0x72,0x61,0x73,0x68,0x74,0x72, +0x61,0xa3,0xa1,0x15,0x61,0x72,0x69,0x74,0x61,0x6e,0xa3,0xac,1,0x61,0x52,0x6f, +0x13,0x72,0x74,0x68,0x61,0x1f,0x6e,0x64,0x66,0x6f,0x72,0x6d,0x61,0x74,0x63,0x6f, +0x6e,0x74,0x72,0x6f,0x6c,0x73,0xa3,0xf7,1,0x72,0x2e,0x76,0x12,0x69,0x61,0x6e, +0xa3,0x79,0x12,0x61,0x64,0x61,0xa3,0xd9,1,0x64,0x50,0x6e,0x13,0x68,0x61,0x6c, +0x61,0x50,0x1d,0x61,0x72,0x63,0x68,0x61,0x69,0x63,0x6e,0x75,0x6d,0x62,0x65,0x72, +0x73,0xa3,0xf9,0x13,0x64,0x68,0x61,0x6d,0xa3,0xf8,5,0x72,0x35,0x72,0x44,0x73, +0x64,0x75,1,0x61,0xa3,0x4e,0x6e,0x17,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e, +0x71,0x17,0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0xa2,0x4e,0x13,0x61,0x72,0x65, +0x61,0xa3,0x4e,0x1b,0x61,0x6c,0x74,0x65,0x72,0x70,0x61,0x68,0x6c,0x61,0x76,0x69, +0xa3,0xf6,0x61,0x40,0x68,0x82,0x6c,0x19,0x61,0x79,0x69,0x6e,0x67,0x63,0x61,0x72, +0x64,0x73,0xa3,0xcc,2,0x68,0x38,0x6c,0x4a,0x75,0x15,0x63,0x69,0x6e,0x68,0x61, +0x75,0xa3,0xf5,0x17,0x61,0x77,0x68,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0xf3,0x15,0x6d, +0x79,0x72,0x65,0x6e,0x65,0xa3,0xf4,1,0x61,0x8e,0x6f,1,0x65,0x74,0x6e,0x16, +0x65,0x74,0x69,0x63,0x65,0x78,0x74,0xa2,0x72,1,0x65,0x2c,0x73,0x11,0x75,0x70, +0xa3,0x8d,0x15,0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa2,0x72,0x19,0x73,0x75,0x70,0x70, +0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x8d,0x15,0x6e,0x69,0x63,0x69,0x61,0x6e,0xa3, +0x97,1,0x67,0x3e,0x69,0x13,0x73,0x74,0x6f,0x73,0xa2,0xa6,0x13,0x64,0x69,0x73, +0x63,0xa3,0xa6,0x12,0x73,0x70,0x61,0xa3,0x96,1,0x65,0x5c,0x75,1,0x6d,0x2a, +0x6e,0x11,0x69,0x63,0x67,0x10,0x69,0xa2,0xc0,0x1d,0x6e,0x75,0x6d,0x65,0x72,0x61, +0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xc0,0x13,0x6a,0x61,0x6e,0x67,0xa3, +0xa3,0x6d,0xa2,0xf0,0x6e,0xa8,0x23,0x6f,6,0x70,0x63,0x70,0x56,0x72,0x8a,0x73, +0xa2,0x4c,0x74,0x10,0x74,0x1f,0x6f,0x6d,0x61,0x6e,0x73,0x69,0x79,0x61,0x71,0x6e, +0x75,0x6d,0x62,0x65,0x72,0x73,0xa5,0x28,0x18,0x74,0x69,0x63,0x61,0x6c,0x63,0x68, +0x61,0x72,0x1f,0x61,0x63,0x74,0x65,0x72,0x72,0x65,0x63,0x6f,0x67,0x6e,0x69,0x74, +0x69,0x6f,0x6e,0x85,1,0x69,0x46,0x6e,0x1e,0x61,0x6d,0x65,0x6e,0x74,0x61,0x6c, +0x64,0x69,0x6e,0x67,0x62,0x61,0x74,0x73,0xa3,0xf2,0x11,0x79,0x61,0x47,1,0x61, +0x30,0x6d,0x13,0x61,0x6e,0x79,0x61,0xa3,0x7a,0x11,0x67,0x65,0xa5,0xf,0x63,0xa2, +0x7b,0x67,0xa2,0x7b,0x6c,1,0x63,0xa2,0x6c,0x64,6,0x70,0x42,0x70,0x3a,0x73, +0x5a,0x74,0x88,0x75,0x14,0x79,0x67,0x68,0x75,0x72,0xa5,0x3b,0x11,0x65,0x72,1, +0x6d,0x2e,0x73,0x12,0x69,0x61,0x6e,0xa3,0x8c,0x11,0x69,0x63,0xa3,0xf1,0x10,0x6f, +1,0x67,0x3a,0x75,0x18,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e,0xa3,0xbb, +0x13,0x64,0x69,0x61,0x6e,0xa5,0x22,0x14,0x75,0x72,0x6b,0x69,0x63,0xa3,0xbf,0x68, +0x42,0x69,0x54,0x6e,0x1a,0x6f,0x72,0x74,0x68,0x61,0x72,0x61,0x62,0x69,0x61,0x6e, +0xa3,0xf0,0x17,0x75,0x6e,0x67,0x61,0x72,0x69,0x61,0x6e,0xa5,4,0x14,0x74,0x61, +0x6c,0x69,0x63,0xa3,0x58,0x13,0x68,0x69,0x6b,0x69,0xa3,0x9d,0x10,0x72,0x85,0x12, +0x68,0x61,0x6d,0x65,6,0x6f,0x86,0x6f,0x6c,0x72,0xa2,0x61,0x75,0xa2,0x62,0x79, +0x14,0x61,0x6e,0x6d,0x61,0x72,0x58,0x12,0x65,0x78,0x74,2,0x61,0xa3,0xb6,0x62, +0xa3,0xee,0x65,0x13,0x6e,0x64,0x65,0x64,1,0x61,0xa3,0xb6,0x62,0xa3,0xee,1, +0x64,0x52,0x6e,0x15,0x67,0x6f,0x6c,0x69,0x61,0x6e,0x6a,0x12,0x73,0x75,0x70,0xa4, +0xd,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa5,0xd,0x10,0x69,0xa2,0xec,0x13, +0x66,0x69,0x65,0x72,1,0x6c,0x3c,0x74,0x19,0x6f,0x6e,0x65,0x6c,0x65,0x74,0x74, +0x65,0x72,0x73,0xa3,0x8a,0x15,0x65,0x74,0x74,0x65,0x72,0x73,0x2d,0x10,0x6f,0xa3, +0xed,1,0x6c,0x44,0x73,0x11,0x69,0x63,0xa2,0x5c,0x18,0x61,0x6c,0x73,0x79,0x6d, +0x62,0x6f,0x6c,0x73,0xa3,0x5c,0x13,0x74,0x61,0x6e,0x69,0xa5,3,0x61,0xa2,0x9b, +0x65,0xa4,0x4c,0x69,1,0x61,0xa2,0x8f,0x73,0x10,0x63,5,0x70,0x18,0x70,0xa2, +0x71,0x73,0x36,0x74,0x17,0x65,0x63,0x68,0x6e,0x69,0x63,0x61,0x6c,0x81,0x15,0x79, +0x6d,0x62,0x6f,0x6c,0x73,0x8f,0x61,0xa2,0x66,0x65,0x46,0x6d,0x19,0x61,0x74,0x68, +0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,1,0x61,0xa3,0x66,0x62,0xa3,0x69,0x17,0x6c, +0x6c,0x61,0x6e,0x65,0x6f,0x75,0x73,2,0x6d,0x3a,0x73,0x6c,0x74,0x17,0x65,0x63, +0x68,0x6e,0x69,0x63,0x61,0x6c,0x81,0x11,0x61,0x74,0x1f,0x68,0x65,0x6d,0x61,0x74, +0x69,0x63,0x61,0x6c,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,1,0x61,0xa3,0x66,0x62, +0xa3,0x69,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0x8e,0x12,0x61,0x6e,0x64,1,0x61, +0x3c,0x70,0x19,0x69,0x63,0x74,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa3,0xcd,0x14, +0x72,0x72,0x6f,0x77,0x73,0xa3,0x73,0x10,0x6f,0xa3,0xd8,7,0x72,0x6f,0x72,0x44, +0x73,0x4e,0x74,0x62,0x79,0x19,0x61,0x6e,0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73, +0xa5,0x20,0x13,0x63,0x68,0x65,0x6e,0xa5,0xc,0x18,0x61,0x72,0x61,0x6d,0x67,0x6f, +0x6e,0x64,0x69,0xa5,0x14,0x10,0x68,2,0x61,0x3a,0x65,0x4a,0x6f,0x17,0x70,0x65, +0x72,0x61,0x74,0x6f,0x72,0x73,0x7f,0x16,0x6c,0x70,0x68,0x61,0x6e,0x75,0x6d,0xa3, +0x5d,0x16,0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,1,0x61,0x36,0x6f,0x17,0x70,0x65, +0x72,0x61,0x74,0x6f,0x72,0x73,0x7f,0x11,0x6c,0x70,0x1f,0x68,0x61,0x6e,0x75,0x6d, +0x65,0x72,0x69,0x63,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0x5d,0x68,0x50,0x6b, +0x7e,0x6c,0x88,0x6e,1,0x64,0x34,0x69,0x15,0x63,0x68,0x61,0x65,0x61,0x6e,0xa3, +0xea,0x12,0x61,0x69,0x63,0xa3,0xc6,1,0x61,0x3e,0x6a,0x12,0x6f,0x6e,0x67,0xa2, +0xaa,0x14,0x74,0x69,0x6c,0x65,0x73,0xa3,0xaa,0x13,0x6a,0x61,0x6e,0x69,0xa3,0xe9, +0x13,0x61,0x73,0x61,0x72,0xa5,0x1f,0x15,0x61,0x79,0x61,0x6c,0x61,0x6d,0x4f,3, +0x64,0x6c,0x65,0x7e,0x6e,0xa2,0x47,0x72,0x14,0x6f,0x69,0x74,0x69,0x63,1,0x63, +0x3c,0x68,0x19,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0xd7,0x15, +0x75,0x72,0x73,0x69,0x76,0x65,0xa3,0xd6,0x17,0x65,0x66,0x61,0x69,0x64,0x72,0x69, +0x6e,0xa5,0x21,0x17,0x74,0x65,0x69,0x6d,0x61,0x79,0x65,0x6b,0xa2,0xb8,0x12,0x65, +0x78,0x74,0xa2,0xd5,0x16,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa3,0xd5,0x18,0x64, +0x65,0x6b,0x69,0x6b,0x61,0x6b,0x75,0x69,0xa3,0xeb,6,0x6b,0x3b,0x6b,0x56,0x6f, +0x5a,0x75,0x64,0x79,0x11,0x69,0x61,0x1f,0x6b,0x65,0x6e,0x67,0x70,0x75,0x61,0x63, +0x68,0x75,0x65,0x68,0x6d,0x6f,0x6e,0x67,0xa5,0x27,0x10,0x6f,0xa3,0x92,0x14,0x62, +0x6c,0x6f,0x63,0x6b,0x21,1,0x6d,0x2c,0x73,0x11,0x68,0x75,0xa5,0x15,0x17,0x62, +0x65,0x72,0x66,0x6f,0x72,0x6d,0x73,0x7b,0x61,0x44,0x62,0x21,0x65,0x10,0x77,1, +0x61,0xa5,0xe,0x74,0x14,0x61,0x69,0x6c,0x75,0x65,0xa3,0x8b,2,0x62,0x3c,0x67, +0x4a,0x6e,0x17,0x64,0x69,0x6e,0x61,0x67,0x61,0x72,0x69,0xa5,0x26,0x15,0x61,0x74, +0x61,0x65,0x61,0x6e,0xa3,0xef,0x16,0x6d,0x75,0x6e,0x64,0x61,0x72,0x69,0xa5,0x47, +0x67,0xc4,0x5d,0x6a,0xc1,0xe4,0x6a,0xa2,0xdf,0x6b,0xa2,0xf8,0x6c,4,0x61,0x54, +0x65,0xa2,0x6b,0x69,0xa2,0x82,0x6f,0xa2,0xc1,0x79,1,0x63,0x2e,0x64,0x12,0x69, +0x61,0x6e,0xa3,0xa9,0x12,0x69,0x61,0x6e,0xa3,0xa7,1,0x6f,0x55,0x74,0x11,0x69, +0x6e,1,0x31,0x96,0x65,0x11,0x78,0x74,6,0x64,0x21,0x64,0xa3,0x95,0x65,0x2c, +0x66,0xa5,0x39,0x67,0xa5,0x3a,0xa2,0xe7,0x13,0x6e,0x64,0x65,0x64,6,0x64,0xc, +0x64,0xa3,0x95,0x65,0xa3,0xe7,0x66,0xa5,0x39,0x67,0xa5,0x3a,0x61,0x2a,0x62,0x29, +0x63,0xa3,0x94,0x26,0x18,0x64,0x64,0x69,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x6d,0x24, +0x12,0x73,0x75,0x70,0x24,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x25,1,0x70, +0x42,0x74,0x1d,0x74,0x65,0x72,0x6c,0x69,0x6b,0x65,0x73,0x79,0x6d,0x62,0x6f,0x6c, +0x73,0x79,0x12,0x63,0x68,0x61,0xa3,0x9c,2,0x6d,0x4e,0x6e,0x54,0x73,0x10,0x75, +0xa2,0xb0,0x12,0x73,0x75,0x70,0xa4,0x31,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74, +0xa5,0x31,0x11,0x62,0x75,0xa3,0x6f,0x12,0x65,0x61,0x72,1,0x61,0xa3,0xe8,0x62, +1,0x69,0x38,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62,0x61,0x72,0x79,0xa3,0x75,0x17, +0x64,0x65,0x6f,0x67,0x72,0x61,0x6d,0x73,0xa3,0x76,0x1a,0x77,0x73,0x75,0x72,0x72, +0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4d,0x10,0x61,1,0x6d,0x32,0x76,0x14,0x61, +0x6e,0x65,0x73,0x65,0xa3,0xb5,0x10,0x6f,0x5c,0x12,0x65,0x78,0x74,1,0x61,0xa3, +0xb4,0x62,0xa3,0xb9,1,0x61,0xa2,0x43,0x68,4,0x61,0x40,0x69,0x50,0x6d,0x6e, +0x6f,0x86,0x75,0x15,0x64,0x61,0x77,0x61,0x64,0x69,0xa3,0xe6,0x16,0x72,0x6f,0x73, +0x68,0x74,0x68,0x69,0xa3,0x89,0x1d,0x74,0x61,0x6e,0x73,0x6d,0x61,0x6c,0x6c,0x73, +0x63,0x72,0x69,0x70,0x74,0xa5,0x30,0x11,0x65,0x72,0x68,0x16,0x73,0x79,0x6d,0x62, +0x6f,0x6c,0x73,0xa3,0x71,0x12,0x6a,0x6b,0x69,0xa3,0xe5,5,0x74,0x35,0x74,0x34, +0x77,0x7a,0x79,0x13,0x61,0x68,0x6c,0x69,0xa3,0xa2,0x14,0x61,0x6b,0x61,0x6e,0x61, +0x9e,1,0x65,0x4c,0x70,0x10,0x68,0x1f,0x6f,0x6e,0x65,0x74,0x69,0x63,0x65,0x78, +0x74,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0xa3,0x6b,0x11,0x78,0x74,0xa3,0x6b,0x10, +0x69,0xa5,0x46,0x69,0xa2,0x4e,0x6b,0xa2,0x51,0x6e,3,0x61,0x34,0x62,0x84,0x67, +0x8a,0x6e,0x12,0x61,0x64,0x61,0x4d,1,0x65,0x40,0x73,0x11,0x75,0x70,0xa2,0xcb, +0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xcb,0x11,0x78,0x74,2,0x61,0xa5, +0x13,0x62,0xa5,0x38,0x65,0x13,0x6e,0x64,0x65,0x64,1,0x61,0xa5,0x13,0x62,0xa5, +0x38,0x11,0x75,0x6e,0xa3,0x42,0x11,0x78,0x69,0x96,0x17,0x72,0x61,0x64,0x69,0x63, +0x61,0x6c,0x73,0x97,0x12,0x74,0x68,0x69,0xa3,0xc1,0x1c,0x74,0x6f,0x76,0x69,0x6b, +0x6e,0x75,0x6d,0x65,0x72,0x61,0x6c,0x73,0xa5,0x45,0x67,0xa2,0xb5,0x68,0xa4,0x84, +0x69,3,0x64,0x4c,0x6d,0xa2,0x55,0x6e,0xa2,0x62,0x70,0x13,0x61,0x65,0x78,0x74, +0x2a,0x16,0x65,0x6e,0x73,0x69,0x6f,0x6e,0x73,0x2b,1,0x63,0x99,0x65,0x17,0x6f, +0x67,0x72,0x61,0x70,0x68,0x69,0x63,1,0x64,0x56,0x73,0x15,0x79,0x6d,0x62,0x6f, +0x6c,0x73,0xa4,0xb,0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74, +0x69,0x6f,0x6e,0xa5,0xb,0x13,0x65,0x73,0x63,0x72,0x1f,0x69,0x70,0x74,0x69,0x6f, +0x6e,0x63,0x68,0x61,0x72,0x61,0x63,0x74,0x65,0x72,0x73,0x99,0x1c,0x70,0x65,0x72, +0x69,0x61,0x6c,0x61,0x72,0x61,0x6d,0x61,0x69,0x63,0xa3,0xba,1,0x64,0x62,0x73, +0x1b,0x63,0x72,0x69,0x70,0x74,0x69,0x6f,0x6e,0x61,0x6c,0x70,0x61,1,0x68,0x32, +0x72,0x14,0x74,0x68,0x69,0x61,0x6e,0xa3,0xbd,0x13,0x6c,0x61,0x76,0x69,0xa3,0xbe, +0x11,0x69,0x63,1,0x6e,0x3e,0x73,0x1a,0x69,0x79,0x61,0x71,0x6e,0x75,0x6d,0x62, +0x65,0x72,0x73,0xa5,0x1e,0x19,0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73, +0xa3,0xb2,4,0x65,0x74,0x6c,0xa2,0x82,0x6f,0xa2,0x9a,0x72,0xa2,0x9e,0x75,2, +0x6a,0x34,0x6e,0x3e,0x72,0x14,0x6d,0x75,0x6b,0x68,0x69,0x43,0x14,0x61,0x72,0x61, +0x74,0x69,0x45,0x18,0x6a,0x61,0x6c,0x61,0x67,0x6f,0x6e,0x64,0x69,0xa5,0x1c,1, +0x6e,0xa2,0x46,0x6f,1,0x6d,0x6e,0x72,0x13,0x67,0x69,0x61,0x6e,0x5a,1,0x65, +0x40,0x73,0x11,0x75,0x70,0xa2,0x87,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3, +0x87,0x11,0x78,0x74,0xa4,0x1b,0x14,0x65,0x6e,0x64,0x65,0x64,0xa5,0x1b,0x1a,0x65, +0x74,0x72,0x69,0x63,0x73,0x68,0x61,0x70,0x65,0x73,0x8c,0x12,0x65,0x78,0x74,0xa2, +0xe3,0x14,0x65,0x6e,0x64,0x65,0x64,0xa3,0xe3,0x1e,0x65,0x72,0x61,0x6c,0x70,0x75, +0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x71,0x17,0x61,0x67,0x6f,0x6c,0x69, +0x74,0x69,0x63,0xa2,0x88,0x12,0x73,0x75,0x70,0xa4,0xa,0x16,0x70,0x6c,0x65,0x6d, +0x65,0x6e,0x74,0xa5,0xa,0x13,0x74,0x68,0x69,0x63,0xa3,0x59,1,0x61,0x5c,0x65, +0x11,0x65,0x6b,0x30,1,0x61,0x38,0x65,0x11,0x78,0x74,0x6e,0x14,0x65,0x6e,0x64, +0x65,0x64,0x6f,0x17,0x6e,0x64,0x63,0x6f,0x70,0x74,0x69,0x63,0x31,0x13,0x6e,0x74, +0x68,0x61,0xa3,0xe4,2,0x61,0xa2,0x48,0x65,0xa2,0xdf,0x69,1,0x67,0x30,0x72, +0x14,0x61,0x67,0x61,0x6e,0x61,0x9d,0x10,0x68,1,0x70,0x3a,0x73,0x18,0x75,0x72, +0x72,0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4b,1,0x72,0x3c,0x75,0x19,0x73,0x75, +0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4c,0x11,0x69,0x76,0x1f,0x61,0x74, +0x65,0x75,0x73,0x65,0x73,0x75,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x73,0xa3,0x4c, +2,0x6c,0x32,0x6e,0x9a,0x74,0x12,0x72,0x61,0x6e,0xa5,2,0x10,0x66,2,0x61, +0x58,0x6d,0x70,0x77,0x14,0x69,0x64,0x74,0x68,0x61,0x1f,0x6e,0x64,0x66,0x75,0x6c, +0x6c,0x77,0x69,0x64,0x74,0x68,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x57,0x1a,0x6e,0x64, +0x66,0x75,0x6c,0x6c,0x66,0x6f,0x72,0x6d,0x73,0xa3,0x57,0x13,0x61,0x72,0x6b,0x73, +0xa3,0x52,2,0x67,0x34,0x69,0xa2,0x45,0x75,0x12,0x6e,0x6f,0x6f,0xa3,0x63,0x11, +0x75,0x6c,0xa2,0x4a,2,0x63,0x3c,0x6a,0x5e,0x73,0x17,0x79,0x6c,0x6c,0x61,0x62, +0x6c,0x65,0x73,0xa3,0x4a,0x1f,0x6f,0x6d,0x70,0x61,0x74,0x69,0x62,0x69,0x6c,0x69, +0x74,0x79,0x6a,0x61,0x6d,0x6f,0xa3,0x41,0x12,0x61,0x6d,0x6f,0x5c,0x17,0x65,0x78, +0x74,0x65,0x6e,0x64,0x65,0x64,1,0x61,0xa3,0xb4,0x62,0xa3,0xb9,0x19,0x66,0x69, +0x72,0x6f,0x68,0x69,0x6e,0x67,0x79,0x61,0xa5,0x1d,0x13,0x62,0x72,0x65,0x77,0x37, +0x61,0xa4,0xc,0x62,0xa6,0x59,0x63,0xa8,0x2e,0x64,0xac,0xe9,0x65,5,0x6d,0xa9, +0x6d,0x94,0x6e,0xa2,0x41,0x74,0x15,0x68,0x69,0x6f,0x70,0x69,0x63,0x5e,1,0x65, +0x40,0x73,0x11,0x75,0x70,0xa2,0x86,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3, +0x86,0x11,0x78,0x74,0xa2,0x85,2,0x61,0xa3,0xc8,0x62,0xa5,0x37,0x65,0x13,0x6e, +0x64,0x65,0x64,0xa2,0x85,1,0x61,0xa3,0xc8,0x62,0xa5,0x37,0x16,0x6f,0x74,0x69, +0x63,0x6f,0x6e,0x73,0xa3,0xce,0x15,0x63,0x6c,0x6f,0x73,0x65,0x64,2,0x61,0x5a, +0x63,0x9e,0x69,0x1c,0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x73,0x75, +0x70,0xa2,0xc4,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0xc4,0x16,0x6c,0x70, +0x68,0x61,0x6e,0x75,0x6d,0x86,1,0x65,0x2c,0x73,0x11,0x75,0x70,0xa3,0xc3,0x13, +0x72,0x69,0x63,0x73,0x86,0x18,0x75,0x70,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3, +0xc3,0x11,0x6a,0x6b,0xa2,0x44,0x1f,0x6c,0x65,0x74,0x74,0x65,0x72,0x73,0x61,0x6e, +0x64,0x6d,0x6f,0x6e,0x74,0x68,0x73,0xa3,0x44,0x61,0x4a,0x67,0x76,0x6c,1,0x62, +0x30,0x79,0x13,0x6d,0x61,0x69,0x63,0xa5,0x25,0x13,0x61,0x73,0x61,0x6e,0xa3,0xe2, +0x13,0x72,0x6c,0x79,0x64,0x1f,0x79,0x6e,0x61,0x73,0x74,0x69,0x63,0x63,0x75,0x6e, +0x65,0x69,0x66,0x6f,0x72,0x6d,0xa5,1,0x1f,0x79,0x70,0x74,0x69,0x61,0x6e,0x68, +0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,1,0x66,0x26,0x73,0xa3,0xc2,0x1c, +0x6f,0x72,0x6d,0x61,0x74,0x63,0x6f,0x6e,0x74,0x72,0x6f,0x6c,0x73,0xa5,0x24,7, +0x6e,0xc0,0xf2,0x6e,0x3e,0x72,0xa2,0x5d,0x73,0xa2,0xe5,0x76,0x14,0x65,0x73,0x74, +0x61,0x6e,0xa3,0xbc,1,0x61,0x92,0x63,0x13,0x69,0x65,0x6e,0x74,1,0x67,0x34, +0x73,0x15,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xa5,0x13,0x72,0x65,0x65,0x6b,1, +0x6d,0x34,0x6e,0x15,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0x7f,0x13,0x75,0x73,0x69, +0x63,0xa2,0x7e,0x19,0x61,0x6c,0x6e,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x7e, +0x10,0x74,0x1f,0x6f,0x6c,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79, +0x70,0x68,0x73,0xa3,0xfe,2,0x61,0x32,0x6d,0xa2,0x7e,0x72,0x12,0x6f,0x77,0x73, +0x7d,0x12,0x62,0x69,0x63,0x38,3,0x65,0x4a,0x6d,0x80,0x70,0xa2,0x50,0x73,0x11, +0x75,0x70,0xa2,0x80,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x80,0x11,0x78, +0x74,3,0x61,0xa3,0xd2,0x62,0xa5,0x35,0x63,0xa5,0x41,0x65,0x13,0x6e,0x64,0x65, +0x64,2,0x61,0xa3,0xd2,0x62,0xa5,0x35,0x63,0xa5,0x41,0x12,0x61,0x74,0x68,0xa2, +0xd3,0x18,0x65,0x6d,0x61,0x74,0x69,0x63,0x61,0x6c,0x61,0x1f,0x6c,0x70,0x68,0x61, +0x62,0x65,0x74,0x69,0x63,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa3,0xd3,1,0x66, +0x42,0x72,0x1e,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f,0x72, +0x6d,0x73,1,0x61,0xa3,0x51,0x62,0xa3,0x55,0x14,0x65,0x6e,0x69,0x61,0x6e,0x35, +0x12,0x63,0x69,0x69,0x23,0x64,0x9e,0x65,0xa2,0x42,0x68,0xa2,0x4d,0x6c,1,0x63, +0x62,0x70,0x17,0x68,0x61,0x62,0x65,0x74,0x69,0x63,0x70,1,0x66,0xa3,0x50,0x72, +0x1e,0x65,0x73,0x65,0x6e,0x74,0x61,0x74,0x69,0x6f,0x6e,0x66,0x6f,0x72,0x6d,0x73, +0xa3,0x50,0x16,0x68,0x65,0x6d,0x69,0x63,0x61,0x6c,0xa2,0xd0,0x16,0x73,0x79,0x6d, +0x62,0x6f,0x6c,0x73,0xa3,0xd0,0x12,0x6c,0x61,0x6d,0xa5,7,0x1a,0x67,0x65,0x61, +0x6e,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa3,0x77,0x11,0x6f,0x6d,0xa3,0xfd,7, +0x6f,0x71,0x6f,0x64,0x72,0xa2,0x41,0x75,0xa2,0x58,0x79,0x1b,0x7a,0x61,0x6e,0x74, +0x69,0x6e,0x65,0x6d,0x75,0x73,0x69,0x63,0xa2,0x5b,0x18,0x61,0x6c,0x73,0x79,0x6d, +0x62,0x6f,0x6c,0x73,0xa3,0x5b,1,0x70,0x34,0x78,0x16,0x64,0x72,0x61,0x77,0x69, +0x6e,0x67,0x89,0x14,0x6f,0x6d,0x6f,0x66,0x6f,0xa0,0x12,0x65,0x78,0x74,0xa2,0x43, +0x14,0x65,0x6e,0x64,0x65,0x64,0xa3,0x43,0x10,0x61,1,0x68,0x40,0x69,0x12,0x6c, +0x6c,0x65,0x92,0x17,0x70,0x61,0x74,0x74,0x65,0x72,0x6e,0x73,0x93,0x11,0x6d,0x69, +0xa3,0xc9,1,0x67,0x2c,0x68,0x11,0x69,0x64,0xa3,0x64,0x14,0x69,0x6e,0x65,0x73, +0x65,0xa3,0x81,0x61,0x48,0x65,0xa2,0x4e,0x68,0xa2,0x52,0x6c,0x1a,0x6f,0x63,0x6b, +0x65,0x6c,0x65,0x6d,0x65,0x6e,0x74,0x73,0x8b,3,0x6c,0x34,0x6d,0x40,0x73,0x66, +0x74,0x11,0x61,0x6b,0xa3,0xc7,0x14,0x69,0x6e,0x65,0x73,0x65,0xa3,0x93,0x11,0x75, +0x6d,0xa2,0xb1,0x12,0x73,0x75,0x70,0xa2,0xca,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e, +0x74,0xa3,0xca,1,0x69,0x30,0x73,0x13,0x61,0x76,0x61,0x68,0xa3,0xdd,0x15,0x63, +0x6c,0x61,0x74,0x69,0x6e,0x23,0x14,0x6e,0x67,0x61,0x6c,0x69,0x41,0x16,0x61,0x69, +0x6b,0x73,0x75,0x6b,0x69,0xa5,8,5,0x6f,0xc1,0x60,0x6f,0xa2,0x69,0x75,0xa4, +0x24,0x79,1,0x70,0xa2,0x44,0x72,0x14,0x69,0x6c,0x6c,0x69,0x63,0x32,1,0x65, +0x4c,0x73,0x11,0x75,0x70,0xa2,0x61,0x16,0x70,0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa2, +0x61,0x12,0x61,0x72,0x79,0xa3,0x61,0x11,0x78,0x74,4,0x61,0xa3,0x9e,0x62,0xa3, +0xa0,0x63,0xa5,9,0x64,0xa5,0x43,0x65,0x13,0x6e,0x64,0x65,0x64,3,0x61,0xa3, +0x9e,0x62,0xa3,0xa0,0x63,0xa5,9,0x64,0xa5,0x43,0x10,0x72,1,0x69,0x34,0x6f, +0x15,0x6d,0x69,0x6e,0x6f,0x61,0x6e,0xa5,0x36,0x1a,0x6f,0x74,0x73,0x79,0x6c,0x6c, +0x61,0x62,0x61,0x72,0x79,0xa3,0x7b,3,0x6d,0x5a,0x6e,0xa2,0x95,0x70,0xa2,0xa0, +0x75,0x17,0x6e,0x74,0x69,0x6e,0x67,0x72,0x6f,0x64,0xa2,0x9a,0x17,0x6e,0x75,0x6d, +0x65,0x72,0x61,0x6c,0x73,0xa3,0x9a,2,0x62,0x3a,0x6d,0xa2,0x5f,0x70,0x15,0x61, +0x74,0x6a,0x61,0x6d,0x6f,0xa3,0x41,0x14,0x69,0x6e,0x69,0x6e,0x67,2,0x64,0x46, +0x68,0x9e,0x6d,0x1d,0x61,0x72,0x6b,0x73,0x66,0x6f,0x72,0x73,0x79,0x6d,0x62,0x6f, +0x6c,0x73,0x77,0x1e,0x69,0x61,0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x6d,0x61, +0x72,0x6b,0x73,0x2e,2,0x65,0x40,0x66,0xa6,0x52,0x73,0x18,0x75,0x70,0x70,0x6c, +0x65,0x6d,0x65,0x6e,0x74,0xa3,0x83,0x16,0x78,0x74,0x65,0x6e,0x64,0x65,0x64,0xa3, +0xe0,0x17,0x61,0x6c,0x66,0x6d,0x61,0x72,0x6b,0x73,0xa3,0x52,0x11,0x6f,0x6e,0x1f, +0x69,0x6e,0x64,0x69,0x63,0x6e,0x75,0x6d,0x62,0x65,0x72,0x66,0x6f,0x72,0x6d,0x73, +0xa3,0xb2,0x1b,0x74,0x72,0x6f,0x6c,0x70,0x69,0x63,0x74,0x75,0x72,0x65,0x73,0x83, +0x12,0x74,0x69,0x63,0xa2,0x84,0x1b,0x65,0x70,0x61,0x63,0x74,0x6e,0x75,0x6d,0x62, +0x65,0x72,0x73,0xa3,0xdf,1,0x6e,0x3e,0x72,0x1b,0x72,0x65,0x6e,0x63,0x79,0x73, +0x79,0x6d,0x62,0x6f,0x6c,0x73,0x75,0x15,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa2,0x98, +0x16,0x6e,0x75,0x6d,0x62,0x65,0x72,0x73,0xa2,0x99,0x1d,0x61,0x6e,0x64,0x70,0x75, +0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xa3,0x99,0x61,0xa2,0xea,0x68,0xa4, +0x14,0x6a,0x10,0x6b,0xa2,0x47,4,0x63,0x92,0x65,0xa2,0x83,0x72,0xa2,0xa1,0x73, +0xa2,0xb3,0x75,0x1f,0x6e,0x69,0x66,0x69,0x65,0x64,0x69,0x64,0x65,0x6f,0x67,0x72, +0x61,0x70,0x68,0x73,0xa2,0x47,0x18,0x65,0x78,0x74,0x65,0x6e,0x73,0x69,0x6f,0x6e, +8,0x65,0x71,0x65,0xa5,0,0x66,0xa5,0x12,0x67,0xa5,0x2e,0x68,0xa5,0x42,0x69, +0xa5,0x48,0x14,0x6f,0x6d,0x70,0x61,0x74,0xa2,0x45,1,0x66,0x96,0x69,1,0x62, +0x44,0x64,0x17,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa2,0x4f,0x12,0x73,0x75, +0x70,0xa3,0x5f,0x14,0x69,0x6c,0x69,0x74,0x79,0xa2,0x45,1,0x66,0x54,0x69,0x18, +0x64,0x65,0x6f,0x67,0x72,0x61,0x70,0x68,0x73,0xa2,0x4f,0x19,0x73,0x75,0x70,0x70, +0x6c,0x65,0x6d,0x65,0x6e,0x74,0xa3,0x5f,0x13,0x6f,0x72,0x6d,0x73,0xa3,0x53,0x11, +0x78,0x74,8,0x65,0xf,0x65,0xa5,0,0x66,0xa5,0x12,0x67,0xa5,0x2e,0x68,0xa5, +0x42,0x69,0xa5,0x48,0x61,0xa3,0x46,0x62,0xa3,0x5e,0x63,0xa3,0xc5,0x64,0xa3,0xd1, +0x19,0x61,0x64,0x69,0x63,0x61,0x6c,0x73,0x73,0x75,0x70,0x94,0x16,0x70,0x6c,0x65, +0x6d,0x65,0x6e,0x74,0x95,1,0x74,0x50,0x79,0x14,0x6d,0x62,0x6f,0x6c,0x73,0x9a, +0x1d,0x61,0x6e,0x64,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x9b, +0x14,0x72,0x6f,0x6b,0x65,0x73,0xa3,0x82,2,0x6e,0x48,0x72,0x64,0x75,0x1d,0x63, +0x61,0x73,0x69,0x61,0x6e,0x61,0x6c,0x62,0x61,0x6e,0x69,0x61,0x6e,0xa3,0xde,0x1d, +0x61,0x64,0x69,0x61,0x6e,0x73,0x79,0x6c,0x6c,0x61,0x62,0x69,0x63,0x73,0x63,0x12, +0x69,0x61,0x6e,0xa3,0xa8,2,0x61,0x3a,0x65,0x4c,0x6f,0x16,0x72,0x61,0x73,0x6d, +0x69,0x61,0x6e,0xa5,0x2d,1,0x6b,0x26,0x6d,0xa3,0xa4,0x11,0x6d,0x61,0xa3,0xd4, +1,0x72,0x38,0x73,0x17,0x73,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x73,0xa5,0x19,0x13, +0x6f,0x6b,0x65,0x65,0x60,0x12,0x73,0x75,0x70,0xa2,0xff,0x16,0x70,0x6c,0x65,0x6d, +0x65,0x6e,0x74,0xa3,0xff,3,0x65,0x3e,0x69,0x8e,0x6f,0xa2,0x71,0x75,0x15,0x70, +0x6c,0x6f,0x79,0x61,0x6e,0xa3,0xe1,1,0x73,0x60,0x76,0x16,0x61,0x6e,0x61,0x67, +0x61,0x72,0x69,0x3e,0x12,0x65,0x78,0x74,0xa2,0xb3,1,0x61,0xa5,0x44,0x65,0x13, +0x6e,0x64,0x65,0x64,0xa2,0xb3,0x10,0x61,0xa5,0x44,0x13,0x65,0x72,0x65,0x74,0xa3, +0x5a,2,0x61,0x3a,0x6e,0x82,0x76,0x16,0x65,0x73,0x61,0x6b,0x75,0x72,0x75,0xa5, +0x2f,0x18,0x63,0x72,0x69,0x74,0x69,0x63,0x61,0x6c,0x73,0x2e,2,0x65,0x30,0x66, +0x36,0x73,0x11,0x75,0x70,0xa3,0x83,0x11,0x78,0x74,0xa3,0xe0,0x18,0x6f,0x72,0x73, +0x79,0x6d,0x62,0x6f,0x6c,0x73,0x77,0x14,0x67,0x62,0x61,0x74,0x73,0x91,1,0x67, +0x3e,0x6d,0x12,0x69,0x6e,0x6f,0xa2,0xab,0x14,0x74,0x69,0x6c,0x65,0x73,0xa3,0xab, +0x11,0x72,0x61,0xa5,0x1a,8,0x6d,0x5f,0x6d,0x3a,0x6e,0x48,0x73,0x7a,0x76,0xa2, +0x4b,0x77,0x12,0x69,0x64,0x65,0x43,0x11,0x65,0x64,0x32,0x12,0x69,0x61,0x6c,0x33, +2,0x61,0x40,0x62,0x37,0x6f,1,0x62,0x28,0x6e,0x10,0x65,0x21,0x13,0x72,0x65, +0x61,0x6b,0x37,0x10,0x72,0x34,0x12,0x72,0x6f,0x77,0x35,2,0x6d,0x38,0x71,0x46, +0x75,1,0x62,0x3d,0x70,0x3e,0x11,0x65,0x72,0x3f,1,0x61,0x24,0x6c,0x39,0x11, +0x6c,0x6c,0x39,1,0x72,0x3b,0x75,0x12,0x61,0x72,0x65,0x3b,0x12,0x65,0x72,0x74, +0x40,0x13,0x69,0x63,0x61,0x6c,0x41,0x63,0x58,0x65,0x92,0x66,0x96,0x69,1,0x6e, +0x36,0x73,0x10,0x6f,0x30,0x14,0x6c,0x61,0x74,0x65,0x64,0x31,0x11,0x69,0x74,0x2e, +0x12,0x69,0x61,0x6c,0x2f,2,0x61,0x36,0x69,0x48,0x6f,0x10,0x6d,0x24,0x12,0x70, +0x61,0x74,0x25,0x10,0x6e,0x22,0x15,0x6f,0x6e,0x69,0x63,0x61,0x6c,0x23,0x13,0x72, +0x63,0x6c,0x65,0x27,0x11,0x6e,0x63,0x27,2,0x69,0x3a,0x6f,0x44,0x72,0x10,0x61, +0x2c,0x14,0x63,0x74,0x69,0x6f,0x6e,0x2d,0x10,0x6e,0x28,0x11,0x61,0x6c,0x29,0x11, +0x6e,0x74,0x2b,4,0x61,0x3a,0x66,0x4c,0x68,0x5e,0x6e,0x70,0x77,0x2a,0x12,0x69, +0x64,0x65,0x2b,0x22,0x17,0x6d,0x62,0x69,0x67,0x75,0x6f,0x75,0x73,0x23,0x26,0x17, +0x75,0x6c,0x6c,0x77,0x69,0x64,0x74,0x68,0x27,0x24,0x17,0x61,0x6c,0x66,0x77,0x69, +0x64,0x74,0x68,0x25,0x20,1,0x61,0x30,0x65,0x14,0x75,0x74,0x72,0x61,0x6c,0x21, +0x28,0x13,0x72,0x72,0x6f,0x77,0x29,0xd,0x6e,0xc0,0xfb,0x73,0x6d,0x73,0x3a,0x74, +0x98,0x75,0xa2,0x49,0x7a,2,0x6c,0x3b,0x70,0x3d,0x73,0x39,5,0x6f,0x28,0x6f, +0x57,0x70,0x34,0x75,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x45,0x11,0x61,0x63, +1,0x65,0x32,0x69,0x15,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x31,0x18,0x73,0x65,0x70, +0x61,0x72,0x61,0x74,0x6f,0x72,0x39,0x63,0x53,0x6b,0x55,0x6d,0x51,0x1d,0x69,0x74, +0x6c,0x65,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x27,1,0x6e,0x40, +0x70,0x1c,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x23, +0x17,0x61,0x73,0x73,0x69,0x67,0x6e,0x65,0x64,0x21,0x6e,0x8a,0x6f,0xa2,0x47,0x70, +8,0x66,0x14,0x66,0x5b,0x69,0x59,0x6f,0x4f,0x72,0x24,0x73,0x49,0x17,0x69,0x76, +0x61,0x74,0x65,0x75,0x73,0x65,0x43,0x61,0x2c,0x63,0x4d,0x64,0x47,0x65,0x4b,0x1f, +0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72, +0x3d,2,0x64,0x33,0x6c,0x35,0x6f,0x36,0x1b,0x6e,0x73,0x70,0x61,0x63,0x69,0x6e, +0x67,0x6d,0x61,0x72,0x6b,0x2d,1,0x70,0x7c,0x74,0x12,0x68,0x65,0x72,3,0x6c, +0x38,0x6e,0x42,0x70,0x4c,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0x57,0x14,0x65,0x74, +0x74,0x65,0x72,0x2b,0x14,0x75,0x6d,0x62,0x65,0x72,0x37,0x19,0x75,0x6e,0x63,0x74, +0x75,0x61,0x74,0x69,0x6f,0x6e,0x4f,0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75, +0x61,0x74,0x69,0x6f,0x6e,0x49,0x66,0x9e,0x66,0x88,0x69,0xa2,0x4b,0x6c,0xa2,0x5c, +0x6d,4,0x61,0x60,0x63,0x31,0x65,0x2f,0x6e,0x2d,0x6f,0x15,0x64,0x69,0x66,0x69, +0x65,0x72,1,0x6c,0x30,0x73,0x14,0x79,0x6d,0x62,0x6f,0x6c,0x55,0x14,0x65,0x74, +0x74,0x65,0x72,0x29,0x17,0x74,0x68,0x73,0x79,0x6d,0x62,0x6f,0x6c,0x51,1,0x69, +0x2e,0x6f,0x13,0x72,0x6d,0x61,0x74,0x41,0x1d,0x6e,0x61,0x6c,0x70,0x75,0x6e,0x63, +0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x5b,0x10,0x6e,0x1f,0x69,0x74,0x69,0x61,0x6c, +0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x59,6,0x6d,0x18,0x6d, +0x29,0x6f,0x28,0x74,0x27,0x75,0x23,0x2a,0x1c,0x77,0x65,0x72,0x63,0x61,0x73,0x65, +0x6c,0x65,0x74,0x74,0x65,0x72,0x25,0x65,0x28,0x69,0x3c,0x6c,0x25,0x19,0x74,0x74, +0x65,0x72,0x6e,0x75,0x6d,0x62,0x65,0x72,0x35,0x1a,0x6e,0x65,0x73,0x65,0x70,0x61, +0x72,0x61,0x74,0x6f,0x72,0x3b,0x63,0x44,0x64,0xa2,0x60,0x65,0x1b,0x6e,0x63,0x6c, +0x6f,0x73,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x2f,6,0x6e,0x39,0x6e,0x46,0x6f, +0x4e,0x73,0x45,0x75,0x1b,0x72,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62,0x6f, +0x6c,0x53,0x20,0x12,0x74,0x72,0x6c,0x3f,0x42,0x10,0x6e,1,0x6e,0x2c,0x74,0x12, +0x72,0x6f,0x6c,0x3f,0x1f,0x65,0x63,0x74,0x6f,0x72,0x70,0x75,0x6e,0x63,0x74,0x75, +0x61,0x74,0x69,0x6f,0x6e,0x4d,0x63,0x3f,0x66,0x41,0x6c,0x1d,0x6f,0x73,0x65,0x70, +0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x4b,2,0x61,0x30,0x65,0x4a, +0x69,0x12,0x67,0x69,0x74,0x33,0x1c,0x73,0x68,0x70,0x75,0x6e,0x63,0x74,0x75,0x61, +0x74,0x69,0x6f,0x6e,0x47,0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e,0x75,0x6d,0x62,0x65, +0x72,0x33,0,0x13,0x6e,0xc1,0xf,0x74,0x76,0x74,0x4c,0x76,0x9a,0x77,0xa2,0x48, +0x79,0xa2,0x49,0x7a,1,0x61,0x2c,0x68,0x12,0x61,0x69,0x6e,0x8b,0x11,0x69,0x6e, +0x85,2,0x61,0x36,0x65,0x3c,0x68,0x14,0x69,0x6e,0x79,0x65,0x68,0xa3,0x66,1, +0x68,0x71,0x77,0x73,1,0x68,0x28,0x74,0x10,0x68,0x77,0x16,0x6d,0x61,0x72,0x62, +0x75,0x74,0x61,0x74,0x13,0x67,0x6f,0x61,0x6c,0x3d,0x1a,0x65,0x72,0x74,0x69,0x63, +0x61,0x6c,0x74,0x61,0x69,0x6c,0xa3,0x67,0x11,0x61,0x77,0x79,1,0x65,0x32,0x75, +0x11,0x64,0x68,0x80,0x11,0x68,0x65,0x83,0x10,0x68,0x7a,1,0x62,0x34,0x77,0x16, +0x69,0x74,0x68,0x74,0x61,0x69,0x6c,0x7f,0x14,0x61,0x72,0x72,0x65,0x65,0x7d,0x6e, +0xa2,0x4c,0x70,0xa2,0x69,0x71,0xa2,0x69,0x72,0xa2,0x6f,0x73,5,0x74,0x22,0x74, +0x38,0x77,0x4c,0x79,0x16,0x72,0x69,0x61,0x63,0x77,0x61,0x77,0x6f,0x18,0x72,0x61, +0x69,0x67,0x68,0x74,0x77,0x61,0x77,0xa3,0x55,0x15,0x61,0x73,0x68,0x6b,0x61,0x66, +0x6d,0x61,0x2e,0x65,0x38,0x68,0x11,0x69,0x6e,0x6b,0x10,0x64,0x62,0x11,0x68,0x65, +0x65,1,0x65,0x2e,0x6d,0x13,0x6b,0x61,0x74,0x68,0x69,0x10,0x6e,0x67,2,0x6f, +0x2c,0x75,0x50,0x79,0x10,0x61,0x91,1,0x6a,0x28,0x6f,0x10,0x6e,0x55,0x1a,0x6f, +0x69,0x6e,0x69,0x6e,0x67,0x67,0x72,0x6f,0x75,0x70,0x21,0x10,0x6e,0x57,0x10,0x65, +0x59,0x10,0x61,1,0x66,0x5b,0x70,0x10,0x68,0x5d,1,0x65,0x38,0x6f,0x18,0x68, +0x69,0x6e,0x67,0x79,0x61,0x79,0x65,0x68,0x93,1,0x68,0x5f,0x76,0x16,0x65,0x72, +0x73,0x65,0x64,0x70,0x65,0x61,0x67,0xc1,0xc7,0x67,0xa4,0x52,0x68,0xa4,0x59,0x6b, +0xa4,0x99,0x6c,0xa4,0xb2,0x6d,2,0x61,0x2e,0x65,0xa4,0x3e,0x69,0x10,0x6d,0x53, +1,0x6c,0xa2,0xe7,0x6e,0x16,0x69,0x63,0x68,0x61,0x65,0x61,0x6e,0,0x12,0x6e, +0x76,0x73,0x51,0x73,0x3e,0x74,0x5c,0x77,0xa0,0x79,0xa2,0x42,0x7a,0x13,0x61,0x79, +0x69,0x6e,0xa3,0x54,0x10,0x61,1,0x64,0x2e,0x6d,0x12,0x65,0x6b,0x68,0xa3,0x4c, +0x11,0x68,0x65,0xa3,0x4b,3,0x61,0x38,0x65,0x3c,0x68,0x4a,0x77,0x13,0x65,0x6e, +0x74,0x79,0xa3,0x51,0x10,0x77,0xa3,0x4d,1,0x6e,0xa3,0x4e,0x74,0x10,0x68,0xa3, +0x4f,0x14,0x61,0x6d,0x65,0x64,0x68,0xa3,0x50,0x11,0x61,0x77,0xa3,0x52,0x12,0x6f, +0x64,0x68,0xa3,0x53,0x6e,0x3a,0x6f,0x40,0x70,0x46,0x71,0x4a,0x72,0x12,0x65,0x73, +0x68,0xa3,0x4a,0x11,0x75,0x6e,0xa3,0x46,0x11,0x6e,0x65,0xa3,0x47,0x10,0x65,0xa3, +0x48,0x12,0x6f,0x70,0x68,0xa3,0x49,0x67,0x33,0x67,0x38,0x68,0x40,0x6b,0x5e,0x6c, +0x66,0x6d,0x11,0x65,0x6d,0xa3,0x45,0x13,0x69,0x6d,0x65,0x6c,0xa1,1,0x65,0x32, +0x75,0x14,0x6e,0x64,0x72,0x65,0x64,0xa3,0x42,0x11,0x74,0x68,0xa3,0x41,0x12,0x61, +0x70,0x68,0xa3,0x43,0x14,0x61,0x6d,0x65,0x64,0x68,0xa3,0x44,0x61,0x34,0x62,0x4a, +0x64,0x50,0x66,0x12,0x69,0x76,0x65,0x9f,1,0x6c,0x2a,0x79,0x11,0x69,0x6e,0x97, +0x12,0x65,0x70,0x68,0x95,0x12,0x65,0x74,0x68,0x99,1,0x61,0x30,0x68,0x14,0x61, +0x6d,0x65,0x64,0x68,0x9d,0x13,0x6c,0x65,0x74,0x68,0x9b,0x15,0x61,0x79,0x61,0x6c, +0x61,0x6d,6,0x6e,0x2c,0x6e,0x34,0x72,0x5e,0x73,0x62,0x74,0x11,0x74,0x61,0xa3, +0x63,2,0x67,0x2e,0x6e,0x32,0x79,0x10,0x61,0xa3,0x60,0x10,0x61,0xa3,0x5d,1, +0x61,0xa3,0x5e,0x6e,0x10,0x61,0xa3,0x5f,0x10,0x61,0xa3,0x61,0x11,0x73,0x61,0xa3, +0x62,0x62,0x3c,0x6a,0x42,0x6c,0x10,0x6c,1,0x61,0xa3,0x5b,0x6c,0x10,0x61,0xa3, +0x5c,0x11,0x68,0x61,0xa3,0x59,0x10,0x61,0xa3,0x5a,0x11,0x65,0x6d,0x51,0x10,0x61, +1,0x66,0x37,0x6d,0x11,0x61,0x6c,0x39,1,0x61,0x40,0x65,0x3e,1,0x68,0x28, +0x74,0x10,0x68,0x45,0x40,0x13,0x67,0x6f,0x61,0x6c,0x43,2,0x68,0x3b,0x6d,0x5c, +0x6e,0x1a,0x69,0x66,0x69,0x72,0x6f,0x68,0x69,0x6e,0x67,0x79,0x61,1,0x6b,0x2a, +0x70,0x10,0x61,0xa3,0x65,0x15,0x69,0x6e,0x6e,0x61,0x79,0x61,0xa3,0x64,0x1a,0x7a, +0x61,0x6f,0x6e,0x68,0x65,0x68,0x67,0x6f,0x61,0x6c,0x3d,2,0x61,0x3a,0x68,0x44, +0x6e,0x17,0x6f,0x74,0x74,0x65,0x64,0x68,0x65,0x68,0x4b,1,0x66,0x47,0x70,0x10, +0x68,0x49,0x12,0x61,0x70,0x68,0x89,0x11,0x61,0x6d,0x4c,0x12,0x61,0x64,0x68,0x4f, +0x61,0x6e,0x62,0xa2,0x54,0x64,0xa2,0x70,0x65,0x31,0x66,2,0x61,0x3e,0x65,0x4a, +0x69,0x19,0x6e,0x61,0x6c,0x73,0x65,0x6d,0x6b,0x61,0x74,0x68,0x35,0x15,0x72,0x73, +0x69,0x79,0x65,0x68,0x8f,0x86,0x10,0x68,0x33,2,0x66,0x3c,0x69,0x70,0x6c,1, +0x61,0x28,0x65,0x10,0x66,0x27,0x11,0x70,0x68,0x25,0x14,0x72,0x69,0x63,0x61,0x6e, +2,0x66,0x30,0x6e,0x36,0x71,0x11,0x61,0x66,0xa3,0x58,0x11,0x65,0x68,0xa3,0x56, +0x12,0x6f,0x6f,0x6e,0xa3,0x57,0x10,0x6e,0x23,1,0x65,0x4a,0x75,0x10,0x72,0x1f, +0x75,0x73,0x68,0x61,0x73,0x6b,0x69,0x79,0x65,0x68,0x62,0x61,0x72,0x72,0x65,0x65, +0x8d,1,0x68,0x29,0x74,0x10,0x68,0x2b,0x11,0x61,0x6c,0x2c,0x16,0x61,0x74,0x68, +0x72,0x69,0x73,0x68,0x2f,7,0x6e,0x2e,0x6e,0x2c,0x72,0x3e,0x74,0x56,0x75,0x21, +0x18,0x6f,0x6e,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x21,0x28,0x1a,0x69,0x67,0x68, +0x74,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x29,0x2a,0x19,0x72,0x61,0x6e,0x73,0x70, +0x61,0x72,0x65,0x6e,0x74,0x2b,0x63,0x23,0x64,0x40,0x6a,0x56,0x6c,0x26,0x19,0x65, +0x66,0x74,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x27,0x24,0x19,0x75,0x61,0x6c,0x6a, +0x6f,0x69,0x6e,0x69,0x6e,0x67,0x25,0x19,0x6f,0x69,0x6e,0x63,0x61,0x75,0x73,0x69, +0x6e,0x67,0x23,0,0x14,0x6e,0xc0,0xe5,0x73,0x5e,0x77,0x23,0x77,0x40,0x78,0x58, +0x7a,0x10,0x77,0x58,1,0x6a,0x75,0x73,0x13,0x70,0x61,0x63,0x65,0x59,1,0x6a, +0x5d,0x6f,0x17,0x72,0x64,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x5d,0x10,0x78,0x21,0x73, +0x4a,0x75,0x7a,0x76,1,0x66,0x7d,0x69,0x7e,0x13,0x72,0x61,0x6d,0x61,0x7e,0x14, +0x66,0x69,0x6e,0x61,0x6c,0x7d,4,0x61,0x51,0x67,0x53,0x70,0x28,0x75,0x30,0x79, +0x57,0x54,0x12,0x61,0x63,0x65,0x55,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0x53, +0x15,0x6e,0x6b,0x6e,0x6f,0x77,0x6e,0x21,0x6e,0x60,0x6f,0xa2,0x41,0x70,0xa2,0x50, +0x71,0xa2,0x6e,0x72,1,0x65,0x24,0x69,0x6f,0x1e,0x67,0x69,0x6f,0x6e,0x61,0x6c, +0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x6f,4,0x65,0x3e,0x6c,0x5b,0x6f, +0x46,0x73,0x45,0x75,0x46,0x14,0x6d,0x65,0x72,0x69,0x63,0x47,0x15,0x78,0x74,0x6c, +0x69,0x6e,0x65,0x5b,0x17,0x6e,0x73,0x74,0x61,0x72,0x74,0x65,0x72,0x45,0x10,0x70, +0x48,0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x49, +1,0x6f,0x3e,0x72,0x4c,0x1a,0x65,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69, +0x63,0x4d,0x4a,0x1b,0x73,0x74,0x66,0x69,0x78,0x6e,0x75,0x6d,0x65,0x72,0x69,0x63, +0x4b,0x10,0x75,0x4e,0x16,0x6f,0x74,0x61,0x74,0x69,0x6f,0x6e,0x4f,0x68,0x7b,0x68, +0x50,0x69,0x86,0x6a,0xa2,0x61,0x6c,0xa2,0x65,0x6d,0x1c,0x61,0x6e,0x64,0x61,0x74, +0x6f,0x72,0x79,0x62,0x72,0x65,0x61,0x6b,0x2d,4,0x32,0x5f,0x33,0x61,0x65,0x34, +0x6c,0x6d,0x79,0x3a,0x13,0x70,0x68,0x65,0x6e,0x3b,0x19,0x62,0x72,0x65,0x77,0x6c, +0x65,0x74,0x74,0x65,0x72,0x6d,2,0x64,0x28,0x6e,0x3c,0x73,0x41,0x3c,0x18,0x65, +0x6f,0x67,0x72,0x61,0x70,0x68,0x69,0x63,0x3d,0x3e,1,0x66,0x3e,0x73,0x11,0x65, +0x70,1,0x61,0x22,0x65,0x14,0x72,0x61,0x62,0x6c,0x65,0x3f,0x18,0x69,0x78,0x6e, +0x75,0x6d,0x65,0x72,0x69,0x63,0x41,2,0x6c,0x63,0x74,0x65,0x76,0x67,1,0x66, +0x43,0x69,0x15,0x6e,0x65,0x66,0x65,0x65,0x64,0x43,0x61,0x42,0x62,0xa2,0x49,0x63, +0xa2,0x76,0x65,0xa2,0xfc,0x67,0x10,0x6c,0x38,0x11,0x75,0x65,0x39,5,0x6d,0xf, +0x6d,0x28,0x70,0x79,0x73,0x7b,0x16,0x62,0x69,0x67,0x75,0x6f,0x75,0x73,0x23,0x69, +0x23,0x6b,0x38,0x6c,0x24,0x17,0x70,0x68,0x61,0x62,0x65,0x74,0x69,0x63,0x25,0x76, +0x13,0x73,0x61,0x72,0x61,0x76,1,0x70,0x2e,0x73,0x13,0x74,0x61,0x72,0x74,0x7b, +0x15,0x72,0x65,0x62,0x61,0x73,0x65,0x79,4,0x32,0x27,0x61,0x29,0x62,0x2b,0x6b, +0x2d,0x72,0x12,0x65,0x61,0x6b,2,0x61,0x36,0x62,0x3e,0x73,0x15,0x79,0x6d,0x62, +0x6f,0x6c,0x73,0x57,0x13,0x66,0x74,0x65,0x72,0x29,1,0x65,0x2a,0x6f,0x11,0x74, +0x68,0x27,0x13,0x66,0x6f,0x72,0x65,0x2b,7,0x6d,0x51,0x6d,0x33,0x6f,0x28,0x70, +0x69,0x72,0x35,1,0x6d,0x76,0x6e,1,0x64,0x3c,0x74,0x1a,0x69,0x6e,0x67,0x65, +0x6e,0x74,0x62,0x72,0x65,0x61,0x6b,0x2f,0x15,0x69,0x74,0x69,0x6f,0x6e,0x61,0x1f, +0x6c,0x6a,0x61,0x70,0x61,0x6e,0x65,0x73,0x65,0x73,0x74,0x61,0x72,0x74,0x65,0x72, +0x6b,1,0x62,0x3a,0x70,0x19,0x6c,0x65,0x78,0x63,0x6f,0x6e,0x74,0x65,0x78,0x74, +0x51,0x18,0x69,0x6e,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0x33,0x61,0x6a,0x62,0x2f, +0x6a,0x6b,0x6c,0x30,0x13,0x6f,0x73,0x65,0x70,1,0x61,0x38,0x75,0x18,0x6e,0x63, +0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0x31,0x18,0x72,0x65,0x6e,0x74,0x68,0x65,0x73, +0x69,0x73,0x69,0x1b,0x72,0x72,0x69,0x61,0x67,0x65,0x72,0x65,0x74,0x75,0x72,0x6e, +0x35,2,0x62,0x3e,0x6d,0x46,0x78,0x36,0x18,0x63,0x6c,0x61,0x6d,0x61,0x74,0x69, +0x6f,0x6e,0x37,0x70,0x12,0x61,0x73,0x65,0x71,0x72,0x16,0x6f,0x64,0x69,0x66,0x69, +0x65,0x72,0x73,1,0x64,0x42,0x6e,1,0x6f,0x32,0x75,0x26,0x14,0x6d,0x65,0x72, +0x69,0x63,0x27,0x11,0x6e,0x65,0x21,1,0x65,0x2e,0x69,0x24,0x12,0x67,0x69,0x74, +0x25,0x22,0x14,0x63,0x69,0x6d,0x61,0x6c,0x23,0,0x18,0x6e,0xc4,0x6f,0x74,0xc1, +0x91,0x77,0x96,0x77,0xa2,0x4c,0x78,0xa2,0x70,0x79,0xa2,0x7a,0x7a,6,0x73,0x1e, +0x73,0x34,0x78,0x42,0x79,0x48,0x7a,0x11,0x7a,0x7a,0xa3,0x67,0x10,0x79,1,0x65, +0xa3,0xae,0x6d,0xa3,0x81,0x11,0x78,0x78,0xa3,0x66,0x11,0x79,0x79,0x21,0x61,0x30, +0x69,0x58,0x6d,0x11,0x74,0x68,0xa3,0x80,0x10,0x6e,1,0x61,0x26,0x62,0xa3,0xb1, +0x1a,0x62,0x61,0x7a,0x61,0x72,0x73,0x71,0x75,0x61,0x72,0x65,0xa3,0xb1,0x11,0x6e, +0x68,0x23,2,0x61,0x30,0x63,0x5a,0x6f,0x11,0x6c,0x65,0xa3,0x9b,1,0x6e,0x3c, +0x72,0x10,0x61,0xa2,0x92,0x15,0x6e,0x67,0x63,0x69,0x74,0x69,0xa3,0x92,0x12,0x63, +0x68,0x6f,0xa3,0xbc,0x11,0x68,0x6f,0xa3,0xbc,1,0x70,0x2c,0x73,0x11,0x75,0x78, +0xa3,0x65,0x11,0x65,0x6f,0x9b,1,0x65,0x2c,0x69,0x72,0x11,0x69,0x69,0x73,0x11, +0x7a,0x69,0xa2,0xc0,0x11,0x64,0x69,0xa3,0xc0,0x74,0x66,0x75,0xa2,0xde,0x76,1, +0x61,0x48,0x69,1,0x73,0x38,0x74,0x10,0x68,0xa2,0xc5,0x13,0x6b,0x75,0x71,0x69, +0xa3,0xc5,0x10,0x70,0xa3,0x64,0x10,0x69,0xa2,0x63,0x10,0x69,0xa3,0x63,7,0x68, +0x3e,0x68,0x34,0x69,0x48,0x6e,0x86,0x6f,0x11,0x74,0x6f,0xa3,0xc4,0x10,0x61,1, +0x61,0x24,0x69,0x6d,0x6a,0x11,0x6e,0x61,0x6b,2,0x62,0x3a,0x66,0x4a,0x72,0x10, +0x68,0xa2,0x9e,0x12,0x75,0x74,0x61,0xa3,0x9e,1,0x65,0x24,0x74,0x6f,0x12,0x74, +0x61,0x6e,0x6f,0x14,0x69,0x6e,0x61,0x67,0x68,0x99,0x11,0x73,0x61,0xa3,0xc3,0x61, +0x36,0x65,0xa2,0x65,0x66,0xa2,0x71,0x67,0x11,0x6c,0x67,0x75,6,0x6c,0x28,0x6c, +0x32,0x6d,0x38,0x6e,0x44,0x76,0x10,0x74,0xa3,0x7f,1,0x65,0x89,0x75,0x97,1, +0x69,0x24,0x6c,0x67,0x10,0x6c,0x67,0x10,0x67,0xa2,0x9a,1,0x73,0x2a,0x75,0x10, +0x74,0xa3,0x9a,0x10,0x61,0xa3,0xc3,0x67,0x36,0x69,0x52,0x6b,0x10,0x72,0xa2,0x99, +0x10,0x69,0xa3,0x99,1,0x61,0x30,0x62,0x7a,0x13,0x61,0x6e,0x77,0x61,0x7b,0x12, +0x6c,0x6f,0x67,0x75,2,0x6c,0x32,0x74,0x34,0x76,0x12,0x69,0x65,0x74,0xa3,0x7f, +0x10,0x65,0x89,0x12,0x68,0x61,0x6d,0xa3,0x6a,1,0x6c,0x2a,0x6e,0x10,0x67,0xa3, +0x62,0x10,0x75,0x68,0x11,0x67,0x75,0x69,0x11,0x6e,0x67,0x99,1,0x67,0x32,0x6e, +0x14,0x6b,0x6e,0x6f,0x77,0x6e,0xa3,0x67,0x11,0x61,0x72,0x8a,0x13,0x69,0x74,0x69, +0x63,0x8b,0x71,0xc1,0x13,0x71,0xa2,0xde,0x72,0xa2,0xe3,0x73,6,0x69,0x8a,0x69, +0x72,0x6f,0xa2,0x4c,0x75,0xa2,0x75,0x79,1,0x6c,0x46,0x72,4,0x63,0x65,0x65, +0xa3,0x5f,0x69,0x2c,0x6a,0xa3,0x60,0x6e,0xa3,0x61,0x11,0x61,0x63,0x65,0x10,0x6f, +0x94,0x16,0x74,0x69,0x6e,0x61,0x67,0x72,0x69,0x95,2,0x64,0x3c,0x67,0x4c,0x6e, +1,0x64,0xa3,0x91,0x68,0x62,0x12,0x61,0x6c,0x61,0x63,0x10,0x64,0xa2,0xa6,0x12, +0x68,0x61,0x6d,0xa3,0xa6,0x17,0x6e,0x77,0x72,0x69,0x74,0x69,0x6e,0x67,0xa3,0x70, +2,0x67,0x3a,0x72,0x52,0x79,0x10,0x6f,0xa2,0xb0,0x12,0x6d,0x62,0x6f,0xa3,0xb0, +1,0x64,0x26,0x6f,0xa3,0xb8,0xa2,0xb7,0x12,0x69,0x61,0x6e,0xa3,0xb7,0x10,0x61, +0xa2,0x98,0x16,0x73,0x6f,0x6d,0x70,0x65,0x6e,0x67,0xa3,0x98,0x11,0x6e,0x64,0xa2, +0x71,0x14,0x61,0x6e,0x65,0x73,0x65,0xa3,0x71,0x61,0x5c,0x67,0xa2,0x43,0x68,1, +0x61,0x2a,0x72,0x10,0x64,0xa3,0x97,2,0x72,0x28,0x76,0x30,0x77,0x87,0x12,0x61, +0x64,0x61,0xa3,0x97,0x12,0x69,0x61,0x6e,0x87,2,0x6d,0x40,0x72,0x58,0x75,0x10, +0x72,0xa2,0x6f,0x15,0x61,0x73,0x68,0x74,0x72,0x61,0xa3,0x6f,1,0x61,0x26,0x72, +0xa3,0x7e,0x14,0x72,0x69,0x74,0x61,0x6e,0xa3,0x7e,1,0x61,0xa3,0x5e,0x62,0xa3, +0x85,0x11,0x6e,0x77,0xa3,0x70,0x11,0x61,0x61,1,0x63,0x2f,0x69,0x23,3,0x65, +0x3e,0x6a,0x48,0x6f,0x4e,0x75,0x10,0x6e,1,0x69,0x24,0x72,0x61,0x10,0x63,0x61, +0x13,0x6a,0x61,0x6e,0x67,0xa3,0x6e,0x11,0x6e,0x67,0xa3,0x6e,1,0x68,0x2a,0x72, +0x10,0x6f,0xa3,0x5d,0x10,0x67,0xa3,0xb6,0x6e,0xa2,0x83,0x6f,0xa4,1,0x70,5, +0x6c,0x1e,0x6c,0x44,0x72,0x4a,0x73,0x1b,0x61,0x6c,0x74,0x65,0x72,0x70,0x61,0x68, +0x6c,0x61,0x76,0x69,0xa3,0x7b,0x11,0x72,0x64,0xa3,0x5c,0x11,0x74,0x69,0xa3,0x7d, +0x61,0x7c,0x65,0xa2,0x54,0x68,3,0x61,0x3e,0x6c,0x4e,0x6e,0x5e,0x6f,0x16,0x65, +0x6e,0x69,0x63,0x69,0x61,0x6e,0xa3,0x5b,0x10,0x67,0xa2,0x5a,0x12,0x73,0x70,0x61, +0xa3,0x5a,2,0x69,0xa3,0x7a,0x70,0xa3,0x7b,0x76,0xa3,0x7c,0x10,0x78,0xa3,0x5b, +2,0x68,0x3e,0x6c,0x50,0x75,0x10,0x63,0xa2,0xa5,0x14,0x69,0x6e,0x68,0x61,0x75, +0xa3,0xa5,0x17,0x61,0x77,0x68,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0x4b,0x10,0x6d,0xa2, +0x90,0x14,0x79,0x72,0x65,0x6e,0x65,0xa3,0x90,0x11,0x72,0x6d,0xa3,0x59,6,0x6b, +0x36,0x6b,0x56,0x73,0x6e,0x75,0x74,0x79,0x11,0x69,0x61,0x1f,0x6b,0x65,0x6e,0x67, +0x70,0x75,0x61,0x63,0x68,0x75,0x65,0x68,0x6d,0x6f,0x6e,0x67,0xa3,0xba,1,0x67, +0x2e,0x6f,0xa2,0x57,0x10,0x6f,0xa3,0x57,0x10,0x62,0xa3,0x84,0x11,0x68,0x75,0xa3, +0x96,0x12,0x73,0x68,0x75,0xa3,0x96,0x61,0x42,0x62,0x9e,0x65,0x10,0x77,1,0x61, +0xa3,0xaa,0x74,0x14,0x61,0x69,0x6c,0x75,0x65,0x97,3,0x62,0x32,0x67,0x40,0x6e, +0x56,0x72,0x10,0x62,0xa3,0x8e,0x15,0x61,0x74,0x61,0x65,0x61,0x6e,0xa3,0x8f,0x10, +0x6d,0xa2,0xc7,0x15,0x75,0x6e,0x64,0x61,0x72,0x69,0xa3,0xc7,0x10,0x64,0xa2,0xbb, +0x16,0x69,0x6e,0x61,0x67,0x61,0x72,0x69,0xa3,0xbb,0x11,0x61,0x74,0xa3,0x8f,4, +0x67,0x3c,0x6c,0x4e,0x72,0xa2,0x8e,0x73,0xa2,0x9c,0x75,0x11,0x67,0x72,0xa3,0xc2, +1,0x61,0x2a,0x68,0x11,0x61,0x6d,0x5b,0x10,0x6d,0x5b,1,0x63,0xa2,0x6a,0x64, +6,0x70,0x41,0x70,0x3a,0x73,0x58,0x74,0x86,0x75,0x14,0x79,0x67,0x68,0x75,0x72, +0xa3,0xc2,0x11,0x65,0x72,1,0x6d,0x2c,0x73,0x12,0x69,0x61,0x6e,0x9b,0x11,0x69, +0x63,0xa3,0x59,0x10,0x6f,1,0x67,0x3a,0x75,0x18,0x74,0x68,0x61,0x72,0x61,0x62, +0x69,0x61,0x6e,0xa3,0x85,0x13,0x64,0x69,0x61,0x6e,0xa3,0xb8,0x14,0x75,0x72,0x6b, +0x69,0x63,0xa3,0x58,0x68,0x42,0x69,0x54,0x6e,0x1a,0x6f,0x72,0x74,0x68,0x61,0x72, +0x61,0x62,0x69,0x61,0x6e,0xa3,0x8e,0x17,0x75,0x6e,0x67,0x61,0x72,0x69,0x61,0x6e, +0xa3,0x4c,0x14,0x74,0x61,0x6c,0x69,0x63,0x5d,1,0x68,0x26,0x6b,0xa3,0x6d,0x12, +0x69,0x6b,0x69,0xa3,0x6d,2,0x69,0x2c,0x6b,0x30,0x79,0x10,0x61,0x5f,0x11,0x79, +0x61,0x5f,0x10,0x68,0xa3,0x58,2,0x61,0x36,0x67,0x3c,0x6d,0x10,0x61,0x84,0x12, +0x6e,0x79,0x61,0x85,0x11,0x67,0x65,0xa3,0xab,0x10,0x65,0xa3,0xab,0x68,0xc3,0x15, +0x6b,0xc2,0x2c,0x6b,0xa4,0x17,0x6c,0xa4,0xba,0x6d,8,0x6f,0x46,0x6f,0x48,0x72, +0x74,0x74,0x80,0x75,0x86,0x79,1,0x61,0x28,0x6d,0x10,0x72,0x59,0x13,0x6e,0x6d, +0x61,0x72,0x59,2,0x64,0x2e,0x6e,0x32,0x6f,0x10,0x6e,0xa3,0x72,0x10,0x69,0xa3, +0xa3,0x10,0x67,0x56,0x14,0x6f,0x6c,0x69,0x61,0x6e,0x57,0x10,0x6f,0xa2,0x95,0x10, +0x6f,0xa3,0x95,0x11,0x65,0x69,0xa3,0x73,0x11,0x6c,0x74,0xa2,0xa4,0x12,0x61,0x6e, +0x69,0xa3,0xa4,0x61,0x36,0x65,0xa2,0x67,0x69,0xa2,0xbd,0x6c,0x11,0x79,0x6d,0x55, +6,0x6e,0x38,0x6e,0x32,0x72,0x5c,0x73,0x6c,0x79,0x10,0x61,0xa3,0x55,1,0x64, +0x38,0x69,0xa2,0x79,0x15,0x63,0x68,0x61,0x65,0x61,0x6e,0xa3,0x79,0xa2,0x54,0x12, +0x61,0x69,0x63,0xa3,0x54,0x10,0x63,0xa2,0xa9,0x12,0x68,0x65,0x6e,0xa3,0xa9,0x18, +0x61,0x72,0x61,0x6d,0x67,0x6f,0x6e,0x64,0x69,0xa3,0xaf,0x68,0x36,0x6b,0x4c,0x6c, +0x15,0x61,0x79,0x61,0x6c,0x61,0x6d,0x55,1,0x61,0x26,0x6a,0xa3,0xa0,0x13,0x6a, +0x61,0x6e,0x69,0xa3,0xa0,0x10,0x61,0xa2,0xb4,0x12,0x73,0x61,0x72,0xa3,0xb4,3, +0x64,0x78,0x65,0x94,0x6e,0xa2,0x42,0x72,1,0x63,0xa3,0x8d,0x6f,0xa2,0x56,0x13, +0x69,0x74,0x69,0x63,1,0x63,0x3c,0x68,0x19,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79, +0x70,0x68,0x73,0xa3,0x56,0x15,0x75,0x72,0x73,0x69,0x76,0x65,0xa3,0x8d,1,0x65, +0x26,0x66,0xa3,0xb5,0x16,0x66,0x61,0x69,0x64,0x72,0x69,0x6e,0xa3,0xb5,0x17,0x74, +0x65,0x69,0x6d,0x61,0x79,0x65,0x6b,0xa3,0x73,0x10,0x64,0xa2,0x8c,0x17,0x65,0x6b, +0x69,0x6b,0x61,0x6b,0x75,0x69,0xa3,0x8c,0x11,0x61,0x6f,0xa3,0x5c,6,0x6e,0x1a, +0x6e,0x34,0x6f,0x38,0x70,0x3e,0x74,0x11,0x68,0x69,0xa3,0x78,0x11,0x64,0x61,0x4b, +0x11,0x72,0x65,0xa3,0x77,0x11,0x65,0x6c,0xa3,0x8a,0x61,0x32,0x68,0xa2,0x44,0x69, +0x11,0x74,0x73,0xa3,0xbf,5,0x74,0x23,0x74,0x34,0x77,0x56,0x79,0x13,0x61,0x68, +0x6c,0x69,0xa3,0x4f,0x14,0x61,0x6b,0x61,0x6e,0x61,0x4c,0x19,0x6f,0x72,0x68,0x69, +0x72,0x61,0x67,0x61,0x6e,0x61,0x8d,0x10,0x69,0xa3,0xc6,0x69,0x38,0x6c,0x40,0x6e, +1,0x61,0x4d,0x6e,0x12,0x61,0x64,0x61,0x4b,0x12,0x74,0x68,0x69,0xa3,0x78,0x10, +0x69,0xa3,0x4f,4,0x61,0x40,0x69,0x52,0x6d,0x70,0x6f,0x7c,0x75,0x15,0x64,0x61, +0x77,0x61,0x64,0x69,0xa3,0x91,0x10,0x72,0x92,0x15,0x6f,0x73,0x68,0x74,0x68,0x69, +0x93,0x1d,0x74,0x61,0x6e,0x73,0x6d,0x61,0x6c,0x6c,0x73,0x63,0x72,0x69,0x70,0x74, +0xa3,0xbf,1,0x65,0x24,0x72,0x4f,0x10,0x72,0x4f,0x10,0x6a,0xa2,0x9d,0x11,0x6b, +0x69,0xa3,0x9d,4,0x61,0x5c,0x65,0x90,0x69,0xa0,0x6f,0xa2,0x5d,0x79,1,0x63, +0x34,0x64,0x10,0x69,0xa2,0x6c,0x11,0x61,0x6e,0xa3,0x6c,0x10,0x69,0xa2,0x6b,0x11, +0x61,0x6e,0xa3,0x6b,2,0x6e,0x42,0x6f,0x46,0x74,3,0x66,0xa3,0x50,0x67,0xa3, +0x51,0x69,0x24,0x6e,0x53,0x10,0x6e,0x53,0x10,0x61,0xa3,0x6a,0x50,0x10,0x6f,0x51, +0x11,0x70,0x63,0xa2,0x52,0x11,0x68,0x61,0xa3,0x52,2,0x6d,0x2e,0x6e,0x36,0x73, +0x10,0x75,0xa3,0x83,0x10,0x62,0x80,0x10,0x75,0x81,2,0x61,0xa3,0x53,0x62,0x83, +0x65,0x11,0x61,0x72,1,0x61,0xa3,0x53,0x62,0x83,0x11,0x6d,0x61,0xa3,0x8b,0x68, +0x6e,0x69,0xa2,0x95,0x6a,2,0x61,0x30,0x70,0x52,0x75,0x11,0x72,0x63,0xa3,0x94, +1,0x6d,0x38,0x76,0x10,0x61,0xa2,0x4e,0x13,0x6e,0x65,0x73,0x65,0xa3,0x4e,0x10, +0x6f,0xa3,0xad,0x11,0x61,0x6e,0xa3,0x69,6,0x6c,0x1e,0x6c,0x34,0x6d,0x3a,0x72, +0x48,0x75,0x11,0x6e,0x67,0xa3,0x4c,0x11,0x75,0x77,0xa3,0x9c,0x10,0x6e,1,0x67, +0xa3,0x4b,0x70,0xa3,0xba,0x11,0x6b,0x74,0x8d,0x61,0x3c,0x65,0xa2,0x43,0x69,0x11, +0x72,0x61,0x48,0x13,0x67,0x61,0x6e,0x61,0x49,1,0x6e,0x34,0x74,0x10,0x72,0xa2, +0xa2,0x11,0x61,0x6e,0xa3,0xa2,0x42,6,0x6f,0xe,0x6f,0x77,0x73,0xa3,0x49,0x74, +0xa3,0x4a,0x75,0x12,0x6e,0x6f,0x6f,0x77,0x62,0xa3,0xac,0x67,0x3e,0x69,0x42,0x19, +0x66,0x69,0x72,0x6f,0x68,0x69,0x6e,0x67,0x79,0x61,0xa3,0xb6,0x44,0x11,0x75,0x6c, +0x45,0x11,0x62,0x72,0x46,0x11,0x65,0x77,0x47,2,0x6d,0x2e,0x6e,0x4a,0x74,0x11, +0x61,0x6c,0x5d,0x1c,0x70,0x65,0x72,0x69,0x61,0x6c,0x61,0x72,0x61,0x6d,0x61,0x69, +0x63,0xa3,0x74,2,0x64,0x66,0x68,0x6a,0x73,0x1b,0x63,0x72,0x69,0x70,0x74,0x69, +0x6f,0x6e,0x61,0x6c,0x70,0x61,1,0x68,0x32,0x72,0x14,0x74,0x68,0x69,0x61,0x6e, +0xa3,0x7d,0x13,0x6c,0x61,0x76,0x69,0xa3,0x7a,0x10,0x73,0xa3,0x4d,0x15,0x65,0x72, +0x69,0x74,0x65,0x64,0x23,0x64,0xc1,0xd,0x64,0xa2,0x7a,0x65,0xa2,0xc1,0x67,4, +0x65,0x82,0x6c,0x9a,0x6f,0xa2,0x46,0x72,0xa2,0x55,0x75,2,0x6a,0x3c,0x6e,0x4e, +0x72,1,0x6d,0x24,0x75,0x41,0x13,0x75,0x6b,0x68,0x69,0x41,1,0x61,0x24,0x72, +0x3f,0x13,0x72,0x61,0x74,0x69,0x3f,0x18,0x6a,0x61,0x6c,0x61,0x67,0x6f,0x6e,0x64, +0x69,0xa3,0xb3,0x10,0x6f,1,0x6b,0xa3,0x48,0x72,0x38,0x13,0x67,0x69,0x61,0x6e, +0x39,0x11,0x61,0x67,0x90,0x15,0x6f,0x6c,0x69,0x74,0x69,0x63,0x91,1,0x6e,0x30, +0x74,0x10,0x68,0x3a,0x11,0x69,0x63,0x3b,1,0x67,0xa3,0xb3,0x6d,0xa3,0xaf,1, +0x61,0x32,0x65,1,0x65,0x24,0x6b,0x3d,0x10,0x6b,0x3d,0x10,0x6e,0xa2,0x89,0x12, +0x74,0x68,0x61,0xa3,0x89,4,0x65,0x46,0x69,0x6c,0x6f,0x8c,0x73,0x9a,0x75,0x11, +0x70,0x6c,0xa2,0x87,0x13,0x6f,0x79,0x61,0x6e,0xa3,0x87,1,0x73,0x38,0x76,0x10, +0x61,0x34,0x15,0x6e,0x61,0x67,0x61,0x72,0x69,0x35,0x13,0x65,0x72,0x65,0x74,0x33, +1,0x61,0x36,0x76,0x16,0x65,0x73,0x61,0x6b,0x75,0x72,0x75,0xa3,0xbe,0x10,0x6b, +0xa3,0xbe,0x11,0x67,0x72,0xa2,0xb2,0x10,0x61,0xa3,0xb2,0x11,0x72,0x74,0x33,2, +0x67,0x3a,0x6c,0x72,0x74,0x11,0x68,0x69,0x36,0x13,0x6f,0x70,0x69,0x63,0x37,0x10, +0x79,2,0x64,0xa3,0x45,0x68,0xa3,0x46,0x70,0xa2,0x47,0x1e,0x74,0x69,0x61,0x6e, +0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79,0x70,0x68,0x73,0xa3,0x47,1,0x62,0x36, +0x79,0x10,0x6d,0xa2,0xb9,0x12,0x61,0x69,0x63,0xa3,0xb9,0x10,0x61,0xa2,0x88,0x12, +0x73,0x61,0x6e,0xa3,0x88,0x61,0xa2,0xc9,0x62,0xa4,0x2e,0x63,6,0x6f,0x52,0x6f, +0x76,0x70,0x92,0x75,0xa2,0x41,0x79,1,0x70,0x3e,0x72,2,0x69,0x2a,0x6c,0x31, +0x73,0xa3,0x44,0x13,0x6c,0x6c,0x69,0x63,0x31,0x10,0x72,1,0x69,0x34,0x6f,0x15, +0x6d,0x69,0x6e,0x6f,0x61,0x6e,0xa3,0xc1,0x11,0x6f,0x74,0x7f,1,0x6d,0x30,0x70, +0x10,0x74,0x2e,0x11,0x69,0x63,0x2f,0x12,0x6d,0x6f,0x6e,0x21,1,0x6d,0x28,0x72, +0x10,0x74,0x7f,0x10,0x6e,0xa3,0xc1,0x16,0x6e,0x65,0x69,0x66,0x6f,0x72,0x6d,0xa3, +0x65,0x61,0x32,0x68,0xa2,0x41,0x69,0x11,0x72,0x74,0xa3,0x43,3,0x6b,0x4c,0x6e, +0x50,0x72,0x76,0x75,0x1d,0x63,0x61,0x73,0x69,0x61,0x6e,0x61,0x6c,0x62,0x61,0x6e, +0x69,0x61,0x6e,0xa3,0x9f,0x10,0x6d,0xa3,0x76,1,0x61,0x24,0x73,0x71,0x1d,0x64, +0x69,0x61,0x6e,0x61,0x62,0x6f,0x72,0x69,0x67,0x69,0x6e,0x61,0x6c,0x71,0x10,0x69, +0xa2,0x68,0x11,0x61,0x6e,0xa3,0x68,3,0x61,0x32,0x65,0x44,0x6f,0x52,0x72,0x10, +0x73,0xa3,0xbd,1,0x6b,0x26,0x6d,0xa3,0x42,0x11,0x6d,0x61,0xa3,0x76,0x10,0x72, +0x2c,0x13,0x6f,0x6b,0x65,0x65,0x2d,0x16,0x72,0x61,0x73,0x6d,0x69,0x61,0x6e,0xa3, +0xbd,6,0x68,0x4a,0x68,0x48,0x6e,0x4e,0x72,0x76,0x76,1,0x65,0x2a,0x73,0x10, +0x74,0xa3,0x75,0x13,0x73,0x74,0x61,0x6e,0xa3,0x75,0x11,0x6f,0x6d,0xa3,0xa1,0x11, +0x61,0x74,0x1f,0x6f,0x6c,0x69,0x61,0x6e,0x68,0x69,0x65,0x72,0x6f,0x67,0x6c,0x79, +0x70,0x68,0x73,0xa3,0x9c,1,0x61,0x3e,0x6d,2,0x65,0x2a,0x69,0xa3,0x74,0x6e, +0x27,0x13,0x6e,0x69,0x61,0x6e,0x27,0x10,0x62,0x24,0x11,0x69,0x63,0x25,0x64,0x30, +0x66,0x44,0x67,0x11,0x68,0x62,0xa3,0x9f,0x10,0x6c,1,0x61,0x26,0x6d,0xa3,0xa7, +0x10,0x6d,0xa3,0xa7,0x11,0x61,0x6b,0xa3,0x93,6,0x6c,0x3c,0x6c,0x52,0x6f,0x56, +0x72,0x66,0x75,1,0x67,0x30,0x68,1,0x64,0x79,0x69,0x10,0x64,0x79,0x10,0x69, +0x8e,0x13,0x6e,0x65,0x73,0x65,0x8f,0x11,0x69,0x73,0xa1,0x11,0x70,0x6f,0x2a,0x13, +0x6d,0x6f,0x66,0x6f,0x2b,0x10,0x61,1,0x68,0x2e,0x69,0x7c,0x12,0x6c,0x6c,0x65, +0x7d,0xa2,0x41,0x11,0x6d,0x69,0xa3,0x41,0x61,0x48,0x65,0x9c,0x68,1,0x61,0x2a, +0x6b,0x10,0x73,0xa3,0xa8,0x15,0x69,0x6b,0x73,0x75,0x6b,0x69,0xa3,0xa8,3,0x6c, +0x3a,0x6d,0x48,0x73,0x54,0x74,1,0x61,0x24,0x6b,0x9f,0x10,0x6b,0x9f,0x10,0x69, +0x9c,0x13,0x6e,0x65,0x73,0x65,0x9d,0x10,0x75,0xa2,0x82,0x10,0x6d,0xa3,0x82,0x10, +0x73,0xa2,0x86,0x13,0x61,0x76,0x61,0x68,0xa3,0x86,0x11,0x6e,0x67,0x28,0x12,0x61, +0x6c,0x69,0x29,3,0x6c,0x42,0x6e,0x90,0x74,0xa2,0x46,0x76,0x24,0x17,0x6f,0x77, +0x65,0x6c,0x6a,0x61,0x6d,0x6f,0x25,0x22,1,0x65,0x54,0x76,0x28,1,0x73,0x38, +0x74,0x2a,0x17,0x73,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x2b,0x16,0x79,0x6c,0x6c, +0x61,0x62,0x6c,0x65,0x29,0x18,0x61,0x64,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x23, +1,0x61,0x21,0x6f,0x1a,0x74,0x61,0x70,0x70,0x6c,0x69,0x63,0x61,0x62,0x6c,0x65, +0x21,0x26,0x1a,0x72,0x61,0x69,0x6c,0x69,0x6e,0x67,0x6a,0x61,0x6d,0x6f,0x27,1, +0x6e,0x2c,0x79,0x22,0x11,0x65,0x73,0x23,0x20,0x10,0x6f,0x21,1,0x6e,0x2c,0x79, +0x22,0x11,0x65,0x73,0x23,0x20,0x10,0x6f,0x21,2,0x6d,0x30,0x6e,0x3a,0x79,0x22, +0x11,0x65,0x73,0x23,0x24,0x13,0x61,0x79,0x62,0x65,0x25,0x20,0x10,0x6f,0x21,2, +0x6d,0x30,0x6e,0x3a,0x79,0x22,0x11,0x65,0x73,0x23,0x24,0x13,0x61,0x79,0x62,0x65, +0x25,0x20,0x10,0x6f,0x21,0xb,0x72,0x39,0x76,0xc,0x76,0x33,0x78,0x2a,0x7a,0x11, +0x77,0x6a,0x43,0x10,0x78,0x21,0x72,0x28,0x73,0x50,0x74,0x31,1,0x65,0x24,0x69, +0x39,0x1e,0x67,0x69,0x6f,0x6e,0x61,0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f, +0x72,0x39,1,0x6d,0x35,0x70,0x18,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b, +0x35,0x6c,0x1f,0x6c,0x3c,0x6f,0x4a,0x70,1,0x70,0x37,0x72,0x14,0x65,0x70,0x65, +0x6e,0x64,0x37,0x28,1,0x66,0x2b,0x76,0x2c,0x10,0x74,0x2f,0x13,0x74,0x68,0x65, +0x72,0x21,0x63,0x4c,0x65,0x64,0x67,1,0x61,0x3a,0x6c,0x19,0x75,0x65,0x61,0x66, +0x74,0x65,0x72,0x7a,0x77,0x6a,0x41,0x10,0x7a,0x41,2,0x6e,0x23,0x6f,0x24,0x72, +0x25,0x14,0x6e,0x74,0x72,0x6f,0x6c,0x23,2,0x62,0x34,0x6d,0x4e,0x78,0x26,0x13, +0x74,0x65,0x6e,0x64,0x27,0x3a,1,0x61,0x24,0x67,0x3d,0x11,0x73,0x65,0x3a,0x12, +0x67,0x61,0x7a,0x3d,0x3e,0x16,0x6f,0x64,0x69,0x66,0x69,0x65,0x72,0x3f,9,0x6e, +0x4a,0x6e,0x34,0x6f,0x44,0x73,0x60,0x75,0x94,0x78,0x10,0x78,0x21,0x10,0x75,0x2a, +0x14,0x6d,0x65,0x72,0x69,0x63,0x2b,1,0x6c,0x2c,0x74,0x12,0x68,0x65,0x72,0x21, +0x14,0x65,0x74,0x74,0x65,0x72,0x2d,3,0x63,0x36,0x65,0x46,0x70,0x31,0x74,0x32, +0x12,0x65,0x72,0x6d,0x33,0x3c,0x16,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,0x3d,0x2e, +0x10,0x70,0x2f,0x10,0x70,0x34,0x12,0x70,0x65,0x72,0x35,0x61,0x46,0x63,0x52,0x65, +0x64,0x66,0x72,0x6c,2,0x65,0x2d,0x66,0x3b,0x6f,0x28,0x12,0x77,0x65,0x72,0x29, +0x10,0x74,0x22,0x12,0x65,0x72,0x6d,0x23,1,0x6c,0x24,0x72,0x37,0x24,0x12,0x6f, +0x73,0x65,0x25,0x10,0x78,0x38,0x13,0x74,0x65,0x6e,0x64,0x39,0x10,0x6f,0x26,0x13, +0x72,0x6d,0x61,0x74,0x27,0,0x10,0x6c,0x88,0x72,0x40,0x72,0x36,0x73,0x5e,0x77, +0x7a,0x78,0x8a,0x7a,0x11,0x77,0x6a,0x4b,1,0x65,0x24,0x69,0x3b,0x1e,0x67,0x69, +0x6f,0x6e,0x61,0x6c,0x69,0x6e,0x64,0x69,0x63,0x61,0x74,0x6f,0x72,0x3b,1,0x69, +0x24,0x71,0x3f,0x18,0x6e,0x67,0x6c,0x65,0x71,0x75,0x6f,0x74,0x65,0x3f,0x17,0x73, +0x65,0x67,0x73,0x70,0x61,0x63,0x65,0x4d,0x10,0x78,0x21,0x6c,0x36,0x6d,0x3c,0x6e, +0x76,0x6f,0x13,0x74,0x68,0x65,0x72,0x21,1,0x65,0x23,0x66,0x35,3,0x62,0x37, +0x69,0x28,0x6c,0x29,0x6e,0x2b,0x10,0x64,1,0x6c,0x34,0x6e,0x11,0x75,0x6d,0x2a, +0x12,0x6c,0x65,0x74,0x37,0x14,0x65,0x74,0x74,0x65,0x72,0x29,2,0x65,0x36,0x6c, +0x39,0x75,0x2c,0x14,0x6d,0x65,0x72,0x69,0x63,0x2d,0x14,0x77,0x6c,0x69,0x6e,0x65, +0x39,0x66,0x3f,0x66,0x40,0x67,0x4e,0x68,0x70,0x6b,0x10,0x61,0x26,0x15,0x74,0x61, +0x6b,0x61,0x6e,0x61,0x27,0x10,0x6f,0x24,0x13,0x72,0x6d,0x61,0x74,0x25,1,0x61, +0x3a,0x6c,0x19,0x75,0x65,0x61,0x66,0x74,0x65,0x72,0x7a,0x77,0x6a,0x49,0x10,0x7a, +0x49,1,0x65,0x24,0x6c,0x3d,0x19,0x62,0x72,0x65,0x77,0x6c,0x65,0x74,0x74,0x65, +0x72,0x3d,0x61,0x86,0x63,0x92,0x64,0x94,0x65,2,0x62,0x44,0x6d,0x5e,0x78,0x2e, +0x13,0x74,0x65,0x6e,0x64,0x32,0x15,0x6e,0x75,0x6d,0x6c,0x65,0x74,0x2f,0x42,1, +0x61,0x24,0x67,0x45,0x11,0x73,0x65,0x42,0x12,0x67,0x61,0x7a,0x45,0x46,0x16,0x6f, +0x64,0x69,0x66,0x69,0x65,0x72,0x47,0x15,0x6c,0x65,0x74,0x74,0x65,0x72,0x23,0x10, +0x72,0x31,1,0x6f,0x24,0x71,0x41,0x18,0x75,0x62,0x6c,0x65,0x71,0x75,0x6f,0x74, +0x65,0x41,2,0x63,0x32,0x6e,0x3c,0x6f,0x22,0x12,0x70,0x65,0x6e,0x23,0x24,0x13, +0x6c,0x6f,0x73,0x65,0x25,0x20,0x12,0x6f,0x6e,0x65,0x21,6,0x6f,0x65,0x6f,0x4a, +0x72,0x5c,0x74,0x64,0x76,0x1d,0x69,0x73,0x75,0x61,0x6c,0x6f,0x72,0x64,0x65,0x72, +0x6c,0x65,0x66,0x74,0x3d,0x18,0x76,0x65,0x72,0x73,0x74,0x72,0x75,0x63,0x6b,0x2d, +0x13,0x69,0x67,0x68,0x74,0x2f,0x11,0x6f,0x70,0x30,0x12,0x61,0x6e,0x64,2,0x62, +0x32,0x6c,0x62,0x72,0x13,0x69,0x67,0x68,0x74,0x3b,0x14,0x6f,0x74,0x74,0x6f,0x6d, +0x32,0x12,0x61,0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x35,0x12, +0x65,0x66,0x74,0x3f,0x12,0x65,0x66,0x74,0x36,0x17,0x61,0x6e,0x64,0x72,0x69,0x67, +0x68,0x74,0x39,0x62,0x2c,0x6c,0x5c,0x6e,0x10,0x61,0x21,0x14,0x6f,0x74,0x74,0x6f, +0x6d,0x22,0x12,0x61,0x6e,0x64,1,0x6c,0x2e,0x72,0x13,0x69,0x67,0x68,0x74,0x27, +0x12,0x65,0x66,0x74,0x25,0x12,0x65,0x66,0x74,0x28,0x17,0x61,0x6e,0x64,0x72,0x69, +0x67,0x68,0x74,0x2b,0xd,0x6e,0xaa,0x72,0x70,0x72,0x92,0x73,0xa2,0x46,0x74,0xa2, +0x54,0x76,1,0x69,0x60,0x6f,0x12,0x77,0x65,0x6c,0x62,1,0x64,0x3a,0x69,0x19, +0x6e,0x64,0x65,0x70,0x65,0x6e,0x64,0x65,0x6e,0x74,0x67,0x17,0x65,0x70,0x65,0x6e, +0x64,0x65,0x6e,0x74,0x65,1,0x72,0x2e,0x73,0x13,0x61,0x72,0x67,0x61,0x61,0x12, +0x61,0x6d,0x61,0x5f,0x1d,0x65,0x67,0x69,0x73,0x74,0x65,0x72,0x73,0x68,0x69,0x66, +0x74,0x65,0x72,0x57,0x1e,0x79,0x6c,0x6c,0x61,0x62,0x6c,0x65,0x6d,0x6f,0x64,0x69, +0x66,0x69,0x65,0x72,0x59,0x12,0x6f,0x6e,0x65,1,0x6c,0x2c,0x6d,0x12,0x61,0x72, +0x6b,0x5d,0x14,0x65,0x74,0x74,0x65,0x72,0x5b,0x6e,0x3c,0x6f,0x7c,0x70,0x18,0x75, +0x72,0x65,0x6b,0x69,0x6c,0x6c,0x65,0x72,0x55,1,0x6f,0x4c,0x75,1,0x6b,0x3c, +0x6d,0x12,0x62,0x65,0x72,0x50,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x53,0x11,0x74, +0x61,0x4f,0x16,0x6e,0x6a,0x6f,0x69,0x6e,0x65,0x72,0x4d,0x13,0x74,0x68,0x65,0x72, +0x21,0x67,0x3e,0x67,0x4a,0x69,0x64,0x6a,0x82,0x6d,0x1d,0x6f,0x64,0x69,0x66,0x79, +0x69,0x6e,0x67,0x6c,0x65,0x74,0x74,0x65,0x72,0x4b,0x1c,0x65,0x6d,0x69,0x6e,0x61, +0x74,0x69,0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x45,0x1e,0x6e,0x76,0x69,0x73,0x69,0x62, +0x6c,0x65,0x73,0x74,0x61,0x63,0x6b,0x65,0x72,0x47,0x14,0x6f,0x69,0x6e,0x65,0x72, +0x49,0x61,0xa2,0xba,0x62,0xa2,0xc0,0x63,1,0x61,0xa2,0xa2,0x6f,0x16,0x6e,0x73, +0x6f,0x6e,0x61,0x6e,0x74,0x2a,8,0x6b,0x67,0x6b,0x48,0x6d,0x52,0x70,0x5c,0x73, +0xa2,0x42,0x77,0x19,0x69,0x74,0x68,0x73,0x74,0x61,0x63,0x6b,0x65,0x72,0x43,0x14, +0x69,0x6c,0x6c,0x65,0x72,0x35,0x14,0x65,0x64,0x69,0x61,0x6c,0x37,1,0x6c,0x52, +0x72,0x10,0x65,1,0x63,0x2e,0x66,0x13,0x69,0x78,0x65,0x64,0x3d,0x19,0x65,0x64, +0x69,0x6e,0x67,0x72,0x65,0x70,0x68,0x61,0x3b,0x18,0x61,0x63,0x65,0x68,0x6f,0x6c, +0x64,0x65,0x72,0x39,0x10,0x75,1,0x62,0x3e,0x63,0x1b,0x63,0x65,0x65,0x64,0x69, +0x6e,0x67,0x72,0x65,0x70,0x68,0x61,0x41,0x15,0x6a,0x6f,0x69,0x6e,0x65,0x64,0x3f, +0x64,0x4c,0x66,0x52,0x68,0x5a,0x69,0x1e,0x6e,0x69,0x74,0x69,0x61,0x6c,0x70,0x6f, +0x73,0x74,0x66,0x69,0x78,0x65,0x64,0x33,0x12,0x65,0x61,0x64,0x2d,0x13,0x69,0x6e, +0x61,0x6c,0x2f,0x18,0x65,0x61,0x64,0x6c,0x65,0x74,0x74,0x65,0x72,0x31,0x1d,0x6e, +0x74,0x69,0x6c,0x6c,0x61,0x74,0x69,0x6f,0x6e,0x6d,0x61,0x72,0x6b,0x29,0x16,0x76, +0x61,0x67,0x72,0x61,0x68,0x61,0x23,1,0x69,0x4a,0x72,0x10,0x61,0x1f,0x68,0x6d, +0x69,0x6a,0x6f,0x69,0x6e,0x69,0x6e,0x67,0x6e,0x75,0x6d,0x62,0x65,0x72,0x27,0x12, +0x6e,0x64,0x75,0x25,2,0x72,0x38,0x74,0x46,0x75,0x26,0x15,0x70,0x72,0x69,0x67, +0x68,0x74,0x27,0x20,0x15,0x6f,0x74,0x61,0x74,0x65,0x64,0x21,1,0x72,0x24,0x75, +0x25,0x22,0x18,0x61,0x6e,0x73,0x66,0x6f,0x72,0x6d,0x65,0x64,1,0x72,0x32,0x75, +0x15,0x70,0x72,0x69,0x67,0x68,0x74,0x25,0x15,0x6f,0x74,0x61,0x74,0x65,0x64,0x23, +0xd,0x6e,0xc1,0x86,0x73,0xa8,0x73,0x4c,0x74,0xa2,0x76,0x75,0xa2,0x83,0x7a,0xd8, +0x70,0,2,0x6c,0xd9,0x20,0,0x70,0xd9,0x40,0,0x73,0xc3,0,0xfe,0xf, +0,0,0,7,0x6f,0x3c,0x6f,0xff,8,0,0,0,0x70,0x3a,0x75,0x6e, +0x79,0x13,0x6d,0x62,0x6f,0x6c,0xff,0xf,0,0,0,0x11,0x61,0x63,1,0x65, +0x34,0x69,0x15,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa5,0,0x18,0x73,0x65,0x70,0x61, +0x72,0x61,0x74,0x6f,0x72,0xc3,0,0x16,0x72,0x72,0x6f,0x67,0x61,0x74,0x65,0xe1, +0,0,0x63,0xff,2,0,0,0,0x65,0x38,0x6b,0xff,4,0,0,0, +0x6d,0xff,1,0,0,0,0x16,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xd9,0x70, +0,0x1d,0x69,0x74,0x6c,0x65,0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72, +0x31,1,0x6e,0x40,0x70,0x1c,0x70,0x65,0x72,0x63,0x61,0x73,0x65,0x6c,0x65,0x74, +0x74,0x65,0x72,0x25,0x17,0x61,0x73,0x73,0x69,0x67,0x6e,0x65,0x64,0x23,0x6e,0xa2, +0x69,0x6f,0xa2,0x89,0x70,0xfe,0x30,0xf8,0,0,9,0x69,0x33,0x69,0xff,0x10, +0,0,0,0x6f,0xfd,0x80,0,0,0x72,0x54,0x73,0xf9,0,0,0x75,0x12, +0x6e,0x63,0x74,0xfe,0x30,0xf8,0,0,0x15,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff, +0x30,0xf8,0,0,0x17,0x69,0x76,0x61,0x74,0x65,0x75,0x73,0x65,0xdd,0,0, +0x61,0x48,0x63,0xfd,0x40,0,0,0x64,0xe9,0,0,0x65,0xfd,0x20,0,0, +0x66,0xff,0x20,0,0,0,0x1f,0x72,0x61,0x67,0x72,0x61,0x70,0x68,0x73,0x65, +0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xd9,0x40,0,0xbe,0,3,0x64,0xa7,0, +0x6c,0xab,0,0x6f,0x30,0x75,0x13,0x6d,0x62,0x65,0x72,0xbf,0,0xb2,0,0x1b, +0x6e,0x73,0x70,0x61,0x63,0x69,0x6e,0x67,0x6d,0x61,0x72,0x6b,0xa1,1,0x70,0x92, +0x74,0x12,0x68,0x65,0x72,0xe6,0x80,1,3,0x6c,0x40,0x6e,0x4a,0x70,0x56,0x73, +0x14,0x79,0x6d,0x62,0x6f,0x6c,0xff,8,0,0,0,0x14,0x65,0x74,0x74,0x65, +0x72,0x61,0x14,0x75,0x6d,0x62,0x65,0x72,0xb3,0,0x19,0x75,0x6e,0x63,0x74,0x75, +0x61,0x74,0x69,0x6f,0x6e,0xfd,0x80,0,0,0x1c,0x65,0x6e,0x70,0x75,0x6e,0x63, +0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xf9,0,0,0x66,0xc0,0xc4,0x66,0xa2,0x47, +0x69,0xa2,0x64,0x6c,0xa2,0x79,0x6d,0xa4,0xc0,4,0x61,0x6c,0x63,0xa5,0,0x65, +0xa3,0x80,0x6e,0xa1,0x6f,0x15,0x64,0x69,0x66,0x69,0x65,0x72,1,0x6c,0x38,0x73, +0x14,0x79,0x6d,0x62,0x6f,0x6c,0xff,4,0,0,0,0x14,0x65,0x74,0x74,0x65, +0x72,0x41,1,0x72,0x3c,0x74,0x16,0x68,0x73,0x79,0x6d,0x62,0x6f,0x6c,0xff,1, +0,0,0,0x10,0x6b,0xa5,0xc0,1,0x69,0x32,0x6f,0x13,0x72,0x6d,0x61,0x74, +0xdb,0,0,0x1d,0x6e,0x61,0x6c,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69, +0x6f,0x6e,0xff,0x20,0,0,0,0x10,0x6e,0x1f,0x69,0x74,0x69,0x61,0x6c,0x70, +0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xff,0x10,0,0,0,0x9c, +7,0x6d,0x18,0x6d,0x41,0x6f,0x28,0x74,0x31,0x75,0x25,0x60,0x1c,0x77,0x65,0x72, +0x63,0x61,0x73,0x65,0x6c,0x65,0x74,0x74,0x65,0x72,0x29,0x63,0x3d,0x65,0x28,0x69, +0x42,0x6c,0x29,0x13,0x74,0x74,0x65,0x72,0x9c,0x15,0x6e,0x75,0x6d,0x62,0x65,0x72, +0xab,0,0x1a,0x6e,0x65,0x73,0x65,0x70,0x61,0x72,0x61,0x74,0x6f,0x72,0xd9,0x20, +0,0x63,0x46,0x64,0xa2,0x96,0x65,0x1b,0x6e,0x63,0x6c,0x6f,0x73,0x69,0x6e,0x67, +0x6d,0x61,0x72,0x6b,0xa3,0x80,0xe6,0x80,1,7,0x6e,0x57,0x6e,0x52,0x6f,0x5e, +0x73,0xe1,0,0,0x75,0x1b,0x72,0x72,0x65,0x6e,0x63,0x79,0x73,0x79,0x6d,0x62, +0x6f,0x6c,0xff,2,0,0,0,0x22,0x12,0x74,0x72,0x6c,0xd9,0x80,0,0xdc, +0,0,1,0x6d,0x62,0x6e,1,0x6e,0x30,0x74,0x12,0x72,0x6f,0x6c,0xd9,0x80, +0,0x1f,0x65,0x63,0x74,0x6f,0x72,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69, +0x6f,0x6e,0xfd,0x40,0,0,0x19,0x62,0x69,0x6e,0x69,0x6e,0x67,0x6d,0x61,0x72, +0x6b,0xa5,0xc0,0x61,0x58,0x63,0xd9,0x80,0,0x66,0xdb,0,0,0x6c,0x1d,0x6f, +0x73,0x65,0x70,0x75,0x6e,0x63,0x74,0x75,0x61,0x74,0x69,0x6f,0x6e,0xfd,0x20,0, +0,0x18,0x73,0x65,0x64,0x6c,0x65,0x74,0x74,0x65,0x72,0x3d,2,0x61,0x32,0x65, +0x50,0x69,0x12,0x67,0x69,0x74,0xa7,0,0x1c,0x73,0x68,0x70,0x75,0x6e,0x63,0x74, +0x75,0x61,0x74,0x69,0x6f,0x6e,0xe9,0,0,0x1a,0x63,0x69,0x6d,0x61,0x6c,0x6e, +0x75,0x6d,0x62,0x65,0x72,0xa7,0 }; -const char PropNameData::nameGroups[23100]={ +const char PropNameData::nameGroups[23338]={ 2,'A','l','p','h','a',0,'A','l','p','h','a','b','e','t','i','c',0, 4,'N',0,'N','o',0,'F',0,'F','a','l','s','e',0,4,'Y',0,'Y','e','s',0,'T',0,'T','r','u','e',0, 2,'N','R',0,'N','o','t','_','R','e','o','r','d','e','r','e','d',0, @@ -1176,6 +1184,10 @@ const char PropNameData::nameGroups[23100]={ 2,'R','G','I','_','E','m','o','j','i','_','Z','W','J','_','S','e','q','u','e','n','c','e',0, 'R','G','I','_','E','m','o','j','i','_','Z','W','J','_','S','e','q','u','e','n','c','e',0, 2,'R','G','I','_','E','m','o','j','i',0,'R','G','I','_','E','m','o','j','i',0, +2,'I','D','S','U',0,'I','D','S','_','U','n','a','r','y','_','O','p','e','r','a','t','o','r',0, +2,'I','D','_','C','o','m','p','a','t','_','M','a','t','h','_','S','t','a','r','t',0,'I','D','_','C','o','m','p','a','t','_', +'M','a','t','h','_','S','t','a','r','t',0,2,'I','D','_','C','o','m','p','a','t','_','M','a','t','h','_','C','o','n','t','i', +'n','u','e',0,'I','D','_','C','o','m','p','a','t','_','M','a','t','h','_','C','o','n','t','i','n','u','e',0, 2,'b','c',0,'B','i','d','i','_','C','l','a','s','s',0,2,'L',0,'L','e','f','t','_','T','o','_','R','i','g','h','t',0, 2,'R',0,'R','i','g','h','t','_','T','o','_','L','e','f','t',0, 2,'E','N',0,'E','u','r','o','p','e','a','n','_','N','u','m','b','e','r',0, @@ -1568,9 +1580,11 @@ const char PropNameData::nameGroups[23100]={ 'e','n','d','e','d','_','A',0,2,'K','a','k','t','o','v','i','k','_','N','u','m','e','r','a','l','s',0, 'K','a','k','t','o','v','i','k','_','N','u','m','e','r','a','l','s',0, 2,'K','a','w','i',0,'K','a','w','i',0,2,'N','a','g','_','M','u','n','d','a','r','i',0, -'N','a','g','_','M','u','n','d','a','r','i',0,2,'c','c','c',0,'C','a','n','o','n','i','c','a','l','_','C','o','m','b','i', -'n','i','n','g','_','C','l','a','s','s',0,2,'d','t',0,'D','e','c','o','m','p','o','s','i','t','i','o','n','_','T','y','p', -'e',0,3,'N','o','n','e',0,'N','o','n','e',0,'n','o','n','e',0, +'N','a','g','_','M','u','n','d','a','r','i',0,2,'C','J','K','_','E','x','t','_','I',0,'C','J','K','_','U','n','i','f','i', +'e','d','_','I','d','e','o','g','r','a','p','h','s','_','E','x','t','e','n','s','i','o','n','_','I',0, +2,'c','c','c',0,'C','a','n','o','n','i','c','a','l','_','C','o','m','b','i','n','i','n','g','_','C','l','a','s','s',0, +2,'d','t',0,'D','e','c','o','m','p','o','s','i','t','i','o','n','_','T','y','p','e',0, +3,'N','o','n','e',0,'N','o','n','e',0,'n','o','n','e',0, 3,'C','a','n',0,'C','a','n','o','n','i','c','a','l',0,'c','a','n',0, 3,'C','o','m',0,'C','o','m','p','a','t',0,'c','o','m',0, 3,'E','n','c',0,'C','i','r','c','l','e',0,'e','n','c',0, @@ -1739,7 +1753,11 @@ const char PropNameData::nameGroups[23100]={ 's','i','s',0,2,'C','J',0,'C','o','n','d','i','t','i','o','n','a','l','_','J','a','p','a','n','e','s','e','_','S','t','a', 'r','t','e','r',0,2,'H','L',0,'H','e','b','r','e','w','_','L','e','t','t','e','r',0, 2,'E','B',0,'E','_','B','a','s','e',0,2,'E','M',0,'E','_','M','o','d','i','f','i','e','r',0, -2,'Z','W','J',0,'Z','W','J',0,2,'n','t',0,'N','u','m','e','r','i','c','_','T','y','p','e',0, +2,'Z','W','J',0,'Z','W','J',0,2,'A','K',0,'A','k','s','a','r','a',0, +2,'A','P',0,'A','k','s','a','r','a','_','P','r','e','b','a','s','e',0, +2,'A','S',0,'A','k','s','a','r','a','_','S','t','a','r','t',0, +2,'V','F',0,'V','i','r','a','m','a','_','F','i','n','a','l',0, +2,'V','I',0,'V','i','r','a','m','a',0,2,'n','t',0,'N','u','m','e','r','i','c','_','T','y','p','e',0, 2,'N','o','n','e',0,'N','o','n','e',0,2,'D','e',0,'D','e','c','i','m','a','l',0, 2,'D','i',0,'D','i','g','i','t',0,2,'N','u',0,'N','u','m','e','r','i','c',0, 2,'s','c',0,'S','c','r','i','p','t',0,2,'Z','y','y','y',0,'C','o','m','m','o','n',0, diff --git a/deps/icu-small/source/common/putil.cpp b/deps/icu-small/source/common/putil.cpp index ab904af20ac419..ab25f3b996de4a 100644 --- a/deps/icu-small/source/common/putil.cpp +++ b/deps/icu-small/source/common/putil.cpp @@ -1175,6 +1175,21 @@ uprv_tzname(int n) if (ret != nullptr && uprv_strcmp(TZDEFAULT, gTimeZoneBuffer) != 0) { int32_t tzZoneInfoTailLen = uprv_strlen(TZZONEINFOTAIL); const char *tzZoneInfoTailPtr = uprv_strstr(gTimeZoneBuffer, TZZONEINFOTAIL); + // MacOS14 has the realpath as something like + // /usr/share/zoneinfo.default/Australia/Melbourne + // which will not have "/zoneinfo/" in the path. + // Therefore if we fail, we fall back to read the link which is + // /var/db/timezone/zoneinfo/Australia/Melbourne + // We also fall back to reading the link if the realpath leads to something like + // /usr/share/zoneinfo/posixrules + if (tzZoneInfoTailPtr == nullptr || + uprv_strcmp(tzZoneInfoTailPtr + tzZoneInfoTailLen, "posixrules") == 0) { + ssize_t size = readlink(TZDEFAULT, gTimeZoneBuffer, sizeof(gTimeZoneBuffer)-1); + if (size > 0) { + gTimeZoneBuffer[size] = 0; + tzZoneInfoTailPtr = uprv_strstr(gTimeZoneBuffer, TZZONEINFOTAIL); + } + } if (tzZoneInfoTailPtr != nullptr) { tzZoneInfoTailPtr += tzZoneInfoTailLen; skipZoneIDPrefix(&tzZoneInfoTailPtr); diff --git a/deps/icu-small/source/common/rbbi.cpp b/deps/icu-small/source/common/rbbi.cpp index 73716ab4066cd3..599279fb72bb0d 100644 --- a/deps/icu-small/source/common/rbbi.cpp +++ b/deps/icu-small/source/common/rbbi.cpp @@ -1125,6 +1125,7 @@ static icu::UStack *gLanguageBreakFactories = nullptr; static const icu::UnicodeString *gEmptyString = nullptr; static icu::UInitOnce gLanguageBreakFactoriesInitOnce {}; static icu::UInitOnce gRBBIInitOnce {}; +static icu::ICULanguageBreakFactory *gICULanguageBreakFactory = nullptr; /** * Release all static memory held by breakiterator. @@ -1153,37 +1154,41 @@ static void U_CALLCONV rbbiInit() { ucln_common_registerCleanup(UCLN_COMMON_RBBI, rbbi_cleanup); } -static void U_CALLCONV initLanguageFactories() { - UErrorCode status = U_ZERO_ERROR; +static void U_CALLCONV initLanguageFactories(UErrorCode& status) { U_ASSERT(gLanguageBreakFactories == nullptr); gLanguageBreakFactories = new UStack(_deleteFactory, nullptr, status); if (gLanguageBreakFactories != nullptr && U_SUCCESS(status)) { - ICULanguageBreakFactory *builtIn = new ICULanguageBreakFactory(status); - gLanguageBreakFactories->push(builtIn, status); + LocalPointer factory(new ICULanguageBreakFactory(status), status); + if (U_SUCCESS(status)) { + gICULanguageBreakFactory = factory.orphan(); + gLanguageBreakFactories->push(gICULanguageBreakFactory, status); #ifdef U_LOCAL_SERVICE_HOOK - LanguageBreakFactory *extra = (LanguageBreakFactory *)uprv_svc_hook("languageBreakFactory", &status); - if (extra != nullptr) { - gLanguageBreakFactories->push(extra, status); - } + LanguageBreakFactory *extra = (LanguageBreakFactory *)uprv_svc_hook("languageBreakFactory", &status); + if (extra != nullptr) { + gLanguageBreakFactories->push(extra, status); + } #endif + } } ucln_common_registerCleanup(UCLN_COMMON_RBBI, rbbi_cleanup); } +void ensureLanguageFactories(UErrorCode& status) { + umtx_initOnce(gLanguageBreakFactoriesInitOnce, &initLanguageFactories, status); +} static const LanguageBreakEngine* -getLanguageBreakEngineFromFactory(UChar32 c) +getLanguageBreakEngineFromFactory(UChar32 c, const char* locale) { - umtx_initOnce(gLanguageBreakFactoriesInitOnce, &initLanguageFactories); - if (gLanguageBreakFactories == nullptr) { - return nullptr; - } + UErrorCode status = U_ZERO_ERROR; + ensureLanguageFactories(status); + if (U_FAILURE(status)) return nullptr; int32_t i = gLanguageBreakFactories->size(); const LanguageBreakEngine *lbe = nullptr; while (--i >= 0) { LanguageBreakFactory *factory = (LanguageBreakFactory *)(gLanguageBreakFactories->elementAt(i)); - lbe = factory->getEngineFor(c); + lbe = factory->getEngineFor(c, locale); if (lbe != nullptr) { break; } @@ -1199,7 +1204,7 @@ getLanguageBreakEngineFromFactory(UChar32 c) // //------------------------------------------------------------------------------- const LanguageBreakEngine * -RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) { +RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c, const char* locale) { const LanguageBreakEngine *lbe = nullptr; UErrorCode status = U_ZERO_ERROR; @@ -1215,14 +1220,14 @@ RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) { int32_t i = fLanguageBreakEngines->size(); while (--i >= 0) { lbe = (const LanguageBreakEngine *)(fLanguageBreakEngines->elementAt(i)); - if (lbe->handles(c)) { + if (lbe->handles(c, locale)) { return lbe; } } // No existing dictionary took the character. See if a factory wants to // give us a new LanguageBreakEngine for this character. - lbe = getLanguageBreakEngineFromFactory(c); + lbe = getLanguageBreakEngineFromFactory(c, locale); // If we got one, use it and push it on our stack. if (lbe != nullptr) { @@ -1259,6 +1264,18 @@ RuleBasedBreakIterator::getLanguageBreakEngine(UChar32 c) { return fUnhandledBreakEngine; } +#ifndef U_HIDE_DRAFT_API +void U_EXPORT2 RuleBasedBreakIterator::registerExternalBreakEngine( + ExternalBreakEngine* toAdopt, UErrorCode& status) { + LocalPointer engine(toAdopt, status); + if (U_FAILURE(status)) return; + ensureLanguageFactories(status); + if (U_FAILURE(status)) return; + gICULanguageBreakFactory->addExternalEngine(engine.orphan(), status); +} +#endif /* U_HIDE_DRAFT_API */ + + void RuleBasedBreakIterator::dumpCache() { fBreakCache->dumpCache(); } diff --git a/deps/icu-small/source/common/rbbi_cache.cpp b/deps/icu-small/source/common/rbbi_cache.cpp index 02ca555a890c2c..f7a283f69e45b9 100644 --- a/deps/icu-small/source/common/rbbi_cache.cpp +++ b/deps/icu-small/source/common/rbbi_cache.cpp @@ -158,12 +158,13 @@ void RuleBasedBreakIterator::DictionaryCache::populateDictionary(int32_t startPo // We now have a dictionary character. Get the appropriate language object // to deal with it. - const LanguageBreakEngine *lbe = fBI->getLanguageBreakEngine(c); + const LanguageBreakEngine *lbe = fBI->getLanguageBreakEngine( + c, fBI->getLocaleID(ULOC_REQUESTED_LOCALE, status)); // Ask the language object if there are any breaks. It will add them to the cache and // leave the text pointer on the other side of its range, ready to search for the next one. if (lbe != nullptr) { - foundBreakCount += lbe->findBreaks(text, rangeStart, rangeEnd, fBreaks, fBI->fIsPhraseBreaking, status); + foundBreakCount += lbe->findBreaks(text, current, rangeEnd, fBreaks, fBI->fIsPhraseBreaking, status); } // Reload the loop variables for the next go-round diff --git a/deps/icu-small/source/common/rbbirb.cpp b/deps/icu-small/source/common/rbbirb.cpp index 7177254ec4d846..92cccc1a3397f1 100644 --- a/deps/icu-small/source/common/rbbirb.cpp +++ b/deps/icu-small/source/common/rbbirb.cpp @@ -66,7 +66,6 @@ RBBIRuleBuilder::RBBIRuleBuilder(const UnicodeString &rules, fForwardTable = nullptr; fRuleStatusVals = nullptr; fChainRules = false; - fLBCMNoChain = false; fLookAheadHardBreak = false; fUSetNodes = nullptr; fRuleStatusVals = nullptr; diff --git a/deps/icu-small/source/common/rbbirb.h b/deps/icu-small/source/common/rbbirb.h index d983a184b64cef..96d3aa643dd108 100644 --- a/deps/icu-small/source/common/rbbirb.h +++ b/deps/icu-small/source/common/rbbirb.h @@ -159,9 +159,6 @@ class RBBIRuleBuilder : public UMemory { UBool fChainRules; // True for chained Unicode TR style rules. // False for traditional regexp rules. - UBool fLBCMNoChain; // True: suppress chaining of rules on - // chars with LineBreak property == CM. - UBool fLookAheadHardBreak; // True: Look ahead matches cause an // immediate break, no continuing for the // longest match. diff --git a/deps/icu-small/source/common/rbbiscan.cpp b/deps/icu-small/source/common/rbbiscan.cpp index 455ace78b802c0..844b0639099c06 100644 --- a/deps/icu-small/source/common/rbbiscan.cpp +++ b/deps/icu-small/source/common/rbbiscan.cpp @@ -547,8 +547,6 @@ UBool RBBIRuleScanner::doParseActions(int32_t action) UnicodeString opt(fRB->fRules, fOptionStart, fScanIndex-fOptionStart); if (opt == UNICODE_STRING("chain", 5)) { fRB->fChainRules = true; - } else if (opt == UNICODE_STRING("LBCMNoChain", 11)) { - fRB->fLBCMNoChain = true; } else if (opt == UNICODE_STRING("forward", 7)) { fRB->fDefaultTree = &fRB->fForwardTree; } else if (opt == UNICODE_STRING("reverse", 7)) { diff --git a/deps/icu-small/source/common/rbbitblb.cpp b/deps/icu-small/source/common/rbbitblb.cpp index 0c2bcff4e515c4..8b40136fc7c159 100644 --- a/deps/icu-small/source/common/rbbitblb.cpp +++ b/deps/icu-small/source/common/rbbitblb.cpp @@ -458,21 +458,6 @@ void RBBITableBuilder::calcChainedFollowPos(RBBINode *tree, RBBINode *endMarkNod // We've got a node that can end a match. - // !!LBCMNoChain implementation: If this node's val correspond to - // the Line Break $CM char class, don't chain from it. - // TODO: Remove this. !!LBCMNoChain is deprecated, and is not used - // by any of the standard ICU rules. - if (fRB->fLBCMNoChain) { - UChar32 c = this->fRB->fSetBuilder->getFirstChar(endNode->fVal); - if (c != -1) { - // c == -1 occurs with sets containing only the {eof} marker string. - ULineBreak cLBProp = (ULineBreak)u_getIntPropertyValue(c, UCHAR_LINE_BREAK); - if (cLBProp == U_LB_COMBINING_MARK) { - continue; - } - } - } - // Now iterate over the nodes that can start a match, looking for ones // with the same char class as our ending node. RBBINode *startNode; diff --git a/deps/icu-small/source/common/ubidi_props_data.h b/deps/icu-small/source/common/ubidi_props_data.h index 5dcd1d7c781629..f85dc0967565a4 100644 --- a/deps/icu-small/source/common/ubidi_props_data.h +++ b/deps/icu-small/source/common/ubidi_props_data.h @@ -9,11 +9,11 @@ #ifdef INCLUDED_FROM_UBIDI_PROPS_C -static const UVersionInfo ubidi_props_dataVersion={0xf,0,0,0}; +static const UVersionInfo ubidi_props_dataVersion={0xf,1,0,0}; -static const int32_t ubidi_props_indexes[UBIDI_IX_TOP]={0x10,0x6bc0,0x65d0,0x28,0x620,0x8cc,0x10ac0,0x10d24,0,0,0,0,0,0,0,0x6702b6}; +static const int32_t ubidi_props_indexes[UBIDI_IX_TOP]={0x10,0x6ba0,0x65b0,0x28,0x620,0x8cc,0x10ac0,0x10d24,0,0,0,0,0,0,0,0x6702b6}; -static const uint16_t ubidi_props_trieIndex[13024]={ +static const uint16_t ubidi_props_trieIndex[13008]={ 0x387,0x38f,0x397,0x39f,0x3b7,0x3bf,0x3c7,0x3cf,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af, 0x3a7,0x3af,0x3a7,0x3af,0x3d5,0x3dd,0x3e5,0x3ed,0x3f5,0x3fd,0x3f9,0x401,0x409,0x411,0x40c,0x414, 0x3a7,0x3af,0x3a7,0x3af,0x41c,0x424,0x3a7,0x3af,0x3a7,0x3af,0x3a7,0x3af,0x42a,0x432,0x43a,0x442, @@ -38,8 +38,8 @@ static const uint16_t ubidi_props_trieIndex[13024]={ 0x7e8,0x7f0,0x7f8,0x7ff,0x806,0x80e,0x812,0x7e0,0x67c,0x67c,0x67c,0x81a,0x820,0x67c,0x67c,0x826, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x82e,0x3a7,0x3a7,0x3a7,0x836,0x3a7,0x3a7,0x3a7,0x3f5, 0x83e,0x846,0x849,0x3a7,0x851,0x67c,0x67c,0x67f,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x858,0x85e, -0x86e,0x866,0x3a7,0x3a7,0x876,0x61f,0x3a7,0x3ce,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x67c,0x835, -0x3dc,0x3a7,0x87e,0x886,0x3a7,0x88e,0x896,0x3a7,0x3a7,0x3a7,0x3a7,0x89a,0x3a7,0x3a7,0x674,0x3cd, +0x86e,0x866,0x3a7,0x3a7,0x876,0x61f,0x3a7,0x3ce,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x67c,0x87e, +0x3dc,0x3a7,0x85e,0x882,0x3a7,0x88a,0x892,0x3a7,0x3a7,0x3a7,0x3a7,0x896,0x3a7,0x3a7,0x674,0x3cd, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, @@ -96,10 +96,10 @@ static const uint16_t ubidi_props_trieIndex[13024]={ 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x87e,0x67c,0x595,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x8a1,0x3a7,0x3a7,0x8a6,0x8ae,0x3a7,0x3a7,0x5cb,0x67c,0x673,0x3a7,0x3a7,0x8b6,0x3a7,0x3a7,0x3a7, -0x8be,0x8c5,0x645,0x8cd,0x3a7,0x3a7,0x5a1,0x8d5,0x3a7,0x8dd,0x8e4,0x3a7,0x501,0x8e9,0x3a7,0x51a, -0x3a7,0x8f1,0x8f9,0x51c,0x3a7,0x8fd,0x51b,0x905,0x3a7,0x3a7,0x3a7,0x90b,0x3a7,0x3a7,0x3a7,0x912, +0x3a7,0x3a7,0x3a7,0x3a7,0x85e,0x67c,0x595,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x89d,0x3a7,0x3a7,0x8a2,0x8aa,0x3a7,0x3a7,0x5cb,0x67c,0x673,0x3a7,0x3a7,0x8b2,0x3a7,0x3a7,0x3a7, +0x8ba,0x8c1,0x645,0x8c9,0x3a7,0x3a7,0x5a1,0x8d1,0x3a7,0x8d9,0x8e0,0x3a7,0x501,0x8e5,0x3a7,0x51a, +0x3a7,0x8ed,0x8f5,0x51c,0x3a7,0x8f9,0x51b,0x901,0x3a7,0x3a7,0x3a7,0x907,0x3a7,0x3a7,0x3a7,0x90e, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, @@ -139,9 +139,9 @@ static const uint16_t ubidi_props_trieIndex[13024]={ 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x926,0x91a,0x91e,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6, -0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x92e,0x936,0x4a6,0x4a6,0x4a6,0x93b,0x93f, -0x947,0x94f,0x953,0x95b,0x4a6,0x4a6,0x4a6,0x95f,0x967,0x397,0x96f,0x977,0x3a7,0x3a7,0x3a7,0x97f, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x922,0x916,0x91a,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6, +0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x92a,0x932,0x4a6,0x4a6,0x4a6,0x937,0x93b, +0x943,0x94b,0x94f,0x957,0x4a6,0x4a6,0x4a6,0x95b,0x963,0x397,0x96b,0x973,0x3a7,0x3a7,0x3a7,0x97b, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0xe9c,0xe9c,0xedc,0xf1c,0xe9c,0xe9c,0xe9c,0xe9c,0xe9c,0xe9c,0xf54,0xf94,0xfd4,0xfe4,0x1024,0x1030, @@ -178,68 +178,68 @@ static const uint16_t ubidi_props_trieIndex[13024]={ 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0, 0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0x1a0,0xd89, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x987,0x3a7,0x67c,0x67c,0x98f,0x61f,0x3a7,0x514, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x997,0x3a7,0x3a7,0x3a7,0x99e,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x983,0x3a7,0x67c,0x67c,0x98b,0x61f,0x3a7,0x514, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x993,0x3a7,0x3a7,0x3a7,0x99a,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9a6,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, -0x9ae,0x9b2,0x43c,0x43c,0x43c,0x43c,0x9c2,0x9ba,0x43c,0x9ca,0x43c,0x43c,0x9d2,0x9d8,0x43c,0x43c, -0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9e8,0x9e0,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, -0x43c,0x43c,0x43c,0x9f0,0x43c,0x9f8,0x4a6,0xa00,0x43c,0xa08,0xa0f,0xa15,0xa1d,0xa21,0xa29,0x43c, -0x51b,0xa31,0xa38,0xa3f,0x41e,0xa47,0x569,0x3a7,0x501,0xa4e,0x3a7,0xa54,0x41e,0xa59,0xa61,0x3a7, -0x3a7,0xa66,0x51b,0x3a7,0x3a7,0x3a7,0x836,0xa6e,0x41e,0x5a3,0x57e,0xa75,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0xa31,0xa7d,0x3a7,0x3a7,0xa85,0xa8d,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa91,0xa99,0x3a7, -0x3a7,0xaa1,0x57e,0xaa9,0x3a7,0xaaf,0x3a7,0x3a7,0x60f,0xab7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0xabc,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xac3,0xacb,0x3a7,0x3a7,0x3a7,0xace,0x57e,0xad6, -0xada,0xae2,0x3a7,0xae9,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0xaf0,0x3a7,0x3a7,0xafe,0xaf8,0x3a7,0x3a7,0x3a7,0xb06,0xb0e,0x3a7,0xb12,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x5a5,0x41e,0x99e,0xb1a,0x3a7,0x3a7,0x3a7,0xb27,0xb22,0x3a7, +0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9a2,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, +0x9aa,0x9ae,0x43c,0x43c,0x43c,0x43c,0x9be,0x9b6,0x43c,0x9c6,0x43c,0x43c,0x9ce,0x9d4,0x43c,0x43c, +0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x9e4,0x9dc,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, +0x43c,0x43c,0x43c,0x9ec,0x43c,0x9f4,0x4a6,0x9fc,0x43c,0xa04,0xa0b,0xa11,0xa19,0xa1d,0xa25,0x43c, +0x51b,0xa2d,0xa34,0xa3b,0x41e,0xa43,0x569,0x3a7,0x501,0xa4a,0x3a7,0xa50,0x41e,0xa55,0xa5d,0x3a7, +0x3a7,0xa62,0x51b,0x3a7,0x3a7,0x3a7,0x836,0xa6a,0x41e,0x5a3,0x57e,0xa71,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0xa2d,0xa79,0x3a7,0x3a7,0xa81,0xa89,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa8d,0xa95,0x3a7, +0x3a7,0xa9d,0x57e,0xaa5,0x3a7,0xaab,0x3a7,0x3a7,0x60f,0xab3,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0xab8,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xabf,0xac7,0x3a7,0x3a7,0x3a7,0xaca,0x57e,0xad2, +0xad6,0xade,0x3a7,0xae5,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0xaec,0x3a7,0x3a7,0xafa,0xaf4,0x3a7,0x3a7,0x3a7,0xb02,0xb0a,0x3a7,0xb0e,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x5a5,0x41e,0x99a,0xb16,0x3a7,0x3a7,0x3a7,0xb23,0xb1e,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0xb2f,0xb37,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xb3d, -0x3a7,0xb43,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0xb2b,0xb33,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xb39, +0x3a7,0xb3f,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0xa55,0x3a7,0xb49,0x3a7,0x3a7,0xb51,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0xa51,0x3a7,0xb45,0x3a7,0x3a7,0xb4d,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x535,0xb59,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x535,0xb55,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0xb61,0x500,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0xb69,0xb71,0xb77,0x3a7,0xb7d,0x67c,0x67c,0xb85,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x67c,0x67c,0xb8d,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xb93, -0x3a7,0xb9a,0x3a7,0xb96,0x3a7,0xb9d,0x3a7,0xba5,0xba9,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0xbb1,0x3f5,0xbb8,0xbbf,0xbc7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0xb5d,0x500,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0xb65,0xb6d,0xb73,0x3a7,0xb79,0x67c,0x67c,0xb81,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x67c,0x67c,0xb89,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xb8f, +0x3a7,0xb96,0x3a7,0xb92,0x3a7,0xb99,0x3a7,0xba1,0xba5,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3f5,0xbad,0x3f5,0xbb4,0xbbb,0xbc3,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xbcf,0xbd7,0x3a7,0x3a7,0xa55,0x3a7,0x3a7, -0x3a7,0x3a7,0xb43,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa81,0x3a7, -0xbdc,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0xbe4,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0xbec, -0x43c,0xbf4,0xbf4,0xbfb,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, -0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x91e,0x4a6,0x4a6,0x43c, -0x43c,0x4a6,0x4a6,0xc03,0x43c,0x43c,0x43c,0x43c,0x43c,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6, -0xc0b,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x67c,0xc13,0x67c,0x67c,0x67f,0xc18,0xc1c, -0x858,0xc24,0x3c9,0x3a7,0xc2a,0x3a7,0xc2f,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x783,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xbcb,0xbd3,0x3a7,0x3a7,0xa51,0x3a7,0x3a7, +0x3a7,0x3a7,0xb3f,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xa7d,0x3a7, +0xbd8,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0xbe0,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0xbe8, +0x43c,0xbf0,0xbf0,0xbf7,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c, +0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x91a,0x4a6,0x4a6,0x43c, +0x43c,0x4a6,0x4a6,0xbff,0x43c,0x43c,0x43c,0x43c,0x43c,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6,0x4a6, +0xc07,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x43c,0x67c,0xc0f,0x67c,0x67c,0x67f,0xc14,0xc18, +0x858,0xc20,0x3c9,0x3a7,0xc26,0x3a7,0xc2b,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x783,0x3a7,0x3a7,0x3a7, 0x3a7,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c, -0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0xc37, -0x98f,0x67c,0x67c,0x67c,0xc3e,0x67c,0x67c,0xc45,0xc4d,0xc13,0x67c,0xc55,0x67c,0xc5d,0xc62,0x3a7, -0x3a7,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67f,0xc6a,0xc73,0xc77,0xc7f, -0xc6f,0x67c,0x67c,0x67c,0x67c,0xc87,0x67c,0x792,0xc8f,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0xc33, +0x98b,0x67c,0x67c,0x67c,0xc3a,0x67c,0x67c,0xc41,0xc49,0xc0f,0x67c,0xc51,0x67c,0xc59,0xc5e,0x3a7, +0x3a7,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67c,0x67f,0xc66,0xc6f,0xc73,0xc7b, +0xc6b,0x67c,0x67c,0x67c,0x67c,0xc83,0x67c,0x792,0xc8b,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc96,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc92,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, 0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7, -0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc96,0xca6,0xc9e,0xc9e,0xc9e,0xca7,0xca7,0xca7, -0xca7,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0xcaf,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7, -0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7, -0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7, -0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7, -0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0xca7,0x386,0x386,0x386,0x12,0x12,0x12,0x12, +0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0x3a7,0xc92,0xca2,0xc9a,0xc9a,0xc9a,0xca3,0xca3,0xca3, +0xca3,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0x3f5,0xcab,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, +0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, +0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, +0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3, +0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0xca3,0x386,0x386,0x386,0x12,0x12,0x12,0x12, 0x12,0x12,0x12,0x12,0x12,8,7,8,9,7,0x12,0x12,0x12,0x12,0x12,0x12, 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,7,7,7,8,9,0xa,0xa,4, 4,4,0xa,0xa,0x310a,0xf20a,0xa,3,6,3,6,6,2,2,2,2, @@ -551,15 +551,14 @@ static const uint16_t ubidi_props_trieIndex[13024]={ 0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, 0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0,0,0,0,0xa,0,0,0,0,0,0,0, +0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0, 0,0,0xb1,0xb1,0xb1,0xb1,0,0,0xa,0,0,0,0,0,0xa,0xa, 0,0,0,0,0,0xa,0xa,0xa,9,0xa,0xa,0xa,0xa,0,0,0, 0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0x310a,0xf20a,0x310a,0xf20a, 0x310a,0xf20a,0x310a,0xf20a,0xa,0xa,0xa,0xa,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,0xb1,0xb1,0xa,0xa,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa, -0xa,0xa,0xa,0xa,0xa,0xa,0xa,0xa,0,0,0,0,0,0,0,0, +0,0xb1,0xb1,0xa,0xa,0,0,0,0xa,0xa,0xa,0xa,0,0,0,0, +0,0,0,0,0,0,0,0xa,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,0xa,0xa,0xa,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0xa,0xa,0xa,0xa,0xa,0xa,0xa, @@ -935,13 +934,13 @@ static const UBiDiProps ubidi_props_singleton={ ubidi_props_trieIndex+3612, nullptr, 3612, - 9412, + 9396, 0x1a0, 0xe9c, 0x0, 0x0, 0x110000, - 0x32dc, + 0x32cc, nullptr, 0, false, false, 0, nullptr }, { 2,2,0,0 } diff --git a/deps/icu-small/source/common/ucase.cpp b/deps/icu-small/source/common/ucase.cpp index 392e1266ae4429..4fd23fc935c555 100644 --- a/deps/icu-small/source/common/ucase.cpp +++ b/deps/icu-small/source/common/ucase.cpp @@ -317,43 +317,6 @@ ucase_addCaseClosure(UChar32 c, const USetAdder *sa) { } } -namespace { - -/** - * Add the simple case closure mapping, - * except if there is not actually an scf relationship between the two characters. - * TODO: Unicode should probably add the corresponding scf mappings. - * See https://crbug.com/v8/13377 and Unicode-internal PAG issue #23. - * If & when those scf mappings are added, we should be able to remove all of these exceptions. - */ -void addOneSimpleCaseClosure(UChar32 c, UChar32 t, const USetAdder *sa) { - switch (c) { - case 0x0390: - if (t == 0x1FD3) { return; } - break; - case 0x03B0: - if (t == 0x1FE3) { return; } - break; - case 0x1FD3: - if (t == 0x0390) { return; } - break; - case 0x1FE3: - if (t == 0x03B0) { return; } - break; - case 0xFB05: - if (t == 0xFB06) { return; } - break; - case 0xFB06: - if (t == 0xFB05) { return; } - break; - default: - break; - } - sa->add(sa->set, t); -} - -} // namespace - U_CFUNC void U_EXPORT2 ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) { uint16_t props=UTRIE2_GET16(&ucase_props_singleton.trie, c); @@ -397,7 +360,7 @@ ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) { pe=pe0; UChar32 mapping; GET_SLOT_VALUE(excWord, idx, pe, mapping); - addOneSimpleCaseClosure(c, mapping, sa); + sa->add(sa->set, mapping); } } if(HAS_SLOT(excWord, UCASE_EXC_DELTA)) { @@ -405,7 +368,7 @@ ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) { int32_t delta; GET_SLOT_VALUE(excWord, UCASE_EXC_DELTA, pe, delta); UChar32 mapping = (excWord&UCASE_EXC_DELTA_IS_NEGATIVE)==0 ? c+delta : c-delta; - addOneSimpleCaseClosure(c, mapping, sa); + sa->add(sa->set, mapping); } /* get the closure string pointer & length */ @@ -448,7 +411,7 @@ ucase_addSimpleCaseClosure(UChar32 c, const USetAdder *sa) { for(int32_t idx=0; idxadd(sa->set, mapping); } } } diff --git a/deps/icu-small/source/common/ucase_props_data.h b/deps/icu-small/source/common/ucase_props_data.h index 7e6de63fb7135b..92b59520cc507a 100644 --- a/deps/icu-small/source/common/ucase_props_data.h +++ b/deps/icu-small/source/common/ucase_props_data.h @@ -9,9 +9,9 @@ #ifdef INCLUDED_FROM_UCASE_CPP -static const UVersionInfo ucase_props_dataVersion={0xf,0,0,0}; +static const UVersionInfo ucase_props_dataVersion={0xf,1,0,0}; -static const int32_t ucase_props_indexes[UCASE_IX_TOP]={0x10,0x76f2,0x66c8,0x683,0x172,0,0,0,0,0,0,0,0,0,0,3}; +static const int32_t ucase_props_indexes[UCASE_IX_TOP]={0x10,0x76ec,0x66c8,0x680,0x172,0,0,0,0,0,0,0,0,0,0,3}; static const uint16_t ucase_props_trieIndex[13148]={ 0x355,0x35d,0x365,0x36d,0x37b,0x383,0x38b,0x393,0x39b,0x3a3,0x3aa,0x3b2,0x3ba,0x3c2,0x3ca,0x3d2, @@ -509,9 +509,9 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0x39b9,0x3a29,0x3a99,0x3b09,0x3b7b,0x3beb,0x3c5b,0x3ccb,0x3d3b,0x3dab,0x3e1b,0x3e8b,0x411,0x411,0x3ef9,0x3f79, 0x3fe9,0,0x4069,0x40e9,0xfc12,0xfc12,0xdb12,0xdb12,0x419b,4,0x4209,4,4,4,0x4259,0x42d9, 0x4349,0,0x43c9,0x4449,0xd512,0xd512,0xd512,0xd512,0x44fb,4,4,4,0x411,0x411,0x4569,0x4619, -0,0,0x46e9,0x4769,0xfc12,0xfc12,0xce12,0xce12,0,4,4,4,0x411,0x411,0x4819,0x48c9, -0x4999,0x391,0x4a19,0x4a99,0xfc12,0xfc12,0xc812,0xc812,0xfc92,4,4,4,0,0,0x4b49,0x4bc9, -0x4c39,0,0x4cb9,0x4d39,0xc012,0xc012,0xc112,0xc112,0x4deb,4,4,0,0,0,0,0, +0,0,0x46d9,0x4759,0xfc12,0xfc12,0xce12,0xce12,0,4,4,4,0x411,0x411,0x4809,0x48b9, +0x4979,0x391,0x49f9,0x4a79,0xfc12,0xfc12,0xc812,0xc812,0xfc92,4,4,4,0,0,0x4b29,0x4ba9, +0x4c19,0,0x4c99,0x4d19,0xc012,0xc012,0xc112,0xc112,0x4dcb,4,4,0,0,0,0,0, 0,0,0,0,0,0,0,4,4,4,4,4,0,0,0,0, 0,0,0,0,4,4,0,0,0,0,0,0,4,0,0,4, 0,0,4,4,4,4,4,0,0,0,0,0,0,0,0,0, @@ -525,8 +525,8 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0x64,0x44,0x64,0x64,0x64,0x64,0x64,0x64,0x44,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2, 0,0,1,2,2,2,1,1,2,2,2,1,0,2,0,0, -0,2,2,2,2,2,0,0,0,0,0,0,2,0,0x4e5a,0, -2,0,0x4e9a,0x4eda,2,2,0,1,2,2,0xe12,2,1,0,0,0, +0,2,2,2,2,2,0,0,0,0,0,0,2,0,0x4e3a,0, +2,0,0x4e7a,0x4eba,2,2,0,1,2,2,0xe12,2,1,0,0,0, 0,1,0,0,1,1,2,2,0,0,0,0,0,2,1,1, 0x21,0x21,0,0,0,0,0xf211,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0x812,0x812,0x812,0x812,0x812,0x812,0x812,0x812, @@ -541,13 +541,13 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812, 0x1812,0x1812,0x1812,0x1812,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811, 0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811,0xe811, -0xe811,0xe811,0xe811,0xe811,0x92,0xff91,0x4f1a,0x4f3a,0x4f5a,0x4f79,0x4f99,0x92,0xff91,0x92,0xff91,0x92, -0xff91,0x4fba,0x4fda,0x4ffa,0x501a,1,0x92,0xff91,1,0x92,0xff91,1,1,1,1,1, -0x25,5,0x503a,0x503a,0x92,0xff91,0x92,0xff91,1,0,0,0,0,0,0,0x92, +0xe811,0xe811,0xe811,0xe811,0x92,0xff91,0x4efa,0x4f1a,0x4f3a,0x4f59,0x4f79,0x92,0xff91,0x92,0xff91,0x92, +0xff91,0x4f9a,0x4fba,0x4fda,0x4ffa,1,0x92,0xff91,1,0x92,0xff91,1,1,1,1,1, +0x25,5,0x501a,0x501a,0x92,0xff91,0x92,0xff91,1,0,0,0,0,0,0,0x92, 0xff91,0x92,0xff91,0x44,0x44,0x44,0x92,0xff91,0,0,0,0,0,0,0,0, -0,0,0,0,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059, -0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0x5059, -0x5059,0x5059,0x5059,0x5059,0x5059,0x5059,0,0x5059,0,0,0,0,0,0x5059,0,0, +0,0,0,0,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039, +0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0x5039, +0x5039,0x5039,0x5039,0x5039,0x5039,0x5039,0,0x5039,0,0,0,0,0,0x5039,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0x64,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44, @@ -562,7 +562,7 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x507a,0x50b9,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x505a,0x5099,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0,0x44,4,4,4,0, 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0,4,0x92,0xff91,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, @@ -573,11 +573,11 @@ static const uint16_t ucase_props_trieIndex[13148]={ 4,4,4,4,4,4,4,4,4,4,4,4,4,4,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,1,1,0x92,0xff91, 0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -5,1,1,1,1,1,1,1,1,0x92,0xff91,0x92,0xff91,0x50fa,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,4,4,4,0x92,0xff91,0x511a,1,0, +5,1,1,1,1,1,1,1,1,0x92,0xff91,0x92,0xff91,0x50da,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,4,4,4,0x92,0xff91,0x50fa,1,0, 0x92,0xff91,0x92,0xff91,0x1811,1,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x513a,0x515a,0x517a,0x519a,0x513a,1,0x51ba,0x51da,0x51fa,0x521a,0x92,0xff91,0x92,0xff91, -0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xe812,0x523a,0x525a,0x92,0xff91,0x92,0xff91,0, +0x92,0xff91,0x511a,0x513a,0x515a,0x517a,0x511a,1,0x519a,0x51ba,0x51da,0x51fa,0x92,0xff91,0x92,0xff91, +0x92,0xff91,0x92,0xff91,0x92,0xff91,0x92,0xff91,0xe812,0x521a,0x523a,0x92,0xff91,0x92,0xff91,0, 0,0,0,0,0x92,0xff91,0,1,0,1,0x92,0xff91,0x92,0xff91,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,5,5,5,0x92,0xff91,0,5,5,1,0,0,0,0,0, @@ -607,17 +607,17 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0, 0,0,0,4,4,0,0x64,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,0x5279,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,0x5259,1,1,1,1, 1,1,1,4,5,5,5,5,1,1,1,1,1,1,1,1, -1,5,4,4,0,0,0,0,0x5299,0x52c9,0x52f9,0x5329,0x5359,0x5389,0x53b9,0x53e9, -0x5419,0x5449,0x5479,0x54a9,0x54d9,0x5509,0x5539,0x5569,0x5b99,0x5bc9,0x5bf9,0x5c29,0x5c59,0x5c89,0x5cb9,0x5ce9, -0x5d19,0x5d49,0x5d79,0x5da9,0x5dd9,0x5e09,0x5e39,0x5e69,0x5e99,0x5ec9,0x5ef9,0x5f29,0x5f59,0x5f89,0x5fb9,0x5fe9, -0x6019,0x6049,0x6079,0x60a9,0x60d9,0x6109,0x6139,0x6169,0x5599,0x55c9,0x55f9,0x5629,0x5659,0x5689,0x56b9,0x56e9, -0x5719,0x5749,0x5779,0x57a9,0x57d9,0x5809,0x5839,0x5869,0x5899,0x58c9,0x58f9,0x5929,0x5959,0x5989,0x59b9,0x59e9, -0x5a19,0x5a49,0x5a79,0x5aa9,0x5ad9,0x5b09,0x5b39,0x5b69,0,0,0,0,0,4,0,0, +1,5,4,4,0,0,0,0,0x5279,0x52a9,0x52d9,0x5309,0x5339,0x5369,0x5399,0x53c9, +0x53f9,0x5429,0x5459,0x5489,0x54b9,0x54e9,0x5519,0x5549,0x5b79,0x5ba9,0x5bd9,0x5c09,0x5c39,0x5c69,0x5c99,0x5cc9, +0x5cf9,0x5d29,0x5d59,0x5d89,0x5db9,0x5de9,0x5e19,0x5e49,0x5e79,0x5ea9,0x5ed9,0x5f09,0x5f39,0x5f69,0x5f99,0x5fc9, +0x5ff9,0x6029,0x6059,0x6089,0x60b9,0x60e9,0x6119,0x6149,0x5579,0x55a9,0x55d9,0x5609,0x5639,0x5669,0x5699,0x56c9, +0x56f9,0x5729,0x5759,0x5789,0x57b9,0x57e9,0x5819,0x5849,0x5879,0x58a9,0x58d9,0x5909,0x5939,0x5969,0x5999,0x59c9, +0x59f9,0x5a29,0x5a59,0x5a89,0x5ab9,0x5ae9,0x5b19,0x5b49,0,0,0,0,0,4,0,0, 4,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0x6199,0x6219,0x6299,0x6319,0x63c9,0x6479,0x6519,0, -0,0,0,0,0,0,0,0,0,0,0,0x65b9,0x6639,0x66b9,0x6739,0x67b9, +0,0,0,0,0,0,0,0,0x6179,0x61f9,0x6279,0x62f9,0x63a9,0x6459,0x64e9,0, +0,0,0,0,0,0,0,0,0,0,0,0x6589,0x6609,0x6689,0x6709,0x6789, 0,0,0,0,0,0,0x64,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4, 4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,4, @@ -838,7 +838,7 @@ static const uint16_t ucase_props_trieIndex[13148]={ 0,0,0,0,0,0,0,0,0,0,0,0 }; -static const uint16_t ucase_props_exceptions[1667]={ +static const uint16_t ucase_props_exceptions[1664]={ 0xc850,0x20,2,0x130,0x131,0x4810,0x20,0x841,0x6b,1,0x212a,0x841,0x73,1,0x17f,0x5c50, 0x20,2,0x130,0x131,0x844,0x4b,1,0x212a,0x844,0x53,1,0x17f,0x806,0x3bc,0x39c,0x841, 0xe5,1,0x212b,0x8c0,1,0x2220,0x73,0x73,0x53,0x53,0x53,0x73,0x1e9e,0x844,0xc5,1, @@ -909,41 +909,40 @@ static const uint16_t ucase_props_exceptions[1667]={ 0x3b7,0x3b9,0x397,0x399,0x880,0x2220,0x3ae,0x3b9,0x389,0x399,0x389,0x345,0x880,0x2220,0x3b7,0x342, 0x397,0x342,0x397,0x342,0x880,0x3330,0x3b7,0x342,0x3b9,0x397,0x342,0x399,0x397,0x342,0x345,0xc90, 9,0x220,0x3b7,0x3b9,0x397,0x399,0x880,0x3330,0x3b9,0x308,0x300,0x399,0x308,0x300,0x399,0x308, -0x300,0x8c0,1,0x3330,0x3b9,0x308,0x301,0x399,0x308,0x301,0x399,0x308,0x301,0x390,0x880,0x2220, -0x3b9,0x342,0x399,0x342,0x399,0x342,0x880,0x3330,0x3b9,0x308,0x342,0x399,0x308,0x342,0x399,0x308, -0x342,0x880,0x3330,0x3c5,0x308,0x300,0x3a5,0x308,0x300,0x3a5,0x308,0x300,0x8c0,1,0x3330,0x3c5, -0x308,0x301,0x3a5,0x308,0x301,0x3a5,0x308,0x301,0x3b0,0x880,0x2220,0x3c1,0x313,0x3a1,0x313,0x3a1, -0x313,0x880,0x2220,0x3c5,0x342,0x3a5,0x342,0x3a5,0x342,0x880,0x3330,0x3c5,0x308,0x342,0x3a5,0x308, -0x342,0x3a5,0x308,0x342,0x880,0x2220,0x1f7c,0x3b9,0x1ffa,0x399,0x1ffa,0x345,0x890,9,0x220,0x3c9, -0x3b9,0x3a9,0x399,0x880,0x2220,0x3ce,0x3b9,0x38f,0x399,0x38f,0x345,0x880,0x2220,0x3c9,0x342,0x3a9, -0x342,0x3a9,0x342,0x880,0x3330,0x3c9,0x342,0x3b9,0x3a9,0x342,0x399,0x3a9,0x342,0x345,0xc90,9, -0x220,0x3c9,0x3b9,0x3a9,0x399,0xc50,0x1d5d,1,0x3a9,0xc50,0x20bf,1,0x4b,0xc50,0x2046,1, -0xc5,0xc10,0x29f7,0xc10,0xee6,0xc10,0x29e7,0xc10,0x2a2b,0xc10,0x2a28,0xc10,0x2a1c,0xc10,0x29fd,0xc10, -0x2a1f,0xc10,0x2a1e,0xc10,0x2a3f,0xc10,0x1c60,0x841,0xa64b,1,0x1c88,0x844,0xa64a,1,0x1c88,0xc10, -0x8a04,0xc10,0xa528,0xc10,0xa544,0xc10,0xa54f,0xc10,0xa54b,0xc10,0xa541,0xc10,0xa512,0xc10,0xa52a,0xc10, -0xa515,0x810,0x3a0,0xc10,0xa543,0xc10,0x8a38,0xc10,0x3a0,0x806,0x13a0,0x13a0,0x806,0x13a1,0x13a1,0x806, -0x13a2,0x13a2,0x806,0x13a3,0x13a3,0x806,0x13a4,0x13a4,0x806,0x13a5,0x13a5,0x806,0x13a6,0x13a6,0x806,0x13a7, -0x13a7,0x806,0x13a8,0x13a8,0x806,0x13a9,0x13a9,0x806,0x13aa,0x13aa,0x806,0x13ab,0x13ab,0x806,0x13ac,0x13ac, -0x806,0x13ad,0x13ad,0x806,0x13ae,0x13ae,0x806,0x13af,0x13af,0x806,0x13b0,0x13b0,0x806,0x13b1,0x13b1,0x806, -0x13b2,0x13b2,0x806,0x13b3,0x13b3,0x806,0x13b4,0x13b4,0x806,0x13b5,0x13b5,0x806,0x13b6,0x13b6,0x806,0x13b7, -0x13b7,0x806,0x13b8,0x13b8,0x806,0x13b9,0x13b9,0x806,0x13ba,0x13ba,0x806,0x13bb,0x13bb,0x806,0x13bc,0x13bc, -0x806,0x13bd,0x13bd,0x806,0x13be,0x13be,0x806,0x13bf,0x13bf,0x806,0x13c0,0x13c0,0x806,0x13c1,0x13c1,0x806, -0x13c2,0x13c2,0x806,0x13c3,0x13c3,0x806,0x13c4,0x13c4,0x806,0x13c5,0x13c5,0x806,0x13c6,0x13c6,0x806,0x13c7, -0x13c7,0x806,0x13c8,0x13c8,0x806,0x13c9,0x13c9,0x806,0x13ca,0x13ca,0x806,0x13cb,0x13cb,0x806,0x13cc,0x13cc, -0x806,0x13cd,0x13cd,0x806,0x13ce,0x13ce,0x806,0x13cf,0x13cf,0x806,0x13d0,0x13d0,0x806,0x13d1,0x13d1,0x806, -0x13d2,0x13d2,0x806,0x13d3,0x13d3,0x806,0x13d4,0x13d4,0x806,0x13d5,0x13d5,0x806,0x13d6,0x13d6,0x806,0x13d7, -0x13d7,0x806,0x13d8,0x13d8,0x806,0x13d9,0x13d9,0x806,0x13da,0x13da,0x806,0x13db,0x13db,0x806,0x13dc,0x13dc, -0x806,0x13dd,0x13dd,0x806,0x13de,0x13de,0x806,0x13df,0x13df,0x806,0x13e0,0x13e0,0x806,0x13e1,0x13e1,0x806, -0x13e2,0x13e2,0x806,0x13e3,0x13e3,0x806,0x13e4,0x13e4,0x806,0x13e5,0x13e5,0x806,0x13e6,0x13e6,0x806,0x13e7, -0x13e7,0x806,0x13e8,0x13e8,0x806,0x13e9,0x13e9,0x806,0x13ea,0x13ea,0x806,0x13eb,0x13eb,0x806,0x13ec,0x13ec, -0x806,0x13ed,0x13ed,0x806,0x13ee,0x13ee,0x806,0x13ef,0x13ef,0x880,0x2220,0x66,0x66,0x46,0x46,0x46, -0x66,0x880,0x2220,0x66,0x69,0x46,0x49,0x46,0x69,0x880,0x2220,0x66,0x6c,0x46,0x4c,0x46, -0x6c,0x880,0x3330,0x66,0x66,0x69,0x46,0x46,0x49,0x46,0x66,0x69,0x880,0x3330,0x66,0x66, -0x6c,0x46,0x46,0x4c,0x46,0x66,0x6c,0x8c0,1,0x2220,0x73,0x74,0x53,0x54,0x53,0x74, -0xfb06,0x8c0,1,0x2220,0x73,0x74,0x53,0x54,0x53,0x74,0xfb05,0x880,0x2220,0x574,0x576,0x544, -0x546,0x544,0x576,0x880,0x2220,0x574,0x565,0x544,0x535,0x544,0x565,0x880,0x2220,0x574,0x56b,0x544, -0x53b,0x544,0x56b,0x880,0x2220,0x57e,0x576,0x54e,0x546,0x54e,0x576,0x880,0x2220,0x574,0x56d,0x544, -0x53d,0x544,0x56d +0x300,0x882,0x390,0x3330,0x3b9,0x308,0x301,0x399,0x308,0x301,0x399,0x308,0x301,0x880,0x2220,0x3b9, +0x342,0x399,0x342,0x399,0x342,0x880,0x3330,0x3b9,0x308,0x342,0x399,0x308,0x342,0x399,0x308,0x342, +0x880,0x3330,0x3c5,0x308,0x300,0x3a5,0x308,0x300,0x3a5,0x308,0x300,0x882,0x3b0,0x3330,0x3c5,0x308, +0x301,0x3a5,0x308,0x301,0x3a5,0x308,0x301,0x880,0x2220,0x3c1,0x313,0x3a1,0x313,0x3a1,0x313,0x880, +0x2220,0x3c5,0x342,0x3a5,0x342,0x3a5,0x342,0x880,0x3330,0x3c5,0x308,0x342,0x3a5,0x308,0x342,0x3a5, +0x308,0x342,0x880,0x2220,0x1f7c,0x3b9,0x1ffa,0x399,0x1ffa,0x345,0x890,9,0x220,0x3c9,0x3b9,0x3a9, +0x399,0x880,0x2220,0x3ce,0x3b9,0x38f,0x399,0x38f,0x345,0x880,0x2220,0x3c9,0x342,0x3a9,0x342,0x3a9, +0x342,0x880,0x3330,0x3c9,0x342,0x3b9,0x3a9,0x342,0x399,0x3a9,0x342,0x345,0xc90,9,0x220,0x3c9, +0x3b9,0x3a9,0x399,0xc50,0x1d5d,1,0x3a9,0xc50,0x20bf,1,0x4b,0xc50,0x2046,1,0xc5,0xc10, +0x29f7,0xc10,0xee6,0xc10,0x29e7,0xc10,0x2a2b,0xc10,0x2a28,0xc10,0x2a1c,0xc10,0x29fd,0xc10,0x2a1f,0xc10, +0x2a1e,0xc10,0x2a3f,0xc10,0x1c60,0x841,0xa64b,1,0x1c88,0x844,0xa64a,1,0x1c88,0xc10,0x8a04,0xc10, +0xa528,0xc10,0xa544,0xc10,0xa54f,0xc10,0xa54b,0xc10,0xa541,0xc10,0xa512,0xc10,0xa52a,0xc10,0xa515,0x810, +0x3a0,0xc10,0xa543,0xc10,0x8a38,0xc10,0x3a0,0x806,0x13a0,0x13a0,0x806,0x13a1,0x13a1,0x806,0x13a2,0x13a2, +0x806,0x13a3,0x13a3,0x806,0x13a4,0x13a4,0x806,0x13a5,0x13a5,0x806,0x13a6,0x13a6,0x806,0x13a7,0x13a7,0x806, +0x13a8,0x13a8,0x806,0x13a9,0x13a9,0x806,0x13aa,0x13aa,0x806,0x13ab,0x13ab,0x806,0x13ac,0x13ac,0x806,0x13ad, +0x13ad,0x806,0x13ae,0x13ae,0x806,0x13af,0x13af,0x806,0x13b0,0x13b0,0x806,0x13b1,0x13b1,0x806,0x13b2,0x13b2, +0x806,0x13b3,0x13b3,0x806,0x13b4,0x13b4,0x806,0x13b5,0x13b5,0x806,0x13b6,0x13b6,0x806,0x13b7,0x13b7,0x806, +0x13b8,0x13b8,0x806,0x13b9,0x13b9,0x806,0x13ba,0x13ba,0x806,0x13bb,0x13bb,0x806,0x13bc,0x13bc,0x806,0x13bd, +0x13bd,0x806,0x13be,0x13be,0x806,0x13bf,0x13bf,0x806,0x13c0,0x13c0,0x806,0x13c1,0x13c1,0x806,0x13c2,0x13c2, +0x806,0x13c3,0x13c3,0x806,0x13c4,0x13c4,0x806,0x13c5,0x13c5,0x806,0x13c6,0x13c6,0x806,0x13c7,0x13c7,0x806, +0x13c8,0x13c8,0x806,0x13c9,0x13c9,0x806,0x13ca,0x13ca,0x806,0x13cb,0x13cb,0x806,0x13cc,0x13cc,0x806,0x13cd, +0x13cd,0x806,0x13ce,0x13ce,0x806,0x13cf,0x13cf,0x806,0x13d0,0x13d0,0x806,0x13d1,0x13d1,0x806,0x13d2,0x13d2, +0x806,0x13d3,0x13d3,0x806,0x13d4,0x13d4,0x806,0x13d5,0x13d5,0x806,0x13d6,0x13d6,0x806,0x13d7,0x13d7,0x806, +0x13d8,0x13d8,0x806,0x13d9,0x13d9,0x806,0x13da,0x13da,0x806,0x13db,0x13db,0x806,0x13dc,0x13dc,0x806,0x13dd, +0x13dd,0x806,0x13de,0x13de,0x806,0x13df,0x13df,0x806,0x13e0,0x13e0,0x806,0x13e1,0x13e1,0x806,0x13e2,0x13e2, +0x806,0x13e3,0x13e3,0x806,0x13e4,0x13e4,0x806,0x13e5,0x13e5,0x806,0x13e6,0x13e6,0x806,0x13e7,0x13e7,0x806, +0x13e8,0x13e8,0x806,0x13e9,0x13e9,0x806,0x13ea,0x13ea,0x806,0x13eb,0x13eb,0x806,0x13ec,0x13ec,0x806,0x13ed, +0x13ed,0x806,0x13ee,0x13ee,0x806,0x13ef,0x13ef,0x880,0x2220,0x66,0x66,0x46,0x46,0x46,0x66,0x880, +0x2220,0x66,0x69,0x46,0x49,0x46,0x69,0x880,0x2220,0x66,0x6c,0x46,0x4c,0x46,0x6c,0x880, +0x3330,0x66,0x66,0x69,0x46,0x46,0x49,0x46,0x66,0x69,0x880,0x3330,0x66,0x66,0x6c,0x46, +0x46,0x4c,0x46,0x66,0x6c,0x882,0xfb06,0x2220,0x73,0x74,0x53,0x54,0x53,0x74,0x8c0,1, +0x2220,0x73,0x74,0x53,0x54,0x53,0x74,0xfb05,0x880,0x2220,0x574,0x576,0x544,0x546,0x544,0x576, +0x880,0x2220,0x574,0x565,0x544,0x535,0x544,0x565,0x880,0x2220,0x574,0x56b,0x544,0x53b,0x544,0x56b, +0x880,0x2220,0x57e,0x576,0x54e,0x546,0x54e,0x576,0x880,0x2220,0x574,0x56d,0x544,0x53d,0x544,0x56d }; static const uint16_t ucase_props_unfold[370]={ diff --git a/deps/icu-small/source/common/ucasemap.cpp b/deps/icu-small/source/common/ucasemap.cpp index 1d8a8b6c2f7eca..f6a0106aecd9e5 100644 --- a/deps/icu-small/source/common/ucasemap.cpp +++ b/deps/icu-small/source/common/ucasemap.cpp @@ -679,14 +679,18 @@ void toUpper(uint32_t options, // Adding one only to the final vowel in a longer sequence // (which does not occur in normal writing) would require lookahead. // Set the same flag as for preserving an existing dialytika. - if ((data & HAS_VOWEL) != 0 && (state & AFTER_VOWEL_WITH_ACCENT) != 0 && - (upper == 0x399 || upper == 0x3A5)) { - data |= HAS_DIALYTIKA; + if ((data & HAS_VOWEL) != 0 && + (state & (AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT | AFTER_VOWEL_WITH_COMBINING_ACCENT)) != + 0 && + (upper == 0x399 || upper == 0x3A5)) { + data |= (state & AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT) != 0 ? HAS_DIALYTIKA + : HAS_COMBINING_DIALYTIKA; } int32_t numYpogegrammeni = 0; // Map each one to a trailing, spacing, capital iota. if ((data & HAS_YPOGEGRAMMENI) != 0) { numYpogegrammeni = 1; } + const UBool hasPrecomposedAccent = (data & HAS_ACCENT) != 0; // Skip combining diacritics after this Greek letter. int32_t nextNextIndex = nextIndex; while (nextIndex < srcLength) { @@ -704,7 +708,8 @@ void toUpper(uint32_t options, } } if ((data & HAS_VOWEL_AND_ACCENT_AND_DIALYTIKA) == HAS_VOWEL_AND_ACCENT) { - nextState |= AFTER_VOWEL_WITH_ACCENT; + nextState |= hasPrecomposedAccent ? AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT + : AFTER_VOWEL_WITH_COMBINING_ACCENT; } // Map according to Greek rules. UBool addTonos = false; @@ -715,7 +720,7 @@ void toUpper(uint32_t options, !isFollowedByCasedLetter(src, nextIndex, srcLength)) { // Keep disjunctive "or" with (only) a tonos. // We use the same "word boundary" conditions as for the Final_Sigma test. - if (i == nextIndex) { + if (hasPrecomposedAccent) { upper = 0x389; // Preserve the precomposed form. } else { addTonos = true; diff --git a/deps/icu-small/source/common/ucasemap_imp.h b/deps/icu-small/source/common/ucasemap_imp.h index 71d0e9033fe293..bc83c6bd788302 100644 --- a/deps/icu-small/source/common/ucasemap_imp.h +++ b/deps/icu-small/source/common/ucasemap_imp.h @@ -263,7 +263,8 @@ static const uint32_t HAS_EITHER_DIALYTIKA = HAS_DIALYTIKA | HAS_COMBINING_DIALY // State bits. static const uint32_t AFTER_CASED = 1; -static const uint32_t AFTER_VOWEL_WITH_ACCENT = 2; +static const uint32_t AFTER_VOWEL_WITH_COMBINING_ACCENT = 2; +static const uint32_t AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT = 4; uint32_t getLetterData(UChar32 c); diff --git a/deps/icu-small/source/common/uchar_props_data.h b/deps/icu-small/source/common/uchar_props_data.h index f4d3932574d220..032422397534fe 100644 --- a/deps/icu-small/source/common/uchar_props_data.h +++ b/deps/icu-small/source/common/uchar_props_data.h @@ -9,9 +9,9 @@ #ifdef INCLUDED_FROM_UCHAR_C -static const UVersionInfo dataVersion={0xf,0,0,0}; +static const UVersionInfo dataVersion={0xf,1,0,0}; -static const uint16_t propsTrie_index[23016]={ +static const uint16_t propsTrie_index[23156]={ 0x495,0x49d,0x4a5,0x4ad,0x4c5,0x4cd,0x4d5,0x4dd,0x4e5,0x4ed,0x4f3,0x4fb,0x503,0x50b,0x513,0x51b, 0x521,0x529,0x531,0x539,0x53c,0x544,0x54c,0x554,0x55c,0x564,0x560,0x568,0x570,0x578,0x57d,0x585, 0x58d,0x595,0x599,0x5a1,0x5a9,0x5b1,0x5b9,0x5c1,0x5bd,0x5c5,0x5ca,0x5d2,0x5d8,0x5e0,0x5e8,0x5f0, @@ -51,53 +51,57 @@ static const uint16_t propsTrie_index[23016]={ 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x934,0x934, -0xc2e,0x600,0xc31,0x600,0xc39,0xc3f,0xc47,0xc4f,0xc54,0x600,0x600,0xc58,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc5f,0x600,0xc66,0xc6c,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc74,0x600,0x600,0x600,0xc7c,0x600, +0xc2e,0xc35,0xc37,0x600,0xc3f,0xc45,0xc4d,0xc55,0xc5a,0x600,0x600,0xc5e,0x600,0x600,0x600,0xc64, +0xc6b,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc72,0x600,0xc79,0xc7f,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc87,0x600,0x600,0x600,0xc8f,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0xc7e,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc85,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0xc91,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc98,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0xc8c,0x600,0x600,0x600,0xc93,0xc9b,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0xc9f,0x600,0x600,0x600,0xca6,0xcae,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xca0,0x600,0x600,0xca8,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0xcb3,0xcb8,0x600,0x600,0xcc0,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcac,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcc4,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcc9,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcc7,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcaf,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcd1,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xcb2,0x600,0x600,0x600, +0x600,0x600,0x600,0xcd7,0xcdf,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xce5, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0xcb8,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0xcec,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0xcf1,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0xcc0,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0xcc5,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0xcf6,0x600,0x600,0x600,0xc32,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0xcca,0x600,0x600,0x600,0xccf,0x600,0x600,0x600,0x600,0x600,0x600, +0xcd3,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0xcfc,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0xd04,0xd0b,0xd0f,0x600,0x600,0x600,0xccb,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0xcd7,0xcde,0xce2,0x600,0x600,0x600,0xce9,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0xd1e,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0xd16,0x934,0xd26,0x9ad,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0xd2b,0xd33,0x4e5,0xd43,0xd3b,0x600,0x600,0xd4b,0xd53,0xd63,0x4e5,0xd68,0xd70,0xd76,0xd7d,0xd5b, +0xd85,0xd8d,0x600,0xd95,0xda5,0xda8,0xd9d,0xdb0,0x655,0xdb8,0xdbf,0x8f6,0x6a3,0xdcf,0xdc7,0xdd7, +0x600,0xddf,0xde7,0xdef,0x600,0xdf7,0xdff,0xe07,0xe0f,0xe17,0xe1b,0xe23,0x535,0x535,0x600,0xe2b, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0xcf7,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0xcef,0x934,0xcff,0x9ad,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0xd04,0xd0c,0x4e5,0xd1c,0xd14,0x600,0x600,0xd24,0xd2c,0xd3c,0x4e5,0xd41,0xd49,0xd4f,0xd56,0xd34, -0xd5e,0xd66,0x600,0xd6e,0xd7e,0xd81,0xd76,0xd89,0x655,0xd91,0xd98,0x8f6,0x6a3,0xda8,0xda0,0xdb0, -0x600,0xdb8,0xdc0,0xdc8,0x600,0xdd0,0xdd8,0xde0,0xde8,0xdf0,0xdf4,0xdfc,0x535,0x535,0x600,0xe04, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, @@ -115,33 +119,29 @@ static const uint16_t propsTrie_index[23016]={ 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe0c,0xe18,0xe10, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe33,0xe3f,0xe37, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20, -0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0x600,0x600,0x600,0xe30,0x600,0xcea,0xe37,0xe3c, -0x600,0x600,0x600,0xe44,0x600,0x600,0x901,0x4b5,0xe5a,0xe4a,0xe52,0x600,0x600,0xe62,0xe6a,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe6f,0x938,0x600,0xe77,0x600,0xe7d,0xe81, -0xe89,0xe91,0xe98,0xea0,0x600,0x600,0x600,0xea6,0xebe,0x4a5,0xec6,0xece,0xed3,0x916,0xeae,0xeb6, -0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20, -0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20,0xe20, +0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, +0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0x600,0x600,0x600,0xe57,0x600,0xccc,0xe5e,0xe63, +0x600,0x600,0x600,0xe6b,0x600,0x600,0x901,0x4b5,0xe81,0xe71,0xe79,0x600,0x600,0xe89,0xe91,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe96,0x938,0x600,0xe9e,0x600,0xea4,0xea8, +0xeb0,0xeb8,0xebf,0xec7,0x600,0x600,0x600,0xecd,0xee5,0x4a5,0xeed,0xef5,0xefa,0x916,0xed5,0xedd, +0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, +0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47,0xe47, 0x12d4,0x12d4,0x1314,0x1354,0x1394,0x13cc,0x140c,0x144c,0x1484,0x14c4,0x14f0,0x1530,0x1570,0x1580,0x15c0,0x15f4, 0x1634,0x1664,0x16a4,0x16e4,0x16f4,0x1728,0x1760,0x17a0,0x17e0,0x1820,0x1854,0x1880,0x18c0,0x18f8,0x1914,0x1954, 0xa80,0xac0,0xb00,0xb40,0xb80,0xbab,0xbeb,0xa40,0xc0e,0xa40,0xa40,0xa40,0xa40,0xc4e,0x1db,0x1db, @@ -180,132 +180,132 @@ static const uint16_t propsTrie_index[23016]={ 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0xedb,0xee2,0xeea,0x4b5,0x600,0x600,0x600,0xef2,0xf02,0xefa,0xf19,0xf0a,0xf11,0xf21,0xf25,0xf29, -0x4b5,0x4b5,0x4b5,0x4b5,0x8f6,0x600,0xf31,0xf39,0x600,0xf41,0xf49,0xf4d,0xf55,0x600,0xf5d,0x4b5, -0x58d,0x597,0xf65,0x600,0xf69,0xf71,0xf81,0xf79,0x600,0xf89,0x600,0xf90,0xfa0,0xf98,0x4b5,0x4b5, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xb88,0x902,0xfa8,0xfb8,0xfb0,0x4b5,0x4b5, -0xfc8,0xfc0,0xfcb,0xfd3,0x916,0xfdb,0x4b5,0xfe3,0xfeb,0xff3,0x4b5,0x4b5,0x600,0x1003,0x100b,0xffb, -0x101b,0x1022,0x1013,0x102a,0x1032,0x4b5,0x1042,0x103a,0x600,0x1045,0x104d,0x1055,0x105d,0x1065,0x4b5,0x4b5, -0x600,0x600,0x106d,0x4b5,0x58d,0x1075,0x535,0x107d,0x600,0x1085,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x108d,0x600,0x1095,0x4b5,0x109a,0x10a2,0x10aa,0x10b1,0xfdf,0x10b9,0xfdf,0x10c1,0xb88, -0x10d1,0x636,0x10d9,0x10c9,0x98f,0x10e1,0x10e9,0x10ef,0x1107,0x10f7,0x10ff,0x110b,0x98f,0x111b,0x1113,0x1123, -0x113b,0x112b,0x1133,0x4b5,0x1142,0x114a,0x658,0x1152,0x1162,0x1168,0x1170,0x115a,0x4b5,0x4b5,0x4b5,0x4b5, -0x600,0x1178,0x1180,0x1099,0x600,0x1188,0x1190,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x1198,0x11a0,0x4b5, -0x600,0x11a8,0x11b0,0x11b8,0x600,0x11c8,0x11c0,0x4b5,0x870,0x11d0,0x11d8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x600,0x11e0,0x4b5,0x4b5,0x4b5,0x58d,0x535,0x11e8,0x11f8,0x11fe,0x11f0,0x4b5,0x4b5,0x120e,0x1212,0x1206, -0x122a,0x121a,0x1222,0x600,0x1238,0x1232,0x600,0x8f7,0x1248,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x1256,0x125b,0x1240,0x1250,0x126b,0x1263,0x4b5,0x4b5,0x127a,0x127e,0x1272,0x128e,0x1286,0x11c0,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1292,0x12a2,0x12a7,0x129a,0x4b5,0x4b5,0x12af,0x12bf,0x12b7, +0xf02,0xf09,0xf11,0x4b5,0x600,0x600,0x600,0xf19,0xf29,0xf21,0xf40,0xf31,0xf38,0xf48,0xbbd,0xf50, +0x4b5,0x4b5,0x4b5,0x4b5,0x8f6,0x600,0xf58,0xf60,0x600,0xf68,0xf70,0xf74,0xf7c,0x600,0xf84,0x4b5, +0x58d,0x597,0xf8c,0x600,0xf90,0xf98,0xfa8,0xfa0,0x600,0xfb0,0x600,0xfb7,0xfc7,0xfbf,0x4b5,0x4b5, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xb88,0x902,0xfcf,0xfdf,0xfd7,0x4b5,0x4b5, +0xfef,0xfe7,0xff2,0xffa,0x916,0x1002,0x4b5,0x100a,0x1012,0x101a,0x4b5,0x4b5,0x600,0x102a,0x1032,0x1022, +0x1042,0x1049,0x103a,0x1051,0x1059,0x4b5,0x1069,0x1061,0x600,0x106c,0x1074,0x107c,0x1084,0x108c,0x4b5,0x4b5, +0x600,0x600,0x1094,0x4b5,0x58d,0x109c,0x535,0x10a4,0x600,0x10ac,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x10b4,0x600,0x10bc,0x4b5,0x10c1,0x10c9,0x10d1,0x10d8,0x1006,0x10e0,0x1006,0x10e8,0xb88, +0x10f8,0x636,0x1100,0x10f0,0x98f,0x1108,0x1110,0x1116,0x112e,0x111e,0x1126,0x1132,0x98f,0x1142,0x113a,0x114a, +0x1162,0x1152,0x115a,0x4b5,0x1169,0x1171,0x658,0x1179,0x1189,0x118f,0x1197,0x1181,0x4b5,0x4b5,0x4b5,0x4b5, +0x600,0x119f,0x11a7,0x10c0,0x600,0x11af,0x11b7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x11bf,0x11c7,0x4b5, +0x600,0x11cf,0x11d7,0x11df,0x600,0x11ef,0x11e7,0x4b5,0x870,0x11f7,0x11ff,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x600,0x1207,0x4b5,0x4b5,0x4b5,0x58d,0x535,0x120f,0x121f,0x1225,0x1217,0x4b5,0x4b5,0x1235,0x1239,0x122d, +0x1251,0x1241,0x1249,0x600,0x125f,0x1259,0x600,0x8f7,0x126f,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x127d,0x1282,0x1267,0x1277,0x1292,0x128a,0x4b5,0x4b5,0x12a1,0x12a5,0x1299,0x12b5,0x12ad,0x11e7,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x12b9,0x12c9,0x12ce,0x12c1,0x4b5,0x4b5,0x12d6,0x12e6,0x12de, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x901,0x4b5,0x4b5,0x4b5, -0x12cf,0x12d7,0x12df,0x12c7,0x600,0x600,0x600,0x600,0x600,0x600,0x12e7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x12f6,0x12fe,0x1306,0x12ee,0x600,0x600,0x600,0x600,0x600,0x600,0x130e,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0xfdf,0x600,0x600,0x12ef,0x600,0x600,0x600,0x600,0x600, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1006,0x600,0x600,0x1316,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x12f7,0x12ff,0x4b5,0x4b5, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x131e,0x1326,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x11d8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, +0x11ff,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x8f7, -0x916,0xda4,0x600,0x916,0x1307,0x130c,0x600,0x131c,0x1324,0x132c,0x1314,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x916,0xdcb,0x600,0x916,0x132e,0x1333,0x600,0x1343,0x134b,0x1353,0x133b,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x58d,0x535,0x1334,0x4b5,0x4b5,0x4b5,0x600,0x600,0x133c,0x1341,0x1347,0x4b5,0x4b5,0x134f,0x600,0x600, +0x58d,0x535,0x135b,0x4b5,0x4b5,0x4b5,0x600,0x600,0x1363,0x1368,0x136e,0x4b5,0x4b5,0x1376,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1357,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x137e,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x902,0x4b5,0x106d,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x600,0x600,0x600,0x600,0x902,0x4b5,0x1094,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x135d,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x1365,0x136a,0x1371,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe10,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1384,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x138c,0x1391,0x1398,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xe37,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600,0x600,0x1377,0x137c,0x1384,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600,0x600,0x139e,0x13a3,0x13ab,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x1394,0x139b,0x934,0x934,0x934,0x138c,0x4b5,0x934,0x934,0x934, -0x934,0x934,0x934,0x934,0xbb7,0x934,0x13a2,0x934,0x13a9,0x13b1,0x13b7,0x934,0xade,0x934,0x934,0x13bf, -0x4b5,0x4b5,0x4b5,0x13c7,0x13c7,0x934,0x934,0xadb,0x13cf,0x4b5,0x4b5,0x4b5,0x4b5,0x13df,0x13e6,0x13eb, -0x13f1,0x13f9,0x1401,0x1409,0x13e3,0x1411,0x1419,0x1421,0x1426,0x13f8,0x13df,0x13e6,0x13e2,0x13f1,0x142e,0x13e0, -0x1431,0x13e3,0x1439,0x1441,0x1449,0x1450,0x143c,0x1444,0x144c,0x1453,0x143f,0x145b,0x13d7,0x934,0x934,0x934, -0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x55c,0x146b,0x55c, -0x1472,0x1479,0x1463,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x13bb,0x13c2,0x934,0x934,0x934,0x13b3,0x4b5,0x934,0x934,0x934, +0x934,0x934,0x934,0x934,0xbb7,0x934,0x13c9,0x934,0x13d0,0x13d8,0x13de,0x934,0xade,0x934,0x934,0x13e6, +0x4b5,0x4b5,0x4b5,0x13ee,0x13ee,0x934,0x934,0xadb,0x13f6,0x4b5,0x4b5,0x4b5,0x4b5,0x1406,0x140d,0x1412, +0x1418,0x1420,0x1428,0x1430,0x140a,0x1438,0x1440,0x1448,0x144d,0x141f,0x1406,0x140d,0x1409,0x1418,0x1455,0x1407, +0x1458,0x140a,0x1460,0x1468,0x1470,0x1477,0x1463,0x146b,0x1473,0x147a,0x1466,0x1482,0x13fe,0x934,0x934,0x934, +0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x55c,0x1492,0x55c, +0x1499,0x14a0,0x148a,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1488,0x1490,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1480,0x1498,0x9d4, -0x14a8,0x14a0,0x4b5,0x4b5,0x4b5,0x600,0x14b8,0x14b0,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0xfdf,0x14c0,0x600,0x14c8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0xfdf,0x14d0,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14d8,0x600,0x600,0x600, -0x600,0x600,0x600,0x14e0,0x4b5,0x58d,0x14f0,0x14e8,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14af,0x14b7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14a7,0x14bf,0x9d4, +0x14cf,0x14c7,0x4b5,0x4b5,0x4b5,0x600,0x14df,0x14d7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x1006,0x14e7,0x600,0x14ef,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x1006,0x14f7,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x14ff,0x600,0x600,0x600, +0x600,0x600,0x600,0x1507,0x4b5,0x58d,0x1517,0x150f,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x14f8,0x1508,0x1500,0x4b5,0x4b5,0x1518,0x1510,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x1528,0x1530,0x1538, -0x1540,0x1548,0x1550,0x4b5,0x1520,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x1558,0x934, -0x934,0xbaf,0x13a0,0x1560,0xbb7,0x1568,0x934,0x934,0x934,0x934,0xbb9,0x4b5,0x1570,0x1578,0x157c,0x1584, -0x158c,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x1594,0x934,0x934,0x934, +0x151f,0x152f,0x1527,0x4b5,0x4b5,0x153f,0x1537,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x154f,0x1557,0x155f, +0x1567,0x156f,0x1577,0x4b5,0x1547,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x157f,0x934, +0x934,0xbaf,0x13c7,0x1587,0xbb7,0x158f,0x934,0x934,0x934,0x934,0xbb9,0x4b5,0x1597,0x159f,0x15a3,0x15ab, +0x15b3,0x4b5,0x4b5,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x15bb,0x934,0x934,0x934, 0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934, -0x934,0x934,0x934,0x157d,0x159c,0x934,0x934,0x934,0x15a4,0x934,0x934,0x15ab,0x15b3,0x1558,0x934,0x15bb, -0x934,0x15c3,0x15c8,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xbaf, -0x15d0,0x15d9,0x15dd,0x15e5,0x15d5,0x934,0x934,0x934,0x934,0x15ed,0x934,0xade,0x11bc,0x4b5,0x4b5,0x4b5, +0x934,0x934,0x934,0x15a4,0x15c3,0x934,0x934,0x934,0x15cb,0x934,0x934,0x15d2,0x15da,0x157f,0x934,0x15e2, +0x934,0x15ea,0x15ef,0x4b5,0x4b5,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0x934,0xbaf, +0x15f7,0x1600,0x1604,0x160c,0x15fc,0x934,0x934,0x934,0x934,0x1614,0x934,0xade,0x11e3,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x15f5,0x600,0x600, -0x15fc,0x600,0x600,0x600,0x1604,0x600,0x160c,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x161c,0x600,0x600, +0x1623,0x600,0x600,0x600,0x162b,0x600,0x1633,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xc90,0x600,0x600, -0x1614,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x161c,0x1624,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xca3,0x600,0x600, +0x163b,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1643,0x164b,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0xccf,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0xc32,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x162b,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1652,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1632,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1659,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x1639,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0x600,0x600,0x600,0x600,0x1660,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x4b5,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x901,0x600,0x600,0x600,0x600,0x600,0x600,0xf69,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x901,0x600,0x600,0x600,0x600,0x600,0x600,0xf90,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1641,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1668,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1649,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, -0x600,0x600,0x1651,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xf69,0x4b5, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1670,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, +0xf90,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, +0x600,0x600,0x1674,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0xf90,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x67d,0x600,0x600,0x600,0x600,0x600,0x600,0x600, 0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x1314,0x4b5, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x133b,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0x1661,0x1659,0x1659,0x1659,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c, -0x1669,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, +0x4b5,0x1684,0x167c,0x167c,0x167c,0x4b5,0x4b5,0x4b5,0x4b5,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c,0x55c, +0x168c,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, 0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5,0x4b5, -0x4b5,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0x1671,0x494,0x494,0x494,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, +0x4b5,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0x1694,0x494,0x494,0x494,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, 0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf, 0xf,0xf,0xf,0xf,0xc,0x17,0x17,0x17,0x19,0x17,0x17,0x17,0x14,0x15,0x17,0x18, 0x17,0x13,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17, @@ -765,7 +765,7 @@ static const uint16_t propsTrie_index[23016]={ 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0,0,0,0x1b,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,6,6, +0x1b,0x1b,0x1b,0x1b,0x1b,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,6,6, 6,6,8,8,0x13,4,4,4,4,4,0x1b,0x1b,0x7ca,0xa4a,0xcca,4, 5,0x17,0x1b,0x1b,0xc,0x17,0x17,0x17,0x1b,4,5,0x54a,0x14,0x15,0x14,0x15, 0x14,0x15,0x14,0x15,0x14,0x15,0x1b,0x1b,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15, @@ -778,7 +778,7 @@ static const uint16_t propsTrie_index[23016]={ 5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,0,0x1b,0x1b,0x58b,0x5cb,0x60b,0x64b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +0,0,0,0x1b,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1b,0xa8b,0xacb,0xb0b, @@ -793,664 +793,673 @@ static const uint16_t propsTrie_index[23016]={ 5,5,5,5,5,0x705,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,0x585,5,5,0x705,5,5,5,0x7885, 5,0x605,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0x5c5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x785,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0x5c5,5,5,5,5,5,5,5,0x685,5,0x645,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x785,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0x5c5,5,5,5,5,5,5,5, +0x685,5,0x645,5,5,5,5,5,5,5,5,5,5,5,5,5, +0x7b85,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,0x7985,0x7c5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,0x7985,0x7c5,5,5,5, +5,5,5,0x7845,5,5,5,5,5,5,5,5,0x605,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,0x7845,5,5,5,5, -5,5,5,5,0x605,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x685,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0x1e45,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0x7985,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x7a85,5, +5,5,5,5,5,0x685,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0x1e45,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x5c5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,0x5c5,5,0x745,5,0x6c5,5,5, +5,5,0x5c5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0x7985,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x7c5,5,0x7845,0xa45,0xcc5,5,5,5,5,5,5,0xf45,5,5,5, +5,5,5,5,5,5,5,5,5,5,0x7905,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x605,0x605,0x605,0x605,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,0x5c5,5,0x745,5,0x6c5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x7c5,5,0x7845, +0xa45,0xcc5,5,5,5,5,5,5,0xf45,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x605,0x605,0x605, +0x605,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x645, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0x645,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0x585,5,5,5,5,5,5,5,0x585,5,5, +5,0x585,5,5,5,5,5,5,5,0x585,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x585,5,5,5,5,5, +5,5,5,5,5,5,0x585,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x785,0xa45,5,5,5,5, -5,5,5,5,5,5,5,5,0x585,0x5c5,0x605,5,0x5c5,5,5,5, +5,5,5,5,5,5,0x785,0xa45,5,5,5,5,5,5,5,5, +5,5,5,5,0x585,0x5c5,0x605,5,0x5c5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0x705,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x7c5,5, 5,5,5,5,5,5,5,5,5,5,5,5,0x745,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,0x705,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x785,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x1e45,5, +5,5,0x545,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0x785,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0x1e45,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,0x8005,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,0x79c5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,0x645,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 0x7885,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,0x5c5,5,5,5,5,0x5c5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0x5c5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x7845,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x6c5,5, -5,5,5,5,0x1e45,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x785,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0x6c5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x545,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,5,5,5,5, +5,0x7845,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,4,5,5,5,5,5,5,5,5,5,5,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,4,0x17,0x17,0x17, +5,5,0x6c5,5,5,5,5,5,0x1e45,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,0x6c5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,4,5,5, +5,5,5,5,5,5,5,5,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,4,0x17,0x17,0x17,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,1,2,1,2, 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,1,2,1,2,1,2,1,2,4,4,6,6, -1,2,1,2,1,2,1,2,1,2,1,2,1,2,5,6, -7,7,7,0x17,6,6,6,6,6,6,6,6,6,6,0x17,4, -5,5,5,5,5,5,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x54a, -6,6,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0, +1,2,1,2,1,2,1,2,4,4,6,6,1,2,1,2, +1,2,1,2,1,2,1,2,1,2,5,6,7,7,7,0x17, +6,6,6,6,6,6,6,6,6,6,0x17,4,5,5,5,5, +5,5,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x54a,6,6,0x17,0x17, +0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0x1a,0x1a,0x1a,0x1a, 0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, -0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,4,4,4,4,4,4,4,4,4, +0x1a,0x1a,0x1a,4,4,4,4,4,4,4,4,4,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4, +4,1,2,5,4,4,2,5,5,5,5,5,0x1a,0x1a,1,2, +1,2,1,2,1,2,1,2,1,2,1,2,2,2,1,2, +1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, +4,2,2,2,2,2,2,2,2,1,2,1,2,1,1,2, +1,2,1,2,1,2,1,2,4,0x1a,0x1a,1,2,1,2,5, +1,2,1,2,2,2,1,2,1,2,1,2,1,2,1,2, +1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,2, +1,2,1,2,1,2,1,2,1,1,1,1,2,1,2,0, +0,0,0,0,1,2,0,2,0,2,1,2,1,2,0,0, +0,0,0,0,5,5,6,5,5,5,6,5,5,5,5,6, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,8,8,6,6,8,0x1b,0x1b,0x1b,0x1b, +6,0,0,0,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0x1b,0x1b,0x19,0x1b,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0x17,0x17,0x17,0x17,0,0,0,0, +0,0,0,0,8,8,8,8,6,6,0,0,0,0,0,0, +0,0,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,8,8,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,8,8,8,8,8,8,8,8,8,8,8,8, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,5,5,5,5,5,5,0x17,0x17,0x17,5,0x17,5,5,6, +5,5,5,5,5,5,6,6,6,6,6,6,6,6,0x17,0x17, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,6,6,6,6,6,6,6,6,6,6,6,8,8, +0,0,0,0,0,0,0,0,0,0,0,0x17,8,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,4,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0x17,0x17,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6, +8,8,6,6,6,6,8,8,6,6,8,8,5,5,5,5, +5,6,4,5,5,5,5,5,5,5,5,5,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,0,5,5,5,5, +5,5,5,5,5,6,6,6,6,6,6,8,8,6,6,8, +8,6,6,0,0,0,0,0,0,0,0,0,5,5,5,6, +5,5,5,5,5,5,5,5,6,8,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0x17,0x17,0x17,0x17,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,4,5,5,5, +5,5,5,0x1b,0x1b,0x1b,5,8,6,8,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,6,5,6,6, +6,5,5,6,6,5,5,5,5,5,6,6,5,6,5,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,4,4,4,1,2,5,4,4,2,5,5,5,5,5, -0x1a,0x1a,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -2,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2, -1,2,1,2,4,2,2,2,2,2,2,2,2,1,2,1, -2,1,1,2,1,2,1,2,1,2,1,2,4,0x1a,0x1a,1, -2,1,2,5,1,2,1,2,2,2,1,2,1,2,1,2, -1,2,1,2,1,2,1,1,1,1,1,2,1,1,1,1, -1,2,1,2,1,2,1,2,1,2,1,2,1,1,1,1, -2,1,2,0,0,0,0,0,1,2,0,2,0,2,1,2, -1,2,0,0,0,0,0,0,5,5,6,5,5,5,6,5, -5,5,5,6,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,8,8,6,6,8, -0x1b,0x1b,0x1b,0x1b,6,0,0,0,0x34cb,0x344b,0x3ccb,0x37cb,0x35cb,0x3fcb,0x1b,0x1b, -0x19,0x1b,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0x17,0x17,0x17,0x17, -0,0,0,0,0,0,0,0,8,8,8,8,6,6,0,0, -0,0,0,0,0,0,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0,0,0,0,0,0,8,8,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,8,8,8,8,8,8,8,8, -8,8,8,8,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,5,5,5,5,5,5,0x17,0x17,0x17,5, -0x17,5,5,6,5,5,5,5,5,5,6,6,6,6,6,6, -6,6,0x17,0x17,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,6,6,6,6,6,6,6,6,6, -6,6,8,8,0,0,0,0,0,0,0,0,0,0,0,0x17, -8,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,4, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0x17,0x17, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,6,8,8,6,6,6,6,8,8,6,6,8,8, -5,5,5,5,5,6,4,5,5,5,5,5,5,5,5,5, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,5,5,5,5,5,0, -5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,8, -8,6,6,8,8,6,6,0,0,0,0,0,0,0,0,0, -5,5,5,6,5,5,5,5,5,5,5,5,6,8,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0x17,0x17,0x17,0x17, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -4,5,5,5,5,5,5,0x1b,0x1b,0x1b,5,8,6,8,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -6,5,6,6,6,5,5,6,6,5,5,5,5,5,6,6, -5,6,5,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,5,5,4,0x17,0x17, -5,5,5,5,5,5,5,5,5,5,5,8,6,6,8,8, -0x17,0x17,5,4,4,8,6,0,0,0,0,0,0,0,0,0, -0,5,5,5,5,5,5,0,0,5,5,5,5,5,5,0, -0,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,0,5,5,5,5,5,5,5,0, +0,0,0,0,0,0,0,5,5,4,0x17,0x17,5,5,5,5, +5,5,5,5,5,5,5,8,6,6,8,8,0x17,0x17,5,4, +4,8,6,0,0,0,0,0,0,0,0,0,0,5,5,5, +5,5,5,0,0,5,5,5,5,5,5,0,0,5,5,5, +5,5,5,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,0,5,5,5,5,5,5,5,0,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,0x1a,4,4,4,4, -2,2,2,2,2,2,2,2,2,4,0x1a,0x1a,0,0,0,0, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -5,5,5,8,8,6,8,8,6,8,8,0x17,8,6,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, -5,5,5,5,5,5,5,0,0,0,0,5,5,5,5,5, +2,2,2,2,2,2,2,0x1a,4,4,4,4,2,2,2,2, +2,2,2,2,2,4,0x1a,0x1a,0,0,0,0,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,8, +8,6,8,8,6,8,8,0x17,8,6,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,0,0,5,5,5,5, +5,5,5,0,0,0,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0x12,0x12,0x12,0x12, 0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, -0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12, +0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x12,0x11,0x11,0x11,0x11, 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, -0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, -5,5,5,5,5,5,5,5,5,5,5,0x605,5,5,5,5, -5,5,5,0x7c5,5,5,5,5,0x5c5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x6c5,5,0x6c5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x7c5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x18,5,5,5,5,5,5,5,5,5,5,5,5,5,0, -5,5,5,5,5,0,5,0,5,5,0,5,5,0,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,2,2,2,2,2,2,2,0, -0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2, -0,0,0,0,0,5,6,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, -0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x15,0x14,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, -0,0,0,0x1b,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -0x19,0x1b,0x1b,0x1b,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x14,0x15,0x17,0,0, -0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,0x17,0x13,0x13,0x16,0x16,0x14,0x15,0x14,0x15,0x14,0x15,0x14, -0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x14,0x15,0x17,0x17,0x17,0x17,0x16,0x16,0x16, -0x17,0x17,0x17,0,0x17,0x17,0x17,0x17,0x13,0x14,0x15,0x14,0x15,0x14,0x15,0x17, -0x17,0x17,0x18,0x13,0x18,0x18,0x18,0,0x17,0x19,0x17,0x17,0,0,0,0, -5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5, +0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,5,5,5,5, +5,5,5,5,5,5,5,0x605,5,5,5,5,5,5,5,0x7c5, +5,5,5,5,0x5c5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x6c5,5,0x6c5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x7c5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x18,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,5,5,5,5, +5,0,5,0,5,5,0,5,5,0,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,2,2,2,2,2,2,2,0,0,0,0,0, +0,0,0,0,0,0,0,2,2,2,2,2,0,0,0,0, +0,5,6,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a, +0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0x1a,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,0x15,0x14,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0x1b, +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,0x19,0x1b,0x1b,0x1b, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x14,0x15,0x17,0,0,0,0,0,0, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, +0x17,0x13,0x13,0x16,0x16,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14,0x15,0x14, +0x15,0x17,0x17,0x14,0x15,0x17,0x17,0x17,0x17,0x16,0x16,0x16,0x17,0x17,0x17,0, +0x17,0x17,0x17,0x17,0x13,0x14,0x15,0x14,0x15,0x14,0x15,0x17,0x17,0x17,0x18,0x13, +0x18,0x18,0x18,0,0x17,0x19,0x17,0x17,0,0,0,0,5,5,5,5, +5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,0,0x10,0,0,5,5,5,5,5,5, -0,0,5,5,5,5,5,5,0,0,5,5,5,5,5,5, -0,0,5,5,5,0,0,0,0x19,0x19,0x18,0x1a,0x1b,0x19,0x19,0, -0x1b,0x18,0x18,0x18,0x18,0x1b,0x1b,0,0,0,0,0,0,0,0,0, -0,0x10,0x10,0x10,0x1b,0x1b,0,0,0,0x17,0x17,0x17,0x19,0x17,0x17,0x17, -0x14,0x15,0x17,0x18,0x17,0x13,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0x17,0x17,0x18,0x18,0x18,0x17,0x1a,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,0x14,0x18,0x15,0x18,0x14,0x15,0x17,0x14,0x15,0x17,0x17,5,5, -5,5,5,5,5,5,5,5,4,5,5,5,5,5,5,5, +5,0,0,0x10,0,0,5,5,5,5,5,5,0,0,5,5, +5,5,5,5,0,0,5,5,5,5,5,5,0,0,5,5, +5,0,0,0,0x19,0x19,0x18,0x1a,0x1b,0x19,0x19,0,0x1b,0x18,0x18,0x18, +0x18,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0x10,0x10,0x10, +0x1b,0x1b,0,0,0,0x17,0x17,0x17,0x19,0x17,0x17,0x17,0x14,0x15,0x17,0x18, +0x17,0x13,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17, +0x18,0x18,0x18,0x17,0x1a,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0x14, +0x18,0x15,0x18,0x14,0x15,0x17,0x14,0x15,0x17,0x17,5,5,5,5,5,5, +5,5,5,5,4,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,4,4,5,5,5,5, -5,5,5,5,5,5,5,5,0,5,5,5,5,5,5,5, +5,5,5,5,5,5,4,4,5,5,5,5,5,5,5,5, +5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0,5,5,0,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0,0,0,0,0,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0xa04b, -0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0,0,0,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x17,0x17,0x17,0,0,0,0,0x58b, -0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b, -0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0xcca,0x11ca,0x11ca, -0x11ca,0x11ca,0x1e4a,0x880a,0x980a,0x980a,0x980a,0x980a,0x980a,0x784a,0x984a,0x68a,0x11ca,0x344b,0x344b,0x388b, -0x3ccb,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x54b,0x34cb, -0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0,0,0,0x34ca,0x344a,0x58a,0x68a,0x11ca,0x980a,0x984a,0x988a,0x68a,0x7ca,0x11ca,0x1e4a, -0x980a,0x784a,0x984a,0x68a,0x7ca,0x11ca,0x1e4a,0x980a,0x784a,0x788a,0x988a,0x7ca,0x58a,0x58a,0x58a,0x5ca, -0x5ca,0x5ca,0x5ca,0x68a,0x1b,0,0,0,0,0,0,0,0,0,0,0, +5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, +0,0,0,0,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0xa04b,0xa84b,0xb04b,0xb84b,0x788b, +0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x17,0x17,0x17,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b, +0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b, +0x900b,0x980b,0xa00b,0xa80b,0x7ca,0x7ca,0x7ca,0x7ca,0x7ca,0xcca,0x11ca,0x11ca,0x11ca,0x11ca,0x1e4a,0x880a, +0x980a,0x980a,0x980a,0x980a,0x980a,0x784a,0x984a,0x68a,0x11ca,0x344b,0x344b,0x388b,0x3ccb,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x54b,0x34cb,0x1b,0x1b,0x1b,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0, +0x34ca,0x344a,0x58a,0x68a,0x11ca,0x980a,0x984a,0x988a,0x68a,0x7ca,0x11ca,0x1e4a,0x980a,0x784a,0x984a,0x68a, +0x7ca,0x11ca,0x1e4a,0x980a,0x784a,0x788a,0x988a,0x7ca,0x58a,0x58a,0x58a,0x5ca,0x5ca,0x5ca,0x5ca,0x68a, +0x1b,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,0,0,0, -0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,6,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,6,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b, -0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b, -0,0,0,0,0x58b,0x68b,0x7cb,0x11cb,0,0,0,0,0,0,0,0, -0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0x1bca,5,5,5,5,5,5,5,5,0xb80a,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0,0x17,5,5,5,5,0,0,0,0,5,5,5,5, -5,5,5,5,0x17,0x58a,0x5ca,0x7ca,0xa4a,0x1e4a,0,0,0,0,0,0, -0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,5,5,5,5,5,5,5,5,5,5,5,5, +5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +6,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b, +0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0,0,0,0, +0x58b,0x68b,0x7cb,0x11cb,0,0,0,0,0,0,0,0,0,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, -0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,0,0,0,0,2,2,2,2, -2,2,2,2,5,5,5,5,5,5,5,5,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0x17, -1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1, -2,2,0,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,0,2,2,2,2,2,2,2,0,2,2,0,0,0, -1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1, -1,1,1,0,1,1,0,2,2,2,2,2,2,2,2,2, -5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -4,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0, -4,4,4,4,4,4,0,4,4,4,4,4,4,4,4,4, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, +5,0x1bca,5,5,5,5,5,5,5,5,0xb80a,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,5,5,0,0,0,5,0,0,5, -5,5,5,5,5,5,0,0,5,0,5,5,5,5,5,5, +5,5,5,5,5,5,6,6,6,6,6,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0,0x17,0x58b,0x5cb,0x60b,0x7cb,0xa4b,0x1e4b,0x784b,0x788b,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0x17, +5,5,5,5,0,0,0,0,5,5,5,5,5,5,5,5, +0x17,0x58a,0x5ca,0x7ca,0xa4a,0x1e4a,0,0,0,0,0,0,0,0,0,0, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0x1b,0x1b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0,0,0,0, -0,0,0,0x58b,0x5cb,0x60b,0x64b,0x64b,0x68b,0x7cb,0xa4b,0x1e4b,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, -5,5,0,0,0,0,0,0x58b,0x68b,0x7cb,0xa4b,0x1e4b,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, +0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,0,0,0,0,2,2,2,2,2,2,2,2, +5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0x58b,0x7cb,0xa4b,0x1e4b,0x5cb,0x60b,0,0,0,0x17,5,5,5,5, +0,0,0,0,0,0,0,0,0,0,0,0x17,1,1,1,1, +1,1,1,1,1,1,1,0,1,1,1,1,2,2,0,2, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,2, +2,2,2,2,2,2,0,2,2,0,0,0,1,1,1,1, +1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,0, +1,1,0,2,2,2,2,2,2,2,2,2,5,5,5,5, +5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,4,4,4,0,4,4, +4,4,4,4,4,4,4,0,0,0,0,0,4,4,4,4, +4,4,0,4,4,4,4,4,4,4,4,4,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,4,4,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,0,5,5,0,0,0,5,0,0,5,5,5,5,5, +5,5,0,0,5,0,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0x17, +0x58b,0x5cb,0x60b,0x7cb,0xa4b,0x1e4b,0x784b,0x788b,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x1b, +0x1b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0,0,0,0,0,0,0,0x58b, +0x5cb,0x60b,0x64b,0x64b,0x68b,0x7cb,0xa4b,0x1e4b,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,5,5,0,0, +0,0,0,0x58b,0x68b,0x7cb,0xa4b,0x1e4b,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x58b,0x7cb, +0xa4b,0x1e4b,0x5cb,0x60b,0,0,0,0x17,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,0,0,0,0,0,0x17,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b, +0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb,0x88cb,0x90cb,0x98cb,0xa0cb,0xa8cb,0xb0cb,0xb8cb,0x36cb,0x354b, +0x34cb,0x348b,0x46cb,0x344b,0x4ecb,0x388b,0x3ccb,0x454b,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +0,0,0,0,0x5ecb,0x344b,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b, +0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0,0,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b, +0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0x30b,0x34b,0x38b,0x3cb,0x7cb,0xa4b,0x1e4b,0x784b, +0x344b,0,0,0,0,0,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +0x17,0,0,0,0,0,0,0,5,6,6,6,0,6,6,0, +0,0,0,0,6,6,6,6,5,5,5,5,0,5,5,5, +0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0,0,6,6,6,0, +0,0,0,6,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,0,0,0,0x17,0xa04b,0xa84b,0xb04b,0xb84b, -0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb,0x88cb,0x90cb,0x98cb,0xa0cb,0xa8cb, -0xb0cb,0xb8cb,0x36cb,0x354b,0x34cb,0x348b,0x46cb,0x344b,0x4ecb,0x388b,0x3ccb,0x454b,5,5,5,5, +5,0x58b,0x11cb,0x17,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0,0,0,0,0x5ecb,0x344b,5,5,0x58b,0x5cb,0x60b,0x64b, -0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0,0,0x1e4b,0x800b, -0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0x30b,0x34b,0x38b,0x3cb, -0x7cb,0xa4b,0x1e4b,0x784b,0x344b,0,0,0,0,0,0,0,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,5,6,6,6, -0,6,6,0,0,0,0,0,6,6,6,6,5,5,5,5, -0,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, -6,6,6,0,0,0,0,6,5,5,5,5,5,5,5,5, +5,0x58b,0x7cb,0xa4b,5,5,5,5,5,6,6,0,0,0,0,0x58b, +0x68b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,0x1b,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0x58b,0x11cb,0x17,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,0,0,0,0x17,0x17,0x17,0x17,0x17,0x17,0x17, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0x58b,0x7cb,0xa4b,5,5,5,5,5,6,6,0, -0,0,0,0x58b,0x68b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -0x1b,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0,0,0,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,0,0,0x58b,0x5cb,0x60b,0x64b, -0x7cb,0xa4b,0x1e4b,0x784b,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b, -0x7cb,0xa4b,0x1e4b,0x784b,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,0,0,0,0,0,0x17,0x17,0x17, -0x17,0,0,0,0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b, -0x64b,0x7cb,0xa4b,0x1e4b,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0, -0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,0,0,0,0,0,0,0,0x58b,0x68b, -0x7cb,0x11cb,0x1e4b,0x784b,5,5,5,5,6,6,6,6,0,0,0,0, -0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, -0,0,0,0,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0xa4b,0xccb, -0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x344b, -0x34cb,0x348b,0x388b,0,5,5,5,5,5,5,5,5,5,5,0,6, -6,0x13,0,0,5,5,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,0,0,0,6,6,6,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0x784b, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0xccb,0x1e4b,0x344b,5, -0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6, -6,6,6,6,6,0x58b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0,0, -0,0,0,0,5,5,6,6,6,6,0x17,0x17,0x17,0x17,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x784b,0x49,0x89,0xc9,0x109,0x149,0x189, -0x1c9,0x209,0x249,0x289,6,5,5,6,6,5,0,0,0,0,0,0, -0,0,0,6,8,6,8,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,6,6,6,6,6,6,6,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0,0,0,0,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb, -0xa4b,0xccb,0xf4b,0x11cb,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,8,8,8,6,6,6,6,8,8,6,6,0x17, -0x17,0x10,0x17,0x17,0x17,0x17,6,0,0,0,0,0,0,0,0,0, -0,0x10,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, -5,5,5,6,6,6,6,6,8,6,6,6,6,6,6,6, -6,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17, -5,8,8,5,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,5, +5,5,5,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0x784b, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6, -0x17,0x17,5,0,0,0,0,0,0,0,0,0,8,5,5,5, -5,0x17,0x17,0x17,0x17,6,6,6,6,0x17,8,6,0x49,0x89,0xc9,0x109, -0x149,0x189,0x1c9,0x209,0x249,0x289,5,0x17,5,0x17,0x17,0x17,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,8, -8,8,6,6,6,6,6,6,6,6,6,8,0,0x58b,0x5cb,0x60b, -0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b, -0x784b,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,8,8,8,6,6,6,8,8, -6,8,6,6,0x17,0x17,0x17,0x17,0x17,0x17,6,5,5,6,0,0, +5,5,0,0,0,0,0,0,0,0x17,0x17,0x17,0x17,0,0,0, +0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b, 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,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, -5,0,5,5,5,5,0,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5, -5,0x17,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,8,8,8,6,6,6,6,6, -6,6,6,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0,0,0,0,0,0,5,5,8,8,0,0,6,6, -6,6,6,6,6,0,0,0,6,6,6,6,6,0,0,0, -0,0,0,0,0,0,0,0,6,6,8,8,0,5,5,5, -5,5,5,5,5,0,0,5,5,0,0,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,0,5,5,5,5,5,5, -5,0,5,5,0,5,5,5,5,5,0,6,6,5,8,8, -6,8,8,8,8,0,0,8,8,0,0,8,8,8,0,0, -5,0,0,0,0,0,0,8,0,0,0,0,0,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,8,8,8,6,6,6,6,6,6,6,6, -8,8,6,6,6,8,6,5,5,5,5,0x17,0x17,0x17,0x17,0x17, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0,0x17,6,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -8,8,8,6,6,6,6,6,6,8,6,8,8,8,8,6, -6,8,6,6,5,5,0x17,5,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,8, -8,8,6,6,6,6,0,0,8,8,8,8,6,6,8,6, -6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,5,5,5,5,6,6,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -8,8,8,6,6,6,6,6,6,6,6,8,8,6,8,6, -6,0x17,0x17,0x17,5,0,0,0,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0, +5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0, +2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,0,0,0,0,0,0,0,0x58b,0x68b,0x7cb,0x11cb,0x1e4b,0x784b, +5,5,5,5,6,6,6,6,0,0,0,0,0,0,0,0, 0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, +0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb, +0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x344b,0x34cb,0x348b,0x388b,0, +5,5,5,5,5,5,5,5,5,5,0,6,6,0x13,0,0, +5,5,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,0,0, -5,5,5,5,5,5,5,5,5,5,5,6,8,6,8,8, -6,6,6,6,6,6,8,6,5,0x17,0,0,0,0,0,0, -8,8,6,6,6,6,8,6,6,6,6,6,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0x17,0x17,0x17,0x1b, -5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0, +0,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,0x58b,0x5cb,0x60b,0x64b,0x68b,0x7cb,0xa4b,0xccb,0x1e4b,0x344b,5,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6, +6,0x58b,0x7cb,0xa4b,0x1e4b,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0, +5,5,6,6,6,6,0x17,0x17,0x17,0x17,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,6, -6,6,6,6,6,6,6,6,8,6,6,0x17,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b, -0x16cb,0x194b,0x1bcb,0,0,0,0,0,0,0,0,0,0,0,0,5, -8,5,8,6,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -5,5,5,5,5,5,5,0,0,5,0,0,5,5,5,5, -5,5,5,5,0,5,5,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,8,8,8,8,8,8,0,8, -8,0,0,6,6,8,6,5,6,5,0x17,5,8,0,0,0, +5,5,5,5,5,0x58b,0x5cb,0x60b,0x64b,0x7cb,0xa4b,0x1e4b,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x784b,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289, +6,5,5,6,6,5,0,0,0,0,0,0,0,0,0,6, +8,6,8,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +6,6,6,6,6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0, +0,0,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +8,8,8,6,6,6,6,8,8,6,6,0x17,0x17,0x10,0x17,0x17, +0x17,0x17,6,0,0,0,0,0,0,0,0,0,0,0x10,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,0,0,0,0,0,0,5,5,5,5,5,5,5,6, +6,6,6,6,8,6,6,6,6,6,6,6,6,0,0x49,0x89, +0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0x17,0x17,5,8,8,5, 0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -0,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,8,8,8,6,6,6,6, -0,0,6,6,8,8,8,8,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,6,6,6,6,6, -6,8,5,6,6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,6, -0,0,0,0,0,0,0,0,5,6,6,6,6,6,6,8, -8,6,6,6,5,5,5,5,5,6,6,6,6,6,6,6, -6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,0x17,0x17,0x17,0,0,0,0,0, +5,5,5,5,5,5,5,5,6,6,6,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,6,0x17,0x17,5,0, +0,0,0,0,0,0,0,0,8,5,5,5,5,0x17,0x17,0x17, +0x17,6,6,6,6,0x17,8,6,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,5,0x17,5,0x17,0x17,0x17,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,8,8,8,6,6, +6,6,6,6,6,6,6,8,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b, +0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0x784b,0,0,0, 0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,6,6,6,6,6,6, -6,6,6,6,6,6,6,8,6,6,0x17,0x17,0x17,5,0x17,0x17, -5,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0, +5,5,5,5,8,8,8,6,6,6,8,8,6,8,6,6, +0x17,0x17,0x17,0x17,0x17,0x17,6,5,5,6,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0,0,0, -0x17,0x17,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,8,6,6,6,6, -6,6,6,0,6,6,6,6,6,6,8,6,6,6,6,6, -6,6,6,6,0,8,6,6,6,6,6,6,6,8,6,6, -8,6,6,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,5,6, -0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0,0,0,0,0,0,5,5,5,5,5,5,5,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,5,0,5,5, 5,5,0,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,6,6,6,6,6,6,0, -0,0,6,0,6,6,0,6,5,5,5,5,5,5,5,5, -5,5,8,8,8,8,8,0,6,6,0,8,8,6,8,6, -5,0,0,0,0,0,0,0,5,5,5,5,5,5,0,5, -5,0,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,6,6,8,8,0x17, -0x17,0,0,0,0,0,0,0,6,8,6,0x17,0x17,0x17,0x17,0x17, -0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0,0,0,0,0,0,6,6,5,8,5,5,5,5, -5,5,5,5,5,5,5,5,5,0,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -8,8,6,6,6,6,6,0,0,0,8,8,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,5,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0x19,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0, -0,0,0,0,0,0,0,0,0,0,0,0x17,0xcd0b,0xcc0b,0xcb0b,0xd00b, -0xca0b,0xcf0b,0xcb4b,0xd04b,0xc90b,0x37cb,0x37cb,0x364b,0x35cb,0xc94b,0x3fcb,0x350b,0x34cb,0x344b,0x344b,0x3ccb, -0xcd0b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x19,0x19,0x34ca,0x354a,0x34ca,0x34ca, -0x344a,0x348a,0x388a,0xf4a,0x11ca,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0,0x17,0x17,0x17,0x17, -0x17,0,0,0,0,0,0,0,0,0,0,0,0x5ca,0x60a,0x64a,0x68a, -0x6ca,0x70a,0x74a,0x78a,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x64a,0x68a,0x6ca,0x70a,0x74a, -0x78a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x5ca, -0x60a,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x60a,0x64a,0x68a,0xc08a,0xc18a, -0x58a,0x5ca,0x60a,0x60a,0x64a,0x68a,0x60a,0x60a,0x64a,0x64a,0x64a,0x64a,0x6ca,0x70a,0x70a,0x70a, -0x74a,0x74a,0x78a,0x78a,0x78a,0x78a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x58a,0x5ca,0x60a,0x64a,0x64a, -0x68a,0x68a,0x5ca,0x60a,0x58a,0x5ca,0x348a,0x388a,0x454a,0x348a,0x388a,0x35ca,5,5,5,5, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,0,5,5,5,5,5,5,5,5,5,5,0x17,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,8,8,8,6,6,6,6,6,6,6,6,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,5,5,8,8,0,0,6,6,6,6,6,6, +6,0,0,0,6,6,6,6,6,0,0,0,0,0,0,0, +0,0,0,0,6,6,8,8,0,5,5,5,5,5,5,5, +5,0,0,5,5,0,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,5,5,5,5,5,5,5,0,5,5, +0,5,5,5,5,5,0,6,6,5,8,8,6,8,8,8, +8,0,0,8,8,0,0,8,8,8,0,0,5,0,0,0, +0,0,0,8,0,0,0,0,0,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,8,8,8,6,6,6,6,6,6,6,6,8,8,6,6, +6,8,6,5,5,5,5,0x17,0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0x17,0x17,0,0x17,6,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,6, +6,6,6,6,6,8,6,8,8,8,8,6,6,8,6,6, +5,5,0x17,5,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,8,8,8,6,6, +6,6,0,0,8,8,8,8,6,6,8,6,6,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,5,5,5,5,6,6,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,8,8,8,6, +6,6,6,6,6,6,6,8,8,6,8,6,6,0x17,0x17,0x17, +5,0,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x17,0x17,0, +5,5,5,5,5,5,5,6,8,6,8,8,6,6,6,6, +6,6,8,6,5,0x17,0,0,0,0,0,0,8,8,6,6, +6,6,8,6,6,6,6,6,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0x17,0x17,0x17,0x1b,5,5,5,5, +5,5,5,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,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6,5,5,5, -5,5,5,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +5,5,5,5,5,5,5,5,8,8,8,6,6,6,6,6, +6,6,6,6,8,6,6,0x17,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0, +0,0,0,0,0,0,0,0,0,0,0,5,8,5,8,6, +0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, 0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,0,0, -6,6,6,6,6,0x17,0,0,0,0,0,0,0,0,0,0, +5,5,5,0,0,5,0,0,5,5,5,5,5,5,5,5, +0,5,5,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,8,8,8,8,8,8,0,8,8,0,0,6, +6,8,6,5,6,5,0x17,5,8,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,5,5,5,5,5,5,5,5,0,0,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,8,8,8,6,6,6,6,0,0,6,6, +8,8,8,8,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,6,6,6,6,6,6,8,5,6, +6,6,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,6,0,0,0,0, +0,0,0,0,5,6,6,6,6,6,6,8,8,6,6,6, +5,5,5,5,5,6,6,6,6,6,6,6,6,6,6,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,6,6,6,6,6,6,6,6,6,6, +6,6,6,8,6,6,0x17,0x17,0x17,5,0x17,0x17,5,0x17,0x17,0x17, +0x17,0x17,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x17,0x17,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x70b,0x74b,0x78b,0x7cb, +0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b,0,0,0,0x17,0x17,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,8,6,6,6,6,6,6,6,0, +6,6,6,6,6,6,8,6,6,6,6,6,6,6,6,6, +0,8,6,6,6,6,6,6,6,8,6,6,8,6,6,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,6,6,6,6,6,6, +6,6,6,6,6,6,6,6,6,6,5,6,0,0,0,0, +0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,5,5,5,5,5,5,5,0,5,5,0,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,6,6,6,6,6,6,0,0,0,6,0, +6,6,0,6,5,5,5,5,5,5,5,5,5,5,8,8, +8,8,8,0,6,6,0,8,8,6,8,6,5,0,0,0, +0,0,0,0,5,5,5,5,5,5,0,5,5,0,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,6,6,8,8,0x17,0x17,0,0,0, +0,0,0,0,6,8,6,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17,0x17, +0x17,0x17,0x17,0x17,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0, +0,0,0,0,6,6,5,8,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,8,8,6,6, +6,6,6,0,0,0,8,8,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,5,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x19,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0, +0,0,0,0,0,0,0,0x17,0xcd0b,0xcc0b,0xcb0b,0xd00b,0xca0b,0xcf0b,0xcb4b,0xd04b, +0xc90b,0x37cb,0x37cb,0x364b,0x35cb,0xc94b,0x3fcb,0x350b,0x34cb,0x344b,0x344b,0x3ccb,0xcd0b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x19,0x19,0x19,0x34ca,0x354a,0x34ca,0x34ca,0x344a,0x348a,0x388a,0xf4a, +0x11ca,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0,0x17,0x17,0x17,0x17,0x17,0,0,0, +0,0,0,0,0,0,0,0,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a, +0x60a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a, +0x64a,0x68a,0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x64a,0x68a,0x5ca,0x60a,0x60a,0x64a,0x68a, +0x6ca,0x70a,0x74a,0x78a,0x58a,0x5ca,0x60a,0x60a,0x64a,0x68a,0xc08a,0xc18a,0x58a,0x5ca,0x60a,0x60a, +0x64a,0x68a,0x60a,0x60a,0x64a,0x64a,0x64a,0x64a,0x6ca,0x70a,0x70a,0x70a,0x74a,0x74a,0x78a,0x78a, +0x78a,0x78a,0x5ca,0x60a,0x64a,0x68a,0x6ca,0x58a,0x5ca,0x60a,0x64a,0x64a,0x68a,0x68a,0x5ca,0x60a, +0x58a,0x5ca,0x348a,0x388a,0x454a,0x348a,0x388a,0x35ca,5,5,5,5,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,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x17,0x17,0,0,0,0,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6,5,5,5,5,5,5,6, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0, +0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, +0x249,0x289,0,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,0,0,6,6,6,6, +6,0x17,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6, +6,6,6,0x17,0x17,0x17,0x17,0x17,0x1b,0x1b,0x1b,0x1b,4,4,4,4, +0x17,0x1b,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0x7cb,0x1e4b,0x788b,0x790b,0x798b,0x7a0b,0x7a8b,0,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -6,6,6,6,6,6,6,0x17,0x17,0x17,0x17,0x17,0x1b,0x1b,0x1b,0x1b, -4,4,4,4,0x17,0x1b,0,0,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0x7cb,0x1e4b,0x788b,0x790b,0x798b, -0x7a0b,0x7a8b,0,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,0,0,0,0,0,5,5,5, -0x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b, -0x94b,0x98b,0x9cb,0xa0b,0x58b,0x5cb,0x60b,0x17,0x17,0x17,0x17,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,6, -5,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, +5,5,5,5,0,0,0,0,0,5,5,5,0x54b,0x58b,0x5cb,0x60b, +0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b, +0x58b,0x5cb,0x60b,0x17,0x17,0x17,0x17,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,0,0,0,0,6,5,8,8,8, 8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, -8,8,8,8,0,0,0,0,0,0,0,6,6,6,6,4, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,0x17,4, -6,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +8,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, +0,0,0,0,0,0,0,6,6,6,6,4,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,0x17,4,6,0,0,0, +0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,4,4,4,4,0,4,4,4,4,4,4,4, -0,4,4,0,5,5,5,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,5,0,0,0,0,0,0,0,0,0, -0,0,0,0,0,0,0,0,5,5,5,0,0,5,0,0, -0,0,0,0,0,0,0,0,5,5,5,5,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,0,0,0,0,0,5,5,5,5, -5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,0,0,0x1b,6,6,0x17, -0x10,0x10,0x10,0x10,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, -0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0, +4,4,4,4,0,4,4,4,4,4,4,4,0,4,4,0, +5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,5,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,0,5,5,5,0,0,5,0,0,0,0,0,0, +0,0,0,0,5,5,5,5,0,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,0,0,0,0,0,5,5,5,5,5,5,5,5, +5,5,5,5,5,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,0,0,0x1b,6,6,0x17,0x10,0x10,0x10,0x10, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,0,0, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0, -0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,8,8,6,6,6,0x1b,0x1b, -0x1b,8,8,8,8,8,8,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6, -6,6,6,6,6,6,6,0x1b,0x1b,6,6,6,6,6,6,6, +0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, +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,6,6,6,6, +6,6,6,6,6,6,6,6,6,6,0,0,6,6,6,6, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0, +0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6, -6,0x1b,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,0x54b,0x58b,0x5cb,0x60b, -0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b, -0,0,0,0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b, -0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x58b,0x5cb, -0x60b,0x64b,0x68b,0x58b,0x68b,0,0,0,0,0,0,0,0x249,0x289,0x49,0x89, -0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209, -0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,1,1,1,1, +0x1b,0x1b,0x1b,0x1b,0x1b,8,8,6,6,6,0x1b,0x1b,0x1b,8,8,8, +8,8,8,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,6,6,6,6,6, +6,6,6,0x1b,0x1b,6,6,6,6,6,6,6,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,6,6,0x1b,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,0x54b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b, +0x74b,0x78b,0x7cb,0x80b,0x84b,0x88b,0x8cb,0x90b,0x94b,0x98b,0x9cb,0xa0b,0,0,0,0, +0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b, +0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x58b,0x5cb,0x60b,0x64b,0x68b,0x58b, +0x68b,0,0,0,0,0,0,0,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189, +0x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0x49,0x89, +0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2, -2,0,2,2,2,2,2,2,2,2,2,2,1,1,1,1, +1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,2,2,2,2,2,2,2,0,2,2, +2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2, +1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,2,1,0,1,1, +0,0,1,0,0,1,1,0,0,1,1,1,1,0,1,1, +1,1,1,1,1,1,2,2,2,2,0,2,0,2,2,2, +2,2,2,2,0,2,2,2,2,2,2,2,2,2,2,2, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +2,2,2,2,1,1,0,1,1,1,1,0,0,1,1,1, +1,1,1,1,1,0,1,1,1,1,1,1,1,0,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -1,0,1,1,0,0,1,0,0,1,1,0,0,1,1,1, -1,0,1,1,1,1,1,1,1,1,2,2,2,2,0,2, -0,2,2,2,2,2,2,2,0,2,2,2,2,2,2,2, -2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,2,2,2,2,1,1,0,1,1,1,1,0, -0,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1, +2,2,2,2,2,2,2,2,1,1,0,1,1,1,1,0, +1,1,1,1,1,0,1,0,0,0,1,1,1,1,1,1, 1,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,1,1,0,1, -1,1,1,0,1,1,1,1,1,0,1,0,0,0,1,1, -1,1,1,1,1,0,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,2,2,2,2,2,2,0,0,1,1,1,1, 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,0x18,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0x18, -2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0x18, +2,2,2,2,2,2,0,0,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,0x18,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,0x18,2,2,2,2, +2,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,1,1,1,0x18,2,2,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -2,2,2,2,2,0x18,2,2,2,2,2,2,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,0x18, -2,2,2,2,2,2,1,2,0,0,0x49,0x89,0xc9,0x109,0x149,0x189, -0x1c9,0x209,0x249,0x289,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6, -6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,0x1b,0x1b,0x1b,0x1b,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x17,0x17,0x17,0x17,0x17, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6, -6,6,6,6,6,6,6,0,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,6,0,0,6,6,6,6,6, -2,2,2,2,2,2,2,2,2,2,5,2,2,2,2,2, -2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0, -0,0,0,0,0,2,2,2,2,2,2,0,0,0,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -6,6,0,6,6,0,6,6,6,6,6,0,0,0,0,0, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -4,4,4,4,4,4,4,4,4,4,4,4,4,4,0,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,5,0x1b, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0, -6,6,6,6,6,6,6,4,4,4,4,4,4,4,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,0, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -5,5,5,5,5,5,5,5,5,5,5,5,6,6,6,6, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0x19, -5,5,5,5,5,5,5,5,5,5,5,4,6,6,6,6, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0, -5,5,5,5,5,5,5,0,5,5,5,5,0,5,5,0, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0, -5,5,5,5,5,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b, -6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0, -2,2,2,2,6,6,6,6,6,6,6,4,0,0,0,0, -0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0x17,0x17, -1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2, +2,0x18,2,2,2,2,2,2,1,1,1,1,1,1,1,1, +1,1,1,1,1,1,1,1,2,2,2,0x18,2,2,2,2, +2,2,1,2,0,0,0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0x249,0x289, +0x49,0x89,0xc9,0x109,0x149,0x189,0x1c9,0x209,0,6,6,6,6,6,6,6, +6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,0x1b, +0x1b,0x1b,0x1b,6,6,6,6,6,6,6,6,6,6,6,6,6, +6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,6,0x1b,0x1b,0x17,0x17,0x17,0x17,0x17,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6, +6,6,6,0,6,6,6,6,6,6,6,6,6,6,6,6, +6,6,6,6,6,0,0,6,6,6,6,6,2,2,2,2, +2,2,2,2,2,2,5,2,2,2,2,2,2,2,2,2, +2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0, +0,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,6,6,0,6, +6,0,6,6,6,6,6,0,0,0,0,0,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,6,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4, +4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,5,0x1b,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,0,0,0,6,6,6,6, +6,6,6,4,4,4,4,4,4,4,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,6,0,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +5,5,5,5,5,5,5,5,6,6,6,6,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0x19,5,5,5,5, +5,5,5,5,5,5,5,4,6,6,6,6,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0,0,5,5,5,5, +5,5,5,0,5,5,5,5,0,5,5,0,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,0,5,5,5,5, +5,0,0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,6,6,6,6, +6,6,6,0,0,0,0,0,0,0,0,0,2,2,2,2, +6,6,6,6,6,6,6,4,0,0,0,0,0x49,0x89,0xc9,0x109, +0x149,0x189,0x1c9,0x209,0x249,0x289,0,0,0,0,0x17,0x17,1,1,2,2, 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b, -0x78cb,0x794b,0x814b,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x1b,0x34cb,0x344b,0x3ccb, -0x19,0x58b,0x5cb,0x788b,0x78cb,0,0,0,0,0,0,0,0,0,0,0, -0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b, -0x984b,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb, -0x984b,0xa04b,0xa84b,0xb04b,0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x1b,0x5cb, -0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0x900b,0xa00b,0x804b,0x788b,0x344b,0x354b,0,0, -0,0x58b,0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b, -0x16cb,0x194b,0x1bcb,0x1e4b,0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b, -0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x18,0x18,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -5,5,5,5,0,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -0,5,5,0,5,0,0,5,0,5,5,5,5,5,5,5, -5,5,5,0,5,5,5,5,0,5,0,5,0,0,0,0, -0,0,5,0,0,0,0,5,0,5,0,5,0,5,5,5, -0,5,5,0,5,0,0,5,0,5,0,5,0,5,0,5, -0,5,5,0,5,0,0,5,5,5,5,0,5,5,5,5, -5,5,5,0,5,5,5,5,0,5,5,5,5,0,5,0, -5,5,5,5,5,5,5,5,5,5,0,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, -0,5,5,5,0,5,5,5,5,5,0,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0, +2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0,0x58b,0x5cb,0x60b, +0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x78cb,0x794b,0x814b,0x58b, +0x5cb,0x60b,0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x1b,0x34cb,0x344b,0x3ccb,0x19,0x58b,0x5cb,0x788b, +0x78cb,0,0,0,0,0,0,0,0,0,0,0,0x16cb,0x194b,0x1bcb,0x1e4b, +0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0x984b,0xa04b,0xa84b,0xb04b, +0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x78cb,0x80cb,0x984b,0xa04b,0xa84b,0xb04b, +0xb84b,0x788b,0x808b,0x888b,0x908b,0x988b,0xa08b,0xa88b,0xb08b,0xb88b,0x1b,0x5cb,0x60b,0x64b,0x68b,0x6cb, +0x70b,0x74b,0x78b,0x7cb,0x900b,0xa00b,0x804b,0x788b,0x344b,0x354b,0,0,0,0x58b,0x5cb,0x60b, +0x64b,0x68b,0x6cb,0x70b,0x74b,0x78b,0x7cb,0xa4b,0xccb,0xf4b,0x11cb,0x144b,0x16cb,0x194b,0x1bcb,0x1e4b, +0x800b,0x880b,0x900b,0x980b,0xa00b,0xa80b,0xb00b,0xb80b,0x784b,0x804b,0x884b,0x904b,0,0,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x18,0x18,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5, +0,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,0,5,5,0, +5,0,0,5,0,5,5,5,5,5,5,5,5,5,5,0, +5,5,5,5,0,5,0,5,0,0,0,0,0,0,5,0, +0,0,0,5,0,5,0,5,0,5,5,5,0,5,5,0, +5,0,0,5,0,5,0,5,0,5,0,5,0,5,5,0, +5,0,0,5,5,5,5,0,5,5,5,5,5,5,5,0, +5,5,5,5,0,5,5,5,5,0,5,0,5,5,5,5, +5,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,0,0,0,5,5,5, +0,5,5,5,5,5,0,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0,0,0,0,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x2cb,0x2cb,0x30b,0x34b, +0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x54b,0x54b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0, +0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x2cb,0x2cb,0x30b,0x34b,0x38b,0x3cb,0x40b,0x44b,0x48b,0x4cb,0x50b,0x54b,0x54b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0x1b,0x1b,0,0, +0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,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,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1a,0x1a,0x1a,0x1a,0x1a, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1a,0x1a,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0,0,0, +0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0,0,0,0,0x1b,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0, -0x1b,0x1b,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0, -0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0, -0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0, 0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0, -0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0,0,0,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x1b,0x1b,0x1b,5,0x705,5,5,5,5,5,5,5,5,5,5, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0,0,0,0,0,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0,0,0,0, +0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x1b,0,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, +5,0x705,5,5,5,5,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x645,5,5,5,5,5,5,5,5,5,5,5, +0x645,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x645,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,0x645,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x685,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x685,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0xcc5, +5,5,5,5,5,5,5,5,0xf45,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,0xf45,5,5,5,5,5,5,5, +5,5,5,5,5,5,0x6c5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,0x605,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0xcc5,5,5,5,5,5,5,5,5,0xf45,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,0xf45,5,5,5, -5,5,5,5,5,5,5,5,5,5,0x6c5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,5,5,5,5,0x605,5,5, +5,5,5,5,5,0x605,5,5,5,5,5,5,5,5,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,5,5,5,0x605,5,5,5,5,5,5, +0x605,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,0x605, +5,5,5,5,5,5,5,5,5,5,5,5,5,0x645,5,5, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x605,5,5,5,5,5,5,5,5,5,5,5, +5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,0x605,5,5,5,5,5,5,5,5,5,5,5,5, -5,0x645,5,5,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,5,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,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x785,5,5,5,5,5,5,5,5,5,5,5, -5,5,5,5,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, +5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +0x785,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5, +0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10, -0x10,0x10,0x10,0x10,0,0x10,0,0,0,0,0,0,0,0,0,0, +0,0x10,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,0,0, +6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, -0x11,0x11,0,0,0,0,0,0 +0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11,0,0, +0,0,0,0 }; static const UTrie2 propsTrie={ @@ -1458,155 +1467,155 @@ static const UTrie2 propsTrie={ propsTrie_index+4692, nullptr, 4692, - 18324, + 18464, 0xa40, 0x12d4, 0x0, 0x0, 0x110000, - 0x59e4, + 0x5a70, nullptr, 0, false, false, 0, nullptr }; -static const uint16_t propsVectorsTrie_index[32692]={ -0x539,0x541,0x549,0x551,0x569,0x571,0x579,0x581,0x589,0x591,0x599,0x5a1,0x5a9,0x5b1,0x5b9,0x5c1, -0x5c8,0x5d0,0x5d8,0x5e0,0x5e3,0x5eb,0x5f3,0x5fb,0x603,0x60b,0x613,0x61b,0x623,0x62b,0x633,0x63b, -0x643,0x64b,0x652,0x65a,0x662,0x66a,0x672,0x67a,0x682,0x68a,0x68f,0x697,0x69e,0x6a6,0x6ae,0x6b6, -0x6be,0x6c6,0x6ce,0x6d6,0x6dd,0x6e5,0x6ed,0x6f5,0x6fd,0x705,0x70d,0x715,0x71d,0x725,0x72d,0x735, -0x1b39,0xd8a,0xe56,0x118d,0x12cc,0x1d01,0x1ea0,0x1cf9,0x13e6,0x13f6,0x13de,0x13ee,0x80a,0x810,0x818,0x820, -0x828,0x82e,0x836,0x83e,0x846,0x84c,0x854,0x85c,0x864,0x86a,0x872,0x87a,0x882,0x88a,0x892,0x899, -0x8a1,0x8a7,0x8af,0x8b7,0x8bf,0x8c5,0x8cd,0x8d5,0x8dd,0x13fe,0x8e5,0x8ed,0x8f5,0x8fc,0x904,0x90c, -0x914,0x918,0x920,0x927,0x92f,0x937,0x93f,0x947,0x1719,0x1721,0x94f,0x957,0x95f,0x967,0x96f,0x976, -0x177f,0x176f,0x1777,0x1a74,0x1a7c,0x140e,0x97e,0x1406,0x1662,0x1662,0x1664,0x1422,0x1423,0x1416,0x1418,0x141a, -0x1787,0x1789,0x986,0x1789,0x98e,0x993,0x99b,0x178e,0x9a1,0x1789,0x9a7,0x9af,0xc6a,0x1796,0x1796,0x9b7, -0x17a6,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7,0x17a7, -0x17a7,0x17a7,0x17a7,0x179e,0x9bf,0x17af,0x17af,0x9c7,0xb92,0xb9a,0xba2,0xbaa,0x17bf,0x17b7,0x9cf,0x9d7, -0x9df,0x17c9,0x17d1,0x9e7,0x17c7,0x9ef,0x1b41,0xd92,0xbb2,0xbba,0xbc2,0xbc7,0x19da,0xc91,0xc98,0x1936, -0xc42,0x1b49,0xd9a,0xda2,0xdaa,0xdb2,0xf60,0xf64,0x1a3a,0x1a3f,0xcd0,0xcd8,0x1ab0,0x1ab8,0x1c19,0xe5e, -0x1ac0,0xd1e,0xd26,0x1ac8,0x1105,0x11b5,0xf38,0xdba,0x1956,0x193e,0x194e,0x1946,0x19f2,0x19ea,0x19a6,0x1a32, -0x142b,0x142b,0x142b,0x142b,0x142e,0x142b,0x142b,0x1436,0x9f7,0x143e,0x9fb,0xa03,0x143e,0xa0b,0xa13,0xa1b, -0x144e,0x1446,0x1456,0xa23,0xa2b,0x145e,0xa33,0xa3b,0x1466,0x146e,0x1476,0x147e,0xa43,0x1486,0x148d,0x1495, -0x149d,0x14a5,0x14ad,0x14b5,0x14bd,0x14c4,0x14cc,0x14d4,0x14dc,0x14e4,0x14e7,0x14e9,0x17d9,0x18cc,0x18d2,0x1a22, -0x14f1,0xa4b,0xa53,0x1617,0x161c,0x161f,0x1625,0x14f9,0x162d,0x162d,0x1509,0x1501,0x1511,0x1519,0x1521,0x1529, -0x1531,0x1539,0x1541,0x1549,0x18da,0x192e,0x1a84,0x1be1,0x1559,0x155f,0x1567,0x156f,0x1551,0x1577,0x18e2,0x18e9, -0x17e1,0x17e1,0x17e1,0x17e1,0x17e1,0x17e1,0x17e1,0x17e1,0x18f1,0x18f1,0x18f1,0x18f1,0x18f9,0x1900,0x1902,0x1909, -0x1911,0x1915,0x1915,0x1918,0x1915,0x1915,0x191e,0x1915,0x195e,0x1a2a,0x1a8c,0xbcf,0xbd5,0x1d45,0x1d4d,0x1e2b, -0x19ca,0x19be,0x19c2,0x1a47,0x19ae,0x19ae,0x19ae,0xc52,0x19b6,0xc72,0x1a0a,0xcc0,0xc5a,0xc62,0xc62,0x1ad0, -0x19fa,0x1a94,0xca8,0xcb0,0xa5b,0x17e9,0x17e9,0xa63,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0xa6b,0x73d, -0x164a,0x166c,0xa73,0x1674,0xa7b,0x167c,0x1684,0x168c,0xa83,0xa88,0x1694,0x169b,0xa8d,0x17f9,0x1a1a,0xc4a, -0xa95,0x16f6,0x16fd,0x16a3,0x1705,0x1709,0x16ab,0x16af,0x16c8,0x16c8,0x16ca,0x16b7,0x16bf,0x16bf,0x16c0,0x1711, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801, -0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1801,0x1804,0x1966,0x1966, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2, -0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d2,0x16d9,0x1b31,0x1f0c, -0x180c,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812, -0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812, -0x1812,0x1812,0x1812,0x1812,0xa9d,0x181a,0xaa5,0x1b51,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc, -0x1ad8,0xd2e,0x1aec,0x1ae4,0x1aee,0x1b59,0x1b59,0xdc2,0x19d2,0x1a4f,0x1aa4,0x1aa8,0x1a9c,0x1c11,0xce0,0xce7, -0x1a02,0xcb8,0x1a57,0xcef,0x1af6,0x1af9,0xd36,0x1b61,0x1b09,0x1b01,0xd3e,0xdca,0x1b69,0x1b6d,0xdd2,0x100f, -0x1b11,0xd46,0xd4e,0x1b75,0x1b85,0x1b7d,0xdda,0xf08,0xe66,0xe6e,0x1d9b,0xfbf,0x1e48,0x1e48,0x1b8d,0xde2, -0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762, -0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764, -0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766, -0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761, -0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763, -0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765, -0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767, -0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762, -0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764, -0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766, -0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761, -0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763, -0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765, -0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767, -0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762, -0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764, -0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766, -0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761, -0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763, -0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765, -0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767, -0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0x1767,0x1761,0x1762,0x1763,0x1764,0x1765,0x1766,0xaad,0xdea,0xded, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739, -0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739,0x1739, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, -0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x16e1,0x16e1,0x16e1,0x16e1,0x16e1,0x16e1,0x16e1,0x16e1, -0x16e6,0x16ee,0x1926,0x13a3,0x1a12,0x1a12,0x13a7,0x13ae,0xab5,0xabd,0xac5,0x1597,0x159e,0x15a6,0xacd,0x15ae, -0x15ec,0x15ec,0x157f,0x1587,0x15b6,0x15e3,0x15e4,0x15f4,0x15be,0x15c3,0x15cb,0x15d3,0xad5,0x15db,0xadd,0x158f, -0xcc8,0x15fc,0xae5,0xaed,0x1604,0x160a,0x160f,0xaf5,0xb05,0x1652,0x165a,0x163d,0x1642,0xb0d,0xb15,0xafd, -0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729, -0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1729,0x1731,0x1731,0x1731,0x1731, -0x1564,0x1564,0x15a4,0x15e4,0x1624,0x1664,0x16a4,0x16e4,0x1720,0x1760,0x178c,0x17cc,0x180c,0x184c,0x188c,0x18cc, -0x190c,0x1948,0x1988,0x19c8,0x1a08,0x1a3c,0x1a78,0x1ab8,0x1af8,0x1b38,0x1b74,0x1bb4,0x1bf4,0x1c34,0x1c74,0x1cb4, -0xe59,0xa80,0xac0,0xb00,0xb40,0xb6b,0xf99,0xa40,0xed9,0xa40,0xa40,0xa40,0xa40,0xbab,0x13e2,0x13e2, +static const uint16_t propsVectorsTrie_index[32764]={ +0x53e,0x546,0x54e,0x556,0x56e,0x576,0x57e,0x586,0x58e,0x596,0x59e,0x5a6,0x5ae,0x5b6,0x5be,0x5c6, +0x5cd,0x5d5,0x5dd,0x5e5,0x5e8,0x5f0,0x5f8,0x600,0x608,0x610,0x618,0x620,0x628,0x630,0x638,0x640, +0x648,0x650,0x657,0x65f,0x667,0x66f,0x677,0x67f,0x687,0x68f,0x694,0x69c,0x6a3,0x6ab,0x6b3,0x6bb, +0x6c3,0x6cb,0x6d3,0x6db,0x6e2,0x6ea,0x6f2,0x6fa,0x702,0x70a,0x712,0x71a,0x722,0x72a,0x732,0x73a, +0x1b43,0xd8f,0xe5b,0x1192,0x12d1,0x1d0b,0x1eaa,0x1d03,0x13f0,0x1400,0x13e8,0x13f8,0x80f,0x815,0x81d,0x825, +0x82d,0x833,0x83b,0x843,0x84b,0x851,0x859,0x861,0x869,0x86f,0x877,0x87f,0x887,0x88f,0x897,0x89e, +0x8a6,0x8ac,0x8b4,0x8bc,0x8c4,0x8ca,0x8d2,0x8da,0x8e2,0x1408,0x8ea,0x8f2,0x8fa,0x901,0x909,0x911, +0x919,0x91d,0x925,0x92c,0x934,0x93c,0x944,0x94c,0x1723,0x172b,0x954,0x95c,0x964,0x96c,0x974,0x97b, +0x1789,0x1779,0x1781,0x1a7e,0x1a86,0x1418,0x983,0x1410,0x166c,0x166c,0x166e,0x142c,0x142d,0x1420,0x1422,0x1424, +0x1791,0x1793,0x98b,0x1793,0x993,0x998,0x9a0,0x1798,0x9a6,0x1793,0x9ac,0x9b4,0xc6f,0x17a0,0x17a0,0x9bc, +0x17b0,0x17b1,0x17b1,0x17b1,0x17b1,0x17b1,0x17b1,0x17b1,0x17b1,0x17b1,0x17b1,0x17b1,0x17b1,0x17b1,0x17b1,0x17b1, +0x17b1,0x17b1,0x17b1,0x17a8,0x9c4,0x17b9,0x17b9,0x9cc,0xb97,0xb9f,0xba7,0xbaf,0x17c9,0x17c1,0x9d4,0x9dc, +0x9e4,0x17d3,0x17db,0x9ec,0x17d1,0x9f4,0x1b4b,0xd97,0xbb7,0xbbf,0xbc7,0xbcc,0x19e4,0xc96,0xc9d,0x1940, +0xc47,0x1b53,0xd9f,0xda7,0xdaf,0xdb7,0xf65,0xf69,0x1a44,0x1a49,0xcd5,0xcdd,0x1aba,0x1ac2,0x1c23,0xe63, +0x1aca,0xd23,0xd2b,0x1ad2,0x110a,0x11ba,0xf3d,0xdbf,0x1960,0x1948,0x1958,0x1950,0x19fc,0x19f4,0x19b0,0x1a3c, +0x1435,0x1435,0x1435,0x1435,0x1438,0x1435,0x1435,0x1440,0x9fc,0x1448,0xa00,0xa08,0x1448,0xa10,0xa18,0xa20, +0x1458,0x1450,0x1460,0xa28,0xa30,0x1468,0xa38,0xa40,0x1470,0x1478,0x1480,0x1488,0xa48,0x1490,0x1497,0x149f, +0x14a7,0x14af,0x14b7,0x14bf,0x14c7,0x14ce,0x14d6,0x14de,0x14e6,0x14ee,0x14f1,0x14f3,0x17e3,0x18d6,0x18dc,0x1a2c, +0x14fb,0xa50,0xa58,0x1621,0x1626,0x1629,0x162f,0x1503,0x1637,0x1637,0x1513,0x150b,0x151b,0x1523,0x152b,0x1533, +0x153b,0x1543,0x154b,0x1553,0x18e4,0x1938,0x1a8e,0x1beb,0x1563,0x1569,0x1571,0x1579,0x155b,0x1581,0x18ec,0x18f3, +0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x18fb,0x18fb,0x18fb,0x18fb,0x1903,0x190a,0x190c,0x1913, +0x191b,0x191f,0x191f,0x1922,0x191f,0x191f,0x1928,0x191f,0x1968,0x1a34,0x1a96,0xbd4,0xbda,0x1d4f,0x1d57,0x1e35, +0x19d4,0x19c8,0x19cc,0x1a51,0x19b8,0x19b8,0x19b8,0xc57,0x19c0,0xc77,0x1a14,0xcc5,0xc5f,0xc67,0xc67,0x1ada, +0x1a04,0x1a9e,0xcad,0xcb5,0xa60,0x17f3,0x17f3,0xa68,0x17fb,0x17fb,0x17fb,0x17fb,0x17fb,0x17fb,0xa70,0x742, +0x1654,0x1676,0xa78,0x167e,0xa80,0x1686,0x168e,0x1696,0xa88,0xa8d,0x169e,0x16a5,0xa92,0x1803,0x1a24,0xc4f, +0xa9a,0x1700,0x1707,0x16ad,0x170f,0x1713,0x16b5,0x16b9,0x16d2,0x16d2,0x16d4,0x16c1,0x16c9,0x16c9,0x16ca,0x171b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b, +0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180b,0x180e,0x1970,0x1970, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc, +0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16dc,0x16e3,0x1b3b,0x1f16, +0x1816,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c, +0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c,0x181c, +0x181c,0x181c,0x181c,0x181c,0xaa2,0x1824,0xaaa,0x1b5b,0x1ae6,0x1ae6,0x1ae6,0x1ae6,0x1ae6,0x1ae6,0x1ae6,0x1ae6, +0x1ae2,0xd33,0x1af6,0x1aee,0x1af8,0x1b63,0x1b63,0xdc7,0x19dc,0x1a59,0x1aae,0x1ab2,0x1aa6,0x1c1b,0xce5,0xcec, +0x1a0c,0xcbd,0x1a61,0xcf4,0x1b00,0x1b03,0xd3b,0x1b6b,0x1b13,0x1b0b,0xd43,0xdcf,0x1b73,0x1b77,0xdd7,0x1014, +0x1b1b,0xd4b,0xd53,0x1b7f,0x1b8f,0x1b87,0xddf,0xf0d,0xe6b,0xe73,0x1da5,0xfc4,0x1e52,0x1e52,0x1b97,0xde7, +0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c, +0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e, +0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770, +0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b, +0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d, +0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f, +0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771, +0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c, +0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e, +0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770, +0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b, +0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d, +0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f, +0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771, +0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c, +0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e, +0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770, +0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b, +0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d, +0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f, +0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771, +0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0x1771,0x176b,0x176c,0x176d,0x176e,0x176f,0x1770,0xab2,0xdef,0xdf2, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743, +0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743,0x1743, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f, +0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x163f,0x16eb,0x16eb,0x16eb,0x16eb,0x16eb,0x16eb,0x16eb,0x16eb, +0x16f0,0x16f8,0x1930,0x139d,0x1a1c,0x1a1c,0x13a1,0x13a8,0xaba,0xac2,0xaca,0x15a1,0x15a8,0x15b0,0xad2,0x15b8, +0x15f6,0x15f6,0x1589,0x1591,0x15c0,0x15ed,0x15ee,0x15fe,0x15c8,0x15cd,0x15d5,0x15dd,0xada,0x15e5,0xae2,0x1599, +0xccd,0x1606,0xaea,0xaf2,0x160e,0x1614,0x1619,0xafa,0xb0a,0x165c,0x1664,0x1647,0x164c,0xb12,0xb1a,0xb02, +0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733, +0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x1733,0x173b,0x173b,0x173b,0x173b, +0x1578,0x1578,0x15b8,0x15f8,0x1638,0x1678,0x16b8,0x16f8,0x1734,0x1774,0x17a0,0x17e0,0x1820,0x1860,0x18a0,0x18e0, +0x1920,0x195c,0x199c,0x19dc,0x1a1c,0x1a50,0x1a8c,0x1acc,0x1b0c,0x1b4c,0x1b88,0x1bc8,0x1c08,0x1c48,0x1c88,0x1cc8, +0xe59,0xa80,0xac0,0xb00,0xb40,0xb6b,0xf99,0xa40,0xed9,0xa40,0xa40,0xa40,0xa40,0xbab,0x13f5,0x13f5, 0xf19,0xfd9,0xa40,0xa40,0xa40,0xbeb,0xf59,0xc2b,0xa40,0xc51,0xc91,0xcd1,0xd11,0xd51,0xe99,0xdc9, -0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322,0x1322, -0x1322,0x1322,0x1322,0x1322,0x1019,0x1362,0x1157,0x1197,0x13a2,0x11a2,0x1422,0x1422,0x1422,0x1059,0x1079,0x10b9, -0x1462,0x1462,0x11e2,0x14a2,0x10f9,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079, -0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1079,0x1117, +0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335,0x1335, +0x1335,0x1335,0x1335,0x1335,0x1019,0x1375,0x116a,0x11aa,0x13b5,0x11b5,0x1435,0x1435,0x1435,0x1059,0x108c,0x10cc, +0x1475,0x1475,0x11f5,0x14b5,0x110c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c, +0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x108c,0x112a, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, @@ -1629,1954 +1638,1958 @@ static const uint16_t propsVectorsTrie_index[32692]={ 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, 0xe09,0xe19,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40, 0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xa40,0xd89, -0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2, -0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x1222, -0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2, -0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x12e2,0x1262, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0xc27,0xc2a,0xdf5,0x1deb,0x1017,0x745,0x559,0x10b1,0xcf7,0xd76,0x559,0x559,0x1d11,0xf10,0xf18,0x1e33, -0xc7a,0xc81,0xc89,0x1b95,0x1dcb,0x559,0x1dab,0xfe7,0x1b9d,0xdfd,0xe05,0xe0d,0x103f,0x74d,0x559,0x559, -0x1ba5,0x1ba5,0x755,0x559,0x1e60,0x10c9,0x1e58,0x10d1,0x1f4c,0x11cb,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0xe15,0x1fa4,0x12c4,0x1346,0x1347,0x1f6c,0x11f3,0x11fa,0x1201,0x1303,0x1307,0x127b,0x1211, -0x1c21,0x1c23,0xe76,0xe7d,0x1bad,0x1bb5,0xe1d,0xf30,0x1d09,0xef8,0xf00,0xfdf,0x1d29,0x1d2d,0x1d35,0x105f, -0xfaf,0x1d8b,0x75d,0x559,0x10b9,0x10c1,0x1d93,0xfb7,0xf91,0xf97,0xf9f,0xfa7,0x559,0x559,0x559,0x559, -0x1ed0,0x1ec8,0x113b,0x1143,0x1e13,0x1e0b,0x1087,0x559,0x559,0x559,0x559,0x559,0x1dfb,0x1047,0x104f,0x1057, -0x1dc3,0x1dbb,0xff7,0x1133,0x1d3d,0xf40,0x765,0x559,0x1097,0x109f,0x76d,0x559,0x559,0x559,0x559,0x559, -0x1f44,0x11ad,0x775,0x559,0x559,0x1e23,0x1e1b,0x108f,0x1283,0x1289,0x1291,0x559,0x559,0x1219,0x121d,0x1225, -0x1f04,0x1efc,0x1195,0x1ef4,0x1eec,0x1185,0x1df3,0x1037,0x1357,0x135a,0x135a,0x559,0x559,0x559,0x559,0x559, -0x10e9,0x10ee,0x10f6,0x10fd,0x1125,0x112b,0x559,0x559,0x1169,0x116d,0x1175,0x11bd,0x11c3,0x77d,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x11db,0x136a,0x136f,0x1377,0x559,0x559,0x781,0x1f8c,0x126b, -0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f, -0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a5f,0x1a64,0xcff,0xd06,0xd06,0xd06, -0x1a6c,0x1a6c,0x1a6c,0xd0e,0x1e50,0x1e50,0x1e50,0x1e50,0x1e50,0x1e50,0x789,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x78d,0x1fbc,0x1fbc,0x12d4,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b, -0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0x1c2b,0xe85,0xfff,0x1007,0x1fc4, -0x130f,0x1317,0xf48,0x1de3,0x1ddb,0x1027,0x102f,0x795,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1f64,0x1f5c,0x11eb, -0x559,0x559,0x559,0x1d21,0x1d21,0xf20,0x1d19,0xf28,0x559,0x559,0x111d,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x799,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1d73,0x1d73,0x1d73,0xf6c,0xf71, -0x7a1,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1fd4,0x1337,0x133e,0x1fcc,0x1fcc,0x1fcc,0x7a9, -0x559,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0xb2b,0x184f,0xb33,0x1850,0x1847,0x1858,0x185e,0x1866, -0xb3b,0x198e,0x198e,0x7b1,0x559,0x559,0x559,0x1362,0x11e3,0x197e,0x197e,0xc32,0xd16,0x559,0x559,0x559, -0x559,0x1897,0x189e,0xb43,0x18a1,0xb4b,0xb53,0xb5b,0x189b,0xb63,0xb6b,0xb73,0x18a0,0x18a8,0x1897,0x189e, -0x189a,0x18a1,0x18a9,0x1898,0x189f,0x189b,0xb7a,0x186e,0x1876,0x187d,0x1884,0x1871,0x1879,0x1880,0x1887,0xb82, -0x188f,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78,0x1e78, -0x1e78,0x1e68,0x1e6b,0x1e68,0x1e72,0x10d9,0x7b9,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x12f0,0x12f8,0x12fb,0x12fb,0x12fb,0x12fb,0x12fb, -0x12fb,0x110d,0x1115,0x1fdc,0x134f,0x7c1,0x559,0x559,0x559,0x1f84,0x122d,0x7c9,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x7cd,0x131f,0x1f94,0x1273,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x7d5,0x137f,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x12dc,0x1db3,0x1db3,0x1db3,0x1db3,0x1db3,0x1db3,0xfef,0x559,0x1ec0,0x1eb8,0x10e1,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x7dd,0x1f54,0x11d3,0x559,0x559,0x1235,0x1236,0x7e5,0x559,0x559,0x559,0x559, -0x559,0xebd,0xec5,0xecd,0xed5,0xedd,0xee5,0xeec,0xef0,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x7e9,0x1067,0x1e03,0x106d,0x1e03,0x1075,0x107a,0x107f, -0x107f,0x1e88,0x1ea8,0x1eb0,0x1f1c,0x1e90,0x1f74,0x1e98,0x1f24,0x1f7c,0x1f7c,0x119d,0x11a5,0x124d,0x1253,0x125b, -0x1263,0x1f9c,0x1f9c,0x1f9c,0x1f9c,0x12a7,0x1f9c,0x12ad,0x12b1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1, -0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1, -0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f1,0x7f2,0xb8a,0x18b1,0x18b1,0x18b1,0x7fa,0x7fa,0x7fa, -0x7fa,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x802,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa, -0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa, -0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa, -0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa, -0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0x7fa,0xbdd,0xbe4,0xbec,0xbf4,0x196e,0x196e,0x196e, -0xbfc,0xc04,0xc07,0x199e,0x1996,0xc3a,0xd56,0xd5a,0xd5e,0x559,0x559,0x559,0x559,0xd66,0x1b19,0xd6e, -0xf58,0x1822,0xb1d,0xb23,0x101f,0xc0f,0x19e2,0xca0,0x559,0x1837,0x182a,0x182f,0x1976,0xc17,0xc1f,0x114b, -0x1151,0x1d7b,0xf79,0x1d6b,0xf50,0x1327,0x132f,0x559,0x559,0x1da3,0x1da3,0x1da3,0x1da3,0x1da3,0x1da3,0x1da3, -0x1da3,0x1da3,0xfc7,0xfcf,0xfd7,0x12e4,0x12e8,0x559,0x559,0x1b21,0xd7e,0x1b29,0x1b29,0xd82,0xe8d,0xe95, -0xe9d,0x1bf1,0x1bd9,0x1bf9,0x1c01,0x1be9,0xe25,0xe29,0xe30,0xe38,0xe3c,0xe44,0xe4c,0xe4e,0xe4e,0xe4e, -0xe4e,0x1c62,0x1c6a,0x1c62,0x1c70,0x1c78,0x1c43,0x1c80,0x1c88,0x1c62,0x1c90,0x1c98,0x1c9f,0x1ca7,0x1c4b,0x1c62, -0x1cac,0x1c53,0x1c5a,0x1cb4,0x1cba,0x1d5c,0x1d63,0x1d55,0x1cc1,0x1cc9,0x1cd1,0x1cd9,0x1dd3,0x1ce1,0x1ce9,0xea5, -0xead,0x1c33,0x1c33,0x1c33,0xeb5,0x1d83,0x1d83,0xf81,0xf89,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b, -0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e3b,0x1e40,0x1e3b,0x1e3b,0x1e3b,0x10a7,0x10a9,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1159,0x1c3b,0x1f14,0x1f14,0x1f14,0x1f14,0x1f14,0x1f14, -0x1f14,0x1f34,0x1161,0x123e,0x1245,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c,0x1f3c, -0x117d,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd, -0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbf,0x1bbd,0x1bc7,0x1bbd,0x1bbd, -0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bca,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1bd1,0x1209,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0, -0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0,0x1ee0, -0x1ee4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1fb4,0x1299, -0x129f,0x12b9,0x12bc,0x12bc,0x12bc,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559, -0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x559,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18bc, -0x1387,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x138f,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4, -0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x18c4,0x13b6,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1393,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x139b,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1387, -0x1387,0x1387,0x1387,0x1387,0x1387,0x1387,0x1393,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x13be,0x1cf1,0x1cf1,0x1cf1,0x1cf1,0x1cf1,0x1cf1,0x13c6,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x13ce,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac, -0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x13d6,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1741,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1749,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751,0x1751, -0x1751,0x1751,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759,0x1759, -0x1759,0x1759,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9,0x18b9, -0x18b9,0x18b9,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09,0x1c09, -0x1c09,0x1c09,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80,0x1e80, -0x1e80,0x1e80,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8,0x1ed8, -0x1ed8,0x1ed8,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c,0x1f2c, -0x1f2c,0x1f2c,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac, -0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac, -0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac, -0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac,0x1fac, -0x1fac,0x1fac,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4,0x1fe4, -0x1fe4,0x1fe4,0x538,0x538,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e5,0x2ee,0x2e8, -0x2e8,0x2eb,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2, -0x2e2,0x2e2,0x2e2,0x2e2,0x7da,0x7d4,0x7b9,0x79e,0x7aa,0x7a7,0x79e,0x7b6,0x7a4,0x7b0,0x79e,0x7cb, -0x7c2,0x7b3,0x7d7,0x7ad,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x7bf,0x7bc, -0x7c5,0x7c5,0x7c5,0x7d4,0x79e,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0, -0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7a4, -0x7aa,0x7b0,0x7d1,0x798,0x7ce,0x7e3,0x7e3,0x7e3,0x7e3,0x7e3,0x7e3,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd, -0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7a4, -0x7c8,0x7a1,0x7c5,0x2e2,0,0,0,0,0,0,0,0,0,0,0,0, +0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5, +0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x12b5,0x1235, +0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5, +0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x12f5,0x1275, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0xc2c,0xc2f,0xdfa,0x1df5,0x101c,0x74a,0x55e,0x10b6,0xcfc,0xd7b,0x55e,0x55e,0x1d1b,0xf15,0xf1d,0x1e3d, +0xc7f,0xc86,0xc8e,0x1b9f,0x1dd5,0x55e,0x1db5,0xfec,0x1ba7,0xe02,0xe0a,0xe12,0x1044,0x752,0x55e,0x55e, +0x1baf,0x1baf,0x75a,0x55e,0x1e6a,0x10ce,0x1e62,0x10d6,0x1f56,0x11d0,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0xe1a,0x1fae,0x12c9,0x134b,0x134c,0x1f76,0x11f8,0x11ff,0x1206,0x1308,0x130c,0x1280,0x1216, +0x1c2b,0x1c2d,0xe7b,0xe82,0x1bb7,0x1bbf,0xe22,0xf35,0x1d13,0xefd,0xf05,0xfe4,0x1d33,0x1d37,0x1d3f,0x1064, +0xfb4,0x1d95,0x762,0x55e,0x10be,0x10c6,0x1d9d,0xfbc,0xf96,0xf9c,0xfa4,0xfac,0x55e,0x55e,0x55e,0x55e, +0x1eda,0x1ed2,0x1140,0x1148,0x1e1d,0x1e15,0x108c,0x55e,0x55e,0x55e,0x55e,0x55e,0x1e05,0x104c,0x1054,0x105c, +0x1dcd,0x1dc5,0xffc,0x1138,0x1d47,0xf45,0x76a,0x55e,0x109c,0x10a4,0x772,0x55e,0x55e,0x55e,0x55e,0x55e, +0x1f4e,0x11b2,0x77a,0x55e,0x55e,0x1e2d,0x1e25,0x1094,0x1288,0x128e,0x1296,0x55e,0x55e,0x121e,0x1222,0x122a, +0x1f0e,0x1f06,0x119a,0x1efe,0x1ef6,0x118a,0x1dfd,0x103c,0x135c,0x135f,0x135f,0x55e,0x55e,0x55e,0x55e,0x55e, +0x10ee,0x10f3,0x10fb,0x1102,0x112a,0x1130,0x55e,0x55e,0x116e,0x1172,0x117a,0x11c2,0x11c8,0x782,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x11e0,0x136f,0x1374,0x137c,0x55e,0x55e,0x786,0x1f96,0x1270, +0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69, +0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a69,0x1a6e,0xd04,0xd0b,0xd0b,0xd0b, +0x1a76,0x1a76,0x1a76,0xd13,0x1e5a,0x1e5a,0x1e5a,0x1e5a,0x1e5a,0x1e5a,0x78e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x792,0x1fc6,0x1fc6,0x12d9,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35, +0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0xe8a,0x1004,0x100c,0x1fce, +0x1314,0x131c,0xf4d,0x1ded,0x1de5,0x102c,0x1034,0x79a,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1f6e,0x1f66,0x11f0, +0x55e,0x55e,0x55e,0x1d2b,0x1d2b,0xf25,0x1d23,0xf2d,0x55e,0x55e,0x1122,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x79e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1d7d,0x1d7d,0x1d7d,0xf71,0xf76, +0x7a6,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1fde,0x133c,0x1343,0x1fd6,0x1fd6,0x1fd6,0x7ae, +0x55e,0x1849,0x1849,0x1849,0x1849,0x1849,0x1849,0x1849,0xb30,0x1859,0xb38,0x185a,0x1851,0x1862,0x1868,0x1870, +0xb40,0x1998,0x1998,0x7b6,0x55e,0x55e,0x55e,0x1367,0x11e8,0x1988,0x1988,0xc37,0xd1b,0x55e,0x55e,0x55e, +0x55e,0x18a1,0x18a8,0xb48,0x18ab,0xb50,0xb58,0xb60,0x18a5,0xb68,0xb70,0xb78,0x18aa,0x18b2,0x18a1,0x18a8, +0x18a4,0x18ab,0x18b3,0x18a2,0x18a9,0x18a5,0xb7f,0x1878,0x1880,0x1887,0x188e,0x187b,0x1883,0x188a,0x1891,0xb87, +0x1899,0x1e82,0x1e82,0x1e82,0x1e82,0x1e82,0x1e82,0x1e82,0x1e82,0x1e82,0x1e82,0x1e82,0x1e82,0x1e82,0x1e82,0x1e82, +0x1e82,0x1e72,0x1e75,0x1e72,0x1e7c,0x10de,0x7be,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x12f5,0x12fd,0x1300,0x1300,0x1300,0x1300,0x1300, +0x1300,0x1112,0x111a,0x1fe6,0x1354,0x7c6,0x55e,0x55e,0x55e,0x1f8e,0x1232,0x7ce,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x7d2,0x1324,0x1f9e,0x1278,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x7da,0x1384,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x12e1,0x1dbd,0x1dbd,0x1dbd,0x1dbd,0x1dbd,0x1dbd,0xff4,0x55e,0x1eca,0x1ec2,0x10e6,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x7e2,0x1f5e,0x11d8,0x55e,0x55e,0x123a,0x123b,0x7ea,0x55e,0x55e,0x55e,0x55e, +0x55e,0xec2,0xeca,0xed2,0xeda,0xee2,0xeea,0xef1,0xef5,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x7ee,0x106c,0x1e0d,0x1072,0x1e0d,0x107a,0x107f,0x1084, +0x1084,0x1e92,0x1eb2,0x1eba,0x1f26,0x1e9a,0x1f7e,0x1ea2,0x1f2e,0x1f86,0x1f86,0x11a2,0x11aa,0x1252,0x1258,0x1260, +0x1268,0x1fa6,0x1fa6,0x1fa6,0x1fa6,0x12ac,0x1fa6,0x12b2,0x12b6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6, +0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6, +0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f6,0x7f7,0xb8f,0x18bb,0x18bb,0x18bb,0x7ff,0x7ff,0x7ff, +0x7ff,0x1990,0x1990,0x1990,0x1990,0x1990,0x1990,0x1990,0x807,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff, +0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff, +0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff, +0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff, +0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0x7ff,0xbe2,0xbe9,0xbf1,0xbf9,0x1978,0x1978,0x1978, +0xc01,0xc09,0xc0c,0x19a8,0x19a0,0xc3f,0xd5b,0xd5f,0xd63,0x55e,0x55e,0x55e,0x55e,0xd6b,0x1b23,0xd73, +0xf5d,0x182c,0xb22,0xb28,0x1024,0xc14,0x19ec,0xca5,0x55e,0x1841,0x1834,0x1839,0x1980,0xc1c,0xc24,0x1150, +0x1156,0x1d85,0xf7e,0x1d75,0xf55,0x132c,0x1334,0x55e,0x55e,0x1dad,0x1dad,0x1dad,0x1dad,0x1dad,0x1dad,0x1dad, +0x1dad,0x1dad,0xfcc,0xfd4,0xfdc,0x12e9,0x12ed,0x55e,0x55e,0x1b2b,0xd83,0x1b33,0x1b33,0xd87,0xe92,0xe9a, +0xea2,0x1bfb,0x1be3,0x1c03,0x1c0b,0x1bf3,0xe2a,0xe2e,0xe35,0xe3d,0xe41,0xe49,0xe51,0xe53,0xe53,0xe53, +0xe53,0x1c6c,0x1c74,0x1c6c,0x1c7a,0x1c82,0x1c4d,0x1c8a,0x1c92,0x1c6c,0x1c9a,0x1ca2,0x1ca9,0x1cb1,0x1c55,0x1c6c, +0x1cb6,0x1c5d,0x1c64,0x1cbe,0x1cc4,0x1d66,0x1d6d,0x1d5f,0x1ccb,0x1cd3,0x1cdb,0x1ce3,0x1ddd,0x1ceb,0x1cf3,0xeaa, +0xeb2,0x1c3d,0x1c3d,0x1c3d,0xeba,0x1d8d,0x1d8d,0xf86,0xf8e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1e45,0x1e45,0x1e45,0x1e45,0x1e45,0x1e45,0x1e45, +0x1e45,0x1e45,0x1e45,0x1e45,0x1e45,0x1e45,0x1e45,0x1e4a,0x1e45,0x1e45,0x1e45,0x10ac,0x10ae,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2, +0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2, +0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2, +0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2, +0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x115e,0x1c45,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e,0x1f1e, +0x1f1e,0x1f3e,0x1166,0x1243,0x124a,0x1f46,0x1f46,0x1f46,0x1f46,0x1f46,0x1f46,0x1f46,0x1f46,0x1f46,0x1f46,0x1f46, +0x1182,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc7, +0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc9,0x1bc7,0x1bd1,0x1bc7,0x1bc7, +0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bd4,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bc7,0x1bdb,0x120e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea, +0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea,0x1eea, +0x1eee,0x1fbe,0x1fbe,0x1fbe,0x1fbe,0x1fbe,0x1fbe,0x1fbe,0x1fbe,0x1fbe,0x1fbe,0x1fbe,0x1fbe,0x1fbe,0x1fbe,0x129e, +0x12a4,0x12be,0x12c1,0x12c1,0x12c1,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e, +0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x55e,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3, +0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3, +0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3, +0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c6, +0x138c,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36, +0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36, +0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x13d0,0x1ff6,0x1ff6,0x1ff6,0x1ff6,0x1ff6,0x1ff6,0x1ff6, +0x1ff6,0x1ff6,0x1ff6,0x1ff6,0x1ff6,0x1ff6,0x1ff6,0x1ff6,0x1ff6,0x1ff6,0x1ff6,0x13e0,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x18ce,0x18ce,0x18ce,0x18ce, +0x18ce,0x18ce,0x18ce,0x18ce,0x18ce,0x18ce,0x18ce,0x18ce,0x18ce,0x18ce,0x18ce,0x18ce,0x13b0,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138d,0x1fee,0x1fee,0x1fee,0x1fee, +0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee, +0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1395,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138d,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13, +0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13, +0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13, +0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13, +0x1c13,0x1c13,0x1c13,0x13b8,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x1cfb,0x13c0,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a, +0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a, +0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a, +0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a, +0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x13c8,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36, +0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6, +0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x13d8, +0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee, +0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee, +0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b, +0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b, +0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b, +0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b, +0x175b,0x175b,0x175b,0x175b,0x174b,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763, +0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763, +0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763, +0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763, +0x1763,0x1763,0x1763,0x1763,0x1753,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b, +0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b, +0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b, +0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b, +0x175b,0x175b,0x175b,0x175b,0x175b,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763, +0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763, +0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763, +0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763,0x1763, +0x1763,0x1763,0x1763,0x1763,0x1763,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3, +0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3, +0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3, +0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x18c3, +0x18c3,0x18c3,0x18c3,0x18c3,0x18c3,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13, +0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13, +0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13, +0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1c13, +0x1c13,0x1c13,0x1c13,0x1c13,0x1c13,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a, +0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a, +0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a, +0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a, +0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1e8a,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2, +0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2, +0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2, +0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2, +0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1ee2,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36, +0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36, +0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36, +0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1f36, +0x1f36,0x1f36,0x1f36,0x1f36,0x1f36,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6, +0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6, +0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6, +0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6, +0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fb6,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee, +0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee, +0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee, +0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x1fee, +0x1fee,0x1fee,0x1fee,0x1fee,0x1fee,0x53d,0x53d,0x53d,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2, +0x2e2,0x2e5,0x2ee,0x2e8,0x2e8,0x2eb,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2, +0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x2e2,0x7da,0x7d4,0x7b9,0x79e,0x7aa,0x7a7,0x79e,0x7b6, +0x7a4,0x7b0,0x79e,0x7cb,0x7c2,0x7b3,0x7d7,0x7ad,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b,0x79b, +0x79b,0x79b,0x7bf,0x7bc,0x7c5,0x7c5,0x7c5,0x7d4,0x79e,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e6,0x7e0, +0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0,0x7e0, +0x7e0,0x7e0,0x7e0,0x7a4,0x7aa,0x7b0,0x7d1,0x798,0x7ce,0x7e3,0x7e3,0x7e3,0x7e3,0x7e3,0x7e3,0x7dd, +0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd,0x7dd, +0x7dd,0x7dd,0x7dd,0x7a4,0x7c8,0x7a1,0x7c5,0x2e2,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,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, -0,0,0,0,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x300,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1, +0,0,0,0,0,0,0,0,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x300,0x2f1,0x2f1, 0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1, -0x2f1,0x2f1,0x2f1,0x2f1,0x2f4,0x64b,0x7ef,0x7f2,0x651,0x7f2,0x7ec,0x645,0x63c,0x2fa,0x65a,0x2fd, -0x7f5,0x633,0x648,0x7e9,0x64e,0x657,0x639,0x639,0x63f,0x2f7,0x645,0x642,0x63c,0x639,0x65a,0x2fd, -0x636,0x636,0x636,0x64b,0x306,0x306,0x306,0x306,0x306,0x306,0x663,0x306,0x306,0x306,0x306,0x306, -0x306,0x306,0x306,0x306,0x663,0x306,0x306,0x306,0x306,0x306,0x306,0x654,0x663,0x306,0x306,0x306, -0x306,0x306,0x663,0x65d,0x660,0x660,0x303,0x303,0x303,0x303,0x65d,0x303,0x660,0x660,0x660,0x303, -0x660,0x660,0x303,0x303,0x65d,0x303,0x660,0x660,0x303,0x303,0x303,0x654,0x65d,0x660,0x660,0x303, -0x660,0x303,0x65d,0x303,0x312,0x669,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309, -0x312,0x309,0x312,0x309,0x30f,0x666,0x312,0x669,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x669, -0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x66f,0x666,0x312,0x309,0x312,0x669, -0x312,0x309,0x312,0x309,0x312,0x666,0x672,0x66c,0x312,0x309,0x312,0x309,0x666,0x312,0x309,0x312, -0x309,0x312,0x309,0x672,0x66c,0x66f,0x666,0x312,0x669,0x312,0x309,0x312,0x669,0x675,0x66f,0x666, -0x312,0x669,0x312,0x309,0x312,0x309,0x66f,0x666,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309, -0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x66f,0x666,0x312,0x309,0x312,0x669, -0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x312,0x309,0x312, -0x309,0x312,0x309,0x30c,0x315,0x321,0x321,0x315,0x321,0x315,0x321,0x321,0x315,0x321,0x321,0x321, -0x315,0x315,0x321,0x321,0x321,0x321,0x315,0x321,0x321,0x315,0x321,0x321,0x321,0x315,0x315,0x315, -0x321,0x321,0x315,0x321,0x324,0x318,0x321,0x315,0x321,0x315,0x321,0x321,0x315,0x321,0x315,0x315, -0x321,0x315,0x321,0x324,0x318,0x321,0x321,0x321,0x315,0x321,0x315,0x321,0x321,0x315,0x315,0x31e, -0x321,0x315,0x315,0x315,0x31e,0x31e,0x31e,0x31e,0x327,0x327,0x31b,0x327,0x327,0x31b,0x327,0x327, -0x31b,0x324,0x678,0x324,0x678,0x324,0x678,0x324,0x678,0x324,0x678,0x324,0x678,0x324,0x678,0x324, -0x678,0x315,0x324,0x318,0x324,0x318,0x324,0x318,0x321,0x315,0x324,0x318,0x324,0x318,0x324,0x318, -0x324,0x318,0x324,0x318,0x318,0x327,0x327,0x31b,0x324,0x318,0x9cf,0x9cf,0x9d2,0x9cc,0x324,0x318, -0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318, -0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x9d2,0x9cc,0x9d2,0x9cc,0x9cf,0x9c9,0x9d2,0x9cc, -0xb8b,0xc84,0x9cf,0x9c9,0x9cf,0x9c9,0x9d2,0x9cc,0x9d2,0x9cc,0x9d2,0x9cc,0x9d2,0x9cc,0x9d2,0x9cc, -0x9d2,0x9cc,0x9d2,0x9cc,0xc84,0xc84,0xc84,0xd7d,0xd7d,0xd7d,0xd80,0xd80,0xd7d,0xd80,0xd80,0xd7d, -0xd7d,0xd80,0xebe,0xec1,0xec1,0xec1,0xec1,0xebe,0xec1,0xebe,0xec1,0xebe,0xec1,0xebe,0xec1,0xebe, -0x32a,0x67b,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a, -0x32a,0x67b,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a, +0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f1,0x2f4,0x64b,0x7ef,0x7f2,0x651,0x7f2,0x7ec,0x645, +0x63c,0x2fa,0x65a,0x2fd,0x7f5,0x633,0x648,0x7e9,0x64e,0x657,0x639,0x639,0x63f,0x2f7,0x645,0x642, +0x63c,0x639,0x65a,0x2fd,0x636,0x636,0x636,0x64b,0x306,0x306,0x306,0x306,0x306,0x306,0x663,0x306, +0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x306,0x663,0x306,0x306,0x306,0x306,0x306,0x306,0x654, +0x663,0x306,0x306,0x306,0x306,0x306,0x663,0x65d,0x660,0x660,0x303,0x303,0x303,0x303,0x65d,0x303, +0x660,0x660,0x660,0x303,0x660,0x660,0x303,0x303,0x65d,0x303,0x660,0x660,0x303,0x303,0x303,0x654, +0x65d,0x660,0x660,0x303,0x660,0x303,0x65d,0x303,0x312,0x669,0x312,0x309,0x312,0x309,0x312,0x309, +0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x30f,0x666,0x312,0x669,0x312,0x309,0x312,0x309, +0x312,0x309,0x312,0x669,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x66f,0x666, +0x312,0x309,0x312,0x669,0x312,0x309,0x312,0x309,0x312,0x666,0x672,0x66c,0x312,0x309,0x312,0x309, +0x666,0x312,0x309,0x312,0x309,0x312,0x309,0x672,0x66c,0x66f,0x666,0x312,0x669,0x312,0x309,0x312, +0x669,0x675,0x66f,0x666,0x312,0x669,0x312,0x309,0x312,0x309,0x66f,0x666,0x312,0x309,0x312,0x309, +0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x66f,0x666, +0x312,0x309,0x312,0x669,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309,0x312,0x309, +0x312,0x312,0x309,0x312,0x309,0x312,0x309,0x30c,0x315,0x321,0x321,0x315,0x321,0x315,0x321,0x321, +0x315,0x321,0x321,0x321,0x315,0x315,0x321,0x321,0x321,0x321,0x315,0x321,0x321,0x315,0x321,0x321, +0x321,0x315,0x315,0x315,0x321,0x321,0x315,0x321,0x324,0x318,0x321,0x315,0x321,0x315,0x321,0x321, +0x315,0x321,0x315,0x315,0x321,0x315,0x321,0x324,0x318,0x321,0x321,0x321,0x315,0x321,0x315,0x321, +0x321,0x315,0x315,0x31e,0x321,0x315,0x315,0x315,0x31e,0x31e,0x31e,0x31e,0x327,0x327,0x31b,0x327, +0x327,0x31b,0x327,0x327,0x31b,0x324,0x678,0x324,0x678,0x324,0x678,0x324,0x678,0x324,0x678,0x324, +0x678,0x324,0x678,0x324,0x678,0x315,0x324,0x318,0x324,0x318,0x324,0x318,0x321,0x315,0x324,0x318, +0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x318,0x327,0x327,0x31b,0x324,0x318,0x9cf,0x9cf, +0x9d2,0x9cc,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318, +0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x324,0x318,0x9d2,0x9cc,0x9d2,0x9cc, +0x9cf,0x9c9,0x9d2,0x9cc,0xb8e,0xc87,0x9cf,0x9c9,0x9cf,0x9c9,0x9d2,0x9cc,0x9d2,0x9cc,0x9d2,0x9cc, +0x9d2,0x9cc,0x9d2,0x9cc,0x9d2,0x9cc,0x9d2,0x9cc,0xc87,0xc87,0xc87,0xd80,0xd80,0xd80,0xd83,0xd83, +0xd80,0xd83,0xd83,0xd80,0xd80,0xd83,0xec1,0xec4,0xec4,0xec4,0xec4,0xec1,0xec4,0xec1,0xec4,0xec1, +0xec4,0xec1,0xec4,0xec1,0x32a,0x67b,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a, +0x32a,0x32a,0x32a,0x32a,0x32a,0x67b,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a, 0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a, -0x32d,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a, -0x32a,0x32a,0x32a,0x32a,0x32a,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0xc87,0xc87,0x342,0x342,0x342,0x342, -0x342,0x342,0x342,0x342,0x342,0x339,0x339,0x339,0x339,0x339,0x339,0x339,0x336,0x336,0x333,0x333, -0x681,0x333,0x339,0x684,0x33c,0x684,0x684,0x684,0x33c,0x684,0x339,0x339,0x687,0x33f,0x333,0x333, -0x333,0x333,0x333,0x333,0x67e,0x67e,0x67e,0x67e,0x330,0x67e,0x333,0xb01,0x342,0x342,0x342,0x342, -0x342,0x333,0x333,0x333,0x333,0x333,0x9de,0x9de,0x9db,0x9d8,0x9db,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a, -0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0xc8a,0x68a,0x68a,0x68a,0x68a, +0x32a,0x32a,0x32a,0x32a,0x32d,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a, +0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x32a,0x9d5,0x9d5,0x9d5,0x9d5,0x9d5,0xc8a,0xc8a, +0x342,0x342,0x342,0x342,0x342,0x342,0x342,0x342,0x342,0x339,0x339,0x339,0x339,0x339,0x339,0x339, +0x336,0x336,0x333,0x333,0x681,0x333,0x339,0x684,0x33c,0x684,0x684,0x684,0x33c,0x684,0x339,0x339, +0x687,0x33f,0x333,0x333,0x333,0x333,0x333,0x333,0x67e,0x67e,0x67e,0x67e,0x330,0x67e,0x333,0xb04, +0x342,0x342,0x342,0x342,0x342,0x333,0x333,0x333,0x333,0x333,0x9de,0x9de,0x9db,0x9d8,0x9db,0xc8d, +0xc8d,0xc8d,0xc8d,0xc8d,0xc8d,0xc8d,0xc8d,0xc8d,0xc8d,0xc8d,0xc8d,0xc8d,0xc8d,0xc8d,0xc8d,0xc8d, +0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a, 0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a, 0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a, 0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a, -0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68a,0x68d,0x68d,0x92d,0x68d, -0x68d,0x930,0xb04,0xb04,0xb04,0xb04,0xb04,0xb04,0xb04,0xb04,0xb04,0xc3c,0xd47,0xd47,0xd47,0xd47, -0xd47,0xd47,0xd47,0xd47,0xe82,0xe82,0xe82,0xe82,0xe85,0xd4a,0xd4a,0xd4a,0x690,0x690,0xb07,0xc81, -0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xc81,0xf6c,0xf69,0xf6c,0xf69, -0x34e,0x357,0xf6c,0xf69,9,9,0x35d,0xec4,0xec4,0xec4,0x345,0x14af,9,9,9,9, -0x35a,0x348,0x36c,0x34b,0x36c,0x36c,0x36c,9,0x36c,9,0x36c,0x36c,0x363,0x696,0x696,0x696, -0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,9,0x696, -0x696,0x696,0x696,0x696,0x696,0x696,0x36c,0x36c,0x363,0x363,0x363,0x363,0x363,0x693,0x693,0x693, -0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x360,0x693, -0x693,0x693,0x693,0x693,0x693,0x693,0x363,0x363,0x363,0x363,0x363,0xf6c,0x36f,0x36f,0x372,0x36c, -0x36c,0x36f,0x366,0x9e1,0xb94,0xb91,0x369,0x9e1,0x369,0x9e1,0x369,0x9e1,0x369,0x9e1,0x354,0x351, -0x354,0x351,0x354,0x351,0x354,0x351,0x354,0x351,0x354,0x351,0x354,0x351,0x36f,0x36f,0x366,0x360, -0xb43,0xb40,0xb8e,0xc90,0xc8d,0xc93,0xc90,0xc8d,0xd83,0xd86,0xd86,0xd86,0x9f0,0x6a2,0x37e,0x381, -0x37e,0x37e,0x37e,0x381,0x37e,0x37e,0x37e,0x37e,0x381,0x9f0,0x381,0x37e,0x69f,0x69f,0x69f,0x69f, -0x69f,0x69f,0x69f,0x69f,0x69f,0x6a2,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f, -0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x699,0x699,0x699,0x699, -0x699,0x699,0x699,0x699,0x699,0x69c,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699, -0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x9ea,0x69c,0x378,0x37b,0x378,0x378,0x378,0x37b, -0x378,0x378,0x378,0x378,0x37b,0x9ea,0x37b,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378, -0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x381,0x37b, -0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x375,0x939,0x93c,0x91e,0x91e,0x1116, -0x9e4,0x9e4,0xb9a,0xb97,0x9ed,0x9e7,0x9ed,0x9e7,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378, +0x68d,0x68d,0x92d,0x68d,0x68d,0x930,0xb07,0xb07,0xb07,0xb07,0xb07,0xb07,0xb07,0xb07,0xb07,0xc3f, +0xd4a,0xd4a,0xd4a,0xd4a,0xd4a,0xd4a,0xd4a,0xd4a,0xe85,0xe85,0xe85,0xe85,0xe88,0xd4d,0xd4d,0xd4d, +0x690,0x690,0xb0a,0xc84,0xc84,0xc84,0xc84,0xc84,0xc84,0xc84,0xc84,0xc84,0xc84,0xc84,0xc84,0xc84, +0xf6f,0xf6c,0xf6f,0xf6c,0x34e,0x357,0xf6f,0xf6c,9,9,0x35d,0xec7,0xec7,0xec7,0x345,0x14b8, +9,9,9,9,0x35a,0x348,0x36c,0x34b,0x36c,0x36c,0x36c,9,0x36c,9,0x36c,0x36c, +0x363,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x696, +0x696,0x696,9,0x696,0x696,0x696,0x696,0x696,0x696,0x696,0x36c,0x36c,0x363,0x363,0x363,0x363, +0x363,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x693, +0x693,0x693,0x360,0x693,0x693,0x693,0x693,0x693,0x693,0x693,0x363,0x363,0x363,0x363,0x363,0xf6f, +0x36f,0x36f,0x372,0x36c,0x36c,0x36f,0x366,0x9e1,0xb97,0xb94,0x369,0x9e1,0x369,0x9e1,0x369,0x9e1, +0x369,0x9e1,0x354,0x351,0x354,0x351,0x354,0x351,0x354,0x351,0x354,0x351,0x354,0x351,0x354,0x351, +0x36f,0x36f,0x366,0x360,0xb46,0xb43,0xb91,0xc93,0xc90,0xc96,0xc93,0xc90,0xd86,0xd89,0xd89,0xd89, +0x9f0,0x6a2,0x37e,0x381,0x37e,0x37e,0x37e,0x381,0x37e,0x37e,0x37e,0x37e,0x381,0x9f0,0x381,0x37e, +0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x6a2,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f, +0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f,0x69f, +0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x69c,0x699,0x699,0x699,0x699,0x699,0x699, +0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x699,0x9ea,0x69c,0x378,0x37b, +0x378,0x378,0x378,0x37b,0x378,0x378,0x378,0x378,0x37b,0x9ea,0x37b,0x378,0x37e,0x378,0x37e,0x378, 0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378, +0x37e,0x378,0x381,0x37b,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x375,0x939, +0x93c,0x91e,0x91e,0x111c,0x9e4,0x9e4,0xb9d,0xb9a,0x9ed,0x9e7,0x9ed,0x9e7,0x37e,0x378,0x37e,0x378, 0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378, -0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x381,0x37b,0x37e,0x378,0xb9a,0xb97,0x37e, -0x378,0xb9a,0xb97,0x37e,0x378,0xb9a,0xb97,0xec7,0x381,0x37b,0x381,0x37b,0x37e,0x378,0x381,0x37b, -0x37e,0x378,0x381,0x37b,0x381,0x37b,0x381,0x37b,0x37e,0x378,0x381,0x37b,0x381,0x37b,0x381,0x37b, -0x37e,0x378,0x381,0x37b,0x9f0,0x9ea,0x381,0x37b,0x381,0x37b,0x381,0x37b,0x381,0x37b,0xd8c,0xd89, -0x381,0x37b,0xeca,0xec7,0xeca,0xec7,0xeca,0xec7,0xc00,0xbfd,0xc00,0xbfd,0xc00,0xbfd,0xc00,0xbfd, -0xc00,0xbfd,0xc00,0xbfd,0xc00,0xbfd,0xc00,0xbfd,0xef7,0xef4,0xef7,0xef4,0xfe7,0xfe4,0xfe7,0xfe4, -0xfe7,0xfe4,0xfe7,0xfe4,0xfe7,0xfe4,0xfe7,0xfe4,0xfe7,0xfe4,0xfe7,0xfe4,0x114f,0x114c,0x1329,0x1326, -0x14e5,0x14e2,0x14e5,0x14e2,0x14e5,0x14e2,0x14e5,0x14e2,0xc,0x393,0x393,0x393,0x393,0x393,0x393,0x393, +0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378, +0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x378,0x37e,0x381,0x37b,0x37e, +0x378,0xb9d,0xb9a,0x37e,0x378,0xb9d,0xb9a,0x37e,0x378,0xb9d,0xb9a,0xeca,0x381,0x37b,0x381,0x37b, +0x37e,0x378,0x381,0x37b,0x37e,0x378,0x381,0x37b,0x381,0x37b,0x381,0x37b,0x37e,0x378,0x381,0x37b, +0x381,0x37b,0x381,0x37b,0x37e,0x378,0x381,0x37b,0x9f0,0x9ea,0x381,0x37b,0x381,0x37b,0x381,0x37b, +0x381,0x37b,0xd8f,0xd8c,0x381,0x37b,0xecd,0xeca,0xecd,0xeca,0xecd,0xeca,0xc03,0xc00,0xc03,0xc00, +0xc03,0xc00,0xc03,0xc00,0xc03,0xc00,0xc03,0xc00,0xc03,0xc00,0xc03,0xc00,0xefa,0xef7,0xefa,0xef7, +0xfea,0xfe7,0xfea,0xfe7,0xfea,0xfe7,0xfea,0xfe7,0xfea,0xfe7,0xfea,0xfe7,0xfea,0xfe7,0xfea,0xfe7, +0x1155,0x1152,0x132f,0x132c,0x14ee,0x14eb,0x14ee,0x14eb,0x14ee,0x14eb,0x14ee,0x14eb,0xc,0x393,0x393,0x393, 0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393,0x393, -0x393,0x393,0x393,0xc,0xc,0x396,0x384,0x384,0x384,0x38a,0x384,0x387,0x18ea,0x38d,0x38d,0x38d, +0x393,0x393,0x393,0x393,0x393,0x393,0x393,0xc,0xc,0x396,0x384,0x384,0x384,0x38a,0x384,0x387, +0x18f9,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d, 0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d, -0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x38d,0x390, -0x18ea,0x399,0x9f3,0xc,0xc,0x14b2,0x14b2,0x13ce,0xf,0x960,0x960,0x960,0x960,0x960,0x960,0x960, -0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0xd8f,0x960,0x960,0x960,0x960,0x960, -0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x39c,0x39c,0x39c,0x39c,0x39c,0x39c,0x39c,0x39c, -0x39c,0x39c,0xecd,0x39c,0x39c,0x39c,0x3a8,0x39c,0x39f,0x39c,0x39c,0x3ab,0x963,0xd92,0xd95,0xd92, -0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae, +0x38d,0x38d,0x38d,0x390,0x18f9,0x399,0x9f3,0xc,0xc,0x14bb,0x14bb,0x13d7,0xf,0x960,0x960,0x960, +0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0xd92,0x960, +0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x960,0x39c,0x39c,0x39c,0x39c, +0x39c,0x39c,0x39c,0x39c,0x39c,0x39c,0xed0,0x39c,0x39c,0x39c,0x3a8,0x39c,0x39f,0x39c,0x39c,0x3ab, +0x963,0xd95,0xd98,0xd95,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0x3ae,0x3ae,0x3ae,0x3ae, 0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae, -0x3ae,0x3ae,0x3ae,0xf,0xf,0xf,0xf,0x18ed,0x3ae,0x3ae,0x3ae,0x3a5,0x3a2,0xf,0xf,0xf, -0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xca8,0xca8,0xca8,0xca8,0x13d1,0x14b5,0xf75,0xf75, -0xf75,0xf72,0xf72,0xd9b,0x8a6,0xca2,0xc9f,0xc9f,0xc96,0xc96,0xc96,0xc96,0xc96,0xc96,0xf6f,0xf6f, -0xf6f,0xf6f,0xf6f,0x8a3,0x14ac,0x1afd,0xd9e,0x8a9,0x12f0,0x3c9,0x3cc,0x3cc,0x3cc,0x3cc,0x3cc,0x3c9, +0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0x3ae,0xf,0xf,0xf,0xf,0x18fc,0x3ae,0x3ae,0x3ae,0x3a5, +0x3a2,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xf,0xcab,0xcab,0xcab,0xcab, +0x13da,0x14be,0xf78,0xf78,0xf78,0xf75,0xf75,0xd9e,0x8a6,0xca5,0xca2,0xca2,0xc99,0xc99,0xc99,0xc99, +0xc99,0xc99,0xf72,0xf72,0xf72,0xf72,0xf72,0x8a3,0x14b5,0x1b0f,0xda1,0x8a9,0x12f6,0x3c9,0x3cc,0x3cc, +0x3cc,0x3cc,0x3cc,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, +0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0xf7b,0xf7b,0xf7b,0xf7b,0xf7b,0x8ac,0x3c9,0x3c9,0x3c9, +0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x924,0x924,0x924,0x924,0x924,0x924,0x924,0x924,0xb3d, +0xb3d,0xb3d,0xc99,0xc9f,0xc9c,0xd9b,0xd9b,0xd9b,0xd9b,0xd9b,0xd9b,0x12f3,0x93f,0x93f,0x93f,0x93f, +0x93f,0x93f,0x93f,0x93f,0x93f,0x93f,0x3c3,0x3c0,0x3bd,0x3ba,0xba0,0xba0,0x921,0x3c9,0x3c9,0x3d5, +0x3c9,0x3cf,0x3cf,0x3cf,0x3cf,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, 0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0xf78,0xf78,0xf78,0xf78,0xf78,0x8ac,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0x924,0x924,0x924,0x924,0x924,0x924,0x924,0x924,0xb3a,0xb3a,0xb3a,0xc96,0xc9c, -0xc99,0xd98,0xd98,0xd98,0xd98,0xd98,0xd98,0x12ed,0x93f,0x93f,0x93f,0x93f,0x93f,0x93f,0x93f,0x93f, -0x93f,0x93f,0x3c3,0x3c0,0x3bd,0x3ba,0xb9d,0xb9d,0x921,0x3c9,0x3c9,0x3d5,0x3c9,0x3cf,0x3cf,0x3cf, -0x3cf,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, 0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, 0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x9f9,0x9f9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0x9f9,0x3cc,0x3c9,0x3cc,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, -0x3c9,0x3c9,0x3c9,0x9f9,0x3c9,0x3c9,0x3c9,0x3cc,0x942,0x3c9,0x3b4,0x3b4,0x3b4,0x3b4,0x3b4,0x3b4, -0x3b4,0x3b1,0x3ba,0x3b7,0x3b7,0x3b4,0x3b4,0x3b4,0x3b4,0x3d2,0x3d2,0x3b4,0x3b4,0x3ba,0x3b7,0x3b7, -0x3b7,0x3b4,0xca5,0xca5,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x9f9,0x9f9, -0x9f9,0x9f6,0x9f6,0xca5,0xa0e,0xa0e,0xa0e,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa08,0xa05, -0xa08,0xa05,0x12,0xa11,0xa0b,0x9fc,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b, +0x9f9,0x9f9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x9f9,0x3cc,0x3c9,0x3cc,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9, +0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x3c9,0x9f9,0x3c9,0x3c9,0x3c9,0x3cc,0x942,0x3c9,0x3b4,0x3b4, +0x3b4,0x3b4,0x3b4,0x3b4,0x3b4,0x3b1,0x3ba,0x3b7,0x3b7,0x3b4,0x3b4,0x3b4,0x3b4,0x3d2,0x3d2,0x3b4, +0x3b4,0x3ba,0x3b7,0x3b7,0x3b7,0x3b4,0xca8,0xca8,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6,0x3c6, +0x3c6,0x3c6,0x9f9,0x9f9,0x9f9,0x9f6,0x9f6,0xca8,0xa0e,0xa0e,0xa0e,0xa08,0xa08,0xa08,0xa08,0xa08, +0xa08,0xa08,0xa08,0xa05,0xa08,0xa05,0x12,0xa11,0xa0b,0x9fc,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b, 0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xa0b, -0xa0b,0xcab,0xcab,0xcab,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02, -0xa02,0xa02,0xa02,0xa02,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x12, -0x12,0xcab,0xcab,0xcab,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb, -0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb, -0xdfb,0xdfb,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9, -0xff9,0xff9,0xff9,0xff9,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17, +0xa0b,0xa0b,0xa0b,0xa0b,0xa0b,0xcae,0xcae,0xcae,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02, +0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0xa02,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff,0x9ff, +0x9ff,0x9ff,0x9ff,0x12,0x12,0xcae,0xcae,0xcae,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe, +0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe, +0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xdfe,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc, +0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17, 0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17, -0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14, -0xa14,0xa14,0xa14,0xa14,0xa14,0xba0,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15, -0x15,0x15,0x15,0x15,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf0f,0xf12,0xf12, -0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12, -0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf06, -0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf06,0xf15,0xf15,0xf09,0xf09,0xf0c,0xf1b,0xf18,0x102, -0x102,0x1911,0x1914,0x1914,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xb13,0xb13,0xb16,0xb16,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13, -0x6f,0x6f,0x6f,0x6f,0x1e0,0x1e0,0x1e0,0x1e0,0x1e0,0x1e0,0x1e0,0x1617,0x1617,0x1617,0x1617,0x1617, -0x1617,0x1617,0x1617,0x1617,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1650,0x1650,0x1650, -0x1650,0x1650,0x1650,0x1650,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x16b,0x16b,0x16b, -0x16b,0x16b,0x16b,0x16b,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1bdb,0x1bd8,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2, -0x1c2,0x1c2,0x1c2,0x1c2,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1a7,0x1a7, -0x1a7,0x1a7,0x1a7,0x1a7,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x201,0x201,0x201,0x201,0x201, -0x201,0x201,0x201,0x201,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x249,0x249, -0x249,0x249,0x249,0x249,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x195f,0x195f,0x195f,0x195f,0x195f,0x195f,0x195f,0x195f,0x195f,0x195f,0x24f,0x24f, -0x24f,0x24f,0x24f,0x24f,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1ac1,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b, -0x28b,0x28b,0x28b,0x28b,0x1752,0x1752,0x1752,0x1752,0x207,0x207,0x207,0x207,0x207,0x207,0x207,0x207, -0x207,0x207,0x207,0x207,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c, -0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e, -0x163e,0x163e,0x163e,0x163e,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x2a0,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3,0x1bc3, -0x2a0,0x1bc3,0x1bc3,0x2a0,0x16b6,0x16b6,0x16b6,0x16b6,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef, -0x1ef,0x1ef,0x1ef,0x1ef,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5, -0x2b5,0x2b5,0x2b5,0x2b5,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0xdf2,0xdf2,0xdef,0xdef,0xdef,0xdf2,0xd5,0xd5,0xd5,0xd5,0xd5,0xd5, -0xd5,0xd5,0xd5,0xd5,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x213,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a, -0x176a,0x176a,0x176a,0x176a,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb, -0x2bb,0x2bb,0x2bb,0x1bf6,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x1a13,0x270,0x270, -0x270,0x270,0x1a16,0x1a10,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93, -0x1b93,0x1b93,0x1b93,0x1b93,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26, -0x1c26,0x1c26,0x1c26,0x1c26,0,0,0,0,0,0,0,0,0,0,0,0, -0,0,0,0,0x255,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974, -0x1974,0x1974,0x1974,0x1974,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273, -0x273,0x273,0x273,0x273,0,0,0,0,0,0,0,0,0,0,0,0, +0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa17,0xa14,0xa14, +0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xa14,0xba3,0x15,0x15,0x15,0x15,0x15,0x15, +0x15,0x15,0x15,0x15,0x15,0x15,0x15,0x15,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12,0xf12, +0xf12,0xf12,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15, +0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15,0xf15, +0xf15,0xf15,0xf15,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf09,0xf18,0xf18,0xf0c,0xf0c, +0xf0f,0xf1e,0xf1b,0xff,0xff,0x1920,0x1923,0x1923,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xb16,0xb16,0xb19,0xb19,0xb16,0xb16,0xb16,0xb16, +0xb16,0xb16,0xb16,0xb16,0x1c53,0x1c53,0x1c50,0x1c50,0x1dd,0x1dd,0x1dd,0x1dd,0x1dd,0x1dd,0x1dd,0x1626, +0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9, +0x1e9,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0x165f,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248, +0x1248,0x168,0x168,0x168,0x168,0x168,0x168,0x168,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1bed,0x1bea,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf, +0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491, +0x1491,0x1491,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1fe, +0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246, +0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e, +0x196e,0x196e,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1ad3,0x288,0x288,0x288,0x288,0x288,0x288,0x288, +0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x1761,0x1761,0x1761,0x1761,0x204,0x204,0x204,0x204, +0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e, +0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d, +0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1bd5,0x1bd5,0x1bd5,0x1bd5,0x29d,0x1bd5,0x1bd5,0x1bd5, +0x1bd5,0x1bd5,0x1bd5,0x1bd5,0x29d,0x1bd5,0x1bd5,0x29d,0x16c5,0x16c5,0x16c5,0x16c5,0x1ec,0x1ec,0x1ec,0x1ec, +0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x2b2,0x2b2,0x2b2,0x2b2, +0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0xdf5,0xdf5,0xdf2,0xdf2,0xdf2,0xdf5,0xd2,0xd2, +0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x210,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779, +0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8, +0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x1c08,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25,0x1a25, +0x1a25,0x1a25,0x26d,0x26d,0x26d,0x26d,0x1a28,0x1a22,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5, +0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38, +0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0,0,0,0,0,0,0,0, +0,0,0,0,0,0,0,0,0x252,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983, +0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270, +0x270,0x270,0x270,0x270,0x270,0x270,0x270,0x270,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,0x95d,0x95d,3,3,3,3,3,3,3,3,3,3,3,3, +0,0,0,0,0,0,0x95d,0x95d,3,3,3,3,3,3,3,3, 3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3, -3,3,3,3,3,3,0x95d,0x95d,6,6,6,6,6,6,6,6, +3,3,3,3,3,3,3,3,3,3,0x95d,0x95d,6,6,6,6, 6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50, -0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,6,6,6,6,6,6,6,6, -6,6,6,6,6,6,6,6,0x14bb,0x3f0,0x3ff,0x3ff,0x18,0x405,0x405,0x405, -0x405,0x405,0x405,0x405,0x405,0x18,0x18,0x405,0x405,0x18,0x18,0x405,0x405,0x405,0x405,0x405, -0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x18,0x405,0x405,0x405,0x405,0x405,0x405, -0x405,0x18,0x405,0x18,0x18,0x18,0x405,0x405,0x405,0x405,0x18,0x18,0x3f3,0xcb1,0x3f0,0x3ff, -0x3ff,0x3f0,0x3f0,0x3f0,0x3f0,0x18,0x18,0x3ff,0x3ff,0x18,0x18,0x402,0x402,0x3f6,0xda4,0x18, -0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3f0,0x18,0x18,0x18,0x18,0x408,0x408,0x18,0x408, -0x405,0x405,0x3f0,0x3f0,0x18,0x18,0x948,0x948,0x948,0x948,0x948,0x948,0x948,0x948,0x948,0x948, -0x405,0x405,0x3fc,0x3fc,0x3f9,0x3f9,0x3f9,0x3f9,0x3f9,0x3fc,0x3f9,0x1125,0x184b,0x1848,0x18f0,0x18, -0x1b,0xcb4,0x40b,0xcb7,0x1b,0x417,0x417,0x417,0x417,0x417,0x417,0x1b,0x1b,0x1b,0x1b,0x417, -0x417,0x1b,0x1b,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417, -0x417,0x1b,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x1b,0x417,0x41a,0x1b,0x417,0x41a,0x1b, -0x417,0x417,0x1b,0x1b,0x40e,0x1b,0x414,0x414,0x414,0x40b,0x40b,0x1b,0x1b,0x1b,0x1b,0x40b, -0x40b,0x1b,0x1b,0x40b,0x40b,0x411,0x1b,0x1b,0x1b,0xf81,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b, -0x1b,0x41a,0x41a,0x41a,0x417,0x1b,0x41a,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x94b,0x94b, -0x94b,0x94b,0x94b,0x94b,0x94b,0x94b,0x94b,0x94b,0x40b,0x40b,0x417,0x417,0x417,0xf81,0x18f3,0x1b, -0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1e,0x41d,0x41d,0x426,0x1e,0x429,0x429,0x429, -0x429,0x429,0x429,0x429,0xcc0,0x429,0x1e,0x429,0x429,0x429,0x1e,0x429,0x429,0x429,0x429,0x429, -0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x1e,0x429,0x429,0x429,0x429,0x429,0x429, -0x429,0x1e,0x429,0x429,0x1e,0x429,0x429,0x429,0x429,0x429,0x1e,0x1e,0x420,0x429,0x426,0x426, -0x426,0x41d,0x41d,0x41d,0x41d,0x41d,0x1e,0x41d,0x41d,0x426,0x1e,0x426,0x426,0x423,0x1e,0x1e, -0x429,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, -0x429,0xcc0,0xcba,0xcba,0x1e,0x1e,0x94e,0x94e,0x94e,0x94e,0x94e,0x94e,0x94e,0x94e,0x94e,0x94e, -0x13d4,0xcbd,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x16cb,0x184e,0x184e,0x184e,0x1851,0x1851,0x1851, -0x21,0x42c,0x43b,0x43b,0x21,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x21,0x21,0x441, -0x441,0x21,0x21,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441, -0x441,0x21,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x21,0x441,0x441,0x21,0xcc3,0x441,0x441, -0x441,0x441,0x21,0x21,0x42f,0x441,0x42c,0x42c,0x43b,0x42c,0x42c,0x42c,0xf84,0x21,0x21,0x43b, -0x43e,0x21,0x21,0x43e,0x43e,0x432,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x1a5b,0x42c,0x42c, -0x21,0x21,0x21,0x21,0x444,0x444,0x21,0x441,0x441,0x441,0xf84,0xf84,0x21,0x21,0x438,0x438, -0x438,0x438,0x438,0x438,0x438,0x438,0x438,0x438,0x435,0xcc3,0x12fc,0x12fc,0x12fc,0x12fc,0x12fc,0x12fc, -0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x24,0x24,0x447,0x453,0x24,0x453,0x453,0x453, -0x453,0x453,0x453,0x24,0x24,0x24,0x453,0x453,0x453,0x24,0x453,0x453,0x456,0x453,0x24,0x24, -0x24,0x453,0x453,0x24,0x453,0x24,0x453,0x453,0x24,0x24,0x24,0x453,0x453,0x24,0x24,0x24, -0x453,0x453,0x453,0x24,0x24,0x24,0x453,0x453,0x453,0x453,0x453,0x453,0x453,0x453,0xda7,0x453, -0x453,0x453,0x24,0x24,0x24,0x24,0x447,0x44d,0x447,0x44d,0x44d,0x24,0x24,0x24,0x44d,0x44d, -0x44d,0x24,0x450,0x450,0x450,0x44a,0x24,0x24,0xf87,0x24,0x24,0x24,0x24,0x24,0x24,0x447, -0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0xebb,0x954,0x954,0x954,0x954,0x954, -0x954,0x954,0x954,0x954,0x951,0x951,0x951,0xd77,0xcc6,0xcc6,0xcc6,0xcc6,0xcc6,0xcc9,0xcc6,0x24, -0x24,0x24,0x24,0x24,0x14be,0x465,0x465,0x465,0x18f6,0x468,0x468,0x468,0x468,0x468,0x468,0x468, -0x468,0x27,0x468,0x468,0x468,0x27,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468, -0x468,0x468,0x468,0x468,0x468,0x27,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468, -0x14c1,0x468,0x468,0x468,0x468,0x468,0x27,0x27,0x1b00,0xf90,0x459,0x459,0x459,0x465,0x465,0x465, -0x465,0x27,0x459,0x459,0x45c,0x27,0x459,0x459,0x459,0x45f,0x27,0x27,0x27,0x27,0x27,0x27, -0x27,0x459,0x459,0x27,0xf90,0xf90,0x16ce,0x27,0x27,0x1b03,0x27,0x27,0x468,0x468,0xf8a,0xf8a, -0x27,0x27,0x462,0x462,0x462,0x462,0x462,0x462,0x462,0x462,0x462,0x462,0x27,0x27,0x27,0x27, -0x27,0x27,0x27,0x19bf,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0xf8d,0x178e,0x14c4,0x471,0x471, -0x18f9,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x2a,0x477,0x477,0x477,0x2a,0x477,0x477, -0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x2a,0x477,0x477, -0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x2a,0x477,0x477,0x477,0x477,0x477,0x2a,0x2a, -0xccc,0xccf,0x471,0x46b,0x474,0x471,0x46b,0x471,0x471,0x2a,0x46b,0x474,0x474,0x2a,0x474,0x474, -0x46b,0x46e,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x46b,0x46b,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x1b06,0x477,0x2a,0x477,0x477,0xed3,0xed3,0x2a,0x2a,0x957,0x957,0x957,0x957,0x957,0x957, -0x957,0x957,0x957,0x957,0x2a,0xed6,0xed6,0x1bc9,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a, -0x2a,0x2a,0x2a,0x2a,0x1854,0x14c7,0x483,0x483,0x1a5e,0x489,0x489,0x489,0x489,0x489,0x489,0x489, -0x489,0x2d,0x489,0x489,0x489,0x2d,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489, -0x489,0x489,0x489,0x489,0x483,0x47a,0x47a,0x47a,0xf93,0x2d,0x483,0x483,0x483,0x2d,0x486,0x486, -0x486,0x47d,0x1302,0x1791,0x2d,0x2d,0x2d,0x2d,0x1794,0x1794,0x1794,0x47a,0x1791,0x1791,0x1791,0x1791, -0x1791,0x1791,0x1791,0x16d1,0x489,0x489,0xf93,0xf93,0x2d,0x2d,0x480,0x480,0x480,0x480,0x480,0x480, -0x480,0x480,0x480,0x480,0xf96,0xf96,0xf96,0xf96,0xf96,0xf96,0x1791,0x1791,0x1791,0xf99,0xf9c,0xf9c, -0xf9c,0xf9c,0xf9c,0xf9c,0x30,0x1a61,0xa23,0xa23,0x30,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29, -0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0x30,0x30,0x30,0xa29,0xa29, -0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29, -0xa29,0xa29,0x30,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0x30,0xa29,0x30,0x30, -0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0x30,0x30,0x30,0xa1d,0x30,0x30,0x30,0x30,0xa1a, -0xa23,0xa23,0xa1a,0xa1a,0xa1a,0x30,0xa1a,0x30,0xa23,0xa23,0xa26,0xa23,0xa26,0xa26,0xa26,0xa1a, -0x30,0x30,0x30,0x30,0x30,0x30,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca,0x14ca, -0x30,0x30,0xa23,0xa23,0xa20,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30, -0x33,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4, +6,6,6,6,6,6,6,6,6,6,6,6,0xd53,0xd53,0xd53,0xd53, +0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,6,6,6,6, +6,6,6,6,6,6,6,6,6,6,6,6,0x14c4,0x3f0,0x3ff,0x3ff, +0x18,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x18,0x18,0x405,0x405,0x18,0x18,0x405, +0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x405,0x18,0x405,0x405, +0x405,0x405,0x405,0x405,0x405,0x18,0x405,0x18,0x18,0x18,0x405,0x405,0x405,0x405,0x18,0x18, +0x3f3,0xcb4,0x3f0,0x3ff,0x3ff,0x3f0,0x3f0,0x3f0,0x3f0,0x18,0x18,0x3ff,0x3ff,0x18,0x18,0x402, +0x402,0x3f6,0xda7,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x3f0,0x18,0x18,0x18,0x18, +0x408,0x408,0x18,0x408,0x405,0x405,0x3f0,0x3f0,0x18,0x18,0x948,0x948,0x948,0x948,0x948,0x948, +0x948,0x948,0x948,0x948,0x405,0x405,0x3fc,0x3fc,0x3f9,0x3f9,0x3f9,0x3f9,0x3f9,0x3fc,0x3f9,0x112b, +0x185a,0x1857,0x18ff,0x18,0x1b,0xcb7,0x40b,0xcba,0x1b,0x417,0x417,0x417,0x417,0x417,0x417,0x1b, +0x1b,0x1b,0x1b,0x417,0x417,0x1b,0x1b,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x417, +0x417,0x417,0x417,0x417,0x417,0x1b,0x417,0x417,0x417,0x417,0x417,0x417,0x417,0x1b,0x417,0x41a, +0x1b,0x417,0x41a,0x1b,0x417,0x417,0x1b,0x1b,0x40e,0x1b,0x414,0x414,0x414,0x40b,0x40b,0x1b, +0x1b,0x1b,0x1b,0x40b,0x40b,0x1b,0x1b,0x40b,0x40b,0x411,0x1b,0x1b,0x1b,0xf84,0x1b,0x1b, +0x1b,0x1b,0x1b,0x1b,0x1b,0x41a,0x41a,0x41a,0x417,0x1b,0x41a,0x1b,0x1b,0x1b,0x1b,0x1b, +0x1b,0x1b,0x94b,0x94b,0x94b,0x94b,0x94b,0x94b,0x94b,0x94b,0x94b,0x94b,0x40b,0x40b,0x417,0x417, +0x417,0xf84,0x1902,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1b,0x1e,0x41d,0x41d,0x426, +0x1e,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0xcc3,0x429,0x1e,0x429,0x429,0x429,0x1e,0x429, +0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x429,0x1e,0x429,0x429, +0x429,0x429,0x429,0x429,0x429,0x1e,0x429,0x429,0x1e,0x429,0x429,0x429,0x429,0x429,0x1e,0x1e, +0x420,0x429,0x426,0x426,0x426,0x41d,0x41d,0x41d,0x41d,0x41d,0x1e,0x41d,0x41d,0x426,0x1e,0x426, +0x426,0x423,0x1e,0x1e,0x429,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e, +0x1e,0x1e,0x1e,0x1e,0x429,0xcc3,0xcbd,0xcbd,0x1e,0x1e,0x94e,0x94e,0x94e,0x94e,0x94e,0x94e, +0x94e,0x94e,0x94e,0x94e,0x13dd,0xcc0,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x16da,0x185d,0x185d, +0x185d,0x1860,0x1860,0x1860,0x21,0x42c,0x43b,0x43b,0x21,0x441,0x441,0x441,0x441,0x441,0x441,0x441, +0x441,0x21,0x21,0x441,0x441,0x21,0x21,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x441, +0x441,0x441,0x441,0x441,0x441,0x21,0x441,0x441,0x441,0x441,0x441,0x441,0x441,0x21,0x441,0x441, +0x21,0xcc6,0x441,0x441,0x441,0x441,0x21,0x21,0x42f,0x441,0x42c,0x42c,0x43b,0x42c,0x42c,0x42c, +0xf87,0x21,0x21,0x43b,0x43e,0x21,0x21,0x43e,0x43e,0x432,0x21,0x21,0x21,0x21,0x21,0x21, +0x21,0x1a6d,0x42c,0x42c,0x21,0x21,0x21,0x21,0x444,0x444,0x21,0x441,0x441,0x441,0xf87,0xf87, +0x21,0x21,0x438,0x438,0x438,0x438,0x438,0x438,0x438,0x438,0x438,0x438,0x435,0xcc6,0x1302,0x1302, +0x1302,0x1302,0x1302,0x1302,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x21,0x24,0x24,0x447,0x453, +0x24,0x453,0x453,0x453,0x453,0x453,0x453,0x24,0x24,0x24,0x453,0x453,0x453,0x24,0x453,0x453, +0x456,0x453,0x24,0x24,0x24,0x453,0x453,0x24,0x453,0x24,0x453,0x453,0x24,0x24,0x24,0x453, +0x453,0x24,0x24,0x24,0x453,0x453,0x453,0x24,0x24,0x24,0x453,0x453,0x453,0x453,0x453,0x453, +0x453,0x453,0xdaa,0x453,0x453,0x453,0x24,0x24,0x24,0x24,0x447,0x44d,0x447,0x44d,0x44d,0x24, +0x24,0x24,0x44d,0x44d,0x44d,0x24,0x450,0x450,0x450,0x44a,0x24,0x24,0xf8a,0x24,0x24,0x24, +0x24,0x24,0x24,0x447,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24,0xebe,0x954, +0x954,0x954,0x954,0x954,0x954,0x954,0x954,0x954,0x951,0x951,0x951,0xd7a,0xcc9,0xcc9,0xcc9,0xcc9, +0xcc9,0xccc,0xcc9,0x24,0x24,0x24,0x24,0x24,0x14c7,0x465,0x465,0x465,0x1905,0x468,0x468,0x468, +0x468,0x468,0x468,0x468,0x468,0x27,0x468,0x468,0x468,0x27,0x468,0x468,0x468,0x468,0x468,0x468, +0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x468,0x27,0x468,0x468,0x468,0x468,0x468,0x468, +0x468,0x468,0x468,0x468,0x14ca,0x468,0x468,0x468,0x468,0x468,0x27,0x27,0x1b12,0xf93,0x459,0x459, +0x459,0x465,0x465,0x465,0x465,0x27,0x459,0x459,0x45c,0x27,0x459,0x459,0x459,0x45f,0x27,0x27, +0x27,0x27,0x27,0x27,0x27,0x459,0x459,0x27,0xf93,0xf93,0x16dd,0x27,0x27,0x1b15,0x27,0x27, +0x468,0x468,0xf8d,0xf8d,0x27,0x27,0x462,0x462,0x462,0x462,0x462,0x462,0x462,0x462,0x462,0x462, +0x27,0x27,0x27,0x27,0x27,0x27,0x27,0x19d1,0xf90,0xf90,0xf90,0xf90,0xf90,0xf90,0xf90,0xf90, +0x179d,0x14cd,0x471,0x471,0x1908,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x2a,0x477,0x477, +0x477,0x2a,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477, +0x477,0x2a,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x477,0x2a,0x477,0x477,0x477, +0x477,0x477,0x2a,0x2a,0xccf,0xcd2,0x471,0x46b,0x474,0x471,0x46b,0x471,0x471,0x2a,0x46b,0x474, +0x474,0x2a,0x474,0x474,0x46b,0x46e,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x46b,0x46b,0x2a, +0x2a,0x2a,0x2a,0x2a,0x2a,0x1b18,0x477,0x2a,0x477,0x477,0xed6,0xed6,0x2a,0x2a,0x957,0x957, +0x957,0x957,0x957,0x957,0x957,0x957,0x957,0x957,0x2a,0xed9,0xed9,0x1bdb,0x2a,0x2a,0x2a,0x2a, +0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x2a,0x1863,0x14d0,0x483,0x483,0x1a70,0x489,0x489,0x489, +0x489,0x489,0x489,0x489,0x489,0x2d,0x489,0x489,0x489,0x2d,0x489,0x489,0x489,0x489,0x489,0x489, +0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x483,0x47a,0x47a,0x47a,0xf96,0x2d,0x483,0x483, +0x483,0x2d,0x486,0x486,0x486,0x47d,0x1308,0x17a0,0x2d,0x2d,0x2d,0x2d,0x17a3,0x17a3,0x17a3,0x47a, +0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x17a0,0x16e0,0x489,0x489,0xf96,0xf96,0x2d,0x2d,0x480,0x480, +0x480,0x480,0x480,0x480,0x480,0x480,0x480,0x480,0xf99,0xf99,0xf99,0xf99,0xf99,0xf99,0x17a0,0x17a0, +0x17a0,0xf9c,0xf9f,0xf9f,0xf9f,0xf9f,0xf9f,0xf9f,0x30,0x1a73,0xa23,0xa23,0x30,0xa29,0xa29,0xa29, +0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0x30, +0x30,0x30,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29, +0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0x30,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29, +0x30,0xa29,0x30,0x30,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0xa29,0x30,0x30,0x30,0xa1d,0x30, +0x30,0x30,0x30,0xa1a,0xa23,0xa23,0xa1a,0xa1a,0xa1a,0x30,0xa1a,0x30,0xa23,0xa23,0xa26,0xa23, +0xa26,0xa26,0xa26,0xa1a,0x30,0x30,0x30,0x30,0x30,0x30,0x14d3,0x14d3,0x14d3,0x14d3,0x14d3,0x14d3, +0x14d3,0x14d3,0x14d3,0x14d3,0x30,0x30,0xa23,0xa23,0xa20,0x30,0x30,0x30,0x30,0x30,0x30,0x30, +0x30,0x30,0x30,0x30,0x33,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4, 0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x4a4, -0x4a4,0x48f,0x4a4,0x4a1,0x48f,0x48f,0x48f,0x48f,0x48f,0x48f,0x495,0x33,0x33,0x33,0x33,0x48c, -0x4aa,0x4aa,0x4aa,0x4aa,0x4aa,0x4a4,0x4a7,0x492,0x492,0x492,0x492,0x492,0x492,0x48f,0x492,0x498, -0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49b,0x49b,0x33,0x33,0x33,0x33, +0x4a4,0x4a4,0x4a4,0x4a4,0x4a4,0x48f,0x4a4,0x4a1,0x48f,0x48f,0x48f,0x48f,0x48f,0x48f,0x495,0x33, +0x33,0x33,0x33,0x48c,0x4aa,0x4aa,0x4aa,0x4aa,0x4aa,0x4a4,0x4a7,0x492,0x492,0x492,0x492,0x492, +0x492,0x48f,0x492,0x498,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49e,0x49b,0x49b, 0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, -0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x36,0x4b9,0x4b9,0x36, -0x4b9,0x36,0x19c5,0x4b9,0x4b9,0x19c5,0x4b9,0x36,0x19c5,0x4b9,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5, -0x4b9,0x4b9,0x4b9,0x4b9,0x19c5,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x19c5,0x4b9,0x4b9,0x4b9, -0x36,0x4b9,0x36,0x4b9,0x19c5,0x19c5,0x4b9,0x4b9,0x19c5,0x4b9,0x4b9,0x4b9,0x4b9,0x4ad,0x4b9,0x4b6, -0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x19c2,0x4ad,0x4ad,0x4b9,0x36,0x36,0x4c2,0x4c2,0x4c2,0x4c2, -0x4c2,0x36,0x4bf,0x36,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4ad,0x1bcc,0x36,0x4b3,0x4b3,0x4b3,0x4b3, -0x4b3,0x4b3,0x4b3,0x4b3,0x4b3,0x4b3,0x36,0x36,0x4bc,0x4bc,0x13d7,0x13d7,0x36,0x36,0x36,0x36, +0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33,0x33, +0x36,0x4b9,0x4b9,0x36,0x4b9,0x36,0x19d7,0x4b9,0x4b9,0x19d7,0x4b9,0x36,0x19d7,0x4b9,0x19d7,0x19d7, +0x19d7,0x19d7,0x19d7,0x19d7,0x4b9,0x4b9,0x4b9,0x4b9,0x19d7,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9,0x4b9, +0x19d7,0x4b9,0x4b9,0x4b9,0x36,0x4b9,0x36,0x4b9,0x19d7,0x19d7,0x4b9,0x4b9,0x19d7,0x4b9,0x4b9,0x4b9, +0x4b9,0x4ad,0x4b9,0x4b6,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x4ad,0x19d4,0x4ad,0x4ad,0x4b9,0x36,0x36, +0x4c2,0x4c2,0x4c2,0x4c2,0x4c2,0x36,0x4bf,0x36,0x4b0,0x4b0,0x4b0,0x4b0,0x4b0,0x4ad,0x1bde,0x36, +0x4b3,0x4b3,0x4b3,0x4b3,0x4b3,0x4b3,0x4b3,0x4b3,0x4b3,0x4b3,0x36,0x36,0x4bc,0x4bc,0x13e0,0x13e0, +0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, 0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36, -0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x36,0x99c,0x99c,0x99c,0x99f, -0x99c,0x99c,0x99c,0x99c,0x39,0x99c,0x99c,0x99c,0x99c,0x99f,0x99c,0x99c,0x99c,0x99c,0x99f,0x99c, -0x99c,0x99c,0x99c,0x99f,0x99c,0x99c,0x99c,0x99c,0x99f,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c, -0x99c,0x99c,0x99c,0x99c,0x99c,0x99f,0xa38,0xfa8,0xfa8,0x39,0x39,0x39,0x39,0x966,0x966,0x969, -0x966,0x969,0x969,0x975,0x969,0x975,0x966,0x966,0x966,0x966,0x966,0x996,0x966,0x969,0x96f,0x96f, -0x972,0x97b,0x96c,0x96c,0x99c,0x99c,0x99c,0x99c,0x130b,0x1305,0x1305,0x1305,0x966,0x966,0x966,0x969, -0x966,0x966,0xa2c,0x966,0x39,0x966,0x966,0x966,0x966,0x969,0x966,0x966,0x966,0x966,0x969,0x966, -0x966,0x966,0x966,0x969,0x966,0x966,0x966,0x966,0x969,0x966,0xa2c,0xa2c,0xa2c,0x966,0x966,0x966, -0x966,0x966,0x966,0x966,0xa2c,0x969,0xa2c,0xa2c,0xa2c,0x39,0xa35,0xa35,0xa32,0xa32,0xa32,0xa32, -0xa32,0xa32,0xa2f,0xa32,0xa32,0xa32,0xa32,0xa32,0xa32,0x39,0xf9f,0xa32,0xdaa,0xdaa,0xfa2,0xfa5, -0xf9f,0x1128,0x1128,0x1128,0x1128,0x1308,0x1308,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39, +0x99c,0x99c,0x99c,0x99f,0x99c,0x99c,0x99c,0x99c,0x39,0x99c,0x99c,0x99c,0x99c,0x99f,0x99c,0x99c, +0x99c,0x99c,0x99f,0x99c,0x99c,0x99c,0x99c,0x99f,0x99c,0x99c,0x99c,0x99c,0x99f,0x99c,0x99c,0x99c, +0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99c,0x99f,0xa38,0xfab,0xfab,0x39,0x39,0x39, +0x39,0x966,0x966,0x969,0x966,0x969,0x969,0x975,0x969,0x975,0x966,0x966,0x966,0x966,0x966,0x996, +0x966,0x969,0x96f,0x96f,0x972,0x97b,0x96c,0x96c,0x99c,0x99c,0x99c,0x99c,0x1311,0x130b,0x130b,0x130b, +0x966,0x966,0x966,0x969,0x966,0x966,0xa2c,0x966,0x39,0x966,0x966,0x966,0x966,0x969,0x966,0x966, +0x966,0x966,0x969,0x966,0x966,0x966,0x966,0x969,0x966,0x966,0x966,0x966,0x969,0x966,0xa2c,0xa2c, +0xa2c,0x966,0x966,0x966,0x966,0x966,0x966,0x966,0xa2c,0x969,0xa2c,0xa2c,0xa2c,0x39,0xa35,0xa35, +0xa32,0xa32,0xa32,0xa32,0xa32,0xa32,0xa2f,0xa32,0xa32,0xa32,0xa32,0xa32,0xa32,0x39,0xfa2,0xa32, +0xdad,0xdad,0xfa5,0xfa8,0xfa2,0x112e,0x112e,0x112e,0x112e,0x130e,0x130e,0x39,0x39,0x39,0x39,0x39, 0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39, -0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x3c,0x13dd, -0x3c,0x3c,0x3c,0x3c,0x3c,0x13dd,0x3c,0x3c,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5, -0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdb9, +0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x39,0x4c8,0x4c8,0x4c8,0x4c8, +0x4c8,0x4c8,0x3c,0x13e6,0x3c,0x3c,0x3c,0x3c,0x3c,0x13e6,0x3c,0x3c,0x4c5,0x4c5,0x4c5,0x4c5, +0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0xa62,0xa62,0xa62,0xa62, +0xa62,0xa62,0xa62,0xdbc,0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62, +0xa62,0xa62,0xa62,0x3f,0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62, +0xa62,0xa62,0xa62,0xdbc,0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62, +0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdbc, 0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0x3f, -0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdb9, -0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdb9,0xa62,0x3f,0xa62,0xa62, -0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0x3f,0xa62,0x3f,0xa62,0xa62, -0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdb9,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xdb9,0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xdb9,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0x130e,0x130e,0xdb3,0xdb6,0xa5c,0xa65,0xa59, -0xa59,0xa59,0xa59,0xa65,0xa65,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa56,0xa56, -0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0x3f,0x3f,0x3f,0xa68,0xa68,0xa68,0xa68, +0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdbc, +0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, +0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdbc,0xa62,0x3f,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f, +0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdbc,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, +0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0x3f,0x3f,0x1314,0x1314,0xdb6, +0xdb9,0xa5c,0xa65,0xa59,0xa59,0xa59,0xa59,0xa65,0xa65,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f,0xa5f, +0xa5f,0xa5f,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0xa56,0x3f,0x3f,0x3f, 0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68, -0xa68,0x16d7,0x42,0x42,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x16d4,0x42,0x42,0xa7a,0xa7d,0xa7d,0xa7d, -0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d, -0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa77,0xa74,0x45,0x45,0x45,0xa83,0xa83,0xa83,0xa83, -0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa80,0xa80,0xa80,0xa83,0xa83,0xa83,0x14cd,0x14cd,0x14cd, -0x14cd,0x14cd,0x14cd,0x14cd,0x14cd,0x48,0x48,0x48,0x48,0x48,0x48,0x48,0xaa4,0xaa4,0xaa4,0xaa4, -0xaa4,0xaa4,0xa86,0xaa4,0xaa4,0xa89,0xa89,0xa89,0xa89,0xa89,0xa89,0xa89,0xa89,0xa89,0xa8c,0xa89, -0xa9b,0xa9b,0xa9e,0xaa7,0xa95,0xa92,0xa9b,0xa98,0xaa7,0xcd2,0x4b,0x4b,0xaa1,0xaa1,0xaa1,0xaa1, -0xaa1,0xaa1,0xaa1,0xaa1,0xaa1,0xaa1,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0xcd5,0xcd5,0xcd5,0xcd5, -0xcd5,0xcd5,0xcd5,0xcd5,0xcd5,0xcd5,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b,0xab6,0xab6,0xb2e,0xb31, -0xabc,0xb2b,0xab9,0xab6,0xabf,0xace,0xac2,0xad1,0xad1,0xad1,0xaad,0x1b09,0xac5,0xac5,0xac5,0xac5, -0xac5,0xac5,0xac5,0xac5,0xac5,0xac5,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0x18fc,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xac8,0xab0,0xfc6,0x4e,0x4e,0x4e,0x4e,0x4e,0x117f,0x117f,0x117f,0x117f, -0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x51,0x51,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x51,0x51,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x51,0x4e9,0x51,0x4e9,0x51,0x4e9,0x51,0x4e9,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x51,0x51,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e0,0x4e6,0x4e0,0x4e0,0x4dd,0x4e6,0x4e6, -0x4e6,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4dd,0x4dd,0x4dd,0x4e6,0x4e6,0x4e6,0x4e6, -0x51,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x51,0x4dd,0x4dd,0x4dd,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4dd,0x4dd,0x4dd,0x51,0x51,0x4e6,0x4e6, -0x4e6,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e3,0x4e0,0x51,0xba6,0xba9,0xba9,0xba9, -0xfcf,0x54,0x14a9,0x14a9,0x14a9,0x14a9,0x4f2,0x4f2,0x4f2,0x4f2,0x4f2,0x4f2,0x53d,0xbbb,0x57,0x57, -0x6d8,0x53d,0x53d,0x53d,0x53d,0x53d,0x543,0x555,0x543,0x54f,0x549,0x6db,0x53a,0x6d5,0x6d5,0x6d5, -0x6d5,0x53a,0x53a,0x53a,0x53a,0x53a,0x540,0x552,0x540,0x54c,0x546,0x57,0xdc2,0xdc2,0xdc2,0xdc2, -0xdc2,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x1311,0x57,0x57,0x57,0x1b0c,0x5a,0x5a,0x5a, -0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x564,0x564,0x564,0x564, -0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x561,0x561,0x561,0x561,0x564,0xadd,0xadd, -0xbc1,0xbc7,0xbc7,0xbc4,0xbc4,0xbc4,0xbc4,0xdc8,0xed9,0xed9,0xed9,0xed9,0x1113,0x5d,0x5d,0x5d, -0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x594,0x594,0x594,0xae6, -0xee2,0xfd5,0xfd5,0xfd5,0xfd5,0x126f,0x16dd,0x16dd,0x60,0x60,0x60,0x60,0x702,0x702,0x702,0x702, -0x702,0x702,0x702,0x702,0x702,0x702,0x5a0,0x5a0,0x59d,0x59d,0x59d,0x59d,0x5c1,0x5c1,0x5c1,0x5c1, -0x5c1,0xaef,0xaef,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63, -0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x5c4,0x5c4,0x5c4,0x5c4, -0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66, -0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0xb0a,0xb0a,0xb0a,0xb0a, -0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a, -0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0x69,0xb0a,0xb0a,0xb0a,0xb0a,0xb0d,0xb0a,0xb0a,0xb0a,0xb0a, -0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0d, -0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0xb10,0xb10,0xb10,0xb10, -0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10, -0xb10,0xb10,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x72,0x822,0x81c,0x822, -0x81c,0x822,0x81c,0x822,0x81c,0x822,0x81c,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c, -0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81c,0x81c,0x81c,0x822, -0x81c,0x822,0x81c,0x822,0x81c,0x81c,0x81c,0x81c,0x81c,0x81c,0x822,0x81c,0x81c,0x81c,0x81c,0x81c, -0x81f,0xc60,0xc60,0x72,0x72,0x936,0x936,0x8fd,0x8fd,0x825,0x828,0xc5d,0x75,0x75,0x75,0x75, -0x75,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a, -0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x1101,0x18c3,0x19aa, -0x78,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d, -0x83d,0x83d,0x83d,0x78,0x906,0x906,0x909,0x909,0x909,0x909,0x909,0x909,0x909,0x909,0x909,0x909, -0x909,0x909,0x909,0x909,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846, +0xa68,0xa68,0xa68,0xa68,0xa68,0x16e6,0x42,0x42,0x16e3,0x16e3,0x16e3,0x16e3,0x16e3,0x16e3,0x42,0x42, +0xa7a,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d, +0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa7d,0xa77,0xa74,0x45,0x45,0x45, +0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa80,0xa80,0xa80,0xa83,0xa83, +0xa83,0x14d6,0x14d6,0x14d6,0x14d6,0x14d6,0x14d6,0x14d6,0x14d6,0x48,0x48,0x48,0x48,0x48,0x48,0x48, +0xaa4,0xaa4,0xaa4,0xaa4,0xaa4,0xaa4,0xa86,0xaa4,0xaa4,0xa89,0xa89,0xa89,0xa89,0xa89,0xa89,0xa89, +0xa89,0xa89,0xa8c,0xa89,0xaad,0xaad,0xa9e,0xaa7,0xa95,0xa92,0xa9b,0xa98,0xaa7,0xcd5,0x4b,0x4b, +0xaa1,0xaa1,0xaa1,0xaa1,0xaa1,0xaa1,0xaa1,0xaa1,0xaa1,0xaa1,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b, +0xcd8,0xcd8,0xcd8,0xcd8,0xcd8,0xcd8,0xcd8,0xcd8,0xcd8,0xcd8,0x4b,0x4b,0x4b,0x4b,0x4b,0x4b, +0xab9,0xab9,0xb31,0xb34,0xabf,0xb2e,0xabc,0xab9,0xac2,0xad1,0xac5,0xad4,0xad4,0xad4,0xab0,0x1b1b, +0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e, +0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb, +0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0x190b,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e,0x4e, +0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xab3,0xfc9,0x4e,0x4e,0x4e,0x4e,0x4e, +0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185, +0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9, +0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x51,0x51,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x51,0x51, +0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x51,0x4e9,0x51,0x4e9,0x51,0x4e9,0x51,0x4e9, +0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9, +0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x51,0x51, +0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9, +0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e0,0x4e6,0x4e0, +0x4e0,0x4dd,0x4e6,0x4e6,0x4e6,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4dd,0x4dd,0x4dd, +0x4e6,0x4e6,0x4e6,0x4e6,0x51,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x51,0x4dd,0x4dd,0x4dd, +0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4dd,0x4dd,0x4dd, +0x51,0x51,0x4e6,0x4e6,0x4e6,0x51,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e3,0x4e0,0x51, +0xba9,0xbac,0xbac,0xbac,0xfd2,0x54,0x14b2,0x14b2,0x14b2,0x14b2,0x4f2,0x4f2,0x4f2,0x4f2,0x4f2,0x4f2, +0x53d,0xbbe,0x57,0x57,0x6d8,0x53d,0x53d,0x53d,0x53d,0x53d,0x543,0x555,0x543,0x54f,0x549,0x6db, +0x53a,0x6d5,0x6d5,0x6d5,0x6d5,0x53a,0x53a,0x53a,0x53a,0x53a,0x540,0x552,0x540,0x54c,0x546,0x57, +0xdc5,0xdc5,0xdc5,0xdc5,0xdc5,0x1317,0x1317,0x1317,0x1317,0x1317,0x1317,0x1317,0x1317,0x57,0x57,0x57, +0x1b1e,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a,0x5a, +0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x564,0x561,0x561,0x561, +0x561,0x564,0xae0,0xae0,0xbc4,0xbca,0xbca,0xbc7,0xbc7,0xbc7,0xbc7,0xdcb,0xedc,0xedc,0xedc,0xedc, +0x1119,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d,0x5d, +0x594,0x594,0x594,0xae9,0xee5,0xfd8,0xfd8,0xfd8,0xfd8,0x1275,0x16ec,0x16ec,0x60,0x60,0x60,0x60, +0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x702,0x5a0,0x5a0,0x59d,0x59d,0x59d,0x59d, +0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0xaf2,0xaf2,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63, +0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63,0x63, +0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x5c4,0x66,0x66,0x66,0x66,0x66, +0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66,0x66, +0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d, +0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0x69,0xb0d,0xb0d,0xb0d,0xb0d,0xb10, +0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d, +0xb0d,0xb0d,0xb0d,0xb10,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69,0x69, +0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13, +0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c,0x6c, +0x6f,0x822,0x81c,0x822,0x81c,0x822,0x81c,0x822,0x81c,0x822,0x81c,0x81c,0x81f,0x81c,0x81f,0x81c, +0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c, +0x81c,0x81c,0x81c,0x822,0x81c,0x822,0x81c,0x822,0x81c,0x81c,0x81c,0x81c,0x81c,0x81c,0x822,0x81c, +0x81c,0x81c,0x81c,0x81c,0x81f,0xc63,0xc63,0x6f,0x6f,0x936,0x936,0x8fd,0x8fd,0x825,0x828,0xc60, +0x72,0x72,0x72,0x72,0x72,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a, +0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a,0x83a, +0x83a,0x1107,0x18d2,0x19bc,0x75,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d, +0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x75,0x906,0x906,0x909,0x909,0x909,0x909,0x909,0x909, +0x909,0x909,0x909,0x909,0x909,0x909,0x909,0x909,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846, 0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846,0x846, -0x846,0xd5c,0xd5c,0x7b,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22, -0xb22,0x7e,0x7e,0x7e,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28, -0xb28,0xb28,0xb28,0xb28,0xb28,0xc69,0xb28,0xb28,0xb28,0xc69,0xb28,0x81,0x81,0x81,0x81,0x81, -0x81,0x81,0x81,0x81,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6, -0x11a6,0x11a6,0x11a6,0x11a6,0x9c0,0x9c0,0x9c0,0x9c0,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84, -0x84,0x84,0x84,0x84,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b, -0x121b,0x121b,0x121b,0x121b,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x87,0x87,0x87,0x87,0x87, -0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7,0x87,0x87,0x87,0x87, -0x87,0xafb,0x5fa,0x600,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x5fd,0x600,0x600, -0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x87,0x600,0x600,0x600,0x600, -0x600,0x87,0x600,0x87,0x600,0x600,0x87,0x600,0x600,0x87,0x600,0x600,0x600,0x600,0x600,0x600, -0x600,0x600,0x600,0x603,0x615,0x60f,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f, -0x612,0x618,0x615,0x60f,0x1323,0x1323,0x1b0f,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a, -0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x8a,0x615,0x60f,0x612,0x618,0x615,0x60f,0x615,0x60f,0x615, -0x60f,0x615,0x615,0x60f,0x60f,0x60f,0x60f,0x612,0x60f,0x60f,0x612,0x60f,0x612,0x612,0x612,0x60f, -0x612,0x612,0x612,0x612,0x8a,0x8a,0x612,0x612,0x612,0x612,0x60f,0x60f,0x612,0x60f,0x60f,0x60f, -0x60f,0x612,0x60f,0x60f,0x60f,0x60f,0x60f,0x612,0x612,0x612,0x60f,0x60f,0x8a,0x8a,0x8a,0x8a, -0x8a,0x8a,0x8a,0x1b0f,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46, -0xb46,0xb46,0xb46,0xb46,0x85e,0x870,0x86d,0x870,0x86d,0xc7e,0xc7e,0xd68,0xd65,0x861,0x861,0x861, -0x861,0x873,0x873,0x873,0x88b,0x88e,0x89d,0x8d,0x891,0x894,0x8a0,0x8a0,0x888,0x87f,0x879,0x87f, -0x879,0x87f,0x879,0x87c,0x87c,0x897,0x897,0x89a,0x897,0x897,0x897,0x8d,0x897,0x885,0x882,0x87c, -0x8d,0x8d,0x8d,0x8d,0x621,0x62d,0x621,0xbfa,0x621,0x90,0x621,0x62d,0x621,0x62d,0x621,0x62d, -0x621,0x62d,0x621,0x62d,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627, -0x62d,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a, -0x624,0x90,0x90,0x61e,0x75f,0x762,0x777,0x77a,0x759,0x762,0x762,0x96,0x741,0x744,0x744,0x744, -0x744,0x741,0x741,0x96,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0x93,0xafe,0xafe,0xafe, -0x9c3,0x73b,0x630,0x630,0x96,0x789,0x768,0x759,0x762,0x75f,0x759,0x76b,0x75c,0x756,0x759,0x777, -0x76e,0x765,0x786,0x759,0x783,0x783,0x783,0x783,0x783,0x783,0x783,0x783,0x783,0x783,0x774,0x771, -0x777,0x777,0x777,0x789,0x74a,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747, +0x846,0x846,0x846,0x846,0x846,0xd5f,0xd5f,0x78,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25, +0xb25,0xb25,0xb25,0xb25,0xb25,0x7b,0x7b,0x7b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b, +0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xc6c,0xb2b,0xb2b,0xb2b,0xc6c,0xb2b,0x7e, +0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x7e,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac, +0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x9c0,0x9c0,0x9c0,0x9c0,0x81,0x81,0x81,0x81, +0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x81,0x1221,0x1221,0x1221,0x1221,0x1221,0x1221,0x1221,0x1221, +0x1221,0x1221,0x1221,0x1221,0x1221,0x1221,0x1221,0x1221,0x609,0x609,0x609,0x609,0x609,0x609,0x609,0x84, +0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x84,0x5f7,0x5f7,0x5f7,0x5f7,0x5f7, +0x84,0x84,0x84,0x84,0x84,0xafe,0x5fa,0x600,0x606,0x606,0x606,0x606,0x606,0x606,0x606,0x606, +0x606,0x5fd,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x84, +0x600,0x600,0x600,0x600,0x600,0x84,0x600,0x84,0x600,0x600,0x84,0x600,0x600,0x84,0x600,0x600, +0x600,0x600,0x600,0x600,0x600,0x600,0x600,0x603,0x615,0x60f,0x615,0x60f,0x612,0x618,0x615,0x60f, +0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x1329,0x1329,0x1b21,0x87,0x87,0x87,0x87,0x87, +0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x615,0x60f,0x612,0x618,0x615, +0x60f,0x615,0x60f,0x615,0x60f,0x615,0x615,0x60f,0x60f,0x60f,0x60f,0x612,0x60f,0x60f,0x612,0x60f, +0x612,0x612,0x612,0x60f,0x612,0x612,0x612,0x612,0x87,0x87,0x612,0x612,0x612,0x612,0x60f,0x60f, +0x612,0x60f,0x60f,0x60f,0x60f,0x612,0x60f,0x60f,0x60f,0x60f,0x60f,0x612,0x612,0x612,0x60f,0x60f, +0x87,0x87,0x87,0x87,0x87,0x87,0x87,0x1b21,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49, +0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0x85e,0x870,0x86d,0x870,0x86d,0xc81,0xc81,0xd6b, +0xd68,0x861,0x861,0x861,0x861,0x873,0x873,0x873,0x88b,0x88e,0x89d,0x8a,0x891,0x894,0x8a0,0x8a0, +0x888,0x87f,0x879,0x87f,0x879,0x87f,0x879,0x87c,0x87c,0x897,0x897,0x89a,0x897,0x897,0x897,0x8a, +0x897,0x885,0x882,0x87c,0x8a,0x8a,0x8a,0x8a,0x621,0x62d,0x621,0xbfd,0x621,0x8d,0x621,0x62d, +0x621,0x62d,0x621,0x62d,0x621,0x62d,0x621,0x62d,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627, +0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x62a, +0x624,0x62a,0x624,0x62a,0x624,0x8d,0x8d,0x61e,0x75f,0x762,0x777,0x77a,0x759,0x762,0x762,0x93, +0x741,0x744,0x744,0x744,0x744,0x741,0x741,0x93,0x90,0x90,0x90,0x90,0x90,0x90,0x90,0x90, +0x90,0xb01,0xb01,0xb01,0x9c3,0x73b,0x630,0x630,0x93,0x789,0x768,0x759,0x762,0x75f,0x759,0x76b, +0x75c,0x756,0x759,0x777,0x76e,0x765,0x786,0x759,0x783,0x783,0x783,0x783,0x783,0x783,0x783,0x783, +0x783,0x783,0x774,0x771,0x777,0x777,0x777,0x789,0x74a,0x747,0x747,0x747,0x747,0x747,0x747,0x747, 0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x747, -0x747,0x747,0x747,0x96,0x96,0x96,0x747,0x747,0x747,0x747,0x747,0x747,0x96,0x96,0x747,0x747, -0x747,0x747,0x747,0x747,0x96,0x96,0x747,0x747,0x747,0x747,0x747,0x747,0x96,0x96,0x747,0x747, -0x747,0x96,0x96,0x96,0xb49,0xb49,0xb49,0xb49,0x99,0x99,0x99,0x99,0x99,0x99,0x99,0x99, -0x99,0x1860,0x1860,0x1860,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f, -0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0x9c,0x9c,0x9c,0x9c,0x9c,0x1626,0x1626,0x1626,0x1626, -0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0xb58,0xb58,0xb58,0xb58, -0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58, -0xb58,0xb58,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xa2,0xa2,0xfe1,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0x16e3,0x16e3,0x16e3,0x16e3, -0x16e3,0x16e3,0x16e3,0x16e3,0x16e3,0x1b12,0x1b12,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2, -0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xa2,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xa5,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb7c,0xb7c,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb7c,0xa5,0xb7c,0xb7c,0xa5,0xa5,0xb7c,0xa5, -0xa5,0xb7c,0xb7c,0xa5,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb79,0xa5,0xb79,0xa5,0xb79,0xb79,0xb79,0xb79,0xcf0,0xb79,0xb79, -0xa5,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb79, -0xb7c,0xb7c,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xa5,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xa5,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb7c,0xb7c,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xa5,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xa5,0xb7c,0xa5,0xa5,0xa5,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xa5,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xdda,0xdda,0xa5,0xa5, +0x747,0x747,0x747,0x747,0x747,0x747,0x747,0x93,0x93,0x93,0x747,0x747,0x747,0x747,0x747,0x747, +0x93,0x93,0x747,0x747,0x747,0x747,0x747,0x747,0x93,0x93,0x747,0x747,0x747,0x747,0x747,0x747, +0x93,0x93,0x747,0x747,0x747,0x93,0x93,0x93,0xb4c,0xb4c,0xb4c,0xb4c,0x96,0x96,0x96,0x96, +0x96,0x96,0x96,0x96,0x96,0x186f,0x186f,0x186f,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52, +0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0x99,0x99,0x99,0x99,0x99, +0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, +0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b, +0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c,0x9c, +0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0x9f,0x9f,0xfe4,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67, +0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67, +0x16f2,0x16f2,0x16f2,0x16f2,0x16f2,0x16f2,0x16f2,0x16f2,0x16f2,0x1b24,0x1b24,0x9f,0x9f,0x9f,0x9f,0x9f, +0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f,0x9f, +0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7c,0xb7c, +0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xa2,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, +0xb7f,0xb7f,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, +0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7f,0xa2,0xb7f,0xb7f, +0xa2,0xa2,0xb7f,0xa2,0xa2,0xb7f,0xb7f,0xa2,0xa2,0xb7f,0xb7f,0xb7f,0xb7f,0xa2,0xb7f,0xb7f, +0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7c,0xb7c,0xb7c,0xb7c,0xa2,0xb7c,0xa2,0xb7c,0xb7c,0xb7c, +0xb7c,0xcf3,0xb7c,0xb7c,0xa2,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, +0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f, +0xb7c,0xb7c,0xb7c,0xb7c,0xb7f,0xb7f,0xa2,0xb7f,0xb7f,0xb7f,0xb7f,0xa2,0xa2,0xb7f,0xb7f,0xb7f, +0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xa2,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xa2,0xb7c,0xb7c, 0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb73,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xef1,0xeee,0xa5,0xa5,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76, -0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xa8,0xb82,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8, -0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8, -0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09,0xc09, -0xc09,0xc09,0xc09,0xc09,0xc09,0x1b18,0xc09,0xc09,0xc09,0xc09,0xc03,0xc03,0xc06,0x1b15,0xab,0xab, -0xab,0xab,0xab,0xab,0xab,0xab,0xab,0x1b18,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12, -0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc12,0xc0c,0xc0c,0xc0f,0xc72,0xc72,0xae, -0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18, -0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc18,0xc15,0xc15,0xb1,0xb1,0xb1,0xb1, -0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xc1e, -0xc1e,0xc1e,0xc1e,0xc1e,0xc1e,0xb4,0xc1e,0xc1e,0xc1e,0xb4,0xc1b,0xc1b,0xb4,0xb4,0xb4,0xb4, -0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xb4,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02, -0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02,0xd02, -0xd02,0xd02,0xd02,0xd02,0xd02,0x14e8,0x14e8,0xb7,0xcf3,0xcf3,0xcf3,0xcff,0xcff,0xcff,0xcff,0xcf3, -0xcf3,0xcff,0xcff,0xcff,0xb7,0xb7,0xb7,0xb7,0xcff,0xcff,0xcf3,0xcff,0xcff,0xcff,0xcff,0xcff, -0xcff,0xcf6,0xcf6,0xcf6,0xb7,0xb7,0xb7,0xb7,0xcf9,0xb7,0xb7,0xb7,0xd05,0xd05,0xcfc,0xcfc, -0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xcfc,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08, -0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xd08,0xba,0xba,0xd08,0xd08,0xd08,0xd08, -0xd08,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0xba,0x14eb,0x14eb,0x14eb,0x14eb, -0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb, -0xbd,0xbd,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb, -0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0xbd,0x1a64,0x14eb,0x14eb,0x14eb,0x14eb, -0x14eb,0x14eb,0x14eb,0x14eb,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c, -0xc0,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c, -0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xc0,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c, -0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xc0,0xd2c,0xd2c,0xc0,0xd2c, -0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xc0,0xc0, -0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xc0,0xc0, -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0,0xc0, -0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f, -0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xc3,0xc3,0xc3,0xc3,0xc3, -0xd6e,0xd6e,0xd74,0xc6,0xc6,0xc6,0xc6,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b, -0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b,0xd6b, -0xc6,0xc6,0xc6,0xd71,0xd71,0xd71,0xd71,0xd71,0xd71,0xd71,0xd71,0xd71,0xd35,0xd35,0xd35,0xd35, -0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35, -0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xd35,0xc9,0xd32,0xd3e,0xd3e,0xd3e,0xd3e, -0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e, -0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xcc,0xcc,0xd3b,0xd3b,0xd3b,0xd3b, -0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xcc,0xcc,0xcc,0xcc,0xcc,0xcc,0x1824,0x1824,0x1824,0x1824, -0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0xd41,0xd41,0xd41,0xd41, -0xd41,0xd41,0xcf,0xcf,0xd41,0xcf,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41, -0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xcf,0xd41, -0xd41,0xcf,0xcf,0xcf,0xd41,0xcf,0xcf,0xd41,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44, -0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd2, -0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xd2,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5, -0xdf5,0xdf5,0xdf5,0x14ee,0x14ee,0x179a,0x179a,0xd8,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0, -0x10e0,0x10e0,0x10e0,0x10e0,0x1a73,0x129,0x129,0x129,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07, -0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xe07,0xdfe, -0xdfe,0xe04,0xe04,0xdfe,0xdb,0xdb,0xe01,0xe01,0x1110,0x1110,0x1110,0x1110,0xde,0xde,0xde,0xde, -0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xde,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f, -0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xe19,0xe16,0xe19,0xe16,0xe16,0xe0d,0xe0d,0xe0d, -0xe0d,0xe0d,0xe0d,0x115b,0x1158,0x115b,0x1158,0x1155,0x1155,0x1155,0x13e6,0x13e3,0xe1,0xe1,0xe1,0xe1, -0xe1,0xe13,0xe10,0xe10,0xe10,0xe0d,0xe13,0xe10,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c, -0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe4, -0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe4, -0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe4,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe4, -0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe1c,0xe4,0xe22,0xe22,0xe22,0xe22,0xe22,0xe22,0xe22,0xe22, -0xe22,0xe22,0xe22,0xe22,0xe22,0xe22,0xe22,0xe22,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f, -0xe1f,0xe1f,0xe7,0xe7,0xe7,0xe7,0xe7,0xe7,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xea,0x13e9, -0xea,0xea,0xea,0xea,0xea,0x13e9,0xea,0xea,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c, -0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe3d,0xe31,0xe31,0xe31,0xed,0xe31,0xe31,0xed, -0xed,0xed,0xed,0xed,0xe31,0xe31,0xe31,0xe31,0xe3d,0xe3d,0xe3d,0xe3d,0xed,0xe3d,0xe3d,0xe3d, -0xed,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d, -0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0x1905,0x1905,0xed,0xed,0xe2e,0xe2e,0xe2e,0xed, -0xed,0xed,0xed,0xe34,0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0xe37,0x1902,0xed,0xed,0xed, -0xed,0xed,0xed,0xed,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe40,0xe40,0xe37,0xed,0xed,0xed, -0xed,0xed,0xed,0xed,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0x1161,0x1161, -0xf0,0xf0,0xf0,0xf0,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4f,0xe4f,0xe4f,0xe4c,0xe4c,0xe4f,0xe4c, -0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, -0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0xe49,0x115e,0xf0,0xf0,0xf0,0xe46,0xe46, -0xe55,0xe55,0xe55,0xe55,0xf3,0xf3,0xf3,0xf3,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55, -0xe52,0xe55,0xe55,0xe55,0xe55,0xe55,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3, -0x14fd,0x1503,0x1500,0x1845,0x17a0,0x1869,0x1869,0x1869,0x1869,0x1869,0x190b,0x1908,0x190e,0x1908,0x190e,0x19cb, -0x1a67,0x1a67,0x1a67,0x1b2a,0x1b2a,0x1b24,0x1b21,0x1b24,0x1b21,0x1b24,0x1b21,0x1b24,0x1b21,0x1b27,0xf6,0xf6, -0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6, -0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6,0xf6, -0xe79,0xe79,0xe79,0xe76,0xe76,0xe6d,0xe6d,0xe76,0xe73,0xe73,0xe73,0xe73,0x1a6a,0xf9,0xf9,0xf9, -0x12cc,0x12cc,0x12cc,0x12cf,0x12cf,0x12cf,0x12c6,0x12c6,0x12c9,0x12c6,0x14d,0x14d,0x14d,0x14d,0x14d,0x14d, -0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0x13f5,0x13f5,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xe7f, -0x1335,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0xfc,0x1332, -0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42, -0xeac,0xe9d,0xe97,0xea9,0xea6,0xea0,0xea0,0xeaf,0xe9a,0xea3,0xff,0xff,0xff,0xff,0xff,0xff, -0xf33,0xf33,0xf1e,0xf33,0xf36,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0x1b2d,0x105,0x105,0x105, -0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf2d,0xf3f,0xf3f,0xf24,0xf2a,0xf3f,0xf3f, -0xf27,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf21,0xf21,0xf21,0xf21,0xf21, -0xf21,0xf21,0xf21,0xf21,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0x1b30,0x1b30,0x105, -0x1b39,0x1b33,0x19d1,0x19ce,0x19d1,0x19d1,0x19d1,0x1a70,0x1a6d,0x1a70,0x1a6d,0x108,0x108,0x108,0x108,0x108, -0x1b39,0x1b33,0x108,0x1b33,0x108,0x1b33,0x1b39,0x1b33,0x1b39,0x1b33,0x108,0x108,0x108,0x108,0x108,0x108, -0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x1b36,0x1b36, -0x1b36,0x1a70,0x1a6d,0x150c,0x13fe,0x13fe,0x1338,0x103b,0x103b,0x103b,0x103b,0x103b,0xf4e,0xf4e,0xf4e,0xf4e, -0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e, -0xf4b,0xf4b,0xf51,0xf51,0x10b,0x10b,0x10b,0x10b,0x10b,0x10b,0x10b,0x10b,0xf5a,0xf5a,0xf5a,0xf5a, -0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a,0xf5a, -0xf5a,0xf5a,0xf54,0xf54,0xf54,0xf54,0x116a,0x116a,0x10e,0x10e,0x10e,0xf57,0x1512,0x1512,0x1512,0x1512, -0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512, -0x1512,0x1512,0x1512,0x1512,0x1512,0x16f2,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111, -0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111, -0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0xf63,0xf63,0xf63,0x1518,0x1518,0x1518,0x1518,0x1518, -0x1518,0x1518,0x1518,0x1518,0x1518,0x1518,0x1518,0x114,0xf60,0xf60,0xf60,0xf60,0x1515,0x114,0x114,0x114, -0x114,0x114,0x114,0x114,0x114,0x114,0x114,0x114,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66, -0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0x191d,0x191d,0x191d,0x191d,0x191d,0x191d, -0x191d,0x117,0x117,0x117,0x117,0x117,0x117,0x117,0x1062,0x1062,0x1062,0x1062,0x105f,0x105f,0x105f,0x105f, -0x105f,0x105f,0x105f,0x105f,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x105f,0x105f,0x1056,0x1053, -0x11a,0x11a,0x11a,0x1065,0x1065,0x1059,0x1059,0x1059,0x105c,0x105c,0x105c,0x105c,0x105c,0x105c,0x105c,0x105c, -0x105c,0x105c,0x11a,0x11a,0x11a,0x1062,0x1062,0x1062,0x1068,0x1068,0x1068,0x1068,0x1068,0x1068,0x1068,0x1068, -0x1068,0x1068,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x107d,0x107d,0x107d,0x107d,0x107d,0x107d,0x107d,0x107d, -0x107d,0x107d,0x1080,0x1080,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d, -0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x10a7,0x10a7,0x10a7,0x10a7,0x10a1,0x17a6,0x120,0x120, -0x120,0x120,0x120,0x120,0x120,0x120,0x10ad,0x10ad,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4,0x10a4, -0x10a4,0x10a4,0x120,0x120,0x120,0x120,0x120,0x120,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10bf, -0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10bf,0x10c5,0x10c8,0x123,0x123,0x123,0x123, -0x123,0x123,0x123,0x123,0x123,0x123,0x123,0x10c2,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da, -0x10da,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10d7,0x10d7,0x10ce,0x10ce,0x10d7,0x10d7,0x10ce,0x10ce,0x126, -0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x10da,0x10da,0x10da,0x10ce,0x10da,0x10da,0x10da,0x10da, -0x10da,0x10da,0x10da,0x10da,0x10ce,0x10d7,0x126,0x126,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4,0x10d4, -0x10d4,0x10d4,0x126,0x126,0x10d1,0x10dd,0x10dd,0x10dd,0x1524,0x129,0x129,0x129,0x129,0x129,0x129,0x129, -0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129, -0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x129,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3, -0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e3, -0x10e3,0x10e3,0x10e3,0x10e3,0x10e3,0x10e6,0x12c,0x12c,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9, +0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7f,0xb7f,0xa2,0xb7f,0xb7f,0xb7f,0xb7f,0xa2, +0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xa2,0xb7f,0xa2,0xa2,0xa2,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f, +0xb7f,0xa2,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, +0xddd,0xddd,0xa2,0xa2,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f, +0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7c,0xb7c,0xb7c,0xb76, +0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xef4,0xef1,0xa2,0xa2,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, +0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xa5,0xb85,0xa5,0xa5, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5, +0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xa5,0xc0c,0xc0c,0xc0c,0xc0c, +0xc0c,0xc0c,0xc0c,0xc0c,0xc0c,0xc0c,0xc0c,0xc0c,0xc0c,0x1b2a,0xc0c,0xc0c,0xc0c,0xc0c,0xc06,0xc06, +0xc09,0x1b27,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0xa8,0x1b2a,0xc15,0xc15,0xc15,0xc15, +0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc15,0xc0f,0xc0f, +0xc12,0xc75,0xc75,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xab,0xc1b,0xc1b,0xc1b,0xc1b, +0xc1b,0xc1b,0xc1b,0xc1b,0xc1b,0xc1b,0xc1b,0xc1b,0xc1b,0xc1b,0xc1b,0xc1b,0xc1b,0xc1b,0xc18,0xc18, +0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xae,0xc21,0xc21,0xc21,0xc21, +0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xb1,0xc21,0xc21,0xc21,0xb1,0xc1e,0xc1e, +0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xb1,0xd05,0xd05,0xd05,0xd05, +0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05, +0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0xd05,0x14f1,0x14f1,0xb4,0xcf6,0xcf6,0xcf6,0xd02, +0xd02,0xd02,0xd02,0xcf6,0xcf6,0xd02,0xd02,0xd02,0xb4,0xb4,0xb4,0xb4,0xd02,0xd02,0xcf6,0xd02, +0xd02,0xd02,0xd02,0xd02,0xd02,0xcf9,0xcf9,0xcf9,0xb4,0xb4,0xb4,0xb4,0xcfc,0xb4,0xb4,0xb4, +0xd08,0xd08,0xcff,0xcff,0xcff,0xcff,0xcff,0xcff,0xcff,0xcff,0xcff,0xcff,0xd0b,0xd0b,0xd0b,0xd0b, +0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xb7,0xb7, +0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7,0xb7, +0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4, +0x14f4,0x14f4,0x14f4,0x14f4,0xba,0xba,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4, +0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0xba,0x1a76, +0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f, +0xd2f,0xd2f,0xd2f,0xd2f,0xbd,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f, +0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xbd,0xd2f,0xd2f,0xd2f,0xd2f, +0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xbd, +0xd2f,0xd2f,0xbd,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f, +0xd2f,0xd2f,0xbd,0xbd,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f, +0xd2f,0xd2f,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd, +0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd,0xbd, +0xbd,0xbd,0xbd,0xbd,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32, +0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xc0, +0xc0,0xc0,0xc0,0xc0,0xd71,0xd71,0xd77,0xc3,0xc3,0xc3,0xc3,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e, +0xd6e,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e,0xd6e, +0xd6e,0xd6e,0xd6e,0xd6e,0xc3,0xc3,0xc3,0xd74,0xd74,0xd74,0xd74,0xd74,0xd74,0xd74,0xd74,0xd74, +0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38, +0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xc6,0xd35, +0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41, +0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xd41,0xc9,0xc9, +0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xd3e,0xc9,0xc9,0xc9,0xc9,0xc9,0xc9, +0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833, +0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xcc,0xcc,0xd44,0xcc,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44, +0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44, +0xd44,0xd44,0xcc,0xd44,0xd44,0xcc,0xcc,0xcc,0xd44,0xcc,0xcc,0xd44,0xd47,0xd47,0xd47,0xd47, +0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47, +0xd47,0xd47,0xd47,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xcf,0xdf8,0xdf8,0xdf8,0xdf8, +0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0x14f7,0x14f7,0x17a9,0x17a9,0xd5,0x10e6,0x10e6,0x10e6,0x10e6, +0x10e6,0x10e6,0x10e6,0x10e6,0x10e6,0x10e6,0x10e6,0x10e6,0x1a85,0x126,0x126,0x126,0xe0a,0xe0a,0xe0a,0xe0a, +0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a,0xe0a, +0xe0a,0xe0a,0xe0a,0xe01,0xe01,0xe07,0xe07,0xe01,0xd8,0xd8,0xe04,0xe04,0x1113,0x1113,0x1113,0x1113, +0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0x1c56,0xc72,0xc72,0xc72,0xc72, +0xc72,0xc72,0xc72,0xc72,0xc72,0xc72,0xc72,0xc72,0xc72,0xc72,0xc72,0xc72,0xe1c,0xe19,0xe1c,0xe19, +0xe19,0xe10,0xe10,0xe10,0xe10,0xe10,0xe10,0x1161,0x115e,0x1161,0x115e,0x115b,0x115b,0x115b,0x13ef,0x13ec, +0xde,0xde,0xde,0xde,0xde,0xe16,0xe13,0xe13,0xe13,0xe10,0xe16,0xe13,0xe1f,0xe1f,0xe1f,0xe1f, +0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f, +0xe1f,0xe1f,0xe1f,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1,0xe1f,0xe1f,0xe1f,0xe1f, +0xe1f,0xe1f,0xe1f,0xe1,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1,0xe1f,0xe1f,0xe1f,0xe1f, +0xe1f,0xe1f,0xe1f,0xe1,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1f,0xe1,0xe25,0xe25,0xe25,0xe25, +0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe22,0xe22,0xe22,0xe22, +0xe22,0xe22,0xe22,0xe22,0xe22,0xe22,0xe4,0xe4,0xe4,0xe4,0xe4,0xe4,0xe28,0xe28,0xe28,0xe28, +0xe28,0xe28,0xe7,0x13f2,0xe7,0xe7,0xe7,0xe7,0xe7,0x13f2,0xe7,0xe7,0xe7f,0xe7f,0xe7f,0xe7f, +0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe40,0xe34,0xe34,0xe34, +0xea,0xe34,0xe34,0xea,0xea,0xea,0xea,0xea,0xe34,0xe34,0xe34,0xe34,0xe40,0xe40,0xe40,0xe40, +0xea,0xe40,0xe40,0xe40,0xea,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40, +0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0xe40,0x1914,0x1914,0xea,0xea, +0xe31,0xe31,0xe31,0xea,0xea,0xea,0xea,0xe37,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a,0xe3a, +0x1911,0xea,0xea,0xea,0xea,0xea,0xea,0xea,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe3d,0xe43,0xe43, +0xe3a,0xea,0xea,0xea,0xea,0xea,0xea,0xea,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0x1167,0x1167,0xed,0xed,0xed,0xed,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe52,0xe52,0xe52, +0xe4f,0xe4f,0xe52,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xed,0xed, +0xed,0xed,0xed,0xed,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0x1164,0xed, +0xed,0xed,0xe49,0xe49,0xe58,0xe58,0xe58,0xe58,0xf0,0xf0,0xf0,0xf0,0xe58,0xe58,0xe58,0xe58, +0xe58,0xe58,0xe58,0xe58,0xe55,0xe58,0xe58,0xe58,0xe58,0xe58,0xf0,0xf0,0xf0,0xf0,0xf0,0xf0, +0xf0,0xf0,0xf0,0xf0,0x1506,0x150c,0x1509,0x1854,0x17af,0x1878,0x1878,0x1878,0x1878,0x1878,0x191a,0x1917, +0x191d,0x1917,0x191d,0x19dd,0x1a79,0x1a79,0x1a79,0x1b3c,0x1b3c,0x1b36,0x1b33,0x1b36,0x1b33,0x1b36,0x1b33,0x1b36, +0x1b33,0x1b39,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3, +0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3,0xf3, +0xf3,0xf3,0xf3,0xf3,0xe7c,0xe7c,0xe7c,0xe79,0xe79,0xe70,0xe70,0xe79,0xe76,0xe76,0xe76,0xe76, +0x1a7c,0xf6,0xf6,0xf6,0x12cc,0x12cc,0x12cc,0x12cf,0x12cf,0x12cf,0x12d2,0x12d2,0x12d5,0x12d2,0x14a,0x14a, +0x14a,0x14a,0x14a,0x14a,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0x13fe,0x13fe,0xf9,0xf9,0xf9,0xf9, +0xf9,0xf9,0xf9,0xe82,0x133b,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9,0xf9, +0xf9,0xf9,0xf9,0x1338,0xc45,0xc45,0xc45,0xc45,0xc45,0xc45,0xc45,0xc45,0xc45,0xc45,0xc45,0xc45, +0xc45,0xc45,0xc45,0xc45,0xeaf,0xea0,0xe9a,0xeac,0xea9,0xea3,0xea3,0xeb2,0xe9d,0xea6,0xfc,0xfc, +0xfc,0xfc,0xfc,0xfc,0xf36,0xf36,0xf21,0xf36,0xf39,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c, +0x1b3f,0x102,0x102,0x102,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf30,0xf42,0xf42, +0xf2a,0xf2d,0xf42,0xf42,0xf27,0xf2a,0xf2a,0xf2a,0xf2a,0xf2a,0xf2a,0xf2a,0xf2a,0xf2a,0xf2a,0xf24, +0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf24,0xf2a,0xf2a,0xf2a,0xf2a,0xf2a,0xf2a,0xf2a,0xf2a, +0xf2a,0x1b42,0x1b42,0x102,0x1b4b,0x1b45,0x19e3,0x19e0,0x19e3,0x19e3,0x19e3,0x1a82,0x1a7f,0x1a82,0x1a7f,0x105, +0x105,0x105,0x105,0x105,0x1b4b,0x1b45,0x105,0x1b45,0x105,0x1b45,0x1b4b,0x1b45,0x1b4b,0x1b45,0x105,0x105, +0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105,0x105, +0x105,0x105,0x1b48,0x1b48,0x1b48,0x1a82,0x1a7f,0x1515,0x1407,0x1407,0x133e,0x103e,0x103e,0x103e,0x103e,0x103e, +0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51, +0xf51,0xf51,0xf51,0xf51,0xf4e,0xf4e,0xf54,0xf54,0x108,0x108,0x108,0x108,0x108,0x108,0x108,0x108, +0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d, +0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf57,0xf57,0xf57,0xf57,0x1170,0x1170,0x10b,0x10b,0x10b,0xf5a, +0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b, +0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x1701,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e, +0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e, +0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0x10e,0xf66,0xf66,0xf66,0x1521, +0x1521,0x1521,0x1521,0x1521,0x1521,0x1521,0x1521,0x1521,0x1521,0x1521,0x1521,0x111,0xf63,0xf63,0xf63,0xf63, +0x151e,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0x111,0xf69,0xf69,0xf69,0xf69, +0xf69,0xf69,0xf69,0xf69,0xf69,0xf69,0xf69,0xf69,0xf69,0xf69,0xf69,0xf69,0xf69,0xf69,0x192c,0x192c, +0x192c,0x192c,0x192c,0x192c,0x192c,0x114,0x114,0x114,0x114,0x114,0x114,0x114,0x1065,0x1065,0x1065,0x1065, +0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1053,0x1053,0x1053,0x1053,0x1053,0x1053,0x1053,0x1053, +0x1062,0x1062,0x1059,0x1056,0x117,0x117,0x117,0x1068,0x1068,0x105c,0x105c,0x105c,0x105f,0x105f,0x105f,0x105f, +0x105f,0x105f,0x105f,0x105f,0x105f,0x105f,0x117,0x117,0x117,0x1065,0x1065,0x1065,0x106b,0x106b,0x106b,0x106b, +0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x1080,0x1080,0x1080,0x1080, +0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1083,0x1083,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a, +0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x11a,0x10aa,0x10aa,0x10aa,0x10aa, +0x10a4,0x17b5,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x10b0,0x10b0,0x10a7,0x10a7,0x10a7,0x10a7, +0x10a7,0x10a7,0x10a7,0x10a7,0x10a7,0x10a7,0x11d,0x11d,0x11d,0x11d,0x11d,0x11d,0x10ce,0x10ce,0x10ce,0x10ce, +0x10ce,0x10ce,0x10ce,0x10c2,0x10c2,0x10c2,0x10c2,0x10c2,0x10c2,0x10c2,0x10c2,0x10c2,0x10c2,0x10c2,0x10c8,0x10cb, +0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x120,0x10c5,0x10e0,0x10e0,0x10e0,0x10e0, +0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10d1,0x10d1,0x10d1,0x10d1,0x10d1,0x10d1,0x10da,0x10da,0x10d1,0x10d1,0x10da, +0x10da,0x10d1,0x10d1,0x123,0x123,0x123,0x123,0x123,0x123,0x123,0x123,0x123,0x10dd,0x10dd,0x10dd,0x10d1, +0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10dd,0x10d1,0x10da,0x123,0x123,0x10d7,0x10d7,0x10d7,0x10d7, +0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x10d7,0x123,0x123,0x10d4,0x10e3,0x10e3,0x10e3,0x152d,0x126,0x126,0x126, +0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126, +0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x126,0x10e9,0x10e9,0x10e9,0x10e9, 0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9, -0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x12f,0x12f,0x12f,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec, -0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x132,0x132,0x132,0x132,0x132,0x132,0x132, -0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x132,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2, -0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2, -0x10f2,0x10f2,0x135,0x135,0x135,0x135,0x135,0x10ef,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5, -0x10f5,0x10f5,0x10f5,0x10f5,0x138,0x138,0x138,0x138,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8, -0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x13b,0x13b,0x13b,0x13b, -0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x13b,0x1170,0x1170,0x1170,0x1170,0x1179,0x1170,0x1170,0x1170, -0x1179,0x1170,0x1170,0x1170,0x1170,0x116d,0x13e,0x13e,0x1176,0x1176,0x1176,0x1176,0x1176,0x1176,0x1176,0x117c, -0x1176,0x117c,0x1176,0x1176,0x1176,0x117c,0x117c,0x13e,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f, -0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x141,0x141, -0x141,0x141,0x141,0x141,0x141,0x141,0x141,0x141,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a, -0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x1197,0x1182,0x1197, -0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x1182,0x144,0x118b,0x1194,0x1182,0x1194,0x1194,0x1182,0x1182,0x1182, -0x1182,0x1182,0x1182,0x1182,0x1182,0x1197,0x1197,0x1197,0x1197,0x1197,0x1197,0x1182,0x1182,0x1188,0x1188,0x1188, -0x1188,0x1188,0x1188,0x1188,0x1188,0x144,0x144,0x1185,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191, -0x1191,0x1191,0x144,0x144,0x144,0x144,0x144,0x144,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191,0x1191, -0x1191,0x1191,0x144,0x144,0x144,0x144,0x144,0x144,0x118e,0x118e,0x118e,0x118e,0x118e,0x118e,0x118e,0x119d, -0x11a0,0x11a0,0x11a0,0x11a0,0x118e,0x118e,0x144,0x144,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1563, -0x1563,0x1563,0x1563,0x1563,0x1563,0x1563,0x1560,0x1a85,0x12e1,0x12ba,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8,0x12d8, -0x12d8,0x12c0,0x12bd,0x12b4,0x12b4,0x12de,0x12b4,0x12b4,0x12b4,0x12b4,0x12c3,0x149d,0x14a3,0x14a0,0x14a0,0x18e4, -0x16b9,0x16b9,0x1a52,0x147,0x147,0x147,0x147,0x147,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5, -0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11ac,0x11ac,0x11af,0x11b8,0x11b2,0x11b2,0x11b2,0x11b8, -0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x14a,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5, -0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x12a5, -0x12a5,0x12a5,0x12a5,0x12a5,0x12a5,0x150,0x150,0x150,0x11d6,0x11ca,0x11ca,0x11ca,0x11ca,0x11ca,0x11ca,0x11cd, -0x11dc,0x11dc,0x11ca,0x11ca,0x11ca,0x11ca,0x153,0x12d5,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0,0x11d0, -0x11d0,0x11d0,0x153,0x153,0x153,0x153,0x11ca,0x11ca,0x11fa,0x11ee,0x11fa,0x156,0x156,0x156,0x156,0x156, -0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156,0x156, -0x156,0x156,0x156,0x11f7,0x11f7,0x11fd,0x11f1,0x11f4,0x1212,0x1212,0x1212,0x120c,0x120c,0x1203,0x120c,0x120c, -0x1203,0x120c,0x120c,0x1215,0x120f,0x1206,0x159,0x159,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209,0x1209, -0x1209,0x1209,0x159,0x159,0x159,0x159,0x159,0x159,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x121b,0x15c, -0x15c,0x15c,0x15c,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218, -0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218, -0x15c,0x15c,0x15c,0x15c,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224, -0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x15f,0x1221,0x121e,0x121e,0x121e,0x121e, -0x121e,0x121e,0x121e,0x121e,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233, -0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x162,0x162,0x162,0x122d,0x1230,0x1230, -0x1230,0x1230,0x1230,0x1230,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239, -0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x165,0x165,0x1236,0x1236,0x1236,0x1236, -0x1236,0x1236,0x1236,0x1236,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f, -0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x168,0x168,0x168,0x168,0x168,0x123c,0x123c,0x123c,0x123c, -0x123c,0x123c,0x123c,0x123c,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245, -0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245, -0x1245,0x1245,0x1245,0x16e,0x125d,0x125d,0x1b3c,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171, -0x171,0x1926,0x171,0x171,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c, -0x147c,0x147c,0x147c,0x147c,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827,0x1827, -0x1827,0x1a76,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174, -0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174, -0x174,0x174,0x174,0x174,0x174,0x174,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344, -0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344,0x1344, -0x12ae,0x13a7,0x13a7,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177, +0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10e9,0x10ec,0x129,0x129,0x10ef,0x10ef,0x10ef,0x10ef, +0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef, +0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x10ef,0x12c,0x12c,0x12c,0x10f2,0x10f2,0x10f2,0x10f2, +0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x12f,0x12f,0x12f, +0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x12f,0x10f8,0x10f8,0x10f8,0x10f8, +0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8, +0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x132,0x132,0x132,0x132,0x132,0x10f5,0x10fb,0x10fb,0x10fb,0x10fb, +0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x135,0x135,0x135,0x135,0x10fe,0x10fe,0x10fe,0x10fe, +0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe, +0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x138,0x1176,0x1176,0x1176,0x1176, +0x117f,0x1176,0x1176,0x1176,0x117f,0x1176,0x1176,0x1176,0x1176,0x1173,0x13b,0x13b,0x117c,0x117c,0x117c,0x117c, +0x117c,0x117c,0x117c,0x1182,0x117c,0x1182,0x117c,0x117c,0x117c,0x1182,0x1182,0x13b,0x1185,0x1185,0x1185,0x1185, +0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185, +0x1185,0x1185,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x13e,0x11a0,0x11a0,0x11a0,0x11a0, +0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0, +0x11a0,0x119d,0x1188,0x119d,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188,0x141,0x1191,0x119a,0x1188,0x119a, +0x119a,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188,0x1188,0x119d,0x119d,0x119d,0x119d,0x119d,0x119d,0x1188, +0x1188,0x118e,0x118e,0x118e,0x118e,0x118e,0x118e,0x118e,0x118e,0x141,0x141,0x118b,0x1197,0x1197,0x1197,0x1197, +0x1197,0x1197,0x1197,0x1197,0x1197,0x1197,0x141,0x141,0x141,0x141,0x141,0x141,0x1197,0x1197,0x1197,0x1197, +0x1197,0x1197,0x1197,0x1197,0x1197,0x1197,0x141,0x141,0x141,0x141,0x141,0x141,0x1194,0x1194,0x1194,0x1194, +0x1194,0x1194,0x1194,0x11a3,0x11a6,0x11a6,0x11a6,0x11a6,0x1194,0x1194,0x141,0x141,0x156c,0x156c,0x156c,0x156c, +0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x156c,0x1569,0x1a97,0x12e7,0x12c0,0x12de,0x12de, +0x12de,0x12de,0x12de,0x12de,0x12de,0x12c6,0x12c3,0x12ba,0x12ba,0x12e4,0x12ba,0x12ba,0x12ba,0x12ba,0x12c9,0x14a6, +0x14ac,0x14a9,0x14a9,0x18f3,0x16c8,0x16c8,0x1a64,0x144,0x144,0x144,0x144,0x144,0x11bb,0x11bb,0x11bb,0x11bb, +0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11b2,0x11b2,0x11b5,0x11be, +0x11b8,0x11b8,0x11b8,0x11be,0x147,0x147,0x147,0x147,0x147,0x147,0x147,0x147,0x12ab,0x12ab,0x12ab,0x12ab, 0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab, -0x12ab,0x12ab,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x13a7,0x182a,0x177,0x177,0x177,0x177, -0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x12a8,0x177,0x177,0x177,0x177,0x177,0x177,0x177, -0x13cb,0x13cb,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177, -0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177, -0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177, -0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x177,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d, -0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d,0x134d, -0x134d,0x1347,0x1347,0x1347,0x17a,0x17a,0x134a,0x17a,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x1350,0x1359, -0x1353,0x1353,0x1359,0x1359,0x1359,0x1353,0x1359,0x1353,0x1353,0x1353,0x135c,0x135c,0x17d,0x17d,0x17d,0x17d, -0x17d,0x17d,0x17d,0x17d,0x1356,0x1356,0x1356,0x1356,0x180,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x180, -0x180,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x180,0x180,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x180, -0x180,0x180,0x180,0x180,0x180,0x180,0x180,0x180,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x180, -0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x1362,0x180,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0, -0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1368,0x137a, -0x137a,0x136e,0x136e,0x136e,0x136e,0x136e,0x183,0x183,0x183,0x183,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b, -0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x136b,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371, -0x1371,0x1371,0x1371,0x1371,0x1b42,0x1b45,0x1b45,0x1b3f,0x1b3f,0x1b45,0x183,0x183,0x183,0x183,0x183,0x183, -0x183,0x183,0x183,0x1533,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d, -0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x186,0x186,0x186, -0x186,0x186,0x186,0x186,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, -0x1380,0x1380,0x1380,0x189,0x189,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, -0x1380,0x1380,0x1380,0x1536,0x189,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, -0x1380,0x1380,0x1380,0x13b0,0x189,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380,0x1380, -0x1380,0x1380,0x1380,0x1380,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536, -0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x1536,0x189,0x189,0x189,0x189,0x189,0x189, -0x189,0x189,0x189,0x189,0x13c5,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542, -0x16b0,0x1542,0x1542,0x1542,0x1782,0x1833,0x1833,0x186c,0x186c,0x1a34,0x1adf,0x1adf,0x18c,0x18c,0x18c,0x18c, -0x1c2c,0x1bae,0x1bae,0x1bae,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x16ad, -0x16ad,0x18c,0x18c,0x18c,0x1542,0x1542,0x1542,0x1542,0x1833,0x1833,0x1833,0x18cf,0x18cf,0x19b0,0x1a34,0x1adf, -0x1adf,0x18c,0x18c,0x18c,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383, -0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1bd2,0x1bd2,0x1bd2,0x18f,0x18f,0x18f,0x18f,0x1bd2, -0x1bd2,0x1bd2,0x1bd2,0x1bd2,0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f, -0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f, -0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x192,0x141f,0x192,0x192,0x141f,0x192,0x141f,0x141f,0x141f, -0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x192,0x141f, -0x192,0x192,0x192,0x192,0x192,0x192,0x141f,0x192,0x192,0x192,0x192,0x141f,0x192,0x141f,0x192,0x141f, -0x192,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x192,0x141f,0x192,0x192,0x141f,0x192,0x141f,0x192,0x141f, -0x192,0x141f,0x192,0x141f,0x192,0x141f,0x141f,0x192,0x141f,0x192,0x192,0x141f,0x141f,0x141f,0x141f,0x192, -0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x141f, -0x141f,0x192,0x141f,0x192,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x192,0x141f, -0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f, -0x192,0x192,0x192,0x192,0x192,0x141f,0x141f,0x141f,0x192,0x141f,0x141f,0x141f,0x141f,0x141f,0x192,0x141f, -0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f, -0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192, -0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192, -0x141c,0x141c,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192,0x192, -0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1422,0x1422,0x1422,0x1422,0x1422,0x1431,0x1422,0x1425,0x1425, -0x1422,0x1422,0x1422,0x1428,0x1428,0x195,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e,0x142e, -0x142b,0x1437,0x1437,0x1437,0x1932,0x192f,0x192f,0x1a7c,0x195,0x195,0x195,0x195,0x195,0x195,0x195,0x195, -0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2, -0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1443,0x1440,0x143a,0x143a,0x1440,0x1440, -0x1449,0x1449,0x1443,0x1446,0x1446,0x1440,0x143d,0x198,0x198,0x198,0x198,0x198,0x198,0x198,0x198,0x198, -0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c, -0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x19b,0x19b,0x19b,0x19b,0x1707,0x1707,0x144c,0x144c, -0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, -0x19b,0x19b,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, -0x1458,0x1458,0x1458,0x1458,0x1458,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19dd,0x19e,0x19e,0x19e,0x19e,0x19d7, -0x1458,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, -0x19da,0x19da,0x19da,0x19da,0x19da,0x19da,0x19da,0x19da,0x19e,0x19e,0x19e,0x19e,0x19e,0x19e,0x19e,0x1452, -0x1452,0x1452,0x1452,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b,0x145b, -0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x147c,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1, -0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1,0x1a1, -0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x147f,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4,0x1a4, -0x12db,0x12d8,0x12db,0x12b7,0x12d8,0x12de,0x12de,0x12e1,0x12de,0x12e1,0x12e4,0x12d8,0x12e1,0x12e1,0x12d8,0x12d8, -0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1482,0x148b,0x1482,0x148b,0x148b, -0x1482,0x1482,0x1482,0x1482,0x1482,0x1482,0x148e,0x1485,0x19e0,0x1b51,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7, -0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1aa,0x1aa, -0x1551,0x1551,0x1551,0x1551,0x1551,0x1557,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa, -0x155d,0x155d,0x155d,0x155d,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x1ad,0x155a, -0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x2b2,0x1b9c,0x1b9c,0x1b9c,0x1b9c, -0x16bc,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3, -0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x16b3,0x1b0,0x1b0,0x1b0,0x1b0, -0x1a85,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b57,0x1b54,0x1b54,0x1b54,0x1b3, -0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3, -0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3, -0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6, -0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x1b6,0x1b6,0x1b6, -0x1b6,0x1b6,0x1b6,0x1b6,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x1b6,0x1b6, -0x156c,0x1566,0x1569,0x1572,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1b9,0x1b9,0x1b9,0x1b9, -0x1b9,0x1b9,0x1b9,0x1b9,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d, -0x155d,0x155d,0x155d,0x155d,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578, -0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1935,0x1935,0x1935,0x1935,0x1bd5,0x1bc,0x1bc, -0x1bc,0x1bc,0x1bc,0x1bc,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37,0x1a37, -0x1bc,0x1bc,0x1bc,0x1bc,0x1bb1,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc, -0x1bc,0x1bc,0x1bc,0x1bc,0x171c,0x16bf,0x1581,0x16c5,0x1bf,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a, -0x158a,0x1bf,0x1bf,0x158a,0x158a,0x1bf,0x1bf,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a, -0x158a,0x158a,0x158a,0x158a,0x158a,0x1bf,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x158a,0x1bf,0x158a,0x158a, -0x1bf,0x158a,0x158a,0x158a,0x158a,0x158a,0x1bf,0x19bc,0x16c2,0x158a,0x157b,0x1581,0x157b,0x1581,0x1581,0x1581, -0x1581,0x1bf,0x1bf,0x1581,0x1581,0x1bf,0x1bf,0x1584,0x1584,0x1587,0x1bf,0x1bf,0x171f,0x1bf,0x1bf,0x1bf, -0x1bf,0x1bf,0x1bf,0x157b,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x158d,0x158a,0x158a,0x158a,0x158a,0x1581,0x1581, -0x1bf,0x1bf,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x1bf,0x1bf,0x1bf,0x157e,0x157e,0x157e,0x157e, -0x157e,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x1bf,0x15a2,0x15a2,0x15a2,0x15a2, -0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x1c2,0x15a2, -0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15b4,0x15b4,0x15b4,0x15a8, -0x15a8,0x15a8,0x15a8,0x15a8,0x15a8,0x15ab,0x15ae,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x15b1,0x15b1,0x15b1,0x15b1, -0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x1c5,0x1722,0x1722,0x1722,0x1722, -0x15c0,0x15bd,0x19e3,0x19e3,0x1a8b,0x1a8e,0x1a88,0x1a88,0x1c8,0x1c8,0x1c8,0x1c8,0x174f,0x174f,0x174f,0x174f, -0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x15c6,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x15c6,0x15c6,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb, -0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x15d2,0x15d2,0x15d2,0x15d2, -0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15d2,0x15c9, -0x15cc,0x15cf,0x15d2,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x15e1,0x15e1,0x15e1,0x15e1, -0x15e1,0x15d5,0x15d5,0x1d1,0x1d1,0x1d1,0x1d1,0x15d8,0x15d8,0x15d8,0x15d8,0x15d8,0x15de,0x15de,0x16c8,0x15de, -0x15de,0x15de,0x15db,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x15ea,0x15ea,0x15ea,0x15ea, -0x15ea,0x1d4,0x1d4,0x15e7,0x15e7,0x15e7,0x15e7,0x15e7,0x15e7,0x15e7,0x15e7,0x15e7,0x15e4,0x15e4,0x15e4,0x15e4, -0x15e4,0x15e4,0x15e4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x15ed,0x15ff,0x15ff,0x15f3, -0x15fc,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x15f6,0x15f6,0x15f6,0x15f6, -0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1d7,0x1605,0x1605,0x1605,0x1605, -0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605, -0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1da,0x1602,0x1602,0x1602,0x1602, -0x1602,0x1602,0x1602,0x1602,0x1602,0x1602,0x1da,0x1da,0x1da,0x1da,0x1608,0x1608,0x1b8d,0x1b8d,0x1b8d,0x1b8d, -0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1611,0x1611,0x1611,0x1611, -0x1611,0x160b,0x1614,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x160e,0x160e,0x160e,0x160e, -0x160e,0x160e,0x160e,0x160e,0x160e,0x160e,0x1611,0x1611,0x1611,0x1611,0x1611,0x1dd,0x161a,0x161a,0x161a,0x161a, -0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a, -0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x161a,0x1e0,0x1626,0x1626,0x1626,0x1626, -0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626,0x1626, -0x1626,0x1626,0x1623,0x1623,0x1623,0x1623,0x1623,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x163e,0x163e,0x1641,0x1641, -0x1644,0x1635,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x163b,0x163b,0x163b,0x163b, -0x163b,0x163b,0x163b,0x163b,0x163b,0x163b,0x1e6,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1e6,0x163e, -0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e, -0x163e,0x163e,0x163e,0x163e,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x163e,0x163e,0x163e,0x164d,0x164d,0x164d,0x164d, -0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d, -0x164d,0x164d,0x164d,0x164d,0x164d,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1656,0x1656,0x1656,0x1656, -0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1656,0x1ec,0x1ec, -0x1ec,0x1ec,0x1ec,0x1ec,0x1ec,0x1653,0x1653,0x1653,0x1653,0x1ec,0x1ec,0x1ec,0x1671,0x1671,0x1671,0x1671, -0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1659,0x166b,0x166b,0x1659,0x1659, -0x1659,0x1659,0x1f2,0x1f2,0x166b,0x166b,0x166e,0x166e,0x1659,0x1659,0x166b,0x165f,0x165c,0x1662,0x1674,0x1674, -0x1665,0x1665,0x1668,0x1668,0x1668,0x1674,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b,0x172b, -0x172b,0x172b,0x172b,0x172b,0x1728,0x1728,0x1728,0x1728,0x1725,0x1725,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2, -0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2, -0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f5,0x1677,0x1677,0x1677, -0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677,0x1677, -0x1677,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x167a,0x167a,0x167a,0x167a, -0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1f8,0x1f8,0x1f8,0x1f8,0x167a,0x167a,0x167a,0x167a, -0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1f8,0x1f8,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1f8,0x1f8,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a, -0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1f8,0x1f8,0x1a91,0x1a91,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8, -0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x167d,0x168c,0x1683,0x1680, -0x1692,0x1692,0x1686,0x1692,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1689,0x1689,0x1689,0x1689, -0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1698,0x1698,0x1698,0x1698, -0x1698,0x1698,0x1698,0x1698,0x1698,0x1698,0x1695,0x1695,0x1695,0x1695,0x1695,0x1695,0x1695,0x1695,0x1695,0x1fe, -0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x1fe,0x169e,0x1740,0x1740,0x1740,0x1740, -0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1740, -0x1740,0x1740,0x1740,0x1740,0x1740,0x1740,0x1938,0x201,0x201,0x172e,0x172e,0x172e,0x173a,0x173a,0x172e,0x172e, -0x172e,0x172e,0x173d,0x172e,0x172e,0x172e,0x172e,0x1731,0x201,0x201,0x201,0x201,0x1737,0x1737,0x1737,0x1737, -0x1737,0x1737,0x1737,0x1737,0x1737,0x1737,0x1734,0x1734,0x1743,0x1743,0x1743,0x1734,0x1746,0x1746,0x1746,0x1746, -0x1746,0x1746,0x1746,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204, -0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204,0x204, -0x204,0x204,0x204,0x204,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758, -0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x1758,0x20a,0x1758,0x1758,0x20a,0x20a,0x20a,0x20a,0x20a,0x1755, -0x1755,0x1755,0x1755,0x1755,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x20d,0x175b,0x20d,0x175b,0x175b, -0x175b,0x175b,0x20d,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b, -0x175b,0x175b,0x20d,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175b,0x175e,0x20d,0x20d, -0x20d,0x20d,0x20d,0x20d,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7, -0x15b7,0x15b7,0x15b7,0x15b7,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x210, -0x210,0x210,0x210,0x210,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764, -0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x1761,0x1761, -0x1761,0x1761,0x1761,0x1761,0x176d,0x176d,0x176d,0x176d,0x176a,0x176d,0x176d,0x1770,0x1773,0x1770,0x1770,0x176d, -0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x213,0x176a, -0x176a,0x176a,0x176a,0x176a,0x17ca,0x17ca,0x17ca,0x17ca,0x17c1,0x17c1,0x17c1,0x17bb,0x17be,0x17be,0x17be,0x19e6, -0x216,0x216,0x216,0x216,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x17c7,0x216,0x216, -0x216,0x216,0x17c4,0x17c4,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x219,0x17e5,0x17e5, -0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5, -0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e2,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x219, -0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17d0,0x17e2,0x17d3,0x17e5,0x17e8,0x17e8,0x17dc,0x17d9,0x17d9,0x219,0x219, -0x219,0x219,0x219,0x219,0x219,0x219,0x219,0x219,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df, -0x17df,0x17df,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6, -0x17d6,0x219,0x219,0x219,0x17f4,0x17f7,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd, -0x17fd,0x17fd,0x17fd,0x17fd,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x17eb,0x21c,0x21c,0x21c, -0x21c,0x21c,0x21c,0x21c,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956, -0x1956,0x1956,0x1956,0x1956,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x21f,0x17ee,0x17ee,0x17ee,0x17ee, -0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x21f,0x21f,0x17ee, -0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x21f,0x17ee,0x17ee,0x21f,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x21f, -0x21f,0x21f,0x21f,0x21f,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc, -0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x183c,0x18d8,0x1a40,0x1a43,0x1aeb,0x222,0x222,0x222,0x222,0x222,0x222,0x222, -0x222,0x222,0x222,0x222,0x1ae8,0x1ae8,0x222,0x222,0x222,0x222,0x222,0x222,0x222,0x222,0x222,0x222, -0x222,0x222,0x222,0x222,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd, -0x17fd,0x17fd,0x17fd,0x17fd,0x225,0x225,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1, -0x17f1,0x17f1,0x17f1,0x17f1,0x225,0x17fa,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17f1,0x17fa,0x17f1,0x17f1, -0x17fa,0x17f1,0x17f1,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x1800,0x1800,0x1800,0x1800, -0x1800,0x1800,0x1800,0x1800,0x1800,0x1800,0x1800,0x1800,0x1800,0x228,0x228,0x228,0x228,0x228,0x228,0x228, -0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x1818,0x1818,0x1809,0x1803, -0x1803,0x1818,0x1806,0x181b,0x181b,0x181b,0x181b,0x181e,0x181e,0x1812,0x180f,0x180c,0x1815,0x1815,0x1815,0x1815, -0x1815,0x1815,0x1815,0x1815,0x1815,0x1815,0x1a94,0x1812,0x22b,0x180c,0x193b,0x19e9,0x1a97,0x1a97,0x22b,0x22b, -0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b, -0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x22b,0x1824,0x1824,0x1824,0x1824, -0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824, -0x22e,0x22e,0x22e,0x22e,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821, -0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821,0x1821, -0x22e,0x22e,0x22e,0x22e,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, -0x183f,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x1a46,0x231,0x231,0x231,0x231, -0x231,0x231,0x231,0x231,0x1bba,0x1bba,0x1bba,0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x234, -0x234,0x234,0x234,0x234,0x276,0x276,0x1c2f,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276, -0x276,0x276,0x276,0x276,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x237,0x187e,0x187e,0x237,0x187e, -0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e, -0x187e,0x187e,0x187e,0x187e,0x187e,0x1872,0x1872,0x1872,0x1872,0x1872,0x1872,0x237,0x237,0x237,0x1872,0x237, -0x1872,0x1872,0x237,0x1872,0x1872,0x1872,0x1875,0x1872,0x1878,0x1878,0x1881,0x1872,0x237,0x237,0x237,0x237, -0x237,0x237,0x237,0x237,0x187b,0x187b,0x187b,0x187b,0x187b,0x187b,0x187b,0x187b,0x187b,0x187b,0x237,0x237, -0x237,0x237,0x237,0x237,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, -0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, -0x23a,0x23a,0x23a,0x23a,0x1890,0x1893,0x1893,0x23d,0x23d,0x23d,0x23d,0x23d,0x23d,0x23d,0x23d,0x23d, -0x23d,0x23d,0x23d,0x23d,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96, -0x1b96,0x1b96,0x1b96,0x1b96,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x18a2,0x240, -0x240,0x240,0x240,0x240,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63, -0x1b63,0x1b63,0x1b63,0x1b63,0x18ae,0x18b1,0x18c0,0x18c0,0x18b1,0x18b4,0x18ae,0x18ab,0x243,0x243,0x243,0x243, -0x243,0x243,0x243,0x243,0x1899,0x1884,0x1884,0x1884,0x1884,0x1884,0x1884,0x1896,0x1896,0x1884,0x1884,0x1884, -0x1899,0x1899,0x1899,0x1899,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef, -0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x246,0x246,0x246,0x246,0x246,0x246,0x246,0x246, -0x246,0x246,0x246,0x246,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941,0x1941, -0x1941,0x1941,0x246,0x246,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1af1,0x1c35,0x1c35,0x1c35,0x1a4f,0x1a4f,0x1a4f,0x1bbd, -0x1bbd,0x279,0x279,0x279,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953, -0x1950,0x1950,0x1950,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1944,0x1950,0x194a,0x1947,0x194d, -0x249,0x249,0x249,0x249,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956, -0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x1956,0x24c, -0x24c,0x1956,0x1956,0x1956,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x24f,0x1965,0x1965,0x24f,0x1965,0x1965, +0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x12ab,0x14d,0x14d,0x14d,0x11dc,0x11d0,0x11d0,0x11d0, +0x11d0,0x11d0,0x11d0,0x11d3,0x11e2,0x11e2,0x11d0,0x11d0,0x11d0,0x11d0,0x150,0x12db,0x11d6,0x11d6,0x11d6,0x11d6, +0x11d6,0x11d6,0x11d6,0x11d6,0x11d6,0x11d6,0x150,0x150,0x150,0x150,0x11d0,0x11d0,0x1200,0x11f4,0x1200,0x153, +0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x153, +0x153,0x153,0x153,0x153,0x153,0x153,0x153,0x11fd,0x11fd,0x1203,0x11f7,0x11fa,0x1218,0x1218,0x1218,0x1212, +0x1212,0x1209,0x1212,0x1212,0x1209,0x1212,0x1212,0x121b,0x1215,0x120c,0x156,0x156,0x120f,0x120f,0x120f,0x120f, +0x120f,0x120f,0x120f,0x120f,0x120f,0x120f,0x156,0x156,0x156,0x156,0x156,0x156,0x1221,0x1221,0x1221,0x1221, +0x1221,0x1221,0x1221,0x159,0x159,0x159,0x159,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e, +0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e,0x121e, +0x121e,0x121e,0x121e,0x121e,0x159,0x159,0x159,0x159,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a, +0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x15c,0x1227, +0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1224,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239, +0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x15f,0x15f, +0x15f,0x1233,0x1236,0x1236,0x1236,0x1236,0x1236,0x1236,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f, +0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x123f,0x162,0x162, +0x123c,0x123c,0x123c,0x123c,0x123c,0x123c,0x123c,0x123c,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245, +0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x1245,0x165,0x165,0x165,0x165,0x165, +0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b, +0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b, +0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x124b,0x16b,0x1263,0x1263,0x1b4e,0x16e,0x16e,0x16e,0x16e,0x16e, +0x16e,0x16e,0x16e,0x16e,0x16e,0x1935,0x16e,0x16e,0x1485,0x1485,0x1485,0x1485,0x1485,0x1485,0x1485,0x1485, +0x1485,0x1485,0x1485,0x1485,0x1485,0x1485,0x1485,0x1485,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836, +0x1836,0x1836,0x1836,0x1836,0x1836,0x1a88,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171, +0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171, +0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x171,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a, +0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a,0x134a, +0x134a,0x134a,0x134a,0x134a,0x12b4,0x13b0,0x13b0,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174, +0x174,0x174,0x174,0x174,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1, +0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x13b0,0x1839, +0x174,0x174,0x174,0x174,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x12ae,0x174,0x174,0x174, +0x174,0x174,0x174,0x174,0x13d4,0x13d4,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174, +0x174,0x174,0x174,0x174,0x18d8,0x18d8,0x18d8,0x18d8,0x18d8,0x18d8,0x174,0x174,0x174,0x174,0x174,0x174, +0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174, +0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x174,0x1353,0x1353,0x1353,0x1353, +0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353,0x1353, +0x1353,0x1353,0x1353,0x1353,0x1353,0x134d,0x134d,0x134d,0x177,0x177,0x1350,0x177,0x1365,0x1365,0x1365,0x1365, +0x1365,0x1365,0x1356,0x135f,0x1359,0x1359,0x135f,0x135f,0x135f,0x1359,0x135f,0x1359,0x1359,0x1359,0x1362,0x1362, +0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x17a,0x135c,0x135c,0x135c,0x135c,0x17d,0x1368,0x1368,0x1368, +0x1368,0x1368,0x1368,0x17d,0x17d,0x1368,0x1368,0x1368,0x1368,0x1368,0x1368,0x17d,0x17d,0x1368,0x1368,0x1368, +0x1368,0x1368,0x1368,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d,0x17d,0x1368,0x1368,0x1368,0x1368, +0x1368,0x1368,0x1368,0x17d,0x1368,0x1368,0x1368,0x1368,0x1368,0x1368,0x1368,0x17d,0x15cf,0x15cf,0x15cf,0x15cf, +0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x136b,0x136b,0x136b,0x136b, +0x136b,0x136b,0x136e,0x1383,0x1383,0x1374,0x1374,0x1374,0x1374,0x1374,0x180,0x180,0x180,0x180,0x1371,0x1371, +0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1371,0x1377,0x1377, +0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1b54,0x1b57,0x1b57,0x1b51,0x1b51,0x1b57,0x180,0x180, +0x180,0x180,0x180,0x180,0x180,0x180,0x180,0x153c,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386, +0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386, +0x1386,0x183,0x183,0x183,0x183,0x183,0x183,0x183,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389, +0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x186,0x186,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389, +0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x153f,0x186,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389, +0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x13b9,0x186,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389, +0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x1389,0x153f,0x153f,0x153f,0x153f,0x153f,0x153f,0x153f,0x153f, +0x153f,0x153f,0x153f,0x153f,0x153f,0x153f,0x153f,0x153f,0x153f,0x153f,0x153f,0x153f,0x153f,0x153f,0x186,0x186, +0x186,0x186,0x186,0x186,0x186,0x186,0x186,0x186,0x13ce,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x154b,0x154b, +0x154b,0x154b,0x154b,0x154b,0x16bf,0x154b,0x154b,0x154b,0x1791,0x1842,0x1842,0x187b,0x187b,0x1a46,0x1af1,0x1af1, +0x189,0x189,0x189,0x189,0x1c3e,0x1bc0,0x1bc0,0x1bc0,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b,0x154b, +0x154b,0x154b,0x154b,0x16bc,0x16bc,0x189,0x189,0x189,0x154b,0x154b,0x154b,0x154b,0x1842,0x1842,0x1842,0x18de, +0x18de,0x19c2,0x1a46,0x1af1,0x1af1,0x189,0x189,0x189,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x1be4,0x1be4,0x1be4,0x18c, +0x18c,0x18c,0x18c,0x1be4,0x1be4,0x1be4,0x1be4,0x1be4,0x1428,0x1428,0x1428,0x1428,0x18f,0x1428,0x1428,0x1428, +0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428, +0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x18f,0x1428,0x1428,0x18f,0x1428,0x18f,0x18f,0x1428, +0x18f,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x18f,0x1428,0x1428,0x1428,0x1428, +0x18f,0x1428,0x18f,0x1428,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x1428,0x18f,0x18f,0x18f,0x18f,0x1428, +0x18f,0x1428,0x18f,0x1428,0x18f,0x1428,0x1428,0x1428,0x18f,0x1428,0x1428,0x18f,0x1428,0x18f,0x18f,0x1428, +0x18f,0x1428,0x18f,0x1428,0x18f,0x1428,0x18f,0x1428,0x18f,0x1428,0x1428,0x18f,0x1428,0x18f,0x18f,0x1428, +0x1428,0x1428,0x1428,0x18f,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x18f,0x1428,0x1428,0x1428,0x1428, +0x18f,0x1428,0x1428,0x1428,0x1428,0x18f,0x1428,0x18f,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428, +0x1428,0x1428,0x18f,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428, +0x1428,0x1428,0x1428,0x1428,0x18f,0x18f,0x18f,0x18f,0x18f,0x1428,0x1428,0x1428,0x18f,0x1428,0x1428,0x1428, +0x1428,0x1428,0x18f,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428,0x1428, +0x1428,0x1428,0x1428,0x1428,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f, +0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f, +0x18f,0x18f,0x18f,0x18f,0x1425,0x1425,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f,0x18f, +0x18f,0x18f,0x18f,0x18f,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x142b,0x142b,0x142b,0x142b,0x142b, +0x143a,0x142b,0x142e,0x142e,0x142b,0x142b,0x142b,0x1431,0x1431,0x192,0x1437,0x1437,0x1437,0x1437,0x1437,0x1437, +0x1437,0x1437,0x1437,0x1437,0x1434,0x1440,0x1440,0x1440,0x1941,0x193e,0x193e,0x1a8e,0x192,0x192,0x192,0x192, +0x192,0x192,0x192,0x192,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1, +0x15e1,0x15e1,0x15e1,0x15e1,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x144c,0x1449, +0x1443,0x1443,0x1449,0x1449,0x1452,0x1452,0x144c,0x144f,0x144f,0x1449,0x1446,0x195,0x195,0x195,0x195,0x195, +0x195,0x195,0x195,0x195,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, +0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x198,0x198,0x198,0x198, +0x1716,0x1716,0x1455,0x1455,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716, +0x1716,0x1716,0x1716,0x1716,0x198,0x198,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716, +0x1716,0x1716,0x1716,0x1716,0x1461,0x1461,0x1461,0x1461,0x1461,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19b, +0x19b,0x19b,0x19b,0x19e9,0x1461,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e, +0x145e,0x145e,0x145e,0x145e,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19ec,0x19b,0x19b,0x19b,0x19b, +0x19b,0x19b,0x19b,0x145b,0x145b,0x145b,0x145b,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464,0x1464, +0x1464,0x1464,0x1464,0x1464,0x1485,0x1485,0x1485,0x1485,0x1485,0x1485,0x1485,0x1485,0x1485,0x19e,0x19e,0x19e, +0x19e,0x19e,0x19e,0x19e,0x1482,0x1482,0x1482,0x1482,0x1482,0x1482,0x1482,0x1482,0x1482,0x1482,0x19e,0x19e, +0x19e,0x19e,0x19e,0x19e,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1488,0x1a1,0x1a1,0x1a1,0x1a1, +0x1a1,0x1a1,0x1a1,0x1a1,0x12e1,0x12de,0x12e1,0x12bd,0x12de,0x12e4,0x12e4,0x12e7,0x12e4,0x12e7,0x12ea,0x12de, +0x12e7,0x12e7,0x12de,0x12de,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x148b, +0x1494,0x148b,0x1494,0x1494,0x148b,0x148b,0x148b,0x148b,0x148b,0x148b,0x1497,0x148e,0x19f2,0x1b63,0x1a4,0x1a4, +0x1a4,0x1a4,0x1a4,0x1a4,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d, +0x155d,0x155d,0x1a7,0x1a7,0x155a,0x155a,0x155a,0x155a,0x155a,0x1560,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7,0x1a7, +0x1a7,0x1a7,0x1a7,0x1a7,0x1566,0x1566,0x1566,0x1566,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa,0x1aa, +0x1aa,0x1aa,0x1aa,0x1563,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x2af, +0x1bae,0x1bae,0x1bae,0x1bae,0x16cb,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2, +0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2,0x16c2, +0x1ad,0x1ad,0x1ad,0x1ad,0x1a97,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69,0x1b69, +0x1b66,0x1b66,0x1b66,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0, +0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0,0x1b0, +0x1b0,0x1b0,0x1b0,0x1b0,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1b3, +0x1b3,0x1b3,0x1b3,0x1b3,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578, +0x1578,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1b3,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578, +0x1578,0x1578,0x1b3,0x1b3,0x1575,0x156f,0x1572,0x157b,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e, +0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1b6,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566, +0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581, +0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1944,0x1944,0x1944, +0x1944,0x1be7,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1a49,0x1a49,0x1a49,0x1a49,0x1a49,0x1a49,0x1a49,0x1a49, +0x1a49,0x1a49,0x1a49,0x1a49,0x1b9,0x1b9,0x1b9,0x1b9,0x1bc3,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9, +0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x1b9,0x172b,0x16ce,0x158a,0x16d4,0x1bc,0x1596,0x1596,0x1596, +0x1596,0x1596,0x1596,0x1596,0x1596,0x1bc,0x1bc,0x1596,0x1596,0x1bc,0x1bc,0x1596,0x1596,0x1596,0x1596,0x1596, +0x1596,0x1596,0x1596,0x1596,0x1596,0x1596,0x1596,0x1596,0x1596,0x1bc,0x1596,0x1596,0x1596,0x1596,0x1596,0x1596, +0x1596,0x1bc,0x1596,0x1596,0x1bc,0x1596,0x1596,0x1596,0x1596,0x1596,0x1bc,0x19ce,0x16d1,0x1593,0x1584,0x158a, +0x1584,0x158a,0x158a,0x158a,0x158a,0x1bc,0x1bc,0x158a,0x158a,0x1bc,0x1bc,0x158d,0x158d,0x1590,0x1bc,0x1bc, +0x172e,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1584,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x159c,0x1599,0x1599, +0x1596,0x1596,0x158a,0x158a,0x1bc,0x1bc,0x1587,0x1587,0x1587,0x1587,0x1587,0x1587,0x1587,0x1bc,0x1bc,0x1bc, +0x1587,0x1587,0x1587,0x1587,0x1587,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc,0x1bc, +0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1, +0x15b1,0x15b1,0x1bf,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1, +0x15c3,0x15c3,0x15c3,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15ba,0x15bd,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2, +0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2,0x1c2, +0x1731,0x1731,0x1731,0x1731,0x15cf,0x15cc,0x19f5,0x19f5,0x1a9d,0x1aa0,0x1a9a,0x1a9a,0x1c5,0x1c5,0x1c5,0x1c5, +0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e, +0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5, +0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, +0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5, +0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, +0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, +0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8,0x1c8, +0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1, +0x15e1,0x15e1,0x15e1,0x15d8,0x15db,0x15de,0x15e1,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb,0x1cb, +0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15e4,0x15e4,0x1ce,0x1ce,0x1ce,0x1ce,0x15e7,0x15e7,0x15e7,0x15e7,0x15e7, +0x15ed,0x15ed,0x16d7,0x15ed,0x15ed,0x15ed,0x15ea,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce,0x1ce, +0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x1d1,0x1d1,0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x15f6,0x15f6, +0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x15f3,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1,0x1d1, +0x15fc,0x160e,0x160e,0x1602,0x160b,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4, +0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1605,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4,0x1d4, +0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614, +0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1614,0x1d7, +0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1611,0x1d7,0x1d7,0x1d7,0x1d7,0x1617,0x1617, +0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f, +0x1620,0x1620,0x1620,0x1620,0x1620,0x161a,0x1623,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620, +0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x161d,0x1620,0x1620,0x1620,0x1620,0x1620,0x1da, +0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629, +0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1dd, +0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635, +0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x1632,0x1632,0x1632,0x1632,0x1632,0x1e0,0x1e0,0x1e0,0x1e0,0x1e0, +0x164d,0x164d,0x1650,0x1650,0x1653,0x1644,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3, +0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x1e3,0x1644,0x1644,0x1644,0x1644,0x1644, +0x1644,0x1644,0x1e3,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d, +0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x1e3,0x1e3,0x1e3,0x1e3,0x1e3,0x164d,0x164d,0x164d, +0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c, +0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6,0x1e6, +0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665,0x1665, +0x1665,0x1665,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1e9,0x1662,0x1662,0x1662,0x1662,0x1e9,0x1e9,0x1e9, +0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1668, +0x167a,0x167a,0x1668,0x1668,0x1668,0x1668,0x1ef,0x1ef,0x167a,0x167a,0x167d,0x167d,0x1668,0x1668,0x167a,0x166e, +0x166b,0x1671,0x1683,0x1683,0x1674,0x1674,0x1677,0x1677,0x1677,0x1683,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a, +0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x173a,0x1737,0x1737,0x1737,0x1737,0x1734,0x1734,0x1ef,0x1ef, +0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef, +0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef,0x1ef, +0x1f2,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686,0x1686, +0x1686,0x1686,0x1686,0x1686,0x1686,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2,0x1f2, +0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1f5,0x1f5,0x1f5,0x1f5, +0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689, +0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689, +0x1689,0x1689,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689, +0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689, +0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1f5,0x1f5,0x1aa3,0x1aa3,0x1f5,0x1f5, +0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5, +0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5,0x1f5, +0x168c,0x169b,0x1692,0x168f,0x16a1,0x16a1,0x1695,0x16a1,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8, +0x1698,0x1698,0x1698,0x1698,0x1698,0x1698,0x1698,0x1698,0x1698,0x1698,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8,0x1f8, +0x16a7,0x16a7,0x16a7,0x16a7,0x16a7,0x16a7,0x16a7,0x16a7,0x16a7,0x16a7,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4,0x16a4, +0x16a4,0x16a4,0x16a4,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x1fb,0x16ad, +0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f, +0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x1947,0x1fe,0x1fe,0x173d,0x173d,0x173d, +0x1749,0x1749,0x173d,0x173d,0x173d,0x173d,0x174c,0x173d,0x173d,0x173d,0x173d,0x1740,0x1fe,0x1fe,0x1fe,0x1fe, +0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1743,0x1743,0x1752,0x1752,0x1752,0x1743, +0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201, +0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201, +0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x201,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, +0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x207,0x1767,0x1767,0x207,0x207, +0x207,0x207,0x207,0x1764,0x1764,0x1764,0x1764,0x1764,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x20a, +0x176a,0x20a,0x176a,0x176a,0x176a,0x176a,0x20a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a, +0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x20a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a, +0x176a,0x176d,0x20a,0x20a,0x20a,0x20a,0x20a,0x20a,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6, +0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776, +0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x20d,0x20d,0x20d,0x20d,0x20d, +0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x20d,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773, +0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x20d,0x20d,0x20d,0x20d,0x20d, +0x20d,0x20d,0x1770,0x1770,0x1770,0x1770,0x1770,0x1770,0x177c,0x177c,0x177c,0x177c,0x1779,0x177c,0x177c,0x177f, +0x1782,0x177f,0x177f,0x177c,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x210,0x210, +0x210,0x210,0x210,0x1779,0x1779,0x1779,0x1779,0x1779,0x17d9,0x17d9,0x17d9,0x17d9,0x17d0,0x17d0,0x17d0,0x17ca, +0x17cd,0x17cd,0x17cd,0x19f8,0x213,0x213,0x213,0x213,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6,0x17d6, +0x17d6,0x17d6,0x213,0x213,0x213,0x213,0x17d3,0x17d3,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4, +0x17f4,0x216,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4, +0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f4,0x17f1,0x17df,0x17df,0x17df,0x17df, +0x17df,0x17df,0x17df,0x216,0x17df,0x17df,0x17df,0x17df,0x17df,0x17df,0x17f1,0x17e2,0x17f4,0x17f7,0x17f7,0x17eb, +0x17e8,0x17e8,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x216,0x17ee,0x17ee,0x17ee,0x17ee, +0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17ee,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x17e5, +0x17e5,0x17e5,0x17e5,0x17e5,0x17e5,0x216,0x216,0x216,0x1803,0x1806,0x180c,0x180c,0x180c,0x180c,0x180c,0x180c, +0x180c,0x180c,0x180c,0x180c,0x180c,0x180c,0x180c,0x180c,0x17fa,0x17fa,0x17fa,0x17fa,0x17fa,0x17fa,0x17fa,0x17fa, +0x17fa,0x219,0x219,0x219,0x219,0x219,0x219,0x219,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965, +0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x21c, +0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd, +0x17fd,0x21c,0x21c,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x17fd,0x21c,0x17fd,0x17fd,0x21c,0x17fd,0x17fd, +0x17fd,0x17fd,0x17fd,0x21c,0x21c,0x21c,0x21c,0x21c,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e, +0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x184b,0x18e7,0x1a52,0x1a55,0x1afd,0x21f,0x21f,0x21f, +0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x1afa,0x1afa,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f, +0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x21f,0x180c,0x180c,0x180c,0x180c,0x180c,0x180c,0x180c,0x180c, +0x180c,0x180c,0x180c,0x180c,0x180c,0x180c,0x180c,0x180c,0x222,0x222,0x1800,0x1800,0x1800,0x1800,0x1800,0x1800, +0x1800,0x1800,0x1800,0x1800,0x1800,0x1800,0x1800,0x1800,0x222,0x1809,0x1800,0x1800,0x1800,0x1800,0x1800,0x1800, +0x1800,0x1809,0x1800,0x1800,0x1809,0x1800,0x1800,0x222,0x222,0x222,0x222,0x222,0x222,0x222,0x222,0x222, +0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x180f,0x225,0x225,0x225, +0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225,0x225, +0x1827,0x1827,0x1818,0x1812,0x1812,0x1827,0x1815,0x182a,0x182a,0x182a,0x182a,0x182d,0x182d,0x1821,0x181e,0x181b, +0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1824,0x1aa6,0x1821,0x228,0x181b,0x194a,0x19fb, +0x1aa9,0x1aa9,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228, +0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228,0x228, +0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833,0x1833, +0x1833,0x1833,0x1833,0x1833,0x22b,0x22b,0x22b,0x22b,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830, +0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830,0x1830, +0x1830,0x1830,0x1830,0x1830,0x22b,0x22b,0x22b,0x22b,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e, +0x184e,0x184e,0x184e,0x184e,0x184e,0x19cb,0x19cb,0x19cb,0x19cb,0x19cb,0x1a58,0x1a58,0x1a58,0x1a58,0x1a58,0x1a58, +0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x22e,0x1bcc,0x1bcc,0x1bcc,0x231,0x231,0x231,0x231,0x231, +0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x231,0x273,0x273,0x1c41,0x273,0x273,0x273,0x273,0x273, +0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x234, +0x188d,0x188d,0x234,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d, +0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x188d,0x1881,0x1881,0x1881,0x1881,0x1881,0x1881,0x234, +0x234,0x234,0x1881,0x234,0x1881,0x1881,0x234,0x1881,0x1881,0x1881,0x1884,0x1881,0x1887,0x1887,0x1890,0x1881, +0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x234,0x188a,0x188a,0x188a,0x188a,0x188a,0x188a,0x188a,0x188a, +0x188a,0x188a,0x234,0x234,0x234,0x234,0x234,0x234,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0, +0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0, +0x18f0,0x18f0,0x18f0,0x18f0,0x237,0x237,0x237,0x237,0x189f,0x18a2,0x18a2,0x23a,0x23a,0x23a,0x23a,0x23a, +0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x23a,0x1ba8,0x1ba8,0x1ba8,0x1ba8,0x1ba8,0x1ba8,0x1ba8,0x1ba8, +0x1ba8,0x1ba8,0x1ba8,0x1ba8,0x1ba8,0x1ba8,0x1ba8,0x1ba8,0x18b1,0x18b1,0x18b1,0x18b1,0x18b1,0x18b1,0x18b1,0x18b1, +0x18b1,0x18b1,0x18b1,0x23d,0x23d,0x23d,0x23d,0x23d,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75, +0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x18bd,0x18c0,0x18cf,0x18cf,0x18c0,0x18c3,0x18bd,0x18ba, +0x240,0x240,0x240,0x240,0x240,0x240,0x240,0x240,0x18a8,0x1893,0x1893,0x1893,0x1893,0x1893,0x1893,0x18a5, +0x18a5,0x1893,0x1893,0x1893,0x18a8,0x18a8,0x18a8,0x18a8,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01, +0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x243,0x243,0x243,0x243, +0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x243,0x1950,0x1950,0x1950,0x1950,0x1950,0x1950,0x1950,0x1950, +0x1950,0x1950,0x1950,0x1950,0x1950,0x1950,0x243,0x243,0x1a61,0x1a61,0x1a61,0x1a61,0x1b03,0x1c47,0x1c47,0x1c47, +0x1a61,0x1a61,0x1a61,0x1bcf,0x1bcf,0x276,0x276,0x276,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962, +0x1962,0x1962,0x1962,0x1962,0x195f,0x195f,0x195f,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953, +0x195f,0x1959,0x1956,0x195c,0x246,0x246,0x246,0x246,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965, 0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1965, -0x1965,0x1965,0x1965,0x1965,0x1965,0x1965,0x1962,0x1962,0x1962,0x1962,0x1962,0x24f,0x1959,0x1959,0x24f,0x1962, -0x1962,0x1959,0x1962,0x195c,0x1965,0x24f,0x24f,0x24f,0x24f,0x24f,0x24f,0x24f,0x196e,0x196e,0x1971,0x1971, -0x1968,0x1968,0x1968,0x1968,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x196b,0x196b,0x196b,0x196b, -0x196b,0x196b,0x196b,0x196b,0x196b,0x196b,0x252,0x252,0x252,0x252,0x252,0x252,0x1974,0x1974,0x1974,0x1974, -0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1977,0x1974,0x1974,0x1974,0x1977,0x1974,0x1974,0x1974, -0x1974,0x255,0x255,0x255,0x255,0x255,0x255,0x255,0x255,0x255,0x255,0x255,0x1980,0x1980,0x1980,0x1980, -0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x1980,0x197a, -0x197a,0x197d,0x197d,0x1983,0x1983,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x1986,0x1986,0x1986,0x1986, -0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986,0x1986, -0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x25b,0x1989,0x1989,0x1989,0x1989, -0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989,0x1989, -0x1989,0x1989,0x1989,0x198c,0x1995,0x1989,0x1989,0x25e,0x25e,0x25e,0x25e,0x25e,0x1998,0x1998,0x1998,0x1998, -0x1998,0x1998,0x1998,0x199b,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x19a4,0x19a4,0x19a4,0x19a4, -0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x199e,0x199e, -0x199e,0x199e,0x199e,0x199e,0x199e,0x199e,0x199e,0x199e,0x199e,0x19a1,0x19a1,0x19a1,0x19a1,0x19a7,0x19a7,0x19a7, -0x19a7,0x19a7,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264, -0x264,0x264,0x264,0x264,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84,0x1b84, -0x1b84,0x1b84,0x1b84,0x1b84,0x1be7,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bed,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea, -0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x1bea,0x267,0x267,0x267,0x267,0x267,0x267, -0x267,0x267,0x267,0x267,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb, -0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x19fb,0x26a,0x26a,0x26a,0x26a,0x26a, -0x26a,0x26a,0x26a,0x26a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x26d,0x26d,0x1a0a,0x1a0a, -0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a, -0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a0a,0x1a07,0x1a07,0x1a07,0x19fe,0x19fe,0x19fe,0x19fe,0x26d,0x26d,0x19fe,0x19fe, -0x1a07,0x1a07,0x1a07,0x1a07,0x1a01,0x1a0a,0x1a04,0x1a0a,0x1a07,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d, -0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d,0x26d, -0x26d,0x26d,0x26d,0x26d,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16, -0x1a16,0x270,0x270,0x270,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16, -0x1a19,0x1a19,0x270,0x270,0x273,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c, -0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c, -0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x273,0x273,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276, -0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x1a49,0x1a49,0x1a49,0x276,0x276,0x1c32,0x276,0x276, -0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x1a4c,0x1a4c,0x1a4c,0x1a4c,0x276,0x276,0x276,0x276, -0x276,0x276,0x276,0x276,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, -0x18e1,0x18e1,0x18e1,0x18e1,0x1a4f,0x1a4f,0x1a4f,0x1af1,0x1af1,0x1af1,0x1af1,0x1c35,0x1c35,0x279,0x279,0x279, -0x279,0x279,0x279,0x279,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1a4f,0x1af1,0x1af1,0x1af1,0x1af1,0x1af1,0x1af1, -0x1af1,0x1af1,0x1af1,0x1af1,0x1af1,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1c35,0x1c35,0x1c35,0x1af1,0x1af1,0x1af1,0x1af1, -0x1af1,0x1af1,0x1af1,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1c35,0x1c35,0x1c35,0x279,0x1c35,0x1af1,0x1af1,0x1af1,0x1bc0, -0x1bc0,0x1bc0,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x1c35,0x1c35,0x1af1,0x1af1,0x1af1,0x1af1, -0x1af1,0x1af1,0x1af1,0x1bbd,0x1bbd,0x1bbd,0x1c35,0x1c35,0x279,0x279,0x279,0x279,0x1bbd,0x1bbd,0x1bbd,0x1bbd, -0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1c35,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x1bc0,0x1bc0,0x1bc0,0x1bc0, -0x1bc0,0x1bc0,0x1bc0,0x1c38,0x1c38,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x1a25,0x1a1f,0x1a1f,0x1a1f, -0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x27c,0x27c, -0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x27c,0x1a22,0x1a31,0x1a31,0x1a31,0x1a31, -0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a28,0x1a28,0x1a28,0x1a28,0x1a2e,0x1a2e,0x1a2e,0x1a2e, -0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x27f,0x27f,0x27f,0x27f,0x27f,0x1a2b,0x1a9d,0x1a9d,0x1a9d,0x1a9d, -0x1a9d,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x1a9a,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282, -0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x1ab8,0x1ab8,0x1ab8,0x1ab8, -0x1ab8,0x1ab8,0x1ab8,0x285,0x285,0x1ab8,0x285,0x285,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8, -0x285,0x1ab8,0x1ab8,0x285,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1ab8, -0x1ab8,0x1ab8,0x1ab8,0x1ab8,0x1aa0,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x285,0x1aaf,0x1ab2,0x285,0x285,0x1aa0, -0x1aa0,0x1ab5,0x1aa6,0x1abb,0x1aaf,0x1abb,0x1aaf,0x1aa3,0x1abe,0x1aa9,0x1abe,0x285,0x285,0x285,0x285,0x285, -0x285,0x285,0x285,0x285,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x285,0x285, -0x285,0x285,0x285,0x285,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7, -0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x288,0x288,0x288,0x288,0x288,0x288, -0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288, -0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x288,0x1ac4,0x1ac4,0x1ac4,0x1ac4, -0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x28e, -0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x28e, +0x1965,0x1965,0x1965,0x249,0x249,0x1965,0x1965,0x1965,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x24c,0x1974, +0x1974,0x24c,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974, +0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1971,0x1971,0x1971,0x1971,0x1971,0x24c, +0x1968,0x1968,0x24c,0x1971,0x1971,0x1968,0x1971,0x196b,0x1974,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c,0x24c, +0x197d,0x197d,0x1980,0x1980,0x1977,0x1977,0x1977,0x1977,0x24f,0x24f,0x24f,0x24f,0x24f,0x24f,0x24f,0x24f, +0x197a,0x197a,0x197a,0x197a,0x197a,0x197a,0x197a,0x197a,0x197a,0x197a,0x24f,0x24f,0x24f,0x24f,0x24f,0x24f, +0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1986,0x1983,0x1983,0x1983, +0x1986,0x1983,0x1983,0x1983,0x1983,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x252,0x252, +0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992, +0x1992,0x1992,0x198f,0x1989,0x1989,0x198c,0x198c,0x1995,0x1995,0x255,0x255,0x255,0x255,0x255,0x255,0x255, +0x1998,0x1998,0x1998,0x1998,0x1998,0x1998,0x1998,0x1998,0x1998,0x1998,0x1998,0x1998,0x1998,0x1998,0x1998,0x1998, +0x1998,0x1998,0x1998,0x1998,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x258,0x258, +0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b, +0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199e,0x19a7,0x199b,0x199b,0x25b,0x25b,0x25b,0x25b,0x25b, +0x19aa,0x19aa,0x19aa,0x19aa,0x19aa,0x19aa,0x19aa,0x19ad,0x25e,0x25e,0x25e,0x25e,0x25e,0x25e,0x25e,0x25e, +0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6,0x19b6, +0x19b6,0x19b6,0x19b0,0x19b0,0x19b0,0x19b0,0x19b0,0x19b0,0x19b0,0x19b0,0x19b0,0x19b0,0x19b0,0x19b3,0x19b3,0x19b3, +0x19b3,0x19b9,0x19b9,0x19b9,0x19b9,0x19b9,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261, +0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x261,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96, +0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1b96,0x1bf9,0x1bff,0x1bff,0x1bff,0x1bff,0x1bff,0x1bff,0x1bfc, +0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x264,0x264, +0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x264,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d, +0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x1a0d,0x267, +0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x267,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c, +0x26a,0x26a,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c, +0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a1c,0x1a19,0x1a19,0x1a19,0x1a10,0x1a10,0x1a10,0x1a10, +0x26a,0x26a,0x1a10,0x1a10,0x1a19,0x1a19,0x1a19,0x1a19,0x1a13,0x1a1c,0x1a16,0x1a1c,0x1a19,0x26a,0x26a,0x26a, +0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a, +0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x26a,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28, +0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x26d,0x26d,0x26d,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a28, +0x1a28,0x1a28,0x1a28,0x1a28,0x1a2b,0x1a2b,0x26d,0x26d,0x270,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e, +0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e, +0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x1a2e,0x270,0x270,0x273,0x273,0x273,0x273, +0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x1a5b,0x1a5b,0x1a5b,0x273, +0x273,0x1c44,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x1a5e,0x1a5e,0x1a5e,0x1a5e, +0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x273,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0, +0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x1a61,0x1a61,0x1a61,0x1b03,0x1b03,0x1b03,0x1b03,0x1c47, +0x1c47,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x1a61,0x1a61,0x1a61,0x1a61,0x1a61,0x1a61,0x1b03,0x1b03, +0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1c47,0x1c47,0x1c47, +0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1c47,0x1c47,0x1c47,0x276,0x1c47, +0x1b03,0x1b03,0x1b03,0x1bd2,0x1bd2,0x1bd2,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x276,0x1c47,0x1c47, +0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1b03,0x1bcf,0x1bcf,0x1bcf,0x1c47,0x1c47,0x276,0x276,0x276,0x276, +0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1bcf,0x1c47,0x276,0x276,0x276,0x276,0x276,0x276,0x276, +0x1bd2,0x1bd2,0x1bd2,0x1bd2,0x1bd2,0x1bd2,0x1bd2,0x1c4a,0x1c4a,0x276,0x276,0x276,0x276,0x276,0x276,0x276, +0x1a37,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31, +0x1a31,0x1a31,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x279,0x1a34, +0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a3a,0x1a3a,0x1a3a,0x1a3a, +0x1a40,0x1a40,0x1a40,0x1a40,0x1a40,0x1a40,0x1a40,0x1a40,0x1a40,0x1a40,0x27c,0x27c,0x27c,0x27c,0x27c,0x1a3d, +0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x1aac,0x27f,0x27f,0x27f,0x27f, +0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f,0x27f, +0x1aca,0x1aca,0x1aca,0x1aca,0x1aca,0x1aca,0x1aca,0x282,0x282,0x1aca,0x282,0x282,0x1aca,0x1aca,0x1aca,0x1aca, +0x1aca,0x1aca,0x1aca,0x1aca,0x282,0x1aca,0x1aca,0x282,0x1aca,0x1aca,0x1aca,0x1aca,0x1aca,0x1aca,0x1aca,0x1aca, +0x1aca,0x1aca,0x1aca,0x1aca,0x1aca,0x1aca,0x1aca,0x1aca,0x1ab2,0x1ac1,0x1ac1,0x1ac1,0x1ac1,0x1ac1,0x282,0x1ac1, +0x1ac4,0x282,0x282,0x1ab2,0x1ab2,0x1ac7,0x1ab8,0x1acd,0x1ac1,0x1acd,0x1ac1,0x1ab5,0x1ad0,0x1abb,0x1ad0,0x282, +0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x282,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe,0x1abe, +0x1abe,0x1abe,0x282,0x282,0x282,0x282,0x282,0x282,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09, +0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x285,0x285, +0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285, +0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285,0x285, +0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6, +0x1ad6,0x1ad6,0x1ad6,0x28b,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6, +0x1ad6,0x1ad6,0x1ad6,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b, +0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9, +0x1ad9,0x1ad9,0x28b,0x28b,0x28b,0x28b,0x28b,0x28b,0x1b0c,0x1b0c,0x1b0c,0x1b0c,0x1b0c,0x1b0c,0x1b0c,0x1b0c, +0x1b0c,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e, 0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e,0x28e, -0x28e,0x28e,0x28e,0x28e,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x1ac7,0x28e,0x28e, -0x28e,0x28e,0x28e,0x28e,0x1afa,0x1afa,0x1afa,0x1afa,0x1afa,0x1afa,0x1afa,0x1afa,0x1afa,0x291,0x291,0x291, -0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291, -0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291, -0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x294,0x1aca,0x1aca,0x1acd,0x294,0x294, -0x1ad0,0x1ad0,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294,0x294, -0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b60,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x1b63,0x297, -0x1b66,0x1b66,0x297,0x297,0x297,0x297,0x297,0x297,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d,0x1b5d, -0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c, -0x1b6c,0x1b69,0x1b69,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a,0x29a, -0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x29d,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x29d,0x1b6f,0x1b6f,0x29d, -0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x29d, -0x1b72,0x1b78,0x1b78,0x1b75,0x1b75,0x1b75,0x2a3,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75, -0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75, -0x1b75,0x2a3,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3, -0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7e,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b, -0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x1b7b,0x2a6, -0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x1bf0,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6, -0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6, -0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x1b84,0x1b84,0x1b81,0x1b81, -0x1b81,0x1b81,0x1b87,0x1b87,0x1b87,0x1b87,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9, -0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x1a9d,0x1a9d,0x1a9d,0x1a9d, -0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1a9d,0x1b8d,0x1b8d,0x1b8d,0x1b8d, +0x28e,0x28e,0x28e,0x28e,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x291,0x1adc, +0x1adc,0x1adf,0x291,0x291,0x1ae2,0x1ae2,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291,0x291, +0x291,0x291,0x291,0x291,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b75,0x1b72,0x1b75,0x1b75,0x1b75, +0x1b75,0x1b75,0x1b75,0x294,0x1b78,0x1b78,0x294,0x294,0x294,0x294,0x294,0x294,0x1b6f,0x1b6f,0x1b6f,0x1b6f, +0x1b6f,0x1b6f,0x1b6f,0x1b6f,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e, +0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7b,0x1b7b,0x297,0x297,0x297,0x297,0x297,0x297,0x297,0x297,0x297, +0x297,0x297,0x297,0x297,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x29a,0x1b81,0x1b81,0x1b81,0x1b81, +0x29a,0x1b81,0x1b81,0x29a,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81,0x1b81, +0x1b81,0x1b81,0x1b81,0x29a,0x1b84,0x1b8a,0x1b8a,0x1b87,0x1b87,0x1b87,0x2a0,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87, +0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87, +0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x2a0,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x1b87,0x2a0, +0x2a0,0x2a0,0x2a0,0x2a0,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b90,0x1b8d, 0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d, -0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x2ac,0x1b8a,0x1b8a,0x1b8a,0x1b8a, -0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x1b8a,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x1554,0x1554,0x1554,0x1554, -0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1554,0x1b93,0x1b93,0x1b93,0x1b93, -0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b93,0x1b90,0x2af,0x2af,0x2af,0x2af,0x2af, -0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x2af,0x1b9c,0x1b9c,0x1b9c,0x1b9c, -0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x2b2,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x2b2, -0x1b9c,0x1b9c,0x2b2,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x2b2,0x1b99, -0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x2b2,0x1b99, -0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x1b99,0x2b2,0x1b99,0x1b99,0x2b2,0x2b2,0x2b2,0x1ba2,0x1ba2,0x1ba2,0x1ba2, -0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x2b5,0x2b5,0x1ba2,0x1ba2,0x1ba2,0x1ba2, -0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x2b5, -0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f, -0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8, +0x1b8d,0x1b8d,0x1b8d,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x2a3, +0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3, +0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3,0x2a3, +0x1b96,0x1b96,0x1b93,0x1b93,0x1b93,0x1b93,0x1b99,0x1b99,0x1b99,0x1b99,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6, +0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6,0x2a6, +0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf,0x1aaf, +0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f, +0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x2a9, +0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x1b9c,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9,0x2a9, +0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d, +0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba5,0x1ba2,0x2ac, +0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac,0x2ac, +0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x1bae,0x2af,0x1bae,0x1bae,0x1bae,0x1bae, +0x1bae,0x1bae,0x1bae,0x2af,0x1bae,0x1bae,0x2af,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab, +0x1bab,0x1bab,0x2af,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab, +0x1bab,0x1bab,0x2af,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x1bab,0x2af,0x1bab,0x1bab,0x2af,0x2af,0x2af, +0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x2b2,0x2b2, +0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4, +0x1bb4,0x1bb4,0x1bb4,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x2b2,0x1bb1,0x1bb1,0x1bb1,0x1bb1, +0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x2b5,0x2b5,0x2b5,0x2b5, +0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5, +0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x2b5,0x1c05,0x1c05,0x1c05, +0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0e,0x1c0e,0x1c0e,0x2b8,0x2b8, 0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8, -0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x2b8,0x1bf3,0x1bf3,0x1bf3,0x1bf9,0x1bf9,0x1bf9,0x1bf9, -0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bfc,0x1bfc,0x1bfc,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb, -0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x1bff,0x1bff,0x1bff,0x1bff, -0x1bff,0x1bff,0x1bff,0x1bff,0x1bff,0x1bff,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be, -0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be, -0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02, -0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x1c02,0x2c1,0x2c1,0x2c1,0x2c1, -0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x1c05,0x1c05,0x1c1a,0x1c11,0x1c17,0x1c17,0x1c17,0x1c17, -0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x2c4,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17, -0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17, -0x1c11,0x1c11,0x1c05,0x1c05,0x1c05,0x1c05,0x1c05,0x2c4,0x2c4,0x2c4,0x1c11,0x1c11,0x1c05,0x1c14,0x1c08,0x1c1d, -0x1c1d,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0e,0x1c0e,0x1c0e,0x1c0e, -0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x1c26,0x1c26,0x1c26,0x1c26, -0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c26,0x1c20,0x1c20,0x1c20,0x1c20,0x1c23,0x1c23,0x1c23,0x1c23, -0x1c23,0x1c23,0x1c23,0x1c23,0x1c23,0x1c23,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2ca,0x2ca,0x2ca,0x2ca, +0x1c11,0x1c11,0x1c11,0x1c11,0x1c11,0x1c11,0x1c11,0x1c11,0x1c11,0x1c11,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb, +0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb, +0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x2bb,0x1c14,0x1c14,0x1c14,0x1c14, +0x1c14,0x1c14,0x1c14,0x1c14,0x1c14,0x1c14,0x1c14,0x1c14,0x1c14,0x1c14,0x1c14,0x1c14,0x1c14,0x1c14,0x1c14,0x1c14, +0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x2be,0x1c17,0x1c17,0x1c2c,0x1c23, +0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x2c1,0x1c29,0x1c29, +0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29,0x1c29, +0x1c29,0x1c29,0x1c29,0x1c29,0x1c23,0x1c23,0x1c17,0x1c17,0x1c17,0x1c17,0x1c17,0x2c1,0x2c1,0x2c1,0x1c23,0x1c23, +0x1c17,0x1c26,0x1c1a,0x1c2f,0x1c2f,0x1c1d,0x1c1d,0x1c1d,0x1c1d,0x1c1d,0x1c1d,0x1c1d,0x1c1d,0x1c1d,0x1c1d,0x1c1d, +0x1c20,0x1c20,0x1c20,0x1c20,0x1c20,0x1c20,0x1c20,0x1c20,0x1c20,0x1c20,0x2c1,0x2c1,0x2c1,0x2c1,0x2c1,0x2c1, +0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c38,0x1c32,0x1c32,0x1c32,0x1c32, +0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x1c35,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4,0x2c4, +0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7, +0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7, +0x2c7,0x2c7,0x95d,0x95d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d, +0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7,0x2c7, +0x2c7,0x2c7,0x2c7,0x2c7,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0x12a5, +0x12a5,0x12a5,0x2ca,0x2ca,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97, +0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0x2ca,0x2ca, 0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca, -0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x18db,0x2dc,0x2dc,0x2dc, -0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc,0x2ca,0x2ca,0x2ca,0x2ca, 0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca, -0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x95d,0x95d,0x1c3b,0x1c3b,0x1c3b,0x1c3b, -0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x2ca,0x2ca,0x2ca,0x2ca, -0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0x2ca,0xc6c,0xc6c,0xc6c,0xc6c, -0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0x129f,0x129f,0x129f,0x2cd,0x2cd,0xe94,0xe94,0xe94,0xe94, -0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94, -0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd, -0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd, -0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0x2cd,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88, -0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88, -0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0x2d0,0x2d0,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1, -0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x1bab,0x1bab,0x1bab, -0x1bab,0x1c29,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x2d3,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8, -0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8, -0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x2d6,0x2d6,0x1785,0x1785,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9, -0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db, -0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4, -0x1af4,0x1af4,0x1af4,0x2df,0x2df,0x2df,0x2df,0x2df,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b, -0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x3e7,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db, -0x3db,0x3e7,0x3e7,0x3e7,0x3e7,0x3e1,0x111f,0x12f6,0x3ea,0x927,0x92a,0x3d8,0x3d8,0x111c,0x12f3,0x12f3, -0x3ed,0x3ed,0x3ed,0x3ed,0x3ed,0x3ed,0x3ed,0x3ed,0x111c,0x3db,0x3db,0x3e7,0xcae,0x3ea,0x3ea,0x3ea, +0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b, +0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0x2cd,0x2cd, +0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7, +0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x1bbd,0x1bbd,0x1bbd,0x1bbd,0x1c3b,0x2d0,0x2d0,0x2d0,0x2d0,0x2d0,0x2d0, +0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1, +0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x2d3,0x2d3, +0x1794,0x1794,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6,0x2d6, +0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea, +0x18ea,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9,0x2d9, +0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59, +0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x2dc,0x2dc,0x2dc,0x2dc,0x2dc, +0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d, +0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59, +0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x2df,0x2df, +0x3e7,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3db,0x3e7,0x3e7,0x3e7,0x3e7,0x3e1,0x1125,0x12fc, +0x3ea,0x927,0x92a,0x3d8,0x3d8,0x1122,0x12f9,0x12f9,0x3ed,0x3ed,0x3ed,0x3ed,0x3ed,0x3ed,0x3ed,0x3ed, +0x1122,0x3db,0x3db,0x3e7,0xcb1,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea, 0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea, -0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3db,0x3db,0x8af,0x8b2,0x945,0x945, -0x945,0x945,0x945,0x945,0x945,0x945,0x945,0x945,0x3e4,0xf7e,0xf7b,0x12f9,0x12f9,0x12f9,0x12f9,0x12f9, -0x14b8,0x1122,0x1122,0xed0,0xed0,0xda1,0xed0,0xed0,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea, -0x3ea,0x3ed,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ed,0x3ea,0x3ea,0x3ed,0x3ea,0x3ea,0x3ea, -0x3ea,0x3ea,0x12f3,0x12f6,0x3de,0x3ea,0x3e7,0x3e7,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489, -0x489,0x12ff,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489, -0x489,0x489,0x12ff,0x1857,0x1857,0xf9c,0x47a,0x483,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5, -0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0xba3, -0xba3,0xdb0,0xdb0,0x8b5,0xdad,0x13da,0x13da,0x13da,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8, +0x3ea,0x3ea,0x3db,0x3db,0x8af,0x8b2,0x945,0x945,0x945,0x945,0x945,0x945,0x945,0x945,0x945,0x945, +0x3e4,0xf81,0xf7e,0x12ff,0x12ff,0x12ff,0x12ff,0x12ff,0x14c1,0x1128,0x1128,0xed3,0xed3,0xda4,0xed3,0xed3, +0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ed,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea, +0x3ea,0x3ed,0x3ea,0x3ea,0x3ed,0x3ea,0x3ea,0x3ea,0x3ea,0x3ea,0x12f9,0x12fc,0x3de,0x3ea,0x3e7,0x3e7, +0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x1305,0x489,0x489,0x489,0x489,0x489,0x489, +0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x489,0x1305,0x1866,0x1866,0xf9f,0x47a,0x483, +0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5, +0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0x4c5,0xba6,0xba6,0xdb3,0xdb3,0x8b5,0xdb0,0x13e3,0x13e3,0x13e3, 0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8, -0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4ce,0x4ce,0x4ce,0x1137,0x1137,0x1137,0x1137,0x1137, -0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb, +0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8,0x4c8, +0x4ce,0x4ce,0x4ce,0x113d,0x113d,0x113d,0x113d,0x113d,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb, 0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb, -0x4cb,0x4cb,0x1134,0x1134,0x1134,0x1134,0x1134,0x1134,0x4d1,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce, +0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x4cb,0x113a,0x113a,0x113a,0x113a,0x113a,0x113a, +0x4d1,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce, 0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce, -0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4ce,0x4da,0x4d4,0x4da,0x4d4, +0x4ce,0x4ce,0x4ce,0x4ce,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4, 0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4, -0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4d4,0x4d4, -0x4d4,0x4d4,0x4d7,0x9a2,0xfc9,0xfc9,0xfcc,0xfc9,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4, +0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4d4,0x4d4,0x4d4,0x4d4,0x4d7,0x9a2,0xfcc,0xfcc,0xfcf,0xfcc, 0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4, -0x4da,0x4d4,0xfcc,0xfc9,0xfcc,0xfc9,0xfcc,0xfc9,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6, -0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x6a5,0x6a5,0x6a8,0x504,0x6b4,0x6b1,0x6b1,0x6ae, -0x52e,0x52e,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0xb34,0x6b7,0x510,0x6cf,0x6d2,0x525,0x6b7,0x513,0x513, -0x504,0x51f,0x51f,0x6a5,0x52b,0x528,0x6ab,0x4fe,0x4f5,0x4f5,0x4f8,0x4f8,0x4f8,0x4f8,0x4f8,0x4fb, -0x4f8,0x4f8,0x4f8,0x4ef,0x537,0x534,0x531,0x531,0x6c3,0x519,0x516,0x6c0,0x6bd,0x6ba,0x6cc,0x507, -0x6c9,0x6c9,0x51c,0x51f,0x6c6,0x6c6,0x51c,0x51f,0x501,0x504,0x504,0x504,0x522,0x50d,0x50a,0xbb8, -0xad7,0xad7,0xad4,0xad4,0xad4,0xad4,0xbaf,0xbaf,0xbaf,0xbaf,0xbb5,0xcdb,0xcd8,0xdbc,0xdbf,0xbb2, -0xdbf,0xdbf,0xdbf,0xdbf,0xdbc,0xdbf,0xdbf,0xbac,0x55b,0x55b,0x55b,0x55b,0x55b,0x55b,0x55b,0x558, -0x55e,0x73e,0x55b,0x9a5,0x9c6,0xada,0xada,0xada,0xbbe,0xbbe,0xdc5,0xdc5,0xdc5,0xdc5,0x1140,0x1143, -0x1143,0x1314,0x14a6,0x14d0,0x14d3,0x14d3,0x16da,0x185a,0x56a,0x56a,0x582,0x6e4,0x567,0x6de,0x56a,0x57f, -0x567,0x6e4,0x579,0x582,0x582,0x582,0x579,0x579,0x582,0x582,0x582,0x6ea,0x567,0x582,0x6e7,0x567, -0x576,0x582,0x582,0x582,0x582,0x582,0x567,0x567,0x56d,0x6de,0x6e1,0x567,0x582,0x567,0x6ed,0x567, -0x582,0x570,0x588,0x6f0,0x582,0x582,0x573,0x579,0x582,0x582,0x585,0x582,0x579,0x57c,0x57c,0x57c, -0x57c,0xae3,0xae0,0xcde,0xdce,0xbd3,0xbd6,0xbd6,0xbd0,0xbcd,0xbcd,0xbcd,0xbcd,0xbd6,0xbd3,0xbd3, -0xbd3,0xbd3,0xbca,0xbcd,0xdcb,0xedc,0xedf,0xfd2,0x1146,0x1146,0x1146,0x6f6,0x6f3,0x58b,0x58e,0x58e, -0x58e,0x58e,0x58e,0x6f3,0x6f6,0x6f6,0x6f3,0x58e,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc, -0x6fc,0x6fc,0x6fc,0x6fc,0x597,0x597,0x597,0x597,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9, -0x6f9,0x6f9,0x591,0x591,0x591,0x591,0x591,0x591,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d, -0x59a,0x59d,0x59d,0x59d,0x59d,0x59d,0x5a0,0x59a,0x59d,0x59d,0x59a,0x59a,0x59a,0x59a,0x59d,0x59d, -0x6ff,0x6ff,0x59a,0x59a,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d, -0x59d,0x5a0,0x5a0,0x5a0,0x59d,0x59d,0x702,0x59d,0x702,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d, -0x59a,0x59d,0x59a,0x59a,0x59a,0x59a,0x59a,0x59a,0x59d,0x59d,0x59a,0x6ff,0x59a,0x59a,0x59a,0xae9, -0xae9,0xae9,0xae9,0xae9,0xae9,0xae9,0xae9,0xae9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9,0xbd9, -0xbd9,0xbd9,0xbd9,0xbd9,0x705,0x5a3,0x705,0x705,0x5a6,0x5a3,0x5a3,0x705,0x705,0x5a6,0x5a3,0x705, -0x5a6,0x5a3,0x5a3,0x705,0x5a3,0x705,0x5b2,0x5af,0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3, -0x5a3,0x705,0x705,0x705,0x705,0x5a3,0x5a3,0x705,0x5a6,0x705,0x5a6,0x705,0x705,0x705,0x705,0x705, -0x70b,0x5a9,0x705,0x5a9,0x5a9,0x5a3,0x5a3,0x5a3,0x705,0x705,0x705,0x705,0x5a3,0x5a3,0x5a3,0x5a3, -0x705,0x705,0x5a3,0x5a3,0x5a3,0x5a6,0x5a3,0x5a3,0x5a6,0x5a3,0x5a3,0x5a6,0x705,0x5a6,0x5a3,0x5a3, -0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, -0x5a3,0x5a3,0x5a3,0x5a3,0x708,0x705,0x5a6,0x5a3,0x705,0x705,0x705,0x705,0x5a3,0x5a3,0x705,0x705, -0x5a3,0x5a6,0x708,0x708,0x5a6,0x5a6,0x5a3,0x5a3,0x5a6,0x5a6,0x5a3,0x5a3,0x5a6,0x5a6,0x5a3,0x5a3, -0x5a3,0x5a3,0x5a3,0x5a3,0x5a6,0x5a6,0x705,0x705,0x5a6,0x5a6,0x705,0x705,0x5a6,0x5a6,0x5a3,0x5a3, -0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3, -0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a6,0x5a6,0x5a6,0x5a6, -0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x705, +0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0x4da,0x4d4,0xfcf,0xfcc,0xfcf,0xfcc,0xfcf,0xfcc, +0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9, +0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e6,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9,0x4e9, +0x6a5,0x6a5,0x6a8,0x504,0x6b4,0x6b1,0x6b1,0x6ae,0x52e,0x52e,0x4ec,0x4ec,0x4ec,0x4ec,0x4ec,0xb37, +0x6b7,0x510,0x6cf,0x6d2,0x525,0x6b7,0x513,0x513,0x504,0x51f,0x51f,0x6a5,0x52b,0x528,0x6ab,0x4fe, +0x4f5,0x4f5,0x4f8,0x4f8,0x4f8,0x4f8,0x4f8,0x4fb,0x4f8,0x4f8,0x4f8,0x4ef,0x537,0x534,0x531,0x531, +0x6c3,0x519,0x516,0x6c0,0x6bd,0x6ba,0x6cc,0x507,0x6c9,0x6c9,0x51c,0x51f,0x6c6,0x6c6,0x51c,0x51f, +0x501,0x504,0x504,0x504,0x522,0x50d,0x50a,0xbbb,0xada,0xada,0xad7,0xad7,0xad7,0xad7,0xbb2,0xbb2, +0xbb2,0xbb2,0xbb8,0xcde,0xcdb,0xdbf,0xdc2,0xbb5,0xdc2,0xdc2,0xdc2,0xdc2,0xdbf,0xdc2,0xdc2,0xbaf, +0x55b,0x55b,0x55b,0x55b,0x55b,0x55b,0x55b,0x558,0x55e,0x73e,0x55b,0x9a5,0x9c6,0xadd,0xadd,0xadd, +0xbc1,0xbc1,0xdc8,0xdc8,0xdc8,0xdc8,0x1146,0x1149,0x1149,0x131a,0x14af,0x14d9,0x14dc,0x14dc,0x16e9,0x1869, +0x56a,0x56a,0x582,0x6e4,0x567,0x6de,0x56a,0x57f,0x567,0x6e4,0x579,0x582,0x582,0x582,0x579,0x579, +0x582,0x582,0x582,0x6ea,0x567,0x582,0x6e7,0x567,0x576,0x582,0x582,0x582,0x582,0x582,0x567,0x567, +0x56d,0x6de,0x6e1,0x567,0x582,0x567,0x6ed,0x567,0x582,0x570,0x588,0x6f0,0x582,0x582,0x573,0x579, +0x582,0x582,0x585,0x582,0x579,0x57c,0x57c,0x57c,0x57c,0xae6,0xae3,0xce1,0xdd1,0xbd6,0xbd9,0xbd9, +0xbd3,0xbd0,0xbd0,0xbd0,0xbd0,0xbd9,0xbd6,0xbd6,0xbd6,0xbd6,0xbcd,0xbd0,0xdce,0xedf,0xee2,0xfd5, +0x114c,0x114c,0x114c,0x6f6,0x6f3,0x58b,0x58e,0x58e,0x58e,0x58e,0x58e,0x6f3,0x6f6,0x6f6,0x6f3,0x58e, +0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x6fc,0x597,0x597,0x597,0x597, +0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x6f9,0x591,0x591,0x591,0x591,0x591,0x591, +0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59a,0x59d,0x59d,0x59d,0x59d,0x59d,0x5a0,0x59a, +0x59d,0x59d,0x59a,0x59a,0x59a,0x59a,0x59d,0x59d,0x6ff,0x6ff,0x59a,0x59a,0x59d,0x59d,0x59d,0x59d, +0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x5a0,0x5a0,0x5a0,0x59d,0x59d,0x702,0x59d, +0x702,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59d,0x59a,0x59d,0x59a,0x59a,0x59a,0x59a,0x59a,0x59a, +0x59d,0x59d,0x59a,0x6ff,0x59a,0x59a,0x59a,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec, +0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0x705,0x5a3,0x705,0x705, +0x5a6,0x5a3,0x5a3,0x705,0x705,0x5a6,0x5a3,0x705,0x5a6,0x5a3,0x5a3,0x705,0x5a3,0x705,0x5b2,0x5af, +0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3,0x705,0x705,0x705,0x705,0x5a3,0x5a3,0x705, +0x5a6,0x705,0x5a6,0x705,0x705,0x705,0x705,0x705,0x70b,0x5a9,0x705,0x5a9,0x5a9,0x5a3,0x5a3,0x5a3, +0x705,0x705,0x705,0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x705,0x5a3,0x5a3,0x5a3,0x5a6,0x5a3,0x5a3, +0x5a6,0x5a3,0x5a3,0x5a6,0x705,0x5a6,0x5a3,0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3, +0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x708,0x705,0x5a6,0x5a3, +0x705,0x705,0x705,0x705,0x5a3,0x5a3,0x705,0x705,0x5a3,0x5a6,0x708,0x708,0x5a6,0x5a6,0x5a3,0x5a3, +0x5a6,0x5a6,0x5a3,0x5a3,0x5a6,0x5a6,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a6,0x5a6,0x705,0x705, +0x5a6,0x5a6,0x705,0x705,0x5a6,0x5a6,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, +0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3, +0x5a3,0x5a3,0x5a3,0x5a3,0x5a6,0x5a6,0x5a6,0x5a6,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, +0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x705,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, 0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, -0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3, -0x5a6,0x5a6,0x5a6,0x5a6,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a6,0x5a6,0x5a6,0x5a6,0x5a3,0x5ac, -0x5a3,0x5a3,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc,0xbdc, -0x5b5,0xaec,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5be,0x5bb,0x5be,0x5bb,0x5b5,0x5b5,0x5b5,0x5b5, -0x5b5,0x5b5,0x70e,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x7fe,0x7fe,0x5b5,0x5b5,0x5b5,0x5b5, -0x5b8,0x5b8,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x804,0x801,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5, +0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a3,0x5a6,0x5a6,0x5a6,0x5a6,0x5a3,0x5a3,0x5a3,0x5a3, +0x5a3,0x5a3,0x5a6,0x5a6,0x5a6,0x5a6,0x5a3,0x5ac,0x5a3,0x5a3,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf, +0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0x5b5,0xaef,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5, +0x5be,0x5bb,0x5be,0x5bb,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x70e,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5, +0x5b5,0x5b5,0x7fe,0x7fe,0x5b5,0x5b5,0x5b5,0x5b5,0x5b8,0x5b8,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5, +0x5b5,0x804,0x801,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5, 0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5, -0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0xaec, -0xbe2,0xaec,0xaec,0xaec,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1, +0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0x5b5,0xaef,0xbe5,0xaef,0xaef,0xaef,0x5c1,0x5c1,0x5c1,0x5c1, 0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1, -0x5c1,0x5c1,0x5c1,0x5c1,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x5c7,0xc3f, -0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f,0xc3f, -0xc3f,0xc3f,0xc3f,0xd4d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d, -0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x5ca,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd, -0x5cd,0x5cd,0x5cd,0x5cd,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d, -0x5cd,0x5cd,0x5cd,0x5cd,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d, -0x71d,0x71d,0x71d,0x71d,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720, -0x720,0x720,0x720,0x720,0x5d0,0x5d0,0x720,0x720,0x720,0x720,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, -0xbe5,0xbe5,0xbe5,0xbe5,0x726,0x726,0x5d3,0x723,0x723,0x723,0x723,0x723,0x723,0x723,0x5d3,0x5d3, -0x5d3,0x5d3,0x5d6,0x5d6,0x5d6,0x5d6,0x726,0x726,0x5d6,0x5d6,0x726,0x726,0x5d3,0x5d3,0x5d3,0x5d3, -0x726,0x726,0x5d6,0x5d6,0x726,0x726,0x5d3,0x5d3,0x5d3,0x5d3,0x726,0x726,0x723,0x5d3,0x5d6,0x726, -0x5d3,0x5d3,0x723,0x726,0x726,0x726,0x5d6,0x5d6,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3, -0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x726,0x723,0x726,0x723,0x5d3,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6, -0x5d6,0x5d3,0x5d3,0x723,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xaf2,0xbe8,0xbe8,0xbe8,0xbe8, -0xbe8,0xc57,0xc57,0xbe8,0x5dc,0x5dc,0x5dc,0x5dc,0x5d9,0x72f,0x72f,0x5d9,0x5d9,0x729,0x5d9,0x5d9, -0x5d9,0x5d9,0x729,0x729,0x5d9,0x5d9,0x5d9,0x5d9,0xd56,0xd56,0xbeb,0xbeb,0xdd7,0xaf5,0x5dc,0x5dc, -0x72c,0x5df,0x72c,0x5dc,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9, -0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5dc,0x5dc,0x5dc, -0x5d9,0x5d9,0x5d9,0x5d9,0x72f,0x5d9,0x72f,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x807,0x807,0x807,0x807, -0x807,0x807,0x807,0x807,0x807,0x807,0x807,0x807,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9, -0x5d9,0x5d9,0x5d9,0x5d9,0x72f,0x72f,0x5e2,0x72f,0x729,0x729,0x5d9,0x729,0x72c,0x729,0x729,0x5d9, -0x729,0x72f,0x5e2,0x72f,0xaf5,0xaf5,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee, -0xbee,0xbee,0xdd4,0xe8b,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5, -0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e8,0x139b,0x139b,0x139b,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x14d9,0x5ee,0x5ee,0x5ee,0x5ee,0x139b,0x5e8,0x5e8,0x5ee,0x5ee,0x139e,0x139e, -0x5f4,0x5f4,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x139b,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x735,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x139b,0x5e8,0x139b,0x5e8,0x5e8,0x5e8,0x5e8,0x139b, -0x139b,0x139b,0x5e8,0x1299,0x5e8,0x5e8,0x5e8,0x5f1,0x5f1,0x5f1,0x5f1,0x1320,0x1320,0x5e8,0x5eb,0x5eb, -0x5ee,0x5e8,0x5e8,0x5e8,0xbf4,0xbf1,0xbf4,0xbf1,0xbf4,0xbf1,0xbf4,0xbf1,0xbf4,0xbf1,0xbf4,0xbf1, -0xbf4,0xbf1,0x732,0x732,0x732,0x732,0x732,0x732,0x732,0x732,0x732,0x732,0x5e8,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x139b,0x5e8,0x5e8,0x5e8, -0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x139b,0x615,0x615,0x615,0x615, +0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x5c1,0x717,0x717,0x717,0x717, +0x717,0x717,0x717,0x717,0x717,0x717,0x5c7,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42, +0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xc42,0xd50,0x71d,0x71d,0x71d,0x71d, +0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d, +0x5ca,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd,0x5cd,0x71d,0x71d,0x71d,0x71d, +0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x5cd,0x5cd,0x5cd,0x5cd,0x71d,0x71d,0x71d,0x71d, +0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x720,0x720,0x720,0x720, +0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x720,0x5d0,0x5d0,0x720,0x720, +0x720,0x720,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0xbe8,0x726,0x726,0x5d3,0x723, +0x723,0x723,0x723,0x723,0x723,0x723,0x5d3,0x5d3,0x5d3,0x5d3,0x5d6,0x5d6,0x5d6,0x5d6,0x726,0x726, +0x5d6,0x5d6,0x726,0x726,0x5d3,0x5d3,0x5d3,0x5d3,0x726,0x726,0x5d6,0x5d6,0x726,0x726,0x5d3,0x5d3, +0x5d3,0x5d3,0x726,0x726,0x723,0x5d3,0x5d6,0x726,0x5d3,0x5d3,0x723,0x726,0x726,0x726,0x5d6,0x5d6, +0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x5d3,0x726,0x723, +0x726,0x723,0x5d3,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d6,0x5d3,0x5d3,0x723,0xaf5,0xaf5,0xaf5,0xaf5, +0xaf5,0xaf5,0xaf5,0xaf5,0xbeb,0xbeb,0xbeb,0xbeb,0xbeb,0xc5a,0xc5a,0xbeb,0x5dc,0x5dc,0x5dc,0x5dc, +0x5d9,0x72f,0x72f,0x5d9,0x5d9,0x729,0x5d9,0x5d9,0x5d9,0x5d9,0x729,0x729,0x5d9,0x5d9,0x5d9,0x5d9, +0xd59,0xd59,0xbee,0xbee,0xdda,0xaf8,0x5dc,0x5dc,0x72c,0x5df,0x72c,0x5dc,0x5d9,0x5d9,0x5d9,0x5d9, +0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9, +0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5dc,0x5dc,0x5dc,0x5d9,0x5d9,0x5d9,0x5d9,0x72f,0x5d9,0x72f,0x5d9, +0x5d9,0x5d9,0x5d9,0x5d9,0x807,0x807,0x807,0x807,0x807,0x807,0x807,0x807,0x807,0x807,0x807,0x807, +0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x5d9,0x72f,0x72f,0x5e2,0x72f, +0x729,0x729,0x5d9,0x729,0x72c,0x729,0x729,0x5d9,0x729,0x72f,0x5e2,0x72f,0xaf8,0xaf8,0xbf1,0xbf1, +0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xdd7,0xe8e,0x5e5,0x5e5,0x5e5,0x5e5, +0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5,0x5e5, +0x5e8,0x13a4,0x13a4,0x13a4,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x14e2,0x5ee,0x5ee,0x5ee, +0x5ee,0x13a4,0x5e8,0x5e8,0x5ee,0x5ee,0x13a7,0x13a7,0x5f4,0x5f4,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, +0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x13a4,0x5e8,0x5e8,0x5e8, +0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, +0x5e8,0x735,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, +0x13a4,0x5e8,0x13a4,0x5e8,0x5e8,0x5e8,0x5e8,0x13a4,0x13a4,0x13a4,0x5e8,0x129f,0x5e8,0x5e8,0x5e8,0x5f1, +0x5f1,0x5f1,0x5f1,0x1326,0x1326,0x5e8,0x5eb,0x5eb,0x5ee,0x5e8,0x5e8,0x5e8,0xbf7,0xbf4,0xbf7,0xbf4, +0xbf7,0xbf4,0xbf7,0xbf4,0xbf7,0xbf4,0xbf7,0xbf4,0xbf7,0xbf4,0x732,0x732,0x732,0x732,0x732,0x732, +0x732,0x732,0x732,0x732,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, +0x5e8,0x5e8,0x5e8,0x5e8,0x13a4,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8,0x5e8, +0x5e8,0x5e8,0x5e8,0x13a4,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, 0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, -0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x60c,0x60c,0x60c,0x60c,0x60c,0x60c, +0x615,0x615,0x60c,0x60c,0x60c,0x60c,0x60c,0x60c,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, 0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, -0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0xb46,0xb46,0xb46,0xb46, -0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0xb46,0x615,0x615,0x95a,0x615, -0x615,0x615,0x615,0x615,0x615,0x615,0x60c,0x60c,0xbf7,0xd7a,0x1b0f,0x1b0f,0x612,0x618,0x615,0x60f, +0x60f,0x60f,0x60f,0x60f,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49,0xb49, +0xb49,0xb49,0xb49,0xb49,0x615,0x615,0x95a,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x60c,0x60c, +0xbfa,0xd7d,0x1b21,0x1b21,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f, 0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f, -0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x615,0x60f,0x615,0x60f, -0x615,0x60f,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f, -0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x615,0x60f,0x612,0x618,0x615,0x60f,0x615,0x60f, -0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x615,0x60f,0x1323,0x1323,0x1323,0x1323,0x1323,0x1323, -0x1323,0x1323,0x1323,0x1323,0x1323,0x1323,0x1323,0x1323,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x612,0x618, 0x612,0x618,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x615,0x60f, -0x612,0x615,0x60f,0x612,0x615,0x60f,0x612,0x618,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, -0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x612, -0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, -0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, -0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x612,0x612,0x612,0x612,0x612,0x612,0x612, -0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x60f,0x615,0x918,0x91b,0x1b0f,0x1b0f,0x1b0f,0x1b0f, -0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x1b0f,0x612,0x60f,0x612,0x612, -0x612,0x612,0x612,0x612,0x60f,0x612,0x60f,0x60f,0x612,0x612,0x60f,0x60f,0x612,0x612,0x60f,0x612, -0x60f,0x612,0x60f,0x60f,0x612,0x60f,0x60f,0x612,0x60f,0x612,0x60f,0x60f,0x612,0x60f,0x612,0x612, -0x60f,0x60f,0x60f,0x612,0x60f,0x60f,0x60f,0x60f,0x60f,0x612,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, +0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f, +0x615,0x60f,0x612,0x618,0x615,0x60f,0x615,0x60f,0x612,0x618,0x615,0x60f,0x612,0x618,0x615,0x60f, +0x615,0x60f,0x1329,0x1329,0x1329,0x1329,0x1329,0x1329,0x1329,0x1329,0x1329,0x1329,0x1329,0x1329,0x1329,0x1329, +0x615,0x60f,0x615,0x60f,0x615,0x60f,0x612,0x618,0x612,0x618,0x615,0x60f,0x615,0x60f,0x615,0x60f, +0x615,0x60f,0x615,0x60f,0x615,0x60f,0x615,0x60f,0x612,0x615,0x60f,0x612,0x615,0x60f,0x612,0x618, 0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, -0x612,0x612,0x60f,0x60f,0x612,0x60f,0x612,0x60f,0x60f,0x60f,0x60f,0x60f,0x612,0x612,0x612,0x612, -0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612, -0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x618, +0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612, 0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, +0x615,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, +0x60f,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618, +0x60f,0x615,0x918,0x91b,0x1b21,0x1b21,0x1b21,0x1b21,0x1b21,0x1b21,0x1b21,0x1b21,0x1b21,0x1b21,0x1b21,0x1b21, +0x1b21,0x1b21,0x1b21,0x1b21,0x612,0x60f,0x612,0x612,0x612,0x612,0x612,0x612,0x60f,0x612,0x60f,0x60f, +0x612,0x612,0x60f,0x60f,0x612,0x612,0x60f,0x612,0x60f,0x612,0x60f,0x60f,0x612,0x60f,0x60f,0x612, +0x60f,0x612,0x60f,0x60f,0x612,0x60f,0x612,0x612,0x60f,0x60f,0x60f,0x612,0x60f,0x60f,0x60f,0x60f, +0x60f,0x612,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f, +0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x60f,0x612,0x612,0x60f,0x60f,0x612,0x60f,0x612,0x60f, +0x60f,0x60f,0x60f,0x60f,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612, +0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x612, +0x612,0x612,0x612,0x612,0x612,0x612,0x612,0x618,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, 0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, -0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618, -0x618,0x618,0x618,0x618,0x618,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615, -0x61b,0x61b,0x61b,0x61b,0xfde,0xfde,0xfde,0x14dc,0x14dc,0x14dc,0x14dc,0x14dc,0x14dc,0x14dc,0x16e0,0x16e0, -0x864,0x86a,0x86a,0x876,0x876,0x867,0x85e,0x867,0x85e,0x867,0x85e,0x867,0x85e,0x867,0x85e,0x867, -0x62a,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x62a, -0x624,0x627,0x62d,0x62a,0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627, -0x62d,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627, +0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618, +0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x618,0x615,0x615,0x615, +0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x615,0x61b,0x61b,0x61b,0x61b,0xfe1,0xfe1,0xfe1,0x14e5, +0x14e5,0x14e5,0x14e5,0x14e5,0x14e5,0x14e5,0x16ef,0x16ef,0x864,0x86a,0x86a,0x876,0x876,0x867,0x85e,0x867, +0x85e,0x867,0x85e,0x867,0x85e,0x867,0x85e,0x867,0x62a,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a, +0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x62a,0x624,0x627, +0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x62a,0x624,0x62a,0x624,0x62a, +0x624,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627, 0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627, -0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x62d,0x62a,0x624,0x627,0x714,0x714,0x714,0x714, -0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714, +0x62d,0x62a,0x624,0x627,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714, +0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x714,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711, 0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711, -0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711, -0x711,0x711,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a, -0x71a,0x71a,0x71a,0x71a,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717, -0x717,0x717,0x717,0x717,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d, +0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x711,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a, +0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x71a,0x717,0x717,0x717,0x717, +0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x717,0x71d,0x71d,0x71d,0x71d, 0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d, -0x71d,0x71d,0x71d,0x71d,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738, +0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x71d,0x738,0x738,0x738,0x738, 0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738, -0x738,0x738,0x738,0x738,0xc45,0x8c7,0x8c1,0x8be,0x8c4,0x8bb,0x74d,0x750,0x750,0x750,0x750,0x750, -0x750,0x750,0x750,0x750,0x8cd,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d, +0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0x738,0xc48,0x8c7,0x8be,0x8bb, +0x8c1,0x8c4,0x74d,0x750,0x750,0x750,0x750,0x750,0x750,0x750,0x750,0x750,0x8cd,0x74d,0x74d,0x74d, 0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d, -0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x8ca,0x8ca,0x753,0x8dc,0x8df,0x8e5,0x80a,0x816,0x8fa,0x813, -0x8d3,0x8d0,0x8d3,0x8d0,0x8d9,0x8d6,0x8d9,0x8d6,0x8d3,0x8d0,0x810,0x8e5,0x8d3,0x8d0,0x8d3,0x8d0, -0x8d3,0x8d0,0x8d3,0x8d0,0x8eb,0x8f1,0x8ee,0x8ee,0x759,0x795,0x795,0x795,0x795,0x795,0x795,0x78f, -0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f, -0x78f,0x78f,0x78f,0x75c,0x777,0x756,0x77d,0x780,0x77a,0x792,0x792,0x792,0x792,0x792,0x792,0x78c, -0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c, -0x78c,0x78c,0x78c,0x75c,0x777,0x756,0x777,0xc48,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8, +0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x74d,0x8ca,0x8ca, +0x753,0x8dc,0x8df,0x8e5,0x80a,0x816,0x8fa,0x813,0x8d3,0x8d0,0x8d3,0x8d0,0x8d9,0x8d6,0x8d9,0x8d6, +0x8d3,0x8d0,0x810,0x8e5,0x8d3,0x8d0,0x8d3,0x8d0,0x8d3,0x8d0,0x8d3,0x8d0,0x8eb,0x8f1,0x8ee,0x8ee, +0x759,0x795,0x795,0x795,0x795,0x795,0x795,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f, +0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x78f,0x75c,0x777,0x756,0x77d,0x780, +0x77a,0x792,0x792,0x792,0x792,0x792,0x792,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c, +0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x78c,0x75c,0x777,0x756,0x777,0xc4b, +0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8, 0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8, -0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x7f8,0x1293,0x1293,0x1293,0x1293,0x1293,0x7fb, -0x810,0x813,0x813,0x813,0x813,0x813,0x813,0x813,0x813,0x813,0x933,0x933,0x933,0x933,0x819,0x819, -0x8e8,0x8f7,0x8f7,0x8f7,0x8f7,0x8f4,0x80d,0x8e2,0xb19,0xb19,0xb19,0xc5a,0xc78,0xc75,0xb37,0x8b8, -0x81f,0x81c,0x81f,0x822,0x81c,0x81f,0x81c,0x81f,0x81c,0x81f,0x81c,0x81c,0x81c,0x81c,0x81c,0x81c, -0x81f,0x81f,0x81c,0x81f,0x81f,0x81c,0x81f,0x81f,0x81c,0x81f,0x81f,0x81c,0x81f,0x81f,0x81c,0x81c, -0xc7b,0x831,0x82b,0x831,0x82b,0x831,0x82b,0x831,0x82b,0x831,0x82b,0x82b,0x82e,0x82b,0x82e,0x82b, -0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b, -0x82e,0x82b,0x82e,0x831,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b, -0x82e,0x82e,0x82b,0x82e,0x82e,0x82b,0x82e,0x82e,0x82b,0x82e,0x82e,0x82b,0x82e,0x82e,0x82b,0x82b, -0x82b,0x82b,0x82b,0x831,0x82b,0x831,0x82b,0x831,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x831,0x82b, -0x82b,0x82b,0x82b,0x82b,0x82e,0x831,0x831,0x82e,0x82e,0x82e,0x82e,0x900,0x903,0x834,0x837,0xc63, +0x7f8,0x7f8,0x1299,0x1299,0x1299,0x1299,0x1299,0x7fb,0x810,0x813,0x813,0x813,0x813,0x813,0x813,0x813, +0x813,0x813,0x933,0x933,0x933,0x933,0x819,0x819,0x8e8,0x8f7,0x8f7,0x8f7,0x8f7,0x8f4,0x80d,0x8e2, +0xb1c,0xb1c,0xb1c,0xc5d,0xc7b,0xc78,0xb3a,0x8b8,0x81f,0x81c,0x81f,0x822,0x81c,0x81f,0x81c,0x81f, +0x81c,0x81f,0x81c,0x81c,0x81c,0x81c,0x81c,0x81c,0x81f,0x81f,0x81c,0x81f,0x81f,0x81c,0x81f,0x81f, +0x81c,0x81f,0x81f,0x81c,0x81f,0x81f,0x81c,0x81c,0xc7e,0x831,0x82b,0x831,0x82b,0x831,0x82b,0x831, +0x82b,0x831,0x82b,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b, +0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x82b,0x82e,0x831,0x82b,0x82e,0x82b,0x82e, +0x82b,0x82e,0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x82e,0x82e,0x82b,0x82e,0x82e,0x82b,0x82e,0x82e, +0x82b,0x82e,0x82e,0x82b,0x82e,0x82e,0x82b,0x82b,0x82b,0x82b,0x82b,0x831,0x82b,0x831,0x82b,0x831, +0x82b,0x82b,0x82b,0x82b,0x82b,0x82b,0x831,0x82b,0x82b,0x82b,0x82b,0x82b,0x82e,0x831,0x831,0x82e, +0x82e,0x82e,0x82e,0x900,0x903,0x834,0x837,0xc66,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d, 0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d, +0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x840,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d, 0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d, -0x840,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d, -0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x83d,0x849,0x849,0x849,0x849, +0x83d,0x83d,0x83d,0x83d,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849, 0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849, -0x849,0x849,0x849,0x849,0x849,0x849,0x849,0x849,0xd5f,0xd5f,0xe8e,0x843,0x90c,0x90c,0x90c,0x90c, -0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0xd59,0xd59,0xd59,0xd59,0x84c,0x84c,0x84c,0x84c, +0xd62,0xd62,0xe91,0x843,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c, +0xd5c,0xd5c,0xd5c,0xd5c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c, 0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c, -0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x84c,0x1a58,0x912,0x912,0x912,0x912, -0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x84f,0x84f,0x84f, -0x84f,0x84f,0x84f,0xd62,0xd62,0xd62,0xd62,0x915,0x915,0x915,0x915,0x915,0x84f,0x84f,0x84f,0x84f, +0x84c,0x84c,0x84c,0x1a6a,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912, +0x912,0x912,0x912,0x912,0x912,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0xd65,0xd65,0xd65,0xd65,0x915, +0x915,0x915,0x915,0x915,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f, 0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f, -0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0xd62,0xd62, -0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852, +0x84f,0x84f,0x84f,0x84f,0x84f,0x84f,0xd65,0xd65,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852, 0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852, -0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855, +0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x852,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912, 0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855, -0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91, -0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91,0xe91, -0x1104,0x1104,0x1104,0x1104,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858, +0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855,0x855, +0x855,0x855,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94, +0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0x110a,0x110a,0x110a,0x110a,0x858,0x858,0x858,0x858, 0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858, -0x858,0x858,0x858,0x858,0x858,0x858,0x85b,0x85b,0x858,0x85b,0x858,0x85b,0x85b,0x858,0x858,0x858, -0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x85b,0x858,0x85b,0x858,0x85b,0x85b,0x858,0x858,0x85b, -0x85b,0x85b,0x858,0x858,0x858,0x858,0x1497,0x1497,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c, -0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c, +0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x85b,0x85b, +0x858,0x85b,0x858,0x85b,0x85b,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x858,0x85b, +0x858,0x85b,0x858,0x85b,0x85b,0x858,0x858,0x85b,0x85b,0x85b,0x858,0x858,0x858,0x858,0x14a0,0x14a0, +0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f, +0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c, 0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c, -0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x90c,0x12d2,0x12d2,0x12d2,0x12d2,0x127b,0x127b,0x127b,0x127b, -0x127b,0x127b,0x127b,0x127b,0xd59,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66, -0xc66,0xc66,0xc66,0xc66,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f, +0x12d8,0x12d8,0x12d8,0x12d8,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0x1281,0xd5c,0xc69,0xc69,0xc69, +0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0x90f,0x90f,0x90f,0x90f, 0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f, -0x90f,0x90f,0x90f,0x90f,0x90f,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66,0xc66, -0xc66,0xc66,0xc66,0xc66,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912, +0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0x90f,0xc69,0xc69,0xc69, +0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0xc69,0x912,0x912,0x912,0x912, 0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912, -0x912,0x912,0x912,0xd62,0x99c,0x97e,0x97e,0x97e,0x97e,0x978,0x97e,0x97e,0x990,0x97e,0x97e,0x97b, -0x987,0x98d,0x98d,0x98d,0x98d,0x98d,0x990,0x978,0x984,0x978,0x978,0x978,0x96c,0x96c,0x978,0x978, -0x978,0x978,0x978,0x978,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x993,0x978,0x978, -0x978,0x978,0x978,0x978,0x978,0x978,0x978,0x978,0x97b,0x96c,0x978,0x96c,0x978,0x96c,0x98a,0x981, -0x98a,0x981,0x999,0x999,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8, +0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0x912,0xd65,0x99c,0x97e,0x97e,0x97e, +0x97e,0x978,0x97e,0x97e,0x990,0x97e,0x97e,0x97b,0x987,0x98d,0x98d,0x98d,0x98d,0x98d,0x990,0x978, +0x984,0x978,0x978,0x978,0x96c,0x96c,0x978,0x978,0x978,0x978,0x978,0x978,0x993,0x993,0x993,0x993, +0x993,0x993,0x993,0x993,0x993,0x993,0x978,0x978,0x978,0x978,0x978,0x978,0x978,0x978,0x978,0x978, +0x97b,0x96c,0x978,0x96c,0x978,0x96c,0x98a,0x981,0x98a,0x981,0x999,0x999,0x9a8,0x9a8,0x9a8,0x9a8, 0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8, -0x9a8,0x9a8,0x9a8,0x9a8,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab, +0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9a8,0x9ab,0x9ab,0x9ab,0x9ab, 0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab, -0x9ab,0x9ab,0x9ab,0x9ab,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae, +0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ab,0x9ae,0x9ae,0x9ae,0x9ae, 0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae, -0x9ae,0x9ae,0x9ae,0x9ae,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7, +0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9ae,0x9b7,0x9b7,0x9b7,0x9b7, 0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7, -0x9b7,0x9b7,0x9b1,0x9b1,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba, +0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b1,0x9b1,0x9ba,0x9ba,0x9ba,0x9ba, 0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba, -0x9ba,0x9ba,0x9b4,0x9b4,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7, +0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9b4,0x9b4,0x9b7,0x9b7,0x9b7,0x9b7, 0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7, -0x9b7,0x9b7,0x9b7,0x9b7,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba, +0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9b7,0x9ba,0x9ba,0x9ba,0x9ba, 0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba, -0x9ba,0x9ba,0x9ba,0x9ba,0x9bd,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0, +0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9ba,0x9bd,0x9c0,0x9c0,0x9c0, +0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0, +0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9bd,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0, 0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0, -0x9bd,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0, -0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0x9c0,0xa4d,0xa4d,0xfc3,0xa4d, -0xa4d,0xa4d,0xa50,0xa4d,0xfc3,0xa4d,0xa4d,0xfba,0xa47,0xa3b,0xa3b,0xa3b,0xa3b,0xa4a,0xa3b,0xfab, -0xfab,0xfab,0xa3b,0xa3e,0xa47,0xa41,0xfb1,0xfbd,0xfbd,0xfab,0xfab,0xfc3,0xb3d,0xb3d,0xb3d,0xb3d, -0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xb3d,0xa53,0xa53,0xa44,0xa44,0xa44,0xa44,0xa4d,0xa4d,0xa4d,0xa4d, -0xa4d,0xa4d,0xa4a,0xa4a,0xa3b,0xa3b,0xfc3,0xfc3,0xfc3,0xfc3,0xfab,0xfab,0xa4d,0xa4d,0xa4d,0xa4d, +0x9c0,0x9c0,0x9c0,0x9c0,0xa4d,0xa4d,0xfc6,0xa4d,0xa4d,0xa4d,0xa50,0xa4d,0xfc6,0xa4d,0xa4d,0xfbd, +0xa47,0xa3b,0xa3b,0xa3b,0xa3b,0xa4a,0xa3b,0xfae,0xfae,0xfae,0xa3b,0xa3e,0xa47,0xa41,0xfb4,0xfc0, +0xfc0,0xfae,0xfae,0xfc6,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xb40,0xa53,0xa53, +0xa44,0xa44,0xa44,0xa44,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4a,0xa4a,0xa3b,0xa3b,0xfc6,0xfc6, +0xfc6,0xfc6,0xfae,0xfae,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d, 0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d, -0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa4d,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xdb9,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, +0xa4d,0xa4d,0xa4d,0xa4d,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdbc,0xa62,0xa62,0xa62,0xa62, 0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdb9,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, -0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68, +0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xdbc, +0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62,0xa62, +0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68, 0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68, -0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa68,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e, -0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6b,0xa71,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0x113d, -0x113d,0x113d,0x113d,0x113d,0x113d,0x113d,0x113d,0x113d,0x113a,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e, +0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6b,0xa71,0xa6e, +0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143,0x1143, +0x1140,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e, 0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e, -0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa6e,0xa83,0xa83,0xa83,0xa83, +0xa6e,0xa6e,0xa6e,0xa6e,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83, 0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83, -0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xa83,0xaa7,0xaa7,0xaa7,0xaaa, -0xaaa,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7, -0xa8f,0xa8f,0xaa4,0xa86,0xa86,0xa86,0xa86,0xa86,0xa86,0xa86,0xaa4,0xaa4,0xaa7,0xaa7,0xaa7,0xaa7, +0xa83,0xa83,0xa83,0xa83,0xaa7,0xaa7,0xaa7,0xaaa,0xaaa,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7, +0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xa8f,0xa8f,0xaa4,0xa86,0xa86,0xa86,0xa86,0xa86, +0xa86,0xa86,0xaa4,0xaa4,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7, 0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7, -0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xaa7,0xac8,0xac8,0xac8,0xac8, -0xac8,0xab3,0xab3,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xacb,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8,0xac8, -0xac8,0xac8,0xac8,0xac8,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec, -0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xaec,0xbe2, -0xbe2,0xbe2,0xbe2,0xbe2,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8, -0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8,0xaf8, -0xaf8,0xaf8,0xaf8,0xaf8,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a, -0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a,0xb0a, -0xb0a,0xb0a,0xb0a,0xb0a,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10, -0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10,0xb10, -0xb10,0xb10,0xb10,0xb10,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c, -0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0xb1c,0x13a1,0x13a1,0x13a1,0x1ad3, -0x1ad3,0x1ad3,0x1ad3,0x1ad3,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f, +0xaa7,0xaa7,0xaa7,0xaa7,0xacb,0xacb,0xacb,0xacb,0xacb,0xab6,0xab6,0xacb,0xacb,0xacb,0xacb,0xacb, +0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb, +0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xace, +0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb, +0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xacb,0xaef,0xaef,0xaef,0xaef, +0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef, +0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xaef,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xafb,0xafb,0xafb,0xafb, +0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb, +0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xafb,0xb0d,0xb0d,0xb0d,0xb0d, +0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d, +0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb0d,0xb13,0xb13,0xb13,0xb13, +0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13, +0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb13,0xb1f,0xb1f,0xb1f,0xb1f, 0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f, -0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0xb1f,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6, +0xb1f,0xb1f,0xb1f,0xb1f,0x13aa,0x13aa,0x13aa,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0x1ae5,0xb22,0xb22,0xb22,0xb22, 0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22, -0xb22,0xb22,0xb22,0xb22,0xb22,0xb25,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22, -0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22, -0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb28,0xb28,0xc69,0xc69,0xb28,0xb28,0xb28,0xb28, -0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xc69,0xb28,0xb28,0xb28, -0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb28,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c, -0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c, -0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0xb4c,0x14df,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xced,0xced, -0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52, -0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xb52,0xcea,0xcea,0xd38,0xd38,0xd38,0xd38, -0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xb55,0xb55,0xb55,0xb55, +0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0xb22,0x1ae8,0x1ae8, +0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0x1ae8,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25, +0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb28,0xb25,0xb25, +0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25, +0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25,0xb25, +0xb2b,0xb2b,0xc6c,0xc6c,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b, +0xb2b,0xb2b,0xb2b,0xb2b,0xc6c,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b,0xb2b, +0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f, +0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0xb4f,0x14e8, +0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xcf0,0xcf0,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55, 0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55, -0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb55,0xb58,0xb58,0xb58,0xb58, +0xb55,0xb55,0xced,0xced,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b, +0xd3b,0xd3b,0xd3b,0xd3b,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58, 0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58, -0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb58,0xb67,0xb67,0xb67,0xb67, -0xb67,0xb5e,0xb6a,0xb70,0xb70,0xb70,0xb64,0xb64,0xb64,0xb6d,0xb61,0xb61,0xb61,0xb61,0xb61,0xb5b, -0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb70,0xb70,0xb70,0xb70,0xb70,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb67,0xb67, -0xb70,0xb70,0xb70,0xb64,0xb64,0xb70,0xb70,0xb70,0xb70,0xb70,0xb70,0xb70,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb70,0xb70,0xb70,0xb70,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0xb64, -0xb64,0xb64,0xb64,0xb64,0xb64,0xb64,0x16e3,0x16e3,0xb7c,0xb73,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb73,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb73,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb73,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, +0xb58,0xb58,0xb58,0xb58,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b, +0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b,0xb5b, +0xb5b,0xb5b,0xb5b,0xb5b,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a,0xb61,0xb6d,0xb73,0xb73,0xb73,0xb67,0xb67, +0xb67,0xb70,0xb64,0xb64,0xb64,0xb64,0xb64,0xb5e,0xb5e,0xb5e,0xb5e,0xb5e,0xb5e,0xb5e,0xb5e,0xb73, +0xb73,0xb73,0xb73,0xb73,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67, +0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67, +0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb6a,0xb6a,0xb73,0xb73,0xb73,0xb67,0xb67,0xb73,0xb73,0xb73, +0xb73,0xb73,0xb73,0xb73,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67, +0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb73,0xb73,0xb73,0xb73,0xb67,0xb67, +0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb6a,0xb6a,0xb6a,0xb6a,0xb6a, +0xb6a,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67, +0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0xb67,0x16f2,0x16f2, +0xb7f,0xb76,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, +0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb76,0xb7c,0xb7c,0xb7c,0xb7c, +0xb7c,0xb7c,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f, +0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb76,0xb7c,0xb7c,0xb7c,0xb7c, 0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb73,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb76,0xb76,0xb76,0xb76, -0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76, -0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb76,0xb7c,0xb7c,0xb7c,0xb7c, +0xb7c,0xb76,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f, +0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb76,0xb7c,0xb7c, 0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, -0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, -0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, +0xb7c,0xb7c,0xb7c,0xb7c,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, 0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79,0xb79, +0xb79,0xb79,0xb79,0xb79,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f, +0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7c,0xb7c, +0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, 0xb7c,0xb7c,0xb7c,0xb7c,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f, -0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f, -0xb7f,0xb7f,0xb7f,0xb7f,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85, -0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85, -0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0xb85,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1adc,0x1ba8,0x1ba8, -0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88, +0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7f,0xb7c,0xb7c, +0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c, +0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7c,0xb7f,0xb7f,0xb7f,0xb7f,0xb82,0xb82,0xb82,0xb82, +0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82, +0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb82,0xb88,0xb88,0xb88,0xb88, 0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88, -0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2, -0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbdf,0xbe2,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf, -0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xbdf,0xce1,0xce4,0xdd1,0xdd1,0xdd1,0xdd1,0xdd1,0xdd1,0xdd1, -0xdd1,0xdd1,0xdd1,0xdd1,0xee8,0xee8,0xee8,0xee8,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee,0xbee, -0xbee,0xbee,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xce7,0xdd4,0xe88,0xdd4,0xdd4,0xdd4,0xdd4, -0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xfd8,0x1272,0x1272,0xddd,0xddd,0xddd,0xddd,0xddd,0xde3,0xde0,0xefa, -0xefa,0xefa,0xefa,0x13e0,0xfea,0x13e0,0x132c,0x132c,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21, -0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc21,0xc4e,0xc4b,0xc4e,0xc4b,0xc4e,0xc4b, -0x10fe,0x10fb,0xff0,0xfed,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24, -0xc24,0xc24,0xc24,0xc24,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27, -0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27, -0xc27,0xc27,0xc27,0xc27,0xc2a,0xc2a,0xc2a,0xc30,0xc2d,0xc54,0xc51,0xc30,0xc2d,0xc30,0xc2d,0xc30, -0xc2d,0xc30,0xc2d,0xc30,0xc2d,0xc30,0xc2d,0xc30,0xc2d,0xc30,0xc2d,0xc30,0xc2d,0xc2a,0xc2a,0xc2a, -0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a, +0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0xb88,0x1aee, +0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1bba,0x1bba,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b, +0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b, +0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xb8b,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5, +0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe5,0xbe2,0xbe5, +0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xbe2,0xce4, +0xce7,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xeeb,0xeeb,0xeeb,0xeeb, +0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xbf1,0xcea,0xcea,0xcea,0xcea,0xcea,0xcea, +0xcea,0xcea,0xdd7,0xe8b,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xfdb,0x1278,0x1278, +0xde0,0xde0,0xde0,0xde0,0xde0,0xde6,0xde3,0xefd,0xefd,0xefd,0xefd,0x13e9,0xfed,0x13e9,0x1332,0x1332, +0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24,0xc24, +0xc24,0xc24,0xc51,0xc4e,0xc51,0xc4e,0xc51,0xc4e,0x1104,0x1101,0xff3,0xff0,0xc27,0xc27,0xc27,0xc27, +0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc27,0xc2a,0xc2a,0xc2a,0xc2a, 0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a, -0xc30,0xc2d,0xc30,0xc2d,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a, -0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a, -0xc30,0xc2d,0xc2a,0xc2a,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33, -0xc39,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33, -0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33, -0xc33,0xc33,0xc33,0xc33,0xc39,0xc39,0xc39,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33, -0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33,0xc33, -0xc33,0xc33,0xc33,0xc33,0xc36,0xc33,0xc33,0xc33,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c, -0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c, -0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xc6c,0xce7,0xd53,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4, -0xdd4,0xdd4,0xe88,0xe88,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xdd4,0xeeb,0xfd8,0xfd8,0xfd8,0xfd8,0xfd8, -0xfd8,0xfd8,0xfd8,0xfd8,0xfd8,0x1296,0x1296,0x1275,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b, -0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b, -0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd0b,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd11,0xd11, -0xd11,0xd11,0xd11,0xd0e,0xd23,0xd23,0xd23,0xd1d,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23, -0xd23,0xd23,0xd23,0xd1d,0xd23,0xd23,0xd23,0xd23,0xd17,0xd17,0xd20,0xd20,0xd20,0xd20,0xd14,0xd14, -0xd14,0xd14,0xd14,0xd1a,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9, -0xde6,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xde9,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23, -0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd1d,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23,0xd23, -0xd23,0xd23,0xd23,0xd23,0xd23,0xd17,0xd17,0xd17,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a, -0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a, -0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd1a,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26, -0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xdec,0xdec,0xdec,0xdec,0xdec,0xdec,0xefd,0xefd,0xefd,0xefd, -0xefd,0xefd,0xefd,0x1107,0x1107,0xff3,0xff3,0xff3,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29, -0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29, -0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f, -0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f, -0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd2f,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38, -0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38, -0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd38,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44, -0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44, -0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd44,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50, -0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50, -0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xd50,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2, -0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2, -0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf2,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8, -0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf5,0xdf5,0xdf5, -0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8, -0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8, -0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xeb8,0xeb8,0xe0a,0xe0a,0xf00,0xf00,0xf00,0xf00, -0xf00,0xf00,0xf00,0xfff,0xfff,0x1002,0xfff,0xfff,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc, -0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16, -0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16, -0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe19,0xe16,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25, -0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25, -0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe25,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b, -0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0x1b1e,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, +0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2a,0xc2d,0xc2d,0xc2d,0xc33, +0xc30,0xc57,0xc54,0xc33,0xc30,0xc33,0xc30,0xc33,0xc30,0xc33,0xc30,0xc33,0xc30,0xc33,0xc30,0xc33, +0xc30,0xc33,0xc30,0xc33,0xc30,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d, +0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d, +0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc33,0xc30,0xc33,0xc30,0xc2d,0xc2d,0xc2d,0xc2d, +0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d, +0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc2d,0xc33,0xc30,0xc2d,0xc2d,0xc36,0xc36,0xc36,0xc36, +0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc3c,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36, +0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36, +0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc3c,0xc3c,0xc3c,0xc36, +0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36, +0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc36,0xc39,0xc36,0xc36,0xc36, +0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f, +0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f,0xc6f, +0xcea,0xd56,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xdd7,0xe8b,0xe8b,0xdd7,0xdd7,0xdd7,0xdd7, +0xdd7,0xdd7,0xeee,0xfdb,0xfdb,0xfdb,0xfdb,0xfdb,0xfdb,0xfdb,0xfdb,0xfdb,0xfdb,0x129c,0x129c,0x127b, +0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e, +0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e,0xd0e, +0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd14,0xd14,0xd14,0xd14,0xd14,0xd11,0xd26,0xd26,0xd26,0xd20, +0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd20,0xd26,0xd26,0xd26,0xd26, +0xd1a,0xd1a,0xd23,0xd23,0xd23,0xd23,0xd17,0xd17,0xd17,0xd17,0xd17,0xd1d,0xdec,0xdec,0xdec,0xdec, +0xdec,0xdec,0xdec,0xdec,0xdec,0xdec,0xdec,0xdec,0xde9,0xdec,0xdec,0xdec,0xdec,0xdec,0xdec,0xdec, +0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd20,0xd26, +0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd26,0xd1a,0xd1a,0xd1a, +0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d, +0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d,0xd1d, +0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xd29,0xdef,0xdef, +0xdef,0xdef,0xdef,0xdef,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0xf00,0x110d,0x110d,0xff6,0xff6,0xff6, +0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c, +0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c,0xd2c, +0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32, +0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32,0xd32, +0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b, +0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b,0xd3b, +0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47, +0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47,0xd47, +0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53, +0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53,0xd53, +0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5, +0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5,0xdf5, +0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb, +0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8,0xdf8, +0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb, +0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb,0xdfb, +0xebb,0xebb,0xe0d,0xe0d,0xf03,0xf03,0xf03,0xf03,0xf03,0xf03,0xf03,0x1002,0x1002,0x1005,0x1002,0x1002, +0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff, +0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19, +0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19,0xe1c,0xe19, +0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, 0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28, -0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0xe28,0x1b1b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b, +0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0x1b30, 0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b, -0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2,0xeb2, -0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xe43,0xf03, -0xf03,0xf03,0xf03,0x1005,0x1005,0x1005,0x1005,0x1005,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c, -0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c, -0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe4c,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55, -0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55, -0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe55,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e, +0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0xe2b,0x1b2d, +0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e, +0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e,0xe2e, +0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xe46,0xe46,0xe46,0xe46,0xe46,0xe46,0xe46,0xe46, +0xe46,0xe46,0xe46,0xe46,0xe46,0xe46,0xe46,0xf06,0xf06,0xf06,0xf06,0x1008,0x1008,0x1008,0x1008,0x1008, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f,0xe4f, +0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58, +0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58,0xe58, +0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61, +0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe61,0xe5b, 0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e, -0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe58,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b, -0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b,0xe5b, -0xe5b,0xe5b,0xe5b,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe67, -0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe64,0xe64,0xe64,0xe64,0xe64,0xe64,0xe64,0xe64,0xe61,0xe6a, -0x1011,0x100b,0x101a,0x1008,0xe67,0xe67,0x1008,0x1008,0xe79,0xe79,0xe6d,0xe79,0xe79,0xe79,0xe70,0xe79, -0xe79,0xe79,0xe79,0xe6d,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79, -0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe79,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c, +0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe5e,0xe61,0xe61,0xe61,0xe61,0xe61, +0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe6a,0xe67,0xe67, +0xe67,0xe67,0xe67,0xe67,0xe67,0xe67,0xe64,0xe6d,0x1014,0x100e,0x101d,0x100b,0xe6a,0xe6a,0x100b,0x100b, +0xe7c,0xe7c,0xe70,0xe7c,0xe7c,0xe7c,0xe73,0xe7c,0xe7c,0xe7c,0xe7c,0xe70,0xe7c,0xe7c,0xe7c,0xe7c, 0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c, -0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe7c,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94, -0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94, -0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xe94,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5, -0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0xeb5,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110, -0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0x1110,0xee8,0xee8,0xee8,0xee5,0xee5,0xee5,0xee5,0xee5, -0x1149,0x1392,0x1392,0x1392,0x1392,0x1317,0x1317,0x1317,0x1395,0x131a,0x131a,0x1395,0x14d6,0x14d6,0x14d6,0x14d6, -0x14d6,0x14d6,0x14d6,0x1797,0x1797,0x1797,0x1797,0x185d,0xefd,0xefd,0xefd,0xefd,0xff3,0xff3,0xff3,0xff3, -0xff3,0xff3,0xff3,0xff3,0xff3,0xff3,0xff3,0xff3,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6, -0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0xffc,0x14f1, -0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f1,0x14f4,0x1866,0x1866, -0x18e7,0x1866,0x1bc6,0x179d,0x132f,0x1152,0xf00,0xf00,0xf1e,0xf1e,0xf1e,0xf1e,0xf30,0xf39,0xf3c,0xf39, -0xf3c,0xf39,0xf3c,0xf39,0xf3c,0xf39,0xf3c,0xf39,0xf39,0xf39,0xf3c,0xf39,0xf39,0xf39,0xf39,0xf39, -0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39,0xf39, -0xf21,0xf1e,0xf1e,0xf1e,0xf1e,0xf1e,0xf1e,0xf33,0xf1e,0xf33,0xf30,0xf30,0xf45,0xf42,0xf45,0xf45, -0xf45,0xf42,0xf42,0xf45,0xf42,0xf45,0xf42,0xf45,0xf42,0x102c,0x102c,0x102c,0x1167,0x1023,0x102c,0x1023, -0xf42,0xf45,0xf42,0xf42,0x1023,0x1023,0x1023,0x1023,0x1026,0x1029,0x1167,0x1167,0xf48,0xf48,0x103e,0x1035, -0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x1035,0x1035,0x103e,0x1035, -0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0xf4e,0xf4e,0xf4e,0xf4e, -0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e, -0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf4e,0xf5d,0xf5d,0xf5d,0xf5d, -0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d, -0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0xf5d,0x1512, -0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512,0x1512, -0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63, -0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63,0xf63, -0xfab,0xfc3,0xfba,0xfc0,0xfc0,0xfc3,0xfc3,0xfba,0xfba,0xfc0,0xfc0,0xfc0,0xfc0,0xfc0,0xfc3,0xfc3, -0xfc3,0xfab,0xfab,0xfab,0xfab,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3, -0xfc3,0xfc3,0xfab,0xfba,0xfbd,0xfab,0xfab,0xfc0,0xfc0,0xfc0,0xfc0,0xfc0,0xfc0,0xfae,0xfc3,0xfc0, -0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0xfb7,0x1131,0x1131,0x112e,0x112b,0xfb4,0xfb4, -0xfdb,0xfdb,0xfdb,0xfdb,0x1296,0x1296,0x1275,0x1275,0x1275,0x1272,0x1272,0x1272,0x1272,0x1275,0x1398,0x1275, -0x1275,0x1275,0x1272,0x1275,0x1296,0x1272,0x1272,0x1272,0x1275,0x1275,0x1272,0x1272,0x1275,0x1272,0x1272,0x1275, -0xff6,0xff6,0xff6,0xff6,0xff6,0xff3,0xff3,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0x14eb,0x14eb,0x14eb, -0x1107,0xff3,0xff3,0xff3,0xff3,0x12a2,0x127e,0x127e,0x127e,0x127e,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb, -0x1017,0x1017,0x1014,0x100e,0x1014,0x100e,0x1014,0x100e,0x1014,0x100e,0x100b,0x100b,0x100b,0x100b,0x1020,0x101d, -0x100b,0x1164,0x13ec,0x13ef,0x13ef,0x13ec,0x13ec,0x13ec,0x13ec,0x13ec,0x13f2,0x13f2,0x1506,0x14fa,0x14fa,0x14f7, -0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x1032,0x102f,0x102f,0x103e,0x1035,0x133b,0x1338,0x16ec, -0x133b,0x1338,0x13fb,0x13f8,0x1509,0x1509,0x150f,0x1509,0x150f,0x1509,0x150f,0x1509,0x150f,0x1509,0x150f,0x1509, -0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035, -0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x1035, -0x1038,0x1035,0x1035,0x1035,0x1035,0x1035,0x1035,0x1035,0x1035,0x103e,0x1035,0x103e,0x1035,0x103e,0x103e,0x1035, -0x1041,0x1041,0x1047,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d, -0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d,0x104d, -0x104d,0x1047,0x1041,0x1041,0x1041,0x1041,0x1047,0x1047,0x1041,0x1041,0x104a,0x1404,0x1401,0x1401,0x104d,0x104d, -0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x1044,0x1407,0x1407,0x1407,0x1407,0x1407,0x1407, -0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062, -0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062,0x1062, -0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b, -0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106b,0x106e,0x106e,0x106e,0x1071,0x106e,0x106e,0x1074,0x1074, -0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077, -0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077,0x1077, -0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1083,0x107a,0x1089,0x1086, -0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080, -0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080,0x1080, -0x1341,0x133e,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x1098,0x1119, -0x108c,0x108c,0x108c,0x1092,0x140a,0x140a,0x140a,0x140a,0x140a,0x140a,0x140a,0x140a,0x108f,0x108f,0x1092,0x109e, -0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095, -0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095,0x109b,0x1095, -0x151e,0x151b,0x151e,0x151b,0x1521,0x1521,0x16f5,0x140a,0x10a7,0x10a7,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa, -0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa, -0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10a7,0x10a7,0x10a7,0x10a7,0x10a7,0x10a7,0x10a7,0x10a7, -0x10a7,0x10a7,0x10a7,0x10a7,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b0,0x10b0,0x10b0,0x10b0,0x10b0,0x10b3, -0x10b3,0x10b3,0x110d,0x10bc,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb,0x10cb, -0x10cb,0x10cb,0x10cb,0x10cb,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b6,0x10b9,0x10b9, -0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9, -0x10b9,0x10b9,0x10b9,0x10b9,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da, -0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da,0x10da, -0x10da,0x10da,0x10da,0x10da,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec, -0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec,0x10ec, -0x10ec,0x10ec,0x10ec,0x10ec,0x10f5,0x10f5,0x10f5,0x10f5,0x110a,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5, -0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5,0x10f5, -0x10f5,0x10f5,0x10f5,0x10f5,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8, -0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8,0x10f8, -0x10f8,0x10f8,0x10f8,0x10f8,0x1104,0x1104,0x1104,0x1104,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c,0x129c, -0x1494,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6, -0x18c6,0x18c6,0x18c6,0x18c6,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179, -0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1179,0x1170,0x1170,0x1173,0x1173,0x1179,0x1170, -0x1170,0x1170,0x1170,0x1170,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f, +0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f, +0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f,0xe7f, +0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97, +0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97,0xe97, +0xeb8,0xeb8,0xeb8,0xeb8,0xeb8,0xeb8,0xeb8,0xeb8,0xeb8,0xeb8,0xeb8,0xeb8,0xeb8,0xeb8,0xeb8,0xeb8, +0x1113,0x1113,0x1113,0x1113,0x1113,0x1113,0x1113,0x1113,0x1113,0x1113,0x1113,0x1113,0x1113,0x1113,0x1113,0x1113, +0xeeb,0xeeb,0xeeb,0xee8,0xee8,0xee8,0xee8,0xee8,0x114f,0x139b,0x139b,0x139b,0x139b,0x131d,0x131d,0x131d, +0x139e,0x1320,0x1320,0x139e,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x14df,0x17a6,0x17a6,0x17a6,0x17a6,0x186c, +0xf00,0xf00,0xf00,0xf00,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6,0xff6, +0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9,0xff9, +0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0xfff,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fa, +0x14fa,0x14fa,0x14fa,0x14fa,0x14fa,0x14fd,0x1875,0x1875,0x18f6,0x1875,0x1bd8,0x17ac,0x1335,0x1158,0xf03,0xf03, +0xf21,0xf21,0xf21,0xf21,0xf33,0xf3c,0xf3f,0xf3c,0xf3f,0xf3c,0xf3f,0xf3c,0xf3f,0xf3c,0xf3f,0xf3c, +0xf3c,0xf3c,0xf3f,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c, +0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf3c,0xf24,0xf21,0xf21,0xf21,0xf21,0xf21,0xf21,0xf36, +0xf21,0xf36,0xf33,0xf33,0xf48,0xf45,0xf48,0xf48,0xf48,0xf45,0xf45,0xf48,0xf45,0xf48,0xf45,0xf48, +0xf45,0x102f,0x102f,0x102f,0x116d,0x1026,0x102f,0x1026,0xf45,0xf48,0xf45,0xf45,0x1026,0x1026,0x1026,0x1026, +0x1029,0x102c,0x116d,0x116d,0xf4b,0xf4b,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038, +0x1041,0x1038,0x1041,0x1038,0x1038,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038, +0x1041,0x1038,0x1041,0x1038,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51, +0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51,0xf51, +0xf51,0xf51,0xf51,0xf51,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60, +0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60, +0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0xf60,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b, +0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0x151b,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66, +0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66, +0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xf66,0xfae,0xfc6,0xfbd,0xfc3,0xfc3,0xfc6,0xfc6,0xfbd, +0xfbd,0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfc6,0xfc6,0xfc6,0xfae,0xfae,0xfae,0xfae,0xfc6,0xfc6,0xfc6, +0xfc6,0xfc6,0xfc6,0xfc6,0xfc6,0xfc6,0xfc6,0xfc6,0xfc6,0xfc6,0xfae,0xfbd,0xfc0,0xfae,0xfae,0xfc3, +0xfc3,0xfc3,0xfc3,0xfc3,0xfc3,0xfb1,0xfc6,0xfc3,0xfba,0xfba,0xfba,0xfba,0xfba,0xfba,0xfba,0xfba, +0xfba,0xfba,0x1137,0x1137,0x1134,0x1131,0xfb7,0xfb7,0xfde,0xfde,0xfde,0xfde,0x129c,0x129c,0x127b,0x127b, +0x127b,0x1278,0x1278,0x1278,0x1278,0x127b,0x13a1,0x127b,0x127b,0x127b,0x1278,0x127b,0x129c,0x1278,0x1278,0x1278, +0x127b,0x127b,0x1278,0x1278,0x127b,0x1278,0x1278,0x127b,0xff9,0xff9,0xff9,0xff9,0xff9,0xff6,0xff6,0xff9, +0xff9,0xff9,0xff9,0xff9,0xff9,0x14f4,0x14f4,0x14f4,0x110d,0xff6,0xff6,0xff6,0xff6,0x12a8,0x1284,0x1284, +0x1284,0x1284,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x101a,0x101a,0x1017,0x1011,0x1017,0x1011,0x1017,0x1011, +0x1017,0x1011,0x100e,0x100e,0x100e,0x100e,0x1023,0x1020,0x100e,0x116a,0x13f5,0x13f8,0x13f8,0x13f5,0x13f5,0x13f5, +0x13f5,0x13f5,0x13fb,0x13fb,0x150f,0x1503,0x1503,0x1500,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038, +0x1035,0x1032,0x1032,0x1041,0x1038,0x1341,0x133e,0x16fb,0x1341,0x133e,0x1404,0x1401,0x1512,0x1512,0x1518,0x1512, +0x1518,0x1512,0x1518,0x1512,0x1518,0x1512,0x1518,0x1512,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038, +0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038, +0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1038,0x103b,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038,0x1038, +0x1038,0x1041,0x1038,0x1041,0x1038,0x1041,0x1041,0x1038,0x1044,0x1044,0x104a,0x1050,0x1050,0x1050,0x1050,0x1050, +0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050, +0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x1050,0x104a,0x1044,0x1044,0x1044,0x1044,0x104a,0x104a, +0x1044,0x1044,0x104d,0x140d,0x140a,0x140a,0x1050,0x1050,0x1047,0x1047,0x1047,0x1047,0x1047,0x1047,0x1047,0x1047, +0x1047,0x1047,0x1410,0x1410,0x1410,0x1410,0x1410,0x1410,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065, +0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065, +0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x1065,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e, +0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e,0x106e, +0x1071,0x1071,0x1071,0x1074,0x1071,0x1071,0x1077,0x1077,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a, +0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a, +0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x107a,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083, +0x1083,0x1083,0x1083,0x1083,0x1086,0x107d,0x108c,0x1089,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083, +0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083, +0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1083,0x1347,0x1344,0x109e,0x1098,0x109e,0x1098,0x109e,0x1098, +0x109e,0x1098,0x109e,0x1098,0x109e,0x1098,0x109b,0x111f,0x108f,0x108f,0x108f,0x1095,0x1413,0x1413,0x1413,0x1413, +0x1413,0x1413,0x1413,0x1413,0x1092,0x1092,0x1095,0x10a1,0x109e,0x1098,0x109e,0x1098,0x109e,0x1098,0x109e,0x1098, +0x109e,0x1098,0x109e,0x1098,0x109e,0x1098,0x109e,0x1098,0x109e,0x1098,0x109e,0x1098,0x109e,0x1098,0x109e,0x1098, +0x109e,0x1098,0x109e,0x1098,0x109e,0x1098,0x109e,0x1098,0x1527,0x1524,0x1527,0x1524,0x152a,0x152a,0x1704,0x1413, +0x10aa,0x10aa,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad, +0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad,0x10ad, +0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10aa,0x10bc,0x10bc,0x10bc,0x10bc, +0x10bc,0x10bc,0x10b3,0x10b3,0x10b3,0x10b3,0x10b3,0x10b6,0x10b6,0x10b6,0x1116,0x10bf,0x10ce,0x10ce,0x10ce,0x10ce, +0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10ce,0x10b9,0x10b9,0x10b9,0x10b9, +0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10b9,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc, +0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10bc,0x10e0,0x10e0,0x10e0,0x10e0, +0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0, +0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10e0,0x10f2,0x10f2,0x10f2,0x10f2, +0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2, +0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10f2,0x10fb,0x10fb,0x10fb,0x10fb, +0x1110,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb, +0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fb,0x10fe,0x10fe,0x10fe,0x10fe, +0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe, +0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x10fe,0x110a,0x110a,0x110a,0x110a, +0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x12a2,0x149d,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785, +0x1785,0x1785,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x117f,0x117f,0x117f,0x117f, 0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f,0x117f, -0x117f,0x117f,0x117f,0x117f,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a, -0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a,0x119a, -0x119a,0x119a,0x119a,0x119a,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6, -0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6,0x11a6, -0x11a6,0x11a6,0x11a3,0x11a9,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5, -0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5,0x11b5, -0x11b5,0x11b5,0x11b5,0x11b5,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb, -0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x12e7,0x11c1,0x12ea,0x11c1,0x11c1,0x11c1,0x11c1,0x11be,0x11be,0x11be,0x11c1, -0x16f8,0x16fb,0x1923,0x1920,0x11c4,0x11c4,0x11c4,0x11d3,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9, -0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9, -0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11d9,0x11c7,0x11d3,0x11d3,0x11c4,0x11c4,0x11c4,0x11c4,0x11d3,0x11d3, -0x11c4,0x11c4,0x11d3,0x11d3,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5, -0x11e5,0x11e5,0x11e5,0x11e5,0x11e8,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11e5,0x11df,0x11df,0x11df,0x11e5,0x11e2, -0x1527,0x152a,0x152d,0x152d,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7, -0x11f7,0x11f7,0x11f7,0x11f7,0x11eb,0x11f7,0x11eb,0x11eb,0x11eb,0x1200,0x1200,0x11eb,0x11eb,0x1200,0x11f7,0x1200, -0x1200,0x11f7,0x11eb,0x11ee,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7, -0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7,0x11f7, -0x11f7,0x11f7,0x11f7,0x11f7,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212, -0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212,0x1212, -0x1212,0x1212,0x1212,0x1212,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a, -0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a,0x122a, -0x122a,0x1227,0x1227,0x1227,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233, -0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233,0x1233, -0x1233,0x1233,0x1233,0x1233,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242, -0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242,0x1242, -0x1242,0x1242,0x1242,0x1242,0x1248,0x1248,0x1254,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257, -0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x125a,0x1257, -0x125a,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x1257,0x125a, -0x1257,0x1257,0x1257,0x1257,0x1254,0x1254,0x1254,0x1248,0x1248,0x1248,0x1248,0x1254,0x1254,0x124e,0x124b,0x1251, -0x1251,0x1260,0x125d,0x125d,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263, -0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263, -0x1263,0x1263,0x1263,0x1263,0x1269,0x1269,0x1269,0x1266,0x1266,0x1266,0x1263,0x1263,0x1263,0x1263,0x1266,0x1263, -0x1263,0x1263,0x1269,0x1266,0x1269,0x1266,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263, -0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263, -0x1263,0x1269,0x1266,0x1266,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263,0x1263, -0x1263,0x1263,0x1263,0x1bcf,0x19f5,0x19f5,0x19f5,0x19f5,0x19f5,0x19f5,0x19f5,0x19f8,0x19f2,0x1be1,0x1be1,0x1be1, -0x1be4,0x1bde,0x1be4,0x1bde,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1287, -0x1287,0x1287,0x126c,0x1929,0x138f,0x1290,0x138f,0x138f,0x138f,0x138f,0x138f,0x138f,0x138f,0x138f,0x138f,0x138f, -0x138f,0x1290,0x138f,0x1290,0x1275,0x1275,0x131d,0x1272,0x131d,0x131d,0x131d,0x131d,0x1272,0x1272,0x1296,0x1272, -0x1272,0x1272,0x1272,0x1272,0x1272,0x1275,0x1296,0x1296,0x1275,0x1296,0x1272,0x1275,0x1275,0x1278,0x1296,0x1272, -0x1272,0x1296,0x1275,0x1275,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x1281,0x1281, -0x1281,0x1281,0x13a4,0x1386,0x128a,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x13a4,0x1827, -0x1827,0x1827,0x1827,0x1827,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1530, -0x1530,0x1a76,0x1a76,0x1a76,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284,0x1284, -0x1284,0x1284,0x1284,0x1284,0x138f,0x138f,0x1290,0x138f,0x138f,0x138f,0x1290,0x138f,0x138f,0x138f,0x128a,0x128a, -0x128a,0x128a,0x128a,0x1389,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x128d,0x138c,0x138c,0x138c,0x138c, -0x138c,0x138c,0x138c,0x128d,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x140d,0x140d, -0x19d4,0x1a76,0x1a76,0x1a76,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x128d,0x138c,0x128d, -0x128d,0x138c,0x138c,0x128d,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1, -0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1,0x12b1, -0x12b1,0x12b1,0x12b1,0x12b1,0x133b,0x1338,0x133b,0x1338,0x133b,0x1338,0x133b,0x1338,0x133b,0x1338,0x13fb,0x150f, -0x150f,0x150f,0x17a3,0x1917,0x150f,0x150f,0x16ef,0x16ef,0x16ef,0x16e9,0x16ef,0x16e9,0x191a,0x1917,0x19d1,0x19ce, -0x19d1,0x19ce,0x19d1,0x19ce,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f, -0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f,0x135f, -0x135f,0x135f,0x135f,0x135f,0x1374,0x1365,0x1374,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377, -0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377,0x1377, -0x1377,0x1377,0x1377,0x1377,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x137d,0x137d,0x137d,0x137d, -0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d, -0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x1383,0x1383,0x1383,0x1383, -0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383, -0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x1383,0x13ad,0x13aa,0x18cc,0x18cc, -0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc, -0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b3,0x13b3,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b3,0x13b6,0x13b6,0x13b6,0x13b3,0x13b6,0x13b3,0x13b6, -0x13b3,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b9,0x13b6,0x13b6,0x13b6,0x13b6,0x13b3,0x13b6,0x13b3,0x13b3,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b3,0x13b3,0x13b3,0x13b3, -0x13b3,0x13b3,0x13b3,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3, -0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x13b3,0x1539,0x1539,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x153c,0x153c,0x153c,0x153c,0x153c,0x1779,0x1779,0x1779,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x153c,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x153c,0x1779,0x1779, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b9,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x1539,0x1539,0x153c,0x153c, -0x13b6,0x13b6,0x13b9,0x13b9,0x13b9,0x16a4,0x13b6,0x13b9,0x13b6,0x13b6,0x13b9,0x153f,0x153f,0x153c,0x153c,0x1779, -0x1779,0x1779,0x1779,0x1779,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x153c,0x153c,0x153c,0x16a4,0x153c,0x153c,0x153c,0x1779,0x1779,0x1779,0x177c,0x177c,0x177c,0x177c,0x177c, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x153c, -0x13b6,0x153c,0x13b9,0x13b9,0x13b6,0x13b6,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9, -0x13b9,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b9, -0x13b9,0x13b9,0x13b9,0x13b9,0x13b9,0x13b6,0x13b6,0x13b6,0x13b9,0x13b6,0x13b6,0x13b6,0x13b6,0x13b9,0x13b9,0x13b9, -0x13b6,0x13b9,0x13b9,0x13b9,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b9,0x13b6,0x13b9,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x16a4,0x13b6,0x13b6,0x13b6,0x13b6,0x153c,0x153c,0x1779, -0x1410,0x1410,0x1410,0x1410,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x153c,0x1779,0x1779,0x1779,0x1779,0x16fe, -0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6,0x13b6, -0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153f,0x153f,0x153c,0x153c, -0x153c,0x153c,0x1830,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x153c,0x13b6, -0x13b6,0x13b6,0x13b6,0x13b6,0x149a,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc, -0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x149a,0x13bc,0x13bc,0x13bc,0x149a,0x13bc,0x149a,0x13bc,0x149a,0x13bc,0x149a, -0x13bc,0x13bc,0x13bc,0x149a,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x149a,0x149a,0x13bc,0x13bc,0x13bc,0x13bc, -0x149a,0x13bc,0x149a,0x149a,0x13bc,0x13bc,0x13bc,0x13bc,0x149a,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc, -0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x16aa,0x16aa,0x177f,0x177f,0x13bf,0x13bf,0x13bf,0x13bc,0x13bc,0x13bc,0x13bf, -0x13bf,0x13bf,0x13bf,0x13bf,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629, -0x1629,0x1629,0x1629,0x1629,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2, -0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2, -0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c5,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2, -0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c5,0x13c5,0x13c5,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2, -0x13c2,0x13c2,0x13c2,0x13c2,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8, -0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8, -0x13c8,0x13c8,0x13c8,0x13c8,0x17ac,0x17ac,0x17a9,0x1701,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1413,0x1413, -0x1413,0x1413,0x1413,0x1413,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416,0x1416, -0x1416,0x1416,0x1416,0x1545,0x1419,0x1548,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419,0x1419, -0x1419,0x1548,0x1548,0x1548,0x1548,0x1548,0x1548,0x1704,0x1704,0x1b4b,0x17b2,0x17b2,0x17b2,0x17b2,0x17b2,0x17b2, -0x17b2,0x17b2,0x1a79,0x1a79,0x1422,0x1422,0x1422,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434, -0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434,0x1434, -0x1434,0x1434,0x1434,0x1434,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f, -0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f,0x144f, -0x144f,0x144f,0x144f,0x144f,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, -0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455,0x1455, -0x1455,0x1455,0x1455,0x19da,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458, +0x117f,0x117f,0x1176,0x1176,0x1179,0x1179,0x117f,0x1176,0x1176,0x1176,0x1176,0x1176,0x1185,0x1185,0x1185,0x1185, +0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185, +0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x1185,0x11a0,0x11a0,0x11a0,0x11a0, +0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0, +0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11a0,0x11ac,0x11ac,0x11ac,0x11ac, +0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac, +0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11ac,0x11a9,0x11af,0x11bb,0x11bb,0x11bb,0x11bb, +0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb, +0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11bb,0x11c1,0x11c1,0x11c1,0x11c1, +0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x11c1,0x12ed,0x11c7,0x12f0, +0x11c7,0x11c7,0x11c7,0x11c7,0x11c4,0x11c4,0x11c4,0x11c7,0x1707,0x170a,0x1932,0x192f,0x11ca,0x11ca,0x11ca,0x11d9, +0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df, +0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11df,0x11cd, +0x11d9,0x11d9,0x11ca,0x11ca,0x11ca,0x11ca,0x11d9,0x11d9,0x11ca,0x11ca,0x11d9,0x11d9,0x11eb,0x11eb,0x11eb,0x11eb, +0x11eb,0x11eb,0x11eb,0x11eb,0x11eb,0x11eb,0x11eb,0x11eb,0x11eb,0x11eb,0x11eb,0x11eb,0x11ee,0x11eb,0x11eb,0x11eb, +0x11eb,0x11eb,0x11eb,0x11e5,0x11e5,0x11e5,0x11eb,0x11e8,0x1530,0x1533,0x1536,0x1536,0x11fd,0x11fd,0x11fd,0x11fd, +0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11f1,0x11fd,0x11f1,0x11f1, +0x11f1,0x1206,0x1206,0x11f1,0x11f1,0x1206,0x11fd,0x1206,0x1206,0x11fd,0x11f1,0x11f4,0x11fd,0x11fd,0x11fd,0x11fd, +0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd, +0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x11fd,0x1218,0x1218,0x1218,0x1218, +0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218, +0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1218,0x1230,0x1230,0x1230,0x1230, +0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230, +0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x1230,0x122d,0x122d,0x122d,0x1239,0x1239,0x1239,0x1239, +0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239, +0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1239,0x1248,0x1248,0x1248,0x1248, +0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248, +0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x1248,0x124e,0x124e,0x125a,0x125d, +0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d, +0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x1260,0x125d,0x1260,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d, +0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x125d,0x1260,0x125d,0x125d,0x125d,0x125d,0x125a,0x125a,0x125a,0x124e, +0x124e,0x124e,0x124e,0x125a,0x125a,0x1254,0x1251,0x1257,0x1257,0x1266,0x1263,0x1263,0x1269,0x1269,0x1269,0x1269, +0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269, +0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x126f,0x126f,0x126f,0x126c, +0x126c,0x126c,0x1269,0x1269,0x1269,0x1269,0x126c,0x1269,0x1269,0x1269,0x126f,0x126c,0x126f,0x126c,0x1269,0x1269, +0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269, +0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x126f,0x126c,0x126c,0x1269,0x1269,0x1269,0x1269, +0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1269,0x1be1,0x1a07,0x1a07,0x1a07,0x1a07, +0x1a07,0x1a07,0x1a07,0x1a0a,0x1a04,0x1bf3,0x1bf3,0x1bf3,0x1bf6,0x1bf0,0x1bf6,0x1bf0,0x128a,0x128a,0x128a,0x128a, +0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128d,0x128d,0x128d,0x1272,0x1938,0x1398,0x1296,0x1398,0x1398, +0x1398,0x1398,0x1398,0x1398,0x1398,0x1398,0x1398,0x1398,0x1398,0x1296,0x1398,0x1296,0x127b,0x127b,0x1323,0x1278, +0x1323,0x1323,0x1323,0x1323,0x1278,0x1278,0x129c,0x1278,0x1278,0x1278,0x1278,0x1278,0x1278,0x127b,0x129c,0x129c, +0x127b,0x129c,0x1278,0x127b,0x127b,0x127e,0x129c,0x1278,0x1278,0x129c,0x127b,0x127b,0x1395,0x1395,0x1395,0x1395, +0x1395,0x1395,0x1395,0x1395,0x1395,0x1395,0x1287,0x1287,0x1287,0x1287,0x13ad,0x138f,0x1290,0x13ad,0x13ad,0x13ad, +0x13ad,0x13ad,0x13ad,0x13ad,0x13ad,0x13ad,0x13ad,0x1836,0x1836,0x1836,0x1836,0x1836,0x128a,0x128a,0x128a,0x128a, +0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x1539,0x1539,0x1a88,0x1a88,0x1a88,0x128a,0x128a,0x128a,0x128a, +0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x128a,0x1398,0x1398,0x1296,0x1398, +0x1398,0x1398,0x1296,0x1398,0x1398,0x1398,0x1290,0x1290,0x1290,0x1290,0x1290,0x1392,0x1395,0x1395,0x1395,0x1395, +0x1395,0x1395,0x1395,0x1293,0x1395,0x1395,0x1395,0x1395,0x1395,0x1395,0x1395,0x1293,0x1395,0x1395,0x1395,0x1395, +0x1395,0x1395,0x1395,0x1395,0x1395,0x1395,0x1416,0x1416,0x19e6,0x1a88,0x1a88,0x1a88,0x1395,0x1395,0x1395,0x1395, +0x1395,0x1395,0x1395,0x1395,0x1395,0x1293,0x1395,0x1293,0x1293,0x1395,0x1395,0x1293,0x12b7,0x12b7,0x12b7,0x12b7, +0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7, +0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x12b7,0x1341,0x133e,0x1341,0x133e, +0x1341,0x133e,0x1341,0x133e,0x1341,0x133e,0x1404,0x1518,0x1518,0x1518,0x17b2,0x1926,0x1518,0x1518,0x16fe,0x16fe, +0x16fe,0x16f8,0x16fe,0x16f8,0x1929,0x1926,0x19e3,0x19e0,0x19e3,0x19e0,0x19e3,0x19e0,0x1365,0x1365,0x1365,0x1365, +0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365, +0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x1365,0x137a,0x136b,0x137a,0x1380, +0x1380,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d, +0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x137d,0x136b,0x136b,0x136b,0x136b, +0x136b,0x136b,0x136b,0x136b,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386, +0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386,0x1386, +0x1386,0x1386,0x1386,0x1386,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c,0x138c, +0x138c,0x138c,0x138c,0x138c,0x13b6,0x13b3,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db, +0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db, +0x18db,0x18db,0x18db,0x18db,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bc,0x13bc,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bc,0x13bf,0x13bf,0x13bf,0x13bc,0x13bf,0x13bc,0x13bf,0x13bc,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13c2,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bc,0x13bf,0x13bc,0x13bc,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc, +0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x13bc,0x1542,0x1542, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1788,0x1788,0x1788, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x1545,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x1545,0x1788,0x1788,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13c2,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x1545,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1542,0x1542,0x1545,0x1545,0x13bf,0x13bf,0x13c2,0x13c2,0x13c2,0x16b3,0x13bf,0x13c2, +0x13bf,0x13bf,0x13c2,0x1548,0x1548,0x1545,0x1545,0x1788,0x1788,0x1788,0x1788,0x1788,0x1545,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x1545,0x1545,0x1545,0x16b3,0x1545,0x1545,0x1545, +0x1788,0x1788,0x1788,0x178b,0x178b,0x178b,0x178b,0x178b,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x1545,0x13bf,0x1545,0x13c2,0x13c2,0x13bf,0x13bf,0x13c2,0x13c2, +0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2, +0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13c2,0x13bf,0x13bf,0x13bf, +0x13c2,0x13bf,0x13bf,0x13bf,0x13bf,0x13c2,0x13c2,0x13c2,0x13bf,0x13c2,0x13c2,0x13c2,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13c2,0x13bf,0x13c2,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x16b3,0x13bf,0x13bf,0x13bf,0x13bf,0x1545,0x1545,0x1788,0x1419,0x1419,0x1419,0x1419,0x1542,0x1542,0x1542,0x1542, +0x1542,0x1542,0x1545,0x1788,0x1788,0x1788,0x1788,0x170d,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf, +0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1548,0x1548,0x1545,0x1545,0x1545,0x1545,0x183f,0x1545,0x1545,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545, +0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1545,0x13bf,0x13bf,0x13bf,0x13bf,0x13bf,0x14a3,0x13c5,0x13c5,0x13c5, +0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x14a3,0x13c5,0x13c5, +0x13c5,0x14a3,0x13c5,0x14a3,0x13c5,0x14a3,0x13c5,0x14a3,0x13c5,0x13c5,0x13c5,0x14a3,0x13c5,0x13c5,0x13c5,0x13c5, +0x13c5,0x13c5,0x14a3,0x14a3,0x13c5,0x13c5,0x13c5,0x13c5,0x14a3,0x13c5,0x14a3,0x14a3,0x13c5,0x13c5,0x13c5,0x13c5, +0x14a3,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x13c5,0x16b9,0x16b9,0x178e, +0x178e,0x13c8,0x13c8,0x13c8,0x13c5,0x13c5,0x13c5,0x13c8,0x13c8,0x13c8,0x13c8,0x13c8,0x1638,0x1638,0x1638,0x1638, +0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x13cb,0x13cb,0x13cb,0x13cb, +0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb, +0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13ce, +0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb, +0x13ce,0x13ce,0x13ce,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13cb,0x13d1,0x13d1,0x13d1,0x13d1, +0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1, +0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x13d1,0x17bb,0x17bb,0x17b8,0x1710, +0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141c,0x141c,0x141c,0x141c,0x141c,0x141c,0x141f,0x141f,0x141f,0x141f, +0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x141f,0x154e,0x1422,0x1551,0x1422,0x1422, +0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1422,0x1551,0x1551,0x1551,0x1551,0x1551,0x1551,0x1713, +0x1713,0x1b5d,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x17c1,0x1a8b,0x1a8b,0x142b,0x142b,0x142b,0x143d, +0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d, +0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x143d,0x1458,0x1458,0x1458,0x1458, 0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458, -0x1458,0x1458,0x1458,0x1458,0x145e,0x145e,0x146a,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470, -0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470, -0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x146a,0x146a,0x146a,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e, -0x145e,0x145e,0x145e,0x146a,0x146d,0x1470,0x1473,0x1473,0x1470,0x1476,0x1476,0x1461,0x1464,0x170a,0x170d,0x170d, -0x170d,0x154e,0x1a82,0x1a7f,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x154b,0x1713, -0x1716,0x1710,0x1719,0x1719,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491, -0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491,0x1491, -0x1491,0x1491,0x1491,0x1491,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb, -0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x18ff,0x18ff, -0x18ff,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x19c8,0x14eb,0x14eb, -0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x14eb,0x1863,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff, -0x18ff,0x18ff,0x18ff,0x18ff,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539,0x1539, -0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x153f,0x153c,0x153c,0x153c,0x153c,0x16a7,0x16a7,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x182d,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c, -0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x153c,0x155d,0x155d,0x155d,0x155d, -0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d, -0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x155d,0x156f,0x156f,0x156f,0x156f, -0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f, -0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x156f,0x1575,0x1575,0x1575,0x1575, -0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575, -0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1575,0x1578,0x1578,0x1578,0x1578, +0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x1458,0x145e,0x145e,0x145e,0x145e, +0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e, +0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x145e,0x19ec,0x1461,0x1461,0x1461,0x1461, +0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461, +0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1461,0x1467,0x1467,0x1473,0x1479, +0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479, +0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1479,0x1473, +0x1473,0x1473,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1467,0x1473,0x1476,0x1479,0x147c,0x147c, +0x1479,0x147f,0x147f,0x146a,0x146d,0x1719,0x171c,0x171c,0x171c,0x1557,0x1a94,0x1a91,0x1470,0x1470,0x1470,0x1470, +0x1470,0x1470,0x1470,0x1470,0x1470,0x1470,0x1554,0x1722,0x1725,0x171f,0x1728,0x1728,0x149a,0x149a,0x149a,0x149a, +0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a, +0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x149a,0x14f4,0x14f4,0x14f4,0x14f4, +0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4, +0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x190e,0x190e,0x190e,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4, +0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x19da,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x14f4,0x1872,0x190e, +0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x1545,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545, +0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1542,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1548,0x1545,0x1545,0x1545,0x1545,0x16b6,0x16b6,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x183c,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545,0x1545, +0x1545,0x1545,0x1545,0x1545,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566, +0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566,0x1566, +0x1566,0x1566,0x1566,0x1566,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578, 0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578, -0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x1578,0x15a2,0x15a2,0x15a2,0x15a2, -0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x15a2,0x159c,0x159c,0x159c,0x1590,0x1590,0x1590,0x159c,0x159c, -0x1590,0x159f,0x1593,0x1590,0x15a5,0x15a5,0x1599,0x15a5,0x15a5,0x1596,0x17b5,0x1bdb,0x15b7,0x15b7,0x15b7,0x15b7, -0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7, -0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15b7,0x15a8,0x15c0,0x15c0,0x15c0,0x15c0, -0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0, -0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15c0,0x15ba,0x15c3,0x15c3,0x15c3,0x15c3,0x15c6,0x15c6,0x15c6,0x15c6, +0x1578,0x1578,0x1578,0x1578,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e, +0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e,0x157e, +0x157e,0x157e,0x157e,0x157e,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581, +0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581,0x1581, +0x1581,0x1581,0x1581,0x1581,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1,0x15b1, +0x15ab,0x15ab,0x15ab,0x159f,0x159f,0x159f,0x15ab,0x15ab,0x159f,0x15ae,0x15a2,0x159f,0x15b4,0x15b4,0x15a8,0x15b4, +0x15b4,0x15a5,0x17c4,0x1bed,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6, 0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6, -0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15c6,0x15e1,0x15e1,0x15e1,0x15e1, -0x15e1,0x15e1,0x15e1,0x15e1,0x15d8,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1, -0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15e1,0x15ea,0x15ea,0x15ea,0x15ea, -0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea, -0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15ea,0x15fc,0x15fc,0x15fc,0x15fc, -0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15f9,0x15f9,0x15f9,0x15ed, -0x15ed,0x15ed,0x15ed,0x15ed,0x15ed,0x15ed,0x15ed,0x15f9,0x15f9,0x15ed,0x15f9,0x15f0,0x15fc,0x15fc,0x15fc,0x15fc, -0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc, -0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x1620,0x1620,0x1620,0x1620, -0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620, -0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x1620,0x161d,0x161d,0x161d,0x1629,0x1629,0x1629,0x1629, -0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629,0x1629, -0x1629,0x1629,0x162f,0x162f,0x162f,0x162c,0x162c,0x162c,0x1629,0x1629,0x1629,0x1629,0x163e,0x163e,0x163e,0x163e, -0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x1632,0x1632,0x1632,0x1632, -0x1632,0x1632,0x1632,0x1644,0x1644,0x1638,0x1635,0x1635,0x1635,0x1635,0x1635,0x1635,0x163e,0x163e,0x163e,0x163e, -0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e, -0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x163e,0x164a,0x164a,0x164a,0x164a, -0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a,0x164a, -0x164a,0x164a,0x164a,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x1647,0x164d,0x164d,0x164d,0x164d, +0x15c6,0x15c6,0x15c6,0x15b7,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf, +0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15cf,0x15c9, +0x15d2,0x15d2,0x15d2,0x15d2,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5, +0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5,0x15d5, +0x15d5,0x15d5,0x15d5,0x15d5,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15e7,0x15f0,0x15f0,0x15f0, +0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0,0x15f0, +0x15f0,0x15f0,0x15f0,0x15f0,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9, +0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9,0x15f9, +0x15f9,0x15f9,0x15f9,0x15f9,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b, +0x160b,0x160b,0x160b,0x160b,0x1608,0x1608,0x1608,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x15fc,0x1608, +0x1608,0x15fc,0x1608,0x15ff,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b, +0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b,0x160b, +0x160b,0x160b,0x160b,0x160b,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f, +0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f,0x162f, +0x162f,0x162c,0x162c,0x162c,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638, +0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x1638,0x163e,0x163e,0x163e,0x163b,0x163b,0x163b, +0x1638,0x1638,0x1638,0x1638,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d, +0x164d,0x164d,0x164d,0x164d,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1641,0x1653,0x1653,0x1647,0x1644,0x1644, +0x1644,0x1644,0x1644,0x1644,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d, 0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d, -0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x164d,0x1671,0x1671,0x1671,0x1671, -0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671, -0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x1671,0x167a,0x167a,0x167a,0x167a, -0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a, -0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x167a,0x1692,0x1692,0x1692,0x1692, -0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x167d,0x168c,0x168c,0x167d, -0x167d,0x167d,0x167d,0x167d,0x167d,0x168c,0x167d,0x168f,0x168f,0x167d,0x168f,0x167d,0x1692,0x1692,0x1692,0x1692, -0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692, -0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x1692,0x169b,0x169b,0x169b,0x169b, -0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b, -0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x169b,0x16a1,0x16a1,0x16a1,0x16a1, +0x164d,0x164d,0x164d,0x164d,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659, +0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1659,0x1656,0x1656,0x1656,0x1656,0x1656, +0x1656,0x1656,0x1656,0x1656,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c, +0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c,0x165c, +0x165c,0x165c,0x165c,0x165c,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680, +0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680,0x1680, +0x1680,0x1680,0x1680,0x1680,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689, +0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689,0x1689, +0x1689,0x1689,0x1689,0x1689,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1, +0x16a1,0x16a1,0x16a1,0x16a1,0x168c,0x169b,0x169b,0x168c,0x168c,0x168c,0x168c,0x168c,0x168c,0x169b,0x168c,0x169e, +0x169e,0x168c,0x169e,0x168c,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1, 0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1, -0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x16a1,0x18ff,0x18ff,0x18ff,0x18ff, -0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x16e6,0x16e6,0x16e6,0x16e6,0x18ff,0x18ff,0x18ff,0x18ff, -0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x18ff,0x19c8,0x1707,0x1707,0x1707,0x1707, -0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707, -0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1707,0x1746,0x1746,0x1746,0x1746, -0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746, -0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x174c,0x1749, -0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746,0x1746, -0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f, -0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f,0x174f, -0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752, -0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752,0x1752, -0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764, -0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764,0x1764, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767,0x1767, -0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a, -0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a, -0x176a,0x176a,0x176a,0x176d,0x176d,0x176d,0x176d,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a,0x176a, -0x176a,0x176a,0x176a,0x176a,0x176a,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176a,0x176d,0x176d, -0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d, -0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d,0x176d, -0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785, -0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785,0x1785, -0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x186f,0x1ae5,0x1a3a,0x1a3a,0x1a3d, -0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x1788,0x178b,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x18d5, -0x1788,0x1788,0x1788,0x1788,0x1788,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836, -0x1836,0x1836,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3, -0x1788,0x19b3,0x19b3,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1ae2,0x1bb4,0x1a3d,0x1a3d,0x1a3d, -0x18d2,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d2,0x18d2, -0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1a79,0x1b4b,0x1b4e,0x1b48,0x1b48,0x1b48,0x1b48,0x1b48,0x1b48, -0x1b48,0x1b48,0x1b48,0x192c,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af,0x17af, -0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1839,0x1836,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2, -0x1839,0x18d5,0x18d5,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x1839,0x1836,0x17b8,0x1839,0x1839,0x1839,0x1a3a, -0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x17b8,0x1836,0x1836,0x1836,0x1836,0x1836,0x18d2,0x19b3,0x19b3,0x19b3, -0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x1836,0x18d2, -0x17cd,0x17cd,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca, -0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca,0x17ca, -0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd, -0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd,0x17cd, -0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b, -0x181b,0x181b,0x181b,0x181b,0x181b,0x1818,0x1818,0x1818,0x1803,0x1803,0x1803,0x1803,0x1803,0x1803,0x1803,0x1803, -0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b, -0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b,0x181b, -0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, -0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f,0x183f, -0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842, -0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842,0x1842, -0x1842,0x1842,0x1842,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee,0x1aee, -0x1899,0x1899,0x1899,0x1899,0x19ec,0x19ec,0x189c,0x189c,0x189c,0x189c,0x1884,0x1884,0x1884,0x1884,0x1884,0x1884, -0x1884,0x1884,0x1884,0x1884,0x1884,0x1884,0x1884,0x1896,0x1887,0x188a,0x188d,0x189f,0x189f,0x193e,0x1890,0x1890, -0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899, -0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899,0x1899, -0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba, -0x18ba,0x18ba,0x18ba,0x18a5,0x18ab,0x18a8,0x18a8,0x18a8,0x18a8,0x18b7,0x18bd,0x18a8,0x18a8,0x18a8,0x18a8,0x18b4, -0x18ba,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba, -0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba,0x18ba, -0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x18c6,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad, -0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ad9,0x1ba5,0x1ba5,0x1ba5, -0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc, -0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc,0x18cc, -0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x19b3,0x19b3,0x19b3,0x19b3, -0x19b3,0x1a3a,0x1ae2,0x19b3,0x19b3,0x19b3,0x19b3,0x1ae5,0x1ae2,0x1bb4,0x19b3,0x1a3a,0x19b3,0x19b3,0x19b3,0x19b3, -0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x18d2,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3, -0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b3, +0x16a1,0x16a1,0x16a1,0x16a1,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa, +0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa,0x16aa, +0x16aa,0x16aa,0x16aa,0x16aa,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0, +0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0,0x16b0, +0x16b0,0x16b0,0x16b0,0x16b0,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e, +0x16f5,0x16f5,0x16f5,0x16f5,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e,0x190e, +0x190e,0x190e,0x190e,0x19da,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716, +0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716,0x1716, +0x1716,0x1716,0x1716,0x1716,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755, +0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755, +0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x175b,0x1758,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755, +0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x1755,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e, +0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e, +0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x175e,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761, +0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761, +0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1761,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773, +0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773, +0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1773,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776, +0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776, +0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1776,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779, +0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779, +0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x177c,0x177c,0x177c,0x177c,0x1779, +0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x1779,0x177c,0x177c,0x177c, +0x177c,0x177c,0x177c,0x177c,0x177c,0x1779,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c, +0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c, +0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x177c,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794, +0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794, +0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x1794,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e,0x187e, +0x187e,0x187e,0x187e,0x187e,0x1af7,0x1a4c,0x1a4c,0x1a4f,0x1797,0x1797,0x1797,0x1797,0x1797,0x1797,0x1797,0x1797, +0x179a,0x1848,0x1848,0x1848,0x1848,0x1848,0x1848,0x18e4,0x1797,0x1797,0x1797,0x1797,0x1797,0x1845,0x1845,0x1845, +0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, +0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x1797,0x19c5,0x19c5,0x1a4c,0x1a4c,0x1a4c,0x1a4c,0x1a4c, +0x1a4c,0x1a4c,0x1a4c,0x1af4,0x1bc6,0x1a4f,0x1a4f,0x1a4f,0x18e1,0x18e4,0x18e4,0x18e4,0x18e4,0x18e4,0x18e4,0x18e4, +0x18e4,0x18e4,0x18e4,0x18e4,0x18e4,0x18e4,0x18e1,0x18e1,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b,0x1a8b, +0x1b5d,0x1b60,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x1b5a,0x193b,0x17be,0x17be,0x17be,0x17be, +0x17be,0x17be,0x17be,0x17be,0x17be,0x17be,0x17be,0x17be,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1848,0x1845, +0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x1848,0x18e4,0x18e4,0x1848,0x1848,0x1848,0x1848,0x1848, +0x1848,0x1848,0x1845,0x17c7,0x1848,0x1848,0x1848,0x1a4c,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x17c7,0x1845, +0x1845,0x1845,0x1845,0x1845,0x18e1,0x19c5,0x19c5,0x19c5,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845, +0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x1845,0x18e1,0x17dc,0x17dc,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9, +0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9, +0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17d9,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc, +0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc, +0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x17dc,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a, +0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x1827,0x1827,0x1827, +0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x1812,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a, +0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a, +0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x182a,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e, +0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e, +0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x184e,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851, +0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851, +0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1851,0x1b00,0x1b00,0x1b00,0x1b00,0x1b00, +0x1b00,0x1b00,0x1b00,0x1b00,0x1b00,0x1b00,0x1b00,0x1b00,0x18a8,0x18a8,0x18a8,0x18a8,0x19fe,0x19fe,0x18ab,0x18ab, +0x18ab,0x18ab,0x1893,0x1893,0x1893,0x1893,0x1893,0x1893,0x1893,0x1893,0x1893,0x1893,0x1893,0x1893,0x1893,0x18a5, +0x1896,0x1899,0x189c,0x18ae,0x18ae,0x194d,0x189f,0x189f,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8, +0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8, +0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18a8,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9, +0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18b4,0x18ba,0x18b7,0x18b7,0x18b7, +0x18b7,0x18c6,0x18cc,0x18b7,0x18b7,0x18b7,0x18b7,0x18c3,0x18c9,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7,0x18b7, +0x18b7,0x18b7,0x18b7,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9, +0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18c9,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5,0x18d5, +0x18d5,0x18d5,0x18d5,0x19bf,0x19bf,0x19bf,0x19bf,0x19bf,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb, +0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1aeb,0x1bb7,0x1bb7,0x1bb7,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db, 0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db, -0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db, -0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de, -0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x18de,0x1bb7, -0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, -0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, -0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953, -0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953,0x1953, -0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e, -0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e,0x196e, -0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974, -0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974,0x1974, -0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f, -0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f,0x198f, -0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992, -0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992,0x1992, -0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b, -0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x199b,0x1998,0x1998,0x1998, -0x19b3,0x19b3,0x19b3,0x1ae2,0x1ae2,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1a3a,0x1ae2,0x1ae2,0x1ae2,0x1a3a,0x1a3a, -0x19b3,0x19b3,0x19b3,0x19b3,0x19b3,0x19b6,0x19b6,0x19b3,0x19b6,0x19b6,0x1a3a,0x1a3d,0x1a3a,0x1a3a,0x1a3a,0x1a3a, -0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef, -0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef,0x19ef, -0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16, -0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16,0x1a16, -0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f, -0x1a55,0x1a55,0x1a1f,0x1a55,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a1f,0x1a25,0x1a25,0x1a25, -0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31, -0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31, -0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4, -0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4,0x1ac4, -0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0, -0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0,0x1ad0, -0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4, -0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4,0x1af4, -0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7, -0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7,0x1af7, -0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c, -0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c,0x1b6c, -0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d, -0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d,0x1b8d, +0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18db,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1, +0x18e1,0x18e1,0x18e1,0x18e1,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x1a4c,0x1af4,0x19c5,0x19c5,0x19c5,0x19c5,0x1af7, +0x1af4,0x1bc6,0x19c5,0x1a4c,0x19c5,0x19c5,0x19c5,0x19c5,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x18e1,0x19c5, +0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5, +0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea, +0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea, +0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ea,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed, +0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed, +0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x18ed,0x1bc9,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0, +0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0, +0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x18f0,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962, +0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962, +0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x1962,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d, +0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d, +0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x197d,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983, +0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983, +0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x1983,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1, +0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1, +0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a1,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4, +0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4, +0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19a4,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad, +0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19ad, +0x19ad,0x19ad,0x19ad,0x19ad,0x19ad,0x19aa,0x19aa,0x19aa,0x19c5,0x19c5,0x19c5,0x1af4,0x1af4,0x1a4c,0x1a4c,0x1a4c, +0x1a4c,0x1a4c,0x1a4c,0x1af4,0x1af4,0x1af4,0x1a4c,0x1a4c,0x19c5,0x19c5,0x19c5,0x19c5,0x19c5,0x19c8,0x19c8,0x19c5, +0x19c8,0x19c8,0x1a4c,0x1a4f,0x1a4c,0x1a4c,0x1a4c,0x1a4c,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01, +0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01, +0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a01,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28, +0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28, +0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a28,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31, +0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a67,0x1a67,0x1a31,0x1a67,0x1a31,0x1a31,0x1a31,0x1a31, +0x1a31,0x1a31,0x1a31,0x1a31,0x1a31,0x1a37,0x1a37,0x1a37,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43, +0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43, +0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1a43,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6, +0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6, +0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ad6,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2, +0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2, +0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1ae2,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06, +0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06, +0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b06,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09, +0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09, +0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b09,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e, +0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e, +0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b7e,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f, 0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f, -0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f, -0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2, -0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2,0x1ba2, -0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc,0x1bfc, -0x1bfc,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9,0x1bf9, -0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b, -0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b,0x1c3b, -0,0,0,0 +0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1b9f,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1, +0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1, +0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb1,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4, +0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4, +0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1bb4,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e, +0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0e,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b, +0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c0b,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d, +0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d, +0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c4d,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59, +0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59, +0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0x1c59,0,0,0,0 }; static const UTrie2 propsVectorsTrie={ propsVectorsTrie_index, - propsVectorsTrie_index+5348, + propsVectorsTrie_index+5368, nullptr, - 5348, - 27344, + 5368, + 27396, 0xa40, - 0x1564, + 0x1578, 0x0, 0x0, 0x110000, - 0x7fb0, + 0x7ff8, nullptr, 0, false, false, 0, nullptr }; -static const uint32_t propsVectors[7230]={ +static const uint32_t propsVectors[7260]={ 0x67,0,0,0x67,0,0xe00000,0x67,0x80000,0x20,0x867,0,0,0xa67,0,0,0xb67, 0,0,0xd67,0,0,0xe67,0,0,0x1067,0,0,0x1167,0,0,0x1267,0, 0,0x1367,0,0,0x1467,0,0,0x1567,0,0,0x1667,0,0,0x1767,0,0, 0x1867,0,0,0x1967,0,0,0x1a67,0,0,0x1b67,0,0,0x1d67,0,0,0x1f67, 0,0,0x2067,0,0,0x2267,0,0,0x2367,0,0,0x2467,0,0,0x2567,0, 0,0x2767,0,0,0x2867,0x80000,0x20,0x2967,0,0,0x2a67,0,0x1600000,0x2b67,0,0, -0x2d67,0,0,0x3167,0x20000000,0,0x3267,0x20000000,0,0x3a67,0,0,0x3b67,0,0,0x3c67, -0,0,0x3e67,0,0,0x4067,0,0,0x4167,0,0,0x4467,0,0,0x4867,0, -0,0x4967,0,0,0x4a67,0,0,0x5067,0,0,0x5167,0,0,0x5467,0,0, -0x5567,0,0,0x5667,0x80000,0x20,0x5767,0,0,0x5867,0,0,0x5967,0,0,0x5b67, -0,0,0x5c67,0,0,0x5d67,0,0,0x6067,0x80000,0x20,0x6267,0,0,0x6367,0, -0,0x6467,0,0,0x6567,0,0,0x6f67,0,0,0x7067,0,0,0x7367,0x20000000,0, -0x7567,0,0,0x7667,0,0,0x7767,0,0,0x7867,0,0,0x7a67,0,0,0x7b67, -0,0,0x7c67,0,0,0x7e67,0,0,0x7f67,0,0,0x8167,0,0,0x8267,0, -0,0x8467,0,0,0x8567,0,0,0x8667,0,0,0x8767,0,0,0x8967,0,0, -0x8b67,0,0,0x8c67,0,0,0x8e67,0x20000000,0,0x8f67,0,0,0x9067,0,0,0x9167, -0,0,0x9267,0,0,0x9367,0,0,0x9567,0,0,0x9667,0,0,0x9767,0, -0,0x9867,0,0,0x9967,0,0,0x9a67,0,0,0x9c67,0,0,0x9f67,0,0, -0xa167,0,0,0xa367,0,0,0xa467,0,0,0xa567,0,0,0xa667,0,0,0xa767, -0,0,0xa867,0,0,0xa967,0,0,0xaa67,0,0xe00000,0xab67,0,0xe00000,0xac67,0, -0,0xad67,0,0,0xae67,0,0,0xaf67,0,0,0xb167,0,0,0xb267,0,0, -0xb467,0,0,0xb567,0,0,0xb767,0,0,0xb867,0,0,0xb967,0,0,0xba67, -0,0,0xbc67,0,0,0xbd67,0,0,0xbe67,0,0,0xbf67,0,0,0xc067,0, -0,0xc167,0,0,0xc367,0,0xe00000,0xc467,0,0xe00000,0xc667,0,0,0xc767,0,0, -0xc867,0,0,0xc967,0,0,0xca67,0,0,0xcc67,0,0xe00000,0xcf67,0,0xe00000,0xd067, -0,0xe00000,0xd367,0,0,0xd467,0,0,0xd567,0,0,0xd667,0,0,0xd867,0, -0,0xda67,0,0,0xdb67,0,0,0xdc67,0,0,0xdd67,0,0,0xde67,0,0, -0xdf67,0,0,0xe067,0,0,0xe167,0,0,0xe267,0,0,0xe367,0,0xe00000,0xe467, -0,0,0xe567,0,0,0xe667,0,0,0xe767,0,0,0xe867,0,0,0xe967,0, -0,0xea67,0,0,0xeb67,0,0,0xec67,0,0,0xed67,0,0,0xee67,0,0, -0xef67,0,0,0xf167,0,0,0xf367,0,0,0xf567,0,0,0xf667,0,0,0xf767, -0,0,0xf867,0,0,0xf967,0,0,0xfa67,0,0xe00000,0xfb67,0,0,0xfc67,0, -0,0xfd67,0,0,0xfe67,0,0,0x10167,0,0,0x10267,0,0,0x10367,0,0, -0x10467,0,0,0x10667,0,0,0x10767,0,0,0x10867,0,0,0x10967,0,0,0x10a67, -0,0,0x10b67,0,0,0x10c67,0,0,0x10d67,0,0,0x10e67,0,0,0x10f67,0, -0,0x11067,0,0,0x11367,0,0,0x11467,0,0,0x11567,0,0,0x11667,0,0, -0x11767,0,0,0x11867,0,0,0x11967,0,0xe00000,0x11a67,0,0,0x11b67,0,0,0x11c67, -0,0,0x11d67,0,0,0x11e67,0,0,0x11f67,0,0,0x12067,0,0,0x12167,0, -0,0x12267,0,0,0x12367,0,0,0x12467,0,0,0x12567,0,0,0x12667,0,0, -0x12767,0,0,0x12867,0,0,0x12967,0,0,0x12a67,0,0xe00000,0x12b67,0,0,0x12c67, -0,0,0x12d67,0,0,0x12f67,0,0,0x13067,0,0,0x13167,0,0,0x13267,0, -0,0x13367,0,0,0x13467,0,0,0x13567,0,0,0x13667,0,0,0x13767,0,0, -0x13867,0,0,0x13967,0,0,0x13a67,0,0,0x13b67,0,0,0x13c67,0,0,0x13d67, -0,0,0x13f67,0,0,0x14067,0,0,0x14167,0,0,0x14367,0,0,0x14467,0, -0,0x14567,0,0,0x14667,0,0,0x14767,0,0,0xa0067,0,0xe00000,0xa4f67,0,0xe00000, -0xa5f67,0,0xe00000,0xac567,0,0xe00000,0xad167,0,0xe00000,0xb0067,0,0xe00000,0xb1267,0,0xe00000,0xb2e67, +0x2d67,0,0,0x3167,0x20000000,0,0x3267,0x20000000,0,0x3a67,0,0,0x3b67,0,0,0x3e67, +0,0,0x4067,0,0,0x4167,0,0,0x4467,0,0,0x4867,0,0,0x4967,0, +0,0x4a67,0,0,0x5067,0,0,0x5167,0,0,0x5467,0,0,0x5567,0,0, +0x5667,0x80000,0x20,0x5767,0,0,0x5867,0,0,0x5967,0,0,0x5b67,0,0,0x5c67, +0,0,0x5d67,0,0,0x6067,0x80000,0x20,0x6267,0,0,0x6367,0,0,0x6467,0, +0,0x6567,0,0,0x6f67,0,0,0x7067,0,0,0x7367,0x20000000,0,0x7567,0,0, +0x7667,0,0,0x7767,0,0,0x7867,0,0,0x7a67,0,0,0x7b67,0,0,0x7c67, +0,0,0x7e67,0,0,0x7f67,0,0,0x8167,0,0,0x8267,0,0,0x8467,0, +0,0x8567,0,0,0x8667,0,0,0x8767,0,0,0x8967,0,0,0x8b67,0,0, +0x8c67,0,0,0x8e67,0x20000000,0,0x8f67,0,0,0x9067,0,0,0x9167,0,0,0x9267, +0,0,0x9367,0,0,0x9567,0,0,0x9667,0,0,0x9767,0,0,0x9867,0, +0,0x9967,0,0,0x9a67,0,0,0x9c67,0,0,0x9f67,0,0,0xa167,0,0, +0xa367,0,0,0xa467,0,0,0xa567,0,0,0xa667,0,0,0xa767,0,0,0xa867, +0,0,0xa967,0,0,0xaa67,0,0xe00000,0xab67,0,0xe00000,0xac67,0,0,0xad67,0, +0,0xae67,0,0,0xaf67,0,0,0xb167,0,0,0xb267,0,0,0xb467,0,0, +0xb567,0,0,0xb767,0,0,0xb867,0,0,0xb967,0,0,0xba67,0,0,0xbc67, +0,0,0xbd67,0,0,0xbe67,0,0,0xbf67,0,0,0xc067,0,0,0xc167,0, +0,0xc367,0,0xe00000,0xc467,0,0xe00000,0xc667,0,0,0xc767,0,0,0xc867,0,0, +0xc967,0,0,0xca67,0,0,0xcc67,0,0xe00000,0xcf67,0,0xe00000,0xd067,0,0xe00000,0xd367, +0,0,0xd467,0,0,0xd567,0,0,0xd667,0,0,0xd867,0,0,0xda67,0, +0,0xdb67,0,0,0xdc67,0,0,0xdd67,0,0,0xde67,0,0,0xdf67,0,0, +0xe067,0,0,0xe167,0,0,0xe267,0,0,0xe367,0,0xe00000,0xe467,0,0,0xe567, +0,0,0xe667,0,0,0xe767,0,0,0xe867,0,0,0xe967,0,0,0xea67,0, +0,0xeb67,0,0,0xec67,0,0,0xed67,0,0,0xee67,0,0,0xef67,0,0, +0xf167,0,0,0xf367,0,0,0xf567,0,0,0xf667,0,0,0xf767,0,0,0xf867, +0,0,0xf967,0,0,0xfa67,0,0xe00000,0xfb67,0,0,0xfc67,0,0,0xfd67,0, +0,0xfe67,0,0,0x10167,0,0,0x10267,0,0,0x10367,0,0,0x10467,0,0, +0x10667,0,0,0x10767,0,0,0x10867,0,0,0x10967,0,0,0x10a67,0,0,0x10b67, +0,0,0x10c67,0,0,0x10d67,0,0,0x10e67,0,0,0x10f67,0,0,0x11067,0, +0,0x11367,0,0,0x11467,0,0,0x11567,0,0,0x11667,0,0,0x11767,0,0, +0x11867,0,0,0x11967,0,0xe00000,0x11a67,0,0,0x11b67,0,0,0x11c67,0,0,0x11d67, +0,0,0x11e67,0,0,0x11f67,0,0,0x12067,0,0,0x12167,0,0,0x12267,0, +0,0x12367,0,0,0x12467,0,0,0x12567,0,0,0x12667,0,0,0x12767,0,0, +0x12867,0,0,0x12967,0,0,0x12a67,0,0xe00000,0x12b67,0,0,0x12c67,0,0,0x12d67, +0,0,0x12f67,0,0,0x13067,0,0,0x13167,0,0,0x13267,0,0,0x13367,0, +0,0x13467,0,0,0x13567,0,0,0x13667,0,0,0x13767,0,0,0x13867,0,0, +0x13967,0,0,0x13a67,0,0,0x13b67,0,0,0x13c67,0,0,0x13d67,0,0,0x13f67, +0,0,0x14067,0,0,0x14167,0,0,0x14367,0,0,0x14467,0,0,0x14567,0, +0,0x14667,0,0,0x14767,0,0,0xa0067,0,0xe00000,0xa4f67,0,0xe00000,0xa5f67,0,0xe00000, +0xac567,0,0xe00000,0xad167,0,0xe00000,0xb0067,0,0xe00000,0xb1267,0,0xe00000,0xb2e67,0,0xe00000,0xb4867, 0,0xe00000,0x11000100,0,0x900020,0x11000100,0x40000001,0x440020,0x11000100,0x40000001,0x643020,0x11000100,0x40000001,0xa5a040,0x11000100,0x40000001, 0x116a8a0,0x11000200,0,0x900020,0x11000200,0x4000001,0xc4000b,0x11000200,0x7c00100,0x220402,0x11000200,0x24000000,0x200000,0x11000200,0x24000008,0x1710000, 0x11000200,0x40000001,0x1d3b020,0x11000219,0x7c00100,0x220401,0x11000219,0x7c00100,0x250401,0x11000319,0x7c00100,0x220401,0x11000319,0x7c00100,0x220402,0x11000319, @@ -3590,7 +3603,7 @@ static const uint32_t propsVectors[7230]={ 0x250400,0x11000908,0x7c00100,0x250401,0x11000a03,0x4000000,0x200400,0x11000a03,0x4000000,0x201000,0x11000a03,0x4000000,0x270000,0x11000a03,0x7c00100,0x220400, 0x11000a03,0x7c00100,0x220402,0x11000a03,0x7c00100,0x250400,0x11000a03,0x7c00500,0x230400,0x11000a03,0xc000010,0x1049400,0x11000b13,0x2802500,0x962460,0x11000b13, 0x4000000,0x200000,0x11000b13,0x4000000,0x201000,0x11000b13,0x4000000,0x230400,0x11000b13,0x4000002,0x400000,0x11000b13,0x4000010,0x200000,0x11000b13,0x7c00100, -0x2633800,0x11000c00,0x80000000,0x218960,0x11000c02,0x2802100,0x962460,0x11000c02,0x2802400,0x962460,0x11000c02,0x4000000,0x200000,0x11000c02,0x4000000,0x1329400, +0x2633800,0x11000c00,0x80000000,0x1329960,0x11000c02,0x2802100,0x962460,0x11000c02,0x2802400,0x962460,0x11000c02,0x4000000,0x200000,0x11000c02,0x4000000,0x1329400, 0x11000c02,0x4000000,0x1329800,0x11000c02,0x4000000,0x1500000,0x11000c02,0x6800000,0x1329800,0x11000c02,0x7c00100,0x230400,0x11000c02,0x7c00100,0x230401,0x11000c02, 0x7c00100,0x230402,0x11000c02,0x7c00500,0x230400,0x11000c02,0x7d00100,0x230400,0x11000f01,0x2802400,0x962460,0x11000f0a,0x2802100,0x962460,0x11000f0a,0x2802400, 0x962460,0x11000f0a,0x2806400,0x962460,0x11000f0a,0x4000000,0x200000,0x11000f0a,0x6800100,0x962540,0x11000f0a,0x7c00100,0x230400,0x11000f0a,0x7c00100,0x230401, @@ -3614,7 +3627,7 @@ static const uint32_t propsVectors[7230]={ 0x201c00,0x11002800,0x6800020,0x201c00,0x11002800,0x24000000,0x200000,0x11002800,0x24000000,0x200002,0x11002800,0x24000000,0x810000,0x11002800,0x24000000,0x1410000, 0x11002800,0x24000000,0x1500000,0x11002800,0x24000000,0x1500002,0x11002800,0x24000002,0x400000,0x11002800,0x24000006,0xc0000b,0x11002800,0x24000008,0x1410000,0x11002800, 0x24000008,0x1710000,0x11002800,0x24000020,0x1001400,0x11002800,0x24000020,0x1500002,0x11002800,0x2c000010,0x1248000,0x11002800,0x2c000010,0x1248002,0x11002800,0x40000001, -0x63b020,0x11002800,0x40080000,0x918820,0x11002801,0x80000,0x2a65620,0x11002801,0x82000,0x962460,0x11002900,0x4000000,0x20000e,0x11002900,0x4000000,0x20000f, +0x63b020,0x11002800,0x40080000,0x918820,0x11002801,0x2880000,0x2a65620,0x11002801,0x2882000,0x962460,0x11002900,0x4000000,0x20000e,0x11002900,0x4000000,0x20000f, 0x11002900,0x4000020,0x20000e,0x11002900,0x4000020,0x20000f,0x11002900,0x4000020,0x81000e,0x11002900,0x4000020,0x81000f,0x11002900,0x4000020,0x141000e,0x11002900, 0x4000020,0x141000f,0x11002900,0x4000022,0x20000e,0x11002900,0x4000022,0x20000f,0x11002a00,0x4000000,0x1500000,0x11002a00,0x4000000,0x1600000,0x11002a00,0x4000000, 0x1600002,0x11002b01,0x2000,0x962460,0x11002b01,0x2802020,0x962460,0x11002c00,0x4000000,0x200000,0x11002c00,0x4000000,0x200002,0x11002c00,0x4000000,0x20000f, @@ -3670,17 +3683,17 @@ static const uint32_t propsVectors[7230]={ 0x4000000,0x141000c,0x110a5400,0x4000000,0x150000c,0x110a5400,0x4000000,0x160000c,0x110a5400,0x4000002,0xe7000c,0x110a5400,0x4000010,0x87140c,0x110a5400,0x4000010, 0xe7000c,0x110a5400,0x4000010,0x120140c,0x110a5400,0x4000010,0x127100c,0x110a5400,0x4000020,0xe0000c,0x110a5400,0x4000026,0xe7000c,0x110a5400,0xc000010,0x80ac0c, 0x110a5400,0xc000010,0xb4800c,0x11400c0c,0x4000010,0xb00000,0x11400c0c,0x4000010,0x1071400,0x11400c17,0xc000010,0xb48000,0x11400c1e,0x7c00900,0x230400,0x11400f4b, -0xc000010,0x448000,0x11400f5f,0xc000010,0x448000,0x11401d94,0x4000000,0x200000,0x11403dca,0x4000000,0xe00000,0x114457bf,0x4000004,0x120000a,0x114457bf,0x4000008, -0x81000a,0x114457bf,0x4000008,0x141000a,0x114457bf,0x4000010,0x87000a,0x114457bf,0xc000010,0x84800a,0x114457c8,0x3802500,0x126246a,0x114457c8,0x7c00d00,0x2530c0a, -0x114a3dbf,0x24000000,0x810000,0x114a3dbf,0x24000000,0x1410000,0x114a3dbf,0x24000008,0x810000,0x114a3dbf,0x24000008,0x1410000,0x114a3dbf,0x24000010,0x870000,0x114a3dbf, -0x2c000010,0x848000,0x114a3dc5,0x4000000,0xe00000,0x114a3dc5,0x24000000,0xe00000,0x114a3dc5,0x24000002,0xe00000,0x114a3dc5,0x24000002,0x1200000,0x114a3dc5,0x24000008, -0x810000,0x114a3dc5,0x24000008,0x1410000,0x114a3dc8,0x7c00900,0x930c00,0x114a3dc8,0x7c00900,0xe30c00,0x114a3dca,0x7c00300,0xe30000,0x114a3ec8,0x7000400,0x1200c02, -0x114a3fbf,0x4000004,0x1200000,0x114a3fc8,0x7c00d00,0x2530c00,0x114a42ca,0x4000000,0xe00000,0x114a42ca,0x4000000,0xe0000f,0x114a44ca,0x4000000,0xe00002,0x114a44ca, -0x4000000,0xe00003,0x114a45ca,0x4000000,0xe00002,0x114a45ca,0x4000000,0xe0000d,0x11505103,0x24000000,0x810000,0x11505103,0x24000000,0x1410000,0x1180090a,0x2802400, +0xc000010,0x448000,0x11400f5f,0xc000010,0x448000,0x11401d94,0x4000000,0x200000,0x11403dcc,0x4000000,0xe00000,0x114457c1,0x4000008,0x81000a,0x114457c1,0x4000008, +0x141000a,0x114457c1,0x4000010,0x87000a,0x114457c1,0x6800004,0x120000a,0x114457c1,0xc000010,0x84800a,0x114457ca,0x3802500,0x126246a,0x114457ca,0x7c00d00,0x2530c0a, +0x114a3dc1,0x24000000,0x810000,0x114a3dc1,0x24000000,0x1410000,0x114a3dc1,0x24000008,0x810000,0x114a3dc1,0x24000008,0x1410000,0x114a3dc1,0x24000010,0x870000,0x114a3dc1, +0x2c000010,0x848000,0x114a3dc7,0x4000000,0xe00000,0x114a3dc7,0x24000000,0xe00000,0x114a3dc7,0x24000002,0xe00000,0x114a3dc7,0x24000002,0x1200000,0x114a3dc7,0x24000008, +0x810000,0x114a3dc7,0x24000008,0x1410000,0x114a3dca,0x7c00900,0x930c00,0x114a3dca,0x7c00900,0xe30c00,0x114a3dcc,0x7c00300,0xe30000,0x114a3eca,0x7000400,0x1200c02, +0x114a3fc1,0x6800004,0x1200000,0x114a3fca,0x7c00d00,0x2530c00,0x114a42cc,0x4000000,0xe00000,0x114a42cc,0x4000000,0xe0000f,0x114a44cc,0x4000000,0xe00002,0x114a44cc, +0x4000000,0xe00003,0x114a45cc,0x4000000,0xe00002,0x114a45cc,0x4000000,0xe0000d,0x11505113,0x24000000,0x810000,0x11505113,0x24000000,0x1410000,0x1180090a,0x2802400, 0x962460,0x11800c27,0x2802100,0x962460,0x11800c27,0x2802500,0x962460,0x11800f32,0x2802400,0x962460,0x11800f3f,0x2802400,0x962460,0x11820700,0x2802400,0x962460, -0x11820700,0x2802500,0x962460,0x118a3dcb,0x2802400,0x962460,0x118a3ec8,0x2802400,0x962460,0x11c00904,0x2802400,0x962460,0x11c00908,0x2802400,0x962460,0x11c00c2c, +0x11820700,0x2802500,0x962460,0x118a3dcd,0x2802400,0x962460,0x118a3eca,0x2802400,0x962460,0x11c00904,0x2802400,0x962460,0x11c00908,0x2802400,0x962460,0x11c00c2c, 0x6800000,0x1329800,0x11c00c30,0xc000010,0xb48000,0x11c00f78,0x6800000,0x1329800,0x11c0107d,0x6800000,0x1329800,0x11c01181,0x6800000,0x1329800,0x11c01285,0x6800000, -0x1329800,0x11c01489,0x4000000,0x200000,0x11c01489,0x6800000,0x1329800,0x11c0168d,0x6800000,0x1329800,0x11d05107,0x7c00100,0x230408,0x20000067,0x1000,0, +0x1329800,0x11c01489,0x4000000,0x200000,0x11c01489,0x6800000,0x1329800,0x11c0168d,0x6800000,0x1329800,0x11d05117,0x7c00100,0x230408,0x20000067,0x1000,0, 0x20000b13,0x2802400,0x962460,0x20000b13,0x2802500,0x962460,0x20001b27,0x2802100,0x962460,0x20001b27,0x2802100,0x962461,0x20001b27,0x2802400,0x962460,0x20001b27, 0x2802500,0x962460,0x20001b27,0x2806400,0x962460,0x20001b27,0x2902100,0x962462,0x20001b27,0x4000000,0x200000,0x20001b27,0x4000000,0x400000,0x20001b27,0x4000000, 0x500000,0x20001b27,0x4000000,0x810000,0x20001b27,0x4000000,0xb00000,0x20001b27,0x4000000,0xc0000b,0x20001b27,0x4000000,0x1410000,0x20001b27,0x4000010,0xb00000, @@ -3692,7 +3705,7 @@ static const uint32_t propsVectors[7230]={ 0x200400,0x3000080e,0x7c00100,0x220400,0x30000908,0x2000,0x962460,0x30000908,0x7c00100,0x220400,0x30000908,0x7c00100,0x220401,0x30000908,0x7c00100,0x250400, 0x30000908,0x7c00100,0x250401,0x30000a03,0x4000006,0x400400,0x30000c02,0x4000000,0x200000,0x30000c02,0x7c00100,0x230400,0x30000d22,0x2802100,0x962460,0x30000d22, 0x2802400,0x962460,0x30000d22,0x2802500,0x962460,0x30000d22,0x4000000,0x200000,0x30000d22,0x4000010,0x200000,0x30000d22,0x7c00100,0x230400,0x30000d22,0xc000010, -0x248000,0x30000d22,0x80000000,0x218960,0x30000e25,0x2802500,0x962460,0x30000e25,0x7c00100,0x230400,0x30001821,0x2802100,0x962460,0x30001821,0x2806400,0x962460, +0x248000,0x30000d22,0x80000000,0x218560,0x30000e25,0x2802500,0x962460,0x30000e25,0x7c00100,0x230400,0x30001821,0x2802100,0x962460,0x30001821,0x2806400,0x962460, 0x30001821,0x4000000,0x200000,0x30001821,0x6800100,0x962540,0x30001821,0x6800100,0x962541,0x30001821,0x7c00100,0x230400,0x30001b27,0x2802100,0x962460,0x30001b27, 0x2802400,0x962460,0x30001b27,0x4000000,0x200000,0x30001b27,0x4000000,0x400000,0x30001b27,0x7c00100,0x230400,0x30001c1c,0x2802100,0x1862460,0x30001c1c,0x2802400, 0x1862460,0x30001c1c,0x2806400,0x1862460,0x30001c1c,0x4000000,0x200000,0x30001c1c,0x6800100,0x1862400,0x30001c1c,0x6800100,0x1862540,0x30001c1c,0x7c00100,0x1830000, @@ -3701,292 +3714,294 @@ static const uint32_t propsVectors[7230]={ 0x230400,0x30002128,0xc000010,0x248000,0x3000221d,0x4000000,0x810000,0x3000221d,0x4000000,0x1410000,0x3000221d,0x4000001,0x445800,0x3000221d,0x7c00100,0x230400, 0x30002300,0x4000010,0x400000,0x30002320,0x7c00100,0x230400,0x30002417,0x2802100,0x1862460,0x30002417,0x2802400,0x1862460,0x30002417,0x2806400,0x1862460,0x30002417, 0x2882000,0x1862460,0x30002417,0x4000000,0x200000,0x30002417,0x4000000,0x400000,0x30002417,0x4000000,0x1600000,0x30002417,0x4000010,0x400000,0x30002417,0x4000010, -0x1200000,0x30002417,0x6800000,0x1329800,0x30002417,0x6800100,0x1862540,0x30002417,0x7c00100,0x1830000,0x30002417,0x7d00100,0x1830000,0x3000251b,0x80000,0xc18820, -0x3000251b,0x2802100,0x962460,0x3000251b,0x3c02100,0x962460,0x3000251b,0x4000000,0x200000,0x3000251b,0x4000006,0x500000,0x3000251b,0x4000010,0x400000,0x3000251b, -0x4000010,0xb70000,0x3000251b,0x4000800,0x200000,0x3000251b,0x6800000,0x1329800,0x3000251b,0x7c00100,0x230400,0x3000251b,0x7c00900,0x230400,0x3000251b,0xc000010, -0xb48000,0x3000251b,0x12882000,0x962460,0x30002800,0x24000000,0x200000,0x30002800,0x2c000010,0x1248002,0x30002a00,0x4000000,0x1600000,0x30002b01,0x2000,0x962460, -0x30002c00,0x4000000,0x200000,0x30002c00,0x7c00100,0x220405,0x30002d19,0x7c00100,0x250400,0x30002e00,0x24000000,0x200000,0x30003000,0x24000000,0x200000,0x30003100, -0x24000000,0x200000,0x30003600,0x24000000,0x200000,0x30003700,0x24000000,0x200000,0x3000392e,0x24000000,0x200000,0x30005013,0x7c00100,0x2633801,0x30005600,0, -0x918820,0x30020600,0x4000400,0x500400,0x30020701,0x2802400,0x962460,0x30020701,0x2802400,0xc62460,0x300a3a11,0x4020000,0xe00000,0x300a3a11,0x4020000,0xe00002, -0x300a3b11,0x4020000,0xe00002,0x300a3c00,0x4008000,0xe00000,0x300a3c00,0x4010000,0xe00000,0x300a3d11,0x7c00300,0xe30002,0x300a4305,0x7c00100,0xe30400,0x300a4611, -0x7c40300,0xe30000,0x300a4829,0x7c00100,0xe30400,0x300a4829,0x7c00900,0x1230400,0x300a4929,0x4000000,0xe00000,0x3040259a,0x4000010,0x400000,0x3040259a,0x4000010, -0xb70000,0x3040259a,0xc000010,0xb48000,0x304028ba,0x4000001,0xc41c0b,0x304a3dca,0x4000000,0xe00000,0x30800c27,0x2802100,0x962460,0x30c01c92,0x6800000,0x1329800, -0x3100080e,0x7c00120,0x220402,0x3100080e,0x7c00120,0x250402,0x31005167,0x1000,0,0x3100581e,0x4000000,0x200000,0x3100581e,0x7c00100,0x230400,0x3100590d, -0x7c00100,0x230400,0x31005a09,0x7c00100,0x220400,0x31005a09,0x7c00100,0x250400,0x31005b00,0x4000000,0x200000,0x31005c00,0x80000,0x918820,0x31005c00,0x2802000, -0x962460,0x31005c00,0x2802400,0x962460,0x31005c00,0x4000000,0x200000,0x31005c00,0x4000000,0x200001,0x31005c00,0x6800000,0x962540,0x31005c00,0x6800400,0x962540, -0x31005c01,0x2802400,0x962460,0x31005d00,0x4000020,0x200005,0x31005d00,0x6800020,0x1329805,0x31005d00,0x7c00120,0x220405,0x31005d00,0x7c00120,0x250405,0x31006000, -0x82000,0x962460,0x31006000,0x180000,0x918820,0x310a5e11,0x7c40300,0xe30000,0x310a5f11,0x7c00300,0xe30001,0x32000419,0x7c00100,0x250400,0x3200080e,0x4000020, -0x200000,0x3200080e,0x7c00100,0x220400,0x3200080e,0x7c00100,0x250400,0x32000908,0x7c00100,0x220400,0x32000908,0x7c00100,0x250400,0x32000c02,0x7c00100,0x230400, -0x32000e25,0x7c00100,0x230400,0x32001d0c,0x7c00100,0x230400,0x32002800,0x80000,0x1e18820,0x32002800,0x80020,0x218820,0x32002800,0x4000001,0x445802,0x32002800, -0x24000000,0x200000,0x32002800,0x24000000,0x1500002,0x32002800,0x24000020,0x200000,0x32002800,0x2c000010,0x1248002,0x32002919,0x7c00100,0x22040f,0x32002a00,0x4000000, -0x1600000,0x32002b01,0x2000,0x962460,0x32002b01,0x2802000,0x962460,0x32002b01,0x2802020,0x962460,0x32002c00,0x4000000,0x200000,0x32002c00,0x4000020,0x200000, -0x32002c00,0x4000020,0x200005,0x32002c00,0x7c00120,0x220405,0x32002c00,0x7c00120,0x250405,0x32002e00,0x24000020,0x200000,0x32002f00,0x24000020,0x200000,0x32003000, -0x24000000,0x200000,0x32003000,0x24000020,0x200000,0x32003500,0x24000000,0x200000,0x32003600,0x24000020,0x200000,0x32003700,0x24000000,0x100000,0x32003700,0x24000000, -0x200000,0x32003800,0x24000000,0x810000,0x32003800,0x24000000,0x1410000,0x32005102,0x4000000,0x1500008,0x32005502,0x7c00100,0x230400,0x32006108,0x7c00100,0x220400, -0x32006108,0x7c00100,0x250400,0x3200622a,0x2802100,0x962460,0x3200622a,0x2806400,0x962460,0x3200622a,0x7c00100,0x230400,0x3200632b,0x2802100,0x962460,0x3200632b, -0x6804000,0x962540,0x3200632b,0x7c00100,0x230400,0x3200642c,0x2802100,0x962460,0x3200642c,0x7c00100,0x230400,0x3200652d,0x2802100,0x962460,0x3200652d,0x7c00100, -0x230400,0x32006600,0x24000020,0x200000,0x32006700,0x24000020,0x200000,0x32006800,0x24000020,0x200000,0x32006900,0x24000020,0x200000,0x32006900,0x24000020,0x810000, -0x32006900,0x24000020,0x1410000,0x32006a00,0x24000020,0x200000,0x32006a00,0x24000020,0x200001,0x32006a00,0x24000020,0x200002,0x32020701,0x2882000,0xc62460,0x32023300, -0x4000000,0x100000,0x32026c01,0x12882000,0x962460,0x32065700,0x4000000,0x810011,0x32065700,0x4000000,0x1410011,0x32086600,0x24000020,0x810000,0x32086600,0x24000020, -0x1410000,0x32086900,0x24000020,0x810000,0x32086900,0x24000020,0x1410000,0x320a3600,0x24000020,0x200000,0x320a3d11,0x7c00100,0x1230400,0x320a3e14,0x7c00100,0xe30010, -0x320a3e14,0x7c00100,0x2530000,0x320a3f16,0x7c00100,0xe30c10,0x320a4400,0x4000000,0xe00003,0x320a4929,0x4000000,0xe00000,0x320a4f11,0x7c00300,0xe30001,0x320a6b16, -0x7c00100,0x2530c00,0x32406396,0xc000010,0x448000,0x324a3dcd,0x4000000,0xe00000,0x324a3dcd,0x7c00100,0x1230400,0x324a3fc8,0x4000002,0x1200c00,0x324a53c5,0x24000000, -0xe00000,0x32820701,0x2802000,0x962460,0x40000419,0x7c00100,0x220400,0x40000519,0x7c00100,0x220400,0x40000600,0x4000400,0x200400,0x4000080e,0x7c00100,0x220400, -0x4000080e,0x7c00100,0x250400,0x4000080e,0x7c00100,0x250402,0x40000c02,0x2802100,0x962460,0x40000c02,0x2802400,0x962460,0x40000c02,0x2802500,0x962460,0x40000c02, -0x4000000,0x200000,0x40000c02,0x4000000,0x1071400,0x40000c02,0x7c00100,0x230400,0x40000c02,0x80000000,0x218960,0x40000d22,0x7c00100,0x230400,0x40000f0a,0x7c00100, -0x230400,0x40001004,0x7c00100,0x230400,0x40001110,0x2802100,0x962460,0x40001110,0x6800100,0x962540,0x4000120f,0x2802100,0x962460,0x4000120f,0x4000000,0x1600000, -0x4000120f,0x7c00100,0x230400,0x4000131f,0x7c00100,0x230400,0x40001423,0x4000000,0x200000,0x40001423,0x4000000,0x1600000,0x40001615,0x2802400,0x962460,0x40001615, -0x7c00100,0x230400,0x40002417,0x2802400,0x1862460,0x40002417,0x4000000,0x200000,0x40002800,0x6800000,0x201c00,0x40002800,0x24000002,0x200000,0x40002c00,0x4000000, -0x200002,0x40003000,0x24000000,0x200000,0x40003000,0x24000020,0x200000,0x40003700,0x24000000,0x200000,0x40005a09,0x7c00100,0x220400,0x40005a09,0x7c00100,0x250400, -0x40005d00,0x7c00120,0x220405,0x40006f30,0x2802100,0x962460,0x40006f30,0x2802400,0x962460,0x40006f30,0x4000000,0x200000,0x40006f30,0x6800000,0x1329800,0x40006f30, -0x6800100,0x962540,0x40006f30,0x7c00100,0x230400,0x40006f30,0xc000010,0xb48000,0x40007034,0x7c00100,0x1830000,0x40007117,0x4000000,0x200000,0x40007208,0x7c00100, -0x220400,0x4000720e,0x7c00100,0x220400,0x4000720e,0x7c00500,0x22040e,0x4000720e,0x7c00500,0x22040f,0x40007219,0x7c00100,0x220400,0x40007219,0x7c00500,0x220400, -0x40007219,0x7c00500,0x22040e,0x40007219,0x7c00500,0x22040f,0x40007300,0x24000000,0x200000,0x40007400,0x4000000,0x200000,0x40007531,0x7c00100,0x230400,0x40007631, -0x7c00100,0x230400,0x40007835,0x4000010,0x400000,0x40007835,0x7c00100,0x230400,0x40007933,0x7c00100,0x230400,0x40007a32,0x6800000,0x1329800,0x40007a32,0x7c00100, -0x230400,0x40007b2f,0x7c00100,0x230400,0x40007c00,0x4000000,0x200000,0x40020701,0x2802400,0x962460,0x40020701,0x2802400,0xc62460,0x40023300,0x4000000,0x200000, -0x40027d01,0x12882000,0x962460,0x400a3700,0x24000000,0x200000,0x400a3700,0x24000000,0xe00000,0x400a4400,0x4000000,0xe0000d,0x400a4412,0x4000000,0xe00002,0x400a4412, -0x4000000,0xe00003,0x400a4500,0x4000000,0xe0000d,0x400a5300,0x4000000,0x810010,0x400a5300,0x4000000,0x1410010,0x40507709,0x4000000,0x200000,0x4050770c,0x4000000, -0x400000,0x4050770f,0x4000000,0x200000,0x4050770f,0x4000000,0x400000,0x40c01489,0x4000000,0x200000,0x40d05107,0x4000000,0x200000,0x41000419,0x7c00100,0x220400, -0x41000419,0x7c00100,0x250400,0x4100080e,0x7c00100,0x220400,0x4100080e,0x7c00100,0x250400,0x41000908,0x7c00100,0x220400,0x41000908,0x7c00100,0x250400,0x41000b13, -0x2802000,0x962460,0x41000b13,0x2802100,0x962460,0x41000b13,0x4000000,0xb00000,0x41000c02,0x2802100,0x962460,0x41000c02,0x4000000,0x1500000,0x41000c02,0xc000010, -0xb48000,0x41000f0a,0x7c00100,0x230400,0x41001004,0x7c00100,0x230400,0x41001423,0x7c00100,0x230400,0x41001b27,0x4000000,0x500000,0x41001d0c,0x7c00100,0x22040f, -0x41001d0c,0x7c00100,0x230400,0x41001f0b,0x2802400,0x962460,0x41001f0b,0x4000000,0x200000,0x41001f0b,0x7c00100,0x230400,0x41002800,0x24000000,0x200000,0x41002800, -0x24000000,0x400000,0x41002919,0x7c00100,0x22040e,0x41002a00,0x4000000,0x1600000,0x41002b01,0x2802020,0x962460,0x41002c00,0x4000000,0x200000,0x41002c00,0x7c00120, -0x220405,0x41003000,0x24000000,0x200000,0x41003700,0x24000000,0x200000,0x41003700,0x24000000,0xe00000,0x41005d00,0x7c00120,0x220405,0x41006600,0x24000020,0x200000, -0x41006600,0x24000020,0x810000,0x41006600,0x24000020,0x1410000,0x41007208,0x7c00100,0x22040f,0x41007219,0x7c00100,0x220400,0x41007300,0x24000000,0x200000,0x41007e0e, -0x2802000,0x962460,0x41007e0e,0x4000000,0x200000,0x41007f0e,0x4000000,0x200000,0x41007f0e,0x7c00100,0x230400,0x41008002,0x7c00100,0x230400,0x41008137,0x2802100, -0x962460,0x41008137,0x4000000,0x200000,0x41008137,0x6800100,0x962540,0x41008137,0x7c00100,0x230400,0x41008301,0x2802000,0x962460,0x41008407,0x4000000,0x200000, -0x41008407,0x4000000,0x400000,0x41008407,0x4000000,0xb00000,0x41008407,0x7c00100,0x220400,0x41008407,0x7c00100,0x250400,0x4100850b,0x7c00100,0x230400,0x4100860b, -0x4000000,0x200000,0x4100860b,0x7c00100,0x230400,0x4100870c,0x7c00100,0x220400,0x41008838,0x7c00100,0x220400,0x41008838,0x7c00100,0x250400,0x41008939,0x2802000, -0x962460,0x41008939,0x2802100,0x962460,0x41008939,0x2806000,0x962460,0x41008939,0x4000000,0x200000,0x41008939,0x4000000,0x400000,0x41008939,0x7c00100,0x230400, -0x41008939,0xc000010,0x448000,0x41008a00,0x4000400,0x200400,0x41008b3b,0x4000000,0x1800000,0x41008b3b,0x6800000,0x1329800,0x41008b3b,0x7c00100,0x1830000,0x41008b3b, -0x7e00100,0x1830000,0x41008c3d,0x4000010,0x400000,0x41008c3d,0x7c00100,0x230400,0x41008d0e,0x7c00100,0x22040f,0x41008d19,0x7c00100,0x220400,0x41008d19,0x7c00100, -0x22040f,0x41008e00,0x24000000,0x200000,0x41008e00,0x24000000,0x400000,0x41008e00,0x24000000,0x1710000,0x41008e00,0x24000006,0x400000,0x41008f3a,0x2802100,0x962460, -0x41008f3a,0x2806000,0x962460,0x41008f3a,0x4000000,0x200000,0x41008f3a,0x6800100,0x962540,0x41008f3a,0x7c00100,0x230400,0x4100903c,0x7c00100,0x230400,0x4100903c, -0x7c00100,0x23040f,0x41020701,0x2802000,0x962460,0x41020701,0x2802000,0xc62460,0x410a3700,0x24000000,0x200000,0x410a3700,0x24000000,0xe00000,0x410a4412,0x4000000, -0xe00003,0x410a4711,0x7c40300,0xe30000,0x410a4f11,0x7c00300,0xe30001,0x410a9100,0x4000000,0x800010,0x410a9100,0x4000000,0x810010,0x410a9100,0x4000000,0x870010, -0x410a9100,0x4000000,0xb00010,0x410a9100,0x4000000,0xf00010,0x410a9100,0x4000000,0x1001410,0x410a9100,0x4000000,0x1071010,0x410a9100,0x4000000,0x1071410,0x410a9100, -0x4000000,0x1410010,0x41408ad0,0x4000400,0x200000,0x414a82ca,0x4000000,0xe00000,0x41808300,0x2802000,0x962460,0x41c01489,0x6800000,0x1329800,0x50000419,0x7c00100, -0x220400,0x50000419,0x7c00100,0x250400,0x5000080e,0x7c00100,0x220400,0x50000908,0x7c00100,0x220400,0x50000908,0x7c00100,0x250400,0x50000b13,0x2802500,0x962460, -0x50000f0a,0x7c00100,0x230400,0x50001615,0x2802100,0x962460,0x50001615,0x7c00100,0x230400,0x50002b01,0x2802020,0x962460,0x50002c00,0x4000000,0x200000,0x50002c19, -0x7c00100,0x220400,0x50002d19,0x7c00100,0x220400,0x50003000,0x24000000,0x200000,0x50003000,0x24000020,0x200000,0x50003700,0x24000000,0x200000,0x50005d00,0x7c00120, -0x220405,0x50005d00,0x7c00120,0x250405,0x50006108,0x7c00100,0x220400,0x50006108,0x7c00100,0x250400,0x50006600,0x24000020,0x200000,0x50007300,0x24000000,0x200000, -0x50008301,0x2802400,0x962460,0x50008a00,0x7c00500,0x230400,0x50009257,0x2802400,0x962460,0x50009257,0x4000000,0x200000,0x50009257,0x4000010,0x1071400,0x50009257, -0x6800000,0x1329800,0x50009257,0x7c00100,0x230400,0x50009257,0x7c00500,0x230400,0x50009257,0x7c00900,0x230400,0x50009257,0xc000010,0xb48000,0x5000933e,0x2802100, -0x962460,0x5000933e,0x2802400,0x962460,0x5000933e,0x4000000,0x200000,0x5000933e,0x4000000,0x400000,0x5000933e,0x4000010,0x400000,0x5000933e,0x6800000,0x1329800, -0x5000933e,0x6800100,0x962540,0x5000933e,0x6800100,0x962541,0x5000933e,0x6804400,0x962540,0x5000933e,0x7c00100,0x230400,0x5000933e,0x7c00100,0x230401,0x5000933e, -0xc000010,0x448000,0x50009419,0x7c00100,0x220400,0x50009419,0x7c00100,0x250400,0x50009500,0x4000400,0x200400,0x5000965a,0x4000000,0x500000,0x5000965a,0x7c00100, -0x230400,0x5000965a,0xc000010,0xb48000,0x5000975b,0x4000000,0x200000,0x5000975b,0x4000010,0x400000,0x5000975b,0x7c00100,0x230400,0x50009865,0x7c00100,0x230400, -0x50009965,0x4000010,0x400000,0x50009965,0x7c00100,0x230400,0x50409aca,0x4000000,0x200000,0x5100080e,0x7c00100,0x220400,0x5100080e,0x7c00100,0x250400,0x51000c02, -0x2802100,0x962460,0x51000c02,0x4000000,0x1500000,0x51000c02,0x4000020,0x200000,0x51000c02,0x7c00100,0x230400,0x51000f0a,0x7c00100,0x230400,0x51000f0a,0x7c00500, -0x230400,0x51001110,0x2802100,0x962460,0x5100131f,0x2802100,0x962460,0x51001423,0x7c00100,0x230400,0x51001524,0x2802100,0x962460,0x51001524,0x4000000,0x200000, -0x51001524,0x7c00100,0x230400,0x5100171a,0x2802100,0x962460,0x5100171a,0x4000000,0x200000,0x5100171a,0x4000000,0x1500000,0x5100171a,0x7c00100,0x230400,0x51001b27, -0x4000000,0x200000,0x51001b27,0x4000000,0x400000,0x51001b27,0x4000000,0x500000,0x51001b27,0x7c00100,0x230400,0x51001c1c,0x2802100,0x1862460,0x51001c1c,0x2802500, -0x1862460,0x51001c1c,0x2806400,0x1862460,0x51001c1c,0x4000000,0x1800000,0x51001c1c,0x6800000,0x1329800,0x51001c1c,0x6800100,0x1862400,0x51001c1c,0x6800100,0x1862540, -0x51001c1c,0x6800500,0x1862400,0x51001c1c,0x7c00100,0x1830000,0x5100251b,0x7c00100,0x230400,0x51002619,0x7c00100,0x220400,0x51002619,0x7c00100,0x250400,0x51002800, -0x80020,0x218820,0x51002c00,0x4000000,0x200000,0x51002d19,0x7c00100,0x230400,0x51003700,0x24000000,0x200000,0x51003700,0x24000000,0xe00000,0x51005201,0x2802400, -0x962460,0x51005c00,0x4000000,0x200000,0x51006108,0x7c00100,0x220400,0x51006108,0x7c00100,0x250400,0x51006600,0x24000020,0x200000,0x51006600,0x24000020,0x810000, -0x51006600,0x24000020,0x1410000,0x51007300,0x24000000,0x200000,0x51007300,0x24000020,0x200000,0x51008002,0x7c00100,0x230400,0x51008301,0x2802000,0x962460,0x51008301, -0x2802400,0x962460,0x51008301,0x2802400,0xc62460,0x51008a00,0x7c00500,0x230400,0x51008e00,0x24000000,0x200000,0x51008e00,0x24000000,0x400000,0x51008e00,0x24000000, -0x810000,0x51008e00,0x24000000,0x1400000,0x51008e00,0x24000000,0x1410000,0x51008e00,0x24000000,0x1710000,0x51008e00,0x24000002,0x200000,0x51008e00,0x24000500,0x230400, -0x51008e00,0x2c000010,0xb48000,0x51009419,0x7c00100,0x220400,0x51009419,0x7c00100,0x22040e,0x51009419,0x7c00100,0x22040f,0x51009419,0x7c00100,0x250400,0x51009500, -0x4000400,0x200400,0x51009500,0x7c00500,0x230400,0x51009519,0x7c00100,0x220400,0x51009519,0x7c00100,0x22040f,0x51009519,0x7c00100,0x230400,0x51009519,0x7c00100, -0x250400,0x51009b71,0x2802100,0x962460,0x51009b71,0x6800000,0x1329800,0x51009b71,0x6800100,0x962540,0x51009b71,0x6804400,0x962540,0x51009b71,0x7c00100,0x230400, -0x51009c52,0x2802100,0x962460,0x51009c52,0x2802400,0x962460,0x51009c52,0x2802d00,0x962460,0x51009c52,0x4000010,0x400000,0x51009c52,0x6800000,0x1329800,0x51009c52, -0x6800100,0x962540,0x51009c52,0x7c00100,0x230400,0x51009c52,0xc000010,0x448000,0x51009d6d,0x6800000,0x1329800,0x51009d6d,0x7c00100,0x230400,0x51009d6d,0x7c00500, -0x230400,0x51009d6d,0x7c00d00,0x230400,0x51009d6d,0xc000010,0x448000,0x51009e08,0x2802100,0x962460,0x51009f63,0x4000010,0x400000,0x51009f63,0x6800000,0x1329800, -0x51009f63,0x7c00100,0x230400,0x51009f63,0x7c00900,0x230400,0x51009f63,0xc000010,0x448000,0x51009f63,0xc000010,0xb48000,0x5100a008,0x2000,0x962460,0x5100a008, -0x2802400,0x962460,0x5100a008,0x4000000,0x200000,0x5100a008,0x7c00100,0x220400,0x5100a008,0x7c00100,0x230400,0x5100a008,0x7c00100,0x250400,0x5100a008,0x7c00500, -0x230400,0x5100a16f,0x2806400,0x962460,0x5100a16f,0x6800000,0x1329800,0x5100a16f,0x6800100,0x962540,0x5100a16f,0x7c00100,0x230400,0x5100a16f,0xc000010,0x448000, -0x5100a24f,0x2802100,0x962460,0x5100a24f,0x2802400,0x962460,0x5100a24f,0x6800000,0x1329800,0x5100a24f,0x7c00100,0x230400,0x5100a24f,0xc000010,0x448000,0x5100a36e, -0x2802100,0x962460,0x5100a36e,0x4000000,0x200000,0x5100a36e,0x6800100,0x962540,0x5100a36e,0x6804400,0x962540,0x5100a36e,0x7c00100,0x230400,0x5100a442,0x2802100, -0x962460,0x5100a442,0x4000000,0x200000,0x5100a442,0x6800000,0x1329800,0x5100a442,0x6800100,0x962540,0x5100a442,0x7c00100,0x230400,0x5100a442,0xc000010,0x448000, -0x5100a500,0x4000000,0x200000,0x5100a600,0x4000000,0x200000,0x5100a601,0x2802000,0x962460,0x5100a76b,0x7c00100,0x230400,0x5100a868,0x7c00100,0x230400,0x5100a96c, -0x4000000,0x200000,0x5100a96c,0x7c00100,0x230400,0x5100aa00,0x4000000,0xe00000,0x5100ab00,0x4000000,0xe00000,0x51086600,0x24000020,0x810000,0x51086600,0x24000020, -0x1410000,0x510a4005,0x7c00100,0xe30400,0x510a4711,0x7c40300,0xe30000,0x510a7300,0x24000000,0x200000,0x510aaa00,0x4000000,0xe00000,0x5140a2fe,0x4000400,0x400000, -0x514a82ca,0x4000000,0xe00000,0x51802bbc,0x2802000,0x962460,0x51c00908,0x2802400,0x962460,0x51c0a008,0x2802400,0x962460,0x52000f0a,0x2802100,0x962460,0x52000f0a, -0x6800100,0x962540,0x52000f0a,0x7c00100,0x230400,0x52001004,0x4000000,0x1600000,0x52001b00,0x4000000,0x200000,0x52001c1c,0x2802100,0x1862460,0x52001c1c,0x6800100, -0x1862400,0x52001c1c,0x6800500,0x1862400,0x52001e12,0x7c00100,0x2230500,0x52001e12,0x7c00100,0x2330520,0x52002128,0x4000002,0x400000,0x52002128,0x7c00100,0x230400, -0x52002a00,0x4000000,0x1500000,0x52002a00,0x4000000,0x1600000,0x52002d00,0x4000000,0x200006,0x52003000,0x24000000,0x200000,0x52006108,0x7c00100,0x220400,0x52006108, -0x7c00100,0x250400,0x52008301,0x2802400,0x962460,0x52008407,0x2802400,0x962460,0x52008407,0x7c00100,0x220400,0x52008407,0x7c00100,0x250400,0x52008b3b,0x6800000, -0x1800000,0x52008b3b,0x7c00100,0x1830000,0x52008e00,0x24000000,0x400000,0x52009419,0x7c00100,0x250400,0x5200975b,0x4000000,0x200000,0x5200ac7e,0x2802000,0x962460, -0x5200ac7e,0x2802100,0x962460,0x5200ac7e,0x2802400,0x962460,0x5200ac7e,0x4000010,0x200000,0x5200ac7e,0x7c00100,0x230400,0x5200ac7e,0xc000010,0x248000,0x5200ad28, -0x7c00100,0x230400,0x5200ae6a,0x2802100,0x1862460,0x5200ae6a,0x2802400,0x962460,0x5200ae6a,0x2802400,0x1862460,0x5200ae6a,0x2806000,0x1862460,0x5200ae6a,0x4000000, -0x1800000,0x5200ae6a,0x6800000,0x1329800,0x5200ae6a,0x6800100,0x1862400,0x5200ae6a,0x6800100,0x1862540,0x5200ae6a,0x7c00100,0x1830000,0x5200ae6a,0x7c00900,0x1830000, -0x5200ae6a,0xc000010,0x1848000,0x5200b083,0x4000010,0x400000,0x5200b083,0x7c00100,0x230400,0x5200b083,0xc000010,0x448000,0x5200b182,0x2802400,0x962460,0x5200b182, -0x4000000,0x200000,0x5200b182,0x4000010,0x400000,0x5200b182,0x7c00100,0x230400,0x5200b182,0xc000010,0x448000,0x5200b30a,0x2802400,0x962460,0x5200b30a,0x4000000, -0x200000,0x5200b30a,0x7c00100,0x230400,0x5200b54e,0x2802100,0x962460,0x5200b54e,0x2802400,0x962460,0x5200b54e,0x4000000,0x200000,0x5200b54e,0x4000010,0x400000, -0x5200b54e,0x6800000,0x1329800,0x5200b54e,0x6800100,0x962540,0x5200b54e,0x6804400,0x962540,0x5200b54e,0x7c00100,0x230400,0x5200b54e,0xc000010,0x448000,0x5200b61c, -0x4000000,0x1800000,0x5200b61c,0x6800500,0x1862400,0x5200b61c,0x7c00100,0x1830000,0x5200b61c,0x7c00900,0x1830000,0x5200b77f,0x2802100,0x1862460,0x5200b77f,0x2802400, -0x1862460,0x5200b77f,0x4000000,0x1800000,0x5200b77f,0x4000010,0x1800000,0x5200b77f,0x7c00100,0x1830000,0x5200b77f,0x7c00500,0x1830000,0x5200b77f,0x7c00900,0x1830000, -0x5200b77f,0x7e00100,0x1830000,0x5200b873,0x2802100,0x962460,0x5200b873,0x2806400,0x962460,0x5200b873,0x6800000,0x1329800,0x5200b873,0x6800100,0x962540,0x5200b873, -0x6800400,0x962540,0x5200b873,0x7c00100,0x230400,0x5200b873,0xc000010,0x448000,0x5200b912,0x7c00100,0x2230500,0x5200b912,0x7c00100,0x2330520,0x5200ba74,0x4000000, -0x200000,0x5200ba74,0x4000010,0x400000,0x5200ba74,0x7c00100,0x230400,0x5200bb85,0x4000000,0x200000,0x5200bb85,0x7c00100,0x230400,0x5200bc75,0x4000000,0x400000, -0x5200bc75,0x4000010,0x400000,0x5200bc75,0x7c00100,0x230400,0x5200bd7d,0x4000000,0x200000,0x5200bd7d,0x7c00100,0x230400,0x5200be7a,0x4000000,0x200000,0x5200be7a, -0x7c00100,0x230400,0x5200bf58,0x7c00100,0x230400,0x5200c002,0x4000000,0x200000,0x5200c178,0x2802100,0x962460,0x5200c178,0x2802400,0x962460,0x5200c178,0x2806400, -0x962460,0x5200c178,0x4000000,0x200000,0x5200c178,0x6800100,0x962540,0x5200c178,0x7c00100,0x230400,0x5200c178,0x7c00100,0x230401,0x5200c178,0xc000010,0x448000, -0x5200c178,0x80000000,0x218960,0x5200c247,0x7c00100,0x230400,0x5200c247,0x7c00100,0x830400,0x5200c247,0x7c00100,0x1430400,0x5200c300,0x4000000,0x200003,0x52022d00, -0x4000000,0x100006,0x52023700,0x24000000,0x100000,0x52023700,0x24000000,0xe00000,0x52023700,0x24000000,0x2800000,0x52024400,0x4000000,0x100000,0x52027300,0x24000000, -0x100000,0x5202c300,0x4000000,0x100000,0x5202c300,0x4000000,0x100002,0x5202c300,0x4000000,0x100003,0x5202c300,0x4000000,0x10000d,0x5202c300,0x4000100,0x150400, -0x5202c300,0x4000100,0x15040d,0x520a1e12,0x7c00100,0x2130480,0x520a3700,0x24000000,0xe00000,0x520a3800,0x24000000,0x100000,0x520a4711,0x7c40300,0xe30000,0x520a4f11, -0x7c00300,0xe30001,0x520a7300,0x24000000,0x100000,0x520ab412,0x7c00100,0x2130480,0x520ac400,0x4000000,0xe00002,0x520ac400,0x4000000,0xe0000d,0x520ac414,0x4000000, -0xe0000d,0x520ac511,0x7c40300,0xe30000,0x5240af9c,0x7c00100,0x230400,0x5240afa1,0x4000400,0x200000,0x5240afa3,0x6800400,0x962540,0x5240afa3,0x7c00100,0x230400, -0x5240afad,0x7c00100,0x230400,0x5240afaf,0x7c00100,0x230400,0x5240b2d2,0x4000000,0x200000,0x5240b2d2,0x4000000,0x1500000,0x5240b2dd,0x4000000,0x200000,0x5240b2eb, -0x4000000,0x200000,0x524a44ca,0x4000000,0xe00003,0x5250b501,0x7c00900,0x230400,0x5280af9c,0x2802400,0x962460,0x5280af9d,0x2802400,0x962460,0x5280afa3,0x2802400, -0x962460,0x5280afa5,0x2802400,0x962460,0x5280afa7,0x2802400,0x962460,0x52c0b3f8,0x2802400,0x962460,0x52c0b3fc,0x7c00100,0x230400,0x60000c02,0x2802100,0x962460, -0x60000c02,0x7c00100,0x230400,0x60000f0a,0x2802100,0x962460,0x60000f0a,0x6800100,0x962540,0x60000f0a,0x7c00100,0x230400,0x6000131f,0x4000000,0x200000,0x6000171a, -0x7c00100,0x230400,0x6000171a,0x7c00100,0x230560,0x60001b27,0x2802100,0x962460,0x60001b27,0x4000000,0xc00000,0x60001b27,0x7c00100,0x230400,0x60001f0b,0x2802400, -0x962460,0x60002919,0x7c00100,0x22040e,0x60002a00,0x4000000,0x1600000,0x60003000,0x24000000,0x200000,0x60003000,0x24000000,0xe00000,0x60003700,0x24000000,0x200000, -0x60003800,0x24000000,0x1710000,0x60005102,0x4000000,0x200000,0x60006108,0x7c00100,0x220400,0x60006108,0x7c00100,0x250400,0x60006600,0x24000020,0x200000,0x60008301, -0x2802400,0xc62460,0x6000903c,0x2806000,0x962460,0x6000903c,0x4000000,0x400000,0x60009519,0x7c00100,0x220400,0x60009519,0x7c00100,0x250400,0x6000a008,0x7c00100, -0x220400,0x6000a008,0x7c00100,0x250400,0x6000c300,0x4000000,0x2703580,0x6000c654,0x2802000,0x962460,0x6000c654,0x4000010,0x200000,0x6000c654,0x7c00100,0x230400, -0x6000c73f,0x2802000,0x962460,0x6000c73f,0x2802100,0x962460,0x6000c73f,0x4000000,0x200000,0x6000c73f,0x6800100,0x962540,0x6000c73f,0x6804000,0x962540,0x6000c73f, -0x7c00100,0x230400,0x6000c80b,0x7c00100,0x230400,0x6000c941,0x2802100,0x962460,0x6000c941,0x2806400,0x962460,0x6000c941,0x4000000,0x200000,0x6000c941,0x4000010, -0x200000,0x6000c941,0x6800000,0x1329800,0x6000c941,0x6800100,0x962540,0x6000c941,0x7c00100,0x230400,0x6000c941,0xc000010,0x448000,0x6000ca82,0x7c00100,0x230400, -0x6000cc00,0x4000000,0xe00000,0x6000d000,0x4000000,0x200000,0x6002c300,0x4000000,0x100000,0x6002c300,0x4000000,0x10000d,0x6002c300,0x4000100,0x150400,0x6002c300, -0x4000100,0x15040d,0x600a3000,0x24000000,0x200000,0x600a3000,0x24000000,0xe00000,0x600a3700,0x24000000,0x200000,0x600a3800,0x24000000,0x200000,0x600a3800,0x24000000, -0x2800000,0x600a4305,0x7c00100,0xe30400,0x600ac300,0x4000000,0x100000,0x600ac400,0x4000000,0xe0000d,0x600acb14,0x7c00100,0xe30000,0x600acb16,0x7c00100,0xe30c00, -0x600acc00,0x4000000,0xe00000,0x600acd00,0x4000000,0x200000,0x600acd00,0x4000000,0xe00000,0x600acd00,0x4000000,0x2800000,0x600ace00,0x4000000,0xe00000,0x600ace00, -0x4000000,0x2800000,0x600acf00,0x4000000,0xe00000,0x600acf00,0x4000000,0x2800000,0x600ad111,0x7c40300,0xe30000,0x604ac4ca,0x4000000,0xe00003,0x61000a03,0x4000000, -0x1600000,0x61000c02,0x80000000,0x218960,0x6100120f,0x4000000,0x200000,0x61001a18,0x7c00100,0x1830000,0x61001d0c,0x7c00100,0x230400,0x61001d0c,0x7c00100,0x250400, -0x61006600,0x24000020,0x200000,0x61008407,0x7c00100,0x220400,0x61008407,0x7c00100,0x250400,0x6100870c,0x7c00100,0x220400,0x61008e00,0x24000000,0x200000,0x61008e00, -0x24000000,0x400000,0x61008e00,0x24000002,0x300000,0x6100903c,0x7c00100,0x230400,0x61009519,0x7c00100,0x220400,0x61009519,0x7c00100,0x250400,0x61009519,0x7c00500, -0x22040f,0x61009b71,0x2802100,0x962460,0x61009b71,0x2806400,0x962460,0x61009b71,0x7c00100,0x230400,0x6100a008,0x2802100,0x962460,0x6100c300,0x4000000,0x20000f, -0x6100cd00,0x4000000,0x200000,0x6100d202,0x2802400,0x962460,0x6100d202,0x2802500,0x962460,0x6100d202,0x7c00100,0x230400,0x6100d302,0x4000020,0x200000,0x6100d302, -0x7c00120,0x230405,0x6100d476,0x2802100,0x962460,0x6100d476,0x2802100,0x962461,0x6100d476,0x2806400,0x962460,0x6100d476,0x4000000,0x400000,0x6100d476,0x6800000, -0x1329800,0x6100d476,0x6800100,0x962540,0x6100d476,0x7c00100,0x230400,0x6100d476,0xc000010,0x448000,0x6100d573,0x2802100,0x962460,0x6100d573,0x2806400,0x962460, -0x6100d573,0x6800100,0x962540,0x6100d573,0x7c00100,0x230400,0x6100d573,0x7c00900,0x230400,0x6100d573,0xc000010,0x448000,0x6100d68d,0x7c00100,0x230400,0x6100d756, -0x7c00100,0x230400,0x6100d85c,0x2802500,0x962460,0x6100d85c,0x6800100,0x962540,0x6100d85c,0x7c00100,0x230400,0x6100d85c,0x7c00500,0x230400,0x6100d997,0x2802100, -0x962460,0x6100d997,0x4000000,0x200000,0x6100d997,0x4000000,0x400000,0x6100d997,0x6800000,0x1329800,0x6100d997,0x6800100,0x962540,0x6100d997,0x6804400,0x962540, -0x6100d997,0x7c00100,0x230400,0x6100d997,0x7c00100,0x230560,0x6100d997,0xc000010,0x448000,0x6100da98,0x6800000,0x1329800,0x6100da98,0x7c00100,0x230400,0x6100db71, -0x4000000,0x200000,0x6100dc99,0x2802100,0x962460,0x6100dc99,0x2802400,0x962460,0x6100dc99,0x6800000,0x1329800,0x6100dc99,0x6800100,0x962540,0x6100dc99,0x6804400, -0x962540,0x6100dc99,0x7c00100,0x230400,0x610a4711,0x7c40300,0xe30000,0x610a4f11,0x7c00300,0xe30001,0x610ace00,0x4000000,0xe00000,0x6140afa1,0x7c00100,0x230400, -0x6140afa3,0x7c00100,0x230400,0x6180af9e,0x2802400,0x962460,0x62002a00,0x4000000,0x1600000,0x63002800,0x80000,0x918820,0x63c00c15,0x80000,0x918820,0x7000080e, -0x7c00100,0x250400,0x70000a03,0x4000000,0x200000,0x70000c00,0x80000000,0x218960,0x70000f0a,0x7c00100,0x230400,0x70001004,0x7c00100,0x230400,0x70001524,0x2802100, -0x962460,0x70001524,0x7c00100,0x230400,0x70001615,0x2802100,0x962460,0x7000171a,0x2802100,0x962460,0x70001821,0x6800000,0x1329800,0x70002320,0x7c00100,0x230400, -0x70002a00,0x4000000,0x1500000,0x70002a00,0x4000000,0x1600000,0x70003000,0x24000000,0x200000,0x70003800,0x24000000,0xe00000,0x70005201,0x2802400,0x962460,0x7000581e, -0x7c00100,0x230400,0x70006108,0x7c00100,0x220400,0x70006108,0x7c00100,0x250400,0x70006f30,0x7c00100,0x230400,0x70007300,0x24000000,0x200000,0x70007f0e,0x4000000, -0x200000,0x70008301,0x2802100,0x962460,0x70008301,0x2802400,0x962460,0x70008e00,0x24000000,0x200000,0x70008e00,0x24000000,0x400000,0x70008e00,0x24000002,0x400000, -0x70008e00,0x24000008,0x1410000,0x70008e00,0x24000010,0x400000,0x70008e00,0x2c000010,0x448000,0x70009519,0x7c00100,0x220400,0x70009519,0x7c00100,0x230400,0x70009519, -0x7c00100,0x250400,0x70009865,0x7c00100,0x230400,0x70009965,0x4000010,0x400000,0x70009965,0x7c00100,0x230400,0x7000a008,0x7c00100,0x220400,0x7000a008,0x7c00100, -0x250400,0x7000a008,0x7c00500,0x22040f,0x7000a50e,0x4000000,0x200000,0x7000b61c,0x2802500,0x1862460,0x7000b61c,0x6800500,0x1862400,0x7000b61c,0x7c00100,0x1830000, -0x7000c300,0x4000000,0x100000,0x7000c941,0x2806000,0x962460,0x7000cc00,0x4000000,0xe00000,0x7000cd00,0x4000000,0x200000,0x7000cd00,0x4000000,0xe00000,0x7000cd00, -0x4000000,0x2800000,0x7000cf00,0x4000000,0xe00000,0x7000d202,0x2802100,0x962460,0x7000d202,0x7c00100,0x230400,0x7000d997,0x7c00100,0x230400,0x7000d997,0xc000010, -0x248000,0x7000dd86,0x2802400,0x962460,0x7000dd86,0x7c00100,0x230400,0x7000dd86,0xc000010,0x448000,0x7000de9f,0x4000000,0x200000,0x7000de9f,0x7c00100,0x230400, -0x7000e001,0x2400,0x962460,0x7000e001,0x2802400,0x962460,0x7000e187,0x2802000,0x962460,0x7000e187,0x2802100,0x962460,0x7000e187,0x4000000,0x200000,0x7000e187, -0x7c00100,0x230400,0x7000e187,0xc000010,0x448000,0x7000e288,0x7c00100,0x230400,0x7000e300,0x4000000,0x200000,0x7000e489,0x2802100,0x962460,0x7000e489,0x2802400, -0x962460,0x7000e489,0x6800100,0x962540,0x7000e489,0x6800100,0x962541,0x7000e489,0x6804400,0x962540,0x7000e489,0x7c00100,0x230400,0x7000e489,0x7c00900,0x230400, -0x7000e59d,0x2802100,0x962460,0x7000e59d,0x2802400,0x962460,0x7000e59d,0x4000000,0x200000,0x7000e59d,0x4000010,0x200000,0x7000e59d,0x6800100,0x962540,0x7000e59d, -0x6804400,0x962540,0x7000e59d,0x7c00100,0x230400,0x7000e59d,0xc000010,0x448000,0x7000e691,0x2802100,0x962460,0x7000e691,0x2802400,0x962460,0x7000e691,0x2806400, -0x962460,0x7000e691,0x6800000,0x1329800,0x7000e691,0x6800100,0x962540,0x7000e691,0x7c00100,0x230400,0x7000e700,0x4000400,0x200400,0x7000e70e,0x7c00100,0x220400, -0x7000e719,0x7c00100,0x220400,0x7000e719,0x7c00500,0x22040f,0x7000e853,0x7c00100,0x230400,0x7000e9a0,0x2802400,0x962460,0x7000e9a0,0x4000000,0x200000,0x7000e9a0, -0x4000000,0x500000,0x7000e9a0,0x7c00100,0x230400,0x7000ea79,0x2802400,0x962460,0x7000ea79,0x4000000,0x200000,0x7000ea79,0x4000000,0xf00000,0x7000ea79,0x4000010, -0x400000,0x7000ea79,0x7c00100,0x230400,0x7000eb8c,0x2802400,0x962460,0x7000eb8c,0x4000000,0x200000,0x7000eb8c,0x7c00100,0x230400,0x7000eca3,0x2802100,0x962460, -0x7000eca3,0x2806400,0x962460,0x7000eca3,0x4000000,0x200000,0x7000eca3,0x6800000,0x1329800,0x7000eca3,0x6800100,0x962540,0x7000eca3,0x7c00100,0x230400,0x7000eca3, -0xc000010,0x448000,0x7000ed95,0x6800000,0x1329800,0x7000ed95,0x7c00100,0x230400,0x7000ed95,0xc000010,0x448000,0x7000ee1c,0x2802500,0x1862460,0x7000ee1c,0x6800000, -0x1329800,0x7000ee1c,0x7c00100,0x1830000,0x7000ee1c,0x7c00900,0x1830000,0x7000ef8f,0x4000000,0x200000,0x7000ef8f,0x7c00100,0x230400,0x7000f08e,0x4000000,0x200000, -0x7000f08e,0x7c00100,0x230400,0x7000f159,0x2802100,0x962460,0x7000f159,0x7c00100,0x230400,0x7000f200,0x4000000,0x200000,0x7000f200,0x4000000,0x1200000,0x7000f200, -0x4000000,0x1710000,0x7000f34b,0x2802400,0x962460,0x7000f34b,0x4000000,0x200000,0x7000f34b,0x4000010,0x400000,0x7000f34b,0x6800000,0x1329800,0x7000f34b,0x7c00100, -0x230400,0x7000f34b,0x7c00900,0x230400,0x7000f34b,0xc000010,0x448000,0x7000f490,0x4000000,0x200000,0x7000f490,0x7c00100,0x230400,0x7000f5a5,0x7c00100,0x230400, -0x7000f67b,0x4000000,0x200000,0x7000f67b,0x4000010,0x200000,0x7000f67b,0x7c00100,0x230400,0x7000f8a6,0x2802100,0x962460,0x7000f8a6,0x2802400,0x962460,0x7000f8a6, -0x2806400,0x962460,0x7000f8a6,0x4000000,0x500000,0x7000f8a6,0x4000010,0xb00000,0x7000f8a6,0x4000800,0x200000,0x7000f8a6,0x6800100,0x962540,0x7000f8a6,0x6800100, -0x962541,0x7000f8a6,0x7c00100,0x230400,0x7000f8a6,0xc000010,0x448000,0x7000f921,0x4000000,0x200000,0x7000fa00,0x4000000,0x200000,0x7000fb9e,0x2802100,0x962460, -0x7000fb9e,0x2802400,0x962460,0x7000fb9e,0x2806400,0x962460,0x7000fb9e,0x4000000,0x200000,0x7000fb9e,0x6800000,0x1329800,0x7000fb9e,0x6800100,0x962540,0x7000fb9e, -0x6800100,0x962541,0x7000fb9e,0x7c00100,0x230400,0x7000fc92,0x4000000,0x200000,0x7000fc92,0x6800000,0x1329800,0x7000fc92,0x7c00100,0x220400,0x7000fc92,0x7c00100, -0x230400,0x7000fc92,0x7c00100,0x250400,0x700acd00,0x4000000,0xe00000,0x700acd00,0x4000000,0x2800000,0x700ace00,0x4000000,0xe00000,0x700acf00,0x4000000,0xe00000, -0x700acf00,0x4000000,0x2800000,0x7050df11,0x4000000,0x200000,0x7050f719,0x80000,0x918820,0x7080afa1,0x2802400,0x962460,0x7090df11,0x2802400,0x962460,0x70d0e417, -0x2802100,0x962460,0x70d0e417,0x2802400,0x962460,0x70d0e417,0x6800100,0x962540,0x70d0ea15,0x4000010,0x400000,0x8000120f,0x7c00100,0x230400,0x80001524,0x7c00100, -0x230400,0x8000171a,0x7c00100,0x230400,0x80002006,0x7c00100,0x220400,0x80002006,0x7c00100,0x250400,0x80002a00,0x4000000,0x1500000,0x80002d00,0x4000000,0x200000, -0x80005208,0x2802400,0x962460,0x80005c00,0x4000000,0x200000,0x80007300,0x24000000,0x200000,0x80009519,0x7c00100,0x220400,0x80009519,0x7c00100,0x230400,0x80009519, -0x7c00100,0x250400,0x80009865,0x7c00100,0x230400,0x8000a008,0x2802100,0x962460,0x8000b30a,0x4000000,0x500000,0x8000b30a,0x7c00100,0x230400,0x8000cd00,0x4000000, -0xe00000,0x8000d202,0x2802500,0x962460,0x8000d202,0x7c00100,0x230400,0x8000d68d,0x4000000,0x200000,0x8000d997,0x2802000,0x962460,0x8000d997,0x2802400,0x962460, -0x8000d997,0x4000000,0x400000,0x8000d997,0x4000000,0x500000,0x8000d997,0x7c00100,0x230400,0x8000d997,0xc000010,0x448000,0x8000e489,0x2802100,0x962460,0x8000e489, -0x7c00100,0x230400,0x8000e719,0x7c00100,0x220400,0x8000f8a6,0x2802100,0x962460,0x8000f8a6,0x7c00100,0x230400,0x8000f8a6,0xc000010,0x448000,0x8000fda1,0x2802100, -0x1862460,0x8000fda1,0x2806400,0x1862460,0x8000fda1,0x4000000,0x1800000,0x8000fda1,0x6800000,0x1329800,0x8000fda1,0x6800100,0x1862400,0x8000fda1,0x6800100,0x1862540, -0x8000fda1,0x7c00100,0x1830000,0x8000fda1,0xc000010,0x448000,0x8000fe9c,0x7c00100,0x230400,0x8000fe9c,0x7c00100,0x830400,0x8000fe9c,0x7c00100,0x1430400,0x8000ff06, -0x7c00100,0x220400,0x80010165,0x7c00100,0x230400,0x800102a2,0x4000000,0x200000,0x800102a2,0x7c00100,0x230400,0x800103a4,0x7c00100,0x230400,0x800103a4,0xc000010, -0x448000,0x8001044c,0x4000000,0x200000,0x8001044c,0x7c00100,0x220400,0x8001044c,0x7c00100,0x250400,0x80010670,0x2802000,0x962460,0x80010670,0x4000000,0x200000, -0x80010670,0x4000010,0x400000,0x80010670,0xc000010,0x448000,0x800a4711,0x7c40300,0xe30000,0x800acd00,0x4000000,0xe00000,0x800acd00,0x4000000,0x2902460,0x800ace00, -0x4000000,0xe00000,0x800acf00,0x4000000,0xe00000,0x800b0011,0x7c40300,0xe30000,0x800b0500,0x4000000,0xe00000,0x800b0500,0x4000000,0x2800000,0x90001615,0x7c00100, -0x230400,0x9000171a,0x4000000,0x200000,0x9000171a,0x7c00100,0x230400,0x90003000,0x24000000,0x200000,0x90007f0e,0x4000000,0x200000,0x90008301,0x2802400,0x962460, -0x90008e00,0x24000000,0x400000,0x90009519,0x7c00100,0x250400,0x9000a16f,0x2802100,0x962460,0x9000d200,0x80000000,0x218960,0x9000d202,0x2802000,0x962460,0x9000d202, -0x2802100,0x962460,0x9000d202,0x7c00100,0x230400,0x9000e59d,0x2802100,0x962460,0x90010500,0x4000000,0xe00000,0x900107a7,0x2802100,0x962460,0x900107a7,0x2802400, -0x962460,0x900107a7,0x2802c00,0x962460,0x900107a7,0x4000000,0x1400000,0x900107a7,0x6800000,0x1329800,0x900107a7,0x7c00100,0x220400,0x900107a7,0x7c00100,0x250400, -0x900108a8,0x2802100,0x962460,0x900108a8,0x2806400,0x962460,0x900108a8,0x4000000,0x200000,0x900108a8,0x4000000,0x400000,0x900108a8,0x4000010,0x400000,0x900108a8, -0x6800000,0x1329800,0x900108a8,0x6800100,0x962540,0x900108a8,0x7c00100,0x230400,0x900108a8,0xc000010,0x448000,0x90010908,0x7c00100,0x220400,0x90010a38,0x2802100, -0x962460,0x90010ca9,0x2802100,0x962460,0x90010ca9,0x4000000,0x500000,0x90010ca9,0x4000010,0xb00000,0x90010ca9,0x6800100,0x962540,0x90010ca9,0x7c00100,0x230400, -0x90010d1b,0x4000000,0x500000,0x90010eaa,0x2802100,0x962460,0x90010eaa,0x2802400,0x962460,0x90010eaa,0x2806400,0x962460,0x90010eaa,0x4000000,0x200000,0x90010eaa, -0x4000000,0x400000,0x90010eaa,0x4000010,0x400000,0x90010eaa,0x6800000,0x1329800,0x90010eaa,0x6800100,0x962540,0x90010eaa,0x7c00100,0x230400,0x90010eaa,0xc000010, -0x448000,0x90010fab,0x7c00100,0x220400,0x90010fab,0x7c00100,0x250400,0x9002c300,0x4000000,0x100000,0x900ac400,0x4000000,0xe0000d,0x900acd00,0x4000000,0xe00000, -0x900acd00,0x4000000,0x2800000,0x900acf00,0x4000000,0xe00000,0x900b0500,0x4000000,0xe00000,0x900b0500,0x4000000,0x2800000,0x900b0b9a,0x7c00900,0x1230400,0x900b109a, -0x7c00300,0xe30000,0x900b119a,0x7c00300,0xe30000,0x90408e06,0x24000000,0x400000,0xa0001004,0x4000000,0x200000,0xa0001004,0x7c00100,0x230400,0xa000120f,0x2802100, -0x962460,0xa000120f,0x2802400,0x962460,0xa000171a,0x2802100,0x962460,0xa000171a,0x2806400,0x962460,0xa0002a00,0x4000000,0x1600000,0xa0003000,0x24000000,0x200000, -0xa000581e,0x7c00100,0x230400,0xa0007300,0x24000000,0x200000,0xa0008301,0x2802400,0x962460,0xa0008e00,0x24000000,0x400000,0xa000cf00,0x4000000,0xe00000,0xa0010500, -0x4000000,0x200000,0xa00114af,0x2802100,0x962460,0xa00114af,0x2802400,0x962460,0xa00114af,0x2806400,0x962460,0xa00114af,0x6800000,0x1329800,0xa00114af,0x7c00100, -0x230400,0xa00114af,0x7c00100,0x230560,0xa00116b0,0x2802100,0x962460,0xa00116b0,0x2802800,0x962460,0xa00116b0,0x2806400,0x962460,0xa00116b0,0x4000000,0x400000, -0xa00116b0,0x4000000,0x500000,0xa00116b0,0x4000010,0x400000,0xa00116b0,0x6800100,0x962540,0xa00116b0,0x7c00100,0x230400,0xa00116b0,0x7c00100,0x230560,0xa00116b0, -0xc000010,0x448000,0xa0011722,0x7c00100,0x230400,0xa00118b1,0x2802000,0x962460,0xa00118b1,0x2802100,0x962460,0xa00118b1,0x2806400,0x962460,0xa00118b1,0x4000000, -0x200000,0xa00118b1,0x4000000,0x400000,0xa00118b1,0x4000000,0x500000,0xa00118b1,0x6800100,0x962540,0xa00118b1,0x7c00100,0x230400,0xa00118b1,0x7c00100,0x230560, -0xa00118b1,0xc000010,0x448000,0xa00a4005,0x7c00100,0xe30400,0xa00a4711,0x7c40300,0xe30000,0xa00ac400,0x4000000,0xe00000,0xa00acb14,0x7c00100,0xe30000,0xa00acf00, -0x4000000,0xe00000,0xa00b0500,0x4000000,0xe00000,0xa00b0500,0x4000000,0x2800000,0xa00b0b96,0x7c00900,0x1230400,0xa00b1211,0x7c40300,0xe30000,0xa00b1314,0x7c00100, -0xe30000,0xa00b1596,0x7c00300,0xe30000,0xa040afb7,0x6800400,0x962540,0xa08083b8,0x2802400,0x962460,0xb0000a03,0x7c00100,0x220400,0xb0000b13,0x7c00100,0x2633800, -0xb0001004,0x2802000,0x962460,0xb0001110,0x4000000,0x200000,0xb0001524,0x2802100,0x962460,0xb0001615,0x4000000,0x500000,0xb000251b,0x7c00100,0x230400,0xb0007300, -0x24000000,0x200000,0xb0008939,0x4000000,0x200000,0xb0008939,0x7c00100,0x230400,0xb0008e00,0x24000000,0x200000,0xb0008e00,0x24000000,0x400000,0xb0008e00,0x24000010, -0x400000,0xb0009257,0x2802000,0x962460,0xb0009257,0x4000000,0x1600000,0xb0009519,0x7c00100,0x220400,0xb0009519,0x7c00100,0x250400,0xb0009a00,0x4000000,0x200000, -0xb000b30a,0x2802100,0x962460,0xb000b30a,0x7c00100,0x230400,0xb000c178,0x80000000,0x218960,0xb000c300,0x4000000,0x200000,0xb000d202,0x2802000,0x962460,0xb000d476, -0x6800100,0x962540,0xb000d476,0x7c00100,0x230400,0xb000e300,0x4000000,0xe00000,0xb000fda1,0x7c00100,0x1830000,0xb0010eaa,0x2802000,0x962460,0xb00116b0,0x7c00100, -0x230400,0xb0011900,0x4000000,0xe00000,0xb0011ab2,0x2802100,0x962460,0xb0011ab2,0x2802400,0x962460,0xb0011ab2,0x2806400,0x962460,0xb0011ab2,0x4000000,0x200000, -0xb0011ab2,0x6800100,0x962540,0xb0011ab2,0x7c00100,0x230400,0xb0011b0c,0x7c00100,0x230400,0xb0011cb3,0x2802100,0x962460,0xb0011cb3,0x2806400,0x962460,0xb0011cb3, -0x6800000,0x1329800,0xb0011cb3,0x6800100,0x962540,0xb0011cb3,0x7c00100,0x230400,0xb0011db6,0x2802500,0x962460,0xb0011db6,0x6800000,0x1329800,0xb0011db6,0x7c00100, -0x230400,0xb0011db6,0x7c00500,0x230400,0xb0011e00,0x4000000,0x200000,0xb0011e00,0x4000000,0x1500000,0xb0011fb4,0x2802100,0x962460,0xb0011fb4,0x6800100,0x962540, -0xb0011fb4,0x7c00100,0x230400,0xb0011fb4,0xc000010,0x248000,0xb0012000,0x4000000,0x200000,0xb00121b5,0x4000000,0x200000,0xb00121b5,0x4000010,0x400000,0xb00121b5, -0x7c00100,0x220400,0xb00121b5,0x7c00100,0x250400,0xb00121b5,0xc000010,0x448000,0xb00122b8,0x4000000,0x200000,0xb00122b8,0x7c00100,0x230400,0xb00123b7,0x2802400, -0x962460,0xb00123b7,0x4000000,0x200000,0xb00123b7,0x7c00100,0x230400,0xb00123b7,0xc000010,0x248000,0xb00a4005,0x7c00100,0xe30400,0xb00a4711,0x7c40300,0xe30000, -0xb00acf00,0x4000000,0xe00000,0xb00b0500,0x4000000,0xe00000,0xb00b0500,0x4000000,0x2800000,0xb00b109a,0x7c00300,0xe30000,0xb080e487,0x2802000,0x962460,0xc0001524, -0x4000000,0x500000,0xc0001a18,0x2806400,0x1862460,0xc0001a18,0x7c00100,0x1830000,0xc0007300,0x24000000,0x200000,0xc0008e00,0x24000010,0x400000,0xc0009519,0x7c00100, -0x220400,0xc0009519,0x7c00100,0x250400,0xc000c300,0x4000000,0x20000f,0xc000d85c,0x2802100,0x962460,0xc000d85c,0x6800100,0x962540,0xc000d85c,0x7c00100,0x230400, -0xc000dc99,0x7c00100,0x230400,0xc000e719,0x7c00100,0x220400,0xc00107a7,0x7c00100,0x230400,0xc0010eaa,0x7c00100,0x230400,0xc00116b0,0x7c00100,0x230560,0xc0011900, -0x4000000,0x200000,0xc0012447,0,0x818820,0xc0012447,0,0xc18820,0xc0012447,0,0x1418820,0xc00125b9,0x7c00100,0x230400,0xc00126bb,0x2802100, -0x962460,0xc00126bb,0x2806400,0x962460,0xc00126bb,0x4000000,0x500000,0xc00126bb,0x6800100,0x962540,0xc00126bb,0x7c00100,0x230400,0xc00127ba,0x2802400,0x962460, -0xc00127ba,0x4000000,0x200000,0xc00127ba,0x6800000,0x1329800,0xc00127ba,0x7c00100,0x230400,0xc00127ba,0x7c00900,0x230400,0xc0012800,0x4000000,0x200000,0xc0012b23, -0x4000000,0x200000,0xc0012b23,0x4000000,0x400000,0xc0012b23,0x4000000,0x1500000,0xc0012cbc,0x2802400,0x962460,0xc0012cbc,0x4000000,0x1600000,0xc0012cbc,0x6800000, -0x1329800,0xc0012cbc,0x7c00100,0x230400,0xc00acf00,0x4000000,0xe00000,0xc00ae300,0x4000000,0xe00000,0xc00b0500,0x4000000,0xe00000,0xc00b0500,0x4000000,0x2800000, -0xc00b0b11,0x4000000,0x1200000,0xc00b0b11,0x7c00900,0x1230400,0xc00b109a,0x7c00300,0xe30000,0xc00b2914,0x7c00100,0x2530000,0xc00b2916,0x7c00100,0x2530c00,0xc00b2a00, -0x4000000,0xe00000,0xc040af5e,0x7c00100,0x230400,0xc0c12b89,0x4000000,0x200000,0xc14a44ca,0x4000000,0xe0000d,0xd000131f,0x2802c00,0x962460,0xd000171a,0x7c00100, -0x230400,0xd0001821,0x2802100,0x962460,0xd0007300,0x24000000,0x200000,0xd0008e00,0x24000000,0x200000,0xd0008f3a,0x2806000,0x962460,0xd0009519,0x7c00100,0x220400, -0xd0009519,0x7c00100,0x250400,0xd000a500,0x4000000,0x200000,0xd000c300,0x4000000,0xe00000,0xd000d202,0x7c00100,0x230400,0xd000d476,0x7c00100,0x230400,0xd000d997, -0x2802100,0x962460,0xd000d997,0x6800100,0x962540,0xd000e001,0x2802100,0x962460,0xd000e700,0x4000400,0x200000,0xd000e719,0x7c00100,0x220400,0xd000e719,0x7c00500, -0x22040f,0xd000fa00,0x4000000,0xe00000,0xd0010eaa,0x4000010,0x400000,0xd0010eaa,0x7c00100,0x230400,0xd0012dbd,0x4000000,0x200000,0xd0012dbd,0x7c00100,0x230400, -0xd0012fbe,0x2802100,0x962460,0xd0012fbe,0x2802400,0x962460,0xd0012fbe,0x2806400,0x962460,0xd0012fbe,0x4000000,0x400000,0xd0012fbe,0x6800000,0x1329800,0xd0012fbe, -0x6800100,0x962540,0xd0012fbe,0x6800100,0x962541,0xd0012fbe,0x6804400,0x962540,0xd0012fbe,0x7c00100,0x230400,0xd0012fbe,0x7c00100,0x230560,0xd0012fbe,0xc000010, -0x448000,0xd0013183,0x7c00100,0x230400,0xd0013200,0x4000000,0x200000,0xd0013200,0x6800000,0x1329805,0xd00134c0,0x2802100,0x962460,0xd00134c0,0x4000002,0x400000, -0xd00134c0,0x7c00100,0x230400,0xd00a4305,0x7c00100,0xe30400,0xd00a4611,0x7c40300,0xe30000,0xd00a4711,0x7c40300,0xe30000,0xd00a5e11,0x7c40300,0xe30000,0xd00acf00, -0x4000000,0xe00000,0xd00b0500,0x4000000,0xe00000,0xd00b0500,0x4000000,0x2800000,0xd00b0b11,0x6800500,0x962540,0xd00b0bbf,0x2802200,0xc62460,0xd00b119a,0x7c00300, -0xe30000,0xd00b2a00,0x4000000,0xe00000,0xd00b2e11,0x7c40300,0xe30000,0xd00b30bf,0x7c00300,0x230000,0xd00b339a,0x7c00300,0xe30000,0xe0000c02,0xc000010,0xb48000, -0xe0001524,0x2802400,0x962460,0xe0001524,0x7c00100,0x230400,0xe0001615,0x7c00100,0x230400,0xe000251b,0x12882000,0x962460,0xe0002a00,0x4000000,0x1500000,0xe0005102, -0x4000000,0x200000,0xe0005c00,0x4000000,0x200000,0xe000622a,0x6804400,0x962540,0xe000622a,0x7c00100,0x230400,0xe0008838,0x7c00100,0x220400,0xe0008838,0x7c00100, -0x250400,0xe0008e00,0x24000000,0x810000,0xe0008e00,0x24000000,0x1410000,0xe0008e00,0x24000002,0x400000,0xe0008e00,0x2c000010,0xb48000,0xe000933e,0x7c00100,0x230400, -0xe000933e,0xc000010,0x448000,0xe0009519,0x7c00100,0x220400,0xe0009519,0x7c00100,0x22040f,0xe0009519,0x7c00100,0x250400,0xe000c178,0x2802100,0x962460,0xe000c941, -0x2802100,0x962460,0xe000c941,0x2806400,0x962460,0xe000c941,0x7c00100,0x230400,0xe000d202,0x2802400,0x962460,0xe000d202,0x7c00100,0x230400,0xe000d202,0x7c00500, -0x230400,0xe000dc99,0x4000000,0x200000,0xe000e001,0x2802100,0x962460,0xe000e001,0x2802400,0x962460,0xe000fda1,0x7c00100,0x1830000,0xe0013502,0x2802400,0x962460, -0xe0013502,0x4000000,0x200000,0xe0013502,0x7c00100,0x230400,0xe0013502,0x80000000,0x218960,0xe00136c1,0x4000000,0x200000,0xe00136c1,0x7c00100,0x230400,0xe001370b, -0x7c00100,0x230400,0xe0013919,0x7c00500,0x220400,0xe0013919,0x7c00500,0x22040f,0xe0013919,0x7c00d00,0x23040f,0xe0013a19,0x7c00100,0x220400,0xe0013a19,0x7c00100, -0x230400,0xe0013bc2,0x2802400,0x962460,0xe0013bc2,0x7c00100,0x230400,0xe0013bc2,0xc000010,0x248000,0xe0013cc3,0x6800000,0x1329800,0xe0013cc3,0x7c00100,0x230400, -0xe0013dc4,0x2802400,0x962460,0xe0013dc4,0x7c00100,0x230400,0xe0013e28,0x7c00100,0x230400,0xe0013fc5,0x7c00100,0x220400,0xe0013fc5,0x7c00100,0x250400,0xe0014000, -0x4000000,0x200000,0xe0014001,0x2802400,0x962460,0xe00a4711,0x7c40300,0xe30000,0xe00a5e11,0x7c40300,0xe30000,0xe00ac511,0x7c40300,0xe30000,0xe00acf00,0x4000000, -0xe00000,0xe00ae300,0x4000000,0xe00000,0xe00b0500,0x4000000,0xe00000,0xe00b1314,0x7c00100,0xe30000,0xe00b1316,0x7c00100,0xe30c00,0xe00b2a00,0x4000000,0xe00000, -0xe00b2a00,0x4000000,0x2800000,0xe00b3816,0x7c00500,0x230c00,0xe0808328,0x2802400,0x962460,0xf0001615,0x6800100,0x962540,0xf0001a18,0x2802000,0x1862460,0xf000c247, -0x7c00100,0x230400,0xf000d000,0x4000000,0xe00000,0xf000e300,0x4000000,0xe00000,0xf000e59d,0x2802100,0x962460,0xf000e59d,0x7c00100,0x230400,0xf0012447,0, -0x818820,0xf0012447,0,0xc18820,0xf0012447,0,0x1418820,0xf0012447,0x2802000,0x962460,0xf0012447,0x2802400,0x962460,0xf0012447,0x7c00100,0x230400, -0xf0013a19,0x7c00100,0x220400,0xf0014102,0x2802400,0x962460,0xf0014308,0x2802100,0x962460,0xf0014308,0x7c00500,0x22040e,0xf0014308,0x7c00500,0x22040f,0xf001440a, -0x4000000,0x500000,0xf0014500,0x4000000,0x200000,0xf00146c6,0x2802100,0x962460,0xf00146c6,0x2806000,0x962460,0xf00146c6,0x4000000,0xe00000,0xf00146c6,0x6800000, -0x1329800,0xf00146c6,0x6800100,0x962540,0xf00146c6,0x6804000,0x962540,0xf00146c6,0x7c00100,0x230400,0xf00146c6,0x7c00100,0x230560,0xf00146c6,0xc000010,0x448000, -0xf00147c7,0x2802000,0x962460,0xf00147c7,0x6800000,0x1329800,0xf00147c7,0x7c00100,0x230400,0xf00ac511,0x7c40300,0xe30000,0xf00acf00,0x4000000,0xe00000,0xf00b2914, -0x7c00100,0x2530000,0xf00b2916,0x7c00100,0x2530c00,0xf00b2a00,0x4000000,0xe00000,0xf00b2a00,0x4000000,0x2800000,0xf00b4211,0x7c40300,0xe30000}; +0x1200000,0x30002417,0x6800000,0x1329800,0x30002417,0x6800100,0x1862540,0x30002417,0x7c00100,0x1830000,0x30002417,0x7d00100,0x1830000,0x30002417,0xc000010,0x448000, +0x3000251b,0x80000,0xc18820,0x3000251b,0x2802100,0x962460,0x3000251b,0x3c02100,0x962460,0x3000251b,0x4000000,0x200000,0x3000251b,0x4000006,0x500000,0x3000251b, +0x4000010,0x400000,0x3000251b,0x4000010,0xb70000,0x3000251b,0x4000800,0x200000,0x3000251b,0x6800000,0x1329800,0x3000251b,0x7c00100,0x230400,0x3000251b,0x7c00900, +0x230400,0x3000251b,0xc000010,0xb48000,0x3000251b,0x12882000,0x962460,0x30002800,0x24000000,0x200000,0x30002800,0x2c000010,0x1248002,0x30002a00,0x4000000,0x1600000, +0x30002b01,0x2000,0x962460,0x30002c00,0x4000000,0x200000,0x30002c00,0x7c00100,0x220405,0x30002d19,0x7c00100,0x250400,0x30002e00,0x24000000,0x200000,0x30003000, +0x24000000,0x200000,0x30003100,0x24000000,0x200000,0x30003600,0x24000000,0x200000,0x30003700,0x24000000,0x200000,0x3000392e,0x24000000,0x200000,0x30005013,0x7c00100, +0x2633801,0x30005600,0,0x918820,0x30020600,0x4000400,0x500400,0x30020701,0x2802400,0x962460,0x30020701,0x2802400,0xc62460,0x300a3a11,0x4020000,0xe00000, +0x300a3a11,0x4020000,0xe00002,0x300a3b11,0x4020000,0xe00002,0x300a3c00,0x4008000,0xe00000,0x300a3c00,0x4010000,0xe00000,0x300a3d11,0x7c00300,0xe30002,0x300a4305, +0x7c00100,0xe30400,0x300a4611,0x7c40300,0xe30000,0x300a4829,0x7c00100,0xe30400,0x300a4829,0x7c00900,0x1230400,0x300a4929,0x4000000,0xe00000,0x3040259a,0x4000010, +0x400000,0x3040259a,0x4000010,0xb70000,0x3040259a,0xc000010,0xb48000,0x304028bc,0x4000001,0xc41c0b,0x304a3dcc,0x4000000,0xe00000,0x30800c27,0x2802100,0x962460, +0x30c01c92,0x6800000,0x1329800,0x3100080e,0x7c00120,0x220402,0x3100080e,0x7c00120,0x250402,0x31005167,0x1000,0,0x3100581e,0x4000000,0x200000,0x3100581e, +0x7c00100,0x230400,0x3100590d,0x7c00100,0x230400,0x31005a09,0x7c00100,0x220400,0x31005a09,0x7c00100,0x250400,0x31005b00,0x4000000,0x200000,0x31005c00,0x80000, +0x918820,0x31005c00,0x2802000,0x962460,0x31005c00,0x2802400,0x962460,0x31005c00,0x4000000,0x200000,0x31005c00,0x4000000,0x200001,0x31005c00,0x6800000,0x962540, +0x31005c00,0x6800400,0x962540,0x31005c01,0x2802400,0x962460,0x31005d00,0x4000020,0x200005,0x31005d00,0x6800020,0x1329805,0x31005d00,0x7c00120,0x220405,0x31005d00, +0x7c00120,0x250405,0x31006000,0x82000,0x962460,0x31006000,0x180000,0x918820,0x310a5e11,0x7c40300,0xe30000,0x310a5f11,0x7c00300,0xe30001,0x32000419,0x7c00100, +0x250400,0x3200080e,0x4000020,0x200000,0x3200080e,0x7c00100,0x220400,0x3200080e,0x7c00100,0x250400,0x32000908,0x7c00100,0x220400,0x32000908,0x7c00100,0x250400, +0x32000c02,0x7c00100,0x230400,0x32000e25,0x7c00100,0x230400,0x32001d0c,0x7c00100,0x230400,0x32002800,0x80000,0x1e18820,0x32002800,0x80020,0x218820,0x32002800, +0x4000001,0x445802,0x32002800,0x24000000,0x200000,0x32002800,0x24000000,0x1500002,0x32002800,0x24000020,0x200000,0x32002800,0x2c000010,0x1248002,0x32002919,0x7c00100, +0x22040f,0x32002a00,0x4000000,0x1600000,0x32002b01,0x2000,0x962460,0x32002b01,0x2802000,0x962460,0x32002b01,0x2802020,0x962460,0x32002c00,0x4000000,0x200000, +0x32002c00,0x4000020,0x200000,0x32002c00,0x4000020,0x200005,0x32002c00,0x7c00120,0x220405,0x32002c00,0x7c00120,0x250405,0x32002e00,0x24000020,0x200000,0x32002f00, +0x24000020,0x200000,0x32003000,0x24000000,0x200000,0x32003000,0x24000020,0x200000,0x32003500,0x24000000,0x200000,0x32003600,0x24000020,0x200000,0x32003700,0x24000000, +0x100000,0x32003700,0x24000000,0x200000,0x32003800,0x24000000,0x810000,0x32003800,0x24000000,0x1410000,0x32005102,0x4000000,0x1500008,0x32005502,0x7c00100,0x230400, +0x32006108,0x7c00100,0x220400,0x32006108,0x7c00100,0x250400,0x3200622a,0x2802100,0x962460,0x3200622a,0x2806400,0x962460,0x3200622a,0x7c00100,0x230400,0x3200632b, +0x2802100,0x962460,0x3200632b,0x6804000,0x962540,0x3200632b,0x7c00100,0x230400,0x3200642c,0x2802100,0x962460,0x3200642c,0x7c00100,0x230400,0x3200652d,0x2802100, +0x962460,0x3200652d,0x7c00100,0x230400,0x32006600,0x24000020,0x200000,0x32006700,0x24000020,0x200000,0x32006800,0x24000020,0x200000,0x32006900,0x24000020,0x200000, +0x32006900,0x24000020,0x810000,0x32006900,0x24000020,0x1410000,0x32006a00,0x24000020,0x200000,0x32006a00,0x24000020,0x200001,0x32006a00,0x24000020,0x200002,0x32020701, +0x2882000,0xc62460,0x32023300,0x4000000,0x100000,0x32026c01,0x12882000,0x962460,0x32065700,0x4000000,0x810011,0x32065700,0x4000000,0x1410011,0x32086600,0x24000020, +0x810000,0x32086600,0x24000020,0x1410000,0x32086900,0x24000020,0x810000,0x32086900,0x24000020,0x1410000,0x320a3600,0x24000020,0x200000,0x320a3d11,0x7c00100,0x1230400, +0x320a3e14,0x7c00100,0xe30010,0x320a3e14,0x7c00100,0x2530000,0x320a3f16,0x7c00100,0xe30c10,0x320a4400,0x4000000,0xe00003,0x320a4929,0x4000000,0xe00000,0x320a4f11, +0x7c00300,0xe30001,0x320a6b16,0x7c00100,0x2530c00,0x32406396,0xc000010,0x448000,0x324a3dcf,0x4000000,0xe00000,0x324a3dcf,0x7c00100,0x1230400,0x324a3fca,0x4000002, +0x1200c00,0x324a53c7,0x24000000,0xe00000,0x32820701,0x2802000,0x962460,0x40000419,0x7c00100,0x220400,0x40000519,0x7c00100,0x220400,0x40000600,0x4000400,0x200400, +0x4000080e,0x7c00100,0x220400,0x4000080e,0x7c00100,0x250400,0x4000080e,0x7c00100,0x250402,0x40000c02,0x2802100,0x962460,0x40000c02,0x2802400,0x962460,0x40000c02, +0x2802500,0x962460,0x40000c02,0x4000000,0x200000,0x40000c02,0x4000000,0x1071400,0x40000c02,0x7c00100,0x230400,0x40000c02,0x80000000,0x1329960,0x40000d22,0x7c00100, +0x230400,0x40000f0a,0x7c00100,0x230400,0x40001004,0x7c00100,0x230400,0x40001110,0x2802100,0x962460,0x40001110,0x6800100,0x962540,0x4000120f,0x2802100,0x962460, +0x4000120f,0x4000000,0x1600000,0x4000120f,0x7c00100,0x230400,0x4000131f,0x7c00100,0x230400,0x40001423,0x4000000,0x200000,0x40001423,0x4000000,0x1600000,0x40001615, +0x2802400,0x962460,0x40001615,0x7c00100,0x230400,0x40002417,0x2802400,0x1862460,0x40002417,0x4000000,0x200000,0x40002800,0x6800000,0x201c00,0x40002800,0x24000002, +0x200000,0x40002c00,0x4000000,0x200002,0x40003000,0x24000000,0x200000,0x40003000,0x24000020,0x200000,0x40003700,0x24000000,0x200000,0x40005a09,0x7c00100,0x220400, +0x40005a09,0x7c00100,0x250400,0x40005d00,0x7c00120,0x220405,0x40006f30,0x2802100,0x962460,0x40006f30,0x2802400,0x962460,0x40006f30,0x4000000,0x200000,0x40006f30, +0x6800000,0x1329800,0x40006f30,0x6800100,0x962540,0x40006f30,0x7c00100,0x230400,0x40006f30,0xc000010,0xb48000,0x40007034,0x7c00100,0x1830000,0x40007117,0x4000000, +0x200000,0x40007208,0x7c00100,0x220400,0x4000720e,0x7c00100,0x220400,0x4000720e,0x7c00500,0x22040e,0x4000720e,0x7c00500,0x22040f,0x40007219,0x7c00100,0x220400, +0x40007219,0x7c00500,0x220400,0x40007219,0x7c00500,0x22040e,0x40007219,0x7c00500,0x22040f,0x40007300,0x24000000,0x200000,0x40007400,0x4000000,0x200000,0x40007531, +0x7c00100,0x230400,0x40007631,0x7c00100,0x230400,0x40007835,0x4000010,0x400000,0x40007835,0x7c00100,0x230400,0x40007933,0x7c00100,0x230400,0x40007a32,0x6800000, +0x1329800,0x40007a32,0x7c00100,0x230400,0x40007b2f,0x7c00100,0x230400,0x40007c00,0x4000000,0x200000,0x40020701,0x2802400,0x962460,0x40020701,0x2802400,0xc62460, +0x40023300,0x4000000,0x200000,0x40027d01,0x12882000,0x962460,0x400a3700,0x24000000,0x200000,0x400a3700,0x24000000,0xe00000,0x400a4400,0x4000000,0xe0000d,0x400a4412, +0x4000000,0xe00002,0x400a4412,0x4000000,0xe00003,0x400a4500,0x4000000,0xe0000d,0x400a5300,0x4000000,0x810010,0x400a5300,0x4000000,0x1410010,0x40507719,0x4000000, +0x200000,0x4050771c,0x4000000,0x400000,0x4050771f,0x4000000,0x200000,0x4050771f,0x4000000,0x400000,0x40c01489,0x4000000,0x200000,0x40d05117,0x4000000,0x200000, +0x41000419,0x7c00100,0x220400,0x41000419,0x7c00100,0x250400,0x4100080e,0x7c00100,0x220400,0x4100080e,0x7c00100,0x250400,0x41000908,0x7c00100,0x220400,0x41000908, +0x7c00100,0x250400,0x41000b13,0x2802000,0x962460,0x41000b13,0x2802100,0x962460,0x41000b13,0x4000000,0xb00000,0x41000c02,0x2802100,0x962460,0x41000c02,0x4000000, +0x1500000,0x41000c02,0xc000010,0xb48000,0x41000f0a,0x7c00100,0x230400,0x41001004,0x7c00100,0x230400,0x41001423,0x7c00100,0x230400,0x41001b27,0x4000000,0x500000, +0x41001d0c,0x7c00100,0x22040f,0x41001d0c,0x7c00100,0x230400,0x41001f0b,0x2802400,0x962460,0x41001f0b,0x4000000,0x200000,0x41001f0b,0x7c00100,0x230400,0x41002800, +0x24000000,0x200000,0x41002800,0x24000000,0x400000,0x41002919,0x7c00100,0x22040e,0x41002a00,0x4000000,0x1600000,0x41002b01,0x2802020,0x962460,0x41002c00,0x4000000, +0x200000,0x41002c00,0x7c00120,0x220405,0x41003000,0x24000000,0x200000,0x41003700,0x24000000,0x200000,0x41003700,0x24000000,0xe00000,0x41005d00,0x7c00120,0x220405, +0x41006600,0x24000020,0x200000,0x41006600,0x24000020,0x810000,0x41006600,0x24000020,0x1410000,0x41007208,0x7c00100,0x22040f,0x41007219,0x7c00100,0x220400,0x41007300, +0x24000000,0x200000,0x41007e0e,0x2802000,0x962460,0x41007e0e,0x4000000,0x200000,0x41007f0e,0x4000000,0x200000,0x41007f0e,0x7c00100,0x230400,0x41008002,0x7c00100, +0x230400,0x41008137,0x2802100,0x962460,0x41008137,0x4000000,0x200000,0x41008137,0x6800100,0x962540,0x41008137,0x7c00100,0x230400,0x41008301,0x2802000,0x962460, +0x41008407,0x4000000,0x200000,0x41008407,0x4000000,0x400000,0x41008407,0x4000000,0xb00000,0x41008407,0x7c00100,0x220400,0x41008407,0x7c00100,0x250400,0x4100850b, +0x7c00100,0x230400,0x4100860b,0x4000000,0x200000,0x4100860b,0x7c00100,0x230400,0x4100870c,0x7c00100,0x220400,0x41008838,0x7c00100,0x220400,0x41008838,0x7c00100, +0x250400,0x41008939,0x2802000,0x962460,0x41008939,0x2802100,0x962460,0x41008939,0x2806000,0x962460,0x41008939,0x4000000,0x200000,0x41008939,0x4000000,0x400000, +0x41008939,0x7c00100,0x230400,0x41008939,0xc000010,0x448000,0x41008a00,0x4000400,0x200400,0x41008b3b,0x4000000,0x1800000,0x41008b3b,0x6800000,0x1329800,0x41008b3b, +0x7c00100,0x1830000,0x41008b3b,0x7e00100,0x1830000,0x41008c3d,0x4000010,0x400000,0x41008c3d,0x7c00100,0x230400,0x41008d0e,0x7c00100,0x22040f,0x41008d19,0x7c00100, +0x220400,0x41008d19,0x7c00100,0x22040f,0x41008e00,0x24000000,0x200000,0x41008e00,0x24000000,0x400000,0x41008e00,0x24000000,0x1710000,0x41008e00,0x24000006,0x400000, +0x41008f3a,0x2802100,0x962460,0x41008f3a,0x2806000,0x962460,0x41008f3a,0x4000000,0x200000,0x41008f3a,0x6800100,0x962540,0x41008f3a,0x7c00100,0x230400,0x4100903c, +0x7c00100,0x230400,0x4100903c,0x7c00100,0x23040f,0x41020701,0x2802000,0x962460,0x41020701,0x2802000,0xc62460,0x410a3700,0x24000000,0x200000,0x410a3700,0x24000000, +0xe00000,0x410a4412,0x4000000,0xe00003,0x410a4711,0x7c40300,0xe30000,0x410a4f11,0x7c00300,0xe30001,0x410a9100,0x4000000,0x800010,0x410a9100,0x4000000,0x810010, +0x410a9100,0x4000000,0x870010,0x410a9100,0x4000000,0xb00010,0x410a9100,0x4000000,0xf00010,0x410a9100,0x4000000,0x1001410,0x410a9100,0x4000000,0x1071010,0x410a9100, +0x4000000,0x1071410,0x410a9100,0x4000000,0x1410010,0x41408ad2,0x4000400,0x200000,0x414a82cc,0x4000000,0xe00000,0x41808300,0x2802000,0x962460,0x41c01489,0x6800000, +0x1329800,0x50000419,0x7c00100,0x220400,0x50000419,0x7c00100,0x250400,0x5000080e,0x7c00100,0x220400,0x50000908,0x7c00100,0x220400,0x50000908,0x7c00100,0x250400, +0x50000b13,0x2802500,0x962460,0x50000f0a,0x7c00100,0x230400,0x50001615,0x2802100,0x962460,0x50001615,0x7c00100,0x230400,0x50002b01,0x2802020,0x962460,0x50002c00, +0x4000000,0x200000,0x50002c19,0x7c00100,0x220400,0x50002d19,0x7c00100,0x220400,0x50003000,0x24000000,0x200000,0x50003000,0x24000020,0x200000,0x50003700,0x24000000, +0x200000,0x50005d00,0x7c00120,0x220405,0x50005d00,0x7c00120,0x250405,0x50006108,0x7c00100,0x220400,0x50006108,0x7c00100,0x250400,0x50006600,0x24000020,0x200000, +0x50007300,0x24000000,0x200000,0x50008301,0x2802400,0x962460,0x50008a00,0x7c00500,0x230400,0x50009257,0x2802400,0x962460,0x50009257,0x4000000,0x200000,0x50009257, +0x4000010,0x1071400,0x50009257,0x6800000,0x1329800,0x50009257,0x7c00100,0x230400,0x50009257,0x7c00500,0x230400,0x50009257,0x7c00900,0x230400,0x50009257,0xc000010, +0xb48000,0x5000933e,0x2802100,0x962460,0x5000933e,0x2802400,0x962460,0x5000933e,0x4000000,0x400000,0x5000933e,0x4000000,0xe00000,0x5000933e,0x4000010,0x400000, +0x5000933e,0x6800000,0xe29800,0x5000933e,0x6800100,0x962540,0x5000933e,0x6800100,0x962541,0x5000933e,0x6804400,0x2f62540,0x5000933e,0x7c00100,0x2b30400,0x5000933e, +0x7c00100,0x2b30401,0x5000933e,0xc000010,0x448000,0x50009419,0x7c00100,0x220400,0x50009419,0x7c00100,0x250400,0x50009500,0x4000400,0x200400,0x5000965a,0x4000000, +0x500000,0x5000965a,0x7c00100,0x230400,0x5000965a,0xc000010,0xb48000,0x5000975b,0x4000000,0x200000,0x5000975b,0x4000010,0x400000,0x5000975b,0x7c00100,0x230400, +0x50009865,0x7c00100,0x230400,0x50009965,0x4000010,0x400000,0x50009965,0x7c00100,0x230400,0x50409acc,0x4000000,0x200000,0x5100080e,0x7c00100,0x220400,0x5100080e, +0x7c00100,0x250400,0x51000c02,0x2802100,0x962460,0x51000c02,0x4000000,0x1500000,0x51000c02,0x4000020,0x200000,0x51000c02,0x7c00100,0x230400,0x51000f0a,0x7c00100, +0x230400,0x51000f0a,0x7c00500,0x230400,0x51001110,0x2802100,0x962460,0x5100131f,0x2802100,0x962460,0x51001423,0x7c00100,0x230400,0x51001524,0x2802100,0x962460, +0x51001524,0x4000000,0x200000,0x51001524,0x7c00100,0x230400,0x5100171a,0x2802100,0x962460,0x5100171a,0x4000000,0x200000,0x5100171a,0x4000000,0x1500000,0x5100171a, +0x7c00100,0x230400,0x51001b27,0x4000000,0x200000,0x51001b27,0x4000000,0x400000,0x51001b27,0x4000000,0x500000,0x51001b27,0x7c00100,0x230400,0x51001c1c,0x2802100, +0x1862460,0x51001c1c,0x2802500,0x1862460,0x51001c1c,0x2806400,0x1862460,0x51001c1c,0x4000000,0x1800000,0x51001c1c,0x6800000,0x1329800,0x51001c1c,0x6800100,0x1862400, +0x51001c1c,0x6800100,0x1862540,0x51001c1c,0x6800500,0x1862400,0x51001c1c,0x7c00100,0x1830000,0x5100251b,0x7c00100,0x230400,0x51002619,0x7c00100,0x220400,0x51002619, +0x7c00100,0x250400,0x51002800,0x80020,0x218820,0x51002c00,0x4000000,0x200000,0x51002d19,0x7c00100,0x230400,0x51003700,0x24000000,0x200000,0x51003700,0x24000000, +0xe00000,0x51005201,0x2802400,0x962460,0x51005c00,0x4000000,0x200000,0x51006108,0x7c00100,0x220400,0x51006108,0x7c00100,0x250400,0x51006600,0x24000020,0x200000, +0x51006600,0x24000020,0x810000,0x51006600,0x24000020,0x1410000,0x51007300,0x24000000,0x200000,0x51007300,0x24000020,0x200000,0x51008002,0x7c00100,0x230400,0x51008301, +0x2802000,0x962460,0x51008301,0x2802400,0x962460,0x51008301,0x2802400,0xc62460,0x51008a00,0x7c00500,0x230400,0x51008e00,0x24000000,0x200000,0x51008e00,0x24000000, +0x400000,0x51008e00,0x24000000,0x810000,0x51008e00,0x24000000,0x1400000,0x51008e00,0x24000000,0x1410000,0x51008e00,0x24000000,0x1710000,0x51008e00,0x24000002,0x200000, +0x51008e00,0x24000500,0x230400,0x51008e00,0x2c000010,0xb48000,0x51009419,0x7c00100,0x220400,0x51009419,0x7c00100,0x22040e,0x51009419,0x7c00100,0x22040f,0x51009419, +0x7c00100,0x250400,0x51009500,0x4000400,0x200400,0x51009500,0x7c00500,0x230400,0x51009519,0x7c00100,0x220400,0x51009519,0x7c00100,0x22040f,0x51009519,0x7c00100, +0x230400,0x51009519,0x7c00100,0x250400,0x51009b71,0x2802100,0x962460,0x51009b71,0x6800000,0x1329800,0x51009b71,0x6800100,0x962540,0x51009b71,0x6804400,0x962540, +0x51009b71,0x7c00100,0x230400,0x51009c52,0x2802100,0x962460,0x51009c52,0x2802400,0x962460,0x51009c52,0x2802d00,0x962460,0x51009c52,0x4000010,0x400000,0x51009c52, +0x6800000,0x1329800,0x51009c52,0x6800100,0x962540,0x51009c52,0x7c00100,0x230400,0x51009c52,0xc000010,0x448000,0x51009d6d,0x6800000,0x1329800,0x51009d6d,0x7c00100, +0x230400,0x51009d6d,0x7c00500,0x230400,0x51009d6d,0x7c00d00,0x230400,0x51009d6d,0xc000010,0x448000,0x51009e08,0x2802100,0x962460,0x51009f63,0x4000010,0x400000, +0x51009f63,0x6800000,0x1329800,0x51009f63,0x7c00100,0x230400,0x51009f63,0x7c00900,0x230400,0x51009f63,0xc000010,0x448000,0x51009f63,0xc000010,0xb48000,0x5100a008, +0x2000,0x962460,0x5100a008,0x2802400,0x962460,0x5100a008,0x4000000,0x200000,0x5100a008,0x7c00100,0x220400,0x5100a008,0x7c00100,0x230400,0x5100a008,0x7c00100, +0x250400,0x5100a008,0x7c00500,0x230400,0x5100a16f,0x2806400,0x962460,0x5100a16f,0x6800000,0x1329800,0x5100a16f,0x6800100,0x962540,0x5100a16f,0x7c00100,0x230400, +0x5100a16f,0xc000010,0x448000,0x5100a24f,0x2802100,0x962460,0x5100a24f,0x2802400,0x962460,0x5100a24f,0x6800000,0x1329800,0x5100a24f,0x7c00100,0x230400,0x5100a24f, +0xc000010,0x448000,0x5100a36e,0x2802100,0x962460,0x5100a36e,0x4000000,0x200000,0x5100a36e,0x6800100,0x962540,0x5100a36e,0x6804400,0x962540,0x5100a36e,0x7c00100, +0x230400,0x5100a442,0x2802100,0x962460,0x5100a442,0x4000000,0xe00000,0x5100a442,0x6800000,0xe29800,0x5100a442,0x6800100,0x962540,0x5100a442,0x7c00100,0x430400, +0x5100a442,0x7c00100,0x2d30400,0x5100a442,0xc000010,0x448000,0x5100a500,0x4000000,0x200000,0x5100a600,0x4000000,0x200000,0x5100a601,0x2802000,0x962460,0x5100a76b, +0x7c00100,0x230400,0x5100a868,0x7c00100,0x230400,0x5100a96c,0x4000000,0x200000,0x5100a96c,0x7c00100,0x230400,0x5100aa00,0x4000000,0xe00000,0x5100ab00,0x4000000, +0xe00000,0x51086600,0x24000020,0x810000,0x51086600,0x24000020,0x1410000,0x510a4005,0x7c00100,0xe30400,0x510a4711,0x7c40300,0xe30000,0x510a7300,0x24000000,0x200000, +0x510aaa00,0x4000000,0xe00000,0x514a82cc,0x4000000,0xe00000,0x5150a20e,0x4000400,0x400000,0x51802bbe,0x2802000,0x962460,0x51c00908,0x2802400,0x962460,0x51c0a008, +0x2802400,0x962460,0x52000f0a,0x2802100,0x962460,0x52000f0a,0x6800100,0x962540,0x52000f0a,0x7c00100,0x230400,0x52001004,0x4000000,0x1600000,0x52001b00,0x4000000, +0x200000,0x52001c1c,0x2802100,0x1862460,0x52001c1c,0x6800100,0x1862400,0x52001c1c,0x6800500,0x1862400,0x52001e12,0x7c00100,0x2230500,0x52001e12,0x7c00100,0x2330520, +0x52002128,0x4000002,0x400000,0x52002128,0x7c00100,0x230400,0x52002a00,0x4000000,0x1500000,0x52002a00,0x4000000,0x1600000,0x52002d00,0x4000000,0x200006,0x52003000, +0x24000000,0x200000,0x52006108,0x7c00100,0x220400,0x52006108,0x7c00100,0x250400,0x52008301,0x2802400,0x962460,0x52008407,0x2802400,0x962460,0x52008407,0x7c00100, +0x220400,0x52008407,0x7c00100,0x250400,0x52008b3b,0x6800000,0x1800000,0x52008b3b,0x7c00100,0x1830000,0x52008e00,0x24000000,0x400000,0x52009419,0x7c00100,0x250400, +0x5200975b,0x4000000,0x200000,0x5200ac7e,0x2802000,0x962460,0x5200ac7e,0x2802100,0x962460,0x5200ac7e,0x2802400,0x962460,0x5200ac7e,0x4000010,0x200000,0x5200ac7e, +0x7c00100,0x230400,0x5200ac7e,0xc000010,0x248000,0x5200ad28,0x7c00100,0x230400,0x5200ae6a,0x2802100,0x1862460,0x5200ae6a,0x2802400,0x962460,0x5200ae6a,0x2802400, +0x1862460,0x5200ae6a,0x2806000,0x1862460,0x5200ae6a,0x4000000,0x1800000,0x5200ae6a,0x6800000,0x1329800,0x5200ae6a,0x6800100,0x1862400,0x5200ae6a,0x6800100,0x1862540, +0x5200ae6a,0x7c00100,0x1830000,0x5200ae6a,0x7c00900,0x1830000,0x5200ae6a,0xc000010,0x1848000,0x5200b083,0x4000010,0x400000,0x5200b083,0x7c00100,0x230400,0x5200b083, +0xc000010,0x448000,0x5200b182,0x2802400,0x962460,0x5200b182,0x4000000,0x200000,0x5200b182,0x4000010,0x400000,0x5200b182,0x7c00100,0x230400,0x5200b182,0xc000010, +0x448000,0x5200b30a,0x2802400,0x962460,0x5200b30a,0x4000000,0x200000,0x5200b30a,0x7c00100,0x230400,0x5200b54e,0x2802100,0x962460,0x5200b54e,0x2802400,0x962460, +0x5200b54e,0x4000000,0xe00000,0x5200b54e,0x4000010,0x400000,0x5200b54e,0x6800000,0xe29800,0x5200b54e,0x6800100,0x962540,0x5200b54e,0x6804400,0x2f62540,0x5200b54e, +0x7c00100,0x2b30400,0x5200b54e,0xc000010,0x448000,0x5200b61c,0x4000000,0x1800000,0x5200b61c,0x6800500,0x1862400,0x5200b61c,0x7c00100,0x1830000,0x5200b61c,0x7c00900, +0x1830000,0x5200b77f,0x2802100,0x1862460,0x5200b77f,0x2802400,0x1862460,0x5200b77f,0x4000000,0x1800000,0x5200b77f,0x4000010,0x1800000,0x5200b77f,0x7c00100,0x1830000, +0x5200b77f,0x7c00500,0x1830000,0x5200b77f,0x7c00900,0x1830000,0x5200b77f,0x7e00100,0x1830000,0x5200b873,0x2802100,0x962460,0x5200b873,0x2806400,0x962460,0x5200b873, +0x6800000,0x1329800,0x5200b873,0x6800100,0x962540,0x5200b873,0x6800400,0x962540,0x5200b873,0x7c00100,0x230400,0x5200b873,0xc000010,0x448000,0x5200b912,0x7c00100, +0x2230500,0x5200b912,0x7c00100,0x2330520,0x5200ba74,0x4000000,0x200000,0x5200ba74,0x4000010,0x400000,0x5200ba74,0x7c00100,0x230400,0x5200bb85,0x4000000,0x200000, +0x5200bb85,0x7c00100,0x230400,0x5200bc75,0x4000000,0x400000,0x5200bc75,0x4000010,0x400000,0x5200bc75,0x7c00100,0x230400,0x5200bd7d,0x4000000,0x200000,0x5200bd7d, +0x7c00100,0x230400,0x5200be7a,0x4000000,0x200000,0x5200be7a,0x7c00100,0x230400,0x5200bf58,0x7c00100,0x230400,0x5200c002,0x4000000,0x200000,0x5200c178,0x2802100, +0x962460,0x5200c178,0x2802400,0x962460,0x5200c178,0x2806400,0x962460,0x5200c178,0x4000000,0x200000,0x5200c178,0x6800100,0x962540,0x5200c178,0x7c00100,0x230400, +0x5200c178,0x7c00100,0x230401,0x5200c178,0xc000010,0x448000,0x5200c178,0x80000000,0x1329960,0x5200c247,0x7c00100,0x230400,0x5200c247,0x7c00100,0x830400,0x5200c247, +0x7c00100,0x1430400,0x5200c300,0x4000000,0x200003,0x52022d00,0x4000000,0x100006,0x52023700,0x24000000,0x100000,0x52023700,0x24000000,0xe00000,0x52023700,0x24000000, +0x2800000,0x52024400,0x4000000,0x100000,0x52027300,0x24000000,0x100000,0x5202c300,0x4000000,0x100000,0x5202c300,0x4000000,0x100002,0x5202c300,0x4000000,0x100003, +0x5202c300,0x4000000,0x10000d,0x5202c300,0x4000100,0x150400,0x5202c300,0x4000100,0x15040d,0x520a1e12,0x7c00100,0x2130480,0x520a3700,0x24000000,0xe00000,0x520a3800, +0x24000000,0x100000,0x520a4711,0x7c40300,0xe30000,0x520a4f11,0x7c00300,0xe30001,0x520a7300,0x24000000,0x100000,0x520ab412,0x7c00100,0x2130480,0x520ac400,0x4000000, +0xe00002,0x520ac400,0x4000000,0xe0000d,0x520ac414,0x4000000,0xe0000d,0x520ac511,0x7c40300,0xe30000,0x5240af9c,0x7c00100,0x230400,0x5240afa1,0x4000400,0x200000, +0x5240afa3,0x6800400,0x962540,0x5240afa3,0x7c00100,0x230400,0x5240afad,0x7c00100,0x230400,0x5240afaf,0x7c00100,0x230400,0x5240b2d4,0x4000000,0x200000,0x5240b2e3, +0x4000000,0x200000,0x5240b2f1,0x4000000,0x200000,0x5240b2fc,0x4000000,0x1500000,0x524a44cc,0x4000000,0xe00003,0x5250b511,0x7c00900,0x430400,0x5280af9c,0x2802400, +0x962460,0x5280af9d,0x2802400,0x962460,0x5280afa3,0x2802400,0x962460,0x5280afa5,0x2802400,0x962460,0x5280afa7,0x2802400,0x962460,0x52d0b308,0x2802400,0x962460, +0x52d0b30c,0x7c00100,0x230400,0x60000c02,0x2802100,0x962460,0x60000c02,0x7c00100,0x230400,0x60000f0a,0x2802100,0x962460,0x60000f0a,0x6800100,0x962540,0x60000f0a, +0x7c00100,0x230400,0x6000131f,0x4000000,0x200000,0x6000171a,0x7c00100,0x230400,0x6000171a,0x7c00100,0x230560,0x60001b27,0x2802100,0x962460,0x60001b27,0x4000000, +0xc00000,0x60001b27,0x7c00100,0x230400,0x60001f0b,0x2802400,0x962460,0x60002919,0x7c00100,0x22040e,0x60002a00,0x4000000,0x1600000,0x60003000,0x24000000,0x200000, +0x60003000,0x24000000,0xe00000,0x60003700,0x24000000,0x200000,0x60003800,0x24000000,0x1710000,0x60005102,0x4000000,0x200000,0x60006108,0x7c00100,0x220400,0x60006108, +0x7c00100,0x250400,0x60006600,0x24000020,0x200000,0x60008301,0x2802400,0xc62460,0x6000903c,0x2806000,0x962460,0x6000903c,0x4000000,0x400000,0x60009519,0x7c00100, +0x220400,0x60009519,0x7c00100,0x250400,0x6000a008,0x7c00100,0x220400,0x6000a008,0x7c00100,0x250400,0x6000c300,0x4000000,0x2703580,0x6000c654,0x2802000,0x962460, +0x6000c654,0x4000010,0x200000,0x6000c654,0x7c00100,0x230400,0x6000c73f,0x2802000,0x962460,0x6000c73f,0x2802100,0x962460,0x6000c73f,0x4000000,0x200000,0x6000c73f, +0x6800100,0x962540,0x6000c73f,0x6804000,0x2e62540,0x6000c73f,0x7c00100,0x2d30400,0x6000c80b,0x7c00100,0x230400,0x6000c941,0x2802100,0x962460,0x6000c941,0x2806400, +0x2f62460,0x6000c941,0x4000000,0xe00000,0x6000c941,0x4000010,0xe00000,0x6000c941,0x6800000,0x2d29800,0x6000c941,0x6800100,0x962540,0x6000c941,0x7c00100,0x2b30400, +0x6000c941,0x7c00100,0x2c30400,0x6000c941,0xc000010,0x448000,0x6000ca82,0x7c00100,0x230400,0x6000cc00,0x4000000,0xe00000,0x6000d000,0x4000000,0x200000,0x6002c300, +0x4000000,0x100000,0x6002c300,0x4000000,0x10000d,0x6002c300,0x4000100,0x150400,0x6002c300,0x4000100,0x15040d,0x600a3000,0x24000000,0x200000,0x600a3000,0x24000000, +0xe00000,0x600a3700,0x24000000,0x200000,0x600a3800,0x24000000,0x200000,0x600a3800,0x24000000,0x2800000,0x600a4305,0x7c00100,0xe30400,0x600ac300,0x4000000,0x100000, +0x600ac400,0x4000000,0xe0000d,0x600acb14,0x7c00100,0xe30000,0x600acb16,0x7c00100,0xe30c00,0x600acc00,0x4000000,0xe00000,0x600acd00,0x4000000,0x200000,0x600acd00, +0x4000000,0xe00000,0x600acd00,0x4000000,0x2800000,0x600ace00,0x4000000,0xe00000,0x600ace00,0x4000000,0x2800000,0x600acf00,0x4000000,0xe00000,0x600acf00,0x4000000, +0x2800000,0x600ad111,0x7c40300,0xe30000,0x604ac4cc,0x4000000,0xe00003,0x61000a03,0x4000000,0x1600000,0x61000c02,0x80000000,0x1329960,0x6100120f,0x4000000,0x200000, +0x61001a18,0x7c00100,0x1830000,0x61001d0c,0x7c00100,0x230400,0x61001d0c,0x7c00100,0x250400,0x61006600,0x24000020,0x200000,0x61008407,0x7c00100,0x220400,0x61008407, +0x7c00100,0x250400,0x6100870c,0x7c00100,0x220400,0x61008e00,0x24000000,0x200000,0x61008e00,0x24000000,0x400000,0x61008e00,0x24000002,0x300000,0x6100903c,0x7c00100, +0x230400,0x61009519,0x7c00100,0x220400,0x61009519,0x7c00100,0x250400,0x61009519,0x7c00500,0x22040f,0x61009b71,0x2802100,0x962460,0x61009b71,0x2806400,0x962460, +0x61009b71,0x7c00100,0x230400,0x6100a008,0x2802100,0x962460,0x6100c300,0x4000000,0x20000f,0x6100cd00,0x4000000,0x200000,0x6100d202,0x2802400,0x962460,0x6100d202, +0x2802500,0x962460,0x6100d202,0x7c00100,0x230400,0x6100d302,0x4000020,0x200000,0x6100d302,0x7c00120,0x230405,0x6100d476,0x2802100,0x962460,0x6100d476,0x2802100, +0x962461,0x6100d476,0x2806400,0x962460,0x6100d476,0x4000000,0x400000,0x6100d476,0x6800000,0x1329800,0x6100d476,0x6800100,0x962540,0x6100d476,0x7c00100,0x230400, +0x6100d476,0xc000010,0x448000,0x6100d573,0x2802100,0x962460,0x6100d573,0x2806400,0x962460,0x6100d573,0x6800100,0x962540,0x6100d573,0x7c00100,0x230400,0x6100d573, +0x7c00900,0x230400,0x6100d573,0xc000010,0x448000,0x6100d68d,0x7c00100,0x230400,0x6100d756,0x7c00100,0x230400,0x6100d85c,0x2802500,0x962460,0x6100d85c,0x6800100, +0x962540,0x6100d85c,0x7c00100,0x230400,0x6100d85c,0x7c00500,0x230400,0x6100d997,0x2802100,0x962460,0x6100d997,0x4000000,0x200000,0x6100d997,0x4000000,0x400000, +0x6100d997,0x6800000,0x1329800,0x6100d997,0x6800100,0x962540,0x6100d997,0x6804400,0x962540,0x6100d997,0x7c00100,0x230400,0x6100d997,0x7c00100,0x230560,0x6100d997, +0xc000010,0x448000,0x6100da98,0x6800000,0x1329800,0x6100da98,0x7c00100,0x230400,0x6100db71,0x4000000,0x200000,0x6100dc99,0x2802100,0x962460,0x6100dc99,0x2802400, +0x962460,0x6100dc99,0x6800000,0x1329800,0x6100dc99,0x6800100,0x962540,0x6100dc99,0x6804400,0x962540,0x6100dc99,0x7c00100,0x230400,0x610a4711,0x7c40300,0xe30000, +0x610a4f11,0x7c00300,0xe30001,0x610ace00,0x4000000,0xe00000,0x6140afa1,0x7c00100,0x230400,0x6140afa3,0x7c00100,0x230400,0x6180af9e,0x2802400,0x962460,0x62002a00, +0x4000000,0x1600000,0x63002800,0x80000,0x918820,0x63c00c15,0x80000,0x918820,0x7000080e,0x7c00100,0x250400,0x70000a03,0x4000000,0x200000,0x70000c00,0x80000000, +0x1329960,0x70000f0a,0x7c00100,0x230400,0x70001004,0x7c00100,0x230400,0x70001524,0x2802100,0x962460,0x70001524,0x7c00100,0x230400,0x70001615,0x2802100,0x962460, +0x7000171a,0x2802100,0x962460,0x70001821,0x6800000,0x1329800,0x70002320,0x7c00100,0x230400,0x70002a00,0x4000000,0x1500000,0x70002a00,0x4000000,0x1600000,0x70003000, +0x24000000,0x200000,0x70003800,0x24000000,0xe00000,0x70005201,0x2802400,0x962460,0x7000581e,0x7c00100,0x230400,0x70006108,0x7c00100,0x220400,0x70006108,0x7c00100, +0x250400,0x70006f30,0x7c00100,0x230400,0x70007300,0x24000000,0x200000,0x70007f0e,0x4000000,0x200000,0x70008301,0x2802100,0x962460,0x70008301,0x2802400,0x962460, +0x70008e00,0x24000000,0x200000,0x70008e00,0x24000000,0x400000,0x70008e00,0x24000002,0x400000,0x70008e00,0x24000008,0x1410000,0x70008e00,0x24000010,0x400000,0x70008e00, +0x2c000010,0x448000,0x70009519,0x7c00100,0x220400,0x70009519,0x7c00100,0x230400,0x70009519,0x7c00100,0x250400,0x70009865,0x7c00100,0x230400,0x70009965,0x4000010, +0x400000,0x70009965,0x7c00100,0x230400,0x7000a008,0x7c00100,0x220400,0x7000a008,0x7c00100,0x250400,0x7000a008,0x7c00500,0x22040f,0x7000a50e,0x4000000,0x200000, +0x7000b61c,0x2802500,0x1862460,0x7000b61c,0x6800500,0x1862400,0x7000b61c,0x7c00100,0x1830000,0x7000c300,0x4000000,0x100000,0x7000c941,0x2806000,0xc62460,0x7000cc00, +0x4000000,0xe00000,0x7000cd00,0x4000000,0x200000,0x7000cd00,0x4000000,0xe00000,0x7000cd00,0x4000000,0x2800000,0x7000cf00,0x4000000,0xe00000,0x7000d202,0x2802100, +0x962460,0x7000d202,0x7c00100,0x230400,0x7000d997,0x7c00100,0x230400,0x7000d997,0xc000010,0x248000,0x7000dd86,0x2802400,0x962460,0x7000dd86,0x7c00100,0x230400, +0x7000dd86,0xc000010,0x448000,0x7000de9f,0x4000000,0x200000,0x7000de9f,0x7c00100,0x230400,0x7000e001,0x2400,0x962460,0x7000e001,0x2802400,0x962460,0x7000e187, +0x2802000,0x962460,0x7000e187,0x2802100,0x962460,0x7000e187,0x4000000,0x200000,0x7000e187,0x7c00100,0x230400,0x7000e187,0xc000010,0x448000,0x7000e288,0x7c00100, +0x230400,0x7000e300,0x4000000,0x200000,0x7000e489,0x2802100,0x962460,0x7000e489,0x2802400,0x962460,0x7000e489,0x6800100,0x962540,0x7000e489,0x6800100,0x962541, +0x7000e489,0x6804400,0x2f62540,0x7000e489,0x7c00100,0x430400,0x7000e489,0x7c00100,0x2b30400,0x7000e489,0x7c00100,0x2d30400,0x7000e489,0x7c00900,0x430400,0x7000e59d, +0x2802100,0x962460,0x7000e59d,0x2802400,0x962460,0x7000e59d,0x4000000,0x200000,0x7000e59d,0x4000010,0x200000,0x7000e59d,0x6800100,0x962540,0x7000e59d,0x6804400, +0x962540,0x7000e59d,0x7c00100,0x230400,0x7000e59d,0xc000010,0x448000,0x7000e691,0x2802100,0x962460,0x7000e691,0x2802400,0x962460,0x7000e691,0x2806400,0x962460, +0x7000e691,0x6800000,0x1329800,0x7000e691,0x6800100,0x962540,0x7000e691,0x7c00100,0x230400,0x7000e700,0x4000400,0x200400,0x7000e70e,0x7c00100,0x220400,0x7000e719, +0x7c00100,0x220400,0x7000e719,0x7c00500,0x22040f,0x7000e853,0x7c00100,0x230400,0x7000e9a0,0x2802400,0x962460,0x7000e9a0,0x4000000,0x200000,0x7000e9a0,0x4000000, +0x500000,0x7000e9a0,0x7c00100,0x230400,0x7000ea79,0x2802400,0x962460,0x7000ea79,0x4000000,0x200000,0x7000ea79,0x4000000,0xf00000,0x7000ea79,0x4000010,0x400000, +0x7000ea79,0x7c00100,0x230400,0x7000eb8c,0x2802400,0x962460,0x7000eb8c,0x4000000,0x200000,0x7000eb8c,0x7c00100,0x230400,0x7000eca3,0x2802100,0x962460,0x7000eca3, +0x2806400,0x962460,0x7000eca3,0x4000000,0x200000,0x7000eca3,0x6800000,0x1329800,0x7000eca3,0x6800100,0x962540,0x7000eca3,0x7c00100,0x230400,0x7000eca3,0xc000010, +0x448000,0x7000ed95,0x6800000,0x1329800,0x7000ed95,0x7c00100,0x230400,0x7000ed95,0xc000010,0x448000,0x7000ee1c,0x2802500,0x1862460,0x7000ee1c,0x6800000,0x1329800, +0x7000ee1c,0x7c00100,0x1830000,0x7000ee1c,0x7c00900,0x1830000,0x7000ef8f,0x4000000,0x200000,0x7000ef8f,0x7c00100,0x230400,0x7000f08e,0x4000000,0x200000,0x7000f08e, +0x7c00100,0x230400,0x7000f159,0x2802100,0x962460,0x7000f159,0x7c00100,0x230400,0x7000f200,0x4000000,0x200000,0x7000f200,0x4000000,0x1200000,0x7000f200,0x4000000, +0x1710000,0x7000f34b,0x2802400,0x962460,0x7000f34b,0x4000000,0x200000,0x7000f34b,0x4000010,0x400000,0x7000f34b,0x6800000,0x1329800,0x7000f34b,0x7c00100,0x230400, +0x7000f34b,0x7c00900,0x230400,0x7000f34b,0xc000010,0x448000,0x7000f490,0x4000000,0x200000,0x7000f490,0x7c00100,0x230400,0x7000f5a5,0x7c00100,0x230400,0x7000f67b, +0x4000000,0x200000,0x7000f67b,0x4000010,0x200000,0x7000f67b,0x7c00100,0x230400,0x7000f8a6,0x2802100,0x962460,0x7000f8a6,0x2802400,0x962460,0x7000f8a6,0x2806400, +0x962460,0x7000f8a6,0x4000000,0x500000,0x7000f8a6,0x4000010,0xb00000,0x7000f8a6,0x4000800,0x200000,0x7000f8a6,0x6800100,0x962540,0x7000f8a6,0x6800100,0x962541, +0x7000f8a6,0x7c00100,0x230400,0x7000f8a6,0xc000010,0x448000,0x7000f921,0x4000000,0x200000,0x7000fa00,0x4000000,0x200000,0x7000fb9e,0x2802100,0x962460,0x7000fb9e, +0x2802400,0x962460,0x7000fb9e,0x2806400,0x962460,0x7000fb9e,0x4000000,0x200000,0x7000fb9e,0x6800000,0x1329800,0x7000fb9e,0x6800100,0x962540,0x7000fb9e,0x6800100, +0x962541,0x7000fb9e,0x7c00100,0x230400,0x7000fc92,0x4000000,0x200000,0x7000fc92,0x6800000,0x1329800,0x7000fc92,0x7c00100,0x220400,0x7000fc92,0x7c00100,0x230400, +0x7000fc92,0x7c00100,0x250400,0x700acd00,0x4000000,0xe00000,0x700acd00,0x4000000,0x2800000,0x700ace00,0x4000000,0xe00000,0x700acf00,0x4000000,0xe00000,0x700acf00, +0x4000000,0x2800000,0x7050df21,0x4000000,0x200000,0x7050f729,0x80000,0x918820,0x7080afa1,0x2802400,0x962460,0x7090df21,0x2802400,0x962460,0x70d0e427,0x2802100, +0x962460,0x70d0e427,0x2802400,0x962460,0x70d0e427,0x6800100,0x962540,0x70d0ea25,0x4000010,0x400000,0x8000120f,0x7c00100,0x230400,0x80001524,0x7c00100,0x230400, +0x8000171a,0x7c00100,0x230400,0x80002006,0x7c00100,0x220400,0x80002006,0x7c00100,0x250400,0x80002a00,0x4000000,0x1500000,0x80002d00,0x4000000,0x200000,0x80005208, +0x2802400,0x962460,0x80005c00,0x4000000,0x200000,0x80007300,0x24000000,0x200000,0x80009519,0x7c00100,0x220400,0x80009519,0x7c00100,0x230400,0x80009519,0x7c00100, +0x250400,0x80009865,0x7c00100,0x230400,0x8000a008,0x2802100,0x962460,0x8000b30a,0x4000000,0x500000,0x8000b30a,0x7c00100,0x230400,0x8000cd00,0x4000000,0xe00000, +0x8000d202,0x2802500,0x962460,0x8000d202,0x7c00100,0x230400,0x8000d68d,0x4000000,0x200000,0x8000d997,0x2802000,0x962460,0x8000d997,0x2802400,0x962460,0x8000d997, +0x4000000,0x400000,0x8000d997,0x4000000,0x500000,0x8000d997,0x7c00100,0x230400,0x8000d997,0xc000010,0x448000,0x8000e489,0x2802100,0x962460,0x8000e489,0x7c00100, +0x2d30400,0x8000e719,0x7c00100,0x220400,0x8000f8a6,0x2802100,0x962460,0x8000f8a6,0x7c00100,0x230400,0x8000f8a6,0xc000010,0x448000,0x8000fda1,0x2802100,0x1862460, +0x8000fda1,0x2806400,0x1862460,0x8000fda1,0x4000000,0x1800000,0x8000fda1,0x6800000,0x1329800,0x8000fda1,0x6800100,0x1862400,0x8000fda1,0x6800100,0x1862540,0x8000fda1, +0x7c00100,0x1830000,0x8000fda1,0xc000010,0x448000,0x8000fe9c,0x7c00100,0x230400,0x8000fe9c,0x7c00100,0x830400,0x8000fe9c,0x7c00100,0x1430400,0x8000ff06,0x7c00100, +0x220400,0x80010165,0x7c00100,0x230400,0x800102a2,0x4000000,0x200000,0x800102a2,0x7c00100,0x230400,0x800103a4,0x7c00100,0x230400,0x800103a4,0xc000010,0x448000, +0x8001044c,0x4000000,0x200000,0x8001044c,0x7c00100,0x220400,0x8001044c,0x7c00100,0x250400,0x80010670,0x2802000,0x962460,0x80010670,0x4000000,0x200000,0x80010670, +0x4000010,0x400000,0x80010670,0xc000010,0x448000,0x800a4711,0x7c40300,0xe30000,0x800acd00,0x4000000,0xe00000,0x800acd00,0x4000000,0x2902460,0x800ace00,0x4000000, +0xe00000,0x800acf00,0x4000000,0xe00000,0x800b0011,0x7c40300,0xe30000,0x800b0500,0x4000000,0xe00000,0x800b0500,0x4000000,0x2800000,0x90001615,0x7c00100,0x230400, +0x9000171a,0x4000000,0x200000,0x9000171a,0x7c00100,0x230400,0x90003000,0x24000000,0x200000,0x90007f0e,0x4000000,0x200000,0x90008301,0x2802400,0x962460,0x90008e00, +0x24000000,0x400000,0x90009519,0x7c00100,0x250400,0x9000a16f,0x2802100,0x962460,0x9000d200,0x80000000,0x1329960,0x9000d202,0x2802000,0x962460,0x9000d202,0x2802100, +0x962460,0x9000d202,0x7c00100,0x230400,0x9000e59d,0x2802100,0x962460,0x90010500,0x4000000,0xe00000,0x900107a7,0x2802100,0x962460,0x900107a7,0x2802400,0x962460, +0x900107a7,0x2802c00,0x962460,0x900107a7,0x4000000,0x1400000,0x900107a7,0x6800000,0x1329800,0x900107a7,0x7c00100,0x220400,0x900107a7,0x7c00100,0x250400,0x900108a8, +0x2802100,0x962460,0x900108a8,0x2806400,0x962460,0x900108a8,0x4000000,0x200000,0x900108a8,0x4000000,0x400000,0x900108a8,0x4000010,0x400000,0x900108a8,0x6800000, +0x1329800,0x900108a8,0x6800100,0x962540,0x900108a8,0x7c00100,0x230400,0x900108a8,0xc000010,0x448000,0x90010908,0x7c00100,0x220400,0x90010a38,0x2802100,0x962460, +0x90010ca9,0x2802100,0x962460,0x90010ca9,0x4000000,0x500000,0x90010ca9,0x4000010,0xb00000,0x90010ca9,0x6800100,0x962540,0x90010ca9,0x7c00100,0x230400,0x90010d1b, +0x4000000,0x500000,0x90010eaa,0x2802100,0x962460,0x90010eaa,0x2802400,0x962460,0x90010eaa,0x2806400,0x962460,0x90010eaa,0x4000000,0x200000,0x90010eaa,0x4000000, +0x400000,0x90010eaa,0x4000010,0x400000,0x90010eaa,0x6800000,0x1329800,0x90010eaa,0x6800100,0x962540,0x90010eaa,0x7c00100,0x230400,0x90010eaa,0xc000010,0x448000, +0x90010fab,0x7c00100,0x220400,0x90010fab,0x7c00100,0x250400,0x9002c300,0x4000000,0x100000,0x900ac400,0x4000000,0xe0000d,0x900acd00,0x4000000,0xe00000,0x900acd00, +0x4000000,0x2800000,0x900acf00,0x4000000,0xe00000,0x900b0500,0x4000000,0xe00000,0x900b0500,0x4000000,0x2800000,0x900b0b9a,0x7c00900,0x1230400,0x900b109a,0x7c00300, +0xe30000,0x900b119a,0x7c00300,0xe30000,0x90408e06,0x24000000,0x400000,0xa0001004,0x4000000,0x200000,0xa0001004,0x7c00100,0x230400,0xa000120f,0x2802100,0x962460, +0xa000120f,0x2802400,0x962460,0xa000171a,0x2802100,0x962460,0xa000171a,0x2806400,0x962460,0xa0002a00,0x4000000,0x1600000,0xa0003000,0x24000000,0x200000,0xa000581e, +0x7c00100,0x230400,0xa0007300,0x24000000,0x200000,0xa0008301,0x2802400,0x962460,0xa0008e00,0x24000000,0x400000,0xa000cf00,0x4000000,0xe00000,0xa0010500,0x4000000, +0x200000,0xa00114af,0x2802100,0x962460,0xa00114af,0x2802400,0x962460,0xa00114af,0x2806400,0x962460,0xa00114af,0x6800000,0x1329800,0xa00114af,0x7c00100,0x230400, +0xa00114af,0x7c00100,0x230560,0xa00116b0,0x2802100,0x962460,0xa00116b0,0x2802800,0x962460,0xa00116b0,0x2806400,0x962460,0xa00116b0,0x4000000,0x400000,0xa00116b0, +0x4000000,0x500000,0xa00116b0,0x4000010,0x400000,0xa00116b0,0x6800100,0x962540,0xa00116b0,0x7c00100,0x230400,0xa00116b0,0x7c00100,0x230560,0xa00116b0,0xc000010, +0x448000,0xa0011722,0x7c00100,0x230400,0xa00118b1,0x2802000,0x962460,0xa00118b1,0x2802100,0x962460,0xa00118b1,0x2806400,0x962460,0xa00118b1,0x4000000,0x200000, +0xa00118b1,0x4000000,0x400000,0xa00118b1,0x4000000,0x500000,0xa00118b1,0x6800100,0x962540,0xa00118b1,0x7c00100,0x230400,0xa00118b1,0x7c00100,0x230560,0xa00118b1, +0xc000010,0x448000,0xa00a4005,0x7c00100,0xe30400,0xa00a4711,0x7c40300,0xe30000,0xa00ac400,0x4000000,0xe00000,0xa00acb14,0x7c00100,0xe30000,0xa00acf00,0x4000000, +0xe00000,0xa00b0500,0x4000000,0xe00000,0xa00b0500,0x4000000,0x2800000,0xa00b0b96,0x7c00900,0x1230400,0xa00b1211,0x7c40300,0xe30000,0xa00b1314,0x7c00100,0xe30000, +0xa00b1596,0x7c00300,0xe30000,0xa040afb9,0x6800400,0x962540,0xa08083ba,0x2802400,0x962460,0xb0000a03,0x7c00100,0x220400,0xb0000b13,0x7c00100,0x2633800,0xb0001004, +0x2802000,0x962460,0xb0001110,0x4000000,0x200000,0xb0001524,0x2802100,0x962460,0xb0001615,0x4000000,0x500000,0xb000251b,0x7c00100,0x230400,0xb0007300,0x24000000, +0x200000,0xb0008939,0x4000000,0x200000,0xb0008939,0x7c00100,0x230400,0xb0008e00,0x24000000,0x200000,0xb0008e00,0x24000000,0x400000,0xb0008e00,0x24000010,0x400000, +0xb0009257,0x2802000,0x962460,0xb0009257,0x4000000,0x1600000,0xb0009519,0x7c00100,0x220400,0xb0009519,0x7c00100,0x250400,0xb0009a00,0x4000000,0x200000,0xb000b30a, +0x2802100,0x962460,0xb000b30a,0x7c00100,0x230400,0xb000c178,0x80000000,0x1329960,0xb000c300,0x4000000,0x200000,0xb000d202,0x2802000,0x962460,0xb000d476,0x6800100, +0x962540,0xb000d476,0x7c00100,0x230400,0xb000e300,0x4000000,0xe00000,0xb000fda1,0x7c00100,0x1830000,0xb0010eaa,0x2802000,0x962460,0xb00116b0,0x7c00100,0x230400, +0xb0011900,0x4000000,0xe00000,0xb0011ab2,0x2802100,0x962460,0xb0011ab2,0x2802400,0x962460,0xb0011ab2,0x2806400,0x962460,0xb0011ab2,0x4000000,0x200000,0xb0011ab2, +0x6800100,0x962540,0xb0011ab2,0x7c00100,0x230400,0xb0011b0c,0x7c00100,0x230400,0xb0011cb3,0x2802100,0x962460,0xb0011cb3,0x2806400,0x962460,0xb0011cb3,0x6800000, +0x1329800,0xb0011cb3,0x6800100,0x962540,0xb0011cb3,0x7c00100,0x230400,0xb0011db6,0x2802500,0x962460,0xb0011db6,0x6800000,0x1329800,0xb0011db6,0x7c00100,0x230400, +0xb0011db6,0x7c00500,0x230400,0xb0011e00,0x4000000,0x200000,0xb0011e00,0x4000000,0x1500000,0xb0011fb4,0x2802100,0x962460,0xb0011fb4,0x6800100,0x962540,0xb0011fb4, +0x7c00100,0x430400,0xb0011fb4,0x7c00100,0x2d30400,0xb0011fb4,0xc000010,0x448000,0xb0012000,0x4000000,0x200000,0xb00121b5,0x4000000,0x200000,0xb00121b5,0x4000010, +0x400000,0xb00121b5,0x7c00100,0x220400,0xb00121b5,0x7c00100,0x250400,0xb00121b5,0xc000010,0x448000,0xb00122b8,0x4000000,0x200000,0xb00122b8,0x7c00100,0x230400, +0xb00123b7,0x2802400,0x962460,0xb00123b7,0x4000000,0x200000,0xb00123b7,0x7c00100,0x230400,0xb00123b7,0xc000010,0x248000,0xb00a4005,0x7c00100,0xe30400,0xb00a4711, +0x7c40300,0xe30000,0xb00acf00,0x4000000,0xe00000,0xb00b0500,0x4000000,0xe00000,0xb00b0500,0x4000000,0x2800000,0xb00b109a,0x7c00300,0xe30000,0xb080e487,0x2802000, +0x962460,0xc0001524,0x4000000,0x500000,0xc0001a18,0x2806400,0x1862460,0xc0001a18,0x7c00100,0x1830000,0xc0007300,0x24000000,0x200000,0xc0008e00,0x24000010,0x400000, +0xc0009519,0x7c00100,0x220400,0xc0009519,0x7c00100,0x250400,0xc000c300,0x4000000,0x20000f,0xc000d85c,0x2802100,0x962460,0xc000d85c,0x6800100,0x962540,0xc000d85c, +0x7c00100,0x230400,0xc000dc99,0x7c00100,0x230400,0xc000e719,0x7c00100,0x220400,0xc00107a7,0x7c00100,0x230400,0xc0010eaa,0x7c00100,0x230400,0xc00116b0,0x7c00100, +0x230560,0xc0011900,0x4000000,0x200000,0xc0012447,0,0x818820,0xc0012447,0,0xc18820,0xc0012447,0,0x1418820,0xc00125b9,0x7c00100,0x230400, +0xc00126bb,0x2802100,0x962460,0xc00126bb,0x2806400,0x962460,0xc00126bb,0x4000000,0x500000,0xc00126bb,0x6800100,0x962540,0xc00126bb,0x7c00100,0x230400,0xc00127ba, +0x2802400,0x962460,0xc00127ba,0x4000000,0x200000,0xc00127ba,0x6800000,0x1329800,0xc00127ba,0x7c00100,0x230400,0xc00127ba,0x7c00900,0x230400,0xc0012800,0x4000000, +0x200000,0xc0012b23,0x4000000,0x200000,0xc0012b23,0x4000000,0x400000,0xc0012b23,0x4000000,0x1500000,0xc0012cbc,0x2802400,0x962460,0xc0012cbc,0x4000000,0x1600000, +0xc0012cbc,0x6800000,0x1329800,0xc0012cbc,0x7c00100,0x230400,0xc00acf00,0x4000000,0xe00000,0xc00ae300,0x4000000,0xe00000,0xc00b0500,0x4000000,0xe00000,0xc00b0500, +0x4000000,0x2800000,0xc00b0b11,0x4000000,0x1200000,0xc00b0b11,0x7c00900,0x1230400,0xc00b109a,0x7c00300,0xe30000,0xc00b2914,0x7c00100,0x2530000,0xc00b2916,0x7c00100, +0x2530c00,0xc00b2a00,0x4000000,0xe00000,0xc040af5e,0x7c00100,0x230400,0xc0c12b89,0x4000000,0x200000,0xc14a44cc,0x4000000,0xe0000d,0xd000131f,0x2802c00,0x962460, +0xd000171a,0x7c00100,0x230400,0xd0001821,0x2802100,0x962460,0xd0007300,0x24000000,0x200000,0xd0008e00,0x24000000,0x200000,0xd0008f3a,0x2806000,0x962460,0xd0009519, +0x7c00100,0x220400,0xd0009519,0x7c00100,0x250400,0xd000a500,0x4000000,0x200000,0xd000c300,0x4000000,0xe00000,0xd000d202,0x7c00100,0x230400,0xd000d476,0x7c00100, +0x230400,0xd000d997,0x2802100,0x962460,0xd000d997,0x6800100,0x962540,0xd000e001,0x2802100,0x962460,0xd000e700,0x4000400,0x200000,0xd000e719,0x7c00100,0x220400, +0xd000e719,0x7c00500,0x22040f,0xd000fa00,0x4000000,0xe00000,0xd0010eaa,0x4000010,0x400000,0xd0010eaa,0x7c00100,0x230400,0xd0012dbd,0x4000000,0x200000,0xd0012dbd, +0x7c00100,0x230400,0xd0012fbe,0x2802100,0x962460,0xd0012fbe,0x2802400,0x962460,0xd0012fbe,0x2806400,0x2f62460,0xd0012fbe,0x4000000,0x400000,0xd0012fbe,0x6800000, +0xe29800,0xd0012fbe,0x6800100,0x962540,0xd0012fbe,0x6800100,0x962541,0xd0012fbe,0x6804400,0x962540,0xd0012fbe,0x7c00100,0x2b30400,0xd0012fbe,0x7c00100,0x2c30560, +0xd0012fbe,0xc000010,0x448000,0xd0013183,0x7c00100,0x230400,0xd0013200,0x4000000,0x200000,0xd0013200,0x6800000,0x1329805,0xd00134c0,0x2802100,0x962460,0xd00134c0, +0x4000002,0x400000,0xd00134c0,0x7c00100,0x230400,0xd00a4305,0x7c00100,0xe30400,0xd00a4611,0x7c40300,0xe30000,0xd00a4711,0x7c40300,0xe30000,0xd00a5e11,0x7c40300, +0xe30000,0xd00acf00,0x4000000,0xe00000,0xd00b0500,0x4000000,0xe00000,0xd00b0500,0x4000000,0x2800000,0xd00b0b11,0x6800500,0x962540,0xd00b0bbf,0x2802200,0xc62460, +0xd00b119a,0x7c00300,0xe30000,0xd00b2a00,0x4000000,0xe00000,0xd00b2e11,0x7c40300,0xe30000,0xd00b30bf,0x7c00300,0x230000,0xd00b339a,0x7c00300,0xe30000,0xe0000c02, +0xc000010,0xb48000,0xe0001524,0x2802400,0x962460,0xe0001524,0x7c00100,0x230400,0xe0001615,0x7c00100,0x230400,0xe000251b,0x12882000,0x962460,0xe0002a00,0x4000000, +0x1500000,0xe0005102,0x4000000,0x200000,0xe0005c00,0x4000000,0x200000,0xe000622a,0x6804400,0x962540,0xe000622a,0x7c00100,0x230400,0xe0008838,0x7c00100,0x220400, +0xe0008838,0x7c00100,0x250400,0xe0008e00,0x24000000,0x810000,0xe0008e00,0x24000000,0x1410000,0xe0008e00,0x24000002,0x400000,0xe0008e00,0x2c000010,0xb48000,0xe000933e, +0x7c00100,0x2b30400,0xe000933e,0xc000010,0x448000,0xe0009519,0x7c00100,0x220400,0xe0009519,0x7c00100,0x22040f,0xe0009519,0x7c00100,0x250400,0xe000c178,0x2802100, +0x962460,0xe000c941,0x2802100,0x962460,0xe000c941,0x2806400,0x962460,0xe000c941,0x7c00100,0x2b30400,0xe000d202,0x2802400,0x962460,0xe000d202,0x7c00100,0x230400, +0xe000d202,0x7c00500,0x230400,0xe000dc99,0x4000000,0x200000,0xe000e001,0x2802100,0x962460,0xe000e001,0x2802400,0x962460,0xe000fda1,0x7c00100,0x1830000,0xe0013502, +0x2802400,0x962460,0xe0013502,0x4000000,0x200000,0xe0013502,0x7c00100,0x230400,0xe0013502,0x80000000,0x1329960,0xe00136c1,0x4000000,0x200000,0xe00136c1,0x7c00100, +0x230400,0xe001370b,0x7c00100,0x230400,0xe0013919,0x7c00500,0x220400,0xe0013919,0x7c00500,0x22040f,0xe0013919,0x7c00d00,0x23040f,0xe0013a19,0x7c00100,0x220400, +0xe0013a19,0x7c00100,0x230400,0xe0013bc2,0x2802400,0x962460,0xe0013bc2,0x7c00100,0x230400,0xe0013bc2,0xc000010,0x248000,0xe0013cc3,0x6800000,0x1329800,0xe0013cc3, +0x7c00100,0x230400,0xe0013dc4,0x2802400,0x962460,0xe0013dc4,0x7c00100,0x230400,0xe0013e28,0x7c00100,0x230400,0xe0013fc5,0x7c00100,0x220400,0xe0013fc5,0x7c00100, +0x250400,0xe0014000,0x4000000,0x200000,0xe0014001,0x2802400,0x962460,0xe00a4711,0x7c40300,0xe30000,0xe00a5e11,0x7c40300,0xe30000,0xe00ac511,0x7c40300,0xe30000, +0xe00acf00,0x4000000,0xe00000,0xe00ae300,0x4000000,0xe00000,0xe00b0500,0x4000000,0xe00000,0xe00b1314,0x7c00100,0xe30000,0xe00b1316,0x7c00100,0xe30c00,0xe00b2a00, +0x4000000,0xe00000,0xe00b2a00,0x4000000,0x2800000,0xe00b3816,0x7c00500,0x230c00,0xe0808328,0x2802400,0x962460,0xf0001615,0x6800100,0x962540,0xf0001a18,0x2802000, +0x1862460,0xf000c247,0x7c00100,0x1430400,0xf000d000,0x4000000,0xe00000,0xf000e300,0x4000000,0xe00000,0xf000e59d,0x2802100,0x962460,0xf000e59d,0x7c00100,0x230400, +0xf0012447,0,0x818820,0xf0012447,0,0xc18820,0xf0012447,0,0x1418820,0xf0012447,0x2802000,0x962460,0xf0012447,0x2802400,0x962460,0xf0012447, +0x7c00100,0x230400,0xf0013a19,0x7c00100,0x220400,0xf0014102,0x2802400,0x962460,0xf0014308,0x2802100,0x962460,0xf0014308,0x7c00500,0x22040e,0xf0014308,0x7c00500, +0x22040f,0xf001440a,0x4000000,0x500000,0xf0014500,0x4000000,0x200000,0xf00146c6,0x2802100,0x962460,0xf00146c6,0x2806000,0x2f62460,0xf00146c6,0x4000000,0xe00000, +0xf00146c6,0x6800000,0x2d29800,0xf00146c6,0x6800100,0x962540,0xf00146c6,0x6804000,0x962540,0xf00146c6,0x7c00100,0x2b30400,0xf00146c6,0x7c00100,0x2c30560,0xf00146c6, +0xc000010,0x448000,0xf00147c7,0x2802000,0x962460,0xf00147c7,0x6800000,0x1329800,0xf00147c7,0x7c00100,0x230400,0xf00ac511,0x7c40300,0xe30000,0xf00acf00,0x4000000, +0xe00000,0xf00b2914,0x7c00100,0x2530000,0xf00b2916,0x7c00100,0x2530c00,0xf00b2a00,0x4000000,0xe00000,0xf00b2a00,0x4000000,0x2800000,0xf00b4211,0x7c40300,0xe30000, +0xf10a3c00,0x4000000,0xe00000,0xf10a3c00,0x4008000,0xe00000,0xf10a8200,0x4008000,0xe00000,0xf10b4811,0x7c40300,0xe30000}; -static const int32_t countPropsVectors=7230; +static const int32_t countPropsVectors=7260; static const int32_t propsVectorsColumns=3; -static const uint16_t scriptExtensions[282]={ +static const uint16_t scriptExtensions[298]={ 0x800e,0x8019,8,0x8059,8,2,8,0x8038,8,6,8,0x8019,2,0x22,0x25,0x57, 0xb6,0x80c0,2,0x22,0x8025,2,0x12,2,0x22,0x25,0x57,0xa7,0xb6,0x80c0,2,0x22, 0x54,0x79,0x7b,0xa7,0xb6,0xb7,0x80c2,2,0x8022,2,0x25,0x80c0,2,0x29,2,0x80b6, @@ -3998,14 +4013,15 @@ static const uint16_t scriptExtensions[282]={ 0x80a4,0x10,0x7f,0xf,0x809d,0xf,0x83,0x23,0x8089,0x23,0x87,0x15,0x80bb,0x15,0x8b,0x1c, 0x34,0x8076,0x1c,0x8f,0xc,0x8019,0x2a,0x2b,0x2c,0x802d,0x1b,0x805a,0x800a,4,0xa,0x15, 0x8089,0xa,0x8089,4,0x800a,0xa,0x8097,0xa,0x15,0x1a,0x1f,0x23,0x8024,0xa,0x80bb,4, -0xa,0x15,0x1f,0x24,0x89,0x9e,0x80bb,0x8004,8,0x8022,0x19,0x801b,0xa,0x19,0x8089,5, -0x11,0x12,0x14,0x16,0x8029,5,0x11,0x12,0x14,0x8016,0x8011,5,0x8011,0x11,0x14,0x8016, -0x11,0x8019,0xa,0xf,0x10,0x78,0x91,0x99,0x9d,0x9e,0xa0,0xa3,0x80b2,0xa,0xf,0x10, -0x15,0x1a,0x78,0x91,0x99,0x9d,0x9e,0xa0,0xa3,0xb2,0x80bb,0xa,0xf,0x10,0x15,0x78, -0x91,0x99,0x9d,0x9e,0xa0,0xa3,0xb2,0x80bb,0xa,0xa3,0xa,0x8023,0xa,0xfa,0x19,0x1c, -0x804f,0x37,0x804e,2,0x8057,2,0x8025,2,0x105,0x2f,0x31,0x8053,0x2f,0x31,0x80c1,0x2f, -0x8031,2,0x8007,0x79,0x80c2,0x79,0x113,0x89,0x87,0x8087}; +0xa,0x15,0x1a,0x1f,0x21,0x24,0x89,0x9e,0x80bb,0x8004,8,0x8022,0x19,0x801b,0xa,0x19, +0x8089,5,0x11,0x12,0x14,0x16,0x8029,5,0x11,0x12,0x14,0x8016,0x8011,5,0x8011,0x11, +0x14,0x8016,0x11,0x8019,0xa,0xf,0x10,0x15,0x1a,0x78,0x91,0x97,0x99,0x9d,0x9e,0xa0, +0xa3,0xb2,0x80bb,0xa,0xf,0x10,0x15,0x78,0x91,0x97,0x99,0x9d,0x9e,0xa0,0xa3,0xb2, +0x80bb,0xa,0xf,0x10,0x78,0x91,0x99,0x9d,0x9e,0xa0,0xa3,0x80b2,0xa,0xf,0x10,0x78, +0x91,0x97,0x99,0x9d,0x9e,0xa0,0xa3,0x80b2,0xa,0xa3,0xa,0x8023,0xa,0x10a,0x19,0x1c, +0x804f,0x37,0x804e,2,0x8057,2,0x8025,2,0x115,0x2f,0x31,0x8053,0x2f,0x31,0x80c1,0x2f, +0x8031,2,0x8007,0x79,0x80c2,0x79,0x123,0x89,0x87,0x8087}; -static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2d08,0x2d08,0x2d08,0x2d08,0x6ce6,3,0x8924,0x89b1,0x89b1,0x89b1,0xb47c7,0x2a75a31,0,0,0,0}; +static const int32_t indexes[UPROPS_INDEX_COUNT]={0x2d4e,0x2d4e,0x2d4e,0x2d4e,0x6d50,3,0x89ac,0x8a41,0x8a41,0x8a41,0xb48c7,0x2f75a31,0,0,0,0}; #endif // INCLUDED_FROM_UCHAR_C diff --git a/deps/icu-small/source/common/ucurr.cpp b/deps/icu-small/source/common/ucurr.cpp index ffca8aac5f1959..70b1bbf2239dd9 100644 --- a/deps/icu-small/source/common/ucurr.cpp +++ b/deps/icu-small/source/common/ucurr.cpp @@ -11,6 +11,8 @@ #if !UCONFIG_NO_FORMATTING +#include + #include "unicode/ucurr.h" #include "unicode/locid.h" #include "unicode/ures.h" @@ -20,6 +22,7 @@ #include "unicode/usetiter.h" #include "unicode/utf16.h" #include "ustr_imp.h" +#include "bytesinkutil.h" #include "charstr.h" #include "cmemory.h" #include "cstring.h" @@ -520,14 +523,18 @@ ucurr_forLocale(const char* locale, return 0; } - char currency[4]; // ISO currency codes are alpha3 codes. UErrorCode localStatus = U_ZERO_ERROR; - int32_t resLen = uloc_getKeywordValue(locale, "currency", - currency, UPRV_LENGTHOF(currency), &localStatus); - if (U_SUCCESS(localStatus) && resLen == 3 && uprv_isInvariantString(currency, resLen)) { + CharString currency; + { + CharStringByteSink sink(¤cy); + ulocimp_getKeywordValue(locale, "currency", sink, &localStatus); + } + int32_t resLen = currency.length(); + + if (U_SUCCESS(localStatus) && resLen == 3 && uprv_isInvariantString(currency.data(), resLen)) { if (resLen < buffCapacity) { - T_CString_toUpperCase(currency); - u_charsToUChars(currency, buff, resLen); + T_CString_toUpperCase(currency.data()); + u_charsToUChars(currency.data(), buff, resLen); } return u_terminateUChars(buff, buffCapacity, resLen, ec); } @@ -597,11 +604,15 @@ ucurr_forLocale(const char* locale, if ((U_FAILURE(localStatus)) && strchr(id, '_') != 0) { // We don't know about it. Check to see if we support the variant. - uloc_getParent(locale, id, UPRV_LENGTHOF(id), ec); + CharString parent; + { + CharStringByteSink sink(&parent); + ulocimp_getParent(locale, sink, ec); + } *ec = U_USING_FALLBACK_WARNING; - // TODO: Loop over the shortened id rather than recursing and + // TODO: Loop over the parent rather than recursing and // looking again for a currency keyword. - return ucurr_forLocale(id, buff, buffCapacity, ec); + return ucurr_forLocale(parent.data(), buff, buffCapacity, ec); } if (*ec == U_ZERO_ERROR || localStatus != U_ZERO_ERROR) { // There is nothing to fallback to. Report the failure/warning if possible. @@ -624,20 +635,22 @@ ucurr_forLocale(const char* locale, * @return true if the fallback happened; false if locale is already * root (""). */ -static UBool fallback(char *loc) { - if (!*loc) { +static UBool fallback(CharString& loc) { + if (loc.isEmpty()) { return false; } UErrorCode status = U_ZERO_ERROR; - if (uprv_strcmp(loc, "en_GB") == 0) { + if (loc == "en_GB") { // HACK: See #13368. We need "en_GB" to fall back to "en_001" instead of "en" // in order to consume the correct data strings. This hack will be removed // when proper data sink loading is implemented here. - // NOTE: "001" adds 1 char over "GB". However, both call sites allocate - // arrays with length ULOC_FULLNAME_CAPACITY (plenty of room for en_001). - uprv_strcpy(loc + 3, "001"); + loc.truncate(3); + loc.append("001", status); } else { - uloc_getParent(loc, loc, (int32_t)uprv_strlen(loc), &status); + CharString tmp; + CharStringByteSink sink(&tmp); + ulocimp_getParent(loc.data(), sink, &status); + loc = std::move(tmp); } /* char *i = uprv_strrchr(loc, '_'); @@ -692,9 +705,12 @@ ucurr_getName(const char16_t* currency, // this function. UErrorCode ec2 = U_ZERO_ERROR; - char loc[ULOC_FULLNAME_CAPACITY]; - uloc_getName(locale, loc, sizeof(loc), &ec2); - if (U_FAILURE(ec2) || ec2 == U_STRING_NOT_TERMINATED_WARNING) { + CharString loc; + { + CharStringByteSink sink(&loc); + ulocimp_getName(locale, sink, &ec2); + } + if (U_FAILURE(ec2)) { *ec = U_ILLEGAL_ARGUMENT_ERROR; return 0; } @@ -707,7 +723,7 @@ ucurr_getName(const char16_t* currency, const char16_t* s = nullptr; ec2 = U_ZERO_ERROR; - LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_CURR, loc, &ec2)); + LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_CURR, loc.data(), &ec2)); if (nameStyle == UCURR_NARROW_SYMBOL_NAME || nameStyle == UCURR_FORMAL_SYMBOL_NAME || nameStyle == UCURR_VARIANT_SYMBOL_NAME) { CharString key; @@ -791,9 +807,12 @@ ucurr_getPluralName(const char16_t* currency, // this function. UErrorCode ec2 = U_ZERO_ERROR; - char loc[ULOC_FULLNAME_CAPACITY]; - uloc_getName(locale, loc, sizeof(loc), &ec2); - if (U_FAILURE(ec2) || ec2 == U_STRING_NOT_TERMINATED_WARNING) { + CharString loc; + { + CharStringByteSink sink(&loc); + ulocimp_getName(locale, sink, &ec2); + } + if (U_FAILURE(ec2)) { *ec = U_ILLEGAL_ARGUMENT_ERROR; return 0; } @@ -803,7 +822,7 @@ ucurr_getPluralName(const char16_t* currency, const char16_t* s = nullptr; ec2 = U_ZERO_ERROR; - UResourceBundle* rb = ures_open(U_ICUDATA_CURR, loc, &ec2); + UResourceBundle* rb = ures_open(U_ICUDATA_CURR, loc.data(), &ec2); rb = ures_getByKey(rb, CURRENCYPLURALS, rb, &ec2); @@ -904,13 +923,17 @@ getCurrencyNameCount(const char* loc, int32_t* total_currency_name_count, int32_ *total_currency_name_count = 0; *total_currency_symbol_count = 0; const char16_t* s = nullptr; - char locale[ULOC_FULLNAME_CAPACITY] = ""; - uprv_strcpy(locale, loc); + CharString locale; + { + UErrorCode status = U_ZERO_ERROR; + locale.append(loc, status); + if (U_FAILURE(status)) { return; } + } const icu::Hashtable *currencySymbolsEquiv = getCurrSymbolsEquiv(); for (;;) { UErrorCode ec2 = U_ZERO_ERROR; // TODO: ures_openDirect? - UResourceBundle* rb = ures_open(U_ICUDATA_CURR, locale, &ec2); + UResourceBundle* rb = ures_open(U_ICUDATA_CURR, locale.data(), &ec2); UResourceBundle* curr = ures_getByKey(rb, CURRENCIES, nullptr, &ec2); int32_t n = ures_getSize(curr); for (int32_t i=0; i(uprv_strlen(localeID)); @@ -762,7 +743,7 @@ ulocimp_getKeywordValue(const char* localeID, char localeKeywordNameBuffer[ULOC_KEYWORD_BUFFER_LEN]; if(status && U_SUCCESS(*status) && localeID) { - char tempBuffer[ULOC_FULLNAME_CAPACITY]; + CharString tempBuffer; const char* tmpLocaleID; if (keywordName == nullptr || keywordName[0] == 0) { @@ -776,8 +757,9 @@ ulocimp_getKeywordValue(const char* localeID, } if (_hasBCP47Extension(localeID)) { - tmpLocaleID = _ConvertBCP47(localeID, tempBuffer, - sizeof(tempBuffer), status, nullptr); + CharStringByteSink sink(&tempBuffer); + ulocimp_forLanguageTag(localeID, -1, sink, nullptr, status); + tmpLocaleID = U_SUCCESS(*status) && !tempBuffer.isEmpty() ? tempBuffer.data() : localeID; } else { tmpLocaleID=localeID; } @@ -1406,7 +1388,7 @@ U_CAPI UEnumeration* U_EXPORT2 uloc_openKeywords(const char* localeID, UErrorCode* status) { - char tempBuffer[ULOC_FULLNAME_CAPACITY]; + CharString tempBuffer; const char* tmpLocaleID; if(status==nullptr || U_FAILURE(*status)) { @@ -1414,8 +1396,9 @@ uloc_openKeywords(const char* localeID, } if (_hasBCP47Extension(localeID)) { - tmpLocaleID = _ConvertBCP47(localeID, tempBuffer, - sizeof(tempBuffer), status, nullptr); + CharStringByteSink sink(&tempBuffer); + ulocimp_forLanguageTag(localeID, -1, sink, nullptr, status); + tmpLocaleID = U_SUCCESS(*status) && !tempBuffer.isEmpty() ? tempBuffer.data() : localeID; } else { if (localeID==nullptr) { localeID=uloc_getDefault(); @@ -1489,7 +1472,7 @@ _canonicalize(const char* localeID, } int32_t j, fieldCount=0, scriptSize=0, variantSize=0; - PreflightingLocaleIDBuffer tempBuffer; // if localeID has a BCP47 extension, tmpLocaleID points to this + CharString tempBuffer; // if localeID has a BCP47 extension, tmpLocaleID points to this CharString localeIDWithHyphens; // if localeID has a BPC47 extension and have _, tmpLocaleID points to this const char* origLocaleID; const char* tmpLocaleID; @@ -1512,13 +1495,9 @@ _canonicalize(const char* localeID, } } - do { - // After this call tmpLocaleID may point to localeIDPtr which may - // point to either localeID or localeIDWithHyphens.data(). - tmpLocaleID = _ConvertBCP47(localeIDPtr, tempBuffer.getBuffer(), - tempBuffer.getCapacity(), err, - &(tempBuffer.requestedCapacity)); - } while (tempBuffer.needToTryAgain(err)); + CharStringByteSink tempSink(&tempBuffer); + ulocimp_forLanguageTag(localeIDPtr, -1, tempSink, nullptr, err); + tmpLocaleID = U_SUCCESS(*err) && !tempBuffer.isEmpty() ? tempBuffer.data() : localeIDPtr; } else { if (localeID==nullptr) { localeID=uloc_getDefault(); @@ -1676,12 +1655,39 @@ uloc_getParent(const char* localeID, char* parent, int32_t parentCapacity, UErrorCode* err) +{ + if (U_FAILURE(*err)) { + return 0; + } + + CheckedArrayByteSink sink(parent, parentCapacity); + ulocimp_getParent(localeID, sink, err); + + int32_t reslen = sink.NumberOfBytesAppended(); + + if (U_FAILURE(*err)) { + return reslen; + } + + if (sink.Overflowed()) { + *err = U_BUFFER_OVERFLOW_ERROR; + } else { + u_terminateChars(parent, parentCapacity, reslen, err); + } + + return reslen; +} + +U_CAPI void U_EXPORT2 +ulocimp_getParent(const char* localeID, + icu::ByteSink& sink, + UErrorCode* err) { const char *lastUnderscore; int32_t i; if (U_FAILURE(*err)) - return 0; + return; if (localeID == nullptr) localeID = uloc_getDefault(); @@ -1697,13 +1703,9 @@ uloc_getParent(const char* localeID, if (uprv_strnicmp(localeID, "und_", 4) == 0) { localeID += 3; i -= 3; - uprv_memmove(parent, localeID, uprv_min(i, parentCapacity)); - } else if (parent != localeID) { - uprv_memcpy(parent, localeID, uprv_min(i, parentCapacity)); } + sink.Append(localeID, i); } - - return u_terminateChars(parent, parentCapacity, i, err); } U_CAPI int32_t U_EXPORT2 @@ -1795,7 +1797,7 @@ uloc_getVariant(const char* localeID, int32_t variantCapacity, UErrorCode* err) { - char tempBuffer[ULOC_FULLNAME_CAPACITY]; + CharString tempBuffer; const char* tmpLocaleID; int32_t i=0; @@ -1804,7 +1806,9 @@ uloc_getVariant(const char* localeID, } if (_hasBCP47Extension(localeID)) { - tmpLocaleID =_ConvertBCP47(localeID, tempBuffer, sizeof(tempBuffer), err, nullptr); + CharStringByteSink sink(&tempBuffer); + ulocimp_forLanguageTag(localeID, -1, sink, nullptr, err); + tmpLocaleID = U_SUCCESS(*err) && !tempBuffer.isEmpty() ? tempBuffer.data() : localeID; } else { if (localeID==nullptr) { localeID=uloc_getDefault(); diff --git a/deps/icu-small/source/common/uloc_tag.cpp b/deps/icu-small/source/common/uloc_tag.cpp index 43d597549f776f..fe3261c75d939d 100644 --- a/deps/icu-small/source/common/uloc_tag.cpp +++ b/deps/icu-small/source/common/uloc_tag.cpp @@ -1326,14 +1326,23 @@ _appendKeywordsToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool st attrBufLength = 0; for (; i < len; i++) { if (buf[i] != '-') { - attrBuf[attrBufLength++] = buf[i]; + if (static_cast(attrBufLength) < sizeof(attrBuf)) { + attrBuf[attrBufLength++] = buf[i]; + } else { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } } else { i++; break; } } if (attrBufLength > 0) { - attrBuf[attrBufLength] = 0; + if (static_cast(attrBufLength) < sizeof(attrBuf)) { + attrBuf[attrBufLength] = 0; + } else { + *status = U_STRING_NOT_TERMINATED_WARNING; + } } else if (i >= len){ break; @@ -1879,11 +1888,8 @@ static void _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool strict, UBool hadPosix, UErrorCode* status) { (void)hadPosix; char buf[ULOC_FULLNAME_CAPACITY]; - char tmpAppend[ULOC_FULLNAME_CAPACITY]; UErrorCode tmpStatus = U_ZERO_ERROR; int32_t len, i; - int32_t reslen = 0; - int32_t capacity = sizeof tmpAppend; if (U_FAILURE(*status)) { return; @@ -1936,37 +1942,18 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool } if (writeValue) { - if (reslen < capacity) { - tmpAppend[reslen++] = SEP; - } + sink.Append("-", 1); if (firstValue) { - if (reslen < capacity) { - tmpAppend[reslen++] = *PRIVATEUSE_KEY; - } - - if (reslen < capacity) { - tmpAppend[reslen++] = SEP; - } - - len = (int32_t)uprv_strlen(PRIVUSE_VARIANT_PREFIX); - if (reslen < capacity) { - uprv_memcpy(tmpAppend + reslen, PRIVUSE_VARIANT_PREFIX, uprv_min(len, capacity - reslen)); - } - reslen += len; - - if (reslen < capacity) { - tmpAppend[reslen++] = SEP; - } - + sink.Append(PRIVATEUSE_KEY, UPRV_LENGTHOF(PRIVATEUSE_KEY) - 1); + sink.Append("-", 1); + sink.Append(PRIVUSE_VARIANT_PREFIX, UPRV_LENGTHOF(PRIVUSE_VARIANT_PREFIX) - 1); + sink.Append("-", 1); firstValue = false; } len = (int32_t)uprv_strlen(pPriv); - if (reslen < capacity) { - uprv_memcpy(tmpAppend + reslen, pPriv, uprv_min(len, capacity - reslen)); - } - reslen += len; + sink.Append(pPriv, len); } } /* reset private use starting position */ @@ -1976,15 +1963,6 @@ _appendPrivateuseToLanguageTag(const char* localeID, icu::ByteSink& sink, UBool } p++; } - - if (U_FAILURE(*status)) { - return; - } - } - - if (U_SUCCESS(*status)) { - len = reslen; - sink.Append(tmpAppend, len); } } @@ -2092,12 +2070,13 @@ ultag_parse(const char* tag, int32_t tagLen, int32_t* parsedLen, UErrorCode* sta int32_t oldTagLength = tagLen; if (tagLen < newTagLength) { uprv_free(tagBuf); - tagBuf = (char*)uprv_malloc(newTagLength + 1); + // Change t->buf after the free and before return to avoid the second double free in + // the destructor of t when t is out of scope. + t->buf = tagBuf = (char*)uprv_malloc(newTagLength + 1); if (tagBuf == nullptr) { *status = U_MEMORY_ALLOCATION_ERROR; return nullptr; } - t->buf = tagBuf; tagLen = newTagLength; } parsedLenDelta = checkLegacyLen - replacementLen; @@ -2646,53 +2625,18 @@ ulocimp_toLanguageTag(const char* localeID, UBool strict, UErrorCode* status) { icu::CharString canonical; - int32_t reslen; UErrorCode tmpStatus = U_ZERO_ERROR; UBool hadPosix = false; const char* pKeywordStart; /* Note: uloc_canonicalize returns "en_US_POSIX" for input locale ID "". See #6835 */ - int32_t resultCapacity = static_cast(uprv_strlen(localeID)); - if (resultCapacity > 0) { - char* buffer; - - for (;;) { - buffer = canonical.getAppendBuffer( - /*minCapacity=*/resultCapacity, - /*desiredCapacityHint=*/resultCapacity, - resultCapacity, - tmpStatus); - - if (U_FAILURE(tmpStatus)) { - *status = tmpStatus; - return; - } - - reslen = - uloc_canonicalize(localeID, buffer, resultCapacity, &tmpStatus); - - if (tmpStatus != U_BUFFER_OVERFLOW_ERROR) { - break; - } - - resultCapacity = reslen; - tmpStatus = U_ZERO_ERROR; - } - - if (U_FAILURE(tmpStatus)) { - *status = U_ILLEGAL_ARGUMENT_ERROR; - return; - } - - canonical.append(buffer, reslen, tmpStatus); - if (tmpStatus == U_STRING_NOT_TERMINATED_WARNING) { - tmpStatus = U_ZERO_ERROR; // Terminators provided by CharString. - } - - if (U_FAILURE(tmpStatus)) { - *status = tmpStatus; - return; - } + { + icu::CharStringByteSink canonicalSink(&canonical); + ulocimp_canonicalize(localeID, canonicalSink, &tmpStatus); + } + if (U_FAILURE(tmpStatus)) { + *status = tmpStatus; + return; } /* For handling special case - private use only tag */ diff --git a/deps/icu-small/source/common/ulocale.cpp b/deps/icu-small/source/common/ulocale.cpp new file mode 100644 index 00000000000000..471ef0ce79a63f --- /dev/null +++ b/deps/icu-small/source/common/ulocale.cpp @@ -0,0 +1,99 @@ +// © 2023 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +// +#include "unicode/errorcode.h" +#include "unicode/stringpiece.h" +#include "unicode/utypes.h" +#include "unicode/ustring.h" +#include "unicode/ulocale.h" +#include "unicode/locid.h" + +#include "charstr.h" +#include "cmemory.h" +#include "ustr_imp.h" + +U_NAMESPACE_USE +#define EXTERNAL(i) (reinterpret_cast(i)) +#define CONST_INTERNAL(e) (reinterpret_cast(e)) +#define INTERNAL(e) (reinterpret_cast(e)) + +ULocale* +ulocale_openForLocaleID(const char* localeID, int32_t length, UErrorCode* err) { + CharString str(length < 0 ? StringPiece(localeID) : StringPiece(localeID, length), *err); + if (U_FAILURE(*err)) return nullptr; + return EXTERNAL(icu::Locale::createFromName(str.data()).clone()); +} + +ULocale* +ulocale_openForLanguageTag(const char* tag, int32_t length, UErrorCode* err) { + Locale l = icu::Locale::forLanguageTag(length < 0 ? StringPiece(tag) : StringPiece(tag, length), *err); + if (U_FAILURE(*err)) return nullptr; + return EXTERNAL(l.clone()); +} + +void +ulocale_close(ULocale* locale) { + delete INTERNAL(locale); +} + +#define IMPL_ULOCALE_STRING_GETTER(N1, N2) \ +const char* ulocale_get ## N1(const ULocale* locale) { \ + if (locale == nullptr) return nullptr; \ + return CONST_INTERNAL(locale)->get ## N2(); \ +} + +#define IMPL_ULOCALE_STRING_IDENTICAL_GETTER(N) IMPL_ULOCALE_STRING_GETTER(N, N) + +#define IMPL_ULOCALE_GET_KEYWORD_VALUE(N) \ +int32_t ulocale_get ##N ( \ + const ULocale* locale, const char* keyword, int32_t keywordLength, \ + char* valueBuffer, int32_t bufferCapacity, UErrorCode *err) { \ + if (U_FAILURE(*err)) return 0; \ + if (locale == nullptr) { \ + *err = U_ILLEGAL_ARGUMENT_ERROR; \ + return 0; \ + } \ + CheckedArrayByteSink sink(valueBuffer, bufferCapacity); \ + CONST_INTERNAL(locale)->get ## N( \ + keywordLength < 0 ? StringPiece(keyword) : StringPiece(keyword, keywordLength), \ + sink, *err); \ + int32_t reslen = sink.NumberOfBytesAppended(); \ + if (U_FAILURE(*err)) { \ + return reslen; \ + } \ + if (sink.Overflowed()) { \ + *err = U_BUFFER_OVERFLOW_ERROR; \ + } else { \ + u_terminateChars(valueBuffer, bufferCapacity, reslen, err); \ + } \ + return reslen; \ +} + +#define IMPL_ULOCALE_GET_KEYWORDS(N) \ +UEnumeration* ulocale_get ## N(const ULocale* locale, UErrorCode *err) { \ + if (U_FAILURE(*err)) return nullptr; \ + if (locale == nullptr) { \ + *err = U_ILLEGAL_ARGUMENT_ERROR; \ + return nullptr; \ + } \ + return uenum_openFromStringEnumeration( \ + CONST_INTERNAL(locale)->create ## N(*err), err); \ +} + +IMPL_ULOCALE_STRING_IDENTICAL_GETTER(Language) +IMPL_ULOCALE_STRING_IDENTICAL_GETTER(Script) +IMPL_ULOCALE_STRING_GETTER(Region, Country) +IMPL_ULOCALE_STRING_IDENTICAL_GETTER(Variant) +IMPL_ULOCALE_STRING_GETTER(LocaleID, Name) +IMPL_ULOCALE_STRING_IDENTICAL_GETTER(BaseName) +IMPL_ULOCALE_GET_KEYWORD_VALUE(KeywordValue) +IMPL_ULOCALE_GET_KEYWORD_VALUE(UnicodeKeywordValue) +IMPL_ULOCALE_GET_KEYWORDS(Keywords) +IMPL_ULOCALE_GET_KEYWORDS(UnicodeKeywords) + +bool ulocale_isBogus(const ULocale* locale) { + if (locale == nullptr) return false; + return CONST_INTERNAL(locale)->isBogus(); +} + +/*eof*/ diff --git a/deps/icu-small/source/common/ulocbuilder.cpp b/deps/icu-small/source/common/ulocbuilder.cpp new file mode 100644 index 00000000000000..a5af73bef49004 --- /dev/null +++ b/deps/icu-small/source/common/ulocbuilder.cpp @@ -0,0 +1,156 @@ +// © 2023 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#include + +#include "unicode/bytestream.h" +#include "unicode/localebuilder.h" +#include "unicode/locid.h" +#include "unicode/stringpiece.h" +#include "unicode/umachine.h" +#include "unicode/ulocbuilder.h" +#include "cstring.h" +#include "ustr_imp.h" + +using icu::CheckedArrayByteSink; +using icu::StringPiece; + +#define EXTERNAL(i) (reinterpret_cast(i)) +#define INTERNAL(e) (reinterpret_cast(e)) +#define CONST_INTERNAL(e) (reinterpret_cast(e)) + +ULocaleBuilder* ulocbld_open() { + return EXTERNAL(new icu::LocaleBuilder()); +} + +void ulocbld_close(ULocaleBuilder* builder) { + if (builder == nullptr) return; + delete INTERNAL(builder); +} + +void ulocbld_setLocale(ULocaleBuilder* builder, const char* locale, int32_t length) { + if (builder == nullptr) return; + icu::Locale l; + if (length < 0 || locale[length] == '\0') { + l = icu::Locale(locale); + } else { + if (length >= ULOC_FULLNAME_CAPACITY) { + l.setToBogus(); + } else { + // locale is not null termined but Locale API require one. + // Create a null termined version in buf. + char buf[ULOC_FULLNAME_CAPACITY]; + uprv_memcpy(buf, locale, length); + buf[length] = '\0'; + l = icu::Locale(buf); + } + } + INTERNAL(builder)->setLocale(l); +} + +void +ulocbld_adoptULocale(ULocaleBuilder* builder, ULocale* locale) { + if (builder == nullptr) return; + INTERNAL(builder)->setLocale(*(reinterpret_cast(locale))); + ulocale_close(locale); +} + +#define STRING_PIECE(s, l) ((l)<0 ? StringPiece(s) : StringPiece((s), (l))) + +#define IMPL_ULOCBLD_SETTER(N) \ +void ulocbld_##N(ULocaleBuilder* bld, const char* s, int32_t l) { \ + if (bld == nullptr) return; \ + INTERNAL(bld)->N(STRING_PIECE(s,l)); \ +} + +IMPL_ULOCBLD_SETTER(setLanguageTag) +IMPL_ULOCBLD_SETTER(setLanguage) +IMPL_ULOCBLD_SETTER(setScript) +IMPL_ULOCBLD_SETTER(setRegion) +IMPL_ULOCBLD_SETTER(setVariant) +IMPL_ULOCBLD_SETTER(addUnicodeLocaleAttribute) +IMPL_ULOCBLD_SETTER(removeUnicodeLocaleAttribute) + +void ulocbld_setExtension(ULocaleBuilder* builder, char key, const char* value, int32_t length) { + if (builder == nullptr) return; + INTERNAL(builder)->setExtension(key, STRING_PIECE(value, length)); +} + +void ulocbld_setUnicodeLocaleKeyword( + ULocaleBuilder* builder, const char* key, int32_t keyLength, + const char* type, int32_t typeLength) { + if (builder == nullptr) return; + INTERNAL(builder)->setUnicodeLocaleKeyword( + STRING_PIECE(key, keyLength), STRING_PIECE(type, typeLength)); +} + +void ulocbld_clear(ULocaleBuilder* builder) { + if (builder == nullptr) return; + INTERNAL(builder)->clear(); +} + +void ulocbld_clearExtensions(ULocaleBuilder* builder) { + if (builder == nullptr) return; + INTERNAL(builder)->clearExtensions(); +} + + +ULocale* ulocbld_buildULocale(ULocaleBuilder* builder, UErrorCode* err) { + if (builder == nullptr) { + *err = U_ILLEGAL_ARGUMENT_ERROR; + return nullptr; + } + icu::Locale l = INTERNAL(builder)->build(*err); + if (U_FAILURE(*err)) return nullptr; + icu::Locale* r = l.clone(); + if (r == nullptr) { + *err = U_MEMORY_ALLOCATION_ERROR; + return nullptr; + } + return reinterpret_cast(r); +} + +int32_t ulocbld_buildLocaleID(ULocaleBuilder* builder, + char* buffer, int32_t bufferCapacity, UErrorCode* err) { + if (builder == nullptr) { + *err = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + icu::Locale l = INTERNAL(builder)->build(*err); + if (U_FAILURE(*err)) return 0; + int32_t length = (int32_t)(uprv_strlen(l.getName())); + if (0 < length && length <= bufferCapacity) { + uprv_memcpy(buffer, l.getName(), length); + } + return u_terminateChars(buffer, bufferCapacity, length, err); +} + +int32_t ulocbld_buildLanguageTag(ULocaleBuilder* builder, + char* buffer, int32_t bufferCapacity, UErrorCode* err) { + if (builder == nullptr) { + *err = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + icu::Locale l = INTERNAL(builder)->build(*err); + if (U_FAILURE(*err)) return 0; + CheckedArrayByteSink sink(buffer, bufferCapacity); + l.toLanguageTag(sink, *err); + int32_t reslen = sink.NumberOfBytesAppended(); + if (U_FAILURE(*err)) { + return reslen; + } + if (sink.Overflowed()) { + *err = U_BUFFER_OVERFLOW_ERROR; + } else { + u_terminateChars(buffer, bufferCapacity, reslen, err); + } + return reslen; +} + +UBool ulocbld_copyErrorTo(const ULocaleBuilder* builder, UErrorCode *outErrorCode) { + if (builder == nullptr) { + *outErrorCode = U_ILLEGAL_ARGUMENT_ERROR; + return true; + } + return CONST_INTERNAL(builder)->copyErrorTo(*outErrorCode); +} diff --git a/deps/icu-small/source/common/ulocimp.h b/deps/icu-small/source/common/ulocimp.h index 48341054e31cef..efa0fa72e6a1f0 100644 --- a/deps/icu-small/source/common/ulocimp.h +++ b/deps/icu-small/source/common/ulocimp.h @@ -92,6 +92,11 @@ ulocimp_getKeywordValue(const char* localeID, icu::ByteSink& sink, UErrorCode* status); +U_CAPI void U_EXPORT2 +ulocimp_getParent(const char* localeID, + icu::ByteSink& sink, + UErrorCode* err); + /** * Writes a well-formed language tag for this locale ID. * @@ -237,6 +242,7 @@ ulocimp_addLikelySubtags(const char* localeID, * * @param localeID The locale to minimize * @param sink The output sink receiving the maximized locale + * @param favorScript favor to keep script if true, region if false. * @param err Error information if minimizing the locale failed. If the length * of the localeID and the null-terminator is greater than the maximum allowed size, * or the localeId is not well-formed, the error code is U_ILLEGAL_ARGUMENT_ERROR. @@ -245,6 +251,7 @@ ulocimp_addLikelySubtags(const char* localeID, U_CAPI void U_EXPORT2 ulocimp_minimizeSubtags(const char* localeID, icu::ByteSink& sink, + bool favorScript, UErrorCode* err); U_CAPI const char * U_EXPORT2 @@ -307,72 +314,4 @@ U_CAPI const char* const* ulocimp_getKnownCanonicalizedLocaleForTest(int32_t* le // Return true if the value is already canonicalized. U_CAPI bool ulocimp_isCanonicalizedLocaleForTest(const char* localeName); -/** - * A utility class for handling locale IDs that may be longer than ULOC_FULLNAME_CAPACITY. - * This encompasses all of the logic to allocate a temporary locale ID buffer on the stack, - * and then, if it's not big enough, reallocate it on the heap and try again. - * - * You use it like this: - * UErrorCode err = U_ZERO_ERROR; - * - * PreflightingLocaleIDBuffer tempBuffer; - * do { - * tempBuffer.requestedCapacity = uloc_doSomething(localeID, tempBuffer.getBuffer(), tempBuffer.getCapacity(), &err); - * } while (tempBuffer.needToTryAgain(&err)); - * if (U_SUCCESS(err)) { - * uloc_doSomethingWithTheResult(tempBuffer.getBuffer()); - * } - */ -class PreflightingLocaleIDBuffer { -private: - char stackBuffer[ULOC_FULLNAME_CAPACITY]; - char* heapBuffer = nullptr; - int32_t capacity = ULOC_FULLNAME_CAPACITY; - -public: - int32_t requestedCapacity = ULOC_FULLNAME_CAPACITY; - - // No heap allocation. Use only on the stack. - static void* U_EXPORT2 operator new(size_t) noexcept = delete; - static void* U_EXPORT2 operator new[](size_t) noexcept = delete; -#if U_HAVE_PLACEMENT_NEW - static void* U_EXPORT2 operator new(size_t, void*) noexcept = delete; -#endif - - PreflightingLocaleIDBuffer() {} - - ~PreflightingLocaleIDBuffer() { uprv_free(heapBuffer); } - - char* getBuffer() { - if (heapBuffer == nullptr) { - return stackBuffer; - } else { - return heapBuffer; - } - } - - int32_t getCapacity() { - return capacity; - } - - bool needToTryAgain(UErrorCode* err) { - if (heapBuffer != nullptr) { - return false; - } - - if (*err == U_BUFFER_OVERFLOW_ERROR || *err == U_STRING_NOT_TERMINATED_WARNING) { - int32_t newCapacity = requestedCapacity + 2; // one for the terminating null, one just for paranoia - heapBuffer = static_cast(uprv_malloc(newCapacity)); - if (heapBuffer == nullptr) { - *err = U_MEMORY_ALLOCATION_ERROR; - } else { - *err = U_ZERO_ERROR; - capacity = newCapacity; - } - return U_SUCCESS(*err); - } - return false; - } -}; - #endif diff --git a/deps/icu-small/source/common/unicode/brkiter.h b/deps/icu-small/source/common/unicode/brkiter.h index 108652799e692f..1b10e6ef11656d 100644 --- a/deps/icu-small/source/common/unicode/brkiter.h +++ b/deps/icu-small/source/common/unicode/brkiter.h @@ -649,6 +649,7 @@ class U_COMMON_API BreakIterator : public UObject { /** @internal (private) */ char actualLocale[ULOC_FULLNAME_CAPACITY]; char validLocale[ULOC_FULLNAME_CAPACITY]; + char requestLocale[ULOC_FULLNAME_CAPACITY]; }; #ifndef U_HIDE_DEPRECATED_API diff --git a/deps/icu-small/source/common/unicode/docmain.h b/deps/icu-small/source/common/unicode/docmain.h index 1349f49703c112..581b2e186d5ad4 100644 --- a/deps/icu-small/source/common/unicode/docmain.h +++ b/deps/icu-small/source/common/unicode/docmain.h @@ -114,7 +114,7 @@ * * * Locales - * uloc.h + * uloc.h, ulocale.h, ulocbuilder.h * icu::Locale, icu::LocaleBuilder, icu::LocaleMatcher * * diff --git a/deps/icu-small/source/common/unicode/locid.h b/deps/icu-small/source/common/unicode/locid.h index a6fbbb70418f51..f0bdc7ca51416c 100644 --- a/deps/icu-small/source/common/unicode/locid.h +++ b/deps/icu-small/source/common/unicode/locid.h @@ -984,7 +984,10 @@ class U_COMMON_API Locale : public UObject { static const char* const* U_EXPORT2 getISOCountries(); /** - * Gets a list of all available language codes defined in ISO 639. This is a pointer + * Returns a list of all unique language codes defined in ISO 639. + * They can be 2 or 3 letter codes, as defined by + * + * BCP 47, section 2.2.1. This is a pointer * to an array of pointers to arrays of char. All of these pointers are owned * by ICU-- do not delete them, and do not write through them. The array is * terminated with a null pointer. @@ -1110,6 +1113,15 @@ class U_COMMON_API Locale : public UObject { * @internal */ void setFromPOSIXID(const char *posixID); + /** + * Minimize the subtags for this Locale, per the algorithm described + * @param favorScript favor to keep script if true, to keep region if false. + * @param status error information if maximizing this Locale failed. + * If this Locale is not well-formed, the error code is + * U_ILLEGAL_ARGUMENT_ERROR. + * @internal + */ + void minimizeSubtags(bool favorScript, UErrorCode& status); #endif /* U_HIDE_INTERNAL_API */ private: diff --git a/deps/icu-small/source/common/unicode/normalizer2.h b/deps/icu-small/source/common/unicode/normalizer2.h index 972894ec42a444..6856ff8720bfd6 100644 --- a/deps/icu-small/source/common/unicode/normalizer2.h +++ b/deps/icu-small/source/common/unicode/normalizer2.h @@ -147,7 +147,10 @@ class U_COMMON_API Normalizer2 : public UObject { getNFKDInstance(UErrorCode &errorCode); /** - * Returns a Normalizer2 instance for Unicode NFKC_Casefold normalization. + * Returns a Normalizer2 instance for Unicode toNFKC_Casefold() normalization + * which is equivalent to applying the NFKC_Casefold mappings and then NFC. + * See https://www.unicode.org/reports/tr44/#NFKC_Casefold + * * Same as getInstance(nullptr, "nfkc_cf", UNORM2_COMPOSE, errorCode). * Returns an unmodifiable singleton instance. Do not delete it. * @param errorCode Standard ICU error code. Its input value must @@ -160,6 +163,25 @@ class U_COMMON_API Normalizer2 : public UObject { static const Normalizer2 * getNFKCCasefoldInstance(UErrorCode &errorCode); +#ifndef U_HIDE_DRAFT_API + /** + * Returns a Normalizer2 instance for a variant of Unicode toNFKC_Casefold() normalization + * which is equivalent to applying the NFKC_Simple_Casefold mappings and then NFC. + * See https://www.unicode.org/reports/tr44/#NFKC_Simple_Casefold + * + * Same as getInstance(nullptr, "nfkc_scf", UNORM2_COMPOSE, errorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param errorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @draft ICU 74 + */ + static const Normalizer2 * + getNFKCSimpleCasefoldInstance(UErrorCode &errorCode); +#endif // U_HIDE_DRAFT_API + /** * Returns a Normalizer2 instance which uses the specified data file * (packageName/name similar to ucnv_openPackage() and ures_open()/ResourceBundle) @@ -172,7 +194,7 @@ class U_COMMON_API Normalizer2 : public UObject { * Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=NFKC_Casefold. * * @param packageName nullptr for ICU built-in data, otherwise application data package name - * @param name "nfc" or "nfkc" or "nfkc_cf" or name of custom data file + * @param name "nfc" or "nfkc" or "nfkc_cf" or "nfkc_scf" or name of custom data file * @param mode normalization mode (compose or decompose etc.) * @param errorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns diff --git a/deps/icu-small/source/common/unicode/rbbi.h b/deps/icu-small/source/common/unicode/rbbi.h index 418b52e41f42dc..045238ac5d79de 100644 --- a/deps/icu-small/source/common/unicode/rbbi.h +++ b/deps/icu-small/source/common/unicode/rbbi.h @@ -43,6 +43,69 @@ class RBBIDataWrapper; class UnhandledEngine; class UStack; + +#ifndef U_HIDE_DRAFT_API +/** + * The ExternalBreakEngine class define an abstract interface for the host environment + * to provide a low level facility to break text for unicode text in script that the text boundary + * cannot be handled by upper level rule based logic, for example, for Chinese and Japanese + * word breaking, Thai, Khmer, Burmese, Lao and other Southeast Asian scripts. + * The host environment implement one or more subclass of ExternalBreakEngine and + * register them in the initialization time by calling + * RuleBasedBreakIterator::registerExternalBreakEngine(). ICU adopt and own the engine and will + * delete the registered external engine in proper time during the clean up + * event. + * @internal ICU 74 technology preview + */ +class ExternalBreakEngine : public UObject { + public: + /** + * destructor + * @internal ICU 74 technology preview + */ + virtual ~ExternalBreakEngine() {} + + /** + *

Indicate whether this engine handles a particular character when + * the RuleBasedBreakIterator is used for a particular locale. This method is used + * by the RuleBasedBreakIterator to find a break engine.

+ * @param c A character which begins a run that the engine might handle. + * @param locale The locale. + * @return true if this engine handles the particular character for that locale. + * @internal ICU 74 technology preview + */ + virtual bool isFor(UChar32 c, const char* locale) const = 0; + + /** + *

Indicate whether this engine handles a particular character.This method is + * used by the RuleBasedBreakIterator after it already find a break engine to see which + * characters after the first one can be handled by this break engine.

+ * @param c A character that the engine might handle. + * @return true if this engine handles the particular character. + * @internal ICU 74 technology preview + */ + virtual bool handles(UChar32 c) const = 0; + + /** + *

Divide up a range of text handled by this break engine.

+ * + * @param text A UText representing the text + * @param start The start of the range of known characters + * @param end The end of the range of known characters + * @param foundBreaks Output of C array of int32_t break positions, or + * nullptr + * @param foundBreaksCapacity The capacity of foundBreaks + * @param status Information on any errors encountered. + * @return The number of breaks found + * @internal ICU 74 technology preview + */ + virtual int32_t fillBreaks(UText* text, int32_t start, int32_t end, + int32_t* foundBreaks, int32_t foundBreaksCapacity, + UErrorCode& status) const = 0; +}; +#endif /* U_HIDE_DRAFT_API */ + + /** * * A subclass of BreakIterator whose behavior is specified using a list of rules. @@ -716,9 +779,10 @@ class U_COMMON_API RuleBasedBreakIterator /*final*/ : public BreakIterator { * This function returns the appropriate LanguageBreakEngine for a * given character c. * @param c A character in the dictionary set + * @param locale The locale. * @internal (private) */ - const LanguageBreakEngine *getLanguageBreakEngine(UChar32 c); + const LanguageBreakEngine *getLanguageBreakEngine(UChar32 c, const char* locale); public: #ifndef U_HIDE_INTERNAL_API @@ -734,8 +798,24 @@ class U_COMMON_API RuleBasedBreakIterator /*final*/ : public BreakIterator { */ void dumpTables(); #endif /* U_HIDE_INTERNAL_API */ + +#ifndef U_HIDE_DRAFT_API + /** + * Register a new external break engine. The external break engine will be adopted. + * Because ICU may choose to cache break engine internally, this must + * be called at application startup, prior to any calls to + * object methods of RuleBasedBreakIterator to avoid undefined behavior. + * @param toAdopt the ExternalBreakEngine instance to be adopted + * @param status the in/out status code, no special meanings are assigned + * @internal ICU 74 technology preview + */ + static void U_EXPORT2 registerExternalBreakEngine( + ExternalBreakEngine* toAdopt, UErrorCode& status); +#endif /* U_HIDE_DRAFT_API */ + }; + U_NAMESPACE_END #endif /* #if !UCONFIG_NO_BREAK_ITERATION */ diff --git a/deps/icu-small/source/common/unicode/uchar.h b/deps/icu-small/source/common/unicode/uchar.h index 4f82a9fb5838da..7470891338aa66 100644 --- a/deps/icu-small/source/common/unicode/uchar.h +++ b/deps/icu-small/source/common/unicode/uchar.h @@ -60,7 +60,7 @@ U_CDECL_BEGIN * @see u_getUnicodeVersion * @stable ICU 2.0 */ -#define U_UNICODE_VERSION "15.0" +#define U_UNICODE_VERSION "15.1" /** * \file @@ -532,12 +532,33 @@ typedef enum UProperty { * @stable ICU 70 */ UCHAR_RGI_EMOJI=71, +#ifndef U_HIDE_DRAFT_API + /** + * Binary property IDS_Unary_Operator. + * For programmatic determination of Ideographic Description Sequences. + * + * @draft ICU 74 + */ + UCHAR_IDS_UNARY_OPERATOR=72, + /** + * Binary property ID_Compat_Math_Start. + * Used in mathematical identifier profile in UAX #31. + * @draft ICU 74 + */ + UCHAR_ID_COMPAT_MATH_START=73, + /** + * Binary property ID_Compat_Math_Continue. + * Used in mathematical identifier profile in UAX #31. + * @draft ICU 74 + */ + UCHAR_ID_COMPAT_MATH_CONTINUE=74, +#endif // U_HIDE_DRAFT_API #ifndef U_HIDE_DEPRECATED_API /** * One more than the last constant for binary Unicode properties. * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - UCHAR_BINARY_LIMIT=72, + UCHAR_BINARY_LIMIT=75, #endif // U_HIDE_DEPRECATED_API /** Enumerated property Bidi_Class. @@ -1900,6 +1921,11 @@ enum UBlockCode { /** @stable ICU 72 */ UBLOCK_NAG_MUNDARI = 327, /*[1E4D0]*/ + // New block in Unicode 15.1 + + /** @stable ICU 74 */ + UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_I = 328, /*[2EBF0]*/ + #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal UBlockCode value. @@ -1907,7 +1933,7 @@ enum UBlockCode { * * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - UBLOCK_COUNT = 328, + UBLOCK_COUNT = 329, #endif // U_HIDE_DEPRECATED_API /** @stable ICU 2.0 */ @@ -2439,6 +2465,16 @@ typedef enum ULineBreak { U_LB_E_MODIFIER = 41, /*[EM]*/ /** @stable ICU 58 */ U_LB_ZWJ = 42, /*[ZWJ]*/ + /** @stable ICU 74 */ + U_LB_AKSARA = 43, /*[AK]*/ + /** @stable ICU 74 */ + U_LB_AKSARA_PREBASE = 44, /*[AP]*/ + /** @stable ICU 74 */ + U_LB_AKSARA_START = 45, /*[AS]*/ + /** @stable ICU 74 */ + U_LB_VIRAMA_FINAL = 46, /*[VF]*/ + /** @stable ICU 74 */ + U_LB_VIRAMA = 47, /*[VI]*/ #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal ULineBreak value. @@ -2446,7 +2482,7 @@ typedef enum ULineBreak { * * @deprecated ICU 58 The numeric value may change over time, see ICU ticket #12420. */ - U_LB_COUNT = 43 + U_LB_COUNT = 48 #endif // U_HIDE_DEPRECATED_API } ULineBreak; diff --git a/deps/icu-small/source/common/unicode/ulocale.h b/deps/icu-small/source/common/unicode/ulocale.h new file mode 100644 index 00000000000000..33e92844bc1eea --- /dev/null +++ b/deps/icu-small/source/common/unicode/ulocale.h @@ -0,0 +1,229 @@ +// © 2023 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html + +#ifndef ULOCALE_H +#define ULOCALE_H + +#include "unicode/localpointer.h" +#include "unicode/uenum.h" +#include "unicode/utypes.h" + +/** + * \file + * \brief C API: Locale ID functionality similar to C++ class Locale + */ + +#ifndef U_HIDE_DRAFT_API +/** + * Opaque C service object type for the locale API + * @draft ICU 74 + */ +struct ULocale; + +/** + * C typedef for struct ULocale. + * @draft ICU 74 + */ +typedef struct ULocale ULocale; + +/** + * Constructs an ULocale from the locale ID. + * The created ULocale should be destroyed by calling + * ulocale_close(); + * @param localeID the locale, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the locale; if negative, then the locale need to be + * null terminated. + * @param err the error code + * @return the locale. + * + * @draft ICU 74 + */ +U_CAPI ULocale* U_EXPORT2 +ulocale_openForLocaleID(const char* localeID, int32_t length, UErrorCode* err); + +/** + * Constructs an ULocale from the provided IETF BCP 47 language tag. + * The created ULocale should be destroyed by calling + * ulocale_close(); + * @param tag the language tag, defined as IETF BCP 47 language tag, const + * char* pointer (need not be terminated when the length is non-negative) + * @param length the length of the tag; if negative, then the tag need to be + * null terminated. + * @param err the error code + * @return the locale. + * + * @draft ICU 74 + */ +U_CAPI ULocale* U_EXPORT2 +ulocale_openForLanguageTag(const char* tag, int32_t length, UErrorCode* err); + +/** + * Close the locale and destroy it's internal states. + * + * @param locale the locale + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocale_close(ULocale* locale); + +/** + * Returns the locale's ISO-639 language code. + * + * @param locale the locale + * @return the language code of the locale. + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getLanguage(const ULocale* locale); + +/** + * Returns the locale's ISO-15924 abbreviation script code. + * + * @param locale the locale + * @return A pointer to the script. + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getScript(const ULocale* locale); + +/** + * Returns the locale's ISO-3166 region code. + * + * @param locale the locale + * @return A pointer to the region. + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getRegion(const ULocale* locale); + +/** + * Returns the locale's variant code. + * + * @param locale the locale + * @return A pointer to the variant. + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getVariant(const ULocale* locale); + +/** + * Returns the programmatic name of the entire locale, with the language, + * country and variant separated by underbars. If a field is missing, up + * to two leading underbars will occur. Example: "en", "de_DE", "en_US_WIN", + * "de__POSIX", "fr__MAC", "__MAC", "_MT", "_FR_EURO" + * + * @param locale the locale + * @return A pointer to "name". + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getLocaleID(const ULocale* locale); + +/** + * Returns the programmatic name of the entire locale as ulocale_getLocaleID() + * would return, but without keywords. + * + * @param locale the locale + * @return A pointer to "base name". + * @draft ICU 74 + */ +U_CAPI const char* U_EXPORT2 +ulocale_getBaseName(const ULocale* locale); + +/** + * Gets the bogus state. Locale object can be bogus if it doesn't exist + * + * @param locale the locale + * @return false if it is a real locale, true if it is a bogus locale + * @draft ICU 74 + */ +U_CAPI bool U_EXPORT2 +ulocale_isBogus(const ULocale* locale); + +/** + * Gets the list of keywords for the specified locale. + * + * @param locale the locale + * @param err the error code + * @return pointer to UEnumeration, or nullptr if there are no keywords. + * Client must call uenum_close() to dispose the returned value. + * @draft ICU 74 + */ +U_CAPI UEnumeration* U_EXPORT2 +ulocale_getKeywords(const ULocale* locale, UErrorCode *err); + +/** + * Gets the list of unicode keywords for the specified locale. + * + * @param locale the locale + * @param err the error code + * @return pointer to UEnumeration, or nullptr if there are no keywords. + * Client must call uenum_close() to dispose the returned value. + * @draft ICU 74 + */ +U_CAPI UEnumeration* U_EXPORT2 +ulocale_getUnicodeKeywords(const ULocale* locale, UErrorCode *err); + +/** + * Gets the value for a keyword. + * + * This uses legacy keyword=value pairs, like "collation=phonebook". + * + * @param locale the locale + * @param keyword the keyword, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param keywordLength the length of the keyword; if negative, then the + * keyword need to be null terminated. + * @param valueBuffer The buffer to receive the value. + * @param valueBufferCapacity The capacity of receiving valueBuffer. + * @param err the error code + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 +ulocale_getKeywordValue( + const ULocale* locale, const char* keyword, int32_t keywordLength, + char* valueBuffer, int32_t valueBufferCapacity, UErrorCode *err); + +/** + * Gets the Unicode value for a Unicode keyword. + * + * This uses Unicode key-value pairs, like "co-phonebk". + * + * @param locale the locale + * @param keyword the Unicode keyword, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param keywordLength the length of the Unicode keyword; if negative, + * then the keyword need to be null terminated. + * @param valueBuffer The buffer to receive the Unicode value. + * @param valueBufferCapacity The capacity of receiving valueBuffer. + * @param err the error code + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 +ulocale_getUnicodeKeywordValue( + const ULocale* locale, const char* keyword, int32_t keywordLength, + char* valueBuffer, int32_t valueBufferCapacity, UErrorCode *err); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalULocalePointer + * "Smart pointer" class, closes a ULocale via ulocale_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @draft ICU 74 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalULocalePointer, ULocale, ulocale_close); + +U_NAMESPACE_END + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif /* U_HIDE_DRAFT_API */ + +#endif /*_ULOCALE */ diff --git a/deps/icu-small/source/common/unicode/ulocbuilder.h b/deps/icu-small/source/common/unicode/ulocbuilder.h new file mode 100644 index 00000000000000..f2e98612f0a012 --- /dev/null +++ b/deps/icu-small/source/common/unicode/ulocbuilder.h @@ -0,0 +1,441 @@ +// © 2023 and later: Unicode, Inc. and others. +// License & terms of use: http://www.unicode.org/copyright.html +#ifndef __ULOCBUILDER_H__ +#define __ULOCBUILDER_H__ + +#include "unicode/localpointer.h" +#include "unicode/ulocale.h" +#include "unicode/utypes.h" + +/** + * \file + * \brief C API: Builder API for Locale + */ + +#ifndef U_HIDE_DRAFT_API + +/** + * Opaque C service object type for the locale builder API + * @draft ICU 74 + */ +struct ULocaleBuilder; + +/** + * C typedef for struct ULocaleBuilder. + * @draft ICU 74 + */ +typedef struct ULocaleBuilder ULocaleBuilder; + +/** + * ULocaleBuilder is used to build valid locale id + * string or IETF BCP 47 language tag from values configured by the setters. + * The ULocaleBuilder checks if a value configured by a + * setter satisfies the syntax requirements defined by the Locale + * class. A string of Locale created by a ULocaleBuilder is + * well-formed and can be transformed to a well-formed IETF BCP 47 language tag + * without losing information. + * + *

The following example shows how to create a locale string + * with the ULocaleBuilder. + *

+ *
+ *     UErrorCode err = U_ZERO_ERROR;
+ *     char buffer[ULOC_FULLNAME_CAPACITY];
+ *     ULocaleBuilder* builder = ulocbld_open();
+ *     ulocbld_setLanguage(builder, "sr", -1);
+ *     ulocbld_setScript(builder, "Latn", -1);
+ *     ulocbld_setRegion(builder, "RS", -1);
+ *     int32_t length = ulocbld_buildLocaleID(
+ *         builder, buffer, ULOC_FULLNAME_CAPACITY, &error);
+ *     ulocbld_close(builder);
+ * 
+ *
+ * + *

ULocaleBuilders can be reused; ulocbld_clear() resets all + * fields to their default values. + * + *

ULocaleBuilder tracks errors in an internal UErrorCode. For all setters, + * except ulocbld_setLanguageTag and ulocbld_setLocale, ULocaleBuilder will return immediately + * if the internal UErrorCode is in error state. + * To reset internal state and error code, call clear method. + * The ulocbld_setLanguageTag and setLocale method will first clear the internal + * UErrorCode, then track the error of the validation of the input parameter + * into the internal UErrorCode. + * + * @draft ICU 74 + */ + +/** + * Constructs an empty ULocaleBuilder. The default value of all + * fields, extensions, and private use information is the + * empty string. The created builder should be destroyed by calling + * ulocbld_close(); + * + * @draft ICU 74 + */ +U_CAPI ULocaleBuilder* U_EXPORT2 +ulocbld_open(); + +/** + * Close the builder and destroy it's internal states. + * @param builder the builder + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_close(ULocaleBuilder* builder); + +/** + * Resets the ULocaleBuilder to match the provided + * locale. Existing state is discarded. + * + *

All fields of the locale must be well-formed. + *

This method clears the internal UErrorCode. + * + * @param builder the builder + * @param locale the locale, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the locale; if negative, then the locale need to be + * null terminated, + * + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setLocale(ULocaleBuilder* builder, const char* locale, int32_t length); + +/** + * Resets the ULocaleBuilder to match the provided + * ULocale. Existing state is discarded. + * + *

The locale must be not bogus. + *

This method clears the internal UErrorCode. + * + * @param builder the builder. + * @param locale the locale, a ULocale* pointer. The builder adopts the locale + * after the call and the client must not delete it. + * + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_adoptULocale(ULocaleBuilder* builder, ULocale* locale); + +/** + * Resets the ULocaleBuilder to match the provided IETF BCP 47 language tag. + * Discards the existing state. + * The empty string causes the builder to be reset, like {@link #ulocbld_clear}. + * Legacy language tags (marked as “Type: grandfathered” in BCP 47) + * are converted to their canonical form before being processed. + * Otherwise, the language tag must be well-formed, + * or else the ulocbld_buildLocaleID() and ulocbld_buildLanguageTag() methods + * will later report an U_ILLEGAL_ARGUMENT_ERROR. + * + *

This method clears the internal UErrorCode. + * + * @param builder the builder + * @param tag the language tag, defined as IETF BCP 47 language tag, a + * const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the tag; if negative, then the tag need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setLanguageTag(ULocaleBuilder* builder, const char* tag, int32_t length); + +/** + * Sets the language. If language is the empty string, the + * language in this ULocaleBuilder is removed. Otherwise, the + * language must be well-formed, or else the ulocbld_buildLocaleID() + * and ulocbld_buildLanguageTag() methods will + * later report an U_ILLEGAL_ARGUMENT_ERROR. + * + *

The syntax of language value is defined as + * [unicode_language_subtag](http://www.unicode.org/reports/tr35/tr35.html#unicode_language_subtag). + * + * @param builder the builder + * @param language the language, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the language; if negative, then the language need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setLanguage(ULocaleBuilder* builder, const char* language, int32_t length); + +/** + * Sets the script. If script is the empty string, the script in + * this ULocaleBuilder is removed. + * Otherwise, the script must be well-formed, or else the + * ulocbld_buildLocaleID() and ulocbld_buildLanguageTag() methods will later + * report an U_ILLEGAL_ARGUMENT_ERROR. + * + *

The script value is a four-letter script code as + * [unicode_script_subtag](http://www.unicode.org/reports/tr35/tr35.html#unicode_script_subtag) + * defined by ISO 15924 + * + * @param builder the builder + * @param script the script, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the script; if negative, then the script need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setScript(ULocaleBuilder* builder, const char* script, int32_t length); + +/** + * Sets the region. If region is the empty string, the region in this + * ULocaleBuilder is removed. Otherwise, the region + * must be well-formed, or else the ulocbld_buildLocaleID() and + * ulocbld_buildLanguageTag() methods will later report an + * U_ILLEGAL_ARGUMENT_ERROR. + * + *

The region value is defined by + * [unicode_region_subtag](http://www.unicode.org/reports/tr35/tr35.html#unicode_region_subtag) + * as a two-letter ISO 3166 code or a three-digit UN M.49 area code. + * + *

The region value in the Locale created by the + * ULocaleBuilder is always normalized to upper case. + * + * @param builder the builder + * @param region the region, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the region; if negative, then the region need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setRegion(ULocaleBuilder* builder, const char* region, int32_t length); + +/** + * Sets the variant. If variant is the empty string, the variant in this + * ULocaleBuilder is removed. Otherwise, the variant + * must be well-formed, or else the ulocbld_buildLocaleID() and + * ulocbld_buildLanguageTag() methods will later report an + * U_ILLEGAL_ARGUMENT_ERROR. + * + *

Note: This method checks if variant + * satisfies the + * [unicode_variant_subtag](http://www.unicode.org/reports/tr35/tr35.html#unicode_variant_subtag) + * syntax requirements, and normalizes the value to lowercase letters. However, + * the Locale class does not impose any syntactic + * restriction on variant. To set an ill-formed variant, use a Locale constructor. + * If there are multiple unicode_variant_subtag, the caller must concatenate + * them with '-' as separator (ex: "foobar-fibar"). + * + * @param builder the builder + * @param variant the variant, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the variant; if negative, then the variant need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setVariant(ULocaleBuilder* builder, const char* variant, int32_t length); + +/** + * Sets the extension for the given key. If the value is the empty string, + * the extension is removed. Otherwise, the key and + * value must be well-formed, or else the ulocbld_buildLocaleID() + * and ulocbld_buildLanguageTag() methods will + * later report an U_ILLEGAL_ARGUMENT_ERROR. + * + *

Note: The key ('u') is used for the Unicode locale extension. + * Setting a value for this key replaces any existing Unicode locale key/type + * pairs with those defined in the extension. + * + *

Note: The key ('x') is used for the private use code. To be + * well-formed, the value for this key needs only to have subtags of one to + * eight alphanumeric characters, not two to eight as in the general case. + * + * @param builder the builder + * @param key the extension key + * @param value the value, a const char * pointer (need not be terminated when + * the length is non-negative) + * @param length the length of the value; if negative, then the value need to be + * null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setExtension(ULocaleBuilder* builder, char key, const char* value, int32_t length); + +/** + * Sets the Unicode locale keyword type for the given key. If the type + * StringPiece is constructed with a nullptr, the keyword is removed. + * If the type is the empty string, the keyword is set without type subtags. + * Otherwise, the key and type must be well-formed, or else the + * ulocbld_buildLocaleID() and ulocbld_buildLanguageTag() methods will later + * report an U_ILLEGAL_ARGUMENT_ERROR. + * + *

Keys and types are converted to lower case. + * + *

Note:Setting the 'u' extension via {@link #ulocbld_setExtension} + * replaces all Unicode locale keywords with those defined in the + * extension. + * + * @param builder the builder + * @param key the Unicode locale key, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param keyLength the length of the key; if negative, then the key need to be + * null terminated, + * @param type the Unicode locale type, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param typeLength the length of the type; if negative, then the type need to + * be null terminated, + * @return This builder. + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_setUnicodeLocaleKeyword(ULocaleBuilder* builder, + const char* key, int32_t keyLength, const char* type, int32_t typeLength); + +/** + * Adds a unicode locale attribute, if not already present, otherwise + * has no effect. The attribute must not be empty string and must be + * well-formed or U_ILLEGAL_ARGUMENT_ERROR will be set to status + * during the ulocbld_buildLocaleID() and ulocbld_buildLanguageTag() calls. + * + * @param builder the builder + * @param attribute the attribute, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param length the length of the attribute; if negative, then the attribute + * need to be null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_addUnicodeLocaleAttribute( + ULocaleBuilder* builder, const char* attribute, int32_t length); + +/** + * Removes a unicode locale attribute, if present, otherwise has no + * effect. The attribute must not be empty string and must be well-formed + * or U_ILLEGAL_ARGUMENT_ERROR will be set to status during the ulocbld_buildLocaleID() + * and ulocbld_buildLanguageTag() calls. + * + *

Attribute comparison for removal is case-insensitive. + * + * @param builder the builder + * @param attribute the attribute, a const char * pointer (need not be + * terminated when the length is non-negative) + * @param length the length of the attribute; if negative, then the attribute + * need to be null terminated, + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_removeUnicodeLocaleAttribute( + ULocaleBuilder* builder, const char* attribute, int32_t length); + +/** + * Resets the builder to its initial, empty state. + *

This method clears the internal UErrorCode. + * + * @param builder the builder + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_clear(ULocaleBuilder* builder); + +/** + * Resets the extensions to their initial, empty state. + * Language, script, region and variant are unchanged. + * + * @param builder the builder + * @draft ICU 74 + */ +U_CAPI void U_EXPORT2 +ulocbld_clearExtensions(ULocaleBuilder* builder); + +/** + * Build the LocaleID string from the fields set on this builder. + * If any set methods or during the ulocbld_buildLocaleID() call require memory + * allocation but fail U_MEMORY_ALLOCATION_ERROR will be set to status. + * If any of the fields set by the setters are not well-formed, the status + * will be set to U_ILLEGAL_ARGUMENT_ERROR. The state of the builder will + * not change after the ulocbld_buildLocaleID() call and the caller is + * free to keep using the same builder to build more locales. + * + * @param builder the builder + * @param locale the locale id + * @param localeCapacity the size of the locale buffer to store the locale id + * @param err the error code + * @return the length of the locale id in buffer + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 +ulocbld_buildLocaleID(ULocaleBuilder* builder, char* locale, + int32_t localeCapacity, UErrorCode* err); + +/** + * Build the ULocale object from the fields set on this builder. + * If any set methods or during the ulocbld_buildULocale() call require memory + * allocation but fail U_MEMORY_ALLOCATION_ERROR will be set to status. + * If any of the fields set by the setters are not well-formed, the status + * will be set to U_ILLEGAL_ARGUMENT_ERROR. The state of the builder will + * not change after the ulocbld_buildULocale() call and the caller is + * free to keep using the same builder to build more locales. + * + * @param builder the builder. + * @param err the error code. + * @return the locale, a ULocale* pointer. The created ULocale must be + * destroyed by calling {@link ulocale_close}. + * @draft ICU 74 + */ +U_CAPI ULocale* U_EXPORT2 +ulocbld_buildULocale(ULocaleBuilder* builder, UErrorCode* err); + +/** + * Build the IETF BCP 47 language tag string from the fields set on this builder. + * If any set methods or during the ulocbld_buildLanguageTag() call require memory + * allocation but fail U_MEMORY_ALLOCATION_ERROR will be set to status. + * If any of the fields set by the setters are not well-formed, the status + * will be set to U_ILLEGAL_ARGUMENT_ERROR. The state of the builder will + * not change after the ulocbld_buildLanguageTag() call and the caller is free + * to keep using the same builder to build more locales. + * + * @param builder the builder + * @param language the language tag + * @param languageCapacity the size of the language buffer to store the language + * tag + * @param err the error code + * @return the length of the language tag in buffer + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 +ulocbld_buildLanguageTag(ULocaleBuilder* builder, char* language, + int32_t languageCapacity, UErrorCode* err); + +/** + * Sets the UErrorCode if an error occurred while recording sets. + * Preserves older error codes in the outErrorCode. + * + * @param builder the builder + * @param outErrorCode Set to an error code that occurred while setting subtags. + * Unchanged if there is no such error or if outErrorCode + * already contained an error. + * @return true if U_FAILURE(*outErrorCode) + * @draft ICU 74 + */ +U_CAPI UBool U_EXPORT2 +ulocbld_copyErrorTo(const ULocaleBuilder* builder, UErrorCode *outErrorCode); + +#if U_SHOW_CPLUSPLUS_API + +U_NAMESPACE_BEGIN + +/** + * \class LocalULocaleBuilderPointer + * "Smart pointer" class, closes a ULocaleBuilder via ulocbld_close(). + * For most methods see the LocalPointerBase base class. + * + * @see LocalPointerBase + * @see LocalPointer + * @draft ICU 74 + */ +U_DEFINE_LOCAL_OPEN_POINTER(LocalULocaleBuilderPointer, ULocaleBuilder, ulocbld_close); + +U_NAMESPACE_END + +#endif /* U_SHOW_CPLUSPLUS_API */ + +#endif /* U_HIDE_DRAFT_API */ + +#endif // __ULOCBUILDER_H__ diff --git a/deps/icu-small/source/common/unicode/unorm2.h b/deps/icu-small/source/common/unicode/unorm2.h index 24417b7103c12e..3844041f1704da 100644 --- a/deps/icu-small/source/common/unicode/unorm2.h +++ b/deps/icu-small/source/common/unicode/unorm2.h @@ -181,7 +181,10 @@ U_CAPI const UNormalizer2 * U_EXPORT2 unorm2_getNFKDInstance(UErrorCode *pErrorCode); /** - * Returns a UNormalizer2 instance for Unicode NFKC_Casefold normalization. + * Returns a UNormalizer2 instance for Unicode toNFKC_Casefold() normalization + * which is equivalent to applying the NFKC_Casefold mappings and then NFC. + * See https://www.unicode.org/reports/tr44/#NFKC_Casefold + * * Same as unorm2_getInstance(NULL, "nfkc_cf", UNORM2_COMPOSE, pErrorCode). * Returns an unmodifiable singleton instance. Do not delete it. * @param pErrorCode Standard ICU error code. Its input value must @@ -194,6 +197,25 @@ unorm2_getNFKDInstance(UErrorCode *pErrorCode); U_CAPI const UNormalizer2 * U_EXPORT2 unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); +#ifndef U_HIDE_DRAFT_API +/** + * Returns a UNormalizer2 instance for a variant of Unicode toNFKC_Casefold() normalization + * which is equivalent to applying the NFKC_Simple_Casefold mappings and then NFC. + * See https://www.unicode.org/reports/tr44/#NFKC_Simple_Casefold + * + * Same as unorm2_getInstance(NULL, "nfkc_scf", UNORM2_COMPOSE, pErrorCode). + * Returns an unmodifiable singleton instance. Do not delete it. + * @param pErrorCode Standard ICU error code. Its input value must + * pass the U_SUCCESS() test, or else the function returns + * immediately. Check for U_FAILURE() on output or use with + * function chaining. (See User Guide for details.) + * @return the requested Normalizer2, if successful + * @draft ICU 74 + */ +U_CAPI const UNormalizer2 * U_EXPORT2 +unorm2_getNFKCSimpleCasefoldInstance(UErrorCode *pErrorCode); +#endif // U_HIDE_DRAFT_API + /** * Returns a UNormalizer2 instance which uses the specified data file * (packageName/name similar to ucnv_openPackage() and ures_open()/ResourceBundle) @@ -206,7 +228,7 @@ unorm2_getNFKCCasefoldInstance(UErrorCode *pErrorCode); * Use name="nfkc_cf" and UNORM2_COMPOSE for Unicode standard NFKC_CF=NFKC_Casefold. * * @param packageName NULL for ICU built-in data, otherwise application data package name - * @param name "nfc" or "nfkc" or "nfkc_cf" or name of custom data file + * @param name "nfc" or "nfkc" or "nfkc_cf" or "nfkc_scf" or name of custom data file * @param mode normalization mode (compose or decompose etc.) * @param pErrorCode Standard ICU error code. Its input value must * pass the U_SUCCESS() test, or else the function returns diff --git a/deps/icu-small/source/common/unicode/urename.h b/deps/icu-small/source/common/unicode/urename.h index b35df453800bed..74f2cae510637d 100644 --- a/deps/icu-small/source/common/unicode/urename.h +++ b/deps/icu-small/source/common/unicode/urename.h @@ -138,8 +138,8 @@ #define locale_getKeywordsStart U_ICU_ENTRY_POINT_RENAME(locale_getKeywordsStart) #define locale_get_default U_ICU_ENTRY_POINT_RENAME(locale_get_default) #define locale_set_default U_ICU_ENTRY_POINT_RENAME(locale_set_default) +#define mixedMeasuresToMicros U_ICU_ENTRY_POINT_RENAME(mixedMeasuresToMicros) #define numSysCleanup U_ICU_ENTRY_POINT_RENAME(numSysCleanup) -#define rbbi_cleanup U_ICU_ENTRY_POINT_RENAME(rbbi_cleanup) #define pl_addFontRun U_ICU_ENTRY_POINT_RENAME(pl_addFontRun) #define pl_addLocaleRun U_ICU_ENTRY_POINT_RENAME(pl_addLocaleRun) #define pl_addValueRun U_ICU_ENTRY_POINT_RENAME(pl_addValueRun) @@ -193,6 +193,7 @@ #define pl_resetFontRuns U_ICU_ENTRY_POINT_RENAME(pl_resetFontRuns) #define pl_resetLocaleRuns U_ICU_ENTRY_POINT_RENAME(pl_resetLocaleRuns) #define pl_resetValueRuns U_ICU_ENTRY_POINT_RENAME(pl_resetValueRuns) +#define rbbi_cleanup U_ICU_ENTRY_POINT_RENAME(rbbi_cleanup) #define res_countArrayItems U_ICU_ENTRY_POINT_RENAME(res_countArrayItems) #define res_findResource U_ICU_ENTRY_POINT_RENAME(res_findResource) #define res_getAlias U_ICU_ENTRY_POINT_RENAME(res_getAlias) @@ -512,9 +513,6 @@ #define ubrk_setText U_ICU_ENTRY_POINT_RENAME(ubrk_setText) #define ubrk_setUText U_ICU_ENTRY_POINT_RENAME(ubrk_setUText) #define ubrk_swap U_ICU_ENTRY_POINT_RENAME(ubrk_swap) -#define ucache_compareKeys U_ICU_ENTRY_POINT_RENAME(ucache_compareKeys) -#define ucache_deleteKey U_ICU_ENTRY_POINT_RENAME(ucache_deleteKey) -#define ucache_hashKeys U_ICU_ENTRY_POINT_RENAME(ucache_hashKeys) #define ucal_add U_ICU_ENTRY_POINT_RENAME(ucal_add) #define ucal_clear U_ICU_ENTRY_POINT_RENAME(ucal_clear) #define ucal_clearField U_ICU_ENTRY_POINT_RENAME(ucal_clearField) @@ -532,6 +530,7 @@ #define ucal_getFieldDifference U_ICU_ENTRY_POINT_RENAME(ucal_getFieldDifference) #define ucal_getGregorianChange U_ICU_ENTRY_POINT_RENAME(ucal_getGregorianChange) #define ucal_getHostTimeZone U_ICU_ENTRY_POINT_RENAME(ucal_getHostTimeZone) +#define ucal_getIanaTimeZoneID U_ICU_ENTRY_POINT_RENAME(ucal_getIanaTimeZoneID) #define ucal_getKeywordValuesForLocale U_ICU_ENTRY_POINT_RENAME(ucal_getKeywordValuesForLocale) #define ucal_getLimit U_ICU_ENTRY_POINT_RENAME(ucal_getLimit) #define ucal_getLocaleByType U_ICU_ENTRY_POINT_RENAME(ucal_getLocaleByType) @@ -587,6 +586,7 @@ #define ucasemap_getLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_getLocale) #define ucasemap_getOptions U_ICU_ENTRY_POINT_RENAME(ucasemap_getOptions) #define ucasemap_internalUTF8ToTitle U_ICU_ENTRY_POINT_RENAME(ucasemap_internalUTF8ToTitle) +#define ucasemap_mapUTF8 U_ICU_ENTRY_POINT_RENAME(ucasemap_mapUTF8) #define ucasemap_open U_ICU_ENTRY_POINT_RENAME(ucasemap_open) #define ucasemap_setBreakIterator U_ICU_ENTRY_POINT_RENAME(ucasemap_setBreakIterator) #define ucasemap_setLocale U_ICU_ENTRY_POINT_RENAME(ucasemap_setLocale) @@ -955,9 +955,16 @@ #define ufieldpositer_close U_ICU_ENTRY_POINT_RENAME(ufieldpositer_close) #define ufieldpositer_next U_ICU_ENTRY_POINT_RENAME(ufieldpositer_next) #define ufieldpositer_open U_ICU_ENTRY_POINT_RENAME(ufieldpositer_open) +#define ufile_close_translit U_ICU_ENTRY_POINT_RENAME(ufile_close_translit) +#define ufile_fill_uchar_buffer U_ICU_ENTRY_POINT_RENAME(ufile_fill_uchar_buffer) +#define ufile_flush_io U_ICU_ENTRY_POINT_RENAME(ufile_flush_io) +#define ufile_flush_translit U_ICU_ENTRY_POINT_RENAME(ufile_flush_translit) #define ufile_getch U_ICU_ENTRY_POINT_RENAME(ufile_getch) #define ufile_getch32 U_ICU_ENTRY_POINT_RENAME(ufile_getch32) +#define ufmt_64tou U_ICU_ENTRY_POINT_RENAME(ufmt_64tou) #define ufmt_close U_ICU_ENTRY_POINT_RENAME(ufmt_close) +#define ufmt_defaultCPToUnicode U_ICU_ENTRY_POINT_RENAME(ufmt_defaultCPToUnicode) +#define ufmt_digitvalue U_ICU_ENTRY_POINT_RENAME(ufmt_digitvalue) #define ufmt_getArrayItemByIndex U_ICU_ENTRY_POINT_RENAME(ufmt_getArrayItemByIndex) #define ufmt_getArrayLength U_ICU_ENTRY_POINT_RENAME(ufmt_getArrayLength) #define ufmt_getDate U_ICU_ENTRY_POINT_RENAME(ufmt_getDate) @@ -969,7 +976,11 @@ #define ufmt_getType U_ICU_ENTRY_POINT_RENAME(ufmt_getType) #define ufmt_getUChars U_ICU_ENTRY_POINT_RENAME(ufmt_getUChars) #define ufmt_isNumeric U_ICU_ENTRY_POINT_RENAME(ufmt_isNumeric) +#define ufmt_isdigit U_ICU_ENTRY_POINT_RENAME(ufmt_isdigit) #define ufmt_open U_ICU_ENTRY_POINT_RENAME(ufmt_open) +#define ufmt_ptou U_ICU_ENTRY_POINT_RENAME(ufmt_ptou) +#define ufmt_uto64 U_ICU_ENTRY_POINT_RENAME(ufmt_uto64) +#define ufmt_utop U_ICU_ENTRY_POINT_RENAME(ufmt_utop) #define ufmtval_getString U_ICU_ENTRY_POINT_RENAME(ufmtval_getString) #define ufmtval_nextPosition U_ICU_ENTRY_POINT_RENAME(ufmtval_nextPosition) #define ugender_getInstance U_ICU_ENTRY_POINT_RENAME(ugender_getInstance) @@ -1133,6 +1144,39 @@ #define uloc_toLegacyType U_ICU_ENTRY_POINT_RENAME(uloc_toLegacyType) #define uloc_toUnicodeLocaleKey U_ICU_ENTRY_POINT_RENAME(uloc_toUnicodeLocaleKey) #define uloc_toUnicodeLocaleType U_ICU_ENTRY_POINT_RENAME(uloc_toUnicodeLocaleType) +#define ulocale_close U_ICU_ENTRY_POINT_RENAME(ulocale_close) +#define ulocale_getBaseName U_ICU_ENTRY_POINT_RENAME(ulocale_getBaseName) +#define ulocale_getKeywordValue U_ICU_ENTRY_POINT_RENAME(ulocale_getKeywordValue) +#define ulocale_getKeywords U_ICU_ENTRY_POINT_RENAME(ulocale_getKeywords) +#define ulocale_getLanguage U_ICU_ENTRY_POINT_RENAME(ulocale_getLanguage) +#define ulocale_getLocaleID U_ICU_ENTRY_POINT_RENAME(ulocale_getLocaleID) +#define ulocale_getRegion U_ICU_ENTRY_POINT_RENAME(ulocale_getRegion) +#define ulocale_getScript U_ICU_ENTRY_POINT_RENAME(ulocale_getScript) +#define ulocale_getUnicodeKeywordValue U_ICU_ENTRY_POINT_RENAME(ulocale_getUnicodeKeywordValue) +#define ulocale_getUnicodeKeywords U_ICU_ENTRY_POINT_RENAME(ulocale_getUnicodeKeywords) +#define ulocale_getVariant U_ICU_ENTRY_POINT_RENAME(ulocale_getVariant) +#define ulocale_isBogus U_ICU_ENTRY_POINT_RENAME(ulocale_isBogus) +#define ulocale_openForLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocale_openForLanguageTag) +#define ulocale_openForLocaleID U_ICU_ENTRY_POINT_RENAME(ulocale_openForLocaleID) +#define ulocbld_addUnicodeLocaleAttribute U_ICU_ENTRY_POINT_RENAME(ulocbld_addUnicodeLocaleAttribute) +#define ulocbld_adoptULocale U_ICU_ENTRY_POINT_RENAME(ulocbld_adoptULocale) +#define ulocbld_buildLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocbld_buildLanguageTag) +#define ulocbld_buildLocaleID U_ICU_ENTRY_POINT_RENAME(ulocbld_buildLocaleID) +#define ulocbld_buildULocale U_ICU_ENTRY_POINT_RENAME(ulocbld_buildULocale) +#define ulocbld_clear U_ICU_ENTRY_POINT_RENAME(ulocbld_clear) +#define ulocbld_clearExtensions U_ICU_ENTRY_POINT_RENAME(ulocbld_clearExtensions) +#define ulocbld_close U_ICU_ENTRY_POINT_RENAME(ulocbld_close) +#define ulocbld_copyErrorTo U_ICU_ENTRY_POINT_RENAME(ulocbld_copyErrorTo) +#define ulocbld_open U_ICU_ENTRY_POINT_RENAME(ulocbld_open) +#define ulocbld_removeUnicodeLocaleAttribute U_ICU_ENTRY_POINT_RENAME(ulocbld_removeUnicodeLocaleAttribute) +#define ulocbld_setExtension U_ICU_ENTRY_POINT_RENAME(ulocbld_setExtension) +#define ulocbld_setLanguage U_ICU_ENTRY_POINT_RENAME(ulocbld_setLanguage) +#define ulocbld_setLanguageTag U_ICU_ENTRY_POINT_RENAME(ulocbld_setLanguageTag) +#define ulocbld_setLocale U_ICU_ENTRY_POINT_RENAME(ulocbld_setLocale) +#define ulocbld_setRegion U_ICU_ENTRY_POINT_RENAME(ulocbld_setRegion) +#define ulocbld_setScript U_ICU_ENTRY_POINT_RENAME(ulocbld_setScript) +#define ulocbld_setUnicodeLocaleKeyword U_ICU_ENTRY_POINT_RENAME(ulocbld_setUnicodeLocaleKeyword) +#define ulocbld_setVariant U_ICU_ENTRY_POINT_RENAME(ulocbld_setVariant) #define ulocdata_close U_ICU_ENTRY_POINT_RENAME(ulocdata_close) #define ulocdata_getCLDRVersion U_ICU_ENTRY_POINT_RENAME(ulocdata_getCLDRVersion) #define ulocdata_getDelimiter U_ICU_ENTRY_POINT_RENAME(ulocdata_getDelimiter) @@ -1213,6 +1257,7 @@ #define unorm2_getNFDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFDInstance) #define unorm2_getNFKCCasefoldInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCCasefoldInstance) #define unorm2_getNFKCInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCInstance) +#define unorm2_getNFKCSimpleCasefoldInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKCSimpleCasefoldInstance) #define unorm2_getNFKDInstance U_ICU_ENTRY_POINT_RENAME(unorm2_getNFKDInstance) #define unorm2_getRawDecomposition U_ICU_ENTRY_POINT_RENAME(unorm2_getRawDecomposition) #define unorm2_hasBoundaryAfter U_ICU_ENTRY_POINT_RENAME(unorm2_hasBoundaryAfter) @@ -1349,6 +1394,7 @@ #define uprv_convertToPosix U_ICU_ENTRY_POINT_RENAME(uprv_convertToPosix) #define uprv_copyAscii U_ICU_ENTRY_POINT_RENAME(uprv_copyAscii) #define uprv_copyEbcdic U_ICU_ENTRY_POINT_RENAME(uprv_copyEbcdic) +#define uprv_currencyLeads U_ICU_ENTRY_POINT_RENAME(uprv_currencyLeads) #define uprv_decContextClearStatus U_ICU_ENTRY_POINT_RENAME(uprv_decContextClearStatus) #define uprv_decContextDefault U_ICU_ENTRY_POINT_RENAME(uprv_decContextDefault) #define uprv_decContextGetRounding U_ICU_ENTRY_POINT_RENAME(uprv_decContextGetRounding) @@ -1367,6 +1413,7 @@ #define uprv_decNumberAbs U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAbs) #define uprv_decNumberAdd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAdd) #define uprv_decNumberAnd U_ICU_ENTRY_POINT_RENAME(uprv_decNumberAnd) +#define uprv_decNumberClass U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClass) #define uprv_decNumberClassToString U_ICU_ENTRY_POINT_RENAME(uprv_decNumberClassToString) #define uprv_decNumberCompare U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompare) #define uprv_decNumberCompareSignal U_ICU_ENTRY_POINT_RENAME(uprv_decNumberCompareSignal) @@ -1763,6 +1810,9 @@ #define usnumf_formatInt64 U_ICU_ENTRY_POINT_RENAME(usnumf_formatInt64) #define usnumf_openForLocale U_ICU_ENTRY_POINT_RENAME(usnumf_openForLocale) #define usnumf_openForLocaleAndGroupingStrategy U_ICU_ENTRY_POINT_RENAME(usnumf_openForLocaleAndGroupingStrategy) +#define uspoof_areBidiConfusable U_ICU_ENTRY_POINT_RENAME(uspoof_areBidiConfusable) +#define uspoof_areBidiConfusableUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_areBidiConfusableUTF8) +#define uspoof_areBidiConfusableUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_areBidiConfusableUnicodeString) #define uspoof_areConfusable U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusable) #define uspoof_areConfusableUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusableUTF8) #define uspoof_areConfusableUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_areConfusableUnicodeString) @@ -1778,6 +1828,9 @@ #define uspoof_getAllowedChars U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedChars) #define uspoof_getAllowedLocales U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedLocales) #define uspoof_getAllowedUnicodeSet U_ICU_ENTRY_POINT_RENAME(uspoof_getAllowedUnicodeSet) +#define uspoof_getBidiSkeleton U_ICU_ENTRY_POINT_RENAME(uspoof_getBidiSkeleton) +#define uspoof_getBidiSkeletonUTF8 U_ICU_ENTRY_POINT_RENAME(uspoof_getBidiSkeletonUTF8) +#define uspoof_getBidiSkeletonUnicodeString U_ICU_ENTRY_POINT_RENAME(uspoof_getBidiSkeletonUnicodeString) #define uspoof_getCheckResultChecks U_ICU_ENTRY_POINT_RENAME(uspoof_getCheckResultChecks) #define uspoof_getCheckResultNumerics U_ICU_ENTRY_POINT_RENAME(uspoof_getCheckResultNumerics) #define uspoof_getCheckResultRestrictionLevel U_ICU_ENTRY_POINT_RENAME(uspoof_getCheckResultRestrictionLevel) diff --git a/deps/icu-small/source/common/unicode/uvernum.h b/deps/icu-small/source/common/unicode/uvernum.h index fc784b2492f0f8..9fc98e738070de 100644 --- a/deps/icu-small/source/common/unicode/uvernum.h +++ b/deps/icu-small/source/common/unicode/uvernum.h @@ -53,13 +53,13 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.4 */ -#define U_ICU_VERSION_MAJOR_NUM 73 +#define U_ICU_VERSION_MAJOR_NUM 74 /** The current ICU minor version as an integer. * This value will change in the subsequent releases of ICU * @stable ICU 2.6 */ -#define U_ICU_VERSION_MINOR_NUM 2 +#define U_ICU_VERSION_MINOR_NUM 1 /** The current ICU patchlevel version as an integer. * This value will change in the subsequent releases of ICU @@ -79,7 +79,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.6 */ -#define U_ICU_VERSION_SUFFIX _73 +#define U_ICU_VERSION_SUFFIX _74 /** * \def U_DEF2_ICU_ENTRY_POINT_RENAME @@ -132,7 +132,7 @@ * This value will change in the subsequent releases of ICU * @stable ICU 2.4 */ -#define U_ICU_VERSION "73.2" +#define U_ICU_VERSION "74.1" /** * The current ICU library major version number as a string, for library name suffixes. @@ -145,13 +145,13 @@ * * @stable ICU 2.6 */ -#define U_ICU_VERSION_SHORT "73" +#define U_ICU_VERSION_SHORT "74" #ifndef U_HIDE_INTERNAL_API /** Data version in ICU4C. * @internal ICU 4.4 Internal Use Only **/ -#define U_ICU_DATA_VERSION "73.2" +#define U_ICU_DATA_VERSION "74.1" #endif /* U_HIDE_INTERNAL_API */ /*=========================================================================== diff --git a/deps/icu-small/source/common/uniquecharstr.h b/deps/icu-small/source/common/uniquecharstr.h index 10cc924f7f9eb2..e5d3b73418093d 100644 --- a/deps/icu-small/source/common/uniquecharstr.h +++ b/deps/icu-small/source/common/uniquecharstr.h @@ -10,6 +10,7 @@ #include "charstr.h" #include "uassert.h" #include "uhash.h" +#include "cmemory.h" U_NAMESPACE_BEGIN @@ -47,22 +48,20 @@ class UniqueCharStrings { } /** - * Adds a string and returns a unique number for it. - * The string's buffer contents must not change, nor move around in memory, + * Adds a NUL-terminated string and returns a unique number for it. + * The string must not change, nor move around in memory, * while this UniqueCharStrings is in use. - * The string contents must be NUL-terminated exactly at s.length(). * - * Best used with read-only-alias UnicodeString objects that point to - * stable storage, such as strings returned by resource bundle functions. + * Best used with string data in a stable storage, such as strings returned + * by resource bundle functions. */ - int32_t add(const UnicodeString &s, UErrorCode &errorCode) { - if (U_FAILURE(errorCode)) { return 0; } + int32_t add(const char16_t*p, UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { return -1; } if (isFrozen) { errorCode = U_NO_WRITE_PERMISSION; - return 0; + return -1; } // The string points into the resource bundle. - const char16_t *p = s.getBuffer(); int32_t oldIndex = uhash_geti(&map, p); if (oldIndex != 0) { // found duplicate return oldIndex; @@ -71,11 +70,33 @@ class UniqueCharStrings { // The strings object is also terminated with one implicit NUL. strings->append(0, errorCode); int32_t newIndex = strings->length(); - strings->appendInvariantChars(s, errorCode); + strings->appendInvariantChars(p, u_strlen(p), errorCode); uhash_puti(&map, const_cast(p), newIndex, &errorCode); return newIndex; } + /** + * Adds a unicode string by value and returns a unique number for it. + */ + int32_t addByValue(UnicodeString s, UErrorCode &errorCode) { + if (U_FAILURE(errorCode)) { return -1; } + if (isFrozen) { + errorCode = U_NO_WRITE_PERMISSION; + return -1; + } + int32_t oldIndex = uhash_geti(&map, s.getTerminatedBuffer()); + if (oldIndex != 0) { // found duplicate + return oldIndex; + } + // We need to store the string content of the UnicodeString. + UnicodeString *key = keyStore.create(s); + if (key == nullptr) { + errorCode = U_MEMORY_ALLOCATION_ERROR; + return -1; + } + return add(key->getTerminatedBuffer(), errorCode); + } + void freeze() { isFrozen = true; } /** @@ -90,6 +111,7 @@ class UniqueCharStrings { private: UHashtable map; CharString *strings; + MemoryPool keyStore; bool isFrozen = false; }; diff --git a/deps/icu-small/source/common/uprops.cpp b/deps/icu-small/source/common/uprops.cpp index 28540186c6633e..314fa6fb868069 100644 --- a/deps/icu-small/source/common/uprops.cpp +++ b/deps/icu-small/source/common/uprops.cpp @@ -328,6 +328,53 @@ static UBool hasEmojiProperty(const BinaryProperty &/*prop*/, UChar32 c, UProper return EmojiProps::hasBinaryProperty(c, which); } +static UBool isIDSUnaryOperator(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) { + // New in Unicode 15.1 for just two characters. + return 0x2FFE<=c && c<=0x2FFF; +} + +/** Ranges (start/limit pairs) of ID_Compat_Math_Continue (only), from UCD PropList.txt. */ +static constexpr UChar32 ID_COMPAT_MATH_CONTINUE[] = { + 0x00B2, 0x00B3 + 1, + 0x00B9, 0x00B9 + 1, + 0x2070, 0x2070 + 1, + 0x2074, 0x207E + 1, + 0x2080, 0x208E + 1 +}; + +/** ID_Compat_Math_Start characters, from UCD PropList.txt. */ +static constexpr UChar32 ID_COMPAT_MATH_START[] = { + 0x2202, + 0x2207, + 0x221E, + 0x1D6C1, + 0x1D6DB, + 0x1D6FB, + 0x1D715, + 0x1D735, + 0x1D74F, + 0x1D76F, + 0x1D789, + 0x1D7A9, + 0x1D7C3 +}; + +static UBool isIDCompatMathStart(const BinaryProperty &/*prop*/, UChar32 c, UProperty /*which*/) { + if (c < ID_COMPAT_MATH_START[0]) { return false; } // fastpath for common scripts + for (UChar32 startChar : ID_COMPAT_MATH_START) { + if (c == startChar) { return true; } + } + return false; +} + +static UBool isIDCompatMathContinue(const BinaryProperty &prop, UChar32 c, UProperty /*which*/) { + for (int32_t i = 0; i < UPRV_LENGTHOF(ID_COMPAT_MATH_CONTINUE); i += 2) { + if (c < ID_COMPAT_MATH_CONTINUE[i]) { return false; } // below range start + if (c < ID_COMPAT_MATH_CONTINUE[i + 1]) { return true; } // below range limit + } + return isIDCompatMathStart(prop, c, UCHAR_ID_COMPAT_MATH_START); +} + static const BinaryProperty binProps[UCHAR_BINARY_LIMIT]={ /* * column and mask values for binary properties from u_getUnicodeProperties(). @@ -409,6 +456,9 @@ static const BinaryProperty binProps[UCHAR_BINARY_LIMIT]={ { UPROPS_SRC_EMOJI, 0, hasEmojiProperty }, // UCHAR_RGI_EMOJI_TAG_SEQUENCE { UPROPS_SRC_EMOJI, 0, hasEmojiProperty }, // UCHAR_RGI_EMOJI_ZWJ_SEQUENCE { UPROPS_SRC_EMOJI, 0, hasEmojiProperty }, // UCHAR_RGI_EMOJI + { UPROPS_SRC_IDSU, 0, isIDSUnaryOperator }, // UCHAR_IDS_UNARY_OPERATOR + { UPROPS_SRC_ID_COMPAT_MATH, 0, isIDCompatMathStart }, // UCHAR_ID_COMPAT_MATH_START + { UPROPS_SRC_ID_COMPAT_MATH, 0, isIDCompatMathContinue }, // UCHAR_ID_COMPAT_MATH_CONTINUE }; U_CAPI UBool U_EXPORT2 @@ -759,6 +809,19 @@ uprops_getSource(UProperty which) { U_CFUNC void U_EXPORT2 uprops_addPropertyStarts(UPropertySource src, const USetAdder *sa, UErrorCode *pErrorCode) { + if (U_FAILURE(*pErrorCode)) { return; } + if (src == UPROPS_SRC_ID_COMPAT_MATH) { + // range limits + for (UChar32 c : ID_COMPAT_MATH_CONTINUE) { + sa->add(sa->set, c); + } + // single characters + for (UChar32 c : ID_COMPAT_MATH_START) { + sa->add(sa->set, c); + sa->add(sa->set, c + 1); + } + return; + } if (!ulayout_ensureData(*pErrorCode)) { return; } const UCPTrie *trie; switch (src) { diff --git a/deps/icu-small/source/common/uprops.h b/deps/icu-small/source/common/uprops.h index 1e06d035192344..80347eab5777f8 100644 --- a/deps/icu-small/source/common/uprops.h +++ b/deps/icu-small/source/common/uprops.h @@ -379,6 +379,8 @@ enum UPropertySource { UPROPS_SRC_INSC, UPROPS_SRC_VO, UPROPS_SRC_EMOJI, + UPROPS_SRC_IDSU, + UPROPS_SRC_ID_COMPAT_MATH, /** One more than the highest UPropertySource (UPROPS_SRC_) constant. */ UPROPS_SRC_COUNT }; diff --git a/deps/icu-small/source/common/uresbund.cpp b/deps/icu-small/source/common/uresbund.cpp index d02bba8921e640..5aa1c5fa2f10cf 100644 --- a/deps/icu-small/source/common/uresbund.cpp +++ b/deps/icu-small/source/common/uresbund.cpp @@ -24,6 +24,7 @@ #include "unicode/ures.h" #include "unicode/ustring.h" #include "unicode/ucnv.h" +#include "bytesinkutil.h" #include "charstr.h" #include "uresimp.h" #include "ustr_imp.h" @@ -2351,7 +2352,66 @@ struct GetAllChildrenSink : public ResourceSink { aliasedValue.setData(aliasRB->getResData()); aliasedValue.setValidLocaleDataEntry(aliasRB->fValidLocaleDataEntry); aliasedValue.setResource(aliasRB->fRes, ResourceTracer(aliasRB)); - dest.put(key, aliasedValue, isRoot, errorCode); + + if (aliasedValue.getType() != URES_TABLE) { + dest.put(key, aliasedValue, isRoot, errorCode); + } else { + // if the resource we're aliasing over to is a table, the sink might iterate over its contents. + // If it does, it'll get only the things defined in the actual alias target, not the things + // the target inherits from its parent resources. So we walk the parent chain for the *alias target*, + // calling dest.put() for each of the parent tables we could be inheriting from. This means + // that dest.put() has to iterate over the children of multiple tables to get all of the inherited + // resource values, but it already has to do that to handle normal vertical inheritance. + UResType aliasedValueType = URES_TABLE; + CharString tablePath; + tablePath.append(aliasRB->fResPath, errorCode); + const char* parentKey = key; // dest.put() changes the key + dest.put(parentKey, aliasedValue, isRoot, errorCode); + UResourceDataEntry* entry = aliasRB->fData; + Resource res = aliasRB->fRes; + while (aliasedValueType == URES_TABLE && entry->fParent != nullptr) { + CharString localPath; + localPath.copyFrom(tablePath, errorCode); + char* localPathAsCharPtr = localPath.data(); + const char* childKey; + entry = entry->fParent; + res = entry->fData.rootRes; + Resource newRes = res_findResource(&entry->fData, res, &localPathAsCharPtr, &childKey); + if (newRes != RES_BOGUS) { + aliasedValue.setData(entry->fData); + // TODO: do I also need to call aliasedValue.setValueLocaleDataEntry() ? + aliasedValue.setResource(newRes, ResourceTracer(aliasRB)); // probably wrong to use aliasRB here + aliasedValueType = aliasedValue.getType(); + if (aliasedValueType == URES_ALIAS) { + // in a few rare cases, when we get to the root resource bundle, the resource in question + // won't be an actual table, but will instead be an alias to a table. That is, we have + // two aliases in the inheritance path. (For some locales, such as Zulu, we see this with + // children of the "fields" resource: "day-narrow" aliases to "day-short", which aliases + // to "day".) When this happens, we need to make sure we follow all the aliases. + ResourceDataValue& rdv2 = static_cast(aliasedValue); + aliasRB = getAliasTargetAsResourceBundle(rdv2.getData(), rdv2.getResource(), nullptr, -1, + rdv2.getValidLocaleDataEntry(), nullptr, 0, + stackTempBundle.getAlias(), &errorCode); + tablePath.clear(); + tablePath.append(aliasRB->fResPath, errorCode); + entry = aliasRB->fData; + res = aliasRB->fRes; + aliasedValue.setData(entry->fData); + // TODO: do I also need to call aliasedValue.setValueLocaleDataEntry() ? + aliasedValue.setResource(res, ResourceTracer(aliasRB)); // probably wrong to use aliasRB here + aliasedValueType = aliasedValue.getType(); + } + if (aliasedValueType == URES_TABLE) { + dest.put(parentKey, aliasedValue, isRoot, errorCode); + } else { + // once we've followed the alias, the resource we're looking at really should + // be a table + errorCode = U_INTERNAL_PROGRAM_ERROR; + return; + } + } + } + } } } else { dest.put(key, value, isRoot, errorCode); @@ -2657,13 +2717,16 @@ ures_openWithType(UResourceBundle *r, const char* path, const char* localeID, UResourceDataEntry *entry; if(openType != URES_OPEN_DIRECT) { /* first "canonicalize" the locale ID */ - char canonLocaleID[ULOC_FULLNAME_CAPACITY]; - uloc_getBaseName(localeID, canonLocaleID, UPRV_LENGTHOF(canonLocaleID), status); - if(U_FAILURE(*status) || *status == U_STRING_NOT_TERMINATED_WARNING) { + CharString canonLocaleID; + { + CharStringByteSink sink(&canonLocaleID); + ulocimp_getBaseName(localeID, sink, status); + } + if(U_FAILURE(*status)) { *status = U_ILLEGAL_ARGUMENT_ERROR; return nullptr; } - entry = entryOpen(path, canonLocaleID, openType, status); + entry = entryOpen(path, canonLocaleID.data(), openType, status); } else { entry = entryOpenDirect(path, localeID, status); } @@ -2974,15 +3037,39 @@ static UBool isLocaleInList(UEnumeration *locEnum, const char *locToSearch, UErr return false; } +static void getParentForFunctionalEquivalent(const char* localeID, + UResourceBundle* res, + UResourceBundle* bund1, + char* parent, + int32_t parentCapacity) { + // Get parent. + // First check for a parent from %%Parent resource (Note that in resource trees + // such as collation, data may have different parents than in parentLocales). + UErrorCode subStatus = U_ZERO_ERROR; + parent[0] = '\0'; + if (res != NULL) { + ures_getByKey(res, "%%Parent", bund1, &subStatus); + if (U_SUCCESS(subStatus)) { + int32_t parentLen = parentCapacity; + ures_getUTF8String(bund1, parent, &parentLen, true, &subStatus); + } + } + + // If none there, use normal truncation parent + if (U_FAILURE(subStatus) || parent[0] == 0) { + subStatus = U_ZERO_ERROR; + uloc_getParent(localeID, parent, parentCapacity, &subStatus); + } +} + U_CAPI int32_t U_EXPORT2 ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, const char *path, const char *resName, const char *keyword, const char *locid, UBool *isAvailable, UBool omitDefault, UErrorCode *status) { - char kwVal[1024] = ""; /* value of keyword 'keyword' */ char defVal[1024] = ""; /* default value for given locale */ char defLoc[1024] = ""; /* default value for given locale */ - char base[1024] = ""; /* base locale */ + CharString base; /* base locale */ char found[1024] = ""; char parent[1024] = ""; char full[1024] = ""; @@ -2991,23 +3078,29 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, UErrorCode subStatus = U_ZERO_ERROR; int32_t length = 0; if(U_FAILURE(*status)) return 0; - uloc_getKeywordValue(locid, keyword, kwVal, 1024-1,&subStatus); - if(!uprv_strcmp(kwVal, DEFAULT_TAG)) { - kwVal[0]=0; + CharString kwVal; + { + CharStringByteSink sink(&kwVal); + ulocimp_getKeywordValue(locid, keyword, sink, &subStatus); + } + if(kwVal == DEFAULT_TAG) { + kwVal.clear(); + } + { + CharStringByteSink sink(&base); + ulocimp_getBaseName(locid, sink, &subStatus); } - uloc_getBaseName(locid, base, 1024-1,&subStatus); #if defined(URES_TREE_DEBUG) fprintf(stderr, "getFunctionalEquivalent: \"%s\" [%s=%s] in %s - %s\n", - locid, keyword, kwVal, base, u_errorName(subStatus)); + locid, keyword, kwVal.data(), base.data(), u_errorName(subStatus)); #endif ures_initStackObject(&bund1); ures_initStackObject(&bund2); - - - uprv_strcpy(parent, base); - uprv_strcpy(found, base); - if(isAvailable) { + base.extract(parent, UPRV_LENGTHOF(parent), subStatus); + base.extract(found, UPRV_LENGTHOF(found), subStatus); + + if(isAvailable) { UEnumeration *locEnum = ures_openAvailableLocales(path, &subStatus); *isAvailable = true; if (U_SUCCESS(subStatus)) { @@ -3054,11 +3147,11 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, path?path:"ICUDATA", parent, keyword, defVal, u_errorName(subStatus)); #endif uprv_strcpy(defLoc, parent); - if(kwVal[0]==0) { - uprv_strcpy(kwVal, defVal); + if(kwVal.isEmpty()) { + kwVal.append(defVal, defLen, subStatus); #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> kwVal = %s\n", - path?path:"ICUDATA", parent, keyword, kwVal); + path?path:"ICUDATA", parent, keyword, kwVal.data()); #endif } } @@ -3071,16 +3164,19 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, uprv_strcpy(found, ures_getLocaleByType(res, ULOC_VALID_LOCALE, &subStatus)); } - uloc_getParent(found,parent,sizeof(parent),&subStatus); + if (uprv_strcmp(found, parent) != 0) { + uprv_strcpy(parent, found); + } else { + getParentForFunctionalEquivalent(found,res,&bund1,parent,sizeof(parent)); + } ures_close(res); } while(!defVal[0] && *found && uprv_strcmp(found, "root") != 0 && U_SUCCESS(*status)); /* Now, see if we can find the kwVal collator.. start the search over.. */ - uprv_strcpy(parent, base); - uprv_strcpy(found, base); - + base.extract(parent, UPRV_LENGTHOF(parent), subStatus); + base.extract(found, UPRV_LENGTHOF(found), subStatus); + do { - subStatus = U_ZERO_ERROR; res = ures_open(path, parent, &subStatus); if((subStatus == U_USING_FALLBACK_WARNING) && isAvailable) { *isAvailable = false; @@ -3089,7 +3185,7 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> %s (looking for %s)\n", - path?path:"ICUDATA", parent, u_errorName(subStatus), kwVal); + path?path:"ICUDATA", parent, u_errorName(subStatus), kwVal.data()); #endif if(U_FAILURE(subStatus)) { *status = subStatus; @@ -3099,14 +3195,14 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, /**/ fprintf(stderr,"@%d [%s] %s\n", __LINE__, resName, u_errorName(subStatus)); #endif if(subStatus == U_ZERO_ERROR) { - ures_getByKey(&bund1, kwVal, &bund2, &subStatus); + ures_getByKey(&bund1, kwVal.data(), &bund2, &subStatus); #if defined(URES_TREE_DEBUG) -/**/ fprintf(stderr,"@%d [%s] %s\n", __LINE__, kwVal, u_errorName(subStatus)); +/**/ fprintf(stderr,"@%d [%s] %s\n", __LINE__, kwVal.data(), u_errorName(subStatus)); #endif if(subStatus == U_ZERO_ERROR) { #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> full0 %s=%s, %s\n", - path?path:"ICUDATA", parent, keyword, kwVal, u_errorName(subStatus)); + path?path:"ICUDATA", parent, keyword, kwVal.data(), u_errorName(subStatus)); #endif uprv_strcpy(full, parent); if(*full == 0) { @@ -3139,29 +3235,52 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, } else { #if defined(URES_TREE_DEBUG) fprintf(stderr, "err=%s in %s looking for %s\n", - u_errorName(subStatus), parent, kwVal); + u_errorName(subStatus), parent, kwVal.data()); #endif } } } - subStatus = U_ZERO_ERROR; - - uprv_strcpy(found, parent); - uloc_getParent(found,parent,1023,&subStatus); + UBool haveFound = false; + // At least for collations which may be aliased, we need to use the VALID locale + // as the parent instead of just truncating, as long as the VALID locale is not + // root and has a different language than the parent. Use of the VALID locale + // here is similar to the procedure used at the end of the previous do-while loop + // for all resource types. + if (res != NULL && uprv_strcmp(resName, "collations") == 0) { + subStatus = U_ZERO_ERROR; + const char *validLoc = ures_getLocaleByType(res, ULOC_VALID_LOCALE, &subStatus); + if (U_SUCCESS(subStatus) && validLoc != NULL && validLoc[0] != 0 && uprv_strcmp(validLoc, "root") != 0) { + char validLang[ULOC_LANG_CAPACITY]; + char parentLang[ULOC_LANG_CAPACITY]; + uloc_getLanguage(validLoc, validLang, ULOC_LANG_CAPACITY, &subStatus); + uloc_getLanguage(parent, parentLang, ULOC_LANG_CAPACITY, &subStatus); + if (U_SUCCESS(subStatus) && uprv_strcmp(validLang, parentLang) != 0) { + // validLoc is not root and has a different language than parent, use it instead + uprv_strcpy(found, validLoc); + haveFound = true; + } + } + subStatus = U_ZERO_ERROR; + } + if (!haveFound) { + uprv_strcpy(found, parent); + } + + getParentForFunctionalEquivalent(found,res,&bund1,parent,1023); ures_close(res); + subStatus = U_ZERO_ERROR; } while(!full[0] && *found && U_SUCCESS(*status)); - - if((full[0]==0) && uprv_strcmp(kwVal, defVal)) { + + if((full[0]==0) && kwVal != defVal) { #if defined(URES_TREE_DEBUG) - fprintf(stderr, "Failed to locate kw %s - try default %s\n", kwVal, defVal); + fprintf(stderr, "Failed to locate kw %s - try default %s\n", kwVal.data(), defVal); #endif - uprv_strcpy(kwVal, defVal); - uprv_strcpy(parent, base); - uprv_strcpy(found, base); - + kwVal.clear().append(defVal, subStatus); + base.extract(parent, UPRV_LENGTHOF(parent), subStatus); + base.extract(found, UPRV_LENGTHOF(found), subStatus); + do { /* search for 'default' named item */ - subStatus = U_ZERO_ERROR; res = ures_open(path, parent, &subStatus); if((subStatus == U_USING_FALLBACK_WARNING) && isAvailable) { *isAvailable = false; @@ -3170,18 +3289,18 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> %s (looking for default %s)\n", - path?path:"ICUDATA", parent, u_errorName(subStatus), kwVal); + path?path:"ICUDATA", parent, u_errorName(subStatus), kwVal.data()); #endif if(U_FAILURE(subStatus)) { *status = subStatus; } else if(subStatus == U_ZERO_ERROR) { ures_getByKey(res,resName,&bund1, &subStatus); if(subStatus == U_ZERO_ERROR) { - ures_getByKey(&bund1, kwVal, &bund2, &subStatus); + ures_getByKey(&bund1, kwVal.data(), &bund2, &subStatus); if(subStatus == U_ZERO_ERROR) { #if defined(URES_TREE_DEBUG) fprintf(stderr, "%s;%s -> full1 %s=%s, %s\n", path?path:"ICUDATA", - parent, keyword, kwVal, u_errorName(subStatus)); + parent, keyword, kwVal.data(), u_errorName(subStatus)); #endif uprv_strcpy(full, parent); if(*full == 0) { @@ -3215,18 +3334,18 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, } } } - subStatus = U_ZERO_ERROR; uprv_strcpy(found, parent); - uloc_getParent(found,parent,1023,&subStatus); + getParentForFunctionalEquivalent(found,res,&bund1,parent,1023); ures_close(res); + subStatus = U_ZERO_ERROR; } while(!full[0] && *found && U_SUCCESS(*status)); } if(U_SUCCESS(*status)) { if(!full[0]) { #if defined(URES_TREE_DEBUG) - fprintf(stderr, "Still could not load keyword %s=%s\n", keyword, kwVal); + fprintf(stderr, "Still could not load keyword %s=%s\n", keyword, kwVal.data()); #endif *status = U_MISSING_RESOURCE_ERROR; } else if(omitDefault) { @@ -3235,21 +3354,21 @@ ures_getFunctionalEquivalent(char *result, int32_t resultCapacity, #endif if(uprv_strlen(defLoc) <= uprv_strlen(full)) { /* found the keyword in a *child* of where the default tag was present. */ - if(!uprv_strcmp(kwVal, defVal)) { /* if the requested kw is default, */ + if(kwVal == defVal) { /* if the requested kw is default, */ /* and the default is in or in an ancestor of the current locale */ #if defined(URES_TREE_DEBUG) - fprintf(stderr, "Removing unneeded var %s=%s\n", keyword, kwVal); + fprintf(stderr, "Removing unneeded var %s=%s\n", keyword, kwVal.data()); #endif - kwVal[0]=0; + kwVal.clear(); } } } uprv_strcpy(found, full); - if(kwVal[0]) { + if(!kwVal.isEmpty()) { uprv_strcat(found, "@"); uprv_strcat(found, keyword); uprv_strcat(found, "="); - uprv_strcat(found, kwVal); + uprv_strcat(found, kwVal.data()); } else if(!omitDefault) { uprv_strcat(found, "@"); uprv_strcat(found, keyword); diff --git a/deps/icu-small/source/common/ustrcase.cpp b/deps/icu-small/source/common/ustrcase.cpp index 537b5ba8578767..e4aec8a1c73d0d 100644 --- a/deps/icu-small/source/common/ustrcase.cpp +++ b/deps/icu-small/source/common/ustrcase.cpp @@ -1130,14 +1130,18 @@ int32_t toUpper(uint32_t options, // Adding one only to the final vowel in a longer sequence // (which does not occur in normal writing) would require lookahead. // Set the same flag as for preserving an existing dialytika. - if ((data & HAS_VOWEL) != 0 && (state & AFTER_VOWEL_WITH_ACCENT) != 0 && - (upper == 0x399 || upper == 0x3A5)) { - data |= HAS_DIALYTIKA; + if ((data & HAS_VOWEL) != 0 && + (state & (AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT | AFTER_VOWEL_WITH_COMBINING_ACCENT)) != + 0 && + (upper == 0x399 || upper == 0x3A5)) { + data |= (state & AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT) ? HAS_DIALYTIKA + : HAS_COMBINING_DIALYTIKA; } int32_t numYpogegrammeni = 0; // Map each one to a trailing, spacing, capital iota. if ((data & HAS_YPOGEGRAMMENI) != 0) { numYpogegrammeni = 1; } + const UBool hasPrecomposedAccent = (data & HAS_ACCENT) != 0; // Skip combining diacritics after this Greek letter. while (nextIndex < srcLength) { uint32_t diacriticData = getDiacriticData(src[nextIndex]); @@ -1152,7 +1156,8 @@ int32_t toUpper(uint32_t options, } } if ((data & HAS_VOWEL_AND_ACCENT_AND_DIALYTIKA) == HAS_VOWEL_AND_ACCENT) { - nextState |= AFTER_VOWEL_WITH_ACCENT; + nextState |= hasPrecomposedAccent ? AFTER_VOWEL_WITH_PRECOMPOSED_ACCENT + : AFTER_VOWEL_WITH_COMBINING_ACCENT; } // Map according to Greek rules. UBool addTonos = false; @@ -1163,7 +1168,7 @@ int32_t toUpper(uint32_t options, !isFollowedByCasedLetter(src, nextIndex, srcLength)) { // Keep disjunctive "or" with (only) a tonos. // We use the same "word boundary" conditions as for the Final_Sigma test. - if (i == nextIndex) { + if (hasPrecomposedAccent) { upper = 0x389; // Preserve the precomposed form. } else { addTonos = true; diff --git a/deps/icu-small/source/common/uts46.cpp b/deps/icu-small/source/common/uts46.cpp index fce2af41306d63..28f15f7175dde9 100644 --- a/deps/icu-small/source/common/uts46.cpp +++ b/deps/icu-small/source/common/uts46.cpp @@ -669,14 +669,6 @@ UTS46::mapDevChars(UnicodeString &dest, int32_t labelStart, int32_t mappingStart return length; } -// Some non-ASCII characters are equivalent to sequences with -// non-LDH ASCII characters. To find them: -// grep disallowed_STD3_valid IdnaMappingTable.txt (or uts46.txt) -static inline UBool -isNonASCIIDisallowedSTD3Valid(UChar32 c) { - return c==0x2260 || c==0x226E || c==0x226F; -} - // Replace the label in dest with the label string, if the label was modified. // If &label==&dest then the label was modified in-place and labelLength // is the new label length, different from label.length(). @@ -820,10 +812,7 @@ UTS46::processLabel(UnicodeString &dest, } } else { oredChars|=c; - if(disallowNonLDHDot && isNonASCIIDisallowedSTD3Valid(c)) { - info.labelErrors|=UIDNA_ERROR_DISALLOWED; - *s=0xfffd; - } else if(c==0xfffd) { + if(c==0xfffd) { info.labelErrors|=UIDNA_ERROR_DISALLOWED; } } diff --git a/deps/icu-small/source/data/in/icudt73l.dat.bz2 b/deps/icu-small/source/data/in/icudt74l.dat.bz2 similarity index 56% rename from deps/icu-small/source/data/in/icudt73l.dat.bz2 rename to deps/icu-small/source/data/in/icudt74l.dat.bz2 index 8e4a7cc57c9d12..f52401bb1a5d7e 100644 Binary files a/deps/icu-small/source/data/in/icudt73l.dat.bz2 and b/deps/icu-small/source/data/in/icudt74l.dat.bz2 differ diff --git a/deps/icu-small/source/i18n/calendar.cpp b/deps/icu-small/source/i18n/calendar.cpp index 72d5d10ed5f98d..4b6edc87c9147e 100644 --- a/deps/icu-small/source/i18n/calendar.cpp +++ b/deps/icu-small/source/i18n/calendar.cpp @@ -63,6 +63,8 @@ #include "sharedcalendar.h" #include "unifiedcache.h" #include "ulocimp.h" +#include "bytesinkutil.h" +#include "charstr.h" #if !UCONFIG_NO_SERVICE static icu::ICULocaleService* gService = nullptr; @@ -247,46 +249,32 @@ static UBool isStandardSupportedKeyword(const char *keyword, UErrorCode& status) return (calType != CALTYPE_UNKNOWN); } -// only used with service registration. -static void getCalendarKeyword(const UnicodeString &id, char *targetBuffer, int32_t targetBufferSize) { - UnicodeString calendarKeyword = UNICODE_STRING_SIMPLE("calendar="); - int32_t calKeyLen = calendarKeyword.length(); - int32_t keyLen = 0; - - int32_t keywordIdx = id.indexOf((char16_t)0x003D); /* '=' */ - if (id[0] == 0x40/*'@'*/ - && id.compareBetween(1, keywordIdx+1, calendarKeyword, 0, calKeyLen) == 0) - { - keyLen = id.extract(keywordIdx+1, id.length(), targetBuffer, targetBufferSize, US_INV); - } - targetBuffer[keyLen] = 0; -} #endif static ECalType getCalendarTypeForLocale(const char *locid) { UErrorCode status = U_ZERO_ERROR; ECalType calType = CALTYPE_UNKNOWN; - //TODO: ULOC_FULL_NAME is out of date and too small.. - char canonicalName[256]; - // Canonicalize, so that an old-style variant will be transformed to keywords. // e.g ja_JP_TRADITIONAL -> ja_JP@calendar=japanese // NOTE: Since ICU-20187, ja_JP_TRADITIONAL no longer canonicalizes, and // the Gregorian calendar is returned instead. - int32_t canonicalLen = uloc_canonicalize(locid, canonicalName, sizeof(canonicalName) - 1, &status); + CharString canonicalName; + { + CharStringByteSink sink(&canonicalName); + ulocimp_canonicalize(locid, sink, &status); + } if (U_FAILURE(status)) { return CALTYPE_GREGORIAN; } - canonicalName[canonicalLen] = 0; // terminate - - char calTypeBuf[32]; - int32_t calTypeBufLen; - calTypeBufLen = uloc_getKeywordValue(canonicalName, "calendar", calTypeBuf, sizeof(calTypeBuf) - 1, &status); + CharString calTypeBuf; + { + CharStringByteSink sink(&calTypeBuf); + ulocimp_getKeywordValue(canonicalName.data(), "calendar", sink, &status); + } if (U_SUCCESS(status)) { - calTypeBuf[calTypeBufLen] = 0; - calType = getCalendarType(calTypeBuf); + calType = getCalendarType(calTypeBuf.data()); if (calType != CALTYPE_UNKNOWN) { return calType; } @@ -296,7 +284,7 @@ static ECalType getCalendarTypeForLocale(const char *locid) { // when calendar keyword is not available or not supported, read supplementalData // to get the default calendar type for the locale's region char region[ULOC_COUNTRY_CAPACITY]; - (void)ulocimp_getRegionForSupplementalData(canonicalName, true, region, sizeof(region), &status); + (void)ulocimp_getRegionForSupplementalData(canonicalName.data(), true, region, sizeof(region), &status); if (U_FAILURE(status)) { return CALTYPE_GREGORIAN; } @@ -310,16 +298,13 @@ static ECalType getCalendarTypeForLocale(const char *locid) { order = ures_getByKey(rb, "001", nullptr, &status); } - calTypeBuf[0] = 0; + calTypeBuf.clear(); if (U_SUCCESS(status) && order != nullptr) { // the first calendar type is the default for the region int32_t len = 0; const char16_t *uCalType = ures_getStringByIndex(order, 0, &len, &status); - if (len < (int32_t)sizeof(calTypeBuf)) { - u_UCharsToChars(uCalType, calTypeBuf, len); - *(calTypeBuf + len) = 0; // terminate; - calType = getCalendarType(calTypeBuf); - } + calTypeBuf.appendInvariantChars(uCalType, len, status); + calType = getCalendarType(calTypeBuf.data()); } ures_close(order); @@ -458,10 +443,7 @@ class BasicCalendarFactory : public LocaleKeyFactory { lkey->canonicalLocale(canLoc); char keyword[ULOC_FULLNAME_CAPACITY]; - UnicodeString str; - - key.currentID(str); - getCalendarKeyword(str, keyword, (int32_t) sizeof(keyword)); + curLoc.getKeywordValue("calendar", keyword, (int32_t) sizeof(keyword), status); #ifdef U_DEBUG_CALSVC fprintf(stderr, "BasicCalendarFactory::create() - cur %s, can %s\n", (const char*)curLoc.getName(), (const char*)canLoc.getName()); @@ -654,7 +636,7 @@ static const int32_t kCalendarLimits[UCAL_FIELD_COUNT][4] = { { 0, 0, 59, 59 }, // MINUTE { 0, 0, 59, 59 }, // SECOND { 0, 0, 999, 999 }, // MILLISECOND - {-16*kOneHour, -16*kOneHour, 12*kOneHour, 30*kOneHour }, // ZONE_OFFSET + {-24*kOneHour, -16*kOneHour, 12*kOneHour, 30*kOneHour }, // ZONE_OFFSET { -1*kOneHour, -1*kOneHour, 2*kOneHour, 2*kOneHour }, // DST_OFFSET {/*N/A*/-1, /*N/A*/-1, /*N/A*/-1, /*N/A*/-1}, // YEAR_WOY { 1, 1, 7, 7 }, // DOW_LOCAL @@ -1186,6 +1168,9 @@ Calendar::setTimeInMillis( double millis, UErrorCode& status ) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } + } else if (uprv_isNaN(millis)) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; } fTime = millis; @@ -1206,6 +1191,13 @@ Calendar::setTimeInMillis( double millis, UErrorCode& status ) { int32_t Calendar::get(UCalendarDateFields field, UErrorCode& status) const { + if (U_FAILURE(status)) { + return 0; + } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } // field values are only computed when actually requested; for more on when computation // of various things happens, see the "data flow in Calendar" description at the top // of this file @@ -1218,6 +1210,9 @@ Calendar::get(UCalendarDateFields field, UErrorCode& status) const void Calendar::set(UCalendarDateFields field, int32_t value) { + if (field < 0 || field >= UCAL_FIELD_COUNT) { + return; + } if (fAreFieldsVirtuallySet) { UErrorCode ec = U_ZERO_ERROR; computeFields(ec); @@ -1299,13 +1294,25 @@ Calendar::clear() void Calendar::clear(UCalendarDateFields field) { + if (field < 0 || field >= UCAL_FIELD_COUNT) { + return; + } if (fAreFieldsVirtuallySet) { UErrorCode ec = U_ZERO_ERROR; computeFields(ec); } fFields[field] = 0; fStamp[field] = kUnset; - fIsSet[field] = false; // Remove later + if (field == UCAL_MONTH) { + fFields[UCAL_ORDINAL_MONTH] = 0; + fStamp[UCAL_ORDINAL_MONTH] = kUnset; + fIsSet[UCAL_ORDINAL_MONTH] = false; // Remove later + } + if (field == UCAL_ORDINAL_MONTH) { + fFields[UCAL_MONTH] = 0; + fStamp[UCAL_MONTH] = kUnset; + fIsSet[UCAL_MONTH] = false; // Remove later + } fIsTimeSet = fAreFieldsSet = fAreAllFieldsSet = fAreFieldsVirtuallySet = false; } @@ -1314,6 +1321,9 @@ Calendar::clear(UCalendarDateFields field) UBool Calendar::isSet(UCalendarDateFields field) const { + if (field < 0 || field >= UCAL_FIELD_COUNT) { + return false; + } return fAreFieldsVirtuallySet || (fStamp[field] != kUnset); } @@ -1392,6 +1402,10 @@ void Calendar::pinField(UCalendarDateFields field, UErrorCode& status) { if (U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } int32_t max = getActualMaximum(field, status); int32_t min = getActualMinimum(field, status); @@ -1727,6 +1741,10 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu if(U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } switch (field) { case UCAL_DAY_OF_MONTH: case UCAL_AM_PM: @@ -1835,7 +1853,6 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu } set(field, newYear); pinField(UCAL_MONTH,status); - pinField(UCAL_ORDINAL_MONTH,status); pinField(UCAL_DAY_OF_MONTH,status); return; } @@ -1844,7 +1861,6 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu // Rolling the year can involve pinning the DAY_OF_MONTH. set(field, internalGet(field) + amount); pinField(UCAL_MONTH,status); - pinField(UCAL_ORDINAL_MONTH,status); pinField(UCAL_DAY_OF_MONTH,status); return; @@ -1911,6 +1927,10 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu // Now roll between start and (limit - 1). int32_t gap = limit - start; + if (gap == 0) { + status = U_INTERNAL_PROGRAM_ERROR; + return; + } int32_t day_of_month = (internalGet(UCAL_DAY_OF_MONTH) + amount*7 - start) % gap; if (day_of_month < 0) day_of_month += gap; @@ -1969,6 +1989,10 @@ void Calendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode& statu // Now roll between start and (limit - 1). int32_t gap = limit - start; + if (gap == 0) { + status = U_INTERNAL_PROGRAM_ERROR; + return; + } int32_t day_of_year = (internalGet(UCAL_DAY_OF_YEAR) + amount*7 - start) % gap; if (day_of_year < 0) day_of_year += gap; @@ -2071,6 +2095,10 @@ void Calendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& status if (U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } if (amount == 0) { return; // Do nothing! } @@ -2257,7 +2285,13 @@ int32_t Calendar::fieldDifference(UDate when, EDateFields field, UErrorCode& sta } int32_t Calendar::fieldDifference(UDate targetMs, UCalendarDateFields field, UErrorCode& ec) { - if (U_FAILURE(ec)) return 0; + if (U_FAILURE(ec)) { + return 0; + } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + ec = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } int32_t min = 0; double startMs = getTimeInMillis(ec); // Always add from the start millis. This accommodates @@ -2362,7 +2396,9 @@ void Calendar::adoptTimeZone(TimeZone* zone) { // Do nothing if passed-in zone is nullptr - if (zone == nullptr) return; + if (zone == nullptr) { + return; + } // fZone should always be non-null delete fZone; @@ -2715,6 +2751,10 @@ Calendar::getActualMinimum(UCalendarDateFields field, UErrorCode& status) const if (U_FAILURE(status)) { return 0; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } int32_t fieldValue = getGreatestMinimum(field); int32_t endValue = getMinimum(field); @@ -2790,7 +2830,9 @@ const char* Calendar::getTemporalMonthCode(UErrorCode& status) const { int32_t month = get(UCAL_MONTH, status); - if (U_FAILURE(status)) return nullptr; + if (U_FAILURE(status)) { + return nullptr; + } U_ASSERT(month < 12); U_ASSERT(internalGet(UCAL_IS_LEAP_MONTH) == 0); return gTemporalMonthCodes[month]; @@ -2799,7 +2841,9 @@ Calendar::getTemporalMonthCode(UErrorCode& status) const void Calendar::setTemporalMonthCode(const char* code, UErrorCode& status ) { - if (U_FAILURE(status)) return; + if (U_FAILURE(status)) { + return; + } int32_t len = static_cast(uprv_strlen(code)); if (len == 3 && code[0] == 'M') { for (int m = 0; gTemporalMonthCodes[m] != nullptr; m++) { @@ -2844,6 +2888,10 @@ void Calendar::validateField(UCalendarDateFields field, UErrorCode &status) { if (U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } int32_t y; switch (field) { case UCAL_DAY_OF_MONTH: @@ -2883,6 +2931,10 @@ void Calendar::validateField(UCalendarDateFields field, int32_t min, int32_t max if (U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } int32_t value = fFields[field]; if (value < min || value > max) { #if defined (U_DEBUG_CAL) @@ -3646,13 +3698,19 @@ Calendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const if (U_FAILURE(status)) { return 0; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } int32_t result; switch (field) { case UCAL_DATE: { - if(U_FAILURE(status)) return 0; Calendar *cal = clone(); - if(!cal) { status = U_MEMORY_ALLOCATION_ERROR; return 0; } + if(!cal) { + status = U_MEMORY_ALLOCATION_ERROR; + return 0; + } cal->setLenient(true); cal->prepareGetActual(field,false,status); result = handleGetMonthLength(cal->get(UCAL_EXTENDED_YEAR, status), cal->get(UCAL_MONTH, status)); @@ -3662,9 +3720,11 @@ Calendar::getActualMaximum(UCalendarDateFields field, UErrorCode& status) const case UCAL_DAY_OF_YEAR: { - if(U_FAILURE(status)) return 0; Calendar *cal = clone(); - if(!cal) { status = U_MEMORY_ALLOCATION_ERROR; return 0; } + if(!cal) { + status = U_MEMORY_ALLOCATION_ERROR; + return 0; + } cal->setLenient(true); cal->prepareGetActual(field,false,status); result = handleGetYearLength(cal->get(UCAL_EXTENDED_YEAR, status)); @@ -3727,6 +3787,10 @@ void Calendar::prepareGetActual(UCalendarDateFields field, UBool isMinimum, UErr if (U_FAILURE(status)) { return; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } set(UCAL_MILLISECONDS_IN_DAY, 0); switch (field) { @@ -3785,6 +3849,10 @@ int32_t Calendar::getActualHelper(UCalendarDateFields field, int32_t startValue, if (U_FAILURE(status)) { return 0; } + if (field < 0 || field >= UCAL_FIELD_COUNT) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } if (startValue == endValue) { // if we know that the maximum value is always the same, just return it return startValue; @@ -3794,9 +3862,14 @@ int32_t Calendar::getActualHelper(UCalendarDateFields field, int32_t startValue, // clone the calendar so we don't mess with the real one, and set it to // accept anything for the field values - if(U_FAILURE(status)) return startValue; + if(U_FAILURE(status)) { + return startValue; + } Calendar *work = clone(); - if(!work) { status = U_MEMORY_ALLOCATION_ERROR; return startValue; } + if(!work) { + status = U_MEMORY_ALLOCATION_ERROR; + return startValue; + } // need to resolve time here, otherwise, fields set for actual limit // may cause conflict with fields previously set (but not yet resolved). @@ -3850,7 +3923,9 @@ void Calendar::setWeekData(const Locale& desiredLocale, const char *type, UErrorCode& status) { - if (U_FAILURE(status)) return; + if (U_FAILURE(status)) { + return; + } fFirstDayOfWeek = UCAL_SUNDAY; fMinimalDaysInFirstWeek = 1; diff --git a/deps/icu-small/source/i18n/chnsecal.cpp b/deps/icu-small/source/i18n/chnsecal.cpp index 58685632e00fb9..c7c573bacc7959 100644 --- a/deps/icu-small/source/i18n/chnsecal.cpp +++ b/deps/icu-small/source/i18n/chnsecal.cpp @@ -17,6 +17,8 @@ #include "chnsecal.h" +#include + #if !UCONFIG_NO_FORMATTING #include "umutex.h" @@ -383,7 +385,7 @@ void ChineseCalendar::add(UCalendarDateFields field, int32_t amount, UErrorCode& int32_t day = get(UCAL_JULIAN_DAY, status) - kEpochStartAsJulianDay; // Get local day if (U_FAILURE(status)) break; int32_t moon = day - dom + 1; // New moon - offsetMonth(moon, dom, amount); + offsetMonth(moon, dom, amount, status); } break; default: @@ -453,7 +455,7 @@ void ChineseCalendar::roll(UCalendarDateFields field, int32_t amount, UErrorCode } if (newM != m) { - offsetMonth(moon, dom, newM - m); + offsetMonth(moon, dom, newM - m, status); } } break; @@ -653,9 +655,13 @@ UBool ChineseCalendar::isLeapMonthBetween(int32_t newMoon1, int32_t newMoon2) co } #endif - return (newMoon2 >= newMoon1) && - (isLeapMonthBetween(newMoon1, newMoonNear(newMoon2 - SYNODIC_GAP, false)) || - hasNoMajorSolarTerm(newMoon2)); + while (newMoon2 >= newMoon1) { + if (hasNoMajorSolarTerm(newMoon2)) { + return true; + } + newMoon2 = newMoonNear(newMoon2 - SYNODIC_GAP, false); + } + return false; } /** @@ -805,12 +811,21 @@ int32_t ChineseCalendar::newYear(int32_t gyear) const { * @param dom the 1-based day-of-month of the start position * @param delta the number of months to move forward or backward from * the start position + * @param status The status. */ -void ChineseCalendar::offsetMonth(int32_t newMoon, int32_t dom, int32_t delta) { - UErrorCode status = U_ZERO_ERROR; +void ChineseCalendar::offsetMonth(int32_t newMoon, int32_t dom, int32_t delta, + UErrorCode& status) { + if (U_FAILURE(status)) { return; } // Move to the middle of the month before our target month. - newMoon += (int32_t) (CalendarAstronomer::SYNODIC_MONTH * (delta - 0.5)); + double value = newMoon; + value += (CalendarAstronomer::SYNODIC_MONTH * + (static_cast(delta) - 0.5)); + if (value < INT32_MIN || value > INT32_MAX) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } + newMoon = static_cast(value); // Search forward to the target month's new moon newMoon = newMoonNear(newMoon, true); @@ -969,10 +984,11 @@ int32_t ChineseCalendar::internalGetMonth() const { // months. UErrorCode status = U_ZERO_ERROR; temp->roll(UCAL_MONTH, internalGet(UCAL_ORDINAL_MONTH), status); - + U_ASSERT(U_SUCCESS(status)); ChineseCalendar *nonConstThis = (ChineseCalendar*)this; // cast away const nonConstThis->internalSet(UCAL_IS_LEAP_MONTH, temp->get(UCAL_IS_LEAP_MONTH, status)); + U_ASSERT(U_SUCCESS(status)); int32_t month = temp->get(UCAL_MONTH, status); U_ASSERT(U_SUCCESS(status)); nonConstThis->internalSet(UCAL_MONTH, month); diff --git a/deps/icu-small/source/i18n/chnsecal.h b/deps/icu-small/source/i18n/chnsecal.h index 9b5a629fad4c35..e4910f6eb8e2af 100644 --- a/deps/icu-small/source/i18n/chnsecal.h +++ b/deps/icu-small/source/i18n/chnsecal.h @@ -75,10 +75,6 @@ U_NAMESPACE_BEGIN *

  • Dershowitz and Reingold, Calendrical Calculations, * Cambridge University Press, 1997
  • * - *
  • Helmer Aslaksen's - * - * Chinese Calendar page
  • - * *
  • The * Calendar FAQ
  • * @@ -256,7 +252,7 @@ class U_I18N_API ChineseCalendar : public Calendar { virtual void computeChineseFields(int32_t days, int32_t gyear, int32_t gmonth, UBool setAllFields); virtual int32_t newYear(int32_t gyear) const; - virtual void offsetMonth(int32_t newMoon, int32_t dom, int32_t delta); + virtual void offsetMonth(int32_t newMoon, int32_t dom, int32_t delta, UErrorCode& status); const TimeZone* getChineseCalZoneAstroCalc() const; // UObject stuff diff --git a/deps/icu-small/source/i18n/collationbuilder.cpp b/deps/icu-small/source/i18n/collationbuilder.cpp index d8fb89738c6a52..3da74cc4833c53 100644 --- a/deps/icu-small/source/i18n/collationbuilder.cpp +++ b/deps/icu-small/source/i18n/collationbuilder.cpp @@ -1113,12 +1113,23 @@ CollationBuilder::addWithClosure(const UnicodeString &nfdPrefix, const UnicodeSt return ce32; } +// ICU-22517 +// This constant defines a limit for the addOnlyClosure to return +// error, to avoid taking a long time for canonical closure expansion. +// Please let us know if you have a reasonable use case that needed +// for a practical Collation rule that needs to increase this limit. +// This value is needed for compiling a rule with eight Hangul syllables such as +// "&a=b쫊쫊쫊쫊쫊쫊쫊쫊" without error, which should be more than realistic +// usage. +static constexpr int32_t kClosureLoopLimit = 6560; + uint32_t CollationBuilder::addOnlyClosure(const UnicodeString &nfdPrefix, const UnicodeString &nfdString, const int64_t newCEs[], int32_t newCEsLength, uint32_t ce32, UErrorCode &errorCode) { if(U_FAILURE(errorCode)) { return ce32; } + int32_t loop = 0; // Map from canonically equivalent input to the CEs. (But not from the all-NFD input.) if(nfdPrefix.isEmpty()) { CanonicalIterator stringIter(nfdString, errorCode); @@ -1128,6 +1139,11 @@ CollationBuilder::addOnlyClosure(const UnicodeString &nfdPrefix, const UnicodeSt UnicodeString str = stringIter.next(); if(str.isBogus()) { break; } if(ignoreString(str, errorCode) || str == nfdString) { continue; } + if (loop++ > kClosureLoopLimit) { + // To avoid hang as in ICU-22517, return with error. + errorCode = U_INPUT_TOO_LONG_ERROR; + return ce32; + } ce32 = addIfDifferent(prefix, str, newCEs, newCEsLength, ce32, errorCode); if(U_FAILURE(errorCode)) { return ce32; } } @@ -1144,6 +1160,11 @@ CollationBuilder::addOnlyClosure(const UnicodeString &nfdPrefix, const UnicodeSt UnicodeString str = stringIter.next(); if(str.isBogus()) { break; } if(ignoreString(str, errorCode) || (samePrefix && str == nfdString)) { continue; } + if (loop++ > kClosureLoopLimit) { + // To avoid hang as in ICU-22517, return with error. + errorCode = U_INPUT_TOO_LONG_ERROR; + return ce32; + } ce32 = addIfDifferent(prefix, str, newCEs, newCEsLength, ce32, errorCode); if(U_FAILURE(errorCode)) { return ce32; } } diff --git a/deps/icu-small/source/i18n/collationruleparser.cpp b/deps/icu-small/source/i18n/collationruleparser.cpp index 4cc25a1f5ced21..ba740e8d18825b 100644 --- a/deps/icu-small/source/i18n/collationruleparser.cpp +++ b/deps/icu-small/source/i18n/collationruleparser.cpp @@ -24,6 +24,7 @@ #include "unicode/uloc.h" #include "unicode/unistr.h" #include "unicode/utf16.h" +#include "bytesinkutil.h" #include "charstr.h" #include "cmemory.h" #include "collation.h" @@ -34,6 +35,7 @@ #include "cstring.h" #include "patternprops.h" #include "uassert.h" +#include "ulocimp.h" #include "uvectr32.h" U_NAMESPACE_BEGIN @@ -604,19 +606,20 @@ CollationRuleParser::parseSetting(UErrorCode &errorCode) { lang.appendInvariantChars(v, errorCode); if(errorCode == U_MEMORY_ALLOCATION_ERROR) { return; } // BCP 47 language tag -> ICU locale ID - char localeID[ULOC_FULLNAME_CAPACITY]; + CharString localeID; int32_t parsedLength; - int32_t length = uloc_forLanguageTag(lang.data(), localeID, ULOC_FULLNAME_CAPACITY, - &parsedLength, &errorCode); - if(U_FAILURE(errorCode) || - parsedLength != lang.length() || length >= ULOC_FULLNAME_CAPACITY) { + { + CharStringByteSink sink(&localeID); + ulocimp_forLanguageTag(lang.data(), -1, sink, &parsedLength, &errorCode); + } + if(U_FAILURE(errorCode) || parsedLength != lang.length()) { errorCode = U_ZERO_ERROR; setParseError("expected language tag in [import langTag]", errorCode); return; } // localeID minus all keywords char baseID[ULOC_FULLNAME_CAPACITY]; - length = uloc_getBaseName(localeID, baseID, ULOC_FULLNAME_CAPACITY, &errorCode); + int32_t length = uloc_getBaseName(localeID.data(), baseID, ULOC_FULLNAME_CAPACITY, &errorCode); if(U_FAILURE(errorCode) || length >= ULOC_KEYWORDS_CAPACITY) { errorCode = U_ZERO_ERROR; setParseError("expected language tag in [import langTag]", errorCode); @@ -629,11 +632,12 @@ CollationRuleParser::parseSetting(UErrorCode &errorCode) { uprv_memcpy(baseID, "und", 3); } // @collation=type, or length=0 if not specified - char collationType[ULOC_KEYWORDS_CAPACITY]; - length = uloc_getKeywordValue(localeID, "collation", - collationType, ULOC_KEYWORDS_CAPACITY, - &errorCode); - if(U_FAILURE(errorCode) || length >= ULOC_KEYWORDS_CAPACITY) { + CharString collationType; + { + CharStringByteSink sink(&collationType); + ulocimp_getKeywordValue(localeID.data(), "collation", sink, &errorCode); + } + if(U_FAILURE(errorCode)) { errorCode = U_ZERO_ERROR; setParseError("expected language tag in [import langTag]", errorCode); return; @@ -642,7 +646,8 @@ CollationRuleParser::parseSetting(UErrorCode &errorCode) { setParseError("[import langTag] is not supported", errorCode); } else { UnicodeString importedRules; - importer->getRules(baseID, length > 0 ? collationType : "standard", + importer->getRules(baseID, + !collationType.isEmpty() ? collationType.data() : "standard", importedRules, errorReason, errorCode); if(U_FAILURE(errorCode)) { if(errorReason == nullptr) { diff --git a/deps/icu-small/source/i18n/dayperiodrules.cpp b/deps/icu-small/source/i18n/dayperiodrules.cpp index 3d9ab5bfac54f1..294390cce2bcb4 100644 --- a/deps/icu-small/source/i18n/dayperiodrules.cpp +++ b/deps/icu-small/source/i18n/dayperiodrules.cpp @@ -14,10 +14,12 @@ #include "dayperiodrules.h" #include "unicode/ures.h" +#include "bytesinkutil.h" #include "charstr.h" #include "cstring.h" #include "ucln_in.h" #include "uhash.h" +#include "ulocimp.h" #include "umutex.h" #include "uresimp.h" @@ -342,7 +344,6 @@ const DayPeriodRules *DayPeriodRules::getInstance(const Locale &locale, UErrorCo const char *localeCode = locale.getBaseName(); char name[ULOC_FULLNAME_CAPACITY]; - char parentName[ULOC_FULLNAME_CAPACITY]; if (uprv_strlen(localeCode) < ULOC_FULLNAME_CAPACITY) { uprv_strcpy(name, localeCode); @@ -360,13 +361,14 @@ const DayPeriodRules *DayPeriodRules::getInstance(const Locale &locale, UErrorCo while (*name != '\0') { ruleSetNum = uhash_geti(data->localeToRuleSetNumMap, name); if (ruleSetNum == 0) { - // name and parentName can't be the same pointer, so fill in parent then copy to child. - uloc_getParent(name, parentName, ULOC_FULLNAME_CAPACITY, &errorCode); - if (*parentName == '\0') { + CharString parent; + CharStringByteSink sink(&parent); + ulocimp_getParent(name, sink, &errorCode); + if (parent.isEmpty()) { // Saves a lookup in the hash table. break; } - uprv_strcpy(name, parentName); + parent.extract(name, UPRV_LENGTHOF(name), errorCode); } else { break; } diff --git a/deps/icu-small/source/i18n/double-conversion-double-to-string.cpp b/deps/icu-small/source/i18n/double-conversion-double-to-string.cpp index 5ee6d2b8e878c9..938484bca85189 100644 --- a/deps/icu-small/source/i18n/double-conversion-double-to-string.cpp +++ b/deps/icu-small/source/i18n/double-conversion-double-to-string.cpp @@ -94,7 +94,14 @@ void DoubleToStringConverter::CreateExponentialRepresentation( StringBuilder* result_builder) const { DOUBLE_CONVERSION_ASSERT(length != 0); result_builder->AddCharacter(decimal_digits[0]); - if (length != 1) { + if (length == 1) { + if ((flags_ & EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL) != 0) { + result_builder->AddCharacter('.'); + if ((flags_ & EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL) != 0) { + result_builder->AddCharacter('0'); + } + } + } else { result_builder->AddCharacter('.'); result_builder->AddSubstring(&decimal_digits[1], length-1); } diff --git a/deps/icu-small/source/i18n/double-conversion-double-to-string.h b/deps/icu-small/source/i18n/double-conversion-double-to-string.h index 9940052c64b25b..b8cb06a8b2cef5 100644 --- a/deps/icu-small/source/i18n/double-conversion-double-to-string.h +++ b/deps/icu-small/source/i18n/double-conversion-double-to-string.h @@ -93,7 +93,9 @@ class DoubleToStringConverter { EMIT_TRAILING_DECIMAL_POINT = 2, EMIT_TRAILING_ZERO_AFTER_POINT = 4, UNIQUE_ZERO = 8, - NO_TRAILING_ZERO = 16 + NO_TRAILING_ZERO = 16, + EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL = 32, + EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL = 64 }; // Flags should be a bit-or combination of the possible Flags-enum. @@ -112,6 +114,13 @@ class DoubleToStringConverter { // of the result in precision mode. Matches printf's %g. // When EMIT_TRAILING_ZERO_AFTER_POINT is also given, one trailing zero is // preserved. + // - EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL: when the input number has + // exactly one significant digit and is converted into exponent form then a + // trailing decimal point is appended to the significand in shortest mode + // or in precision mode with one requested digit. + // - EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL: in addition to a trailing + // decimal point emits a trailing '0'-character. This flag requires the + // EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL flag. // // Infinity symbol and nan_symbol provide the string representation for these // special values. If the string is nullptr and the special value is encountered @@ -147,6 +156,22 @@ class DoubleToStringConverter { // ToPrecision(230.0, 2) -> "230." with EMIT_TRAILING_DECIMAL_POINT. // ToPrecision(230.0, 2) -> "2.3e2" with EMIT_TRAILING_ZERO_AFTER_POINT. // + // When converting numbers with exactly one significant digit to exponent + // form in shortest mode or in precision mode with one requested digit, the + // EMIT_TRAILING_DECIMAL_POINT and EMIT_TRAILING_ZERO_AFTER_POINT flags have + // no effect. Use the EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL flag to + // append a decimal point in this case and the + // EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL flag to also append a + // '0'-character in this case. + // Example with decimal_in_shortest_low = 0: + // ToShortest(0.0009) -> "9e-4" + // with EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL deactivated. + // ToShortest(0.0009) -> "9.e-4" + // with EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL activated. + // ToShortest(0.0009) -> "9.0e-4" + // with EMIT_TRAILING_DECIMAL_POINT_IN_EXPONENTIAL activated and + // EMIT_TRAILING_ZERO_AFTER_POINT_IN_EXPONENTIAL activated. + // // The min_exponent_width is used for exponential representations. // The converter adds leading '0's to the exponent until the exponent // is at least min_exponent_width digits long. diff --git a/deps/icu-small/source/i18n/dtitvinf.cpp b/deps/icu-small/source/i18n/dtitvinf.cpp index 3733d04518d2b2..c4b6bbcf401a9a 100644 --- a/deps/icu-small/source/i18n/dtitvinf.cpp +++ b/deps/icu-small/source/i18n/dtitvinf.cpp @@ -23,6 +23,7 @@ #include #endif +#include "bytesinkutil.h" #include "cmemory.h" #include "cstring.h" #include "unicode/msgfmt.h" @@ -35,6 +36,7 @@ #include "uresimp.h" #include "hash.h" #include "gregoimp.h" +#include "ulocimp.h" #include "uresimp.h" @@ -397,17 +399,19 @@ DateIntervalInfo::initializeData(const Locale& locale, UErrorCode& status) // Get the correct calendar type const char * calendarTypeToUse = gGregorianTag; // initial default - char calendarType[ULOC_KEYWORDS_CAPACITY]; // to be filled in with the type to use, if all goes well char localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY]; // obtain a locale that always has the calendar key value that should be used (void)ures_getFunctionalEquivalent(localeWithCalendarKey, ULOC_LOCALE_IDENTIFIER_CAPACITY, nullptr, "calendar", "calendar", locName, nullptr, false, &status); localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY-1] = 0; // ensure null termination // now get the calendar key value from that locale - int32_t calendarTypeLen = uloc_getKeywordValue(localeWithCalendarKey, "calendar", calendarType, - ULOC_KEYWORDS_CAPACITY, &status); - if (U_SUCCESS(status) && calendarTypeLen < ULOC_KEYWORDS_CAPACITY) { - calendarTypeToUse = calendarType; + CharString calendarType; + { + CharStringByteSink sink(&calendarType); + ulocimp_getKeywordValue(localeWithCalendarKey, "calendar", sink, &status); + } + if (U_SUCCESS(status)) { + calendarTypeToUse = calendarType.data(); } status = U_ZERO_ERROR; diff --git a/deps/icu-small/source/i18n/dtptngen.cpp b/deps/icu-small/source/i18n/dtptngen.cpp index 1f74540fbd0cf2..2947672013e79d 100644 --- a/deps/icu-small/source/i18n/dtptngen.cpp +++ b/deps/icu-small/source/i18n/dtptngen.cpp @@ -29,6 +29,7 @@ #include "unicode/ustring.h" #include "unicode/rep.h" #include "unicode/region.h" +#include "bytesinkutil.h" #include "cpputils.h" #include "mutex.h" #include "umutex.h" @@ -37,7 +38,9 @@ #include "locbased.h" #include "hash.h" #include "uhash.h" +#include "ulocimp.h" #include "uresimp.h" +#include "ulocimp.h" #include "dtptngen_impl.h" #include "ucln_in.h" #include "charstr.h" @@ -655,17 +658,9 @@ void DateTimePatternGenerator::getAllowedHourFormats(const Locale &locale, UErro if (U_FAILURE(status)) { return; } const char *language = locale.getLanguage(); - const char *country = locale.getCountry(); - - char regionOverride[8]; - int32_t regionOverrideLength = locale.getKeywordValue("rg", regionOverride, sizeof(regionOverride), status); - if (U_SUCCESS(status) && regionOverrideLength > 0) { - country = regionOverride; - if (regionOverrideLength > 2) { - // chop off any subdivision codes that may have been included - regionOverride[2] = '\0'; - } - } + char baseCountry[8]; + ulocimp_getRegionForSupplementalData(locale.getName(), false, baseCountry, 8, &status); + const char* country = baseCountry; Locale maxLocale; // must be here for correct lifetime if (*language == '\0' || *country == '\0') { @@ -910,22 +905,19 @@ DateTimePatternGenerator::getCalendarTypeToUse(const Locale& locale, CharString& &localStatus); localeWithCalendarKey[ULOC_LOCALE_IDENTIFIER_CAPACITY-1] = 0; // ensure null termination // now get the calendar key value from that locale - char calendarType[ULOC_KEYWORDS_CAPACITY]; - int32_t calendarTypeLen = uloc_getKeywordValue( - localeWithCalendarKey, - "calendar", - calendarType, - ULOC_KEYWORDS_CAPACITY, - &localStatus); + destination.clear(); + { + CharStringByteSink sink(&destination); + ulocimp_getKeywordValue( + localeWithCalendarKey, + "calendar", + sink, + &localStatus); + } // If the input locale was invalid, don't fail with missing resource error, instead // continue with default of Gregorian. if (U_FAILURE(localStatus) && localStatus != U_MISSING_RESOURCE_ERROR) { err = localStatus; - return; - } - if (calendarTypeLen > 0 && calendarTypeLen < ULOC_KEYWORDS_CAPACITY) { - destination.clear().append(calendarType, -1, err); - if (U_FAILURE(err)) { return; } } } } diff --git a/deps/icu-small/source/i18n/ethpccal.h b/deps/icu-small/source/i18n/ethpccal.h index 1a5cd4f41aabc8..19d9e0efb7e0a5 100644 --- a/deps/icu-small/source/i18n/ethpccal.h +++ b/deps/icu-small/source/i18n/ethpccal.h @@ -89,7 +89,7 @@ class EthiopicCalendar : public CECalendar { /** * Constant for ነሐሴ, the 12th month of the Ethiopic year. */ - NEHASSA, + NEHASSE, /** * Constant for ጳጉሜን, the 13th month of the Ethiopic year. diff --git a/deps/icu-small/source/i18n/fmtable.cpp b/deps/icu-small/source/i18n/fmtable.cpp index 618868c0a2f347..65dafc95aa256a 100644 --- a/deps/icu-small/source/i18n/fmtable.cpp +++ b/deps/icu-small/source/i18n/fmtable.cpp @@ -56,7 +56,7 @@ using number::impl::DecimalQuantity; // Return true if *a == *b. static inline UBool objectEquals(const UObject* a, const UObject* b) { // LATER: return *a == *b; - return *((const Measure*) a) == *((const Measure*) b); + return *((const Measure*) a) == *b; } // Return a clone of *a. diff --git a/deps/icu-small/source/i18n/gender.cpp b/deps/icu-small/source/i18n/gender.cpp index 97d161de321e38..d023b50218a548 100644 --- a/deps/icu-small/source/i18n/gender.cpp +++ b/deps/icu-small/source/i18n/gender.cpp @@ -19,15 +19,20 @@ #if !UCONFIG_NO_FORMATTING +#include + #include "unicode/gender.h" #include "unicode/ugender.h" #include "unicode/ures.h" +#include "bytesinkutil.h" +#include "charstr.h" #include "cmemory.h" #include "cstring.h" #include "mutex.h" #include "uassert.h" #include "ucln_in.h" +#include "ulocimp.h" #include "umutex.h" #include "uhash.h" @@ -148,12 +153,18 @@ const GenderInfo* GenderInfo::loadInstance(const Locale& locale, UErrorCode& sta const char16_t* s = ures_getStringByKey(locRes.getAlias(), curLocaleName, &resLen, &key_status); if (s == nullptr) { key_status = U_ZERO_ERROR; - char parentLocaleName[ULOC_FULLNAME_CAPACITY]; - uprv_strcpy(parentLocaleName, curLocaleName); - while (s == nullptr && uloc_getParent(parentLocaleName, parentLocaleName, ULOC_FULLNAME_CAPACITY, &key_status) > 0) { + CharString parentLocaleName(curLocaleName, key_status); + while (s == nullptr) { + { + CharString tmp; + CharStringByteSink sink(&tmp); + ulocimp_getParent(parentLocaleName.data(), sink, &status); + if (tmp.isEmpty()) break; + parentLocaleName = std::move(tmp); + } key_status = U_ZERO_ERROR; resLen = 0; - s = ures_getStringByKey(locRes.getAlias(), parentLocaleName, &resLen, &key_status); + s = ures_getStringByKey(locRes.getAlias(), parentLocaleName.data(), &resLen, &key_status); key_status = U_ZERO_ERROR; } } diff --git a/deps/icu-small/source/i18n/gregocal.cpp b/deps/icu-small/source/i18n/gregocal.cpp index 5fd71d496c84c6..ec14abbbf10c81 100644 --- a/deps/icu-small/source/i18n/gregocal.cpp +++ b/deps/icu-small/source/i18n/gregocal.cpp @@ -610,14 +610,6 @@ GregorianCalendar::monthLength(int32_t month, int32_t year) const // ------------------------------------- -int32_t -GregorianCalendar::yearLength(int32_t year) const -{ - return isLeapYear(year) ? 366 : 365; -} - -// ------------------------------------- - int32_t GregorianCalendar::yearLength() const { @@ -626,24 +618,6 @@ GregorianCalendar::yearLength() const // ------------------------------------- -/** -* After adjustments such as add(MONTH), add(YEAR), we don't want the -* month to jump around. E.g., we don't want Jan 31 + 1 month to go to Mar -* 3, we want it to go to Feb 28. Adjustments which might run into this -* problem call this method to retain the proper month. -*/ -void -GregorianCalendar::pinDayOfMonth() -{ - int32_t monthLen = monthLength(internalGetMonth()); - int32_t dom = internalGet(UCAL_DATE); - if(dom > monthLen) - set(UCAL_DATE, monthLen); -} - -// ------------------------------------- - - UBool GregorianCalendar::validateFields() const { diff --git a/deps/icu-small/source/i18n/hebrwcal.cpp b/deps/icu-small/source/i18n/hebrwcal.cpp index efd0d8fd4acd08..6451c89c599aef 100644 --- a/deps/icu-small/source/i18n/hebrwcal.cpp +++ b/deps/icu-small/source/i18n/hebrwcal.cpp @@ -777,7 +777,7 @@ int32_t HebrewCalendar::internalGetMonth() const { HebrewCalendar *nonConstThis = (HebrewCalendar*)this; // cast away const int32_t year = nonConstThis->handleGetExtendedYear(); - return ordinalMonth + ((isLeapYear(year) && (ordinalMonth > ADAR_1)) ? 1: 0); + return ordinalMonth + (((!isLeapYear(year)) && (ordinalMonth > ADAR_1)) ? 1: 0); } return Calendar::internalGetMonth(); } diff --git a/deps/icu-small/source/i18n/iso8601cal.cpp b/deps/icu-small/source/i18n/iso8601cal.cpp index 1bc81fac15e2c5..c3288bc6b5d64e 100644 --- a/deps/icu-small/source/i18n/iso8601cal.cpp +++ b/deps/icu-small/source/i18n/iso8601cal.cpp @@ -14,7 +14,13 @@ UOBJECT_DEFINE_RTTI_IMPLEMENTATION(ISO8601Calendar) ISO8601Calendar::ISO8601Calendar(const Locale& aLocale, UErrorCode& success) : GregorianCalendar(aLocale, success) { - setFirstDayOfWeek(UCAL_MONDAY); + UErrorCode fwStatus = U_ZERO_ERROR; + int32_t fwLength = aLocale.getKeywordValue("fw", nullptr, 0, fwStatus); + // Do not set first day of week for iso8601 to Monday if we have fw keyword + // and let the value set by the Calendar constructor to take care of it. + if (U_SUCCESS(fwStatus) && fwLength == 0) { + setFirstDayOfWeek(UCAL_MONDAY); + } setMinimalDaysInFirstWeek(4); } diff --git a/deps/icu-small/source/i18n/measunit.cpp b/deps/icu-small/source/i18n/measunit.cpp index 47ae5bcf5dff5f..abb21997705a11 100644 --- a/deps/icu-small/source/i18n/measunit.cpp +++ b/deps/icu-small/source/i18n/measunit.cpp @@ -56,11 +56,11 @@ static const int32_t gOffsets[] = { 429, 430, 436, - 446, - 451, - 455, - 457, - 491 + 447, + 452, + 456, + 458, + 492 }; static const int32_t kCurrencyOffset = 5; @@ -532,6 +532,7 @@ static const char * const gSubTypes[] = { "watt", "atmosphere", "bar", + "gasoline-energy-density", "hectopascal", "inch-ofhg", "kilopascal", @@ -1687,70 +1688,78 @@ MeasureUnit MeasureUnit::getBar() { return MeasureUnit(18, 1); } -MeasureUnit *MeasureUnit::createHectopascal(UErrorCode &status) { +MeasureUnit *MeasureUnit::createGasolineEnergyDensity(UErrorCode &status) { return MeasureUnit::create(18, 2, status); } -MeasureUnit MeasureUnit::getHectopascal() { +MeasureUnit MeasureUnit::getGasolineEnergyDensity() { return MeasureUnit(18, 2); } -MeasureUnit *MeasureUnit::createInchHg(UErrorCode &status) { +MeasureUnit *MeasureUnit::createHectopascal(UErrorCode &status) { return MeasureUnit::create(18, 3, status); } -MeasureUnit MeasureUnit::getInchHg() { +MeasureUnit MeasureUnit::getHectopascal() { return MeasureUnit(18, 3); } -MeasureUnit *MeasureUnit::createKilopascal(UErrorCode &status) { +MeasureUnit *MeasureUnit::createInchHg(UErrorCode &status) { return MeasureUnit::create(18, 4, status); } -MeasureUnit MeasureUnit::getKilopascal() { +MeasureUnit MeasureUnit::getInchHg() { return MeasureUnit(18, 4); } -MeasureUnit *MeasureUnit::createMegapascal(UErrorCode &status) { +MeasureUnit *MeasureUnit::createKilopascal(UErrorCode &status) { return MeasureUnit::create(18, 5, status); } -MeasureUnit MeasureUnit::getMegapascal() { +MeasureUnit MeasureUnit::getKilopascal() { return MeasureUnit(18, 5); } -MeasureUnit *MeasureUnit::createMillibar(UErrorCode &status) { +MeasureUnit *MeasureUnit::createMegapascal(UErrorCode &status) { return MeasureUnit::create(18, 6, status); } -MeasureUnit MeasureUnit::getMillibar() { +MeasureUnit MeasureUnit::getMegapascal() { return MeasureUnit(18, 6); } -MeasureUnit *MeasureUnit::createMillimeterOfMercury(UErrorCode &status) { +MeasureUnit *MeasureUnit::createMillibar(UErrorCode &status) { return MeasureUnit::create(18, 7, status); } -MeasureUnit MeasureUnit::getMillimeterOfMercury() { +MeasureUnit MeasureUnit::getMillibar() { return MeasureUnit(18, 7); } -MeasureUnit *MeasureUnit::createPascal(UErrorCode &status) { +MeasureUnit *MeasureUnit::createMillimeterOfMercury(UErrorCode &status) { return MeasureUnit::create(18, 8, status); } -MeasureUnit MeasureUnit::getPascal() { +MeasureUnit MeasureUnit::getMillimeterOfMercury() { return MeasureUnit(18, 8); } -MeasureUnit *MeasureUnit::createPoundPerSquareInch(UErrorCode &status) { +MeasureUnit *MeasureUnit::createPascal(UErrorCode &status) { return MeasureUnit::create(18, 9, status); } -MeasureUnit MeasureUnit::getPoundPerSquareInch() { +MeasureUnit MeasureUnit::getPascal() { return MeasureUnit(18, 9); } +MeasureUnit *MeasureUnit::createPoundPerSquareInch(UErrorCode &status) { + return MeasureUnit::create(18, 10, status); +} + +MeasureUnit MeasureUnit::getPoundPerSquareInch() { + return MeasureUnit(18, 10); +} + MeasureUnit *MeasureUnit::createBeaufort(UErrorCode &status) { return MeasureUnit::create(19, 0, status); } diff --git a/deps/icu-small/source/i18n/nfsubs.cpp b/deps/icu-small/source/i18n/nfsubs.cpp index 4f3247ce50d732..5256b8a39bb301 100644 --- a/deps/icu-small/source/i18n/nfsubs.cpp +++ b/deps/icu-small/source/i18n/nfsubs.cpp @@ -103,7 +103,25 @@ class MultiplierSubstitution : public NFSubstitution { } virtual double transformNumber(double number) const override { - if (getRuleSet()) { + bool doFloor = getRuleSet() != nullptr; + if (!doFloor) { + // This is a HACK that partially addresses ICU-22313. The original code wanted us to do + // floor() on the result if we were passing it to another rule set, but not if we were passing + // it to a DecimalFormat. But the DurationRules rule set has multiplier substitutions where + // we DO want to do the floor() operation. What we REALLY want is to do floor() any time + // the owning rule also has a ModulusSubsitution, but we don't have access to that information + // here, so instead we're doing a floor() any time the DecimalFormat has maxFracDigits equal to + // 0. This seems to work with our existing rule sets, but could be a problem in the future, + // but the "real" fix for DurationRules isn't worth doing, since we're deprecating DurationRules + // anyway. This is enough to keep it from being egregiously wrong, without obvious side + // effects. --rtg 8/16/23 + const DecimalFormat* decimalFormat = getNumberFormat(); + if (decimalFormat == nullptr || decimalFormat->getMaximumFractionDigits() == 0) { + doFloor = true; + } + } + + if (doFloor) { return uprv_floor(number / divisor); } else { return number / divisor; diff --git a/deps/icu-small/source/i18n/plurrule.cpp b/deps/icu-small/source/i18n/plurrule.cpp index 9c37b09e2533f9..839d14147cc267 100644 --- a/deps/icu-small/source/i18n/plurrule.cpp +++ b/deps/icu-small/source/i18n/plurrule.cpp @@ -12,6 +12,8 @@ #include #include +#include + #include "unicode/utypes.h" #include "unicode/localpointer.h" #include "unicode/plurrule.h" @@ -20,6 +22,7 @@ #include "unicode/numfmt.h" #include "unicode/decimfmt.h" #include "unicode/numberrangeformatter.h" +#include "bytesinkutil.h" #include "charstr.h" #include "cmemory.h" #include "cstring.h" @@ -40,6 +43,7 @@ #include "util.h" #include "pluralranges.h" #include "numrange_impl.h" +#include "ulocimp.h" #if !UCONFIG_NO_FORMATTING @@ -827,14 +831,19 @@ PluralRules::getRuleFromResource(const Locale& locale, UPluralType type, UErrorC if (s == nullptr) { // Check parent locales. UErrorCode status = U_ZERO_ERROR; - char parentLocaleName[ULOC_FULLNAME_CAPACITY]; const char *curLocaleName2=locale.getBaseName(); - uprv_strcpy(parentLocaleName, curLocaleName2); + CharString parentLocaleName(curLocaleName2, status); - while (uloc_getParent(parentLocaleName, parentLocaleName, - ULOC_FULLNAME_CAPACITY, &status) > 0) { + for (;;) { + { + CharString tmp; + CharStringByteSink sink(&tmp); + ulocimp_getParent(parentLocaleName.data(), sink, &status); + if (tmp.isEmpty()) break; + parentLocaleName = std::move(tmp); + } resLen=0; - s = ures_getStringByKey(locRes.getAlias(), parentLocaleName, &resLen, &status); + s = ures_getStringByKey(locRes.getAlias(), parentLocaleName.data(), &resLen, &status); if (s != nullptr) { errCode = U_ZERO_ERROR; break; diff --git a/deps/icu-small/source/i18n/reldatefmt.cpp b/deps/icu-small/source/i18n/reldatefmt.cpp index 24d22a4b4bf254..ebdf6c9716eb98 100644 --- a/deps/icu-small/source/i18n/reldatefmt.cpp +++ b/deps/icu-small/source/i18n/reldatefmt.cpp @@ -12,7 +12,7 @@ #include "unicode/reldatefmt.h" -#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION +#if !UCONFIG_NO_FORMATTING #include #include @@ -701,7 +701,7 @@ static UBool getDateTimePattern( return getStringByIndex(topLevel.getAlias(), dateTimeFormatOffset, result, status); } -template<> +template<> const RelativeDateTimeCacheData *LocaleCacheKey::createObject(const void * /*unused*/, UErrorCode &status) const { const char *localeId = fLoc.getName(); LocalUResourceBundlePointer topLevel(ures_open(nullptr, localeId, &status)); @@ -761,6 +761,7 @@ RelativeDateTimeFormatter::RelativeDateTimeFormatter(UErrorCode& status) : fStyle(UDAT_STYLE_LONG), fContext(UDISPCTX_CAPITALIZATION_NONE), fOptBreakIterator(nullptr) { + (void)fOptBreakIterator; // suppress unused field warning init(nullptr, nullptr, status); } @@ -804,16 +805,25 @@ RelativeDateTimeFormatter::RelativeDateTimeFormatter( if (U_FAILURE(status)) { return; } + if (styl < 0 || UDAT_STYLE_COUNT <= styl) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } if ((capitalizationContext >> 8) != UDISPCTX_TYPE_CAPITALIZATION) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } if (capitalizationContext == UDISPCTX_CAPITALIZATION_FOR_BEGINNING_OF_SENTENCE) { +#if !UCONFIG_NO_BREAK_ITERATION BreakIterator *bi = BreakIterator::createSentenceInstance(locale, status); if (U_FAILURE(status)) { return; } init(nfToAdopt, bi, status); +#else + status = U_UNSUPPORTED_ERROR; + return; +#endif // !UCONFIG_NO_BREAK_ITERATION } else { init(nfToAdopt, nullptr, status); } @@ -832,9 +842,11 @@ RelativeDateTimeFormatter::RelativeDateTimeFormatter( fCache->addRef(); fNumberFormat->addRef(); fPluralRules->addRef(); +#if !UCONFIG_NO_BREAK_ITERATION if (fOptBreakIterator != nullptr) { fOptBreakIterator->addRef(); } +#endif // !UCONFIG_NO_BREAK_ITERATION } RelativeDateTimeFormatter& RelativeDateTimeFormatter::operator=( @@ -843,7 +855,9 @@ RelativeDateTimeFormatter& RelativeDateTimeFormatter::operator=( SharedObject::copyPtr(other.fCache, fCache); SharedObject::copyPtr(other.fNumberFormat, fNumberFormat); SharedObject::copyPtr(other.fPluralRules, fPluralRules); +#if !UCONFIG_NO_BREAK_ITERATION SharedObject::copyPtr(other.fOptBreakIterator, fOptBreakIterator); +#endif // !UCONFIG_NO_BREAK_ITERATION fStyle = other.fStyle; fContext = other.fContext; fLocale = other.fLocale; @@ -861,9 +875,11 @@ RelativeDateTimeFormatter::~RelativeDateTimeFormatter() { if (fPluralRules != nullptr) { fPluralRules->removeRef(); } +#if !UCONFIG_NO_BREAK_ITERATION if (fOptBreakIterator != nullptr) { fOptBreakIterator->removeRef(); } +#endif // !UCONFIG_NO_BREAK_ITERATION } const NumberFormat& RelativeDateTimeFormatter::getNumberFormat() const { @@ -1015,6 +1031,10 @@ void RelativeDateTimeFormatter::formatNumericImpl( if (U_FAILURE(status)) { return; } + if (unit < 0 || UDAT_REL_UNIT_COUNT <= unit) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } UDateDirection direction = UDAT_DIRECTION_NEXT; if (std::signbit(offset)) { // needed to handle -0.0 direction = UDAT_DIRECTION_LAST; @@ -1083,7 +1103,9 @@ void RelativeDateTimeFormatter::formatAbsoluteImpl( if (U_FAILURE(status)) { return; } - if (unit == UDAT_ABSOLUTE_NOW && direction != UDAT_DIRECTION_PLAIN) { + if ((unit < 0 || UDAT_ABSOLUTE_UNIT_COUNT <= unit) || + (direction < 0 || UDAT_DIRECTION_COUNT <= direction) || + (unit == UDAT_ABSOLUTE_NOW && direction != UDAT_DIRECTION_PLAIN)) { status = U_ILLEGAL_ARGUMENT_ERROR; return; } @@ -1191,6 +1213,7 @@ UnicodeString& RelativeDateTimeFormatter::combineDateAndTime( } UnicodeString& RelativeDateTimeFormatter::adjustForContext(UnicodeString &str) const { +#if !UCONFIG_NO_BREAK_ITERATION if (fOptBreakIterator == nullptr || str.length() == 0 || !u_islower(str.char32At(0))) { return str; @@ -1204,25 +1227,36 @@ UnicodeString& RelativeDateTimeFormatter::adjustForContext(UnicodeString &str) c fOptBreakIterator->get(), fLocale, U_TITLECASE_NO_LOWERCASE | U_TITLECASE_NO_BREAK_ADJUSTMENT); +#endif // !UCONFIG_NO_BREAK_ITERATION return str; } UBool RelativeDateTimeFormatter::checkNoAdjustForContext(UErrorCode& status) const { +#if !UCONFIG_NO_BREAK_ITERATION // This is unsupported because it's hard to keep fields in sync with title // casing. The code could be written and tested if there is demand. if (fOptBreakIterator != nullptr) { status = U_UNSUPPORTED_ERROR; return false; } +#else + (void)status; // suppress unused argument warning +#endif // !UCONFIG_NO_BREAK_ITERATION return true; } void RelativeDateTimeFormatter::init( NumberFormat *nfToAdopt, +#if !UCONFIG_NO_BREAK_ITERATION BreakIterator *biToAdopt, +#else + std::nullptr_t, +#endif // !UCONFIG_NO_BREAK_ITERATION UErrorCode &status) { LocalPointer nf(nfToAdopt); +#if !UCONFIG_NO_BREAK_ITERATION LocalPointer bi(biToAdopt); +#endif // !UCONFIG_NO_BREAK_ITERATION UnifiedCache::getByLocale(fLocale, fCache, status); if (U_FAILURE(status)) { return; @@ -1251,6 +1285,7 @@ void RelativeDateTimeFormatter::init( nf.orphan(); SharedObject::copyPtr(shared, fNumberFormat); } +#if !UCONFIG_NO_BREAK_ITERATION if (bi.isNull()) { SharedObject::clearPtr(fOptBreakIterator); } else { @@ -1262,6 +1297,7 @@ void RelativeDateTimeFormatter::init( bi.orphan(); SharedObject::copyPtr(shared, fOptBreakIterator); } +#endif // !UCONFIG_NO_BREAK_ITERATION } U_NAMESPACE_END diff --git a/deps/icu-small/source/i18n/reldtfmt.cpp b/deps/icu-small/source/i18n/reldtfmt.cpp index 0c836a0b79fd51..7015c13089986a 100644 --- a/deps/icu-small/source/i18n/reldtfmt.cpp +++ b/deps/icu-small/source/i18n/reldtfmt.cpp @@ -78,6 +78,14 @@ RelativeDateFormat::RelativeDateFormat( UDateFormatStyle timeStyle, UDateFormatS if(U_FAILURE(status) ) { return; } + if (dateStyle != UDAT_FULL_RELATIVE && + dateStyle != UDAT_LONG_RELATIVE && + dateStyle != UDAT_MEDIUM_RELATIVE && + dateStyle != UDAT_SHORT_RELATIVE && + dateStyle != UDAT_RELATIVE) { + status = U_ILLEGAL_ARGUMENT_ERROR; + return; + } if (timeStyle < UDAT_NONE || timeStyle > UDAT_SHORT) { // don't support other time styles (e.g. relative styles), for now diff --git a/deps/icu-small/source/i18n/rulebasedcollator.cpp b/deps/icu-small/source/i18n/rulebasedcollator.cpp index e9482628d9b605..cf4cfc87f2aac3 100644 --- a/deps/icu-small/source/i18n/rulebasedcollator.cpp +++ b/deps/icu-small/source/i18n/rulebasedcollator.cpp @@ -32,6 +32,7 @@ #include "unicode/utf8.h" #include "unicode/uversion.h" #include "bocsu.h" +#include "bytesinkutil.h" #include "charstr.h" #include "cmemory.h" #include "collation.h" @@ -50,6 +51,7 @@ #include "ucol_imp.h" #include "uhash.h" #include "uitercollationiterator.h" +#include "ulocimp.h" #include "ustr_imp.h" #include "utf16collationiterator.h" #include "utf8collationiterator.h" @@ -1579,8 +1581,12 @@ RuleBasedCollator::internalGetShortDefinitionString(const char *locale, appendAttribute(result, 'F', getAttribute(UCOL_FRENCH_COLLATION, errorCode), errorCode); } // Note: UCOL_HIRAGANA_QUATERNARY_MODE is deprecated and never changes away from default. - length = uloc_getKeywordValue(resultLocale, "collation", subtag, UPRV_LENGTHOF(subtag), &errorCode); - appendSubtag(result, 'K', subtag, length, errorCode); + { + CharString collation; + CharStringByteSink sink(&collation); + ulocimp_getKeywordValue(resultLocale, "collation", sink, &errorCode); + appendSubtag(result, 'K', collation.data(), collation.length(), errorCode); + } length = uloc_getLanguage(resultLocale, subtag, UPRV_LENGTHOF(subtag), &errorCode); if (length == 0) { appendSubtag(result, 'L', "root", 4, errorCode); diff --git a/deps/icu-small/source/i18n/smpdtfmt.cpp b/deps/icu-small/source/i18n/smpdtfmt.cpp index a87fb8d5e15f01..628f7febe04aeb 100644 --- a/deps/icu-small/source/i18n/smpdtfmt.cpp +++ b/deps/icu-small/source/i18n/smpdtfmt.cpp @@ -721,19 +721,28 @@ void SimpleDateFormat::construct(EStyle timeStyle, UnicodeString timePattern; if (timeStyle >= kFull && timeStyle <= kShort) { + bool hasRgOrHcSubtag = false; + // also use DTPG if the locale has the "rg" or "hc" ("hours") subtag-- even if the overriding region + // or hour cycle is the same as the one we get by default, we go through the DateTimePatternGenerator + UErrorCode dummyErr1 = U_ZERO_ERROR, dummyErr2 = U_ZERO_ERROR; + if (locale.getKeywordValue("rg", nullptr, 0, dummyErr1) > 0 || locale.getKeywordValue("hours", nullptr, 0, dummyErr2) > 0) { + hasRgOrHcSubtag = true; + } + const char* baseLocID = locale.getBaseName(); if (baseLocID[0]!=0 && uprv_strcmp(baseLocID,"und")!=0) { UErrorCode useStatus = U_ZERO_ERROR; Locale baseLoc(baseLocID); Locale validLoc(getLocale(ULOC_VALID_LOCALE, useStatus)); - if (U_SUCCESS(useStatus) && validLoc!=baseLoc) { - bool useDTPG = false; + if (hasRgOrHcSubtag || (U_SUCCESS(useStatus) && validLoc!=baseLoc)) { + bool useDTPG = hasRgOrHcSubtag; const char* baseReg = baseLoc.getCountry(); // empty string if no region if ((baseReg[0]!=0 && uprv_strncmp(baseReg,validLoc.getCountry(),ULOC_COUNTRY_CAPACITY)!=0) || uprv_strncmp(baseLoc.getLanguage(),validLoc.getLanguage(),ULOC_LANG_CAPACITY)!=0) { // use DTPG if // * baseLoc has a region and validLoc does not have the same one (or has none), OR // * validLoc has a different language code than baseLoc + // * the original locale has the rg or hc subtag useDTPG = true; } if (useDTPG) { diff --git a/deps/icu-small/source/i18n/timezone.cpp b/deps/icu-small/source/i18n/timezone.cpp index 75479267d751f5..02cbc78ceffbdf 100644 --- a/deps/icu-small/source/i18n/timezone.cpp +++ b/deps/icu-small/source/i18n/timezone.cpp @@ -1591,6 +1591,22 @@ TimeZone::getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UB return canonicalID; } +UnicodeString& +TimeZone::getIanaID(const UnicodeString& id, UnicodeString& ianaID, UErrorCode& status) +{ + ianaID.remove(); + if (U_FAILURE(status)) { + return ianaID; + } + if (id.compare(ConstChar16Ptr(UNKNOWN_ZONE_ID), UNKNOWN_ZONE_ID_LENGTH) == 0) { + status = U_ILLEGAL_ARGUMENT_ERROR; + ianaID.setToBogus(); + } else { + ZoneMeta::getIanaID(id, ianaID, status); + } + return ianaID; +} + UnicodeString& TimeZone::getWindowsID(const UnicodeString& id, UnicodeString& winid, UErrorCode& status) { winid.remove(); diff --git a/deps/icu-small/source/i18n/tmutfmt.cpp b/deps/icu-small/source/i18n/tmutfmt.cpp index 87b509ea35c11c..dc48b2ee2a4789 100644 --- a/deps/icu-small/source/i18n/tmutfmt.cpp +++ b/deps/icu-small/source/i18n/tmutfmt.cpp @@ -11,14 +11,18 @@ #if !UCONFIG_NO_FORMATTING +#include + #include "unicode/decimfmt.h" #include "unicode/localpointer.h" #include "plurrule_impl.h" #include "uvector.h" +#include "bytesinkutil.h" #include "charstr.h" #include "cmemory.h" #include "cstring.h" #include "hash.h" +#include "ulocimp.h" #include "uresimp.h" #include "ureslocs.h" #include "unicode/msgfmt.h" @@ -556,14 +560,17 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, return; } UErrorCode status = U_ZERO_ERROR; - char parentLocale[ULOC_FULLNAME_CAPACITY]; - uprv_strcpy(parentLocale, localeName); - int32_t locNameLen; + CharString parentLocale(localeName, status); U_ASSERT(countToPatterns != nullptr); - while ((locNameLen = uloc_getParent(parentLocale, parentLocale, - ULOC_FULLNAME_CAPACITY, &status)) >= 0){ + for (;;) { + { + CharString tmp; + CharStringByteSink sink(&tmp); + ulocimp_getParent(parentLocale.data(), sink, &status); + parentLocale = std::move(tmp); + } // look for pattern for srcPluralCount in locale tree - LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_UNIT, parentLocale, &status)); + LocalUResourceBundlePointer rb(ures_open(U_ICUDATA_UNIT, parentLocale.data(), &status)); LocalUResourceBundlePointer unitsRes(ures_getByKey(rb.getAlias(), key, nullptr, &status)); const char* timeUnitName = getTimeUnitName(srcTimeUnitField, status); LocalUResourceBundlePointer countsToPatternRB(ures_getByKey(unitsRes.getAlias(), timeUnitName, nullptr, &status)); @@ -594,14 +601,14 @@ TimeUnitFormat::searchInLocaleChain(UTimeUnitFormatStyle style, const char* key, return; } status = U_ZERO_ERROR; - if (locNameLen == 0) { + if (parentLocale.isEmpty()) { break; } } // if no unitsShort resource was found even after fallback to root locale // then search the units resource fallback from the current level to root - if ( locNameLen == 0 && uprv_strcmp(key, gShortUnitsTag) == 0) { + if ( parentLocale.isEmpty() && uprv_strcmp(key, gShortUnitsTag) == 0) { #ifdef TMUTFMT_DEBUG std::cout << "loop into searchInLocaleChain since Short-Long-Alternative \n"; #endif diff --git a/deps/icu-small/source/i18n/transreg.cpp b/deps/icu-small/source/i18n/transreg.cpp index 46c68eb74da92a..3441076334f563 100644 --- a/deps/icu-small/source/i18n/transreg.cpp +++ b/deps/icu-small/source/i18n/transreg.cpp @@ -11,6 +11,7 @@ */ #include "unicode/utypes.h" +#include "unicode/rep.h" #if !UCONFIG_NO_TRANSLITERATION @@ -531,7 +532,7 @@ TransliteratorRegistry::TransliteratorRegistry(UErrorCode& status) : registry(true, status), specDAG(true, SPECDAG_INIT_SIZE, status), variantList(VARIANT_LIST_INIT_SIZE, status), - availableIDs(AVAILABLE_IDS_INIT_SIZE, status) + availableIDs(true, AVAILABLE_IDS_INIT_SIZE, status) { registry.setValueDeleter(deleteEntry); variantList.setDeleter(uprv_deleteUObject); @@ -540,8 +541,6 @@ TransliteratorRegistry::TransliteratorRegistry(UErrorCode& status) : if (emptyString != nullptr) { variantList.adoptElement(emptyString, status); } - availableIDs.setDeleter(uprv_deleteUObject); - availableIDs.setComparer(uhash_compareCaselessUnicodeString); specDAG.setValueDeleter(uhash_deleteHashtable); } @@ -714,7 +713,7 @@ void TransliteratorRegistry::remove(const UnicodeString& ID) { TransliteratorIDParser::STVtoID(source, target, variant, id); registry.remove(id); removeSTV(source, target, variant); - availableIDs.removeElement((void*) &id); + availableIDs.remove(id); } //---------------------------------------------------------------------- @@ -728,7 +727,7 @@ void TransliteratorRegistry::remove(const UnicodeString& ID) { * i from 0 to countAvailableIDs() - 1. */ int32_t TransliteratorRegistry::countAvailableIDs() const { - return availableIDs.size(); + return availableIDs.count(); } /** @@ -738,10 +737,27 @@ int32_t TransliteratorRegistry::countAvailableIDs() const { * range, the result of getAvailableID(0) is returned. */ const UnicodeString& TransliteratorRegistry::getAvailableID(int32_t index) const { - if (index < 0 || index >= availableIDs.size()) { + if (index < 0 || index >= availableIDs.count()) { index = 0; } - return *(const UnicodeString*) availableIDs[index]; + + int32_t pos = UHASH_FIRST; + const UHashElement *e = nullptr; + while (index-- >= 0) { + e = availableIDs.nextElement(pos); + if (e == nullptr) { + break; + } + } + + if (e != nullptr) { + return *(UnicodeString*) e->key.pointer; + } + + // If the code reaches here, the hash table was likely modified during iteration. + // Return an statically initialized empty string due to reference return type. + static UnicodeString empty; + return empty; } StringEnumeration* TransliteratorRegistry::getAvailableIDs() const { @@ -852,14 +868,14 @@ UnicodeString& TransliteratorRegistry::getAvailableVariant(int32_t index, //---------------------------------------------------------------------- TransliteratorRegistry::Enumeration::Enumeration(const TransliteratorRegistry& _reg) : - index(0), reg(_reg) { + pos(UHASH_FIRST), size(_reg.availableIDs.count()), reg(_reg) { } TransliteratorRegistry::Enumeration::~Enumeration() { } int32_t TransliteratorRegistry::Enumeration::count(UErrorCode& /*status*/) const { - return reg.availableIDs.size(); + return size; } const UnicodeString* TransliteratorRegistry::Enumeration::snext(UErrorCode& status) { @@ -875,22 +891,27 @@ const UnicodeString* TransliteratorRegistry::Enumeration::snext(UErrorCode& stat if (U_FAILURE(status)) { return nullptr; } - int32_t n = reg.availableIDs.size(); - if (index > n) { + int32_t n = reg.availableIDs.count(); + if (n != size) { status = U_ENUM_OUT_OF_SYNC_ERROR; + return nullptr; } - // index == n is okay -- this means we've reached the end - if (index < n) { - // Copy the string! This avoids lifetime problems. - unistr = *(const UnicodeString*)reg.availableIDs[index++]; - return &unistr; - } else { + + const UHashElement* element = reg.availableIDs.nextElement(pos); + if (element == nullptr) { + // If the code reaches this point, it means that it's out of sync + // or the caller keeps asking for snext(). return nullptr; } + + // Copy the string! This avoids lifetime problems. + unistr = *(const UnicodeString*) element->key.pointer; + return &unistr; } void TransliteratorRegistry::Enumeration::reset(UErrorCode& /*status*/) { - index = 0; + pos = UHASH_FIRST; + size = reg.availableIDs.count(); } UOBJECT_DEFINE_RTTI_IMPLEMENTATION(TransliteratorRegistry::Enumeration) @@ -945,18 +966,12 @@ void TransliteratorRegistry::registerEntry(const UnicodeString& ID, registry.put(ID, adopted, status); if (visible) { registerSTV(source, target, variant); - if (!availableIDs.contains((void*) &ID)) { - UnicodeString *newID = ID.clone(); - // Check to make sure newID was created. - if (newID != nullptr) { - // NUL-terminate the ID string - newID->getTerminatedBuffer(); - availableIDs.adoptElement(newID, status); - } + if (!availableIDs.containsKey(ID)) { + availableIDs.puti(ID, /* unused value */ 1, status); } } else { removeSTV(source, target, variant); - availableIDs.removeElement((void*) &ID); + availableIDs.remove(ID); } } diff --git a/deps/icu-small/source/i18n/transreg.h b/deps/icu-small/source/i18n/transreg.h index da9c2ee8b9626b..3862be881d6267 100644 --- a/deps/icu-small/source/i18n/transreg.h +++ b/deps/icu-small/source/i18n/transreg.h @@ -423,7 +423,8 @@ class TransliteratorRegistry : public UMemory { static UClassID U_EXPORT2 getStaticClassID(); virtual UClassID getDynamicClassID() const override; private: - int32_t index; + int32_t pos; + int32_t size; const TransliteratorRegistry& reg; }; friend class Enumeration; @@ -452,7 +453,7 @@ class TransliteratorRegistry : public UMemory { /** * Vector of public full IDs. */ - UVector availableIDs; + Hashtable availableIDs; TransliteratorRegistry(const TransliteratorRegistry &other); // forbid copying of this class TransliteratorRegistry &operator=(const TransliteratorRegistry &other); // forbid copying of this class diff --git a/deps/icu-small/source/i18n/ucal.cpp b/deps/icu-small/source/i18n/ucal.cpp index 18d9cf4ec7eb54..dfc8e4f2511cb9 100644 --- a/deps/icu-small/source/i18n/ucal.cpp +++ b/deps/icu-small/source/i18n/ucal.cpp @@ -24,6 +24,7 @@ #include "unicode/localpointer.h" #include "cmemory.h" #include "cstring.h" +#include "iso8601cal.h" #include "ustrenum.h" #include "uenumimp.h" #include "ulist.h" @@ -307,7 +308,8 @@ ucal_setGregorianChange(UCalendar *cal, UDate date, UErrorCode *pErrorCode) { *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR; return; } - if(typeid(*cpp_cal) != typeid(GregorianCalendar)) { + if(typeid(*cpp_cal) != typeid(GregorianCalendar) && + typeid(*cpp_cal) != typeid(ISO8601Calendar)) { *pErrorCode = U_UNSUPPORTED_ERROR; return; } @@ -329,7 +331,8 @@ ucal_getGregorianChange(const UCalendar *cal, UErrorCode *pErrorCode) { *pErrorCode = U_ILLEGAL_ARGUMENT_ERROR; return (UDate)0; } - if(typeid(*cpp_cal) != typeid(GregorianCalendar)) { + if(typeid(*cpp_cal) != typeid(GregorianCalendar) && + typeid(*cpp_cal) != typeid(ISO8601Calendar)) { *pErrorCode = U_UNSUPPORTED_ERROR; return (UDate)0; } @@ -625,6 +628,16 @@ ucal_getCanonicalTimeZoneID(const char16_t* id, int32_t len, return reslen; } +U_DRAFT int32_t U_EXPORT2 +ucal_getIanaTimeZoneID(const char16_t* id, int32_t len, + char16_t* result, int32_t resultCapacity, UErrorCode* status) +{ + UnicodeString ianaID; + TimeZone::getIanaID(UnicodeString(id, len), ianaID, *status); + return ianaID.extract(result, resultCapacity, *status); +} + + U_CAPI const char * U_EXPORT2 ucal_getType(const UCalendar *cal, UErrorCode* status) { diff --git a/deps/icu-small/source/i18n/ucol_res.cpp b/deps/icu-small/source/i18n/ucol_res.cpp index 9bf28db264f885..4ec6582f8906ad 100644 --- a/deps/icu-small/source/i18n/ucol_res.cpp +++ b/deps/icu-small/source/i18n/ucol_res.cpp @@ -174,10 +174,20 @@ CollationLoader::CollationLoader(const CollationCacheEntry *re, const Locale &re defaultType[0] = 0; if(U_FAILURE(errorCode)) { return; } + if (locale.isBogus()) { + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + return; + } // Canonicalize the locale ID: Ignore all irrelevant keywords. const char *baseName = locale.getBaseName(); if(uprv_strcmp(locale.getName(), baseName) != 0) { locale = Locale(baseName); + // Due to ICU-22416, we may have bogus locale constructed from + // a string of getBaseName(). + if (locale.isBogus()) { + errorCode = U_ILLEGAL_ARGUMENT_ERROR; + return; + } // Fetch the collation type from the locale ID. int32_t typeLength = requested.getKeywordValue("collation", diff --git a/deps/icu-small/source/i18n/ucol_sit.cpp b/deps/icu-small/source/i18n/ucol_sit.cpp index a740286d79ed3c..2e5bce2cbaafea 100644 --- a/deps/icu-small/source/i18n/ucol_sit.cpp +++ b/deps/icu-small/source/i18n/ucol_sit.cpp @@ -20,6 +20,8 @@ #include "unicode/utf16.h" #include "utracimp.h" #include "ucol_imp.h" +#include "ulocimp.h" +#include "bytesinkutil.h" #include "cmemory.h" #include "cstring.h" #include "uresimp.h" @@ -86,7 +88,6 @@ static const char providerKeyword[] = "@sp="; static const int32_t locElementCount = UCOL_SIT_LOCELEMENT_MAX+1; static const int32_t locElementCapacity = 32; static const int32_t loc3066Capacity = 256; -static const int32_t internalBufferSize = 512; /* structure containing specification of a collator. Initialized * from a short string. Also used to construct a short string from a @@ -450,38 +451,37 @@ ucol_prepareShortStringOpen( const char *definition, ucol_sit_readSpecs(&s, definition, parseError, status); ucol_sit_calculateWholeLocale(&s, *status); - char buffer[internalBufferSize]; - uprv_memset(buffer, 0, internalBufferSize); - uloc_canonicalize(s.locale.data(), buffer, internalBufferSize, status); + CharString buffer; + { + CharStringByteSink sink(&buffer); + ulocimp_canonicalize(s.locale.data(), sink, status); + } - UResourceBundle *b = ures_open(U_ICUDATA_COLL, buffer, status); + UResourceBundle *b = ures_open(U_ICUDATA_COLL, buffer.data(), status); /* we try to find stuff from keyword */ UResourceBundle *collations = ures_getByKey(b, "collations", nullptr, status); UResourceBundle *collElem = nullptr; - char keyBuffer[256]; - // if there is a keyword, we pick it up and try to get elements - int32_t keyLen = uloc_getKeywordValue(buffer, "collation", keyBuffer, sizeof(keyBuffer), status); - // Treat too long a value as no keyword. - if(keyLen >= (int32_t)sizeof(keyBuffer)) { - keyLen = 0; - *status = U_ZERO_ERROR; + CharString keyBuffer; + { + // if there is a keyword, we pick it up and try to get elements + CharStringByteSink sink(&keyBuffer); + ulocimp_getKeywordValue(buffer.data(), "collation", sink, status); } - if(keyLen == 0) { + if(keyBuffer.isEmpty()) { // no keyword // we try to find the default setting, which will give us the keyword value UResourceBundle *defaultColl = ures_getByKeyWithFallback(collations, "default", nullptr, status); if(U_SUCCESS(*status)) { int32_t defaultKeyLen = 0; const char16_t *defaultKey = ures_getString(defaultColl, &defaultKeyLen, status); - u_UCharsToChars(defaultKey, keyBuffer, defaultKeyLen); - keyBuffer[defaultKeyLen] = 0; + keyBuffer.appendInvariantChars(defaultKey, defaultKeyLen, *status); } else { *status = U_INTERNAL_PROGRAM_ERROR; return; } ures_close(defaultColl); } - collElem = ures_getByKeyWithFallback(collations, keyBuffer, collElem, status); + collElem = ures_getByKeyWithFallback(collations, keyBuffer.data(), collElem, status); ures_close(collElem); ures_close(collations); ures_close(b); @@ -520,14 +520,16 @@ ucol_openFromShortString( const char *definition, string = ucol_sit_readSpecs(&s, definition, parseError, status); ucol_sit_calculateWholeLocale(&s, *status); - char buffer[internalBufferSize]; - uprv_memset(buffer, 0, internalBufferSize); #ifdef UCOL_TRACE_SIT fprintf(stderr, "DEF %s, DATA %s, ERR %s\n", definition, s.locale.data(), u_errorName(*status)); #endif - uloc_canonicalize(s.locale.data(), buffer, internalBufferSize, status); + CharString buffer; + { + CharStringByteSink sink(&buffer); + ulocimp_canonicalize(s.locale.data(), sink, status); + } - UCollator *result = ucol_open(buffer, status); + UCollator *result = ucol_open(buffer.data(), status); int32_t i = 0; for(i = 0; i < UCOL_ATTRIBUTE_COUNT; i++) { diff --git a/deps/icu-small/source/i18n/ulocdata.cpp b/deps/icu-small/source/i18n/ulocdata.cpp index 8e0687c5f6302d..0aab6295819ef2 100644 --- a/deps/icu-small/source/i18n/ulocdata.cpp +++ b/deps/icu-small/source/i18n/ulocdata.cpp @@ -68,13 +68,19 @@ ulocdata_open(const char *localeID, UErrorCode *status) uld->noSubstitute = false; uld->bundle = ures_open(nullptr, localeID, status); - uld->langBundle = ures_open(U_ICUDATA_LANG, localeID, status); if (U_FAILURE(*status)) { uprv_free(uld); return nullptr; } + // ICU-22149: not all functions require lang data, so fail gracefully if it is not present + UErrorCode oldStatus = *status; + uld->langBundle = ures_open(U_ICUDATA_LANG, localeID, status); + if (*status == U_MISSING_RESOURCE_ERROR) { + *status = oldStatus; + } + return uld; } @@ -288,6 +294,11 @@ ulocdata_getLocaleDisplayPattern(ULocaleData *uld, if (U_FAILURE(*status)) return 0; + if (uld->langBundle == nullptr) { + *status = U_MISSING_RESOURCE_ERROR; + return 0; + } + patternBundle = ures_getByKey(uld->langBundle, "localeDisplayPattern", nullptr, &localStatus); if ( (localStatus == U_USING_DEFAULT_WARNING) && uld->noSubstitute ) { @@ -340,6 +351,11 @@ ulocdata_getLocaleSeparator(ULocaleData *uld, if (U_FAILURE(*status)) return 0; + if (uld->langBundle == nullptr) { + *status = U_MISSING_RESOURCE_ERROR; + return 0; + } + separatorBundle = ures_getByKey(uld->langBundle, "localeDisplayPattern", nullptr, &localStatus); if ( (localStatus == U_USING_DEFAULT_WARNING) && uld->noSubstitute ) { diff --git a/deps/icu-small/source/i18n/unicode/calendar.h b/deps/icu-small/source/i18n/unicode/calendar.h index aa83866ac9cc82..26781f8a05685f 100644 --- a/deps/icu-small/source/i18n/unicode/calendar.h +++ b/deps/icu-small/source/i18n/unicode/calendar.h @@ -1237,7 +1237,8 @@ class U_I18N_API Calendar : public UObject { /** * Clears the value in the given time field, both making it unset and assigning it a * value of zero. This field value will be determined during the next resolving of - * time into time fields. + * time into time fields. Clearing UCAL_ORDINAL_MONTH or UCAL_MONTH will + * clear both fields. * * @param field The time field to be cleared. * @stable ICU 2.6. diff --git a/deps/icu-small/source/i18n/unicode/displayoptions.h b/deps/icu-small/source/i18n/unicode/displayoptions.h index 7bc763bbacd146..9cc822626b5c76 100644 --- a/deps/icu-small/source/i18n/unicode/displayoptions.h +++ b/deps/icu-small/source/i18n/unicode/displayoptions.h @@ -22,8 +22,6 @@ U_NAMESPACE_BEGIN -#ifndef U_HIDE_DRAFT_API - /** * Represents all the display options that are supported by CLDR such as grammatical case, noun * class, ... etc. It currently supports enums, but may be extended in the future to have other @@ -40,14 +38,14 @@ U_NAMESPACE_BEGIN * .build(); * ``` * - * @draft ICU 72 + * @stable ICU 72 */ class U_I18N_API DisplayOptions { public: /** * Responsible for building `DisplayOptions`. * - * @draft ICU 72 + * @stable ICU 72 */ class U_I18N_API Builder { public: @@ -56,7 +54,7 @@ class U_I18N_API DisplayOptions { * * @param grammaticalCase The grammatical case. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setGrammaticalCase(UDisplayOptionsGrammaticalCase grammaticalCase) { this->grammaticalCase = grammaticalCase; @@ -68,7 +66,7 @@ class U_I18N_API DisplayOptions { * * @param nounClass The noun class. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setNounClass(UDisplayOptionsNounClass nounClass) { this->nounClass = nounClass; @@ -80,7 +78,7 @@ class U_I18N_API DisplayOptions { * * @param pluralCategory The plural category. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setPluralCategory(UDisplayOptionsPluralCategory pluralCategory) { this->pluralCategory = pluralCategory; @@ -92,7 +90,7 @@ class U_I18N_API DisplayOptions { * * @param capitalization The capitalization. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setCapitalization(UDisplayOptionsCapitalization capitalization) { this->capitalization = capitalization; @@ -104,7 +102,7 @@ class U_I18N_API DisplayOptions { * * @param nameStyle The name style. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setNameStyle(UDisplayOptionsNameStyle nameStyle) { this->nameStyle = nameStyle; @@ -116,7 +114,7 @@ class U_I18N_API DisplayOptions { * * @param displayLength The display length. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setDisplayLength(UDisplayOptionsDisplayLength displayLength) { this->displayLength = displayLength; @@ -128,7 +126,7 @@ class U_I18N_API DisplayOptions { * * @param substituteHandling The substitute handling. * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder &setSubstituteHandling(UDisplayOptionsSubstituteHandling substituteHandling) { this->substituteHandling = substituteHandling; @@ -139,7 +137,7 @@ class U_I18N_API DisplayOptions { * Builds the display options. * * @return DisplayOptions - * @draft ICU 72 + * @stable ICU 72 */ DisplayOptions build() { return DisplayOptions(*this); } @@ -162,21 +160,21 @@ class U_I18N_API DisplayOptions { * Creates a builder with the `UNDEFINED` values for all the parameters. * * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ static Builder builder(); /** * Creates a builder with the same parameters from this object. * * @return Builder - * @draft ICU 72 + * @stable ICU 72 */ Builder copyToBuilder() const; /** * Gets the grammatical case. * * @return UDisplayOptionsGrammaticalCase - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsGrammaticalCase getGrammaticalCase() const { return grammaticalCase; } @@ -184,7 +182,7 @@ class U_I18N_API DisplayOptions { * Gets the noun class. * * @return UDisplayOptionsNounClass - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsNounClass getNounClass() const { return nounClass; } @@ -192,7 +190,7 @@ class U_I18N_API DisplayOptions { * Gets the plural category. * * @return UDisplayOptionsPluralCategory - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsPluralCategory getPluralCategory() const { return pluralCategory; } @@ -200,7 +198,7 @@ class U_I18N_API DisplayOptions { * Gets the capitalization. * * @return UDisplayOptionsCapitalization - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsCapitalization getCapitalization() const { return capitalization; } @@ -208,7 +206,7 @@ class U_I18N_API DisplayOptions { * Gets the dialect handling. * * @return UDisplayOptionsNameStyle - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsNameStyle getNameStyle() const { return nameStyle; } @@ -216,7 +214,7 @@ class U_I18N_API DisplayOptions { * Gets the display length. * * @return UDisplayOptionsDisplayLength - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsDisplayLength getDisplayLength() const { return displayLength; } @@ -224,7 +222,7 @@ class U_I18N_API DisplayOptions { * Gets the substitute handling. * * @return UDisplayOptionsSubstituteHandling - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsSubstituteHandling getSubstituteHandling() const { return substituteHandling; } @@ -232,7 +230,7 @@ class U_I18N_API DisplayOptions { * Copies the DisplayOptions. * * @param other The options to copy. - * @draft ICU 72 + * @stable ICU 72 */ DisplayOptions &operator=(const DisplayOptions &other) = default; @@ -240,7 +238,7 @@ class U_I18N_API DisplayOptions { * Moves the DisplayOptions. * * @param other The options to move from. - * @draft ICU 72 + * @stable ICU 72 */ DisplayOptions &operator=(DisplayOptions &&other) noexcept = default; @@ -248,7 +246,7 @@ class U_I18N_API DisplayOptions { * Copies the DisplayOptions. * * @param other The options to copy. - * @draft ICU 72 + * @stable ICU 72 */ DisplayOptions(const DisplayOptions &other) = default; @@ -263,8 +261,6 @@ class U_I18N_API DisplayOptions { UDisplayOptionsSubstituteHandling substituteHandling; }; -#endif // U_HIDE_DRAFT_API - U_NAMESPACE_END #endif /* #if !UCONFIG_NO_FORMATTING */ diff --git a/deps/icu-small/source/i18n/unicode/formattednumber.h b/deps/icu-small/source/i18n/unicode/formattednumber.h index 198c9d84782e2e..83178ea40efe85 100644 --- a/deps/icu-small/source/i18n/unicode/formattednumber.h +++ b/deps/icu-small/source/i18n/unicode/formattednumber.h @@ -140,19 +140,15 @@ class U_I18N_API FormattedNumber : public UMemory, public FormattedValue { */ MeasureUnit getOutputUnit(UErrorCode& status) const; -#ifndef U_HIDE_DRAFT_API - /** * Gets the noun class of the formatted output. Returns `UNDEFINED` when the noun class * is not supported yet. * * @return UDisplayOptionsNounClass - * @draft ICU 72 + * @stable ICU 72 */ UDisplayOptionsNounClass getNounClass(UErrorCode &status) const; -#endif // U_HIDE_DRAFT_API - #ifndef U_HIDE_INTERNAL_API /** diff --git a/deps/icu-small/source/i18n/unicode/gregocal.h b/deps/icu-small/source/i18n/unicode/gregocal.h index b85deb5ecfbb96..ab5a9c15716bc2 100644 --- a/deps/icu-small/source/i18n/unicode/gregocal.h +++ b/deps/icu-small/source/i18n/unicode/gregocal.h @@ -536,14 +536,6 @@ class U_I18N_API GregorianCalendar: public Calendar { virtual int32_t monthLength(int32_t month, int32_t year) const; #ifndef U_HIDE_INTERNAL_API - /** - * return the length of the given year. - * @param year the given year. - * @return the length of the given year. - * @internal - */ - int32_t yearLength(int32_t year) const; - /** * return the length of the year field. * @return the length of the year field @@ -551,14 +543,6 @@ class U_I18N_API GregorianCalendar: public Calendar { */ int32_t yearLength(void) const; - /** - * After adjustments such as add(MONTH), add(YEAR), we don't want the - * month to jump around. E.g., we don't want Jan 31 + 1 month to go to Mar - * 3, we want it to go to Feb 28. Adjustments which might run into this - * problem call this method to retain the proper month. - * @internal - */ - void pinDayOfMonth(void); #endif /* U_HIDE_INTERNAL_API */ /** diff --git a/deps/icu-small/source/i18n/unicode/measunit.h b/deps/icu-small/source/i18n/unicode/measunit.h index f7acc6990b2489..8f358357826808 100644 --- a/deps/icu-small/source/i18n/unicode/measunit.h +++ b/deps/icu-small/source/i18n/unicode/measunit.h @@ -371,7 +371,8 @@ class U_I18N_API MeasureUnit: public UObject { /** * Default constructor. - * Populates the instance with the base dimensionless unit. + * Populates the instance with the base dimensionless unit, which means that there will be + * no unit on the formatted number. * @stable ICU 3.0 */ MeasureUnit(); @@ -1527,23 +1528,21 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getNanosecond(); -#ifndef U_HIDE_DRAFT_API /** * Returns by pointer, unit of duration: quarter. * Caller owns returned value and must free it. * Also see {@link #getQuarter()}. * @param status ICU error code. - * @draft ICU 72 + * @stable ICU 72 */ static MeasureUnit *createQuarter(UErrorCode &status); /** * Returns by value, unit of duration: quarter. * Also see {@link #createQuarter()}. - * @draft ICU 72 + * @stable ICU 72 */ static MeasureUnit getQuarter(); -#endif /* U_HIDE_DRAFT_API */ /** * Returns by pointer, unit of duration: second. @@ -2737,23 +2736,21 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getTon(); -#ifndef U_HIDE_DRAFT_API /** * Returns by pointer, unit of mass: tonne. * Caller owns returned value and must free it. * Also see {@link #getTonne()}. * @param status ICU error code. - * @draft ICU 72 + * @stable ICU 72 */ static MeasureUnit *createTonne(UErrorCode &status); /** * Returns by value, unit of mass: tonne. * Also see {@link #createTonne()}. - * @draft ICU 72 + * @stable ICU 72 */ static MeasureUnit getTonne(); -#endif /* U_HIDE_DRAFT_API */ /** * Returns by pointer, unit of power: gigawatt. @@ -2883,6 +2880,24 @@ class U_I18N_API MeasureUnit: public UObject { */ static MeasureUnit getBar(); +#ifndef U_HIDE_DRAFT_API + /** + * Returns by pointer, unit of pressure: gasoline-energy-density. + * Caller owns returned value and must free it. + * Also see {@link #getGasolineEnergyDensity()}. + * @param status ICU error code. + * @draft ICU 74 + */ + static MeasureUnit *createGasolineEnergyDensity(UErrorCode &status); + + /** + * Returns by value, unit of pressure: gasoline-energy-density. + * Also see {@link #createGasolineEnergyDensity()}. + * @draft ICU 74 + */ + static MeasureUnit getGasolineEnergyDensity(); +#endif /* U_HIDE_DRAFT_API */ + /** * Returns by pointer, unit of pressure: hectopascal. * Caller owns returned value and must free it. diff --git a/deps/icu-small/source/i18n/unicode/measure.h b/deps/icu-small/source/i18n/unicode/measure.h index 31f931d7d4a9e6..fbef17c8f03884 100644 --- a/deps/icu-small/source/i18n/unicode/measure.h +++ b/deps/icu-small/source/i18n/unicode/measure.h @@ -89,6 +89,16 @@ class U_I18N_API Measure: public UObject { */ bool operator==(const UObject& other) const; +#ifndef U_HIDE_DRAFT_API + /** + * Inequality operator. Returns true if this object is not equal to the other object. + * @param other the object to compare with + * @return true if the objects are not equal + * @draft ICU 74 + */ + inline bool operator!=(const UObject& other) const { return !operator==(other); } +#endif // U_HIDE_DRAFT_API + /** * Return a reference to the numeric value of this object. The * numeric value may be of any numeric type supported by diff --git a/deps/icu-small/source/i18n/unicode/numberformatter.h b/deps/icu-small/source/i18n/unicode/numberformatter.h index caf98e3dfa6be4..069324a9ef3eec 100644 --- a/deps/icu-small/source/i18n/unicode/numberformatter.h +++ b/deps/icu-small/source/i18n/unicode/numberformatter.h @@ -80,6 +80,9 @@ * This API is based on the fluent design pattern popularized by libraries such as Google's Guava. For * extensive details on the design of this API, read the design doc. * + *

    + * Note: To format monetary/currency values, specify the currency in the `.unit()` function. + * * @author Shane Carr */ @@ -2257,14 +2260,13 @@ class U_I18N_API NumberFormatterSettings { */ Derived usage(StringPiece usage) &&; -#ifndef U_HIDE_DRAFT_API /** * Specifies the DisplayOptions. For example, UDisplayOptionsGrammaticalCase specifies * the desired case for a unit formatter's output (e.g. accusative, dative, genitive). * * @param displayOptions * @return The fluent chain. - * @draft ICU 72 + * @stable ICU 72 */ Derived displayOptions(const DisplayOptions &displayOptions) const &; @@ -2273,10 +2275,9 @@ class U_I18N_API NumberFormatterSettings { * * @param displayOptions * @return The fluent chain. - * @draft ICU 72 + * @stable ICU 72 */ Derived displayOptions(const DisplayOptions &displayOptions) &&; -#endif // U_HIDE_DRAFT_API #ifndef U_HIDE_INTERNAL_API /** diff --git a/deps/icu-small/source/i18n/unicode/rbnf.h b/deps/icu-small/source/i18n/unicode/rbnf.h index 0336ac1f81e99a..f9a1c8f93a5b85 100644 --- a/deps/icu-small/source/i18n/unicode/rbnf.h +++ b/deps/icu-small/source/i18n/unicode/rbnf.h @@ -64,18 +64,20 @@ enum URBNFRuleSetTag { * @stable ICU 2.2 */ URBNF_ORDINAL, +#ifndef U_HIDE_DEPRECATED_API /** * Requests predefined ruleset for formatting a value as a duration in hours, minutes, and seconds. - * @stable ICU 2.2 + * @deprecated ICU 74 Use MeasureFormat instead. */ URBNF_DURATION, +#endif // U_HIDE_DERECATED_API /** * Requests predefined ruleset for various non-place-value numbering systems. * WARNING: The same resource contains rule sets for a variety of different numbering systems. * You need to call setDefaultRuleSet() on the formatter to choose the actual numbering system. * @stable ICU 2.2 */ - URBNF_NUMBERING_SYSTEM, + URBNF_NUMBERING_SYSTEM = 3, #ifndef U_HIDE_DEPRECATED_API /** * One more than the highest normal URBNFRuleSetTag value. diff --git a/deps/icu-small/source/i18n/unicode/reldatefmt.h b/deps/icu-small/source/i18n/unicode/reldatefmt.h index 4123468c6521c9..5dc4905b12a825 100644 --- a/deps/icu-small/source/i18n/unicode/reldatefmt.h +++ b/deps/icu-small/source/i18n/unicode/reldatefmt.h @@ -248,8 +248,6 @@ typedef enum UDateDirection { #endif // U_HIDE_DEPRECATED_API } UDateDirection; -#if !UCONFIG_NO_BREAK_ITERATION - U_NAMESPACE_BEGIN class BreakIterator; @@ -560,7 +558,7 @@ class U_I18N_API RelativeDateTimeFormatter : public UObject { * * This method returns a String. To get more information about the * formatting result, use formatNumericToValue(). - * + * * @param offset The signed offset for the specified unit. This * will be formatted according to this object's * NumberFormat object. @@ -586,7 +584,7 @@ class U_I18N_API RelativeDateTimeFormatter : public UObject { * * This method returns a FormattedRelativeDateTime, which exposes more * information than the String returned by formatNumeric(). - * + * * @param offset The signed offset for the specified unit. This * will be formatted according to this object's * NumberFormat object. @@ -696,11 +694,19 @@ class U_I18N_API RelativeDateTimeFormatter : public UObject { const SharedPluralRules *fPluralRules; UDateRelativeDateTimeFormatterStyle fStyle; UDisplayContext fContext; +#if !UCONFIG_NO_BREAK_ITERATION const SharedBreakIterator *fOptBreakIterator; +#else + std::nullptr_t fOptBreakIterator = nullptr; +#endif // !UCONFIG_NO_BREAK_ITERATION Locale fLocale; void init( NumberFormat *nfToAdopt, +#if !UCONFIG_NO_BREAK_ITERATION BreakIterator *brkIter, +#else + std::nullptr_t, +#endif // !UCONFIG_NO_BREAK_ITERATION UErrorCode &status); UnicodeString& adjustForContext(UnicodeString &) const; UBool checkNoAdjustForContext(UErrorCode& status) const; @@ -743,7 +749,6 @@ class U_I18N_API RelativeDateTimeFormatter : public UObject { U_NAMESPACE_END -#endif /* !UCONFIG_NO_BREAK_ITERATION */ #endif /* !UCONFIG_NO_FORMATTING */ #endif /* U_SHOW_CPLUSPLUS_API */ diff --git a/deps/icu-small/source/i18n/unicode/timezone.h b/deps/icu-small/source/i18n/unicode/timezone.h index a2c0552c189715..e512ef7f92cf75 100644 --- a/deps/icu-small/source/i18n/unicode/timezone.h +++ b/deps/icu-small/source/i18n/unicode/timezone.h @@ -444,6 +444,37 @@ class U_I18N_API TimeZone : public UObject { static UnicodeString& U_EXPORT2 getCanonicalID(const UnicodeString& id, UnicodeString& canonicalID, UBool& isSystemID, UErrorCode& status); + +#ifndef U_HIDE_DRAFT_API + /** + * Returns the preferred time zone ID in the IANA time zone database for the given time zone ID. + * There are two types of preferred IDs. The first type is the one defined in zone.tab file, + * such as "America/Los_Angeles". The second types is the one defined for zones not associated + * with a specific region, but not defined with "Link" syntax such as "Etc/GMT+10". + * + *

    Note: For most of valid time zone IDs, this method returns an ID same as getCanonicalID(). + * getCanonicalID() is based on canonical time zone IDs defined in Unicode CLDR. + * These canonical time zone IDs in CLDR were based on very old version of the time zone database. + * In the IANA time zone database, some IDs were updated since then. This API returns a newer + * time zone ID. For example, CLDR defines "Asia/Calcutta" as the canonical time zone ID. This + * method returns "Asia/Kolkata" instead. + *

    "Etc/Unknown" is a special time zone ID defined by CLDR. There are no corresponding zones + * in the IANA time zone database. Therefore, this API returns U_ILLEGAL_ARGUMENT_ERROR when the + * input ID is "Etc/Unknown". + * + * @param id The input time zone ID. + * @param ianaID Receives the preferred time zone ID in the IANA time zone database. When + * the given time zone ID is not a known time zone ID, this method sets an + * invalid (bogus) string. + * @param status Receives the status. When the given time zone ID is not a known time zone + * ID, U_ILLEGAL_ARGUMENT_ERROR is set. + * @return A reference to the result. + * @draft ICU 74 + */ + static UnicodeString& U_EXPORT2 getIanaID(const UnicodeString&id, UnicodeString& ianaID, + UErrorCode& status); +#endif // U_HIDE_DRAFT_API + /** * Converts a system time zone ID to an equivalent Windows time zone ID. For example, * Windows time zone ID "Pacific Standard Time" is returned for input "America/Los_Angeles". diff --git a/deps/icu-small/source/i18n/unicode/ucal.h b/deps/icu-small/source/i18n/unicode/ucal.h index f428dfcc616032..f351b6c9dbb1eb 100644 --- a/deps/icu-small/source/i18n/unicode/ucal.h +++ b/deps/icu-small/source/i18n/unicode/ucal.h @@ -1393,6 +1393,38 @@ ucal_getTZDataVersion(UErrorCode* status); U_CAPI int32_t U_EXPORT2 ucal_getCanonicalTimeZoneID(const UChar* id, int32_t len, UChar* result, int32_t resultCapacity, UBool *isSystemID, UErrorCode* status); + +#ifndef U_HIDE_DRAFT_API +/** + * Returns the preferred time zone ID in the IANA time zone database for the given time zone ID. + * There are two types of preferred IDs. The first type is the one defined in zone.tab file, + * such as "America/Los_Angeles". The second types is the one defined for zones not associated + * with a specific region, but not defined with "Link" syntax such as "Etc/GMT+10". + * + *

    Note: For most of valid time zone IDs, this method returns an ID same as ucal_getCanonicalTimeZoneID(). + * ucal_getCanonicalTimeZoneID() is based on canonical time zone IDs defined in Unicode CLDR. + * These canonical time zone IDs in CLDR were based on very old version of the time zone database. + * In the IANA time zone database, some IDs were updated since then. This API returns a newer + * time zone ID. For example, CLDR defines "Asia/Calcutta" as the canonical time zone ID. This + * method returns "Asia/Kolkata" instead. + *

    "Etc/Unknown" is a special time zone ID defined by CLDR. There are no corresponding zones + * in the IANA time zone database. Therefore, this API returns U_ILLEGAL_ARGUMENT_ERROR when the + * input ID is "Etc/Unknown". + * + * @param id The input time zone ID. + * @param len The length of the input time zone ID. + * @param result The buffer receives the preferred time zone ID in the IANA time zone database. + * @param resultCapacity The capacity of the result buffer. + * @param status Receives the status. When the given time zone ID is not a known system time zone + * ID, U_ILLEGAL_ARGUMENT_ERROR is set. + * @return The result string length, not including the terminating null. + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 +ucal_getIanaTimeZoneID(const UChar* id, int32_t len, + UChar* result, int32_t resultCapacity, UErrorCode* status); +#endif // U_HIDE_DRAFT_API + /** * Get the resource keyword value string designating the calendar type for the UCalendar. * @param cal The UCalendar to query. diff --git a/deps/icu-small/source/i18n/unicode/ucol.h b/deps/icu-small/source/i18n/unicode/ucol.h index 24963312216941..e4ec2f74185aee 100644 --- a/deps/icu-small/source/i18n/unicode/ucol.h +++ b/deps/icu-small/source/i18n/unicode/ucol.h @@ -251,42 +251,52 @@ typedef enum { */ UCOL_FRENCH_COLLATION, /** Attribute for handling variable elements. - * Acceptable values are UCOL_NON_IGNORABLE (default) - * which treats all the codepoints with non-ignorable + * Acceptable values are UCOL_NON_IGNORABLE + * which treats all the codepoints with non-ignorable * primary weights in the same way, - * and UCOL_SHIFTED which causes codepoints with primary + * and UCOL_SHIFTED which causes codepoints with primary * weights that are equal or below the variable top value - * to be ignored on primary level and moved to the quaternary - * level. + * to be ignored on primary level and moved to the quaternary + * level. The default setting in a Collator object depends on the + * locale data loaded from the resources. For most locales, the + * default is UCOL_NON_IGNORABLE, but for others, such as "th", + * the default could be UCOL_SHIFTED. * @stable ICU 2.0 */ - UCOL_ALTERNATE_HANDLING, + UCOL_ALTERNATE_HANDLING, /** Controls the ordering of upper and lower case letters. - * Acceptable values are UCOL_OFF (default), which orders + * Acceptable values are UCOL_OFF, which orders * upper and lower case letters in accordance to their tertiary - * weights, UCOL_UPPER_FIRST which forces upper case letters to - * sort before lower case letters, and UCOL_LOWER_FIRST which does - * the opposite. + * weights, UCOL_UPPER_FIRST which forces upper case letters to + * sort before lower case letters, and UCOL_LOWER_FIRST which does + * the opposite. The default setting in a Collator object depends on the + * locale data loaded from the resources. For most locales, the + * default is UCOL_OFF, but for others, such as "da" or "mt", + * the default could be UCOL_UPPER. * @stable ICU 2.0 */ - UCOL_CASE_FIRST, + UCOL_CASE_FIRST, /** Controls whether an extra case level (positioned before the third - * level) is generated or not. Acceptable values are UCOL_OFF (default), + * level) is generated or not. Acceptable values are UCOL_OFF, * when case level is not generated, and UCOL_ON which causes the case * level to be generated. Contents of the case level are affected by - * the value of UCOL_CASE_FIRST attribute. A simple way to ignore + * the value of UCOL_CASE_FIRST attribute. A simple way to ignore * accent differences in a string is to set the strength to UCOL_PRIMARY - * and enable case level. + * and enable case level. The default setting in a Collator object depends + * on the locale data loaded from the resources. * @stable ICU 2.0 */ UCOL_CASE_LEVEL, /** Controls whether the normalization check and necessary normalizations - * are performed. When set to UCOL_OFF (default) no normalization check - * is performed. The correctness of the result is guaranteed only if the + * are performed. When set to UCOL_OFF no normalization check + * is performed. The correctness of the result is guaranteed only if the * input data is in so-called FCD form (see users manual for more info). * When set to UCOL_ON, an incremental check is performed to see whether * the input data is in the FCD form. If the data is not in the FCD form, - * incremental NFD normalization is performed. + * incremental NFD normalization is performed. The default setting in a + * Collator object depends on the locale data loaded from the resources. + * For many locales, the default is UCOL_OFF, but for others, such as "hi" + * "vi', or "bn", * the default could be UCOL_ON. * @stable ICU 2.0 */ UCOL_NORMALIZATION_MODE, diff --git a/deps/icu-small/source/i18n/unicode/udisplayoptions.h b/deps/icu-small/source/i18n/unicode/udisplayoptions.h index 1ecdf1d8e94463..490bc01cf3989f 100644 --- a/deps/icu-small/source/i18n/unicode/udisplayoptions.h +++ b/deps/icu-small/source/i18n/unicode/udisplayoptions.h @@ -18,47 +18,45 @@ #include "unicode/uversion.h" -#ifndef U_HIDE_DRAFT_API - /** * Represents all the grammatical cases that are supported by CLDR. * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsGrammaticalCase { /** * A possible setting for GrammaticalCase. * The grammatical case context to be used is unknown (this is the default value). - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_UNDEFINED = 0, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_ABLATIVE = 1, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_ACCUSATIVE = 2, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_COMITATIVE = 3, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_DATIVE = 4, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_ERGATIVE = 5, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_GENITIVE = 6, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_INSTRUMENTAL = 7, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_LOCATIVE = 8, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_LOCATIVE_COPULATIVE = 9, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_NOMINATIVE = 10, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_OBLIQUE = 11, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_PREPOSITIONAL = 12, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_SOCIATIVE = 13, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_GRAMMATICAL_CASE_VOCATIVE = 14, } UDisplayOptionsGrammaticalCase; @@ -66,7 +64,7 @@ typedef enum UDisplayOptionsGrammaticalCase { * @param grammaticalCase The grammatical case. * @return the lowercase CLDR keyword string for the grammatical case. * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI const char * U_EXPORT2 udispopt_getGrammaticalCaseIdentifier(UDisplayOptionsGrammaticalCase grammaticalCase); @@ -75,7 +73,7 @@ udispopt_getGrammaticalCaseIdentifier(UDisplayOptionsGrammaticalCase grammatical * @param identifier in lower case such as "dative" or "nominative" * @return the plural category corresponding to the identifier, or `UDISPOPT_GRAMMATICAL_CASE_UNDEFINED` * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI UDisplayOptionsGrammaticalCase U_EXPORT2 udispopt_fromGrammaticalCaseIdentifier(const char *identifier); @@ -84,7 +82,7 @@ udispopt_fromGrammaticalCaseIdentifier(const char *identifier); * Standard CLDR plural form/category constants. * See https://www.unicode.org/reports/tr35/tr35-numbers.html#Language_Plural_Rules * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsPluralCategory { @@ -92,20 +90,20 @@ typedef enum UDisplayOptionsPluralCategory { * A possible setting for PluralCategory. * The plural category case context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_UNDEFINED = 0, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_ZERO = 1, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_ONE = 2, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_TWO = 3, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_FEW = 4, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_MANY = 5, - /** @draft ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_PLURAL_CATEGORY_OTHER = 6, } UDisplayOptionsPluralCategory; @@ -113,7 +111,7 @@ typedef enum UDisplayOptionsPluralCategory { * @param pluralCategory The plural category. * @return the lowercase CLDR identifier string for the plural category. * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI const char * U_EXPORT2 udispopt_getPluralCategoryIdentifier(UDisplayOptionsPluralCategory pluralCategory); @@ -123,7 +121,7 @@ udispopt_getPluralCategoryIdentifier(UDisplayOptionsPluralCategory pluralCategor * @return the plural category corresponding to the identifier (plural keyword), * or `UDISPOPT_PLURAL_CATEGORY_UNDEFINED` * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI UDisplayOptionsPluralCategory U_EXPORT2 udispopt_fromPluralCategoryIdentifier(const char *identifier); @@ -131,31 +129,31 @@ udispopt_fromPluralCategoryIdentifier(const char *identifier); /** * Represents all the grammatical noun classes that are supported by CLDR. * - * @draft ICU 72. + * @stable ICU 72. */ typedef enum UDisplayOptionsNounClass { /** * A possible setting for NounClass. * The noun class case context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_NOUN_CLASS_UNDEFINED = 0, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_OTHER = 1, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_NEUTER = 2, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_FEMININE = 3, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_MASCULINE = 4, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_ANIMATE = 5, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_INANIMATE = 6, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_PERSONAL = 7, - /** ICU 72 */ + /** @stable ICU 72 */ UDISPOPT_NOUN_CLASS_COMMON = 8, } UDisplayOptionsNounClass; @@ -163,7 +161,7 @@ typedef enum UDisplayOptionsNounClass { * @param nounClass The noun class. * @return the lowercase CLDR keyword string for the noun class. * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI const char * U_EXPORT2 udispopt_getNounClassIdentifier(UDisplayOptionsNounClass nounClass); @@ -172,7 +170,7 @@ udispopt_getNounClassIdentifier(UDisplayOptionsNounClass nounClass); * @param identifier in lower case such as "feminine" or "masculine" * @return the plural category corresponding to the identifier, or `UDISPOPT_NOUN_CLASS_UNDEFINED` * - * @draft ICU 72 + * @stable ICU 72 */ U_CAPI UDisplayOptionsNounClass U_EXPORT2 udispopt_fromNounClassIdentifier(const char *identifier); @@ -180,14 +178,14 @@ udispopt_fromNounClassIdentifier(const char *identifier); /** * Represents all the capitalization options. * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsCapitalization { /** * A possible setting for Capitalization. * The capitalization context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_CAPITALIZATION_UNDEFINED = 0, @@ -195,7 +193,7 @@ typedef enum UDisplayOptionsCapitalization { * The capitalization context if a date, date symbol or display name is to be * formatted with capitalization appropriate for the beginning of a sentence. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_CAPITALIZATION_BEGINNING_OF_SENTENCE = 1, @@ -203,7 +201,7 @@ typedef enum UDisplayOptionsCapitalization { * The capitalization context if a date, date symbol or display name is to be * formatted with capitalization appropriate for the middle of a sentence. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_CAPITALIZATION_MIDDLE_OF_SENTENCE = 2, @@ -212,7 +210,7 @@ typedef enum UDisplayOptionsCapitalization { * formatted with capitalization appropriate for stand-alone usage such as an * isolated name on a calendar page. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_CAPITALIZATION_STANDALONE = 3, @@ -220,7 +218,7 @@ typedef enum UDisplayOptionsCapitalization { * The capitalization context if a date, date symbol or display name is to be * formatted with capitalization appropriate for a user-interface list or menu item. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_CAPITALIZATION_UI_LIST_OR_MENU = 4, } UDisplayOptionsCapitalization; @@ -228,14 +226,14 @@ typedef enum UDisplayOptionsCapitalization { /** * Represents all the dialect handlings. * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsNameStyle { /** * A possible setting for NameStyle. * The NameStyle context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_NAME_STYLE_UNDEFINED = 0, @@ -243,7 +241,7 @@ typedef enum UDisplayOptionsNameStyle { * Use standard names when generating a locale name, * e.g. en_GB displays as 'English (United Kingdom)'. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_NAME_STYLE_STANDARD_NAMES = 1, @@ -251,7 +249,7 @@ typedef enum UDisplayOptionsNameStyle { * Use dialect names, when generating a locale name, * e.g. en_GB displays as 'British English'. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_NAME_STYLE_DIALECT_NAMES = 2, } UDisplayOptionsNameStyle; @@ -259,14 +257,14 @@ typedef enum UDisplayOptionsNameStyle { /** * Represents all the display lengths. * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsDisplayLength { /** * A possible setting for DisplayLength. * The DisplayLength context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_DISPLAY_LENGTH_UNDEFINED = 0, @@ -274,7 +272,7 @@ typedef enum UDisplayOptionsDisplayLength { * Uses full names when generating a locale name, * e.g. "United States" for US. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_DISPLAY_LENGTH_FULL = 1, @@ -282,7 +280,7 @@ typedef enum UDisplayOptionsDisplayLength { * Use short names when generating a locale name, * e.g. "U.S." for US. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_DISPLAY_LENGTH_SHORT = 2, } UDisplayOptionsDisplayLength; @@ -290,7 +288,7 @@ typedef enum UDisplayOptionsDisplayLength { /** * Represents all the substitute handling. * - * @draft ICU 72 + * @stable ICU 72 */ typedef enum UDisplayOptionsSubstituteHandling { @@ -298,7 +296,7 @@ typedef enum UDisplayOptionsSubstituteHandling { * A possible setting for SubstituteHandling. * The SubstituteHandling context to be used is unknown (this is the default value). * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_SUBSTITUTE_HANDLING_UNDEFINED = 0, @@ -306,20 +304,18 @@ typedef enum UDisplayOptionsSubstituteHandling { * Returns a fallback value (e.g., the input code) when no data is available. * This is the default behaviour. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_SUBSTITUTE_HANDLING_SUBSTITUTE = 1, /** * Returns a null value when no data is available. * - * @draft ICU 72 + * @stable ICU 72 */ UDISPOPT_SUBSTITUTE_HANDLING_NO_SUBSTITUTE = 2, } UDisplayOptionsSubstituteHandling; -#endif // U_HIDE_DRAFT_API - #endif /* #if !UCONFIG_NO_FORMATTING */ #endif // __UDISPLAYOPTIONS_H__ diff --git a/deps/icu-small/source/i18n/unicode/unum.h b/deps/icu-small/source/i18n/unicode/unum.h index 172ed08964be71..2dd2badc1bd7ac 100644 --- a/deps/icu-small/source/i18n/unicode/unum.h +++ b/deps/icu-small/source/i18n/unicode/unum.h @@ -1107,7 +1107,6 @@ typedef enum UNumberFormatAttribute { } UNumberFormatAttribute; -#ifndef U_HIDE_DRAFT_API /** * Returns true if the formatter supports the specified attribute and false if not. * @param fmt The formatter to query. @@ -1120,12 +1119,11 @@ typedef enum UNumberFormatAttribute { * @see unum_setDoubleAttribute * @see unum_getTextAttribute * @see unum_setTextAttribute -* @draft ICU 72 +* @stable ICU 72 */ U_CAPI bool U_EXPORT2 unum_hasAttribute(const UNumberFormat* fmt, UNumberFormatAttribute attr); -#endif // U_HIDE_DRAFT_API /** * Get a numeric attribute associated with a UNumberFormat. diff --git a/deps/icu-small/source/i18n/unicode/ureldatefmt.h b/deps/icu-small/source/i18n/unicode/ureldatefmt.h index 3c448900437e45..0882360d147af0 100644 --- a/deps/icu-small/source/i18n/unicode/ureldatefmt.h +++ b/deps/icu-small/source/i18n/unicode/ureldatefmt.h @@ -12,7 +12,7 @@ #include "unicode/utypes.h" -#if !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION +#if !UCONFIG_NO_FORMATTING #include "unicode/unum.h" #include "unicode/udisplaycontext.h" @@ -505,6 +505,6 @@ ureldatefmt_combineDateAndTime( const URelativeDateTimeFormatter* reldatefmt, int32_t resultCapacity, UErrorCode* status ); -#endif /* !UCONFIG_NO_FORMATTING && !UCONFIG_NO_BREAK_ITERATION */ +#endif /* !UCONFIG_NO_FORMATTING */ #endif diff --git a/deps/icu-small/source/i18n/unicode/uspoof.h b/deps/icu-small/source/i18n/unicode/uspoof.h index 442655bb54bdb0..20d29d62b23fd4 100644 --- a/deps/icu-small/source/i18n/unicode/uspoof.h +++ b/deps/icu-small/source/i18n/unicode/uspoof.h @@ -19,6 +19,7 @@ #ifndef USPOOF_H #define USPOOF_H +#include "unicode/ubidi.h" #include "unicode/utypes.h" #include "unicode/uset.h" #include "unicode/parseerr.h" @@ -83,6 +84,25 @@ * the instance should be created once (e.g., upon application startup), and the efficient * {@link uspoof_areConfusable} method can be used at runtime. * + * If the paragraph direction used to display the strings is known, the bidi function should be used instead: + * + * \code{.c} + * UErrorCode status = U_ZERO_ERROR; + * // These strings look identical when rendered in a left-to-right context. + * // They look distinct in a right-to-left context. + * UChar* str1 = (UChar*) u"A1\u05D0"; // A1א + * UChar* str2 = (UChar*) u"A\u05D01"; // Aא1 + * + * USpoofChecker* sc = uspoof_open(&status); + * uspoof_setChecks(sc, USPOOF_CONFUSABLE, &status); + * + * int32_t bitmask = uspoof_areBidiConfusable(sc, UBIDI_LTR, str1, -1, str2, -1, &status); + * UBool result = bitmask != 0; + * // areBidiConfusable: 1 (status: U_ZERO_ERROR) + * printf("areBidiConfusable: %d (status: %s)\n", result, u_errorName(status)); + * uspoof_close(sc); + * \endcode + * *

    * The type {@link LocalUSpoofCheckerPointer} is exposed for C++ programmers. It will automatically call * {@link uspoof_close} when the object goes out of scope: @@ -339,6 +359,51 @@ * COMMON or INHERITED, such as numbers and punctuation, are ignored when computing whether a string has multiple * scripts. * + *

    Advanced bidirectional usage

    + * If the paragraph direction with which the identifiers will be displayed is not known, there are + * multiple options for confusable detection depending on the circumstances. + * + *

    + * In some circumstances, the only concern is confusion between identifiers displayed with the same + * paragraph direction. + * + *

    + * An example is the case where identifiers are usernames prefixed with the @ symbol. + * That symbol will appear to the left in a left-to-right context, and to the right in a + * right-to-left context, so that an identifier displayed in a left-to-right context can never be + * confused with an identifier displayed in a right-to-left context: + *

      + *
    • + * The usernames "A1א" (A one aleph) and "Aא1" (A aleph 1) + * would be considered confusable, since they both appear as \@A1א in a left-to-right context, and the + * usernames "אA_1" (aleph A underscore one) and "א1_A" (aleph one underscore A) would be considered + * confusable, since they both appear as A_1א@ in a right-to-left context. + *
    • + *
    • + * The username "Mark_" would not be considered confusable with the username "_Mark", + * even though the latter would appear as Mark_@ in a right-to-left context, and the + * former as \@Mark_ in a left-to-right context. + *
    • + *
    + *

    + * In that case, the caller should check for both LTR-confusability and RTL-confusability: + * + * \code{.cpp} + * bool confusableInEitherDirection = + * uspoof_areBidiConfusableUnicodeString(sc, UBIDI_LTR, id1, id2, &status) || + * uspoof_areBidiConfusableUnicodeString(sc, UBIDI_RTL, id1, id2, &status); + * \endcode + * + * If the bidiSkeleton is used, the LTR and RTL skeleta should be kept separately and compared, LTR + * with LTR and RTL with RTL. + * + *

    + * In cases where confusability between the visual appearances of an identifier displayed in a + * left-to-right context with another identifier displayed in a right-to-left context is a concern, + * the LTR skeleton of one can be compared with the RTL skeleton of the other. However, this + * very broad definition of confusability may have unexpected results; for instance, it treats the + * ASCII identifiers "Mark_" and "_Mark" as confusable. + * *

    Additional Information

    * * A USpoofChecker instance may be used repeatedly to perform checks on any number of identifiers. @@ -519,7 +584,7 @@ typedef enum USpoofChecks { /** - * Constants from UAX #39 for use in {@link uspoof_setRestrictionLevel}, and + * Constants from UTS #39 for use in {@link uspoof_setRestrictionLevel}, and * for returned identifier restriction levels in check results. * * @stable ICU 51 @@ -633,8 +698,8 @@ uspoof_openFromSerialized(const void *data, int32_t length, int32_t *pActualLeng /** * Open a Spoof Checker from the source form of the spoof data. * The input corresponds to the Unicode data file confusables.txt - * as described in Unicode UAX #39. The syntax of the source data - * is as described in UAX #39 for this file, and the content of + * as described in Unicode Technical Standard #39. The syntax of the source data + * is as described in UTS #39 for this file, and the content of * this file is acceptable input. * * The character encoding of the (char *) input text is UTF-8. @@ -1111,7 +1176,7 @@ uspoof_getCheckResultNumerics(const USpoofCheckResult *checkResult, UErrorCode * /** - * Check the whether two specified strings are visually confusable. + * Check whether two specified strings are visually confusable. * * If the strings are confusable, the return value will be nonzero, as long as * {@link USPOOF_CONFUSABLE} was enabled in uspoof_setChecks(). @@ -1159,7 +1224,58 @@ uspoof_areConfusable(const USpoofChecker *sc, const UChar *id2, int32_t length2, UErrorCode *status); - +#ifndef U_HIDE_DRAFT_API +/** + * Check whether two specified strings are visually confusable when + * displayed in a context with the given paragraph direction. + * + * If the strings are confusable, the return value will be nonzero, as long as + * {@link USPOOF_CONFUSABLE} was enabled in uspoof_setChecks(). + * + * The bits in the return value correspond to flags for each of the classes of + * confusables applicable to the two input strings. According to UTS 39 + * section 4, the possible flags are: + * + *
      + *
    • {@link USPOOF_SINGLE_SCRIPT_CONFUSABLE}
    • + *
    • {@link USPOOF_MIXED_SCRIPT_CONFUSABLE}
    • + *
    • {@link USPOOF_WHOLE_SCRIPT_CONFUSABLE}
    • + *
    + * + * If one or more of the above flags were not listed in uspoof_setChecks(), this + * function will never report that class of confusable. The check + * {@link USPOOF_CONFUSABLE} enables all three flags. + * + * + * @param sc The USpoofChecker + * @param direction The paragraph direction with which the identifiers are + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param id1 The first of the two identifiers to be compared for + * confusability. The strings are in UTF-16 format. + * @param length1 the length of the first identifier, expressed in + * 16 bit UTF-16 code units, or -1 if the string is + * nul terminated. + * @param id2 The second of the two identifiers to be compared for + * confusability. The identifiers are in UTF-16 format. + * @param length2 The length of the second identifiers, expressed in + * 16 bit UTF-16 code units, or -1 if the string is + * nul terminated. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Confusability of the identifiers is not reported here, + * but through this function's return value. + * @return An integer value with bit(s) set corresponding to + * the type of confusability found, as defined by + * enum USpoofChecks. Zero is returned if the identifiers + * are not confusable. + * + * @draft ICU 74 + */ +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusable(const USpoofChecker *sc, UBiDiDirection direction, + const UChar *id1, int32_t length1, + const UChar *id2, int32_t length2, + UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ /** * A version of {@link uspoof_areConfusable} accepting strings in UTF-8 format. @@ -1192,14 +1308,45 @@ uspoof_areConfusableUTF8(const USpoofChecker *sc, const char *id2, int32_t length2, UErrorCode *status); - - +#ifndef U_HIDE_DRAFT_API +/** + * A version of {@link uspoof_areBidiConfusable} accepting strings in UTF-8 format. + * + * @param sc The USpoofChecker + * @param direction The paragraph direction with which the identifiers are + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param id1 The first of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param length1 the length of the first identifiers, in bytes, or -1 + * if the string is nul terminated. + * @param id2 The second of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param length2 The length of the second string in bytes, or -1 + * if the string is nul terminated. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Confusability of the strings is not reported here, + * but through this function's return value. + * @return An integer value with bit(s) set corresponding to + * the type of confusability found, as defined by + * enum USpoofChecks. Zero is returned if the strings + * are not confusable. + * + * @draft ICU 74 + * + * @see uspoof_areBidiConfusable + */ +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusableUTF8(const USpoofChecker *sc, UBiDiDirection direction, + const char *id1, int32_t length1, + const char *id2, int32_t length2, + UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ /** * Get the "skeleton" for an identifier. * Skeletons are a transformation of the input identifier; * Two identifiers are confusable if their skeletons are identical. - * See Unicode UAX #39 for additional information. + * See Unicode Technical Standard #39 for additional information. * * Using skeletons directly makes it possible to quickly check * whether an identifier is confusable with any of some large @@ -1233,11 +1380,50 @@ uspoof_getSkeleton(const USpoofChecker *sc, UChar *dest, int32_t destCapacity, UErrorCode *status); +#ifndef U_HIDE_DRAFT_API +/** + * Get the "bidiSkeleton" for an identifier and a direction. + * Skeletons are a transformation of the input identifier; + * Two identifiers are LTR-confusable if their LTR bidiSkeletons are identical; + * they are RTL-confusable if their RTL bidiSkeletons are identical. + * See Unicode Technical Standard #39 for additional information: + * https://www.unicode.org/reports/tr39/#Confusable_Detection. + * + * Using skeletons directly makes it possible to quickly check + * whether an identifier is confusable with any of some large + * set of existing identifiers, by creating an efficiently + * searchable collection of the skeletons. + * + * @param sc The USpoofChecker. + * @param direction The context direction with which the identifier will be + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param id The input identifier whose skeleton will be computed. + * @param length The length of the input identifier, expressed in 16 bit + * UTF-16 code units, or -1 if the string is zero terminated. + * @param dest The output buffer, to receive the skeleton string. + * @param destCapacity The length of the output buffer, in 16 bit units. + * The destCapacity may be zero, in which case the function will + * return the actual length of the skeleton. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * @return The length of the skeleton string. The returned length + * is always that of the complete skeleton, even when the + * supplied buffer is too small (or of zero length) + * + * @draft ICU 74 + * @see uspoof_areBidiConfusable + */ +U_CAPI int32_t U_EXPORT2 uspoof_getBidiSkeleton(const USpoofChecker *sc, + UBiDiDirection direction, + const UChar *id, int32_t length, + UChar *dest, int32_t destCapacity, UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ + /** * Get the "skeleton" for an identifier. * Skeletons are a transformation of the input identifier; * Two identifiers are confusable if their skeletons are identical. - * See Unicode UAX #39 for additional information. + * See Unicode Technical Standard #39 for additional information. * * Using skeletons directly makes it possible to quickly check * whether an identifier is confusable with any of some large @@ -1273,6 +1459,46 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc, char *dest, int32_t destCapacity, UErrorCode *status); +#ifndef U_HIDE_DRAFT_API +/** + * Get the "bidiSkeleton" for an identifier and a direction. + * Skeletons are a transformation of the input identifier; + * Two identifiers are LTR-confusable if their LTR bidiSkeletons are identical; + * they are RTL-confusable if their RTL bidiSkeletons are identical. + * See Unicode Technical Standard #39 for additional information: + * https://www.unicode.org/reports/tr39/#Confusable_Detection. + * + * Using skeletons directly makes it possible to quickly check + * whether an identifier is confusable with any of some large + * set of existing identifiers, by creating an efficiently + * searchable collection of the skeletons. + * + * @param sc The USpoofChecker + * @param direction The context direction with which the identifier will be + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param id The UTF-8 format identifier whose skeleton will be computed. + * @param length The length of the input string, in bytes, + * or -1 if the string is zero terminated. + * @param dest The output buffer, to receive the skeleton string. + * @param destCapacity The length of the output buffer, in bytes. + * The destCapacity may be zero, in which case the function will + * return the actual length of the skeleton. + * @param status The error code, set if an error occurred while attempting to + * perform the check. Possible Errors include U_INVALID_CHAR_FOUND + * for invalid UTF-8 sequences, and + * U_BUFFER_OVERFLOW_ERROR if the destination buffer is too small + * to hold the complete skeleton. + * @return The length of the skeleton string, in bytes. The returned length + * is always that of the complete skeleton, even when the + * supplied buffer is too small (or of zero length) + * + * @draft ICU 74 + */ +U_CAPI int32_t U_EXPORT2 uspoof_getBidiSkeletonUTF8(const USpoofChecker *sc, UBiDiDirection direction, + const char *id, int32_t length, char *dest, + int32_t destCapacity, UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ + /** * Get the set of Candidate Characters for Inclusion in Identifiers, as defined * in http://unicode.org/Public/security/latest/xidmodifications.txt @@ -1510,11 +1736,42 @@ uspoof_areConfusableUnicodeString(const USpoofChecker *sc, const icu::UnicodeString &s2, UErrorCode *status); +#ifndef U_HIDE_DRAFT_API +/** + * A version of {@link uspoof_areBidiConfusable} accepting UnicodeStrings. + * + * @param sc The USpoofChecker + * @param direction The paragraph direction with which the identifiers are + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param s1 The first of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param s2 The second of the two identifiers to be compared for + * confusability. The strings are in UTF-8 format. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * Confusability of the identifiers is not reported here, + * but through this function's return value. + * @return An integer value with bit(s) set corresponding to + * the type of confusability found, as defined by + * enum USpoofChecks. Zero is returned if the identifiers + * are not confusable. + * + * @draft ICU 74 + * + * @see uspoof_areBidiConfusable + */ +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusableUnicodeString(const USpoofChecker *sc, + UBiDiDirection direction, + const icu::UnicodeString &s1, + const icu::UnicodeString &s2, + UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ + /** * Get the "skeleton" for an identifier. * Skeletons are a transformation of the input identifier; * Two identifiers are confusable if their skeletons are identical. - * See Unicode UAX #39 for additional information. + * See Unicode Technical Standard #39 for additional information. * * Using skeletons directly makes it possible to quickly check * whether an identifier is confusable with any of some large @@ -1540,6 +1797,36 @@ uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, icu::UnicodeString &dest, UErrorCode *status); +#ifndef U_HIDE_DRAFT_API +/** + * Get the "bidiSkeleton" for an identifier and a direction. + * Skeletons are a transformation of the input identifier; + * Two identifiers are LTR-confusable if their LTR bidiSkeletons are identical; + * they are RTL-confusable if their RTL bidiSkeletons are identical. + * See Unicode Technical Standard #39 for additional information. + * https://www.unicode.org/reports/tr39/#Confusable_Detection. + * + * Using skeletons directly makes it possible to quickly check + * whether an identifier is confusable with any of some large + * set of existing identifiers, by creating an efficiently + * searchable collection of the skeletons. + * + * @param sc The USpoofChecker. + * @param direction The context direction with which the identifier will be + * displayed. Must be either UBIDI_LTR or UBIDI_RTL. + * @param id The input identifier whose bidiSkeleton will be computed. + * @param dest The output identifier, to receive the skeleton string. + * @param status The error code, set if an error occurred while attempting to + * perform the check. + * @return A reference to the destination (skeleton) string. + * + * @draft ICU 74 + */ +U_I18N_API icu::UnicodeString &U_EXPORT2 uspoof_getBidiSkeletonUnicodeString( + const USpoofChecker *sc, UBiDiDirection direction, const icu::UnicodeString &id, + icu::UnicodeString &dest, UErrorCode *status); +#endif /* U_HIDE_DRAFT_API */ + /** * Get the set of Candidate Characters for Inclusion in Identifiers, as defined * in http://unicode.org/Public/security/latest/xidmodifications.txt diff --git a/deps/icu-small/source/i18n/units_converter.cpp b/deps/icu-small/source/i18n/units_converter.cpp index b89f4951210060..6758c129e5373b 100644 --- a/deps/icu-small/source/i18n/units_converter.cpp +++ b/deps/icu-small/source/i18n/units_converter.cpp @@ -372,11 +372,11 @@ void U_I18N_API addSingleFactorConstant(StringPiece baseStr, int32_t power, Sign factor.constantExponents[CONSTANT_FT2M] += 3 * power * signum; } else if (baseStr == "in3_to_m3") { factor.constantExponents[CONSTANT_FT2M] += 3 * power * signum; - factor.factorDen *= 12 * 12 * 12; + factor.factorDen *= std::pow(12 * 12 * 12, power * signum); } else if (baseStr == "gal_to_m3") { - factor.factorNum *= 231; factor.constantExponents[CONSTANT_FT2M] += 3 * power * signum; - factor.factorDen *= 12 * 12 * 12; + factor.factorNum *= std::pow(231, power * signum); + factor.factorDen *= std::pow(12 * 12 * 12, power * signum); } else if (baseStr == "gal_imp_to_m3") { factor.constantExponents[CONSTANT_GAL_IMP2M3] += power * signum; } else if (baseStr == "G") { @@ -397,6 +397,14 @@ void U_I18N_API addSingleFactorConstant(StringPiece baseStr, int32_t power, Sign factor.constantExponents[CONSTANT_SEC_PER_JULIAN_YEAR] += power * signum; } else if (baseStr == "speed_of_light_meters_per_second") { factor.constantExponents[CONSTANT_SPEED_OF_LIGHT_METERS_PER_SECOND] += power * signum; + } else if (baseStr == "sho_to_m3") { + factor.constantExponents[CONSTANT_SHO_TO_M3] += power * signum; + } else if (baseStr == "tsubo_to_m2") { + factor.constantExponents[CONSTANT_TSUBO_TO_M2] += power * signum; + } else if (baseStr == "shaku_to_m") { + factor.constantExponents[CONSTANT_SHAKU_TO_M] += power * signum; + } else if (baseStr == "AMU") { + factor.constantExponents[CONSTANT_AMU] += power * signum; } else { if (signum == Signum::NEGATIVE) { factor.factorDen *= std::pow(strToDouble(baseStr, status), power); @@ -535,7 +543,7 @@ void UnitsConverter::init(const ConversionRates &ratesInfo, UErrorCode &status) loadConversionRate(conversionRate_, conversionRate_.source, conversionRate_.target, unitsState, ratesInfo, status); - + } int32_t UnitsConverter::compareTwoUnits(const MeasureUnitImpl &firstUnit, diff --git a/deps/icu-small/source/i18n/units_converter.h b/deps/icu-small/source/i18n/units_converter.h index fd1d6ec4227faa..8dc40cd102ca7f 100644 --- a/deps/icu-small/source/i18n/units_converter.h +++ b/deps/icu-small/source/i18n/units_converter.h @@ -33,6 +33,10 @@ enum Constants { CONSTANT_METERS_PER_AU, CONSTANT_SEC_PER_JULIAN_YEAR, CONSTANT_SPEED_OF_LIGHT_METERS_PER_SECOND, + CONSTANT_SHO_TO_M3, // https://en.wikipedia.org/wiki/Japanese_units_of_measurement + CONSTANT_TSUBO_TO_M2, // https://en.wikipedia.org/wiki/Japanese_units_of_measurement + CONSTANT_SHAKU_TO_M, // https://en.wikipedia.org/wiki/Japanese_units_of_measurement + CONSTANT_AMU, // Atomic Mass Unit https://www.nist.gov/pml/special-publication-811/nist-guide-si-chapter-5-units-outside-si#table7 // Must be the last element. CONSTANTS_COUNT @@ -55,6 +59,10 @@ static const double constantsValues[CONSTANTS_COUNT] = { 149597870700, // CONSTANT_METERS_PER_AU 31557600, // CONSTANT_SEC_PER_JULIAN_YEAR 299792458, // CONSTANT_SPEED_OF_LIGHT_METERS_PER_SECOND + 2401.0 / (1331.0 * 1000.0), + 400.0 / 121.0, + 4.0 / 121.0, + 1.66053878283E-27, // CONSTANT_AMU }; typedef enum Signum { @@ -214,7 +222,7 @@ class U_I18N_API UnitsConverter : public UMemory { /** * Initialises the object. - */ + */ void init(const ConversionRates &ratesInfo, UErrorCode &status); }; diff --git a/deps/icu-small/source/i18n/units_data.cpp b/deps/icu-small/source/i18n/units_data.cpp index 801ede88378cb4..b1e069660f2df2 100644 --- a/deps/icu-small/source/i18n/units_data.cpp +++ b/deps/icu-small/source/i18n/units_data.cpp @@ -7,9 +7,11 @@ #include "bytesinkutil.h" #include "cstring.h" +#include "measunit_impl.h" #include "number_decimalquantity.h" #include "resource.h" #include "uassert.h" +#include "ulocimp.h" #include "unicode/locid.h" #include "unicode/unistr.h" #include "unicode/ures.h" @@ -78,6 +80,7 @@ class ConversionRateDataSink : public ResourceSink { UnicodeString baseUnit = ICU_Utility::makeBogusString(); UnicodeString factor = ICU_Utility::makeBogusString(); UnicodeString offset = ICU_Utility::makeBogusString(); + UnicodeString systems = ICU_Utility::makeBogusString(); for (int32_t i = 0; unitTable.getKeyAndValue(i, key, value); i++) { if (uprv_strcmp(key, "target") == 0) { baseUnit = value.getUnicodeString(status); @@ -85,6 +88,8 @@ class ConversionRateDataSink : public ResourceSink { factor = value.getUnicodeString(status); } else if (uprv_strcmp(key, "offset") == 0) { offset = value.getUnicodeString(status); + } else if (uprv_strcmp(key, "systems") == 0) { + systems = value.getUnicodeString(status); } } if (U_FAILURE(status)) { return; } @@ -103,6 +108,7 @@ class ConversionRateDataSink : public ResourceSink { cr->sourceUnit.append(srcUnit, status); cr->baseUnit.appendInvariantChars(baseUnit, status); cr->factor.appendInvariantChars(factor, status); + cr->systems.appendInvariantChars(systems, status); trimSpaces(cr->factor, status); if (!offset.isBogus()) cr->offset.appendInvariantChars(offset, status); } @@ -431,46 +437,16 @@ MaybeStackVector } } - CharString region(locale.getCountry(), status); - + char regionBuf[8]; + ulocimp_getRegionForSupplementalData(locale.getName(), false, regionBuf, 8, &status); + CharString region(regionBuf, status); + // Check the locale system tag, e.g `ms=metric`. UErrorCode internalMeasureTagStatus = U_ZERO_ERROR; CharString localeSystem = getKeyWordValue(locale, "measure", internalMeasureTagStatus); bool isLocaleSystem = false; - if (U_SUCCESS(internalMeasureTagStatus)) { - if (localeSystem == "metric") { - region.clear(); - region.append("001", status); - isLocaleSystem = true; - } else if (localeSystem == "ussystem") { - region.clear(); - region.append("US", status); - isLocaleSystem = true; - } else if (localeSystem == "uksystem") { - region.clear(); - region.append("GB", status); - isLocaleSystem = true; - } - } - - // Check the region tag, e.g. `rg=uszzz`. - if (!isLocaleSystem) { - UErrorCode internalRgTagStatus = U_ZERO_ERROR; - CharString localeRegion = getKeyWordValue(locale, "rg", internalRgTagStatus); - if (U_SUCCESS(internalRgTagStatus) && localeRegion.length() >= 3) { - if (localeRegion == "default") { - region.clear(); - region.append(localeRegion, status); - } else if (localeRegion[0] >= '0' && localeRegion[0] <= '9') { - region.clear(); - region.append(localeRegion.data(), 3, status); - } else { - // Take the first two character and capitalize them. - region.clear(); - region.append(uprv_toupper(localeRegion[0]), status); - region.append(uprv_toupper(localeRegion[1]), status); - } - } + if (U_SUCCESS(internalMeasureTagStatus) && (localeSystem == "metric" || localeSystem == "ussystem" || localeSystem == "uksystem")) { + isLocaleSystem = true; } int32_t idx = @@ -481,6 +457,48 @@ MaybeStackVector U_ASSERT(idx >= 0); // Failures should have been taken care of by `status`. const UnitPreferenceMetadata *m = metadata_[idx]; + + if (isLocaleSystem) { + // if the locale ID specifies a measurment system, check if ALL of the units we got back + // are members of that system (or are "metric_adjacent", which we consider to match all + // the systems) + bool unitsMatchSystem = true; + ConversionRates rates(status); + for (int32_t i = 0; unitsMatchSystem && i < m->prefsCount; i++) { + const UnitPreference& unitPref = *(unitPrefs_[i + m->prefsOffset]); + MeasureUnitImpl measureUnit = MeasureUnitImpl::forIdentifier(unitPref.unit.data(), status); + for (int32_t j = 0; unitsMatchSystem && j < measureUnit.singleUnits.length(); j++) { + const SingleUnitImpl* singleUnit = measureUnit.singleUnits[j]; + const ConversionRateInfo* rateInfo = rates.extractConversionInfo(singleUnit->getSimpleUnitID(), status); + CharString systems(rateInfo->systems, status); + if (!systems.contains("metric_adjacent")) { // "metric-adjacent" is considered to match all the locale systems + if (!systems.contains(localeSystem.data())) { + unitsMatchSystem = false; + } + } + } + } + + // if any of the units we got back above don't match the mearurement system the locale ID asked for, + // throw out the region and just load the units for the base region for the requested measurement system + if (!unitsMatchSystem) { + region.clear(); + if (localeSystem == "ussystem") { + region.append("US", status); + } else if (localeSystem == "uksystem") { + region.append("GB", status); + } else { + region.append("001", status); + } + idx = getPreferenceMetadataIndex(&metadata_, category, usage, region.toStringPiece(), status); + if (U_FAILURE(status)) { + return result; + } + + m = metadata_[idx]; + } + } + for (int32_t i = 0; i < m->prefsCount; i++) { result.emplaceBackAndCheckErrorCode(status, *(unitPrefs_[i + m->prefsOffset])); } diff --git a/deps/icu-small/source/i18n/units_data.h b/deps/icu-small/source/i18n/units_data.h index 118458ecca2b0a..ad5033513cb5f0 100644 --- a/deps/icu-small/source/i18n/units_data.h +++ b/deps/icu-small/source/i18n/units_data.h @@ -41,6 +41,7 @@ class U_I18N_API ConversionRateInfo : public UMemory { CharString baseUnit; CharString factor; CharString offset; + CharString systems; }; } // namespace units diff --git a/deps/icu-small/source/i18n/unum.cpp b/deps/icu-small/source/i18n/unum.cpp index 11a7bcba57df4f..eb6c86252b7ab6 100644 --- a/deps/icu-small/source/i18n/unum.cpp +++ b/deps/icu-small/source/i18n/unum.cpp @@ -28,17 +28,19 @@ #include "unicode/dcfmtsym.h" #include "unicode/curramt.h" #include "unicode/localpointer.h" +#include "unicode/measfmt.h" #include "unicode/udisplaycontext.h" #include "uassert.h" #include "cpputils.h" #include "cstring.h" +#include "putilimp.h" U_NAMESPACE_USE U_CAPI UNumberFormat* U_EXPORT2 -unum_open( UNumberFormatStyle style, +unum_open( UNumberFormatStyle style, const char16_t* pattern, int32_t patternLength, const char* locale, @@ -671,6 +673,7 @@ unum_getTextAttribute(const UNumberFormat* fmt, const NumberFormat* nf = reinterpret_cast(fmt); const DecimalFormat* df = dynamic_cast(nf); + const RuleBasedNumberFormat* rbnf = nullptr; // cast is below for performance if (df != nullptr) { switch(tag) { case UNUM_POSITIVE_PREFIX: @@ -701,8 +704,7 @@ unum_getTextAttribute(const UNumberFormat* fmt, *status = U_UNSUPPORTED_ERROR; return -1; } - } else { - const RuleBasedNumberFormat* rbnf = dynamic_cast(nf); + } else if ((rbnf = dynamic_cast(nf)) != nullptr) { U_ASSERT(rbnf != nullptr); if (tag == UNUM_DEFAULT_RULESET) { res = rbnf->getDefaultRuleSetName(); @@ -716,6 +718,9 @@ unum_getTextAttribute(const UNumberFormat* fmt, *status = U_UNSUPPORTED_ERROR; return -1; } + } else { + *status = U_UNSUPPORTED_ERROR; + return -1; } return res.extract(result, resultLength, *status); @@ -794,15 +799,16 @@ unum_toPattern( const UNumberFormat* fmt, const NumberFormat* nf = reinterpret_cast(fmt); const DecimalFormat* df = dynamic_cast(nf); + const RuleBasedNumberFormat* rbnf = nullptr; // cast is below for performance if (df != nullptr) { if(isPatternLocalized) df->toLocalizedPattern(pat); else df->toPattern(pat); + } else if ((rbnf = dynamic_cast(nf)) != nullptr) { + pat = rbnf->getRules(); } else { - const RuleBasedNumberFormat* rbnf = dynamic_cast(nf); - U_ASSERT(rbnf != nullptr); - pat = rbnf->getRules(); + // leave `pat` empty } return pat.extract(result, resultLength, *status); } diff --git a/deps/icu-small/source/i18n/uspoof.cpp b/deps/icu-small/source/i18n/uspoof.cpp index 271caeafff9363..47dac8418e4497 100644 --- a/deps/icu-small/source/i18n/uspoof.cpp +++ b/deps/icu-small/source/i18n/uspoof.cpp @@ -15,6 +15,7 @@ * * Unicode Spoof Detection */ +#include "unicode/ubidi.h" #include "unicode/utypes.h" #include "unicode/normalizer2.h" #include "unicode/uspoof.h" @@ -141,8 +142,8 @@ void U_CALLCONV initializeStatics(UErrorCode &status) { u"\\U0001DF00-\\U0001DF1E\\U0001DF25-\\U0001DF2A\\U0001E08F\\U0001E7E0-" u"\\U0001E7E6\\U0001E7E8-\\U0001E7EB\\U0001E7ED\\U0001E7EE\\U0001E7F0-" u"\\U0001E7FE\\U00020000-\\U0002A6DF\\U0002A700-\\U0002B739\\U0002B740-" - u"\\U0002B81D\\U0002B820-\\U0002CEA1\\U0002CEB0-\\U0002EBE0\\U00030000-" - u"\\U0003134A\\U00031350-\\U000323AF]"; + u"\\U0002B81D\\U0002B820-\\U0002CEA1\\U0002CEB0-\\U0002EBE0\\U0002EBF0-" + u"\\U0002EE5D\\U00030000-\\U0003134A\\U00031350-\\U000323AF]"; gRecommendedSet = new UnicodeSet(UnicodeString(recommendedPat), status); if (gRecommendedSet == nullptr) { @@ -538,6 +539,90 @@ uspoof_areConfusableUnicodeString(const USpoofChecker *sc, return result; } +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusable(const USpoofChecker *sc, UBiDiDirection direction, + const char16_t *id1, int32_t length1, + const char16_t *id2, int32_t length2, + UErrorCode *status) { + UnicodeString id1Str((length1 == -1), id1, length1); // Aliasing constructor + UnicodeString id2Str((length2 == -1), id2, length2); // Aliasing constructor + if (id1Str.isBogus() || id2Str.isBogus()) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + return uspoof_areBidiConfusableUnicodeString(sc, direction, id1Str, id2Str, status); +} + +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusableUTF8(const USpoofChecker *sc, UBiDiDirection direction, + const char *id1, int32_t length1, const char *id2, + int32_t length2, UErrorCode *status) { + if (length1 < -1 || length2 < -1) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + UnicodeString id1Str = UnicodeString::fromUTF8( + StringPiece(id1, length1 >= 0 ? length1 : static_cast(uprv_strlen(id1)))); + UnicodeString id2Str = UnicodeString::fromUTF8( + StringPiece(id2, length2 >= 0 ? length2 : static_cast(uprv_strlen(id2)))); + return uspoof_areBidiConfusableUnicodeString(sc, direction, id1Str, id2Str, status); +} + +U_CAPI uint32_t U_EXPORT2 uspoof_areBidiConfusableUnicodeString(const USpoofChecker *sc, + UBiDiDirection direction, + const icu::UnicodeString &id1, + const icu::UnicodeString &id2, + UErrorCode *status) { + const SpoofImpl *This = SpoofImpl::validateThis(sc, *status); + if (U_FAILURE(*status)) { + return 0; + } + // + // See section 4 of UTS 39 for the algorithm for checking whether two strings are confusable, + // and for definitions of the types (single, whole, mixed-script) of confusables. + + // We only care about a few of the check flags. Ignore the others. + // If no tests relevant to this function have been specified, return an error. + // TODO: is this really the right thing to do? It's probably an error on the caller's part, + // but logically we would just return 0 (no error). + if ((This->fChecks & USPOOF_CONFUSABLE) == 0) { + *status = U_INVALID_STATE_ERROR; + return 0; + } + + // Compute the skeletons and check for confusability. + UnicodeString id1Skeleton; + uspoof_getBidiSkeletonUnicodeString(sc, direction, id1, id1Skeleton, status); + UnicodeString id2Skeleton; + uspoof_getBidiSkeletonUnicodeString(sc, direction, id2, id2Skeleton, status); + if (U_FAILURE(*status)) { + return 0; + } + if (id1Skeleton != id2Skeleton) { + return 0; + } + + // If we get here, the strings are confusable. Now we just need to set the flags for the appropriate + // classes of confusables according to UTS 39 section 4. Start by computing the resolved script sets + // of id1 and id2. + ScriptSet id1RSS; + This->getResolvedScriptSet(id1, id1RSS, *status); + ScriptSet id2RSS; + This->getResolvedScriptSet(id2, id2RSS, *status); + + // Turn on all applicable flags + uint32_t result = 0; + if (id1RSS.intersects(id2RSS)) { + result |= USPOOF_SINGLE_SCRIPT_CONFUSABLE; + } else { + result |= USPOOF_MIXED_SCRIPT_CONFUSABLE; + if (!id1RSS.isEmpty() && !id2RSS.isEmpty()) { + result |= USPOOF_WHOLE_SCRIPT_CONFUSABLE; + } + } + + // Turn off flags that the user doesn't want + return result & This->fChecks; +} + U_CAPI int32_t U_EXPORT2 uspoof_checkUnicodeString(const USpoofChecker *sc, @@ -697,6 +782,60 @@ uspoof_getSkeleton(const USpoofChecker *sc, return destStr.length(); } +U_CAPI int32_t U_EXPORT2 uspoof_getBidiSkeleton(const USpoofChecker *sc, UBiDiDirection direction, + const UChar *id, int32_t length, UChar *dest, + int32_t destCapacity, UErrorCode *status) { + UnicodeString idStr((length == -1), id, length); // Aliasing constructor + if (idStr.isBogus()) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + UnicodeString destStr; + uspoof_getBidiSkeletonUnicodeString(sc, direction, idStr, destStr, status); + return destStr.extract(dest, destCapacity, *status); +} + + + +U_I18N_API UnicodeString &U_EXPORT2 uspoof_getBidiSkeletonUnicodeString(const USpoofChecker *sc, + UBiDiDirection direction, + const UnicodeString &id, + UnicodeString &dest, + UErrorCode *status) { + dest.remove(); + if (direction != UBIDI_LTR && direction != UBIDI_RTL) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return dest; + } + UBiDi *bidi = ubidi_open(); + ubidi_setPara(bidi, id.getBuffer(), id.length(), direction, + /*embeddingLevels*/ nullptr, status); + if (U_FAILURE(*status)) { + ubidi_close(bidi); + return dest; + } + UnicodeString reordered; + int32_t const size = ubidi_getProcessedLength(bidi); + UChar* const reorderedBuffer = reordered.getBuffer(size); + if (reorderedBuffer == nullptr) { + *status = U_MEMORY_ALLOCATION_ERROR; + ubidi_close(bidi); + return dest; + } + ubidi_writeReordered(bidi, reorderedBuffer, size, + UBIDI_KEEP_BASE_COMBINING | UBIDI_DO_MIRRORING, status); + reordered.releaseBuffer(size); + ubidi_close(bidi); + + if (U_FAILURE(*status)) { + return dest; + } + + // The type parameter is deprecated since ICU 58; any number may be passed. + constexpr uint32_t deprecatedType = 58; + return uspoof_getSkeletonUnicodeString(sc, deprecatedType, reordered, dest, status); +} + U_I18N_API UnicodeString & U_EXPORT2 @@ -721,19 +860,17 @@ uspoof_getSkeletonUnicodeString(const USpoofChecker *sc, for (inputIndex=0; inputIndex < normalizedLen; ) { UChar32 c = nfdId.char32At(inputIndex); inputIndex += U16_LENGTH(c); - This->fSpoofData->confusableLookup(c, skelStr); + if (!u_hasBinaryProperty(c, UCHAR_DEFAULT_IGNORABLE_CODE_POINT)) { + This->fSpoofData->confusableLookup(c, skelStr); + } } gNfdNormalizer->normalize(skelStr, dest, *status); return dest; } - -U_CAPI int32_t U_EXPORT2 -uspoof_getSkeletonUTF8(const USpoofChecker *sc, - uint32_t type, - const char *id, int32_t length, - char *dest, int32_t destCapacity, +U_CAPI int32_t U_EXPORT2 uspoof_getSkeletonUTF8(const USpoofChecker *sc, uint32_t type, const char *id, + int32_t length, char *dest, int32_t destCapacity, UErrorCode *status) { SpoofImpl::validateThis(sc, *status); if (U_FAILURE(*status)) { @@ -744,7 +881,8 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc, return 0; } - UnicodeString srcStr = UnicodeString::fromUTF8(StringPiece(id, length>=0 ? length : static_cast(uprv_strlen(id)))); + UnicodeString srcStr = UnicodeString::fromUTF8( + StringPiece(id, length >= 0 ? length : static_cast(uprv_strlen(id)))); UnicodeString destStr; uspoof_getSkeletonUnicodeString(sc, type, srcStr, destStr, status); if (U_FAILURE(*status)) { @@ -752,8 +890,28 @@ uspoof_getSkeletonUTF8(const USpoofChecker *sc, } int32_t lengthInUTF8 = 0; - u_strToUTF8(dest, destCapacity, &lengthInUTF8, - destStr.getBuffer(), destStr.length(), status); + u_strToUTF8(dest, destCapacity, &lengthInUTF8, destStr.getBuffer(), destStr.length(), status); + return lengthInUTF8; +} + +U_CAPI int32_t U_EXPORT2 uspoof_getBidiSkeletonUTF8(const USpoofChecker *sc, UBiDiDirection direction, + const char *id, int32_t length, char *dest, + int32_t destCapacity, UErrorCode *status) { + if (length < -1) { + *status = U_ILLEGAL_ARGUMENT_ERROR; + return 0; + } + + UnicodeString srcStr = UnicodeString::fromUTF8( + StringPiece(id, length >= 0 ? length : static_cast(uprv_strlen(id)))); + UnicodeString destStr; + uspoof_getBidiSkeletonUnicodeString(sc, direction, srcStr, destStr, status); + if (U_FAILURE(*status)) { + return 0; + } + + int32_t lengthInUTF8 = 0; + u_strToUTF8(dest, destCapacity, &lengthInUTF8, destStr.getBuffer(), destStr.length(), status); return lengthInUTF8; } diff --git a/deps/icu-small/source/i18n/windtfmt.cpp b/deps/icu-small/source/i18n/windtfmt.cpp index 2118f92dceb29a..6d705b299d797e 100644 --- a/deps/icu-small/source/i18n/windtfmt.cpp +++ b/deps/icu-small/source/i18n/windtfmt.cpp @@ -30,7 +30,10 @@ #include "unicode/timezone.h" #include "unicode/utmscale.h" +#include "bytesinkutil.h" +#include "charstr.h" #include "cmemory.h" +#include "ulocimp.h" #include "uresimp.h" #include "windtfmt.h" #include "wintzimpl.h" @@ -99,10 +102,13 @@ UnicodeString* Win32DateFormat::getTimeDateFormat(const Calendar *cal, const Loc static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeString** buffer) { UErrorCode status = U_ZERO_ERROR; - char asciiBCP47Tag[LOCALE_NAME_MAX_LENGTH] = {}; // Convert from names like "en_CA" and "de_DE@collation=phonebook" to "en-CA" and "de-DE-u-co-phonebk". - (void)uloc_toLanguageTag(locale.getName(), asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, &status); + CharString asciiBCP47Tag; + { + CharStringByteSink sink(&asciiBCP47Tag); + ulocimp_toLanguageTag(locale.getName(), sink, false, &status); + } if (U_SUCCESS(status)) { diff --git a/deps/icu-small/source/i18n/winnmfmt.cpp b/deps/icu-small/source/i18n/winnmfmt.cpp index 6efa9a63d86376..bf0bd20095c00b 100644 --- a/deps/icu-small/source/i18n/winnmfmt.cpp +++ b/deps/icu-small/source/i18n/winnmfmt.cpp @@ -24,8 +24,11 @@ #include "unicode/locid.h" #include "unicode/ustring.h" +#include "bytesinkutil.h" +#include "charstr.h" #include "cmemory.h" #include "uassert.h" +#include "ulocimp.h" #include "locmap.h" #ifndef WIN32_LEAN_AND_MEAN @@ -144,10 +147,13 @@ static void freeCurrencyFormat(CURRENCYFMTW *fmt) static UErrorCode GetEquivalentWindowsLocaleName(const Locale& locale, UnicodeString** buffer) { UErrorCode status = U_ZERO_ERROR; - char asciiBCP47Tag[LOCALE_NAME_MAX_LENGTH] = {}; // Convert from names like "en_CA" and "de_DE@collation=phonebook" to "en-CA" and "de-DE-u-co-phonebk". - (void) uloc_toLanguageTag(locale.getName(), asciiBCP47Tag, UPRV_LENGTHOF(asciiBCP47Tag), false, &status); + CharString asciiBCP47Tag; + { + CharStringByteSink sink(&asciiBCP47Tag); + ulocimp_toLanguageTag(locale.getName(), sink, false, &status); + } if (U_SUCCESS(status)) { diff --git a/deps/icu-small/source/i18n/zonemeta.cpp b/deps/icu-small/source/i18n/zonemeta.cpp index 42051e2f4162b5..78d2391479f2ef 100644 --- a/deps/icu-small/source/i18n/zonemeta.cpp +++ b/deps/icu-small/source/i18n/zonemeta.cpp @@ -120,6 +120,7 @@ static const char gKeyTypeData[] = "keyTypeData"; static const char gTypeAliasTag[] = "typeAlias"; static const char gTypeMapTag[] = "typeMap"; static const char gTimezoneTag[] = "timezone"; +static const char gIanaMapTag[] = "ianaMap"; static const char gPrimaryZonesTag[] = "primaryZones"; @@ -389,6 +390,35 @@ ZoneMeta::getCanonicalCLDRID(const TimeZone& tz) { return getCanonicalCLDRID(tz.getID(tzID), status); } +UnicodeString& U_EXPORT2 +ZoneMeta::getIanaID(const UnicodeString& tzid, UnicodeString& ianaID, UErrorCode& status) { + // First, get CLDR canonical ID + const char16_t *canonicalID = getCanonicalCLDRID(tzid, status); + if (U_FAILURE(status) || canonicalID == nullptr) { + ianaID.setToBogus(); + return ianaID; + } + // Find IANA mapping if any. + UErrorCode tmpStatus = U_ZERO_ERROR; + UnicodeString tmpKey(canonicalID); + tmpKey.findAndReplace(UnicodeString("/"), UnicodeString(":")); + char keyBuf[ZID_KEY_MAX + 1]; + /* int32_t keyLen = */ tmpKey.extract(0, tmpKey.length(), keyBuf, sizeof(keyBuf), US_INV); + + StackUResourceBundle r; + ures_openDirectFillIn(r.getAlias(), nullptr, gKeyTypeData, &tmpStatus); + ures_getByKey(r.getAlias(), gIanaMapTag, r.getAlias(), &tmpStatus); + ures_getByKey(r.getAlias(), gTimezoneTag, r.getAlias(), &tmpStatus); + int32_t tmpLen = 0; + const char16_t* tmpIana = ures_getStringByKey(r.getAlias(), keyBuf, &tmpLen, &tmpStatus); + if (U_SUCCESS(tmpStatus)) { + ianaID.setTo(true, tmpIana, -1); + } else { + ianaID.setTo(true, canonicalID, -1); + } + return ianaID; +} + static void U_CALLCONV countryInfoVectorsInit(UErrorCode &status) { // Create empty vectors // No deleters for these UVectors, it's a reference to a resource bundle string. diff --git a/deps/icu-small/source/i18n/zonemeta.h b/deps/icu-small/source/i18n/zonemeta.h index 8c5840c2659714..dec0a65c3ce26b 100644 --- a/deps/icu-small/source/i18n/zonemeta.h +++ b/deps/icu-small/source/i18n/zonemeta.h @@ -54,6 +54,17 @@ class U_I18N_API ZoneMeta { */ static const char16_t* U_EXPORT2 getCanonicalCLDRID(const TimeZone& tz); + /** + * Returns primary IANA zone ID for the input zone ID, which might be the id itself. + * If the given system tzid is not known, U_ILLEGAL_ARGUMENT_ERROR is set in the status. + * + * @param tzid Zone ID + * @param ianaID Output IANA ID + * @param status Receives the status + * @return A primary IANA zone ID equivalent to the input zone ID. + */ + static UnicodeString& U_EXPORT2 getIanaID(const UnicodeString& tzid, UnicodeString& ianaID, UErrorCode& status); + /** * Return the canonical country code for this tzid. If we have none, or if the time zone * is not associated with a country, return bogus string. diff --git a/deps/llhttp/BUILD.gn b/deps/llhttp/BUILD.gn new file mode 100644 index 00000000000000..64a2a4799d5530 --- /dev/null +++ b/deps/llhttp/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +llhttp_gn_build("llhttp") { +} diff --git a/deps/llhttp/unofficial.gni b/deps/llhttp/unofficial.gni new file mode 100644 index 00000000000000..80e360d472610c --- /dev/null +++ b/deps/llhttp/unofficial.gni @@ -0,0 +1,34 @@ +# Copyright (c) 2013-2019 GitHub Inc. +# Copyright 2019 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("llhttp_gn_build") { + config("llhttp_config") { + include_dirs = [ "include" ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("llhttp.gyp") ], + "scope", + [ "llhttp.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":llhttp_config" ] + include_dirs = [ "include" ] + sources = gypi_values.llhttp_sources + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-implicit-fallthrough", + "-Wno-unreachable-code", + ] + } + } +} diff --git a/deps/minimatch/src/README.md b/deps/minimatch/README.md similarity index 100% rename from deps/minimatch/src/README.md rename to deps/minimatch/README.md diff --git a/deps/minimatch/src/dist/cjs/assert-valid-pattern.d.ts b/deps/minimatch/dist/cjs/assert-valid-pattern.d.ts similarity index 100% rename from deps/minimatch/src/dist/cjs/assert-valid-pattern.d.ts rename to deps/minimatch/dist/cjs/assert-valid-pattern.d.ts diff --git a/deps/minimatch/src/dist/cjs/assert-valid-pattern.d.ts.map b/deps/minimatch/dist/cjs/assert-valid-pattern.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/cjs/assert-valid-pattern.d.ts.map rename to deps/minimatch/dist/cjs/assert-valid-pattern.d.ts.map diff --git a/deps/minimatch/src/dist/cjs/assert-valid-pattern.js b/deps/minimatch/dist/cjs/assert-valid-pattern.js similarity index 100% rename from deps/minimatch/src/dist/cjs/assert-valid-pattern.js rename to deps/minimatch/dist/cjs/assert-valid-pattern.js diff --git a/deps/minimatch/src/dist/cjs/assert-valid-pattern.js.map b/deps/minimatch/dist/cjs/assert-valid-pattern.js.map similarity index 100% rename from deps/minimatch/src/dist/cjs/assert-valid-pattern.js.map rename to deps/minimatch/dist/cjs/assert-valid-pattern.js.map diff --git a/deps/minimatch/src/dist/cjs/ast.d.ts b/deps/minimatch/dist/cjs/ast.d.ts similarity index 100% rename from deps/minimatch/src/dist/cjs/ast.d.ts rename to deps/minimatch/dist/cjs/ast.d.ts diff --git a/deps/minimatch/src/dist/cjs/ast.d.ts.map b/deps/minimatch/dist/cjs/ast.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/cjs/ast.d.ts.map rename to deps/minimatch/dist/cjs/ast.d.ts.map diff --git a/deps/minimatch/src/dist/cjs/ast.js b/deps/minimatch/dist/cjs/ast.js similarity index 100% rename from deps/minimatch/src/dist/cjs/ast.js rename to deps/minimatch/dist/cjs/ast.js diff --git a/deps/minimatch/src/dist/cjs/ast.js.map b/deps/minimatch/dist/cjs/ast.js.map similarity index 100% rename from deps/minimatch/src/dist/cjs/ast.js.map rename to deps/minimatch/dist/cjs/ast.js.map diff --git a/deps/minimatch/src/dist/cjs/brace-expressions.d.ts b/deps/minimatch/dist/cjs/brace-expressions.d.ts similarity index 100% rename from deps/minimatch/src/dist/cjs/brace-expressions.d.ts rename to deps/minimatch/dist/cjs/brace-expressions.d.ts diff --git a/deps/minimatch/src/dist/cjs/brace-expressions.d.ts.map b/deps/minimatch/dist/cjs/brace-expressions.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/cjs/brace-expressions.d.ts.map rename to deps/minimatch/dist/cjs/brace-expressions.d.ts.map diff --git a/deps/minimatch/src/dist/cjs/brace-expressions.js b/deps/minimatch/dist/cjs/brace-expressions.js similarity index 100% rename from deps/minimatch/src/dist/cjs/brace-expressions.js rename to deps/minimatch/dist/cjs/brace-expressions.js diff --git a/deps/minimatch/src/dist/cjs/brace-expressions.js.map b/deps/minimatch/dist/cjs/brace-expressions.js.map similarity index 100% rename from deps/minimatch/src/dist/cjs/brace-expressions.js.map rename to deps/minimatch/dist/cjs/brace-expressions.js.map diff --git a/deps/minimatch/src/dist/cjs/escape.d.ts b/deps/minimatch/dist/cjs/escape.d.ts similarity index 100% rename from deps/minimatch/src/dist/cjs/escape.d.ts rename to deps/minimatch/dist/cjs/escape.d.ts diff --git a/deps/minimatch/src/dist/cjs/escape.d.ts.map b/deps/minimatch/dist/cjs/escape.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/cjs/escape.d.ts.map rename to deps/minimatch/dist/cjs/escape.d.ts.map diff --git a/deps/minimatch/src/dist/cjs/escape.js b/deps/minimatch/dist/cjs/escape.js similarity index 100% rename from deps/minimatch/src/dist/cjs/escape.js rename to deps/minimatch/dist/cjs/escape.js diff --git a/deps/minimatch/src/dist/cjs/escape.js.map b/deps/minimatch/dist/cjs/escape.js.map similarity index 100% rename from deps/minimatch/src/dist/cjs/escape.js.map rename to deps/minimatch/dist/cjs/escape.js.map diff --git a/deps/minimatch/src/dist/cjs/index.d.ts b/deps/minimatch/dist/cjs/index.d.ts similarity index 100% rename from deps/minimatch/src/dist/cjs/index.d.ts rename to deps/minimatch/dist/cjs/index.d.ts diff --git a/deps/minimatch/src/dist/cjs/index.d.ts.map b/deps/minimatch/dist/cjs/index.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/cjs/index.d.ts.map rename to deps/minimatch/dist/cjs/index.d.ts.map diff --git a/deps/minimatch/src/dist/cjs/index.js b/deps/minimatch/dist/cjs/index.js similarity index 100% rename from deps/minimatch/src/dist/cjs/index.js rename to deps/minimatch/dist/cjs/index.js diff --git a/deps/minimatch/src/dist/cjs/index.js.map b/deps/minimatch/dist/cjs/index.js.map similarity index 100% rename from deps/minimatch/src/dist/cjs/index.js.map rename to deps/minimatch/dist/cjs/index.js.map diff --git a/deps/minimatch/src/dist/cjs/package.json b/deps/minimatch/dist/cjs/package.json similarity index 100% rename from deps/minimatch/src/dist/cjs/package.json rename to deps/minimatch/dist/cjs/package.json diff --git a/deps/minimatch/src/dist/cjs/unescape.d.ts b/deps/minimatch/dist/cjs/unescape.d.ts similarity index 100% rename from deps/minimatch/src/dist/cjs/unescape.d.ts rename to deps/minimatch/dist/cjs/unescape.d.ts diff --git a/deps/minimatch/src/dist/cjs/unescape.d.ts.map b/deps/minimatch/dist/cjs/unescape.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/cjs/unescape.d.ts.map rename to deps/minimatch/dist/cjs/unescape.d.ts.map diff --git a/deps/minimatch/src/dist/cjs/unescape.js b/deps/minimatch/dist/cjs/unescape.js similarity index 100% rename from deps/minimatch/src/dist/cjs/unescape.js rename to deps/minimatch/dist/cjs/unescape.js diff --git a/deps/minimatch/src/dist/cjs/unescape.js.map b/deps/minimatch/dist/cjs/unescape.js.map similarity index 100% rename from deps/minimatch/src/dist/cjs/unescape.js.map rename to deps/minimatch/dist/cjs/unescape.js.map diff --git a/deps/minimatch/src/dist/mjs/assert-valid-pattern.d.ts b/deps/minimatch/dist/mjs/assert-valid-pattern.d.ts similarity index 100% rename from deps/minimatch/src/dist/mjs/assert-valid-pattern.d.ts rename to deps/minimatch/dist/mjs/assert-valid-pattern.d.ts diff --git a/deps/minimatch/src/dist/mjs/assert-valid-pattern.d.ts.map b/deps/minimatch/dist/mjs/assert-valid-pattern.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/mjs/assert-valid-pattern.d.ts.map rename to deps/minimatch/dist/mjs/assert-valid-pattern.d.ts.map diff --git a/deps/minimatch/src/dist/mjs/assert-valid-pattern.js b/deps/minimatch/dist/mjs/assert-valid-pattern.js similarity index 100% rename from deps/minimatch/src/dist/mjs/assert-valid-pattern.js rename to deps/minimatch/dist/mjs/assert-valid-pattern.js diff --git a/deps/minimatch/src/dist/mjs/assert-valid-pattern.js.map b/deps/minimatch/dist/mjs/assert-valid-pattern.js.map similarity index 100% rename from deps/minimatch/src/dist/mjs/assert-valid-pattern.js.map rename to deps/minimatch/dist/mjs/assert-valid-pattern.js.map diff --git a/deps/minimatch/src/dist/mjs/ast.d.ts b/deps/minimatch/dist/mjs/ast.d.ts similarity index 100% rename from deps/minimatch/src/dist/mjs/ast.d.ts rename to deps/minimatch/dist/mjs/ast.d.ts diff --git a/deps/minimatch/src/dist/mjs/ast.d.ts.map b/deps/minimatch/dist/mjs/ast.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/mjs/ast.d.ts.map rename to deps/minimatch/dist/mjs/ast.d.ts.map diff --git a/deps/minimatch/src/dist/mjs/ast.js b/deps/minimatch/dist/mjs/ast.js similarity index 100% rename from deps/minimatch/src/dist/mjs/ast.js rename to deps/minimatch/dist/mjs/ast.js diff --git a/deps/minimatch/src/dist/mjs/ast.js.map b/deps/minimatch/dist/mjs/ast.js.map similarity index 100% rename from deps/minimatch/src/dist/mjs/ast.js.map rename to deps/minimatch/dist/mjs/ast.js.map diff --git a/deps/minimatch/src/dist/mjs/brace-expressions.d.ts b/deps/minimatch/dist/mjs/brace-expressions.d.ts similarity index 100% rename from deps/minimatch/src/dist/mjs/brace-expressions.d.ts rename to deps/minimatch/dist/mjs/brace-expressions.d.ts diff --git a/deps/minimatch/src/dist/mjs/brace-expressions.d.ts.map b/deps/minimatch/dist/mjs/brace-expressions.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/mjs/brace-expressions.d.ts.map rename to deps/minimatch/dist/mjs/brace-expressions.d.ts.map diff --git a/deps/minimatch/src/dist/mjs/brace-expressions.js b/deps/minimatch/dist/mjs/brace-expressions.js similarity index 100% rename from deps/minimatch/src/dist/mjs/brace-expressions.js rename to deps/minimatch/dist/mjs/brace-expressions.js diff --git a/deps/minimatch/src/dist/mjs/brace-expressions.js.map b/deps/minimatch/dist/mjs/brace-expressions.js.map similarity index 100% rename from deps/minimatch/src/dist/mjs/brace-expressions.js.map rename to deps/minimatch/dist/mjs/brace-expressions.js.map diff --git a/deps/minimatch/src/dist/mjs/escape.d.ts b/deps/minimatch/dist/mjs/escape.d.ts similarity index 100% rename from deps/minimatch/src/dist/mjs/escape.d.ts rename to deps/minimatch/dist/mjs/escape.d.ts diff --git a/deps/minimatch/src/dist/mjs/escape.d.ts.map b/deps/minimatch/dist/mjs/escape.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/mjs/escape.d.ts.map rename to deps/minimatch/dist/mjs/escape.d.ts.map diff --git a/deps/minimatch/src/dist/mjs/escape.js b/deps/minimatch/dist/mjs/escape.js similarity index 100% rename from deps/minimatch/src/dist/mjs/escape.js rename to deps/minimatch/dist/mjs/escape.js diff --git a/deps/minimatch/src/dist/mjs/escape.js.map b/deps/minimatch/dist/mjs/escape.js.map similarity index 100% rename from deps/minimatch/src/dist/mjs/escape.js.map rename to deps/minimatch/dist/mjs/escape.js.map diff --git a/deps/minimatch/src/dist/mjs/index.d.ts b/deps/minimatch/dist/mjs/index.d.ts similarity index 100% rename from deps/minimatch/src/dist/mjs/index.d.ts rename to deps/minimatch/dist/mjs/index.d.ts diff --git a/deps/minimatch/src/dist/mjs/index.d.ts.map b/deps/minimatch/dist/mjs/index.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/mjs/index.d.ts.map rename to deps/minimatch/dist/mjs/index.d.ts.map diff --git a/deps/minimatch/src/dist/mjs/index.js b/deps/minimatch/dist/mjs/index.js similarity index 100% rename from deps/minimatch/src/dist/mjs/index.js rename to deps/minimatch/dist/mjs/index.js diff --git a/deps/minimatch/src/dist/mjs/index.js.map b/deps/minimatch/dist/mjs/index.js.map similarity index 100% rename from deps/minimatch/src/dist/mjs/index.js.map rename to deps/minimatch/dist/mjs/index.js.map diff --git a/deps/minimatch/src/dist/mjs/package.json b/deps/minimatch/dist/mjs/package.json similarity index 100% rename from deps/minimatch/src/dist/mjs/package.json rename to deps/minimatch/dist/mjs/package.json diff --git a/deps/minimatch/src/dist/mjs/unescape.d.ts b/deps/minimatch/dist/mjs/unescape.d.ts similarity index 100% rename from deps/minimatch/src/dist/mjs/unescape.d.ts rename to deps/minimatch/dist/mjs/unescape.d.ts diff --git a/deps/minimatch/src/dist/mjs/unescape.d.ts.map b/deps/minimatch/dist/mjs/unescape.d.ts.map similarity index 100% rename from deps/minimatch/src/dist/mjs/unescape.d.ts.map rename to deps/minimatch/dist/mjs/unescape.d.ts.map diff --git a/deps/minimatch/src/dist/mjs/unescape.js b/deps/minimatch/dist/mjs/unescape.js similarity index 100% rename from deps/minimatch/src/dist/mjs/unescape.js rename to deps/minimatch/dist/mjs/unescape.js diff --git a/deps/minimatch/src/dist/mjs/unescape.js.map b/deps/minimatch/dist/mjs/unescape.js.map similarity index 100% rename from deps/minimatch/src/dist/mjs/unescape.js.map rename to deps/minimatch/dist/mjs/unescape.js.map diff --git a/deps/minimatch/index.js b/deps/minimatch/index.js index a333cd822011e9..9db4f793d03d7b 100644 --- a/deps/minimatch/index.js +++ b/deps/minimatch/index.js @@ -1,36 +1,8 @@ "use strict"; -var __defProp = Object.defineProperty; var __getOwnPropNames = Object.getOwnPropertyNames; -var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __commonJS = (cb, mod) => function __require() { return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; -var __publicField = (obj, key, value) => { - __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value); - return value; -}; -var __accessCheck = (obj, member, msg) => { - if (!member.has(obj)) - throw TypeError("Cannot " + msg); -}; -var __privateGet = (obj, member, getter) => { - __accessCheck(obj, member, "read from private field"); - return getter ? getter.call(obj) : member.get(obj); -}; -var __privateAdd = (obj, member, value) => { - if (member.has(obj)) - throw TypeError("Cannot add the same private member more than once"); - member instanceof WeakSet ? member.add(obj) : member.set(obj, value); -}; -var __privateSet = (obj, member, value, setter) => { - __accessCheck(obj, member, "write to private field"); - setter ? setter.call(obj, value) : member.set(obj, value); - return value; -}; -var __privateMethod = (obj, member, method) => { - __accessCheck(obj, member, "access private method"); - return method; -}; // node_modules/balanced-match/index.js var require_balanced_match = __commonJS({ @@ -412,86 +384,111 @@ var require_ast = __commonJS({ var qmark2 = "[^/]"; var star2 = qmark2 + "*?"; var starNoEmpty = qmark2 + "+?"; - var _root, _hasMagic, _uflag, _parts, _parent, _parentIndex, _negs, _filledNegs, _options, _toString, _emptyExt, _fillNegs, fillNegs_fn, _parseAST, parseAST_fn, _partsToRegExp, partsToRegExp_fn, _parseGlob, parseGlob_fn; - var _AST = class { + var AST = class _AST { + type; + #root; + #hasMagic; + #uflag = false; + #parts = []; + #parent; + #parentIndex; + #negs; + #filledNegs = false; + #options; + #toString; + // set to true if it's an extglob with no children + // (which really means one child of '') + #emptyExt = false; constructor(type, parent, options = {}) { - __privateAdd(this, _fillNegs); - __privateAdd(this, _partsToRegExp); - __publicField(this, "type"); - __privateAdd(this, _root, void 0); - __privateAdd(this, _hasMagic, void 0); - __privateAdd(this, _uflag, false); - __privateAdd(this, _parts, []); - __privateAdd(this, _parent, void 0); - __privateAdd(this, _parentIndex, void 0); - __privateAdd(this, _negs, void 0); - __privateAdd(this, _filledNegs, false); - __privateAdd(this, _options, void 0); - __privateAdd(this, _toString, void 0); - // set to true if it's an extglob with no children - // (which really means one child of '') - __privateAdd(this, _emptyExt, false); this.type = type; if (type) - __privateSet(this, _hasMagic, true); - __privateSet(this, _parent, parent); - __privateSet(this, _root, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _root) : this); - __privateSet(this, _options, __privateGet(this, _root) === this ? options : __privateGet(__privateGet(this, _root), _options)); - __privateSet(this, _negs, __privateGet(this, _root) === this ? [] : __privateGet(__privateGet(this, _root), _negs)); - if (type === "!" && !__privateGet(__privateGet(this, _root), _filledNegs)) - __privateGet(this, _negs).push(this); - __privateSet(this, _parentIndex, __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0); + this.#hasMagic = true; + this.#parent = parent; + this.#root = this.#parent ? this.#parent.#root : this; + this.#options = this.#root === this ? options : this.#root.#options; + this.#negs = this.#root === this ? [] : this.#root.#negs; + if (type === "!" && !this.#root.#filledNegs) + this.#negs.push(this); + this.#parentIndex = this.#parent ? this.#parent.#parts.length : 0; } get hasMagic() { - if (__privateGet(this, _hasMagic) !== void 0) - return __privateGet(this, _hasMagic); - for (const p of __privateGet(this, _parts)) { + if (this.#hasMagic !== void 0) + return this.#hasMagic; + for (const p of this.#parts) { if (typeof p === "string") continue; if (p.type || p.hasMagic) - return __privateSet(this, _hasMagic, true); + return this.#hasMagic = true; } - return __privateGet(this, _hasMagic); + return this.#hasMagic; } // reconstructs the pattern toString() { - if (__privateGet(this, _toString) !== void 0) - return __privateGet(this, _toString); + if (this.#toString !== void 0) + return this.#toString; if (!this.type) { - return __privateSet(this, _toString, __privateGet(this, _parts).map((p) => String(p)).join("")); + return this.#toString = this.#parts.map((p) => String(p)).join(""); } else { - return __privateSet(this, _toString, this.type + "(" + __privateGet(this, _parts).map((p) => String(p)).join("|") + ")"); + return this.#toString = this.type + "(" + this.#parts.map((p) => String(p)).join("|") + ")"; } } + #fillNegs() { + if (this !== this.#root) + throw new Error("should only call on root"); + if (this.#filledNegs) + return this; + this.toString(); + this.#filledNegs = true; + let n; + while (n = this.#negs.pop()) { + if (n.type !== "!") + continue; + let p = n; + let pp = p.#parent; + while (pp) { + for (let i = p.#parentIndex + 1; !pp.type && i < pp.#parts.length; i++) { + for (const part of n.#parts) { + if (typeof part === "string") { + throw new Error("string part in extglob AST??"); + } + part.copyIn(pp.#parts[i]); + } + } + p = pp; + pp = p.#parent; + } + } + return this; + } push(...parts) { for (const p of parts) { if (p === "") continue; - if (typeof p !== "string" && !(p instanceof _AST && __privateGet(p, _parent) === this)) { + if (typeof p !== "string" && !(p instanceof _AST && p.#parent === this)) { throw new Error("invalid part: " + p); } - __privateGet(this, _parts).push(p); + this.#parts.push(p); } } toJSON() { - const ret = this.type === null ? __privateGet(this, _parts).slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...__privateGet(this, _parts).map((p) => p.toJSON())]; + const ret = this.type === null ? this.#parts.slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...this.#parts.map((p) => p.toJSON())]; if (this.isStart() && !this.type) ret.unshift([]); - if (this.isEnd() && (this === __privateGet(this, _root) || __privateGet(__privateGet(this, _root), _filledNegs) && __privateGet(this, _parent)?.type === "!")) { + if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && this.#parent?.type === "!")) { ret.push({}); } return ret; } isStart() { - if (__privateGet(this, _root) === this) + if (this.#root === this) return true; - if (!__privateGet(this, _parent)?.isStart()) + if (!this.#parent?.isStart()) return false; - if (__privateGet(this, _parentIndex) === 0) + if (this.#parentIndex === 0) return true; - const p = __privateGet(this, _parent); - for (let i = 0; i < __privateGet(this, _parentIndex); i++) { - const pp = __privateGet(p, _parts)[i]; + const p = this.#parent; + for (let i = 0; i < this.#parentIndex; i++) { + const pp = p.#parts[i]; if (!(pp instanceof _AST && pp.type === "!")) { return false; } @@ -499,16 +496,16 @@ var require_ast = __commonJS({ return true; } isEnd() { - if (__privateGet(this, _root) === this) + if (this.#root === this) return true; - if (__privateGet(this, _parent)?.type === "!") + if (this.#parent?.type === "!") return true; - if (!__privateGet(this, _parent)?.isEnd()) + if (!this.#parent?.isEnd()) return false; if (!this.type) - return __privateGet(this, _parent)?.isEnd(); - const pl = __privateGet(this, _parent) ? __privateGet(__privateGet(this, _parent), _parts).length : 0; - return __privateGet(this, _parentIndex) === pl - 1; + return this.#parent?.isEnd(); + const pl = this.#parent ? this.#parent.#parts.length : 0; + return this.#parentIndex === pl - 1; } copyIn(part) { if (typeof part === "string") @@ -518,29 +515,132 @@ var require_ast = __commonJS({ } clone(parent) { const c = new _AST(this.type, parent); - for (const p of __privateGet(this, _parts)) { + for (const p of this.#parts) { c.copyIn(p); } return c; } + static #parseAST(str, ast, pos, opt) { + let escaping = false; + let inBrace = false; + let braceStart = -1; + let braceNeg = false; + if (ast.type === null) { + let i2 = pos; + let acc2 = ""; + while (i2 < str.length) { + const c = str.charAt(i2++); + if (escaping || c === "\\") { + escaping = !escaping; + acc2 += c; + continue; + } + if (inBrace) { + if (i2 === braceStart + 1) { + if (c === "^" || c === "!") { + braceNeg = true; + } + } else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc2 += c; + continue; + } else if (c === "[") { + inBrace = true; + braceStart = i2; + braceNeg = false; + acc2 += c; + continue; + } + if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(") { + ast.push(acc2); + acc2 = ""; + const ext2 = new _AST(c, ast); + i2 = _AST.#parseAST(str, ext2, i2, opt); + ast.push(ext2); + continue; + } + acc2 += c; + } + ast.push(acc2); + return i2; + } + let i = pos + 1; + let part = new _AST(null, ast); + const parts = []; + let acc = ""; + while (i < str.length) { + const c = str.charAt(i++); + if (escaping || c === "\\") { + escaping = !escaping; + acc += c; + continue; + } + if (inBrace) { + if (i === braceStart + 1) { + if (c === "^" || c === "!") { + braceNeg = true; + } + } else if (c === "]" && !(i === braceStart + 2 && braceNeg)) { + inBrace = false; + } + acc += c; + continue; + } else if (c === "[") { + inBrace = true; + braceStart = i; + braceNeg = false; + acc += c; + continue; + } + if (isExtglobType(c) && str.charAt(i) === "(") { + part.push(acc); + acc = ""; + const ext2 = new _AST(c, part); + part.push(ext2); + i = _AST.#parseAST(str, ext2, i, opt); + continue; + } + if (c === "|") { + part.push(acc); + acc = ""; + parts.push(part); + part = new _AST(null, ast); + continue; + } + if (c === ")") { + if (acc === "" && ast.#parts.length === 0) { + ast.#emptyExt = true; + } + part.push(acc); + acc = ""; + ast.push(...parts, part); + return i; + } + acc += c; + } + ast.type = null; + ast.#hasMagic = void 0; + ast.#parts = [str.substring(pos - 1)]; + return i; + } static fromGlob(pattern, options = {}) { - var _a; const ast = new _AST(null, void 0, options); - __privateMethod(_a = _AST, _parseAST, parseAST_fn).call(_a, pattern, ast, 0, options); + _AST.#parseAST(pattern, ast, 0, options); return ast; } // returns the regular expression if there's magic, or the unescaped // string if not. toMMPattern() { - if (this !== __privateGet(this, _root)) - return __privateGet(this, _root).toMMPattern(); + if (this !== this.#root) + return this.#root.toMMPattern(); const glob = this.toString(); const [re, body, hasMagic, uflag] = this.toRegExpSource(); - const anyMagic = hasMagic || __privateGet(this, _hasMagic) || __privateGet(this, _options).nocase && !__privateGet(this, _options).nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase(); + const anyMagic = hasMagic || this.#hasMagic || this.#options.nocase && !this.#options.nocaseMagicOnly && glob.toUpperCase() !== glob.toLowerCase(); if (!anyMagic) { return body; } - const flags = (__privateGet(this, _options).nocase ? "i" : "") + (uflag ? "u" : ""); + const flags = (this.#options.nocase ? "i" : "") + (uflag ? "u" : ""); return Object.assign(new RegExp(`^${re}$`, flags), { _src: re, _glob: glob @@ -616,22 +716,21 @@ var require_ast = __commonJS({ // is ^(?!\.), we can just prepend (?!\.) to the pattern (either root // or start or whatever) and prepend ^ or / at the Regexp construction. toRegExpSource(allowDot) { - const dot = allowDot ?? !!__privateGet(this, _options).dot; - if (__privateGet(this, _root) === this) - __privateMethod(this, _fillNegs, fillNegs_fn).call(this); + const dot = allowDot ?? !!this.#options.dot; + if (this.#root === this) + this.#fillNegs(); if (!this.type) { const noEmpty = this.isStart() && this.isEnd(); - const src = __privateGet(this, _parts).map((p) => { - var _a; - const [re, _, hasMagic, uflag] = typeof p === "string" ? __privateMethod(_a = _AST, _parseGlob, parseGlob_fn).call(_a, p, __privateGet(this, _hasMagic), noEmpty) : p.toRegExpSource(allowDot); - __privateSet(this, _hasMagic, __privateGet(this, _hasMagic) || hasMagic); - __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag); + const src = this.#parts.map((p) => { + const [re, _, hasMagic, uflag] = typeof p === "string" ? _AST.#parseGlob(p, this.#hasMagic, noEmpty) : p.toRegExpSource(allowDot); + this.#hasMagic = this.#hasMagic || hasMagic; + this.#uflag = this.#uflag || uflag; return re; }).join(""); let start2 = ""; if (this.isStart()) { - if (typeof __privateGet(this, _parts)[0] === "string") { - const dotTravAllowed = __privateGet(this, _parts).length === 1 && justDots.has(__privateGet(this, _parts)[0]); + if (typeof this.#parts[0] === "string") { + const dotTravAllowed = this.#parts.length === 1 && justDots.has(this.#parts[0]); if (!dotTravAllowed) { const aps = addPatternStart; const needNoTrav = ( @@ -646,28 +745,28 @@ var require_ast = __commonJS({ } } let end = ""; - if (this.isEnd() && __privateGet(__privateGet(this, _root), _filledNegs) && __privateGet(this, _parent)?.type === "!") { + if (this.isEnd() && this.#root.#filledNegs && this.#parent?.type === "!") { end = "(?:$|\\/)"; } const final2 = start2 + src + end; return [ final2, (0, unescape_js_12.unescape)(src), - __privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)), - __privateGet(this, _uflag) + this.#hasMagic = !!this.#hasMagic, + this.#uflag ]; } const repeated = this.type === "*" || this.type === "+"; const start = this.type === "!" ? "(?:(?!(?:" : "(?:"; - let body = __privateMethod(this, _partsToRegExp, partsToRegExp_fn).call(this, dot); + let body = this.#partsToRegExp(dot); if (this.isStart() && this.isEnd() && !body && this.type !== "!") { const s = this.toString(); - __privateSet(this, _parts, [s]); + this.#parts = [s]; this.type = null; - __privateSet(this, _hasMagic, void 0); + this.#hasMagic = void 0; return [s, (0, unescape_js_12.unescape)(this.toString()), false, false]; } - let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : __privateMethod(this, _partsToRegExp, partsToRegExp_fn).call(this, true); + let bodyDotAllowed = !repeated || allowDot || dot || !startNoDot ? "" : this.#partsToRegExp(true); if (bodyDotAllowed === body) { bodyDotAllowed = ""; } @@ -675,7 +774,7 @@ var require_ast = __commonJS({ body = `(?:${body})(?:${bodyDotAllowed})*?`; } let final = ""; - if (this.type === "!" && __privateGet(this, _emptyExt)) { + if (this.type === "!" && this.#emptyExt) { final = (this.isStart() && !dot ? startNoDot : "") + starNoEmpty; } else { const close = this.type === "!" ? ( @@ -687,218 +786,67 @@ var require_ast = __commonJS({ return [ final, (0, unescape_js_12.unescape)(body), - __privateSet(this, _hasMagic, !!__privateGet(this, _hasMagic)), - __privateGet(this, _uflag) + this.#hasMagic = !!this.#hasMagic, + this.#uflag ]; } - }; - var AST = _AST; - _root = new WeakMap(); - _hasMagic = new WeakMap(); - _uflag = new WeakMap(); - _parts = new WeakMap(); - _parent = new WeakMap(); - _parentIndex = new WeakMap(); - _negs = new WeakMap(); - _filledNegs = new WeakMap(); - _options = new WeakMap(); - _toString = new WeakMap(); - _emptyExt = new WeakMap(); - _fillNegs = new WeakSet(); - fillNegs_fn = function() { - if (this !== __privateGet(this, _root)) - throw new Error("should only call on root"); - if (__privateGet(this, _filledNegs)) - return this; - this.toString(); - __privateSet(this, _filledNegs, true); - let n; - while (n = __privateGet(this, _negs).pop()) { - if (n.type !== "!") - continue; - let p = n; - let pp = __privateGet(p, _parent); - while (pp) { - for (let i = __privateGet(p, _parentIndex) + 1; !pp.type && i < __privateGet(pp, _parts).length; i++) { - for (const part of __privateGet(n, _parts)) { - if (typeof part === "string") { - throw new Error("string part in extglob AST??"); - } - part.copyIn(__privateGet(pp, _parts)[i]); - } + #partsToRegExp(dot) { + return this.#parts.map((p) => { + if (typeof p === "string") { + throw new Error("string type in extglob ast??"); } - p = pp; - pp = __privateGet(p, _parent); - } + const [re, _, _hasMagic, uflag] = p.toRegExpSource(dot); + this.#uflag = this.#uflag || uflag; + return re; + }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|"); } - return this; - }; - _parseAST = new WeakSet(); - parseAST_fn = function(str, ast, pos, opt) { - var _a, _b; - let escaping = false; - let inBrace = false; - let braceStart = -1; - let braceNeg = false; - if (ast.type === null) { - let i2 = pos; - let acc2 = ""; - while (i2 < str.length) { - const c = str.charAt(i2++); - if (escaping || c === "\\") { - escaping = !escaping; - acc2 += c; + static #parseGlob(glob, hasMagic, noEmpty = false) { + let escaping = false; + let re = ""; + let uflag = false; + for (let i = 0; i < glob.length; i++) { + const c = glob.charAt(i); + if (escaping) { + escaping = false; + re += (reSpecials.has(c) ? "\\" : "") + c; continue; } - if (inBrace) { - if (i2 === braceStart + 1) { - if (c === "^" || c === "!") { - braceNeg = true; - } - } else if (c === "]" && !(i2 === braceStart + 2 && braceNeg)) { - inBrace = false; + if (c === "\\") { + if (i === glob.length - 1) { + re += "\\\\"; + } else { + escaping = true; } - acc2 += c; - continue; - } else if (c === "[") { - inBrace = true; - braceStart = i2; - braceNeg = false; - acc2 += c; - continue; - } - if (!opt.noext && isExtglobType(c) && str.charAt(i2) === "(") { - ast.push(acc2); - acc2 = ""; - const ext2 = new _AST(c, ast); - i2 = __privateMethod(_a = _AST, _parseAST, parseAST_fn).call(_a, str, ext2, i2, opt); - ast.push(ext2); continue; } - acc2 += c; - } - ast.push(acc2); - return i2; - } - let i = pos + 1; - let part = new _AST(null, ast); - const parts = []; - let acc = ""; - while (i < str.length) { - const c = str.charAt(i++); - if (escaping || c === "\\") { - escaping = !escaping; - acc += c; - continue; - } - if (inBrace) { - if (i === braceStart + 1) { - if (c === "^" || c === "!") { - braceNeg = true; + if (c === "[") { + const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i); + if (consumed) { + re += src; + uflag = uflag || needUflag; + i += consumed - 1; + hasMagic = hasMagic || magic; + continue; } - } else if (c === "]" && !(i === braceStart + 2 && braceNeg)) { - inBrace = false; } - acc += c; - continue; - } else if (c === "[") { - inBrace = true; - braceStart = i; - braceNeg = false; - acc += c; - continue; - } - if (isExtglobType(c) && str.charAt(i) === "(") { - part.push(acc); - acc = ""; - const ext2 = new _AST(c, part); - part.push(ext2); - i = __privateMethod(_b = _AST, _parseAST, parseAST_fn).call(_b, str, ext2, i, opt); - continue; - } - if (c === "|") { - part.push(acc); - acc = ""; - parts.push(part); - part = new _AST(null, ast); - continue; - } - if (c === ")") { - if (acc === "" && __privateGet(ast, _parts).length === 0) { - __privateSet(ast, _emptyExt, true); - } - part.push(acc); - acc = ""; - ast.push(...parts, part); - return i; - } - acc += c; - } - ast.type = null; - __privateSet(ast, _hasMagic, void 0); - __privateSet(ast, _parts, [str.substring(pos - 1)]); - return i; - }; - _partsToRegExp = new WeakSet(); - partsToRegExp_fn = function(dot) { - return __privateGet(this, _parts).map((p) => { - if (typeof p === "string") { - throw new Error("string type in extglob ast??"); - } - const [re, _, _hasMagic2, uflag] = p.toRegExpSource(dot); - __privateSet(this, _uflag, __privateGet(this, _uflag) || uflag); - return re; - }).filter((p) => !(this.isStart() && this.isEnd()) || !!p).join("|"); - }; - _parseGlob = new WeakSet(); - parseGlob_fn = function(glob, hasMagic, noEmpty = false) { - let escaping = false; - let re = ""; - let uflag = false; - for (let i = 0; i < glob.length; i++) { - const c = glob.charAt(i); - if (escaping) { - escaping = false; - re += (reSpecials.has(c) ? "\\" : "") + c; - continue; - } - if (c === "\\") { - if (i === glob.length - 1) { - re += "\\\\"; - } else { - escaping = true; + if (c === "*") { + if (noEmpty && glob === "*") + re += starNoEmpty; + else + re += star2; + hasMagic = true; + continue; } - continue; - } - if (c === "[") { - const [src, needUflag, consumed, magic] = (0, brace_expressions_js_1.parseClass)(glob, i); - if (consumed) { - re += src; - uflag = uflag || needUflag; - i += consumed - 1; - hasMagic = hasMagic || magic; + if (c === "?") { + re += qmark2; + hasMagic = true; continue; } + re += regExpEscape2(c); } - if (c === "*") { - if (noEmpty && glob === "*") - re += starNoEmpty; - else - re += star2; - hasMagic = true; - continue; - } - if (c === "?") { - re += qmark2; - hasMagic = true; - continue; - } - re += regExpEscape2(c); + return [re, (0, unescape_js_12.unescape)(glob), !!hasMagic, uflag]; } - return [re, (0, unescape_js_12.unescape)(glob), !!hasMagic, uflag]; }; - __privateAdd(AST, _parseAST); - __privateAdd(AST, _parseGlob); exports2.AST = AST; } }); diff --git a/deps/minimatch/package-lock.json b/deps/minimatch/package-lock.json new file mode 100644 index 00000000000000..956b257355a305 --- /dev/null +++ b/deps/minimatch/package-lock.json @@ -0,0 +1,6216 @@ +{ + "name": "minimatch", + "version": "9.0.3", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "minimatch", + "version": "9.0.3", + "license": "ISC", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "devDependencies": { + "@types/brace-expansion": "^1.1.0", + "@types/node": "^18.15.11", + "@types/tap": "^15.0.8", + "c8": "^7.12.0", + "esbuild": "^0.19.5", + "eslint-config-prettier": "^8.6.0", + "mkdirp": "1", + "prettier": "^2.8.2", + "tap": "^16.3.7", + "ts-node": "^10.9.1", + "typedoc": "^0.23.21", + "typescript": "^4.9.3" + }, + "engines": { + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/@ampproject/remapping": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", + "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", + "dev": true, + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.22.13", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", + "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.22.13", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/compat-data": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.3.tgz", + "integrity": "sha512-BmR4bWbDIoFJmJ9z2cZ8Gmm2MXgEDgjdWgpKmKWUt54UGFJdlj31ECtbaDvCG/qVdG3AQ1SfpZEs01lUFbzLOQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.3.tgz", + "integrity": "sha512-Jg+msLuNuCJDyBvFv5+OKOUjWMZgd85bKjbICd3zWrKAo+bJ49HJufi7CQE0q0uR8NGyO6xkCACScNqyjHSZew==", + "dev": true, + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.3", + "@babel/helper-compilation-targets": "^7.22.15", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.23.2", + "@babel/parser": "^7.23.3", + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.3", + "@babel/types": "^7.23.3", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.3.tgz", + "integrity": "sha512-keeZWAV4LU3tW0qRi19HRpabC/ilM0HRBBzf9/k8FFiG4KVpiv0FIy4hHfLfFQZNhziCTPTmd59zoyv6DNISzg==", + "dev": true, + "dependencies": { + "@babel/types": "^7.23.3", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz", + "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==", + "dev": true, + "dependencies": { + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.15", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true + }, + "node_modules/@babel/helper-environment-visitor": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz", + "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-function-name": { + "version": "7.23.0", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz", + "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz", + "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz", + "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", + "dev": true, + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-module-imports": "^7.22.15", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.20" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz", + "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz", + "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==", + "dev": true, + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", + "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", + "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.23.2", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", + "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", + "dev": true, + "dependencies": { + "@babel/template": "^7.22.15", + "@babel/traverse": "^7.23.2", + "@babel/types": "^7.23.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", + "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.20", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/parser": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.3.tgz", + "integrity": "sha512-uVsWNvlVsIninV2prNz/3lHCb+5CJ+e+IUBfbjToAHODtfGYLfCFuY4AU7TskI+dAKk+njsPiBjq1gKTvZOBaw==", + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/template": { + "version": "7.22.15", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz", + "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/parser": "^7.22.15", + "@babel/types": "^7.22.15" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.3.tgz", + "integrity": "sha512-+K0yF1/9yR0oHdE0StHuEj3uTPzwwbrLGfNOndVJVV2TqA5+j3oljJUb4nmB954FLGjNem976+B+eDuLIjesiQ==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.22.13", + "@babel/generator": "^7.23.3", + "@babel/helper-environment-visitor": "^7.22.20", + "@babel/helper-function-name": "^7.23.0", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.23.3", + "@babel/types": "^7.23.3", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/types": { + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.3.tgz", + "integrity": "sha512-OZnvoH2l8PK5eUvEcUyCt/sXgr/h+UWpVuBbOljwcrAgUl6lpchoQ++PHGyQy1AtYnVA6CEq3y5xeEI10brpXw==", + "dev": true, + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@bcoe/v8-coverage": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", + "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", + "dev": true + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz", + "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz", + "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz", + "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz", + "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz", + "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz", + "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz", + "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz", + "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz", + "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz", + "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz", + "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz", + "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz", + "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz", + "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz", + "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz", + "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz", + "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz", + "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz", + "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz", + "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz", + "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz", + "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@eslint-community/eslint-utils": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", + "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==", + "dev": true, + "peer": true, + "dependencies": { + "eslint-visitor-keys": "^3.3.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "peerDependencies": { + "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" + } + }, + "node_modules/@eslint-community/regexpp": { + "version": "4.10.0", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz", + "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.0.0 || ^14.0.0 || >=16.0.0" + } + }, + "node_modules/@eslint/eslintrc": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.3.tgz", + "integrity": "sha512-yZzuIG+jnVu6hNSzFEN07e8BxF3uAzYtQb6uDkaYZLo6oYZDCq454c5kB8zxnzfCYyP4MIuyBn10L0DqwujTmA==", + "dev": true, + "peer": true, + "dependencies": { + "ajv": "^6.12.4", + "debug": "^4.3.2", + "espree": "^9.6.0", + "globals": "^13.19.0", + "ignore": "^5.2.0", + "import-fresh": "^3.2.1", + "js-yaml": "^4.1.0", + "minimatch": "^3.1.2", + "strip-json-comments": "^3.1.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/@eslint/js": { + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.54.0.tgz", + "integrity": "sha512-ut5V+D+fOoWPgGGNj83GGjnntO39xDy6DWxO0wb7Jp3DcMX0TfIqdzHF85VTQkerdyGmuuMD9AKAo5KiNlf/AQ==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + } + }, + "node_modules/@humanwhocodes/config-array": { + "version": "0.11.13", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", + "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==", + "dev": true, + "peer": true, + "dependencies": { + "@humanwhocodes/object-schema": "^2.0.1", + "debug": "^4.1.1", + "minimatch": "^3.0.5" + }, + "engines": { + "node": ">=10.10.0" + } + }, + "node_modules/@humanwhocodes/module-importer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", + "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=12.22" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/nzakas" + } + }, + "node_modules/@humanwhocodes/object-schema": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz", + "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==", + "dev": true, + "peer": true + }, + "node_modules/@istanbuljs/load-nyc-config": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz", + "integrity": "sha512-VjeHSlIzpv/NyD3N0YuHfXOPDIixcA1q2ZV98wsMqcYlPmv2n3Yb2lYP9XMElnaFVXg5A7YLTeLu6V84uQDjmQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.3.1", + "find-up": "^4.1.0", + "get-package-type": "^0.1.0", + "js-yaml": "^3.13.1", + "resolve-from": "^5.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "dependencies": { + "sprintf-js": "~1.0.2" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/js-yaml": { + "version": "3.14.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", + "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", + "dev": true, + "dependencies": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/load-nyc-config/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@istanbuljs/schema": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz", + "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", + "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", + "dev": true, + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", + "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", + "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", + "dev": true, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "dev": true + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.20", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz", + "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "peer": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@tsconfig/node10": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@tsconfig/node10/-/node10-1.0.9.tgz", + "integrity": "sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==", + "dev": true + }, + "node_modules/@tsconfig/node12": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@tsconfig/node12/-/node12-1.0.11.tgz", + "integrity": "sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==", + "dev": true + }, + "node_modules/@tsconfig/node14": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@tsconfig/node14/-/node14-1.0.3.tgz", + "integrity": "sha512-ysT8mhdixWK6Hw3i1V2AeRqZ5WfXg1G43mqoYlM2nc6388Fq5jcXyr5mRsqViLx/GJYdoL0bfXD8nmF+Zn/Iow==", + "dev": true + }, + "node_modules/@tsconfig/node16": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@tsconfig/node16/-/node16-1.0.4.tgz", + "integrity": "sha512-vxhUy4J8lyeyinH7Azl1pdd43GJhZH/tP2weN8TntQblOY+A0XbT8DJk1/oCPuOOyg/Ja757rG0CgHcWC8OfMA==", + "dev": true + }, + "node_modules/@types/brace-expansion": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/@types/brace-expansion/-/brace-expansion-1.1.2.tgz", + "integrity": "sha512-+YDjlWHMm/zoiQSKhEhL/0HdfYxCVuGlP5tQLm5hoHtxGPAMqyHjGpLqm58YDw7vG+RafAahp7HKXeNIwBP3kQ==", + "dev": true + }, + "node_modules/@types/istanbul-lib-coverage": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", + "dev": true + }, + "node_modules/@types/node": { + "version": "18.18.10", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.10.tgz", + "integrity": "sha512-luANqZxPmjTll8bduz4ACs/lNTCLuWssCyjqTY9yLdsv1xnViQp3ISKwsEWOIecO13JWUqjVdig/Vjjc09o8uA==", + "dev": true, + "dependencies": { + "undici-types": "~5.26.4" + } + }, + "node_modules/@types/tap": { + "version": "15.0.11", + "resolved": "https://registry.npmjs.org/@types/tap/-/tap-15.0.11.tgz", + "integrity": "sha512-QzbxIsrK6yX3iWC2PXGX/Ljz5cGISDEuOGISMcckeSUKIJXzbsfJLF4LddoncZ+ELVZpO0X87KfRem4h+yBFXQ==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@ungap/structured-clone": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz", + "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", + "dev": true, + "peer": true + }, + "node_modules/acorn": { + "version": "8.11.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", + "integrity": "sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==", + "dev": true, + "bin": { + "acorn": "bin/acorn" + }, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/acorn-jsx": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", + "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", + "dev": true, + "peer": true, + "peerDependencies": { + "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/acorn-walk": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.0.tgz", + "integrity": "sha512-FS7hV565M5l1R08MXqo8odwMTB02C2UqzB17RVgu9EyuYFBqJZ3/ZY97sQD5FewVu1UyDFc1yztUDrAwT0EypA==", + "dev": true, + "engines": { + "node": ">=0.4.0" + } + }, + "node_modules/aggregate-error": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz", + "integrity": "sha512-4I7Td01quW/RpocfNayFdFVk1qSuoh0E7JrbRJ16nH01HhKFQ88INq9Sd+nd72zqRySlr9BmDA8xlEJ6vJMrYA==", + "dev": true, + "dependencies": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "peer": true, + "dependencies": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + }, + "funding": { + "type": "github", + "url": "https://github.com/sponsors/epoberezkin" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/anymatch": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", + "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", + "dev": true, + "dependencies": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/append-transform": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/append-transform/-/append-transform-2.0.0.tgz", + "integrity": "sha512-7yeyCEurROLQJFv5Xj4lEGTy0borxepjFv1g22oAdqFu//SrAlDl1O1Nxx15SH1RoliUml6p8dwJW9jvZughhg==", + "dev": true, + "dependencies": { + "default-require-extensions": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==", + "dev": true + }, + "node_modules/arg": { + "version": "4.1.3", + "resolved": "https://registry.npmjs.org/arg/-/arg-4.1.3.tgz", + "integrity": "sha512-58S9QDqG0Xx27YwPSt9fJxivjYl432YCwfDMfZ+71RAqUrZef7LrKQZ3LHLOwCS4FLNBplP533Zx895SeOCHvA==", + "dev": true + }, + "node_modules/argparse": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", + "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", + "dev": true, + "peer": true + }, + "node_modules/async-hook-domain": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/async-hook-domain/-/async-hook-domain-2.0.4.tgz", + "integrity": "sha512-14LjCmlK1PK8eDtTezR6WX8TMaYNIzBIsd2D1sGoGjgx0BuNMMoSdk7i/drlbtamy0AWv9yv2tkB+ASdmeqFIw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/balanced-match": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/binary-extensions": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", + "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/bind-obj-methods": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bind-obj-methods/-/bind-obj-methods-3.0.0.tgz", + "integrity": "sha512-nLEaaz3/sEzNSyPWRsN9HNsqwk1AUyECtGj+XwGdIi3xABnEqecvXtIJ0wehQXuuER5uZ/5fTs2usONgYjG+iw==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "dependencies": { + "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/browserslist": { + "version": "4.22.1", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz", + "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001541", + "electron-to-chromium": "^1.4.535", + "node-releases": "^2.0.13", + "update-browserslist-db": "^1.0.13" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "node_modules/c8": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-7.14.0.tgz", + "integrity": "sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw==", + "dev": true, + "dependencies": { + "@bcoe/v8-coverage": "^0.2.3", + "@istanbuljs/schema": "^0.1.3", + "find-up": "^5.0.0", + "foreground-child": "^2.0.0", + "istanbul-lib-coverage": "^3.2.0", + "istanbul-lib-report": "^3.0.0", + "istanbul-reports": "^3.1.4", + "rimraf": "^3.0.2", + "test-exclude": "^6.0.0", + "v8-to-istanbul": "^9.0.0", + "yargs": "^16.2.0", + "yargs-parser": "^20.2.9" + }, + "bin": { + "c8": "bin/c8.js" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/caching-transform": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/caching-transform/-/caching-transform-4.0.0.tgz", + "integrity": "sha512-kpqOvwXnjjN44D89K5ccQC+RUrsy7jB/XLlRrx0D7/2HNcTPqzsb6XgYoErwko6QsV184CA2YgS1fxDiiDZMWA==", + "dev": true, + "dependencies": { + "hasha": "^5.0.0", + "make-dir": "^3.0.0", + "package-hash": "^4.0.0", + "write-file-atomic": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/caching-transform/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/caching-transform/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001563", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001563.tgz", + "integrity": "sha512-na2WUmOxnwIZtwnFI2CZ/3er0wdNzU7hN+cPYz/z2ajHThnkWjNBOpEPP4n+4r2WPM847JaMotaJE3bnfzjyKw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "peer": true, + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chokidar": { + "version": "3.5.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz", + "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==", + "dev": true, + "funding": [ + { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + ], + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/chokidar/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/cliui": { + "version": "7.0.4", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", + "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^7.0.0" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true, + "bin": { + "color-support": "bin.js" + } + }, + "node_modules/commondir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", + "integrity": "sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==", + "dev": true + }, + "node_modules/concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", + "dev": true + }, + "node_modules/convert-source-map": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", + "integrity": "sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==", + "dev": true + }, + "node_modules/create-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/create-require/-/create-require-1.1.1.tgz", + "integrity": "sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ==", + "dev": true + }, + "node_modules/cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "dependencies": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/deep-is": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", + "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", + "dev": true, + "peer": true + }, + "node_modules/default-require-extensions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/default-require-extensions/-/default-require-extensions-3.0.1.tgz", + "integrity": "sha512-eXTJmRbm2TIt9MgWTsOH1wEuhew6XGZcMeGKCtLedIg/NCsg1iBePXkceTdK4Fii7pzmN9tGsZhKzZ4h7O/fxw==", + "dev": true, + "dependencies": { + "strip-bom": "^4.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true, + "engines": { + "node": ">=0.3.1" + } + }, + "node_modules/doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "peer": true, + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.4.588", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.588.tgz", + "integrity": "sha512-soytjxwbgcCu7nh5Pf4S2/4wa6UIu+A3p03U2yVr53qGxi1/VTR3ENI+p50v+UxqqZAfl48j3z55ud7VHIOr9w==", + "dev": true + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/es6-error": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/es6-error/-/es6-error-4.1.1.tgz", + "integrity": "sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==", + "dev": true + }, + "node_modules/esbuild": { + "version": "0.19.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz", + "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.19.5", + "@esbuild/android-arm64": "0.19.5", + "@esbuild/android-x64": "0.19.5", + "@esbuild/darwin-arm64": "0.19.5", + "@esbuild/darwin-x64": "0.19.5", + "@esbuild/freebsd-arm64": "0.19.5", + "@esbuild/freebsd-x64": "0.19.5", + "@esbuild/linux-arm": "0.19.5", + "@esbuild/linux-arm64": "0.19.5", + "@esbuild/linux-ia32": "0.19.5", + "@esbuild/linux-loong64": "0.19.5", + "@esbuild/linux-mips64el": "0.19.5", + "@esbuild/linux-ppc64": "0.19.5", + "@esbuild/linux-riscv64": "0.19.5", + "@esbuild/linux-s390x": "0.19.5", + "@esbuild/linux-x64": "0.19.5", + "@esbuild/netbsd-x64": "0.19.5", + "@esbuild/openbsd-x64": "0.19.5", + "@esbuild/sunos-x64": "0.19.5", + "@esbuild/win32-arm64": "0.19.5", + "@esbuild/win32-ia32": "0.19.5", + "@esbuild/win32-x64": "0.19.5" + } + }, + "node_modules/escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/eslint": { + "version": "8.54.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.54.0.tgz", + "integrity": "sha512-NY0DfAkM8BIZDVl6PgSa1ttZbx3xHgJzSNJKYcQglem6CppHyMhRIQkBVSSMaSRnLhig3jsDbEzOjwCVt4AmmA==", + "dev": true, + "peer": true, + "dependencies": { + "@eslint-community/eslint-utils": "^4.2.0", + "@eslint-community/regexpp": "^4.6.1", + "@eslint/eslintrc": "^2.1.3", + "@eslint/js": "8.54.0", + "@humanwhocodes/config-array": "^0.11.13", + "@humanwhocodes/module-importer": "^1.0.1", + "@nodelib/fs.walk": "^1.2.8", + "@ungap/structured-clone": "^1.2.0", + "ajv": "^6.12.4", + "chalk": "^4.0.0", + "cross-spawn": "^7.0.2", + "debug": "^4.3.2", + "doctrine": "^3.0.0", + "escape-string-regexp": "^4.0.0", + "eslint-scope": "^7.2.2", + "eslint-visitor-keys": "^3.4.3", + "espree": "^9.6.1", + "esquery": "^1.4.2", + "esutils": "^2.0.2", + "fast-deep-equal": "^3.1.3", + "file-entry-cache": "^6.0.1", + "find-up": "^5.0.0", + "glob-parent": "^6.0.2", + "globals": "^13.19.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.0", + "imurmurhash": "^0.1.4", + "is-glob": "^4.0.0", + "is-path-inside": "^3.0.3", + "js-yaml": "^4.1.0", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.4.1", + "lodash.merge": "^4.6.2", + "minimatch": "^3.1.2", + "natural-compare": "^1.4.0", + "optionator": "^0.9.3", + "strip-ansi": "^6.0.1", + "text-table": "^0.2.0" + }, + "bin": { + "eslint": "bin/eslint.js" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-config-prettier": { + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-8.10.0.tgz", + "integrity": "sha512-SM8AMJdeQqRYT9O9zguiruQZaN7+z+E4eAP9oiLNGKMtomwaB1E9dcgUD6ZAn/eQAb52USbvezbiljfZUhbJcg==", + "dev": true, + "bin": { + "eslint-config-prettier": "bin/cli.js" + }, + "peerDependencies": { + "eslint": ">=7.0.0" + } + }, + "node_modules/eslint-scope": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", + "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==", + "dev": true, + "peer": true, + "dependencies": { + "esrecurse": "^4.3.0", + "estraverse": "^5.2.0" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/eslint-visitor-keys": { + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", + "dev": true, + "peer": true, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/espree": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz", + "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==", + "dev": true, + "peer": true, + "dependencies": { + "acorn": "^8.9.0", + "acorn-jsx": "^5.3.2", + "eslint-visitor-keys": "^3.4.1" + }, + "engines": { + "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint" + } + }, + "node_modules/esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true, + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/esquery": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", + "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "dev": true, + "peer": true, + "dependencies": { + "estraverse": "^5.1.0" + }, + "engines": { + "node": ">=0.10" + } + }, + "node_modules/esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "peer": true, + "dependencies": { + "estraverse": "^5.2.0" + }, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4.0" + } + }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/events-to-array": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", + "integrity": "sha512-inRWzRY7nG+aXZxBzEqYKB3HPgwflZRopAjDCHv0whhRx+MTUr1ei0ICZUypdyE0HRm4L2d5VEcIqLD6yl+BFA==", + "dev": true + }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true, + "peer": true + }, + "node_modules/fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true, + "peer": true + }, + "node_modules/fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", + "dev": true, + "peer": true + }, + "node_modules/fastq": { + "version": "1.15.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz", + "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==", + "dev": true, + "peer": true, + "dependencies": { + "reusify": "^1.0.4" + } + }, + "node_modules/file-entry-cache": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz", + "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==", + "dev": true, + "peer": true, + "dependencies": { + "flat-cache": "^3.0.4" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/find-cache-dir": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.2.tgz", + "integrity": "sha512-wXZV5emFEjrridIgED11OoUKLxiYjAcqot/NJdAkOhlJ+vGzwhOAfcG5OX1jP+S0PcjEn8bdMJv+g2jwQ3Onig==", + "dev": true, + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/find-cache-dir/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/find-cache-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "dependencies": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/findit": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findit/-/findit-2.0.0.tgz", + "integrity": "sha512-ENZS237/Hr8bjczn5eKuBohLgaD0JyUd0arxretR1f9RO46vZHA1b2y0VorgGV3WaOT3c+78P8h7v4JGJ1i/rg==", + "dev": true + }, + "node_modules/flat-cache": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", + "dev": true, + "peer": true, + "dependencies": { + "flatted": "^3.2.9", + "keyv": "^4.5.3", + "rimraf": "^3.0.2" + }, + "engines": { + "node": "^10.12.0 || >=12.0.0" + } + }, + "node_modules/flatted": { + "version": "3.2.9", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz", + "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==", + "dev": true, + "peer": true + }, + "node_modules/foreground-child": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", + "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==", + "dev": true, + "dependencies": { + "cross-spawn": "^7.0.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/fromentries": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/fromentries/-/fromentries-1.3.2.tgz", + "integrity": "sha512-cHEpEQHUg0f8XdtZCc2ZAhrHzKzT0MrFUTcvx+hfxYu7rGMDc5SKoXFh+n4YigxsHXRzc6OrCshdR1bWH6HHyg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, + "node_modules/fs-exists-cached": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-exists-cached/-/fs-exists-cached-1.0.0.tgz", + "integrity": "sha512-kSxoARUDn4F2RPXX48UXnaFKwVU7Ivd/6qpzZL29MCDmr9sTvybv4gFCp+qaI4fM9m0z9fgz/yJvi56GAz+BZg==", + "dev": true + }, + "node_modules/fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", + "dev": true + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/function-loop": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/function-loop/-/function-loop-2.0.1.tgz", + "integrity": "sha512-ktIR+O6i/4h+j/ZhZJNdzeI4i9lEPeEK6UPR2EVyTVBqOwcU3Za9xYKLH64ZR9HmcROyRrOkizNyjjtWJzDDkQ==", + "dev": true + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/get-package-type": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/get-package-type/-/get-package-type-0.1.0.tgz", + "integrity": "sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q==", + "dev": true, + "engines": { + "node": ">=8.0.0" + } + }, + "node_modules/glob": { + "version": "7.2.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", + "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", + "dev": true, + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/glob-parent": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", + "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", + "dev": true, + "peer": true, + "dependencies": { + "is-glob": "^4.0.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/globals": { + "version": "13.23.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.23.0.tgz", + "integrity": "sha512-XAmF0RjlrjY23MA51q3HltdlGxUpXPvg0GioKiD9X6HD28iMjo2dKC8Vqwm7lne4GNr78+RHTfliktR6ZH09wA==", + "dev": true, + "peer": true, + "dependencies": { + "type-fest": "^0.20.2" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true + }, + "node_modules/graphemer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz", + "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", + "dev": true, + "peer": true + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/hasha": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/hasha/-/hasha-5.2.2.tgz", + "integrity": "sha512-Hrp5vIK/xr5SkeN2onO32H0MgNZ0f17HRNH39WfL0SYUNOTZ5Lz1TJ8Pajo/87dYGEFlLMm7mIc/k/s6Bvz9HQ==", + "dev": true, + "dependencies": { + "is-stream": "^2.0.0", + "type-fest": "^0.8.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/hasha/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/html-escaper": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", + "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==", + "dev": true + }, + "node_modules/ignore": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 4" + } + }, + "node_modules/import-fresh": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", + "dev": true, + "peer": true, + "dependencies": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", + "dev": true, + "engines": { + "node": ">=0.8.19" + } + }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", + "dev": true, + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "node_modules/is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "dependencies": { + "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-glob": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", + "dev": true, + "dependencies": { + "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, + "node_modules/is-path-inside": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz", + "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", + "dev": true + }, + "node_modules/is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", + "dev": true + }, + "node_modules/istanbul-lib-coverage": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-hook": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/istanbul-lib-hook/-/istanbul-lib-hook-3.0.0.tgz", + "integrity": "sha512-Pt/uge1Q9s+5VAZ+pCo16TYMWPBIl+oaNIjgLQxcX0itS6ueeaA+pEfThZpH8WxhFgCiEb8sAJY6MdUKgiIWaQ==", + "dev": true, + "dependencies": { + "append-transform": "^2.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-4.0.3.tgz", + "integrity": "sha512-BXgQl9kf4WTCPCCpmFGoJkz/+uhvm7h7PFKUYxh7qarQd3ER33vHG//qaE8eN25l07YqZPpHXU9I09l/RD5aGQ==", + "dev": true, + "dependencies": { + "@babel/core": "^7.7.5", + "@istanbuljs/schema": "^0.1.2", + "istanbul-lib-coverage": "^3.0.0", + "semver": "^6.3.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-instrument/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/istanbul-lib-processinfo": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-processinfo/-/istanbul-lib-processinfo-2.0.3.tgz", + "integrity": "sha512-NkwHbo3E00oybX6NGJi6ar0B29vxyvNwoC7eJ4G4Yq28UfY758Hgn/heV8VRFhevPED4LXfFz0DQ8z/0kw9zMg==", + "dev": true, + "dependencies": { + "archy": "^1.0.0", + "cross-spawn": "^7.0.3", + "istanbul-lib-coverage": "^3.2.0", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "uuid": "^8.3.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/istanbul-lib-report": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", + "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==", + "dev": true, + "dependencies": { + "istanbul-lib-coverage": "^3.0.0", + "make-dir": "^4.0.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-lib-source-maps": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/istanbul-lib-source-maps/-/istanbul-lib-source-maps-4.0.1.tgz", + "integrity": "sha512-n3s8EwkdFIJCG3BPKBYvskgXGoy88ARzvegkitk60NxRdwltLOTaH7CUiMRXvwYorl0Q712iEjcWB+fK/MrWVw==", + "dev": true, + "dependencies": { + "debug": "^4.1.1", + "istanbul-lib-coverage": "^3.0.0", + "source-map": "^0.6.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/istanbul-reports": { + "version": "3.1.6", + "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz", + "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==", + "dev": true, + "dependencies": { + "html-escaper": "^2.0.0", + "istanbul-lib-report": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/jackspeak": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-1.4.2.tgz", + "integrity": "sha512-GHeGTmnuaHnvS+ZctRB01bfxARuu9wW83ENbuiweu07SFcVlZrJpcshSre/keGT7YGBhLHg/+rXCNSrsEHKU4Q==", + "dev": true, + "dependencies": { + "cliui": "^7.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "node_modules/js-yaml": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", + "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", + "dev": true, + "peer": true, + "dependencies": { + "argparse": "^2.0.1" + }, + "bin": { + "js-yaml": "bin/js-yaml.js" + } + }, + "node_modules/jsesc": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", + "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/json-buffer": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", + "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", + "dev": true, + "peer": true + }, + "node_modules/json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true, + "peer": true + }, + "node_modules/json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", + "dev": true, + "peer": true + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/jsonc-parser": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", + "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==", + "dev": true + }, + "node_modules/keyv": { + "version": "4.5.4", + "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", + "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", + "dev": true, + "peer": true, + "dependencies": { + "json-buffer": "3.0.1" + } + }, + "node_modules/levn": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", + "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1", + "type-check": "~0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/libtap": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/libtap/-/libtap-1.4.1.tgz", + "integrity": "sha512-S9v19shLTigoMn3c02V7LZ4t09zxmVP3r3RbEAwuHFYeKgF+ESFJxoQ0PMFKW4XdgQhcjVBEwDoopG6WROq/gw==", + "dev": true, + "dependencies": { + "async-hook-domain": "^2.0.4", + "bind-obj-methods": "^3.0.0", + "diff": "^4.0.2", + "function-loop": "^2.0.1", + "minipass": "^3.1.5", + "own-or": "^1.0.0", + "own-or-env": "^1.0.2", + "signal-exit": "^3.0.4", + "stack-utils": "^2.0.4", + "tap-parser": "^11.0.0", + "tap-yaml": "^1.0.0", + "tcompare": "^5.0.6", + "trivial-deferred": "^1.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "dependencies": { + "p-locate": "^5.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/lodash.flattendeep": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.flattendeep/-/lodash.flattendeep-4.4.0.tgz", + "integrity": "sha512-uHaJFihxmJcEX3kT4I23ABqKKalJ/zDrDg0lsFtc1h+3uw49SIJ5beyhx5ExVRti3AvKoOJngIj7xz3oylPdWQ==", + "dev": true + }, + "node_modules/lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", + "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", + "dev": true, + "peer": true + }, + "node_modules/lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/lunr": { + "version": "2.3.9", + "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", + "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", + "dev": true + }, + "node_modules/make-dir": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz", + "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==", + "dev": true, + "dependencies": { + "semver": "^7.5.3" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/make-error": { + "version": "1.3.6", + "resolved": "https://registry.npmjs.org/make-error/-/make-error-1.3.6.tgz", + "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", + "dev": true + }, + "node_modules/marked": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", + "dev": true, + "bin": { + "marked": "bin/marked.js" + }, + "engines": { + "node": ">= 12" + } + }, + "node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/minimatch/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", + "dev": true, + "peer": true + }, + "node_modules/node-preload": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/node-preload/-/node-preload-0.2.1.tgz", + "integrity": "sha512-RM5oyBy45cLEoHqCeh+MNuFAxO0vTFBLskvQbOKnEE7YTTSN4tbN8QWDIPQ6L+WvKsB/qLEGpYe2ZZ9d4W9OIQ==", + "dev": true, + "dependencies": { + "process-on-spawn": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/node-releases": { + "version": "2.0.13", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", + "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "dev": true + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/nyc": { + "version": "15.1.0", + "resolved": "https://registry.npmjs.org/nyc/-/nyc-15.1.0.tgz", + "integrity": "sha512-jMW04n9SxKdKi1ZMGhvUTHBN0EICCRkHemEoE5jm6mTYcqcdas0ATzgUgejlQUHMvpnOZqGB5Xxsv9KxJW1j8A==", + "dev": true, + "dependencies": { + "@istanbuljs/load-nyc-config": "^1.0.0", + "@istanbuljs/schema": "^0.1.2", + "caching-transform": "^4.0.0", + "convert-source-map": "^1.7.0", + "decamelize": "^1.2.0", + "find-cache-dir": "^3.2.0", + "find-up": "^4.1.0", + "foreground-child": "^2.0.0", + "get-package-type": "^0.1.0", + "glob": "^7.1.6", + "istanbul-lib-coverage": "^3.0.0", + "istanbul-lib-hook": "^3.0.0", + "istanbul-lib-instrument": "^4.0.0", + "istanbul-lib-processinfo": "^2.0.2", + "istanbul-lib-report": "^3.0.0", + "istanbul-lib-source-maps": "^4.0.0", + "istanbul-reports": "^3.0.2", + "make-dir": "^3.0.0", + "node-preload": "^0.2.1", + "p-map": "^3.0.0", + "process-on-spawn": "^1.0.0", + "resolve-from": "^5.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "spawn-wrap": "^2.0.0", + "test-exclude": "^6.0.0", + "yargs": "^15.0.2" + }, + "bin": { + "nyc": "bin/nyc.js" + }, + "engines": { + "node": ">=8.9" + } + }, + "node_modules/nyc/node_modules/cliui": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-6.0.0.tgz", + "integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.0", + "wrap-ansi": "^6.2.0" + } + }, + "node_modules/nyc/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nyc/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/nyc/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/nyc/node_modules/wrap-ansi": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-6.2.0.tgz", + "integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/y18n": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", + "dev": true + }, + "node_modules/nyc/node_modules/yargs": { + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", + "dev": true, + "dependencies": { + "cliui": "^6.0.0", + "decamelize": "^1.2.0", + "find-up": "^4.1.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^4.2.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^18.1.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/nyc/node_modules/yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "dependencies": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", + "dev": true, + "bin": { + "opener": "bin/opener-bin.js" + } + }, + "node_modules/optionator": { + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", + "dev": true, + "peer": true, + "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", + "deep-is": "^0.1.3", + "fast-levenshtein": "^2.0.6", + "levn": "^0.4.1", + "prelude-ls": "^1.2.1", + "type-check": "^0.4.0" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/own-or": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/own-or/-/own-or-1.0.0.tgz", + "integrity": "sha512-NfZr5+Tdf6MB8UI9GLvKRs4cXY8/yB0w3xtt84xFdWy8hkGjn+JFc60VhzS/hFRfbyxFcGYMTjnF4Me+RbbqrA==", + "dev": true + }, + "node_modules/own-or-env": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/own-or-env/-/own-or-env-1.0.2.tgz", + "integrity": "sha512-NQ7v0fliWtK7Lkb+WdFqe6ky9XAzYmlkXthQrBbzlYbmFKoAYbDDcwmOm6q8kOuwSRXW8bdL5ORksploUJmWgw==", + "dev": true, + "dependencies": { + "own-or": "^1.0.0" + } + }, + "node_modules/p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "dependencies": { + "yocto-queue": "^0.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "dependencies": { + "p-limit": "^3.0.2" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "dependencies": { + "aggregate-error": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/package-hash": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-4.0.0.tgz", + "integrity": "sha512-whdkPIooSu/bASggZ96BWVvZTRMOFxnyUG5PnTSGKoJE2gd5mbVNmR2Nj20QFzxYYgAXpoqC+AiXzl+UMRh7zQ==", + "dev": true, + "dependencies": { + "graceful-fs": "^4.1.15", + "hasha": "^5.0.0", + "lodash.flattendeep": "^4.4.0", + "release-zalgo": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "peer": true, + "dependencies": { + "callsites": "^3.0.0" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/picocolors": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", + "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", + "dev": true + }, + "node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/pkg-dir/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/pkg-dir/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", + "dev": true, + "peer": true, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/prettier": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", + "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "dev": true, + "bin": { + "prettier": "bin-prettier.js" + }, + "engines": { + "node": ">=10.13.0" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/process-on-spawn": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/process-on-spawn/-/process-on-spawn-1.0.0.tgz", + "integrity": "sha512-1WsPDsUSMmZH5LeMLegqkPDrsGgsWwk1Exipy2hvB0o/F0ASzbpIctSCcZIK1ykJvtTJULEH+20WOFjMvGnCTg==", + "dev": true, + "dependencies": { + "fromentries": "^1.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/punycode": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peer": true + }, + "node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, + "node_modules/release-zalgo": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/release-zalgo/-/release-zalgo-1.0.0.tgz", + "integrity": "sha512-gUAyHVHPPC5wdqX/LG4LWtRYtgjxyX78oanFNTMMyFEfOqdC54s3eE82imuWKbOeqYht2CrNf64Qb8vgmmtZGA==", + "dev": true, + "dependencies": { + "es6-error": "^4.0.1" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "node_modules/resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true, + "peer": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true, + "peer": true, + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "peer": true, + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, + "node_modules/semver": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", + "dev": true, + "dependencies": { + "lru-cache": "^6.0.0" + }, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, + "node_modules/shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "dependencies": { + "shebang-regex": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/shiki": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.5.tgz", + "integrity": "sha512-1gCAYOcmCFONmErGTrS1fjzJLA7MGZmKzrBNX7apqSwhyITJg2O102uFzXUeBxNnEkDA9vHIKLyeKq0V083vIw==", + "dev": true, + "dependencies": { + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" + } + }, + "node_modules/signal-exit": { + "version": "3.0.7", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", + "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", + "dev": true + }, + "node_modules/source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/source-map-support": { + "version": "0.5.21", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", + "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==", + "dev": true, + "dependencies": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "node_modules/spawn-wrap": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/spawn-wrap/-/spawn-wrap-2.0.0.tgz", + "integrity": "sha512-EeajNjfN9zMnULLwhZZQU3GWBoFNkbngTUPfaawT4RkMiviTxcX0qfhVbGey39mfctfDHkWtuecgQ8NJcyQWHg==", + "dev": true, + "dependencies": { + "foreground-child": "^2.0.0", + "is-windows": "^1.0.2", + "make-dir": "^3.0.0", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.2", + "which": "^2.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/spawn-wrap/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/spawn-wrap/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", + "dev": true + }, + "node_modules/stack-utils": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/stack-utils/-/stack-utils-2.0.6.tgz", + "integrity": "sha512-XlkWvfIm6RmsWtNJx+uqtKLS8eqFbxUg0ZzLXqY0caEy9l7hruX8IpiDnjsLavoBgqCCR71TqWO8MaXYheJ3RQ==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-bom": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-4.0.0.tgz", + "integrity": "sha512-3xurFv5tEgii33Zi8Jtp55wEIILR9eh34FAW00PZf+JnSsTmV/ioewSgQl97JHvgjoRGwPShsWm+IdrxB35d0w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true, + "peer": true, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap": { + "version": "16.3.9", + "resolved": "https://registry.npmjs.org/tap/-/tap-16.3.9.tgz", + "integrity": "sha512-KKmu12hRJhb/kGvVV/UKBOJ90sNoGbcXF0E+VmNqej1DqaCmZHyOXR8R7E66qg2Wor33XhSHGrku5MPYWSRNWw==", + "bundleDependencies": [ + "ink", + "treport", + "@types/react", + "@isaacs/import-jsx", + "react" + ], + "dev": true, + "dependencies": { + "@isaacs/import-jsx": "^4.0.1", + "@types/react": "^17.0.52", + "chokidar": "^3.3.0", + "findit": "^2.0.0", + "foreground-child": "^2.0.0", + "fs-exists-cached": "^1.0.0", + "glob": "^7.2.3", + "ink": "^3.2.0", + "isexe": "^2.0.0", + "istanbul-lib-processinfo": "^2.0.3", + "jackspeak": "^1.4.2", + "libtap": "^1.4.0", + "minipass": "^3.3.4", + "mkdirp": "^1.0.4", + "nyc": "^15.1.0", + "opener": "^1.5.1", + "react": "^17.0.2", + "rimraf": "^3.0.0", + "signal-exit": "^3.0.6", + "source-map-support": "^0.5.16", + "tap-mocha-reporter": "^5.0.3", + "tap-parser": "^11.0.2", + "tap-yaml": "^1.0.2", + "tcompare": "^5.0.7", + "treport": "^3.0.4", + "which": "^2.0.2" + }, + "bin": { + "tap": "bin/run.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + }, + "peerDependencies": { + "coveralls": "^3.1.1", + "flow-remove-types": ">=2.112.0", + "ts-node": ">=8.5.2", + "typescript": ">=3.7.2" + }, + "peerDependenciesMeta": { + "coveralls": { + "optional": true + }, + "flow-remove-types": { + "optional": true + }, + "ts-node": { + "optional": true + }, + "typescript": { + "optional": true + } + } + }, + "node_modules/tap-mocha-reporter": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/tap-mocha-reporter/-/tap-mocha-reporter-5.0.4.tgz", + "integrity": "sha512-J+YMO8B7lq1O6Zxd/jeuG27vJ+Y4tLiRMKPSb7KR6FVh86k3Rq1TwYc2GKPyIjCbzzdMdReh3Vfz9L5cg1Z2Bw==", + "dev": true, + "dependencies": { + "color-support": "^1.1.0", + "debug": "^4.1.1", + "diff": "^4.0.1", + "escape-string-regexp": "^2.0.0", + "glob": "^7.0.5", + "tap-parser": "^11.0.0", + "tap-yaml": "^1.0.0", + "unicode-length": "^2.0.2" + }, + "bin": { + "tap-mocha-reporter": "index.js" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tap-mocha-reporter/node_modules/escape-string-regexp": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-2.0.0.tgz", + "integrity": "sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap-parser": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/tap-parser/-/tap-parser-11.0.2.tgz", + "integrity": "sha512-6qGlC956rcORw+fg7Fv1iCRAY8/bU9UabUAhs3mXRH6eRmVZcNPLheSXCYaVaYeSwx5xa/1HXZb1537YSvwDZg==", + "dev": true, + "dependencies": { + "events-to-array": "^1.0.1", + "minipass": "^3.1.6", + "tap-yaml": "^1.0.0" + }, + "bin": { + "tap-parser": "bin/cmd.js" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tap-yaml": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/tap-yaml/-/tap-yaml-1.0.2.tgz", + "integrity": "sha512-GegASpuqBnRNdT1U+yuUPZ8rEU64pL35WPBpCISWwff4dErS2/438barz7WFJl4Nzh3Y05tfPidZnH+GaV1wMg==", + "dev": true, + "dependencies": { + "yaml": "^1.10.2" + } + }, + "node_modules/tap/node_modules/@ampproject/remapping": { + "version": "2.2.1", + "dev": true, + "inBundle": true, + "license": "Apache-2.0", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tap/node_modules/@babel/code-frame": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/highlight": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/compat-data": { + "version": "7.22.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/core": { + "version": "7.22.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.9", + "@babel/helper-compilation-targets": "^7.22.9", + "@babel/helper-module-transforms": "^7.22.9", + "@babel/helpers": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.8", + "@babel/types": "^7.22.5", + "convert-source-map": "^1.7.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.2", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/tap/node_modules/@babel/generator": { + "version": "7.22.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-annotate-as-pure": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-compilation-targets": { + "version": "7.22.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.22.9", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.9", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-environment-visitor": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-function-name": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-hoist-variables": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-module-imports": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-module-transforms": { + "version": "7.22.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/helper-validator-identifier": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-plugin-utils": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-simple-access": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-split-export-declaration": { + "version": "7.22.6", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-validator-identifier": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helper-validator-option": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/helpers": { + "version": "7.22.6", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.6", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/highlight": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/parser": { + "version": "7.22.7", + "dev": true, + "inBundle": true, + "license": "MIT", + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-proposal-object-rest-spread": { + "version": "7.20.7", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.20.5", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-plugin-utils": "^7.20.2", + "@babel/plugin-syntax-object-rest-spread": "^7.8.3", + "@babel/plugin-transform-parameters": "^7.20.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-syntax-jsx": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-syntax-object-rest-spread": { + "version": "7.8.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-transform-destructuring": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-transform-parameters": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/plugin-transform-react-jsx": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/tap/node_modules/@babel/template": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/traverse": { + "version": "7.22.8", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.7", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.6", + "@babel/parser": "^7.22.7", + "@babel/types": "^7.22.5", + "debug": "^4.1.0", + "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@babel/types": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/@isaacs/import-jsx": { + "version": "4.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.5.5", + "@babel/plugin-proposal-object-rest-spread": "^7.5.5", + "@babel/plugin-transform-destructuring": "^7.5.0", + "@babel/plugin-transform-react-jsx": "^7.3.0", + "caller-path": "^3.0.1", + "find-cache-dir": "^3.2.0", + "make-dir": "^3.0.2", + "resolve-from": "^3.0.0", + "rimraf": "^3.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tap/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tap/node_modules/@jridgewell/resolve-uri": { + "version": "3.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tap/node_modules/@jridgewell/set-array": { + "version": "1.1.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tap/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.15", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.18", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" + } + }, + "node_modules/tap/node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/@types/prop-types": { + "version": "15.7.5", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/@types/react": { + "version": "17.0.62", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@types/prop-types": "*", + "@types/scheduler": "*", + "csstype": "^3.0.2" + } + }, + "node_modules/tap/node_modules/@types/scheduler": { + "version": "0.16.3", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/@types/yoga-layout": { + "version": "1.9.2", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/ansi-escapes": { + "version": "4.3.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "type-fest": "^0.21.3" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/ansi-escapes/node_modules/type-fest": { + "version": "0.21.3", + "dev": true, + "inBundle": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/ansi-regex": { + "version": "5.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/ansi-styles": { + "version": "3.2.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/ansicolors": { + "version": "0.3.2", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/astral-regex": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/auto-bind": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/balanced-match": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/brace-expansion": { + "version": "1.1.11", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/tap/node_modules/browserslist": { + "version": "4.21.9", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "inBundle": true, + "license": "MIT", + "dependencies": { + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/tap/node_modules/caller-callsite": { + "version": "4.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "callsites": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/caller-path": { + "version": "3.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "caller-callsite": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/callsites": { + "version": "3.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/caniuse-lite": { + "version": "1.0.30001517", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "inBundle": true, + "license": "CC-BY-4.0" + }, + "node_modules/tap/node_modules/cardinal": { + "version": "2.1.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansicolors": "~0.3.2", + "redeyed": "~2.1.0" + }, + "bin": { + "cdl": "bin/cdl.js" + } + }, + "node_modules/tap/node_modules/chalk": { + "version": "2.4.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/ci-info": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/cli-boxes": { + "version": "2.2.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/cli-cursor": { + "version": "3.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "restore-cursor": "^3.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/cli-truncate": { + "version": "2.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "slice-ansi": "^3.0.0", + "string-width": "^4.2.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/code-excerpt": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "convert-to-spaces": "^1.0.1" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tap/node_modules/color-convert": { + "version": "1.9.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/tap/node_modules/color-name": { + "version": "1.1.3", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/commondir": { + "version": "1.0.1", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/concat-map": { + "version": "0.0.1", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/convert-source-map": { + "version": "1.9.0", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/convert-to-spaces": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, + "node_modules/tap/node_modules/csstype": { + "version": "3.1.2", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/debug": { + "version": "4.3.4", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/tap/node_modules/electron-to-chromium": { + "version": "1.4.477", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/emoji-regex": { + "version": "8.0.0", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/escalade": { + "version": "3.1.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/escape-string-regexp": { + "version": "1.0.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/tap/node_modules/esprima": { + "version": "4.0.1", + "dev": true, + "inBundle": true, + "license": "BSD-2-Clause", + "bin": { + "esparse": "bin/esparse.js", + "esvalidate": "bin/esvalidate.js" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/events-to-array": { + "version": "1.1.2", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/find-cache-dir": { + "version": "3.3.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "commondir": "^1.0.1", + "make-dir": "^3.0.2", + "pkg-dir": "^4.1.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/avajs/find-cache-dir?sponsor=1" + } + }, + "node_modules/tap/node_modules/find-up": { + "version": "4.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/fs.realpath": { + "version": "1.0.0", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/gensync": { + "version": "1.0.0-beta.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/tap/node_modules/glob": { + "version": "7.2.3", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.1.1", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/tap/node_modules/globals": { + "version": "11.12.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/has-flag": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/indent-string": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/inflight": { + "version": "1.0.6", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "node_modules/tap/node_modules/inherits": { + "version": "2.0.4", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/ink": { + "version": "3.2.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-escapes": "^4.2.1", + "auto-bind": "4.0.0", + "chalk": "^4.1.0", + "cli-boxes": "^2.2.0", + "cli-cursor": "^3.1.0", + "cli-truncate": "^2.1.0", + "code-excerpt": "^3.0.0", + "indent-string": "^4.0.0", + "is-ci": "^2.0.0", + "lodash": "^4.17.20", + "patch-console": "^1.0.0", + "react-devtools-core": "^4.19.1", + "react-reconciler": "^0.26.2", + "scheduler": "^0.20.2", + "signal-exit": "^3.0.2", + "slice-ansi": "^3.0.0", + "stack-utils": "^2.0.2", + "string-width": "^4.2.2", + "type-fest": "^0.12.0", + "widest-line": "^3.1.0", + "wrap-ansi": "^6.2.0", + "ws": "^7.5.5", + "yoga-layout-prebuilt": "^1.9.6" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "@types/react": ">=16.8.0", + "react": ">=16.8.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + } + } + }, + "node_modules/tap/node_modules/ink/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/tap/node_modules/ink/node_modules/chalk": { + "version": "4.1.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/tap/node_modules/ink/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/tap/node_modules/ink/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/ink/node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/ink/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/is-ci": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ci-info": "^2.0.0" + }, + "bin": { + "is-ci": "bin.js" + } + }, + "node_modules/tap/node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/js-tokens": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/jsesc": { + "version": "2.5.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/json5": { + "version": "2.2.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/locate-path": { + "version": "5.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/lodash": { + "version": "4.17.21", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/loose-envify": { + "version": "1.4.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^3.0.0 || ^4.0.0" + }, + "bin": { + "loose-envify": "cli.js" + } + }, + "node_modules/tap/node_modules/lru-cache": { + "version": "5.1.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/tap/node_modules/make-dir": { + "version": "3.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/mimic-fn": { + "version": "2.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/minimatch": { + "version": "3.1.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/tap/node_modules/minipass": { + "version": "3.3.6", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/minipass/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/ms": { + "version": "2.1.2", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/node-releases": { + "version": "2.0.13", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/object-assign": { + "version": "4.1.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tap/node_modules/once": { + "version": "1.4.0", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/tap/node_modules/onetime": { + "version": "5.1.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "mimic-fn": "^2.1.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/p-limit": { + "version": "2.3.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/p-locate": { + "version": "4.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/p-try": { + "version": "2.2.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/patch-console": { + "version": "1.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=10" + } + }, + "node_modules/tap/node_modules/path-exists": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/path-is-absolute": { + "version": "1.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tap/node_modules/picocolors": { + "version": "1.0.0", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/pkg-dir": { + "version": "4.2.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "find-up": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/punycode": { + "version": "2.3.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/tap/node_modules/react": { + "version": "17.0.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/tap/node_modules/react-devtools-core": { + "version": "4.28.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "shell-quote": "^1.6.1", + "ws": "^7" + } + }, + "node_modules/tap/node_modules/react-reconciler": { + "version": "0.26.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1", + "scheduler": "^0.20.2" + }, + "engines": { + "node": ">=0.10.0" + }, + "peerDependencies": { + "react": "^17.0.2" + } + }, + "node_modules/tap/node_modules/redeyed": { + "version": "2.1.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "esprima": "~4.0.0" + } + }, + "node_modules/tap/node_modules/resolve-from": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/restore-cursor": { + "version": "3.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/rimraf": { + "version": "3.0.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/tap/node_modules/scheduler": { + "version": "0.20.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "loose-envify": "^1.1.0", + "object-assign": "^4.1.1" + } + }, + "node_modules/tap/node_modules/semver": { + "version": "6.3.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/tap/node_modules/shell-quote": { + "version": "1.8.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/tap/node_modules/signal-exit": { + "version": "3.0.7", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/slice-ansi": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/slice-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/tap/node_modules/slice-ansi/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/tap/node_modules/slice-ansi/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/stack-utils": { + "version": "2.0.6", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "escape-string-regexp": "^2.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tap/node_modules/stack-utils/node_modules/escape-string-regexp": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/string-width": { + "version": "4.2.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/strip-ansi": { + "version": "6.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/supports-color": { + "version": "5.5.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/tap-parser": { + "version": "11.0.2", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "events-to-array": "^1.0.1", + "minipass": "^3.1.6", + "tap-yaml": "^1.0.0" + }, + "bin": { + "tap-parser": "bin/cmd.js" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/tap/node_modules/tap-yaml": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "yaml": "^1.10.2" + } + }, + "node_modules/tap/node_modules/to-fast-properties": { + "version": "2.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/tap/node_modules/treport": { + "version": "3.0.4", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "@isaacs/import-jsx": "^4.0.1", + "cardinal": "^2.1.1", + "chalk": "^3.0.0", + "ink": "^3.2.0", + "ms": "^2.1.2", + "tap-parser": "^11.0.0", + "tap-yaml": "^1.0.0", + "unicode-length": "^2.0.2" + }, + "peerDependencies": { + "react": "^17.0.2" + } + }, + "node_modules/tap/node_modules/treport/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/tap/node_modules/treport/node_modules/chalk": { + "version": "3.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/treport/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/tap/node_modules/treport/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/treport/node_modules/has-flag": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/treport/node_modules/supports-color": { + "version": "7.2.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/type-fest": { + "version": "0.12.0", + "dev": true, + "inBundle": true, + "license": "(MIT OR CC0-1.0)", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/tap/node_modules/unicode-length": { + "version": "2.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "punycode": "^2.0.0" + } + }, + "node_modules/tap/node_modules/update-browserslist-db": { + "version": "1.0.11", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "inBundle": true, + "license": "MIT", + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/tap/node_modules/widest-line": { + "version": "3.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "string-width": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/wrap-ansi": { + "version": "6.2.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tap/node_modules/wrap-ansi/node_modules/ansi-styles": { + "version": "4.3.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/tap/node_modules/wrap-ansi/node_modules/color-convert": { + "version": "2.0.1", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/tap/node_modules/wrap-ansi/node_modules/color-name": { + "version": "1.1.4", + "dev": true, + "inBundle": true, + "license": "MIT" + }, + "node_modules/tap/node_modules/wrappy": { + "version": "1.0.2", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/ws": { + "version": "7.5.9", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=8.3.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": "^5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/tap/node_modules/yallist": { + "version": "3.1.1", + "dev": true, + "inBundle": true, + "license": "ISC" + }, + "node_modules/tap/node_modules/yaml": { + "version": "1.10.2", + "dev": true, + "inBundle": true, + "license": "ISC", + "engines": { + "node": ">= 6" + } + }, + "node_modules/tap/node_modules/yoga-layout-prebuilt": { + "version": "1.10.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@types/yoga-layout": "1.9.2" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/tcompare": { + "version": "5.0.7", + "resolved": "https://registry.npmjs.org/tcompare/-/tcompare-5.0.7.tgz", + "integrity": "sha512-d9iddt6YYGgyxJw5bjsN7UJUO1kGOtjSlNy/4PoGYAjQS5pAT/hzIoLf1bZCw+uUxRmZJh7Yy1aA7xKVRT9B4w==", + "dev": true, + "dependencies": { + "diff": "^4.0.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/test-exclude": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz", + "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==", + "dev": true, + "dependencies": { + "@istanbuljs/schema": "^0.1.2", + "glob": "^7.1.4", + "minimatch": "^3.0.4" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", + "dev": true, + "peer": true + }, + "node_modules/to-fast-properties": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", + "integrity": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/trivial-deferred": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/trivial-deferred/-/trivial-deferred-1.1.2.tgz", + "integrity": "sha512-vDPiDBC3hyP6O4JrJYMImW3nl3c03Tsj9fEXc7Qc/XKa1O7gf5ZtFfIR/E0dun9SnDHdwjna1Z2rSzYgqpxh/g==", + "dev": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/ts-node": { + "version": "10.9.1", + "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-10.9.1.tgz", + "integrity": "sha512-NtVysVPkxxrwFGUUxGYhfux8k78pQB3JqYBXlLRZgdGUqTO5wU/UyHop5p70iEbGhB7q5KmiZiU0Y3KlJrScEw==", + "dev": true, + "dependencies": { + "@cspotcode/source-map-support": "^0.8.0", + "@tsconfig/node10": "^1.0.7", + "@tsconfig/node12": "^1.0.7", + "@tsconfig/node14": "^1.0.0", + "@tsconfig/node16": "^1.0.2", + "acorn": "^8.4.1", + "acorn-walk": "^8.1.1", + "arg": "^4.1.0", + "create-require": "^1.1.0", + "diff": "^4.0.1", + "make-error": "^1.1.1", + "v8-compile-cache-lib": "^3.0.1", + "yn": "3.1.1" + }, + "bin": { + "ts-node": "dist/bin.js", + "ts-node-cwd": "dist/bin-cwd.js", + "ts-node-esm": "dist/bin-esm.js", + "ts-node-script": "dist/bin-script.js", + "ts-node-transpile-only": "dist/bin-transpile.js", + "ts-script": "dist/bin-script-deprecated.js" + }, + "peerDependencies": { + "@swc/core": ">=1.2.50", + "@swc/wasm": ">=1.2.50", + "@types/node": "*", + "typescript": ">=2.7" + }, + "peerDependenciesMeta": { + "@swc/core": { + "optional": true + }, + "@swc/wasm": { + "optional": true + } + } + }, + "node_modules/type-check": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", + "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", + "dev": true, + "peer": true, + "dependencies": { + "prelude-ls": "^1.2.1" + }, + "engines": { + "node": ">= 0.8.0" + } + }, + "node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "peer": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "dev": true, + "dependencies": { + "is-typedarray": "^1.0.0" + } + }, + "node_modules/typedoc": { + "version": "0.23.28", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.23.28.tgz", + "integrity": "sha512-9x1+hZWTHEQcGoP7qFmlo4unUoVJLB0H/8vfO/7wqTnZxg4kPuji9y3uRzEu0ZKez63OJAUmiGhUrtukC6Uj3w==", + "dev": true, + "dependencies": { + "lunr": "^2.3.9", + "marked": "^4.2.12", + "minimatch": "^7.1.3", + "shiki": "^0.14.1" + }, + "bin": { + "typedoc": "bin/typedoc" + }, + "engines": { + "node": ">= 14.14" + }, + "peerDependencies": { + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", + "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, + "node_modules/typescript": { + "version": "4.9.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", + "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "dev": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=4.2.0" + } + }, + "node_modules/undici-types": { + "version": "5.26.5", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", + "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "dev": true + }, + "node_modules/unicode-length": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/unicode-length/-/unicode-length-2.1.0.tgz", + "integrity": "sha512-4bV582zTV9Q02RXBxSUMiuN/KHo5w4aTojuKTNT96DIKps/SIawFp7cS5Mu25VuY1AioGXrmYyzKZUzh8OqoUw==", + "dev": true, + "dependencies": { + "punycode": "^2.0.0" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "peer": true, + "dependencies": { + "punycode": "^2.1.0" + } + }, + "node_modules/uuid": { + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", + "dev": true, + "bin": { + "uuid": "dist/bin/uuid" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/v8-to-istanbul": { + "version": "9.1.3", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz", + "integrity": "sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "^0.3.12", + "@types/istanbul-lib-coverage": "^2.0.1", + "convert-source-map": "^2.0.0" + }, + "engines": { + "node": ">=10.12.0" + } + }, + "node_modules/v8-to-istanbul/node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true + }, + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true + }, + "node_modules/vscode-textmate": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", + "dev": true + }, + "node_modules/which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "dependencies": { + "isexe": "^2.0.0" + }, + "bin": { + "node-which": "bin/node-which" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/which-module": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.1.tgz", + "integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==", + "dev": true + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true + }, + "node_modules/write-file-atomic": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.3.tgz", + "integrity": "sha512-AvHcyZ5JnSfq3ioSyjrBkH9yW4m7Ayk8/9My/DD9onKeu/94fwrMocemO2QAJFAlnnDN+ZDS+ZjAR5ua1/PV/Q==", + "dev": true, + "dependencies": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/yaml": { + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", + "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", + "dev": true, + "engines": { + "node": ">= 6" + } + }, + "node_modules/yargs": { + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, + "dependencies": { + "cliui": "^7.0.2", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.0", + "y18n": "^5.0.5", + "yargs-parser": "^20.2.2" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs-parser": { + "version": "20.2.9", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz", + "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yn": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yn/-/yn-3.1.1.tgz", + "integrity": "sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, + "node_modules/yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + } + } +} diff --git a/deps/minimatch/src/package.json b/deps/minimatch/package.json similarity index 94% rename from deps/minimatch/src/package.json rename to deps/minimatch/package.json index 061c3b9f343306..fc80834f380417 100644 --- a/deps/minimatch/src/package.json +++ b/deps/minimatch/package.json @@ -38,7 +38,8 @@ "snap": "c8 tap", "format": "prettier --write . --loglevel warn", "benchmark": "node benchmark/index.js", - "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts" + "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts", + "node-build": "esbuild ./dist/cjs/index.js --bundle --platform=node --outfile=index.js" }, "prettier": { "semi": false, @@ -62,6 +63,7 @@ "@types/node": "^18.15.11", "@types/tap": "^15.0.8", "c8": "^7.12.0", + "esbuild": "^0.19.5", "eslint-config-prettier": "^8.6.0", "mkdirp": "1", "prettier": "^2.8.2", diff --git a/deps/minimatch/src/LICENSE b/deps/minimatch/src/LICENSE deleted file mode 100644 index 1493534e60dce4..00000000000000 --- a/deps/minimatch/src/LICENSE +++ /dev/null @@ -1,15 +0,0 @@ -The ISC License - -Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors - -Permission to use, copy, modify, and/or distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/deps/minimatch/src/node_modules/balanced-match/README.md b/deps/minimatch/src/node_modules/balanced-match/README.md deleted file mode 100644 index d2a48b6b49f2cf..00000000000000 --- a/deps/minimatch/src/node_modules/balanced-match/README.md +++ /dev/null @@ -1,97 +0,0 @@ -# balanced-match - -Match balanced string pairs, like `{` and `}` or `` and ``. Supports regular expressions as well! - -[![build status](https://secure.travis-ci.org/juliangruber/balanced-match.svg)](http://travis-ci.org/juliangruber/balanced-match) -[![downloads](https://img.shields.io/npm/dm/balanced-match.svg)](https://www.npmjs.org/package/balanced-match) - -[![testling badge](https://ci.testling.com/juliangruber/balanced-match.png)](https://ci.testling.com/juliangruber/balanced-match) - -## Example - -Get the first matching pair of braces: - -```js -var balanced = require('balanced-match'); - -console.log(balanced('{', '}', 'pre{in{nested}}post')); -console.log(balanced('{', '}', 'pre{first}between{second}post')); -console.log(balanced(/\s+\{\s+/, /\s+\}\s+/, 'pre { in{nest} } post')); -``` - -The matches are: - -```bash -$ node example.js -{ start: 3, end: 14, pre: 'pre', body: 'in{nested}', post: 'post' } -{ start: 3, - end: 9, - pre: 'pre', - body: 'first', - post: 'between{second}post' } -{ start: 3, end: 17, pre: 'pre', body: 'in{nest}', post: 'post' } -``` - -## API - -### var m = balanced(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -object with those keys: - -* **start** the index of the first match of `a` -* **end** the index of the matching `b` -* **pre** the preamble, `a` and `b` not included -* **body** the match, `a` and `b` not included -* **post** the postscript, `a` and `b` not included - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`. - -### var r = balanced.range(a, b, str) - -For the first non-nested matching pair of `a` and `b` in `str`, return an -array with indexes: `[ , ]`. - -If there's no match, `undefined` will be returned. - -If the `str` contains more `a` than `b` / there are unmatched pairs, the first match that was closed will be used. For example, `{{a}` will match `[ 1, 3 ]` and `{a}}` will match `[0, 2]`. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install balanced-match -``` - -## Security contact information - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/deps/minimatch/src/node_modules/balanced-match/index.js b/deps/minimatch/src/node_modules/balanced-match/index.js deleted file mode 100644 index c67a64608df7f4..00000000000000 --- a/deps/minimatch/src/node_modules/balanced-match/index.js +++ /dev/null @@ -1,62 +0,0 @@ -'use strict'; -module.exports = balanced; -function balanced(a, b, str) { - if (a instanceof RegExp) a = maybeMatch(a, str); - if (b instanceof RegExp) b = maybeMatch(b, str); - - var r = range(a, b, str); - - return r && { - start: r[0], - end: r[1], - pre: str.slice(0, r[0]), - body: str.slice(r[0] + a.length, r[1]), - post: str.slice(r[1] + b.length) - }; -} - -function maybeMatch(reg, str) { - var m = str.match(reg); - return m ? m[0] : null; -} - -balanced.range = range; -function range(a, b, str) { - var begs, beg, left, right, result; - var ai = str.indexOf(a); - var bi = str.indexOf(b, ai + 1); - var i = ai; - - if (ai >= 0 && bi > 0) { - if(a===b) { - return [ai, bi]; - } - begs = []; - left = str.length; - - while (i >= 0 && !result) { - if (i == ai) { - begs.push(i); - ai = str.indexOf(a, i + 1); - } else if (begs.length == 1) { - result = [ begs.pop(), bi ]; - } else { - beg = begs.pop(); - if (beg < left) { - left = beg; - right = bi; - } - - bi = str.indexOf(b, i + 1); - } - - i = ai < bi && ai >= 0 ? ai : bi; - } - - if (begs.length) { - result = [ left, right ]; - } - } - - return result; -} diff --git a/deps/minimatch/src/node_modules/balanced-match/package.json b/deps/minimatch/src/node_modules/balanced-match/package.json deleted file mode 100644 index ce6073e0403b5a..00000000000000 --- a/deps/minimatch/src/node_modules/balanced-match/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "balanced-match", - "description": "Match balanced character pairs, like \"{\" and \"}\"", - "version": "1.0.2", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/balanced-match.git" - }, - "homepage": "https://github.com/juliangruber/balanced-match", - "main": "index.js", - "scripts": { - "test": "tape test/test.js", - "bench": "matcha test/bench.js" - }, - "devDependencies": { - "matcha": "^0.7.0", - "tape": "^4.6.0" - }, - "keywords": [ - "match", - "regexp", - "test", - "balanced", - "parse" - ], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } -} diff --git a/deps/minimatch/src/node_modules/brace-expansion/README.md b/deps/minimatch/src/node_modules/brace-expansion/README.md deleted file mode 100644 index e55c583dd095a5..00000000000000 --- a/deps/minimatch/src/node_modules/brace-expansion/README.md +++ /dev/null @@ -1,135 +0,0 @@ -# brace-expansion - -[Brace expansion](https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html), -as known from sh/bash, in JavaScript. - -[![build status](https://secure.travis-ci.org/juliangruber/brace-expansion.svg)](http://travis-ci.org/juliangruber/brace-expansion) -[![downloads](https://img.shields.io/npm/dm/brace-expansion.svg)](https://www.npmjs.org/package/brace-expansion) -[![Greenkeeper badge](https://badges.greenkeeper.io/juliangruber/brace-expansion.svg)](https://greenkeeper.io/) - -[![testling badge](https://ci.testling.com/juliangruber/brace-expansion.png)](https://ci.testling.com/juliangruber/brace-expansion) - -## Example - -```js -var expand = require('brace-expansion'); - -expand('file-{a,b,c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('-v{,,}') -// => ['-v', '-v', '-v'] - -expand('file{0..2}.jpg') -// => ['file0.jpg', 'file1.jpg', 'file2.jpg'] - -expand('file-{a..c}.jpg') -// => ['file-a.jpg', 'file-b.jpg', 'file-c.jpg'] - -expand('file{2..0}.jpg') -// => ['file2.jpg', 'file1.jpg', 'file0.jpg'] - -expand('file{0..4..2}.jpg') -// => ['file0.jpg', 'file2.jpg', 'file4.jpg'] - -expand('file-{a..e..2}.jpg') -// => ['file-a.jpg', 'file-c.jpg', 'file-e.jpg'] - -expand('file{00..10..5}.jpg') -// => ['file00.jpg', 'file05.jpg', 'file10.jpg'] - -expand('{{A..C},{a..c}}') -// => ['A', 'B', 'C', 'a', 'b', 'c'] - -expand('ppp{,config,oe{,conf}}') -// => ['ppp', 'pppconfig', 'pppoe', 'pppoeconf'] -``` - -## API - -```js -var expand = require('brace-expansion'); -``` - -### var expanded = expand(str) - -Return an array of all possible and valid expansions of `str`. If none are -found, `[str]` is returned. - -Valid expansions are: - -```js -/^(.*,)+(.+)?$/ -// {a,b,...} -``` - -A comma separated list of options, like `{a,b}` or `{a,{b,c}}` or `{,a,}`. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -A numeric sequence from `x` to `y` inclusive, with optional increment. -If `x` or `y` start with a leading `0`, all the numbers will be padded -to have equal length. Negative numbers and backwards iteration work too. - -```js -/^-?\d+\.\.-?\d+(\.\.-?\d+)?$/ -// {x..y[..incr]} -``` - -An alphabetic sequence from `x` to `y` inclusive, with optional increment. -`x` and `y` must be exactly one character, and if given, `incr` must be a -number. - -For compatibility reasons, the string `${` is not eligible for brace expansion. - -## Installation - -With [npm](https://npmjs.org) do: - -```bash -npm install brace-expansion -``` - -## Contributors - -- [Julian Gruber](https://github.com/juliangruber) -- [Isaac Z. Schlueter](https://github.com/isaacs) - -## Sponsors - -This module is proudly supported by my [Sponsors](https://github.com/juliangruber/sponsors)! - -Do you want to support modules like this to improve their quality, stability and weigh in on new features? Then please consider donating to my [Patreon](https://www.patreon.com/juliangruber). Not sure how much of my modules you're using? Try [feross/thanks](https://github.com/feross/thanks)! - -## Security contact information - -To report a security vulnerability, please use the -[Tidelift security contact](https://tidelift.com/security). -Tidelift will coordinate the fix and disclosure. - -## License - -(MIT) - -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/deps/minimatch/src/node_modules/brace-expansion/index.js b/deps/minimatch/src/node_modules/brace-expansion/index.js deleted file mode 100644 index 4af9ddee463f4a..00000000000000 --- a/deps/minimatch/src/node_modules/brace-expansion/index.js +++ /dev/null @@ -1,203 +0,0 @@ -var balanced = require('balanced-match'); - -module.exports = expandTop; - -var escSlash = '\0SLASH'+Math.random()+'\0'; -var escOpen = '\0OPEN'+Math.random()+'\0'; -var escClose = '\0CLOSE'+Math.random()+'\0'; -var escComma = '\0COMMA'+Math.random()+'\0'; -var escPeriod = '\0PERIOD'+Math.random()+'\0'; - -function numeric(str) { - return parseInt(str, 10) == str - ? parseInt(str, 10) - : str.charCodeAt(0); -} - -function escapeBraces(str) { - return str.split('\\\\').join(escSlash) - .split('\\{').join(escOpen) - .split('\\}').join(escClose) - .split('\\,').join(escComma) - .split('\\.').join(escPeriod); -} - -function unescapeBraces(str) { - return str.split(escSlash).join('\\') - .split(escOpen).join('{') - .split(escClose).join('}') - .split(escComma).join(',') - .split(escPeriod).join('.'); -} - - -// Basically just str.split(","), but handling cases -// where we have nested braced sections, which should be -// treated as individual members, like {a,{b,c},d} -function parseCommaParts(str) { - if (!str) - return ['']; - - var parts = []; - var m = balanced('{', '}', str); - - if (!m) - return str.split(','); - - var pre = m.pre; - var body = m.body; - var post = m.post; - var p = pre.split(','); - - p[p.length-1] += '{' + body + '}'; - var postParts = parseCommaParts(post); - if (post.length) { - p[p.length-1] += postParts.shift(); - p.push.apply(p, postParts); - } - - parts.push.apply(parts, p); - - return parts; -} - -function expandTop(str) { - if (!str) - return []; - - // I don't know why Bash 4.3 does this, but it does. - // Anything starting with {} will have the first two bytes preserved - // but *only* at the top level, so {},a}b will not expand to anything, - // but a{},b}c will be expanded to [a}c,abc]. - // One could argue that this is a bug in Bash, but since the goal of - // this module is to match Bash's rules, we escape a leading {} - if (str.substr(0, 2) === '{}') { - str = '\\{\\}' + str.substr(2); - } - - return expand(escapeBraces(str), true).map(unescapeBraces); -} - -function embrace(str) { - return '{' + str + '}'; -} -function isPadded(el) { - return /^-?0\d/.test(el); -} - -function lte(i, y) { - return i <= y; -} -function gte(i, y) { - return i >= y; -} - -function expand(str, isTop) { - var expansions = []; - - var m = balanced('{', '}', str); - if (!m) return [str]; - - // no need to expand pre, since it is guaranteed to be free of brace-sets - var pre = m.pre; - var post = m.post.length - ? expand(m.post, false) - : ['']; - - if (/\$$/.test(m.pre)) { - for (var k = 0; k < post.length; k++) { - var expansion = pre+ '{' + m.body + '}' + post[k]; - expansions.push(expansion); - } - } else { - var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body); - var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body); - var isSequence = isNumericSequence || isAlphaSequence; - var isOptions = m.body.indexOf(',') >= 0; - if (!isSequence && !isOptions) { - // {a},b} - if (m.post.match(/,.*\}/)) { - str = m.pre + '{' + m.body + escClose + m.post; - return expand(str); - } - return [str]; - } - - var n; - if (isSequence) { - n = m.body.split(/\.\./); - } else { - n = parseCommaParts(m.body); - if (n.length === 1) { - // x{{a,b}}y ==> x{a}y x{b}y - n = expand(n[0], false).map(embrace); - if (n.length === 1) { - return post.map(function(p) { - return m.pre + n[0] + p; - }); - } - } - } - - // at this point, n is the parts, and we know it's not a comma set - // with a single entry. - var N; - - if (isSequence) { - var x = numeric(n[0]); - var y = numeric(n[1]); - var width = Math.max(n[0].length, n[1].length) - var incr = n.length == 3 - ? Math.abs(numeric(n[2])) - : 1; - var test = lte; - var reverse = y < x; - if (reverse) { - incr *= -1; - test = gte; - } - var pad = n.some(isPadded); - - N = []; - - for (var i = x; test(i, y); i += incr) { - var c; - if (isAlphaSequence) { - c = String.fromCharCode(i); - if (c === '\\') - c = ''; - } else { - c = String(i); - if (pad) { - var need = width - c.length; - if (need > 0) { - var z = new Array(need + 1).join('0'); - if (i < 0) - c = '-' + z + c.slice(1); - else - c = z + c; - } - } - } - N.push(c); - } - } else { - N = []; - - for (var j = 0; j < n.length; j++) { - N.push.apply(N, expand(n[j], false)); - } - } - - for (var j = 0; j < N.length; j++) { - for (var k = 0; k < post.length; k++) { - var expansion = pre + N[j] + post[k]; - if (!isTop || isSequence || expansion) - expansions.push(expansion); - } - } - } - - return expansions; -} - diff --git a/deps/minimatch/src/node_modules/brace-expansion/package.json b/deps/minimatch/src/node_modules/brace-expansion/package.json deleted file mode 100644 index 7097d41e39de5d..00000000000000 --- a/deps/minimatch/src/node_modules/brace-expansion/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "brace-expansion", - "description": "Brace expansion as known from sh/bash", - "version": "2.0.1", - "repository": { - "type": "git", - "url": "git://github.com/juliangruber/brace-expansion.git" - }, - "homepage": "https://github.com/juliangruber/brace-expansion", - "main": "index.js", - "scripts": { - "test": "tape test/*.js", - "gentest": "bash test/generate.sh", - "bench": "matcha test/perf/bench.js" - }, - "dependencies": { - "balanced-match": "^1.0.0" - }, - "devDependencies": { - "@c4312/matcha": "^1.3.1", - "tape": "^4.6.0" - }, - "keywords": [], - "author": { - "name": "Julian Gruber", - "email": "mail@juliangruber.com", - "url": "http://juliangruber.com" - }, - "license": "MIT", - "testling": { - "files": "test/*.js", - "browsers": [ - "ie/8..latest", - "firefox/20..latest", - "firefox/nightly", - "chrome/25..latest", - "chrome/canary", - "opera/12..latest", - "opera/next", - "safari/5.1..latest", - "ipad/6.0..latest", - "iphone/6.0..latest", - "android-browser/4.2..latest" - ] - } -} diff --git a/deps/nghttp2/BUILD.gn b/deps/nghttp2/BUILD.gn new file mode 100644 index 00000000000000..274352b0e2449f --- /dev/null +++ b/deps/nghttp2/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +nghttp2_gn_build("nghttp2") { +} diff --git a/deps/nghttp2/unofficial.gni b/deps/nghttp2/unofficial.gni new file mode 100644 index 00000000000000..0d84500a66f249 --- /dev/null +++ b/deps/nghttp2/unofficial.gni @@ -0,0 +1,45 @@ +# Copyright (c) 2013-2019 GitHub Inc. +# Copyright 2019 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("nghttp2_gn_build") { + config("nghttp2_config") { + include_dirs = [ "lib/includes" ] + if (!is_component_build) { + defines = [ "NGHTTP2_STATICLIB" ] + } + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("nghttp2.gyp") ], + "scope", + [ "nghttp2.gyp" ]) + + component(target_name) { + forward_variables_from(invoker, "*") + + public_configs = [ ":nghttp2_config" ] + defines = [ + "_U_", + "HAVE_CONFIG_H" + ] + if (is_component_build) { + defines += [ "BUILDING_NGHTTP2" ] + } + + sources = gypi_values.nghttp2_sources + + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-implicit-fallthrough", + ] + } + } +} diff --git a/deps/ngtcp2/BUILD.gn b/deps/ngtcp2/BUILD.gn new file mode 100644 index 00000000000000..41df46fea419d3 --- /dev/null +++ b/deps/ngtcp2/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +ngtcp2_gn_build("ngtcp2") { +} diff --git a/deps/ngtcp2/unofficial.gni b/deps/ngtcp2/unofficial.gni new file mode 100644 index 00000000000000..a304cf4aded42d --- /dev/null +++ b/deps/ngtcp2/unofficial.gni @@ -0,0 +1,74 @@ +# Copyright (c) 2013-2021 GitHub Inc. +# Copyright 2021 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +import("//node/node.gni") + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("ngtcp2_gn_build") { + config("ngtcp2_config") { + include_dirs = [ + "nghttp3/lib/", + "nghttp3/lib/includes/", + "ngtcp2/crypto/includes/", + "ngtcp2/lib/includes/", + ] + defines = [ + "NGTCP2_STATICLIB", + "NGHTTP3_STATICLIB", + ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("ngtcp2.gyp") ], + "scope", + [ "ngtcp2.gyp" ]) + + # FIXME(zcbenz): Some APIs of ngtcp2 are not marked as export, so can not turn + # into component. This should be fixed in upstream ngtcp2 + static_library(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":ngtcp2_config" ] + + defines = [ "_U_" ] + if (is_win) { + defines += [ + "WIN32", + "_WINDOWS", + "HAVE_CONFIG_H", + ] + } + if (is_linux) { + defines += [ + "HAVE_ARPA_INET_H", + "HAVE_NETINET_IN_H", + ] + } + + include_dirs = [ + ".", + "ngtcp2/lib/", + "ngtcp2/crypto/", + "nghttp3/lib/" + ] + + sources = gypi_values.nghttp3_sources + gypi_values.ngtcp2_sources + if (node_use_openssl) { + sources += gypi_values.ngtcp2_sources_openssl + deps = [ "../openssl" ] + } + + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-extra-semi", + "-Wno-implicit-fallthrough", + ] + } + } +} diff --git a/deps/npm/docs/content/commands/npm-ls.md b/deps/npm/docs/content/commands/npm-ls.md index 2bff962988c4cc..4ad025dbb5b08e 100644 --- a/deps/npm/docs/content/commands/npm-ls.md +++ b/deps/npm/docs/content/commands/npm-ls.md @@ -27,7 +27,7 @@ packages will *also* show the paths to the specified packages. For example, running `npm ls promzard` in npm's source tree will show: ```bash -npm@10.2.3 /path/to/npm +npm@10.2.4 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 ``` diff --git a/deps/npm/docs/content/commands/npm-prune.md b/deps/npm/docs/content/commands/npm-prune.md index ec6aa1ee454d64..d195eb6d3b601f 100644 --- a/deps/npm/docs/content/commands/npm-prune.md +++ b/deps/npm/docs/content/commands/npm-prune.md @@ -18,10 +18,9 @@ then only packages matching one of the supplied names are removed. Extraneous packages are those present in the `node_modules` folder that are not listed as any package's dependency list. -If the `--production` flag is specified or the `NODE_ENV` environment +If the `--omit=dev` flag is specified or the `NODE_ENV` environment variable is set to `production`, this command will remove the packages -specified in your `devDependencies`. Setting `--no-production` will negate -`NODE_ENV` being set to `production`. +specified in your `devDependencies`. If the `--dry-run` flag is used then no changes will actually be made. diff --git a/deps/npm/docs/content/commands/npm-view.md b/deps/npm/docs/content/commands/npm-view.md index 280b6ebe1f091b..63bfe41398d1f3 100644 --- a/deps/npm/docs/content/commands/npm-view.md +++ b/deps/npm/docs/content/commands/npm-view.md @@ -32,6 +32,13 @@ For example, to show the dependencies of the `ronn` package at version npm view ronn@0.3.5 dependencies ``` +By default, `npm view` shows data about the current project context (by looking for a `package.json`). +To show field data for the current project use a file path (i.e. `.`): + +```bash +npm view . dependencies +``` + You can view child fields by separating them with a period. To view the git repository URL for the latest version of `npm`, you would run the following command: diff --git a/deps/npm/docs/content/commands/npm.md b/deps/npm/docs/content/commands/npm.md index 247b7ba6edf594..1528614f69a69a 100644 --- a/deps/npm/docs/content/commands/npm.md +++ b/deps/npm/docs/content/commands/npm.md @@ -14,7 +14,7 @@ Note: This command is unaware of workspaces. ### Version -10.2.3 +10.2.4 ### Description diff --git a/deps/npm/docs/output/commands/npm-ls.html b/deps/npm/docs/output/commands/npm-ls.html index 0c623b49378635..642c883f350281 100644 --- a/deps/npm/docs/output/commands/npm-ls.html +++ b/deps/npm/docs/output/commands/npm-ls.html @@ -160,7 +160,7 @@

    Description

    the results to only the paths to the packages named. Note that nested packages will also show the paths to the specified packages. For example, running npm ls promzard in npm's source tree will show:

    -
    npm@10.2.3 /path/to/npm
    +
    npm@10.2.4 /path/to/npm
     └─┬ init-package-json@0.0.4
       └── promzard@0.1.5
     
    diff --git a/deps/npm/docs/output/commands/npm-prune.html b/deps/npm/docs/output/commands/npm-prune.html index acb24ea8023cee..034257f2271bea 100644 --- a/deps/npm/docs/output/commands/npm-prune.html +++ b/deps/npm/docs/output/commands/npm-prune.html @@ -153,10 +153,9 @@

    Description

    then only packages matching one of the supplied names are removed.

    Extraneous packages are those present in the node_modules folder that are not listed as any package's dependency list.

    -

    If the --production flag is specified or the NODE_ENV environment +

    If the --omit=dev flag is specified or the NODE_ENV environment variable is set to production, this command will remove the packages -specified in your devDependencies. Setting --no-production will negate -NODE_ENV being set to production.

    +specified in your devDependencies.

    If the --dry-run flag is used then no changes will actually be made.

    If the --json flag is used, then the changes npm prune made (or would have made with --dry-run) are printed as a JSON object.

    diff --git a/deps/npm/docs/output/commands/npm-view.html b/deps/npm/docs/output/commands/npm-view.html index 7db48739ef8842..af43193dd0869b 100644 --- a/deps/npm/docs/output/commands/npm-view.html +++ b/deps/npm/docs/output/commands/npm-view.html @@ -161,6 +161,10 @@

    Description

    0.3.5, you could do the following:

    npm view ronn@0.3.5 dependencies
     
    +

    By default, npm view shows data about the current project context (by looking for a package.json). +To show field data for the current project use a file path (i.e. .):

    +
    npm view . dependencies
    +

    You can view child fields by separating them with a period. To view the git repository URL for the latest version of npm, you would run the following command:

    npm view npm repository.url
    diff --git a/deps/npm/docs/output/commands/npm.html b/deps/npm/docs/output/commands/npm.html
    index d1ca758360ff09..7a530efa07bb17 100644
    --- a/deps/npm/docs/output/commands/npm.html
    +++ b/deps/npm/docs/output/commands/npm.html
    @@ -150,7 +150,7 @@ 

    Table of contents

    Note: This command is unaware of workspaces.

    Version

    -

    10.2.3

    +

    10.2.4

    Description

    npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency diff --git a/deps/npm/lib/commands/exec.js b/deps/npm/lib/commands/exec.js index ed4b07dc39b4d2..d532eca107c6c1 100644 --- a/deps/npm/lib/commands/exec.js +++ b/deps/npm/lib/commands/exec.js @@ -34,24 +34,33 @@ class Exec extends BaseCommand { for (const [name, path] of this.workspaces) { const locationMsg = `in workspace ${this.npm.chalk.green(name)} at location:\n${this.npm.chalk.dim(path)}` - await this.callExec(args, { locationMsg, runPath: path }) + await this.callExec(args, { name, locationMsg, runPath: path }) } } - async callExec (args, { locationMsg, runPath } = {}) { - // This is where libnpmexec will look for locally installed packages + async callExec (args, { name, locationMsg, runPath } = {}) { + // This is where libnpmexec will look for locally installed packages at the project level const localPrefix = this.npm.localPrefix + // This is where libnpmexec will look for locally installed packages at the workspace level + let localBin = this.npm.localBin + let path = localPrefix // This is where libnpmexec will actually run the scripts from if (!runPath) { runPath = process.cwd() + } else { + // We have to consider if the workspace has its own separate versions + // libnpmexec will walk up to localDir after looking here + localBin = resolve(this.npm.localDir, name, 'node_modules', '.bin') + // We also need to look for `bin` entries in the workspace package.json + // libnpmexec will NOT look in the project root for the bin entry + path = runPath } const call = this.npm.config.get('call') let globalPath const { flatOptions, - localBin, globalBin, globalDir, chalk, @@ -79,14 +88,14 @@ class Exec extends BaseCommand { // copy args so they dont get mutated args: [...args], call, - localBin, - locationMsg, + chalk, globalBin, globalPath, + localBin, + locationMsg, output, - chalk, packages, - path: localPrefix, + path, runPath, scriptShell, yes, diff --git a/deps/npm/lib/commands/outdated.js b/deps/npm/lib/commands/outdated.js index 7e5805d41806c3..9b9283e497727e 100644 --- a/deps/npm/lib/commands/outdated.js +++ b/deps/npm/lib/commands/outdated.js @@ -6,7 +6,6 @@ const npa = require('npm-package-arg') const pickManifest = require('npm-pick-manifest') const localeCompare = require('@isaacs/string-locale-compare')('en') -const ansiTrim = require('strip-ansi') const ArboristWorkspaceCmd = require('../arborist-cmd.js') class Outdated extends ArboristWorkspaceCmd { @@ -23,6 +22,7 @@ class Outdated extends ArboristWorkspaceCmd { ] async exec (args) { + const { default: stripAnsi } = await import('strip-ansi') const global = resolve(this.npm.globalDir, '..') const where = this.npm.global ? global @@ -106,7 +106,7 @@ class Outdated extends ArboristWorkspaceCmd { const tableOpts = { align: ['l', 'r', 'r', 'r', 'l'], - stringLength: s => ansiTrim(s).length, + stringLength: s => stripAnsi(s).length, } this.npm.output(table(outTable, tableOpts)) } diff --git a/deps/npm/lib/commands/pkg.js b/deps/npm/lib/commands/pkg.js index 29bd4e89cc3c17..49a66823cca996 100644 --- a/deps/npm/lib/commands/pkg.js +++ b/deps/npm/lib/commands/pkg.js @@ -82,10 +82,9 @@ class Pkg extends BaseCommand { } } - // only outputs if not running with workspaces config, - // in case you're retrieving info for workspaces the pkgWorkspaces - // will handle the output to make sure it get keyed by ws name - if (!this.npm.config.get('workspaces')) { + // only outputs if not running with workspaces config + // execWorkspaces will handle the output otherwise + if (!this.workspaces) { this.npm.output(JSON.stringify(result, null, 2)) } diff --git a/deps/npm/lib/commands/search.js b/deps/npm/lib/commands/search.js index 85ff7db2b78840..2af4daa211dca1 100644 --- a/deps/npm/lib/commands/search.js +++ b/deps/npm/lib/commands/search.js @@ -81,12 +81,12 @@ class Search extends BaseCommand { const filterStream = new FilterStream() - // Grab a configured output stream that will spit out packages in the - // desired format. - const outputStream = formatSearchStream({ + const { default: stripAnsi } = await import('strip-ansi') + // Grab a configured output stream that will spit out packages in the desired format. + const outputStream = await formatSearchStream({ args, // --searchinclude options are not highlighted ...opts, - }) + }, stripAnsi) log.silly('search', 'searching packages') const p = new Pipeline( diff --git a/deps/npm/lib/commands/token.js b/deps/npm/lib/commands/token.js index c24684b3dd6143..dc1df6e0fcb25b 100644 --- a/deps/npm/lib/commands/token.js +++ b/deps/npm/lib/commands/token.js @@ -1,5 +1,4 @@ const Table = require('cli-table3') -const { v4: isCidrV4, v6: isCidrV6 } = require('is-cidr') const log = require('../utils/log-shim.js') const profile = require('npm-profile') @@ -137,7 +136,7 @@ class Token extends BaseCommand { const readonly = conf.readOnly const password = await readUserInfo.password() - const validCIDR = this.validateCIDRList(cidr) + const validCIDR = await this.validateCIDRList(cidr) log.info('token', 'creating') const result = await pulseTillDone.withPromise( otplease(this.npm, conf, c => profile.createToken(password, readonly, validCIDR, c)) @@ -209,7 +208,8 @@ class Token extends BaseCommand { return byId } - validateCIDRList (cidrs) { + async validateCIDRList (cidrs) { + const { v4: isCidrV4, v6: isCidrV6 } = await import('is-cidr') const maybeList = [].concat(cidrs).filter(Boolean) const list = maybeList.length === 1 ? maybeList[0].split(/,\s*/) : maybeList for (const cidr of list) { diff --git a/deps/npm/lib/utils/format-search-stream.js b/deps/npm/lib/utils/format-search-stream.js index 280e96b13fa8bd..cb29151e7c2e70 100644 --- a/deps/npm/lib/utils/format-search-stream.js +++ b/deps/npm/lib/utils/format-search-stream.js @@ -1,6 +1,5 @@ const { Minipass } = require('minipass') const columnify = require('columnify') -const ansiTrim = require('strip-ansi') // This module consumes package data in the following format: // @@ -16,8 +15,8 @@ const ansiTrim = require('strip-ansi') // The returned stream will format this package data // into a byte stream of formatted, displayable output. -module.exports = (opts) => { - return opts.json ? new JSONOutputStream() : new TextOutputStream(opts) +module.exports = async (opts, clean) => { + return opts.json ? new JSONOutputStream() : new TextOutputStream(opts, clean) } class JSONOutputStream extends Minipass { @@ -41,121 +40,96 @@ class JSONOutputStream extends Minipass { } class TextOutputStream extends Minipass { - constructor (opts) { + #clean + #opts + #line = 0 + + constructor (opts, clean) { super() - this._opts = opts - this._line = 0 + this.#clean = clean + this.#opts = opts } write (pkg) { - return super.write(prettify(pkg, ++this._line, this._opts)) - } -} - -function prettify (data, num, opts) { - var truncate = !opts.long - - var pkg = normalizePackage(data, opts) - - var columns = ['name', 'description', 'author', 'date', 'version', 'keywords'] - - if (opts.parseable) { - return columns.map(function (col) { - return pkg[col] && ('' + pkg[col]).replace(/\t/g, ' ') - }).join('\t') + return super.write(this.#prettify(pkg)) } - // stdout in tap is never a tty - /* istanbul ignore next */ - const maxWidth = process.stdout.isTTY ? process.stdout.getWindowSize()[0] : Infinity - let output = columnify( - [pkg], - { - include: columns, - showHeaders: num <= 1, - columnSplitter: ' | ', - truncate: truncate, - config: { - name: { minWidth: 25, maxWidth: 25, truncate: false, truncateMarker: '' }, - description: { minWidth: 20, maxWidth: 20 }, - author: { minWidth: 15, maxWidth: 15 }, - date: { maxWidth: 11 }, - version: { minWidth: 8, maxWidth: 8 }, - keywords: { maxWidth: Infinity }, - }, + #prettify (data) { + const pkg = { + author: data.maintainers.map((m) => `=${this.#clean(m.username)}`).join(' '), + date: 'prehistoric', + description: this.#clean(data.description ?? ''), + keywords: '', + name: this.#clean(data.name), + version: data.version, + } + if (Array.isArray(data.keywords)) { + pkg.keywords = data.keywords.map((k) => this.#clean(k)).join(' ') + } else if (typeof data.keywords === 'string') { + pkg.keywords = this.#clean(data.keywords.replace(/[,\s]+/, ' ')) + } + if (data.date) { + pkg.date = data.date.toISOString().split('T')[0] // remove time } - ).split('\n').map(line => line.slice(0, maxWidth)).join('\n') - - if (opts.color) { - output = highlightSearchTerms(output, opts.args) - } - - return output -} - -var colors = [31, 33, 32, 36, 34, 35] -var cl = colors.length - -function addColorMarker (str, arg, i) { - var m = i % cl + 1 - var markStart = String.fromCharCode(m) - var markEnd = String.fromCharCode(0) - - if (arg.charAt(0) === '/') { - return str.replace( - new RegExp(arg.slice(1, -1), 'gi'), - bit => markStart + bit + markEnd - ) - } - - // just a normal string, do the split/map thing - var pieces = str.toLowerCase().split(arg.toLowerCase()) - var p = 0 - - return pieces.map(function (piece) { - piece = str.slice(p, p + piece.length) - var mark = markStart + - str.slice(p + piece.length, p + piece.length + arg.length) + - markEnd - p += piece.length + arg.length - return piece + mark - }).join('') -} - -function colorize (line) { - for (var i = 0; i < cl; i++) { - var m = i + 1 - var color = '\u001B[' + colors[i] + 'm' - line = line.split(String.fromCharCode(m)).join(color) - } - var uncolor = '\u001B[0m' - return line.split('\u0000').join(uncolor) -} -function highlightSearchTerms (str, terms) { - terms.forEach(function (arg, i) { - str = addColorMarker(str, arg, i) - }) + const columns = ['name', 'description', 'author', 'date', 'version', 'keywords'] + if (this.#opts.parseable) { + return columns.map((col) => pkg[col] && ('' + pkg[col]).replace(/\t/g, ' ')).join('\t') + } - return colorize(str).trim() -} + // stdout in tap is never a tty + /* istanbul ignore next */ + const maxWidth = process.stdout.isTTY ? process.stdout.getWindowSize()[0] : Infinity + let output = columnify( + [pkg], + { + include: columns, + showHeaders: ++this.#line <= 1, + columnSplitter: ' | ', + truncate: !this.#opts.long, + config: { + name: { minWidth: 25, maxWidth: 25, truncate: false, truncateMarker: '' }, + description: { minWidth: 20, maxWidth: 20 }, + author: { minWidth: 15, maxWidth: 15 }, + date: { maxWidth: 11 }, + version: { minWidth: 8, maxWidth: 8 }, + keywords: { maxWidth: Infinity }, + }, + } + ).split('\n').map(line => line.slice(0, maxWidth)).join('\n') + + if (!this.#opts.color) { + return output + } -function normalizePackage (data, opts) { - return { - name: ansiTrim(data.name), - description: ansiTrim(data.description ?? ''), - author: data.maintainers.map((m) => `=${ansiTrim(m.username)}`).join(' '), - keywords: Array.isArray(data.keywords) - ? data.keywords.map(ansiTrim).join(' ') - : typeof data.keywords === 'string' - ? ansiTrim(data.keywords.replace(/[,\s]+/, ' ')) - : '', - version: data.version, - date: (data.date && - (data.date.toISOString() // remove time - .split('T').join(' ') - .replace(/:[0-9]{2}\.[0-9]{3}Z$/, '')) - .slice(0, -5)) || - 'prehistoric', + const colors = ['31m', '33m', '32m', '36m', '34m', '35m'] + + this.#opts.args.forEach((arg, i) => { + const markStart = String.fromCharCode(i % colors.length + 1) + const markEnd = String.fromCharCode(0) + + if (arg.charAt(0) === '/') { + output = output.replace( + new RegExp(arg.slice(1, -1), 'gi'), + bit => `${markStart}${bit}${markEnd}` + ) + } else { + // just a normal string, do the split/map thing + let p = 0 + + output = output.toLowerCase().split(arg.toLowerCase()).map(piece => { + piece = output.slice(p, p + piece.length) + p += piece.length + const mark = `${markStart}${output.slice(p, p + arg.length)}${markEnd}` + p += arg.length + return `${piece}${mark}` + }).join('') + } + }) + + for (let i = 1; i <= colors.length; i++) { + output = output.split(String.fromCharCode(i)).join(`\u001B[${colors[i - 1]}`) + } + return output.split('\u0000').join('\u001B[0m').trim() } } diff --git a/deps/npm/lib/utils/open-url.js b/deps/npm/lib/utils/open-url.js index f882d0c9d39341..77bb1d03d8e165 100644 --- a/deps/npm/lib/utils/open-url.js +++ b/deps/npm/lib/utils/open-url.js @@ -39,7 +39,7 @@ const open = async (npm, url, errMsg, isFile) => { const command = browser === true ? null : browser await promiseSpawn.open(url, { command }) .catch((err) => { - if (err.code !== 'ENOENT') { + if (err.code !== 127) { throw err } diff --git a/deps/npm/lib/utils/sbom-cyclonedx.js b/deps/npm/lib/utils/sbom-cyclonedx.js index 3088068ad3b5f2..0a340895bb3f49 100644 --- a/deps/npm/lib/utils/sbom-cyclonedx.js +++ b/deps/npm/lib/utils/sbom-cyclonedx.js @@ -86,7 +86,14 @@ const toCyclonedxItem = (node, { packageType }) => { let parsedLicense try { - parsedLicense = parseLicense(node.package?.license) + let license = node.package?.license + if (license) { + if (typeof license === 'object') { + license = license.type + } + } + + parsedLicense = parseLicense(license) } catch (err) { parsedLicense = null } @@ -152,7 +159,7 @@ const toCyclonedxItem = (node, { packageType }) => { // If license is a single SPDX license, use the license field if (parsedLicense?.license) { component.licenses = [{ license: { id: parsedLicense.license } }] - // If license is a conjunction, use the expression field + // If license is a conjunction, use the expression field } else if (parsedLicense?.conjunction) { component.licenses = [{ expression: node.package.license }] } diff --git a/deps/npm/lib/utils/sbom-spdx.js b/deps/npm/lib/utils/sbom-spdx.js index 890ee3310fa789..8c91147cb4102b 100644 --- a/deps/npm/lib/utils/sbom-spdx.js +++ b/deps/npm/lib/utils/sbom-spdx.js @@ -93,6 +93,13 @@ const toSpdxItem = (node, { packageType }) => { location = node.linksIn.values().next().value.location } + let license = node.package?.license + if (license) { + if (typeof license === 'object') { + license = license.type + } + } + const pkg = { name: node.packageName, SPDXID: toSpdxID(node), @@ -103,7 +110,7 @@ const toSpdxItem = (node, { packageType }) => { downloadLocation: (node.isLink ? undefined : node.resolved) || NO_ASSERTION, filesAnalyzed: false, homepage: node.package?.homepage || NO_ASSERTION, - licenseDeclared: node.package?.license || NO_ASSERTION, + licenseDeclared: license || NO_ASSERTION, externalRefs: [ { referenceCategory: REF_CAT_PACKAGE_MANAGER, diff --git a/deps/npm/man/man1/npm-ls.1 b/deps/npm/man/man1/npm-ls.1 index 25af64a1534878..7b8ea0771e1a43 100644 --- a/deps/npm/man/man1/npm-ls.1 +++ b/deps/npm/man/man1/npm-ls.1 @@ -20,7 +20,7 @@ Positional arguments are \fBname@version-range\fR identifiers, which will limit .P .RS 2 .nf -npm@10.2.3 /path/to/npm +npm@10.2.4 /path/to/npm └─┬ init-package-json@0.0.4 └── promzard@0.1.5 .fi diff --git a/deps/npm/man/man1/npm-prune.1 b/deps/npm/man/man1/npm-prune.1 index 3ab15a55c879a1..32f57580e3fb49 100644 --- a/deps/npm/man/man1/npm-prune.1 +++ b/deps/npm/man/man1/npm-prune.1 @@ -14,7 +14,7 @@ This command removes "extraneous" packages. If a package name is provided, then .P Extraneous packages are those present in the \fBnode_modules\fR folder that are not listed as any package's dependency list. .P -If the \fB--production\fR flag is specified or the \fBNODE_ENV\fR environment variable is set to \fBproduction\fR, this command will remove the packages specified in your \fBdevDependencies\fR. Setting \fB--no-production\fR will negate \fBNODE_ENV\fR being set to \fBproduction\fR. +If the \fB--omit=dev\fR flag is specified or the \fBNODE_ENV\fR environment variable is set to \fBproduction\fR, this command will remove the packages specified in your \fBdevDependencies\fR. .P If the \fB--dry-run\fR flag is used then no changes will actually be made. .P diff --git a/deps/npm/man/man1/npm-view.1 b/deps/npm/man/man1/npm-view.1 index decf76a1e9bfc7..70c435cdc929c6 100644 --- a/deps/npm/man/man1/npm-view.1 +++ b/deps/npm/man/man1/npm-view.1 @@ -32,6 +32,14 @@ npm view ronn@0.3.5 dependencies .fi .RE .P +By default, \fBnpm view\fR shows data about the current project context (by looking for a \fBpackage.json\fR). To show field data for the current project use a file path (i.e. \fB.\fR): +.P +.RS 2 +.nf +npm view . dependencies +.fi +.RE +.P You can view child fields by separating them with a period. To view the git repository URL for the latest version of \fBnpm\fR, you would run the following command: .P .RS 2 diff --git a/deps/npm/man/man1/npm.1 b/deps/npm/man/man1/npm.1 index 2f08cb27dbbca5..05d06e9f7758a4 100644 --- a/deps/npm/man/man1/npm.1 +++ b/deps/npm/man/man1/npm.1 @@ -12,7 +12,7 @@ npm Note: This command is unaware of workspaces. .SS "Version" .P -10.2.3 +10.2.4 .SS "Description" .P npm is the package manager for the Node JavaScript platform. It puts modules in place so that node can find them, and manages dependency conflicts intelligently. diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js b/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js deleted file mode 100644 index 130a0929b8ce8c..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export default function ansiRegex({onlyFirst = false} = {}) { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -} diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js b/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js deleted file mode 100644 index ba19750e64e061..00000000000000 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ansiRegex from 'ansi-regex'; - -const regex = ansiRegex(); - -export default function stripAnsi(string) { - if (typeof string !== 'string') { - throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); - } - - // Even though the regex is global, we don't need to reset the `.lastIndex` - // because unlike `.exec()` and `.test()`, `.replace()` does it automatically - // and doing it manually has a performance penalty. - return string.replace(regex, ''); -} diff --git a/deps/npm/node_modules/@npmcli/config/package.json b/deps/npm/node_modules/@npmcli/config/package.json index 2f30c7ff98a644..c4eabca7d1b8c1 100644 --- a/deps/npm/node_modules/@npmcli/config/package.json +++ b/deps/npm/node_modules/@npmcli/config/package.json @@ -1,6 +1,6 @@ { "name": "@npmcli/config", - "version": "8.0.1", + "version": "8.0.2", "files": [ "bin/", "lib/" @@ -37,7 +37,7 @@ }, "dependencies": { "@npmcli/map-workspaces": "^3.0.2", - "ci-info": "^3.8.0", + "ci-info": "^4.0.0", "ini": "^4.1.0", "nopt": "^7.0.0", "proc-log": "^3.0.0", diff --git a/deps/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/index.js b/deps/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/index.js new file mode 100644 index 00000000000000..5d82581a13f990 --- /dev/null +++ b/deps/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/index.js @@ -0,0 +1,163 @@ +'use strict'; + +const wrapAnsi16 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => (...args) => { + const rgb = fn(...args); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +const ansi2ansi = n => n; +const rgb2rgb = (r, g, b) => [r, g, b]; + +const setLazyProperty = (object, property, get) => { + Object.defineProperty(object, property, { + get: () => { + const value = get(); + + Object.defineProperty(object, property, { + value, + enumerable: true, + configurable: true + }); + + return value; + }, + enumerable: true, + configurable: true + }); +}; + +/** @type {typeof import('color-convert')} */ +let colorConvert; +const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { + if (colorConvert === undefined) { + colorConvert = require('color-convert'); + } + + const offset = isBackground ? 10 : 0; + const styles = {}; + + for (const [sourceSpace, suite] of Object.entries(colorConvert)) { + const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; + if (sourceSpace === targetSpace) { + styles[name] = wrap(identity, offset); + } else if (typeof suite === 'object') { + styles[name] = wrap(suite[targetSpace], offset); + } + } + + return styles; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Alias bright black as gray (and grey) + styles.color.gray = styles.color.blackBright; + styles.bgColor.bgGray = styles.bgColor.bgBlackBright; + styles.color.grey = styles.color.blackBright; + styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; + + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); + setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/license b/deps/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/license similarity index 92% rename from deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/license rename to deps/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/license index fa7ceba3eb4a96..e7af2f77107d73 100644 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/license +++ b/deps/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (https://sindresorhus.com) +Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/package.json b/deps/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/package.json similarity index 80% rename from deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/package.json rename to deps/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/package.json index 6cd3ca5bf95d00..75393284d7e474 100644 --- a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/package.json +++ b/deps/npm/node_modules/@npmcli/disparity-colors/node_modules/ansi-styles/package.json @@ -1,6 +1,6 @@ { "name": "ansi-styles", - "version": "6.2.1", + "version": "4.3.0", "description": "ANSI escape codes for styling strings in the terminal", "license": "MIT", "repository": "chalk/ansi-styles", @@ -8,12 +8,10 @@ "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" + "url": "sindresorhus.com" }, - "type": "module", - "exports": "./index.js", "engines": { - "node": ">=12" + "node": ">=8" }, "scripts": { "test": "xo && ava && tsd", @@ -45,10 +43,14 @@ "command-line", "text" ], + "dependencies": { + "color-convert": "^2.0.1" + }, "devDependencies": { - "ava": "^3.15.0", + "@types/color-convert": "^1.9.0", + "ava": "^2.3.0", "svg-term-cli": "^2.1.1", - "tsd": "^0.19.0", - "xo": "^0.47.0" + "tsd": "^0.11.0", + "xo": "^0.25.3" } } diff --git a/deps/npm/node_modules/@sigstore/sign/dist/witness/tlog/index.js b/deps/npm/node_modules/@sigstore/sign/dist/witness/tlog/index.js index 1f098df85390cf..6197b09d4cdd9a 100644 --- a/deps/npm/node_modules/@sigstore/sign/dist/witness/tlog/index.js +++ b/deps/npm/node_modules/@sigstore/sign/dist/witness/tlog/index.js @@ -22,13 +22,14 @@ const entry_1 = require("./entry"); exports.DEFAULT_REKOR_URL = 'https://rekor.sigstore.dev'; class RekorWitness { constructor(options) { + this.entryType = options.entryType; this.tlog = new client_1.TLogClient({ ...options, rekorBaseURL: options.rekorBaseURL || /* istanbul ignore next */ exports.DEFAULT_REKOR_URL, }); } async testify(content, publicKey) { - const proposedEntry = (0, entry_1.toProposedEntry)(content, publicKey); + const proposedEntry = (0, entry_1.toProposedEntry)(content, publicKey, this.entryType); const entry = await this.tlog.createEntry(proposedEntry); return toTransparencyLogEntry(entry); } diff --git a/deps/npm/node_modules/@sigstore/sign/package.json b/deps/npm/node_modules/@sigstore/sign/package.json index cd8dc14412e4da..7075ee16aeb0dc 100644 --- a/deps/npm/node_modules/@sigstore/sign/package.json +++ b/deps/npm/node_modules/@sigstore/sign/package.json @@ -1,6 +1,6 @@ { "name": "@sigstore/sign", - "version": "2.1.0", + "version": "2.2.0", "description": "Sigstore signing library", "main": "dist/index.js", "types": "dist/index.d.ts", @@ -27,9 +27,9 @@ }, "devDependencies": { "@sigstore/jest": "^0.0.0", - "@sigstore/mock": "^0.4.0", + "@sigstore/mock": "^0.6.0", "@sigstore/rekor-types": "^2.0.0", - "@types/make-fetch-happen": "^10.0.0" + "@types/make-fetch-happen": "^10.0.3" }, "dependencies": { "@sigstore/bundle": "^2.1.0", diff --git a/deps/npm/node_modules/@sigstore/tuf/dist/client.js b/deps/npm/node_modules/@sigstore/tuf/dist/client.js index 797346d39e6202..865d52b73027ed 100644 --- a/deps/npm/node_modules/@sigstore/tuf/dist/client.js +++ b/deps/npm/node_modules/@sigstore/tuf/dist/client.js @@ -25,8 +25,8 @@ const tuf_js_1 = require("tuf-js"); const target_1 = require("./target"); class TUFClient { constructor(options) { - initTufCache(options.cachePath, options.rootPath); - const remote = initRemoteConfig(options.cachePath, options.mirrorURL); + initTufCache(options); + const remote = initRemoteConfig(options); this.updater = initClient(options.cachePath, remote, options); } async refresh() { @@ -42,7 +42,7 @@ exports.TUFClient = TUFClient; // created. If the targets directory does not exist, it will be created. // If the root.json file does not exist, it will be copied from the // rootPath argument. -function initTufCache(cachePath, tufRootPath) { +function initTufCache({ cachePath, rootPath: tufRootPath, force, }) { const targetsPath = path_1.default.join(cachePath, 'targets'); const cachedRootPath = path_1.default.join(cachePath, 'root.json'); if (!fs_1.default.existsSync(cachePath)) { @@ -51,7 +51,9 @@ function initTufCache(cachePath, tufRootPath) { if (!fs_1.default.existsSync(targetsPath)) { fs_1.default.mkdirSync(targetsPath); } - if (!fs_1.default.existsSync(cachedRootPath)) { + // If the root.json file does not exist (or we're forcing re-initialization), + // copy it from the rootPath argument + if (!fs_1.default.existsSync(cachedRootPath) || force) { fs_1.default.copyFileSync(tufRootPath, cachedRootPath); } return cachePath; @@ -59,14 +61,18 @@ function initTufCache(cachePath, tufRootPath) { // Initializes the remote.json file, which contains the URL of the TUF // repository. If the file does not exist, it will be created. If the file // exists, it will be parsed and returned. -function initRemoteConfig(rootDir, mirrorURL) { +function initRemoteConfig({ cachePath, mirrorURL, force, }) { let remoteConfig; - const remoteConfigPath = path_1.default.join(rootDir, 'remote.json'); - if (fs_1.default.existsSync(remoteConfigPath)) { + const remoteConfigPath = path_1.default.join(cachePath, 'remote.json'); + // If the remote config file exists, read it and parse it (skip if force is + // true) + if (!force && fs_1.default.existsSync(remoteConfigPath)) { const data = fs_1.default.readFileSync(remoteConfigPath, 'utf-8'); remoteConfig = JSON.parse(data); } - if (!remoteConfig) { + // If the remote config file does not exist (or we're forcing initialization), + // create it + if (!remoteConfig || force) { remoteConfig = { mirror: mirrorURL }; fs_1.default.writeFileSync(remoteConfigPath, JSON.stringify(remoteConfig)); } diff --git a/deps/npm/node_modules/@sigstore/tuf/dist/index.js b/deps/npm/node_modules/@sigstore/tuf/dist/index.js index 0d201c356dffc5..297c7231408c25 100644 --- a/deps/npm/node_modules/@sigstore/tuf/dist/index.js +++ b/deps/npm/node_modules/@sigstore/tuf/dist/index.js @@ -1,6 +1,6 @@ "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); -exports.TUFError = exports.initTUF = exports.getTrustedRoot = void 0; +exports.TUFError = exports.initTUF = exports.getTrustedRoot = exports.DEFAULT_MIRROR_URL = void 0; /* Copyright 2023 The Sigstore Authors. @@ -19,8 +19,8 @@ limitations under the License. const protobuf_specs_1 = require("@sigstore/protobuf-specs"); const appdata_1 = require("./appdata"); const client_1 = require("./client"); +exports.DEFAULT_MIRROR_URL = 'https://tuf-repo-cdn.sigstore.dev'; const DEFAULT_CACHE_DIR = 'sigstore-js'; -const DEFAULT_MIRROR_URL = 'https://tuf-repo-cdn.sigstore.dev'; const DEFAULT_TUF_ROOT_PATH = '../store/public-good-instance-root.json'; const DEFAULT_RETRY = { retries: 2 }; const DEFAULT_TIMEOUT = 5000; @@ -46,9 +46,10 @@ function createClient(options) { return new client_1.TUFClient({ cachePath: options.cachePath || (0, appdata_1.appDataPath)(DEFAULT_CACHE_DIR), rootPath: options.rootPath || require.resolve(DEFAULT_TUF_ROOT_PATH), - mirrorURL: options.mirrorURL || DEFAULT_MIRROR_URL, + mirrorURL: options.mirrorURL || exports.DEFAULT_MIRROR_URL, retry: options.retry ?? DEFAULT_RETRY, timeout: options.timeout ?? DEFAULT_TIMEOUT, + force: options.force ?? false, }); } var error_1 = require("./error"); diff --git a/deps/npm/node_modules/@sigstore/tuf/package.json b/deps/npm/node_modules/@sigstore/tuf/package.json index a655d52a0407a3..38d5a03ad5be1c 100644 --- a/deps/npm/node_modules/@sigstore/tuf/package.json +++ b/deps/npm/node_modules/@sigstore/tuf/package.json @@ -1,6 +1,6 @@ { "name": "@sigstore/tuf", - "version": "2.1.0", + "version": "2.2.0", "description": "Client for the Sigstore TUF repository", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/agent-base/dist/helpers.js b/deps/npm/node_modules/agent-base/dist/helpers.js similarity index 100% rename from deps/npm/node_modules/@npmcli/agent/node_modules/agent-base/dist/helpers.js rename to deps/npm/node_modules/agent-base/dist/helpers.js diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/agent-base/dist/index.js b/deps/npm/node_modules/agent-base/dist/index.js similarity index 100% rename from deps/npm/node_modules/@npmcli/agent/node_modules/agent-base/dist/index.js rename to deps/npm/node_modules/agent-base/dist/index.js diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/agent-base/package.json b/deps/npm/node_modules/agent-base/package.json similarity index 100% rename from deps/npm/node_modules/@npmcli/agent/node_modules/agent-base/package.json rename to deps/npm/node_modules/agent-base/package.json diff --git a/deps/npm/node_modules/ansi-regex/index.js b/deps/npm/node_modules/ansi-regex/index.js index 616ff837d3ff01..130a0929b8ce8c 100644 --- a/deps/npm/node_modules/ansi-regex/index.js +++ b/deps/npm/node_modules/ansi-regex/index.js @@ -1,10 +1,8 @@ -'use strict'; - -module.exports = ({onlyFirst = false} = {}) => { +export default function ansiRegex({onlyFirst = false} = {}) { const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' ].join('|'); return new RegExp(pattern, onlyFirst ? undefined : 'g'); -}; +} diff --git a/deps/npm/node_modules/ansi-regex/license b/deps/npm/node_modules/ansi-regex/license index e7af2f77107d73..fa7ceba3eb4a96 100644 --- a/deps/npm/node_modules/ansi-regex/license +++ b/deps/npm/node_modules/ansi-regex/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Sindre Sorhus (https://sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/deps/npm/node_modules/ansi-regex/package.json b/deps/npm/node_modules/ansi-regex/package.json index 017f53116a9e28..7bbb563bf2a70a 100644 --- a/deps/npm/node_modules/ansi-regex/package.json +++ b/deps/npm/node_modules/ansi-regex/package.json @@ -1,16 +1,19 @@ { "name": "ansi-regex", - "version": "5.0.1", + "version": "6.0.1", "description": "Regular expression for matching ANSI escape codes", "license": "MIT", "repository": "chalk/ansi-regex", + "funding": "https://github.com/chalk/ansi-regex?sponsor=1", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" + "url": "https://sindresorhus.com" }, + "type": "module", + "exports": "./index.js", "engines": { - "node": ">=8" + "node": ">=12" }, "scripts": { "test": "xo && ava && tsd", @@ -48,8 +51,8 @@ "pattern" ], "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.9.0", - "xo": "^0.25.3" + "ava": "^3.15.0", + "tsd": "^0.14.0", + "xo": "^0.38.2" } } diff --git a/deps/npm/node_modules/ansi-styles/index.js b/deps/npm/node_modules/ansi-styles/index.js index 5d82581a13f990..d7bede44b7b6ba 100644 --- a/deps/npm/node_modules/ansi-styles/index.js +++ b/deps/npm/node_modules/ansi-styles/index.js @@ -1,130 +1,83 @@ -'use strict'; - -const wrapAnsi16 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${code + offset}m`; -}; - -const wrapAnsi256 = (fn, offset) => (...args) => { - const code = fn(...args); - return `\u001B[${38 + offset};5;${code}m`; -}; - -const wrapAnsi16m = (fn, offset) => (...args) => { - const rgb = fn(...args); - return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; -}; - -const ansi2ansi = n => n; -const rgb2rgb = (r, g, b) => [r, g, b]; - -const setLazyProperty = (object, property, get) => { - Object.defineProperty(object, property, { - get: () => { - const value = get(); - - Object.defineProperty(object, property, { - value, - enumerable: true, - configurable: true - }); - - return value; - }, - enumerable: true, - configurable: true - }); +const ANSI_BACKGROUND_OFFSET = 10; + +const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`; + +const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`; + +const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`; + +const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + overline: [53, 55], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29], + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + gray: [90, 39], // Alias of `blackBright` + grey: [90, 39], // Alias of `blackBright` + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39], + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgGray: [100, 49], // Alias of `bgBlackBright` + bgGrey: [100, 49], // Alias of `bgBlackBright` + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49], + }, }; -/** @type {typeof import('color-convert')} */ -let colorConvert; -const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { - if (colorConvert === undefined) { - colorConvert = require('color-convert'); - } - - const offset = isBackground ? 10 : 0; - const styles = {}; - - for (const [sourceSpace, suite] of Object.entries(colorConvert)) { - const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; - if (sourceSpace === targetSpace) { - styles[name] = wrap(identity, offset); - } else if (typeof suite === 'object') { - styles[name] = wrap(suite[targetSpace], offset); - } - } - - return styles; -}; +export const modifierNames = Object.keys(styles.modifier); +export const foregroundColorNames = Object.keys(styles.color); +export const backgroundColorNames = Object.keys(styles.bgColor); +export const colorNames = [...foregroundColorNames, ...backgroundColorNames]; function assembleStyles() { const codes = new Map(); - const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29] - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39] - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49] - } - }; - - // Alias bright black as gray (and grey) - styles.color.gray = styles.color.blackBright; - styles.bgColor.bgGray = styles.bgColor.bgBlackBright; - styles.color.grey = styles.color.blackBright; - styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; for (const [groupName, group] of Object.entries(styles)) { for (const [styleName, style] of Object.entries(group)) { styles[styleName] = { open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m` + close: `\u001B[${style[1]}m`, }; group[styleName] = styles[styleName]; @@ -134,30 +87,137 @@ function assembleStyles() { Object.defineProperty(styles, groupName, { value: group, - enumerable: false + enumerable: false, }); } Object.defineProperty(styles, 'codes', { value: codes, - enumerable: false + enumerable: false, }); styles.color.close = '\u001B[39m'; styles.bgColor.close = '\u001B[49m'; - setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); - setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); - setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); - setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); + styles.color.ansi = wrapAnsi16(); + styles.color.ansi256 = wrapAnsi256(); + styles.color.ansi16m = wrapAnsi16m(); + styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); + styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); + styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); + + // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js + Object.defineProperties(styles, { + rgbToAnsi256: { + value: (red, green, blue) => { + // We use the extended greyscale palette here, with the exception of + // black and white. normal palette only has 4 greyscale shades. + if (red === green && green === blue) { + if (red < 8) { + return 16; + } + + if (red > 248) { + return 231; + } + + return Math.round(((red - 8) / 247) * 24) + 232; + } + + return 16 + + (36 * Math.round(red / 255 * 5)) + + (6 * Math.round(green / 255 * 5)) + + Math.round(blue / 255 * 5); + }, + enumerable: false, + }, + hexToRgb: { + value: hex => { + const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); + if (!matches) { + return [0, 0, 0]; + } + + let [colorString] = matches; + + if (colorString.length === 3) { + colorString = [...colorString].map(character => character + character).join(''); + } + + const integer = Number.parseInt(colorString, 16); + + return [ + /* eslint-disable no-bitwise */ + (integer >> 16) & 0xFF, + (integer >> 8) & 0xFF, + integer & 0xFF, + /* eslint-enable no-bitwise */ + ]; + }, + enumerable: false, + }, + hexToAnsi256: { + value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)), + enumerable: false, + }, + ansi256ToAnsi: { + value: code => { + if (code < 8) { + return 30 + code; + } + + if (code < 16) { + return 90 + (code - 8); + } + + let red; + let green; + let blue; + + if (code >= 232) { + red = (((code - 232) * 10) + 8) / 255; + green = red; + blue = red; + } else { + code -= 16; + + const remainder = code % 36; + + red = Math.floor(code / 36) / 5; + green = Math.floor(remainder / 6) / 5; + blue = (remainder % 6) / 5; + } + + const value = Math.max(red, green, blue) * 2; + + if (value === 0) { + return 30; + } + + // eslint-disable-next-line no-bitwise + let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red)); + + if (value === 2) { + result += 60; + } + + return result; + }, + enumerable: false, + }, + rgbToAnsi: { + value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), + enumerable: false, + }, + hexToAnsi: { + value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), + enumerable: false, + }, + }); return styles; } -// Make the export immutable -Object.defineProperty(module, 'exports', { - enumerable: true, - get: assembleStyles -}); +const ansiStyles = assembleStyles(); + +export default ansiStyles; diff --git a/deps/npm/node_modules/ansi-styles/license b/deps/npm/node_modules/ansi-styles/license index e7af2f77107d73..fa7ceba3eb4a96 100644 --- a/deps/npm/node_modules/ansi-styles/license +++ b/deps/npm/node_modules/ansi-styles/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Sindre Sorhus (https://sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/deps/npm/node_modules/ansi-styles/package.json b/deps/npm/node_modules/ansi-styles/package.json index 75393284d7e474..6cd3ca5bf95d00 100644 --- a/deps/npm/node_modules/ansi-styles/package.json +++ b/deps/npm/node_modules/ansi-styles/package.json @@ -1,6 +1,6 @@ { "name": "ansi-styles", - "version": "4.3.0", + "version": "6.2.1", "description": "ANSI escape codes for styling strings in the terminal", "license": "MIT", "repository": "chalk/ansi-styles", @@ -8,10 +8,12 @@ "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" + "url": "https://sindresorhus.com" }, + "type": "module", + "exports": "./index.js", "engines": { - "node": ">=8" + "node": ">=12" }, "scripts": { "test": "xo && ava && tsd", @@ -43,14 +45,10 @@ "command-line", "text" ], - "dependencies": { - "color-convert": "^2.0.1" - }, "devDependencies": { - "@types/color-convert": "^1.9.0", - "ava": "^2.3.0", + "ava": "^3.15.0", "svg-term-cli": "^2.1.1", - "tsd": "^0.11.0", - "xo": "^0.25.3" + "tsd": "^0.19.0", + "xo": "^0.47.0" } } diff --git a/deps/npm/node_modules/ci-info/package.json b/deps/npm/node_modules/ci-info/package.json index 8d3ff0030cc919..3c6b9e4adac8e8 100644 --- a/deps/npm/node_modules/ci-info/package.json +++ b/deps/npm/node_modules/ci-info/package.json @@ -1,6 +1,6 @@ { "name": "ci-info", - "version": "3.9.0", + "version": "4.0.0", "description": "Get details about the current Continuous Integration environment", "main": "index.js", "typings": "index.d.ts", diff --git a/deps/npm/node_modules/ci-info/vendors.json b/deps/npm/node_modules/ci-info/vendors.json index 7bedd96a7972fa..6b65e3f9b541f8 100644 --- a/deps/npm/node_modules/ci-info/vendors.json +++ b/deps/npm/node_modules/ci-info/vendors.json @@ -1,4 +1,10 @@ [ + { + "name": "Agola CI", + "constant": "AGOLA", + "env": "AGOLA_GIT_REF", + "pr": "AGOLA_PULL_REQUEST_ID" + }, { "name": "Appcircle", "constant": "APPCIRCLE", @@ -104,6 +110,11 @@ "constant": "DSARI", "env": "DSARI" }, + { + "name": "Earthly", + "constant": "EARTHLY", + "env": "EARTHLY_CI" + }, { "name": "Expo Application Services", "constant": "EAS", @@ -114,6 +125,11 @@ "constant": "GERRIT", "env": "GERRIT_PROJECT" }, + { + "name": "Gitea Actions", + "constant": "GITEA_ACTIONS", + "env": "GITEA_ACTIONS" + }, { "name": "GitHub Actions", "constant": "GITHUB_ACTIONS", @@ -199,6 +215,11 @@ "ne": "false" } }, + { + "name": "Prow", + "constant": "PROW", + "env": "PROW_JOB_ID" + }, { "name": "ReleaseHub", "constant": "RELEASEHUB", @@ -233,20 +254,6 @@ "env": "SEMAPHORE", "pr": "PULL_REQUEST_NUMBER" }, - { - "name": "Shippable", - "constant": "SHIPPABLE", - "env": "SHIPPABLE", - "pr": { - "IS_PULL_REQUEST": "true" - } - }, - { - "name": "Solano CI", - "constant": "SOLANO", - "env": "TDDIUM", - "pr": "TDDIUM_PR_ID" - }, { "name": "Sourcehut", "constant": "SOURCEHUT", @@ -281,6 +288,14 @@ "ne": "false" } }, + { + "name": "Vela", + "constant": "VELA", + "env": "VELA", + "pr": { + "VELA_PULL_REQUEST": "1" + } + }, { "name": "Vercel", "constant": "VERCEL", diff --git a/deps/npm/node_modules/cidr-regex/index.js b/deps/npm/node_modules/cidr-regex/index.js index 0f12ee10b3c815..61597c62532aa8 100644 --- a/deps/npm/node_modules/cidr-regex/index.js +++ b/deps/npm/node_modules/cidr-regex/index.js @@ -1,18 +1,15 @@ -"use strict"; - -const ipRegex = require("ip-regex"); +import ipRegex from "ip-regex"; const defaultOpts = {exact: false}; - const v4str = `${ipRegex.v4().source}\\/(3[0-2]|[12]?[0-9])`; const v6str = `${ipRegex.v6().source}\\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])`; -// can not precompile the non-exact regexes because global flag makes the regex object stateful -// which would require the user to reset .lastIndex on subsequent calls +// pre-compile only the exact regexes as global flag makes regex objects stateful const v4exact = new RegExp(`^${v4str}$`); const v6exact = new RegExp(`^${v6str}$`); const v46exact = new RegExp(`(?:^${v4str}$)|(?:^${v6str}$)`); -module.exports = ({exact} = defaultOpts) => exact ? v46exact : new RegExp(`(?:${v4str})|(?:${v6str})`, "g"); -module.exports.v4 = ({exact} = defaultOpts) => exact ? v4exact : new RegExp(v4str, "g"); -module.exports.v6 = ({exact} = defaultOpts) => exact ? v6exact : new RegExp(v6str, "g"); +const cidrRegex = ({exact} = defaultOpts) => exact ? v46exact : new RegExp(`(?:${v4str})|(?:${v6str})`, "g"); +export const v4 = cidrRegex.v4 = ({exact} = defaultOpts) => exact ? v4exact : new RegExp(v4str, "g"); +export const v6 = cidrRegex.v6 = ({exact} = defaultOpts) => exact ? v6exact : new RegExp(v6str, "g"); +export default cidrRegex; diff --git a/deps/npm/node_modules/cidr-regex/package.json b/deps/npm/node_modules/cidr-regex/package.json index 8ddef4ed96a935..4f743464075e3e 100644 --- a/deps/npm/node_modules/cidr-regex/package.json +++ b/deps/npm/node_modules/cidr-regex/package.json @@ -1,6 +1,6 @@ { "name": "cidr-regex", - "version": "3.1.1", + "version": "4.0.3", "description": "Regular expression for matching IP addresses in CIDR notation", "author": "silverwind ", "contributors": [ @@ -8,35 +8,25 @@ ], "repository": "silverwind/cidr-regex", "license": "BSD-2-Clause", - "scripts": { - "test": "make test" - }, + "type": "module", + "exports": "./index.js", + "sideEffects": false, "engines": { - "node": ">=10" + "node": ">=14" }, "files": [ "index.js", "index.d.ts" ], - "keywords": [ - "cidr", - "regex", - "notation", - "cidr notation", - "prefix", - "prefixes", - "ip", - "ip address" - ], "dependencies": { - "ip-regex": "^4.1.0" + "ip-regex": "^5.0.0" }, "devDependencies": { - "eslint": "7.8.1", - "eslint-config-silverwind": "18.0.8", - "jest": "26.4.2", - "tsd": "0.13.1", - "updates": "10.3.6", - "versions": "8.4.3" + "eslint": "8.37.0", + "eslint-config-silverwind": "65.1.3", + "tsd": "0.28.1", + "updates": "13.2.9", + "versions": "10.4.2", + "vitest": "0.29.8" } } diff --git a/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js new file mode 100644 index 00000000000000..616ff837d3ff01 --- /dev/null +++ b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/license b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/license similarity index 92% rename from deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/license rename to deps/npm/node_modules/cli-columns/node_modules/ansi-regex/license index fa7ceba3eb4a96..e7af2f77107d73 100644 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/license +++ b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (https://sindresorhus.com) +Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/package.json b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json similarity index 75% rename from deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/package.json rename to deps/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json index 7bbb563bf2a70a..017f53116a9e28 100644 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/ansi-regex/package.json +++ b/deps/npm/node_modules/cli-columns/node_modules/ansi-regex/package.json @@ -1,19 +1,16 @@ { "name": "ansi-regex", - "version": "6.0.1", + "version": "5.0.1", "description": "Regular expression for matching ANSI escape codes", "license": "MIT", "repository": "chalk/ansi-regex", - "funding": "https://github.com/chalk/ansi-regex?sponsor=1", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" + "url": "sindresorhus.com" }, - "type": "module", - "exports": "./index.js", "engines": { - "node": ">=12" + "node": ">=8" }, "scripts": { "test": "xo && ava && tsd", @@ -51,8 +48,8 @@ "pattern" ], "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.14.0", - "xo": "^0.38.2" + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" } } diff --git a/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js new file mode 100644 index 00000000000000..9a593dfcd1fd5c --- /dev/null +++ b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/license b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/license similarity index 92% rename from deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/license rename to deps/npm/node_modules/cli-columns/node_modules/strip-ansi/license index fa7ceba3eb4a96..e7af2f77107d73 100644 --- a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/license +++ b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (https://sindresorhus.com) +Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/package.json b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json similarity index 71% rename from deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/package.json rename to deps/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json index e1f455c325b007..1a41108d42831c 100644 --- a/deps/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi/package.json +++ b/deps/npm/node_modules/cli-columns/node_modules/strip-ansi/package.json @@ -1,19 +1,16 @@ { "name": "strip-ansi", - "version": "7.1.0", + "version": "6.0.1", "description": "Strip ANSI escape codes from a string", "license": "MIT", "repository": "chalk/strip-ansi", - "funding": "https://github.com/chalk/strip-ansi?sponsor=1", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" + "url": "sindresorhus.com" }, - "type": "module", - "exports": "./index.js", "engines": { - "node": ">=12" + "node": ">=8" }, "scripts": { "test": "xo && ava && tsd" @@ -47,11 +44,11 @@ "text" ], "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^5.0.1" }, "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.17.0", - "xo": "^0.44.0" + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" } } diff --git a/deps/npm/node_modules/columnify/node_modules/ansi-regex/index.js b/deps/npm/node_modules/columnify/node_modules/ansi-regex/index.js new file mode 100644 index 00000000000000..616ff837d3ff01 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/license b/deps/npm/node_modules/columnify/node_modules/ansi-regex/license similarity index 92% rename from deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/license rename to deps/npm/node_modules/columnify/node_modules/ansi-regex/license index fa7ceba3eb4a96..e7af2f77107d73 100644 --- a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/license +++ b/deps/npm/node_modules/columnify/node_modules/ansi-regex/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (https://sindresorhus.com) +Copyright (c) Sindre Sorhus (sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/package.json b/deps/npm/node_modules/columnify/node_modules/ansi-regex/package.json similarity index 75% rename from deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/package.json rename to deps/npm/node_modules/columnify/node_modules/ansi-regex/package.json index 7bbb563bf2a70a..017f53116a9e28 100644 --- a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +++ b/deps/npm/node_modules/columnify/node_modules/ansi-regex/package.json @@ -1,19 +1,16 @@ { "name": "ansi-regex", - "version": "6.0.1", + "version": "5.0.1", "description": "Regular expression for matching ANSI escape codes", "license": "MIT", "repository": "chalk/ansi-regex", - "funding": "https://github.com/chalk/ansi-regex?sponsor=1", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" + "url": "sindresorhus.com" }, - "type": "module", - "exports": "./index.js", "engines": { - "node": ">=12" + "node": ">=8" }, "scripts": { "test": "xo && ava && tsd", @@ -51,8 +48,8 @@ "pattern" ], "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.14.0", - "xo": "^0.38.2" + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" } } diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js b/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js new file mode 100644 index 00000000000000..9a593dfcd1fd5c --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/deps/npm/node_modules/columnify/node_modules/strip-ansi/license b/deps/npm/node_modules/columnify/node_modules/strip-ansi/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/package.json b/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json similarity index 71% rename from deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/package.json rename to deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json index e1f455c325b007..1a41108d42831c 100644 --- a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/package.json +++ b/deps/npm/node_modules/columnify/node_modules/strip-ansi/package.json @@ -1,19 +1,16 @@ { "name": "strip-ansi", - "version": "7.1.0", + "version": "6.0.1", "description": "Strip ANSI escape codes from a string", "license": "MIT", "repository": "chalk/strip-ansi", - "funding": "https://github.com/chalk/strip-ansi?sponsor=1", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "https://sindresorhus.com" + "url": "sindresorhus.com" }, - "type": "module", - "exports": "./index.js", "engines": { - "node": ">=12" + "node": ">=8" }, "scripts": { "test": "xo && ava && tsd" @@ -47,11 +44,11 @@ "text" ], "dependencies": { - "ansi-regex": "^6.0.1" + "ansi-regex": "^5.0.1" }, "devDependencies": { - "ava": "^3.15.0", - "tsd": "^0.17.0", - "xo": "^0.44.0" + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" } } diff --git a/deps/npm/node_modules/function-bind/implementation.js b/deps/npm/node_modules/function-bind/implementation.js index cc4daec1b080a1..fd4384cc0c34ce 100644 --- a/deps/npm/node_modules/function-bind/implementation.js +++ b/deps/npm/node_modules/function-bind/implementation.js @@ -3,43 +3,75 @@ /* eslint no-invalid-this: 1 */ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; -var slice = Array.prototype.slice; var toStr = Object.prototype.toString; +var max = Math.max; var funcType = '[object Function]'; +var concatty = function concatty(a, b) { + var arr = []; + + for (var i = 0; i < a.length; i += 1) { + arr[i] = a[i]; + } + for (var j = 0; j < b.length; j += 1) { + arr[j + a.length] = b[j]; + } + + return arr; +}; + +var slicy = function slicy(arrLike, offset) { + var arr = []; + for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) { + arr[j] = arrLike[i]; + } + return arr; +}; + +var joiny = function (arr, joiner) { + var str = ''; + for (var i = 0; i < arr.length; i += 1) { + str += arr[i]; + if (i + 1 < arr.length) { + str += joiner; + } + } + return str; +}; + module.exports = function bind(that) { var target = this; - if (typeof target !== 'function' || toStr.call(target) !== funcType) { + if (typeof target !== 'function' || toStr.apply(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } - var args = slice.call(arguments, 1); + var args = slicy(arguments, 1); var bound; var binder = function () { if (this instanceof bound) { var result = target.apply( this, - args.concat(slice.call(arguments)) + concatty(args, arguments) ); if (Object(result) === result) { return result; } return this; - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); } + return target.apply( + that, + concatty(args, arguments) + ); + }; - var boundLength = Math.max(0, target.length - args.length); + var boundLength = max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { - boundArgs.push('$' + i); + boundArgs[i] = '$' + i; } - bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); + bound = Function('binder', 'return function (' + joiny(boundArgs, ',') + '){ return binder.apply(this,arguments); }')(binder); if (target.prototype) { var Empty = function Empty() {}; diff --git a/deps/npm/node_modules/function-bind/package.json b/deps/npm/node_modules/function-bind/package.json index 20a1727cbf8711..61859638977906 100644 --- a/deps/npm/node_modules/function-bind/package.json +++ b/deps/npm/node_modules/function-bind/package.json @@ -1,6 +1,6 @@ { "name": "function-bind", - "version": "1.1.1", + "version": "1.1.2", "description": "Implementation of Function.prototype.bind", "keywords": [ "function", @@ -9,7 +9,13 @@ "es5" ], "author": "Raynos ", - "repository": "git://github.com/Raynos/function-bind.git", + "repository": { + "type": "git", + "url": "https://github.com/Raynos/function-bind.git" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + }, "main": "index", "homepage": "https://github.com/Raynos/function-bind", "contributors": [ @@ -25,24 +31,29 @@ "url": "https://github.com/Raynos/function-bind/issues", "email": "raynos2@gmail.com" }, - "dependencies": {}, "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "covert": "^1.1.0", - "eslint": "^4.5.0", - "jscs": "^3.0.7", - "tape": "^4.8.0" + "@ljharb/eslint-config": "^21.1.0", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "in-publish": "^2.0.1", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.1" }, "license": "MIT", "scripts": { + "prepublishOnly": "safe-publish-latest", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepack": "npmignore --auto --commentLines=autogenerated", "pretest": "npm run lint", "test": "npm run tests-only", - "posttest": "npm run coverage -- --quiet", - "tests-only": "node test", - "coverage": "covert test/*.js", - "lint": "npm run jscs && npm run eslint", - "jscs": "jscs *.js */*.js", - "eslint": "eslint *.js */*.js" + "posttest": "aud --production", + "tests-only": "nyc tape 'test/**/*.js'", + "lint": "eslint --ext=js,mjs .", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" }, "testling": { "files": "test/index.js", @@ -59,5 +70,18 @@ "iphone/6.0..latest", "android-browser/4.2..latest" ] + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows" + ] } } diff --git a/deps/npm/node_modules/gauge/node_modules/ansi-regex/index.js b/deps/npm/node_modules/gauge/node_modules/ansi-regex/index.js new file mode 100644 index 00000000000000..616ff837d3ff01 --- /dev/null +++ b/deps/npm/node_modules/gauge/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/deps/npm/node_modules/gauge/node_modules/ansi-regex/license b/deps/npm/node_modules/gauge/node_modules/ansi-regex/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/gauge/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/gauge/node_modules/ansi-regex/package.json b/deps/npm/node_modules/gauge/node_modules/ansi-regex/package.json new file mode 100644 index 00000000000000..017f53116a9e28 --- /dev/null +++ b/deps/npm/node_modules/gauge/node_modules/ansi-regex/package.json @@ -0,0 +1,55 @@ +{ + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } +} diff --git a/deps/npm/node_modules/gauge/node_modules/strip-ansi/index.js b/deps/npm/node_modules/gauge/node_modules/strip-ansi/index.js new file mode 100644 index 00000000000000..9a593dfcd1fd5c --- /dev/null +++ b/deps/npm/node_modules/gauge/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/deps/npm/node_modules/gauge/node_modules/strip-ansi/license b/deps/npm/node_modules/gauge/node_modules/strip-ansi/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/gauge/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/gauge/node_modules/strip-ansi/package.json b/deps/npm/node_modules/gauge/node_modules/strip-ansi/package.json new file mode 100644 index 00000000000000..1a41108d42831c --- /dev/null +++ b/deps/npm/node_modules/gauge/node_modules/strip-ansi/package.json @@ -0,0 +1,54 @@ +{ + "name": "strip-ansi", + "version": "6.0.1", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + } +} diff --git a/deps/npm/node_modules/has/LICENSE-MIT b/deps/npm/node_modules/has/LICENSE-MIT deleted file mode 100644 index ae7014d385df3d..00000000000000 --- a/deps/npm/node_modules/has/LICENSE-MIT +++ /dev/null @@ -1,22 +0,0 @@ -Copyright (c) 2013 Thiago de Arruda - -Permission is hereby granted, free of charge, to any person -obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without -restriction, including without limitation the rights to use, -copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/has/package.json b/deps/npm/node_modules/has/package.json deleted file mode 100644 index 7c4592f16de071..00000000000000 --- a/deps/npm/node_modules/has/package.json +++ /dev/null @@ -1,48 +0,0 @@ -{ - "name": "has", - "description": "Object.prototype.hasOwnProperty.call shortcut", - "version": "1.0.3", - "homepage": "https://github.com/tarruda/has", - "author": { - "name": "Thiago de Arruda", - "email": "tpadilha84@gmail.com" - }, - "contributors": [ - { - "name": "Jordan Harband", - "email": "ljharb@gmail.com", - "url": "http://ljharb.codes" - } - ], - "repository": { - "type": "git", - "url": "git://github.com/tarruda/has.git" - }, - "bugs": { - "url": "https://github.com/tarruda/has/issues" - }, - "license": "MIT", - "licenses": [ - { - "type": "MIT", - "url": "https://github.com/tarruda/has/blob/master/LICENSE-MIT" - } - ], - "main": "./src", - "dependencies": { - "function-bind": "^1.1.1" - }, - "devDependencies": { - "@ljharb/eslint-config": "^12.2.1", - "eslint": "^4.19.1", - "tape": "^4.9.0" - }, - "engines": { - "node": ">= 0.4.0" - }, - "scripts": { - "lint": "eslint .", - "pretest": "npm run lint", - "test": "tape test" - } -} diff --git a/deps/npm/node_modules/has/src/index.js b/deps/npm/node_modules/has/src/index.js deleted file mode 100644 index dd92dd9094edb0..00000000000000 --- a/deps/npm/node_modules/has/src/index.js +++ /dev/null @@ -1,5 +0,0 @@ -'use strict'; - -var bind = require('function-bind'); - -module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); diff --git a/deps/npm/node_modules/has/test/index.js b/deps/npm/node_modules/has/test/index.js deleted file mode 100644 index 43d480b2c2e763..00000000000000 --- a/deps/npm/node_modules/has/test/index.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict'; - -var test = require('tape'); -var has = require('../'); - -test('has', function (t) { - t.equal(has({}, 'hasOwnProperty'), false, 'object literal does not have own property "hasOwnProperty"'); - t.equal(has(Object.prototype, 'hasOwnProperty'), true, 'Object.prototype has own property "hasOwnProperty"'); - t.end(); -}); diff --git a/deps/minimatch/src/node_modules/brace-expansion/LICENSE b/deps/npm/node_modules/hasown/LICENSE similarity index 94% rename from deps/minimatch/src/node_modules/brace-expansion/LICENSE rename to deps/npm/node_modules/hasown/LICENSE index de3226673c3874..0314929078de8a 100644 --- a/deps/minimatch/src/node_modules/brace-expansion/LICENSE +++ b/deps/npm/node_modules/hasown/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2013 Julian Gruber +Copyright (c) Jordan Harband and contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/deps/npm/node_modules/hasown/index.js b/deps/npm/node_modules/hasown/index.js new file mode 100644 index 00000000000000..3b91618323842f --- /dev/null +++ b/deps/npm/node_modules/hasown/index.js @@ -0,0 +1,8 @@ +'use strict'; + +var call = Function.prototype.call; +var $hasOwn = Object.prototype.hasOwnProperty; +var bind = require('function-bind'); + +/** @type {(o: {}, p: PropertyKey) => p is keyof o} */ +module.exports = bind.call(call, $hasOwn); diff --git a/deps/npm/node_modules/hasown/package.json b/deps/npm/node_modules/hasown/package.json new file mode 100644 index 00000000000000..954500640223c2 --- /dev/null +++ b/deps/npm/node_modules/hasown/package.json @@ -0,0 +1,91 @@ +{ + "name": "hasown", + "version": "2.0.0", + "description": "A robust, ES3 compatible, \"has own property\" predicate.", + "main": "index.js", + "exports": { + ".": "./index.js", + "./package.json": "./package.json" + }, + "scripts": { + "prepack": "npmignore --auto --commentLines=autogenerated && npm run emit-types", + "prepublish": "not-in-publish || npm run prepublishOnly", + "prepublishOnly": "safe-publish-latest", + "prelint": "evalmd README.md", + "lint": "eslint --ext=js,mjs .", + "postlint": "npm run tsc", + "preemit-types": "rm -f *.ts *.ts.map test/*.ts test/*.ts.map", + "emit-types": "npm run tsc -- --noEmit false --emitDeclarationOnly", + "pretest": "npm run lint", + "tsc": "tsc -p .", + "tests-only": "nyc tape 'test/**/*.js'", + "test": "npm run tests-only", + "posttest": "aud --production", + "version": "auto-changelog && git add CHANGELOG.md", + "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/inspect-js/hasOwn.git" + }, + "keywords": [ + "has", + "hasOwnProperty", + "hasOwn", + "has-own", + "own", + "has", + "property", + "in", + "javascript", + "ecmascript" + ], + "author": "Jordan Harband ", + "license": "MIT", + "bugs": { + "url": "https://github.com/inspect-js/hasOwn/issues" + }, + "homepage": "https://github.com/inspect-js/hasOwn#readme", + "dependencies": { + "function-bind": "^1.1.2" + }, + "devDependencies": { + "@ljharb/eslint-config": "^21.1.0", + "@types/function-bind": "^1.1.9", + "@types/mock-property": "^1.0.1", + "@types/tape": "^5.6.3", + "aud": "^2.0.3", + "auto-changelog": "^2.4.0", + "eslint": "=8.8.0", + "evalmd": "^0.0.19", + "in-publish": "^2.0.1", + "mock-property": "^1.0.2", + "npmignore": "^0.3.0", + "nyc": "^10.3.2", + "safe-publish-latest": "^2.0.0", + "tape": "^5.7.1", + "typescript": "^5.3.0-dev.20231019" + }, + "engines": { + "node": ">= 0.4" + }, + "testling": { + "files": "test/index.js" + }, + "auto-changelog": { + "output": "CHANGELOG.md", + "template": "keepachangelog", + "unreleased": false, + "commitLimit": false, + "backfillLimit": false, + "hideCredit": true + }, + "publishConfig": { + "ignore": [ + ".github/workflows", + "test", + "!*.d.ts", + "!*.d.ts.map" + ] + } +} diff --git a/deps/npm/node_modules/hasown/tsconfig.json b/deps/npm/node_modules/hasown/tsconfig.json new file mode 100644 index 00000000000000..fdab34fe311577 --- /dev/null +++ b/deps/npm/node_modules/hasown/tsconfig.json @@ -0,0 +1,49 @@ +{ + "compilerOptions": { + /* Visit https://aka.ms/tsconfig to read more about this file */ + + /* Projects */ + + /* Language and Environment */ + "target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */ + // "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */ + // "noLib": true, /* Disable including any library files, including the default lib.d.ts. */ + "useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */ + // "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */ + + /* Modules */ + "module": "commonjs", /* Specify what module code is generated. */ + // "rootDir": "./", /* Specify the root folder within your source files. */ + // "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */ + // "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */ + // "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */ + // "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */ + "typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */ + "resolveJsonModule": true, /* Enable importing .json files. */ + // "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */ + + /* JavaScript Support */ + "allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */ + "checkJs": true, /* Enable error reporting in type-checked JavaScript files. */ + "maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */ + + /* Emit */ + "declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */ + "declarationMap": true, /* Create sourcemaps for d.ts files. */ + "noEmit": true, /* Disable emitting files from a compilation. */ + + /* Interop Constraints */ + "allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */ + "esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */ + "forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */ + + /* Type Checking */ + "strict": true, /* Enable all strict type-checking options. */ + + /* Completeness */ + //"skipLibCheck": true /* Skip type checking all .d.ts files. */ + }, + "exclude": [ + "coverage" + ] +} diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/http-proxy-agent/LICENSE b/deps/npm/node_modules/http-proxy-agent/LICENSE similarity index 100% rename from deps/npm/node_modules/@npmcli/agent/node_modules/http-proxy-agent/LICENSE rename to deps/npm/node_modules/http-proxy-agent/LICENSE diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/http-proxy-agent/dist/index.js b/deps/npm/node_modules/http-proxy-agent/dist/index.js similarity index 100% rename from deps/npm/node_modules/@npmcli/agent/node_modules/http-proxy-agent/dist/index.js rename to deps/npm/node_modules/http-proxy-agent/dist/index.js diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/http-proxy-agent/package.json b/deps/npm/node_modules/http-proxy-agent/package.json similarity index 100% rename from deps/npm/node_modules/@npmcli/agent/node_modules/http-proxy-agent/package.json rename to deps/npm/node_modules/http-proxy-agent/package.json diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/index.js b/deps/npm/node_modules/https-proxy-agent/dist/index.js similarity index 100% rename from deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/index.js rename to deps/npm/node_modules/https-proxy-agent/dist/index.js diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js b/deps/npm/node_modules/https-proxy-agent/dist/parse-proxy-response.js similarity index 100% rename from deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/dist/parse-proxy-response.js rename to deps/npm/node_modules/https-proxy-agent/dist/parse-proxy-response.js diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/package.json b/deps/npm/node_modules/https-proxy-agent/package.json similarity index 100% rename from deps/npm/node_modules/@npmcli/agent/node_modules/https-proxy-agent/package.json rename to deps/npm/node_modules/https-proxy-agent/package.json diff --git a/deps/npm/node_modules/ip-regex/index.js b/deps/npm/node_modules/ip-regex/index.js index ab7a37f1caf0e3..1fe723cb7f5a9f 100644 --- a/deps/npm/node_modules/ip-regex/index.js +++ b/deps/npm/node_modules/ip-regex/index.js @@ -1,23 +1,23 @@ -'use strict'; - const word = '[a-fA-F\\d:]'; -const b = options => options && options.includeBoundaries ? - `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` : - ''; + +const boundry = options => options && options.includeBoundaries + ? `(?:(?<=\\s|^)(?=${word})|(?<=${word})(?=\\s|$))` + : ''; const v4 = '(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}'; -const v6seg = '[a-fA-F\\d]{1,4}'; +const v6segment = '[a-fA-F\\d]{1,4}'; + const v6 = ` (?: -(?:${v6seg}:){7}(?:${v6seg}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 -(?:${v6seg}:){6}(?:${v4}|:${v6seg}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 -(?:${v6seg}:){5}(?::${v4}|(?::${v6seg}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 -(?:${v6seg}:){4}(?:(?::${v6seg}){0,1}:${v4}|(?::${v6seg}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 -(?:${v6seg}:){3}(?:(?::${v6seg}){0,2}:${v4}|(?::${v6seg}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 -(?:${v6seg}:){2}(?:(?::${v6seg}){0,3}:${v4}|(?::${v6seg}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 -(?:${v6seg}:){1}(?:(?::${v6seg}){0,4}:${v4}|(?::${v6seg}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 -(?::(?:(?::${v6seg}){0,5}:${v4}|(?::${v6seg}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 +(?:${v6segment}:){7}(?:${v6segment}|:)| // 1:2:3:4:5:6:7:: 1:2:3:4:5:6:7:8 +(?:${v6segment}:){6}(?:${v4}|:${v6segment}|:)| // 1:2:3:4:5:6:: 1:2:3:4:5:6::8 1:2:3:4:5:6::8 1:2:3:4:5:6::1.2.3.4 +(?:${v6segment}:){5}(?::${v4}|(?::${v6segment}){1,2}|:)| // 1:2:3:4:5:: 1:2:3:4:5::7:8 1:2:3:4:5::8 1:2:3:4:5::7:1.2.3.4 +(?:${v6segment}:){4}(?:(?::${v6segment}){0,1}:${v4}|(?::${v6segment}){1,3}|:)| // 1:2:3:4:: 1:2:3:4::6:7:8 1:2:3:4::8 1:2:3:4::6:7:1.2.3.4 +(?:${v6segment}:){3}(?:(?::${v6segment}){0,2}:${v4}|(?::${v6segment}){1,4}|:)| // 1:2:3:: 1:2:3::5:6:7:8 1:2:3::8 1:2:3::5:6:7:1.2.3.4 +(?:${v6segment}:){2}(?:(?::${v6segment}){0,3}:${v4}|(?::${v6segment}){1,5}|:)| // 1:2:: 1:2::4:5:6:7:8 1:2::8 1:2::4:5:6:7:1.2.3.4 +(?:${v6segment}:){1}(?:(?::${v6segment}){0,4}:${v4}|(?::${v6segment}){1,6}|:)| // 1:: 1::3:4:5:6:7:8 1::8 1::3:4:5:6:7:1.2.3.4 +(?::(?:(?::${v6segment}){0,5}:${v4}|(?::${v6segment}){1,7}|:)) // ::2:3:4:5:6:7:8 ::2:3:4:5:6:7:8 ::8 ::1.2.3.4 )(?:%[0-9a-zA-Z]{1,})? // %eth0 %1 `.replace(/\s*\/\/.*$/gm, '').replace(/\n/g, '').trim(); @@ -26,11 +26,11 @@ const v46Exact = new RegExp(`(?:^${v4}$)|(?:^${v6}$)`); const v4exact = new RegExp(`^${v4}$`); const v6exact = new RegExp(`^${v6}$`); -const ip = options => options && options.exact ? - v46Exact : - new RegExp(`(?:${b(options)}${v4}${b(options)})|(?:${b(options)}${v6}${b(options)})`, 'g'); +const ipRegex = options => options && options.exact + ? v46Exact + : new RegExp(`(?:${boundry(options)}${v4}${boundry(options)})|(?:${boundry(options)}${v6}${boundry(options)})`, 'g'); -ip.v4 = options => options && options.exact ? v4exact : new RegExp(`${b(options)}${v4}${b(options)}`, 'g'); -ip.v6 = options => options && options.exact ? v6exact : new RegExp(`${b(options)}${v6}${b(options)}`, 'g'); +ipRegex.v4 = options => options && options.exact ? v4exact : new RegExp(`${boundry(options)}${v4}${boundry(options)}`, 'g'); +ipRegex.v6 = options => options && options.exact ? v6exact : new RegExp(`${boundry(options)}${v6}${boundry(options)}`, 'g'); -module.exports = ip; +export default ipRegex; diff --git a/deps/npm/node_modules/ip-regex/license b/deps/npm/node_modules/ip-regex/license index e7af2f77107d73..fa7ceba3eb4a96 100644 --- a/deps/npm/node_modules/ip-regex/license +++ b/deps/npm/node_modules/ip-regex/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Sindre Sorhus (https://sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/deps/npm/node_modules/ip-regex/package.json b/deps/npm/node_modules/ip-regex/package.json index 2fb8a03c812a09..1f82fd5947262b 100644 --- a/deps/npm/node_modules/ip-regex/package.json +++ b/deps/npm/node_modules/ip-regex/package.json @@ -1,16 +1,19 @@ { "name": "ip-regex", - "version": "4.3.0", + "version": "5.0.0", "description": "Regular expression for matching IP addresses (IPv4 & IPv6)", "license": "MIT", "repository": "sindresorhus/ip-regex", + "funding": "https://github.com/sponsors/sindresorhus", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", "url": "sindresorhus.com" }, + "type": "module", + "exports": "./index.js", "engines": { - "node": ">=8" + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" }, "scripts": { "test": "xo && ava && tsd" @@ -37,8 +40,8 @@ "validate" ], "devDependencies": { - "ava": "^1.4.1", - "tsd": "^0.7.2", - "xo": "^0.24.0" + "ava": "^3.15.0", + "tsd": "^0.19.1", + "xo": "^0.47.0" } } diff --git a/deps/npm/node_modules/is-cidr/index.js b/deps/npm/node_modules/is-cidr/index.js index 8caef5fbb72a38..ed7f152c1163e7 100644 --- a/deps/npm/node_modules/is-cidr/index.js +++ b/deps/npm/node_modules/is-cidr/index.js @@ -1,9 +1,9 @@ -"use strict"; -const {v4, v6} = require("cidr-regex"); +import {v4 as v4Re, v6 as v6Re} from "cidr-regex"; -const re4 = v4({exact: true}); -const re6 = v6({exact: true}); +const re4 = v4Re({exact: true}); +const re6 = v6Re({exact: true}); -module.exports = str => re4.test(str) ? 4 : (re6.test(str) ? 6 : 0); -module.exports.v4 = str => re4.test(str); -module.exports.v6 = str => re6.test(str); +const isCidr = str => re4.test(str) ? 4 : (re6.test(str) ? 6 : 0); +export const v4 = isCidr.v4 = str => re4.test(str); +export const v6 = isCidr.v6 = str => re6.test(str); +export default isCidr; diff --git a/deps/npm/node_modules/is-cidr/package.json b/deps/npm/node_modules/is-cidr/package.json index b02775a0e3f6f8..d6971b3b33bd83 100644 --- a/deps/npm/node_modules/is-cidr/package.json +++ b/deps/npm/node_modules/is-cidr/package.json @@ -1,6 +1,6 @@ { "name": "is-cidr", - "version": "4.0.2", + "version": "5.0.3", "description": "Check if a string is an IP address in CIDR notation", "author": "silverwind ", "contributors": [ @@ -8,39 +8,25 @@ ], "repository": "silverwind/is-cidr", "license": "BSD-2-Clause", - "scripts": { - "test": "make test" - }, + "type": "module", + "exports": "./index.js", + "sideEffects": false, "engines": { - "node": ">=10" + "node": ">=14" }, "files": [ "index.js", "index.d.ts" ], - "keywords": [ - "cidr", - "regex", - "notation", - "cidr notation", - "prefix", - "prefixes", - "ip", - "ip address", - "network" - ], "dependencies": { - "cidr-regex": "^3.1.1" + "cidr-regex": "4.0.3" }, "devDependencies": { - "eslint": "7.10.0", - "eslint-config-silverwind": "18.0.10", - "jest": "26.4.2", - "updates": "11.1.5", - "versions": "8.4.3" - }, - "jest": { - "verbose": false, - "testTimeout": 10000 + "eslint": "8.37.0", + "eslint-config-silverwind": "65.1.3", + "tsd": "0.28.1", + "updates": "13.2.9", + "versions": "10.4.2", + "vitest": "0.29.8" } } diff --git a/deps/npm/node_modules/is-core-module/index.js b/deps/npm/node_modules/is-core-module/index.js index f9637e0e7d3ffe..423e20c0d99db5 100644 --- a/deps/npm/node_modules/is-core-module/index.js +++ b/deps/npm/node_modules/is-core-module/index.js @@ -1,6 +1,6 @@ 'use strict'; -var has = require('has'); +var hasOwn = require('hasown'); function specifierIncluded(current, specifier) { var nodeParts = current.split('.'); @@ -65,5 +65,5 @@ function versionIncluded(nodeVersion, specifierValue) { var data = require('./core.json'); module.exports = function isCore(x, nodeVersion) { - return has(data, x) && versionIncluded(nodeVersion, data[x]); + return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]); }; diff --git a/deps/npm/node_modules/is-core-module/package.json b/deps/npm/node_modules/is-core-module/package.json index 1269c80c5520d8..1bac5851fd637f 100644 --- a/deps/npm/node_modules/is-core-module/package.json +++ b/deps/npm/node_modules/is-core-module/package.json @@ -1,6 +1,6 @@ { "name": "is-core-module", - "version": "2.13.0", + "version": "2.13.1", "description": "Is this specifier a node.js core module?", "main": "index.js", "sideEffects": false, @@ -42,7 +42,7 @@ }, "homepage": "https://github.com/inspect-js/is-core-module", "dependencies": { - "has": "^1.0.3" + "hasown": "^2.0.0" }, "devDependencies": { "@ljharb/eslint-config": "^21.1.0", @@ -50,12 +50,12 @@ "auto-changelog": "^2.4.0", "eslint": "=8.8.0", "in-publish": "^2.0.1", - "mock-property": "^1.0.0", + "mock-property": "^1.0.2", "npmignore": "^0.3.0", "nyc": "^10.3.2", "safe-publish-latest": "^2.0.0", "semver": "^6.3.1", - "tape": "^5.6.6" + "tape": "^5.7.1" }, "auto-changelog": { "output": "CHANGELOG.md", diff --git a/deps/npm/node_modules/libnpmexec/package.json b/deps/npm/node_modules/libnpmexec/package.json index 5e4ae52a2fdddf..31e6c7386b1117 100644 --- a/deps/npm/node_modules/libnpmexec/package.json +++ b/deps/npm/node_modules/libnpmexec/package.json @@ -1,6 +1,6 @@ { "name": "libnpmexec", - "version": "7.0.3", + "version": "7.0.4", "files": [ "bin/", "lib/" @@ -61,7 +61,7 @@ "dependencies": { "@npmcli/arborist": "^7.2.1", "@npmcli/run-script": "^7.0.2", - "ci-info": "^3.7.1", + "ci-info": "^4.0.0", "npm-package-arg": "^11.0.1", "npmlog": "^7.0.1", "pacote": "^17.0.4", diff --git a/deps/npm/node_modules/libnpmpublish/lib/provenance.js b/deps/npm/node_modules/libnpmpublish/lib/provenance.js index 45fe963d5f36f2..090d4cd7fe561c 100644 --- a/deps/npm/node_modules/libnpmpublish/lib/provenance.js +++ b/deps/npm/node_modules/libnpmpublish/lib/provenance.js @@ -19,9 +19,11 @@ const generateProvenance = async (subject, opts) => { let payload if (ci.GITHUB_ACTIONS) { /* istanbul ignore next - not covering missing env var case */ - const [workflowPath, workflowRef] = (env.GITHUB_WORKFLOW_REF || '') - .replace(env.GITHUB_REPOSITORY + '/', '') - .split('@') + const relativeRef = (env.GITHUB_WORKFLOW_REF || '').replace(env.GITHUB_REPOSITORY + '/', '') + const delimiterIndex = relativeRef.indexOf('@') + const workflowPath = relativeRef.slice(0, delimiterIndex) + const workflowRef = relativeRef.slice(delimiterIndex + 1) + payload = { _type: INTOTO_STATEMENT_V1_TYPE, subject, diff --git a/deps/npm/node_modules/libnpmpublish/package.json b/deps/npm/node_modules/libnpmpublish/package.json index f5081a05188660..3d08280870ac72 100644 --- a/deps/npm/node_modules/libnpmpublish/package.json +++ b/deps/npm/node_modules/libnpmpublish/package.json @@ -1,6 +1,6 @@ { "name": "libnpmpublish", - "version": "9.0.1", + "version": "9.0.2", "description": "Programmatic API for the bits behind npm publish and unpublish", "author": "GitHub Inc.", "main": "lib/index.js", @@ -38,7 +38,7 @@ "bugs": "https://github.com/npm/cli/issues", "homepage": "https://npmjs.com/package/libnpmpublish", "dependencies": { - "ci-info": "^3.6.1", + "ci-info": "^4.0.0", "normalize-package-data": "^6.0.0", "npm-package-arg": "^11.0.1", "npm-registry-fetch": "^16.0.0", diff --git a/deps/npm/node_modules/lru-cache/dist/cjs/index.min.js b/deps/npm/node_modules/lru-cache/dist/cjs/index.min.js deleted file mode 100644 index 8d34a03041d25e..00000000000000 --- a/deps/npm/node_modules/lru-cache/dist/cjs/index.min.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict";var x=(o,t,e)=>{if(!t.has(o))throw TypeError("Cannot "+e)};var j=(o,t,e)=>(x(o,t,"read from private field"),e?e.call(o):t.get(o)),I=(o,t,e)=>{if(t.has(o))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(o):t.set(o,e)},D=(o,t,e,i)=>(x(o,t,"write to private field"),i?i.call(o,e):t.set(o,e),e);Object.defineProperty(exports,"__esModule",{value:!0});exports.LRUCache=void 0;var v=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,N=new Set,L=typeof process=="object"&&process?process:{},P=(o,t,e,i)=>{typeof L.emitWarning=="function"?L.emitWarning(o,t,e,i):console.error(`[${e}] ${t}: ${o}`)},W=globalThis.AbortController,M=globalThis.AbortSignal;if(typeof W>"u"){M=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},W=class{constructor(){t()}signal=new M;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let o=L.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{o&&(o=!1,P("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var V=o=>!N.has(o),Y=Symbol("type"),m=o=>o&&o===Math.floor(o)&&o>0&&isFinite(o),H=o=>m(o)?o<=Math.pow(2,8)?Uint8Array:o<=Math.pow(2,16)?Uint16Array:o<=Math.pow(2,32)?Uint32Array:o<=Number.MAX_SAFE_INTEGER?z:null:null,z=class extends Array{constructor(t){super(t),this.fill(0)}},E,T=class{heap;length;static create(t){let e=H(t);if(!e)return[];D(T,E,!0);let i=new T(t,e);return D(T,E,!1),i}constructor(t,e){if(!j(T,E))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},R=T;E=new WeakMap,I(R,E,!1);var C=class{#d;#f;#g;#p;#C;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#w;#n;#i;#t;#l;#c;#o;#h;#S;#r;#m;#F;#_;#b;#T;#a;static unsafeExposeInternals(t){return{starts:t.#F,ttls:t.#_,sizes:t.#m,keyMap:t.#n,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#c,get head(){return t.#o},get tail(){return t.#h},free:t.#S,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#D(e,i,s,n),moveToTail:e=>t.#v(e),indexes:e=>t.#y(e),rindexes:e=>t.#A(e),isStale:e=>t.#u(e)}}get max(){return this.#d}get maxSize(){return this.#f}get calculatedSize(){return this.#w}get size(){return this.#s}get fetchMethod(){return this.#C}get dispose(){return this.#g}get disposeAfter(){return this.#p}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:a,allowStale:r,dispose:g,disposeAfter:b,noDisposeOnSet:f,noUpdateTTL:u,maxSize:c=0,maxEntrySize:F=0,sizeCalculation:d,fetchMethod:S,noDeleteOnFetchRejection:l,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:p,ignoreFetchAbort:_}=t;if(e!==0&&!m(e))throw new TypeError("max option must be a nonnegative integer");let O=e?H(e):Array;if(!O)throw new Error("invalid max value: "+e);if(this.#d=e,this.#f=c,this.maxEntrySize=F||this.#f,this.sizeCalculation=d,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#C=S,this.#T=!!S,this.#n=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new O(e),this.#c=new O(e),this.#o=0,this.#h=0,this.#S=R.create(e),this.#s=0,this.#w=0,typeof g=="function"&&(this.#g=g),typeof b=="function"?(this.#p=b,this.#r=[]):(this.#p=void 0,this.#r=void 0),this.#b=!!this.#g,this.#a=!!this.#p,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!l,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!p,this.ignoreFetchAbort=!!_,this.maxEntrySize!==0){if(this.#f!==0&&!m(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!m(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#I()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!a,this.ttlResolution=m(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!m(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#d===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#d&&!this.#f){let A="LRU_CACHE_UNBOUNDED";V(A)&&(N.add(A),P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",A,C))}}getRemainingTTL(t){return this.#n.has(t)?1/0:0}#L(){let t=new z(this.#d),e=new z(this.#d);this.#_=t,this.#F=e,this.#U=(n,h,a=v.now())=>{if(e[n]=h!==0?a:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#u(n)&&this.delete(this.#i[n])},h+1);r.unref&&r.unref()}},this.#z=n=>{e[n]=t[n]!==0?v.now():0},this.#O=(n,h)=>{if(t[h]){let a=t[h],r=e[h];n.ttl=a,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=a-g}};let i=0,s=()=>{let n=v.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return n};this.getRemainingTTL=n=>{let h=this.#n.get(n);if(h===void 0)return 0;let a=t[h],r=e[h];if(a===0||r===0)return 1/0;let g=(i||s())-r;return a-g},this.#u=n=>t[n]!==0&&e[n]!==0&&(i||s())-e[n]>t[n]}#z=()=>{};#O=()=>{};#U=()=>{};#u=()=>!1;#I(){let t=new z(this.#d);this.#w=0,this.#m=t,this.#E=e=>{this.#w-=t[e],t[e]=0},this.#G=(e,i,s,n)=>{if(this.#e(i))return 0;if(!m(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!m(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#R=(e,i,s)=>{if(t[e]=i,this.#f){let n=this.#f-t[e];for(;this.#w>n;)this.#W(!0)}this.#w+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#w)}}#E=t=>{};#R=(t,e,i)=>{};#G=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#y({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#h;!(!this.#x(e)||((t||!this.#u(e))&&(yield e),e===this.#o));)e=this.#c[e]}*#A({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#o;!(!this.#x(e)||((t||!this.#u(e))&&(yield e),e===this.#h));)e=this.#l[e]}#x(t){return t!==void 0&&this.#n.get(this.#i[t])===t}*entries(){for(let t of this.#y())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#y()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#y())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}find(t,e={}){for(let i of this.#y()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#y()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#A({allowStale:!0}))this.#u(e)&&(this.delete(this.#i[e]),t=!0);return t}dump(){let t=[];for(let e of this.#y({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#_&&this.#F){h.ttl=this.#_[e];let a=v.now()-this.#F[e];h.start=Math.floor(Date.now()-a)}this.#m&&(h.size=this.#m[e]),t.unshift([i,h])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=v.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,b=this.#G(t,e,i.size||0,a);if(this.maxEntrySize&&b>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.delete(t),this;let f=this.#s===0?void 0:this.#n.get(t);if(f===void 0)f=this.#s===0?this.#h:this.#S.length!==0?this.#S.pop():this.#s===this.#d?this.#W(!1):this.#s,this.#i[f]=t,this.#t[f]=e,this.#n.set(t,f),this.#l[this.#h]=f,this.#c[f]=this.#h,this.#h=f,this.#s++,this.#R(f,b,r),r&&(r.set="add"),g=!1;else{this.#v(f);let u=this.#t[f];if(e!==u){if(this.#T&&this.#e(u)){u.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:c}=u;c!==void 0&&!h&&(this.#b&&this.#g?.(c,t,"set"),this.#a&&this.#r?.push([c,t,"set"]))}else h||(this.#b&&this.#g?.(u,t,"set"),this.#a&&this.#r?.push([u,t,"set"]));if(this.#E(f),this.#R(f,b,r),this.#t[f]=e,r){r.set="replace";let c=u&&this.#e(u)?u.__staleWhileFetching:u;c!==void 0&&(r.oldValue=c)}}else r&&(r.set="update")}if(s!==0&&!this.#_&&this.#L(),this.#_&&(g||this.#U(f,s,n),r&&this.#O(r,f)),!h&&this.#a&&this.#r){let u=this.#r,c;for(;c=u?.shift();)this.#p?.(...c)}return this}pop(){try{for(;this.#s;){let t=this.#t[this.#o];if(this.#W(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#p?.(...e)}}}#W(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#T&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#b||this.#a)&&(this.#b&&this.#g?.(s,i,"evict"),this.#a&&this.#r?.push([s,i,"evict"])),this.#E(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#S.push(e)),this.#s===1?(this.#o=this.#h=0,this.#S.length=0):this.#o=this.#l[e],this.#n.delete(i),this.#s--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#n.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#u(n))s&&(s.has="stale",this.#O(s,n));else return i&&this.#z(n),s&&(s.has="hit",this.#O(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#n.get(t);if(s!==void 0&&(i||!this.#u(s))){let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}}#D(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new W,{signal:a}=i;a?.addEventListener("abort",()=>h.abort(a.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,S=!1)=>{let{aborted:l}=h.signal,w=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(l&&!S?(i.status.fetchAborted=!0,i.status.fetchError=h.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),l&&!w&&!S)return f(h.signal.reason);let y=c;return this.#t[e]===c&&(d===void 0?y.__staleWhileFetching?this.#t[e]=y.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,d,r.options))),d},b=d=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=d),f(d)),f=d=>{let{aborted:S}=h.signal,l=S&&i.allowStaleOnFetchAbort,w=l||i.allowStaleOnFetchRejection,y=w||i.noDeleteOnFetchRejection,p=c;if(this.#t[e]===c&&(!y||p.__staleWhileFetching===void 0?this.delete(t):l||(this.#t[e]=p.__staleWhileFetching)),w)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw d},u=(d,S)=>{let l=this.#C?.(t,n,r);l&&l instanceof Promise&&l.then(w=>d(w===void 0?void 0:w),S),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=w=>g(w,!0)))})};i.status&&(i.status.fetchDispatched=!0);let c=new Promise(u).then(g,b),F=Object.assign(c,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,F,{...r.options,status:void 0}),e=this.#n.get(t)):this.#t[e]=F,F}#e(t){if(!this.#T)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof W}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:d,forceRefresh:S=!1,status:l,signal:w}=e;if(!this.#T)return l&&(l.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:l});let y={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:a,size:r,sizeCalculation:g,noUpdateTTL:b,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:F,ignoreFetchAbort:c,status:l,signal:w},p=this.#n.get(t);if(p===void 0){l&&(l.fetch="miss");let _=this.#D(t,p,y,d);return _.__returned=_}else{let _=this.#t[p];if(this.#e(_)){let G=i&&_.__staleWhileFetching!==void 0;return l&&(l.fetch="inflight",G&&(l.returnedStale=!0)),G?_.__staleWhileFetching:_.__returned=_}let O=this.#u(p);if(!S&&!O)return l&&(l.fetch="hit"),this.#v(p),s&&this.#z(p),l&&this.#O(l,p),_;let A=this.#D(t,p,y,d),U=A.__staleWhileFetching!==void 0&&i;return l&&(l.fetch=O?"stale":"refresh",U&&O&&(l.returnedStale=!0)),U?A.__staleWhileFetching:A.__returned=A}}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,a=this.#n.get(t);if(a!==void 0){let r=this.#t[a],g=this.#e(r);return h&&this.#O(h,a),this.#u(a)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=!0),i?r.__staleWhileFetching:void 0):(n||this.delete(t),h&&i&&(h.returnedStale=!0),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#v(a),s&&this.#z(a),r))}else h&&(h.get="miss")}#j(t,e){this.#c[e]=t,this.#l[t]=e}#v(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#j(this.#c[t],this.#l[t]),this.#j(this.#h,t),this.#h=t)}delete(t){let e=!1;if(this.#s!==0){let i=this.#n.get(t);if(i!==void 0)if(e=!0,this.#s===1)this.clear();else{this.#E(i);let s=this.#t[i];this.#e(s)?s.__abortController.abort(new Error("deleted")):(this.#b||this.#a)&&(this.#b&&this.#g?.(s,t,"delete"),this.#a&&this.#r?.push([s,t,"delete"])),this.#n.delete(t),this.#i[i]=void 0,this.#t[i]=void 0,i===this.#h?this.#h=this.#c[i]:i===this.#o?this.#o=this.#l[i]:(this.#l[this.#c[i]]=this.#l[i],this.#c[this.#l[i]]=this.#c[i]),this.#s--,this.#S.push(i)}}if(this.#a&&this.#r?.length){let i=this.#r,s;for(;s=i?.shift();)this.#p?.(...s)}return e}clear(){for(let t of this.#A({allowStale:!0})){let e=this.#t[t];if(this.#e(e))e.__abortController.abort(new Error("deleted"));else{let i=this.#i[t];this.#b&&this.#g?.(e,i,"delete"),this.#a&&this.#r?.push([e,i,"delete"])}}if(this.#n.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#_&&this.#F&&(this.#_.fill(0),this.#F.fill(0)),this.#m&&this.#m.fill(0),this.#o=0,this.#h=0,this.#S.length=0,this.#w=0,this.#s=0,this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#p?.(...e)}}};exports.LRUCache=C; -//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/lru-cache/dist/cjs/index.js b/deps/npm/node_modules/lru-cache/dist/commonjs/index.js similarity index 98% rename from deps/npm/node_modules/lru-cache/dist/cjs/index.js rename to deps/npm/node_modules/lru-cache/dist/commonjs/index.js index 1d1f23a55ec4b4..3fec15958a5349 100644 --- a/deps/npm/node_modules/lru-cache/dist/cjs/index.js +++ b/deps/npm/node_modules/lru-cache/dist/commonjs/index.js @@ -435,6 +435,9 @@ class LRUCache { if (ttls[index]) { const ttl = ttls[index]; const start = starts[index]; + /* c8 ignore next */ + if (!ttl || !start) + return; status.ttl = ttl; status.start = start; status.now = cachedNow || getNow(); @@ -466,16 +469,16 @@ class LRUCache { } const ttl = ttls[index]; const start = starts[index]; - if (ttl === 0 || start === 0) { + if (!ttl || !start) { return Infinity; } const age = (cachedNow || getNow()) - start; return ttl - age; }; this.#isStale = index => { - return (ttls[index] !== 0 && - starts[index] !== 0 && - (cachedNow || getNow()) - starts[index] > ttls[index]); + const s = starts[index]; + const t = ttls[index]; + return !!t && !!s && (cachedNow || getNow()) - s > t; }; } // conditionally set private methods related to TTL @@ -999,12 +1002,13 @@ class LRUCache { peek(k, peekOptions = {}) { const { allowStale = this.allowStale } = peekOptions; const index = this.#keyMap.get(k); - if (index !== undefined && - (allowStale || !this.#isStale(index))) { - const v = this.#valList[index]; - // either stale and allowed, or forcing a refresh of non-stale value - return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + if (index === undefined || + (!allowStale && this.#isStale(index))) { + return; } + const v = this.#valList[index]; + // either stale and allowed, or forcing a refresh of non-stale value + return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; } #backgroundFetch(k, index, options, context) { const v = index === undefined ? undefined : this.#valList[index]; @@ -1340,8 +1344,10 @@ class LRUCache { this.#head = this.#next[index]; } else { - this.#next[this.#prev[index]] = this.#next[index]; - this.#prev[this.#next[index]] = this.#prev[index]; + const pi = this.#prev[index]; + this.#next[pi] = this.#next[index]; + const ni = this.#next[index]; + this.#prev[ni] = this.#prev[index]; } this.#size--; this.#free.push(index); diff --git a/deps/npm/node_modules/lru-cache/dist/cjs/package.json b/deps/npm/node_modules/lru-cache/dist/commonjs/package.json similarity index 100% rename from deps/npm/node_modules/lru-cache/dist/cjs/package.json rename to deps/npm/node_modules/lru-cache/dist/commonjs/package.json diff --git a/deps/npm/node_modules/lru-cache/dist/mjs/index.js b/deps/npm/node_modules/lru-cache/dist/esm/index.js similarity index 98% rename from deps/npm/node_modules/lru-cache/dist/mjs/index.js rename to deps/npm/node_modules/lru-cache/dist/esm/index.js index 79025471782531..3c34d3de6c53cc 100644 --- a/deps/npm/node_modules/lru-cache/dist/mjs/index.js +++ b/deps/npm/node_modules/lru-cache/dist/esm/index.js @@ -432,6 +432,9 @@ export class LRUCache { if (ttls[index]) { const ttl = ttls[index]; const start = starts[index]; + /* c8 ignore next */ + if (!ttl || !start) + return; status.ttl = ttl; status.start = start; status.now = cachedNow || getNow(); @@ -463,16 +466,16 @@ export class LRUCache { } const ttl = ttls[index]; const start = starts[index]; - if (ttl === 0 || start === 0) { + if (!ttl || !start) { return Infinity; } const age = (cachedNow || getNow()) - start; return ttl - age; }; this.#isStale = index => { - return (ttls[index] !== 0 && - starts[index] !== 0 && - (cachedNow || getNow()) - starts[index] > ttls[index]); + const s = starts[index]; + const t = ttls[index]; + return !!t && !!s && (cachedNow || getNow()) - s > t; }; } // conditionally set private methods related to TTL @@ -996,12 +999,13 @@ export class LRUCache { peek(k, peekOptions = {}) { const { allowStale = this.allowStale } = peekOptions; const index = this.#keyMap.get(k); - if (index !== undefined && - (allowStale || !this.#isStale(index))) { - const v = this.#valList[index]; - // either stale and allowed, or forcing a refresh of non-stale value - return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; + if (index === undefined || + (!allowStale && this.#isStale(index))) { + return; } + const v = this.#valList[index]; + // either stale and allowed, or forcing a refresh of non-stale value + return this.#isBackgroundFetch(v) ? v.__staleWhileFetching : v; } #backgroundFetch(k, index, options, context) { const v = index === undefined ? undefined : this.#valList[index]; @@ -1337,8 +1341,10 @@ export class LRUCache { this.#head = this.#next[index]; } else { - this.#next[this.#prev[index]] = this.#next[index]; - this.#prev[this.#next[index]] = this.#prev[index]; + const pi = this.#prev[index]; + this.#next[pi] = this.#next[index]; + const ni = this.#next[index]; + this.#prev[ni] = this.#prev[index]; } this.#size--; this.#free.push(index); diff --git a/deps/npm/node_modules/lru-cache/dist/mjs/package.json b/deps/npm/node_modules/lru-cache/dist/esm/package.json similarity index 100% rename from deps/npm/node_modules/lru-cache/dist/mjs/package.json rename to deps/npm/node_modules/lru-cache/dist/esm/package.json diff --git a/deps/npm/node_modules/lru-cache/dist/mjs/index.min.js b/deps/npm/node_modules/lru-cache/dist/mjs/index.min.js deleted file mode 100644 index 5a16b3940d6df9..00000000000000 --- a/deps/npm/node_modules/lru-cache/dist/mjs/index.min.js +++ /dev/null @@ -1,2 +0,0 @@ -var U=(o,t,e)=>{if(!t.has(o))throw TypeError("Cannot "+e)};var I=(o,t,e)=>(U(o,t,"read from private field"),e?e.call(o):t.get(o)),j=(o,t,e)=>{if(t.has(o))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(o):t.set(o,e)},D=(o,t,e,i)=>(U(o,t,"write to private field"),i?i.call(o,e):t.set(o,e),e);var v=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,M=new Set,L=typeof process=="object"&&process?process:{},P=(o,t,e,i)=>{typeof L.emitWarning=="function"?L.emitWarning(o,t,e,i):console.error(`[${e}] ${t}: ${o}`)},W=globalThis.AbortController,N=globalThis.AbortSignal;if(typeof W>"u"){N=class{onabort;_onabort=[];reason;aborted=!1;addEventListener(i,s){this._onabort.push(s)}},W=class{constructor(){t()}signal=new N;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let s of this.signal._onabort)s(i);this.signal.onabort?.(i)}}};let o=L.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",t=()=>{o&&(o=!1,P("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",t))}}var V=o=>!M.has(o),Y=Symbol("type"),m=o=>o&&o===Math.floor(o)&&o>0&&isFinite(o),H=o=>m(o)?o<=Math.pow(2,8)?Uint8Array:o<=Math.pow(2,16)?Uint16Array:o<=Math.pow(2,32)?Uint32Array:o<=Number.MAX_SAFE_INTEGER?z:null:null,z=class extends Array{constructor(t){super(t),this.fill(0)}},E,T=class{heap;length;static create(t){let e=H(t);if(!e)return[];D(T,E,!0);let i=new T(t,e);return D(T,E,!1),i}constructor(t,e){if(!I(T,E))throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new e(t),this.length=0}push(t){this.heap[this.length++]=t}pop(){return this.heap[--this.length]}},C=T;E=new WeakMap,j(C,E,!1);var R=class{#d;#f;#g;#p;#C;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#s;#w;#n;#i;#t;#l;#c;#o;#h;#S;#r;#m;#F;#_;#b;#T;#a;static unsafeExposeInternals(t){return{starts:t.#F,ttls:t.#_,sizes:t.#m,keyMap:t.#n,keyList:t.#i,valList:t.#t,next:t.#l,prev:t.#c,get head(){return t.#o},get tail(){return t.#h},free:t.#S,isBackgroundFetch:e=>t.#e(e),backgroundFetch:(e,i,s,n)=>t.#D(e,i,s,n),moveToTail:e=>t.#v(e),indexes:e=>t.#y(e),rindexes:e=>t.#A(e),isStale:e=>t.#u(e)}}get max(){return this.#d}get maxSize(){return this.#f}get calculatedSize(){return this.#w}get size(){return this.#s}get fetchMethod(){return this.#C}get dispose(){return this.#g}get disposeAfter(){return this.#p}constructor(t){let{max:e=0,ttl:i,ttlResolution:s=1,ttlAutopurge:n,updateAgeOnGet:h,updateAgeOnHas:a,allowStale:r,dispose:g,disposeAfter:b,noDisposeOnSet:f,noUpdateTTL:u,maxSize:c=0,maxEntrySize:F=0,sizeCalculation:d,fetchMethod:S,noDeleteOnFetchRejection:l,noDeleteOnStaleGet:w,allowStaleOnFetchRejection:y,allowStaleOnFetchAbort:p,ignoreFetchAbort:_}=t;if(e!==0&&!m(e))throw new TypeError("max option must be a nonnegative integer");let O=e?H(e):Array;if(!O)throw new Error("invalid max value: "+e);if(this.#d=e,this.#f=c,this.maxEntrySize=F||this.#f,this.sizeCalculation=d,this.sizeCalculation){if(!this.#f&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(S!==void 0&&typeof S!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#C=S,this.#T=!!S,this.#n=new Map,this.#i=new Array(e).fill(void 0),this.#t=new Array(e).fill(void 0),this.#l=new O(e),this.#c=new O(e),this.#o=0,this.#h=0,this.#S=C.create(e),this.#s=0,this.#w=0,typeof g=="function"&&(this.#g=g),typeof b=="function"?(this.#p=b,this.#r=[]):(this.#p=void 0,this.#r=void 0),this.#b=!!this.#g,this.#a=!!this.#p,this.noDisposeOnSet=!!f,this.noUpdateTTL=!!u,this.noDeleteOnFetchRejection=!!l,this.allowStaleOnFetchRejection=!!y,this.allowStaleOnFetchAbort=!!p,this.ignoreFetchAbort=!!_,this.maxEntrySize!==0){if(this.#f!==0&&!m(this.#f))throw new TypeError("maxSize must be a positive integer if specified");if(!m(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#j()}if(this.allowStale=!!r,this.noDeleteOnStaleGet=!!w,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!a,this.ttlResolution=m(s)||s===0?s:1,this.ttlAutopurge=!!n,this.ttl=i||0,this.ttl){if(!m(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#d===0&&this.ttl===0&&this.#f===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#d&&!this.#f){let A="LRU_CACHE_UNBOUNDED";V(A)&&(M.add(A),P("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",A,R))}}getRemainingTTL(t){return this.#n.has(t)?1/0:0}#L(){let t=new z(this.#d),e=new z(this.#d);this.#_=t,this.#F=e,this.#x=(n,h,a=v.now())=>{if(e[n]=h!==0?a:0,t[n]=h,h!==0&&this.ttlAutopurge){let r=setTimeout(()=>{this.#u(n)&&this.delete(this.#i[n])},h+1);r.unref&&r.unref()}},this.#z=n=>{e[n]=t[n]!==0?v.now():0},this.#O=(n,h)=>{if(t[h]){let a=t[h],r=e[h];n.ttl=a,n.start=r,n.now=i||s();let g=n.now-r;n.remainingTTL=a-g}};let i=0,s=()=>{let n=v.now();if(this.ttlResolution>0){i=n;let h=setTimeout(()=>i=0,this.ttlResolution);h.unref&&h.unref()}return n};this.getRemainingTTL=n=>{let h=this.#n.get(n);if(h===void 0)return 0;let a=t[h],r=e[h];if(a===0||r===0)return 1/0;let g=(i||s())-r;return a-g},this.#u=n=>t[n]!==0&&e[n]!==0&&(i||s())-e[n]>t[n]}#z=()=>{};#O=()=>{};#x=()=>{};#u=()=>!1;#j(){let t=new z(this.#d);this.#w=0,this.#m=t,this.#E=e=>{this.#w-=t[e],t[e]=0},this.#G=(e,i,s,n)=>{if(this.#e(i))return 0;if(!m(s))if(n){if(typeof n!="function")throw new TypeError("sizeCalculation must be a function");if(s=n(i,e),!m(s))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return s},this.#W=(e,i,s)=>{if(t[e]=i,this.#f){let n=this.#f-t[e];for(;this.#w>n;)this.#R(!0)}this.#w+=t[e],s&&(s.entrySize=i,s.totalCalculatedSize=this.#w)}}#E=t=>{};#W=(t,e,i)=>{};#G=(t,e,i,s)=>{if(i||s)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#y({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#h;!(!this.#U(e)||((t||!this.#u(e))&&(yield e),e===this.#o));)e=this.#c[e]}*#A({allowStale:t=this.allowStale}={}){if(this.#s)for(let e=this.#o;!(!this.#U(e)||((t||!this.#u(e))&&(yield e),e===this.#h));)e=this.#l[e]}#U(t){return t!==void 0&&this.#n.get(this.#i[t])===t}*entries(){for(let t of this.#y())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*rentries(){for(let t of this.#A())this.#t[t]!==void 0&&this.#i[t]!==void 0&&!this.#e(this.#t[t])&&(yield[this.#i[t],this.#t[t]])}*keys(){for(let t of this.#y()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*rkeys(){for(let t of this.#A()){let e=this.#i[t];e!==void 0&&!this.#e(this.#t[t])&&(yield e)}}*values(){for(let t of this.#y())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}*rvalues(){for(let t of this.#A())this.#t[t]!==void 0&&!this.#e(this.#t[t])&&(yield this.#t[t])}[Symbol.iterator](){return this.entries()}find(t,e={}){for(let i of this.#y()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;if(n!==void 0&&t(n,this.#i[i],this))return this.get(this.#i[i],e)}}forEach(t,e=this){for(let i of this.#y()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}rforEach(t,e=this){for(let i of this.#A()){let s=this.#t[i],n=this.#e(s)?s.__staleWhileFetching:s;n!==void 0&&t.call(e,n,this.#i[i],this)}}purgeStale(){let t=!1;for(let e of this.#A({allowStale:!0}))this.#u(e)&&(this.delete(this.#i[e]),t=!0);return t}dump(){let t=[];for(let e of this.#y({allowStale:!0})){let i=this.#i[e],s=this.#t[e],n=this.#e(s)?s.__staleWhileFetching:s;if(n===void 0||i===void 0)continue;let h={value:n};if(this.#_&&this.#F){h.ttl=this.#_[e];let a=v.now()-this.#F[e];h.start=Math.floor(Date.now()-a)}this.#m&&(h.size=this.#m[e]),t.unshift([i,h])}return t}load(t){this.clear();for(let[e,i]of t){if(i.start){let s=Date.now()-i.start;i.start=v.now()-s}this.set(e,i.value,i)}}set(t,e,i={}){if(e===void 0)return this.delete(t),this;let{ttl:s=this.ttl,start:n,noDisposeOnSet:h=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:r}=i,{noUpdateTTL:g=this.noUpdateTTL}=i,b=this.#G(t,e,i.size||0,a);if(this.maxEntrySize&&b>this.maxEntrySize)return r&&(r.set="miss",r.maxEntrySizeExceeded=!0),this.delete(t),this;let f=this.#s===0?void 0:this.#n.get(t);if(f===void 0)f=this.#s===0?this.#h:this.#S.length!==0?this.#S.pop():this.#s===this.#d?this.#R(!1):this.#s,this.#i[f]=t,this.#t[f]=e,this.#n.set(t,f),this.#l[this.#h]=f,this.#c[f]=this.#h,this.#h=f,this.#s++,this.#W(f,b,r),r&&(r.set="add"),g=!1;else{this.#v(f);let u=this.#t[f];if(e!==u){if(this.#T&&this.#e(u)){u.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:c}=u;c!==void 0&&!h&&(this.#b&&this.#g?.(c,t,"set"),this.#a&&this.#r?.push([c,t,"set"]))}else h||(this.#b&&this.#g?.(u,t,"set"),this.#a&&this.#r?.push([u,t,"set"]));if(this.#E(f),this.#W(f,b,r),this.#t[f]=e,r){r.set="replace";let c=u&&this.#e(u)?u.__staleWhileFetching:u;c!==void 0&&(r.oldValue=c)}}else r&&(r.set="update")}if(s!==0&&!this.#_&&this.#L(),this.#_&&(g||this.#x(f,s,n),r&&this.#O(r,f)),!h&&this.#a&&this.#r){let u=this.#r,c;for(;c=u?.shift();)this.#p?.(...c)}return this}pop(){try{for(;this.#s;){let t=this.#t[this.#o];if(this.#R(!0),this.#e(t)){if(t.__staleWhileFetching)return t.__staleWhileFetching}else if(t!==void 0)return t}}finally{if(this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#p?.(...e)}}}#R(t){let e=this.#o,i=this.#i[e],s=this.#t[e];return this.#T&&this.#e(s)?s.__abortController.abort(new Error("evicted")):(this.#b||this.#a)&&(this.#b&&this.#g?.(s,i,"evict"),this.#a&&this.#r?.push([s,i,"evict"])),this.#E(e),t&&(this.#i[e]=void 0,this.#t[e]=void 0,this.#S.push(e)),this.#s===1?(this.#o=this.#h=0,this.#S.length=0):this.#o=this.#l[e],this.#n.delete(i),this.#s--,e}has(t,e={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:s}=e,n=this.#n.get(t);if(n!==void 0){let h=this.#t[n];if(this.#e(h)&&h.__staleWhileFetching===void 0)return!1;if(this.#u(n))s&&(s.has="stale",this.#O(s,n));else return i&&this.#z(n),s&&(s.has="hit",this.#O(s,n)),!0}else s&&(s.has="miss");return!1}peek(t,e={}){let{allowStale:i=this.allowStale}=e,s=this.#n.get(t);if(s!==void 0&&(i||!this.#u(s))){let n=this.#t[s];return this.#e(n)?n.__staleWhileFetching:n}}#D(t,e,i,s){let n=e===void 0?void 0:this.#t[e];if(this.#e(n))return n;let h=new W,{signal:a}=i;a?.addEventListener("abort",()=>h.abort(a.reason),{signal:h.signal});let r={signal:h.signal,options:i,context:s},g=(d,S=!1)=>{let{aborted:l}=h.signal,w=i.ignoreFetchAbort&&d!==void 0;if(i.status&&(l&&!S?(i.status.fetchAborted=!0,i.status.fetchError=h.signal.reason,w&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),l&&!w&&!S)return f(h.signal.reason);let y=c;return this.#t[e]===c&&(d===void 0?y.__staleWhileFetching?this.#t[e]=y.__staleWhileFetching:this.delete(t):(i.status&&(i.status.fetchUpdated=!0),this.set(t,d,r.options))),d},b=d=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=d),f(d)),f=d=>{let{aborted:S}=h.signal,l=S&&i.allowStaleOnFetchAbort,w=l||i.allowStaleOnFetchRejection,y=w||i.noDeleteOnFetchRejection,p=c;if(this.#t[e]===c&&(!y||p.__staleWhileFetching===void 0?this.delete(t):l||(this.#t[e]=p.__staleWhileFetching)),w)return i.status&&p.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),p.__staleWhileFetching;if(p.__returned===p)throw d},u=(d,S)=>{let l=this.#C?.(t,n,r);l&&l instanceof Promise&&l.then(w=>d(w===void 0?void 0:w),S),h.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(d(void 0),i.allowStaleOnFetchAbort&&(d=w=>g(w,!0)))})};i.status&&(i.status.fetchDispatched=!0);let c=new Promise(u).then(g,b),F=Object.assign(c,{__abortController:h,__staleWhileFetching:n,__returned:void 0});return e===void 0?(this.set(t,F,{...r.options,status:void 0}),e=this.#n.get(t)):this.#t[e]=F,F}#e(t){if(!this.#T)return!1;let e=t;return!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof W}async fetch(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:h=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:r=0,sizeCalculation:g=this.sizeCalculation,noUpdateTTL:b=this.noUpdateTTL,noDeleteOnFetchRejection:f=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:u=this.allowStaleOnFetchRejection,ignoreFetchAbort:c=this.ignoreFetchAbort,allowStaleOnFetchAbort:F=this.allowStaleOnFetchAbort,context:d,forceRefresh:S=!1,status:l,signal:w}=e;if(!this.#T)return l&&(l.fetch="get"),this.get(t,{allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,status:l});let y={allowStale:i,updateAgeOnGet:s,noDeleteOnStaleGet:n,ttl:h,noDisposeOnSet:a,size:r,sizeCalculation:g,noUpdateTTL:b,noDeleteOnFetchRejection:f,allowStaleOnFetchRejection:u,allowStaleOnFetchAbort:F,ignoreFetchAbort:c,status:l,signal:w},p=this.#n.get(t);if(p===void 0){l&&(l.fetch="miss");let _=this.#D(t,p,y,d);return _.__returned=_}else{let _=this.#t[p];if(this.#e(_)){let G=i&&_.__staleWhileFetching!==void 0;return l&&(l.fetch="inflight",G&&(l.returnedStale=!0)),G?_.__staleWhileFetching:_.__returned=_}let O=this.#u(p);if(!S&&!O)return l&&(l.fetch="hit"),this.#v(p),s&&this.#z(p),l&&this.#O(l,p),_;let A=this.#D(t,p,y,d),x=A.__staleWhileFetching!==void 0&&i;return l&&(l.fetch=O?"stale":"refresh",x&&O&&(l.returnedStale=!0)),x?A.__staleWhileFetching:A.__returned=A}}get(t,e={}){let{allowStale:i=this.allowStale,updateAgeOnGet:s=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:h}=e,a=this.#n.get(t);if(a!==void 0){let r=this.#t[a],g=this.#e(r);return h&&this.#O(h,a),this.#u(a)?(h&&(h.get="stale"),g?(h&&i&&r.__staleWhileFetching!==void 0&&(h.returnedStale=!0),i?r.__staleWhileFetching:void 0):(n||this.delete(t),h&&i&&(h.returnedStale=!0),i?r:void 0)):(h&&(h.get="hit"),g?r.__staleWhileFetching:(this.#v(a),s&&this.#z(a),r))}else h&&(h.get="miss")}#I(t,e){this.#c[e]=t,this.#l[t]=e}#v(t){t!==this.#h&&(t===this.#o?this.#o=this.#l[t]:this.#I(this.#c[t],this.#l[t]),this.#I(this.#h,t),this.#h=t)}delete(t){let e=!1;if(this.#s!==0){let i=this.#n.get(t);if(i!==void 0)if(e=!0,this.#s===1)this.clear();else{this.#E(i);let s=this.#t[i];this.#e(s)?s.__abortController.abort(new Error("deleted")):(this.#b||this.#a)&&(this.#b&&this.#g?.(s,t,"delete"),this.#a&&this.#r?.push([s,t,"delete"])),this.#n.delete(t),this.#i[i]=void 0,this.#t[i]=void 0,i===this.#h?this.#h=this.#c[i]:i===this.#o?this.#o=this.#l[i]:(this.#l[this.#c[i]]=this.#l[i],this.#c[this.#l[i]]=this.#c[i]),this.#s--,this.#S.push(i)}}if(this.#a&&this.#r?.length){let i=this.#r,s;for(;s=i?.shift();)this.#p?.(...s)}return e}clear(){for(let t of this.#A({allowStale:!0})){let e=this.#t[t];if(this.#e(e))e.__abortController.abort(new Error("deleted"));else{let i=this.#i[t];this.#b&&this.#g?.(e,i,"delete"),this.#a&&this.#r?.push([e,i,"delete"])}}if(this.#n.clear(),this.#t.fill(void 0),this.#i.fill(void 0),this.#_&&this.#F&&(this.#_.fill(0),this.#F.fill(0)),this.#m&&this.#m.fill(0),this.#o=0,this.#h=0,this.#S.length=0,this.#w=0,this.#s=0,this.#a&&this.#r){let t=this.#r,e;for(;e=t?.shift();)this.#p?.(...e)}}};export{R as LRUCache}; -//# sourceMappingURL=index.min.js.map diff --git a/deps/npm/node_modules/lru-cache/package.json b/deps/npm/node_modules/lru-cache/package.json index bae4a04839d1f7..e6cb6b32153b5b 100644 --- a/deps/npm/node_modules/lru-cache/package.json +++ b/deps/npm/node_modules/lru-cache/package.json @@ -1,7 +1,7 @@ { "name": "lru-cache", "description": "A cache object that deletes the least-recently-used items.", - "version": "10.0.1", + "version": "10.0.2", "author": "Isaac Z. Schlueter ", "keywords": [ "mru", @@ -11,67 +11,57 @@ "sideEffects": false, "scripts": { "build": "npm run prepare", - "preprepare": "rm -rf dist", - "prepare": "tsc -p tsconfig.json && tsc -p tsconfig-esm.json", + "prepare": "tshy", "postprepare": "bash fixup.sh", "pretest": "npm run prepare", "presnap": "npm run prepare", - "test": "c8 tap", - "snap": "c8 tap", + "test": "tap", + "snap": "tap", "preversion": "npm test", "postversion": "npm publish", "prepublishOnly": "git push origin --follow-tags", "format": "prettier --write .", - "typedoc": "typedoc --tsconfig tsconfig-esm.json ./src/*.ts", + "typedoc": "typedoc --tsconfig ./.tshy/esm.json ./src/*.ts", "benchmark-results-typedoc": "bash scripts/benchmark-results-typedoc.sh", "prebenchmark": "npm run prepare", "benchmark": "make -C benchmark", "preprofile": "npm run prepare", "profile": "make -C benchmark profile" }, - "main": "./dist/cjs/index.js", - "module": "./dist/mjs/index.js", - "exports": { - "./min": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.min.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.min.js" - } - }, - ".": { - "import": { - "types": "./dist/mjs/index.d.ts", - "default": "./dist/mjs/index.js" - }, - "require": { - "types": "./dist/cjs/index.d.ts", - "default": "./dist/cjs/index.js" + "main": "./dist/commonjs/index.js", + "types": "./dist/commonjs/index.d.ts", + "tshy": { + "exports": { + ".": "./src/index.ts", + "./min": { + "import": { + "types": "./dist/mjs/index.d.ts", + "default": "./dist/mjs/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } } } }, "repository": "git://github.com/isaacs/node-lru-cache.git", "devDependencies": { - "@size-limit/preset-small-lib": "^7.0.8", + "@tapjs/clock": "^1.1.16", "@types/node": "^20.2.5", "@types/tap": "^15.0.6", "benchmark": "^2.1.4", - "c8": "^7.11.2", - "clock-mock": "^1.0.6", + "clock-mock": "^2.0.2", "esbuild": "^0.17.11", "eslint-config-prettier": "^8.5.0", "marked": "^4.2.12", "mkdirp": "^2.1.5", "prettier": "^2.6.2", - "size-limit": "^7.0.8", - "tap": "^16.3.4", - "ts-node": "^10.9.1", + "tap": "^18.5.7", + "tshy": "^1.8.0", "tslib": "^2.4.0", - "typedoc": "^0.24.6", - "typescript": "^5.0.4" + "typedoc": "^0.25.3", + "typescript": "^5.2.2" }, "license": "ISC", "files": [ @@ -92,17 +82,37 @@ "endOfLine": "lf" }, "tap": { - "coverage": false, "node-arg": [ - "--expose-gc", - "-r", - "ts-node/register" + "--expose-gc" ], - "ts": false + "plugin": [ + "@tapjs/clock" + ] }, - "size-limit": [ - { - "path": "./dist/mjs/index.js" + "exports": { + ".": { + "import": { + "types": "./dist/esm/index.d.ts", + "default": "./dist/esm/index.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.js" + } + }, + "./min": { + "import": { + "types": "./dist/mjs/index.d.ts", + "default": "./dist/mjs/index.min.js" + }, + "require": { + "types": "./dist/commonjs/index.d.ts", + "default": "./dist/commonjs/index.min.js" + } } - ] + }, + "type": "module", + "dependencies": { + "semver": "^7.3.5" + } } diff --git a/deps/npm/node_modules/signal-exit/dist/cjs/index.js b/deps/npm/node_modules/signal-exit/dist/cjs/index.js index 2e6c18316b9a5d..27d4e4f7fc7763 100644 --- a/deps/npm/node_modules/signal-exit/dist/cjs/index.js +++ b/deps/npm/node_modules/signal-exit/dist/cjs/index.js @@ -20,7 +20,7 @@ const processOk = (process) => !!process && const kExitEmitter = Symbol.for('signal-exit emitter'); const global = globalThis; const ObjectDefineProperty = Object.defineProperty.bind(Object); -// teeny tiny ee +// teeny special purpose ee class Emitter { emitted = { afterExit: false, @@ -63,12 +63,17 @@ class Emitter { } emit(ev, code, signal) { if (this.emitted[ev]) { - return; + return false; } this.emitted[ev] = true; + let ret = false; for (const fn of this.listeners[ev]) { - fn(code, signal); + ret = fn(code, signal) === true || ret; + } + if (ev === 'exit') { + ret = this.emit('afterExit', code, signal) || ret; } + return ret; } } class SignalExitBase { @@ -122,18 +127,22 @@ class SignalExit extends SignalExitBase { // exit v4 are not aware of each other, and each will attempt to let // the other handle it, so neither of them do. To correct this, we // detect if we're the only handler *except* for previous versions - // of signal-exit. + // of signal-exit, and increment by the count of listeners it has + // created. /* c8 ignore start */ - //@ts-ignore - if (typeof process.__signal_exit_emitter__ === 'object') - count++; + const p = process; + if (typeof p.__signal_exit_emitter__ === 'object' && + typeof p.__signal_exit_emitter__.count === 'number') { + count += p.__signal_exit_emitter__.count; + } /* c8 ignore stop */ if (listeners.length === count) { this.unload(); - this.#emitter.emit('exit', null, sig); - this.#emitter.emit('afterExit', null, sig); + const ret = this.#emitter.emit('exit', null, sig); /* c8 ignore start */ - process.kill(process.pid, sig === 'SIGHUP' ? this.#hupSig : sig); + const s = sig === 'SIGHUP' ? this.#hupSig : sig; + if (!ret) + process.kill(process.pid, s); /* c8 ignore stop */ } }; @@ -216,7 +225,6 @@ class SignalExit extends SignalExitBase { this.#process.exitCode = code || 0; /* c8 ignore stop */ this.#emitter.emit('exit', this.#process.exitCode, null); - this.#emitter.emit('afterExit', this.#process.exitCode, null); return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode); } #processEmit(ev, ...args) { @@ -230,7 +238,6 @@ class SignalExit extends SignalExitBase { const ret = og.call(this.#process, ev, ...args); /* c8 ignore start */ this.#emitter.emit('exit', this.#process.exitCode, null); - this.#emitter.emit('afterExit', this.#process.exitCode, null); /* c8 ignore stop */ return ret; } diff --git a/deps/npm/node_modules/signal-exit/dist/mjs/index.js b/deps/npm/node_modules/signal-exit/dist/mjs/index.js index 1e8dea6d4930b6..9a86ee86e1bc0d 100644 --- a/deps/npm/node_modules/signal-exit/dist/mjs/index.js +++ b/deps/npm/node_modules/signal-exit/dist/mjs/index.js @@ -16,7 +16,7 @@ const processOk = (process) => !!process && const kExitEmitter = Symbol.for('signal-exit emitter'); const global = globalThis; const ObjectDefineProperty = Object.defineProperty.bind(Object); -// teeny tiny ee +// teeny special purpose ee class Emitter { emitted = { afterExit: false, @@ -59,12 +59,17 @@ class Emitter { } emit(ev, code, signal) { if (this.emitted[ev]) { - return; + return false; } this.emitted[ev] = true; + let ret = false; for (const fn of this.listeners[ev]) { - fn(code, signal); + ret = fn(code, signal) === true || ret; + } + if (ev === 'exit') { + ret = this.emit('afterExit', code, signal) || ret; } + return ret; } } class SignalExitBase { @@ -118,18 +123,22 @@ class SignalExit extends SignalExitBase { // exit v4 are not aware of each other, and each will attempt to let // the other handle it, so neither of them do. To correct this, we // detect if we're the only handler *except* for previous versions - // of signal-exit. + // of signal-exit, and increment by the count of listeners it has + // created. /* c8 ignore start */ - //@ts-ignore - if (typeof process.__signal_exit_emitter__ === 'object') - count++; + const p = process; + if (typeof p.__signal_exit_emitter__ === 'object' && + typeof p.__signal_exit_emitter__.count === 'number') { + count += p.__signal_exit_emitter__.count; + } /* c8 ignore stop */ if (listeners.length === count) { this.unload(); - this.#emitter.emit('exit', null, sig); - this.#emitter.emit('afterExit', null, sig); + const ret = this.#emitter.emit('exit', null, sig); /* c8 ignore start */ - process.kill(process.pid, sig === 'SIGHUP' ? this.#hupSig : sig); + const s = sig === 'SIGHUP' ? this.#hupSig : sig; + if (!ret) + process.kill(process.pid, s); /* c8 ignore stop */ } }; @@ -212,7 +221,6 @@ class SignalExit extends SignalExitBase { this.#process.exitCode = code || 0; /* c8 ignore stop */ this.#emitter.emit('exit', this.#process.exitCode, null); - this.#emitter.emit('afterExit', this.#process.exitCode, null); return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode); } #processEmit(ev, ...args) { @@ -226,7 +234,6 @@ class SignalExit extends SignalExitBase { const ret = og.call(this.#process, ev, ...args); /* c8 ignore start */ this.#emitter.emit('exit', this.#process.exitCode, null); - this.#emitter.emit('afterExit', this.#process.exitCode, null); /* c8 ignore stop */ return ret; } diff --git a/deps/npm/node_modules/signal-exit/package.json b/deps/npm/node_modules/signal-exit/package.json index 455452f96a0b3f..ac176cec743748 100644 --- a/deps/npm/node_modules/signal-exit/package.json +++ b/deps/npm/node_modules/signal-exit/package.json @@ -1,6 +1,6 @@ { "name": "signal-exit", - "version": "4.0.2", + "version": "4.1.0", "description": "when you want to fire an event no matter how a process exits.", "main": "./dist/cjs/index.js", "module": "./dist/mjs/index.js", diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/dist/index.js b/deps/npm/node_modules/socks-proxy-agent/dist/index.js similarity index 100% rename from deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/dist/index.js rename to deps/npm/node_modules/socks-proxy-agent/dist/index.js diff --git a/deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/package.json b/deps/npm/node_modules/socks-proxy-agent/package.json similarity index 100% rename from deps/npm/node_modules/@npmcli/agent/node_modules/socks-proxy-agent/package.json rename to deps/npm/node_modules/socks-proxy-agent/package.json diff --git a/deps/npm/node_modules/string-width-cjs/node_modules/ansi-regex/index.js b/deps/npm/node_modules/string-width-cjs/node_modules/ansi-regex/index.js new file mode 100644 index 00000000000000..616ff837d3ff01 --- /dev/null +++ b/deps/npm/node_modules/string-width-cjs/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/deps/npm/node_modules/string-width-cjs/node_modules/ansi-regex/license b/deps/npm/node_modules/string-width-cjs/node_modules/ansi-regex/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/string-width-cjs/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/string-width-cjs/node_modules/ansi-regex/package.json b/deps/npm/node_modules/string-width-cjs/node_modules/ansi-regex/package.json new file mode 100644 index 00000000000000..017f53116a9e28 --- /dev/null +++ b/deps/npm/node_modules/string-width-cjs/node_modules/ansi-regex/package.json @@ -0,0 +1,55 @@ +{ + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } +} diff --git a/deps/npm/node_modules/string-width-cjs/node_modules/strip-ansi/index.js b/deps/npm/node_modules/string-width-cjs/node_modules/strip-ansi/index.js new file mode 100644 index 00000000000000..9a593dfcd1fd5c --- /dev/null +++ b/deps/npm/node_modules/string-width-cjs/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/deps/npm/node_modules/string-width-cjs/node_modules/strip-ansi/license b/deps/npm/node_modules/string-width-cjs/node_modules/strip-ansi/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/string-width-cjs/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/string-width-cjs/node_modules/strip-ansi/package.json b/deps/npm/node_modules/string-width-cjs/node_modules/strip-ansi/package.json new file mode 100644 index 00000000000000..1a41108d42831c --- /dev/null +++ b/deps/npm/node_modules/string-width-cjs/node_modules/strip-ansi/package.json @@ -0,0 +1,54 @@ +{ + "name": "strip-ansi", + "version": "6.0.1", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + } +} diff --git a/deps/npm/node_modules/string-width/node_modules/ansi-regex/index.js b/deps/npm/node_modules/string-width/node_modules/ansi-regex/index.js new file mode 100644 index 00000000000000..616ff837d3ff01 --- /dev/null +++ b/deps/npm/node_modules/string-width/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/deps/npm/node_modules/string-width/node_modules/ansi-regex/license b/deps/npm/node_modules/string-width/node_modules/ansi-regex/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/string-width/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/string-width/node_modules/ansi-regex/package.json b/deps/npm/node_modules/string-width/node_modules/ansi-regex/package.json new file mode 100644 index 00000000000000..017f53116a9e28 --- /dev/null +++ b/deps/npm/node_modules/string-width/node_modules/ansi-regex/package.json @@ -0,0 +1,55 @@ +{ + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } +} diff --git a/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js b/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js new file mode 100644 index 00000000000000..9a593dfcd1fd5c --- /dev/null +++ b/deps/npm/node_modules/string-width/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/deps/npm/node_modules/string-width/node_modules/strip-ansi/license b/deps/npm/node_modules/string-width/node_modules/strip-ansi/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/string-width/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/string-width/node_modules/strip-ansi/package.json b/deps/npm/node_modules/string-width/node_modules/strip-ansi/package.json new file mode 100644 index 00000000000000..1a41108d42831c --- /dev/null +++ b/deps/npm/node_modules/string-width/node_modules/strip-ansi/package.json @@ -0,0 +1,54 @@ +{ + "name": "strip-ansi", + "version": "6.0.1", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + } +} diff --git a/deps/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js b/deps/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js new file mode 100644 index 00000000000000..616ff837d3ff01 --- /dev/null +++ b/deps/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/deps/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex/license b/deps/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex/package.json b/deps/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex/package.json new file mode 100644 index 00000000000000..017f53116a9e28 --- /dev/null +++ b/deps/npm/node_modules/strip-ansi-cjs/node_modules/ansi-regex/package.json @@ -0,0 +1,55 @@ +{ + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } +} diff --git a/deps/npm/node_modules/strip-ansi/index.js b/deps/npm/node_modules/strip-ansi/index.js index 9a593dfcd1fd5c..ba19750e64e061 100644 --- a/deps/npm/node_modules/strip-ansi/index.js +++ b/deps/npm/node_modules/strip-ansi/index.js @@ -1,4 +1,14 @@ -'use strict'; -const ansiRegex = require('ansi-regex'); +import ansiRegex from 'ansi-regex'; -module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; +const regex = ansiRegex(); + +export default function stripAnsi(string) { + if (typeof string !== 'string') { + throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); + } + + // Even though the regex is global, we don't need to reset the `.lastIndex` + // because unlike `.exec()` and `.test()`, `.replace()` does it automatically + // and doing it manually has a performance penalty. + return string.replace(regex, ''); +} diff --git a/deps/npm/node_modules/strip-ansi/license b/deps/npm/node_modules/strip-ansi/license index e7af2f77107d73..fa7ceba3eb4a96 100644 --- a/deps/npm/node_modules/strip-ansi/license +++ b/deps/npm/node_modules/strip-ansi/license @@ -1,6 +1,6 @@ MIT License -Copyright (c) Sindre Sorhus (sindresorhus.com) +Copyright (c) Sindre Sorhus (https://sindresorhus.com) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/deps/npm/node_modules/strip-ansi/package.json b/deps/npm/node_modules/strip-ansi/package.json index 1a41108d42831c..e1f455c325b007 100644 --- a/deps/npm/node_modules/strip-ansi/package.json +++ b/deps/npm/node_modules/strip-ansi/package.json @@ -1,16 +1,19 @@ { "name": "strip-ansi", - "version": "6.0.1", + "version": "7.1.0", "description": "Strip ANSI escape codes from a string", "license": "MIT", "repository": "chalk/strip-ansi", + "funding": "https://github.com/chalk/strip-ansi?sponsor=1", "author": { "name": "Sindre Sorhus", "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" + "url": "https://sindresorhus.com" }, + "type": "module", + "exports": "./index.js", "engines": { - "node": ">=8" + "node": ">=12" }, "scripts": { "test": "xo && ava && tsd" @@ -44,11 +47,11 @@ "text" ], "dependencies": { - "ansi-regex": "^5.0.1" + "ansi-regex": "^6.0.1" }, "devDependencies": { - "ava": "^2.4.0", - "tsd": "^0.10.0", - "xo": "^0.25.3" + "ava": "^3.15.0", + "tsd": "^0.17.0", + "xo": "^0.44.0" } } diff --git a/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js new file mode 100644 index 00000000000000..616ff837d3ff01 --- /dev/null +++ b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/index.js @@ -0,0 +1,10 @@ +'use strict'; + +module.exports = ({onlyFirst = false} = {}) => { + const pattern = [ + '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', + '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' + ].join('|'); + + return new RegExp(pattern, onlyFirst ? undefined : 'g'); +}; diff --git a/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/license b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/package.json b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/package.json new file mode 100644 index 00000000000000..017f53116a9e28 --- /dev/null +++ b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-regex/package.json @@ -0,0 +1,55 @@ +{ + "name": "ansi-regex", + "version": "5.0.1", + "description": "Regular expression for matching ANSI escape codes", + "license": "MIT", + "repository": "chalk/ansi-regex", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "view-supported": "node fixtures/view-codes.js" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "command-line", + "text", + "regex", + "regexp", + "re", + "match", + "test", + "find", + "pattern" + ], + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.9.0", + "xo": "^0.25.3" + } +} diff --git a/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js new file mode 100644 index 00000000000000..5d82581a13f990 --- /dev/null +++ b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/index.js @@ -0,0 +1,163 @@ +'use strict'; + +const wrapAnsi16 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${code + offset}m`; +}; + +const wrapAnsi256 = (fn, offset) => (...args) => { + const code = fn(...args); + return `\u001B[${38 + offset};5;${code}m`; +}; + +const wrapAnsi16m = (fn, offset) => (...args) => { + const rgb = fn(...args); + return `\u001B[${38 + offset};2;${rgb[0]};${rgb[1]};${rgb[2]}m`; +}; + +const ansi2ansi = n => n; +const rgb2rgb = (r, g, b) => [r, g, b]; + +const setLazyProperty = (object, property, get) => { + Object.defineProperty(object, property, { + get: () => { + const value = get(); + + Object.defineProperty(object, property, { + value, + enumerable: true, + configurable: true + }); + + return value; + }, + enumerable: true, + configurable: true + }); +}; + +/** @type {typeof import('color-convert')} */ +let colorConvert; +const makeDynamicStyles = (wrap, targetSpace, identity, isBackground) => { + if (colorConvert === undefined) { + colorConvert = require('color-convert'); + } + + const offset = isBackground ? 10 : 0; + const styles = {}; + + for (const [sourceSpace, suite] of Object.entries(colorConvert)) { + const name = sourceSpace === 'ansi16' ? 'ansi' : sourceSpace; + if (sourceSpace === targetSpace) { + styles[name] = wrap(identity, offset); + } else if (typeof suite === 'object') { + styles[name] = wrap(suite[targetSpace], offset); + } + } + + return styles; +}; + +function assembleStyles() { + const codes = new Map(); + const styles = { + modifier: { + reset: [0, 0], + // 21 isn't widely supported and 22 does the same thing + bold: [1, 22], + dim: [2, 22], + italic: [3, 23], + underline: [4, 24], + inverse: [7, 27], + hidden: [8, 28], + strikethrough: [9, 29] + }, + color: { + black: [30, 39], + red: [31, 39], + green: [32, 39], + yellow: [33, 39], + blue: [34, 39], + magenta: [35, 39], + cyan: [36, 39], + white: [37, 39], + + // Bright color + blackBright: [90, 39], + redBright: [91, 39], + greenBright: [92, 39], + yellowBright: [93, 39], + blueBright: [94, 39], + magentaBright: [95, 39], + cyanBright: [96, 39], + whiteBright: [97, 39] + }, + bgColor: { + bgBlack: [40, 49], + bgRed: [41, 49], + bgGreen: [42, 49], + bgYellow: [43, 49], + bgBlue: [44, 49], + bgMagenta: [45, 49], + bgCyan: [46, 49], + bgWhite: [47, 49], + + // Bright color + bgBlackBright: [100, 49], + bgRedBright: [101, 49], + bgGreenBright: [102, 49], + bgYellowBright: [103, 49], + bgBlueBright: [104, 49], + bgMagentaBright: [105, 49], + bgCyanBright: [106, 49], + bgWhiteBright: [107, 49] + } + }; + + // Alias bright black as gray (and grey) + styles.color.gray = styles.color.blackBright; + styles.bgColor.bgGray = styles.bgColor.bgBlackBright; + styles.color.grey = styles.color.blackBright; + styles.bgColor.bgGrey = styles.bgColor.bgBlackBright; + + for (const [groupName, group] of Object.entries(styles)) { + for (const [styleName, style] of Object.entries(group)) { + styles[styleName] = { + open: `\u001B[${style[0]}m`, + close: `\u001B[${style[1]}m` + }; + + group[styleName] = styles[styleName]; + + codes.set(style[0], style[1]); + } + + Object.defineProperty(styles, groupName, { + value: group, + enumerable: false + }); + } + + Object.defineProperty(styles, 'codes', { + value: codes, + enumerable: false + }); + + styles.color.close = '\u001B[39m'; + styles.bgColor.close = '\u001B[49m'; + + setLazyProperty(styles.color, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, false)); + setLazyProperty(styles.color, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, false)); + setLazyProperty(styles.bgColor, 'ansi', () => makeDynamicStyles(wrapAnsi16, 'ansi16', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi256', () => makeDynamicStyles(wrapAnsi256, 'ansi256', ansi2ansi, true)); + setLazyProperty(styles.bgColor, 'ansi16m', () => makeDynamicStyles(wrapAnsi16m, 'rgb', rgb2rgb, true)); + + return styles; +} + +// Make the export immutable +Object.defineProperty(module, 'exports', { + enumerable: true, + get: assembleStyles +}); diff --git a/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/license b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/package.json b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/package.json new file mode 100644 index 00000000000000..75393284d7e474 --- /dev/null +++ b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/ansi-styles/package.json @@ -0,0 +1,56 @@ +{ + "name": "ansi-styles", + "version": "4.3.0", + "description": "ANSI escape codes for styling strings in the terminal", + "license": "MIT", + "repository": "chalk/ansi-styles", + "funding": "https://github.com/chalk/ansi-styles?sponsor=1", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd", + "screenshot": "svg-term --command='node screenshot' --out=screenshot.svg --padding=3 --width=55 --height=3 --at=1000 --no-cursor" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "cli", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "color-convert": "^2.0.1" + }, + "devDependencies": { + "@types/color-convert": "^1.9.0", + "ava": "^2.3.0", + "svg-term-cli": "^2.1.1", + "tsd": "^0.11.0", + "xo": "^0.25.3" + } +} diff --git a/deps/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js new file mode 100644 index 00000000000000..9a593dfcd1fd5c --- /dev/null +++ b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/index.js @@ -0,0 +1,4 @@ +'use strict'; +const ansiRegex = require('ansi-regex'); + +module.exports = string => typeof string === 'string' ? string.replace(ansiRegex(), '') : string; diff --git a/deps/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/license b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/license new file mode 100644 index 00000000000000..e7af2f77107d73 --- /dev/null +++ b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/license @@ -0,0 +1,9 @@ +MIT License + +Copyright (c) Sindre Sorhus (sindresorhus.com) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/package.json b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/package.json new file mode 100644 index 00000000000000..1a41108d42831c --- /dev/null +++ b/deps/npm/node_modules/wrap-ansi-cjs/node_modules/strip-ansi/package.json @@ -0,0 +1,54 @@ +{ + "name": "strip-ansi", + "version": "6.0.1", + "description": "Strip ANSI escape codes from a string", + "license": "MIT", + "repository": "chalk/strip-ansi", + "author": { + "name": "Sindre Sorhus", + "email": "sindresorhus@gmail.com", + "url": "sindresorhus.com" + }, + "engines": { + "node": ">=8" + }, + "scripts": { + "test": "xo && ava && tsd" + }, + "files": [ + "index.js", + "index.d.ts" + ], + "keywords": [ + "strip", + "trim", + "remove", + "ansi", + "styles", + "color", + "colour", + "colors", + "terminal", + "console", + "string", + "tty", + "escape", + "formatting", + "rgb", + "256", + "shell", + "xterm", + "log", + "logging", + "command-line", + "text" + ], + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "devDependencies": { + "ava": "^2.4.0", + "tsd": "^0.10.0", + "xo": "^0.25.3" + } +} diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js b/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js deleted file mode 100644 index 130a0929b8ce8c..00000000000000 --- a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +++ /dev/null @@ -1,8 +0,0 @@ -export default function ansiRegex({onlyFirst = false} = {}) { - const pattern = [ - '[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)', - '(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))' - ].join('|'); - - return new RegExp(pattern, onlyFirst ? undefined : 'g'); -} diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/index.js b/deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/index.js deleted file mode 100644 index d7bede44b7b6ba..00000000000000 --- a/deps/npm/node_modules/wrap-ansi/node_modules/ansi-styles/index.js +++ /dev/null @@ -1,223 +0,0 @@ -const ANSI_BACKGROUND_OFFSET = 10; - -const wrapAnsi16 = (offset = 0) => code => `\u001B[${code + offset}m`; - -const wrapAnsi256 = (offset = 0) => code => `\u001B[${38 + offset};5;${code}m`; - -const wrapAnsi16m = (offset = 0) => (red, green, blue) => `\u001B[${38 + offset};2;${red};${green};${blue}m`; - -const styles = { - modifier: { - reset: [0, 0], - // 21 isn't widely supported and 22 does the same thing - bold: [1, 22], - dim: [2, 22], - italic: [3, 23], - underline: [4, 24], - overline: [53, 55], - inverse: [7, 27], - hidden: [8, 28], - strikethrough: [9, 29], - }, - color: { - black: [30, 39], - red: [31, 39], - green: [32, 39], - yellow: [33, 39], - blue: [34, 39], - magenta: [35, 39], - cyan: [36, 39], - white: [37, 39], - - // Bright color - blackBright: [90, 39], - gray: [90, 39], // Alias of `blackBright` - grey: [90, 39], // Alias of `blackBright` - redBright: [91, 39], - greenBright: [92, 39], - yellowBright: [93, 39], - blueBright: [94, 39], - magentaBright: [95, 39], - cyanBright: [96, 39], - whiteBright: [97, 39], - }, - bgColor: { - bgBlack: [40, 49], - bgRed: [41, 49], - bgGreen: [42, 49], - bgYellow: [43, 49], - bgBlue: [44, 49], - bgMagenta: [45, 49], - bgCyan: [46, 49], - bgWhite: [47, 49], - - // Bright color - bgBlackBright: [100, 49], - bgGray: [100, 49], // Alias of `bgBlackBright` - bgGrey: [100, 49], // Alias of `bgBlackBright` - bgRedBright: [101, 49], - bgGreenBright: [102, 49], - bgYellowBright: [103, 49], - bgBlueBright: [104, 49], - bgMagentaBright: [105, 49], - bgCyanBright: [106, 49], - bgWhiteBright: [107, 49], - }, -}; - -export const modifierNames = Object.keys(styles.modifier); -export const foregroundColorNames = Object.keys(styles.color); -export const backgroundColorNames = Object.keys(styles.bgColor); -export const colorNames = [...foregroundColorNames, ...backgroundColorNames]; - -function assembleStyles() { - const codes = new Map(); - - for (const [groupName, group] of Object.entries(styles)) { - for (const [styleName, style] of Object.entries(group)) { - styles[styleName] = { - open: `\u001B[${style[0]}m`, - close: `\u001B[${style[1]}m`, - }; - - group[styleName] = styles[styleName]; - - codes.set(style[0], style[1]); - } - - Object.defineProperty(styles, groupName, { - value: group, - enumerable: false, - }); - } - - Object.defineProperty(styles, 'codes', { - value: codes, - enumerable: false, - }); - - styles.color.close = '\u001B[39m'; - styles.bgColor.close = '\u001B[49m'; - - styles.color.ansi = wrapAnsi16(); - styles.color.ansi256 = wrapAnsi256(); - styles.color.ansi16m = wrapAnsi16m(); - styles.bgColor.ansi = wrapAnsi16(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi256 = wrapAnsi256(ANSI_BACKGROUND_OFFSET); - styles.bgColor.ansi16m = wrapAnsi16m(ANSI_BACKGROUND_OFFSET); - - // From https://github.com/Qix-/color-convert/blob/3f0e0d4e92e235796ccb17f6e85c72094a651f49/conversions.js - Object.defineProperties(styles, { - rgbToAnsi256: { - value: (red, green, blue) => { - // We use the extended greyscale palette here, with the exception of - // black and white. normal palette only has 4 greyscale shades. - if (red === green && green === blue) { - if (red < 8) { - return 16; - } - - if (red > 248) { - return 231; - } - - return Math.round(((red - 8) / 247) * 24) + 232; - } - - return 16 - + (36 * Math.round(red / 255 * 5)) - + (6 * Math.round(green / 255 * 5)) - + Math.round(blue / 255 * 5); - }, - enumerable: false, - }, - hexToRgb: { - value: hex => { - const matches = /[a-f\d]{6}|[a-f\d]{3}/i.exec(hex.toString(16)); - if (!matches) { - return [0, 0, 0]; - } - - let [colorString] = matches; - - if (colorString.length === 3) { - colorString = [...colorString].map(character => character + character).join(''); - } - - const integer = Number.parseInt(colorString, 16); - - return [ - /* eslint-disable no-bitwise */ - (integer >> 16) & 0xFF, - (integer >> 8) & 0xFF, - integer & 0xFF, - /* eslint-enable no-bitwise */ - ]; - }, - enumerable: false, - }, - hexToAnsi256: { - value: hex => styles.rgbToAnsi256(...styles.hexToRgb(hex)), - enumerable: false, - }, - ansi256ToAnsi: { - value: code => { - if (code < 8) { - return 30 + code; - } - - if (code < 16) { - return 90 + (code - 8); - } - - let red; - let green; - let blue; - - if (code >= 232) { - red = (((code - 232) * 10) + 8) / 255; - green = red; - blue = red; - } else { - code -= 16; - - const remainder = code % 36; - - red = Math.floor(code / 36) / 5; - green = Math.floor(remainder / 6) / 5; - blue = (remainder % 6) / 5; - } - - const value = Math.max(red, green, blue) * 2; - - if (value === 0) { - return 30; - } - - // eslint-disable-next-line no-bitwise - let result = 30 + ((Math.round(blue) << 2) | (Math.round(green) << 1) | Math.round(red)); - - if (value === 2) { - result += 60; - } - - return result; - }, - enumerable: false, - }, - rgbToAnsi: { - value: (red, green, blue) => styles.ansi256ToAnsi(styles.rgbToAnsi256(red, green, blue)), - enumerable: false, - }, - hexToAnsi: { - value: hex => styles.ansi256ToAnsi(styles.hexToAnsi256(hex)), - enumerable: false, - }, - }); - - return styles; -} - -const ansiStyles = assembleStyles(); - -export default ansiStyles; diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.js b/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.js deleted file mode 100644 index ba19750e64e061..00000000000000 --- a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/index.js +++ /dev/null @@ -1,14 +0,0 @@ -import ansiRegex from 'ansi-regex'; - -const regex = ansiRegex(); - -export default function stripAnsi(string) { - if (typeof string !== 'string') { - throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``); - } - - // Even though the regex is global, we don't need to reset the `.lastIndex` - // because unlike `.exec()` and `.test()`, `.replace()` does it automatically - // and doing it manually has a performance penalty. - return string.replace(regex, ''); -} diff --git a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/license b/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/license deleted file mode 100644 index fa7ceba3eb4a96..00000000000000 --- a/deps/npm/node_modules/wrap-ansi/node_modules/strip-ansi/license +++ /dev/null @@ -1,9 +0,0 @@ -MIT License - -Copyright (c) Sindre Sorhus (https://sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/deps/npm/package.json b/deps/npm/package.json index 185b5090cb9a2f..a946e38493e0e4 100644 --- a/deps/npm/package.json +++ b/deps/npm/package.json @@ -1,5 +1,5 @@ { - "version": "10.2.3", + "version": "10.2.4", "name": "npm", "description": "a package manager for JavaScript", "workspaces": [ @@ -53,18 +53,18 @@ "dependencies": { "@isaacs/string-locale-compare": "^1.1.0", "@npmcli/arborist": "^7.2.1", - "@npmcli/config": "^8.0.1", + "@npmcli/config": "^8.0.2", "@npmcli/fs": "^3.1.0", "@npmcli/map-workspaces": "^3.0.4", "@npmcli/package-json": "^5.0.0", "@npmcli/promise-spawn": "^7.0.0", "@npmcli/run-script": "^7.0.2", - "@sigstore/tuf": "^2.1.0", + "@sigstore/tuf": "^2.2.0", "abbrev": "^2.0.0", "archy": "~1.0.0", "cacache": "^18.0.0", "chalk": "^5.3.0", - "ci-info": "^3.9.0", + "ci-info": "^4.0.0", "cli-columns": "^4.0.0", "cli-table3": "^0.6.3", "columnify": "^1.6.0", @@ -75,16 +75,16 @@ "hosted-git-info": "^7.0.1", "ini": "^4.1.1", "init-package-json": "^6.0.0", - "is-cidr": "^4.0.2", + "is-cidr": "^5.0.3", "json-parse-even-better-errors": "^3.0.0", "libnpmaccess": "^8.0.1", "libnpmdiff": "^6.0.3", - "libnpmexec": "^7.0.3", + "libnpmexec": "^7.0.4", "libnpmfund": "^5.0.1", "libnpmhook": "^10.0.0", "libnpmorg": "^6.0.1", "libnpmpack": "^6.0.3", - "libnpmpublish": "^9.0.1", + "libnpmpublish": "^9.0.2", "libnpmsearch": "^7.0.0", "libnpmteam": "^6.0.0", "libnpmversion": "^5.0.1", @@ -113,7 +113,7 @@ "semver": "^7.5.4", "spdx-expression-parse": "^3.0.1", "ssri": "^10.0.5", - "strip-ansi": "^6.0.1", + "strip-ansi": "^7.1.0", "supports-color": "^9.4.0", "tar": "^6.2.0", "text-table": "~0.2.0", @@ -209,7 +209,7 @@ "ajv-formats-draft2019": "^1.6.1", "diff": "^5.1.0", "licensee": "^10.0.0", - "nock": "^13.3.3", + "nock": "^13.3.8", "npm-packlist": "^8.0.0", "remark": "^14.0.2", "remark-gfm": "^3.0.1", diff --git a/deps/npm/tap-snapshots/test/lib/commands/search.js.test.cjs b/deps/npm/tap-snapshots/test/lib/commands/search.js.test.cjs index 50032deb745739..3fd12d699bd77f 100644 --- a/deps/npm/tap-snapshots/test/lib/commands/search.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/commands/search.js.test.cjs @@ -46,20 +46,20 @@ pkg-no-desc | | =lukekarrys | 2019-09-26 ` exports[`test/lib/commands/search.js TAP search --parseable > should have expected search results as parseable 1`] = ` -libnpm Collection of programmatic APIs for the npm CLI =nlf =ruyadorno =darcyclarke =isaacs 2019-07-16 3.0.1 npm api package manager lib -libnpmaccess programmatic library for \`npm access\` commands =nlf =ruyadorno =darcyclarke =isaacs 2020-11-03 4.0.1 libnpmaccess -@evocateur/libnpmaccess programmatic library for \`npm access\` commands =evocateur 2019-07-16 3.1.2 -@evocateur/libnpmpublish Programmatic API for the bits behind npm publish and unpublish =evocateur 2019-07-16 1.2.2 -libnpmorg Programmatic api for \`npm org\` commands =nlf =ruyadorno =darcyclarke =isaacs 2020-11-03 2.0.1 libnpm npm package manager api orgs teams -libnpmsearch Programmatic API for searching in npm and compatible registries. =nlf =ruyadorno =darcyclarke =isaacs 2020-12-08 3.1.0 npm search api libnpm -libnpmteam npm Team management APIs =nlf =ruyadorno =darcyclarke =isaacs 2020-11-03 2.0.2 -libnpmhook programmatic API for managing npm registry hooks =nlf =ruyadorno =darcyclarke =isaacs 2020-11-03 6.0.1 npm hooks registry npm api -libnpmpublish Programmatic API for the bits behind npm publish and unpublish =nlf =ruyadorno =darcyclarke =isaacs 2020-11-03 4.0.0 -libnpmfund Programmatic API for npm fund =nlf =ruyadorno =darcyclarke =isaacs 2020-12-08 1.0.2 npm npmcli libnpm cli git fund gitfund -@npmcli/map-workspaces Retrieves a name:pathname Map for a given workspaces config =nlf =ruyadorno =darcyclarke =isaacs 2020-09-30 1.0.1 npm bad map npmcli libnpm cli workspaces map-workspaces -libnpmversion library to do the things that 'npm version' does =nlf =ruyadorno =darcyclarke =isaacs 2020-11-04 1.0.7 -@types/libnpmsearch TypeScript definitions for libnpmsearch =types 2019-09-26 2.0.1 -pkg-no-desc =lukekarrys 2019-09-26 1.0.0 +libnpm Collection of programmatic APIs for the npm CLI =nlf =ruyadorno =darcyclarke =isaacs 2019-07-16 3.0.1 npm api package manager lib +libnpmaccess programmatic library for \`npm access\` commands =nlf =ruyadorno =darcyclarke =isaacs 2020-11-03 4.0.1 libnpmaccess +@evocateur/libnpmaccess programmatic library for \`npm access\` commands =evocateur 2019-07-16 3.1.2 +@evocateur/libnpmpublish Programmatic API for the bits behind npm publish and unpublish =evocateur 2019-07-16 1.2.2 +libnpmorg Programmatic api for \`npm org\` commands =nlf =ruyadorno =darcyclarke =isaacs 2020-11-03 2.0.1 libnpm npm package manager api orgs teams +libnpmsearch Programmatic API for searching in npm and compatible registries. =nlf =ruyadorno =darcyclarke =isaacs 2020-12-08 3.1.0 npm search api libnpm +libnpmteam npm Team management APIs =nlf =ruyadorno =darcyclarke =isaacs 2020-11-03 2.0.2 +libnpmhook programmatic API for managing npm registry hooks =nlf =ruyadorno =darcyclarke =isaacs 2020-11-03 6.0.1 npm hooks registry npm api +libnpmpublish Programmatic API for the bits behind npm publish and unpublish =nlf =ruyadorno =darcyclarke =isaacs 2020-11-03 4.0.0 +libnpmfund Programmatic API for npm fund =nlf =ruyadorno =darcyclarke =isaacs 2020-12-08 1.0.2 npm npmcli libnpm cli git fund gitfund +@npmcli/map-workspaces Retrieves a name:pathname Map for a given workspaces config =nlf =ruyadorno =darcyclarke =isaacs 2020-09-30 1.0.1 npm bad map npmcli libnpm cli workspaces map-workspaces +libnpmversion library to do the things that 'npm version' does =nlf =ruyadorno =darcyclarke =isaacs 2020-11-04 1.0.7 +@types/libnpmsearch TypeScript definitions for libnpmsearch =types 2019-09-26 2.0.1 +pkg-no-desc =lukekarrys 2019-09-26 1.0.0 ` exports[`test/lib/commands/search.js TAP search > should have filtered expected search results 1`] = ` diff --git a/deps/npm/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs b/deps/npm/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs index 878dfd4be4705b..7a8d79017f36a2 100644 --- a/deps/npm/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/utils/sbom-cyclonedx.js.test.cjs @@ -912,6 +912,61 @@ exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with license express } ` +exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with license object > must match snapshot 1`] = ` +{ + "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", + "bomFormat": "CycloneDX", + "specVersion": "1.5", + "serialNumber": "urn:uuid:00000000-0000-0000-0000-000000000000", + "version": 1, + "metadata": { + "timestamp": "2020-01-01T00:00:00.000Z", + "lifecycles": [ + { + "phase": "build" + } + ], + "tools": [ + { + "vendor": "npm", + "name": "cli", + "version": "10.0.0 " + } + ], + "component": { + "bom-ref": "root@1.0.0", + "type": "library", + "name": "root", + "version": "1.0.0", + "scope": "required", + "author": "Author", + "purl": "pkg:npm/root@1.0.0", + "properties": [ + { + "name": "cdx:npm:package:path", + "value": "" + } + ], + "externalReferences": [], + "licenses": [ + { + "license": { + "id": "MIT" + } + } + ] + } + }, + "components": [], + "dependencies": [ + { + "ref": "root@1.0.0", + "dependsOn": [] + } + ] +} +` + exports[`test/lib/utils/sbom-cyclonedx.js TAP single node - with repository url > must match snapshot 1`] = ` { "$schema": "http://cyclonedx.org/schema/bom-1.5.schema.json", diff --git a/deps/npm/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs b/deps/npm/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs index 890bd29b7d2639..aeda27793a04ff 100644 --- a/deps/npm/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs +++ b/deps/npm/tap-snapshots/test/lib/utils/sbom-spdx.js.test.cjs @@ -504,3 +504,138 @@ exports[`test/lib/utils/sbom-spdx.js TAP single node - with integrity > must mat ] } ` + +exports[`test/lib/utils/sbom-spdx.js TAP single node - with license expression > must match snapshot 1`] = ` +{ + "spdxVersion": "SPDX-2.3", + "dataLicense": "CC0-1.0", + "SPDXID": "SPDXRef-DOCUMENT", + "name": "root@1.0.0", + "documentNamespace": "docns", + "creationInfo": { + "created": "2020-01-01T00:00:00.000Z", + "creators": [ + "Tool: npm/cli-10.0.0 " + ] + }, + "documentDescribes": [ + "SPDXRef-Package-root-1.0.0" + ], + "packages": [ + { + "name": "root", + "SPDXID": "SPDXRef-Package-root-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "(MIT OR Apache-2.0)", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/root@1.0.0" + } + ] + } + ], + "relationships": [ + { + "spdxElementId": "SPDXRef-DOCUMENT", + "relatedSpdxElement": "SPDXRef-Package-root-1.0.0", + "relationshipType": "DESCRIBES" + } + ] +} +` + +exports[`test/lib/utils/sbom-spdx.js TAP single node - with license object > must match snapshot 1`] = ` +{ + "spdxVersion": "SPDX-2.3", + "dataLicense": "CC0-1.0", + "SPDXID": "SPDXRef-DOCUMENT", + "name": "root@1.0.0", + "documentNamespace": "docns", + "creationInfo": { + "created": "2020-01-01T00:00:00.000Z", + "creators": [ + "Tool: npm/cli-10.0.0 " + ] + }, + "documentDescribes": [ + "SPDXRef-Package-root-1.0.0" + ], + "packages": [ + { + "name": "root", + "SPDXID": "SPDXRef-Package-root-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "MIT", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/root@1.0.0" + } + ] + } + ], + "relationships": [ + { + "spdxElementId": "SPDXRef-DOCUMENT", + "relatedSpdxElement": "SPDXRef-Package-root-1.0.0", + "relationshipType": "DESCRIBES" + } + ] +} +` + +exports[`test/lib/utils/sbom-spdx.js TAP single node - with single license > must match snapshot 1`] = ` +{ + "spdxVersion": "SPDX-2.3", + "dataLicense": "CC0-1.0", + "SPDXID": "SPDXRef-DOCUMENT", + "name": "root@1.0.0", + "documentNamespace": "docns", + "creationInfo": { + "created": "2020-01-01T00:00:00.000Z", + "creators": [ + "Tool: npm/cli-10.0.0 " + ] + }, + "documentDescribes": [ + "SPDXRef-Package-root-1.0.0" + ], + "packages": [ + { + "name": "root", + "SPDXID": "SPDXRef-Package-root-1.0.0", + "versionInfo": "1.0.0", + "packageFileName": "", + "downloadLocation": "NOASSERTION", + "filesAnalyzed": false, + "homepage": "NOASSERTION", + "licenseDeclared": "ISC", + "externalRefs": [ + { + "referenceCategory": "PACKAGE-MANAGER", + "referenceType": "purl", + "referenceLocator": "pkg:npm/root@1.0.0" + } + ] + } + ], + "relationships": [ + { + "spdxElementId": "SPDXRef-DOCUMENT", + "relatedSpdxElement": "SPDXRef-Package-root-1.0.0", + "relationshipType": "DESCRIBES" + } + ] +} +` diff --git a/deps/npm/test/lib/commands/exec.js b/deps/npm/test/lib/commands/exec.js index 07a3e6ebd8ed95..3cb4e90e855fe4 100644 --- a/deps/npm/test/lib/commands/exec.js +++ b/deps/npm/test/lib/commands/exec.js @@ -88,7 +88,7 @@ t.test('--prefix', async t => { t.ok(exists.isFile(), 'bin ran, creating file') }) -t.test('workspaces', async t => { +t.test('runs in workspace path', async t => { const registry = new MockRegistry({ tap: t, registry: 'https://registry.npmjs.org/', @@ -124,12 +124,101 @@ t.test('workspaces', async t => { await registry.package({ manifest, tarballs: { '1.0.0': path.join(npm.prefix, 'npm-exec-test'), - } }) + }, + }) await npm.exec('exec', ['@npmcli/npx-test']) const exists = await fs.stat(path.join(npm.prefix, 'workspace-a', 'npm-exec-test-success')) t.ok(exists.isFile(), 'bin ran, creating file inside workspace') }) +t.test('finds workspace bin first', async t => { + const { npm } = await loadMockNpm(t, { + config: { + workspace: ['workspace-a'], + }, + prefixDir: { + 'package.json': JSON.stringify({ + name: '@npmcli/npx-workspace-root-test', + bin: { 'npx-test': 'index.js' }, + workspaces: ['workspace-a'], + }), + 'index.js': `#!/usr/bin/env node + require('fs').writeFileSync('npm-exec-test-fail', '')`, + 'workspace-a': { + 'package.json': JSON.stringify({ + name: '@npmcli/npx-workspace-test', + bin: { 'npx-test': 'index.js' }, + }), + 'index.js': `#!/usr/bin/env node + require('fs').writeFileSync('npm-exec-test-success', '')`, + }, + }, + }) + + await npm.exec('install', []) // reify + await npm.exec('exec', ['npx-test']) + const exists = await fs.stat(path.join(npm.prefix, 'workspace-a', 'npm-exec-test-success')) + t.ok(exists.isFile(), 'bin ran, creating file inside workspace') + t.rejects(fs.stat(path.join(npm.prefix, 'npm-exec-test-fail'))) +}) + +t.test('finds workspace dep first', async t => { + const registry = new MockRegistry({ + tap: t, + registry: 'https://registry.npmjs.org/', + }) + + const manifest = registry.manifest({ name: '@npmcli/subdep', versions: ['1.0.0', '2.0.0'] }) + manifest.versions['1.0.0'].bin = { 'npx-test': 'index.js' } + manifest.versions['2.0.0'].bin = { 'npx-test': 'index.js' } + + const { npm } = await loadMockNpm(t, { + prefixDir: { + subdep: { + one: { + 'package.json': JSON.stringify(manifest.versions['1.0.0']), + 'index.js': `#!/usr/bin/env node + require('fs').writeFileSync('npm-exec-test-one', '')`, + }, + two: { + 'package.json': JSON.stringify(manifest.versions['2.0.0']), + 'index.js': `#!/usr/bin/env node + require('fs').writeFileSync('npm-exec-test-two', '')`, + }, + }, + 'package.json': JSON.stringify({ + name: '@npmcli/npx-workspace-root-test', + dependencies: { '@npmcli/subdep': '1.0.0' }, + bin: { 'npx-test': 'index.js' }, + workspaces: ['workspace-a'], + }), + 'index.js': `#!/usr/bin/env node + require('fs').writeFileSync('npm-exec-test-fail', '')`, + 'workspace-a': { + 'package.json': JSON.stringify({ + name: '@npmcli/npx-workspace-test', + dependencies: { '@npmcli/subdep': '2.0.0' }, + bin: { 'npx-test': 'index.js' }, + }), + 'index.js': `#!/usr/bin/env node + require('fs').writeFileSync('npm-exec-test-success', '')`, + }, + }, + }) + + await registry.package({ manifest, + tarballs: { + '1.0.0': path.join(npm.prefix, 'subdep', 'one'), + '2.0.0': path.join(npm.prefix, 'subdep', 'two'), + }, + }) + await npm.exec('install', []) + npm.config.set('workspace', ['workspace-a']) + await npm.exec('exec', ['npx-test']) + const exists = await fs.stat(path.join(npm.prefix, 'workspace-a', 'npm-exec-test-success')) + t.ok(exists.isFile(), 'bin ran, creating file') +}) + t.test('npx --no-install @npmcli/npx-test', async t => { const registry = new MockRegistry({ tap: t, diff --git a/deps/npm/test/lib/commands/hook.js b/deps/npm/test/lib/commands/hook.js index d3de4f5c55efad..448045cdd69162 100644 --- a/deps/npm/test/lib/commands/hook.js +++ b/deps/npm/test/lib/commands/hook.js @@ -243,7 +243,8 @@ t.test('npm hook ls', async t => { 'received the correct arguments' ) t.equal(outputs[0][0], 'You have 3 hooks configured.', 'prints the correct header') - const out = require('strip-ansi')(outputs[1][0]) + const { default: stripAnsi } = await import('strip-ansi') + const out = stripAnsi(outputs[1][0]) t.match(out, /semver.*https:\/\/google.com.*\n.*\n.*never triggered/, 'prints package hook') t.match(out, /@npmcli.*https:\/\/google.com.*\n.*\n.*triggered just now/, 'prints scope hook') t.match(out, /~npm.*https:\/\/google.com.*\n.*\n.*never triggered/, 'prints owner hook') @@ -292,7 +293,8 @@ t.test('npm hook ls, single result', async t => { 'received the correct arguments' ) t.equal(outputs[0][0], 'You have one hook configured.', 'prints the correct header') - const out = require('strip-ansi')(outputs[1][0]) + const { default: stripAnsi } = await import('strip-ansi') + const out = stripAnsi(outputs[1][0]) t.match(out, /semver.*https:\/\/google.com.*\n.*\n.*never triggered/, 'prints package hook') }) diff --git a/deps/npm/test/lib/commands/org.js b/deps/npm/test/lib/commands/org.js index 5c239295c33432..ed8fb238c4b0d8 100644 --- a/deps/npm/test/lib/commands/org.js +++ b/deps/npm/test/lib/commands/org.js @@ -1,5 +1,4 @@ const t = require('tap') -const ansiTrim = require('strip-ansi') const mockNpm = require('../../fixtures/mock-npm') const mockOrg = async (t, { orgSize = 1, orgList = {}, ...npmOpts } = {}) => { @@ -427,7 +426,8 @@ t.test('npm org ls', async t => { }, 'receieved the correct args' ) - const out = ansiTrim(outputs[0][0]) + const { default: stripAnsi } = await import('strip-ansi') + const out = stripAnsi(outputs[0][0]) t.match(out, /one.*developer/, 'contains the developer member') t.match(out, /two.*admin/, 'contains the admin member') t.match(out, /three.*owner/, 'contains the owner member') @@ -452,7 +452,8 @@ t.test('npm org ls - user filter', async t => { }, 'receieved the correct args' ) - const out = ansiTrim(outputs[0][0]) + const { default: stripAnsi } = await import('strip-ansi') + const out = stripAnsi(outputs[0][0]) t.match(out, /username.*admin/, 'contains the filtered member') t.notMatch(out, /missing.*admin/, 'does not contain other members') }) @@ -475,7 +476,8 @@ t.test('npm org ls - user filter, missing user', async t => { }, 'receieved the correct args' ) - const out = ansiTrim(outputs[0][0]) + const { default: stripAnsi } = await import('strip-ansi') + const out = stripAnsi(outputs[0][0]) t.notMatch(out, /username/, 'does not contain the requested member') t.notMatch(out, /missing.*admin/, 'does not contain other members') }) diff --git a/deps/npm/test/lib/commands/pkg.js b/deps/npm/test/lib/commands/pkg.js index f3401bde5226a8..168870f59d9d1e 100644 --- a/deps/npm/test/lib/commands/pkg.js +++ b/deps/npm/test/lib/commands/pkg.js @@ -662,6 +662,43 @@ t.test('workspaces', async t => { ) }) +t.test('single workspace', async t => { + const { pkg, OUTPUT } = await mockNpm(t, { + prefixDir: { + 'package.json': JSON.stringify({ + name: 'root', + version: '1.0.0', + workspaces: [ + 'packages/*', + ], + }), + packages: { + a: { + 'package.json': JSON.stringify({ + name: 'a', + version: '1.0.0', + }), + }, + b: { + 'package.json': JSON.stringify({ + name: 'b', + version: '1.2.3', + }), + }, + }, + }, + config: { workspace: ['packages/a'] }, + }) + + await pkg('get', 'name', 'version') + + t.strictSame( + JSON.parse(OUTPUT()), + { a: { name: 'a', version: '1.0.0' } }, + 'should only return info for one workspace' + ) +}) + t.test('fix', async t => { const { pkg, readPackageJson } = await mockNpm(t, { prefixDir: { diff --git a/deps/npm/test/lib/utils/open-url.js b/deps/npm/test/lib/utils/open-url.js index 0ce1b57aa5f9f7..dab7b41b92f1fb 100644 --- a/deps/npm/test/lib/utils/open-url.js +++ b/deps/npm/test/lib/utils/open-url.js @@ -124,7 +124,7 @@ t.test('prints where to go when given browser does not exist', async t => { const { openerUrl, openerOpts, joinedOutput } = await mockOpenUrl(t, ['https://www.npmjs.com', 'npm home'], { - openerResult: Object.assign(new Error('failed'), { code: 'ENOENT' }), + openerResult: Object.assign(new Error('failed'), { code: 127 }), } ) diff --git a/deps/npm/test/lib/utils/sbom-cyclonedx.js b/deps/npm/test/lib/utils/sbom-cyclonedx.js index 540feb9eb0ee34..da9b3f757988b4 100644 --- a/deps/npm/test/lib/utils/sbom-cyclonedx.js +++ b/deps/npm/test/lib/utils/sbom-cyclonedx.js @@ -190,6 +190,20 @@ t.test('single node - with license expression', t => { t.end() }) +t.test('single node - with license object', t => { + const pkg = { + ...rootPkg, + license: { + type: 'MIT', + url: 'http://github.com/kriskowal/q/raw/master/LICENSE', + }, + } + const node = { ...root, package: pkg } + const res = cyclonedxOutput({ npm, nodes: [node] }) + t.matchSnapshot(JSON.stringify(res)) + t.end() +}) + t.test('single node - from git url', t => { const node = { ...root, type: 'git', resolved: 'https://github.com/foo/bar#1234' } const res = cyclonedxOutput({ npm, nodes: [node] }) @@ -205,13 +219,15 @@ t.test('single node - no package info', t => { }) t.test('node - with deps', t => { - const node = { ...root, + const node = { + ...root, edgesOut: [ { to: dep1 }, { to: dep2 }, { to: undefined }, { to: { pkgid: 'foo' } }, - ] } + ], + } const res = cyclonedxOutput({ npm, nodes: [node, dep1, dep2, dep2Link] }) t.matchSnapshot(JSON.stringify(res)) t.end() diff --git a/deps/npm/test/lib/utils/sbom-spdx.js b/deps/npm/test/lib/utils/sbom-spdx.js index 74f6c3f34e71c4..d69e85667dc85b 100644 --- a/deps/npm/test/lib/utils/sbom-spdx.js +++ b/deps/npm/test/lib/utils/sbom-spdx.js @@ -109,6 +109,36 @@ t.test('single node - application package type', t => { t.end() }) +t.test('single node - with single license', t => { + const pkg = { ...rootPkg, license: 'ISC' } + const node = { ...root, package: pkg } + const res = spdxOutput({ npm, nodes: [node] }) + t.matchSnapshot(JSON.stringify(res)) + t.end() +}) + +t.test('single node - with license object', t => { + const pkg = { + ...rootPkg, + license: { + type: 'MIT', + url: 'http://github.com/kriskowal/q/raw/master/LICENSE', + }, + } + const node = { ...root, package: pkg } + const res = spdxOutput({ npm, nodes: [node] }) + t.matchSnapshot(JSON.stringify(res)) + t.end() +}) + +t.test('single node - with license expression', t => { + const pkg = { ...rootPkg, license: '(MIT OR Apache-2.0)' } + const node = { ...root, package: pkg } + const res = spdxOutput({ npm, nodes: [node] }) + t.matchSnapshot(JSON.stringify(res)) + t.end() +}) + t.test('single node - with description', t => { const pkg = { ...rootPkg, description: 'Package description' } const node = { ...root, package: pkg } diff --git a/deps/openssl/BUILD.gn b/deps/openssl/BUILD.gn new file mode 100644 index 00000000000000..7d2db10a84c6c4 --- /dev/null +++ b/deps/openssl/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +openssl_gn_build("openssl") { +} diff --git a/deps/openssl/openssl_common.gypi b/deps/openssl/openssl_common.gypi index 1290fff251fc5b..8745ec130ab878 100644 --- a/deps/openssl/openssl_common.gypi +++ b/deps/openssl/openssl_common.gypi @@ -26,7 +26,7 @@ }, 'OS=="win"', { 'defines': [ ## default of Win. See INSTALL in openssl repo. - 'OPENSSLDIR="C:\\\Program\ Files\\\Common\ Files\\\SSL"', + 'OPENSSLDIR="C:\\\\Program\\ Files\\\\Common\\ Files\\\\SSL"', 'ENGINESDIR="NUL"', 'OPENSSL_SYS_WIN32', 'WIN32_LEAN_AND_MEAN', 'L_ENDIAN', '_CRT_SECURE_NO_DEPRECATE', 'UNICODE', '_UNICODE', diff --git a/deps/openssl/unofficial.gni b/deps/openssl/unofficial.gni new file mode 100644 index 00000000000000..9b94ccb275e7bc --- /dev/null +++ b/deps/openssl/unofficial.gni @@ -0,0 +1,151 @@ +# Copyright 2019 the V8 project authors. All rights reserved. +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +declare_args() { + # Do not build optimized assembly for OpenSSL + # FIXME(zcbenz): asm code does not compile with clang. + openssl_no_asm = true +} + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("openssl_gn_build") { + config("openssl_external_config") { + include_dirs = [ + "openssl/crypto/include", + "openssl/include", + ] + } + + config("openssl_internal_config") { + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("openssl.gypi") ], + "scope", + [ "openssl.gypi" ]) + + defines = [ + "MODULESDIR=\"deps/openssl/lib/openssl-modules\"", + "OPENSSL_API_COMPAT=0x10100001L", + "STATIC_LEGACY", + ] + gypi_values.openssl_default_defines_all + if (is_win) { + defines += [ + ## default of Win. See INSTALL in openssl repo. + "OPENSSLDIR=\"C:\\\Program\ Files\\\Common\ Files\\\SSL\"", + "ENGINESDIR=\"NUL\"", + "OPENSSL_SYS_WIN32", "WIN32_LEAN_AND_MEAN", "L_ENDIAN", + "_CRT_SECURE_NO_DEPRECATE", "UNICODE", "_UNICODE", + ] + } else if (is_mac) { + defines += [ + "OPENSSLDIR=\"/System/Library/OpenSSL/\"", + "ENGINESDIR=\"/dev/null\"", + ] + } else { + defines += [ + "OPENSSLDIR=\"/etc/ssl\"", + "ENGINESDIR=\"/dev/null\"", + "TERMIOS", + ] + } + + if (is_posix) { + asmflags = [ "-fPIC" ] + cflags = [ "-fPIC" ] + ldflags = [ "-fPIC" ] + } + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-atomic-alignment", + "-Wno-constant-conversion", + "-Wno-implicit-fallthrough", + "-Wno-implicit-function-declaration", + "-Wno-sign-compare", + "-Wno-unknown-escape-sequence", + "-Wno-unreachable-code", + "-Wno-unreachable-code-break", + "-Wno-unreachable-code-return", + "-Wno-unused-function", + ] + } + if (is_win) { + libs = [ "crypt32.lib" ] + } else if (is_linux) { + libs = [ "atomic" ] + } + + common_gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("openssl_common.gypi") ], + "scope", + [ "openssl_common.gypi" ]) + include_dirs = common_gypi_values.include_dirs + } + + static_library(target_name) { + forward_variables_from(invoker, "*") + + configs += [ ":openssl_internal_config" ] + public_configs = [ ":openssl_external_config" ] + + config_path_name = "" + if (is_win) { + if (target_cpu == "x86") { + config_path_name = "VC-WIN32" + } else if (target_cpu == "x64") { + config_path_name = "VC-WIN64A" + } else if (target_cpu == "arm64") { + config_path_name = "VC-WIN64-ARM" + } + } else if (is_linux) { + if (target_cpu == "x86") { + config_path_name = "linux-elf" + } else if (target_cpu == "x64") { + config_path_name = "linux-x86_64" + } else if (target_cpu == "arm") { + config_path_name = "linux-armv4" + } else if (target_cpu == "arm64") { + config_path_name = "linux-aarch64" + } + } else if (is_apple) { + if (target_cpu == "x86") { + config_path_name = "darwin-i386-cc" + } else if (target_cpu == "x64") { + config_path_name = "darwin64-x86_64-cc" + } else if (target_cpu == "arm64") { + config_path_name = "darwin64-arm64-cc" + } + } + assert(config_path_name != "", "Unsupported platform") + + # GN variables can not have - in name. + config_name = string_replace(config_path_name, "-", "_") + + if (openssl_no_asm) { + asm_name = "no-asm" + } else { + # TODO(zcbenz): Check gas_version and nasm_version. + asm_name = "asm_avx2" + } + if (is_win && target_cpu == "arm64") { + asm_name = "no-asm" + } + config_path = "config/archs/" + config_path_name + "/" + asm_name + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path(config_path + "/openssl.gypi"), ], + "scope", + [ config_path + "/openssl.gypi" ]) + + include_dirs = rebase_path(gypi_values.include_dirs, ".", config_path) + defines = gypi_values["openssl_defines_" + config_name] + sources = filter_exclude(gypi_values.openssl_sources + + gypi_values["openssl_sources_" + config_name], + [ "*.ld" ]) + } +} diff --git a/deps/postject/BUILD.gn b/deps/postject/BUILD.gn new file mode 100644 index 00000000000000..895b5bfc5b3a1a --- /dev/null +++ b/deps/postject/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +postject_gn_build("postject") { +} diff --git a/deps/postject/unofficial.gni b/deps/postject/unofficial.gni new file mode 100644 index 00000000000000..6a4d2ddb36e782 --- /dev/null +++ b/deps/postject/unofficial.gni @@ -0,0 +1,21 @@ +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("postject_gn_build") { + config("postject_config") { + include_dirs = [ "." ] + } + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":postject_config" ] + sources = [ "postject-api.h" ] + } +} diff --git a/deps/simdjson/BUILD.gn b/deps/simdjson/BUILD.gn new file mode 100644 index 00000000000000..d0580ccf354d20 --- /dev/null +++ b/deps/simdjson/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +simdjson_gn_build("simdjson") { +} diff --git a/deps/simdjson/LICENSE b/deps/simdjson/LICENSE new file mode 100644 index 00000000000000..71f65b598d907f --- /dev/null +++ b/deps/simdjson/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "{}" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2018-2023 The simdjson authors + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/deps/simdjson/simdjson.cpp b/deps/simdjson/simdjson.cpp new file mode 100644 index 00000000000000..6de55c7222448d --- /dev/null +++ b/deps/simdjson/simdjson.cpp @@ -0,0 +1,43382 @@ +/* auto-generated on 2023-12-01 13:55:28 -0500. Do not edit! */ +/* including simdjson.cpp: */ +/* begin file simdjson.cpp */ +#define SIMDJSON_SRC_SIMDJSON_CPP + +/* including base.h: #include */ +/* begin file base.h */ +#ifndef SIMDJSON_SRC_BASE_H +#define SIMDJSON_SRC_BASE_H + +/* including simdjson/base.h: #include */ +/* begin file simdjson/base.h */ +/** + * @file Base declarations for all simdjson headers + * @private + */ +#ifndef SIMDJSON_BASE_H +#define SIMDJSON_BASE_H + +/* including simdjson/common_defs.h: #include "simdjson/common_defs.h" */ +/* begin file simdjson/common_defs.h */ +#ifndef SIMDJSON_COMMON_DEFS_H +#define SIMDJSON_COMMON_DEFS_H + +#include +/* including simdjson/compiler_check.h: #include "simdjson/compiler_check.h" */ +/* begin file simdjson/compiler_check.h */ +#ifndef SIMDJSON_COMPILER_CHECK_H +#define SIMDJSON_COMPILER_CHECK_H + +#ifndef __cplusplus +#error simdjson requires a C++ compiler +#endif + +#ifndef SIMDJSON_CPLUSPLUS +#if defined(_MSVC_LANG) && !defined(__clang__) +#define SIMDJSON_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG) +#else +#define SIMDJSON_CPLUSPLUS __cplusplus +#endif +#endif + +// C++ 17 +#if !defined(SIMDJSON_CPLUSPLUS17) && (SIMDJSON_CPLUSPLUS >= 201703L) +#define SIMDJSON_CPLUSPLUS17 1 +#endif + +// C++ 14 +#if !defined(SIMDJSON_CPLUSPLUS14) && (SIMDJSON_CPLUSPLUS >= 201402L) +#define SIMDJSON_CPLUSPLUS14 1 +#endif + +// C++ 11 +#if !defined(SIMDJSON_CPLUSPLUS11) && (SIMDJSON_CPLUSPLUS >= 201103L) +#define SIMDJSON_CPLUSPLUS11 1 +#endif + +#ifndef SIMDJSON_CPLUSPLUS11 +#error simdjson requires a compiler compliant with the C++11 standard +#endif + +#ifndef SIMDJSON_IF_CONSTEXPR +#if SIMDJSON_CPLUSPLUS17 +#define SIMDJSON_IF_CONSTEXPR if constexpr +#else +#define SIMDJSON_IF_CONSTEXPR if +#endif +#endif + +#endif // SIMDJSON_COMPILER_CHECK_H +/* end file simdjson/compiler_check.h */ +/* including simdjson/portability.h: #include "simdjson/portability.h" */ +/* begin file simdjson/portability.h */ +#ifndef SIMDJSON_PORTABILITY_H +#define SIMDJSON_PORTABILITY_H + +#include +#include +#include +#include +#include +#ifndef _WIN32 +// strcasecmp, strncasecmp +#include +#endif + +#ifdef _MSC_VER +#define SIMDJSON_VISUAL_STUDIO 1 +/** + * We want to differentiate carefully between + * clang under visual studio and regular visual + * studio. + * + * Under clang for Windows, we enable: + * * target pragmas so that part and only part of the + * code gets compiled for advanced instructions. + * + */ +#ifdef __clang__ +// clang under visual studio +#define SIMDJSON_CLANG_VISUAL_STUDIO 1 +#else +// just regular visual studio (best guess) +#define SIMDJSON_REGULAR_VISUAL_STUDIO 1 +#endif // __clang__ +#endif // _MSC_VER + +#if defined(__x86_64__) || defined(_M_AMD64) +#define SIMDJSON_IS_X86_64 1 +#elif defined(__aarch64__) || defined(_M_ARM64) +#define SIMDJSON_IS_ARM64 1 +#elif defined(__riscv) && __riscv_xlen == 64 +#define SIMDJSON_IS_RISCV64 1 +#elif defined(__PPC64__) || defined(_M_PPC64) +#if defined(__ALTIVEC__) +#define SIMDJSON_IS_PPC64_VMX 1 +#endif // defined(__ALTIVEC__) +#else +#define SIMDJSON_IS_32BITS 1 + +#if defined(_M_IX86) || defined(__i386__) +#define SIMDJSON_IS_X86_32BITS 1 +#elif defined(__arm__) || defined(_M_ARM) +#define SIMDJSON_IS_ARM_32BITS 1 +#elif defined(__PPC__) || defined(_M_PPC) +#define SIMDJSON_IS_PPC_32BITS 1 +#endif + +#endif // defined(__x86_64__) || defined(_M_AMD64) +#ifndef SIMDJSON_IS_32BITS +#define SIMDJSON_IS_32BITS 0 +#endif + +#if SIMDJSON_IS_32BITS +#ifndef SIMDJSON_NO_PORTABILITY_WARNING +// In the future, we should allow programmers +// to get warning. +#endif // SIMDJSON_NO_PORTABILITY_WARNING +#endif // SIMDJSON_IS_32BITS + +#define SIMDJSON_CAT_IMPLEMENTATION_(a,...) a ## __VA_ARGS__ +#define SIMDJSON_CAT(a,...) SIMDJSON_CAT_IMPLEMENTATION_(a, __VA_ARGS__) + +#define SIMDJSON_STRINGIFY_IMPLEMENTATION_(a,...) #a SIMDJSON_STRINGIFY(__VA_ARGS__) +#define SIMDJSON_STRINGIFY(a,...) SIMDJSON_CAT_IMPLEMENTATION_(a, __VA_ARGS__) + +// this is almost standard? +#undef SIMDJSON_STRINGIFY_IMPLEMENTATION_ +#undef SIMDJSON_STRINGIFY +#define SIMDJSON_STRINGIFY_IMPLEMENTATION_(a) #a +#define SIMDJSON_STRINGIFY(a) SIMDJSON_STRINGIFY_IMPLEMENTATION_(a) + +// Our fast kernels require 64-bit systems. +// +// On 32-bit x86, we lack 64-bit popcnt, lzcnt, blsr instructions. +// Furthermore, the number of SIMD registers is reduced. +// +// On 32-bit ARM, we would have smaller registers. +// +// The simdjson users should still have the fallback kernel. It is +// slower, but it should run everywhere. + +// +// Enable valid runtime implementations, and select SIMDJSON_BUILTIN_IMPLEMENTATION +// + +// We are going to use runtime dispatch. +#if SIMDJSON_IS_X86_64 +#ifdef __clang__ +// clang does not have GCC push pop +// warning: clang attribute push can't be used within a namespace in clang up +// til 8.0 so SIMDJSON_TARGET_REGION and SIMDJSON_UNTARGET_REGION must be *outside* of a +// namespace. +#define SIMDJSON_TARGET_REGION(T) \ + _Pragma(SIMDJSON_STRINGIFY( \ + clang attribute push(__attribute__((target(T))), apply_to = function))) +#define SIMDJSON_UNTARGET_REGION _Pragma("clang attribute pop") +#elif defined(__GNUC__) +// GCC is easier +#define SIMDJSON_TARGET_REGION(T) \ + _Pragma("GCC push_options") _Pragma(SIMDJSON_STRINGIFY(GCC target(T))) +#define SIMDJSON_UNTARGET_REGION _Pragma("GCC pop_options") +#endif // clang then gcc + +#endif // x86 + +// Default target region macros don't do anything. +#ifndef SIMDJSON_TARGET_REGION +#define SIMDJSON_TARGET_REGION(T) +#define SIMDJSON_UNTARGET_REGION +#endif + +// Is threading enabled? +#if defined(_REENTRANT) || defined(_MT) +#ifndef SIMDJSON_THREADS_ENABLED +#define SIMDJSON_THREADS_ENABLED +#endif +#endif + +// workaround for large stack sizes under -O0. +// https://github.com/simdjson/simdjson/issues/691 +#ifdef __APPLE__ +#ifndef __OPTIMIZE__ +// Apple systems have small stack sizes in secondary threads. +// Lack of compiler optimization may generate high stack usage. +// Users may want to disable threads for safety, but only when +// in debug mode which we detect by the fact that the __OPTIMIZE__ +// macro is not defined. +#undef SIMDJSON_THREADS_ENABLED +#endif +#endif + + +#if defined(__clang__) +#define SIMDJSON_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined"))) +#elif defined(__GNUC__) +#define SIMDJSON_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize_undefined)) +#else +#define SIMDJSON_NO_SANITIZE_UNDEFINED +#endif + + +#if defined(__clang__) || defined(__GNUC__) +#if defined(__has_feature) +# if __has_feature(memory_sanitizer) +#define SIMDJSON_NO_SANITIZE_MEMORY __attribute__((no_sanitize("memory"))) +# endif // if __has_feature(memory_sanitizer) +#endif // defined(__has_feature) +#endif +// make sure it is defined as 'nothing' if it is unapplicable. +#ifndef SIMDJSON_NO_SANITIZE_MEMORY +#define SIMDJSON_NO_SANITIZE_MEMORY +#endif + +#if SIMDJSON_VISUAL_STUDIO +// This is one case where we do not distinguish between +// regular visual studio and clang under visual studio. +// clang under Windows has _stricmp (like visual studio) but not strcasecmp (as clang normally has) +#define simdjson_strcasecmp _stricmp +#define simdjson_strncasecmp _strnicmp +#else +// The strcasecmp, strncasecmp, and strcasestr functions do not work with multibyte strings (e.g. UTF-8). +// So they are only useful for ASCII in our context. +// https://www.gnu.org/software/libunistring/manual/libunistring.html#char-_002a-strings +#define simdjson_strcasecmp strcasecmp +#define simdjson_strncasecmp strncasecmp +#endif + +#if defined(NDEBUG) || defined(__OPTIMIZE__) || (defined(_MSC_VER) && !defined(_DEBUG)) +// If NDEBUG is set, or __OPTIMIZE__ is set, or we are under MSVC in release mode, +// then do away with asserts and use __assume. +#if SIMDJSON_VISUAL_STUDIO +#define SIMDJSON_UNREACHABLE() __assume(0) +#define SIMDJSON_ASSUME(COND) __assume(COND) +#else +#define SIMDJSON_UNREACHABLE() __builtin_unreachable(); +#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0) +#endif + +#else // defined(NDEBUG) || defined(__OPTIMIZE__) || (defined(_MSC_VER) && !defined(_DEBUG)) +// This should only ever be enabled in debug mode. +#define SIMDJSON_UNREACHABLE() assert(0); +#define SIMDJSON_ASSUME(COND) assert(COND) + +#endif + +#endif // SIMDJSON_PORTABILITY_H +/* end file simdjson/portability.h */ + +namespace simdjson { +namespace internal { +/** + * @private + * Our own implementation of the C++17 to_chars function. + * Defined in src/to_chars + */ +char *to_chars(char *first, const char *last, double value); +/** + * @private + * A number parsing routine. + * Defined in src/from_chars + */ +double from_chars(const char *first) noexcept; +double from_chars(const char *first, const char* end) noexcept; +} + +#ifndef SIMDJSON_EXCEPTIONS +#if __cpp_exceptions +#define SIMDJSON_EXCEPTIONS 1 +#else +#define SIMDJSON_EXCEPTIONS 0 +#endif +#endif + +} // namespace simdjson + +#if defined(__GNUC__) + // Marks a block with a name so that MCA analysis can see it. + #define SIMDJSON_BEGIN_DEBUG_BLOCK(name) __asm volatile("# LLVM-MCA-BEGIN " #name); + #define SIMDJSON_END_DEBUG_BLOCK(name) __asm volatile("# LLVM-MCA-END " #name); + #define SIMDJSON_DEBUG_BLOCK(name, block) BEGIN_DEBUG_BLOCK(name); block; END_DEBUG_BLOCK(name); +#else + #define SIMDJSON_BEGIN_DEBUG_BLOCK(name) + #define SIMDJSON_END_DEBUG_BLOCK(name) + #define SIMDJSON_DEBUG_BLOCK(name, block) +#endif + +// Align to N-byte boundary +#define SIMDJSON_ROUNDUP_N(a, n) (((a) + ((n)-1)) & ~((n)-1)) +#define SIMDJSON_ROUNDDOWN_N(a, n) ((a) & ~((n)-1)) + +#define SIMDJSON_ISALIGNED_N(ptr, n) (((uintptr_t)(ptr) & ((n)-1)) == 0) + +#if SIMDJSON_REGULAR_VISUAL_STUDIO + + #define simdjson_really_inline __forceinline + #define simdjson_never_inline __declspec(noinline) + + #define simdjson_unused + #define simdjson_warn_unused + + #ifndef simdjson_likely + #define simdjson_likely(x) x + #endif + #ifndef simdjson_unlikely + #define simdjson_unlikely(x) x + #endif + + #define SIMDJSON_PUSH_DISABLE_WARNINGS __pragma(warning( push )) + #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS __pragma(warning( push, 0 )) + #define SIMDJSON_DISABLE_VS_WARNING(WARNING_NUMBER) __pragma(warning( disable : WARNING_NUMBER )) + // Get rid of Intellisense-only warnings (Code Analysis) + // Though __has_include is C++17, it is supported in Visual Studio 2017 or better (_MSC_VER>=1910). + #ifdef __has_include + #if __has_include() + #include + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_VS_WARNING(ALL_CPPCORECHECK_WARNINGS) + #endif + #endif + + #ifndef SIMDJSON_DISABLE_UNDESIRED_WARNINGS + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS + #endif + + #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_VS_WARNING(4996) + #define SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING + #define SIMDJSON_POP_DISABLE_WARNINGS __pragma(warning( pop )) + + #define SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS + #define SIMDJSON_POP_DISABLE_UNUSED_WARNINGS + +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + + #define simdjson_really_inline inline __attribute__((always_inline)) + #define simdjson_never_inline inline __attribute__((noinline)) + + #define simdjson_unused __attribute__((unused)) + #define simdjson_warn_unused __attribute__((warn_unused_result)) + + #ifndef simdjson_likely + #define simdjson_likely(x) __builtin_expect(!!(x), 1) + #endif + #ifndef simdjson_unlikely + #define simdjson_unlikely(x) __builtin_expect(!!(x), 0) + #endif + + #define SIMDJSON_PUSH_DISABLE_WARNINGS _Pragma("GCC diagnostic push") + // gcc doesn't seem to disable all warnings with all and extra, add warnings here as necessary + // We do it separately for clang since it has different warnings. + #ifdef __clang__ + // clang is missing -Wmaybe-uninitialized. + #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS SIMDJSON_PUSH_DISABLE_WARNINGS \ + SIMDJSON_DISABLE_GCC_WARNING(-Weffc++) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wall) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wconversion) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wextra) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wattributes) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wimplicit-fallthrough) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wnon-virtual-dtor) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wreturn-type) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wshadow) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wunused-parameter) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable) + #else // __clang__ + #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS SIMDJSON_PUSH_DISABLE_WARNINGS \ + SIMDJSON_DISABLE_GCC_WARNING(-Weffc++) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wall) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wconversion) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wextra) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wattributes) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wimplicit-fallthrough) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wnon-virtual-dtor) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wreturn-type) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wshadow) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wunused-parameter) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wmaybe-uninitialized) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wformat-security) + #endif // __clang__ + + #define SIMDJSON_PRAGMA(P) _Pragma(#P) + #define SIMDJSON_DISABLE_GCC_WARNING(WARNING) SIMDJSON_PRAGMA(GCC diagnostic ignored #WARNING) + #if SIMDJSON_CLANG_VISUAL_STUDIO + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) + #else + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS + #endif + #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wdeprecated-declarations) + #define SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wstrict-overflow) + #define SIMDJSON_POP_DISABLE_WARNINGS _Pragma("GCC diagnostic pop") + + #define SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS SIMDJSON_PUSH_DISABLE_WARNINGS \ + SIMDJSON_DISABLE_GCC_WARNING(-Wunused) + #define SIMDJSON_POP_DISABLE_UNUSED_WARNINGS SIMDJSON_POP_DISABLE_WARNINGS + + + +#endif // MSC_VER + +#if defined(simdjson_inline) + // Prefer the user's definition of simdjson_inline; don't define it ourselves. +#elif defined(__GNUC__) && !defined(__OPTIMIZE__) + // If optimizations are disabled, forcing inlining can lead to significant + // code bloat and high compile times. Don't use simdjson_really_inline for + // unoptimized builds. + #define simdjson_inline inline +#else + // Force inlining for most simdjson functions. + #define simdjson_inline simdjson_really_inline +#endif + +#if SIMDJSON_VISUAL_STUDIO + /** + * Windows users need to do some extra work when building + * or using a dynamic library (DLL). When building, we need + * to set SIMDJSON_DLLIMPORTEXPORT to __declspec(dllexport). + * When *using* the DLL, the user needs to set + * SIMDJSON_DLLIMPORTEXPORT __declspec(dllimport). + * + * Static libraries not need require such work. + * + * It does not matter here whether you are using + * the regular visual studio or clang under visual + * studio, you still need to handle these issues. + * + * Non-Windows systems do not have this complexity. + */ + #if SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY + // We set SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY when we build a DLL under Windows. + // It should never happen that both SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY and + // SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY are set. + #define SIMDJSON_DLLIMPORTEXPORT __declspec(dllexport) + #elif SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY + // Windows user who call a dynamic library should set SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY to 1. + #define SIMDJSON_DLLIMPORTEXPORT __declspec(dllimport) + #else + // We assume by default static linkage + #define SIMDJSON_DLLIMPORTEXPORT + #endif + +/** + * Workaround for the vcpkg package manager. Only vcpkg should + * ever touch the next line. The SIMDJSON_USING_LIBRARY macro is otherwise unused. + */ +#if SIMDJSON_USING_LIBRARY +#define SIMDJSON_DLLIMPORTEXPORT __declspec(dllimport) +#endif +/** + * End of workaround for the vcpkg package manager. + */ +#else + #define SIMDJSON_DLLIMPORTEXPORT +#endif + +// C++17 requires string_view. +#if SIMDJSON_CPLUSPLUS17 +#define SIMDJSON_HAS_STRING_VIEW +#include // by the standard, this has to be safe. +#endif + +// This macro (__cpp_lib_string_view) has to be defined +// for C++17 and better, but if it is otherwise defined, +// we are going to assume that string_view is available +// even if we do not have C++17 support. +#ifdef __cpp_lib_string_view +#define SIMDJSON_HAS_STRING_VIEW +#endif + +// Some systems have string_view even if we do not have C++17 support, +// and even if __cpp_lib_string_view is undefined, it is the case +// with Apple clang version 11. +// We must handle it. *This is important.* +#ifndef SIMDJSON_HAS_STRING_VIEW +#if defined __has_include +// do not combine the next #if with the previous one (unsafe) +#if __has_include () +// now it is safe to trigger the include +#include // though the file is there, it does not follow that we got the implementation +#if defined(_LIBCPP_STRING_VIEW) +// Ah! So we under libc++ which under its Library Fundamentals Technical Specification, which preceded C++17, +// included string_view. +// This means that we have string_view *even though* we may not have C++17. +#define SIMDJSON_HAS_STRING_VIEW +#endif // _LIBCPP_STRING_VIEW +#endif // __has_include () +#endif // defined __has_include +#endif // def SIMDJSON_HAS_STRING_VIEW +// end of complicated but important routine to try to detect string_view. + +// +// Backfill std::string_view using nonstd::string_view on systems where +// we expect that string_view is missing. Important: if we get this wrong, +// we will end up with two string_view definitions and potential trouble. +// That is why we work so hard above to avoid it. +// +#ifndef SIMDJSON_HAS_STRING_VIEW +SIMDJSON_PUSH_DISABLE_ALL_WARNINGS +/* including simdjson/nonstd/string_view.hpp: #include "simdjson/nonstd/string_view.hpp" */ +/* begin file simdjson/nonstd/string_view.hpp */ +// Copyright 2017-2020 by Martin Moene +// +// string-view lite, a C++17-like string_view for C++98 and later. +// For more information see https://github.com/martinmoene/string-view-lite +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#pragma once + +#ifndef NONSTD_SV_LITE_H_INCLUDED +#define NONSTD_SV_LITE_H_INCLUDED + +#define string_view_lite_MAJOR 1 +#define string_view_lite_MINOR 7 +#define string_view_lite_PATCH 0 + +#define string_view_lite_VERSION nssv_STRINGIFY(string_view_lite_MAJOR) "." nssv_STRINGIFY(string_view_lite_MINOR) "." nssv_STRINGIFY(string_view_lite_PATCH) + +#define nssv_STRINGIFY( x ) nssv_STRINGIFY_( x ) +#define nssv_STRINGIFY_( x ) #x + +// string-view lite configuration: + +#define nssv_STRING_VIEW_DEFAULT 0 +#define nssv_STRING_VIEW_NONSTD 1 +#define nssv_STRING_VIEW_STD 2 + +// tweak header support: + +#ifdef __has_include +# if __has_include() +# include +# endif +#define nssv_HAVE_TWEAK_HEADER 1 +#else +#define nssv_HAVE_TWEAK_HEADER 0 +//# pragma message("string_view.hpp: Note: Tweak header not supported.") +#endif + +// string_view selection and configuration: + +#if !defined( nssv_CONFIG_SELECT_STRING_VIEW ) +# define nssv_CONFIG_SELECT_STRING_VIEW ( nssv_HAVE_STD_STRING_VIEW ? nssv_STRING_VIEW_STD : nssv_STRING_VIEW_NONSTD ) +#endif + +#ifndef nssv_CONFIG_STD_SV_OPERATOR +# define nssv_CONFIG_STD_SV_OPERATOR 0 +#endif + +#ifndef nssv_CONFIG_USR_SV_OPERATOR +# define nssv_CONFIG_USR_SV_OPERATOR 1 +#endif + +#ifdef nssv_CONFIG_CONVERSION_STD_STRING +# define nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS nssv_CONFIG_CONVERSION_STD_STRING +# define nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS nssv_CONFIG_CONVERSION_STD_STRING +#endif + +#ifndef nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS +# define nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS 1 +#endif + +#ifndef nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS +# define nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS 1 +#endif + +#ifndef nssv_CONFIG_NO_STREAM_INSERTION +# define nssv_CONFIG_NO_STREAM_INSERTION 0 +#endif + +// Control presence of exception handling (try and auto discover): + +#ifndef nssv_CONFIG_NO_EXCEPTIONS +# if defined(_MSC_VER) +# include // for _HAS_EXCEPTIONS +# endif +# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || (_HAS_EXCEPTIONS) +# define nssv_CONFIG_NO_EXCEPTIONS 0 +# else +# define nssv_CONFIG_NO_EXCEPTIONS 1 +# endif +#endif + +// C++ language version detection (C++23 is speculative): +// Note: VC14.0/1900 (VS2015) lacks too much from C++14. + +#ifndef nssv_CPLUSPLUS +# if defined(_MSVC_LANG ) && !defined(__clang__) +# define nssv_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG ) +# else +# define nssv_CPLUSPLUS __cplusplus +# endif +#endif + +#define nssv_CPP98_OR_GREATER ( nssv_CPLUSPLUS >= 199711L ) +#define nssv_CPP11_OR_GREATER ( nssv_CPLUSPLUS >= 201103L ) +#define nssv_CPP11_OR_GREATER_ ( nssv_CPLUSPLUS >= 201103L ) +#define nssv_CPP14_OR_GREATER ( nssv_CPLUSPLUS >= 201402L ) +#define nssv_CPP17_OR_GREATER ( nssv_CPLUSPLUS >= 201703L ) +#define nssv_CPP20_OR_GREATER ( nssv_CPLUSPLUS >= 202002L ) +#define nssv_CPP23_OR_GREATER ( nssv_CPLUSPLUS >= 202300L ) + +// use C++17 std::string_view if available and requested: + +#if nssv_CPP17_OR_GREATER && defined(__has_include ) +# if __has_include( ) +# define nssv_HAVE_STD_STRING_VIEW 1 +# else +# define nssv_HAVE_STD_STRING_VIEW 0 +# endif +#else +# define nssv_HAVE_STD_STRING_VIEW 0 +#endif + +#define nssv_USES_STD_STRING_VIEW ( (nssv_CONFIG_SELECT_STRING_VIEW == nssv_STRING_VIEW_STD) || ((nssv_CONFIG_SELECT_STRING_VIEW == nssv_STRING_VIEW_DEFAULT) && nssv_HAVE_STD_STRING_VIEW) ) + +#define nssv_HAVE_STARTS_WITH ( nssv_CPP20_OR_GREATER || !nssv_USES_STD_STRING_VIEW ) +#define nssv_HAVE_ENDS_WITH nssv_HAVE_STARTS_WITH + +// +// Use C++17 std::string_view: +// + +#if nssv_USES_STD_STRING_VIEW + +#include + +// Extensions for std::string: + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { + +template< class CharT, class Traits, class Allocator = std::allocator > +std::basic_string +to_string( std::basic_string_view v, Allocator const & a = Allocator() ) +{ + return std::basic_string( v.begin(), v.end(), a ); +} + +template< class CharT, class Traits, class Allocator > +std::basic_string_view +to_string_view( std::basic_string const & s ) +{ + return std::basic_string_view( s.data(), s.size() ); +} + +// Literal operators sv and _sv: + +#if nssv_CONFIG_STD_SV_OPERATOR + +using namespace std::literals::string_view_literals; + +#endif + +#if nssv_CONFIG_USR_SV_OPERATOR + +inline namespace literals { +inline namespace string_view_literals { + + +constexpr std::string_view operator "" _sv( const char* str, size_t len ) noexcept // (1) +{ + return std::string_view{ str, len }; +} + +constexpr std::u16string_view operator "" _sv( const char16_t* str, size_t len ) noexcept // (2) +{ + return std::u16string_view{ str, len }; +} + +constexpr std::u32string_view operator "" _sv( const char32_t* str, size_t len ) noexcept // (3) +{ + return std::u32string_view{ str, len }; +} + +constexpr std::wstring_view operator "" _sv( const wchar_t* str, size_t len ) noexcept // (4) +{ + return std::wstring_view{ str, len }; +} + +}} // namespace literals::string_view_literals + +#endif // nssv_CONFIG_USR_SV_OPERATOR + +} // namespace nonstd + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { + +using std::string_view; +using std::wstring_view; +using std::u16string_view; +using std::u32string_view; +using std::basic_string_view; + +// literal "sv" and "_sv", see above + +using std::operator==; +using std::operator!=; +using std::operator<; +using std::operator<=; +using std::operator>; +using std::operator>=; + +using std::operator<<; + +} // namespace nonstd + +#else // nssv_HAVE_STD_STRING_VIEW + +// +// Before C++17: use string_view lite: +// + +// Compiler versions: +// +// MSVC++ 6.0 _MSC_VER == 1200 nssv_COMPILER_MSVC_VERSION == 60 (Visual Studio 6.0) +// MSVC++ 7.0 _MSC_VER == 1300 nssv_COMPILER_MSVC_VERSION == 70 (Visual Studio .NET 2002) +// MSVC++ 7.1 _MSC_VER == 1310 nssv_COMPILER_MSVC_VERSION == 71 (Visual Studio .NET 2003) +// MSVC++ 8.0 _MSC_VER == 1400 nssv_COMPILER_MSVC_VERSION == 80 (Visual Studio 2005) +// MSVC++ 9.0 _MSC_VER == 1500 nssv_COMPILER_MSVC_VERSION == 90 (Visual Studio 2008) +// MSVC++ 10.0 _MSC_VER == 1600 nssv_COMPILER_MSVC_VERSION == 100 (Visual Studio 2010) +// MSVC++ 11.0 _MSC_VER == 1700 nssv_COMPILER_MSVC_VERSION == 110 (Visual Studio 2012) +// MSVC++ 12.0 _MSC_VER == 1800 nssv_COMPILER_MSVC_VERSION == 120 (Visual Studio 2013) +// MSVC++ 14.0 _MSC_VER == 1900 nssv_COMPILER_MSVC_VERSION == 140 (Visual Studio 2015) +// MSVC++ 14.1 _MSC_VER >= 1910 nssv_COMPILER_MSVC_VERSION == 141 (Visual Studio 2017) +// MSVC++ 14.2 _MSC_VER >= 1920 nssv_COMPILER_MSVC_VERSION == 142 (Visual Studio 2019) + +#if defined(_MSC_VER ) && !defined(__clang__) +# define nssv_COMPILER_MSVC_VER (_MSC_VER ) +# define nssv_COMPILER_MSVC_VERSION (_MSC_VER / 10 - 10 * ( 5 + (_MSC_VER < 1900 ) ) ) +#else +# define nssv_COMPILER_MSVC_VER 0 +# define nssv_COMPILER_MSVC_VERSION 0 +#endif + +#define nssv_COMPILER_VERSION( major, minor, patch ) ( 10 * ( 10 * (major) + (minor) ) + (patch) ) + +#if defined( __apple_build_version__ ) +# define nssv_COMPILER_APPLECLANG_VERSION nssv_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) +# define nssv_COMPILER_CLANG_VERSION 0 +#elif defined( __clang__ ) +# define nssv_COMPILER_APPLECLANG_VERSION 0 +# define nssv_COMPILER_CLANG_VERSION nssv_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) +#else +# define nssv_COMPILER_APPLECLANG_VERSION 0 +# define nssv_COMPILER_CLANG_VERSION 0 +#endif + +#if defined(__GNUC__) && !defined(__clang__) +# define nssv_COMPILER_GNUC_VERSION nssv_COMPILER_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#else +# define nssv_COMPILER_GNUC_VERSION 0 +#endif + +// half-open range [lo..hi): +#define nssv_BETWEEN( v, lo, hi ) ( (lo) <= (v) && (v) < (hi) ) + +// Presence of language and library features: + +#ifdef _HAS_CPP0X +# define nssv_HAS_CPP0X _HAS_CPP0X +#else +# define nssv_HAS_CPP0X 0 +#endif + +// Unless defined otherwise below, consider VC14 as C++11 for variant-lite: + +#if nssv_COMPILER_MSVC_VER >= 1900 +# undef nssv_CPP11_OR_GREATER +# define nssv_CPP11_OR_GREATER 1 +#endif + +#define nssv_CPP11_90 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1500) +#define nssv_CPP11_100 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1600) +#define nssv_CPP11_110 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1700) +#define nssv_CPP11_120 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1800) +#define nssv_CPP11_140 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1900) +#define nssv_CPP11_141 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1910) + +#define nssv_CPP14_000 (nssv_CPP14_OR_GREATER) +#define nssv_CPP17_000 (nssv_CPP17_OR_GREATER) + +// Presence of C++11 language features: + +#define nssv_HAVE_CONSTEXPR_11 nssv_CPP11_140 +#define nssv_HAVE_EXPLICIT_CONVERSION nssv_CPP11_140 +#define nssv_HAVE_INLINE_NAMESPACE nssv_CPP11_140 +#define nssv_HAVE_IS_DEFAULT nssv_CPP11_140 +#define nssv_HAVE_IS_DELETE nssv_CPP11_140 +#define nssv_HAVE_NOEXCEPT nssv_CPP11_140 +#define nssv_HAVE_NULLPTR nssv_CPP11_100 +#define nssv_HAVE_REF_QUALIFIER nssv_CPP11_140 +#define nssv_HAVE_UNICODE_LITERALS nssv_CPP11_140 +#define nssv_HAVE_USER_DEFINED_LITERALS nssv_CPP11_140 +#define nssv_HAVE_WCHAR16_T nssv_CPP11_100 +#define nssv_HAVE_WCHAR32_T nssv_CPP11_100 + +#if ! ( ( nssv_CPP11_OR_GREATER && nssv_COMPILER_CLANG_VERSION ) || nssv_BETWEEN( nssv_COMPILER_CLANG_VERSION, 300, 400 ) ) +# define nssv_HAVE_STD_DEFINED_LITERALS nssv_CPP11_140 +#else +# define nssv_HAVE_STD_DEFINED_LITERALS 0 +#endif + +// Presence of C++14 language features: + +#define nssv_HAVE_CONSTEXPR_14 nssv_CPP14_000 + +// Presence of C++17 language features: + +#define nssv_HAVE_NODISCARD nssv_CPP17_000 + +// Presence of C++ library features: + +#define nssv_HAVE_STD_HASH nssv_CPP11_120 + +// Presence of compiler intrinsics: + +// Providing char-type specializations for compare() and length() that +// use compiler intrinsics can improve compile- and run-time performance. +// +// The challenge is in using the right combinations of builtin availability +// and its constexpr-ness. +// +// | compiler | __builtin_memcmp (constexpr) | memcmp (constexpr) | +// |----------|------------------------------|---------------------| +// | clang | 4.0 (>= 4.0 ) | any (? ) | +// | clang-a | 9.0 (>= 9.0 ) | any (? ) | +// | gcc | any (constexpr) | any (? ) | +// | msvc | >= 14.2 C++17 (>= 14.2 ) | any (? ) | + +#define nssv_HAVE_BUILTIN_VER ( (nssv_CPP17_000 && nssv_COMPILER_MSVC_VERSION >= 142) || nssv_COMPILER_GNUC_VERSION > 0 || nssv_COMPILER_CLANG_VERSION >= 400 || nssv_COMPILER_APPLECLANG_VERSION >= 900 ) +#define nssv_HAVE_BUILTIN_CE ( nssv_HAVE_BUILTIN_VER ) + +#define nssv_HAVE_BUILTIN_MEMCMP ( (nssv_HAVE_CONSTEXPR_14 && nssv_HAVE_BUILTIN_CE) || !nssv_HAVE_CONSTEXPR_14 ) +#define nssv_HAVE_BUILTIN_STRLEN ( (nssv_HAVE_CONSTEXPR_11 && nssv_HAVE_BUILTIN_CE) || !nssv_HAVE_CONSTEXPR_11 ) + +#ifdef __has_builtin +# define nssv_HAVE_BUILTIN( x ) __has_builtin( x ) +#else +# define nssv_HAVE_BUILTIN( x ) 0 +#endif + +#if nssv_HAVE_BUILTIN(__builtin_memcmp) || nssv_HAVE_BUILTIN_VER +# define nssv_BUILTIN_MEMCMP __builtin_memcmp +#else +# define nssv_BUILTIN_MEMCMP memcmp +#endif + +#if nssv_HAVE_BUILTIN(__builtin_strlen) || nssv_HAVE_BUILTIN_VER +# define nssv_BUILTIN_STRLEN __builtin_strlen +#else +# define nssv_BUILTIN_STRLEN strlen +#endif + +// C++ feature usage: + +#if nssv_HAVE_CONSTEXPR_11 +# define nssv_constexpr constexpr +#else +# define nssv_constexpr /*constexpr*/ +#endif + +#if nssv_HAVE_CONSTEXPR_14 +# define nssv_constexpr14 constexpr +#else +# define nssv_constexpr14 /*constexpr*/ +#endif + +#if nssv_HAVE_EXPLICIT_CONVERSION +# define nssv_explicit explicit +#else +# define nssv_explicit /*explicit*/ +#endif + +#if nssv_HAVE_INLINE_NAMESPACE +# define nssv_inline_ns inline +#else +# define nssv_inline_ns /*inline*/ +#endif + +#if nssv_HAVE_NOEXCEPT +# define nssv_noexcept noexcept +#else +# define nssv_noexcept /*noexcept*/ +#endif + +//#if nssv_HAVE_REF_QUALIFIER +//# define nssv_ref_qual & +//# define nssv_refref_qual && +//#else +//# define nssv_ref_qual /*&*/ +//# define nssv_refref_qual /*&&*/ +//#endif + +#if nssv_HAVE_NULLPTR +# define nssv_nullptr nullptr +#else +# define nssv_nullptr NULL +#endif + +#if nssv_HAVE_NODISCARD +# define nssv_nodiscard [[nodiscard]] +#else +# define nssv_nodiscard /*[[nodiscard]]*/ +#endif + +// Additional includes: + +#include +#include +#include +#include +#include // std::char_traits<> + +#if ! nssv_CONFIG_NO_STREAM_INSERTION +# include +#endif + +#if ! nssv_CONFIG_NO_EXCEPTIONS +# include +#endif + +#if nssv_CPP11_OR_GREATER +# include +#endif + +// Clang, GNUC, MSVC warning suppression macros: + +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wreserved-user-defined-literal" +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wuser-defined-literals" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-suffix" +#endif // __clang__ + +#if nssv_COMPILER_MSVC_VERSION >= 140 +# define nssv_SUPPRESS_MSGSL_WARNING(expr) [[gsl::suppress(expr)]] +# define nssv_SUPPRESS_MSVC_WARNING(code, descr) __pragma(warning(suppress: code) ) +# define nssv_DISABLE_MSVC_WARNINGS(codes) __pragma(warning(push)) __pragma(warning(disable: codes)) +#else +# define nssv_SUPPRESS_MSGSL_WARNING(expr) +# define nssv_SUPPRESS_MSVC_WARNING(code, descr) +# define nssv_DISABLE_MSVC_WARNINGS(codes) +#endif + +#if defined(__clang__) +# define nssv_RESTORE_WARNINGS() _Pragma("clang diagnostic pop") +#elif defined(__GNUC__) +# define nssv_RESTORE_WARNINGS() _Pragma("GCC diagnostic pop") +#elif nssv_COMPILER_MSVC_VERSION >= 140 +# define nssv_RESTORE_WARNINGS() __pragma(warning(pop )) +#else +# define nssv_RESTORE_WARNINGS() +#endif + +// Suppress the following MSVC (GSL) warnings: +// - C4455, non-gsl : 'operator ""sv': literal suffix identifiers that do not +// start with an underscore are reserved +// - C26472, gsl::t.1 : don't use a static_cast for arithmetic conversions; +// use brace initialization, gsl::narrow_cast or gsl::narow +// - C26481: gsl::b.1 : don't use pointer arithmetic. Use span instead + +nssv_DISABLE_MSVC_WARNINGS( 4455 26481 26472 ) +//nssv_DISABLE_CLANG_WARNINGS( "-Wuser-defined-literals" ) +//nssv_DISABLE_GNUC_WARNINGS( -Wliteral-suffix ) + +namespace nonstd { namespace sv_lite { + +// +// basic_string_view declaration: +// + +template +< + class CharT, + class Traits = std::char_traits +> +class basic_string_view; + +namespace detail { + +// support constexpr comparison in C++14; +// for C++17 and later, use provided traits: + +template< typename CharT > +inline nssv_constexpr14 int compare( CharT const * s1, CharT const * s2, std::size_t count ) +{ + while ( count-- != 0 ) + { + if ( *s1 < *s2 ) return -1; + if ( *s1 > *s2 ) return +1; + ++s1; ++s2; + } + return 0; +} + +#if nssv_HAVE_BUILTIN_MEMCMP + +// specialization of compare() for char, see also generic compare() above: + +inline nssv_constexpr14 int compare( char const * s1, char const * s2, std::size_t count ) +{ + return nssv_BUILTIN_MEMCMP( s1, s2, count ); +} + +#endif + +#if nssv_HAVE_BUILTIN_STRLEN + +// specialization of length() for char, see also generic length() further below: + +inline nssv_constexpr std::size_t length( char const * s ) +{ + return nssv_BUILTIN_STRLEN( s ); +} + +#endif + +#if defined(__OPTIMIZE__) + +// gcc, clang provide __OPTIMIZE__ +// Expect tail call optimization to make length() non-recursive: + +template< typename CharT > +inline nssv_constexpr std::size_t length( CharT * s, std::size_t result = 0 ) +{ + return *s == '\0' ? result : length( s + 1, result + 1 ); +} + +#else // OPTIMIZE + +// non-recursive: + +template< typename CharT > +inline nssv_constexpr14 std::size_t length( CharT * s ) +{ + std::size_t result = 0; + while ( *s++ != '\0' ) + { + ++result; + } + return result; +} + +#endif // OPTIMIZE + +#if nssv_CPP11_OR_GREATER && ! nssv_CPP17_OR_GREATER +#if defined(__OPTIMIZE__) + +// gcc, clang provide __OPTIMIZE__ +// Expect tail call optimization to make search() non-recursive: + +template< class CharT, class Traits = std::char_traits > +constexpr const CharT* search( basic_string_view haystack, basic_string_view needle ) +{ + return haystack.starts_with( needle ) ? haystack.begin() : + haystack.empty() ? haystack.end() : search( haystack.substr(1), needle ); +} + +#else // OPTIMIZE + +// non-recursive: + +template< class CharT, class Traits = std::char_traits > +constexpr const CharT* search( basic_string_view haystack, basic_string_view needle ) +{ + return std::search( haystack.begin(), haystack.end(), needle.begin(), needle.end() ); +} + +#endif // OPTIMIZE +#endif // nssv_CPP11_OR_GREATER && ! nssv_CPP17_OR_GREATER + +} // namespace detail + +// +// basic_string_view: +// + +template +< + class CharT, + class Traits /* = std::char_traits */ +> +class basic_string_view +{ +public: + // Member types: + + typedef Traits traits_type; + typedef CharT value_type; + + typedef CharT * pointer; + typedef CharT const * const_pointer; + typedef CharT & reference; + typedef CharT const & const_reference; + + typedef const_pointer iterator; + typedef const_pointer const_iterator; + typedef std::reverse_iterator< const_iterator > reverse_iterator; + typedef std::reverse_iterator< const_iterator > const_reverse_iterator; + + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // 24.4.2.1 Construction and assignment: + + nssv_constexpr basic_string_view() nssv_noexcept + : data_( nssv_nullptr ) + , size_( 0 ) + {} + +#if nssv_CPP11_OR_GREATER + nssv_constexpr basic_string_view( basic_string_view const & other ) nssv_noexcept = default; +#else + nssv_constexpr basic_string_view( basic_string_view const & other ) nssv_noexcept + : data_( other.data_) + , size_( other.size_) + {} +#endif + + nssv_constexpr basic_string_view( CharT const * s, size_type count ) nssv_noexcept // non-standard noexcept + : data_( s ) + , size_( count ) + {} + + nssv_constexpr basic_string_view( CharT const * s) nssv_noexcept // non-standard noexcept + : data_( s ) +#if nssv_CPP17_OR_GREATER + , size_( Traits::length(s) ) +#elif nssv_CPP11_OR_GREATER + , size_( detail::length(s) ) +#else + , size_( Traits::length(s) ) +#endif + {} + +#if nssv_HAVE_NULLPTR +# if nssv_HAVE_IS_DELETE + nssv_constexpr basic_string_view( std::nullptr_t ) nssv_noexcept = delete; +# else + private: nssv_constexpr basic_string_view( std::nullptr_t ) nssv_noexcept; public: +# endif +#endif + + // Assignment: + +#if nssv_CPP11_OR_GREATER + nssv_constexpr14 basic_string_view & operator=( basic_string_view const & other ) nssv_noexcept = default; +#else + nssv_constexpr14 basic_string_view & operator=( basic_string_view const & other ) nssv_noexcept + { + data_ = other.data_; + size_ = other.size_; + return *this; + } +#endif + + // 24.4.2.2 Iterator support: + + nssv_constexpr const_iterator begin() const nssv_noexcept { return data_; } + nssv_constexpr const_iterator end() const nssv_noexcept { return data_ + size_; } + + nssv_constexpr const_iterator cbegin() const nssv_noexcept { return begin(); } + nssv_constexpr const_iterator cend() const nssv_noexcept { return end(); } + + nssv_constexpr const_reverse_iterator rbegin() const nssv_noexcept { return const_reverse_iterator( end() ); } + nssv_constexpr const_reverse_iterator rend() const nssv_noexcept { return const_reverse_iterator( begin() ); } + + nssv_constexpr const_reverse_iterator crbegin() const nssv_noexcept { return rbegin(); } + nssv_constexpr const_reverse_iterator crend() const nssv_noexcept { return rend(); } + + // 24.4.2.3 Capacity: + + nssv_constexpr size_type size() const nssv_noexcept { return size_; } + nssv_constexpr size_type length() const nssv_noexcept { return size_; } + nssv_constexpr size_type max_size() const nssv_noexcept { return (std::numeric_limits< size_type >::max)(); } + + // since C++20 + nssv_nodiscard nssv_constexpr bool empty() const nssv_noexcept + { + return 0 == size_; + } + + // 24.4.2.4 Element access: + + nssv_constexpr const_reference operator[]( size_type pos ) const + { + return data_at( pos ); + } + + nssv_constexpr14 const_reference at( size_type pos ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos < size() ); +#else + if ( pos >= size() ) + { + throw std::out_of_range("nonstd::string_view::at()"); + } +#endif + return data_at( pos ); + } + + nssv_constexpr const_reference front() const { return data_at( 0 ); } + nssv_constexpr const_reference back() const { return data_at( size() - 1 ); } + + nssv_constexpr const_pointer data() const nssv_noexcept { return data_; } + + // 24.4.2.5 Modifiers: + + nssv_constexpr14 void remove_prefix( size_type n ) + { + assert( n <= size() ); + data_ += n; + size_ -= n; + } + + nssv_constexpr14 void remove_suffix( size_type n ) + { + assert( n <= size() ); + size_ -= n; + } + + nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept + { + const basic_string_view tmp(other); + other = *this; + *this = tmp; + } + + // 24.4.2.6 String operations: + + size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos <= size() ); +#else + if ( pos > size() ) + { + throw std::out_of_range("nonstd::string_view::copy()"); + } +#endif + const size_type rlen = (std::min)( n, size() - pos ); + + (void) Traits::copy( dest, data() + pos, rlen ); + + return rlen; + } + + nssv_constexpr14 basic_string_view substr( size_type pos = 0, size_type n = npos ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos <= size() ); +#else + if ( pos > size() ) + { + throw std::out_of_range("nonstd::string_view::substr()"); + } +#endif + return basic_string_view( data() + pos, (std::min)( n, size() - pos ) ); + } + + // compare(), 6x: + + nssv_constexpr14 int compare( basic_string_view other ) const nssv_noexcept // (1) + { +#if nssv_CPP17_OR_GREATER + if ( const int result = Traits::compare( data(), other.data(), (std::min)( size(), other.size() ) ) ) +#else + if ( const int result = detail::compare( data(), other.data(), (std::min)( size(), other.size() ) ) ) +#endif + { + return result; + } + + return size() == other.size() ? 0 : size() < other.size() ? -1 : 1; + } + + nssv_constexpr int compare( size_type pos1, size_type n1, basic_string_view other ) const // (2) + { + return substr( pos1, n1 ).compare( other ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, basic_string_view other, size_type pos2, size_type n2 ) const // (3) + { + return substr( pos1, n1 ).compare( other.substr( pos2, n2 ) ); + } + + nssv_constexpr int compare( CharT const * s ) const // (4) + { + return compare( basic_string_view( s ) ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, CharT const * s ) const // (5) + { + return substr( pos1, n1 ).compare( basic_string_view( s ) ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, CharT const * s, size_type n2 ) const // (6) + { + return substr( pos1, n1 ).compare( basic_string_view( s, n2 ) ); + } + + // 24.4.2.7 Searching: + + // starts_with(), 3x, since C++20: + + nssv_constexpr bool starts_with( basic_string_view v ) const nssv_noexcept // (1) + { + return size() >= v.size() && compare( 0, v.size(), v ) == 0; + } + + nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept // (2) + { + return starts_with( basic_string_view( &c, 1 ) ); + } + + nssv_constexpr bool starts_with( CharT const * s ) const // (3) + { + return starts_with( basic_string_view( s ) ); + } + + // ends_with(), 3x, since C++20: + + nssv_constexpr bool ends_with( basic_string_view v ) const nssv_noexcept // (1) + { + return size() >= v.size() && compare( size() - v.size(), npos, v ) == 0; + } + + nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2) + { + return ends_with( basic_string_view( &c, 1 ) ); + } + + nssv_constexpr bool ends_with( CharT const * s ) const // (3) + { + return ends_with( basic_string_view( s ) ); + } + + // find(), 4x: + + nssv_constexpr size_type find( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return assert( v.size() == 0 || v.data() != nssv_nullptr ) + , pos >= size() + ? npos : to_pos( +#if nssv_CPP11_OR_GREATER && ! nssv_CPP17_OR_GREATER + detail::search( substr(pos), v ) +#else + std::search( cbegin() + pos, cend(), v.cbegin(), v.cend(), Traits::eq ) +#endif + ); + } + + nssv_constexpr size_type find( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find( CharT const * s, size_type pos, size_type n ) const // (3) + { + return find( basic_string_view( s, n ), pos ); + } + + nssv_constexpr size_type find( CharT const * s, size_type pos = 0 ) const // (4) + { + return find( basic_string_view( s ), pos ); + } + + // rfind(), 4x: + + nssv_constexpr14 size_type rfind( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + if ( size() < v.size() ) + { + return npos; + } + + if ( v.empty() ) + { + return (std::min)( size(), pos ); + } + + const_iterator last = cbegin() + (std::min)( size() - v.size(), pos ) + v.size(); + const_iterator result = std::find_end( cbegin(), last, v.cbegin(), v.cend(), Traits::eq ); + + return result != last ? size_type( result - cbegin() ) : npos; + } + + nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return rfind( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, size_type n ) const // (3) + { + return rfind( basic_string_view( s, n ), pos ); + } + + nssv_constexpr14 size_type rfind( CharT const * s, size_type pos = npos ) const // (4) + { + return rfind( basic_string_view( s ), pos ); + } + + // find_first_of(), 4x: + + nssv_constexpr size_type find_first_of( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return pos >= size() + ? npos + : to_pos( std::find_first_of( cbegin() + pos, cend(), v.cbegin(), v.cend(), Traits::eq ) ); + } + + nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find_first_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_first_of( CharT const * s, size_type pos, size_type n ) const // (3) + { + return find_first_of( basic_string_view( s, n ), pos ); + } + + nssv_constexpr size_type find_first_of( CharT const * s, size_type pos = 0 ) const // (4) + { + return find_first_of( basic_string_view( s ), pos ); + } + + // find_last_of(), 4x: + + nssv_constexpr size_type find_last_of( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + return empty() + ? npos + : pos >= size() + ? find_last_of( v, size() - 1 ) + : to_pos( std::find_first_of( const_reverse_iterator( cbegin() + pos + 1 ), crend(), v.cbegin(), v.cend(), Traits::eq ) ); + } + + nssv_constexpr size_type find_last_of( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return find_last_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_last_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_last_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_last_of( CharT const * s, size_type pos = npos ) const // (4) + { + return find_last_of( basic_string_view( s ), pos ); + } + + // find_first_not_of(), 4x: + + nssv_constexpr size_type find_first_not_of( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return pos >= size() + ? npos + : to_pos( std::find_if( cbegin() + pos, cend(), not_in_view( v ) ) ); + } + + nssv_constexpr size_type find_first_not_of( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find_first_not_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_first_not_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_first_not_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_first_not_of( CharT const * s, size_type pos = 0 ) const // (4) + { + return find_first_not_of( basic_string_view( s ), pos ); + } + + // find_last_not_of(), 4x: + + nssv_constexpr size_type find_last_not_of( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + return empty() + ? npos + : pos >= size() + ? find_last_not_of( v, size() - 1 ) + : to_pos( std::find_if( const_reverse_iterator( cbegin() + pos + 1 ), crend(), not_in_view( v ) ) ); + } + + nssv_constexpr size_type find_last_not_of( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return find_last_not_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_last_not_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_last_not_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_last_not_of( CharT const * s, size_type pos = npos ) const // (4) + { + return find_last_not_of( basic_string_view( s ), pos ); + } + + // Constants: + +#if nssv_CPP17_OR_GREATER + static nssv_constexpr size_type npos = size_type(-1); +#elif nssv_CPP11_OR_GREATER + enum : size_type { npos = size_type(-1) }; +#else + enum { npos = size_type(-1) }; +#endif + +private: + struct not_in_view + { + const basic_string_view v; + + nssv_constexpr explicit not_in_view( basic_string_view v_ ) : v( v_ ) {} + + nssv_constexpr bool operator()( CharT c ) const + { + return npos == v.find_first_of( c ); + } + }; + + nssv_constexpr size_type to_pos( const_iterator it ) const + { + return it == cend() ? npos : size_type( it - cbegin() ); + } + + nssv_constexpr size_type to_pos( const_reverse_iterator it ) const + { + return it == crend() ? npos : size_type( crend() - it - 1 ); + } + + nssv_constexpr const_reference data_at( size_type pos ) const + { +#if nssv_BETWEEN( nssv_COMPILER_GNUC_VERSION, 1, 500 ) + return data_[pos]; +#else + return assert( pos < size() ), data_[pos]; +#endif + } + +private: + const_pointer data_; + size_type size_; + +public: +#if nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS + + template< class Allocator > + basic_string_view( std::basic_string const & s ) nssv_noexcept + : data_( s.data() ) + , size_( s.size() ) + {} + +#if nssv_HAVE_EXPLICIT_CONVERSION + + template< class Allocator > + explicit operator std::basic_string() const + { + return to_string( Allocator() ); + } + +#endif // nssv_HAVE_EXPLICIT_CONVERSION + +#if nssv_CPP11_OR_GREATER + + template< class Allocator = std::allocator > + std::basic_string + to_string( Allocator const & a = Allocator() ) const + { + return std::basic_string( begin(), end(), a ); + } + +#else + + std::basic_string + to_string() const + { + return std::basic_string( begin(), end() ); + } + + template< class Allocator > + std::basic_string + to_string( Allocator const & a ) const + { + return std::basic_string( begin(), end(), a ); + } + +#endif // nssv_CPP11_OR_GREATER + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS +}; + +// +// Non-member functions: +// + +// 24.4.3 Non-member comparison functions: +// lexicographically compare two string views (function template): + +template< class CharT, class Traits > +nssv_constexpr bool operator== ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +template< class CharT, class Traits > +nssv_constexpr bool operator!= ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +template< class CharT, class Traits > +nssv_constexpr bool operator< ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0; } + +template< class CharT, class Traits > +nssv_constexpr bool operator<= ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0; } + +template< class CharT, class Traits > +nssv_constexpr bool operator> ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0; } + +template< class CharT, class Traits > +nssv_constexpr bool operator>= ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0; } + +// Let S be basic_string_view, and sv be an instance of S. +// Implementations shall provide sufficient additional overloads marked +// constexpr and noexcept so that an object t with an implicit conversion +// to S can be compared according to Table 67. + +#if ! nssv_CPP11_OR_GREATER || nssv_BETWEEN( nssv_COMPILER_MSVC_VERSION, 100, 141 ) + +// accommodate for older compilers: + +// == + +template< class CharT, class Traits> +nssv_constexpr bool operator==( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return lhs.size() == detail::length( rhs ) && lhs.compare( rhs ) == 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator==( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return detail::length( lhs ) == rhs.size() && rhs.compare( lhs ) == 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator==( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator==( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +// != + +template< class CharT, class Traits> +nssv_constexpr bool operator!=( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +template< class CharT, class Traits> +nssv_constexpr bool operator!=( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +template< class CharT, class Traits> +nssv_constexpr bool operator!=( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +template< class CharT, class Traits> +nssv_constexpr bool operator!=( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +// < + +template< class CharT, class Traits> +nssv_constexpr bool operator<( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return rhs.compare( lhs ) > 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return rhs.compare( lhs ) > 0; } + +// <= + +template< class CharT, class Traits> +nssv_constexpr bool operator<=( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<=( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return rhs.compare( lhs ) >= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<=( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<=( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return rhs.compare( lhs ) >= 0; } + +// > + +template< class CharT, class Traits> +nssv_constexpr bool operator>( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return rhs.compare( lhs ) < 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return rhs.compare( lhs ) < 0; } + +// >= + +template< class CharT, class Traits> +nssv_constexpr bool operator>=( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>=( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return rhs.compare( lhs ) <= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>=( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>=( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return rhs.compare( lhs ) <= 0; } + +#else // newer compilers: + +#define nssv_BASIC_STRING_VIEW_I(T,U) typename std::decay< basic_string_view >::type + +#if defined(_MSC_VER) // issue 40 +# define nssv_MSVC_ORDER(x) , int=x +#else +# define nssv_MSVC_ORDER(x) /*, int=x*/ +#endif + +// == + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator==( + basic_string_view lhs, + nssv_BASIC_STRING_VIEW_I(CharT, Traits) rhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator==( + nssv_BASIC_STRING_VIEW_I(CharT, Traits) lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +// != + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator!= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator!= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +// < + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator< ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator< ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0; } + +// <= + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator<= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator<= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0; } + +// > + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator> ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator> ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0; } + +// >= + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator>= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator>= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0; } + +#undef nssv_MSVC_ORDER +#undef nssv_BASIC_STRING_VIEW_I + +#endif // compiler-dependent approach to comparisons + +// 24.4.4 Inserters and extractors: + +#if ! nssv_CONFIG_NO_STREAM_INSERTION + +namespace detail { + +template< class Stream > +void write_padding( Stream & os, std::streamsize n ) +{ + for ( std::streamsize i = 0; i < n; ++i ) + os.rdbuf()->sputc( os.fill() ); +} + +template< class Stream, class View > +Stream & write_to_stream( Stream & os, View const & sv ) +{ + typename Stream::sentry sentry( os ); + + if ( !sentry ) + return os; + + const std::streamsize length = static_cast( sv.length() ); + + // Whether, and how, to pad: + const bool pad = ( length < os.width() ); + const bool left_pad = pad && ( os.flags() & std::ios_base::adjustfield ) == std::ios_base::right; + + if ( left_pad ) + write_padding( os, os.width() - length ); + + // Write span characters: + os.rdbuf()->sputn( sv.begin(), length ); + + if ( pad && !left_pad ) + write_padding( os, os.width() - length ); + + // Reset output stream width: + os.width( 0 ); + + return os; +} + +} // namespace detail + +template< class CharT, class Traits > +std::basic_ostream & +operator<<( + std::basic_ostream& os, + basic_string_view sv ) +{ + return detail::write_to_stream( os, sv ); +} + +#endif // nssv_CONFIG_NO_STREAM_INSERTION + +// Several typedefs for common character types are provided: + +typedef basic_string_view string_view; +typedef basic_string_view wstring_view; +#if nssv_HAVE_WCHAR16_T +typedef basic_string_view u16string_view; +typedef basic_string_view u32string_view; +#endif + +}} // namespace nonstd::sv_lite + +// +// 24.4.6 Suffix for basic_string_view literals: +// + +#if nssv_HAVE_USER_DEFINED_LITERALS + +namespace nonstd { +nssv_inline_ns namespace literals { +nssv_inline_ns namespace string_view_literals { + +#if nssv_CONFIG_STD_SV_OPERATOR && nssv_HAVE_STD_DEFINED_LITERALS + +nssv_constexpr nonstd::sv_lite::string_view operator "" sv( const char* str, size_t len ) nssv_noexcept // (1) +{ + return nonstd::sv_lite::string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u16string_view operator "" sv( const char16_t* str, size_t len ) nssv_noexcept // (2) +{ + return nonstd::sv_lite::u16string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u32string_view operator "" sv( const char32_t* str, size_t len ) nssv_noexcept // (3) +{ + return nonstd::sv_lite::u32string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::wstring_view operator "" sv( const wchar_t* str, size_t len ) nssv_noexcept // (4) +{ + return nonstd::sv_lite::wstring_view{ str, len }; +} + +#endif // nssv_CONFIG_STD_SV_OPERATOR && nssv_HAVE_STD_DEFINED_LITERALS + +#if nssv_CONFIG_USR_SV_OPERATOR + +nssv_constexpr nonstd::sv_lite::string_view operator "" _sv( const char* str, size_t len ) nssv_noexcept // (1) +{ + return nonstd::sv_lite::string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u16string_view operator "" _sv( const char16_t* str, size_t len ) nssv_noexcept // (2) +{ + return nonstd::sv_lite::u16string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u32string_view operator "" _sv( const char32_t* str, size_t len ) nssv_noexcept // (3) +{ + return nonstd::sv_lite::u32string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::wstring_view operator "" _sv( const wchar_t* str, size_t len ) nssv_noexcept // (4) +{ + return nonstd::sv_lite::wstring_view{ str, len }; +} + +#endif // nssv_CONFIG_USR_SV_OPERATOR + +}}} // namespace nonstd::literals::string_view_literals + +#endif + +// +// Extensions for std::string: +// + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { +namespace sv_lite { + +// Exclude MSVC 14 (19.00): it yields ambiguous to_string(): + +#if nssv_CPP11_OR_GREATER && nssv_COMPILER_MSVC_VERSION != 140 + +template< class CharT, class Traits, class Allocator = std::allocator > +std::basic_string +to_string( basic_string_view v, Allocator const & a = Allocator() ) +{ + return std::basic_string( v.begin(), v.end(), a ); +} + +#else + +template< class CharT, class Traits > +std::basic_string +to_string( basic_string_view v ) +{ + return std::basic_string( v.begin(), v.end() ); +} + +template< class CharT, class Traits, class Allocator > +std::basic_string +to_string( basic_string_view v, Allocator const & a ) +{ + return std::basic_string( v.begin(), v.end(), a ); +} + +#endif // nssv_CPP11_OR_GREATER + +template< class CharT, class Traits, class Allocator > +basic_string_view +to_string_view( std::basic_string const & s ) +{ + return basic_string_view( s.data(), s.size() ); +} + +}} // namespace nonstd::sv_lite + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +// +// make types and algorithms available in namespace nonstd: +// + +namespace nonstd { + +using sv_lite::basic_string_view; +using sv_lite::string_view; +using sv_lite::wstring_view; + +#if nssv_HAVE_WCHAR16_T +using sv_lite::u16string_view; +#endif +#if nssv_HAVE_WCHAR32_T +using sv_lite::u32string_view; +#endif + +// literal "sv" + +using sv_lite::operator==; +using sv_lite::operator!=; +using sv_lite::operator<; +using sv_lite::operator<=; +using sv_lite::operator>; +using sv_lite::operator>=; + +#if ! nssv_CONFIG_NO_STREAM_INSERTION +using sv_lite::operator<<; +#endif + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS +using sv_lite::to_string; +using sv_lite::to_string_view; +#endif + +} // namespace nonstd + +// 24.4.5 Hash support (C++11): + +// Note: The hash value of a string view object is equal to the hash value of +// the corresponding string object. + +#if nssv_HAVE_STD_HASH + +#include + +namespace std { + +template<> +struct hash< nonstd::string_view > +{ +public: + std::size_t operator()( nonstd::string_view v ) const nssv_noexcept + { + return std::hash()( std::string( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::wstring_view > +{ +public: + std::size_t operator()( nonstd::wstring_view v ) const nssv_noexcept + { + return std::hash()( std::wstring( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::u16string_view > +{ +public: + std::size_t operator()( nonstd::u16string_view v ) const nssv_noexcept + { + return std::hash()( std::u16string( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::u32string_view > +{ +public: + std::size_t operator()( nonstd::u32string_view v ) const nssv_noexcept + { + return std::hash()( std::u32string( v.data(), v.size() ) ); + } +}; + +} // namespace std + +#endif // nssv_HAVE_STD_HASH + +nssv_RESTORE_WARNINGS() + +#endif // nssv_HAVE_STD_STRING_VIEW +#endif // NONSTD_SV_LITE_H_INCLUDED +/* end file simdjson/nonstd/string_view.hpp */ +SIMDJSON_POP_DISABLE_WARNINGS + +namespace std { + using string_view = nonstd::string_view; +} +#endif // SIMDJSON_HAS_STRING_VIEW +#undef SIMDJSON_HAS_STRING_VIEW // We are not going to need this macro anymore. + +/// If EXPR is an error, returns it. +#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } } + +// Unless the programmer has already set SIMDJSON_DEVELOPMENT_CHECKS, +// we want to set it under debug builds. We detect a debug build +// under Visual Studio when the _DEBUG macro is set. Under the other +// compilers, we use the fact that they define __OPTIMIZE__ whenever +// they allow optimizations. +// It is possible that this could miss some cases where SIMDJSON_DEVELOPMENT_CHECKS +// is helpful, but the programmer can set the macro SIMDJSON_DEVELOPMENT_CHECKS. +// It could also wrongly set SIMDJSON_DEVELOPMENT_CHECKS (e.g., if the programmer +// sets _DEBUG in a release build under Visual Studio, or if some compiler fails to +// set the __OPTIMIZE__ macro). +#ifndef SIMDJSON_DEVELOPMENT_CHECKS +#ifdef _MSC_VER +// Visual Studio seems to set _DEBUG for debug builds. +#ifdef _DEBUG +#define SIMDJSON_DEVELOPMENT_CHECKS 1 +#endif // _DEBUG +#else // _MSC_VER +// All other compilers appear to set __OPTIMIZE__ to a positive integer +// when the compiler is optimizing. +#ifndef __OPTIMIZE__ +#define SIMDJSON_DEVELOPMENT_CHECKS 1 +#endif // __OPTIMIZE__ +#endif // _MSC_VER +#endif // SIMDJSON_DEVELOPMENT_CHECKS + +// The SIMDJSON_CHECK_EOF macro is a feature flag for the "don't require padding" +// feature. + +#if SIMDJSON_CPLUSPLUS17 +// if we have C++, then fallthrough is a default attribute +# define simdjson_fallthrough [[fallthrough]] +// check if we have __attribute__ support +#elif defined(__has_attribute) +// check if we have the __fallthrough__ attribute +#if __has_attribute(__fallthrough__) +// we are good to go: +# define simdjson_fallthrough __attribute__((__fallthrough__)) +#endif // __has_attribute(__fallthrough__) +#endif // SIMDJSON_CPLUSPLUS17 +// on some systems, we simply do not have support for fallthrough, so use a default: +#ifndef simdjson_fallthrough +# define simdjson_fallthrough do {} while (0) /* fallthrough */ +#endif // simdjson_fallthrough + +#if SIMDJSON_DEVELOPMENT_CHECKS +#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { assert ((expr)); } while (0) +#else +#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0) +#endif + +#ifndef SIMDJSON_UTF8VALIDATION +#define SIMDJSON_UTF8VALIDATION 1 +#endif + +#ifdef __has_include +// How do we detect that a compiler supports vbmi2? +// For sure if the following header is found, we are ok? +#if __has_include() +#define SIMDJSON_COMPILER_SUPPORTS_VBMI2 1 +#endif +#endif + +#ifdef _MSC_VER +#if _MSC_VER >= 1920 +// Visual Studio 2019 and up support VBMI2 under x64 even if the header +// avx512vbmi2intrin.h is not found. +#define SIMDJSON_COMPILER_SUPPORTS_VBMI2 1 +#endif +#endif + +// By default, we allow AVX512. +#ifndef SIMDJSON_AVX512_ALLOWED +#define SIMDJSON_AVX512_ALLOWED 1 +#endif + +#endif // SIMDJSON_COMMON_DEFS_H +/* end file simdjson/common_defs.h */ +/* skipped duplicate #include "simdjson/compiler_check.h" */ +/* including simdjson/error.h: #include "simdjson/error.h" */ +/* begin file simdjson/error.h */ +#ifndef SIMDJSON_ERROR_H +#define SIMDJSON_ERROR_H + +/* skipped duplicate #include "simdjson/base.h" */ + +#include +#include + +namespace simdjson { + +/** + * All possible errors returned by simdjson. These error codes are subject to change + * and not all simdjson kernel returns the same error code given the same input: it is not + * well defined which error a given input should produce. + * + * Only SUCCESS evaluates to false as a Boolean. All other error codes will evaluate + * to true as a Boolean. + */ +enum error_code { + SUCCESS = 0, ///< No error + CAPACITY, ///< This parser can't support a document that big + MEMALLOC, ///< Error allocating memory, most likely out of memory + TAPE_ERROR, ///< Something went wrong, this is a generic error + DEPTH_ERROR, ///< Your document exceeds the user-specified depth limitation + STRING_ERROR, ///< Problem while parsing a string + T_ATOM_ERROR, ///< Problem while parsing an atom starting with the letter 't' + F_ATOM_ERROR, ///< Problem while parsing an atom starting with the letter 'f' + N_ATOM_ERROR, ///< Problem while parsing an atom starting with the letter 'n' + NUMBER_ERROR, ///< Problem while parsing a number + UTF8_ERROR, ///< the input is not valid UTF-8 + UNINITIALIZED, ///< unknown error, or uninitialized document + EMPTY, ///< no structural element found + UNESCAPED_CHARS, ///< found unescaped characters in a string. + UNCLOSED_STRING, ///< missing quote at the end + UNSUPPORTED_ARCHITECTURE, ///< unsupported architecture + INCORRECT_TYPE, ///< JSON element has a different type than user expected + NUMBER_OUT_OF_RANGE, ///< JSON number does not fit in 64 bits + INDEX_OUT_OF_BOUNDS, ///< JSON array index too large + NO_SUCH_FIELD, ///< JSON field not found in object + IO_ERROR, ///< Error reading a file + INVALID_JSON_POINTER, ///< Invalid JSON pointer reference + INVALID_URI_FRAGMENT, ///< Invalid URI fragment + UNEXPECTED_ERROR, ///< indicative of a bug in simdjson + PARSER_IN_USE, ///< parser is already in use. + OUT_OF_ORDER_ITERATION, ///< tried to iterate an array or object out of order (checked when SIMDJSON_DEVELOPMENT_CHECKS=1) + INSUFFICIENT_PADDING, ///< The JSON doesn't have enough padding for simdjson to safely parse it. + INCOMPLETE_ARRAY_OR_OBJECT, ///< The document ends early. + SCALAR_DOCUMENT_AS_VALUE, ///< A scalar document is treated as a value. + OUT_OF_BOUNDS, ///< Attempted to access location outside of document. + TRAILING_CONTENT, ///< Unexpected trailing content in the JSON input + NUM_ERROR_CODES +}; + +/** + * It is the convention throughout the code that the macro SIMDJSON_DEVELOPMENT_CHECKS determines whether + * we check for OUT_OF_ORDER_ITERATION. The logic behind it is that these errors only occurs when the code + * that was written while breaking some simdjson::ondemand requirement. They should not occur in released + * code after these issues were fixed. + */ + +/** + * Get the error message for the given error code. + * + * dom::parser parser; + * dom::element doc; + * auto error = parser.parse("foo",3).get(doc); + * if (error) { printf("Error: %s\n", error_message(error)); } + * + * @return The error message. + */ +inline const char *error_message(error_code error) noexcept; + +/** + * Write the error message to the output stream + */ +inline std::ostream& operator<<(std::ostream& out, error_code error) noexcept; + +/** + * Exception thrown when an exception-supporting simdjson method is called + */ +struct simdjson_error : public std::exception { + /** + * Create an exception from a simdjson error code. + * @param error The error code + */ + simdjson_error(error_code error) noexcept : _error{error} { } + /** The error message */ + const char *what() const noexcept { return error_message(error()); } + /** The error code */ + error_code error() const noexcept { return _error; } +private: + /** The error code that was used */ + error_code _error; +}; + +namespace internal { + +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::simdjson_result_base { + * simdjson_result() noexcept : internal::simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct simdjson_result_base : protected std::pair { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline simdjson_result_base() noexcept; + + /** + * Create a new error result. + */ + simdjson_inline simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; + +}; // struct simdjson_result_base + +} // namespace internal + +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + */ +template +struct simdjson_result : public internal::simdjson_result_base { + /** + * @private Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline simdjson_result() noexcept; + /** + * @private Create a new successful result. + */ + simdjson_inline simdjson_result(T &&value) noexcept; + /** + * @private Create a new error result. + */ + simdjson_inline simdjson_result(error_code error_code) noexcept; + /** + * @private Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline simdjson_result(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_warn_unused simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; + +}; // struct simdjson_result + +#if SIMDJSON_EXCEPTIONS + +template +inline std::ostream& operator<<(std::ostream& out, simdjson_result value) { return out << value.value(); } +#endif // SIMDJSON_EXCEPTIONS + +#ifndef SIMDJSON_DISABLE_DEPRECATED_API +/** + * @deprecated This is an alias and will be removed, use error_code instead + */ +using ErrorValues [[deprecated("This is an alias and will be removed, use error_code instead")]] = error_code; + +/** + * @deprecated Error codes should be stored and returned as `error_code`, use `error_message()` instead. + */ +[[deprecated("Error codes should be stored and returned as `error_code`, use `error_message()` instead.")]] +inline const std::string error_message(int error) noexcept; +#endif // SIMDJSON_DISABLE_DEPRECATED_API +} // namespace simdjson + +#endif // SIMDJSON_ERROR_H +/* end file simdjson/error.h */ +/* skipped duplicate #include "simdjson/portability.h" */ + +/** + * @brief The top level simdjson namespace, containing everything the library provides. + */ +namespace simdjson { + +SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS + +/** The maximum document size supported by simdjson. */ +constexpr size_t SIMDJSON_MAXSIZE_BYTES = 0xFFFFFFFF; + +/** + * 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 + */ +constexpr size_t SIMDJSON_PADDING = 64; + +/** + * By default, simdjson supports this many nested objects and arrays. + * + * This is the default for parser::max_depth(). + */ +constexpr size_t DEFAULT_MAX_DEPTH = 1024; + +SIMDJSON_POP_DISABLE_UNUSED_WARNINGS + +class implementation; +struct padded_string; +class padded_string_view; +enum class stage1_mode; + +namespace internal { + +template +class atomic_ptr; +class dom_parser_implementation; +class escape_json_string; +class tape_ref; +struct value128; +enum class tape_type; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_BASE_H +/* end file simdjson/base.h */ + +#endif // SIMDJSON_SRC_BASE_H +/* end file base.h */ + +SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS + +/* including to_chars.cpp: #include */ +/* begin file to_chars.cpp */ +#ifndef SIMDJSON_SRC_TO_CHARS_CPP +#define SIMDJSON_SRC_TO_CHARS_CPP + +/* skipped duplicate #include */ + +#include +#include +#include +#include + +namespace simdjson { +namespace internal { +/*! +implements the Grisu2 algorithm for binary to decimal floating-point +conversion. +Adapted from JSON for Modern C++ + +This implementation is a slightly modified version of the reference +implementation which may be obtained from +http://florian.loitsch.com/publications (bench.tar.gz). +The code is distributed under the MIT license, Copyright (c) 2009 Florian +Loitsch. For a detailed description of the algorithm see: [1] Loitsch, "Printing +Floating-Point Numbers Quickly and Accurately with Integers", Proceedings of the +ACM SIGPLAN 2010 Conference on Programming Language Design and Implementation, +PLDI 2010 [2] Burger, Dybvig, "Printing Floating-Point Numbers Quickly and +Accurately", Proceedings of the ACM SIGPLAN 1996 Conference on Programming +Language Design and Implementation, PLDI 1996 +*/ +namespace dtoa_impl { + +template +Target reinterpret_bits(const Source source) { + static_assert(sizeof(Target) == sizeof(Source), "size mismatch"); + + Target target; + std::memcpy(&target, &source, sizeof(Source)); + return target; +} + +struct diyfp // f * 2^e +{ + static constexpr int kPrecision = 64; // = q + + std::uint64_t f = 0; + int e = 0; + + constexpr diyfp(std::uint64_t f_, int e_) noexcept : f(f_), e(e_) {} + + /*! + @brief returns x - y + @pre x.e == y.e and x.f >= y.f + */ + static diyfp sub(const diyfp &x, const diyfp &y) noexcept { + + return {x.f - y.f, x.e}; + } + + /*! + @brief returns x * y + @note The result is rounded. (Only the upper q bits are returned.) + */ + static diyfp mul(const diyfp &x, const diyfp &y) noexcept { + static_assert(kPrecision == 64, "internal error"); + + // Computes: + // f = round((x.f * y.f) / 2^q) + // e = x.e + y.e + q + + // Emulate the 64-bit * 64-bit multiplication: + // + // p = u * v + // = (u_lo + 2^32 u_hi) (v_lo + 2^32 v_hi) + // = (u_lo v_lo ) + 2^32 ((u_lo v_hi ) + (u_hi v_lo )) + + // 2^64 (u_hi v_hi ) = (p0 ) + 2^32 ((p1 ) + (p2 )) + // + 2^64 (p3 ) = (p0_lo + 2^32 p0_hi) + 2^32 ((p1_lo + + // 2^32 p1_hi) + (p2_lo + 2^32 p2_hi)) + 2^64 (p3 ) = + // (p0_lo ) + 2^32 (p0_hi + p1_lo + p2_lo ) + 2^64 (p1_hi + + // p2_hi + p3) = (p0_lo ) + 2^32 (Q ) + 2^64 (H ) = (p0_lo ) + + // 2^32 (Q_lo + 2^32 Q_hi ) + 2^64 (H ) + // + // (Since Q might be larger than 2^32 - 1) + // + // = (p0_lo + 2^32 Q_lo) + 2^64 (Q_hi + H) + // + // (Q_hi + H does not overflow a 64-bit int) + // + // = p_lo + 2^64 p_hi + + const std::uint64_t u_lo = x.f & 0xFFFFFFFFu; + const std::uint64_t u_hi = x.f >> 32u; + const std::uint64_t v_lo = y.f & 0xFFFFFFFFu; + const std::uint64_t v_hi = y.f >> 32u; + + const std::uint64_t p0 = u_lo * v_lo; + const std::uint64_t p1 = u_lo * v_hi; + const std::uint64_t p2 = u_hi * v_lo; + const std::uint64_t p3 = u_hi * v_hi; + + const std::uint64_t p0_hi = p0 >> 32u; + const std::uint64_t p1_lo = p1 & 0xFFFFFFFFu; + const std::uint64_t p1_hi = p1 >> 32u; + const std::uint64_t p2_lo = p2 & 0xFFFFFFFFu; + const std::uint64_t p2_hi = p2 >> 32u; + + std::uint64_t Q = p0_hi + p1_lo + p2_lo; + + // The full product might now be computed as + // + // p_hi = p3 + p2_hi + p1_hi + (Q >> 32) + // p_lo = p0_lo + (Q << 32) + // + // But in this particular case here, the full p_lo is not required. + // Effectively we only need to add the highest bit in p_lo to p_hi (and + // Q_hi + 1 does not overflow). + + Q += std::uint64_t{1} << (64u - 32u - 1u); // round, ties up + + const std::uint64_t h = p3 + p2_hi + p1_hi + (Q >> 32u); + + return {h, x.e + y.e + 64}; + } + + /*! + @brief normalize x such that the significand is >= 2^(q-1) + @pre x.f != 0 + */ + static diyfp normalize(diyfp x) noexcept { + + while ((x.f >> 63u) == 0) { + x.f <<= 1u; + x.e--; + } + + return x; + } + + /*! + @brief normalize x such that the result has the exponent E + @pre e >= x.e and the upper e - x.e bits of x.f must be zero. + */ + static diyfp normalize_to(const diyfp &x, + const int target_exponent) noexcept { + const int delta = x.e - target_exponent; + + return {x.f << delta, target_exponent}; + } +}; + +struct boundaries { + diyfp w; + diyfp minus; + diyfp plus; +}; + +/*! +Compute the (normalized) diyfp representing the input number 'value' and its +boundaries. +@pre value must be finite and positive +*/ +template boundaries compute_boundaries(FloatType value) { + + // Convert the IEEE representation into a diyfp. + // + // If v is denormal: + // value = 0.F * 2^(1 - bias) = ( F) * 2^(1 - bias - (p-1)) + // If v is normalized: + // value = 1.F * 2^(E - bias) = (2^(p-1) + F) * 2^(E - bias - (p-1)) + + static_assert(std::numeric_limits::is_iec559, + "internal error: dtoa_short requires an IEEE-754 " + "floating-point implementation"); + + constexpr int kPrecision = + std::numeric_limits::digits; // = p (includes the hidden bit) + constexpr int kBias = + std::numeric_limits::max_exponent - 1 + (kPrecision - 1); + constexpr int kMinExp = 1 - kBias; + constexpr std::uint64_t kHiddenBit = std::uint64_t{1} + << (kPrecision - 1); // = 2^(p-1) + + using bits_type = typename std::conditional::type; + + const std::uint64_t bits = reinterpret_bits(value); + const std::uint64_t E = bits >> (kPrecision - 1); + const std::uint64_t F = bits & (kHiddenBit - 1); + + const bool is_denormal = E == 0; + const diyfp v = is_denormal + ? diyfp(F, kMinExp) + : diyfp(F + kHiddenBit, static_cast(E) - kBias); + + // Compute the boundaries m- and m+ of the floating-point value + // v = f * 2^e. + // + // Determine v- and v+, the floating-point predecessor and successor if v, + // respectively. + // + // v- = v - 2^e if f != 2^(p-1) or e == e_min (A) + // = v - 2^(e-1) if f == 2^(p-1) and e > e_min (B) + // + // v+ = v + 2^e + // + // Let m- = (v- + v) / 2 and m+ = (v + v+) / 2. All real numbers _strictly_ + // between m- and m+ round to v, regardless of how the input rounding + // algorithm breaks ties. + // + // ---+-------------+-------------+-------------+-------------+--- (A) + // v- m- v m+ v+ + // + // -----------------+------+------+-------------+-------------+--- (B) + // v- m- v m+ v+ + + const bool lower_boundary_is_closer = F == 0 && E > 1; + const diyfp m_plus = diyfp(2 * v.f + 1, v.e - 1); + const diyfp m_minus = lower_boundary_is_closer + ? diyfp(4 * v.f - 1, v.e - 2) // (B) + : diyfp(2 * v.f - 1, v.e - 1); // (A) + + // Determine the normalized w+ = m+. + const diyfp w_plus = diyfp::normalize(m_plus); + + // Determine w- = m- such that e_(w-) = e_(w+). + const diyfp w_minus = diyfp::normalize_to(m_minus, w_plus.e); + + return {diyfp::normalize(v), w_minus, w_plus}; +} + +// Given normalized diyfp w, Grisu needs to find a (normalized) cached +// power-of-ten c, such that the exponent of the product c * w = f * 2^e lies +// within a certain range [alpha, gamma] (Definition 3.2 from [1]) +// +// alpha <= e = e_c + e_w + q <= gamma +// +// or +// +// f_c * f_w * 2^alpha <= f_c 2^(e_c) * f_w 2^(e_w) * 2^q +// <= f_c * f_w * 2^gamma +// +// Since c and w are normalized, i.e. 2^(q-1) <= f < 2^q, this implies +// +// 2^(q-1) * 2^(q-1) * 2^alpha <= c * w * 2^q < 2^q * 2^q * 2^gamma +// +// or +// +// 2^(q - 2 + alpha) <= c * w < 2^(q + gamma) +// +// The choice of (alpha,gamma) determines the size of the table and the form of +// the digit generation procedure. Using (alpha,gamma)=(-60,-32) works out well +// in practice: +// +// The idea is to cut the number c * w = f * 2^e into two parts, which can be +// processed independently: An integral part p1, and a fractional part p2: +// +// f * 2^e = ( (f div 2^-e) * 2^-e + (f mod 2^-e) ) * 2^e +// = (f div 2^-e) + (f mod 2^-e) * 2^e +// = p1 + p2 * 2^e +// +// The conversion of p1 into decimal form requires a series of divisions and +// modulos by (a power of) 10. These operations are faster for 32-bit than for +// 64-bit integers, so p1 should ideally fit into a 32-bit integer. This can be +// achieved by choosing +// +// -e >= 32 or e <= -32 := gamma +// +// In order to convert the fractional part +// +// p2 * 2^e = p2 / 2^-e = d[-1] / 10^1 + d[-2] / 10^2 + ... +// +// into decimal form, the fraction is repeatedly multiplied by 10 and the digits +// d[-i] are extracted in order: +// +// (10 * p2) div 2^-e = d[-1] +// (10 * p2) mod 2^-e = d[-2] / 10^1 + ... +// +// The multiplication by 10 must not overflow. It is sufficient to choose +// +// 10 * p2 < 16 * p2 = 2^4 * p2 <= 2^64. +// +// Since p2 = f mod 2^-e < 2^-e, +// +// -e <= 60 or e >= -60 := alpha + +constexpr int kAlpha = -60; +constexpr int kGamma = -32; + +struct cached_power // c = f * 2^e ~= 10^k +{ + std::uint64_t f; + int e; + int k; +}; + +/*! +For a normalized diyfp w = f * 2^e, this function returns a (normalized) cached +power-of-ten c = f_c * 2^e_c, such that the exponent of the product w * c +satisfies (Definition 3.2 from [1]) + alpha <= e_c + e + q <= gamma. +*/ +inline cached_power get_cached_power_for_binary_exponent(int e) { + // Now + // + // alpha <= e_c + e + q <= gamma (1) + // ==> f_c * 2^alpha <= c * 2^e * 2^q + // + // and since the c's are normalized, 2^(q-1) <= f_c, + // + // ==> 2^(q - 1 + alpha) <= c * 2^(e + q) + // ==> 2^(alpha - e - 1) <= c + // + // If c were an exact power of ten, i.e. c = 10^k, one may determine k as + // + // k = ceil( log_10( 2^(alpha - e - 1) ) ) + // = ceil( (alpha - e - 1) * log_10(2) ) + // + // From the paper: + // "In theory the result of the procedure could be wrong since c is rounded, + // and the computation itself is approximated [...]. In practice, however, + // this simple function is sufficient." + // + // For IEEE double precision floating-point numbers converted into + // normalized diyfp's w = f * 2^e, with q = 64, + // + // e >= -1022 (min IEEE exponent) + // -52 (p - 1) + // -52 (p - 1, possibly normalize denormal IEEE numbers) + // -11 (normalize the diyfp) + // = -1137 + // + // and + // + // e <= +1023 (max IEEE exponent) + // -52 (p - 1) + // -11 (normalize the diyfp) + // = 960 + // + // This binary exponent range [-1137,960] results in a decimal exponent + // range [-307,324]. One does not need to store a cached power for each + // k in this range. For each such k it suffices to find a cached power + // such that the exponent of the product lies in [alpha,gamma]. + // This implies that the difference of the decimal exponents of adjacent + // table entries must be less than or equal to + // + // floor( (gamma - alpha) * log_10(2) ) = 8. + // + // (A smaller distance gamma-alpha would require a larger table.) + + // NB: + // Actually this function returns c, such that -60 <= e_c + e + 64 <= -34. + + constexpr int kCachedPowersMinDecExp = -300; + constexpr int kCachedPowersDecStep = 8; + + static constexpr std::array kCachedPowers = {{ + {0xAB70FE17C79AC6CA, -1060, -300}, {0xFF77B1FCBEBCDC4F, -1034, -292}, + {0xBE5691EF416BD60C, -1007, -284}, {0x8DD01FAD907FFC3C, -980, -276}, + {0xD3515C2831559A83, -954, -268}, {0x9D71AC8FADA6C9B5, -927, -260}, + {0xEA9C227723EE8BCB, -901, -252}, {0xAECC49914078536D, -874, -244}, + {0x823C12795DB6CE57, -847, -236}, {0xC21094364DFB5637, -821, -228}, + {0x9096EA6F3848984F, -794, -220}, {0xD77485CB25823AC7, -768, -212}, + {0xA086CFCD97BF97F4, -741, -204}, {0xEF340A98172AACE5, -715, -196}, + {0xB23867FB2A35B28E, -688, -188}, {0x84C8D4DFD2C63F3B, -661, -180}, + {0xC5DD44271AD3CDBA, -635, -172}, {0x936B9FCEBB25C996, -608, -164}, + {0xDBAC6C247D62A584, -582, -156}, {0xA3AB66580D5FDAF6, -555, -148}, + {0xF3E2F893DEC3F126, -529, -140}, {0xB5B5ADA8AAFF80B8, -502, -132}, + {0x87625F056C7C4A8B, -475, -124}, {0xC9BCFF6034C13053, -449, -116}, + {0x964E858C91BA2655, -422, -108}, {0xDFF9772470297EBD, -396, -100}, + {0xA6DFBD9FB8E5B88F, -369, -92}, {0xF8A95FCF88747D94, -343, -84}, + {0xB94470938FA89BCF, -316, -76}, {0x8A08F0F8BF0F156B, -289, -68}, + {0xCDB02555653131B6, -263, -60}, {0x993FE2C6D07B7FAC, -236, -52}, + {0xE45C10C42A2B3B06, -210, -44}, {0xAA242499697392D3, -183, -36}, + {0xFD87B5F28300CA0E, -157, -28}, {0xBCE5086492111AEB, -130, -20}, + {0x8CBCCC096F5088CC, -103, -12}, {0xD1B71758E219652C, -77, -4}, + {0x9C40000000000000, -50, 4}, {0xE8D4A51000000000, -24, 12}, + {0xAD78EBC5AC620000, 3, 20}, {0x813F3978F8940984, 30, 28}, + {0xC097CE7BC90715B3, 56, 36}, {0x8F7E32CE7BEA5C70, 83, 44}, + {0xD5D238A4ABE98068, 109, 52}, {0x9F4F2726179A2245, 136, 60}, + {0xED63A231D4C4FB27, 162, 68}, {0xB0DE65388CC8ADA8, 189, 76}, + {0x83C7088E1AAB65DB, 216, 84}, {0xC45D1DF942711D9A, 242, 92}, + {0x924D692CA61BE758, 269, 100}, {0xDA01EE641A708DEA, 295, 108}, + {0xA26DA3999AEF774A, 322, 116}, {0xF209787BB47D6B85, 348, 124}, + {0xB454E4A179DD1877, 375, 132}, {0x865B86925B9BC5C2, 402, 140}, + {0xC83553C5C8965D3D, 428, 148}, {0x952AB45CFA97A0B3, 455, 156}, + {0xDE469FBD99A05FE3, 481, 164}, {0xA59BC234DB398C25, 508, 172}, + {0xF6C69A72A3989F5C, 534, 180}, {0xB7DCBF5354E9BECE, 561, 188}, + {0x88FCF317F22241E2, 588, 196}, {0xCC20CE9BD35C78A5, 614, 204}, + {0x98165AF37B2153DF, 641, 212}, {0xE2A0B5DC971F303A, 667, 220}, + {0xA8D9D1535CE3B396, 694, 228}, {0xFB9B7CD9A4A7443C, 720, 236}, + {0xBB764C4CA7A44410, 747, 244}, {0x8BAB8EEFB6409C1A, 774, 252}, + {0xD01FEF10A657842C, 800, 260}, {0x9B10A4E5E9913129, 827, 268}, + {0xE7109BFBA19C0C9D, 853, 276}, {0xAC2820D9623BF429, 880, 284}, + {0x80444B5E7AA7CF85, 907, 292}, {0xBF21E44003ACDD2D, 933, 300}, + {0x8E679C2F5E44FF8F, 960, 308}, {0xD433179D9C8CB841, 986, 316}, + {0x9E19DB92B4E31BA9, 1013, 324}, + }}; + + // This computation gives exactly the same results for k as + // k = ceil((kAlpha - e - 1) * 0.30102999566398114) + // for |e| <= 1500, but doesn't require floating-point operations. + // NB: log_10(2) ~= 78913 / 2^18 + const int f = kAlpha - e - 1; + const int k = (f * 78913) / (1 << 18) + static_cast(f > 0); + + const int index = (-kCachedPowersMinDecExp + k + (kCachedPowersDecStep - 1)) / + kCachedPowersDecStep; + + const cached_power cached = kCachedPowers[static_cast(index)]; + + return cached; +} + +/*! +For n != 0, returns k, such that pow10 := 10^(k-1) <= n < 10^k. +For n == 0, returns 1 and sets pow10 := 1. +*/ +inline int find_largest_pow10(const std::uint32_t n, std::uint32_t &pow10) { + // LCOV_EXCL_START + if (n >= 1000000000) { + pow10 = 1000000000; + return 10; + } + // LCOV_EXCL_STOP + else if (n >= 100000000) { + pow10 = 100000000; + return 9; + } else if (n >= 10000000) { + pow10 = 10000000; + return 8; + } else if (n >= 1000000) { + pow10 = 1000000; + return 7; + } else if (n >= 100000) { + pow10 = 100000; + return 6; + } else if (n >= 10000) { + pow10 = 10000; + return 5; + } else if (n >= 1000) { + pow10 = 1000; + return 4; + } else if (n >= 100) { + pow10 = 100; + return 3; + } else if (n >= 10) { + pow10 = 10; + return 2; + } else { + pow10 = 1; + return 1; + } +} + +inline void grisu2_round(char *buf, int len, std::uint64_t dist, + std::uint64_t delta, std::uint64_t rest, + std::uint64_t ten_k) { + + // <--------------------------- delta ----> + // <---- dist ---------> + // --------------[------------------+-------------------]-------------- + // M- w M+ + // + // ten_k + // <------> + // <---- rest ----> + // --------------[------------------+----+--------------]-------------- + // w V + // = buf * 10^k + // + // ten_k represents a unit-in-the-last-place in the decimal representation + // stored in buf. + // Decrement buf by ten_k while this takes buf closer to w. + + // The tests are written in this order to avoid overflow in unsigned + // integer arithmetic. + + while (rest < dist && delta - rest >= ten_k && + (rest + ten_k < dist || dist - rest > rest + ten_k - dist)) { + buf[len - 1]--; + rest += ten_k; + } +} + +/*! +Generates V = buffer * 10^decimal_exponent, such that M- <= V <= M+. +M- and M+ must be normalized and share the same exponent -60 <= e <= -32. +*/ +inline void grisu2_digit_gen(char *buffer, int &length, int &decimal_exponent, + diyfp M_minus, diyfp w, diyfp M_plus) { + static_assert(kAlpha >= -60, "internal error"); + static_assert(kGamma <= -32, "internal error"); + + // Generates the digits (and the exponent) of a decimal floating-point + // number V = buffer * 10^decimal_exponent in the range [M-, M+]. The diyfp's + // w, M- and M+ share the same exponent e, which satisfies alpha <= e <= + // gamma. + // + // <--------------------------- delta ----> + // <---- dist ---------> + // --------------[------------------+-------------------]-------------- + // M- w M+ + // + // Grisu2 generates the digits of M+ from left to right and stops as soon as + // V is in [M-,M+]. + + std::uint64_t delta = + diyfp::sub(M_plus, M_minus) + .f; // (significand of (M+ - M-), implicit exponent is e) + std::uint64_t dist = + diyfp::sub(M_plus, w) + .f; // (significand of (M+ - w ), implicit exponent is e) + + // Split M+ = f * 2^e into two parts p1 and p2 (note: e < 0): + // + // M+ = f * 2^e + // = ((f div 2^-e) * 2^-e + (f mod 2^-e)) * 2^e + // = ((p1 ) * 2^-e + (p2 )) * 2^e + // = p1 + p2 * 2^e + + const diyfp one(std::uint64_t{1} << -M_plus.e, M_plus.e); + + auto p1 = static_cast( + M_plus.f >> + -one.e); // p1 = f div 2^-e (Since -e >= 32, p1 fits into a 32-bit int.) + std::uint64_t p2 = M_plus.f & (one.f - 1); // p2 = f mod 2^-e + + // 1) + // + // Generate the digits of the integral part p1 = d[n-1]...d[1]d[0] + + std::uint32_t pow10; + const int k = find_largest_pow10(p1, pow10); + + // 10^(k-1) <= p1 < 10^k, pow10 = 10^(k-1) + // + // p1 = (p1 div 10^(k-1)) * 10^(k-1) + (p1 mod 10^(k-1)) + // = (d[k-1] ) * 10^(k-1) + (p1 mod 10^(k-1)) + // + // M+ = p1 + p2 * 2^e + // = d[k-1] * 10^(k-1) + (p1 mod 10^(k-1)) + p2 * 2^e + // = d[k-1] * 10^(k-1) + ((p1 mod 10^(k-1)) * 2^-e + p2) * 2^e + // = d[k-1] * 10^(k-1) + ( rest) * 2^e + // + // Now generate the digits d[n] of p1 from left to right (n = k-1,...,0) + // + // p1 = d[k-1]...d[n] * 10^n + d[n-1]...d[0] + // + // but stop as soon as + // + // rest * 2^e = (d[n-1]...d[0] * 2^-e + p2) * 2^e <= delta * 2^e + + int n = k; + while (n > 0) { + // Invariants: + // M+ = buffer * 10^n + (p1 + p2 * 2^e) (buffer = 0 for n = k) + // pow10 = 10^(n-1) <= p1 < 10^n + // + const std::uint32_t d = p1 / pow10; // d = p1 div 10^(n-1) + const std::uint32_t r = p1 % pow10; // r = p1 mod 10^(n-1) + // + // M+ = buffer * 10^n + (d * 10^(n-1) + r) + p2 * 2^e + // = (buffer * 10 + d) * 10^(n-1) + (r + p2 * 2^e) + // + buffer[length++] = static_cast('0' + d); // buffer := buffer * 10 + d + // + // M+ = buffer * 10^(n-1) + (r + p2 * 2^e) + // + p1 = r; + n--; + // + // M+ = buffer * 10^n + (p1 + p2 * 2^e) + // pow10 = 10^n + // + + // Now check if enough digits have been generated. + // Compute + // + // p1 + p2 * 2^e = (p1 * 2^-e + p2) * 2^e = rest * 2^e + // + // Note: + // Since rest and delta share the same exponent e, it suffices to + // compare the significands. + const std::uint64_t rest = (std::uint64_t{p1} << -one.e) + p2; + if (rest <= delta) { + // V = buffer * 10^n, with M- <= V <= M+. + + decimal_exponent += n; + + // We may now just stop. But instead look if the buffer could be + // decremented to bring V closer to w. + // + // pow10 = 10^n is now 1 ulp in the decimal representation V. + // The rounding procedure works with diyfp's with an implicit + // exponent of e. + // + // 10^n = (10^n * 2^-e) * 2^e = ulp * 2^e + // + const std::uint64_t ten_n = std::uint64_t{pow10} << -one.e; + grisu2_round(buffer, length, dist, delta, rest, ten_n); + + return; + } + + pow10 /= 10; + // + // pow10 = 10^(n-1) <= p1 < 10^n + // Invariants restored. + } + + // 2) + // + // The digits of the integral part have been generated: + // + // M+ = d[k-1]...d[1]d[0] + p2 * 2^e + // = buffer + p2 * 2^e + // + // Now generate the digits of the fractional part p2 * 2^e. + // + // Note: + // No decimal point is generated: the exponent is adjusted instead. + // + // p2 actually represents the fraction + // + // p2 * 2^e + // = p2 / 2^-e + // = d[-1] / 10^1 + d[-2] / 10^2 + ... + // + // Now generate the digits d[-m] of p1 from left to right (m = 1,2,...) + // + // p2 * 2^e = d[-1]d[-2]...d[-m] * 10^-m + // + 10^-m * (d[-m-1] / 10^1 + d[-m-2] / 10^2 + ...) + // + // using + // + // 10^m * p2 = ((10^m * p2) div 2^-e) * 2^-e + ((10^m * p2) mod 2^-e) + // = ( d) * 2^-e + ( r) + // + // or + // 10^m * p2 * 2^e = d + r * 2^e + // + // i.e. + // + // M+ = buffer + p2 * 2^e + // = buffer + 10^-m * (d + r * 2^e) + // = (buffer * 10^m + d) * 10^-m + 10^-m * r * 2^e + // + // and stop as soon as 10^-m * r * 2^e <= delta * 2^e + + int m = 0; + for (;;) { + // Invariant: + // M+ = buffer * 10^-m + 10^-m * (d[-m-1] / 10 + d[-m-2] / 10^2 + ...) + // * 2^e + // = buffer * 10^-m + 10^-m * (p2 ) + // * 2^e = buffer * 10^-m + 10^-m * (1/10 * (10 * p2) ) * 2^e = + // buffer * 10^-m + 10^-m * (1/10 * ((10*p2 div 2^-e) * 2^-e + + // (10*p2 mod 2^-e)) * 2^e + // + p2 *= 10; + const std::uint64_t d = p2 >> -one.e; // d = (10 * p2) div 2^-e + const std::uint64_t r = p2 & (one.f - 1); // r = (10 * p2) mod 2^-e + // + // M+ = buffer * 10^-m + 10^-m * (1/10 * (d * 2^-e + r) * 2^e + // = buffer * 10^-m + 10^-m * (1/10 * (d + r * 2^e)) + // = (buffer * 10 + d) * 10^(-m-1) + 10^(-m-1) * r * 2^e + // + buffer[length++] = static_cast('0' + d); // buffer := buffer * 10 + d + // + // M+ = buffer * 10^(-m-1) + 10^(-m-1) * r * 2^e + // + p2 = r; + m++; + // + // M+ = buffer * 10^-m + 10^-m * p2 * 2^e + // Invariant restored. + + // Check if enough digits have been generated. + // + // 10^-m * p2 * 2^e <= delta * 2^e + // p2 * 2^e <= 10^m * delta * 2^e + // p2 <= 10^m * delta + delta *= 10; + dist *= 10; + if (p2 <= delta) { + break; + } + } + + // V = buffer * 10^-m, with M- <= V <= M+. + + decimal_exponent -= m; + + // 1 ulp in the decimal representation is now 10^-m. + // Since delta and dist are now scaled by 10^m, we need to do the + // same with ulp in order to keep the units in sync. + // + // 10^m * 10^-m = 1 = 2^-e * 2^e = ten_m * 2^e + // + const std::uint64_t ten_m = one.f; + grisu2_round(buffer, length, dist, delta, p2, ten_m); + + // By construction this algorithm generates the shortest possible decimal + // number (Loitsch, Theorem 6.2) which rounds back to w. + // For an input number of precision p, at least + // + // N = 1 + ceil(p * log_10(2)) + // + // decimal digits are sufficient to identify all binary floating-point + // numbers (Matula, "In-and-Out conversions"). + // This implies that the algorithm does not produce more than N decimal + // digits. + // + // N = 17 for p = 53 (IEEE double precision) + // N = 9 for p = 24 (IEEE single precision) +} + +/*! +v = buf * 10^decimal_exponent +len is the length of the buffer (number of decimal digits) +The buffer must be large enough, i.e. >= max_digits10. +*/ +inline void grisu2(char *buf, int &len, int &decimal_exponent, diyfp m_minus, + diyfp v, diyfp m_plus) { + + // --------(-----------------------+-----------------------)-------- (A) + // m- v m+ + // + // --------------------(-----------+-----------------------)-------- (B) + // m- v m+ + // + // First scale v (and m- and m+) such that the exponent is in the range + // [alpha, gamma]. + + const cached_power cached = get_cached_power_for_binary_exponent(m_plus.e); + + const diyfp c_minus_k(cached.f, cached.e); // = c ~= 10^-k + + // The exponent of the products is = v.e + c_minus_k.e + q and is in the range + // [alpha,gamma] + const diyfp w = diyfp::mul(v, c_minus_k); + const diyfp w_minus = diyfp::mul(m_minus, c_minus_k); + const diyfp w_plus = diyfp::mul(m_plus, c_minus_k); + + // ----(---+---)---------------(---+---)---------------(---+---)---- + // w- w w+ + // = c*m- = c*v = c*m+ + // + // diyfp::mul rounds its result and c_minus_k is approximated too. w, w- and + // w+ are now off by a small amount. + // In fact: + // + // w - v * 10^k < 1 ulp + // + // To account for this inaccuracy, add resp. subtract 1 ulp. + // + // --------+---[---------------(---+---)---------------]---+-------- + // w- M- w M+ w+ + // + // Now any number in [M-, M+] (bounds included) will round to w when input, + // regardless of how the input rounding algorithm breaks ties. + // + // And digit_gen generates the shortest possible such number in [M-, M+]. + // Note that this does not mean that Grisu2 always generates the shortest + // possible number in the interval (m-, m+). + const diyfp M_minus(w_minus.f + 1, w_minus.e); + const diyfp M_plus(w_plus.f - 1, w_plus.e); + + decimal_exponent = -cached.k; // = -(-k) = k + + grisu2_digit_gen(buf, len, decimal_exponent, M_minus, w, M_plus); +} + +/*! +v = buf * 10^decimal_exponent +len is the length of the buffer (number of decimal digits) +The buffer must be large enough, i.e. >= max_digits10. +*/ +template +void grisu2(char *buf, int &len, int &decimal_exponent, FloatType value) { + static_assert(diyfp::kPrecision >= std::numeric_limits::digits + 3, + "internal error: not enough precision"); + + // If the neighbors (and boundaries) of 'value' are always computed for + // double-precision numbers, all float's can be recovered using strtod (and + // strtof). However, the resulting decimal representations are not exactly + // "short". + // + // The documentation for 'std::to_chars' + // (https://en.cppreference.com/w/cpp/utility/to_chars) says "value is + // converted to a string as if by std::sprintf in the default ("C") locale" + // and since sprintf promotes float's to double's, I think this is exactly + // what 'std::to_chars' does. On the other hand, the documentation for + // 'std::to_chars' requires that "parsing the representation using the + // corresponding std::from_chars function recovers value exactly". That + // indicates that single precision floating-point numbers should be recovered + // using 'std::strtof'. + // + // NB: If the neighbors are computed for single-precision numbers, there is a + // single float + // (7.0385307e-26f) which can't be recovered using strtod. The resulting + // double precision value is off by 1 ulp. +#if 0 + const boundaries w = compute_boundaries(static_cast(value)); +#else + const boundaries w = compute_boundaries(value); +#endif + + grisu2(buf, len, decimal_exponent, w.minus, w.w, w.plus); +} + +/*! +@brief appends a decimal representation of e to buf +@return a pointer to the element following the exponent. +@pre -1000 < e < 1000 +*/ +inline char *append_exponent(char *buf, int e) { + + if (e < 0) { + e = -e; + *buf++ = '-'; + } else { + *buf++ = '+'; + } + + auto k = static_cast(e); + if (k < 10) { + // Always print at least two digits in the exponent. + // This is for compatibility with printf("%g"). + *buf++ = '0'; + *buf++ = static_cast('0' + k); + } else if (k < 100) { + *buf++ = static_cast('0' + k / 10); + k %= 10; + *buf++ = static_cast('0' + k); + } else { + *buf++ = static_cast('0' + k / 100); + k %= 100; + *buf++ = static_cast('0' + k / 10); + k %= 10; + *buf++ = static_cast('0' + k); + } + + return buf; +} + +/*! +@brief prettify v = buf * 10^decimal_exponent +If v is in the range [10^min_exp, 10^max_exp) it will be printed in fixed-point +notation. Otherwise it will be printed in exponential notation. +@pre min_exp < 0 +@pre max_exp > 0 +*/ +inline char *format_buffer(char *buf, int len, int decimal_exponent, + int min_exp, int max_exp) { + + const int k = len; + const int n = len + decimal_exponent; + + // v = buf * 10^(n-k) + // k is the length of the buffer (number of decimal digits) + // n is the position of the decimal point relative to the start of the buffer. + + if (k <= n && n <= max_exp) { + // digits[000] + // len <= max_exp + 2 + + std::memset(buf + k, '0', static_cast(n) - static_cast(k)); + // Make it look like a floating-point number (#362, #378) + buf[n + 0] = '.'; + buf[n + 1] = '0'; + return buf + (static_cast(n)) + 2; + } + + if (0 < n && n <= max_exp) { + // dig.its + // len <= max_digits10 + 1 + std::memmove(buf + (static_cast(n) + 1), buf + n, + static_cast(k) - static_cast(n)); + buf[n] = '.'; + return buf + (static_cast(k) + 1U); + } + + if (min_exp < n && n <= 0) { + // 0.[000]digits + // len <= 2 + (-min_exp - 1) + max_digits10 + + std::memmove(buf + (2 + static_cast(-n)), buf, + static_cast(k)); + buf[0] = '0'; + buf[1] = '.'; + std::memset(buf + 2, '0', static_cast(-n)); + return buf + (2U + static_cast(-n) + static_cast(k)); + } + + if (k == 1) { + // dE+123 + // len <= 1 + 5 + + buf += 1; + } else { + // d.igitsE+123 + // len <= max_digits10 + 1 + 5 + + std::memmove(buf + 2, buf + 1, static_cast(k) - 1); + buf[1] = '.'; + buf += 1 + static_cast(k); + } + + *buf++ = 'e'; + return append_exponent(buf, n - 1); +} + +} // namespace dtoa_impl + +/*! +The format of the resulting decimal representation is similar to printf's %g +format. Returns an iterator pointing past-the-end of the decimal representation. +@note The input number must be finite, i.e. NaN's and Inf's are not supported. +@note The buffer must be large enough. +@note The result is NOT null-terminated. +*/ +char *to_chars(char *first, const char *last, double value) { + static_cast(last); // maybe unused - fix warning + bool negative = std::signbit(value); + if (negative) { + value = -value; + *first++ = '-'; + } + + if (value == 0) // +-0 + { + *first++ = '0'; + // Make it look like a floating-point number (#362, #378) + *first++ = '.'; + *first++ = '0'; + return first; + } + // Compute v = buffer * 10^decimal_exponent. + // The decimal digits are stored in the buffer, which needs to be interpreted + // as an unsigned decimal integer. + // len is the length of the buffer, i.e. the number of decimal digits. + int len = 0; + int decimal_exponent = 0; + dtoa_impl::grisu2(first, len, decimal_exponent, value); + // Format the buffer like printf("%.*g", prec, value) + constexpr int kMinExp = -4; + constexpr int kMaxExp = std::numeric_limits::digits10; + + return dtoa_impl::format_buffer(first, len, decimal_exponent, kMinExp, + kMaxExp); +} +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_SRC_TO_CHARS_CPP +/* end file to_chars.cpp */ +/* including from_chars.cpp: #include */ +/* begin file from_chars.cpp */ +#ifndef SIMDJSON_SRC_FROM_CHARS_CPP +#define SIMDJSON_SRC_FROM_CHARS_CPP + +/* skipped duplicate #include */ + +#include +#include +#include + +namespace simdjson { +namespace internal { + +/** + * The code in the internal::from_chars function is meant to handle the floating-point number parsing + * when we have more than 19 digits in the decimal mantissa. This should only be seen + * in adversarial scenarios: we do not expect production systems to even produce + * such floating-point numbers. + * + * The parser is based on work by Nigel Tao (at https://github.com/google/wuffs/) + * who credits Ken Thompson for the design (via a reference to the Go source + * code). See + * https://github.com/google/wuffs/blob/aa46859ea40c72516deffa1b146121952d6dfd3b/internal/cgen/base/floatconv-submodule-data.c + * https://github.com/google/wuffs/blob/46cd8105f47ca07ae2ba8e6a7818ef9c0df6c152/internal/cgen/base/floatconv-submodule-code.c + * It is probably not very fast but it is a fallback that should almost never be + * called in real life. Google Wuffs is published under APL 2.0. + **/ + +namespace { +constexpr uint32_t max_digits = 768; +constexpr int32_t decimal_point_range = 2047; +} // namespace + +struct adjusted_mantissa { + uint64_t mantissa; + int power2; + adjusted_mantissa() : mantissa(0), power2(0) {} +}; + +struct decimal { + uint32_t num_digits; + int32_t decimal_point; + bool negative; + bool truncated; + uint8_t digits[max_digits]; +}; + +template struct binary_format { + static constexpr int mantissa_explicit_bits(); + static constexpr int minimum_exponent(); + static constexpr int infinite_power(); + static constexpr int sign_index(); +}; + +template <> constexpr int binary_format::mantissa_explicit_bits() { + return 52; +} + +template <> constexpr int binary_format::minimum_exponent() { + return -1023; +} +template <> constexpr int binary_format::infinite_power() { + return 0x7FF; +} + +template <> constexpr int binary_format::sign_index() { return 63; } + +bool is_integer(char c) noexcept { return (c >= '0' && c <= '9'); } + +// This should always succeed since it follows a call to parse_number. +decimal parse_decimal(const char *&p) noexcept { + decimal answer; + answer.num_digits = 0; + answer.decimal_point = 0; + answer.truncated = false; + answer.negative = (*p == '-'); + if ((*p == '-') || (*p == '+')) { + ++p; + } + + while (*p == '0') { + ++p; + } + while (is_integer(*p)) { + if (answer.num_digits < max_digits) { + answer.digits[answer.num_digits] = uint8_t(*p - '0'); + } + answer.num_digits++; + ++p; + } + if (*p == '.') { + ++p; + const char *first_after_period = p; + // if we have not yet encountered a zero, we have to skip it as well + if (answer.num_digits == 0) { + // skip zeros + while (*p == '0') { + ++p; + } + } + while (is_integer(*p)) { + if (answer.num_digits < max_digits) { + answer.digits[answer.num_digits] = uint8_t(*p - '0'); + } + answer.num_digits++; + ++p; + } + answer.decimal_point = int32_t(first_after_period - p); + } + if(answer.num_digits > 0) { + const char *preverse = p - 1; + int32_t trailing_zeros = 0; + while ((*preverse == '0') || (*preverse == '.')) { + if(*preverse == '0') { trailing_zeros++; }; + --preverse; + } + answer.decimal_point += int32_t(answer.num_digits); + answer.num_digits -= uint32_t(trailing_zeros); + } + if(answer.num_digits > max_digits ) { + answer.num_digits = max_digits; + answer.truncated = true; + } + if (('e' == *p) || ('E' == *p)) { + ++p; + bool neg_exp = false; + if ('-' == *p) { + neg_exp = true; + ++p; + } else if ('+' == *p) { + ++p; + } + int32_t exp_number = 0; // exponential part + while (is_integer(*p)) { + uint8_t digit = uint8_t(*p - '0'); + if (exp_number < 0x10000) { + exp_number = 10 * exp_number + digit; + } + ++p; + } + answer.decimal_point += (neg_exp ? -exp_number : exp_number); + } + return answer; +} + +// This should always succeed since it follows a call to parse_number. +// Will not read at or beyond the "end" pointer. +decimal parse_decimal(const char *&p, const char * end) noexcept { + decimal answer; + answer.num_digits = 0; + answer.decimal_point = 0; + answer.truncated = false; + if(p == end) { return answer; } // should never happen + answer.negative = (*p == '-'); + if ((*p == '-') || (*p == '+')) { + ++p; + } + + while ((p != end) && (*p == '0')) { + ++p; + } + while ((p != end) && is_integer(*p)) { + if (answer.num_digits < max_digits) { + answer.digits[answer.num_digits] = uint8_t(*p - '0'); + } + answer.num_digits++; + ++p; + } + if ((p != end) && (*p == '.')) { + ++p; + if(p == end) { return answer; } // should never happen + const char *first_after_period = p; + // if we have not yet encountered a zero, we have to skip it as well + if (answer.num_digits == 0) { + // skip zeros + while (*p == '0') { + ++p; + } + } + while ((p != end) && is_integer(*p)) { + if (answer.num_digits < max_digits) { + answer.digits[answer.num_digits] = uint8_t(*p - '0'); + } + answer.num_digits++; + ++p; + } + answer.decimal_point = int32_t(first_after_period - p); + } + if(answer.num_digits > 0) { + const char *preverse = p - 1; + int32_t trailing_zeros = 0; + while ((*preverse == '0') || (*preverse == '.')) { + if(*preverse == '0') { trailing_zeros++; }; + --preverse; + } + answer.decimal_point += int32_t(answer.num_digits); + answer.num_digits -= uint32_t(trailing_zeros); + } + if(answer.num_digits > max_digits ) { + answer.num_digits = max_digits; + answer.truncated = true; + } + if ((p != end) && (('e' == *p) || ('E' == *p))) { + ++p; + if(p == end) { return answer; } // should never happen + bool neg_exp = false; + if ('-' == *p) { + neg_exp = true; + ++p; + } else if ('+' == *p) { + ++p; + } + int32_t exp_number = 0; // exponential part + while ((p != end) && is_integer(*p)) { + uint8_t digit = uint8_t(*p - '0'); + if (exp_number < 0x10000) { + exp_number = 10 * exp_number + digit; + } + ++p; + } + answer.decimal_point += (neg_exp ? -exp_number : exp_number); + } + return answer; +} + +namespace { + +// remove all final zeroes +inline void trim(decimal &h) { + while ((h.num_digits > 0) && (h.digits[h.num_digits - 1] == 0)) { + h.num_digits--; + } +} + +uint32_t number_of_digits_decimal_left_shift(decimal &h, uint32_t shift) { + shift &= 63; + const static uint16_t number_of_digits_decimal_left_shift_table[65] = { + 0x0000, 0x0800, 0x0801, 0x0803, 0x1006, 0x1009, 0x100D, 0x1812, 0x1817, + 0x181D, 0x2024, 0x202B, 0x2033, 0x203C, 0x2846, 0x2850, 0x285B, 0x3067, + 0x3073, 0x3080, 0x388E, 0x389C, 0x38AB, 0x38BB, 0x40CC, 0x40DD, 0x40EF, + 0x4902, 0x4915, 0x4929, 0x513E, 0x5153, 0x5169, 0x5180, 0x5998, 0x59B0, + 0x59C9, 0x61E3, 0x61FD, 0x6218, 0x6A34, 0x6A50, 0x6A6D, 0x6A8B, 0x72AA, + 0x72C9, 0x72E9, 0x7B0A, 0x7B2B, 0x7B4D, 0x8370, 0x8393, 0x83B7, 0x83DC, + 0x8C02, 0x8C28, 0x8C4F, 0x9477, 0x949F, 0x94C8, 0x9CF2, 0x051C, 0x051C, + 0x051C, 0x051C, + }; + uint32_t x_a = number_of_digits_decimal_left_shift_table[shift]; + uint32_t x_b = number_of_digits_decimal_left_shift_table[shift + 1]; + uint32_t num_new_digits = x_a >> 11; + uint32_t pow5_a = 0x7FF & x_a; + uint32_t pow5_b = 0x7FF & x_b; + const static uint8_t + number_of_digits_decimal_left_shift_table_powers_of_5[0x051C] = { + 5, 2, 5, 1, 2, 5, 6, 2, 5, 3, 1, 2, 5, 1, 5, 6, 2, 5, 7, 8, 1, 2, 5, + 3, 9, 0, 6, 2, 5, 1, 9, 5, 3, 1, 2, 5, 9, 7, 6, 5, 6, 2, 5, 4, 8, 8, + 2, 8, 1, 2, 5, 2, 4, 4, 1, 4, 0, 6, 2, 5, 1, 2, 2, 0, 7, 0, 3, 1, 2, + 5, 6, 1, 0, 3, 5, 1, 5, 6, 2, 5, 3, 0, 5, 1, 7, 5, 7, 8, 1, 2, 5, 1, + 5, 2, 5, 8, 7, 8, 9, 0, 6, 2, 5, 7, 6, 2, 9, 3, 9, 4, 5, 3, 1, 2, 5, + 3, 8, 1, 4, 6, 9, 7, 2, 6, 5, 6, 2, 5, 1, 9, 0, 7, 3, 4, 8, 6, 3, 2, + 8, 1, 2, 5, 9, 5, 3, 6, 7, 4, 3, 1, 6, 4, 0, 6, 2, 5, 4, 7, 6, 8, 3, + 7, 1, 5, 8, 2, 0, 3, 1, 2, 5, 2, 3, 8, 4, 1, 8, 5, 7, 9, 1, 0, 1, 5, + 6, 2, 5, 1, 1, 9, 2, 0, 9, 2, 8, 9, 5, 5, 0, 7, 8, 1, 2, 5, 5, 9, 6, + 0, 4, 6, 4, 4, 7, 7, 5, 3, 9, 0, 6, 2, 5, 2, 9, 8, 0, 2, 3, 2, 2, 3, + 8, 7, 6, 9, 5, 3, 1, 2, 5, 1, 4, 9, 0, 1, 1, 6, 1, 1, 9, 3, 8, 4, 7, + 6, 5, 6, 2, 5, 7, 4, 5, 0, 5, 8, 0, 5, 9, 6, 9, 2, 3, 8, 2, 8, 1, 2, + 5, 3, 7, 2, 5, 2, 9, 0, 2, 9, 8, 4, 6, 1, 9, 1, 4, 0, 6, 2, 5, 1, 8, + 6, 2, 6, 4, 5, 1, 4, 9, 2, 3, 0, 9, 5, 7, 0, 3, 1, 2, 5, 9, 3, 1, 3, + 2, 2, 5, 7, 4, 6, 1, 5, 4, 7, 8, 5, 1, 5, 6, 2, 5, 4, 6, 5, 6, 6, 1, + 2, 8, 7, 3, 0, 7, 7, 3, 9, 2, 5, 7, 8, 1, 2, 5, 2, 3, 2, 8, 3, 0, 6, + 4, 3, 6, 5, 3, 8, 6, 9, 6, 2, 8, 9, 0, 6, 2, 5, 1, 1, 6, 4, 1, 5, 3, + 2, 1, 8, 2, 6, 9, 3, 4, 8, 1, 4, 4, 5, 3, 1, 2, 5, 5, 8, 2, 0, 7, 6, + 6, 0, 9, 1, 3, 4, 6, 7, 4, 0, 7, 2, 2, 6, 5, 6, 2, 5, 2, 9, 1, 0, 3, + 8, 3, 0, 4, 5, 6, 7, 3, 3, 7, 0, 3, 6, 1, 3, 2, 8, 1, 2, 5, 1, 4, 5, + 5, 1, 9, 1, 5, 2, 2, 8, 3, 6, 6, 8, 5, 1, 8, 0, 6, 6, 4, 0, 6, 2, 5, + 7, 2, 7, 5, 9, 5, 7, 6, 1, 4, 1, 8, 3, 4, 2, 5, 9, 0, 3, 3, 2, 0, 3, + 1, 2, 5, 3, 6, 3, 7, 9, 7, 8, 8, 0, 7, 0, 9, 1, 7, 1, 2, 9, 5, 1, 6, + 6, 0, 1, 5, 6, 2, 5, 1, 8, 1, 8, 9, 8, 9, 4, 0, 3, 5, 4, 5, 8, 5, 6, + 4, 7, 5, 8, 3, 0, 0, 7, 8, 1, 2, 5, 9, 0, 9, 4, 9, 4, 7, 0, 1, 7, 7, + 2, 9, 2, 8, 2, 3, 7, 9, 1, 5, 0, 3, 9, 0, 6, 2, 5, 4, 5, 4, 7, 4, 7, + 3, 5, 0, 8, 8, 6, 4, 6, 4, 1, 1, 8, 9, 5, 7, 5, 1, 9, 5, 3, 1, 2, 5, + 2, 2, 7, 3, 7, 3, 6, 7, 5, 4, 4, 3, 2, 3, 2, 0, 5, 9, 4, 7, 8, 7, 5, + 9, 7, 6, 5, 6, 2, 5, 1, 1, 3, 6, 8, 6, 8, 3, 7, 7, 2, 1, 6, 1, 6, 0, + 2, 9, 7, 3, 9, 3, 7, 9, 8, 8, 2, 8, 1, 2, 5, 5, 6, 8, 4, 3, 4, 1, 8, + 8, 6, 0, 8, 0, 8, 0, 1, 4, 8, 6, 9, 6, 8, 9, 9, 4, 1, 4, 0, 6, 2, 5, + 2, 8, 4, 2, 1, 7, 0, 9, 4, 3, 0, 4, 0, 4, 0, 0, 7, 4, 3, 4, 8, 4, 4, + 9, 7, 0, 7, 0, 3, 1, 2, 5, 1, 4, 2, 1, 0, 8, 5, 4, 7, 1, 5, 2, 0, 2, + 0, 0, 3, 7, 1, 7, 4, 2, 2, 4, 8, 5, 3, 5, 1, 5, 6, 2, 5, 7, 1, 0, 5, + 4, 2, 7, 3, 5, 7, 6, 0, 1, 0, 0, 1, 8, 5, 8, 7, 1, 1, 2, 4, 2, 6, 7, + 5, 7, 8, 1, 2, 5, 3, 5, 5, 2, 7, 1, 3, 6, 7, 8, 8, 0, 0, 5, 0, 0, 9, + 2, 9, 3, 5, 5, 6, 2, 1, 3, 3, 7, 8, 9, 0, 6, 2, 5, 1, 7, 7, 6, 3, 5, + 6, 8, 3, 9, 4, 0, 0, 2, 5, 0, 4, 6, 4, 6, 7, 7, 8, 1, 0, 6, 6, 8, 9, + 4, 5, 3, 1, 2, 5, 8, 8, 8, 1, 7, 8, 4, 1, 9, 7, 0, 0, 1, 2, 5, 2, 3, + 2, 3, 3, 8, 9, 0, 5, 3, 3, 4, 4, 7, 2, 6, 5, 6, 2, 5, 4, 4, 4, 0, 8, + 9, 2, 0, 9, 8, 5, 0, 0, 6, 2, 6, 1, 6, 1, 6, 9, 4, 5, 2, 6, 6, 7, 2, + 3, 6, 3, 2, 8, 1, 2, 5, 2, 2, 2, 0, 4, 4, 6, 0, 4, 9, 2, 5, 0, 3, 1, + 3, 0, 8, 0, 8, 4, 7, 2, 6, 3, 3, 3, 6, 1, 8, 1, 6, 4, 0, 6, 2, 5, 1, + 1, 1, 0, 2, 2, 3, 0, 2, 4, 6, 2, 5, 1, 5, 6, 5, 4, 0, 4, 2, 3, 6, 3, + 1, 6, 6, 8, 0, 9, 0, 8, 2, 0, 3, 1, 2, 5, 5, 5, 5, 1, 1, 1, 5, 1, 2, + 3, 1, 2, 5, 7, 8, 2, 7, 0, 2, 1, 1, 8, 1, 5, 8, 3, 4, 0, 4, 5, 4, 1, + 0, 1, 5, 6, 2, 5, 2, 7, 7, 5, 5, 5, 7, 5, 6, 1, 5, 6, 2, 8, 9, 1, 3, + 5, 1, 0, 5, 9, 0, 7, 9, 1, 7, 0, 2, 2, 7, 0, 5, 0, 7, 8, 1, 2, 5, 1, + 3, 8, 7, 7, 7, 8, 7, 8, 0, 7, 8, 1, 4, 4, 5, 6, 7, 5, 5, 2, 9, 5, 3, + 9, 5, 8, 5, 1, 1, 3, 5, 2, 5, 3, 9, 0, 6, 2, 5, 6, 9, 3, 8, 8, 9, 3, + 9, 0, 3, 9, 0, 7, 2, 2, 8, 3, 7, 7, 6, 4, 7, 6, 9, 7, 9, 2, 5, 5, 6, + 7, 6, 2, 6, 9, 5, 3, 1, 2, 5, 3, 4, 6, 9, 4, 4, 6, 9, 5, 1, 9, 5, 3, + 6, 1, 4, 1, 8, 8, 8, 2, 3, 8, 4, 8, 9, 6, 2, 7, 8, 3, 8, 1, 3, 4, 7, + 6, 5, 6, 2, 5, 1, 7, 3, 4, 7, 2, 3, 4, 7, 5, 9, 7, 6, 8, 0, 7, 0, 9, + 4, 4, 1, 1, 9, 2, 4, 4, 8, 1, 3, 9, 1, 9, 0, 6, 7, 3, 8, 2, 8, 1, 2, + 5, 8, 6, 7, 3, 6, 1, 7, 3, 7, 9, 8, 8, 4, 0, 3, 5, 4, 7, 2, 0, 5, 9, + 6, 2, 2, 4, 0, 6, 9, 5, 9, 5, 3, 3, 6, 9, 1, 4, 0, 6, 2, 5, + }; + const uint8_t *pow5 = + &number_of_digits_decimal_left_shift_table_powers_of_5[pow5_a]; + uint32_t i = 0; + uint32_t n = pow5_b - pow5_a; + for (; i < n; i++) { + if (i >= h.num_digits) { + return num_new_digits - 1; + } else if (h.digits[i] == pow5[i]) { + continue; + } else if (h.digits[i] < pow5[i]) { + return num_new_digits - 1; + } else { + return num_new_digits; + } + } + return num_new_digits; +} + +} // end of anonymous namespace + +uint64_t round(decimal &h) { + if ((h.num_digits == 0) || (h.decimal_point < 0)) { + return 0; + } else if (h.decimal_point > 18) { + return UINT64_MAX; + } + // at this point, we know that h.decimal_point >= 0 + uint32_t dp = uint32_t(h.decimal_point); + uint64_t n = 0; + for (uint32_t i = 0; i < dp; i++) { + n = (10 * n) + ((i < h.num_digits) ? h.digits[i] : 0); + } + bool round_up = false; + if (dp < h.num_digits) { + round_up = h.digits[dp] >= 5; // normally, we round up + // but we may need to round to even! + if ((h.digits[dp] == 5) && (dp + 1 == h.num_digits)) { + round_up = h.truncated || ((dp > 0) && (1 & h.digits[dp - 1])); + } + } + if (round_up) { + n++; + } + return n; +} + +// computes h * 2^-shift +void decimal_left_shift(decimal &h, uint32_t shift) { + if (h.num_digits == 0) { + return; + } + uint32_t num_new_digits = number_of_digits_decimal_left_shift(h, shift); + int32_t read_index = int32_t(h.num_digits - 1); + uint32_t write_index = h.num_digits - 1 + num_new_digits; + uint64_t n = 0; + + while (read_index >= 0) { + n += uint64_t(h.digits[read_index]) << shift; + uint64_t quotient = n / 10; + uint64_t remainder = n - (10 * quotient); + if (write_index < max_digits) { + h.digits[write_index] = uint8_t(remainder); + } else if (remainder > 0) { + h.truncated = true; + } + n = quotient; + write_index--; + read_index--; + } + while (n > 0) { + uint64_t quotient = n / 10; + uint64_t remainder = n - (10 * quotient); + if (write_index < max_digits) { + h.digits[write_index] = uint8_t(remainder); + } else if (remainder > 0) { + h.truncated = true; + } + n = quotient; + write_index--; + } + h.num_digits += num_new_digits; + if (h.num_digits > max_digits) { + h.num_digits = max_digits; + } + h.decimal_point += int32_t(num_new_digits); + trim(h); +} + +// computes h * 2^shift +void decimal_right_shift(decimal &h, uint32_t shift) { + uint32_t read_index = 0; + uint32_t write_index = 0; + + uint64_t n = 0; + + while ((n >> shift) == 0) { + if (read_index < h.num_digits) { + n = (10 * n) + h.digits[read_index++]; + } else if (n == 0) { + return; + } else { + while ((n >> shift) == 0) { + n = 10 * n; + read_index++; + } + break; + } + } + h.decimal_point -= int32_t(read_index - 1); + if (h.decimal_point < -decimal_point_range) { // it is zero + h.num_digits = 0; + h.decimal_point = 0; + h.negative = false; + h.truncated = false; + return; + } + uint64_t mask = (uint64_t(1) << shift) - 1; + while (read_index < h.num_digits) { + uint8_t new_digit = uint8_t(n >> shift); + n = (10 * (n & mask)) + h.digits[read_index++]; + h.digits[write_index++] = new_digit; + } + while (n > 0) { + uint8_t new_digit = uint8_t(n >> shift); + n = 10 * (n & mask); + if (write_index < max_digits) { + h.digits[write_index++] = new_digit; + } else if (new_digit > 0) { + h.truncated = true; + } + } + h.num_digits = write_index; + trim(h); +} + +template adjusted_mantissa compute_float(decimal &d) { + adjusted_mantissa answer; + if (d.num_digits == 0) { + // should be zero + answer.power2 = 0; + answer.mantissa = 0; + return answer; + } + // At this point, going further, we can assume that d.num_digits > 0. + // We want to guard against excessive decimal point values because + // they can result in long running times. Indeed, we do + // shifts by at most 60 bits. We have that log(10**400)/log(2**60) ~= 22 + // which is fine, but log(10**299995)/log(2**60) ~= 16609 which is not + // fine (runs for a long time). + // + if(d.decimal_point < -324) { + // We have something smaller than 1e-324 which is always zero + // in binary64 and binary32. + // It should be zero. + answer.power2 = 0; + answer.mantissa = 0; + return answer; + } else if(d.decimal_point >= 310) { + // We have something at least as large as 0.1e310 which is + // always infinite. + answer.power2 = binary::infinite_power(); + answer.mantissa = 0; + return answer; + } + + static const uint32_t max_shift = 60; + static const uint32_t num_powers = 19; + static const uint8_t powers[19] = { + 0, 3, 6, 9, 13, 16, 19, 23, 26, 29, // + 33, 36, 39, 43, 46, 49, 53, 56, 59, // + }; + int32_t exp2 = 0; + while (d.decimal_point > 0) { + uint32_t n = uint32_t(d.decimal_point); + uint32_t shift = (n < num_powers) ? powers[n] : max_shift; + decimal_right_shift(d, shift); + if (d.decimal_point < -decimal_point_range) { + // should be zero + answer.power2 = 0; + answer.mantissa = 0; + return answer; + } + exp2 += int32_t(shift); + } + // We shift left toward [1/2 ... 1]. + while (d.decimal_point <= 0) { + uint32_t shift; + if (d.decimal_point == 0) { + if (d.digits[0] >= 5) { + break; + } + shift = (d.digits[0] < 2) ? 2 : 1; + } else { + uint32_t n = uint32_t(-d.decimal_point); + shift = (n < num_powers) ? powers[n] : max_shift; + } + decimal_left_shift(d, shift); + if (d.decimal_point > decimal_point_range) { + // we want to get infinity: + answer.power2 = 0xFF; + answer.mantissa = 0; + return answer; + } + exp2 -= int32_t(shift); + } + // We are now in the range [1/2 ... 1] but the binary format uses [1 ... 2]. + exp2--; + constexpr int32_t minimum_exponent = binary::minimum_exponent(); + while ((minimum_exponent + 1) > exp2) { + uint32_t n = uint32_t((minimum_exponent + 1) - exp2); + if (n > max_shift) { + n = max_shift; + } + decimal_right_shift(d, n); + exp2 += int32_t(n); + } + if ((exp2 - minimum_exponent) >= binary::infinite_power()) { + answer.power2 = binary::infinite_power(); + answer.mantissa = 0; + return answer; + } + + const int mantissa_size_in_bits = binary::mantissa_explicit_bits() + 1; + decimal_left_shift(d, mantissa_size_in_bits); + + uint64_t mantissa = round(d); + // It is possible that we have an overflow, in which case we need + // to shift back. + if (mantissa >= (uint64_t(1) << mantissa_size_in_bits)) { + decimal_right_shift(d, 1); + exp2 += 1; + mantissa = round(d); + if ((exp2 - minimum_exponent) >= binary::infinite_power()) { + answer.power2 = binary::infinite_power(); + answer.mantissa = 0; + return answer; + } + } + answer.power2 = exp2 - binary::minimum_exponent(); + if (mantissa < (uint64_t(1) << binary::mantissa_explicit_bits())) { + answer.power2--; + } + answer.mantissa = + mantissa & ((uint64_t(1) << binary::mantissa_explicit_bits()) - 1); + return answer; +} + +template +adjusted_mantissa parse_long_mantissa(const char *first) { + decimal d = parse_decimal(first); + return compute_float(d); +} + +template +adjusted_mantissa parse_long_mantissa(const char *first, const char *end) { + decimal d = parse_decimal(first, end); + return compute_float(d); +} + +double from_chars(const char *first) noexcept { + bool negative = first[0] == '-'; + if (negative) { + first++; + } + adjusted_mantissa am = parse_long_mantissa>(first); + uint64_t word = am.mantissa; + word |= uint64_t(am.power2) + << binary_format::mantissa_explicit_bits(); + word = negative ? word | (uint64_t(1) << binary_format::sign_index()) + : word; + double value; + std::memcpy(&value, &word, sizeof(double)); + return value; +} + + +double from_chars(const char *first, const char *end) noexcept { + bool negative = first[0] == '-'; + if (negative) { + first++; + } + adjusted_mantissa am = parse_long_mantissa>(first, end); + uint64_t word = am.mantissa; + word |= uint64_t(am.power2) + << binary_format::mantissa_explicit_bits(); + word = negative ? word | (uint64_t(1) << binary_format::sign_index()) + : word; + double value; + std::memcpy(&value, &word, sizeof(double)); + return value; +} + +} // internal +} // simdjson + +#endif // SIMDJSON_SRC_FROM_CHARS_CPP +/* end file from_chars.cpp */ +/* including internal/error_tables.cpp: #include */ +/* begin file internal/error_tables.cpp */ +#ifndef SIMDJSON_SRC_ERROR_TABLES_CPP +#define SIMDJSON_SRC_ERROR_TABLES_CPP + +/* including simdjson/internal/jsoncharutils_tables.h: #include */ +/* begin file simdjson/internal/jsoncharutils_tables.h */ +#ifndef SIMDJSON_INTERNAL_JSONCHARUTILS_TABLES_H +#define SIMDJSON_INTERNAL_JSONCHARUTILS_TABLES_H + +/* skipped duplicate #include "simdjson/base.h" */ + +#ifdef JSON_TEST_STRINGS +void found_string(const uint8_t *buf, const uint8_t *parsed_begin, + const uint8_t *parsed_end); +void found_bad_string(const uint8_t *buf); +#endif + +namespace simdjson { +namespace internal { +// structural chars here are +// they are { 0x7b } 0x7d : 0x3a [ 0x5b ] 0x5d , 0x2c (and NULL) +// we are also interested in the four whitespace characters +// space 0x20, linefeed 0x0a, horizontal tab 0x09 and carriage return 0x0d + +extern SIMDJSON_DLLIMPORTEXPORT const bool structural_or_whitespace_negated[256]; +extern SIMDJSON_DLLIMPORTEXPORT const bool structural_or_whitespace[256]; +extern SIMDJSON_DLLIMPORTEXPORT const uint32_t digit_to_val32[886]; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_JSONCHARUTILS_TABLES_H +/* end file simdjson/internal/jsoncharutils_tables.h */ +/* including simdjson/error-inl.h: #include */ +/* begin file simdjson/error-inl.h */ +#ifndef SIMDJSON_ERROR_INL_H +#define SIMDJSON_ERROR_INL_H + +/* skipped duplicate #include "simdjson/error.h" */ + +#include + +namespace simdjson { +namespace internal { + // We store the error code so we can validate the error message is associated with the right code + struct error_code_info { + error_code code; + const char* message; // do not use a fancy std::string where a simple C string will do (no alloc, no destructor) + }; + // These MUST match the codes in error_code. We check this constraint in basictests. + extern SIMDJSON_DLLIMPORTEXPORT const error_code_info error_codes[]; +} // namespace internal + + +inline const char *error_message(error_code error) noexcept { + // If you're using error_code, we're trusting you got it from the enum. + return internal::error_codes[int(error)].message; +} + +// deprecated function +#ifndef SIMDJSON_DISABLE_DEPRECATED_API +inline const std::string error_message(int error) noexcept { + if (error < 0 || error >= error_code::NUM_ERROR_CODES) { + return internal::error_codes[UNEXPECTED_ERROR].message; + } + return internal::error_codes[error].message; +} +#endif // SIMDJSON_DISABLE_DEPRECATED_API + +inline std::ostream& operator<<(std::ostream& out, error_code error) noexcept { + return out << error_message(error); +} + +namespace internal { + +// +// internal::simdjson_result_base inline implementation +// + +template +simdjson_inline void simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T&& simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline simdjson_result_base::simdjson_result_base(T &&value, error_code error) noexcept + : std::pair(std::forward(value), error) {} +template +simdjson_inline simdjson_result_base::simdjson_result_base(error_code error) noexcept + : simdjson_result_base(T{}, error) {} +template +simdjson_inline simdjson_result_base::simdjson_result_base(T &&value) noexcept + : simdjson_result_base(std::forward(value), SUCCESS) {} +template +simdjson_inline simdjson_result_base::simdjson_result_base() noexcept + : simdjson_result_base(T{}, UNINITIALIZED) {} + +} // namespace internal + +/// +/// simdjson_result inline implementation +/// + +template +simdjson_inline void simdjson_result::tie(T &value, error_code &error) && noexcept { + std::forward>(*this).tie(value, error); +} + +template +simdjson_warn_unused simdjson_inline error_code simdjson_result::get(T &value) && noexcept { + return std::forward>(*this).get(value); +} + +template +simdjson_inline error_code simdjson_result::error() const noexcept { + return internal::simdjson_result_base::error(); +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& simdjson_result::value() & noexcept(false) { + return internal::simdjson_result_base::value(); +} + +template +simdjson_inline T&& simdjson_result::value() && noexcept(false) { + return std::forward>(*this).value(); +} + +template +simdjson_inline T&& simdjson_result::take_value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline simdjson_result::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& simdjson_result::value_unsafe() const& noexcept { + return internal::simdjson_result_base::value_unsafe(); +} + +template +simdjson_inline T&& simdjson_result::value_unsafe() && noexcept { + return std::forward>(*this).value_unsafe(); +} + +template +simdjson_inline simdjson_result::simdjson_result(T &&value, error_code error) noexcept + : internal::simdjson_result_base(std::forward(value), error) {} +template +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : internal::simdjson_result_base(error) {} +template +simdjson_inline simdjson_result::simdjson_result(T &&value) noexcept + : internal::simdjson_result_base(std::forward(value)) {} +template +simdjson_inline simdjson_result::simdjson_result() noexcept + : internal::simdjson_result_base() {} + +} // namespace simdjson + +#endif // SIMDJSON_ERROR_INL_H +/* end file simdjson/error-inl.h */ + +namespace simdjson { +namespace internal { + + SIMDJSON_DLLIMPORTEXPORT const error_code_info error_codes[] { + { SUCCESS, "SUCCESS: No error" }, + { CAPACITY, "CAPACITY: This parser can't support a document that big" }, + { MEMALLOC, "MEMALLOC: Error allocating memory, we're most likely out of memory" }, + { TAPE_ERROR, "TAPE_ERROR: The JSON document has an improper structure: missing or superfluous commas, braces, missing keys, etc." }, + { DEPTH_ERROR, "DEPTH_ERROR: The JSON document was too deep (too many nested objects and arrays)" }, + { STRING_ERROR, "STRING_ERROR: Problem while parsing a string" }, + { T_ATOM_ERROR, "T_ATOM_ERROR: Problem while parsing an atom starting with the letter 't'" }, + { F_ATOM_ERROR, "F_ATOM_ERROR: Problem while parsing an atom starting with the letter 'f'" }, + { N_ATOM_ERROR, "N_ATOM_ERROR: Problem while parsing an atom starting with the letter 'n'" }, + { NUMBER_ERROR, "NUMBER_ERROR: Problem while parsing a number" }, + { UTF8_ERROR, "UTF8_ERROR: The input is not valid UTF-8" }, + { UNINITIALIZED, "UNINITIALIZED: Uninitialized" }, + { EMPTY, "EMPTY: no JSON found" }, + { UNESCAPED_CHARS, "UNESCAPED_CHARS: Within strings, some characters must be escaped, we found unescaped characters" }, + { UNCLOSED_STRING, "UNCLOSED_STRING: A string is opened, but never closed." }, + { UNSUPPORTED_ARCHITECTURE, "UNSUPPORTED_ARCHITECTURE: simdjson does not have an implementation supported by this CPU architecture. Please report this error to the core team as it should never happen." }, + { INCORRECT_TYPE, "INCORRECT_TYPE: The JSON element does not have the requested type." }, + { NUMBER_OUT_OF_RANGE, "NUMBER_OUT_OF_RANGE: The JSON number is too large or too small to fit within the requested type." }, + { INDEX_OUT_OF_BOUNDS, "INDEX_OUT_OF_BOUNDS: Attempted to access an element of a JSON array that is beyond its length." }, + { NO_SUCH_FIELD, "NO_SUCH_FIELD: The JSON field referenced does not exist in this object." }, + { IO_ERROR, "IO_ERROR: Error reading the file." }, + { INVALID_JSON_POINTER, "INVALID_JSON_POINTER: Invalid JSON pointer syntax." }, + { INVALID_URI_FRAGMENT, "INVALID_URI_FRAGMENT: Invalid URI fragment syntax." }, + { UNEXPECTED_ERROR, "UNEXPECTED_ERROR: Unexpected error, consider reporting this problem as you may have found a bug in simdjson" }, + { PARSER_IN_USE, "PARSER_IN_USE: Cannot parse a new document while a document is still in use." }, + { OUT_OF_ORDER_ITERATION, "OUT_OF_ORDER_ITERATION: Objects and arrays can only be iterated when they are first encountered." }, + { INSUFFICIENT_PADDING, "INSUFFICIENT_PADDING: simdjson requires the input JSON string to have at least SIMDJSON_PADDING extra bytes allocated, beyond the string's length. Consider using the simdjson::padded_string class if needed." }, + { INCOMPLETE_ARRAY_OR_OBJECT, "INCOMPLETE_ARRAY_OR_OBJECT: JSON document ended early in the middle of an object or array." }, + { SCALAR_DOCUMENT_AS_VALUE, "SCALAR_DOCUMENT_AS_VALUE: A JSON document made of a scalar (number, Boolean, null or string) is treated as a value. Use get_bool(), get_double(), etc. on the document instead. "}, + { OUT_OF_BOUNDS, "OUT_OF_BOUNDS: Attempt to access location outside of document."}, + { TRAILING_CONTENT, "TRAILING_CONTENT: Unexpected trailing content in the JSON input."} + }; // error_messages[] + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_SRC_ERROR_TABLES_CPP +/* end file internal/error_tables.cpp */ +/* including internal/jsoncharutils_tables.cpp: #include */ +/* begin file internal/jsoncharutils_tables.cpp */ +#ifndef SIMDJSON_SRC_JSONCHARUTILS_TABLES_CPP +#define SIMDJSON_SRC_JSONCHARUTILS_TABLES_CPP + +/* skipped duplicate #include */ + +namespace simdjson { +namespace internal { + +// structural chars here are +// they are { 0x7b } 0x7d : 0x3a [ 0x5b ] 0x5d , 0x2c (and NULL) +// we are also interested in the four whitespace characters +// space 0x20, linefeed 0x0a, horizontal tab 0x09 and carriage return 0x0d + +SIMDJSON_DLLIMPORTEXPORT const bool structural_or_whitespace_negated[256] = { + 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}; + +SIMDJSON_DLLIMPORTEXPORT const bool structural_or_whitespace[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 1, 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, 0, 0, 0, 0, 0, 1, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 0, 0, 0, 0, 1, 0, 1, 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, 0, 1, 0, 1, 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, 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, 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, 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, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +SIMDJSON_DLLIMPORTEXPORT const uint32_t digit_to_val32[886] = { + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0x0, 0x1, 0x2, 0x3, 0x4, 0x5, + 0x6, 0x7, 0x8, 0x9, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xa, + 0xb, 0xc, 0xd, 0xe, 0xf, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xa, 0xb, 0xc, 0xd, 0xe, + 0xf, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0x0, 0x10, 0x20, 0x30, 0x40, 0x50, + 0x60, 0x70, 0x80, 0x90, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xa0, + 0xb0, 0xc0, 0xd0, 0xe0, 0xf0, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xa0, 0xb0, 0xc0, 0xd0, 0xe0, + 0xf0, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0x0, 0x100, 0x200, 0x300, 0x400, 0x500, + 0x600, 0x700, 0x800, 0x900, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xa00, + 0xb00, 0xc00, 0xd00, 0xe00, 0xf00, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xa00, 0xb00, 0xc00, 0xd00, 0xe00, + 0xf00, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0x0, 0x1000, 0x2000, 0x3000, 0x4000, 0x5000, + 0x6000, 0x7000, 0x8000, 0x9000, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xa000, + 0xb000, 0xc000, 0xd000, 0xe000, 0xf000, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xa000, 0xb000, 0xc000, 0xd000, 0xe000, + 0xf000, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, + 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF}; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_SRC_JSONCHARUTILS_TABLES_CPP +/* end file internal/jsoncharutils_tables.cpp */ +/* including internal/numberparsing_tables.cpp: #include */ +/* begin file internal/numberparsing_tables.cpp */ +#ifndef SIMDJSON_SRC_NUMBERPARSING_TABLES_CPP +#define SIMDJSON_SRC_NUMBERPARSING_TABLES_CPP + +/* skipped duplicate #include */ +/* including simdjson/internal/numberparsing_tables.h: #include */ +/* begin file simdjson/internal/numberparsing_tables.h */ +#ifndef SIMDJSON_INTERNAL_NUMBERPARSING_TABLES_H +#define SIMDJSON_INTERNAL_NUMBERPARSING_TABLES_H + +/* skipped duplicate #include "simdjson/base.h" */ + +namespace simdjson { +namespace internal { +/** + * The smallest non-zero float (binary64) is 2^-1074. + * We take as input numbers of the form w x 10^q where w < 2^64. + * We have that w * 10^-343 < 2^(64-344) 5^-343 < 2^-1076. + * However, we have that + * (2^64-1) * 10^-342 = (2^64-1) * 2^-342 * 5^-342 > 2^-1074. + * Thus it is possible for a number of the form w * 10^-342 where + * w is a 64-bit value to be a non-zero floating-point number. + ********* + * Any number of form w * 10^309 where w>= 1 is going to be + * infinite in binary64 so we never need to worry about powers + * of 5 greater than 308. + */ +constexpr int smallest_power = -342; +constexpr int largest_power = 308; + +/** + * Represents a 128-bit value. + * low: least significant 64 bits. + * high: most significant 64 bits. + */ +struct value128 { + uint64_t low; + uint64_t high; +}; + + +// Precomputed powers of ten from 10^0 to 10^22. These +// can be represented exactly using the double type. +extern SIMDJSON_DLLIMPORTEXPORT const double power_of_ten[]; + + +/** + * When mapping numbers from decimal to binary, + * we go from w * 10^q to m * 2^p but we have + * 10^q = 5^q * 2^q, so effectively + * we are trying to match + * w * 2^q * 5^q to m * 2^p. Thus the powers of two + * are not a concern since they can be represented + * exactly using the binary notation, only the powers of five + * affect the binary significand. + */ + + +// The truncated powers of five from 5^-342 all the way to 5^308 +// The mantissa is truncated to 128 bits, and +// never rounded up. Uses about 10KB. +extern SIMDJSON_DLLIMPORTEXPORT const uint64_t power_of_five_128[]; +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_NUMBERPARSING_TABLES_H +/* end file simdjson/internal/numberparsing_tables.h */ + +// Precomputed powers of ten from 10^0 to 10^22. These +// can be represented exactly using the double type. +SIMDJSON_DLLIMPORTEXPORT const double simdjson::internal::power_of_ten[] = { + 1e0, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, + 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19, 1e20, 1e21, 1e22}; + +/** + * When mapping numbers from decimal to binary, + * we go from w * 10^q to m * 2^p but we have + * 10^q = 5^q * 2^q, so effectively + * we are trying to match + * w * 2^q * 5^q to m * 2^p. Thus the powers of two + * are not a concern since they can be represented + * exactly using the binary notation, only the powers of five + * affect the binary significand. + */ + + +// The truncated powers of five from 5^-342 all the way to 5^308 +// The mantissa is truncated to 128 bits, and +// never rounded up. Uses about 10KB. +SIMDJSON_DLLIMPORTEXPORT const uint64_t simdjson::internal::power_of_five_128[]= { + 0xeef453d6923bd65a,0x113faa2906a13b3f, + 0x9558b4661b6565f8,0x4ac7ca59a424c507, + 0xbaaee17fa23ebf76,0x5d79bcf00d2df649, + 0xe95a99df8ace6f53,0xf4d82c2c107973dc, + 0x91d8a02bb6c10594,0x79071b9b8a4be869, + 0xb64ec836a47146f9,0x9748e2826cdee284, + 0xe3e27a444d8d98b7,0xfd1b1b2308169b25, + 0x8e6d8c6ab0787f72,0xfe30f0f5e50e20f7, + 0xb208ef855c969f4f,0xbdbd2d335e51a935, + 0xde8b2b66b3bc4723,0xad2c788035e61382, + 0x8b16fb203055ac76,0x4c3bcb5021afcc31, + 0xaddcb9e83c6b1793,0xdf4abe242a1bbf3d, + 0xd953e8624b85dd78,0xd71d6dad34a2af0d, + 0x87d4713d6f33aa6b,0x8672648c40e5ad68, + 0xa9c98d8ccb009506,0x680efdaf511f18c2, + 0xd43bf0effdc0ba48,0x212bd1b2566def2, + 0x84a57695fe98746d,0x14bb630f7604b57, + 0xa5ced43b7e3e9188,0x419ea3bd35385e2d, + 0xcf42894a5dce35ea,0x52064cac828675b9, + 0x818995ce7aa0e1b2,0x7343efebd1940993, + 0xa1ebfb4219491a1f,0x1014ebe6c5f90bf8, + 0xca66fa129f9b60a6,0xd41a26e077774ef6, + 0xfd00b897478238d0,0x8920b098955522b4, + 0x9e20735e8cb16382,0x55b46e5f5d5535b0, + 0xc5a890362fddbc62,0xeb2189f734aa831d, + 0xf712b443bbd52b7b,0xa5e9ec7501d523e4, + 0x9a6bb0aa55653b2d,0x47b233c92125366e, + 0xc1069cd4eabe89f8,0x999ec0bb696e840a, + 0xf148440a256e2c76,0xc00670ea43ca250d, + 0x96cd2a865764dbca,0x380406926a5e5728, + 0xbc807527ed3e12bc,0xc605083704f5ecf2, + 0xeba09271e88d976b,0xf7864a44c633682e, + 0x93445b8731587ea3,0x7ab3ee6afbe0211d, + 0xb8157268fdae9e4c,0x5960ea05bad82964, + 0xe61acf033d1a45df,0x6fb92487298e33bd, + 0x8fd0c16206306bab,0xa5d3b6d479f8e056, + 0xb3c4f1ba87bc8696,0x8f48a4899877186c, + 0xe0b62e2929aba83c,0x331acdabfe94de87, + 0x8c71dcd9ba0b4925,0x9ff0c08b7f1d0b14, + 0xaf8e5410288e1b6f,0x7ecf0ae5ee44dd9, + 0xdb71e91432b1a24a,0xc9e82cd9f69d6150, + 0x892731ac9faf056e,0xbe311c083a225cd2, + 0xab70fe17c79ac6ca,0x6dbd630a48aaf406, + 0xd64d3d9db981787d,0x92cbbccdad5b108, + 0x85f0468293f0eb4e,0x25bbf56008c58ea5, + 0xa76c582338ed2621,0xaf2af2b80af6f24e, + 0xd1476e2c07286faa,0x1af5af660db4aee1, + 0x82cca4db847945ca,0x50d98d9fc890ed4d, + 0xa37fce126597973c,0xe50ff107bab528a0, + 0xcc5fc196fefd7d0c,0x1e53ed49a96272c8, + 0xff77b1fcbebcdc4f,0x25e8e89c13bb0f7a, + 0x9faacf3df73609b1,0x77b191618c54e9ac, + 0xc795830d75038c1d,0xd59df5b9ef6a2417, + 0xf97ae3d0d2446f25,0x4b0573286b44ad1d, + 0x9becce62836ac577,0x4ee367f9430aec32, + 0xc2e801fb244576d5,0x229c41f793cda73f, + 0xf3a20279ed56d48a,0x6b43527578c1110f, + 0x9845418c345644d6,0x830a13896b78aaa9, + 0xbe5691ef416bd60c,0x23cc986bc656d553, + 0xedec366b11c6cb8f,0x2cbfbe86b7ec8aa8, + 0x94b3a202eb1c3f39,0x7bf7d71432f3d6a9, + 0xb9e08a83a5e34f07,0xdaf5ccd93fb0cc53, + 0xe858ad248f5c22c9,0xd1b3400f8f9cff68, + 0x91376c36d99995be,0x23100809b9c21fa1, + 0xb58547448ffffb2d,0xabd40a0c2832a78a, + 0xe2e69915b3fff9f9,0x16c90c8f323f516c, + 0x8dd01fad907ffc3b,0xae3da7d97f6792e3, + 0xb1442798f49ffb4a,0x99cd11cfdf41779c, + 0xdd95317f31c7fa1d,0x40405643d711d583, + 0x8a7d3eef7f1cfc52,0x482835ea666b2572, + 0xad1c8eab5ee43b66,0xda3243650005eecf, + 0xd863b256369d4a40,0x90bed43e40076a82, + 0x873e4f75e2224e68,0x5a7744a6e804a291, + 0xa90de3535aaae202,0x711515d0a205cb36, + 0xd3515c2831559a83,0xd5a5b44ca873e03, + 0x8412d9991ed58091,0xe858790afe9486c2, + 0xa5178fff668ae0b6,0x626e974dbe39a872, + 0xce5d73ff402d98e3,0xfb0a3d212dc8128f, + 0x80fa687f881c7f8e,0x7ce66634bc9d0b99, + 0xa139029f6a239f72,0x1c1fffc1ebc44e80, + 0xc987434744ac874e,0xa327ffb266b56220, + 0xfbe9141915d7a922,0x4bf1ff9f0062baa8, + 0x9d71ac8fada6c9b5,0x6f773fc3603db4a9, + 0xc4ce17b399107c22,0xcb550fb4384d21d3, + 0xf6019da07f549b2b,0x7e2a53a146606a48, + 0x99c102844f94e0fb,0x2eda7444cbfc426d, + 0xc0314325637a1939,0xfa911155fefb5308, + 0xf03d93eebc589f88,0x793555ab7eba27ca, + 0x96267c7535b763b5,0x4bc1558b2f3458de, + 0xbbb01b9283253ca2,0x9eb1aaedfb016f16, + 0xea9c227723ee8bcb,0x465e15a979c1cadc, + 0x92a1958a7675175f,0xbfacd89ec191ec9, + 0xb749faed14125d36,0xcef980ec671f667b, + 0xe51c79a85916f484,0x82b7e12780e7401a, + 0x8f31cc0937ae58d2,0xd1b2ecb8b0908810, + 0xb2fe3f0b8599ef07,0x861fa7e6dcb4aa15, + 0xdfbdcece67006ac9,0x67a791e093e1d49a, + 0x8bd6a141006042bd,0xe0c8bb2c5c6d24e0, + 0xaecc49914078536d,0x58fae9f773886e18, + 0xda7f5bf590966848,0xaf39a475506a899e, + 0x888f99797a5e012d,0x6d8406c952429603, + 0xaab37fd7d8f58178,0xc8e5087ba6d33b83, + 0xd5605fcdcf32e1d6,0xfb1e4a9a90880a64, + 0x855c3be0a17fcd26,0x5cf2eea09a55067f, + 0xa6b34ad8c9dfc06f,0xf42faa48c0ea481e, + 0xd0601d8efc57b08b,0xf13b94daf124da26, + 0x823c12795db6ce57,0x76c53d08d6b70858, + 0xa2cb1717b52481ed,0x54768c4b0c64ca6e, + 0xcb7ddcdda26da268,0xa9942f5dcf7dfd09, + 0xfe5d54150b090b02,0xd3f93b35435d7c4c, + 0x9efa548d26e5a6e1,0xc47bc5014a1a6daf, + 0xc6b8e9b0709f109a,0x359ab6419ca1091b, + 0xf867241c8cc6d4c0,0xc30163d203c94b62, + 0x9b407691d7fc44f8,0x79e0de63425dcf1d, + 0xc21094364dfb5636,0x985915fc12f542e4, + 0xf294b943e17a2bc4,0x3e6f5b7b17b2939d, + 0x979cf3ca6cec5b5a,0xa705992ceecf9c42, + 0xbd8430bd08277231,0x50c6ff782a838353, + 0xece53cec4a314ebd,0xa4f8bf5635246428, + 0x940f4613ae5ed136,0x871b7795e136be99, + 0xb913179899f68584,0x28e2557b59846e3f, + 0xe757dd7ec07426e5,0x331aeada2fe589cf, + 0x9096ea6f3848984f,0x3ff0d2c85def7621, + 0xb4bca50b065abe63,0xfed077a756b53a9, + 0xe1ebce4dc7f16dfb,0xd3e8495912c62894, + 0x8d3360f09cf6e4bd,0x64712dd7abbbd95c, + 0xb080392cc4349dec,0xbd8d794d96aacfb3, + 0xdca04777f541c567,0xecf0d7a0fc5583a0, + 0x89e42caaf9491b60,0xf41686c49db57244, + 0xac5d37d5b79b6239,0x311c2875c522ced5, + 0xd77485cb25823ac7,0x7d633293366b828b, + 0x86a8d39ef77164bc,0xae5dff9c02033197, + 0xa8530886b54dbdeb,0xd9f57f830283fdfc, + 0xd267caa862a12d66,0xd072df63c324fd7b, + 0x8380dea93da4bc60,0x4247cb9e59f71e6d, + 0xa46116538d0deb78,0x52d9be85f074e608, + 0xcd795be870516656,0x67902e276c921f8b, + 0x806bd9714632dff6,0xba1cd8a3db53b6, + 0xa086cfcd97bf97f3,0x80e8a40eccd228a4, + 0xc8a883c0fdaf7df0,0x6122cd128006b2cd, + 0xfad2a4b13d1b5d6c,0x796b805720085f81, + 0x9cc3a6eec6311a63,0xcbe3303674053bb0, + 0xc3f490aa77bd60fc,0xbedbfc4411068a9c, + 0xf4f1b4d515acb93b,0xee92fb5515482d44, + 0x991711052d8bf3c5,0x751bdd152d4d1c4a, + 0xbf5cd54678eef0b6,0xd262d45a78a0635d, + 0xef340a98172aace4,0x86fb897116c87c34, + 0x9580869f0e7aac0e,0xd45d35e6ae3d4da0, + 0xbae0a846d2195712,0x8974836059cca109, + 0xe998d258869facd7,0x2bd1a438703fc94b, + 0x91ff83775423cc06,0x7b6306a34627ddcf, + 0xb67f6455292cbf08,0x1a3bc84c17b1d542, + 0xe41f3d6a7377eeca,0x20caba5f1d9e4a93, + 0x8e938662882af53e,0x547eb47b7282ee9c, + 0xb23867fb2a35b28d,0xe99e619a4f23aa43, + 0xdec681f9f4c31f31,0x6405fa00e2ec94d4, + 0x8b3c113c38f9f37e,0xde83bc408dd3dd04, + 0xae0b158b4738705e,0x9624ab50b148d445, + 0xd98ddaee19068c76,0x3badd624dd9b0957, + 0x87f8a8d4cfa417c9,0xe54ca5d70a80e5d6, + 0xa9f6d30a038d1dbc,0x5e9fcf4ccd211f4c, + 0xd47487cc8470652b,0x7647c3200069671f, + 0x84c8d4dfd2c63f3b,0x29ecd9f40041e073, + 0xa5fb0a17c777cf09,0xf468107100525890, + 0xcf79cc9db955c2cc,0x7182148d4066eeb4, + 0x81ac1fe293d599bf,0xc6f14cd848405530, + 0xa21727db38cb002f,0xb8ada00e5a506a7c, + 0xca9cf1d206fdc03b,0xa6d90811f0e4851c, + 0xfd442e4688bd304a,0x908f4a166d1da663, + 0x9e4a9cec15763e2e,0x9a598e4e043287fe, + 0xc5dd44271ad3cdba,0x40eff1e1853f29fd, + 0xf7549530e188c128,0xd12bee59e68ef47c, + 0x9a94dd3e8cf578b9,0x82bb74f8301958ce, + 0xc13a148e3032d6e7,0xe36a52363c1faf01, + 0xf18899b1bc3f8ca1,0xdc44e6c3cb279ac1, + 0x96f5600f15a7b7e5,0x29ab103a5ef8c0b9, + 0xbcb2b812db11a5de,0x7415d448f6b6f0e7, + 0xebdf661791d60f56,0x111b495b3464ad21, + 0x936b9fcebb25c995,0xcab10dd900beec34, + 0xb84687c269ef3bfb,0x3d5d514f40eea742, + 0xe65829b3046b0afa,0xcb4a5a3112a5112, + 0x8ff71a0fe2c2e6dc,0x47f0e785eaba72ab, + 0xb3f4e093db73a093,0x59ed216765690f56, + 0xe0f218b8d25088b8,0x306869c13ec3532c, + 0x8c974f7383725573,0x1e414218c73a13fb, + 0xafbd2350644eeacf,0xe5d1929ef90898fa, + 0xdbac6c247d62a583,0xdf45f746b74abf39, + 0x894bc396ce5da772,0x6b8bba8c328eb783, + 0xab9eb47c81f5114f,0x66ea92f3f326564, + 0xd686619ba27255a2,0xc80a537b0efefebd, + 0x8613fd0145877585,0xbd06742ce95f5f36, + 0xa798fc4196e952e7,0x2c48113823b73704, + 0xd17f3b51fca3a7a0,0xf75a15862ca504c5, + 0x82ef85133de648c4,0x9a984d73dbe722fb, + 0xa3ab66580d5fdaf5,0xc13e60d0d2e0ebba, + 0xcc963fee10b7d1b3,0x318df905079926a8, + 0xffbbcfe994e5c61f,0xfdf17746497f7052, + 0x9fd561f1fd0f9bd3,0xfeb6ea8bedefa633, + 0xc7caba6e7c5382c8,0xfe64a52ee96b8fc0, + 0xf9bd690a1b68637b,0x3dfdce7aa3c673b0, + 0x9c1661a651213e2d,0x6bea10ca65c084e, + 0xc31bfa0fe5698db8,0x486e494fcff30a62, + 0xf3e2f893dec3f126,0x5a89dba3c3efccfa, + 0x986ddb5c6b3a76b7,0xf89629465a75e01c, + 0xbe89523386091465,0xf6bbb397f1135823, + 0xee2ba6c0678b597f,0x746aa07ded582e2c, + 0x94db483840b717ef,0xa8c2a44eb4571cdc, + 0xba121a4650e4ddeb,0x92f34d62616ce413, + 0xe896a0d7e51e1566,0x77b020baf9c81d17, + 0x915e2486ef32cd60,0xace1474dc1d122e, + 0xb5b5ada8aaff80b8,0xd819992132456ba, + 0xe3231912d5bf60e6,0x10e1fff697ed6c69, + 0x8df5efabc5979c8f,0xca8d3ffa1ef463c1, + 0xb1736b96b6fd83b3,0xbd308ff8a6b17cb2, + 0xddd0467c64bce4a0,0xac7cb3f6d05ddbde, + 0x8aa22c0dbef60ee4,0x6bcdf07a423aa96b, + 0xad4ab7112eb3929d,0x86c16c98d2c953c6, + 0xd89d64d57a607744,0xe871c7bf077ba8b7, + 0x87625f056c7c4a8b,0x11471cd764ad4972, + 0xa93af6c6c79b5d2d,0xd598e40d3dd89bcf, + 0xd389b47879823479,0x4aff1d108d4ec2c3, + 0x843610cb4bf160cb,0xcedf722a585139ba, + 0xa54394fe1eedb8fe,0xc2974eb4ee658828, + 0xce947a3da6a9273e,0x733d226229feea32, + 0x811ccc668829b887,0x806357d5a3f525f, + 0xa163ff802a3426a8,0xca07c2dcb0cf26f7, + 0xc9bcff6034c13052,0xfc89b393dd02f0b5, + 0xfc2c3f3841f17c67,0xbbac2078d443ace2, + 0x9d9ba7832936edc0,0xd54b944b84aa4c0d, + 0xc5029163f384a931,0xa9e795e65d4df11, + 0xf64335bcf065d37d,0x4d4617b5ff4a16d5, + 0x99ea0196163fa42e,0x504bced1bf8e4e45, + 0xc06481fb9bcf8d39,0xe45ec2862f71e1d6, + 0xf07da27a82c37088,0x5d767327bb4e5a4c, + 0x964e858c91ba2655,0x3a6a07f8d510f86f, + 0xbbe226efb628afea,0x890489f70a55368b, + 0xeadab0aba3b2dbe5,0x2b45ac74ccea842e, + 0x92c8ae6b464fc96f,0x3b0b8bc90012929d, + 0xb77ada0617e3bbcb,0x9ce6ebb40173744, + 0xe55990879ddcaabd,0xcc420a6a101d0515, + 0x8f57fa54c2a9eab6,0x9fa946824a12232d, + 0xb32df8e9f3546564,0x47939822dc96abf9, + 0xdff9772470297ebd,0x59787e2b93bc56f7, + 0x8bfbea76c619ef36,0x57eb4edb3c55b65a, + 0xaefae51477a06b03,0xede622920b6b23f1, + 0xdab99e59958885c4,0xe95fab368e45eced, + 0x88b402f7fd75539b,0x11dbcb0218ebb414, + 0xaae103b5fcd2a881,0xd652bdc29f26a119, + 0xd59944a37c0752a2,0x4be76d3346f0495f, + 0x857fcae62d8493a5,0x6f70a4400c562ddb, + 0xa6dfbd9fb8e5b88e,0xcb4ccd500f6bb952, + 0xd097ad07a71f26b2,0x7e2000a41346a7a7, + 0x825ecc24c873782f,0x8ed400668c0c28c8, + 0xa2f67f2dfa90563b,0x728900802f0f32fa, + 0xcbb41ef979346bca,0x4f2b40a03ad2ffb9, + 0xfea126b7d78186bc,0xe2f610c84987bfa8, + 0x9f24b832e6b0f436,0xdd9ca7d2df4d7c9, + 0xc6ede63fa05d3143,0x91503d1c79720dbb, + 0xf8a95fcf88747d94,0x75a44c6397ce912a, + 0x9b69dbe1b548ce7c,0xc986afbe3ee11aba, + 0xc24452da229b021b,0xfbe85badce996168, + 0xf2d56790ab41c2a2,0xfae27299423fb9c3, + 0x97c560ba6b0919a5,0xdccd879fc967d41a, + 0xbdb6b8e905cb600f,0x5400e987bbc1c920, + 0xed246723473e3813,0x290123e9aab23b68, + 0x9436c0760c86e30b,0xf9a0b6720aaf6521, + 0xb94470938fa89bce,0xf808e40e8d5b3e69, + 0xe7958cb87392c2c2,0xb60b1d1230b20e04, + 0x90bd77f3483bb9b9,0xb1c6f22b5e6f48c2, + 0xb4ecd5f01a4aa828,0x1e38aeb6360b1af3, + 0xe2280b6c20dd5232,0x25c6da63c38de1b0, + 0x8d590723948a535f,0x579c487e5a38ad0e, + 0xb0af48ec79ace837,0x2d835a9df0c6d851, + 0xdcdb1b2798182244,0xf8e431456cf88e65, + 0x8a08f0f8bf0f156b,0x1b8e9ecb641b58ff, + 0xac8b2d36eed2dac5,0xe272467e3d222f3f, + 0xd7adf884aa879177,0x5b0ed81dcc6abb0f, + 0x86ccbb52ea94baea,0x98e947129fc2b4e9, + 0xa87fea27a539e9a5,0x3f2398d747b36224, + 0xd29fe4b18e88640e,0x8eec7f0d19a03aad, + 0x83a3eeeef9153e89,0x1953cf68300424ac, + 0xa48ceaaab75a8e2b,0x5fa8c3423c052dd7, + 0xcdb02555653131b6,0x3792f412cb06794d, + 0x808e17555f3ebf11,0xe2bbd88bbee40bd0, + 0xa0b19d2ab70e6ed6,0x5b6aceaeae9d0ec4, + 0xc8de047564d20a8b,0xf245825a5a445275, + 0xfb158592be068d2e,0xeed6e2f0f0d56712, + 0x9ced737bb6c4183d,0x55464dd69685606b, + 0xc428d05aa4751e4c,0xaa97e14c3c26b886, + 0xf53304714d9265df,0xd53dd99f4b3066a8, + 0x993fe2c6d07b7fab,0xe546a8038efe4029, + 0xbf8fdb78849a5f96,0xde98520472bdd033, + 0xef73d256a5c0f77c,0x963e66858f6d4440, + 0x95a8637627989aad,0xdde7001379a44aa8, + 0xbb127c53b17ec159,0x5560c018580d5d52, + 0xe9d71b689dde71af,0xaab8f01e6e10b4a6, + 0x9226712162ab070d,0xcab3961304ca70e8, + 0xb6b00d69bb55c8d1,0x3d607b97c5fd0d22, + 0xe45c10c42a2b3b05,0x8cb89a7db77c506a, + 0x8eb98a7a9a5b04e3,0x77f3608e92adb242, + 0xb267ed1940f1c61c,0x55f038b237591ed3, + 0xdf01e85f912e37a3,0x6b6c46dec52f6688, + 0x8b61313bbabce2c6,0x2323ac4b3b3da015, + 0xae397d8aa96c1b77,0xabec975e0a0d081a, + 0xd9c7dced53c72255,0x96e7bd358c904a21, + 0x881cea14545c7575,0x7e50d64177da2e54, + 0xaa242499697392d2,0xdde50bd1d5d0b9e9, + 0xd4ad2dbfc3d07787,0x955e4ec64b44e864, + 0x84ec3c97da624ab4,0xbd5af13bef0b113e, + 0xa6274bbdd0fadd61,0xecb1ad8aeacdd58e, + 0xcfb11ead453994ba,0x67de18eda5814af2, + 0x81ceb32c4b43fcf4,0x80eacf948770ced7, + 0xa2425ff75e14fc31,0xa1258379a94d028d, + 0xcad2f7f5359a3b3e,0x96ee45813a04330, + 0xfd87b5f28300ca0d,0x8bca9d6e188853fc, + 0x9e74d1b791e07e48,0x775ea264cf55347e, + 0xc612062576589dda,0x95364afe032a81a0, + 0xf79687aed3eec551,0x3a83ddbd83f52210, + 0x9abe14cd44753b52,0xc4926a9672793580, + 0xc16d9a0095928a27,0x75b7053c0f178400, + 0xf1c90080baf72cb1,0x5324c68b12dd6800, + 0x971da05074da7bee,0xd3f6fc16ebca8000, + 0xbce5086492111aea,0x88f4bb1ca6bd0000, + 0xec1e4a7db69561a5,0x2b31e9e3d0700000, + 0x9392ee8e921d5d07,0x3aff322e62600000, + 0xb877aa3236a4b449,0x9befeb9fad487c3, + 0xe69594bec44de15b,0x4c2ebe687989a9b4, + 0x901d7cf73ab0acd9,0xf9d37014bf60a11, + 0xb424dc35095cd80f,0x538484c19ef38c95, + 0xe12e13424bb40e13,0x2865a5f206b06fba, + 0x8cbccc096f5088cb,0xf93f87b7442e45d4, + 0xafebff0bcb24aafe,0xf78f69a51539d749, + 0xdbe6fecebdedd5be,0xb573440e5a884d1c, + 0x89705f4136b4a597,0x31680a88f8953031, + 0xabcc77118461cefc,0xfdc20d2b36ba7c3e, + 0xd6bf94d5e57a42bc,0x3d32907604691b4d, + 0x8637bd05af6c69b5,0xa63f9a49c2c1b110, + 0xa7c5ac471b478423,0xfcf80dc33721d54, + 0xd1b71758e219652b,0xd3c36113404ea4a9, + 0x83126e978d4fdf3b,0x645a1cac083126ea, + 0xa3d70a3d70a3d70a,0x3d70a3d70a3d70a4, + 0xcccccccccccccccc,0xcccccccccccccccd, + 0x8000000000000000,0x0, + 0xa000000000000000,0x0, + 0xc800000000000000,0x0, + 0xfa00000000000000,0x0, + 0x9c40000000000000,0x0, + 0xc350000000000000,0x0, + 0xf424000000000000,0x0, + 0x9896800000000000,0x0, + 0xbebc200000000000,0x0, + 0xee6b280000000000,0x0, + 0x9502f90000000000,0x0, + 0xba43b74000000000,0x0, + 0xe8d4a51000000000,0x0, + 0x9184e72a00000000,0x0, + 0xb5e620f480000000,0x0, + 0xe35fa931a0000000,0x0, + 0x8e1bc9bf04000000,0x0, + 0xb1a2bc2ec5000000,0x0, + 0xde0b6b3a76400000,0x0, + 0x8ac7230489e80000,0x0, + 0xad78ebc5ac620000,0x0, + 0xd8d726b7177a8000,0x0, + 0x878678326eac9000,0x0, + 0xa968163f0a57b400,0x0, + 0xd3c21bcecceda100,0x0, + 0x84595161401484a0,0x0, + 0xa56fa5b99019a5c8,0x0, + 0xcecb8f27f4200f3a,0x0, + 0x813f3978f8940984,0x4000000000000000, + 0xa18f07d736b90be5,0x5000000000000000, + 0xc9f2c9cd04674ede,0xa400000000000000, + 0xfc6f7c4045812296,0x4d00000000000000, + 0x9dc5ada82b70b59d,0xf020000000000000, + 0xc5371912364ce305,0x6c28000000000000, + 0xf684df56c3e01bc6,0xc732000000000000, + 0x9a130b963a6c115c,0x3c7f400000000000, + 0xc097ce7bc90715b3,0x4b9f100000000000, + 0xf0bdc21abb48db20,0x1e86d40000000000, + 0x96769950b50d88f4,0x1314448000000000, + 0xbc143fa4e250eb31,0x17d955a000000000, + 0xeb194f8e1ae525fd,0x5dcfab0800000000, + 0x92efd1b8d0cf37be,0x5aa1cae500000000, + 0xb7abc627050305ad,0xf14a3d9e40000000, + 0xe596b7b0c643c719,0x6d9ccd05d0000000, + 0x8f7e32ce7bea5c6f,0xe4820023a2000000, + 0xb35dbf821ae4f38b,0xdda2802c8a800000, + 0xe0352f62a19e306e,0xd50b2037ad200000, + 0x8c213d9da502de45,0x4526f422cc340000, + 0xaf298d050e4395d6,0x9670b12b7f410000, + 0xdaf3f04651d47b4c,0x3c0cdd765f114000, + 0x88d8762bf324cd0f,0xa5880a69fb6ac800, + 0xab0e93b6efee0053,0x8eea0d047a457a00, + 0xd5d238a4abe98068,0x72a4904598d6d880, + 0x85a36366eb71f041,0x47a6da2b7f864750, + 0xa70c3c40a64e6c51,0x999090b65f67d924, + 0xd0cf4b50cfe20765,0xfff4b4e3f741cf6d, + 0x82818f1281ed449f,0xbff8f10e7a8921a4, + 0xa321f2d7226895c7,0xaff72d52192b6a0d, + 0xcbea6f8ceb02bb39,0x9bf4f8a69f764490, + 0xfee50b7025c36a08,0x2f236d04753d5b4, + 0x9f4f2726179a2245,0x1d762422c946590, + 0xc722f0ef9d80aad6,0x424d3ad2b7b97ef5, + 0xf8ebad2b84e0d58b,0xd2e0898765a7deb2, + 0x9b934c3b330c8577,0x63cc55f49f88eb2f, + 0xc2781f49ffcfa6d5,0x3cbf6b71c76b25fb, + 0xf316271c7fc3908a,0x8bef464e3945ef7a, + 0x97edd871cfda3a56,0x97758bf0e3cbb5ac, + 0xbde94e8e43d0c8ec,0x3d52eeed1cbea317, + 0xed63a231d4c4fb27,0x4ca7aaa863ee4bdd, + 0x945e455f24fb1cf8,0x8fe8caa93e74ef6a, + 0xb975d6b6ee39e436,0xb3e2fd538e122b44, + 0xe7d34c64a9c85d44,0x60dbbca87196b616, + 0x90e40fbeea1d3a4a,0xbc8955e946fe31cd, + 0xb51d13aea4a488dd,0x6babab6398bdbe41, + 0xe264589a4dcdab14,0xc696963c7eed2dd1, + 0x8d7eb76070a08aec,0xfc1e1de5cf543ca2, + 0xb0de65388cc8ada8,0x3b25a55f43294bcb, + 0xdd15fe86affad912,0x49ef0eb713f39ebe, + 0x8a2dbf142dfcc7ab,0x6e3569326c784337, + 0xacb92ed9397bf996,0x49c2c37f07965404, + 0xd7e77a8f87daf7fb,0xdc33745ec97be906, + 0x86f0ac99b4e8dafd,0x69a028bb3ded71a3, + 0xa8acd7c0222311bc,0xc40832ea0d68ce0c, + 0xd2d80db02aabd62b,0xf50a3fa490c30190, + 0x83c7088e1aab65db,0x792667c6da79e0fa, + 0xa4b8cab1a1563f52,0x577001b891185938, + 0xcde6fd5e09abcf26,0xed4c0226b55e6f86, + 0x80b05e5ac60b6178,0x544f8158315b05b4, + 0xa0dc75f1778e39d6,0x696361ae3db1c721, + 0xc913936dd571c84c,0x3bc3a19cd1e38e9, + 0xfb5878494ace3a5f,0x4ab48a04065c723, + 0x9d174b2dcec0e47b,0x62eb0d64283f9c76, + 0xc45d1df942711d9a,0x3ba5d0bd324f8394, + 0xf5746577930d6500,0xca8f44ec7ee36479, + 0x9968bf6abbe85f20,0x7e998b13cf4e1ecb, + 0xbfc2ef456ae276e8,0x9e3fedd8c321a67e, + 0xefb3ab16c59b14a2,0xc5cfe94ef3ea101e, + 0x95d04aee3b80ece5,0xbba1f1d158724a12, + 0xbb445da9ca61281f,0x2a8a6e45ae8edc97, + 0xea1575143cf97226,0xf52d09d71a3293bd, + 0x924d692ca61be758,0x593c2626705f9c56, + 0xb6e0c377cfa2e12e,0x6f8b2fb00c77836c, + 0xe498f455c38b997a,0xb6dfb9c0f956447, + 0x8edf98b59a373fec,0x4724bd4189bd5eac, + 0xb2977ee300c50fe7,0x58edec91ec2cb657, + 0xdf3d5e9bc0f653e1,0x2f2967b66737e3ed, + 0x8b865b215899f46c,0xbd79e0d20082ee74, + 0xae67f1e9aec07187,0xecd8590680a3aa11, + 0xda01ee641a708de9,0xe80e6f4820cc9495, + 0x884134fe908658b2,0x3109058d147fdcdd, + 0xaa51823e34a7eede,0xbd4b46f0599fd415, + 0xd4e5e2cdc1d1ea96,0x6c9e18ac7007c91a, + 0x850fadc09923329e,0x3e2cf6bc604ddb0, + 0xa6539930bf6bff45,0x84db8346b786151c, + 0xcfe87f7cef46ff16,0xe612641865679a63, + 0x81f14fae158c5f6e,0x4fcb7e8f3f60c07e, + 0xa26da3999aef7749,0xe3be5e330f38f09d, + 0xcb090c8001ab551c,0x5cadf5bfd3072cc5, + 0xfdcb4fa002162a63,0x73d9732fc7c8f7f6, + 0x9e9f11c4014dda7e,0x2867e7fddcdd9afa, + 0xc646d63501a1511d,0xb281e1fd541501b8, + 0xf7d88bc24209a565,0x1f225a7ca91a4226, + 0x9ae757596946075f,0x3375788de9b06958, + 0xc1a12d2fc3978937,0x52d6b1641c83ae, + 0xf209787bb47d6b84,0xc0678c5dbd23a49a, + 0x9745eb4d50ce6332,0xf840b7ba963646e0, + 0xbd176620a501fbff,0xb650e5a93bc3d898, + 0xec5d3fa8ce427aff,0xa3e51f138ab4cebe, + 0x93ba47c980e98cdf,0xc66f336c36b10137, + 0xb8a8d9bbe123f017,0xb80b0047445d4184, + 0xe6d3102ad96cec1d,0xa60dc059157491e5, + 0x9043ea1ac7e41392,0x87c89837ad68db2f, + 0xb454e4a179dd1877,0x29babe4598c311fb, + 0xe16a1dc9d8545e94,0xf4296dd6fef3d67a, + 0x8ce2529e2734bb1d,0x1899e4a65f58660c, + 0xb01ae745b101e9e4,0x5ec05dcff72e7f8f, + 0xdc21a1171d42645d,0x76707543f4fa1f73, + 0x899504ae72497eba,0x6a06494a791c53a8, + 0xabfa45da0edbde69,0x487db9d17636892, + 0xd6f8d7509292d603,0x45a9d2845d3c42b6, + 0x865b86925b9bc5c2,0xb8a2392ba45a9b2, + 0xa7f26836f282b732,0x8e6cac7768d7141e, + 0xd1ef0244af2364ff,0x3207d795430cd926, + 0x8335616aed761f1f,0x7f44e6bd49e807b8, + 0xa402b9c5a8d3a6e7,0x5f16206c9c6209a6, + 0xcd036837130890a1,0x36dba887c37a8c0f, + 0x802221226be55a64,0xc2494954da2c9789, + 0xa02aa96b06deb0fd,0xf2db9baa10b7bd6c, + 0xc83553c5c8965d3d,0x6f92829494e5acc7, + 0xfa42a8b73abbf48c,0xcb772339ba1f17f9, + 0x9c69a97284b578d7,0xff2a760414536efb, + 0xc38413cf25e2d70d,0xfef5138519684aba, + 0xf46518c2ef5b8cd1,0x7eb258665fc25d69, + 0x98bf2f79d5993802,0xef2f773ffbd97a61, + 0xbeeefb584aff8603,0xaafb550ffacfd8fa, + 0xeeaaba2e5dbf6784,0x95ba2a53f983cf38, + 0x952ab45cfa97a0b2,0xdd945a747bf26183, + 0xba756174393d88df,0x94f971119aeef9e4, + 0xe912b9d1478ceb17,0x7a37cd5601aab85d, + 0x91abb422ccb812ee,0xac62e055c10ab33a, + 0xb616a12b7fe617aa,0x577b986b314d6009, + 0xe39c49765fdf9d94,0xed5a7e85fda0b80b, + 0x8e41ade9fbebc27d,0x14588f13be847307, + 0xb1d219647ae6b31c,0x596eb2d8ae258fc8, + 0xde469fbd99a05fe3,0x6fca5f8ed9aef3bb, + 0x8aec23d680043bee,0x25de7bb9480d5854, + 0xada72ccc20054ae9,0xaf561aa79a10ae6a, + 0xd910f7ff28069da4,0x1b2ba1518094da04, + 0x87aa9aff79042286,0x90fb44d2f05d0842, + 0xa99541bf57452b28,0x353a1607ac744a53, + 0xd3fa922f2d1675f2,0x42889b8997915ce8, + 0x847c9b5d7c2e09b7,0x69956135febada11, + 0xa59bc234db398c25,0x43fab9837e699095, + 0xcf02b2c21207ef2e,0x94f967e45e03f4bb, + 0x8161afb94b44f57d,0x1d1be0eebac278f5, + 0xa1ba1ba79e1632dc,0x6462d92a69731732, + 0xca28a291859bbf93,0x7d7b8f7503cfdcfe, + 0xfcb2cb35e702af78,0x5cda735244c3d43e, + 0x9defbf01b061adab,0x3a0888136afa64a7, + 0xc56baec21c7a1916,0x88aaa1845b8fdd0, + 0xf6c69a72a3989f5b,0x8aad549e57273d45, + 0x9a3c2087a63f6399,0x36ac54e2f678864b, + 0xc0cb28a98fcf3c7f,0x84576a1bb416a7dd, + 0xf0fdf2d3f3c30b9f,0x656d44a2a11c51d5, + 0x969eb7c47859e743,0x9f644ae5a4b1b325, + 0xbc4665b596706114,0x873d5d9f0dde1fee, + 0xeb57ff22fc0c7959,0xa90cb506d155a7ea, + 0x9316ff75dd87cbd8,0x9a7f12442d588f2, + 0xb7dcbf5354e9bece,0xc11ed6d538aeb2f, + 0xe5d3ef282a242e81,0x8f1668c8a86da5fa, + 0x8fa475791a569d10,0xf96e017d694487bc, + 0xb38d92d760ec4455,0x37c981dcc395a9ac, + 0xe070f78d3927556a,0x85bbe253f47b1417, + 0x8c469ab843b89562,0x93956d7478ccec8e, + 0xaf58416654a6babb,0x387ac8d1970027b2, + 0xdb2e51bfe9d0696a,0x6997b05fcc0319e, + 0x88fcf317f22241e2,0x441fece3bdf81f03, + 0xab3c2fddeeaad25a,0xd527e81cad7626c3, + 0xd60b3bd56a5586f1,0x8a71e223d8d3b074, + 0x85c7056562757456,0xf6872d5667844e49, + 0xa738c6bebb12d16c,0xb428f8ac016561db, + 0xd106f86e69d785c7,0xe13336d701beba52, + 0x82a45b450226b39c,0xecc0024661173473, + 0xa34d721642b06084,0x27f002d7f95d0190, + 0xcc20ce9bd35c78a5,0x31ec038df7b441f4, + 0xff290242c83396ce,0x7e67047175a15271, + 0x9f79a169bd203e41,0xf0062c6e984d386, + 0xc75809c42c684dd1,0x52c07b78a3e60868, + 0xf92e0c3537826145,0xa7709a56ccdf8a82, + 0x9bbcc7a142b17ccb,0x88a66076400bb691, + 0xc2abf989935ddbfe,0x6acff893d00ea435, + 0xf356f7ebf83552fe,0x583f6b8c4124d43, + 0x98165af37b2153de,0xc3727a337a8b704a, + 0xbe1bf1b059e9a8d6,0x744f18c0592e4c5c, + 0xeda2ee1c7064130c,0x1162def06f79df73, + 0x9485d4d1c63e8be7,0x8addcb5645ac2ba8, + 0xb9a74a0637ce2ee1,0x6d953e2bd7173692, + 0xe8111c87c5c1ba99,0xc8fa8db6ccdd0437, + 0x910ab1d4db9914a0,0x1d9c9892400a22a2, + 0xb54d5e4a127f59c8,0x2503beb6d00cab4b, + 0xe2a0b5dc971f303a,0x2e44ae64840fd61d, + 0x8da471a9de737e24,0x5ceaecfed289e5d2, + 0xb10d8e1456105dad,0x7425a83e872c5f47, + 0xdd50f1996b947518,0xd12f124e28f77719, + 0x8a5296ffe33cc92f,0x82bd6b70d99aaa6f, + 0xace73cbfdc0bfb7b,0x636cc64d1001550b, + 0xd8210befd30efa5a,0x3c47f7e05401aa4e, + 0x8714a775e3e95c78,0x65acfaec34810a71, + 0xa8d9d1535ce3b396,0x7f1839a741a14d0d, + 0xd31045a8341ca07c,0x1ede48111209a050, + 0x83ea2b892091e44d,0x934aed0aab460432, + 0xa4e4b66b68b65d60,0xf81da84d5617853f, + 0xce1de40642e3f4b9,0x36251260ab9d668e, + 0x80d2ae83e9ce78f3,0xc1d72b7c6b426019, + 0xa1075a24e4421730,0xb24cf65b8612f81f, + 0xc94930ae1d529cfc,0xdee033f26797b627, + 0xfb9b7cd9a4a7443c,0x169840ef017da3b1, + 0x9d412e0806e88aa5,0x8e1f289560ee864e, + 0xc491798a08a2ad4e,0xf1a6f2bab92a27e2, + 0xf5b5d7ec8acb58a2,0xae10af696774b1db, + 0x9991a6f3d6bf1765,0xacca6da1e0a8ef29, + 0xbff610b0cc6edd3f,0x17fd090a58d32af3, + 0xeff394dcff8a948e,0xddfc4b4cef07f5b0, + 0x95f83d0a1fb69cd9,0x4abdaf101564f98e, + 0xbb764c4ca7a4440f,0x9d6d1ad41abe37f1, + 0xea53df5fd18d5513,0x84c86189216dc5ed, + 0x92746b9be2f8552c,0x32fd3cf5b4e49bb4, + 0xb7118682dbb66a77,0x3fbc8c33221dc2a1, + 0xe4d5e82392a40515,0xfabaf3feaa5334a, + 0x8f05b1163ba6832d,0x29cb4d87f2a7400e, + 0xb2c71d5bca9023f8,0x743e20e9ef511012, + 0xdf78e4b2bd342cf6,0x914da9246b255416, + 0x8bab8eefb6409c1a,0x1ad089b6c2f7548e, + 0xae9672aba3d0c320,0xa184ac2473b529b1, + 0xda3c0f568cc4f3e8,0xc9e5d72d90a2741e, + 0x8865899617fb1871,0x7e2fa67c7a658892, + 0xaa7eebfb9df9de8d,0xddbb901b98feeab7, + 0xd51ea6fa85785631,0x552a74227f3ea565, + 0x8533285c936b35de,0xd53a88958f87275f, + 0xa67ff273b8460356,0x8a892abaf368f137, + 0xd01fef10a657842c,0x2d2b7569b0432d85, + 0x8213f56a67f6b29b,0x9c3b29620e29fc73, + 0xa298f2c501f45f42,0x8349f3ba91b47b8f, + 0xcb3f2f7642717713,0x241c70a936219a73, + 0xfe0efb53d30dd4d7,0xed238cd383aa0110, + 0x9ec95d1463e8a506,0xf4363804324a40aa, + 0xc67bb4597ce2ce48,0xb143c6053edcd0d5, + 0xf81aa16fdc1b81da,0xdd94b7868e94050a, + 0x9b10a4e5e9913128,0xca7cf2b4191c8326, + 0xc1d4ce1f63f57d72,0xfd1c2f611f63a3f0, + 0xf24a01a73cf2dccf,0xbc633b39673c8cec, + 0x976e41088617ca01,0xd5be0503e085d813, + 0xbd49d14aa79dbc82,0x4b2d8644d8a74e18, + 0xec9c459d51852ba2,0xddf8e7d60ed1219e, + 0x93e1ab8252f33b45,0xcabb90e5c942b503, + 0xb8da1662e7b00a17,0x3d6a751f3b936243, + 0xe7109bfba19c0c9d,0xcc512670a783ad4, + 0x906a617d450187e2,0x27fb2b80668b24c5, + 0xb484f9dc9641e9da,0xb1f9f660802dedf6, + 0xe1a63853bbd26451,0x5e7873f8a0396973, + 0x8d07e33455637eb2,0xdb0b487b6423e1e8, + 0xb049dc016abc5e5f,0x91ce1a9a3d2cda62, + 0xdc5c5301c56b75f7,0x7641a140cc7810fb, + 0x89b9b3e11b6329ba,0xa9e904c87fcb0a9d, + 0xac2820d9623bf429,0x546345fa9fbdcd44, + 0xd732290fbacaf133,0xa97c177947ad4095, + 0x867f59a9d4bed6c0,0x49ed8eabcccc485d, + 0xa81f301449ee8c70,0x5c68f256bfff5a74, + 0xd226fc195c6a2f8c,0x73832eec6fff3111, + 0x83585d8fd9c25db7,0xc831fd53c5ff7eab, + 0xa42e74f3d032f525,0xba3e7ca8b77f5e55, + 0xcd3a1230c43fb26f,0x28ce1bd2e55f35eb, + 0x80444b5e7aa7cf85,0x7980d163cf5b81b3, + 0xa0555e361951c366,0xd7e105bcc332621f, + 0xc86ab5c39fa63440,0x8dd9472bf3fefaa7, + 0xfa856334878fc150,0xb14f98f6f0feb951, + 0x9c935e00d4b9d8d2,0x6ed1bf9a569f33d3, + 0xc3b8358109e84f07,0xa862f80ec4700c8, + 0xf4a642e14c6262c8,0xcd27bb612758c0fa, + 0x98e7e9cccfbd7dbd,0x8038d51cb897789c, + 0xbf21e44003acdd2c,0xe0470a63e6bd56c3, + 0xeeea5d5004981478,0x1858ccfce06cac74, + 0x95527a5202df0ccb,0xf37801e0c43ebc8, + 0xbaa718e68396cffd,0xd30560258f54e6ba, + 0xe950df20247c83fd,0x47c6b82ef32a2069, + 0x91d28b7416cdd27e,0x4cdc331d57fa5441, + 0xb6472e511c81471d,0xe0133fe4adf8e952, + 0xe3d8f9e563a198e5,0x58180fddd97723a6, + 0x8e679c2f5e44ff8f,0x570f09eaa7ea7648,}; + +#endif // SIMDJSON_SRC_NUMBERPARSING_TABLES_CPP +/* end file internal/numberparsing_tables.cpp */ +/* including internal/simdprune_tables.cpp: #include */ +/* begin file internal/simdprune_tables.cpp */ +#ifndef SIMDJSON_SRC_SIMDPRUNE_TABLES_CPP +#define SIMDJSON_SRC_SIMDPRUNE_TABLES_CPP + +/* including simdjson/implementation_detection.h: #include */ +/* begin file simdjson/implementation_detection.h */ +#ifndef SIMDJSON_IMPLEMENTATION_DETECTION_H +#define SIMDJSON_IMPLEMENTATION_DETECTION_H + +/* skipped duplicate #include "simdjson/base.h" */ + +// 0 is reserved, because undefined SIMDJSON_IMPLEMENTATION equals 0 in preprocessor macros. +#define SIMDJSON_IMPLEMENTATION_ID_arm64 1 +#define SIMDJSON_IMPLEMENTATION_ID_fallback 2 +#define SIMDJSON_IMPLEMENTATION_ID_haswell 3 +#define SIMDJSON_IMPLEMENTATION_ID_icelake 4 +#define SIMDJSON_IMPLEMENTATION_ID_ppc64 5 +#define SIMDJSON_IMPLEMENTATION_ID_westmere 6 + +#define SIMDJSON_IMPLEMENTATION_ID_FOR(IMPL) SIMDJSON_CAT(SIMDJSON_IMPLEMENTATION_ID_, IMPL) +#define SIMDJSON_IMPLEMENTATION_ID SIMDJSON_IMPLEMENTATION_ID_FOR(SIMDJSON_IMPLEMENTATION) + +#define SIMDJSON_IMPLEMENTATION_IS(IMPL) SIMDJSON_IMPLEMENTATION_ID == SIMDJSON_IMPLEMENTATION_ID_FOR(IMPL) + +// +// First, figure out which implementations can be run. Doing it here makes it so we don't have to worry about the order +// in which we include them. +// + +#ifndef SIMDJSON_IMPLEMENTATION_ARM64 +#define SIMDJSON_IMPLEMENTATION_ARM64 (SIMDJSON_IS_ARM64) +#endif +#define SIMDJSON_CAN_ALWAYS_RUN_ARM64 SIMDJSON_IMPLEMENTATION_ARM64 && SIMDJSON_IS_ARM64 + +// Default Icelake to on if this is x86-64. Even if we're not compiled for it, it could be selected +// at runtime. +#ifndef SIMDJSON_IMPLEMENTATION_ICELAKE +#define SIMDJSON_IMPLEMENTATION_ICELAKE ((SIMDJSON_IS_X86_64) && (SIMDJSON_AVX512_ALLOWED) && (SIMDJSON_COMPILER_SUPPORTS_VBMI2)) +#endif + +#ifdef _MSC_VER +// To see why (__BMI__) && (__PCLMUL__) && (__LZCNT__) are not part of this next line, see +// https://github.com/simdjson/simdjson/issues/1247 +#define SIMDJSON_CAN_ALWAYS_RUN_ICELAKE ((SIMDJSON_IMPLEMENTATION_ICELAKE) && (__AVX2__) && (__AVX512F__) && (__AVX512DQ__) && (__AVX512CD__) && (__AVX512BW__) && (__AVX512VL__) && (__AVX512VBMI2__)) +#else +#define SIMDJSON_CAN_ALWAYS_RUN_ICELAKE ((SIMDJSON_IMPLEMENTATION_ICELAKE) && (__AVX2__) && (__BMI__) && (__PCLMUL__) && (__LZCNT__) && (__AVX512F__) && (__AVX512DQ__) && (__AVX512CD__) && (__AVX512BW__) && (__AVX512VL__) && (__AVX512VBMI2__)) +#endif + +// Default Haswell to on if this is x86-64. Even if we're not compiled for it, it could be selected +// at runtime. +#ifndef SIMDJSON_IMPLEMENTATION_HASWELL +#if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +// if icelake is always available, never enable haswell. +#define SIMDJSON_IMPLEMENTATION_HASWELL 0 +#else +#define SIMDJSON_IMPLEMENTATION_HASWELL SIMDJSON_IS_X86_64 +#endif +#endif +#ifdef _MSC_VER +// To see why (__BMI__) && (__PCLMUL__) && (__LZCNT__) are not part of this next line, see +// https://github.com/simdjson/simdjson/issues/1247 +#define SIMDJSON_CAN_ALWAYS_RUN_HASWELL ((SIMDJSON_IMPLEMENTATION_HASWELL) && (SIMDJSON_IS_X86_64) && (__AVX2__)) +#else +#define SIMDJSON_CAN_ALWAYS_RUN_HASWELL ((SIMDJSON_IMPLEMENTATION_HASWELL) && (SIMDJSON_IS_X86_64) && (__AVX2__) && (__BMI__) && (__PCLMUL__) && (__LZCNT__)) +#endif + +// Default Westmere to on if this is x86-64. +#ifndef SIMDJSON_IMPLEMENTATION_WESTMERE +#if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE || SIMDJSON_CAN_ALWAYS_RUN_HASWELL +// if icelake or haswell are always available, never enable westmere. +#define SIMDJSON_IMPLEMENTATION_WESTMERE 0 +#else +#define SIMDJSON_IMPLEMENTATION_WESTMERE SIMDJSON_IS_X86_64 +#endif +#endif +#define SIMDJSON_CAN_ALWAYS_RUN_WESTMERE (SIMDJSON_IMPLEMENTATION_WESTMERE && SIMDJSON_IS_X86_64 && __SSE4_2__ && __PCLMUL__) + +#ifndef SIMDJSON_IMPLEMENTATION_PPC64 +#define SIMDJSON_IMPLEMENTATION_PPC64 (SIMDJSON_IS_PPC64 && SIMDJSON_IS_PPC64_VMX) +#endif +#define SIMDJSON_CAN_ALWAYS_RUN_PPC64 SIMDJSON_IMPLEMENTATION_PPC64 && SIMDJSON_IS_PPC64 && SIMDJSON_IS_PPC64_VMX + +// Default Fallback to on unless a builtin implementation has already been selected. +#ifndef SIMDJSON_IMPLEMENTATION_FALLBACK +#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 +// if anything at all except fallback can always run, then disable fallback. +#define SIMDJSON_IMPLEMENTATION_FALLBACK 0 +#else +#define SIMDJSON_IMPLEMENTATION_FALLBACK 1 +#endif +#endif +#define SIMDJSON_CAN_ALWAYS_RUN_FALLBACK SIMDJSON_IMPLEMENTATION_FALLBACK + +// Determine the best builtin implementation +#ifndef SIMDJSON_BUILTIN_IMPLEMENTATION + +#if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +#define SIMDJSON_BUILTIN_IMPLEMENTATION icelake +#elif SIMDJSON_CAN_ALWAYS_RUN_HASWELL +#define SIMDJSON_BUILTIN_IMPLEMENTATION haswell +#elif SIMDJSON_CAN_ALWAYS_RUN_WESTMERE +#define SIMDJSON_BUILTIN_IMPLEMENTATION westmere +#elif SIMDJSON_CAN_ALWAYS_RUN_ARM64 +#define SIMDJSON_BUILTIN_IMPLEMENTATION arm64 +#elif SIMDJSON_CAN_ALWAYS_RUN_PPC64 +#define SIMDJSON_BUILTIN_IMPLEMENTATION ppc64 +#elif SIMDJSON_CAN_ALWAYS_RUN_FALLBACK +#define SIMDJSON_BUILTIN_IMPLEMENTATION fallback +#else +#error "All possible implementations (including fallback) have been disabled! simdjson will not run." +#endif + +#endif // SIMDJSON_BUILTIN_IMPLEMENTATION + +#define SIMDJSON_BUILTIN_IMPLEMENTATION_ID SIMDJSON_IMPLEMENTATION_ID_FOR(SIMDJSON_BUILTIN_IMPLEMENTATION) +#define SIMDJSON_BUILTIN_IMPLEMENTATION_IS(IMPL) SIMDJSON_BUILTIN_IMPLEMENTATION_ID == SIMDJSON_IMPLEMENTATION_ID_FOR(IMPL) + +#endif // SIMDJSON_IMPLEMENTATION_DETECTION_H +/* end file simdjson/implementation_detection.h */ + +#if SIMDJSON_IMPLEMENTATION_ARM64 || SIMDJSON_IMPLEMENTATION_ICELAKE || SIMDJSON_IMPLEMENTATION_HASWELL || SIMDJSON_IMPLEMENTATION_WESTMERE || SIMDJSON_IMPLEMENTATION_PPC64 + +#include + +namespace simdjson { // table modified and copied from +namespace internal { // http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetTable +SIMDJSON_DLLIMPORTEXPORT const unsigned char BitsSetTable256mul2[256] = { + 0, 2, 2, 4, 2, 4, 4, 6, 2, 4, 4, 6, 4, 6, 6, 8, 2, 4, 4, + 6, 4, 6, 6, 8, 4, 6, 6, 8, 6, 8, 8, 10, 2, 4, 4, 6, 4, 6, + 6, 8, 4, 6, 6, 8, 6, 8, 8, 10, 4, 6, 6, 8, 6, 8, 8, 10, 6, + 8, 8, 10, 8, 10, 10, 12, 2, 4, 4, 6, 4, 6, 6, 8, 4, 6, 6, 8, + 6, 8, 8, 10, 4, 6, 6, 8, 6, 8, 8, 10, 6, 8, 8, 10, 8, 10, 10, + 12, 4, 6, 6, 8, 6, 8, 8, 10, 6, 8, 8, 10, 8, 10, 10, 12, 6, 8, + 8, 10, 8, 10, 10, 12, 8, 10, 10, 12, 10, 12, 12, 14, 2, 4, 4, 6, 4, + 6, 6, 8, 4, 6, 6, 8, 6, 8, 8, 10, 4, 6, 6, 8, 6, 8, 8, 10, + 6, 8, 8, 10, 8, 10, 10, 12, 4, 6, 6, 8, 6, 8, 8, 10, 6, 8, 8, + 10, 8, 10, 10, 12, 6, 8, 8, 10, 8, 10, 10, 12, 8, 10, 10, 12, 10, 12, + 12, 14, 4, 6, 6, 8, 6, 8, 8, 10, 6, 8, 8, 10, 8, 10, 10, 12, 6, + 8, 8, 10, 8, 10, 10, 12, 8, 10, 10, 12, 10, 12, 12, 14, 6, 8, 8, 10, + 8, 10, 10, 12, 8, 10, 10, 12, 10, 12, 12, 14, 8, 10, 10, 12, 10, 12, 12, + 14, 10, 12, 12, 14, 12, 14, 14, 16}; + +SIMDJSON_DLLIMPORTEXPORT const uint8_t pshufb_combine_table[272] = { + 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, + 0x0c, 0x0d, 0x0e, 0x0f, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0xff, 0x00, 0x01, 0x02, 0x03, + 0x04, 0x05, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0xff, 0xff, + 0x00, 0x01, 0x02, 0x03, 0x04, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, + 0x0f, 0xff, 0xff, 0xff, 0x00, 0x01, 0x02, 0x03, 0x08, 0x09, 0x0a, 0x0b, + 0x0c, 0x0d, 0x0e, 0x0f, 0xff, 0xff, 0xff, 0xff, 0x00, 0x01, 0x02, 0x08, + 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, + 0x00, 0x01, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, 0xff, 0xff, + 0xff, 0xff, 0xff, 0xff, 0x00, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, + 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x08, 0x09, 0x0a, 0x0b, + 0x0c, 0x0d, 0x0e, 0x0f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, +}; + +// 256 * 8 bytes = 2kB, easily fits in cache. +SIMDJSON_DLLIMPORTEXPORT const uint64_t thintable_epi8[256] = { + 0x0706050403020100, 0x0007060504030201, 0x0007060504030200, + 0x0000070605040302, 0x0007060504030100, 0x0000070605040301, + 0x0000070605040300, 0x0000000706050403, 0x0007060504020100, + 0x0000070605040201, 0x0000070605040200, 0x0000000706050402, + 0x0000070605040100, 0x0000000706050401, 0x0000000706050400, + 0x0000000007060504, 0x0007060503020100, 0x0000070605030201, + 0x0000070605030200, 0x0000000706050302, 0x0000070605030100, + 0x0000000706050301, 0x0000000706050300, 0x0000000007060503, + 0x0000070605020100, 0x0000000706050201, 0x0000000706050200, + 0x0000000007060502, 0x0000000706050100, 0x0000000007060501, + 0x0000000007060500, 0x0000000000070605, 0x0007060403020100, + 0x0000070604030201, 0x0000070604030200, 0x0000000706040302, + 0x0000070604030100, 0x0000000706040301, 0x0000000706040300, + 0x0000000007060403, 0x0000070604020100, 0x0000000706040201, + 0x0000000706040200, 0x0000000007060402, 0x0000000706040100, + 0x0000000007060401, 0x0000000007060400, 0x0000000000070604, + 0x0000070603020100, 0x0000000706030201, 0x0000000706030200, + 0x0000000007060302, 0x0000000706030100, 0x0000000007060301, + 0x0000000007060300, 0x0000000000070603, 0x0000000706020100, + 0x0000000007060201, 0x0000000007060200, 0x0000000000070602, + 0x0000000007060100, 0x0000000000070601, 0x0000000000070600, + 0x0000000000000706, 0x0007050403020100, 0x0000070504030201, + 0x0000070504030200, 0x0000000705040302, 0x0000070504030100, + 0x0000000705040301, 0x0000000705040300, 0x0000000007050403, + 0x0000070504020100, 0x0000000705040201, 0x0000000705040200, + 0x0000000007050402, 0x0000000705040100, 0x0000000007050401, + 0x0000000007050400, 0x0000000000070504, 0x0000070503020100, + 0x0000000705030201, 0x0000000705030200, 0x0000000007050302, + 0x0000000705030100, 0x0000000007050301, 0x0000000007050300, + 0x0000000000070503, 0x0000000705020100, 0x0000000007050201, + 0x0000000007050200, 0x0000000000070502, 0x0000000007050100, + 0x0000000000070501, 0x0000000000070500, 0x0000000000000705, + 0x0000070403020100, 0x0000000704030201, 0x0000000704030200, + 0x0000000007040302, 0x0000000704030100, 0x0000000007040301, + 0x0000000007040300, 0x0000000000070403, 0x0000000704020100, + 0x0000000007040201, 0x0000000007040200, 0x0000000000070402, + 0x0000000007040100, 0x0000000000070401, 0x0000000000070400, + 0x0000000000000704, 0x0000000703020100, 0x0000000007030201, + 0x0000000007030200, 0x0000000000070302, 0x0000000007030100, + 0x0000000000070301, 0x0000000000070300, 0x0000000000000703, + 0x0000000007020100, 0x0000000000070201, 0x0000000000070200, + 0x0000000000000702, 0x0000000000070100, 0x0000000000000701, + 0x0000000000000700, 0x0000000000000007, 0x0006050403020100, + 0x0000060504030201, 0x0000060504030200, 0x0000000605040302, + 0x0000060504030100, 0x0000000605040301, 0x0000000605040300, + 0x0000000006050403, 0x0000060504020100, 0x0000000605040201, + 0x0000000605040200, 0x0000000006050402, 0x0000000605040100, + 0x0000000006050401, 0x0000000006050400, 0x0000000000060504, + 0x0000060503020100, 0x0000000605030201, 0x0000000605030200, + 0x0000000006050302, 0x0000000605030100, 0x0000000006050301, + 0x0000000006050300, 0x0000000000060503, 0x0000000605020100, + 0x0000000006050201, 0x0000000006050200, 0x0000000000060502, + 0x0000000006050100, 0x0000000000060501, 0x0000000000060500, + 0x0000000000000605, 0x0000060403020100, 0x0000000604030201, + 0x0000000604030200, 0x0000000006040302, 0x0000000604030100, + 0x0000000006040301, 0x0000000006040300, 0x0000000000060403, + 0x0000000604020100, 0x0000000006040201, 0x0000000006040200, + 0x0000000000060402, 0x0000000006040100, 0x0000000000060401, + 0x0000000000060400, 0x0000000000000604, 0x0000000603020100, + 0x0000000006030201, 0x0000000006030200, 0x0000000000060302, + 0x0000000006030100, 0x0000000000060301, 0x0000000000060300, + 0x0000000000000603, 0x0000000006020100, 0x0000000000060201, + 0x0000000000060200, 0x0000000000000602, 0x0000000000060100, + 0x0000000000000601, 0x0000000000000600, 0x0000000000000006, + 0x0000050403020100, 0x0000000504030201, 0x0000000504030200, + 0x0000000005040302, 0x0000000504030100, 0x0000000005040301, + 0x0000000005040300, 0x0000000000050403, 0x0000000504020100, + 0x0000000005040201, 0x0000000005040200, 0x0000000000050402, + 0x0000000005040100, 0x0000000000050401, 0x0000000000050400, + 0x0000000000000504, 0x0000000503020100, 0x0000000005030201, + 0x0000000005030200, 0x0000000000050302, 0x0000000005030100, + 0x0000000000050301, 0x0000000000050300, 0x0000000000000503, + 0x0000000005020100, 0x0000000000050201, 0x0000000000050200, + 0x0000000000000502, 0x0000000000050100, 0x0000000000000501, + 0x0000000000000500, 0x0000000000000005, 0x0000000403020100, + 0x0000000004030201, 0x0000000004030200, 0x0000000000040302, + 0x0000000004030100, 0x0000000000040301, 0x0000000000040300, + 0x0000000000000403, 0x0000000004020100, 0x0000000000040201, + 0x0000000000040200, 0x0000000000000402, 0x0000000000040100, + 0x0000000000000401, 0x0000000000000400, 0x0000000000000004, + 0x0000000003020100, 0x0000000000030201, 0x0000000000030200, + 0x0000000000000302, 0x0000000000030100, 0x0000000000000301, + 0x0000000000000300, 0x0000000000000003, 0x0000000000020100, + 0x0000000000000201, 0x0000000000000200, 0x0000000000000002, + 0x0000000000000100, 0x0000000000000001, 0x0000000000000000, + 0x0000000000000000, +}; //static uint64_t thintable_epi8[256] + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_IMPLEMENTATION_ARM64 || SIMDJSON_IMPLEMENTATION_ICELAKE || SIMDJSON_IMPLEMENTATION_HASWELL || SIMDJSON_IMPLEMENTATION_WESTMERE || SIMDJSON_IMPLEMENTATION_PPC64 + +#endif // SIMDJSON_SRC_SIMDPRUNE_TABLES_CPP +/* end file internal/simdprune_tables.cpp */ + +/* including simdjson/generic/dependencies.h: #include */ +/* begin file simdjson/generic/dependencies.h */ +#ifdef SIMDJSON_CONDITIONAL_INCLUDE +#error simdjson/generic/dependencies.h must be included before defining SIMDJSON_CONDITIONAL_INCLUDE! +#endif + +#ifndef SIMDJSON_GENERIC_DEPENDENCIES_H +#define SIMDJSON_GENERIC_DEPENDENCIES_H + +// Internal headers needed for generics. +// All includes referencing simdjson headers *not* under simdjson/generic must be here! +// Otherwise, amalgamation will fail. +/* skipped duplicate #include "simdjson/base.h" */ +/* including simdjson/implementation.h: #include "simdjson/implementation.h" */ +/* begin file simdjson/implementation.h */ +#ifndef SIMDJSON_IMPLEMENTATION_H +#define SIMDJSON_IMPLEMENTATION_H + +/* including simdjson/internal/atomic_ptr.h: #include "simdjson/internal/atomic_ptr.h" */ +/* begin file simdjson/internal/atomic_ptr.h */ +#ifndef SIMDJSON_INTERNAL_ATOMIC_PTR_H +#define SIMDJSON_INTERNAL_ATOMIC_PTR_H + +/* skipped duplicate #include "simdjson/base.h" */ +#include + +namespace simdjson { +namespace internal { + +template +class atomic_ptr { +public: + atomic_ptr(T *_ptr) : ptr{_ptr} {} + + operator const T*() const { return ptr.load(); } + const T& operator*() const { return *ptr; } + const T* operator->() const { return ptr.load(); } + + operator T*() { return ptr.load(); } + T& operator*() { return *ptr; } + T* operator->() { return ptr.load(); } + atomic_ptr& operator=(T *_ptr) { ptr = _ptr; return *this; } + +private: + std::atomic ptr; +}; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_ATOMIC_PTR_H +/* end file simdjson/internal/atomic_ptr.h */ +/* including simdjson/internal/dom_parser_implementation.h: #include "simdjson/internal/dom_parser_implementation.h" */ +/* begin file simdjson/internal/dom_parser_implementation.h */ +#ifndef SIMDJSON_INTERNAL_DOM_PARSER_IMPLEMENTATION_H +#define SIMDJSON_INTERNAL_DOM_PARSER_IMPLEMENTATION_H + +/* skipped duplicate #include "simdjson/base.h" */ +/* skipped duplicate #include "simdjson/error.h" */ +#include + +namespace simdjson { + +namespace dom { +class document; +} // namespace dom + +/** +* This enum is used with the dom_parser_implementation::stage1 function. +* 1) The regular mode expects a fully formed JSON document. +* 2) The streaming_partial mode expects a possibly truncated +* input within a stream on JSON documents. +* 3) The stream_final mode allows us to truncate final +* unterminated strings. It is useful in conjunction with streaming_partial. +*/ +enum class stage1_mode { regular, streaming_partial, streaming_final}; + +/** + * Returns true if mode == streaming_partial or mode == streaming_final + */ +inline bool is_streaming(stage1_mode mode) { + // performance note: it is probably faster to check that mode is different + // from regular than checking that it is either streaming_partial or streaming_final. + return (mode != stage1_mode::regular); + // return (mode == stage1_mode::streaming_partial || mode == stage1_mode::streaming_final); +} + + +namespace internal { + + +/** + * An implementation of simdjson's DOM parser for a particular CPU architecture. + * + * This class is expected to be accessed only by pointer, and never move in memory (though the + * pointer can move). + */ +class dom_parser_implementation { +public: + + /** + * @private For internal implementation use + * + * Run a full JSON parse on a single document (stage1 + stage2). + * + * Guaranteed only to be called when capacity > document length. + * + * Overridden by each implementation. + * + * @param buf The json document to parse. *MUST* be allocated up to len + SIMDJSON_PADDING bytes. + * @param len The length of the json document. + * @return The error code, or SUCCESS if there was no error. + */ + simdjson_warn_unused virtual error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept = 0; + + /** + * @private For internal implementation use + * + * Stage 1 of the document parser. + * + * Guaranteed only to be called when capacity > document length. + * + * Overridden by each implementation. + * + * @param buf The json document to parse. + * @param len The length of the json document. + * @param streaming Whether this is being called by parser::parse_many. + * @return The error code, or SUCCESS if there was no error. + */ + simdjson_warn_unused virtual error_code stage1(const uint8_t *buf, size_t len, stage1_mode streaming) noexcept = 0; + + /** + * @private For internal implementation use + * + * Stage 2 of the document parser. + * + * Called after stage1(). + * + * Overridden by each implementation. + * + * @param doc The document to output to. + * @return The error code, or SUCCESS if there was no error. + */ + simdjson_warn_unused virtual error_code stage2(dom::document &doc) noexcept = 0; + + /** + * @private For internal implementation use + * + * Stage 2 of the document parser for parser::parse_many. + * + * Guaranteed only to be called after stage1(). + * Overridden by each implementation. + * + * @param doc The document to output to. + * @return The error code, SUCCESS if there was no error, or EMPTY if all documents have been parsed. + */ + simdjson_warn_unused virtual error_code stage2_next(dom::document &doc) noexcept = 0; + + /** + * Unescape a valid UTF-8 string from src to dst, stopping at a final unescaped quote. There + * must be an unescaped quote terminating the string. It returns the final output + * position as pointer. In case of error (e.g., the string has bad escaped codes), + * then null_nullptrptr is returned. It is assumed that the output buffer is large + * enough. E.g., if src points at 'joe"', then dst needs to have four free bytes + + * SIMDJSON_PADDING bytes. + * + * Overridden by each implementation. + * + * @param str pointer to the beginning of a valid UTF-8 JSON string, must end with an unescaped quote. + * @param dst pointer to a destination buffer, it must point a region in memory of sufficient size. + * @param allow_replacement whether we allow a replacement character when the UTF-8 contains unmatched surrogate pairs. + * @return end of the of the written region (exclusive) or nullptr in case of error. + */ + simdjson_warn_unused virtual uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept = 0; + + /** + * Unescape a NON-valid UTF-8 string from src to dst, stopping at a final unescaped quote. There + * must be an unescaped quote terminating the string. It returns the final output + * position as pointer. In case of error (e.g., the string has bad escaped codes), + * then null_nullptrptr is returned. It is assumed that the output buffer is large + * enough. E.g., if src points at 'joe"', then dst needs to have four free bytes + + * SIMDJSON_PADDING bytes. + * + * Overridden by each implementation. + * + * @param str pointer to the beginning of a possibly invalid UTF-8 JSON string, must end with an unescaped quote. + * @param dst pointer to a destination buffer, it must point a region in memory of sufficient size. + * @return end of the of the written region (exclusive) or nullptr in case of error. + */ + simdjson_warn_unused virtual uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept = 0; + + /** + * Change the capacity of this parser. + * + * The capacity can never exceed SIMDJSON_MAXSIZE_BYTES (e.g., 4 GB) + * and an CAPACITY error is returned if it is attempted. + * + * Generally used for reallocation. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. + * @return The error code, or SUCCESS if there was no error. + */ + virtual error_code set_capacity(size_t capacity) noexcept = 0; + + /** + * Change the max depth of this parser. + * + * Generally used for reallocation. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. + * @return The error code, or SUCCESS if there was no error. + */ + virtual error_code set_max_depth(size_t max_depth) noexcept = 0; + + /** + * Deallocate this parser. + */ + virtual ~dom_parser_implementation() = default; + + /** Number of structural indices passed from stage 1 to stage 2 */ + uint32_t n_structural_indexes{0}; + /** Structural indices passed from stage 1 to stage 2 */ + std::unique_ptr structural_indexes{}; + /** Next structural index to parse */ + uint32_t next_structural_index{0}; + + /** + * The largest document this parser can support without reallocating. + * + * @return Current capacity, in bytes. + */ + simdjson_inline size_t capacity() const noexcept; + + /** + * The maximum level of nested object and arrays supported by this parser. + * + * @return Maximum depth, in bytes. + */ + simdjson_inline size_t max_depth() const noexcept; + + /** + * Ensure this parser has enough memory to process JSON documents up to `capacity` bytes in length + * and `max_depth` depth. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. Defaults to DEFAULT_MAX_DEPTH. + * @return The error, if there is one. + */ + simdjson_warn_unused inline error_code allocate(size_t capacity, size_t max_depth) noexcept; + + +protected: + /** + * The maximum document length this parser supports. + * + * Buffers are large enough to handle any document up to this length. + */ + size_t _capacity{0}; + + /** + * The maximum depth (number of nested objects and arrays) supported by this parser. + * + * Defaults to DEFAULT_MAX_DEPTH. + */ + size_t _max_depth{0}; + + // Declaring these so that subclasses can use them to implement their constructors. + simdjson_inline dom_parser_implementation() noexcept; + simdjson_inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + simdjson_inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + + simdjson_inline dom_parser_implementation(const dom_parser_implementation &) noexcept = delete; + simdjson_inline dom_parser_implementation &operator=(const dom_parser_implementation &other) noexcept = delete; +}; // class dom_parser_implementation + +simdjson_inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +simdjson_inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +simdjson_inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +simdjson_inline size_t dom_parser_implementation::capacity() const noexcept { + return _capacity; +} + +simdjson_inline size_t dom_parser_implementation::max_depth() const noexcept { + return _max_depth; +} + +simdjson_warn_unused +inline error_code dom_parser_implementation::allocate(size_t capacity, size_t max_depth) noexcept { + if (this->max_depth() != max_depth) { + error_code err = set_max_depth(max_depth); + if (err) { return err; } + } + if (_capacity != capacity) { + error_code err = set_capacity(capacity); + if (err) { return err; } + } + return SUCCESS; +} + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/internal/dom_parser_implementation.h */ + +#include + +namespace simdjson { + +/** + * Validate the UTF-8 string. + * + * @param buf the string to validate. + * @param len the length of the string in bytes. + * @return true if the string is valid UTF-8. + */ +simdjson_warn_unused bool validate_utf8(const char * buf, size_t len) noexcept; +/** + * Validate the UTF-8 string. + * + * @param sv the string_view to validate. + * @return true if the string is valid UTF-8. + */ +simdjson_inline simdjson_warn_unused bool validate_utf8(const std::string_view sv) noexcept { + return validate_utf8(sv.data(), sv.size()); +} + +/** + * Validate the UTF-8 string. + * + * @param p the string to validate. + * @return true if the string is valid UTF-8. + */ +simdjson_inline simdjson_warn_unused bool validate_utf8(const std::string& s) noexcept { + return validate_utf8(s.data(), s.size()); +} + +/** + * 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. + */ +class implementation { +public: + + /** + * The name of this implementation. + * + * const implementation *impl = simdjson::get_active_implementation(); + * cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl; + * + * @return the name of the implementation, e.g. "haswell", "westmere", "arm64". + */ + virtual const std::string &name() const { return _name; } + + /** + * The description of this implementation. + * + * const implementation *impl = simdjson::get_active_implementation(); + * cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl; + * + * @return the description of the implementation, e.g. "Intel/AMD AVX2", "Intel/AMD SSE4.2", "ARM NEON". + */ + virtual const std::string &description() const { return _description; } + + /** + * The instruction sets this implementation is compiled against + * and the current CPU match. This function may poll the current CPU/system + * and should therefore not be called too often if performance is a concern. + * + * @return true if the implementation can be safely used on the current system (determined at runtime). + */ + bool supported_by_runtime_system() const; + + /** + * @private For internal implementation use + * + * The instruction sets this implementation is compiled against. + * + * @return a mask of all required `internal::instruction_set::` values. + */ + virtual uint32_t required_instruction_sets() const { return _required_instruction_sets; } + + /** + * @private For internal implementation use + * + * const implementation *impl = simdjson::get_active_implementation(); + * cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl; + * + * @param capacity The largest document that will be passed to the parser. + * @param max_depth The maximum JSON object/array nesting this parser is expected to handle. + * @param dst The place to put the resulting parser implementation. + * @return the error code, or SUCCESS if there was no error. + */ + virtual error_code create_dom_parser_implementation( + size_t capacity, + size_t max_depth, + std::unique_ptr &dst + ) const noexcept = 0; + + /** + * @private For internal implementation use + * + * Minify the input string assuming that it represents a JSON string, does not parse or validate. + * + * Overridden by each implementation. + * + * @param buf the json document to minify. + * @param len the length of the json document. + * @param dst the buffer to write the minified document to. *MUST* be allocated up to len + SIMDJSON_PADDING bytes. + * @param dst_len the number of bytes written. Output only. + * @return the error code, or SUCCESS if there was no error. + */ + simdjson_warn_unused virtual error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept = 0; + + + /** + * Validate the UTF-8 string. + * + * Overridden by each implementation. + * + * @param buf the string to validate. + * @param len the length of the string in bytes. + * @return true if and only if the string is valid UTF-8. + */ + simdjson_warn_unused virtual bool validate_utf8(const char *buf, size_t len) const noexcept = 0; + +protected: + /** @private Construct an implementation with the given name and description. For subclasses. */ + simdjson_inline implementation( + std::string_view name, + std::string_view description, + uint32_t required_instruction_sets + ) : + _name(name), + _description(description), + _required_instruction_sets(required_instruction_sets) + { + } + virtual ~implementation()=default; + +private: + /** + * The name of this implementation. + */ + const std::string _name; + + /** + * The description of this implementation. + */ + const std::string _description; + + /** + * Instruction sets required for this implementation. + */ + const uint32_t _required_instruction_sets; +}; + +/** @private */ +namespace internal { + +/** + * The list of available implementations compiled into simdjson. + */ +class available_implementation_list { +public: + /** Get the list of available implementations compiled into simdjson */ + simdjson_inline available_implementation_list() {} + /** Number of implementations */ + size_t size() const noexcept; + /** STL const begin() iterator */ + const implementation * const *begin() const noexcept; + /** STL const end() iterator */ + const implementation * const *end() const noexcept; + + /** + * Get the implementation with the given name. + * + * Case sensitive. + * + * const implementation *impl = simdjson::get_available_implementations()["westmere"]; + * if (!impl) { exit(1); } + * if (!imp->supported_by_runtime_system()) { exit(1); } + * simdjson::get_active_implementation() = impl; + * + * @param name the implementation to find, e.g. "westmere", "haswell", "arm64" + * @return the implementation, or nullptr if the parse failed. + */ + const implementation * operator[](const std::string_view &name) const noexcept { + for (const implementation * impl : *this) { + if (impl->name() == name) { return impl; } + } + return nullptr; + } + + /** + * Detect the most advanced implementation supported by the current host. + * + * This is used to initialize the implementation on startup. + * + * const implementation *impl = simdjson::available_implementation::detect_best_supported(); + * simdjson::get_active_implementation() = impl; + * + * @return the most advanced supported implementation for the current host, or an + * implementation that returns UNSUPPORTED_ARCHITECTURE if there is no supported + * implementation. Will never return nullptr. + */ + const implementation *detect_best_supported() const noexcept; +}; + +} // namespace internal + +/** + * The list of available implementations compiled into simdjson. + */ +extern SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list& get_available_implementations(); + +/** + * The active implementation. + * + * Automatically initialized on first use to the most advanced implementation supported by this hardware. + */ +extern SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr& get_active_implementation(); + +} // namespace simdjson + +#endif // SIMDJSON_IMPLEMENTATION_H +/* end file simdjson/implementation.h */ +/* skipped duplicate #include "simdjson/implementation_detection.h" */ +/* including simdjson/internal/instruction_set.h: #include "simdjson/internal/instruction_set.h" */ +/* begin file simdjson/internal/instruction_set.h */ +/* From +https://github.com/endorno/pytorch/blob/master/torch/lib/TH/generic/simd/simd.h +Highly modified. + +Copyright (c) 2016- Facebook, Inc (Adam Paszke) +Copyright (c) 2014- Facebook, Inc (Soumith Chintala) +Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) +Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) +Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) +Copyright (c) 2011-2013 NYU (Clement Farabet) +Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, +Iain Melvin, Jason Weston) Copyright (c) 2006 Idiap Research Institute +(Samy Bengio) Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, +Samy Bengio, Johnny Mariethoz) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories +America and IDIAP Research Institute nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef SIMDJSON_INTERNAL_INSTRUCTION_SET_H +#define SIMDJSON_INTERNAL_INSTRUCTION_SET_H + +namespace simdjson { +namespace internal { + +enum instruction_set { + DEFAULT = 0x0, + NEON = 0x1, + AVX2 = 0x4, + SSE42 = 0x8, + PCLMULQDQ = 0x10, + BMI1 = 0x20, + BMI2 = 0x40, + ALTIVEC = 0x80, + AVX512F = 0x100, + AVX512DQ = 0x200, + AVX512IFMA = 0x400, + AVX512PF = 0x800, + AVX512ER = 0x1000, + AVX512CD = 0x2000, + AVX512BW = 0x4000, + AVX512VL = 0x8000, + AVX512VBMI2 = 0x10000 +}; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_INSTRUCTION_SET_H +/* end file simdjson/internal/instruction_set.h */ +/* skipped duplicate #include "simdjson/internal/dom_parser_implementation.h" */ +/* skipped duplicate #include "simdjson/internal/jsoncharutils_tables.h" */ +/* skipped duplicate #include "simdjson/internal/numberparsing_tables.h" */ +/* including simdjson/internal/simdprune_tables.h: #include "simdjson/internal/simdprune_tables.h" */ +/* begin file simdjson/internal/simdprune_tables.h */ +#ifndef SIMDJSON_INTERNAL_SIMDPRUNE_TABLES_H +#define SIMDJSON_INTERNAL_SIMDPRUNE_TABLES_H + +/* skipped duplicate #include "simdjson/base.h" */ + +#include + +namespace simdjson { // table modified and copied from +namespace internal { // http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetTable + +extern SIMDJSON_DLLIMPORTEXPORT const unsigned char BitsSetTable256mul2[256]; + +extern SIMDJSON_DLLIMPORTEXPORT const uint8_t pshufb_combine_table[272]; + +// 256 * 8 bytes = 2kB, easily fits in cache. +extern SIMDJSON_DLLIMPORTEXPORT const uint64_t thintable_epi8[256]; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_SIMDPRUNE_TABLES_H +/* end file simdjson/internal/simdprune_tables.h */ + +#endif // SIMDJSON_GENERIC_DEPENDENCIES_H +/* end file simdjson/generic/dependencies.h */ +/* including generic/dependencies.h: #include */ +/* begin file generic/dependencies.h */ +#ifdef SIMDJSON_CONDITIONAL_INCLUDE +#error generic/dependencies.h must be included before defining SIMDJSON_CONDITIONAL_INCLUDE! +#endif + +#ifndef SIMDJSON_SRC_GENERIC_DEPENDENCIES_H +#define SIMDJSON_SRC_GENERIC_DEPENDENCIES_H + +/* skipped duplicate #include */ + +#endif // SIMDJSON_SRC_GENERIC_DEPENDENCIES_H +/* end file generic/dependencies.h */ +/* including generic/stage1/dependencies.h: #include */ +/* begin file generic/stage1/dependencies.h */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_DEPENDENCIES_H +#define SIMDJSON_SRC_GENERIC_STAGE1_DEPENDENCIES_H + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_DEPENDENCIES_H +/* end file generic/stage1/dependencies.h */ +/* including generic/stage2/dependencies.h: #include */ +/* begin file generic/stage2/dependencies.h */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_DEPENDENCIES_H +#define SIMDJSON_SRC_GENERIC_STAGE2_DEPENDENCIES_H + +/* including simdjson/dom/document.h: #include */ +/* begin file simdjson/dom/document.h */ +#ifndef SIMDJSON_DOM_DOCUMENT_H +#define SIMDJSON_DOM_DOCUMENT_H + +/* including simdjson/dom/base.h: #include "simdjson/dom/base.h" */ +/* begin file simdjson/dom/base.h */ +#ifndef SIMDJSON_DOM_BASE_H +#define SIMDJSON_DOM_BASE_H + +/* skipped duplicate #include "simdjson/base.h" */ + +namespace simdjson { + +/** + * @brief A DOM API on top of the simdjson parser. + */ +namespace dom { + +/** The default batch size for parser.parse_many() and parser.load_many() */ +static constexpr size_t DEFAULT_BATCH_SIZE = 1000000; +/** + * Some adversary might try to set the batch size to 0 or 1, which might cause problems. + * We set a minimum of 32B since anything else is highly likely to be an error. In practice, + * most users will want a much larger batch size. + * + * All non-negative MINIMAL_BATCH_SIZE values should be 'safe' except that, obviously, no JSON + * document can ever span 0 or 1 byte and that very large values would create memory allocation issues. + */ +static constexpr size_t MINIMAL_BATCH_SIZE = 32; + +/** + * It is wasteful to allocate memory for tiny documents (e.g., 4 bytes). + */ +static constexpr size_t MINIMAL_DOCUMENT_CAPACITY = 32; + +class array; +class document; +class document_stream; +class element; +class key_value_pair; +class object; +class parser; + +#ifdef SIMDJSON_THREADS_ENABLED +struct stage1_worker; +#endif // SIMDJSON_THREADS_ENABLED + +} // namespace dom + +namespace internal { + +template +class string_builder; +class tape_ref; + +} // namespace internal + +} // namespace simdjson + +#endif // SIMDJSON_DOM_BASE_H +/* end file simdjson/dom/base.h */ + +#include + +namespace simdjson { +namespace dom { + +/** + * A parsed JSON document. + * + * This class cannot be copied, only moved, to avoid unintended allocations. + */ +class document { +public: + /** + * Create a document container with zero capacity. + * + * The parser will allocate capacity as needed. + */ + document() noexcept = default; + ~document() noexcept = default; + + /** + * Take another document's buffers. + * + * @param other The document to take. Its capacity is zeroed and it is invalidated. + */ + document(document &&other) noexcept = default; + /** @private */ + document(const document &) = delete; // Disallow copying + /** + * Take another document's buffers. + * + * @param other The document to take. Its capacity is zeroed. + */ + document &operator=(document &&other) noexcept = default; + /** @private */ + document &operator=(const document &) = delete; // Disallow copying + + /** + * Get the root element of this document as a JSON array. + */ + element root() const noexcept; + + /** + * @private Dump the raw tape for debugging. + * + * @param os the stream to output to. + * @return false if the tape is likely wrong (e.g., you did not parse a valid JSON). + */ + bool dump_raw_tape(std::ostream &os) const noexcept; + + /** @private Structural values. */ + std::unique_ptr tape{}; + + /** @private String values. + * + * Should be at least byte_capacity. + */ + std::unique_ptr string_buf{}; + /** @private Allocate memory to support + * input JSON documents of up to len bytes. + * + * When calling this function, you lose + * all the data. + * + * The memory allocation is strict: you + * can you use this function to increase + * or lower the amount of allocated memory. + * Passsing zero clears the memory. + */ + error_code allocate(size_t len) noexcept; + /** @private Capacity in bytes, in terms + * of how many bytes of input JSON we can + * support. + */ + size_t capacity() const noexcept; + + +private: + size_t allocated_capacity{0}; + friend class parser; +}; // class document + +} // namespace dom +} // namespace simdjson + +#endif // SIMDJSON_DOM_DOCUMENT_H +/* end file simdjson/dom/document.h */ +/* including simdjson/internal/tape_type.h: #include */ +/* begin file simdjson/internal/tape_type.h */ +#ifndef SIMDJSON_INTERNAL_TAPE_TYPE_H +#define SIMDJSON_INTERNAL_TAPE_TYPE_H + +namespace simdjson { +namespace internal { + +/** + * The possible types in the tape. + */ +enum class tape_type { + ROOT = 'r', + START_ARRAY = '[', + START_OBJECT = '{', + END_ARRAY = ']', + END_OBJECT = '}', + STRING = '"', + INT64 = 'l', + UINT64 = 'u', + DOUBLE = 'd', + TRUE_VALUE = 't', + FALSE_VALUE = 'f', + NULL_VALUE = 'n' +}; // enum class tape_type + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_TAPE_TYPE_H +/* end file simdjson/internal/tape_type.h */ + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_DEPENDENCIES_H +/* end file generic/stage2/dependencies.h */ + +/* including implementation.cpp: #include */ +/* begin file implementation.cpp */ +#ifndef SIMDJSON_SRC_IMPLEMENTATION_CPP +#define SIMDJSON_SRC_IMPLEMENTATION_CPP + +/* skipped duplicate #include */ +/* skipped duplicate #include */ +/* skipped duplicate #include */ +/* including internal/isadetection.h: #include */ +/* begin file internal/isadetection.h */ +/* From +https://github.com/endorno/pytorch/blob/master/torch/lib/TH/generic/simd/simd.h +Highly modified. + +Copyright (c) 2016- Facebook, Inc (Adam Paszke) +Copyright (c) 2014- Facebook, Inc (Soumith Chintala) +Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) +Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) +Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) +Copyright (c) 2011-2013 NYU (Clement Farabet) +Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, +Iain Melvin, Jason Weston) Copyright (c) 2006 Idiap Research Institute +(Samy Bengio) Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, +Samy Bengio, Johnny Mariethoz) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories +America and IDIAP Research Institute nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef SIMDJSON_INTERNAL_ISADETECTION_H +#define SIMDJSON_INTERNAL_ISADETECTION_H + +/* skipped duplicate #include "simdjson/internal/instruction_set.h" */ + +#include +#include +#if defined(_MSC_VER) +#include +#elif defined(HAVE_GCC_GET_CPUID) && defined(USE_GCC_GET_CPUID) +#include +#endif + +namespace simdjson { +namespace internal { + +#if defined(__PPC64__) + +static inline uint32_t detect_supported_architectures() { + return instruction_set::ALTIVEC; +} + +#elif defined(__aarch64__) || defined(_M_ARM64) + +static inline uint32_t detect_supported_architectures() { + return instruction_set::NEON; +} + +#elif defined(__x86_64__) || defined(_M_AMD64) // x64 + + +namespace { +// Can be found on Intel ISA Reference for CPUID +constexpr uint32_t cpuid_avx2_bit = 1 << 5; ///< @private Bit 5 of EBX for EAX=0x7 +constexpr uint32_t cpuid_bmi1_bit = 1 << 3; ///< @private bit 3 of EBX for EAX=0x7 +constexpr uint32_t cpuid_bmi2_bit = 1 << 8; ///< @private bit 8 of EBX for EAX=0x7 +constexpr uint32_t cpuid_avx512f_bit = 1 << 16; ///< @private bit 16 of EBX for EAX=0x7 +constexpr uint32_t cpuid_avx512dq_bit = 1 << 17; ///< @private bit 17 of EBX for EAX=0x7 +constexpr uint32_t cpuid_avx512ifma_bit = 1 << 21; ///< @private bit 21 of EBX for EAX=0x7 +constexpr uint32_t cpuid_avx512pf_bit = 1 << 26; ///< @private bit 26 of EBX for EAX=0x7 +constexpr uint32_t cpuid_avx512er_bit = 1 << 27; ///< @private bit 27 of EBX for EAX=0x7 +constexpr uint32_t cpuid_avx512cd_bit = 1 << 28; ///< @private bit 28 of EBX for EAX=0x7 +constexpr uint32_t cpuid_avx512bw_bit = 1 << 30; ///< @private bit 30 of EBX for EAX=0x7 +constexpr uint32_t cpuid_avx512vl_bit = 1U << 31; ///< @private bit 31 of EBX for EAX=0x7 +constexpr uint32_t cpuid_avx512vbmi2_bit = 1 << 6; ///< @private bit 6 of ECX for EAX=0x7 +constexpr uint64_t cpuid_avx256_saved = uint64_t(1) << 2; ///< @private bit 2 = AVX +constexpr uint64_t cpuid_avx512_saved = uint64_t(7) << 5; ///< @private bits 5,6,7 = opmask, ZMM_hi256, hi16_ZMM +constexpr uint32_t cpuid_sse42_bit = 1 << 20; ///< @private bit 20 of ECX for EAX=0x1 +constexpr uint32_t cpuid_osxsave = (uint32_t(1) << 26) | (uint32_t(1) << 27); ///< @private bits 26+27 of ECX for EAX=0x1 +constexpr uint32_t cpuid_pclmulqdq_bit = 1 << 1; ///< @private bit 1 of ECX for EAX=0x1 +} + + + +static inline void cpuid(uint32_t *eax, uint32_t *ebx, uint32_t *ecx, + uint32_t *edx) { +#if defined(_MSC_VER) + int cpu_info[4]; + __cpuidex(cpu_info, *eax, *ecx); + *eax = cpu_info[0]; + *ebx = cpu_info[1]; + *ecx = cpu_info[2]; + *edx = cpu_info[3]; +#elif defined(HAVE_GCC_GET_CPUID) && defined(USE_GCC_GET_CPUID) + uint32_t level = *eax; + __get_cpuid(level, eax, ebx, ecx, edx); +#else + uint32_t a = *eax, b, c = *ecx, d; + asm volatile("cpuid\n\t" : "+a"(a), "=b"(b), "+c"(c), "=d"(d)); + *eax = a; + *ebx = b; + *ecx = c; + *edx = d; +#endif +} + + +static inline uint64_t xgetbv() { +#if defined(_MSC_VER) + return _xgetbv(0); +#else + uint32_t xcr0_lo, xcr0_hi; + asm volatile("xgetbv\n\t" : "=a" (xcr0_lo), "=d" (xcr0_hi) : "c" (0)); + return xcr0_lo | (uint64_t(xcr0_hi) << 32); +#endif +} + +static inline uint32_t detect_supported_architectures() { + uint32_t eax, ebx, ecx, edx; + uint32_t host_isa = 0x0; + + // EBX for EAX=0x1 + eax = 0x1; + ecx = 0x0; + cpuid(&eax, &ebx, &ecx, &edx); + + if (ecx & cpuid_sse42_bit) { + host_isa |= instruction_set::SSE42; + } else { + return host_isa; // everything after is redundant + } + + if (ecx & cpuid_pclmulqdq_bit) { + host_isa |= instruction_set::PCLMULQDQ; + } + + + if ((ecx & cpuid_osxsave) != cpuid_osxsave) { + return host_isa; + } + + // xgetbv for checking if the OS saves registers + uint64_t xcr0 = xgetbv(); + + if ((xcr0 & cpuid_avx256_saved) == 0) { + return host_isa; + } + + // ECX for EAX=0x7 + eax = 0x7; + ecx = 0x0; + cpuid(&eax, &ebx, &ecx, &edx); + if (ebx & cpuid_avx2_bit) { + host_isa |= instruction_set::AVX2; + } + if (ebx & cpuid_bmi1_bit) { + host_isa |= instruction_set::BMI1; + } + + if (ebx & cpuid_bmi2_bit) { + host_isa |= instruction_set::BMI2; + } + + if (!((xcr0 & cpuid_avx512_saved) == cpuid_avx512_saved)) { + return host_isa; + } + + if (ebx & cpuid_avx512f_bit) { + host_isa |= instruction_set::AVX512F; + } + + if (ebx & cpuid_avx512dq_bit) { + host_isa |= instruction_set::AVX512DQ; + } + + if (ebx & cpuid_avx512ifma_bit) { + host_isa |= instruction_set::AVX512IFMA; + } + + if (ebx & cpuid_avx512pf_bit) { + host_isa |= instruction_set::AVX512PF; + } + + if (ebx & cpuid_avx512er_bit) { + host_isa |= instruction_set::AVX512ER; + } + + if (ebx & cpuid_avx512cd_bit) { + host_isa |= instruction_set::AVX512CD; + } + + if (ebx & cpuid_avx512bw_bit) { + host_isa |= instruction_set::AVX512BW; + } + + if (ebx & cpuid_avx512vl_bit) { + host_isa |= instruction_set::AVX512VL; + } + + if (ecx & cpuid_avx512vbmi2_bit) { + host_isa |= instruction_set::AVX512VBMI2; + } + + return host_isa; +} +#else // fallback + + +static inline uint32_t detect_supported_architectures() { + return instruction_set::DEFAULT; +} + + +#endif // end SIMD extension detection code + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_ISADETECTION_H +/* end file internal/isadetection.h */ + +#include + +namespace simdjson { + +bool implementation::supported_by_runtime_system() const { + uint32_t required_instruction_sets = this->required_instruction_sets(); + uint32_t supported_instruction_sets = internal::detect_supported_architectures(); + return ((supported_instruction_sets & required_instruction_sets) == required_instruction_sets); +} + +} // namespace simdjson + +/* defining SIMDJSON_CONDITIONAL_INCLUDE */ +#define SIMDJSON_CONDITIONAL_INCLUDE + +#if SIMDJSON_IMPLEMENTATION_ARM64 +/* including simdjson/arm64/implementation.h: #include */ +/* begin file simdjson/arm64/implementation.h */ +#ifndef SIMDJSON_ARM64_IMPLEMENTATION_H +#define SIMDJSON_ARM64_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation("arm64", "ARM NEON", internal::instruction_set::NEON) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_IMPLEMENTATION_H +/* end file simdjson/arm64/implementation.h */ +namespace simdjson { +namespace internal { +static const arm64::implementation* get_arm64_singleton() { + static const arm64::implementation arm64_singleton{}; + return &arm64_singleton; +} +} // namespace internal +} // namespace simdjson +#endif // SIMDJSON_IMPLEMENTATION_ARM64 + +#if SIMDJSON_IMPLEMENTATION_FALLBACK +/* including simdjson/fallback/implementation.h: #include */ +/* begin file simdjson/fallback/implementation.h */ +#ifndef SIMDJSON_FALLBACK_IMPLEMENTATION_H +#define SIMDJSON_FALLBACK_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation( + "fallback", + "Generic fallback implementation", + 0 + ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H +/* end file simdjson/fallback/implementation.h */ +namespace simdjson { +namespace internal { +static const fallback::implementation* get_fallback_singleton() { + static const fallback::implementation fallback_singleton{}; + return &fallback_singleton; +} +} // namespace internal +} // namespace simdjson +#endif // SIMDJSON_IMPLEMENTATION_FALLBACK + + +#if SIMDJSON_IMPLEMENTATION_HASWELL +/* including simdjson/haswell/implementation.h: #include */ +/* begin file simdjson/haswell/implementation.h */ +#ifndef SIMDJSON_HASWELL_IMPLEMENTATION_H +#define SIMDJSON_HASWELL_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_HASWELL +namespace simdjson { +namespace haswell { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation( + "haswell", + "Intel/AMD AVX2", + internal::instruction_set::AVX2 | internal::instruction_set::PCLMULQDQ | internal::instruction_set::BMI1 | internal::instruction_set::BMI2 + ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_IMPLEMENTATION_H +/* end file simdjson/haswell/implementation.h */ +namespace simdjson { +namespace internal { +static const haswell::implementation* get_haswell_singleton() { + static const haswell::implementation haswell_singleton{}; + return &haswell_singleton; +} +} // namespace internal +} // namespace simdjson +#endif + +#if SIMDJSON_IMPLEMENTATION_ICELAKE +/* including simdjson/icelake/implementation.h: #include */ +/* begin file simdjson/icelake/implementation.h */ +#ifndef SIMDJSON_ICELAKE_IMPLEMENTATION_H +#define SIMDJSON_ICELAKE_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_ICELAKE +namespace simdjson { +namespace icelake { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation( + "icelake", + "Intel/AMD AVX512", + 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 + ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_IMPLEMENTATION_H +/* end file simdjson/icelake/implementation.h */ +namespace simdjson { +namespace internal { +static const icelake::implementation* get_icelake_singleton() { + static const icelake::implementation icelake_singleton{}; + return &icelake_singleton; +} +} // namespace internal +} // namespace simdjson +#endif + +#if SIMDJSON_IMPLEMENTATION_PPC64 +/* including simdjson/ppc64/implementation.h: #include */ +/* begin file simdjson/ppc64/implementation.h */ +#ifndef SIMDJSON_PPC64_IMPLEMENTATION_H +#define SIMDJSON_PPC64_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +/** + * Implementation for ALTIVEC (PPC64). + */ +namespace ppc64 { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() + : simdjson::implementation("ppc64", "PPC64 ALTIVEC", + internal::instruction_set::ALTIVEC) {} + + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, size_t max_length, + std::unique_ptr &dst) + const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, + uint8_t *dst, + size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, + size_t len) const noexcept final; +}; + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_IMPLEMENTATION_H +/* end file simdjson/ppc64/implementation.h */ +namespace simdjson { +namespace internal { +static const ppc64::implementation* get_ppc64_singleton() { + static const ppc64::implementation ppc64_singleton{}; + return &ppc64_singleton; +} +} // namespace internal +} // namespace simdjson +#endif // SIMDJSON_IMPLEMENTATION_PPC64 + +#if SIMDJSON_IMPLEMENTATION_WESTMERE +/* including simdjson/westmere/implementation.h: #include */ +/* begin file simdjson/westmere/implementation.h */ +#ifndef SIMDJSON_WESTMERE_IMPLEMENTATION_H +#define SIMDJSON_WESTMERE_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE +namespace simdjson { +namespace westmere { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation("westmere", "Intel/AMD SSE4.2", internal::instruction_set::SSE42 | internal::instruction_set::PCLMULQDQ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H +/* end file simdjson/westmere/implementation.h */ +namespace simdjson { +namespace internal { +static const simdjson::westmere::implementation* get_westmere_singleton() { + static const simdjson::westmere::implementation westmere_singleton{}; + return &westmere_singleton; +} +} // namespace internal +} // namespace simdjson +#endif // SIMDJSON_IMPLEMENTATION_WESTMERE + +/* undefining SIMDJSON_CONDITIONAL_INCLUDE */ +#undef SIMDJSON_CONDITIONAL_INCLUDE + +namespace simdjson { +namespace internal { + +// Static array of known implementations. We're hoping these get baked into the executable +// without requiring a static initializer. + +/** + * @private Detects best supported implementation on first use, and sets it + */ +class detect_best_supported_implementation_on_first_use final : public implementation { +public: + const std::string &name() const noexcept final { return set_best()->name(); } + const std::string &description() const noexcept final { return set_best()->description(); } + uint32_t required_instruction_sets() const noexcept final { return set_best()->required_instruction_sets(); } + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final { + return set_best()->create_dom_parser_implementation(capacity, max_length, dst); + } + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final { + return set_best()->minify(buf, len, dst, dst_len); + } + simdjson_warn_unused bool validate_utf8(const char * buf, size_t len) const noexcept final override { + return set_best()->validate_utf8(buf, len); + } + simdjson_inline detect_best_supported_implementation_on_first_use() noexcept : implementation("best_supported_detector", "Detects the best supported implementation and sets it", 0) {} +private: + const implementation *set_best() const noexcept; +}; + +static const std::initializer_list& get_available_implementation_pointers() { + static const std::initializer_list available_implementation_pointers { +#if SIMDJSON_IMPLEMENTATION_ICELAKE + get_icelake_singleton(), +#endif +#if SIMDJSON_IMPLEMENTATION_HASWELL + get_haswell_singleton(), +#endif +#if SIMDJSON_IMPLEMENTATION_WESTMERE + get_westmere_singleton(), +#endif +#if SIMDJSON_IMPLEMENTATION_ARM64 + get_arm64_singleton(), +#endif +#if SIMDJSON_IMPLEMENTATION_PPC64 + get_ppc64_singleton(), +#endif +#if SIMDJSON_IMPLEMENTATION_FALLBACK + get_fallback_singleton(), +#endif + }; // available_implementation_pointers + return available_implementation_pointers; +} + +// So we can return UNSUPPORTED_ARCHITECTURE from the parser when there is no support +class unsupported_implementation final : public implementation { +public: + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t, + size_t, + std::unique_ptr& + ) const noexcept final { + return UNSUPPORTED_ARCHITECTURE; + } + simdjson_warn_unused error_code minify(const uint8_t *, size_t, uint8_t *, size_t &) const noexcept final override { + return UNSUPPORTED_ARCHITECTURE; + } + simdjson_warn_unused bool validate_utf8(const char *, size_t) const noexcept final override { + return false; // Just refuse to validate. Given that we have a fallback implementation + // it seems unlikely that unsupported_implementation will ever be used. If it is used, + // then it will flag all strings as invalid. The alternative is to return an error_code + // from which the user has to figure out whether the string is valid UTF-8... which seems + // like a lot of work just to handle the very unlikely case that we have an unsupported + // implementation. And, when it does happen (that we have an unsupported implementation), + // what are the chances that the programmer has a fallback? Given that *we* provide the + // fallback, it implies that the programmer would need a fallback for our fallback. + } + unsupported_implementation() : implementation("unsupported", "Unsupported CPU (no detected SIMD instructions)", 0) {} +}; + +const unsupported_implementation* get_unsupported_singleton() { + static const unsupported_implementation unsupported_singleton{}; + return &unsupported_singleton; +} + +size_t available_implementation_list::size() const noexcept { + return internal::get_available_implementation_pointers().size(); +} +const implementation * const *available_implementation_list::begin() const noexcept { + return internal::get_available_implementation_pointers().begin(); +} +const implementation * const *available_implementation_list::end() const noexcept { + return internal::get_available_implementation_pointers().end(); +} +const implementation *available_implementation_list::detect_best_supported() const noexcept { + // They are prelisted in priority order, so we just go down the list + uint32_t supported_instruction_sets = internal::detect_supported_architectures(); + for (const implementation *impl : internal::get_available_implementation_pointers()) { + uint32_t required_instruction_sets = impl->required_instruction_sets(); + if ((supported_instruction_sets & required_instruction_sets) == required_instruction_sets) { return impl; } + } + return get_unsupported_singleton(); // this should never happen? +} + +const implementation *detect_best_supported_implementation_on_first_use::set_best() const noexcept { + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe + char *force_implementation_name = getenv("SIMDJSON_FORCE_IMPLEMENTATION"); + SIMDJSON_POP_DISABLE_WARNINGS + + if (force_implementation_name) { + auto force_implementation = get_available_implementations()[force_implementation_name]; + if (force_implementation) { + return get_active_implementation() = force_implementation; + } else { + // Note: abort() and stderr usage within the library is forbidden. + return get_active_implementation() = get_unsupported_singleton(); + } + } + return get_active_implementation() = get_available_implementations().detect_best_supported(); +} + +} // namespace internal + +SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list& get_available_implementations() { + static const internal::available_implementation_list available_implementations{}; + return available_implementations; +} + +SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr& get_active_implementation() { + static const internal::detect_best_supported_implementation_on_first_use detect_best_supported_implementation_on_first_use_singleton; + static internal::atomic_ptr active_implementation{&detect_best_supported_implementation_on_first_use_singleton}; + return active_implementation; +} + +simdjson_warn_unused error_code minify(const char *buf, size_t len, char *dst, size_t &dst_len) noexcept { + return get_active_implementation()->minify(reinterpret_cast(buf), len, reinterpret_cast(dst), dst_len); +} +simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept { + return get_active_implementation()->validate_utf8(buf, len); +} +const implementation * builtin_implementation() { + static const implementation * builtin_impl = get_available_implementations()[SIMDJSON_STRINGIFY(SIMDJSON_BUILTIN_IMPLEMENTATION)]; + assert(builtin_impl); + return builtin_impl; +} + +} // namespace simdjson + +#endif // SIMDJSON_SRC_IMPLEMENTATION_CPP +/* end file implementation.cpp */ + +/* defining SIMDJSON_CONDITIONAL_INCLUDE */ +#define SIMDJSON_CONDITIONAL_INCLUDE + +#if SIMDJSON_IMPLEMENTATION_ARM64 +/* including arm64.cpp: #include */ +/* begin file arm64.cpp */ +#ifndef SIMDJSON_SRC_ARM64_CPP +#define SIMDJSON_SRC_ARM64_CPP + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* including simdjson/arm64.h: #include */ +/* begin file simdjson/arm64.h */ +#ifndef SIMDJSON_ARM64_H +#define SIMDJSON_ARM64_H + +/* including simdjson/arm64/begin.h: #include "simdjson/arm64/begin.h" */ +/* begin file simdjson/arm64/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "arm64" */ +#define SIMDJSON_IMPLEMENTATION arm64 +/* including simdjson/arm64/base.h: #include "simdjson/arm64/base.h" */ +/* begin file simdjson/arm64/base.h */ +#ifndef SIMDJSON_ARM64_BASE_H +#define SIMDJSON_ARM64_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Implementation for NEON (ARMv8). + */ +namespace arm64 { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_BASE_H +/* end file simdjson/arm64/base.h */ +/* including simdjson/arm64/intrinsics.h: #include "simdjson/arm64/intrinsics.h" */ +/* begin file simdjson/arm64/intrinsics.h */ +#ifndef SIMDJSON_ARM64_INTRINSICS_H +#define SIMDJSON_ARM64_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This should be the correct header whether +// you use visual studio or other compilers. +#include + +static_assert(sizeof(uint8x16_t) <= simdjson::SIMDJSON_PADDING, "insufficient padding for arm64"); + +#endif // SIMDJSON_ARM64_INTRINSICS_H +/* end file simdjson/arm64/intrinsics.h */ +/* including simdjson/arm64/bitmanipulation.h: #include "simdjson/arm64/bitmanipulation.h" */ +/* begin file simdjson/arm64/bitmanipulation.h */ +#ifndef SIMDJSON_ARM64_BITMANIPULATION_H +#define SIMDJSON_ARM64_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int count_ones(uint64_t input_num) { + return vaddv_u8(vcnt_u8(vcreate_u8(input_num))); +} + + +#if defined(__GNUC__) // catches clang and gcc +/** + * ARM has a fast 64-bit "bit reversal function" that is handy. However, + * it is not generally available as an intrinsic function under Visual + * Studio (though this might be changing). Even under clang/gcc, we + * apparently need to invoke inline assembly. + */ +/* + * We use SIMDJSON_PREFER_REVERSE_BITS as a hint that algorithms that + * work well with bit reversal may use it. + */ +#define SIMDJSON_PREFER_REVERSE_BITS 1 + +/* reverse the bits */ +simdjson_inline uint64_t reverse_bits(uint64_t input_num) { + uint64_t rev_bits; + __asm("rbit %0, %1" : "=r"(rev_bits) : "r"(input_num)); + return rev_bits; +} + +/** + * Flips bit at index 63 - lz. Thus if you have 'leading_zeroes' leading zeroes, + * then this will set to zero the leading bit. It is possible for leading_zeroes to be + * greating or equal to 63 in which case we trigger undefined behavior, but the output + * of such undefined behavior is never used. + **/ +SIMDJSON_NO_SANITIZE_UNDEFINED +simdjson_inline uint64_t zero_leading_bit(uint64_t rev_bits, int leading_zeroes) { + return rev_bits ^ (uint64_t(0x8000000000000000) >> leading_zeroes); +} + +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, uint64_t *result) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + *result = value1 + value2; + return *result < value1; +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_BITMANIPULATION_H +/* end file simdjson/arm64/bitmanipulation.h */ +/* including simdjson/arm64/bitmask.h: #include "simdjson/arm64/bitmask.h" */ +/* begin file simdjson/arm64/bitmask.h */ +#ifndef SIMDJSON_ARM64_BITMASK_H +#define SIMDJSON_ARM64_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(uint64_t bitmask) { + ///////////// + // We could do this with PMULL, but it is apparently slow. + // + //#ifdef __ARM_FEATURE_CRYPTO // some ARM processors lack this extension + //return vmull_p64(-1ULL, bitmask); + //#else + // Analysis by @sebpop: + // When diffing the assembly for src/stage1_find_marks.cpp I see that the eors are all spread out + // in between other vector code, so effectively the extra cycles of the sequence do not matter + // because the GPR units are idle otherwise and the critical path is on the FP side. + // Also the PMULL requires two extra fmovs: GPR->FP (3 cycles in N1, 5 cycles in A72 ) + // and FP->GPR (2 cycles on N1 and 5 cycles on A72.) + /////////// + bitmask ^= bitmask << 1; + bitmask ^= bitmask << 2; + bitmask ^= bitmask << 4; + bitmask ^= bitmask << 8; + bitmask ^= bitmask << 16; + bitmask ^= bitmask << 32; + return bitmask; +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif +/* end file simdjson/arm64/bitmask.h */ +/* including simdjson/arm64/numberparsing_defs.h: #include "simdjson/arm64/numberparsing_defs.h" */ +/* begin file simdjson/arm64/numberparsing_defs.h */ +#ifndef SIMDJSON_ARM64_NUMBERPARSING_DEFS_H +#define SIMDJSON_ARM64_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#if _M_ARM64 +// __umulh requires intrin.h +#include +#endif // _M_ARM64 + +namespace simdjson { +namespace arm64 { +namespace numberparsing { + +// we don't have SSE, so let us use a scalar function +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + uint64_t val; + std::memcpy(&val, chars, sizeof(uint64_t)); + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace arm64 +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_ARM64_NUMBERPARSING_DEFS_H +/* end file simdjson/arm64/numberparsing_defs.h */ +/* including simdjson/arm64/simd.h: #include "simdjson/arm64/simd.h" */ +/* begin file simdjson/arm64/simd.h */ +#ifndef SIMDJSON_ARM64_SIMD_H +#define SIMDJSON_ARM64_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace simd { + +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO +namespace { +// Start of private section with Visual Studio workaround + + +#ifndef simdjson_make_uint8x16_t +#define simdjson_make_uint8x16_t(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, \ + x13, x14, x15, x16) \ + ([=]() { \ + uint8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8, \ + x9, x10, x11, x12, x13, x14, x15, x16}; \ + return vld1q_u8(array); \ + }()) +#endif +#ifndef simdjson_make_int8x16_t +#define simdjson_make_int8x16_t(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, \ + x13, x14, x15, x16) \ + ([=]() { \ + int8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8, \ + x9, x10, x11, x12, x13, x14, x15, x16}; \ + return vld1q_s8(array); \ + }()) +#endif + +#ifndef simdjson_make_uint8x8_t +#define simdjson_make_uint8x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + uint8_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1_u8(array); \ + }()) +#endif +#ifndef simdjson_make_int8x8_t +#define simdjson_make_int8x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + int8_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1_s8(array); \ + }()) +#endif +#ifndef simdjson_make_uint16x8_t +#define simdjson_make_uint16x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + uint16_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1q_u16(array); \ + }()) +#endif +#ifndef simdjson_make_int16x8_t +#define simdjson_make_int16x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + int16_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1q_s16(array); \ + }()) +#endif + +// End of private section with Visual Studio workaround +} // namespace +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO + + + template + struct simd8; + + // + // Base class of simd8 and simd8, both of which use uint8x16_t internally. + // + template> + struct base_u8 { + uint8x16_t value; + static const int SIZE = sizeof(value); + + // Conversion from/to SIMD register + simdjson_inline base_u8(const uint8x16_t _value) : value(_value) {} + simdjson_inline operator const uint8x16_t&() const { return this->value; } + simdjson_inline operator uint8x16_t&() { return this->value; } + + // Bit operations + simdjson_inline simd8 operator|(const simd8 other) const { return vorrq_u8(*this, other); } + simdjson_inline simd8 operator&(const simd8 other) const { return vandq_u8(*this, other); } + simdjson_inline simd8 operator^(const simd8 other) const { return veorq_u8(*this, other); } + simdjson_inline simd8 bit_andnot(const simd8 other) const { return vbicq_u8(*this, other); } + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + simdjson_inline simd8& operator|=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline simd8& operator&=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline simd8& operator^=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast ^ other; return *this_cast; } + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return vceqq_u8(lhs, rhs); } + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return vextq_u8(prev_chunk, *this, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base_u8 { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + static simdjson_inline simd8 splat(bool _value) { return vmovq_n_u8(uint8_t(-(!!_value))); } + + simdjson_inline simd8(const uint8x16_t _value) : base_u8(_value) {} + // False constructor + simdjson_inline simd8() : simd8(vdupq_n_u8(0)) {} + // Splat constructor + simdjson_inline simd8(bool _value) : simd8(splat(_value)) {} + + // We return uint32_t instead of uint16_t because that seems to be more efficient for most + // purposes (cutting it down to uint16_t costs performance in some compilers). + simdjson_inline uint32_t to_bitmask() const { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + const uint8x16_t bit_mask = simdjson_make_uint8x16_t(0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80); +#else + const uint8x16_t bit_mask = {0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; +#endif + auto minput = *this & bit_mask; + uint8x16_t tmp = vpaddq_u8(minput, minput); + tmp = vpaddq_u8(tmp, tmp); + tmp = vpaddq_u8(tmp, tmp); + return vgetq_lane_u16(vreinterpretq_u16_u8(tmp), 0); + } + simdjson_inline bool any() const { return vmaxvq_u8(*this) != 0; } + }; + + // Unsigned bytes + template<> + struct simd8: base_u8 { + static simdjson_inline uint8x16_t splat(uint8_t _value) { return vmovq_n_u8(_value); } + static simdjson_inline uint8x16_t zero() { return vdupq_n_u8(0); } + static simdjson_inline uint8x16_t load(const uint8_t* values) { return vld1q_u8(values); } + + simdjson_inline simd8(const uint8x16_t _value) : base_u8(_value) {} + // Zero constructor + simdjson_inline simd8() : simd8(zero()) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[16]) : simd8(load(values)) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Member-by-member initialization +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(simdjson_make_uint8x16_t( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} +#else + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(uint8x16_t{ + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + }) {} +#endif + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Store to array + simdjson_inline void store(uint8_t dst[16]) const { return vst1q_u8(dst, *this); } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return vqaddq_u8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return vqsubq_u8(*this, other); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return vaddq_u8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return vsubq_u8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *this; } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *this; } + + // Order-specific operations + simdjson_inline uint8_t max_val() const { return vmaxvq_u8(*this); } + simdjson_inline uint8_t min_val() const { return vminvq_u8(*this); } + simdjson_inline simd8 max_val(const simd8 other) const { return vmaxq_u8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return vminq_u8(*this, other); } + simdjson_inline simd8 operator<=(const simd8 other) const { return vcleq_u8(*this, other); } + simdjson_inline simd8 operator>=(const simd8 other) const { return vcgeq_u8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return vcltq_u8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return vcgtq_u8(*this, other); } + // Same as >, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's. + simdjson_inline simd8 gt_bits(const simd8 other) const { return simd8(*this > other); } + // Same as <, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's. + simdjson_inline simd8 lt_bits(const simd8 other) const { return simd8(*this < other); } + + // Bit-specific operations + simdjson_inline simd8 any_bits_set(simd8 bits) const { return vtstq_u8(*this, bits); } + simdjson_inline bool any_bits_set_anywhere() const { return this->max_val() != 0; } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return (*this & bits).any_bits_set_anywhere(); } + template + simdjson_inline simd8 shr() const { return vshrq_n_u8(*this, N); } + template + simdjson_inline simd8 shl() const { return vshlq_n_u8(*this, N); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return lookup_table.apply_lookup_16_to(*this); + } + + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint16_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + uint64x2_t shufmask64 = {thintable_epi8[mask1], thintable_epi8[mask2]}; + uint8x16_t shufmask = vreinterpretq_u8_u64(shufmask64); + // we increment by 0x08 the second half of the mask +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + uint8x16_t inc = simdjson_make_uint8x16_t(0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08); +#else + uint8x16_t inc = {0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}; +#endif + shufmask = vaddq_u8(shufmask, inc); + // this is the version "nearly pruned" + uint8x16_t pruned = vqtbl1q_u8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + uint8x16_t compactmask = vld1q_u8(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + uint8x16_t answer = vqtbl1q_u8(pruned, compactmask); + vst1q_u8(reinterpret_cast(output), answer); + } + + // Copies all bytes corresponding to a 0 in the low half of the mask (interpreted as a + // bitset) to output1, then those corresponding to a 0 in the high half to output2. + template + simdjson_inline void compress_halves(uint16_t mask, L *output1, L *output2) const { + using internal::thintable_epi8; + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + uint8x8_t compactmask1 = vcreate_u8(thintable_epi8[mask1]); + uint8x8_t compactmask2 = vcreate_u8(thintable_epi8[mask2]); + // we increment by 0x08 the second half of the mask +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + uint8x8_t inc = simdjson_make_uint8x8_t(0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08); +#else + uint8x8_t inc = {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}; +#endif + compactmask2 = vadd_u8(compactmask2, inc); + // store each result (with the second store possibly overlapping the first) + vst1_u8((uint8_t*)output1, vqtbl1_u8(*this, compactmask1)); + vst1_u8((uint8_t*)output2, vqtbl1_u8(*this, compactmask2)); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + + template + simdjson_inline simd8 apply_lookup_16_to(const simd8 original) { + return vqtbl1q_u8(*this, simd8(original)); + } + }; + + // Signed bytes + template<> + struct simd8 { + int8x16_t value; + + static simdjson_inline simd8 splat(int8_t _value) { return vmovq_n_s8(_value); } + static simdjson_inline simd8 zero() { return vdupq_n_s8(0); } + static simdjson_inline simd8 load(const int8_t values[16]) { return vld1q_s8(values); } + + // Conversion from/to SIMD register + simdjson_inline simd8(const int8x16_t _value) : value{_value} {} + simdjson_inline operator const int8x16_t&() const { return this->value; } + simdjson_inline operator int8x16_t&() { return this->value; } + + // Zero constructor + simdjson_inline simd8() : simd8(zero()) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(simdjson_make_int8x16_t( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} +#else + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(int8x16_t{ + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + }) {} +#endif + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Store to array + simdjson_inline void store(int8_t dst[16]) const { return vst1q_s8(dst, *this); } + + // Explicit conversion to/from unsigned + // + // Under Visual Studio/ARM64 uint8x16_t and int8x16_t are apparently the same type. + // In theory, we could check this occurrence with std::same_as and std::enabled_if but it is C++14 + // and relatively ugly and hard to read. +#ifndef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline explicit simd8(const uint8x16_t other): simd8(vreinterpretq_s8_u8(other)) {} +#endif + simdjson_inline explicit operator simd8() const { return vreinterpretq_u8_s8(this->value); } + + // Math + simdjson_inline simd8 operator+(const simd8 other) const { return vaddq_s8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return vsubq_s8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *this; } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *this; } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return vmaxq_s8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return vminq_s8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return vcgtq_s8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return vcltq_s8(*this, other); } + simdjson_inline simd8 operator==(const simd8 other) const { return vceqq_s8(*this, other); } + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return vextq_s8(prev_chunk, *this, 16 - N); + } + + // Perform a lookup assuming no value is larger than 16 + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return lookup_table.apply_lookup_16_to(*this); + } + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + + template + simdjson_inline simd8 apply_lookup_16_to(const simd8 original) { + return vqtbl1q_s8(*this, simd8(original)); + } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "ARM kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + uint64_t popcounts = vget_lane_u64(vreinterpret_u64_u8(vcnt_u8(vcreate_u8(~mask))), 0); + // compute the prefix sum of the popcounts of each byte + uint64_t offsets = popcounts * 0x0101010101010101; + this->chunks[0].compress_halves(uint16_t(mask), output, &output[popcounts & 0xFF]); + this->chunks[1].compress_halves(uint16_t(mask >> 16), &output[(offsets >> 8) & 0xFF], &output[(offsets >> 16) & 0xFF]); + this->chunks[2].compress_halves(uint16_t(mask >> 32), &output[(offsets >> 24) & 0xFF], &output[(offsets >> 32) & 0xFF]); + this->chunks[3].compress_halves(uint16_t(mask >> 48), &output[(offsets >> 40) & 0xFF], &output[(offsets >> 48) & 0xFF]); + return offsets >> 56; + } + + simdjson_inline uint64_t to_bitmask() const { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + const uint8x16_t bit_mask = simdjson_make_uint8x16_t( + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 + ); +#else + const uint8x16_t bit_mask = { + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 + }; +#endif + // Add each of the elements next to each other, successively, to stuff each 8 byte mask into one. + uint8x16_t sum0 = vpaddq_u8(this->chunks[0] & bit_mask, this->chunks[1] & bit_mask); + uint8x16_t sum1 = vpaddq_u8(this->chunks[2] & bit_mask, this->chunks[3] & bit_mask); + sum0 = vpaddq_u8(sum0, sum1); + sum0 = vpaddq_u8(sum0, sum0); + return vgetq_lane_u64(vreinterpretq_u64_u8(sum0), 0); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_SIMD_H +/* end file simdjson/arm64/simd.h */ +/* including simdjson/arm64/stringparsing_defs.h: #include "simdjson/arm64/stringparsing_defs.h" */ +/* begin file simdjson/arm64/stringparsing_defs.h */ +#ifndef SIMDJSON_ARM64_STRINGPARSING_DEFS_H +#define SIMDJSON_ARM64_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + sizeof(v0)); + v0.store(dst); + v1.store(dst + sizeof(v0)); + + // Getting a 64-bit bitmask is much cheaper than multiple 16-bit bitmasks on ARM; therefore, we + // smash them together into a 64-byte mask and get the bitmask from there. + uint64_t bs_and_quote = simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_STRINGPARSING_DEFS_H +/* end file simdjson/arm64/stringparsing_defs.h */ + +#define SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT 1 +/* end file simdjson/arm64/begin.h */ +/* including simdjson/generic/amalgamated.h for arm64: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for arm64 */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for arm64: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for arm64 */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for arm64 */ +/* including simdjson/generic/jsoncharutils.h for arm64: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for arm64 */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for arm64 */ +/* including simdjson/generic/atomparsing.h for arm64: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace arm64 { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for arm64 */ +/* including simdjson/generic/dom_parser_implementation.h for arm64: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for arm64 */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { +namespace arm64 { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for arm64 */ +/* including simdjson/generic/implementation_simdjson_result_base.h for arm64: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for arm64 */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for arm64 */ +/* including simdjson/generic/numberparsing.h for arm64: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for arm64 */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace arm64 { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for arm64 */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for arm64: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for arm64 */ +/* end file simdjson/generic/amalgamated.h for arm64 */ +/* including simdjson/arm64/end.h: #include "simdjson/arm64/end.h" */ +/* begin file simdjson/arm64/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#undef SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT +/* undefining SIMDJSON_IMPLEMENTATION from "arm64" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/arm64/end.h */ + +#endif // SIMDJSON_ARM64_H +/* end file simdjson/arm64.h */ +/* including simdjson/arm64/implementation.h: #include */ +/* begin file simdjson/arm64/implementation.h */ +#ifndef SIMDJSON_ARM64_IMPLEMENTATION_H +#define SIMDJSON_ARM64_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation("arm64", "ARM NEON", internal::instruction_set::NEON) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_IMPLEMENTATION_H +/* end file simdjson/arm64/implementation.h */ + +/* including simdjson/arm64/begin.h: #include */ +/* begin file simdjson/arm64/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "arm64" */ +#define SIMDJSON_IMPLEMENTATION arm64 +/* including simdjson/arm64/base.h: #include "simdjson/arm64/base.h" */ +/* begin file simdjson/arm64/base.h */ +#ifndef SIMDJSON_ARM64_BASE_H +#define SIMDJSON_ARM64_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Implementation for NEON (ARMv8). + */ +namespace arm64 { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_BASE_H +/* end file simdjson/arm64/base.h */ +/* including simdjson/arm64/intrinsics.h: #include "simdjson/arm64/intrinsics.h" */ +/* begin file simdjson/arm64/intrinsics.h */ +#ifndef SIMDJSON_ARM64_INTRINSICS_H +#define SIMDJSON_ARM64_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This should be the correct header whether +// you use visual studio or other compilers. +#include + +static_assert(sizeof(uint8x16_t) <= simdjson::SIMDJSON_PADDING, "insufficient padding for arm64"); + +#endif // SIMDJSON_ARM64_INTRINSICS_H +/* end file simdjson/arm64/intrinsics.h */ +/* including simdjson/arm64/bitmanipulation.h: #include "simdjson/arm64/bitmanipulation.h" */ +/* begin file simdjson/arm64/bitmanipulation.h */ +#ifndef SIMDJSON_ARM64_BITMANIPULATION_H +#define SIMDJSON_ARM64_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int count_ones(uint64_t input_num) { + return vaddv_u8(vcnt_u8(vcreate_u8(input_num))); +} + + +#if defined(__GNUC__) // catches clang and gcc +/** + * ARM has a fast 64-bit "bit reversal function" that is handy. However, + * it is not generally available as an intrinsic function under Visual + * Studio (though this might be changing). Even under clang/gcc, we + * apparently need to invoke inline assembly. + */ +/* + * We use SIMDJSON_PREFER_REVERSE_BITS as a hint that algorithms that + * work well with bit reversal may use it. + */ +#define SIMDJSON_PREFER_REVERSE_BITS 1 + +/* reverse the bits */ +simdjson_inline uint64_t reverse_bits(uint64_t input_num) { + uint64_t rev_bits; + __asm("rbit %0, %1" : "=r"(rev_bits) : "r"(input_num)); + return rev_bits; +} + +/** + * Flips bit at index 63 - lz. Thus if you have 'leading_zeroes' leading zeroes, + * then this will set to zero the leading bit. It is possible for leading_zeroes to be + * greating or equal to 63 in which case we trigger undefined behavior, but the output + * of such undefined behavior is never used. + **/ +SIMDJSON_NO_SANITIZE_UNDEFINED +simdjson_inline uint64_t zero_leading_bit(uint64_t rev_bits, int leading_zeroes) { + return rev_bits ^ (uint64_t(0x8000000000000000) >> leading_zeroes); +} + +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, uint64_t *result) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + *result = value1 + value2; + return *result < value1; +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_BITMANIPULATION_H +/* end file simdjson/arm64/bitmanipulation.h */ +/* including simdjson/arm64/bitmask.h: #include "simdjson/arm64/bitmask.h" */ +/* begin file simdjson/arm64/bitmask.h */ +#ifndef SIMDJSON_ARM64_BITMASK_H +#define SIMDJSON_ARM64_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(uint64_t bitmask) { + ///////////// + // We could do this with PMULL, but it is apparently slow. + // + //#ifdef __ARM_FEATURE_CRYPTO // some ARM processors lack this extension + //return vmull_p64(-1ULL, bitmask); + //#else + // Analysis by @sebpop: + // When diffing the assembly for src/stage1_find_marks.cpp I see that the eors are all spread out + // in between other vector code, so effectively the extra cycles of the sequence do not matter + // because the GPR units are idle otherwise and the critical path is on the FP side. + // Also the PMULL requires two extra fmovs: GPR->FP (3 cycles in N1, 5 cycles in A72 ) + // and FP->GPR (2 cycles on N1 and 5 cycles on A72.) + /////////// + bitmask ^= bitmask << 1; + bitmask ^= bitmask << 2; + bitmask ^= bitmask << 4; + bitmask ^= bitmask << 8; + bitmask ^= bitmask << 16; + bitmask ^= bitmask << 32; + return bitmask; +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif +/* end file simdjson/arm64/bitmask.h */ +/* including simdjson/arm64/numberparsing_defs.h: #include "simdjson/arm64/numberparsing_defs.h" */ +/* begin file simdjson/arm64/numberparsing_defs.h */ +#ifndef SIMDJSON_ARM64_NUMBERPARSING_DEFS_H +#define SIMDJSON_ARM64_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#if _M_ARM64 +// __umulh requires intrin.h +#include +#endif // _M_ARM64 + +namespace simdjson { +namespace arm64 { +namespace numberparsing { + +// we don't have SSE, so let us use a scalar function +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + uint64_t val; + std::memcpy(&val, chars, sizeof(uint64_t)); + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace arm64 +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_ARM64_NUMBERPARSING_DEFS_H +/* end file simdjson/arm64/numberparsing_defs.h */ +/* including simdjson/arm64/simd.h: #include "simdjson/arm64/simd.h" */ +/* begin file simdjson/arm64/simd.h */ +#ifndef SIMDJSON_ARM64_SIMD_H +#define SIMDJSON_ARM64_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace simd { + +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO +namespace { +// Start of private section with Visual Studio workaround + + +#ifndef simdjson_make_uint8x16_t +#define simdjson_make_uint8x16_t(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, \ + x13, x14, x15, x16) \ + ([=]() { \ + uint8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8, \ + x9, x10, x11, x12, x13, x14, x15, x16}; \ + return vld1q_u8(array); \ + }()) +#endif +#ifndef simdjson_make_int8x16_t +#define simdjson_make_int8x16_t(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, \ + x13, x14, x15, x16) \ + ([=]() { \ + int8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8, \ + x9, x10, x11, x12, x13, x14, x15, x16}; \ + return vld1q_s8(array); \ + }()) +#endif + +#ifndef simdjson_make_uint8x8_t +#define simdjson_make_uint8x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + uint8_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1_u8(array); \ + }()) +#endif +#ifndef simdjson_make_int8x8_t +#define simdjson_make_int8x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + int8_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1_s8(array); \ + }()) +#endif +#ifndef simdjson_make_uint16x8_t +#define simdjson_make_uint16x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + uint16_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1q_u16(array); \ + }()) +#endif +#ifndef simdjson_make_int16x8_t +#define simdjson_make_int16x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + int16_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1q_s16(array); \ + }()) +#endif + +// End of private section with Visual Studio workaround +} // namespace +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO + + + template + struct simd8; + + // + // Base class of simd8 and simd8, both of which use uint8x16_t internally. + // + template> + struct base_u8 { + uint8x16_t value; + static const int SIZE = sizeof(value); + + // Conversion from/to SIMD register + simdjson_inline base_u8(const uint8x16_t _value) : value(_value) {} + simdjson_inline operator const uint8x16_t&() const { return this->value; } + simdjson_inline operator uint8x16_t&() { return this->value; } + + // Bit operations + simdjson_inline simd8 operator|(const simd8 other) const { return vorrq_u8(*this, other); } + simdjson_inline simd8 operator&(const simd8 other) const { return vandq_u8(*this, other); } + simdjson_inline simd8 operator^(const simd8 other) const { return veorq_u8(*this, other); } + simdjson_inline simd8 bit_andnot(const simd8 other) const { return vbicq_u8(*this, other); } + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + simdjson_inline simd8& operator|=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline simd8& operator&=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline simd8& operator^=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast ^ other; return *this_cast; } + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return vceqq_u8(lhs, rhs); } + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return vextq_u8(prev_chunk, *this, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base_u8 { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + static simdjson_inline simd8 splat(bool _value) { return vmovq_n_u8(uint8_t(-(!!_value))); } + + simdjson_inline simd8(const uint8x16_t _value) : base_u8(_value) {} + // False constructor + simdjson_inline simd8() : simd8(vdupq_n_u8(0)) {} + // Splat constructor + simdjson_inline simd8(bool _value) : simd8(splat(_value)) {} + + // We return uint32_t instead of uint16_t because that seems to be more efficient for most + // purposes (cutting it down to uint16_t costs performance in some compilers). + simdjson_inline uint32_t to_bitmask() const { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + const uint8x16_t bit_mask = simdjson_make_uint8x16_t(0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80); +#else + const uint8x16_t bit_mask = {0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; +#endif + auto minput = *this & bit_mask; + uint8x16_t tmp = vpaddq_u8(minput, minput); + tmp = vpaddq_u8(tmp, tmp); + tmp = vpaddq_u8(tmp, tmp); + return vgetq_lane_u16(vreinterpretq_u16_u8(tmp), 0); + } + simdjson_inline bool any() const { return vmaxvq_u8(*this) != 0; } + }; + + // Unsigned bytes + template<> + struct simd8: base_u8 { + static simdjson_inline uint8x16_t splat(uint8_t _value) { return vmovq_n_u8(_value); } + static simdjson_inline uint8x16_t zero() { return vdupq_n_u8(0); } + static simdjson_inline uint8x16_t load(const uint8_t* values) { return vld1q_u8(values); } + + simdjson_inline simd8(const uint8x16_t _value) : base_u8(_value) {} + // Zero constructor + simdjson_inline simd8() : simd8(zero()) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[16]) : simd8(load(values)) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Member-by-member initialization +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(simdjson_make_uint8x16_t( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} +#else + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(uint8x16_t{ + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + }) {} +#endif + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Store to array + simdjson_inline void store(uint8_t dst[16]) const { return vst1q_u8(dst, *this); } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return vqaddq_u8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return vqsubq_u8(*this, other); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return vaddq_u8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return vsubq_u8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *this; } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *this; } + + // Order-specific operations + simdjson_inline uint8_t max_val() const { return vmaxvq_u8(*this); } + simdjson_inline uint8_t min_val() const { return vminvq_u8(*this); } + simdjson_inline simd8 max_val(const simd8 other) const { return vmaxq_u8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return vminq_u8(*this, other); } + simdjson_inline simd8 operator<=(const simd8 other) const { return vcleq_u8(*this, other); } + simdjson_inline simd8 operator>=(const simd8 other) const { return vcgeq_u8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return vcltq_u8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return vcgtq_u8(*this, other); } + // Same as >, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's. + simdjson_inline simd8 gt_bits(const simd8 other) const { return simd8(*this > other); } + // Same as <, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's. + simdjson_inline simd8 lt_bits(const simd8 other) const { return simd8(*this < other); } + + // Bit-specific operations + simdjson_inline simd8 any_bits_set(simd8 bits) const { return vtstq_u8(*this, bits); } + simdjson_inline bool any_bits_set_anywhere() const { return this->max_val() != 0; } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return (*this & bits).any_bits_set_anywhere(); } + template + simdjson_inline simd8 shr() const { return vshrq_n_u8(*this, N); } + template + simdjson_inline simd8 shl() const { return vshlq_n_u8(*this, N); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return lookup_table.apply_lookup_16_to(*this); + } + + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint16_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + uint64x2_t shufmask64 = {thintable_epi8[mask1], thintable_epi8[mask2]}; + uint8x16_t shufmask = vreinterpretq_u8_u64(shufmask64); + // we increment by 0x08 the second half of the mask +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + uint8x16_t inc = simdjson_make_uint8x16_t(0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08); +#else + uint8x16_t inc = {0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}; +#endif + shufmask = vaddq_u8(shufmask, inc); + // this is the version "nearly pruned" + uint8x16_t pruned = vqtbl1q_u8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + uint8x16_t compactmask = vld1q_u8(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + uint8x16_t answer = vqtbl1q_u8(pruned, compactmask); + vst1q_u8(reinterpret_cast(output), answer); + } + + // Copies all bytes corresponding to a 0 in the low half of the mask (interpreted as a + // bitset) to output1, then those corresponding to a 0 in the high half to output2. + template + simdjson_inline void compress_halves(uint16_t mask, L *output1, L *output2) const { + using internal::thintable_epi8; + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + uint8x8_t compactmask1 = vcreate_u8(thintable_epi8[mask1]); + uint8x8_t compactmask2 = vcreate_u8(thintable_epi8[mask2]); + // we increment by 0x08 the second half of the mask +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + uint8x8_t inc = simdjson_make_uint8x8_t(0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08); +#else + uint8x8_t inc = {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}; +#endif + compactmask2 = vadd_u8(compactmask2, inc); + // store each result (with the second store possibly overlapping the first) + vst1_u8((uint8_t*)output1, vqtbl1_u8(*this, compactmask1)); + vst1_u8((uint8_t*)output2, vqtbl1_u8(*this, compactmask2)); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + + template + simdjson_inline simd8 apply_lookup_16_to(const simd8 original) { + return vqtbl1q_u8(*this, simd8(original)); + } + }; + + // Signed bytes + template<> + struct simd8 { + int8x16_t value; + + static simdjson_inline simd8 splat(int8_t _value) { return vmovq_n_s8(_value); } + static simdjson_inline simd8 zero() { return vdupq_n_s8(0); } + static simdjson_inline simd8 load(const int8_t values[16]) { return vld1q_s8(values); } + + // Conversion from/to SIMD register + simdjson_inline simd8(const int8x16_t _value) : value{_value} {} + simdjson_inline operator const int8x16_t&() const { return this->value; } + simdjson_inline operator int8x16_t&() { return this->value; } + + // Zero constructor + simdjson_inline simd8() : simd8(zero()) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(simdjson_make_int8x16_t( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} +#else + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(int8x16_t{ + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + }) {} +#endif + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Store to array + simdjson_inline void store(int8_t dst[16]) const { return vst1q_s8(dst, *this); } + + // Explicit conversion to/from unsigned + // + // Under Visual Studio/ARM64 uint8x16_t and int8x16_t are apparently the same type. + // In theory, we could check this occurrence with std::same_as and std::enabled_if but it is C++14 + // and relatively ugly and hard to read. +#ifndef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline explicit simd8(const uint8x16_t other): simd8(vreinterpretq_s8_u8(other)) {} +#endif + simdjson_inline explicit operator simd8() const { return vreinterpretq_u8_s8(this->value); } + + // Math + simdjson_inline simd8 operator+(const simd8 other) const { return vaddq_s8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return vsubq_s8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *this; } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *this; } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return vmaxq_s8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return vminq_s8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return vcgtq_s8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return vcltq_s8(*this, other); } + simdjson_inline simd8 operator==(const simd8 other) const { return vceqq_s8(*this, other); } + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return vextq_s8(prev_chunk, *this, 16 - N); + } + + // Perform a lookup assuming no value is larger than 16 + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return lookup_table.apply_lookup_16_to(*this); + } + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + + template + simdjson_inline simd8 apply_lookup_16_to(const simd8 original) { + return vqtbl1q_s8(*this, simd8(original)); + } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "ARM kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + uint64_t popcounts = vget_lane_u64(vreinterpret_u64_u8(vcnt_u8(vcreate_u8(~mask))), 0); + // compute the prefix sum of the popcounts of each byte + uint64_t offsets = popcounts * 0x0101010101010101; + this->chunks[0].compress_halves(uint16_t(mask), output, &output[popcounts & 0xFF]); + this->chunks[1].compress_halves(uint16_t(mask >> 16), &output[(offsets >> 8) & 0xFF], &output[(offsets >> 16) & 0xFF]); + this->chunks[2].compress_halves(uint16_t(mask >> 32), &output[(offsets >> 24) & 0xFF], &output[(offsets >> 32) & 0xFF]); + this->chunks[3].compress_halves(uint16_t(mask >> 48), &output[(offsets >> 40) & 0xFF], &output[(offsets >> 48) & 0xFF]); + return offsets >> 56; + } + + simdjson_inline uint64_t to_bitmask() const { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + const uint8x16_t bit_mask = simdjson_make_uint8x16_t( + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 + ); +#else + const uint8x16_t bit_mask = { + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 + }; +#endif + // Add each of the elements next to each other, successively, to stuff each 8 byte mask into one. + uint8x16_t sum0 = vpaddq_u8(this->chunks[0] & bit_mask, this->chunks[1] & bit_mask); + uint8x16_t sum1 = vpaddq_u8(this->chunks[2] & bit_mask, this->chunks[3] & bit_mask); + sum0 = vpaddq_u8(sum0, sum1); + sum0 = vpaddq_u8(sum0, sum0); + return vgetq_lane_u64(vreinterpretq_u64_u8(sum0), 0); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_SIMD_H +/* end file simdjson/arm64/simd.h */ +/* including simdjson/arm64/stringparsing_defs.h: #include "simdjson/arm64/stringparsing_defs.h" */ +/* begin file simdjson/arm64/stringparsing_defs.h */ +#ifndef SIMDJSON_ARM64_STRINGPARSING_DEFS_H +#define SIMDJSON_ARM64_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + sizeof(v0)); + v0.store(dst); + v1.store(dst + sizeof(v0)); + + // Getting a 64-bit bitmask is much cheaper than multiple 16-bit bitmasks on ARM; therefore, we + // smash them together into a 64-byte mask and get the bitmask from there. + uint64_t bs_and_quote = simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_STRINGPARSING_DEFS_H +/* end file simdjson/arm64/stringparsing_defs.h */ + +#define SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT 1 +/* end file simdjson/arm64/begin.h */ +/* including generic/amalgamated.h for arm64: #include */ +/* begin file generic/amalgamated.h for arm64 */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_SRC_GENERIC_DEPENDENCIES_H) +#error generic/dependencies.h must be included before generic/amalgamated.h! +#endif + +/* including generic/base.h for arm64: #include */ +/* begin file generic/base.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +struct json_character_block; + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_BASE_H +/* end file generic/base.h for arm64 */ +/* including generic/dom_parser_implementation.h for arm64: #include */ +/* begin file generic/dom_parser_implementation.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// Interface a dom parser implementation must fulfill +namespace simdjson { +namespace arm64 { +namespace { + +simdjson_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3); +simdjson_inline bool is_ascii(const simd8x64& input); + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file generic/dom_parser_implementation.h for arm64 */ +/* including generic/json_character_block.h for arm64: #include */ +/* begin file generic/json_character_block.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +struct json_character_block { + static simdjson_inline json_character_block classify(const simd::simd8x64& in); + + simdjson_inline uint64_t whitespace() const noexcept { return _whitespace; } + simdjson_inline uint64_t op() const noexcept { return _op; } + simdjson_inline uint64_t scalar() const noexcept { return ~(op() | whitespace()); } + + uint64_t _whitespace; + uint64_t _op; +}; + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H +/* end file generic/json_character_block.h for arm64 */ +/* end file generic/amalgamated.h for arm64 */ +/* including generic/stage1/amalgamated.h for arm64: #include */ +/* begin file generic/stage1/amalgamated.h for arm64 */ +// Stuff other things depend on +/* including generic/stage1/base.h for arm64: #include */ +/* begin file generic/stage1/base.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage1 { + +class bit_indexer; +template +struct buf_block_reader; +struct json_block; +class json_minifier; +class json_scanner; +struct json_string_block; +class json_string_scanner; +class json_structural_indexer; + +} // namespace stage1 + +namespace utf8_validation { +struct utf8_checker; +} // namespace utf8_validation + +using utf8_validation::utf8_checker; + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_BASE_H +/* end file generic/stage1/base.h for arm64 */ +/* including generic/stage1/buf_block_reader.h for arm64: #include */ +/* begin file generic/stage1/buf_block_reader.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage1 { + +// Walks through a buffer in block-sized increments, loading the last part with spaces +template +struct buf_block_reader { +public: + simdjson_inline buf_block_reader(const uint8_t *_buf, size_t _len); + simdjson_inline size_t block_index(); + simdjson_inline bool has_full_block() const; + simdjson_inline const uint8_t *full_block() const; + /** + * Get the last block, padded with spaces. + * + * There will always be a last block, with at least 1 byte, unless len == 0 (in which case this + * function fills the buffer with spaces and returns 0. In particular, if len == STEP_SIZE there + * will be 0 full_blocks and 1 remainder block with STEP_SIZE bytes and no spaces for padding. + * + * @return the number of effective characters in the last block. + */ + simdjson_inline size_t get_remainder(uint8_t *dst) const; + simdjson_inline void advance(); +private: + const uint8_t *buf; + const size_t len; + const size_t lenminusstep; + size_t idx; +}; + +// Routines to print masks and text for debugging bitmask operations +simdjson_unused static char * format_input_text_64(const uint8_t *text) { + static char buf[sizeof(simd8x64) + 1]; + for (size_t i=0; i); i++) { + buf[i] = int8_t(text[i]) < ' ' ? '_' : int8_t(text[i]); + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +// Routines to print masks and text for debugging bitmask operations +simdjson_unused static char * format_input_text(const simd8x64& in) { + static char buf[sizeof(simd8x64) + 1]; + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] < ' ') { buf[i] = '_'; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdjson_unused static char * format_input_text(const simd8x64& in, uint64_t mask) { + static char buf[sizeof(simd8x64) + 1]; + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] <= ' ') { buf[i] = '_'; } + if (!(mask & (size_t(1) << i))) { buf[i] = ' '; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdjson_unused static char * format_mask(uint64_t mask) { + static char buf[sizeof(simd8x64) + 1]; + for (size_t i=0; i<64; i++) { + buf[i] = (mask & (size_t(1) << i)) ? 'X' : ' '; + } + buf[64] = '\0'; + return buf; +} + +template +simdjson_inline buf_block_reader::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {} + +template +simdjson_inline size_t buf_block_reader::block_index() { return idx; } + +template +simdjson_inline bool buf_block_reader::has_full_block() const { + return idx < lenminusstep; +} + +template +simdjson_inline const uint8_t *buf_block_reader::full_block() const { + return &buf[idx]; +} + +template +simdjson_inline size_t buf_block_reader::get_remainder(uint8_t *dst) const { + if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers + std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once. + std::memcpy(dst, buf + idx, len - idx); + return len - idx; +} + +template +simdjson_inline void buf_block_reader::advance() { + idx += STEP_SIZE; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H +/* end file generic/stage1/buf_block_reader.h for arm64 */ +/* including generic/stage1/json_escape_scanner.h for arm64: #include */ +/* begin file generic/stage1/json_escape_scanner.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_ESCAPE_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_ESCAPE_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage1 { + +/** + * Scans for escape characters in JSON, taking care with multiple backslashes (\\n vs. \n). + */ +struct json_escape_scanner { + /** The actual escape characters (the backslashes themselves). */ + uint64_t next_is_escaped = 0ULL; + + struct escaped_and_escape { + /** + * Mask of escaped characters. + * + * ``` + * \n \\n \\\n \\\\n \ + * 0100100010100101000 + * n \ \ n \ \ + * ``` + */ + uint64_t escaped; + /** + * Mask of escape characters. + * + * ``` + * \n \\n \\\n \\\\n \ + * 1001000101001010001 + * \ \ \ \ \ \ \ + * ``` + */ + uint64_t escape; + }; + + /** + * Get a mask of both escape and escaped characters (the characters following a backslash). + * + * @param potential_escape A mask of the character that can escape others (but could be + * escaped itself). e.g. block.eq('\\') + */ + simdjson_really_inline escaped_and_escape next(uint64_t backslash) noexcept { + +#if !SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT + if (!backslash) { return {next_escaped_without_backslashes(), 0}; } +#endif + + // | | Mask (shows characters instead of 1's) | Depth | Instructions | + // |--------------------------------|----------------------------------------|-------|---------------------| + // | string | `\\n_\\\n___\\\n___\\\\___\\\\__\\\` | | | + // | | ` even odd even odd odd` | | | + // | potential_escape | ` \ \\\ \\\ \\\\ \\\\ \\\` | 1 | 1 (backslash & ~first_is_escaped) + // | escape_and_terminal_code | ` \n \ \n \ \n \ \ \ \ \ \` | 5 | 5 (next_escape_and_terminal_code()) + // | escaped | `\ \ n \ n \ \ \ \ \ ` X | 6 | 7 (escape_and_terminal_code ^ (potential_escape | first_is_escaped)) + // | escape | ` \ \ \ \ \ \ \ \ \ \` | 6 | 8 (escape_and_terminal_code & backslash) + // | first_is_escaped | `\ ` | 7 (*) | 9 (escape >> 63) () + // (*) this is not needed until the next iteration + uint64_t escape_and_terminal_code = next_escape_and_terminal_code(backslash & ~this->next_is_escaped); + uint64_t escaped = escape_and_terminal_code ^ (backslash | this->next_is_escaped); + uint64_t escape = escape_and_terminal_code & backslash; + this->next_is_escaped = escape >> 63; + return {escaped, escape}; + } + +private: + static constexpr const uint64_t ODD_BITS = 0xAAAAAAAAAAAAAAAAULL; + + simdjson_really_inline uint64_t next_escaped_without_backslashes() noexcept { + uint64_t escaped = this->next_is_escaped; + this->next_is_escaped = 0; + return escaped; + } + + /** + * Returns a mask of the next escape characters (masking out escaped backslashes), along with + * any non-backslash escape codes. + * + * \n \\n \\\n \\\\n returns: + * \n \ \ \n \ \ + * 11 100 1011 10100 + * + * You are expected to mask out the first bit yourself if the previous block had a trailing + * escape. + * + * & the result with potential_escape to get just the escape characters. + * ^ the result with (potential_escape | first_is_escaped) to get escaped characters. + */ + static simdjson_really_inline uint64_t next_escape_and_terminal_code(uint64_t potential_escape) noexcept { + // If we were to just shift and mask out any odd bits, we'd actually get a *half* right answer: + // any even-aligned backslash runs would be correct! Odd-aligned backslash runs would be + // inverted (\\\ would be 010 instead of 101). + // + // ``` + // string: | ____\\\\_\\\\_____ | + // maybe_escaped | ODD | \ \ \ \ | + // even-aligned ^^^ ^^^^ odd-aligned + // ``` + // + // Taking that into account, our basic strategy is: + // + // 1. Use subtraction to produce a mask with 1's for even-aligned runs and 0's for + // odd-aligned runs. + // 2. XOR all odd bits, which masks out the odd bits in even-aligned runs, and brings IN the + // odd bits in odd-aligned runs. + // 3. & with backslash to clean up any stray bits. + // runs are set to 0, and then XORing with "odd": + // + // | | Mask (shows characters instead of 1's) | Instructions | + // |--------------------------------|----------------------------------------|---------------------| + // | string | `\\n_\\\n___\\\n___\\\\___\\\\__\\\` | + // | | ` even odd even odd odd` | + // | maybe_escaped | ` n \\n \\n \\\_ \\\_ \\` X | 1 (potential_escape << 1) + // | maybe_escaped_and_odd | ` \n_ \\n _ \\\n_ _ \\\__ _\\\_ \\\` | 1 (maybe_escaped | odd) + // | even_series_codes_and_odd | ` n_\\\ _ n_ _\\\\ _ _ ` | 1 (maybe_escaped_and_odd - potential_escape) + // | escape_and_terminal_code | ` \n \ \n \ \n \ \ \ \ \ \` | 1 (^ odd) + // + + // Escaped characters are characters following an escape. + uint64_t maybe_escaped = potential_escape << 1; + + // To distinguish odd from even escape sequences, therefore, we turn on any *starting* + // escapes that are on an odd byte. (We actually bring in all odd bits, for speed.) + // - Odd runs of backslashes are 0000, and the code at the end ("n" in \n or \\n) is 1. + // - Odd runs of backslashes are 1111, and the code at the end ("n" in \n or \\n) is 0. + // - All other odd bytes are 1, and even bytes are 0. + uint64_t maybe_escaped_and_odd_bits = maybe_escaped | ODD_BITS; + uint64_t even_series_codes_and_odd_bits = maybe_escaped_and_odd_bits - potential_escape; + + // Now we flip all odd bytes back with xor. This: + // - Makes odd runs of backslashes go from 0000 to 1010 + // - Makes even runs of backslashes go from 1111 to 1010 + // - Sets actually-escaped codes to 1 (the n in \n and \\n: \n = 11, \\n = 100) + // - Resets all other bytes to 0 + return even_series_codes_and_odd_bits ^ ODD_BITS; + } +}; + +} // namespace stage1 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H +/* end file generic/stage1/json_escape_scanner.h for arm64 */ +/* including generic/stage1/json_string_scanner.h for arm64: #include */ +/* begin file generic/stage1/json_string_scanner.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage1 { + +struct json_string_block { + // We spell out the constructors in the hope of resolving inlining issues with Visual Studio 2017 + simdjson_really_inline json_string_block(uint64_t escaped, uint64_t quote, uint64_t in_string) : + _escaped(escaped), _quote(quote), _in_string(in_string) {} + + // Escaped characters (characters following an escape() character) + simdjson_really_inline uint64_t escaped() const { return _escaped; } + // Real (non-backslashed) quotes + simdjson_really_inline uint64_t quote() const { return _quote; } + // Only characters inside the string (not including the quotes) + simdjson_really_inline uint64_t string_content() const { return _in_string & ~_quote; } + // Return a mask of whether the given characters are inside a string (only works on non-quotes) + simdjson_really_inline uint64_t non_quote_inside_string(uint64_t mask) const { return mask & _in_string; } + // Return a mask of whether the given characters are inside a string (only works on non-quotes) + simdjson_really_inline uint64_t non_quote_outside_string(uint64_t mask) const { return mask & ~_in_string; } + // Tail of string (everything except the start quote) + simdjson_really_inline uint64_t string_tail() const { return _in_string ^ _quote; } + + // escaped characters (backslashed--does not include the hex characters after \u) + uint64_t _escaped; + // real quotes (non-escaped ones) + uint64_t _quote; + // string characters (includes start quote but not end quote) + uint64_t _in_string; +}; + +// Scans blocks for string characters, storing the state necessary to do so +class json_string_scanner { +public: + simdjson_really_inline json_string_block next(const simd::simd8x64& in); + // Returns either UNCLOSED_STRING or SUCCESS + simdjson_really_inline error_code finish(); + +private: + // Scans for escape characters + json_escape_scanner escape_scanner{}; + // Whether the last iteration was still inside a string (all 1's = true, all 0's = false). + uint64_t prev_in_string = 0ULL; +}; + +// +// Return a mask of all string characters plus end quotes. +// +// prev_escaped is overflow saying whether the next character is escaped. +// prev_in_string is overflow saying whether we're still in a string. +// +// Backslash sequences outside of quotes will be detected in stage 2. +// +simdjson_really_inline json_string_block json_string_scanner::next(const simd::simd8x64& in) { + const uint64_t backslash = in.eq('\\'); + const uint64_t escaped = escape_scanner.next(backslash).escaped; + const uint64_t quote = in.eq('"') & ~escaped; + + // + // prefix_xor flips on bits inside the string (and flips off the end quote). + // + // Then we xor with prev_in_string: if we were in a string already, its effect is flipped + // (characters inside strings are outside, and characters outside strings are inside). + // + const uint64_t in_string = prefix_xor(quote) ^ prev_in_string; + + // + // Check if we're still in a string at the end of the box so the next block will know + // + prev_in_string = uint64_t(static_cast(in_string) >> 63); + + // Use ^ to turn the beginning quote off, and the end quote on. + + // We are returning a function-local object so either we get a move constructor + // or we get copy elision. + return json_string_block(escaped, quote, in_string); +} + +simdjson_really_inline error_code json_string_scanner::finish() { + if (prev_in_string) { + return UNCLOSED_STRING; + } + return SUCCESS; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H +/* end file generic/stage1/json_string_scanner.h for arm64 */ +/* including generic/stage1/utf8_lookup4_algorithm.h for arm64: #include */ +/* begin file generic/stage1/utf8_lookup4_algorithm.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace utf8_validation { + +using namespace simd; + + simdjson_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) +// Bit 1 = Too Long (ASCII followed by continuation) +// Bit 2 = Overlong 3-byte +// Bit 4 = Surrogate +// Bit 5 = Overlong 2-byte +// Bit 7 = Two Continuations + constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ + // 11______ 11______ + constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ + constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ + constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ + constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ + constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ + constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ + // 11110100 101_____ + // 11110101 1001____ + // 11110101 101_____ + // 1111011_ 1001____ + // 1111011_ 101_____ + // 11111___ 1001____ + // 11111___ 101_____ + constexpr const uint8_t TOO_LARGE_1000 = 1<<6; + // 11110101 1000____ + // 1111011_ 1000____ + // 11111___ 1000____ + constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + + const simd8 byte_1_high = prev1.shr<4>().lookup_16( + // 0_______ ________ + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + // 10______ ________ + TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, + // 1100____ ________ + TOO_SHORT | OVERLONG_2, + // 1101____ ________ + TOO_SHORT, + // 1110____ ________ + TOO_SHORT | OVERLONG_3 | SURROGATE, + // 1111____ ________ + TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + ); + constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . + const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( + // ____0000 ________ + CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, + // ____0001 ________ + CARRY | OVERLONG_2, + // ____001_ ________ + CARRY, + CARRY, + + // ____0100 ________ + CARRY | TOO_LARGE, + // ____0101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____011_ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + + // ____1___ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____1101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000 + ); + const simd8 byte_2_high = input.shr<4>().lookup_16( + // ________ 0_______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + simdjson_inline simd8 check_multibyte_lengths(const simd8 input, + const simd8 prev_input, const simd8 sc) { + simd8 prev2 = input.prev<2>(prev_input); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; + } + + // + // Return nonzero if there are incomplete multibyte characters at the end of the block: + // e.g. if there is a 4-byte character, but it's 3 bytes from the end. + // + simdjson_inline simd8 is_incomplete(const simd8 input) { + // If the previous input's last 3 bytes match this, they're too short (they ended at EOF): + // ... 1111____ 111_____ 11______ +#if SIMDJSON_IMPLEMENTATION_ICELAKE + static const uint8_t max_array[64] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1 + }; +#else + static const uint8_t max_array[32] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1 + }; +#endif + const simd8 max_value(&max_array[sizeof(max_array)-sizeof(simd8)]); + return input.gt_bits(max_value); + } + + struct utf8_checker { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; + // The last input we received + simd8 prev_input_block; + // Whether the last input we received was incomplete (used for ASCII fast path) + simd8 prev_incomplete; + + // + // Check whether the current bytes are valid UTF-8. + // + simdjson_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + simd8 sc = check_special_cases(input, prev1); + this->error |= check_multibyte_lengths(input, prev_input, sc); + } + + // The only problem that can happen at EOF is that a multibyte character is too short + // or a byte value too large in the last bytes: check_special_cases only checks for bytes + // too large in the first of two bytes. + simdjson_inline void check_eof() { + // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't + // possibly finish them. + this->error |= this->prev_incomplete; + } + + simdjson_inline void check_next_input(const simd8x64& input) { + if(simdjson_likely(is_ascii(input))) { + this->error |= this->prev_incomplete; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 1) + ||(simd8x64::NUM_CHUNKS == 2) + || (simd8x64::NUM_CHUNKS == 4), + "We support one, two or four chunks per 64-byte block."); + SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 1) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + } else SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + this->prev_incomplete = is_incomplete(input.chunks[simd8x64::NUM_CHUNKS-1]); + this->prev_input_block = input.chunks[simd8x64::NUM_CHUNKS-1]; + } + } + // do not forget to call check_eof! + simdjson_inline error_code errors() { + return this->error.any_bits_set_anywhere() ? error_code::UTF8_ERROR : error_code::SUCCESS; + } + + }; // struct utf8_checker +} // namespace utf8_validation + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H +/* end file generic/stage1/utf8_lookup4_algorithm.h for arm64 */ +/* including generic/stage1/json_scanner.h for arm64: #include */ +/* begin file generic/stage1/json_scanner.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage1 { + +/** + * A block of scanned json, with information on operators and scalars. + * + * We seek to identify pseudo-structural characters. Anything that is inside + * a string must be omitted (hence & ~_string.string_tail()). + * Otherwise, pseudo-structural characters come in two forms. + * 1. We have the structural characters ([,],{,},:, comma). The + * term 'structural character' is from the JSON RFC. + * 2. We have the 'scalar pseudo-structural characters'. + * Scalars are quotes, and any character except structural characters and white space. + * + * To identify the scalar pseudo-structural characters, we must look at what comes + * before them: it must be a space, a quote or a structural characters. + * Starting with simdjson v0.3, we identify them by + * negation: we identify everything that is followed by a non-quote scalar, + * and we negate that. Whatever remains must be a 'scalar pseudo-structural character'. + */ +struct json_block { +public: + // We spell out the constructors in the hope of resolving inlining issues with Visual Studio 2017 + simdjson_inline json_block(json_string_block&& string, json_character_block characters, uint64_t follows_potential_nonquote_scalar) : + _string(std::move(string)), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {} + simdjson_inline json_block(json_string_block string, json_character_block characters, uint64_t follows_potential_nonquote_scalar) : + _string(string), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {} + + /** + * The start of structurals. + * In simdjson prior to v0.3, these were called the pseudo-structural characters. + **/ + simdjson_inline uint64_t structural_start() const noexcept { return potential_structural_start() & ~_string.string_tail(); } + /** All JSON whitespace (i.e. not in a string) */ + simdjson_inline uint64_t whitespace() const noexcept { return non_quote_outside_string(_characters.whitespace()); } + + // Helpers + + /** Whether the given characters are inside a string (only works on non-quotes) */ + simdjson_inline uint64_t non_quote_inside_string(uint64_t mask) const noexcept { return _string.non_quote_inside_string(mask); } + /** Whether the given characters are outside a string (only works on non-quotes) */ + simdjson_inline uint64_t non_quote_outside_string(uint64_t mask) const noexcept { return _string.non_quote_outside_string(mask); } + + // string and escape characters + json_string_block _string; + // whitespace, structural characters ('operators'), scalars + json_character_block _characters; + // whether the previous character was a scalar + uint64_t _follows_potential_nonquote_scalar; +private: + // Potential structurals (i.e. disregarding strings) + + /** + * structural elements ([,],{,},:, comma) plus scalar starts like 123, true and "abc". + * They may reside inside a string. + **/ + simdjson_inline uint64_t potential_structural_start() const noexcept { return _characters.op() | potential_scalar_start(); } + /** + * The start of non-operator runs, like 123, true and "abc". + * It main reside inside a string. + **/ + simdjson_inline uint64_t potential_scalar_start() const noexcept { + // The term "scalar" refers to anything except structural characters and white space + // (so letters, numbers, quotes). + // Whenever it is preceded by something that is not a structural element ({,},[,],:, ") nor a white-space + // then we know that it is irrelevant structurally. + return _characters.scalar() & ~follows_potential_scalar(); + } + /** + * Whether the given character is immediately after a non-operator like 123, true. + * The characters following a quote are not included. + */ + simdjson_inline uint64_t follows_potential_scalar() const noexcept { + // _follows_potential_nonquote_scalar: is defined as marking any character that follows a character + // that is not a structural element ({,},[,],:, comma) nor a quote (") and that is not a + // white space. + // It is understood that within quoted region, anything at all could be marked (irrelevant). + return _follows_potential_nonquote_scalar; + } +}; + +/** + * Scans JSON for important bits: structural characters or 'operators', strings, and scalars. + * + * The scanner starts by calculating two distinct things: + * - string characters (taking \" into account) + * - structural characters or 'operators' ([]{},:, comma) + * and scalars (runs of non-operators like 123, true and "abc") + * + * To minimize data dependency (a key component of the scanner's speed), it finds these in parallel: + * in particular, the operator/scalar bit will find plenty of things that are actually part of + * strings. When we're done, json_block will fuse the two together by masking out tokens that are + * part of a string. + */ +class json_scanner { +public: + json_scanner() = default; + simdjson_inline json_block next(const simd::simd8x64& in); + // Returns either UNCLOSED_STRING or SUCCESS + simdjson_inline error_code finish(); + +private: + // Whether the last character of the previous iteration is part of a scalar token + // (anything except whitespace or a structural character/'operator'). + uint64_t prev_scalar = 0ULL; + json_string_scanner string_scanner{}; +}; + + +// +// Check if the current character immediately follows a matching character. +// +// For example, this checks for quotes with backslashes in front of them: +// +// const uint64_t backslashed_quote = in.eq('"') & immediately_follows(in.eq('\'), prev_backslash); +// +simdjson_inline uint64_t follows(const uint64_t match, uint64_t &overflow) { + const uint64_t result = match << 1 | overflow; + overflow = match >> 63; + return result; +} + +simdjson_inline json_block json_scanner::next(const simd::simd8x64& in) { + json_string_block strings = string_scanner.next(in); + // identifies the white-space and the structural characters + json_character_block characters = json_character_block::classify(in); + // The term "scalar" refers to anything except structural characters and white space + // (so letters, numbers, quotes). + // We want follows_scalar to mark anything that follows a non-quote scalar (so letters and numbers). + // + // A terminal quote should either be followed by a structural character (comma, brace, bracket, colon) + // or nothing. However, we still want ' "a string"true ' to mark the 't' of 'true' as a potential + // pseudo-structural character just like we would if we had ' "a string" true '; otherwise we + // may need to add an extra check when parsing strings. + // + // Performance: there are many ways to skin this cat. + const uint64_t nonquote_scalar = characters.scalar() & ~strings.quote(); + uint64_t follows_nonquote_scalar = follows(nonquote_scalar, prev_scalar); + // We are returning a function-local object so either we get a move constructor + // or we get copy elision. + return json_block( + strings,// strings is a function-local object so either it moves or the copy is elided. + characters, + follows_nonquote_scalar + ); +} + +simdjson_inline error_code json_scanner::finish() { + return string_scanner.finish(); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H +/* end file generic/stage1/json_scanner.h for arm64 */ + +// All other declarations +/* including generic/stage1/find_next_document_index.h for arm64: #include */ +/* begin file generic/stage1/find_next_document_index.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage1 { + +/** + * This algorithm is used to quickly identify the last structural position that + * makes up a complete document. + * + * It does this by going backwards and finding the last *document boundary* (a + * place where one value follows another without a comma between them). If the + * last document (the characters after the boundary) has an equal number of + * start and end brackets, it is considered complete. + * + * Simply put, we iterate over the structural characters, starting from + * the end. We consider that we found the end of a JSON document when the + * first element of the pair is NOT one of these characters: '{' '[' ':' ',' + * and when the second element is NOT one of these characters: '}' ']' ':' ','. + * + * This simple comparison works most of the time, but it does not cover cases + * where the batch's structural indexes contain a perfect amount of documents. + * In such a case, we do not have access to the structural index which follows + * the last document, therefore, we do not have access to the second element in + * the pair, and that means we cannot identify the last document. To fix this + * issue, we keep a count of the open and closed curly/square braces we found + * while searching for the pair. When we find a pair AND the count of open and + * closed curly/square braces is the same, we know that we just passed a + * complete document, therefore the last json buffer location is the end of the + * batch. + */ +simdjson_inline uint32_t find_next_document_index(dom_parser_implementation &parser) { + // Variant: do not count separately, just figure out depth + if(parser.n_structural_indexes == 0) { return 0; } + auto arr_cnt = 0; + auto obj_cnt = 0; + for (auto i = parser.n_structural_indexes - 1; i > 0; i--) { + auto idxb = parser.structural_indexes[i]; + switch (parser.buf[idxb]) { + case ':': + case ',': + continue; + case '}': + obj_cnt--; + continue; + case ']': + arr_cnt--; + continue; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + auto idxa = parser.structural_indexes[i - 1]; + switch (parser.buf[idxa]) { + case '{': + case '[': + case ':': + case ',': + continue; + } + // Last document is complete, so the next document will appear after! + if (!arr_cnt && !obj_cnt) { + return parser.n_structural_indexes; + } + // Last document is incomplete; mark the document at i + 1 as the next one + return i; + } + // If we made it to the end, we want to finish counting to see if we have a full document. + switch (parser.buf[parser.structural_indexes[0]]) { + case '}': + obj_cnt--; + break; + case ']': + arr_cnt--; + break; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + if (!arr_cnt && !obj_cnt) { + // We have a complete document. + return parser.n_structural_indexes; + } + return 0; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H +/* end file generic/stage1/find_next_document_index.h for arm64 */ +/* including generic/stage1/json_minifier.h for arm64: #include */ +/* begin file generic/stage1/json_minifier.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses in stage1 +// It is intended to be included multiple times and compiled multiple times +// We assume the file in which it is included already includes +// "simdjson/stage1.h" (this simplifies amalgation) + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage1 { + +class json_minifier { +public: + template + static error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept; + +private: + simdjson_inline json_minifier(uint8_t *_dst) + : dst{_dst} + {} + template + simdjson_inline void step(const uint8_t *block_buf, buf_block_reader &reader) noexcept; + simdjson_inline void next(const simd::simd8x64& in, const json_block& block); + simdjson_inline error_code finish(uint8_t *dst_start, size_t &dst_len); + json_scanner scanner{}; + uint8_t *dst; +}; + +simdjson_inline void json_minifier::next(const simd::simd8x64& in, const json_block& block) { + uint64_t mask = block.whitespace(); + dst += in.compress(mask, dst); +} + +simdjson_inline error_code json_minifier::finish(uint8_t *dst_start, size_t &dst_len) { + error_code error = scanner.finish(); + if (error) { dst_len = 0; return error; } + dst_len = dst - dst_start; + return SUCCESS; +} + +template<> +simdjson_inline void json_minifier::step<128>(const uint8_t *block_buf, buf_block_reader<128> &reader) noexcept { + simd::simd8x64 in_1(block_buf); + simd::simd8x64 in_2(block_buf+64); + json_block block_1 = scanner.next(in_1); + json_block block_2 = scanner.next(in_2); + this->next(in_1, block_1); + this->next(in_2, block_2); + reader.advance(); +} + +template<> +simdjson_inline void json_minifier::step<64>(const uint8_t *block_buf, buf_block_reader<64> &reader) noexcept { + simd::simd8x64 in_1(block_buf); + json_block block_1 = scanner.next(in_1); + this->next(block_buf, block_1); + reader.advance(); +} + +template +error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept { + buf_block_reader reader(buf, len); + json_minifier minifier(dst); + + // Index the first n-1 blocks + while (reader.has_full_block()) { + minifier.step(reader.full_block(), reader); + } + + // Index the last (remainder) block, padded with spaces + uint8_t block[STEP_SIZE]; + size_t remaining_bytes = reader.get_remainder(block); + if (remaining_bytes > 0) { + // We do not want to write directly to the output stream. Rather, we write + // to a local buffer (for safety). + uint8_t out_block[STEP_SIZE]; + uint8_t * const guarded_dst{minifier.dst}; + minifier.dst = out_block; + minifier.step(block, reader); + size_t to_write = minifier.dst - out_block; + // In some cases, we could be enticed to consider the padded spaces + // as part of the string. This is fine as long as we do not write more + // than we consumed. + if(to_write > remaining_bytes) { to_write = remaining_bytes; } + memcpy(guarded_dst, out_block, to_write); + minifier.dst = guarded_dst + to_write; + } + return minifier.finish(dst, dst_len); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H +/* end file generic/stage1/json_minifier.h for arm64 */ +/* including generic/stage1/json_structural_indexer.h for arm64: #include */ +/* begin file generic/stage1/json_structural_indexer.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses in stage1 +// It is intended to be included multiple times and compiled multiple times +// We assume the file in which it is included already includes +// "simdjson/stage1.h" (this simplifies amalgation) + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage1 { + +class bit_indexer { +public: + uint32_t *tail; + + simdjson_inline bit_indexer(uint32_t *index_buf) : tail(index_buf) {} + +#if SIMDJSON_PREFER_REVERSE_BITS + /** + * ARM lacks a fast trailing zero instruction, but it has a fast + * bit reversal instruction and a fast leading zero instruction. + * Thus it may be profitable to reverse the bits (once) and then + * to rely on a sequence of instructions that call the leading + * zero instruction. + * + * Performance notes: + * The chosen routine is not optimal in terms of data dependency + * since zero_leading_bit might require two instructions. However, + * it tends to minimize the total number of instructions which is + * beneficial. + */ + simdjson_inline void write_index(uint32_t idx, uint64_t& rev_bits, int i) { + int lz = leading_zeroes(rev_bits); + this->tail[i] = static_cast(idx) + lz; + rev_bits = zero_leading_bit(rev_bits, lz); + } +#else + /** + * Under recent x64 systems, we often have both a fast trailing zero + * instruction and a fast 'clear-lower-bit' instruction so the following + * algorithm can be competitive. + */ + + simdjson_inline void write_index(uint32_t idx, uint64_t& bits, int i) { + this->tail[i] = idx + trailing_zeroes(bits); + bits = clear_lowest_bit(bits); + } +#endif // SIMDJSON_PREFER_REVERSE_BITS + + template + simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) { + write_index(idx, bits, START); + SIMDJSON_IF_CONSTEXPR (N > 1) { + write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits); + } + return START+N; + } + + template + simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) { + write_indexes(idx, bits); + SIMDJSON_IF_CONSTEXPR ((START+STEP) < END) { + if (simdjson_unlikely((START+STEP) < cnt)) { + write_indexes_stepped<(START+STEP(idx, bits, cnt); + } + } + return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP; + } + + // flatten out values in 'bits' assuming that they are are to have values of idx + // plus their position in the bitvector, and store these indexes at + // base_ptr[base] incrementing base as we go + // will potentially store extra values beyond end of valid bits, so base_ptr + // needs to be large enough to handle this + // + // If the kernel sets SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER, then it + // will provide its own version of the code. +#ifdef SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + simdjson_inline void write(uint32_t idx, uint64_t bits); +#else + simdjson_inline void write(uint32_t idx, uint64_t bits) { + // In some instances, the next branch is expensive because it is mispredicted. + // Unfortunately, in other cases, + // it helps tremendously. + if (bits == 0) + return; + + int cnt = static_cast(count_ones(bits)); + +#if SIMDJSON_PREFER_REVERSE_BITS + bits = reverse_bits(bits); +#endif +#ifdef SIMDJSON_STRUCTURAL_INDEXER_STEP + static constexpr const int STEP = SIMDJSON_STRUCTURAL_INDEXER_STEP; +#else + static constexpr const int STEP = 4; +#endif + static constexpr const int STEP_UNTIL = 24; + + write_indexes_stepped<0, STEP_UNTIL, STEP>(idx, bits, cnt); + SIMDJSON_IF_CONSTEXPR (STEP_UNTIL < 64) { + if (simdjson_unlikely(STEP_UNTIL < cnt)) { + for (int i=STEP_UNTIL; itail += cnt; + } +#endif // SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +}; + +class json_structural_indexer { +public: + /** + * Find the important bits of JSON in a 128-byte chunk, and add them to structural_indexes. + * + * @param partial Setting the partial parameter to true allows the find_structural_bits to + * tolerate unclosed strings. The caller should still ensure that the input is valid UTF-8. If + * you are processing substrings, you may want to call on a function like trimmed_length_safe_utf8. + */ + template + static error_code index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept; + +private: + simdjson_inline json_structural_indexer(uint32_t *structural_indexes); + template + simdjson_inline void step(const uint8_t *block, buf_block_reader &reader) noexcept; + simdjson_inline void next(const simd::simd8x64& in, const json_block& block, size_t idx); + simdjson_inline error_code finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial); + + json_scanner scanner{}; + utf8_checker checker{}; + bit_indexer indexer; + uint64_t prev_structurals = 0; + uint64_t unescaped_chars_error = 0; +}; + +simdjson_inline json_structural_indexer::json_structural_indexer(uint32_t *structural_indexes) : indexer{structural_indexes} {} + +// Skip the last character if it is partial +simdjson_inline size_t trim_partial_utf8(const uint8_t *buf, size_t len) { + if (simdjson_unlikely(len < 3)) { + switch (len) { + case 2: + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (buf[len-2] >= 0xe0) { return len-2; } // 3- and 4-byte characters with only 2 bytes left + return len; + case 1: + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + return len; + case 0: + return len; + } + } + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (buf[len-2] >= 0xe0) { return len-2; } // 3- and 4-byte characters with only 1 byte left + if (buf[len-3] >= 0xf0) { return len-3; } // 4-byte characters with only 3 bytes left + return len; +} + +// +// PERF NOTES: +// We pipe 2 inputs through these stages: +// 1. Load JSON into registers. This takes a long time and is highly parallelizable, so we load +// 2 inputs' worth at once so that by the time step 2 is looking for them input, it's available. +// 2. Scan the JSON for critical data: strings, scalars and operators. This is the critical path. +// The output of step 1 depends entirely on this information. These functions don't quite use +// up enough CPU: the second half of the functions is highly serial, only using 1 execution core +// at a time. The second input's scans has some dependency on the first ones finishing it, but +// they can make a lot of progress before they need that information. +// 3. Step 1 doesn't use enough capacity, so we run some extra stuff while we're waiting for that +// to finish: utf-8 checks and generating the output from the last iteration. +// +// The reason we run 2 inputs at a time, is steps 2 and 3 are *still* not enough to soak up all +// available capacity with just one input. Running 2 at a time seems to give the CPU a good enough +// workout. +// +template +error_code json_structural_indexer::index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept { + if (simdjson_unlikely(len > parser.capacity())) { return CAPACITY; } + // We guard the rest of the code so that we can assume that len > 0 throughout. + if (len == 0) { return EMPTY; } + if (is_streaming(partial)) { + len = trim_partial_utf8(buf, len); + // If you end up with an empty window after trimming + // the partial UTF-8 bytes, then chances are good that you + // have an UTF-8 formatting error. + if(len == 0) { return UTF8_ERROR; } + } + buf_block_reader reader(buf, len); + json_structural_indexer indexer(parser.structural_indexes.get()); + + // Read all but the last block + while (reader.has_full_block()) { + indexer.step(reader.full_block(), reader); + } + // Take care of the last block (will always be there unless file is empty which is + // not supposed to happen.) + uint8_t block[STEP_SIZE]; + if (simdjson_unlikely(reader.get_remainder(block) == 0)) { return UNEXPECTED_ERROR; } + indexer.step(block, reader); + return indexer.finish(parser, reader.block_index(), len, partial); +} + +template<> +simdjson_inline void json_structural_indexer::step<128>(const uint8_t *block, buf_block_reader<128> &reader) noexcept { + simd::simd8x64 in_1(block); + simd::simd8x64 in_2(block+64); + json_block block_1 = scanner.next(in_1); + json_block block_2 = scanner.next(in_2); + this->next(in_1, block_1, reader.block_index()); + this->next(in_2, block_2, reader.block_index()+64); + reader.advance(); +} + +template<> +simdjson_inline void json_structural_indexer::step<64>(const uint8_t *block, buf_block_reader<64> &reader) noexcept { + simd::simd8x64 in_1(block); + json_block block_1 = scanner.next(in_1); + this->next(in_1, block_1, reader.block_index()); + reader.advance(); +} + +simdjson_inline void json_structural_indexer::next(const simd::simd8x64& in, const json_block& block, size_t idx) { + uint64_t unescaped = in.lteq(0x1F); +#if SIMDJSON_UTF8VALIDATION + checker.check_next_input(in); +#endif + indexer.write(uint32_t(idx-64), prev_structurals); // Output *last* iteration's structurals to the parser + prev_structurals = block.structural_start(); + unescaped_chars_error |= block.non_quote_inside_string(unescaped); +} + +simdjson_inline error_code json_structural_indexer::finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial) { + // Write out the final iteration's structurals + indexer.write(uint32_t(idx-64), prev_structurals); + error_code error = scanner.finish(); + // We deliberately break down the next expression so that it is + // human readable. + const bool should_we_exit = is_streaming(partial) ? + ((error != SUCCESS) && (error != UNCLOSED_STRING)) // when partial we tolerate UNCLOSED_STRING + : (error != SUCCESS); // if partial is false, we must have SUCCESS + const bool have_unclosed_string = (error == UNCLOSED_STRING); + if (simdjson_unlikely(should_we_exit)) { return error; } + + if (unescaped_chars_error) { + return UNESCAPED_CHARS; + } + parser.n_structural_indexes = uint32_t(indexer.tail - parser.structural_indexes.get()); + /*** + * The On Demand API requires special padding. + * + * This is related to https://github.com/simdjson/simdjson/issues/906 + * Basically, we want to make sure that if the parsing continues beyond the last (valid) + * structural character, it quickly stops. + * Only three structural characters can be repeated without triggering an error in JSON: [,] and }. + * We repeat the padding character (at 'len'). We don't know what it is, but if the parsing + * continues, then it must be [,] or }. + * Suppose it is ] or }. We backtrack to the first character, what could it be that would + * not trigger an error? It could be ] or } but no, because you can't start a document that way. + * It can't be a comma, a colon or any simple value. So the only way we could continue is + * if the repeated character is [. But if so, the document must start with [. But if the document + * starts with [, it should end with ]. If we enforce that rule, then we would get + * ][[ which is invalid. + * + * This is illustrated with the test array_iterate_unclosed_error() on the following input: + * R"({ "a": [,,)" + **/ + parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); // used later in partial == stage1_mode::streaming_final + parser.structural_indexes[parser.n_structural_indexes + 1] = uint32_t(len); + parser.structural_indexes[parser.n_structural_indexes + 2] = 0; + parser.next_structural_index = 0; + // a valid JSON file cannot have zero structural indexes - we should have found something + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { + return EMPTY; + } + if (simdjson_unlikely(parser.structural_indexes[parser.n_structural_indexes - 1] > len)) { + return UNEXPECTED_ERROR; + } + if (partial == stage1_mode::streaming_partial) { + // If we have an unclosed string, then the last structural + // will be the quote and we want to make sure to omit it. + if(have_unclosed_string) { + parser.n_structural_indexes--; + // a valid JSON file cannot have zero structural indexes - we should have found something + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { return CAPACITY; } + } + // We truncate the input to the end of the last complete document (or zero). + auto new_structural_indexes = find_next_document_index(parser); + if (new_structural_indexes == 0 && parser.n_structural_indexes > 0) { + if(parser.structural_indexes[0] == 0) { + // If the buffer is partial and we started at index 0 but the document is + // incomplete, it's too big to parse. + return CAPACITY; + } else { + // It is possible that the document could be parsed, we just had a lot + // of white space. + parser.n_structural_indexes = 0; + return EMPTY; + } + } + + parser.n_structural_indexes = new_structural_indexes; + } else if (partial == stage1_mode::streaming_final) { + if(have_unclosed_string) { parser.n_structural_indexes--; } + // We truncate the input to the end of the last complete document (or zero). + // Because partial == stage1_mode::streaming_final, it means that we may + // silently ignore trailing garbage. Though it sounds bad, we do it + // deliberately because many people who have streams of JSON documents + // will truncate them for processing. E.g., imagine that you are uncompressing + // the data from a size file or receiving it in chunks from the network. You + // may not know where exactly the last document will be. Meanwhile the + // document_stream instances allow people to know the JSON documents they are + // parsing (see the iterator.source() method). + parser.n_structural_indexes = find_next_document_index(parser); + // We store the initial n_structural_indexes so that the client can see + // whether we used truncation. If initial_n_structural_indexes == parser.n_structural_indexes, + // then this will query parser.structural_indexes[parser.n_structural_indexes] which is len, + // otherwise, it will copy some prior index. + parser.structural_indexes[parser.n_structural_indexes + 1] = parser.structural_indexes[parser.n_structural_indexes]; + // This next line is critical, do not change it unless you understand what you are + // doing. + parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { + // We tolerate an unclosed string at the very end of the stream. Indeed, users + // often load their data in bulk without being careful and they want us to ignore + // the trailing garbage. + return EMPTY; + } + } + checker.check_eof(); + return checker.errors(); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +// Clear CUSTOM_BIT_INDEXER so other implementations can set it if they need to. +#undef SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H +/* end file generic/stage1/json_structural_indexer.h for arm64 */ +/* including generic/stage1/utf8_validator.h for arm64: #include */ +/* begin file generic/stage1/utf8_validator.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage1 { + +/** + * Validates that the string is actual UTF-8. + */ +template +bool generic_validate_utf8(const uint8_t * input, size_t length) { + checker c{}; + buf_block_reader<64> reader(input, length); + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + c.check_next_input(in); + reader.advance(); + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + c.check_next_input(in); + reader.advance(); + c.check_eof(); + return c.errors() == error_code::SUCCESS; +} + +bool generic_validate_utf8(const char * input, size_t length) { + return generic_validate_utf8(reinterpret_cast(input),length); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H +/* end file generic/stage1/utf8_validator.h for arm64 */ +/* end file generic/stage1/amalgamated.h for arm64 */ +/* including generic/stage2/amalgamated.h for arm64: #include */ +/* begin file generic/stage2/amalgamated.h for arm64 */ +// Stuff other things depend on +/* including generic/stage2/base.h for arm64: #include */ +/* begin file generic/stage2/base.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage2 { + +class json_iterator; +class structural_iterator; +struct tape_builder; +struct tape_writer; + +} // namespace stage2 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_BASE_H +/* end file generic/stage2/base.h for arm64 */ +/* including generic/stage2/tape_writer.h for arm64: #include */ +/* begin file generic/stage2/tape_writer.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage2 { + +struct tape_writer { + /** The next place to write to tape */ + uint64_t *next_tape_loc; + + /** Write a signed 64-bit value to tape. */ + simdjson_inline void append_s64(int64_t value) noexcept; + + /** Write an unsigned 64-bit value to tape. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + + /** Write a double value to tape. */ + simdjson_inline void append_double(double value) noexcept; + + /** + * Append a tape entry (an 8-bit type,and 56 bits worth of value). + */ + simdjson_inline void append(uint64_t val, internal::tape_type t) noexcept; + + /** + * Skip the current tape entry without writing. + * + * Used to skip the start of the container, since we'll come back later to fill it in when the + * container ends. + */ + simdjson_inline void skip() noexcept; + + /** + * Skip the number of tape entries necessary to write a large u64 or i64. + */ + simdjson_inline void skip_large_integer() noexcept; + + /** + * Skip the number of tape entries necessary to write a double. + */ + simdjson_inline void skip_double() noexcept; + + /** + * Write a value to a known location on tape. + * + * Used to go back and write out the start of a container after the container ends. + */ + simdjson_inline static void write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept; + +private: + /** + * Append both the tape entry, and a supplementary value following it. Used for types that need + * all 64 bits, such as double and uint64_t. + */ + template + simdjson_inline void append2(uint64_t val, T val2, internal::tape_type t) noexcept; +}; // struct tape_writer + +simdjson_inline void tape_writer::append_s64(int64_t value) noexcept { + append2(0, value, internal::tape_type::INT64); +} + +simdjson_inline void tape_writer::append_u64(uint64_t value) noexcept { + append(0, internal::tape_type::UINT64); + *next_tape_loc = value; + next_tape_loc++; +} + +/** Write a double value to tape. */ +simdjson_inline void tape_writer::append_double(double value) noexcept { + append2(0, value, internal::tape_type::DOUBLE); +} + +simdjson_inline void tape_writer::skip() noexcept { + next_tape_loc++; +} + +simdjson_inline void tape_writer::skip_large_integer() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::skip_double() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::append(uint64_t val, internal::tape_type t) noexcept { + *next_tape_loc = val | ((uint64_t(char(t))) << 56); + next_tape_loc++; +} + +template +simdjson_inline void tape_writer::append2(uint64_t val, T val2, internal::tape_type t) noexcept { + append(val, t); + static_assert(sizeof(val2) == sizeof(*next_tape_loc), "Type is not 64 bits!"); + memcpy(next_tape_loc, &val2, sizeof(val2)); + next_tape_loc++; +} + +simdjson_inline void tape_writer::write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept { + tape_loc = val | ((uint64_t(char(t))) << 56); +} + +} // namespace stage2 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H +/* end file generic/stage2/tape_writer.h for arm64 */ +/* including generic/stage2/logger.h for arm64: #include */ +/* begin file generic/stage2/logger.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + + +// This is for an internal-only stage 2 specific logger. +// Set LOG_ENABLED = true to log what stage 2 is doing! +namespace simdjson { +namespace arm64 { +namespace { +namespace logger { + + static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + static constexpr const int LOG_EVENT_LEN = 20; + static constexpr const int LOG_BUFFER_LEN = 30; + static constexpr const int LOG_SMALL_BUFFER_LEN = 10; + static constexpr const int LOG_INDEX_LEN = 5; + + static int log_depth; // Not threadsafe. Log only. + + // Helper to turn unprintable or newline characters into spaces + static simdjson_inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } + } + + // Print the header and set up log_start + static simdjson_inline void log_start() { + if (LOG_ENABLED) { + log_depth = 0; + printf("\n"); + printf("| %-*s | %-*s | %-*s | %-*s | Detail |\n", LOG_EVENT_LEN, "Event", LOG_BUFFER_LEN, "Buffer", LOG_SMALL_BUFFER_LEN, "Next", 5, "Next#"); + printf("|%.*s|%.*s|%.*s|%.*s|--------|\n", LOG_EVENT_LEN+2, DASHES, LOG_BUFFER_LEN+2, DASHES, LOG_SMALL_BUFFER_LEN+2, DASHES, 5+2, DASHES); + } + } + + simdjson_unused static simdjson_inline void log_string(const char *message) { + if (LOG_ENABLED) { + printf("%s\n", message); + } + } + + // Logs a single line from the stage 2 DOM parser + template + static simdjson_inline void log_line(S &structurals, const char *title_prefix, const char *title, const char *detail) { + if (LOG_ENABLED) { + printf("| %*s%s%-*s ", log_depth*2, "", title_prefix, LOG_EVENT_LEN - log_depth*2 - int(strlen(title_prefix)), title); + auto current_index = structurals.at_beginning() ? nullptr : structurals.next_structural-1; + auto next_index = structurals.next_structural; + auto current = current_index ? &structurals.buf[*current_index] : reinterpret_cast(" "); + auto next = &structurals.buf[*next_index]; + { + // Print the next N characters in the buffer. + printf("| "); + // Otherwise, print the characters starting from the buffer position. + // Print spaces for unprintable or newline characters. + for (int i=0;i */ +/* begin file generic/stage2/json_iterator.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage2 { + +class json_iterator { +public: + const uint8_t* const buf; + uint32_t *next_structural; + dom_parser_implementation &dom_parser; + uint32_t depth{0}; + + /** + * Walk the JSON document. + * + * The visitor receives callbacks when values are encountered. All callbacks pass the iterator as + * the first parameter; some callbacks have other parameters as well: + * + * - visit_document_start() - at the beginning. + * - visit_document_end() - at the end (if things were successful). + * + * - visit_array_start() - at the start `[` of a non-empty array. + * - visit_array_end() - at the end `]` of a non-empty array. + * - visit_empty_array() - when an empty array is encountered. + * + * - visit_object_end() - at the start `]` of a non-empty object. + * - visit_object_start() - at the end `]` of a non-empty object. + * - visit_empty_object() - when an empty object is encountered. + * - visit_key(const uint8_t *key) - when a key in an object field is encountered. key is + * guaranteed to point at the first quote of the string (`"key"`). + * - visit_primitive(const uint8_t *value) - when a value is a string, number, boolean or null. + * - visit_root_primitive(iter, uint8_t *value) - when the top-level value is a string, number, boolean or null. + * + * - increment_count(iter) - each time a value is found in an array or object. + */ + template + simdjson_warn_unused simdjson_inline error_code walk_document(V &visitor) noexcept; + + /** + * Create an iterator capable of walking a JSON document. + * + * The document must have already passed through stage 1. + */ + simdjson_inline json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index); + + /** + * Look at the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *peek() const noexcept; + /** + * Advance to the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *advance() noexcept; + /** + * Get the remaining length of the document, from the start of the current token. + */ + simdjson_inline size_t remaining_len() const noexcept; + /** + * Check if we are at the end of the document. + * + * If this is true, there are no more tokens. + */ + simdjson_inline bool at_eof() const noexcept; + /** + * Check if we are at the beginning of the document. + */ + simdjson_inline bool at_beginning() const noexcept; + simdjson_inline uint8_t last_structural() const noexcept; + + /** + * Log that a value has been found. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_value(const char *type) const noexcept; + /** + * Log the start of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_start_value(const char *type) const noexcept; + /** + * Log the end of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_end_value(const char *type) const noexcept; + /** + * Log an error. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_error(const char *error) const noexcept; + + template + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(V &visitor, const uint8_t *value) noexcept; + template + simdjson_warn_unused simdjson_inline error_code visit_primitive(V &visitor, const uint8_t *value) noexcept; +}; + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::walk_document(V &visitor) noexcept { + logger::log_start(); + + // + // Start the document + // + if (at_eof()) { return EMPTY; } + log_start_value("document"); + SIMDJSON_TRY( visitor.visit_document_start(*this) ); + + // + // Read first value + // + { + auto value = advance(); + + // Make sure the outer object or array is closed before continuing; otherwise, there are ways we + // could get into memory corruption. See https://github.com/simdjson/simdjson/issues/906 + if (!STREAMING) { + switch (*value) { + case '{': if (last_structural() != '}') { log_value("starting brace unmatched"); return TAPE_ERROR; }; break; + case '[': if (last_structural() != ']') { log_value("starting bracket unmatched"); return TAPE_ERROR; }; break; + } + } + + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_root_primitive(*this, value) ); break; + } + } + goto document_end; + +// +// Object parser states +// +object_begin: + log_start_value("object"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = false; + SIMDJSON_TRY( visitor.visit_object_start(*this) ); + + { + auto key = advance(); + if (*key != '"') { log_error("Object does not start with a key"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.increment_count(*this) ); + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + +object_field: + if (simdjson_unlikely( *advance() != ':' )) { log_error("Missing colon after key in object"); return TAPE_ERROR; } + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +object_continue: + switch (*advance()) { + case ',': + SIMDJSON_TRY( visitor.increment_count(*this) ); + { + auto key = advance(); + if (simdjson_unlikely( *key != '"' )) { log_error("Key string missing at beginning of field in object"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + goto object_field; + case '}': log_end_value("object"); SIMDJSON_TRY( visitor.visit_object_end(*this) ); goto scope_end; + default: log_error("No comma between object fields"); return TAPE_ERROR; + } + +scope_end: + depth--; + if (depth == 0) { goto document_end; } + if (dom_parser.is_array[depth]) { goto array_continue; } + goto object_continue; + +// +// Array parser states +// +array_begin: + log_start_value("array"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = true; + SIMDJSON_TRY( visitor.visit_array_start(*this) ); + SIMDJSON_TRY( visitor.increment_count(*this) ); + +array_value: + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +array_continue: + switch (*advance()) { + case ',': SIMDJSON_TRY( visitor.increment_count(*this) ); goto array_value; + case ']': log_end_value("array"); SIMDJSON_TRY( visitor.visit_array_end(*this) ); goto scope_end; + default: log_error("Missing comma between array values"); return TAPE_ERROR; + } + +document_end: + log_end_value("document"); + SIMDJSON_TRY( visitor.visit_document_end(*this) ); + + dom_parser.next_structural_index = uint32_t(next_structural - &dom_parser.structural_indexes[0]); + + // If we didn't make it to the end, it's an error + if ( !STREAMING && dom_parser.next_structural_index != dom_parser.n_structural_indexes ) { + log_error("More than one JSON value at the root of the document, or extra characters at the end of the JSON!"); + return TAPE_ERROR; + } + + return SUCCESS; + +} // walk_document() + +simdjson_inline json_iterator::json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index) + : buf{_dom_parser.buf}, + next_structural{&_dom_parser.structural_indexes[start_structural_index]}, + dom_parser{_dom_parser} { +} + +simdjson_inline const uint8_t *json_iterator::peek() const noexcept { + return &buf[*(next_structural)]; +} +simdjson_inline const uint8_t *json_iterator::advance() noexcept { + return &buf[*(next_structural++)]; +} +simdjson_inline size_t json_iterator::remaining_len() const noexcept { + return dom_parser.len - *(next_structural-1); +} + +simdjson_inline bool json_iterator::at_eof() const noexcept { + return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes]; +} +simdjson_inline bool json_iterator::at_beginning() const noexcept { + return next_structural == dom_parser.structural_indexes.get(); +} +simdjson_inline uint8_t json_iterator::last_structural() const noexcept { + return buf[dom_parser.structural_indexes[dom_parser.n_structural_indexes - 1]]; +} + +simdjson_inline void json_iterator::log_value(const char *type) const noexcept { + logger::log_line(*this, "", type, ""); +} + +simdjson_inline void json_iterator::log_start_value(const char *type) const noexcept { + logger::log_line(*this, "+", type, ""); + if (logger::LOG_ENABLED) { logger::log_depth++; } +} + +simdjson_inline void json_iterator::log_end_value(const char *type) const noexcept { + if (logger::LOG_ENABLED) { logger::log_depth--; } + logger::log_line(*this, "-", type, ""); +} + +simdjson_inline void json_iterator::log_error(const char *error) const noexcept { + logger::log_line(*this, "", "ERROR", error); +} + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_root_primitive(V &visitor, const uint8_t *value) noexcept { + switch (*value) { + case '"': return visitor.visit_root_string(*this, value); + case 't': return visitor.visit_root_true_atom(*this, value); + case 'f': return visitor.visit_root_false_atom(*this, value); + case 'n': return visitor.visit_root_null_atom(*this, value); + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return visitor.visit_root_number(*this, value); + default: + log_error("Document starts with a non-value character"); + return TAPE_ERROR; + } +} +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_primitive(V &visitor, const uint8_t *value) noexcept { + // Use the fact that most scalars are going to be either strings or numbers. + if(*value == '"') { + return visitor.visit_string(*this, value); + } else if (((*value - '0') < 10) || (*value == '-')) { + return visitor.visit_number(*this, value); + } + // true, false, null are uncommon. + switch (*value) { + case 't': return visitor.visit_true_atom(*this, value); + case 'f': return visitor.visit_false_atom(*this, value); + case 'n': return visitor.visit_null_atom(*this, value); + default: + log_error("Non-value found when value was expected!"); + return TAPE_ERROR; + } +} + +} // namespace stage2 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H +/* end file generic/stage2/json_iterator.h for arm64 */ +/* including generic/stage2/stringparsing.h for arm64: #include */ +/* begin file generic/stage2/stringparsing.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses +// It is intended to be included multiple times and compiled multiple times + +namespace simdjson { +namespace arm64 { +namespace { +/// @private +namespace stringparsing { + +// begin copypasta +// These chars yield themselves: " \ / +// b -> backspace, f -> formfeed, n -> newline, r -> cr, t -> horizontal tab +// u not handled in this table as it's complex +static const uint8_t escape_map[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2f, + 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, 0, 0, 0, 0, // 0x4. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x5c, 0, 0, 0, // 0x5. + 0, 0, 0x08, 0, 0, 0, 0x0c, 0, 0, 0, 0, 0, 0, 0, 0x0a, 0, // 0x6. + 0, 0, 0x0d, 0, 0x09, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x7. + + 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, 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, 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, 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, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +// handle a unicode codepoint +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint(const uint8_t **src_ptr, + uint8_t **dst_ptr, bool allow_replacement) { + // Use the default Unicode Character 'REPLACEMENT CHARACTER' (U+FFFD) + constexpr uint32_t substitution_code_point = 0xfffd; + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) != ((static_cast ('\\') << 8) | static_cast ('u'))) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + + // We have already checked that the high surrogate is valid and + // (code_point - 0xd800) < 1024. + // + // Check that code_point_2 is in the range 0xdc00..0xdfff + // and that code_point_2 was parsed from valid hex. + uint32_t low_bit = code_point_2 - 0xdc00; + if (low_bit >> 10) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + code_point = (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + + } + } else if (code_point >= 0xdc00 && code_point <= 0xdfff) { + // If we encounter a low surrogate (not preceded by a high surrogate) + // then we have an error. + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +// handle a unicode codepoint using the wobbly convention +// https://simonsapin.github.io/wtf-8/ +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint_wobbly(const uint8_t **src_ptr, + uint8_t **dst_ptr) { + // It is not ideal that this function is nearly identical to handle_unicode_codepoint. + // + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) == ((static_cast ('\\') << 8) | static_cast ('u'))) { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + uint32_t low_bit = code_point_2 - 0xdc00; + if ((low_bit >> 10) == 0) { + code_point = + (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + } + } + + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +/** + * Unescape a valid UTF-8 string from src to dst, stopping at a final unescaped quote. There + * must be an unescaped quote terminating the string. It returns the final output + * position as pointer. In case of error (e.g., the string has bad escaped codes), + * then null_nullptrptr is returned. It is assumed that the output buffer is large + * enough. E.g., if src points at 'joe"', then dst needs to have four free bytes + + * SIMDJSON_PADDING bytes. + */ +simdjson_warn_unused simdjson_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) { + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint(&src, &dst, allow_replacement)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +simdjson_warn_unused simdjson_inline uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) { + // It is not ideal that this function is nearly identical to parse_string. + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint_wobbly(&src, &dst)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +} // namespace stringparsing +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H +/* end file generic/stage2/stringparsing.h for arm64 */ +/* including generic/stage2/structural_iterator.h for arm64: #include */ +/* begin file generic/stage2/structural_iterator.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage2 { + +class structural_iterator { +public: + const uint8_t* const buf; + uint32_t *next_structural; + dom_parser_implementation &dom_parser; + + // Start a structural + simdjson_inline structural_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index) + : buf{_dom_parser.buf}, + next_structural{&_dom_parser.structural_indexes[start_structural_index]}, + dom_parser{_dom_parser} { + } + // Get the buffer position of the current structural character + simdjson_inline const uint8_t* current() { + return &buf[*(next_structural-1)]; + } + // Get the current structural character + simdjson_inline char current_char() { + return buf[*(next_structural-1)]; + } + // Get the next structural character without advancing + simdjson_inline char peek_next_char() { + return buf[*next_structural]; + } + simdjson_inline const uint8_t* peek() { + return &buf[*next_structural]; + } + simdjson_inline const uint8_t* advance() { + return &buf[*(next_structural++)]; + } + simdjson_inline char advance_char() { + return buf[*(next_structural++)]; + } + simdjson_inline size_t remaining_len() { + return dom_parser.len - *(next_structural-1); + } + + simdjson_inline bool at_end() { + return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes]; + } + simdjson_inline bool at_beginning() { + return next_structural == dom_parser.structural_indexes.get(); + } +}; + +} // namespace stage2 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H +/* end file generic/stage2/structural_iterator.h for arm64 */ +/* including generic/stage2/tape_builder.h for arm64: #include */ +/* begin file generic/stage2/tape_builder.h for arm64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace arm64 { +namespace { +namespace stage2 { + +struct tape_builder { + template + simdjson_warn_unused static simdjson_inline error_code parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept; + + /** Called when a non-empty document starts. */ + simdjson_warn_unused simdjson_inline error_code visit_document_start(json_iterator &iter) noexcept; + /** Called when a non-empty document ends without error. */ + simdjson_warn_unused simdjson_inline error_code visit_document_end(json_iterator &iter) noexcept; + + /** Called when a non-empty array starts. */ + simdjson_warn_unused simdjson_inline error_code visit_array_start(json_iterator &iter) noexcept; + /** Called when a non-empty array ends. */ + simdjson_warn_unused simdjson_inline error_code visit_array_end(json_iterator &iter) noexcept; + /** Called when an empty array is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_array(json_iterator &iter) noexcept; + + /** Called when a non-empty object starts. */ + simdjson_warn_unused simdjson_inline error_code visit_object_start(json_iterator &iter) noexcept; + /** + * Called when a key in a field is encountered. + * + * primitive, visit_object_start, visit_empty_object, visit_array_start, or visit_empty_array + * will be called after this with the field value. + */ + simdjson_warn_unused simdjson_inline error_code visit_key(json_iterator &iter, const uint8_t *key) noexcept; + /** Called when a non-empty object ends. */ + simdjson_warn_unused simdjson_inline error_code visit_object_end(json_iterator &iter) noexcept; + /** Called when an empty object is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_object(json_iterator &iter) noexcept; + + /** + * Called when a string, number, boolean or null is found. + */ + simdjson_warn_unused simdjson_inline error_code visit_primitive(json_iterator &iter, const uint8_t *value) noexcept; + /** + * Called when a string, number, boolean or null is found at the top level of a document (i.e. + * when there is no array or object and the entire document is a single string, number, boolean or + * null. + * + * This is separate from primitive() because simdjson's normal primitive parsing routines assume + * there is at least one more token after the value, which is only true in an array or object. + */ + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_string(json_iterator &iter, const uint8_t *value, bool key = false) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_root_string(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + /** Called each time a new field or element in an array or object is found. */ + simdjson_warn_unused simdjson_inline error_code increment_count(json_iterator &iter) noexcept; + + /** Next location to write to tape */ + tape_writer tape; +private: + /** Next write location in the string buf for stage 2 parsing */ + uint8_t *current_string_buf_loc; + + simdjson_inline tape_builder(dom::document &doc) noexcept; + + simdjson_inline uint32_t next_tape_index(json_iterator &iter) const noexcept; + simdjson_inline void start_container(json_iterator &iter) noexcept; + simdjson_warn_unused simdjson_inline error_code end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_warn_unused simdjson_inline error_code empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_inline uint8_t *on_start_string(json_iterator &iter) noexcept; + simdjson_inline void on_end_string(uint8_t *dst) noexcept; +}; // struct tape_builder + +template +simdjson_warn_unused simdjson_inline error_code tape_builder::parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept { + dom_parser.doc = &doc; + json_iterator iter(dom_parser, STREAMING ? dom_parser.next_structural_index : 0); + tape_builder builder(doc); + return iter.walk_document(builder); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_root_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_object(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_array(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_end(json_iterator &iter) noexcept { + constexpr uint32_t start_tape_index = 0; + tape.append(start_tape_index, internal::tape_type::ROOT); + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter), internal::tape_type::ROOT); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_key(json_iterator &iter, const uint8_t *key) noexcept { + return visit_string(iter, key, true); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::increment_count(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].count++; // we have a key value pair in the object at parser.dom_parser.depth - 1 + return SUCCESS; +} + +simdjson_inline tape_builder::tape_builder(dom::document &doc) noexcept : tape{doc.tape.get()}, current_string_buf_loc{doc.string_buf.get()} {} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_string(json_iterator &iter, const uint8_t *value, bool key) noexcept { + iter.log_value(key ? "key" : "string"); + uint8_t *dst = on_start_string(iter); + dst = stringparsing::parse_string(value+1, dst, false); // We do not allow replacement when the escape characters are invalid. + if (dst == nullptr) { + iter.log_error("Invalid escape in string"); + return STRING_ERROR; + } + on_end_string(dst); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_string(json_iterator &iter, const uint8_t *value) noexcept { + return visit_string(iter, value); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_number(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("number"); + return numberparsing::parse_number(value, tape); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_number(json_iterator &iter, const uint8_t *value) noexcept { + // + // We need to make a copy to make sure that the string is space terminated. + // This is not about padding the input, which should already padded up + // to len + SIMDJSON_PADDING. However, we have no control at this stage + // on how the padding was done. What if the input string was padded with nulls? + // It is quite common for an input string to have an extra null character (C string). + // We do not want to allow 9\0 (where \0 is the null character) inside a JSON + // document, but the string "9\0" by itself is fine. So we make a copy and + // pad the input with spaces when we know that there is just one input element. + // This copy is relatively expensive, but it will almost never be called in + // practice unless you are in the strange scenario where you have many JSON + // documents made of single atoms. + // + std::unique_ptrcopy(new (std::nothrow) uint8_t[iter.remaining_len() + SIMDJSON_PADDING]); + if (copy.get() == nullptr) { return MEMALLOC; } + std::memcpy(copy.get(), value, iter.remaining_len()); + std::memset(copy.get() + iter.remaining_len(), ' ', SIMDJSON_PADDING); + error_code error = visit_number(iter, copy.get()); + return error; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value)) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value, iter.remaining_len())) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value)) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value, iter.remaining_len())) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value)) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value, iter.remaining_len())) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +// private: + +simdjson_inline uint32_t tape_builder::next_tape_index(json_iterator &iter) const noexcept { + return uint32_t(tape.next_tape_loc - iter.dom_parser.doc->tape.get()); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + auto start_index = next_tape_index(iter); + tape.append(start_index+2, start); + tape.append(start_index, end); + return SUCCESS; +} + +simdjson_inline void tape_builder::start_container(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].tape_index = next_tape_index(iter); + iter.dom_parser.open_containers[iter.depth].count = 0; + tape.skip(); // We don't actually *write* the start element until the end. +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + // Write the ending tape element, pointing at the start location + const uint32_t start_tape_index = iter.dom_parser.open_containers[iter.depth].tape_index; + tape.append(start_tape_index, end); + // Write the start tape element, pointing at the end location (and including count) + // count can overflow if it exceeds 24 bits... so we saturate + // the convention being that a cnt of 0xffffff or more is undetermined in value (>= 0xffffff). + const uint32_t count = iter.dom_parser.open_containers[iter.depth].count; + const uint32_t cntsat = count > 0xFFFFFF ? 0xFFFFFF : count; + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter) | (uint64_t(cntsat) << 32), start); + return SUCCESS; +} + +simdjson_inline uint8_t *tape_builder::on_start_string(json_iterator &iter) noexcept { + // we advance the point, accounting for the fact that we have a NULL termination + tape.append(current_string_buf_loc - iter.dom_parser.doc->string_buf.get(), internal::tape_type::STRING); + return current_string_buf_loc + sizeof(uint32_t); +} + +simdjson_inline void tape_builder::on_end_string(uint8_t *dst) noexcept { + uint32_t str_length = uint32_t(dst - (current_string_buf_loc + sizeof(uint32_t))); + // TODO check for overflow in case someone has a crazy string (>=4GB?) + // But only add the overflow check when the document itself exceeds 4GB + // Currently unneeded because we refuse to parse docs larger or equal to 4GB. + memcpy(current_string_buf_loc, &str_length, sizeof(uint32_t)); + // NULL termination is still handy if you expect all your strings to + // be NULL terminated? It comes at a small cost + *dst = 0; + current_string_buf_loc = dst + 1; +} + +} // namespace stage2 +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H +/* end file generic/stage2/tape_builder.h for arm64 */ +/* end file generic/stage2/amalgamated.h for arm64 */ + +// +// Stage 1 +// +namespace simdjson { +namespace arm64 { + +simdjson_warn_unused error_code implementation::create_dom_parser_implementation( + size_t capacity, + size_t max_depth, + std::unique_ptr& dst +) const noexcept { + dst.reset( new (std::nothrow) dom_parser_implementation() ); + if (!dst) { return MEMALLOC; } + if (auto err = dst->set_capacity(capacity)) + return err; + if (auto err = dst->set_max_depth(max_depth)) + return err; + return SUCCESS; +} + +namespace { + +using namespace simd; + +simdjson_inline json_character_block json_character_block::classify(const simd::simd8x64& in) { + // Functional programming causes trouble with Visual Studio. + // Keeping this version in comments since it is much nicer: + // auto v = in.map([&](simd8 chunk) { + // auto nib_lo = chunk & 0xf; + // auto nib_hi = chunk.shr<4>(); + // auto shuf_lo = nib_lo.lookup_16(16, 0, 0, 0, 0, 0, 0, 0, 0, 8, 12, 1, 2, 9, 0, 0); + // auto shuf_hi = nib_hi.lookup_16(8, 0, 18, 4, 0, 1, 0, 1, 0, 0, 0, 3, 2, 1, 0, 0); + // return shuf_lo & shuf_hi; + // }); + const simd8 table1(16, 0, 0, 0, 0, 0, 0, 0, 0, 8, 12, 1, 2, 9, 0, 0); + const simd8 table2(8, 0, 18, 4, 0, 1, 0, 1, 0, 0, 0, 3, 2, 1, 0, 0); + + simd8x64 v( + (in.chunks[0] & 0xf).lookup_16(table1) & (in.chunks[0].shr<4>()).lookup_16(table2), + (in.chunks[1] & 0xf).lookup_16(table1) & (in.chunks[1].shr<4>()).lookup_16(table2), + (in.chunks[2] & 0xf).lookup_16(table1) & (in.chunks[2].shr<4>()).lookup_16(table2), + (in.chunks[3] & 0xf).lookup_16(table1) & (in.chunks[3].shr<4>()).lookup_16(table2) + ); + + + // We compute whitespace and op separately. If the code later only use one or the + // other, given the fact that all functions are aggressively inlined, we can + // hope that useless computations will be omitted. This is namely case when + // minifying (we only need whitespace). *However* if we only need spaces, + // it is likely that we will still compute 'v' above with two lookup_16: one + // could do it a bit cheaper. This is in contrast with the x64 implementations + // where we can, efficiently, do the white space and structural matching + // separately. One reason for this difference is that on ARM NEON, the table + // lookups either zero or leave unchanged the characters exceeding 0xF whereas + // on x64, the equivalent instruction (pshufb) automatically applies a mask, + // ignoring the 4 most significant bits. Thus the x64 implementation is + // optimized differently. This being said, if you use this code strictly + // just for minification (or just to identify the structural characters), + // there is a small untaken optimization opportunity here. We deliberately + // do not pick it up. + + uint64_t op = simd8x64( + v.chunks[0].any_bits_set(0x7), + v.chunks[1].any_bits_set(0x7), + v.chunks[2].any_bits_set(0x7), + v.chunks[3].any_bits_set(0x7) + ).to_bitmask(); + + uint64_t whitespace = simd8x64( + v.chunks[0].any_bits_set(0x18), + v.chunks[1].any_bits_set(0x18), + v.chunks[2].any_bits_set(0x18), + v.chunks[3].any_bits_set(0x18) + ).to_bitmask(); + + return { whitespace, op }; +} + +simdjson_inline bool is_ascii(const simd8x64& input) { + simd8 bits = input.reduce_or(); + return bits.max_val() < 0x80u; +} + +simdjson_unused simdjson_inline simd8 must_be_continuation(const simd8 prev1, const simd8 prev2, const simd8 prev3) { + simd8 is_second_byte = prev1 >= uint8_t(0xc0u); + simd8 is_third_byte = prev2 >= uint8_t(0xe0u); + simd8 is_fourth_byte = prev3 >= uint8_t(0xf0u); + // Use ^ instead of | for is_*_byte, because ^ is commutative, and the caller is using ^ as well. + // This will work fine because we only have to report errors for cases with 0-1 lead bytes. + // Multiple lead bytes implies 2 overlapping multibyte characters, and if that happens, there is + // guaranteed to be at least *one* lead byte that is part of only 1 other multibyte character. + // The error will be detected there. + return is_second_byte ^ is_third_byte ^ is_fourth_byte; +} + +simdjson_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3) { + simd8 is_third_byte = prev2 >= uint8_t(0xe0u); + simd8 is_fourth_byte = prev3 >= uint8_t(0xf0u); + return is_third_byte ^ is_fourth_byte; +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +// +// Stage 2 +// + +// +// Implementation-specific overrides +// +namespace simdjson { +namespace arm64 { + +simdjson_warn_unused error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { + return arm64::stage1::json_minifier::minify<64>(buf, len, dst, dst_len); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage1(const uint8_t *_buf, size_t _len, stage1_mode streaming) noexcept { + this->buf = _buf; + this->len = _len; + return arm64::stage1::json_structural_indexer::index<64>(buf, len, *this, streaming); +} + +simdjson_warn_unused bool implementation::validate_utf8(const char *buf, size_t len) const noexcept { + return arm64::stage1::generic_validate_utf8(buf,len); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage2_next(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept { + return arm64::stringparsing::parse_string(src, dst, allow_replacement); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept { + return arm64::stringparsing::parse_wobbly_string(src, dst); +} + +simdjson_warn_unused error_code dom_parser_implementation::parse(const uint8_t *_buf, size_t _len, dom::document &_doc) noexcept { + auto error = stage1(_buf, _len, stage1_mode::regular); + if (error) { return error; } + return stage2(_doc); +} + +} // namespace arm64 +} // namespace simdjson + +/* including simdjson/arm64/end.h: #include */ +/* begin file simdjson/arm64/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#undef SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT +/* undefining SIMDJSON_IMPLEMENTATION from "arm64" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/arm64/end.h */ + +#endif // SIMDJSON_SRC_ARM64_CPP +/* end file arm64.cpp */ +#endif +#if SIMDJSON_IMPLEMENTATION_FALLBACK +/* including fallback.cpp: #include */ +/* begin file fallback.cpp */ +#ifndef SIMDJSON_SRC_FALLBACK_CPP +#define SIMDJSON_SRC_FALLBACK_CPP + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* including simdjson/fallback.h: #include */ +/* begin file simdjson/fallback.h */ +#ifndef SIMDJSON_FALLBACK_H +#define SIMDJSON_FALLBACK_H + +/* including simdjson/fallback/begin.h: #include "simdjson/fallback/begin.h" */ +/* begin file simdjson/fallback/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "fallback" */ +#define SIMDJSON_IMPLEMENTATION fallback +/* including simdjson/fallback/base.h: #include "simdjson/fallback/base.h" */ +/* begin file simdjson/fallback/base.h */ +#ifndef SIMDJSON_FALLBACK_BASE_H +#define SIMDJSON_FALLBACK_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Fallback implementation (runs on any machine). + */ +namespace fallback { + +class implementation; + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_BASE_H +/* end file simdjson/fallback/base.h */ +/* including simdjson/fallback/bitmanipulation.h: #include "simdjson/fallback/bitmanipulation.h" */ +/* begin file simdjson/fallback/bitmanipulation.h */ +#ifndef SIMDJSON_FALLBACK_BITMANIPULATION_H +#define SIMDJSON_FALLBACK_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { + +#if defined(_MSC_VER) && !defined(_M_ARM64) && !defined(_M_X64) +static inline unsigned char _BitScanForward64(unsigned long* ret, uint64_t x) { + unsigned long x0 = (unsigned long)x, top, bottom; + _BitScanForward(&top, (unsigned long)(x >> 32)); + _BitScanForward(&bottom, x0); + *ret = x0 ? bottom : 32 + top; + return x != 0; +} +static unsigned char _BitScanReverse64(unsigned long* ret, uint64_t x) { + unsigned long x1 = (unsigned long)(x >> 32), top, bottom; + _BitScanReverse(&top, x1); + _BitScanReverse(&bottom, (unsigned long)x); + *ret = x1 ? top + 32 : bottom; + return x != 0; +} +#endif + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#ifdef _MSC_VER + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// _MSC_VER +} + +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_BITMANIPULATION_H +/* end file simdjson/fallback/bitmanipulation.h */ +/* including simdjson/fallback/stringparsing_defs.h: #include "simdjson/fallback/stringparsing_defs.h" */ +/* begin file simdjson/fallback/stringparsing_defs.h */ +#ifndef SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H +#define SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 1; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return c == '"'; } + simdjson_inline bool has_backslash() { return c == '\\'; } + simdjson_inline int quote_index() { return c == '"' ? 0 : 1; } + simdjson_inline int backslash_index() { return c == '\\' ? 0 : 1; } + + uint8_t c; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // store to dest unconditionally - we can overwrite the bits we don't like later + dst[0] = src[0]; + return { src[0] }; +} + +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H +/* end file simdjson/fallback/stringparsing_defs.h */ +/* including simdjson/fallback/numberparsing_defs.h: #include "simdjson/fallback/numberparsing_defs.h" */ +/* begin file simdjson/fallback/numberparsing_defs.h */ +#ifndef SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H +#define SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#ifdef JSON_TEST_NUMBERS // for unit testing +void found_invalid_number(const uint8_t *buf); +void found_integer(int64_t result, const uint8_t *buf); +void found_unsigned_integer(uint64_t result, const uint8_t *buf); +void found_float(double result, const uint8_t *buf); +#endif + +namespace simdjson { +namespace fallback { +namespace numberparsing { + +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const char *chars) { + uint64_t val; + memcpy(&val, chars, sizeof(uint64_t)); + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + return parse_eight_digits_unrolled(reinterpret_cast(chars)); +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace fallback +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H +/* end file simdjson/fallback/numberparsing_defs.h */ +/* end file simdjson/fallback/begin.h */ +/* including simdjson/generic/amalgamated.h for fallback: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for fallback */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for fallback: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for fallback */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for fallback */ +/* including simdjson/generic/jsoncharutils.h for fallback: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for fallback */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for fallback */ +/* including simdjson/generic/atomparsing.h for fallback: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for fallback */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace fallback { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for fallback */ +/* including simdjson/generic/dom_parser_implementation.h for fallback: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for fallback */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace fallback +} // namespace simdjson + +namespace simdjson { +namespace fallback { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for fallback */ +/* including simdjson/generic/implementation_simdjson_result_base.h for fallback: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for fallback */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for fallback */ +/* including simdjson/generic/numberparsing.h for fallback: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for fallback */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace fallback { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for fallback */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for fallback: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for fallback */ +/* end file simdjson/generic/amalgamated.h for fallback */ +/* including simdjson/fallback/end.h: #include "simdjson/fallback/end.h" */ +/* begin file simdjson/fallback/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* undefining SIMDJSON_IMPLEMENTATION from "fallback" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/fallback/end.h */ + +#endif // SIMDJSON_FALLBACK_H +/* end file simdjson/fallback.h */ +/* including simdjson/fallback/implementation.h: #include */ +/* begin file simdjson/fallback/implementation.h */ +#ifndef SIMDJSON_FALLBACK_IMPLEMENTATION_H +#define SIMDJSON_FALLBACK_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation( + "fallback", + "Generic fallback implementation", + 0 + ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H +/* end file simdjson/fallback/implementation.h */ + +/* including simdjson/fallback/begin.h: #include */ +/* begin file simdjson/fallback/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "fallback" */ +#define SIMDJSON_IMPLEMENTATION fallback +/* including simdjson/fallback/base.h: #include "simdjson/fallback/base.h" */ +/* begin file simdjson/fallback/base.h */ +#ifndef SIMDJSON_FALLBACK_BASE_H +#define SIMDJSON_FALLBACK_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Fallback implementation (runs on any machine). + */ +namespace fallback { + +class implementation; + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_BASE_H +/* end file simdjson/fallback/base.h */ +/* including simdjson/fallback/bitmanipulation.h: #include "simdjson/fallback/bitmanipulation.h" */ +/* begin file simdjson/fallback/bitmanipulation.h */ +#ifndef SIMDJSON_FALLBACK_BITMANIPULATION_H +#define SIMDJSON_FALLBACK_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { + +#if defined(_MSC_VER) && !defined(_M_ARM64) && !defined(_M_X64) +static inline unsigned char _BitScanForward64(unsigned long* ret, uint64_t x) { + unsigned long x0 = (unsigned long)x, top, bottom; + _BitScanForward(&top, (unsigned long)(x >> 32)); + _BitScanForward(&bottom, x0); + *ret = x0 ? bottom : 32 + top; + return x != 0; +} +static unsigned char _BitScanReverse64(unsigned long* ret, uint64_t x) { + unsigned long x1 = (unsigned long)(x >> 32), top, bottom; + _BitScanReverse(&top, x1); + _BitScanReverse(&bottom, (unsigned long)x); + *ret = x1 ? top + 32 : bottom; + return x != 0; +} +#endif + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#ifdef _MSC_VER + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// _MSC_VER +} + +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_BITMANIPULATION_H +/* end file simdjson/fallback/bitmanipulation.h */ +/* including simdjson/fallback/stringparsing_defs.h: #include "simdjson/fallback/stringparsing_defs.h" */ +/* begin file simdjson/fallback/stringparsing_defs.h */ +#ifndef SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H +#define SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 1; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return c == '"'; } + simdjson_inline bool has_backslash() { return c == '\\'; } + simdjson_inline int quote_index() { return c == '"' ? 0 : 1; } + simdjson_inline int backslash_index() { return c == '\\' ? 0 : 1; } + + uint8_t c; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // store to dest unconditionally - we can overwrite the bits we don't like later + dst[0] = src[0]; + return { src[0] }; +} + +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H +/* end file simdjson/fallback/stringparsing_defs.h */ +/* including simdjson/fallback/numberparsing_defs.h: #include "simdjson/fallback/numberparsing_defs.h" */ +/* begin file simdjson/fallback/numberparsing_defs.h */ +#ifndef SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H +#define SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#ifdef JSON_TEST_NUMBERS // for unit testing +void found_invalid_number(const uint8_t *buf); +void found_integer(int64_t result, const uint8_t *buf); +void found_unsigned_integer(uint64_t result, const uint8_t *buf); +void found_float(double result, const uint8_t *buf); +#endif + +namespace simdjson { +namespace fallback { +namespace numberparsing { + +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const char *chars) { + uint64_t val; + memcpy(&val, chars, sizeof(uint64_t)); + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + return parse_eight_digits_unrolled(reinterpret_cast(chars)); +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace fallback +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H +/* end file simdjson/fallback/numberparsing_defs.h */ +/* end file simdjson/fallback/begin.h */ +/* including generic/stage1/find_next_document_index.h for fallback: #include */ +/* begin file generic/stage1/find_next_document_index.h for fallback */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { +namespace stage1 { + +/** + * This algorithm is used to quickly identify the last structural position that + * makes up a complete document. + * + * It does this by going backwards and finding the last *document boundary* (a + * place where one value follows another without a comma between them). If the + * last document (the characters after the boundary) has an equal number of + * start and end brackets, it is considered complete. + * + * Simply put, we iterate over the structural characters, starting from + * the end. We consider that we found the end of a JSON document when the + * first element of the pair is NOT one of these characters: '{' '[' ':' ',' + * and when the second element is NOT one of these characters: '}' ']' ':' ','. + * + * This simple comparison works most of the time, but it does not cover cases + * where the batch's structural indexes contain a perfect amount of documents. + * In such a case, we do not have access to the structural index which follows + * the last document, therefore, we do not have access to the second element in + * the pair, and that means we cannot identify the last document. To fix this + * issue, we keep a count of the open and closed curly/square braces we found + * while searching for the pair. When we find a pair AND the count of open and + * closed curly/square braces is the same, we know that we just passed a + * complete document, therefore the last json buffer location is the end of the + * batch. + */ +simdjson_inline uint32_t find_next_document_index(dom_parser_implementation &parser) { + // Variant: do not count separately, just figure out depth + if(parser.n_structural_indexes == 0) { return 0; } + auto arr_cnt = 0; + auto obj_cnt = 0; + for (auto i = parser.n_structural_indexes - 1; i > 0; i--) { + auto idxb = parser.structural_indexes[i]; + switch (parser.buf[idxb]) { + case ':': + case ',': + continue; + case '}': + obj_cnt--; + continue; + case ']': + arr_cnt--; + continue; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + auto idxa = parser.structural_indexes[i - 1]; + switch (parser.buf[idxa]) { + case '{': + case '[': + case ':': + case ',': + continue; + } + // Last document is complete, so the next document will appear after! + if (!arr_cnt && !obj_cnt) { + return parser.n_structural_indexes; + } + // Last document is incomplete; mark the document at i + 1 as the next one + return i; + } + // If we made it to the end, we want to finish counting to see if we have a full document. + switch (parser.buf[parser.structural_indexes[0]]) { + case '}': + obj_cnt--; + break; + case ']': + arr_cnt--; + break; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + if (!arr_cnt && !obj_cnt) { + // We have a complete document. + return parser.n_structural_indexes; + } + return 0; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H +/* end file generic/stage1/find_next_document_index.h for fallback */ +/* including generic/stage2/stringparsing.h for fallback: #include */ +/* begin file generic/stage2/stringparsing.h for fallback */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses +// It is intended to be included multiple times and compiled multiple times + +namespace simdjson { +namespace fallback { +namespace { +/// @private +namespace stringparsing { + +// begin copypasta +// These chars yield themselves: " \ / +// b -> backspace, f -> formfeed, n -> newline, r -> cr, t -> horizontal tab +// u not handled in this table as it's complex +static const uint8_t escape_map[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2f, + 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, 0, 0, 0, 0, // 0x4. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x5c, 0, 0, 0, // 0x5. + 0, 0, 0x08, 0, 0, 0, 0x0c, 0, 0, 0, 0, 0, 0, 0, 0x0a, 0, // 0x6. + 0, 0, 0x0d, 0, 0x09, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x7. + + 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, 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, 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, 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, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +// handle a unicode codepoint +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint(const uint8_t **src_ptr, + uint8_t **dst_ptr, bool allow_replacement) { + // Use the default Unicode Character 'REPLACEMENT CHARACTER' (U+FFFD) + constexpr uint32_t substitution_code_point = 0xfffd; + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) != ((static_cast ('\\') << 8) | static_cast ('u'))) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + + // We have already checked that the high surrogate is valid and + // (code_point - 0xd800) < 1024. + // + // Check that code_point_2 is in the range 0xdc00..0xdfff + // and that code_point_2 was parsed from valid hex. + uint32_t low_bit = code_point_2 - 0xdc00; + if (low_bit >> 10) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + code_point = (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + + } + } else if (code_point >= 0xdc00 && code_point <= 0xdfff) { + // If we encounter a low surrogate (not preceded by a high surrogate) + // then we have an error. + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +// handle a unicode codepoint using the wobbly convention +// https://simonsapin.github.io/wtf-8/ +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint_wobbly(const uint8_t **src_ptr, + uint8_t **dst_ptr) { + // It is not ideal that this function is nearly identical to handle_unicode_codepoint. + // + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) == ((static_cast ('\\') << 8) | static_cast ('u'))) { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + uint32_t low_bit = code_point_2 - 0xdc00; + if ((low_bit >> 10) == 0) { + code_point = + (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + } + } + + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +/** + * Unescape a valid UTF-8 string from src to dst, stopping at a final unescaped quote. There + * must be an unescaped quote terminating the string. It returns the final output + * position as pointer. In case of error (e.g., the string has bad escaped codes), + * then null_nullptrptr is returned. It is assumed that the output buffer is large + * enough. E.g., if src points at 'joe"', then dst needs to have four free bytes + + * SIMDJSON_PADDING bytes. + */ +simdjson_warn_unused simdjson_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) { + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint(&src, &dst, allow_replacement)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +simdjson_warn_unused simdjson_inline uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) { + // It is not ideal that this function is nearly identical to parse_string. + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint_wobbly(&src, &dst)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +} // namespace stringparsing +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H +/* end file generic/stage2/stringparsing.h for fallback */ +/* including generic/stage2/logger.h for fallback: #include */ +/* begin file generic/stage2/logger.h for fallback */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + + +// This is for an internal-only stage 2 specific logger. +// Set LOG_ENABLED = true to log what stage 2 is doing! +namespace simdjson { +namespace fallback { +namespace { +namespace logger { + + static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + static constexpr const int LOG_EVENT_LEN = 20; + static constexpr const int LOG_BUFFER_LEN = 30; + static constexpr const int LOG_SMALL_BUFFER_LEN = 10; + static constexpr const int LOG_INDEX_LEN = 5; + + static int log_depth; // Not threadsafe. Log only. + + // Helper to turn unprintable or newline characters into spaces + static simdjson_inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } + } + + // Print the header and set up log_start + static simdjson_inline void log_start() { + if (LOG_ENABLED) { + log_depth = 0; + printf("\n"); + printf("| %-*s | %-*s | %-*s | %-*s | Detail |\n", LOG_EVENT_LEN, "Event", LOG_BUFFER_LEN, "Buffer", LOG_SMALL_BUFFER_LEN, "Next", 5, "Next#"); + printf("|%.*s|%.*s|%.*s|%.*s|--------|\n", LOG_EVENT_LEN+2, DASHES, LOG_BUFFER_LEN+2, DASHES, LOG_SMALL_BUFFER_LEN+2, DASHES, 5+2, DASHES); + } + } + + simdjson_unused static simdjson_inline void log_string(const char *message) { + if (LOG_ENABLED) { + printf("%s\n", message); + } + } + + // Logs a single line from the stage 2 DOM parser + template + static simdjson_inline void log_line(S &structurals, const char *title_prefix, const char *title, const char *detail) { + if (LOG_ENABLED) { + printf("| %*s%s%-*s ", log_depth*2, "", title_prefix, LOG_EVENT_LEN - log_depth*2 - int(strlen(title_prefix)), title); + auto current_index = structurals.at_beginning() ? nullptr : structurals.next_structural-1; + auto next_index = structurals.next_structural; + auto current = current_index ? &structurals.buf[*current_index] : reinterpret_cast(" "); + auto next = &structurals.buf[*next_index]; + { + // Print the next N characters in the buffer. + printf("| "); + // Otherwise, print the characters starting from the buffer position. + // Print spaces for unprintable or newline characters. + for (int i=0;i */ +/* begin file generic/stage2/json_iterator.h for fallback */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { +namespace stage2 { + +class json_iterator { +public: + const uint8_t* const buf; + uint32_t *next_structural; + dom_parser_implementation &dom_parser; + uint32_t depth{0}; + + /** + * Walk the JSON document. + * + * The visitor receives callbacks when values are encountered. All callbacks pass the iterator as + * the first parameter; some callbacks have other parameters as well: + * + * - visit_document_start() - at the beginning. + * - visit_document_end() - at the end (if things were successful). + * + * - visit_array_start() - at the start `[` of a non-empty array. + * - visit_array_end() - at the end `]` of a non-empty array. + * - visit_empty_array() - when an empty array is encountered. + * + * - visit_object_end() - at the start `]` of a non-empty object. + * - visit_object_start() - at the end `]` of a non-empty object. + * - visit_empty_object() - when an empty object is encountered. + * - visit_key(const uint8_t *key) - when a key in an object field is encountered. key is + * guaranteed to point at the first quote of the string (`"key"`). + * - visit_primitive(const uint8_t *value) - when a value is a string, number, boolean or null. + * - visit_root_primitive(iter, uint8_t *value) - when the top-level value is a string, number, boolean or null. + * + * - increment_count(iter) - each time a value is found in an array or object. + */ + template + simdjson_warn_unused simdjson_inline error_code walk_document(V &visitor) noexcept; + + /** + * Create an iterator capable of walking a JSON document. + * + * The document must have already passed through stage 1. + */ + simdjson_inline json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index); + + /** + * Look at the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *peek() const noexcept; + /** + * Advance to the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *advance() noexcept; + /** + * Get the remaining length of the document, from the start of the current token. + */ + simdjson_inline size_t remaining_len() const noexcept; + /** + * Check if we are at the end of the document. + * + * If this is true, there are no more tokens. + */ + simdjson_inline bool at_eof() const noexcept; + /** + * Check if we are at the beginning of the document. + */ + simdjson_inline bool at_beginning() const noexcept; + simdjson_inline uint8_t last_structural() const noexcept; + + /** + * Log that a value has been found. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_value(const char *type) const noexcept; + /** + * Log the start of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_start_value(const char *type) const noexcept; + /** + * Log the end of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_end_value(const char *type) const noexcept; + /** + * Log an error. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_error(const char *error) const noexcept; + + template + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(V &visitor, const uint8_t *value) noexcept; + template + simdjson_warn_unused simdjson_inline error_code visit_primitive(V &visitor, const uint8_t *value) noexcept; +}; + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::walk_document(V &visitor) noexcept { + logger::log_start(); + + // + // Start the document + // + if (at_eof()) { return EMPTY; } + log_start_value("document"); + SIMDJSON_TRY( visitor.visit_document_start(*this) ); + + // + // Read first value + // + { + auto value = advance(); + + // Make sure the outer object or array is closed before continuing; otherwise, there are ways we + // could get into memory corruption. See https://github.com/simdjson/simdjson/issues/906 + if (!STREAMING) { + switch (*value) { + case '{': if (last_structural() != '}') { log_value("starting brace unmatched"); return TAPE_ERROR; }; break; + case '[': if (last_structural() != ']') { log_value("starting bracket unmatched"); return TAPE_ERROR; }; break; + } + } + + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_root_primitive(*this, value) ); break; + } + } + goto document_end; + +// +// Object parser states +// +object_begin: + log_start_value("object"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = false; + SIMDJSON_TRY( visitor.visit_object_start(*this) ); + + { + auto key = advance(); + if (*key != '"') { log_error("Object does not start with a key"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.increment_count(*this) ); + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + +object_field: + if (simdjson_unlikely( *advance() != ':' )) { log_error("Missing colon after key in object"); return TAPE_ERROR; } + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +object_continue: + switch (*advance()) { + case ',': + SIMDJSON_TRY( visitor.increment_count(*this) ); + { + auto key = advance(); + if (simdjson_unlikely( *key != '"' )) { log_error("Key string missing at beginning of field in object"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + goto object_field; + case '}': log_end_value("object"); SIMDJSON_TRY( visitor.visit_object_end(*this) ); goto scope_end; + default: log_error("No comma between object fields"); return TAPE_ERROR; + } + +scope_end: + depth--; + if (depth == 0) { goto document_end; } + if (dom_parser.is_array[depth]) { goto array_continue; } + goto object_continue; + +// +// Array parser states +// +array_begin: + log_start_value("array"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = true; + SIMDJSON_TRY( visitor.visit_array_start(*this) ); + SIMDJSON_TRY( visitor.increment_count(*this) ); + +array_value: + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +array_continue: + switch (*advance()) { + case ',': SIMDJSON_TRY( visitor.increment_count(*this) ); goto array_value; + case ']': log_end_value("array"); SIMDJSON_TRY( visitor.visit_array_end(*this) ); goto scope_end; + default: log_error("Missing comma between array values"); return TAPE_ERROR; + } + +document_end: + log_end_value("document"); + SIMDJSON_TRY( visitor.visit_document_end(*this) ); + + dom_parser.next_structural_index = uint32_t(next_structural - &dom_parser.structural_indexes[0]); + + // If we didn't make it to the end, it's an error + if ( !STREAMING && dom_parser.next_structural_index != dom_parser.n_structural_indexes ) { + log_error("More than one JSON value at the root of the document, or extra characters at the end of the JSON!"); + return TAPE_ERROR; + } + + return SUCCESS; + +} // walk_document() + +simdjson_inline json_iterator::json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index) + : buf{_dom_parser.buf}, + next_structural{&_dom_parser.structural_indexes[start_structural_index]}, + dom_parser{_dom_parser} { +} + +simdjson_inline const uint8_t *json_iterator::peek() const noexcept { + return &buf[*(next_structural)]; +} +simdjson_inline const uint8_t *json_iterator::advance() noexcept { + return &buf[*(next_structural++)]; +} +simdjson_inline size_t json_iterator::remaining_len() const noexcept { + return dom_parser.len - *(next_structural-1); +} + +simdjson_inline bool json_iterator::at_eof() const noexcept { + return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes]; +} +simdjson_inline bool json_iterator::at_beginning() const noexcept { + return next_structural == dom_parser.structural_indexes.get(); +} +simdjson_inline uint8_t json_iterator::last_structural() const noexcept { + return buf[dom_parser.structural_indexes[dom_parser.n_structural_indexes - 1]]; +} + +simdjson_inline void json_iterator::log_value(const char *type) const noexcept { + logger::log_line(*this, "", type, ""); +} + +simdjson_inline void json_iterator::log_start_value(const char *type) const noexcept { + logger::log_line(*this, "+", type, ""); + if (logger::LOG_ENABLED) { logger::log_depth++; } +} + +simdjson_inline void json_iterator::log_end_value(const char *type) const noexcept { + if (logger::LOG_ENABLED) { logger::log_depth--; } + logger::log_line(*this, "-", type, ""); +} + +simdjson_inline void json_iterator::log_error(const char *error) const noexcept { + logger::log_line(*this, "", "ERROR", error); +} + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_root_primitive(V &visitor, const uint8_t *value) noexcept { + switch (*value) { + case '"': return visitor.visit_root_string(*this, value); + case 't': return visitor.visit_root_true_atom(*this, value); + case 'f': return visitor.visit_root_false_atom(*this, value); + case 'n': return visitor.visit_root_null_atom(*this, value); + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return visitor.visit_root_number(*this, value); + default: + log_error("Document starts with a non-value character"); + return TAPE_ERROR; + } +} +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_primitive(V &visitor, const uint8_t *value) noexcept { + // Use the fact that most scalars are going to be either strings or numbers. + if(*value == '"') { + return visitor.visit_string(*this, value); + } else if (((*value - '0') < 10) || (*value == '-')) { + return visitor.visit_number(*this, value); + } + // true, false, null are uncommon. + switch (*value) { + case 't': return visitor.visit_true_atom(*this, value); + case 'f': return visitor.visit_false_atom(*this, value); + case 'n': return visitor.visit_null_atom(*this, value); + default: + log_error("Non-value found when value was expected!"); + return TAPE_ERROR; + } +} + +} // namespace stage2 +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H +/* end file generic/stage2/json_iterator.h for fallback */ +/* including generic/stage2/tape_writer.h for fallback: #include */ +/* begin file generic/stage2/tape_writer.h for fallback */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace fallback { +namespace { +namespace stage2 { + +struct tape_writer { + /** The next place to write to tape */ + uint64_t *next_tape_loc; + + /** Write a signed 64-bit value to tape. */ + simdjson_inline void append_s64(int64_t value) noexcept; + + /** Write an unsigned 64-bit value to tape. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + + /** Write a double value to tape. */ + simdjson_inline void append_double(double value) noexcept; + + /** + * Append a tape entry (an 8-bit type,and 56 bits worth of value). + */ + simdjson_inline void append(uint64_t val, internal::tape_type t) noexcept; + + /** + * Skip the current tape entry without writing. + * + * Used to skip the start of the container, since we'll come back later to fill it in when the + * container ends. + */ + simdjson_inline void skip() noexcept; + + /** + * Skip the number of tape entries necessary to write a large u64 or i64. + */ + simdjson_inline void skip_large_integer() noexcept; + + /** + * Skip the number of tape entries necessary to write a double. + */ + simdjson_inline void skip_double() noexcept; + + /** + * Write a value to a known location on tape. + * + * Used to go back and write out the start of a container after the container ends. + */ + simdjson_inline static void write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept; + +private: + /** + * Append both the tape entry, and a supplementary value following it. Used for types that need + * all 64 bits, such as double and uint64_t. + */ + template + simdjson_inline void append2(uint64_t val, T val2, internal::tape_type t) noexcept; +}; // struct tape_writer + +simdjson_inline void tape_writer::append_s64(int64_t value) noexcept { + append2(0, value, internal::tape_type::INT64); +} + +simdjson_inline void tape_writer::append_u64(uint64_t value) noexcept { + append(0, internal::tape_type::UINT64); + *next_tape_loc = value; + next_tape_loc++; +} + +/** Write a double value to tape. */ +simdjson_inline void tape_writer::append_double(double value) noexcept { + append2(0, value, internal::tape_type::DOUBLE); +} + +simdjson_inline void tape_writer::skip() noexcept { + next_tape_loc++; +} + +simdjson_inline void tape_writer::skip_large_integer() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::skip_double() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::append(uint64_t val, internal::tape_type t) noexcept { + *next_tape_loc = val | ((uint64_t(char(t))) << 56); + next_tape_loc++; +} + +template +simdjson_inline void tape_writer::append2(uint64_t val, T val2, internal::tape_type t) noexcept { + append(val, t); + static_assert(sizeof(val2) == sizeof(*next_tape_loc), "Type is not 64 bits!"); + memcpy(next_tape_loc, &val2, sizeof(val2)); + next_tape_loc++; +} + +simdjson_inline void tape_writer::write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept { + tape_loc = val | ((uint64_t(char(t))) << 56); +} + +} // namespace stage2 +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H +/* end file generic/stage2/tape_writer.h for fallback */ +/* including generic/stage2/tape_builder.h for fallback: #include */ +/* begin file generic/stage2/tape_builder.h for fallback */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace fallback { +namespace { +namespace stage2 { + +struct tape_builder { + template + simdjson_warn_unused static simdjson_inline error_code parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept; + + /** Called when a non-empty document starts. */ + simdjson_warn_unused simdjson_inline error_code visit_document_start(json_iterator &iter) noexcept; + /** Called when a non-empty document ends without error. */ + simdjson_warn_unused simdjson_inline error_code visit_document_end(json_iterator &iter) noexcept; + + /** Called when a non-empty array starts. */ + simdjson_warn_unused simdjson_inline error_code visit_array_start(json_iterator &iter) noexcept; + /** Called when a non-empty array ends. */ + simdjson_warn_unused simdjson_inline error_code visit_array_end(json_iterator &iter) noexcept; + /** Called when an empty array is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_array(json_iterator &iter) noexcept; + + /** Called when a non-empty object starts. */ + simdjson_warn_unused simdjson_inline error_code visit_object_start(json_iterator &iter) noexcept; + /** + * Called when a key in a field is encountered. + * + * primitive, visit_object_start, visit_empty_object, visit_array_start, or visit_empty_array + * will be called after this with the field value. + */ + simdjson_warn_unused simdjson_inline error_code visit_key(json_iterator &iter, const uint8_t *key) noexcept; + /** Called when a non-empty object ends. */ + simdjson_warn_unused simdjson_inline error_code visit_object_end(json_iterator &iter) noexcept; + /** Called when an empty object is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_object(json_iterator &iter) noexcept; + + /** + * Called when a string, number, boolean or null is found. + */ + simdjson_warn_unused simdjson_inline error_code visit_primitive(json_iterator &iter, const uint8_t *value) noexcept; + /** + * Called when a string, number, boolean or null is found at the top level of a document (i.e. + * when there is no array or object and the entire document is a single string, number, boolean or + * null. + * + * This is separate from primitive() because simdjson's normal primitive parsing routines assume + * there is at least one more token after the value, which is only true in an array or object. + */ + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_string(json_iterator &iter, const uint8_t *value, bool key = false) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_root_string(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + /** Called each time a new field or element in an array or object is found. */ + simdjson_warn_unused simdjson_inline error_code increment_count(json_iterator &iter) noexcept; + + /** Next location to write to tape */ + tape_writer tape; +private: + /** Next write location in the string buf for stage 2 parsing */ + uint8_t *current_string_buf_loc; + + simdjson_inline tape_builder(dom::document &doc) noexcept; + + simdjson_inline uint32_t next_tape_index(json_iterator &iter) const noexcept; + simdjson_inline void start_container(json_iterator &iter) noexcept; + simdjson_warn_unused simdjson_inline error_code end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_warn_unused simdjson_inline error_code empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_inline uint8_t *on_start_string(json_iterator &iter) noexcept; + simdjson_inline void on_end_string(uint8_t *dst) noexcept; +}; // struct tape_builder + +template +simdjson_warn_unused simdjson_inline error_code tape_builder::parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept { + dom_parser.doc = &doc; + json_iterator iter(dom_parser, STREAMING ? dom_parser.next_structural_index : 0); + tape_builder builder(doc); + return iter.walk_document(builder); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_root_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_object(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_array(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_end(json_iterator &iter) noexcept { + constexpr uint32_t start_tape_index = 0; + tape.append(start_tape_index, internal::tape_type::ROOT); + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter), internal::tape_type::ROOT); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_key(json_iterator &iter, const uint8_t *key) noexcept { + return visit_string(iter, key, true); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::increment_count(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].count++; // we have a key value pair in the object at parser.dom_parser.depth - 1 + return SUCCESS; +} + +simdjson_inline tape_builder::tape_builder(dom::document &doc) noexcept : tape{doc.tape.get()}, current_string_buf_loc{doc.string_buf.get()} {} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_string(json_iterator &iter, const uint8_t *value, bool key) noexcept { + iter.log_value(key ? "key" : "string"); + uint8_t *dst = on_start_string(iter); + dst = stringparsing::parse_string(value+1, dst, false); // We do not allow replacement when the escape characters are invalid. + if (dst == nullptr) { + iter.log_error("Invalid escape in string"); + return STRING_ERROR; + } + on_end_string(dst); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_string(json_iterator &iter, const uint8_t *value) noexcept { + return visit_string(iter, value); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_number(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("number"); + return numberparsing::parse_number(value, tape); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_number(json_iterator &iter, const uint8_t *value) noexcept { + // + // We need to make a copy to make sure that the string is space terminated. + // This is not about padding the input, which should already padded up + // to len + SIMDJSON_PADDING. However, we have no control at this stage + // on how the padding was done. What if the input string was padded with nulls? + // It is quite common for an input string to have an extra null character (C string). + // We do not want to allow 9\0 (where \0 is the null character) inside a JSON + // document, but the string "9\0" by itself is fine. So we make a copy and + // pad the input with spaces when we know that there is just one input element. + // This copy is relatively expensive, but it will almost never be called in + // practice unless you are in the strange scenario where you have many JSON + // documents made of single atoms. + // + std::unique_ptrcopy(new (std::nothrow) uint8_t[iter.remaining_len() + SIMDJSON_PADDING]); + if (copy.get() == nullptr) { return MEMALLOC; } + std::memcpy(copy.get(), value, iter.remaining_len()); + std::memset(copy.get() + iter.remaining_len(), ' ', SIMDJSON_PADDING); + error_code error = visit_number(iter, copy.get()); + return error; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value)) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value, iter.remaining_len())) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value)) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value, iter.remaining_len())) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value)) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value, iter.remaining_len())) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +// private: + +simdjson_inline uint32_t tape_builder::next_tape_index(json_iterator &iter) const noexcept { + return uint32_t(tape.next_tape_loc - iter.dom_parser.doc->tape.get()); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + auto start_index = next_tape_index(iter); + tape.append(start_index+2, start); + tape.append(start_index, end); + return SUCCESS; +} + +simdjson_inline void tape_builder::start_container(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].tape_index = next_tape_index(iter); + iter.dom_parser.open_containers[iter.depth].count = 0; + tape.skip(); // We don't actually *write* the start element until the end. +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + // Write the ending tape element, pointing at the start location + const uint32_t start_tape_index = iter.dom_parser.open_containers[iter.depth].tape_index; + tape.append(start_tape_index, end); + // Write the start tape element, pointing at the end location (and including count) + // count can overflow if it exceeds 24 bits... so we saturate + // the convention being that a cnt of 0xffffff or more is undetermined in value (>= 0xffffff). + const uint32_t count = iter.dom_parser.open_containers[iter.depth].count; + const uint32_t cntsat = count > 0xFFFFFF ? 0xFFFFFF : count; + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter) | (uint64_t(cntsat) << 32), start); + return SUCCESS; +} + +simdjson_inline uint8_t *tape_builder::on_start_string(json_iterator &iter) noexcept { + // we advance the point, accounting for the fact that we have a NULL termination + tape.append(current_string_buf_loc - iter.dom_parser.doc->string_buf.get(), internal::tape_type::STRING); + return current_string_buf_loc + sizeof(uint32_t); +} + +simdjson_inline void tape_builder::on_end_string(uint8_t *dst) noexcept { + uint32_t str_length = uint32_t(dst - (current_string_buf_loc + sizeof(uint32_t))); + // TODO check for overflow in case someone has a crazy string (>=4GB?) + // But only add the overflow check when the document itself exceeds 4GB + // Currently unneeded because we refuse to parse docs larger or equal to 4GB. + memcpy(current_string_buf_loc, &str_length, sizeof(uint32_t)); + // NULL termination is still handy if you expect all your strings to + // be NULL terminated? It comes at a small cost + *dst = 0; + current_string_buf_loc = dst + 1; +} + +} // namespace stage2 +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H +/* end file generic/stage2/tape_builder.h for fallback */ + +// +// Stage 1 +// + +namespace simdjson { +namespace fallback { + +simdjson_warn_unused error_code implementation::create_dom_parser_implementation( + size_t capacity, + size_t max_depth, + std::unique_ptr& dst +) const noexcept { + dst.reset( new (std::nothrow) fallback::dom_parser_implementation() ); + if (!dst) { return MEMALLOC; } + if (auto err = dst->set_capacity(capacity)) + return err; + if (auto err = dst->set_max_depth(max_depth)) + return err; + return SUCCESS; +} + +namespace { +namespace stage1 { + +class structural_scanner { +public: + +simdjson_inline structural_scanner(dom_parser_implementation &_parser, stage1_mode _partial) + : buf{_parser.buf}, + next_structural_index{_parser.structural_indexes.get()}, + parser{_parser}, + len{static_cast(_parser.len)}, + partial{_partial} { +} + +simdjson_inline void add_structural() { + *next_structural_index = idx; + next_structural_index++; +} + +simdjson_inline bool is_continuation(uint8_t c) { + return (c & 0xc0) == 0x80; +} + +simdjson_inline void validate_utf8_character() { + // Continuation + if (simdjson_unlikely((buf[idx] & 0x40) == 0)) { + // extra continuation + error = UTF8_ERROR; + idx++; + return; + } + + // 2-byte + if ((buf[idx] & 0x20) == 0) { + // missing continuation + if (simdjson_unlikely(idx+1 > len || !is_continuation(buf[idx+1]))) { + if (idx+1 > len && is_streaming(partial)) { idx = len; return; } + error = UTF8_ERROR; + idx++; + return; + } + // overlong: 1100000_ 10______ + if (buf[idx] <= 0xc1) { error = UTF8_ERROR; } + idx += 2; + return; + } + + // 3-byte + if ((buf[idx] & 0x10) == 0) { + // missing continuation + if (simdjson_unlikely(idx+2 > len || !is_continuation(buf[idx+1]) || !is_continuation(buf[idx+2]))) { + if (idx+2 > len && is_streaming(partial)) { idx = len; return; } + error = UTF8_ERROR; + idx++; + return; + } + // overlong: 11100000 100_____ ________ + if (buf[idx] == 0xe0 && buf[idx+1] <= 0x9f) { error = UTF8_ERROR; } + // surrogates: U+D800-U+DFFF 11101101 101_____ + if (buf[idx] == 0xed && buf[idx+1] >= 0xa0) { error = UTF8_ERROR; } + idx += 3; + return; + } + + // 4-byte + // missing continuation + if (simdjson_unlikely(idx+3 > len || !is_continuation(buf[idx+1]) || !is_continuation(buf[idx+2]) || !is_continuation(buf[idx+3]))) { + if (idx+2 > len && is_streaming(partial)) { idx = len; return; } + error = UTF8_ERROR; + idx++; + return; + } + // overlong: 11110000 1000____ ________ ________ + if (buf[idx] == 0xf0 && buf[idx+1] <= 0x8f) { error = UTF8_ERROR; } + // too large: > U+10FFFF: + // 11110100 (1001|101_)____ + // 1111(1___|011_|0101) 10______ + // also includes 5, 6, 7 and 8 byte characters: + // 11111___ + if (buf[idx] == 0xf4 && buf[idx+1] >= 0x90) { error = UTF8_ERROR; } + if (buf[idx] >= 0xf5) { error = UTF8_ERROR; } + idx += 4; +} + +// Returns true if the string is unclosed. +simdjson_inline bool validate_string() { + idx++; // skip first quote + while (idx < len && buf[idx] != '"') { + if (buf[idx] == '\\') { + idx += 2; + } else if (simdjson_unlikely(buf[idx] & 0x80)) { + validate_utf8_character(); + } else { + if (buf[idx] < 0x20) { error = UNESCAPED_CHARS; } + idx++; + } + } + if (idx >= len) { return true; } + return false; +} + +simdjson_inline bool is_whitespace_or_operator(uint8_t c) { + switch (c) { + case '{': case '}': case '[': case ']': case ',': case ':': + case ' ': case '\r': case '\n': case '\t': + return true; + default: + return false; + } +} + +// +// Parse the entire input in STEP_SIZE-byte chunks. +// +simdjson_inline error_code scan() { + bool unclosed_string = false; + for (;idx 0) { + if(parser.structural_indexes[0] == 0) { + // If the buffer is partial and we started at index 0 but the document is + // incomplete, it's too big to parse. + return CAPACITY; + } else { + // It is possible that the document could be parsed, we just had a lot + // of white space. + parser.n_structural_indexes = 0; + return EMPTY; + } + } + parser.n_structural_indexes = new_structural_indexes; + } else if(partial == stage1_mode::streaming_final) { + if(unclosed_string) { parser.n_structural_indexes--; } + // We truncate the input to the end of the last complete document (or zero). + // Because partial == stage1_mode::streaming_final, it means that we may + // silently ignore trailing garbage. Though it sounds bad, we do it + // deliberately because many people who have streams of JSON documents + // will truncate them for processing. E.g., imagine that you are uncompressing + // the data from a size file or receiving it in chunks from the network. You + // may not know where exactly the last document will be. Meanwhile the + // document_stream instances allow people to know the JSON documents they are + // parsing (see the iterator.source() method). + parser.n_structural_indexes = find_next_document_index(parser); + // We store the initial n_structural_indexes so that the client can see + // whether we used truncation. If initial_n_structural_indexes == parser.n_structural_indexes, + // then this will query parser.structural_indexes[parser.n_structural_indexes] which is len, + // otherwise, it will copy some prior index. + parser.structural_indexes[parser.n_structural_indexes + 1] = parser.structural_indexes[parser.n_structural_indexes]; + // This next line is critical, do not change it unless you understand what you are + // doing. + parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); + if (parser.n_structural_indexes == 0) { return EMPTY; } + } else if(unclosed_string) { error = UNCLOSED_STRING; } + return error; +} + +private: + const uint8_t *buf; + uint32_t *next_structural_index; + dom_parser_implementation &parser; + uint32_t len; + uint32_t idx{0}; + error_code error{SUCCESS}; + stage1_mode partial; +}; // structural_scanner + +} // namespace stage1 +} // unnamed namespace + +simdjson_warn_unused error_code dom_parser_implementation::stage1(const uint8_t *_buf, size_t _len, stage1_mode partial) noexcept { + this->buf = _buf; + this->len = _len; + stage1::structural_scanner scanner(*this, partial); + return scanner.scan(); +} + +// big table for the minifier +static uint8_t jump_table[256 * 3] = { + 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, + 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 0, 0, + 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, + 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, + 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, + 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, + 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, + 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, + 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, + 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, + 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, + 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, + 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, + 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, 0, 1, 1, +}; + +simdjson_warn_unused error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { + size_t i = 0, pos = 0; + uint8_t quote = 0; + uint8_t nonescape = 1; + + while (i < len) { + unsigned char c = buf[i]; + uint8_t *meta = jump_table + 3 * c; + + quote = quote ^ (meta[0] & nonescape); + dst[pos] = c; + pos += meta[2] | quote; + + i += 1; + nonescape = uint8_t(~nonescape) | (meta[1]); + } + dst_len = pos; // we intentionally do not work with a reference + // for fear of aliasing + return quote ? UNCLOSED_STRING : SUCCESS; +} + +// credit: based on code from Google Fuchsia (Apache Licensed) +simdjson_warn_unused bool implementation::validate_utf8(const char *buf, size_t len) const noexcept { + const uint8_t *data = reinterpret_cast(buf); + uint64_t pos = 0; + uint32_t code_point = 0; + while (pos < len) { + // check of the next 8 bytes are ascii. + uint64_t next_pos = pos + 16; + if (next_pos <= len) { // if it is safe to read 8 more bytes, check that they are ascii + uint64_t v1; + memcpy(&v1, data + pos, sizeof(uint64_t)); + uint64_t v2; + memcpy(&v2, data + pos + sizeof(uint64_t), sizeof(uint64_t)); + uint64_t v{v1 | v2}; + if ((v & 0x8080808080808080) == 0) { + pos = next_pos; + continue; + } + } + unsigned char byte = data[pos]; + if (byte < 0x80) { + pos++; + continue; + } else if ((byte & 0xe0) == 0xc0) { + next_pos = pos + 2; + if (next_pos > len) { return false; } + if ((data[pos + 1] & 0xc0) != 0x80) { return false; } + // range check + code_point = (byte & 0x1f) << 6 | (data[pos + 1] & 0x3f); + if (code_point < 0x80 || 0x7ff < code_point) { return false; } + } else if ((byte & 0xf0) == 0xe0) { + next_pos = pos + 3; + if (next_pos > len) { return false; } + if ((data[pos + 1] & 0xc0) != 0x80) { return false; } + if ((data[pos + 2] & 0xc0) != 0x80) { return false; } + // range check + code_point = (byte & 0x0f) << 12 | + (data[pos + 1] & 0x3f) << 6 | + (data[pos + 2] & 0x3f); + if (code_point < 0x800 || 0xffff < code_point || + (0xd7ff < code_point && code_point < 0xe000)) { + return false; + } + } else if ((byte & 0xf8) == 0xf0) { // 0b11110000 + next_pos = pos + 4; + if (next_pos > len) { return false; } + if ((data[pos + 1] & 0xc0) != 0x80) { return false; } + if ((data[pos + 2] & 0xc0) != 0x80) { return false; } + if ((data[pos + 3] & 0xc0) != 0x80) { return false; } + // range check + code_point = + (byte & 0x07) << 18 | (data[pos + 1] & 0x3f) << 12 | + (data[pos + 2] & 0x3f) << 6 | (data[pos + 3] & 0x3f); + if (code_point <= 0xffff || 0x10ffff < code_point) { return false; } + } else { + // we may have a continuation + return false; + } + pos = next_pos; + } + return true; +} + +} // namespace fallback +} // namespace simdjson + +// +// Stage 2 +// + +namespace simdjson { +namespace fallback { + +simdjson_warn_unused error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage2_next(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_string(const uint8_t *src, uint8_t *dst, bool replacement_char) const noexcept { + return fallback::stringparsing::parse_string(src, dst, replacement_char); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept { + return fallback::stringparsing::parse_wobbly_string(src, dst); +} + +simdjson_warn_unused error_code dom_parser_implementation::parse(const uint8_t *_buf, size_t _len, dom::document &_doc) noexcept { + auto error = stage1(_buf, _len, stage1_mode::regular); + if (error) { return error; } + return stage2(_doc); +} + +} // namespace fallback +} // namespace simdjson + +/* including simdjson/fallback/end.h: #include */ +/* begin file simdjson/fallback/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* undefining SIMDJSON_IMPLEMENTATION from "fallback" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/fallback/end.h */ + +#endif // SIMDJSON_SRC_FALLBACK_CPP +/* end file fallback.cpp */ +#endif +#if SIMDJSON_IMPLEMENTATION_HASWELL +/* including haswell.cpp: #include */ +/* begin file haswell.cpp */ +#ifndef SIMDJSON_SRC_HASWELL_CPP +#define SIMDJSON_SRC_HASWELL_CPP + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* including simdjson/haswell.h: #include */ +/* begin file simdjson/haswell.h */ +#ifndef SIMDJSON_HASWELL_H +#define SIMDJSON_HASWELL_H + +/* including simdjson/haswell/begin.h: #include "simdjson/haswell/begin.h" */ +/* begin file simdjson/haswell/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "haswell" */ +#define SIMDJSON_IMPLEMENTATION haswell + +/* including simdjson/haswell/base.h: #include "simdjson/haswell/base.h" */ +/* begin file simdjson/haswell/base.h */ +#ifndef SIMDJSON_HASWELL_BASE_H +#define SIMDJSON_HASWELL_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_HASWELL +namespace simdjson { +/** + * Implementation for Haswell (Intel AVX2). + */ +namespace haswell { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BASE_H +/* end file simdjson/haswell/base.h */ +/* including simdjson/haswell/intrinsics.h: #include "simdjson/haswell/intrinsics.h" */ +/* begin file simdjson/haswell/intrinsics.h */ +#ifndef SIMDJSON_HASWELL_INTRINSICS_H +#define SIMDJSON_HASWELL_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + * e.g., if __AVX2__ is set... in turn, we normally set these + * macros by compiling against the corresponding architecture + * (e.g., arch:AVX2, -mavx2, etc.) which compiles the whole + * software with these advanced instructions. In simdjson, we + * want to compile the whole program for a generic target, + * and only target our specific kernels. As a workaround, + * we directly include the needed headers. These headers would + * normally guard against such usage, but we carefully included + * (or ) before, so the headers + * are fooled. + */ +#include // for _blsr_u64 +#include // for __lzcnt64 +#include // for most things (AVX2, AVX512, _popcnt64) +#include +#include +#include +#include +#include // for _mm_clmulepi64_si128 +// unfortunately, we may not get _blsr_u64, but, thankfully, clang +// has it as a macro. +#ifndef _blsr_u64 +// we roll our own +#define _blsr_u64(n) ((n - 1) & n) +#endif // _blsr_u64 +#endif // SIMDJSON_CLANG_VISUAL_STUDIO + +static_assert(sizeof(__m256i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for haswell kernel."); + +#endif // SIMDJSON_HASWELL_INTRINSICS_H +/* end file simdjson/haswell/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_HASWELL +SIMDJSON_TARGET_REGION("avx2,bmi,pclmul,lzcnt,popcnt") +#endif + +/* including simdjson/haswell/bitmanipulation.h: #include "simdjson/haswell/bitmanipulation.h" */ +/* begin file simdjson/haswell/bitmanipulation.h */ +#ifndef SIMDJSON_HASWELL_BITMANIPULATION_H +#define SIMDJSON_HASWELL_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmask.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return (int)_tzcnt_u64(input_num); +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + //////// + // You might expect the next line to be equivalent to + // return (int)_tzcnt_u64(input_num); + // but the generated code differs and might be less efficient? + //////// + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return _blsr_u64(input_num); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { + return int(_lzcnt_u64(input_num)); +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BITMANIPULATION_H +/* end file simdjson/haswell/bitmanipulation.h */ +/* including simdjson/haswell/bitmask.h: #include "simdjson/haswell/bitmask.h" */ +/* begin file simdjson/haswell/bitmask.h */ +#ifndef SIMDJSON_HASWELL_BITMASK_H +#define SIMDJSON_HASWELL_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processor supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BITMASK_H +/* end file simdjson/haswell/bitmask.h */ +/* including simdjson/haswell/numberparsing_defs.h: #include "simdjson/haswell/numberparsing_defs.h" */ +/* begin file simdjson/haswell/numberparsing_defs.h */ +#ifndef SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H +#define SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace numberparsing { + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace haswell +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H +/* end file simdjson/haswell/numberparsing_defs.h */ +/* including simdjson/haswell/simd.h: #include "simdjson/haswell/simd.h" */ +/* begin file simdjson/haswell/simd.h */ +#ifndef SIMDJSON_HASWELL_SIMD_H +#define SIMDJSON_HASWELL_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace simd { + + // Forward-declared so they can be used by splat and friends. + template + struct base { + __m256i value; + + // Zero constructor + simdjson_inline base() : value{__m256i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m256i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m256i&() const { return this->value; } + simdjson_inline operator __m256i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm256_or_si256(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm256_and_si256(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm256_xor_si256(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm256_andnot_si256(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + // Forward-declared so they can be used by splat and friends. + template + struct simd8; + + template> + struct base8: base> { + typedef uint32_t bitmask_t; + typedef uint64_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m256i _value) : base>(_value) {} + + friend simdjson_really_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm256_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm256_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m256i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm256_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm256_testz_si256(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm256_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm256_setzero_si256(); } + static simdjson_inline simd8 load(const T values[32]) { + return _mm256_loadu_si256(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m256i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[32]) const { return _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst), *this); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm256_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm256_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm256_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint32_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in four steps, first 8 bytes and then second 8 bytes... + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // second least significant 8 bits + uint8_t mask3 = uint8_t(mask >> 16); // ... + uint8_t mask4 = uint8_t(mask >> 24); // ... + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m256i shufmask = _mm256_set_epi64x(thintable_epi8[mask4], thintable_epi8[mask3], + thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask and so forth + shufmask = + _mm256_add_epi8(shufmask, _mm256_set_epi32(0x18181818, 0x18181818, + 0x10101010, 0x10101010, 0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m256i pruned = _mm256_shuffle_epi8(*this, shufmask); + // we still need to put the pieces back together. + // we compute the popcount of the first words: + int pop1 = BitsSetTable256mul2[mask1]; + int pop3 = BitsSetTable256mul2[mask3]; + + // then load the corresponding mask + // could be done with _mm256_loadu2_m128i but many standard libraries omit this intrinsic. + __m256i v256 = _mm256_castsi128_si256( + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8))); + __m256i compactmask = _mm256_insertf128_si256(v256, + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop3 * 8)), 1); + __m256i almostthere = _mm256_shuffle_epi8(pruned, compactmask); + // We just need to write out the result. + // This is the tricky bit that is hard to do + // if we want to return a SIMD register, since there + // is no single-instruction approach to recombine + // the two 128-bit lanes with an offset. + __m128i v128; + v128 = _mm256_castsi256_si128(almostthere); + _mm_storeu_si128( reinterpret_cast<__m128i *>(output), v128); + v128 = _mm256_extractf128_si256(almostthere, 1); + _mm_storeu_si128( reinterpret_cast<__m128i *>(output + 16 - count_ones(mask & 0xFFFF)), v128); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m256i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t values[32]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15, + int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23, + int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31 + ) : simd8(_mm256_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v16,v17,v18,v19,v20,v21,v22,v23, + v24,v25,v26,v27,v28,v29,v30,v31 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm256_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm256_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm256_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm256_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m256i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[32]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15, + uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23, + uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31 + ) : simd8(_mm256_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v16,v17,v18,v19,v20,v21,v22,v23, + v24,v25,v26,v27,v28,v29,v30,v31 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm256_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm256_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm256_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm256_min_epu8(other, *this); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->lt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm256_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm256_testz_si256(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm256_testz_si256(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm256_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm256_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm256_movemask_epi8(_mm256_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 2, "Haswell kernel should use two registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1) : chunks{chunk0, chunk1} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+32)} {} + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + uint32_t mask1 = uint32_t(mask); + uint32_t mask2 = uint32_t(mask >> 32); + this->chunks[0].compress(mask1, output); + this->chunks[1].compress(mask2, output + 32 - count_ones(mask1)); + return 64 - count_ones(mask); + } + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r_lo = uint32_t(this->chunks[0].to_bitmask()); + uint64_t r_hi = this->chunks[1].to_bitmask(); + return r_lo | (r_hi << 32); + } + + simdjson_inline simd8 reduce_or() const { + return this->chunks[0] | this->chunks[1]; + } + + simdjson_inline simd8x64 bit_or(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] | mask, + this->chunks[1] | mask + ); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_SIMD_H +/* end file simdjson/haswell/simd.h */ +/* including simdjson/haswell/stringparsing_defs.h: #include "simdjson/haswell/stringparsing_defs.h" */ +/* begin file simdjson/haswell/stringparsing_defs.h */ +#ifndef SIMDJSON_HASWELL_STRINGPARSING_DEFS_H +#define SIMDJSON_HASWELL_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 15 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v(src); + // store to dest unconditionally - we can overwrite the bits we don't like later + v.store(dst); + return { + static_cast((v == '\\').to_bitmask()), // bs_bits + static_cast((v == '"').to_bitmask()), // quote_bits + }; +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_STRINGPARSING_DEFS_H +/* end file simdjson/haswell/stringparsing_defs.h */ +/* end file simdjson/haswell/begin.h */ +/* including simdjson/generic/amalgamated.h for haswell: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for haswell */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for haswell: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for haswell */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for haswell */ +/* including simdjson/generic/jsoncharutils.h for haswell: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for haswell */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for haswell */ +/* including simdjson/generic/atomparsing.h for haswell: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for haswell */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace haswell { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for haswell */ +/* including simdjson/generic/dom_parser_implementation.h for haswell: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for haswell */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace haswell +} // namespace simdjson + +namespace simdjson { +namespace haswell { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for haswell */ +/* including simdjson/generic/implementation_simdjson_result_base.h for haswell: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for haswell */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for haswell */ +/* including simdjson/generic/numberparsing.h for haswell: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for haswell */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace haswell { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for haswell */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for haswell: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for haswell */ +/* end file simdjson/generic/amalgamated.h for haswell */ +/* including simdjson/haswell/end.h: #include "simdjson/haswell/end.h" */ +/* begin file simdjson/haswell/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_HASWELL +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "haswell" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/haswell/end.h */ + +#endif // SIMDJSON_HASWELL_H +/* end file simdjson/haswell.h */ +/* including simdjson/haswell/implementation.h: #include */ +/* begin file simdjson/haswell/implementation.h */ +#ifndef SIMDJSON_HASWELL_IMPLEMENTATION_H +#define SIMDJSON_HASWELL_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_HASWELL +namespace simdjson { +namespace haswell { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation( + "haswell", + "Intel/AMD AVX2", + internal::instruction_set::AVX2 | internal::instruction_set::PCLMULQDQ | internal::instruction_set::BMI1 | internal::instruction_set::BMI2 + ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_IMPLEMENTATION_H +/* end file simdjson/haswell/implementation.h */ + +/* including simdjson/haswell/begin.h: #include */ +/* begin file simdjson/haswell/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "haswell" */ +#define SIMDJSON_IMPLEMENTATION haswell + +/* including simdjson/haswell/base.h: #include "simdjson/haswell/base.h" */ +/* begin file simdjson/haswell/base.h */ +#ifndef SIMDJSON_HASWELL_BASE_H +#define SIMDJSON_HASWELL_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_HASWELL +namespace simdjson { +/** + * Implementation for Haswell (Intel AVX2). + */ +namespace haswell { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BASE_H +/* end file simdjson/haswell/base.h */ +/* including simdjson/haswell/intrinsics.h: #include "simdjson/haswell/intrinsics.h" */ +/* begin file simdjson/haswell/intrinsics.h */ +#ifndef SIMDJSON_HASWELL_INTRINSICS_H +#define SIMDJSON_HASWELL_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + * e.g., if __AVX2__ is set... in turn, we normally set these + * macros by compiling against the corresponding architecture + * (e.g., arch:AVX2, -mavx2, etc.) which compiles the whole + * software with these advanced instructions. In simdjson, we + * want to compile the whole program for a generic target, + * and only target our specific kernels. As a workaround, + * we directly include the needed headers. These headers would + * normally guard against such usage, but we carefully included + * (or ) before, so the headers + * are fooled. + */ +#include // for _blsr_u64 +#include // for __lzcnt64 +#include // for most things (AVX2, AVX512, _popcnt64) +#include +#include +#include +#include +#include // for _mm_clmulepi64_si128 +// unfortunately, we may not get _blsr_u64, but, thankfully, clang +// has it as a macro. +#ifndef _blsr_u64 +// we roll our own +#define _blsr_u64(n) ((n - 1) & n) +#endif // _blsr_u64 +#endif // SIMDJSON_CLANG_VISUAL_STUDIO + +static_assert(sizeof(__m256i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for haswell kernel."); + +#endif // SIMDJSON_HASWELL_INTRINSICS_H +/* end file simdjson/haswell/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_HASWELL +SIMDJSON_TARGET_REGION("avx2,bmi,pclmul,lzcnt,popcnt") +#endif + +/* including simdjson/haswell/bitmanipulation.h: #include "simdjson/haswell/bitmanipulation.h" */ +/* begin file simdjson/haswell/bitmanipulation.h */ +#ifndef SIMDJSON_HASWELL_BITMANIPULATION_H +#define SIMDJSON_HASWELL_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmask.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return (int)_tzcnt_u64(input_num); +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + //////// + // You might expect the next line to be equivalent to + // return (int)_tzcnt_u64(input_num); + // but the generated code differs and might be less efficient? + //////// + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return _blsr_u64(input_num); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { + return int(_lzcnt_u64(input_num)); +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BITMANIPULATION_H +/* end file simdjson/haswell/bitmanipulation.h */ +/* including simdjson/haswell/bitmask.h: #include "simdjson/haswell/bitmask.h" */ +/* begin file simdjson/haswell/bitmask.h */ +#ifndef SIMDJSON_HASWELL_BITMASK_H +#define SIMDJSON_HASWELL_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processor supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BITMASK_H +/* end file simdjson/haswell/bitmask.h */ +/* including simdjson/haswell/numberparsing_defs.h: #include "simdjson/haswell/numberparsing_defs.h" */ +/* begin file simdjson/haswell/numberparsing_defs.h */ +#ifndef SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H +#define SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace numberparsing { + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace haswell +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H +/* end file simdjson/haswell/numberparsing_defs.h */ +/* including simdjson/haswell/simd.h: #include "simdjson/haswell/simd.h" */ +/* begin file simdjson/haswell/simd.h */ +#ifndef SIMDJSON_HASWELL_SIMD_H +#define SIMDJSON_HASWELL_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace simd { + + // Forward-declared so they can be used by splat and friends. + template + struct base { + __m256i value; + + // Zero constructor + simdjson_inline base() : value{__m256i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m256i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m256i&() const { return this->value; } + simdjson_inline operator __m256i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm256_or_si256(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm256_and_si256(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm256_xor_si256(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm256_andnot_si256(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + // Forward-declared so they can be used by splat and friends. + template + struct simd8; + + template> + struct base8: base> { + typedef uint32_t bitmask_t; + typedef uint64_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m256i _value) : base>(_value) {} + + friend simdjson_really_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm256_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm256_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m256i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm256_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm256_testz_si256(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm256_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm256_setzero_si256(); } + static simdjson_inline simd8 load(const T values[32]) { + return _mm256_loadu_si256(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m256i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[32]) const { return _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst), *this); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm256_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm256_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm256_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint32_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in four steps, first 8 bytes and then second 8 bytes... + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // second least significant 8 bits + uint8_t mask3 = uint8_t(mask >> 16); // ... + uint8_t mask4 = uint8_t(mask >> 24); // ... + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m256i shufmask = _mm256_set_epi64x(thintable_epi8[mask4], thintable_epi8[mask3], + thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask and so forth + shufmask = + _mm256_add_epi8(shufmask, _mm256_set_epi32(0x18181818, 0x18181818, + 0x10101010, 0x10101010, 0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m256i pruned = _mm256_shuffle_epi8(*this, shufmask); + // we still need to put the pieces back together. + // we compute the popcount of the first words: + int pop1 = BitsSetTable256mul2[mask1]; + int pop3 = BitsSetTable256mul2[mask3]; + + // then load the corresponding mask + // could be done with _mm256_loadu2_m128i but many standard libraries omit this intrinsic. + __m256i v256 = _mm256_castsi128_si256( + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8))); + __m256i compactmask = _mm256_insertf128_si256(v256, + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop3 * 8)), 1); + __m256i almostthere = _mm256_shuffle_epi8(pruned, compactmask); + // We just need to write out the result. + // This is the tricky bit that is hard to do + // if we want to return a SIMD register, since there + // is no single-instruction approach to recombine + // the two 128-bit lanes with an offset. + __m128i v128; + v128 = _mm256_castsi256_si128(almostthere); + _mm_storeu_si128( reinterpret_cast<__m128i *>(output), v128); + v128 = _mm256_extractf128_si256(almostthere, 1); + _mm_storeu_si128( reinterpret_cast<__m128i *>(output + 16 - count_ones(mask & 0xFFFF)), v128); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m256i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t values[32]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15, + int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23, + int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31 + ) : simd8(_mm256_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v16,v17,v18,v19,v20,v21,v22,v23, + v24,v25,v26,v27,v28,v29,v30,v31 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm256_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm256_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm256_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm256_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m256i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[32]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15, + uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23, + uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31 + ) : simd8(_mm256_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v16,v17,v18,v19,v20,v21,v22,v23, + v24,v25,v26,v27,v28,v29,v30,v31 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm256_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm256_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm256_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm256_min_epu8(other, *this); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->lt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm256_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm256_testz_si256(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm256_testz_si256(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm256_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm256_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm256_movemask_epi8(_mm256_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 2, "Haswell kernel should use two registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1) : chunks{chunk0, chunk1} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+32)} {} + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + uint32_t mask1 = uint32_t(mask); + uint32_t mask2 = uint32_t(mask >> 32); + this->chunks[0].compress(mask1, output); + this->chunks[1].compress(mask2, output + 32 - count_ones(mask1)); + return 64 - count_ones(mask); + } + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r_lo = uint32_t(this->chunks[0].to_bitmask()); + uint64_t r_hi = this->chunks[1].to_bitmask(); + return r_lo | (r_hi << 32); + } + + simdjson_inline simd8 reduce_or() const { + return this->chunks[0] | this->chunks[1]; + } + + simdjson_inline simd8x64 bit_or(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] | mask, + this->chunks[1] | mask + ); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_SIMD_H +/* end file simdjson/haswell/simd.h */ +/* including simdjson/haswell/stringparsing_defs.h: #include "simdjson/haswell/stringparsing_defs.h" */ +/* begin file simdjson/haswell/stringparsing_defs.h */ +#ifndef SIMDJSON_HASWELL_STRINGPARSING_DEFS_H +#define SIMDJSON_HASWELL_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 15 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v(src); + // store to dest unconditionally - we can overwrite the bits we don't like later + v.store(dst); + return { + static_cast((v == '\\').to_bitmask()), // bs_bits + static_cast((v == '"').to_bitmask()), // quote_bits + }; +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_STRINGPARSING_DEFS_H +/* end file simdjson/haswell/stringparsing_defs.h */ +/* end file simdjson/haswell/begin.h */ +/* including generic/amalgamated.h for haswell: #include */ +/* begin file generic/amalgamated.h for haswell */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_SRC_GENERIC_DEPENDENCIES_H) +#error generic/dependencies.h must be included before generic/amalgamated.h! +#endif + +/* including generic/base.h for haswell: #include */ +/* begin file generic/base.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +struct json_character_block; + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_BASE_H +/* end file generic/base.h for haswell */ +/* including generic/dom_parser_implementation.h for haswell: #include */ +/* begin file generic/dom_parser_implementation.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// Interface a dom parser implementation must fulfill +namespace simdjson { +namespace haswell { +namespace { + +simdjson_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3); +simdjson_inline bool is_ascii(const simd8x64& input); + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file generic/dom_parser_implementation.h for haswell */ +/* including generic/json_character_block.h for haswell: #include */ +/* begin file generic/json_character_block.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +struct json_character_block { + static simdjson_inline json_character_block classify(const simd::simd8x64& in); + + simdjson_inline uint64_t whitespace() const noexcept { return _whitespace; } + simdjson_inline uint64_t op() const noexcept { return _op; } + simdjson_inline uint64_t scalar() const noexcept { return ~(op() | whitespace()); } + + uint64_t _whitespace; + uint64_t _op; +}; + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H +/* end file generic/json_character_block.h for haswell */ +/* end file generic/amalgamated.h for haswell */ +/* including generic/stage1/amalgamated.h for haswell: #include */ +/* begin file generic/stage1/amalgamated.h for haswell */ +// Stuff other things depend on +/* including generic/stage1/base.h for haswell: #include */ +/* begin file generic/stage1/base.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace stage1 { + +class bit_indexer; +template +struct buf_block_reader; +struct json_block; +class json_minifier; +class json_scanner; +struct json_string_block; +class json_string_scanner; +class json_structural_indexer; + +} // namespace stage1 + +namespace utf8_validation { +struct utf8_checker; +} // namespace utf8_validation + +using utf8_validation::utf8_checker; + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_BASE_H +/* end file generic/stage1/base.h for haswell */ +/* including generic/stage1/buf_block_reader.h for haswell: #include */ +/* begin file generic/stage1/buf_block_reader.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace haswell { +namespace { +namespace stage1 { + +// Walks through a buffer in block-sized increments, loading the last part with spaces +template +struct buf_block_reader { +public: + simdjson_inline buf_block_reader(const uint8_t *_buf, size_t _len); + simdjson_inline size_t block_index(); + simdjson_inline bool has_full_block() const; + simdjson_inline const uint8_t *full_block() const; + /** + * Get the last block, padded with spaces. + * + * There will always be a last block, with at least 1 byte, unless len == 0 (in which case this + * function fills the buffer with spaces and returns 0. In particular, if len == STEP_SIZE there + * will be 0 full_blocks and 1 remainder block with STEP_SIZE bytes and no spaces for padding. + * + * @return the number of effective characters in the last block. + */ + simdjson_inline size_t get_remainder(uint8_t *dst) const; + simdjson_inline void advance(); +private: + const uint8_t *buf; + const size_t len; + const size_t lenminusstep; + size_t idx; +}; + +// Routines to print masks and text for debugging bitmask operations +simdjson_unused static char * format_input_text_64(const uint8_t *text) { + static char buf[sizeof(simd8x64) + 1]; + for (size_t i=0; i); i++) { + buf[i] = int8_t(text[i]) < ' ' ? '_' : int8_t(text[i]); + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +// Routines to print masks and text for debugging bitmask operations +simdjson_unused static char * format_input_text(const simd8x64& in) { + static char buf[sizeof(simd8x64) + 1]; + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] < ' ') { buf[i] = '_'; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdjson_unused static char * format_input_text(const simd8x64& in, uint64_t mask) { + static char buf[sizeof(simd8x64) + 1]; + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] <= ' ') { buf[i] = '_'; } + if (!(mask & (size_t(1) << i))) { buf[i] = ' '; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdjson_unused static char * format_mask(uint64_t mask) { + static char buf[sizeof(simd8x64) + 1]; + for (size_t i=0; i<64; i++) { + buf[i] = (mask & (size_t(1) << i)) ? 'X' : ' '; + } + buf[64] = '\0'; + return buf; +} + +template +simdjson_inline buf_block_reader::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {} + +template +simdjson_inline size_t buf_block_reader::block_index() { return idx; } + +template +simdjson_inline bool buf_block_reader::has_full_block() const { + return idx < lenminusstep; +} + +template +simdjson_inline const uint8_t *buf_block_reader::full_block() const { + return &buf[idx]; +} + +template +simdjson_inline size_t buf_block_reader::get_remainder(uint8_t *dst) const { + if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers + std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once. + std::memcpy(dst, buf + idx, len - idx); + return len - idx; +} + +template +simdjson_inline void buf_block_reader::advance() { + idx += STEP_SIZE; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H +/* end file generic/stage1/buf_block_reader.h for haswell */ +/* including generic/stage1/json_escape_scanner.h for haswell: #include */ +/* begin file generic/stage1/json_escape_scanner.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_ESCAPE_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_ESCAPE_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace stage1 { + +/** + * Scans for escape characters in JSON, taking care with multiple backslashes (\\n vs. \n). + */ +struct json_escape_scanner { + /** The actual escape characters (the backslashes themselves). */ + uint64_t next_is_escaped = 0ULL; + + struct escaped_and_escape { + /** + * Mask of escaped characters. + * + * ``` + * \n \\n \\\n \\\\n \ + * 0100100010100101000 + * n \ \ n \ \ + * ``` + */ + uint64_t escaped; + /** + * Mask of escape characters. + * + * ``` + * \n \\n \\\n \\\\n \ + * 1001000101001010001 + * \ \ \ \ \ \ \ + * ``` + */ + uint64_t escape; + }; + + /** + * Get a mask of both escape and escaped characters (the characters following a backslash). + * + * @param potential_escape A mask of the character that can escape others (but could be + * escaped itself). e.g. block.eq('\\') + */ + simdjson_really_inline escaped_and_escape next(uint64_t backslash) noexcept { + +#if !SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT + if (!backslash) { return {next_escaped_without_backslashes(), 0}; } +#endif + + // | | Mask (shows characters instead of 1's) | Depth | Instructions | + // |--------------------------------|----------------------------------------|-------|---------------------| + // | string | `\\n_\\\n___\\\n___\\\\___\\\\__\\\` | | | + // | | ` even odd even odd odd` | | | + // | potential_escape | ` \ \\\ \\\ \\\\ \\\\ \\\` | 1 | 1 (backslash & ~first_is_escaped) + // | escape_and_terminal_code | ` \n \ \n \ \n \ \ \ \ \ \` | 5 | 5 (next_escape_and_terminal_code()) + // | escaped | `\ \ n \ n \ \ \ \ \ ` X | 6 | 7 (escape_and_terminal_code ^ (potential_escape | first_is_escaped)) + // | escape | ` \ \ \ \ \ \ \ \ \ \` | 6 | 8 (escape_and_terminal_code & backslash) + // | first_is_escaped | `\ ` | 7 (*) | 9 (escape >> 63) () + // (*) this is not needed until the next iteration + uint64_t escape_and_terminal_code = next_escape_and_terminal_code(backslash & ~this->next_is_escaped); + uint64_t escaped = escape_and_terminal_code ^ (backslash | this->next_is_escaped); + uint64_t escape = escape_and_terminal_code & backslash; + this->next_is_escaped = escape >> 63; + return {escaped, escape}; + } + +private: + static constexpr const uint64_t ODD_BITS = 0xAAAAAAAAAAAAAAAAULL; + + simdjson_really_inline uint64_t next_escaped_without_backslashes() noexcept { + uint64_t escaped = this->next_is_escaped; + this->next_is_escaped = 0; + return escaped; + } + + /** + * Returns a mask of the next escape characters (masking out escaped backslashes), along with + * any non-backslash escape codes. + * + * \n \\n \\\n \\\\n returns: + * \n \ \ \n \ \ + * 11 100 1011 10100 + * + * You are expected to mask out the first bit yourself if the previous block had a trailing + * escape. + * + * & the result with potential_escape to get just the escape characters. + * ^ the result with (potential_escape | first_is_escaped) to get escaped characters. + */ + static simdjson_really_inline uint64_t next_escape_and_terminal_code(uint64_t potential_escape) noexcept { + // If we were to just shift and mask out any odd bits, we'd actually get a *half* right answer: + // any even-aligned backslash runs would be correct! Odd-aligned backslash runs would be + // inverted (\\\ would be 010 instead of 101). + // + // ``` + // string: | ____\\\\_\\\\_____ | + // maybe_escaped | ODD | \ \ \ \ | + // even-aligned ^^^ ^^^^ odd-aligned + // ``` + // + // Taking that into account, our basic strategy is: + // + // 1. Use subtraction to produce a mask with 1's for even-aligned runs and 0's for + // odd-aligned runs. + // 2. XOR all odd bits, which masks out the odd bits in even-aligned runs, and brings IN the + // odd bits in odd-aligned runs. + // 3. & with backslash to clean up any stray bits. + // runs are set to 0, and then XORing with "odd": + // + // | | Mask (shows characters instead of 1's) | Instructions | + // |--------------------------------|----------------------------------------|---------------------| + // | string | `\\n_\\\n___\\\n___\\\\___\\\\__\\\` | + // | | ` even odd even odd odd` | + // | maybe_escaped | ` n \\n \\n \\\_ \\\_ \\` X | 1 (potential_escape << 1) + // | maybe_escaped_and_odd | ` \n_ \\n _ \\\n_ _ \\\__ _\\\_ \\\` | 1 (maybe_escaped | odd) + // | even_series_codes_and_odd | ` n_\\\ _ n_ _\\\\ _ _ ` | 1 (maybe_escaped_and_odd - potential_escape) + // | escape_and_terminal_code | ` \n \ \n \ \n \ \ \ \ \ \` | 1 (^ odd) + // + + // Escaped characters are characters following an escape. + uint64_t maybe_escaped = potential_escape << 1; + + // To distinguish odd from even escape sequences, therefore, we turn on any *starting* + // escapes that are on an odd byte. (We actually bring in all odd bits, for speed.) + // - Odd runs of backslashes are 0000, and the code at the end ("n" in \n or \\n) is 1. + // - Odd runs of backslashes are 1111, and the code at the end ("n" in \n or \\n) is 0. + // - All other odd bytes are 1, and even bytes are 0. + uint64_t maybe_escaped_and_odd_bits = maybe_escaped | ODD_BITS; + uint64_t even_series_codes_and_odd_bits = maybe_escaped_and_odd_bits - potential_escape; + + // Now we flip all odd bytes back with xor. This: + // - Makes odd runs of backslashes go from 0000 to 1010 + // - Makes even runs of backslashes go from 1111 to 1010 + // - Sets actually-escaped codes to 1 (the n in \n and \\n: \n = 11, \\n = 100) + // - Resets all other bytes to 0 + return even_series_codes_and_odd_bits ^ ODD_BITS; + } +}; + +} // namespace stage1 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H +/* end file generic/stage1/json_escape_scanner.h for haswell */ +/* including generic/stage1/json_string_scanner.h for haswell: #include */ +/* begin file generic/stage1/json_string_scanner.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace stage1 { + +struct json_string_block { + // We spell out the constructors in the hope of resolving inlining issues with Visual Studio 2017 + simdjson_really_inline json_string_block(uint64_t escaped, uint64_t quote, uint64_t in_string) : + _escaped(escaped), _quote(quote), _in_string(in_string) {} + + // Escaped characters (characters following an escape() character) + simdjson_really_inline uint64_t escaped() const { return _escaped; } + // Real (non-backslashed) quotes + simdjson_really_inline uint64_t quote() const { return _quote; } + // Only characters inside the string (not including the quotes) + simdjson_really_inline uint64_t string_content() const { return _in_string & ~_quote; } + // Return a mask of whether the given characters are inside a string (only works on non-quotes) + simdjson_really_inline uint64_t non_quote_inside_string(uint64_t mask) const { return mask & _in_string; } + // Return a mask of whether the given characters are inside a string (only works on non-quotes) + simdjson_really_inline uint64_t non_quote_outside_string(uint64_t mask) const { return mask & ~_in_string; } + // Tail of string (everything except the start quote) + simdjson_really_inline uint64_t string_tail() const { return _in_string ^ _quote; } + + // escaped characters (backslashed--does not include the hex characters after \u) + uint64_t _escaped; + // real quotes (non-escaped ones) + uint64_t _quote; + // string characters (includes start quote but not end quote) + uint64_t _in_string; +}; + +// Scans blocks for string characters, storing the state necessary to do so +class json_string_scanner { +public: + simdjson_really_inline json_string_block next(const simd::simd8x64& in); + // Returns either UNCLOSED_STRING or SUCCESS + simdjson_really_inline error_code finish(); + +private: + // Scans for escape characters + json_escape_scanner escape_scanner{}; + // Whether the last iteration was still inside a string (all 1's = true, all 0's = false). + uint64_t prev_in_string = 0ULL; +}; + +// +// Return a mask of all string characters plus end quotes. +// +// prev_escaped is overflow saying whether the next character is escaped. +// prev_in_string is overflow saying whether we're still in a string. +// +// Backslash sequences outside of quotes will be detected in stage 2. +// +simdjson_really_inline json_string_block json_string_scanner::next(const simd::simd8x64& in) { + const uint64_t backslash = in.eq('\\'); + const uint64_t escaped = escape_scanner.next(backslash).escaped; + const uint64_t quote = in.eq('"') & ~escaped; + + // + // prefix_xor flips on bits inside the string (and flips off the end quote). + // + // Then we xor with prev_in_string: if we were in a string already, its effect is flipped + // (characters inside strings are outside, and characters outside strings are inside). + // + const uint64_t in_string = prefix_xor(quote) ^ prev_in_string; + + // + // Check if we're still in a string at the end of the box so the next block will know + // + prev_in_string = uint64_t(static_cast(in_string) >> 63); + + // Use ^ to turn the beginning quote off, and the end quote on. + + // We are returning a function-local object so either we get a move constructor + // or we get copy elision. + return json_string_block(escaped, quote, in_string); +} + +simdjson_really_inline error_code json_string_scanner::finish() { + if (prev_in_string) { + return UNCLOSED_STRING; + } + return SUCCESS; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H +/* end file generic/stage1/json_string_scanner.h for haswell */ +/* including generic/stage1/utf8_lookup4_algorithm.h for haswell: #include */ +/* begin file generic/stage1/utf8_lookup4_algorithm.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace utf8_validation { + +using namespace simd; + + simdjson_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) +// Bit 1 = Too Long (ASCII followed by continuation) +// Bit 2 = Overlong 3-byte +// Bit 4 = Surrogate +// Bit 5 = Overlong 2-byte +// Bit 7 = Two Continuations + constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ + // 11______ 11______ + constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ + constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ + constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ + constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ + constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ + constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ + // 11110100 101_____ + // 11110101 1001____ + // 11110101 101_____ + // 1111011_ 1001____ + // 1111011_ 101_____ + // 11111___ 1001____ + // 11111___ 101_____ + constexpr const uint8_t TOO_LARGE_1000 = 1<<6; + // 11110101 1000____ + // 1111011_ 1000____ + // 11111___ 1000____ + constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + + const simd8 byte_1_high = prev1.shr<4>().lookup_16( + // 0_______ ________ + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + // 10______ ________ + TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, + // 1100____ ________ + TOO_SHORT | OVERLONG_2, + // 1101____ ________ + TOO_SHORT, + // 1110____ ________ + TOO_SHORT | OVERLONG_3 | SURROGATE, + // 1111____ ________ + TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + ); + constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . + const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( + // ____0000 ________ + CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, + // ____0001 ________ + CARRY | OVERLONG_2, + // ____001_ ________ + CARRY, + CARRY, + + // ____0100 ________ + CARRY | TOO_LARGE, + // ____0101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____011_ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + + // ____1___ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____1101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000 + ); + const simd8 byte_2_high = input.shr<4>().lookup_16( + // ________ 0_______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + simdjson_inline simd8 check_multibyte_lengths(const simd8 input, + const simd8 prev_input, const simd8 sc) { + simd8 prev2 = input.prev<2>(prev_input); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; + } + + // + // Return nonzero if there are incomplete multibyte characters at the end of the block: + // e.g. if there is a 4-byte character, but it's 3 bytes from the end. + // + simdjson_inline simd8 is_incomplete(const simd8 input) { + // If the previous input's last 3 bytes match this, they're too short (they ended at EOF): + // ... 1111____ 111_____ 11______ +#if SIMDJSON_IMPLEMENTATION_ICELAKE + static const uint8_t max_array[64] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1 + }; +#else + static const uint8_t max_array[32] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1 + }; +#endif + const simd8 max_value(&max_array[sizeof(max_array)-sizeof(simd8)]); + return input.gt_bits(max_value); + } + + struct utf8_checker { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; + // The last input we received + simd8 prev_input_block; + // Whether the last input we received was incomplete (used for ASCII fast path) + simd8 prev_incomplete; + + // + // Check whether the current bytes are valid UTF-8. + // + simdjson_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + simd8 sc = check_special_cases(input, prev1); + this->error |= check_multibyte_lengths(input, prev_input, sc); + } + + // The only problem that can happen at EOF is that a multibyte character is too short + // or a byte value too large in the last bytes: check_special_cases only checks for bytes + // too large in the first of two bytes. + simdjson_inline void check_eof() { + // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't + // possibly finish them. + this->error |= this->prev_incomplete; + } + + simdjson_inline void check_next_input(const simd8x64& input) { + if(simdjson_likely(is_ascii(input))) { + this->error |= this->prev_incomplete; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 1) + ||(simd8x64::NUM_CHUNKS == 2) + || (simd8x64::NUM_CHUNKS == 4), + "We support one, two or four chunks per 64-byte block."); + SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 1) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + } else SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + this->prev_incomplete = is_incomplete(input.chunks[simd8x64::NUM_CHUNKS-1]); + this->prev_input_block = input.chunks[simd8x64::NUM_CHUNKS-1]; + } + } + // do not forget to call check_eof! + simdjson_inline error_code errors() { + return this->error.any_bits_set_anywhere() ? error_code::UTF8_ERROR : error_code::SUCCESS; + } + + }; // struct utf8_checker +} // namespace utf8_validation + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H +/* end file generic/stage1/utf8_lookup4_algorithm.h for haswell */ +/* including generic/stage1/json_scanner.h for haswell: #include */ +/* begin file generic/stage1/json_scanner.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace stage1 { + +/** + * A block of scanned json, with information on operators and scalars. + * + * We seek to identify pseudo-structural characters. Anything that is inside + * a string must be omitted (hence & ~_string.string_tail()). + * Otherwise, pseudo-structural characters come in two forms. + * 1. We have the structural characters ([,],{,},:, comma). The + * term 'structural character' is from the JSON RFC. + * 2. We have the 'scalar pseudo-structural characters'. + * Scalars are quotes, and any character except structural characters and white space. + * + * To identify the scalar pseudo-structural characters, we must look at what comes + * before them: it must be a space, a quote or a structural characters. + * Starting with simdjson v0.3, we identify them by + * negation: we identify everything that is followed by a non-quote scalar, + * and we negate that. Whatever remains must be a 'scalar pseudo-structural character'. + */ +struct json_block { +public: + // We spell out the constructors in the hope of resolving inlining issues with Visual Studio 2017 + simdjson_inline json_block(json_string_block&& string, json_character_block characters, uint64_t follows_potential_nonquote_scalar) : + _string(std::move(string)), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {} + simdjson_inline json_block(json_string_block string, json_character_block characters, uint64_t follows_potential_nonquote_scalar) : + _string(string), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {} + + /** + * The start of structurals. + * In simdjson prior to v0.3, these were called the pseudo-structural characters. + **/ + simdjson_inline uint64_t structural_start() const noexcept { return potential_structural_start() & ~_string.string_tail(); } + /** All JSON whitespace (i.e. not in a string) */ + simdjson_inline uint64_t whitespace() const noexcept { return non_quote_outside_string(_characters.whitespace()); } + + // Helpers + + /** Whether the given characters are inside a string (only works on non-quotes) */ + simdjson_inline uint64_t non_quote_inside_string(uint64_t mask) const noexcept { return _string.non_quote_inside_string(mask); } + /** Whether the given characters are outside a string (only works on non-quotes) */ + simdjson_inline uint64_t non_quote_outside_string(uint64_t mask) const noexcept { return _string.non_quote_outside_string(mask); } + + // string and escape characters + json_string_block _string; + // whitespace, structural characters ('operators'), scalars + json_character_block _characters; + // whether the previous character was a scalar + uint64_t _follows_potential_nonquote_scalar; +private: + // Potential structurals (i.e. disregarding strings) + + /** + * structural elements ([,],{,},:, comma) plus scalar starts like 123, true and "abc". + * They may reside inside a string. + **/ + simdjson_inline uint64_t potential_structural_start() const noexcept { return _characters.op() | potential_scalar_start(); } + /** + * The start of non-operator runs, like 123, true and "abc". + * It main reside inside a string. + **/ + simdjson_inline uint64_t potential_scalar_start() const noexcept { + // The term "scalar" refers to anything except structural characters and white space + // (so letters, numbers, quotes). + // Whenever it is preceded by something that is not a structural element ({,},[,],:, ") nor a white-space + // then we know that it is irrelevant structurally. + return _characters.scalar() & ~follows_potential_scalar(); + } + /** + * Whether the given character is immediately after a non-operator like 123, true. + * The characters following a quote are not included. + */ + simdjson_inline uint64_t follows_potential_scalar() const noexcept { + // _follows_potential_nonquote_scalar: is defined as marking any character that follows a character + // that is not a structural element ({,},[,],:, comma) nor a quote (") and that is not a + // white space. + // It is understood that within quoted region, anything at all could be marked (irrelevant). + return _follows_potential_nonquote_scalar; + } +}; + +/** + * Scans JSON for important bits: structural characters or 'operators', strings, and scalars. + * + * The scanner starts by calculating two distinct things: + * - string characters (taking \" into account) + * - structural characters or 'operators' ([]{},:, comma) + * and scalars (runs of non-operators like 123, true and "abc") + * + * To minimize data dependency (a key component of the scanner's speed), it finds these in parallel: + * in particular, the operator/scalar bit will find plenty of things that are actually part of + * strings. When we're done, json_block will fuse the two together by masking out tokens that are + * part of a string. + */ +class json_scanner { +public: + json_scanner() = default; + simdjson_inline json_block next(const simd::simd8x64& in); + // Returns either UNCLOSED_STRING or SUCCESS + simdjson_inline error_code finish(); + +private: + // Whether the last character of the previous iteration is part of a scalar token + // (anything except whitespace or a structural character/'operator'). + uint64_t prev_scalar = 0ULL; + json_string_scanner string_scanner{}; +}; + + +// +// Check if the current character immediately follows a matching character. +// +// For example, this checks for quotes with backslashes in front of them: +// +// const uint64_t backslashed_quote = in.eq('"') & immediately_follows(in.eq('\'), prev_backslash); +// +simdjson_inline uint64_t follows(const uint64_t match, uint64_t &overflow) { + const uint64_t result = match << 1 | overflow; + overflow = match >> 63; + return result; +} + +simdjson_inline json_block json_scanner::next(const simd::simd8x64& in) { + json_string_block strings = string_scanner.next(in); + // identifies the white-space and the structural characters + json_character_block characters = json_character_block::classify(in); + // The term "scalar" refers to anything except structural characters and white space + // (so letters, numbers, quotes). + // We want follows_scalar to mark anything that follows a non-quote scalar (so letters and numbers). + // + // A terminal quote should either be followed by a structural character (comma, brace, bracket, colon) + // or nothing. However, we still want ' "a string"true ' to mark the 't' of 'true' as a potential + // pseudo-structural character just like we would if we had ' "a string" true '; otherwise we + // may need to add an extra check when parsing strings. + // + // Performance: there are many ways to skin this cat. + const uint64_t nonquote_scalar = characters.scalar() & ~strings.quote(); + uint64_t follows_nonquote_scalar = follows(nonquote_scalar, prev_scalar); + // We are returning a function-local object so either we get a move constructor + // or we get copy elision. + return json_block( + strings,// strings is a function-local object so either it moves or the copy is elided. + characters, + follows_nonquote_scalar + ); +} + +simdjson_inline error_code json_scanner::finish() { + return string_scanner.finish(); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H +/* end file generic/stage1/json_scanner.h for haswell */ + +// All other declarations +/* including generic/stage1/find_next_document_index.h for haswell: #include */ +/* begin file generic/stage1/find_next_document_index.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace stage1 { + +/** + * This algorithm is used to quickly identify the last structural position that + * makes up a complete document. + * + * It does this by going backwards and finding the last *document boundary* (a + * place where one value follows another without a comma between them). If the + * last document (the characters after the boundary) has an equal number of + * start and end brackets, it is considered complete. + * + * Simply put, we iterate over the structural characters, starting from + * the end. We consider that we found the end of a JSON document when the + * first element of the pair is NOT one of these characters: '{' '[' ':' ',' + * and when the second element is NOT one of these characters: '}' ']' ':' ','. + * + * This simple comparison works most of the time, but it does not cover cases + * where the batch's structural indexes contain a perfect amount of documents. + * In such a case, we do not have access to the structural index which follows + * the last document, therefore, we do not have access to the second element in + * the pair, and that means we cannot identify the last document. To fix this + * issue, we keep a count of the open and closed curly/square braces we found + * while searching for the pair. When we find a pair AND the count of open and + * closed curly/square braces is the same, we know that we just passed a + * complete document, therefore the last json buffer location is the end of the + * batch. + */ +simdjson_inline uint32_t find_next_document_index(dom_parser_implementation &parser) { + // Variant: do not count separately, just figure out depth + if(parser.n_structural_indexes == 0) { return 0; } + auto arr_cnt = 0; + auto obj_cnt = 0; + for (auto i = parser.n_structural_indexes - 1; i > 0; i--) { + auto idxb = parser.structural_indexes[i]; + switch (parser.buf[idxb]) { + case ':': + case ',': + continue; + case '}': + obj_cnt--; + continue; + case ']': + arr_cnt--; + continue; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + auto idxa = parser.structural_indexes[i - 1]; + switch (parser.buf[idxa]) { + case '{': + case '[': + case ':': + case ',': + continue; + } + // Last document is complete, so the next document will appear after! + if (!arr_cnt && !obj_cnt) { + return parser.n_structural_indexes; + } + // Last document is incomplete; mark the document at i + 1 as the next one + return i; + } + // If we made it to the end, we want to finish counting to see if we have a full document. + switch (parser.buf[parser.structural_indexes[0]]) { + case '}': + obj_cnt--; + break; + case ']': + arr_cnt--; + break; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + if (!arr_cnt && !obj_cnt) { + // We have a complete document. + return parser.n_structural_indexes; + } + return 0; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H +/* end file generic/stage1/find_next_document_index.h for haswell */ +/* including generic/stage1/json_minifier.h for haswell: #include */ +/* begin file generic/stage1/json_minifier.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses in stage1 +// It is intended to be included multiple times and compiled multiple times +// We assume the file in which it is included already includes +// "simdjson/stage1.h" (this simplifies amalgation) + +namespace simdjson { +namespace haswell { +namespace { +namespace stage1 { + +class json_minifier { +public: + template + static error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept; + +private: + simdjson_inline json_minifier(uint8_t *_dst) + : dst{_dst} + {} + template + simdjson_inline void step(const uint8_t *block_buf, buf_block_reader &reader) noexcept; + simdjson_inline void next(const simd::simd8x64& in, const json_block& block); + simdjson_inline error_code finish(uint8_t *dst_start, size_t &dst_len); + json_scanner scanner{}; + uint8_t *dst; +}; + +simdjson_inline void json_minifier::next(const simd::simd8x64& in, const json_block& block) { + uint64_t mask = block.whitespace(); + dst += in.compress(mask, dst); +} + +simdjson_inline error_code json_minifier::finish(uint8_t *dst_start, size_t &dst_len) { + error_code error = scanner.finish(); + if (error) { dst_len = 0; return error; } + dst_len = dst - dst_start; + return SUCCESS; +} + +template<> +simdjson_inline void json_minifier::step<128>(const uint8_t *block_buf, buf_block_reader<128> &reader) noexcept { + simd::simd8x64 in_1(block_buf); + simd::simd8x64 in_2(block_buf+64); + json_block block_1 = scanner.next(in_1); + json_block block_2 = scanner.next(in_2); + this->next(in_1, block_1); + this->next(in_2, block_2); + reader.advance(); +} + +template<> +simdjson_inline void json_minifier::step<64>(const uint8_t *block_buf, buf_block_reader<64> &reader) noexcept { + simd::simd8x64 in_1(block_buf); + json_block block_1 = scanner.next(in_1); + this->next(block_buf, block_1); + reader.advance(); +} + +template +error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept { + buf_block_reader reader(buf, len); + json_minifier minifier(dst); + + // Index the first n-1 blocks + while (reader.has_full_block()) { + minifier.step(reader.full_block(), reader); + } + + // Index the last (remainder) block, padded with spaces + uint8_t block[STEP_SIZE]; + size_t remaining_bytes = reader.get_remainder(block); + if (remaining_bytes > 0) { + // We do not want to write directly to the output stream. Rather, we write + // to a local buffer (for safety). + uint8_t out_block[STEP_SIZE]; + uint8_t * const guarded_dst{minifier.dst}; + minifier.dst = out_block; + minifier.step(block, reader); + size_t to_write = minifier.dst - out_block; + // In some cases, we could be enticed to consider the padded spaces + // as part of the string. This is fine as long as we do not write more + // than we consumed. + if(to_write > remaining_bytes) { to_write = remaining_bytes; } + memcpy(guarded_dst, out_block, to_write); + minifier.dst = guarded_dst + to_write; + } + return minifier.finish(dst, dst_len); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H +/* end file generic/stage1/json_minifier.h for haswell */ +/* including generic/stage1/json_structural_indexer.h for haswell: #include */ +/* begin file generic/stage1/json_structural_indexer.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses in stage1 +// It is intended to be included multiple times and compiled multiple times +// We assume the file in which it is included already includes +// "simdjson/stage1.h" (this simplifies amalgation) + +namespace simdjson { +namespace haswell { +namespace { +namespace stage1 { + +class bit_indexer { +public: + uint32_t *tail; + + simdjson_inline bit_indexer(uint32_t *index_buf) : tail(index_buf) {} + +#if SIMDJSON_PREFER_REVERSE_BITS + /** + * ARM lacks a fast trailing zero instruction, but it has a fast + * bit reversal instruction and a fast leading zero instruction. + * Thus it may be profitable to reverse the bits (once) and then + * to rely on a sequence of instructions that call the leading + * zero instruction. + * + * Performance notes: + * The chosen routine is not optimal in terms of data dependency + * since zero_leading_bit might require two instructions. However, + * it tends to minimize the total number of instructions which is + * beneficial. + */ + simdjson_inline void write_index(uint32_t idx, uint64_t& rev_bits, int i) { + int lz = leading_zeroes(rev_bits); + this->tail[i] = static_cast(idx) + lz; + rev_bits = zero_leading_bit(rev_bits, lz); + } +#else + /** + * Under recent x64 systems, we often have both a fast trailing zero + * instruction and a fast 'clear-lower-bit' instruction so the following + * algorithm can be competitive. + */ + + simdjson_inline void write_index(uint32_t idx, uint64_t& bits, int i) { + this->tail[i] = idx + trailing_zeroes(bits); + bits = clear_lowest_bit(bits); + } +#endif // SIMDJSON_PREFER_REVERSE_BITS + + template + simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) { + write_index(idx, bits, START); + SIMDJSON_IF_CONSTEXPR (N > 1) { + write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits); + } + return START+N; + } + + template + simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) { + write_indexes(idx, bits); + SIMDJSON_IF_CONSTEXPR ((START+STEP) < END) { + if (simdjson_unlikely((START+STEP) < cnt)) { + write_indexes_stepped<(START+STEP(idx, bits, cnt); + } + } + return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP; + } + + // flatten out values in 'bits' assuming that they are are to have values of idx + // plus their position in the bitvector, and store these indexes at + // base_ptr[base] incrementing base as we go + // will potentially store extra values beyond end of valid bits, so base_ptr + // needs to be large enough to handle this + // + // If the kernel sets SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER, then it + // will provide its own version of the code. +#ifdef SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + simdjson_inline void write(uint32_t idx, uint64_t bits); +#else + simdjson_inline void write(uint32_t idx, uint64_t bits) { + // In some instances, the next branch is expensive because it is mispredicted. + // Unfortunately, in other cases, + // it helps tremendously. + if (bits == 0) + return; + + int cnt = static_cast(count_ones(bits)); + +#if SIMDJSON_PREFER_REVERSE_BITS + bits = reverse_bits(bits); +#endif +#ifdef SIMDJSON_STRUCTURAL_INDEXER_STEP + static constexpr const int STEP = SIMDJSON_STRUCTURAL_INDEXER_STEP; +#else + static constexpr const int STEP = 4; +#endif + static constexpr const int STEP_UNTIL = 24; + + write_indexes_stepped<0, STEP_UNTIL, STEP>(idx, bits, cnt); + SIMDJSON_IF_CONSTEXPR (STEP_UNTIL < 64) { + if (simdjson_unlikely(STEP_UNTIL < cnt)) { + for (int i=STEP_UNTIL; itail += cnt; + } +#endif // SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +}; + +class json_structural_indexer { +public: + /** + * Find the important bits of JSON in a 128-byte chunk, and add them to structural_indexes. + * + * @param partial Setting the partial parameter to true allows the find_structural_bits to + * tolerate unclosed strings. The caller should still ensure that the input is valid UTF-8. If + * you are processing substrings, you may want to call on a function like trimmed_length_safe_utf8. + */ + template + static error_code index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept; + +private: + simdjson_inline json_structural_indexer(uint32_t *structural_indexes); + template + simdjson_inline void step(const uint8_t *block, buf_block_reader &reader) noexcept; + simdjson_inline void next(const simd::simd8x64& in, const json_block& block, size_t idx); + simdjson_inline error_code finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial); + + json_scanner scanner{}; + utf8_checker checker{}; + bit_indexer indexer; + uint64_t prev_structurals = 0; + uint64_t unescaped_chars_error = 0; +}; + +simdjson_inline json_structural_indexer::json_structural_indexer(uint32_t *structural_indexes) : indexer{structural_indexes} {} + +// Skip the last character if it is partial +simdjson_inline size_t trim_partial_utf8(const uint8_t *buf, size_t len) { + if (simdjson_unlikely(len < 3)) { + switch (len) { + case 2: + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (buf[len-2] >= 0xe0) { return len-2; } // 3- and 4-byte characters with only 2 bytes left + return len; + case 1: + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + return len; + case 0: + return len; + } + } + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (buf[len-2] >= 0xe0) { return len-2; } // 3- and 4-byte characters with only 1 byte left + if (buf[len-3] >= 0xf0) { return len-3; } // 4-byte characters with only 3 bytes left + return len; +} + +// +// PERF NOTES: +// We pipe 2 inputs through these stages: +// 1. Load JSON into registers. This takes a long time and is highly parallelizable, so we load +// 2 inputs' worth at once so that by the time step 2 is looking for them input, it's available. +// 2. Scan the JSON for critical data: strings, scalars and operators. This is the critical path. +// The output of step 1 depends entirely on this information. These functions don't quite use +// up enough CPU: the second half of the functions is highly serial, only using 1 execution core +// at a time. The second input's scans has some dependency on the first ones finishing it, but +// they can make a lot of progress before they need that information. +// 3. Step 1 doesn't use enough capacity, so we run some extra stuff while we're waiting for that +// to finish: utf-8 checks and generating the output from the last iteration. +// +// The reason we run 2 inputs at a time, is steps 2 and 3 are *still* not enough to soak up all +// available capacity with just one input. Running 2 at a time seems to give the CPU a good enough +// workout. +// +template +error_code json_structural_indexer::index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept { + if (simdjson_unlikely(len > parser.capacity())) { return CAPACITY; } + // We guard the rest of the code so that we can assume that len > 0 throughout. + if (len == 0) { return EMPTY; } + if (is_streaming(partial)) { + len = trim_partial_utf8(buf, len); + // If you end up with an empty window after trimming + // the partial UTF-8 bytes, then chances are good that you + // have an UTF-8 formatting error. + if(len == 0) { return UTF8_ERROR; } + } + buf_block_reader reader(buf, len); + json_structural_indexer indexer(parser.structural_indexes.get()); + + // Read all but the last block + while (reader.has_full_block()) { + indexer.step(reader.full_block(), reader); + } + // Take care of the last block (will always be there unless file is empty which is + // not supposed to happen.) + uint8_t block[STEP_SIZE]; + if (simdjson_unlikely(reader.get_remainder(block) == 0)) { return UNEXPECTED_ERROR; } + indexer.step(block, reader); + return indexer.finish(parser, reader.block_index(), len, partial); +} + +template<> +simdjson_inline void json_structural_indexer::step<128>(const uint8_t *block, buf_block_reader<128> &reader) noexcept { + simd::simd8x64 in_1(block); + simd::simd8x64 in_2(block+64); + json_block block_1 = scanner.next(in_1); + json_block block_2 = scanner.next(in_2); + this->next(in_1, block_1, reader.block_index()); + this->next(in_2, block_2, reader.block_index()+64); + reader.advance(); +} + +template<> +simdjson_inline void json_structural_indexer::step<64>(const uint8_t *block, buf_block_reader<64> &reader) noexcept { + simd::simd8x64 in_1(block); + json_block block_1 = scanner.next(in_1); + this->next(in_1, block_1, reader.block_index()); + reader.advance(); +} + +simdjson_inline void json_structural_indexer::next(const simd::simd8x64& in, const json_block& block, size_t idx) { + uint64_t unescaped = in.lteq(0x1F); +#if SIMDJSON_UTF8VALIDATION + checker.check_next_input(in); +#endif + indexer.write(uint32_t(idx-64), prev_structurals); // Output *last* iteration's structurals to the parser + prev_structurals = block.structural_start(); + unescaped_chars_error |= block.non_quote_inside_string(unescaped); +} + +simdjson_inline error_code json_structural_indexer::finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial) { + // Write out the final iteration's structurals + indexer.write(uint32_t(idx-64), prev_structurals); + error_code error = scanner.finish(); + // We deliberately break down the next expression so that it is + // human readable. + const bool should_we_exit = is_streaming(partial) ? + ((error != SUCCESS) && (error != UNCLOSED_STRING)) // when partial we tolerate UNCLOSED_STRING + : (error != SUCCESS); // if partial is false, we must have SUCCESS + const bool have_unclosed_string = (error == UNCLOSED_STRING); + if (simdjson_unlikely(should_we_exit)) { return error; } + + if (unescaped_chars_error) { + return UNESCAPED_CHARS; + } + parser.n_structural_indexes = uint32_t(indexer.tail - parser.structural_indexes.get()); + /*** + * The On Demand API requires special padding. + * + * This is related to https://github.com/simdjson/simdjson/issues/906 + * Basically, we want to make sure that if the parsing continues beyond the last (valid) + * structural character, it quickly stops. + * Only three structural characters can be repeated without triggering an error in JSON: [,] and }. + * We repeat the padding character (at 'len'). We don't know what it is, but if the parsing + * continues, then it must be [,] or }. + * Suppose it is ] or }. We backtrack to the first character, what could it be that would + * not trigger an error? It could be ] or } but no, because you can't start a document that way. + * It can't be a comma, a colon or any simple value. So the only way we could continue is + * if the repeated character is [. But if so, the document must start with [. But if the document + * starts with [, it should end with ]. If we enforce that rule, then we would get + * ][[ which is invalid. + * + * This is illustrated with the test array_iterate_unclosed_error() on the following input: + * R"({ "a": [,,)" + **/ + parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); // used later in partial == stage1_mode::streaming_final + parser.structural_indexes[parser.n_structural_indexes + 1] = uint32_t(len); + parser.structural_indexes[parser.n_structural_indexes + 2] = 0; + parser.next_structural_index = 0; + // a valid JSON file cannot have zero structural indexes - we should have found something + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { + return EMPTY; + } + if (simdjson_unlikely(parser.structural_indexes[parser.n_structural_indexes - 1] > len)) { + return UNEXPECTED_ERROR; + } + if (partial == stage1_mode::streaming_partial) { + // If we have an unclosed string, then the last structural + // will be the quote and we want to make sure to omit it. + if(have_unclosed_string) { + parser.n_structural_indexes--; + // a valid JSON file cannot have zero structural indexes - we should have found something + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { return CAPACITY; } + } + // We truncate the input to the end of the last complete document (or zero). + auto new_structural_indexes = find_next_document_index(parser); + if (new_structural_indexes == 0 && parser.n_structural_indexes > 0) { + if(parser.structural_indexes[0] == 0) { + // If the buffer is partial and we started at index 0 but the document is + // incomplete, it's too big to parse. + return CAPACITY; + } else { + // It is possible that the document could be parsed, we just had a lot + // of white space. + parser.n_structural_indexes = 0; + return EMPTY; + } + } + + parser.n_structural_indexes = new_structural_indexes; + } else if (partial == stage1_mode::streaming_final) { + if(have_unclosed_string) { parser.n_structural_indexes--; } + // We truncate the input to the end of the last complete document (or zero). + // Because partial == stage1_mode::streaming_final, it means that we may + // silently ignore trailing garbage. Though it sounds bad, we do it + // deliberately because many people who have streams of JSON documents + // will truncate them for processing. E.g., imagine that you are uncompressing + // the data from a size file or receiving it in chunks from the network. You + // may not know where exactly the last document will be. Meanwhile the + // document_stream instances allow people to know the JSON documents they are + // parsing (see the iterator.source() method). + parser.n_structural_indexes = find_next_document_index(parser); + // We store the initial n_structural_indexes so that the client can see + // whether we used truncation. If initial_n_structural_indexes == parser.n_structural_indexes, + // then this will query parser.structural_indexes[parser.n_structural_indexes] which is len, + // otherwise, it will copy some prior index. + parser.structural_indexes[parser.n_structural_indexes + 1] = parser.structural_indexes[parser.n_structural_indexes]; + // This next line is critical, do not change it unless you understand what you are + // doing. + parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { + // We tolerate an unclosed string at the very end of the stream. Indeed, users + // often load their data in bulk without being careful and they want us to ignore + // the trailing garbage. + return EMPTY; + } + } + checker.check_eof(); + return checker.errors(); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +// Clear CUSTOM_BIT_INDEXER so other implementations can set it if they need to. +#undef SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H +/* end file generic/stage1/json_structural_indexer.h for haswell */ +/* including generic/stage1/utf8_validator.h for haswell: #include */ +/* begin file generic/stage1/utf8_validator.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace stage1 { + +/** + * Validates that the string is actual UTF-8. + */ +template +bool generic_validate_utf8(const uint8_t * input, size_t length) { + checker c{}; + buf_block_reader<64> reader(input, length); + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + c.check_next_input(in); + reader.advance(); + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + c.check_next_input(in); + reader.advance(); + c.check_eof(); + return c.errors() == error_code::SUCCESS; +} + +bool generic_validate_utf8(const char * input, size_t length) { + return generic_validate_utf8(reinterpret_cast(input),length); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H +/* end file generic/stage1/utf8_validator.h for haswell */ +/* end file generic/stage1/amalgamated.h for haswell */ +/* including generic/stage2/amalgamated.h for haswell: #include */ +/* begin file generic/stage2/amalgamated.h for haswell */ +// Stuff other things depend on +/* including generic/stage2/base.h for haswell: #include */ +/* begin file generic/stage2/base.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace stage2 { + +class json_iterator; +class structural_iterator; +struct tape_builder; +struct tape_writer; + +} // namespace stage2 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_BASE_H +/* end file generic/stage2/base.h for haswell */ +/* including generic/stage2/tape_writer.h for haswell: #include */ +/* begin file generic/stage2/tape_writer.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace haswell { +namespace { +namespace stage2 { + +struct tape_writer { + /** The next place to write to tape */ + uint64_t *next_tape_loc; + + /** Write a signed 64-bit value to tape. */ + simdjson_inline void append_s64(int64_t value) noexcept; + + /** Write an unsigned 64-bit value to tape. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + + /** Write a double value to tape. */ + simdjson_inline void append_double(double value) noexcept; + + /** + * Append a tape entry (an 8-bit type,and 56 bits worth of value). + */ + simdjson_inline void append(uint64_t val, internal::tape_type t) noexcept; + + /** + * Skip the current tape entry without writing. + * + * Used to skip the start of the container, since we'll come back later to fill it in when the + * container ends. + */ + simdjson_inline void skip() noexcept; + + /** + * Skip the number of tape entries necessary to write a large u64 or i64. + */ + simdjson_inline void skip_large_integer() noexcept; + + /** + * Skip the number of tape entries necessary to write a double. + */ + simdjson_inline void skip_double() noexcept; + + /** + * Write a value to a known location on tape. + * + * Used to go back and write out the start of a container after the container ends. + */ + simdjson_inline static void write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept; + +private: + /** + * Append both the tape entry, and a supplementary value following it. Used for types that need + * all 64 bits, such as double and uint64_t. + */ + template + simdjson_inline void append2(uint64_t val, T val2, internal::tape_type t) noexcept; +}; // struct tape_writer + +simdjson_inline void tape_writer::append_s64(int64_t value) noexcept { + append2(0, value, internal::tape_type::INT64); +} + +simdjson_inline void tape_writer::append_u64(uint64_t value) noexcept { + append(0, internal::tape_type::UINT64); + *next_tape_loc = value; + next_tape_loc++; +} + +/** Write a double value to tape. */ +simdjson_inline void tape_writer::append_double(double value) noexcept { + append2(0, value, internal::tape_type::DOUBLE); +} + +simdjson_inline void tape_writer::skip() noexcept { + next_tape_loc++; +} + +simdjson_inline void tape_writer::skip_large_integer() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::skip_double() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::append(uint64_t val, internal::tape_type t) noexcept { + *next_tape_loc = val | ((uint64_t(char(t))) << 56); + next_tape_loc++; +} + +template +simdjson_inline void tape_writer::append2(uint64_t val, T val2, internal::tape_type t) noexcept { + append(val, t); + static_assert(sizeof(val2) == sizeof(*next_tape_loc), "Type is not 64 bits!"); + memcpy(next_tape_loc, &val2, sizeof(val2)); + next_tape_loc++; +} + +simdjson_inline void tape_writer::write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept { + tape_loc = val | ((uint64_t(char(t))) << 56); +} + +} // namespace stage2 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H +/* end file generic/stage2/tape_writer.h for haswell */ +/* including generic/stage2/logger.h for haswell: #include */ +/* begin file generic/stage2/logger.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + + +// This is for an internal-only stage 2 specific logger. +// Set LOG_ENABLED = true to log what stage 2 is doing! +namespace simdjson { +namespace haswell { +namespace { +namespace logger { + + static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + static constexpr const int LOG_EVENT_LEN = 20; + static constexpr const int LOG_BUFFER_LEN = 30; + static constexpr const int LOG_SMALL_BUFFER_LEN = 10; + static constexpr const int LOG_INDEX_LEN = 5; + + static int log_depth; // Not threadsafe. Log only. + + // Helper to turn unprintable or newline characters into spaces + static simdjson_inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } + } + + // Print the header and set up log_start + static simdjson_inline void log_start() { + if (LOG_ENABLED) { + log_depth = 0; + printf("\n"); + printf("| %-*s | %-*s | %-*s | %-*s | Detail |\n", LOG_EVENT_LEN, "Event", LOG_BUFFER_LEN, "Buffer", LOG_SMALL_BUFFER_LEN, "Next", 5, "Next#"); + printf("|%.*s|%.*s|%.*s|%.*s|--------|\n", LOG_EVENT_LEN+2, DASHES, LOG_BUFFER_LEN+2, DASHES, LOG_SMALL_BUFFER_LEN+2, DASHES, 5+2, DASHES); + } + } + + simdjson_unused static simdjson_inline void log_string(const char *message) { + if (LOG_ENABLED) { + printf("%s\n", message); + } + } + + // Logs a single line from the stage 2 DOM parser + template + static simdjson_inline void log_line(S &structurals, const char *title_prefix, const char *title, const char *detail) { + if (LOG_ENABLED) { + printf("| %*s%s%-*s ", log_depth*2, "", title_prefix, LOG_EVENT_LEN - log_depth*2 - int(strlen(title_prefix)), title); + auto current_index = structurals.at_beginning() ? nullptr : structurals.next_structural-1; + auto next_index = structurals.next_structural; + auto current = current_index ? &structurals.buf[*current_index] : reinterpret_cast(" "); + auto next = &structurals.buf[*next_index]; + { + // Print the next N characters in the buffer. + printf("| "); + // Otherwise, print the characters starting from the buffer position. + // Print spaces for unprintable or newline characters. + for (int i=0;i */ +/* begin file generic/stage2/json_iterator.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace stage2 { + +class json_iterator { +public: + const uint8_t* const buf; + uint32_t *next_structural; + dom_parser_implementation &dom_parser; + uint32_t depth{0}; + + /** + * Walk the JSON document. + * + * The visitor receives callbacks when values are encountered. All callbacks pass the iterator as + * the first parameter; some callbacks have other parameters as well: + * + * - visit_document_start() - at the beginning. + * - visit_document_end() - at the end (if things were successful). + * + * - visit_array_start() - at the start `[` of a non-empty array. + * - visit_array_end() - at the end `]` of a non-empty array. + * - visit_empty_array() - when an empty array is encountered. + * + * - visit_object_end() - at the start `]` of a non-empty object. + * - visit_object_start() - at the end `]` of a non-empty object. + * - visit_empty_object() - when an empty object is encountered. + * - visit_key(const uint8_t *key) - when a key in an object field is encountered. key is + * guaranteed to point at the first quote of the string (`"key"`). + * - visit_primitive(const uint8_t *value) - when a value is a string, number, boolean or null. + * - visit_root_primitive(iter, uint8_t *value) - when the top-level value is a string, number, boolean or null. + * + * - increment_count(iter) - each time a value is found in an array or object. + */ + template + simdjson_warn_unused simdjson_inline error_code walk_document(V &visitor) noexcept; + + /** + * Create an iterator capable of walking a JSON document. + * + * The document must have already passed through stage 1. + */ + simdjson_inline json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index); + + /** + * Look at the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *peek() const noexcept; + /** + * Advance to the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *advance() noexcept; + /** + * Get the remaining length of the document, from the start of the current token. + */ + simdjson_inline size_t remaining_len() const noexcept; + /** + * Check if we are at the end of the document. + * + * If this is true, there are no more tokens. + */ + simdjson_inline bool at_eof() const noexcept; + /** + * Check if we are at the beginning of the document. + */ + simdjson_inline bool at_beginning() const noexcept; + simdjson_inline uint8_t last_structural() const noexcept; + + /** + * Log that a value has been found. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_value(const char *type) const noexcept; + /** + * Log the start of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_start_value(const char *type) const noexcept; + /** + * Log the end of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_end_value(const char *type) const noexcept; + /** + * Log an error. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_error(const char *error) const noexcept; + + template + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(V &visitor, const uint8_t *value) noexcept; + template + simdjson_warn_unused simdjson_inline error_code visit_primitive(V &visitor, const uint8_t *value) noexcept; +}; + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::walk_document(V &visitor) noexcept { + logger::log_start(); + + // + // Start the document + // + if (at_eof()) { return EMPTY; } + log_start_value("document"); + SIMDJSON_TRY( visitor.visit_document_start(*this) ); + + // + // Read first value + // + { + auto value = advance(); + + // Make sure the outer object or array is closed before continuing; otherwise, there are ways we + // could get into memory corruption. See https://github.com/simdjson/simdjson/issues/906 + if (!STREAMING) { + switch (*value) { + case '{': if (last_structural() != '}') { log_value("starting brace unmatched"); return TAPE_ERROR; }; break; + case '[': if (last_structural() != ']') { log_value("starting bracket unmatched"); return TAPE_ERROR; }; break; + } + } + + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_root_primitive(*this, value) ); break; + } + } + goto document_end; + +// +// Object parser states +// +object_begin: + log_start_value("object"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = false; + SIMDJSON_TRY( visitor.visit_object_start(*this) ); + + { + auto key = advance(); + if (*key != '"') { log_error("Object does not start with a key"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.increment_count(*this) ); + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + +object_field: + if (simdjson_unlikely( *advance() != ':' )) { log_error("Missing colon after key in object"); return TAPE_ERROR; } + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +object_continue: + switch (*advance()) { + case ',': + SIMDJSON_TRY( visitor.increment_count(*this) ); + { + auto key = advance(); + if (simdjson_unlikely( *key != '"' )) { log_error("Key string missing at beginning of field in object"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + goto object_field; + case '}': log_end_value("object"); SIMDJSON_TRY( visitor.visit_object_end(*this) ); goto scope_end; + default: log_error("No comma between object fields"); return TAPE_ERROR; + } + +scope_end: + depth--; + if (depth == 0) { goto document_end; } + if (dom_parser.is_array[depth]) { goto array_continue; } + goto object_continue; + +// +// Array parser states +// +array_begin: + log_start_value("array"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = true; + SIMDJSON_TRY( visitor.visit_array_start(*this) ); + SIMDJSON_TRY( visitor.increment_count(*this) ); + +array_value: + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +array_continue: + switch (*advance()) { + case ',': SIMDJSON_TRY( visitor.increment_count(*this) ); goto array_value; + case ']': log_end_value("array"); SIMDJSON_TRY( visitor.visit_array_end(*this) ); goto scope_end; + default: log_error("Missing comma between array values"); return TAPE_ERROR; + } + +document_end: + log_end_value("document"); + SIMDJSON_TRY( visitor.visit_document_end(*this) ); + + dom_parser.next_structural_index = uint32_t(next_structural - &dom_parser.structural_indexes[0]); + + // If we didn't make it to the end, it's an error + if ( !STREAMING && dom_parser.next_structural_index != dom_parser.n_structural_indexes ) { + log_error("More than one JSON value at the root of the document, or extra characters at the end of the JSON!"); + return TAPE_ERROR; + } + + return SUCCESS; + +} // walk_document() + +simdjson_inline json_iterator::json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index) + : buf{_dom_parser.buf}, + next_structural{&_dom_parser.structural_indexes[start_structural_index]}, + dom_parser{_dom_parser} { +} + +simdjson_inline const uint8_t *json_iterator::peek() const noexcept { + return &buf[*(next_structural)]; +} +simdjson_inline const uint8_t *json_iterator::advance() noexcept { + return &buf[*(next_structural++)]; +} +simdjson_inline size_t json_iterator::remaining_len() const noexcept { + return dom_parser.len - *(next_structural-1); +} + +simdjson_inline bool json_iterator::at_eof() const noexcept { + return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes]; +} +simdjson_inline bool json_iterator::at_beginning() const noexcept { + return next_structural == dom_parser.structural_indexes.get(); +} +simdjson_inline uint8_t json_iterator::last_structural() const noexcept { + return buf[dom_parser.structural_indexes[dom_parser.n_structural_indexes - 1]]; +} + +simdjson_inline void json_iterator::log_value(const char *type) const noexcept { + logger::log_line(*this, "", type, ""); +} + +simdjson_inline void json_iterator::log_start_value(const char *type) const noexcept { + logger::log_line(*this, "+", type, ""); + if (logger::LOG_ENABLED) { logger::log_depth++; } +} + +simdjson_inline void json_iterator::log_end_value(const char *type) const noexcept { + if (logger::LOG_ENABLED) { logger::log_depth--; } + logger::log_line(*this, "-", type, ""); +} + +simdjson_inline void json_iterator::log_error(const char *error) const noexcept { + logger::log_line(*this, "", "ERROR", error); +} + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_root_primitive(V &visitor, const uint8_t *value) noexcept { + switch (*value) { + case '"': return visitor.visit_root_string(*this, value); + case 't': return visitor.visit_root_true_atom(*this, value); + case 'f': return visitor.visit_root_false_atom(*this, value); + case 'n': return visitor.visit_root_null_atom(*this, value); + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return visitor.visit_root_number(*this, value); + default: + log_error("Document starts with a non-value character"); + return TAPE_ERROR; + } +} +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_primitive(V &visitor, const uint8_t *value) noexcept { + // Use the fact that most scalars are going to be either strings or numbers. + if(*value == '"') { + return visitor.visit_string(*this, value); + } else if (((*value - '0') < 10) || (*value == '-')) { + return visitor.visit_number(*this, value); + } + // true, false, null are uncommon. + switch (*value) { + case 't': return visitor.visit_true_atom(*this, value); + case 'f': return visitor.visit_false_atom(*this, value); + case 'n': return visitor.visit_null_atom(*this, value); + default: + log_error("Non-value found when value was expected!"); + return TAPE_ERROR; + } +} + +} // namespace stage2 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H +/* end file generic/stage2/json_iterator.h for haswell */ +/* including generic/stage2/stringparsing.h for haswell: #include */ +/* begin file generic/stage2/stringparsing.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses +// It is intended to be included multiple times and compiled multiple times + +namespace simdjson { +namespace haswell { +namespace { +/// @private +namespace stringparsing { + +// begin copypasta +// These chars yield themselves: " \ / +// b -> backspace, f -> formfeed, n -> newline, r -> cr, t -> horizontal tab +// u not handled in this table as it's complex +static const uint8_t escape_map[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2f, + 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, 0, 0, 0, 0, // 0x4. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x5c, 0, 0, 0, // 0x5. + 0, 0, 0x08, 0, 0, 0, 0x0c, 0, 0, 0, 0, 0, 0, 0, 0x0a, 0, // 0x6. + 0, 0, 0x0d, 0, 0x09, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x7. + + 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, 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, 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, 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, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +// handle a unicode codepoint +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint(const uint8_t **src_ptr, + uint8_t **dst_ptr, bool allow_replacement) { + // Use the default Unicode Character 'REPLACEMENT CHARACTER' (U+FFFD) + constexpr uint32_t substitution_code_point = 0xfffd; + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) != ((static_cast ('\\') << 8) | static_cast ('u'))) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + + // We have already checked that the high surrogate is valid and + // (code_point - 0xd800) < 1024. + // + // Check that code_point_2 is in the range 0xdc00..0xdfff + // and that code_point_2 was parsed from valid hex. + uint32_t low_bit = code_point_2 - 0xdc00; + if (low_bit >> 10) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + code_point = (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + + } + } else if (code_point >= 0xdc00 && code_point <= 0xdfff) { + // If we encounter a low surrogate (not preceded by a high surrogate) + // then we have an error. + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +// handle a unicode codepoint using the wobbly convention +// https://simonsapin.github.io/wtf-8/ +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint_wobbly(const uint8_t **src_ptr, + uint8_t **dst_ptr) { + // It is not ideal that this function is nearly identical to handle_unicode_codepoint. + // + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) == ((static_cast ('\\') << 8) | static_cast ('u'))) { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + uint32_t low_bit = code_point_2 - 0xdc00; + if ((low_bit >> 10) == 0) { + code_point = + (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + } + } + + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +/** + * Unescape a valid UTF-8 string from src to dst, stopping at a final unescaped quote. There + * must be an unescaped quote terminating the string. It returns the final output + * position as pointer. In case of error (e.g., the string has bad escaped codes), + * then null_nullptrptr is returned. It is assumed that the output buffer is large + * enough. E.g., if src points at 'joe"', then dst needs to have four free bytes + + * SIMDJSON_PADDING bytes. + */ +simdjson_warn_unused simdjson_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) { + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint(&src, &dst, allow_replacement)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +simdjson_warn_unused simdjson_inline uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) { + // It is not ideal that this function is nearly identical to parse_string. + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint_wobbly(&src, &dst)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +} // namespace stringparsing +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H +/* end file generic/stage2/stringparsing.h for haswell */ +/* including generic/stage2/structural_iterator.h for haswell: #include */ +/* begin file generic/stage2/structural_iterator.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace stage2 { + +class structural_iterator { +public: + const uint8_t* const buf; + uint32_t *next_structural; + dom_parser_implementation &dom_parser; + + // Start a structural + simdjson_inline structural_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index) + : buf{_dom_parser.buf}, + next_structural{&_dom_parser.structural_indexes[start_structural_index]}, + dom_parser{_dom_parser} { + } + // Get the buffer position of the current structural character + simdjson_inline const uint8_t* current() { + return &buf[*(next_structural-1)]; + } + // Get the current structural character + simdjson_inline char current_char() { + return buf[*(next_structural-1)]; + } + // Get the next structural character without advancing + simdjson_inline char peek_next_char() { + return buf[*next_structural]; + } + simdjson_inline const uint8_t* peek() { + return &buf[*next_structural]; + } + simdjson_inline const uint8_t* advance() { + return &buf[*(next_structural++)]; + } + simdjson_inline char advance_char() { + return buf[*(next_structural++)]; + } + simdjson_inline size_t remaining_len() { + return dom_parser.len - *(next_structural-1); + } + + simdjson_inline bool at_end() { + return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes]; + } + simdjson_inline bool at_beginning() { + return next_structural == dom_parser.structural_indexes.get(); + } +}; + +} // namespace stage2 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H +/* end file generic/stage2/structural_iterator.h for haswell */ +/* including generic/stage2/tape_builder.h for haswell: #include */ +/* begin file generic/stage2/tape_builder.h for haswell */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace haswell { +namespace { +namespace stage2 { + +struct tape_builder { + template + simdjson_warn_unused static simdjson_inline error_code parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept; + + /** Called when a non-empty document starts. */ + simdjson_warn_unused simdjson_inline error_code visit_document_start(json_iterator &iter) noexcept; + /** Called when a non-empty document ends without error. */ + simdjson_warn_unused simdjson_inline error_code visit_document_end(json_iterator &iter) noexcept; + + /** Called when a non-empty array starts. */ + simdjson_warn_unused simdjson_inline error_code visit_array_start(json_iterator &iter) noexcept; + /** Called when a non-empty array ends. */ + simdjson_warn_unused simdjson_inline error_code visit_array_end(json_iterator &iter) noexcept; + /** Called when an empty array is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_array(json_iterator &iter) noexcept; + + /** Called when a non-empty object starts. */ + simdjson_warn_unused simdjson_inline error_code visit_object_start(json_iterator &iter) noexcept; + /** + * Called when a key in a field is encountered. + * + * primitive, visit_object_start, visit_empty_object, visit_array_start, or visit_empty_array + * will be called after this with the field value. + */ + simdjson_warn_unused simdjson_inline error_code visit_key(json_iterator &iter, const uint8_t *key) noexcept; + /** Called when a non-empty object ends. */ + simdjson_warn_unused simdjson_inline error_code visit_object_end(json_iterator &iter) noexcept; + /** Called when an empty object is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_object(json_iterator &iter) noexcept; + + /** + * Called when a string, number, boolean or null is found. + */ + simdjson_warn_unused simdjson_inline error_code visit_primitive(json_iterator &iter, const uint8_t *value) noexcept; + /** + * Called when a string, number, boolean or null is found at the top level of a document (i.e. + * when there is no array or object and the entire document is a single string, number, boolean or + * null. + * + * This is separate from primitive() because simdjson's normal primitive parsing routines assume + * there is at least one more token after the value, which is only true in an array or object. + */ + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_string(json_iterator &iter, const uint8_t *value, bool key = false) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_root_string(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + /** Called each time a new field or element in an array or object is found. */ + simdjson_warn_unused simdjson_inline error_code increment_count(json_iterator &iter) noexcept; + + /** Next location to write to tape */ + tape_writer tape; +private: + /** Next write location in the string buf for stage 2 parsing */ + uint8_t *current_string_buf_loc; + + simdjson_inline tape_builder(dom::document &doc) noexcept; + + simdjson_inline uint32_t next_tape_index(json_iterator &iter) const noexcept; + simdjson_inline void start_container(json_iterator &iter) noexcept; + simdjson_warn_unused simdjson_inline error_code end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_warn_unused simdjson_inline error_code empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_inline uint8_t *on_start_string(json_iterator &iter) noexcept; + simdjson_inline void on_end_string(uint8_t *dst) noexcept; +}; // struct tape_builder + +template +simdjson_warn_unused simdjson_inline error_code tape_builder::parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept { + dom_parser.doc = &doc; + json_iterator iter(dom_parser, STREAMING ? dom_parser.next_structural_index : 0); + tape_builder builder(doc); + return iter.walk_document(builder); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_root_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_object(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_array(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_end(json_iterator &iter) noexcept { + constexpr uint32_t start_tape_index = 0; + tape.append(start_tape_index, internal::tape_type::ROOT); + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter), internal::tape_type::ROOT); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_key(json_iterator &iter, const uint8_t *key) noexcept { + return visit_string(iter, key, true); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::increment_count(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].count++; // we have a key value pair in the object at parser.dom_parser.depth - 1 + return SUCCESS; +} + +simdjson_inline tape_builder::tape_builder(dom::document &doc) noexcept : tape{doc.tape.get()}, current_string_buf_loc{doc.string_buf.get()} {} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_string(json_iterator &iter, const uint8_t *value, bool key) noexcept { + iter.log_value(key ? "key" : "string"); + uint8_t *dst = on_start_string(iter); + dst = stringparsing::parse_string(value+1, dst, false); // We do not allow replacement when the escape characters are invalid. + if (dst == nullptr) { + iter.log_error("Invalid escape in string"); + return STRING_ERROR; + } + on_end_string(dst); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_string(json_iterator &iter, const uint8_t *value) noexcept { + return visit_string(iter, value); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_number(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("number"); + return numberparsing::parse_number(value, tape); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_number(json_iterator &iter, const uint8_t *value) noexcept { + // + // We need to make a copy to make sure that the string is space terminated. + // This is not about padding the input, which should already padded up + // to len + SIMDJSON_PADDING. However, we have no control at this stage + // on how the padding was done. What if the input string was padded with nulls? + // It is quite common for an input string to have an extra null character (C string). + // We do not want to allow 9\0 (where \0 is the null character) inside a JSON + // document, but the string "9\0" by itself is fine. So we make a copy and + // pad the input with spaces when we know that there is just one input element. + // This copy is relatively expensive, but it will almost never be called in + // practice unless you are in the strange scenario where you have many JSON + // documents made of single atoms. + // + std::unique_ptrcopy(new (std::nothrow) uint8_t[iter.remaining_len() + SIMDJSON_PADDING]); + if (copy.get() == nullptr) { return MEMALLOC; } + std::memcpy(copy.get(), value, iter.remaining_len()); + std::memset(copy.get() + iter.remaining_len(), ' ', SIMDJSON_PADDING); + error_code error = visit_number(iter, copy.get()); + return error; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value)) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value, iter.remaining_len())) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value)) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value, iter.remaining_len())) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value)) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value, iter.remaining_len())) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +// private: + +simdjson_inline uint32_t tape_builder::next_tape_index(json_iterator &iter) const noexcept { + return uint32_t(tape.next_tape_loc - iter.dom_parser.doc->tape.get()); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + auto start_index = next_tape_index(iter); + tape.append(start_index+2, start); + tape.append(start_index, end); + return SUCCESS; +} + +simdjson_inline void tape_builder::start_container(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].tape_index = next_tape_index(iter); + iter.dom_parser.open_containers[iter.depth].count = 0; + tape.skip(); // We don't actually *write* the start element until the end. +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + // Write the ending tape element, pointing at the start location + const uint32_t start_tape_index = iter.dom_parser.open_containers[iter.depth].tape_index; + tape.append(start_tape_index, end); + // Write the start tape element, pointing at the end location (and including count) + // count can overflow if it exceeds 24 bits... so we saturate + // the convention being that a cnt of 0xffffff or more is undetermined in value (>= 0xffffff). + const uint32_t count = iter.dom_parser.open_containers[iter.depth].count; + const uint32_t cntsat = count > 0xFFFFFF ? 0xFFFFFF : count; + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter) | (uint64_t(cntsat) << 32), start); + return SUCCESS; +} + +simdjson_inline uint8_t *tape_builder::on_start_string(json_iterator &iter) noexcept { + // we advance the point, accounting for the fact that we have a NULL termination + tape.append(current_string_buf_loc - iter.dom_parser.doc->string_buf.get(), internal::tape_type::STRING); + return current_string_buf_loc + sizeof(uint32_t); +} + +simdjson_inline void tape_builder::on_end_string(uint8_t *dst) noexcept { + uint32_t str_length = uint32_t(dst - (current_string_buf_loc + sizeof(uint32_t))); + // TODO check for overflow in case someone has a crazy string (>=4GB?) + // But only add the overflow check when the document itself exceeds 4GB + // Currently unneeded because we refuse to parse docs larger or equal to 4GB. + memcpy(current_string_buf_loc, &str_length, sizeof(uint32_t)); + // NULL termination is still handy if you expect all your strings to + // be NULL terminated? It comes at a small cost + *dst = 0; + current_string_buf_loc = dst + 1; +} + +} // namespace stage2 +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H +/* end file generic/stage2/tape_builder.h for haswell */ +/* end file generic/stage2/amalgamated.h for haswell */ + +// +// Stage 1 +// + +namespace simdjson { +namespace haswell { + +simdjson_warn_unused error_code implementation::create_dom_parser_implementation( + size_t capacity, + size_t max_depth, + std::unique_ptr& dst +) const noexcept { + dst.reset( new (std::nothrow) dom_parser_implementation() ); + if (!dst) { return MEMALLOC; } + if (auto err = dst->set_capacity(capacity)) + return err; + if (auto err = dst->set_max_depth(max_depth)) + return err; + return SUCCESS; +} + +namespace { + +using namespace simd; + +// This identifies structural characters (comma, colon, braces, brackets), +// and ASCII white-space ('\r','\n','\t',' '). +simdjson_inline json_character_block json_character_block::classify(const simd::simd8x64& in) { + // These lookups rely on the fact that anything < 127 will match the lower 4 bits, which is why + // we can't use the generic lookup_16. + const auto whitespace_table = simd8::repeat_16(' ', 100, 100, 100, 17, 100, 113, 2, 100, '\t', '\n', 112, 100, '\r', 100, 100); + + // The 6 operators (:,[]{}) have these values: + // + // , 2C + // : 3A + // [ 5B + // { 7B + // ] 5D + // } 7D + // + // If you use | 0x20 to turn [ and ] into { and }, the lower 4 bits of each character is unique. + // We exploit this, using a simd 4-bit lookup to tell us which character match against, and then + // match it (against | 0x20). + // + // To prevent recognizing other characters, everything else gets compared with 0, which cannot + // match due to the | 0x20. + // + // NOTE: Due to the | 0x20, this ALSO treats and (control characters 0C and 1A) like , + // and :. This gets caught in stage 2, which checks the actual character to ensure the right + // operators are in the right places. + const auto op_table = simd8::repeat_16( + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, ':', '{', // : = 3A, [ = 5B, { = 7B + ',', '}', 0, 0 // , = 2C, ] = 5D, } = 7D + ); + + // We compute whitespace and op separately. If later code only uses one or the + // other, given the fact that all functions are aggressively inlined, we can + // hope that useless computations will be omitted. This is namely case when + // minifying (we only need whitespace). + + const uint64_t whitespace = in.eq({ + _mm256_shuffle_epi8(whitespace_table, in.chunks[0]), + _mm256_shuffle_epi8(whitespace_table, in.chunks[1]) + }); + // Turn [ and ] into { and } + const simd8x64 curlified{ + in.chunks[0] | 0x20, + in.chunks[1] | 0x20 + }; + const uint64_t op = curlified.eq({ + _mm256_shuffle_epi8(op_table, in.chunks[0]), + _mm256_shuffle_epi8(op_table, in.chunks[1]) + }); + + return { whitespace, op }; +} + +simdjson_inline bool is_ascii(const simd8x64& input) { + return input.reduce_or().is_ascii(); +} + +simdjson_unused simdjson_inline simd8 must_be_continuation(const simd8 prev1, const simd8 prev2, const simd8 prev3) { + simd8 is_second_byte = prev1.saturating_sub(0xc0u-1); // Only 11______ will be > 0 + simd8 is_third_byte = prev2.saturating_sub(0xe0u-1); // Only 111_____ will be > 0 + simd8 is_fourth_byte = prev3.saturating_sub(0xf0u-1); // Only 1111____ will be > 0 + // Caller requires a bool (all 1's). All values resulting from the subtraction will be <= 64, so signed comparison is fine. + return simd8(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0); +} + +simdjson_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3) { + simd8 is_third_byte = prev2.saturating_sub(0xe0u-1); // Only 111_____ will be > 0 + simd8 is_fourth_byte = prev3.saturating_sub(0xf0u-1); // Only 1111____ will be > 0 + // Caller requires a bool (all 1's). All values resulting from the subtraction will be <= 64, so signed comparison is fine. + return simd8(is_third_byte | is_fourth_byte) > int8_t(0); +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +// +// Stage 2 +// + +// +// Implementation-specific overrides +// +namespace simdjson { +namespace haswell { + +simdjson_warn_unused error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { + return haswell::stage1::json_minifier::minify<128>(buf, len, dst, dst_len); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage1(const uint8_t *_buf, size_t _len, stage1_mode streaming) noexcept { + this->buf = _buf; + this->len = _len; + return haswell::stage1::json_structural_indexer::index<128>(_buf, _len, *this, streaming); +} + +simdjson_warn_unused bool implementation::validate_utf8(const char *buf, size_t len) const noexcept { + return haswell::stage1::generic_validate_utf8(buf,len); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage2_next(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_string(const uint8_t *src, uint8_t *dst, bool replacement_char) const noexcept { + return haswell::stringparsing::parse_string(src, dst, replacement_char); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept { + return haswell::stringparsing::parse_wobbly_string(src, dst); +} + +simdjson_warn_unused error_code dom_parser_implementation::parse(const uint8_t *_buf, size_t _len, dom::document &_doc) noexcept { + auto error = stage1(_buf, _len, stage1_mode::regular); + if (error) { return error; } + return stage2(_doc); +} + +} // namespace haswell +} // namespace simdjson + +/* including simdjson/haswell/end.h: #include */ +/* begin file simdjson/haswell/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_HASWELL +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "haswell" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/haswell/end.h */ + +#endif // SIMDJSON_SRC_HASWELL_CPP +/* end file haswell.cpp */ +#endif +#if SIMDJSON_IMPLEMENTATION_ICELAKE +/* including icelake.cpp: #include */ +/* begin file icelake.cpp */ +#ifndef SIMDJSON_SRC_ICELAKE_CPP +#define SIMDJSON_SRC_ICELAKE_CPP + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* including simdjson/icelake.h: #include */ +/* begin file simdjson/icelake.h */ +#ifndef SIMDJSON_ICELAKE_H +#define SIMDJSON_ICELAKE_H + +/* including simdjson/icelake/begin.h: #include "simdjson/icelake/begin.h" */ +/* begin file simdjson/icelake/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "icelake" */ +#define SIMDJSON_IMPLEMENTATION icelake +/* including simdjson/icelake/base.h: #include "simdjson/icelake/base.h" */ +/* begin file simdjson/icelake/base.h */ +#ifndef SIMDJSON_ICELAKE_BASE_H +#define SIMDJSON_ICELAKE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_ICELAKE +namespace simdjson { +/** + * Implementation for Icelake (Intel AVX512). + */ +namespace icelake { + +class implementation; + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BASE_H +/* end file simdjson/icelake/base.h */ +/* including simdjson/icelake/intrinsics.h: #include "simdjson/icelake/intrinsics.h" */ +/* begin file simdjson/icelake/intrinsics.h */ +#ifndef SIMDJSON_ICELAKE_INTRINSICS_H +#define SIMDJSON_ICELAKE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + * e.g., if __AVX2__ is set... in turn, we normally set these + * macros by compiling against the corresponding architecture + * (e.g., arch:AVX2, -mavx2, etc.) which compiles the whole + * software with these advanced instructions. In simdjson, we + * want to compile the whole program for a generic target, + * and only target our specific kernels. As a workaround, + * we directly include the needed headers. These headers would + * normally guard against such usage, but we carefully included + * (or ) before, so the headers + * are fooled. + */ +#include // for _blsr_u64 +#include // for __lzcnt64 +#include // for most things (AVX2, AVX512, _popcnt64) +#include +#include +#include +#include +#include // for _mm_clmulepi64_si128 +// Important: we need the AVX-512 headers: +#include +#include +#include +#include +#include +#include +#include +// unfortunately, we may not get _blsr_u64, but, thankfully, clang +// has it as a macro. +#ifndef _blsr_u64 +// we roll our own +#define _blsr_u64(n) ((n - 1) & n) +#endif // _blsr_u64 +#endif // SIMDJSON_CLANG_VISUAL_STUDIO + +static_assert(sizeof(__m512i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for icelake"); + +#endif // SIMDJSON_ICELAKE_INTRINSICS_H +/* end file simdjson/icelake/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +SIMDJSON_TARGET_REGION("avx512f,avx512dq,avx512cd,avx512bw,avx512vbmi,avx512vbmi2,avx512vl,avx2,bmi,pclmul,lzcnt,popcnt") +#endif + +/* including simdjson/icelake/bitmanipulation.h: #include "simdjson/icelake/bitmanipulation.h" */ +/* begin file simdjson/icelake/bitmanipulation.h */ +#ifndef SIMDJSON_ICELAKE_BITMANIPULATION_H +#define SIMDJSON_ICELAKE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return (int)_tzcnt_u64(input_num); +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + //////// + // You might expect the next line to be equivalent to + // return (int)_tzcnt_u64(input_num); + // but the generated code differs and might be less efficient? + //////// + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return _blsr_u64(input_num); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { + return int(_lzcnt_u64(input_num)); +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BITMANIPULATION_H +/* end file simdjson/icelake/bitmanipulation.h */ +/* including simdjson/icelake/bitmask.h: #include "simdjson/icelake/bitmask.h" */ +/* begin file simdjson/icelake/bitmask.h */ +#ifndef SIMDJSON_ICELAKE_BITMASK_H +#define SIMDJSON_ICELAKE_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processor supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BITMASK_H +/* end file simdjson/icelake/bitmask.h */ +/* including simdjson/icelake/simd.h: #include "simdjson/icelake/simd.h" */ +/* begin file simdjson/icelake/simd.h */ +#ifndef SIMDJSON_ICELAKE_SIMD_H +#define SIMDJSON_ICELAKE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if defined(__GNUC__) && !defined(__clang__) +#if __GNUC__ == 8 +#define SIMDJSON_GCC8 1 +#endif // __GNUC__ == 8 +#endif // defined(__GNUC__) && !defined(__clang__) + +#if SIMDJSON_GCC8 +/** + * GCC 8 fails to provide _mm512_set_epi8. We roll our own. + */ +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) { + 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), + 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), + 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), + 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), + 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), + 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), + 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), + 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)); +} +#endif // SIMDJSON_GCC8 + + + +namespace simdjson { +namespace icelake { +namespace { +namespace simd { + + // Forward-declared so they can be used by splat and friends. + template + struct base { + __m512i value; + + // Zero constructor + simdjson_inline base() : value{__m512i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m512i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m512i&() const { return this->value; } + simdjson_inline operator __m512i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm512_or_si512(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm512_and_si512(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm512_xor_si512(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm512_andnot_si512(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + // Forward-declared so they can be used by splat and friends. + template + struct simd8; + + template> + struct base8: base> { + typedef uint32_t bitmask_t; + typedef uint64_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m512i _value) : base>(_value) {} + + friend simdjson_really_inline uint64_t operator==(const simd8 lhs, const simd8 rhs) { + return _mm512_cmpeq_epi8_mask(lhs, rhs); + } + + static const int SIZE = sizeof(base::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + // workaround for compilers unable to figure out that 16 - N is a constant (GCC 8) + constexpr int shift = 16 - N; + return _mm512_alignr_epi8(*this, _mm512_permutex2var_epi64(prev_chunk, _mm512_set_epi64(13, 12, 11, 10, 9, 8, 7, 6), *this), shift); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm512_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m512i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + simdjson_inline bool any() const { return !!_mm512_test_epi8_mask (*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm512_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm512_setzero_si512(); } + static simdjson_inline simd8 load(const T values[64]) { + return _mm512_loadu_si512(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m512i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[64]) const { return _mm512_storeu_si512(reinterpret_cast<__m512i *>(dst), *this); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm512_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm512_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm512_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint64_t mask, L * output) const { + _mm512_mask_compressstoreu_epi8 (output,~mask,*this); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m512i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t values[64]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15, + int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23, + int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31, + int8_t v32, int8_t v33, int8_t v34, int8_t v35, int8_t v36, int8_t v37, int8_t v38, int8_t v39, + int8_t v40, int8_t v41, int8_t v42, int8_t v43, int8_t v44, int8_t v45, int8_t v46, int8_t v47, + int8_t v48, int8_t v49, int8_t v50, int8_t v51, int8_t v52, int8_t v53, int8_t v54, int8_t v55, + int8_t v56, int8_t v57, int8_t v58, int8_t v59, int8_t v60, int8_t v61, int8_t v62, int8_t v63 + ) : simd8(_mm512_set_epi8( + v63, v62, v61, v60, v59, v58, v57, v56, + v55, v54, v53, v52, v51, v50, v49, v48, + v47, v46, v45, v44, v43, v42, v41, v40, + v39, v38, v37, v36, v35, v34, v33, v32, + v31, v30, v29, v28, v27, v26, v25, v24, + v23, v22, v21, v20, v19, v18, v17, v16, + v15, v14, v13, v12, v11, v10, v9, v8, + v7, v6, v5, v4, v3, v2, v1, v0 + )) {} + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm512_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm512_min_epi8(*this, other); } + + simdjson_inline simd8 operator>(const simd8 other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(*this, other),_mm512_set1_epi8(uint8_t(0x80))); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(other, *this),_mm512_set1_epi8(uint8_t(0x80))); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m512i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[64]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15, + uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23, + uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31, + uint8_t v32, uint8_t v33, uint8_t v34, uint8_t v35, uint8_t v36, uint8_t v37, uint8_t v38, uint8_t v39, + uint8_t v40, uint8_t v41, uint8_t v42, uint8_t v43, uint8_t v44, uint8_t v45, uint8_t v46, uint8_t v47, + uint8_t v48, uint8_t v49, uint8_t v50, uint8_t v51, uint8_t v52, uint8_t v53, uint8_t v54, uint8_t v55, + uint8_t v56, uint8_t v57, uint8_t v58, uint8_t v59, uint8_t v60, uint8_t v61, uint8_t v62, uint8_t v63 + ) : simd8(_mm512_set_epi8( + v63, v62, v61, v60, v59, v58, v57, v56, + v55, v54, v53, v52, v51, v50, v49, v48, + v47, v46, v45, v44, v43, v42, v41, v40, + v39, v38, v37, v36, v35, v34, v33, v32, + v31, v30, v29, v28, v27, v26, v25, v24, + v23, v22, v21, v20, v19, v18, v17, v16, + v15, v14, v13, v12, v11, v10, v9, v8, + v7, v6, v5, v4, v3, v2, v1, v0 + )) {} + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm512_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm512_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm512_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm512_min_epu8(other, *this); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline uint64_t operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline uint64_t operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->lt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return _mm512_mask_blend_epi8(*this == uint8_t(0), _mm512_set1_epi8(0), _mm512_set1_epi8(-1)); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + + simdjson_inline bool is_ascii() const { return _mm512_movepi8_mask(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { + return !_mm512_test_epi8_mask(*this, *this); + } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return !_mm512_test_epi8_mask(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm512_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm512_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline uint64_t get_bit() const { return _mm512_movepi8_mask(_mm512_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 1, "Icelake kernel should use one register per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1) : chunks{chunk0, chunk1} {} + simdjson_inline simd8x64(const simd8 chunk0) : chunks{chunk0} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr)} {} + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(mask, output); + return 64 - count_ones(mask); + } + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + } + + simdjson_inline simd8 reduce_or() const { + return this->chunks[0]; + } + + simdjson_inline simd8x64 bit_or(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] | mask + ); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return this->chunks[0] == mask; + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return this->chunks[0] == other.chunks[0]; + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return this->chunks[0] <= mask; + } + }; // struct simd8x64 + +} // namespace simd + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_SIMD_H +/* end file simdjson/icelake/simd.h */ +/* including simdjson/icelake/stringparsing_defs.h: #include "simdjson/icelake/stringparsing_defs.h" */ +/* begin file simdjson/icelake/stringparsing_defs.h */ +#ifndef SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H +#define SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 64; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint64_t bs_bits; + uint64_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 15 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v(src); + // store to dest unconditionally - we can overwrite the bits we don't like later + v.store(dst); + return { + static_cast(v == '\\'), // bs_bits + static_cast(v == '"'), // quote_bits + }; +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H +/* end file simdjson/icelake/stringparsing_defs.h */ +/* including simdjson/icelake/numberparsing_defs.h: #include "simdjson/icelake/numberparsing_defs.h" */ +/* begin file simdjson/icelake/numberparsing_defs.h */ +#ifndef SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H +#define SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace numberparsing { + +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace icelake +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H +/* end file simdjson/icelake/numberparsing_defs.h */ +/* end file simdjson/icelake/begin.h */ +/* including simdjson/generic/amalgamated.h for icelake: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for icelake */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for icelake: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for icelake */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for icelake */ +/* including simdjson/generic/jsoncharutils.h for icelake: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for icelake */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for icelake */ +/* including simdjson/generic/atomparsing.h for icelake: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for icelake */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace icelake { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for icelake */ +/* including simdjson/generic/dom_parser_implementation.h for icelake: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for icelake */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace icelake +} // namespace simdjson + +namespace simdjson { +namespace icelake { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for icelake */ +/* including simdjson/generic/implementation_simdjson_result_base.h for icelake: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for icelake */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for icelake */ +/* including simdjson/generic/numberparsing.h for icelake: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for icelake */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace icelake { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for icelake */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for icelake: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for icelake */ +/* end file simdjson/generic/amalgamated.h for icelake */ +/* including simdjson/icelake/end.h: #include "simdjson/icelake/end.h" */ +/* begin file simdjson/icelake/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "icelake" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/icelake/end.h */ + +#endif // SIMDJSON_ICELAKE_H +/* end file simdjson/icelake.h */ +/* including simdjson/icelake/implementation.h: #include */ +/* begin file simdjson/icelake/implementation.h */ +#ifndef SIMDJSON_ICELAKE_IMPLEMENTATION_H +#define SIMDJSON_ICELAKE_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_ICELAKE +namespace simdjson { +namespace icelake { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation( + "icelake", + "Intel/AMD AVX512", + 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 + ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_IMPLEMENTATION_H +/* end file simdjson/icelake/implementation.h */ + +// defining SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER allows us to provide our own bit_indexer::write +#define SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +/* including simdjson/icelake/begin.h: #include */ +/* begin file simdjson/icelake/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "icelake" */ +#define SIMDJSON_IMPLEMENTATION icelake +/* including simdjson/icelake/base.h: #include "simdjson/icelake/base.h" */ +/* begin file simdjson/icelake/base.h */ +#ifndef SIMDJSON_ICELAKE_BASE_H +#define SIMDJSON_ICELAKE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_ICELAKE +namespace simdjson { +/** + * Implementation for Icelake (Intel AVX512). + */ +namespace icelake { + +class implementation; + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BASE_H +/* end file simdjson/icelake/base.h */ +/* including simdjson/icelake/intrinsics.h: #include "simdjson/icelake/intrinsics.h" */ +/* begin file simdjson/icelake/intrinsics.h */ +#ifndef SIMDJSON_ICELAKE_INTRINSICS_H +#define SIMDJSON_ICELAKE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + * e.g., if __AVX2__ is set... in turn, we normally set these + * macros by compiling against the corresponding architecture + * (e.g., arch:AVX2, -mavx2, etc.) which compiles the whole + * software with these advanced instructions. In simdjson, we + * want to compile the whole program for a generic target, + * and only target our specific kernels. As a workaround, + * we directly include the needed headers. These headers would + * normally guard against such usage, but we carefully included + * (or ) before, so the headers + * are fooled. + */ +#include // for _blsr_u64 +#include // for __lzcnt64 +#include // for most things (AVX2, AVX512, _popcnt64) +#include +#include +#include +#include +#include // for _mm_clmulepi64_si128 +// Important: we need the AVX-512 headers: +#include +#include +#include +#include +#include +#include +#include +// unfortunately, we may not get _blsr_u64, but, thankfully, clang +// has it as a macro. +#ifndef _blsr_u64 +// we roll our own +#define _blsr_u64(n) ((n - 1) & n) +#endif // _blsr_u64 +#endif // SIMDJSON_CLANG_VISUAL_STUDIO + +static_assert(sizeof(__m512i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for icelake"); + +#endif // SIMDJSON_ICELAKE_INTRINSICS_H +/* end file simdjson/icelake/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +SIMDJSON_TARGET_REGION("avx512f,avx512dq,avx512cd,avx512bw,avx512vbmi,avx512vbmi2,avx512vl,avx2,bmi,pclmul,lzcnt,popcnt") +#endif + +/* including simdjson/icelake/bitmanipulation.h: #include "simdjson/icelake/bitmanipulation.h" */ +/* begin file simdjson/icelake/bitmanipulation.h */ +#ifndef SIMDJSON_ICELAKE_BITMANIPULATION_H +#define SIMDJSON_ICELAKE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return (int)_tzcnt_u64(input_num); +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + //////// + // You might expect the next line to be equivalent to + // return (int)_tzcnt_u64(input_num); + // but the generated code differs and might be less efficient? + //////// + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return _blsr_u64(input_num); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { + return int(_lzcnt_u64(input_num)); +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BITMANIPULATION_H +/* end file simdjson/icelake/bitmanipulation.h */ +/* including simdjson/icelake/bitmask.h: #include "simdjson/icelake/bitmask.h" */ +/* begin file simdjson/icelake/bitmask.h */ +#ifndef SIMDJSON_ICELAKE_BITMASK_H +#define SIMDJSON_ICELAKE_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processor supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BITMASK_H +/* end file simdjson/icelake/bitmask.h */ +/* including simdjson/icelake/simd.h: #include "simdjson/icelake/simd.h" */ +/* begin file simdjson/icelake/simd.h */ +#ifndef SIMDJSON_ICELAKE_SIMD_H +#define SIMDJSON_ICELAKE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if defined(__GNUC__) && !defined(__clang__) +#if __GNUC__ == 8 +#define SIMDJSON_GCC8 1 +#endif // __GNUC__ == 8 +#endif // defined(__GNUC__) && !defined(__clang__) + +#if SIMDJSON_GCC8 +/** + * GCC 8 fails to provide _mm512_set_epi8. We roll our own. + */ +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) { + 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), + 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), + 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), + 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), + 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), + 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), + 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), + 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)); +} +#endif // SIMDJSON_GCC8 + + + +namespace simdjson { +namespace icelake { +namespace { +namespace simd { + + // Forward-declared so they can be used by splat and friends. + template + struct base { + __m512i value; + + // Zero constructor + simdjson_inline base() : value{__m512i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m512i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m512i&() const { return this->value; } + simdjson_inline operator __m512i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm512_or_si512(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm512_and_si512(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm512_xor_si512(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm512_andnot_si512(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + // Forward-declared so they can be used by splat and friends. + template + struct simd8; + + template> + struct base8: base> { + typedef uint32_t bitmask_t; + typedef uint64_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m512i _value) : base>(_value) {} + + friend simdjson_really_inline uint64_t operator==(const simd8 lhs, const simd8 rhs) { + return _mm512_cmpeq_epi8_mask(lhs, rhs); + } + + static const int SIZE = sizeof(base::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + // workaround for compilers unable to figure out that 16 - N is a constant (GCC 8) + constexpr int shift = 16 - N; + return _mm512_alignr_epi8(*this, _mm512_permutex2var_epi64(prev_chunk, _mm512_set_epi64(13, 12, 11, 10, 9, 8, 7, 6), *this), shift); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm512_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m512i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + simdjson_inline bool any() const { return !!_mm512_test_epi8_mask (*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm512_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm512_setzero_si512(); } + static simdjson_inline simd8 load(const T values[64]) { + return _mm512_loadu_si512(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m512i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[64]) const { return _mm512_storeu_si512(reinterpret_cast<__m512i *>(dst), *this); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm512_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm512_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm512_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint64_t mask, L * output) const { + _mm512_mask_compressstoreu_epi8 (output,~mask,*this); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m512i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t values[64]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15, + int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23, + int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31, + int8_t v32, int8_t v33, int8_t v34, int8_t v35, int8_t v36, int8_t v37, int8_t v38, int8_t v39, + int8_t v40, int8_t v41, int8_t v42, int8_t v43, int8_t v44, int8_t v45, int8_t v46, int8_t v47, + int8_t v48, int8_t v49, int8_t v50, int8_t v51, int8_t v52, int8_t v53, int8_t v54, int8_t v55, + int8_t v56, int8_t v57, int8_t v58, int8_t v59, int8_t v60, int8_t v61, int8_t v62, int8_t v63 + ) : simd8(_mm512_set_epi8( + v63, v62, v61, v60, v59, v58, v57, v56, + v55, v54, v53, v52, v51, v50, v49, v48, + v47, v46, v45, v44, v43, v42, v41, v40, + v39, v38, v37, v36, v35, v34, v33, v32, + v31, v30, v29, v28, v27, v26, v25, v24, + v23, v22, v21, v20, v19, v18, v17, v16, + v15, v14, v13, v12, v11, v10, v9, v8, + v7, v6, v5, v4, v3, v2, v1, v0 + )) {} + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm512_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm512_min_epi8(*this, other); } + + simdjson_inline simd8 operator>(const simd8 other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(*this, other),_mm512_set1_epi8(uint8_t(0x80))); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(other, *this),_mm512_set1_epi8(uint8_t(0x80))); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m512i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[64]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15, + uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23, + uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31, + uint8_t v32, uint8_t v33, uint8_t v34, uint8_t v35, uint8_t v36, uint8_t v37, uint8_t v38, uint8_t v39, + uint8_t v40, uint8_t v41, uint8_t v42, uint8_t v43, uint8_t v44, uint8_t v45, uint8_t v46, uint8_t v47, + uint8_t v48, uint8_t v49, uint8_t v50, uint8_t v51, uint8_t v52, uint8_t v53, uint8_t v54, uint8_t v55, + uint8_t v56, uint8_t v57, uint8_t v58, uint8_t v59, uint8_t v60, uint8_t v61, uint8_t v62, uint8_t v63 + ) : simd8(_mm512_set_epi8( + v63, v62, v61, v60, v59, v58, v57, v56, + v55, v54, v53, v52, v51, v50, v49, v48, + v47, v46, v45, v44, v43, v42, v41, v40, + v39, v38, v37, v36, v35, v34, v33, v32, + v31, v30, v29, v28, v27, v26, v25, v24, + v23, v22, v21, v20, v19, v18, v17, v16, + v15, v14, v13, v12, v11, v10, v9, v8, + v7, v6, v5, v4, v3, v2, v1, v0 + )) {} + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm512_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm512_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm512_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm512_min_epu8(other, *this); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline uint64_t operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline uint64_t operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->lt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return _mm512_mask_blend_epi8(*this == uint8_t(0), _mm512_set1_epi8(0), _mm512_set1_epi8(-1)); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + + simdjson_inline bool is_ascii() const { return _mm512_movepi8_mask(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { + return !_mm512_test_epi8_mask(*this, *this); + } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return !_mm512_test_epi8_mask(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm512_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm512_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline uint64_t get_bit() const { return _mm512_movepi8_mask(_mm512_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 1, "Icelake kernel should use one register per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1) : chunks{chunk0, chunk1} {} + simdjson_inline simd8x64(const simd8 chunk0) : chunks{chunk0} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr)} {} + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(mask, output); + return 64 - count_ones(mask); + } + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + } + + simdjson_inline simd8 reduce_or() const { + return this->chunks[0]; + } + + simdjson_inline simd8x64 bit_or(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] | mask + ); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return this->chunks[0] == mask; + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return this->chunks[0] == other.chunks[0]; + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return this->chunks[0] <= mask; + } + }; // struct simd8x64 + +} // namespace simd + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_SIMD_H +/* end file simdjson/icelake/simd.h */ +/* including simdjson/icelake/stringparsing_defs.h: #include "simdjson/icelake/stringparsing_defs.h" */ +/* begin file simdjson/icelake/stringparsing_defs.h */ +#ifndef SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H +#define SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 64; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint64_t bs_bits; + uint64_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 15 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v(src); + // store to dest unconditionally - we can overwrite the bits we don't like later + v.store(dst); + return { + static_cast(v == '\\'), // bs_bits + static_cast(v == '"'), // quote_bits + }; +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H +/* end file simdjson/icelake/stringparsing_defs.h */ +/* including simdjson/icelake/numberparsing_defs.h: #include "simdjson/icelake/numberparsing_defs.h" */ +/* begin file simdjson/icelake/numberparsing_defs.h */ +#ifndef SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H +#define SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace numberparsing { + +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace icelake +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H +/* end file simdjson/icelake/numberparsing_defs.h */ +/* end file simdjson/icelake/begin.h */ +/* including generic/amalgamated.h for icelake: #include */ +/* begin file generic/amalgamated.h for icelake */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_SRC_GENERIC_DEPENDENCIES_H) +#error generic/dependencies.h must be included before generic/amalgamated.h! +#endif + +/* including generic/base.h for icelake: #include */ +/* begin file generic/base.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +struct json_character_block; + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_BASE_H +/* end file generic/base.h for icelake */ +/* including generic/dom_parser_implementation.h for icelake: #include */ +/* begin file generic/dom_parser_implementation.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// Interface a dom parser implementation must fulfill +namespace simdjson { +namespace icelake { +namespace { + +simdjson_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3); +simdjson_inline bool is_ascii(const simd8x64& input); + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file generic/dom_parser_implementation.h for icelake */ +/* including generic/json_character_block.h for icelake: #include */ +/* begin file generic/json_character_block.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +struct json_character_block { + static simdjson_inline json_character_block classify(const simd::simd8x64& in); + + simdjson_inline uint64_t whitespace() const noexcept { return _whitespace; } + simdjson_inline uint64_t op() const noexcept { return _op; } + simdjson_inline uint64_t scalar() const noexcept { return ~(op() | whitespace()); } + + uint64_t _whitespace; + uint64_t _op; +}; + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H +/* end file generic/json_character_block.h for icelake */ +/* end file generic/amalgamated.h for icelake */ +/* including generic/stage1/amalgamated.h for icelake: #include */ +/* begin file generic/stage1/amalgamated.h for icelake */ +// Stuff other things depend on +/* including generic/stage1/base.h for icelake: #include */ +/* begin file generic/stage1/base.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace stage1 { + +class bit_indexer; +template +struct buf_block_reader; +struct json_block; +class json_minifier; +class json_scanner; +struct json_string_block; +class json_string_scanner; +class json_structural_indexer; + +} // namespace stage1 + +namespace utf8_validation { +struct utf8_checker; +} // namespace utf8_validation + +using utf8_validation::utf8_checker; + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_BASE_H +/* end file generic/stage1/base.h for icelake */ +/* including generic/stage1/buf_block_reader.h for icelake: #include */ +/* begin file generic/stage1/buf_block_reader.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace icelake { +namespace { +namespace stage1 { + +// Walks through a buffer in block-sized increments, loading the last part with spaces +template +struct buf_block_reader { +public: + simdjson_inline buf_block_reader(const uint8_t *_buf, size_t _len); + simdjson_inline size_t block_index(); + simdjson_inline bool has_full_block() const; + simdjson_inline const uint8_t *full_block() const; + /** + * Get the last block, padded with spaces. + * + * There will always be a last block, with at least 1 byte, unless len == 0 (in which case this + * function fills the buffer with spaces and returns 0. In particular, if len == STEP_SIZE there + * will be 0 full_blocks and 1 remainder block with STEP_SIZE bytes and no spaces for padding. + * + * @return the number of effective characters in the last block. + */ + simdjson_inline size_t get_remainder(uint8_t *dst) const; + simdjson_inline void advance(); +private: + const uint8_t *buf; + const size_t len; + const size_t lenminusstep; + size_t idx; +}; + +// Routines to print masks and text for debugging bitmask operations +simdjson_unused static char * format_input_text_64(const uint8_t *text) { + static char buf[sizeof(simd8x64) + 1]; + for (size_t i=0; i); i++) { + buf[i] = int8_t(text[i]) < ' ' ? '_' : int8_t(text[i]); + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +// Routines to print masks and text for debugging bitmask operations +simdjson_unused static char * format_input_text(const simd8x64& in) { + static char buf[sizeof(simd8x64) + 1]; + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] < ' ') { buf[i] = '_'; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdjson_unused static char * format_input_text(const simd8x64& in, uint64_t mask) { + static char buf[sizeof(simd8x64) + 1]; + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] <= ' ') { buf[i] = '_'; } + if (!(mask & (size_t(1) << i))) { buf[i] = ' '; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdjson_unused static char * format_mask(uint64_t mask) { + static char buf[sizeof(simd8x64) + 1]; + for (size_t i=0; i<64; i++) { + buf[i] = (mask & (size_t(1) << i)) ? 'X' : ' '; + } + buf[64] = '\0'; + return buf; +} + +template +simdjson_inline buf_block_reader::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {} + +template +simdjson_inline size_t buf_block_reader::block_index() { return idx; } + +template +simdjson_inline bool buf_block_reader::has_full_block() const { + return idx < lenminusstep; +} + +template +simdjson_inline const uint8_t *buf_block_reader::full_block() const { + return &buf[idx]; +} + +template +simdjson_inline size_t buf_block_reader::get_remainder(uint8_t *dst) const { + if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers + std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once. + std::memcpy(dst, buf + idx, len - idx); + return len - idx; +} + +template +simdjson_inline void buf_block_reader::advance() { + idx += STEP_SIZE; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H +/* end file generic/stage1/buf_block_reader.h for icelake */ +/* including generic/stage1/json_escape_scanner.h for icelake: #include */ +/* begin file generic/stage1/json_escape_scanner.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_ESCAPE_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_ESCAPE_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace stage1 { + +/** + * Scans for escape characters in JSON, taking care with multiple backslashes (\\n vs. \n). + */ +struct json_escape_scanner { + /** The actual escape characters (the backslashes themselves). */ + uint64_t next_is_escaped = 0ULL; + + struct escaped_and_escape { + /** + * Mask of escaped characters. + * + * ``` + * \n \\n \\\n \\\\n \ + * 0100100010100101000 + * n \ \ n \ \ + * ``` + */ + uint64_t escaped; + /** + * Mask of escape characters. + * + * ``` + * \n \\n \\\n \\\\n \ + * 1001000101001010001 + * \ \ \ \ \ \ \ + * ``` + */ + uint64_t escape; + }; + + /** + * Get a mask of both escape and escaped characters (the characters following a backslash). + * + * @param potential_escape A mask of the character that can escape others (but could be + * escaped itself). e.g. block.eq('\\') + */ + simdjson_really_inline escaped_and_escape next(uint64_t backslash) noexcept { + +#if !SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT + if (!backslash) { return {next_escaped_without_backslashes(), 0}; } +#endif + + // | | Mask (shows characters instead of 1's) | Depth | Instructions | + // |--------------------------------|----------------------------------------|-------|---------------------| + // | string | `\\n_\\\n___\\\n___\\\\___\\\\__\\\` | | | + // | | ` even odd even odd odd` | | | + // | potential_escape | ` \ \\\ \\\ \\\\ \\\\ \\\` | 1 | 1 (backslash & ~first_is_escaped) + // | escape_and_terminal_code | ` \n \ \n \ \n \ \ \ \ \ \` | 5 | 5 (next_escape_and_terminal_code()) + // | escaped | `\ \ n \ n \ \ \ \ \ ` X | 6 | 7 (escape_and_terminal_code ^ (potential_escape | first_is_escaped)) + // | escape | ` \ \ \ \ \ \ \ \ \ \` | 6 | 8 (escape_and_terminal_code & backslash) + // | first_is_escaped | `\ ` | 7 (*) | 9 (escape >> 63) () + // (*) this is not needed until the next iteration + uint64_t escape_and_terminal_code = next_escape_and_terminal_code(backslash & ~this->next_is_escaped); + uint64_t escaped = escape_and_terminal_code ^ (backslash | this->next_is_escaped); + uint64_t escape = escape_and_terminal_code & backslash; + this->next_is_escaped = escape >> 63; + return {escaped, escape}; + } + +private: + static constexpr const uint64_t ODD_BITS = 0xAAAAAAAAAAAAAAAAULL; + + simdjson_really_inline uint64_t next_escaped_without_backslashes() noexcept { + uint64_t escaped = this->next_is_escaped; + this->next_is_escaped = 0; + return escaped; + } + + /** + * Returns a mask of the next escape characters (masking out escaped backslashes), along with + * any non-backslash escape codes. + * + * \n \\n \\\n \\\\n returns: + * \n \ \ \n \ \ + * 11 100 1011 10100 + * + * You are expected to mask out the first bit yourself if the previous block had a trailing + * escape. + * + * & the result with potential_escape to get just the escape characters. + * ^ the result with (potential_escape | first_is_escaped) to get escaped characters. + */ + static simdjson_really_inline uint64_t next_escape_and_terminal_code(uint64_t potential_escape) noexcept { + // If we were to just shift and mask out any odd bits, we'd actually get a *half* right answer: + // any even-aligned backslash runs would be correct! Odd-aligned backslash runs would be + // inverted (\\\ would be 010 instead of 101). + // + // ``` + // string: | ____\\\\_\\\\_____ | + // maybe_escaped | ODD | \ \ \ \ | + // even-aligned ^^^ ^^^^ odd-aligned + // ``` + // + // Taking that into account, our basic strategy is: + // + // 1. Use subtraction to produce a mask with 1's for even-aligned runs and 0's for + // odd-aligned runs. + // 2. XOR all odd bits, which masks out the odd bits in even-aligned runs, and brings IN the + // odd bits in odd-aligned runs. + // 3. & with backslash to clean up any stray bits. + // runs are set to 0, and then XORing with "odd": + // + // | | Mask (shows characters instead of 1's) | Instructions | + // |--------------------------------|----------------------------------------|---------------------| + // | string | `\\n_\\\n___\\\n___\\\\___\\\\__\\\` | + // | | ` even odd even odd odd` | + // | maybe_escaped | ` n \\n \\n \\\_ \\\_ \\` X | 1 (potential_escape << 1) + // | maybe_escaped_and_odd | ` \n_ \\n _ \\\n_ _ \\\__ _\\\_ \\\` | 1 (maybe_escaped | odd) + // | even_series_codes_and_odd | ` n_\\\ _ n_ _\\\\ _ _ ` | 1 (maybe_escaped_and_odd - potential_escape) + // | escape_and_terminal_code | ` \n \ \n \ \n \ \ \ \ \ \` | 1 (^ odd) + // + + // Escaped characters are characters following an escape. + uint64_t maybe_escaped = potential_escape << 1; + + // To distinguish odd from even escape sequences, therefore, we turn on any *starting* + // escapes that are on an odd byte. (We actually bring in all odd bits, for speed.) + // - Odd runs of backslashes are 0000, and the code at the end ("n" in \n or \\n) is 1. + // - Odd runs of backslashes are 1111, and the code at the end ("n" in \n or \\n) is 0. + // - All other odd bytes are 1, and even bytes are 0. + uint64_t maybe_escaped_and_odd_bits = maybe_escaped | ODD_BITS; + uint64_t even_series_codes_and_odd_bits = maybe_escaped_and_odd_bits - potential_escape; + + // Now we flip all odd bytes back with xor. This: + // - Makes odd runs of backslashes go from 0000 to 1010 + // - Makes even runs of backslashes go from 1111 to 1010 + // - Sets actually-escaped codes to 1 (the n in \n and \\n: \n = 11, \\n = 100) + // - Resets all other bytes to 0 + return even_series_codes_and_odd_bits ^ ODD_BITS; + } +}; + +} // namespace stage1 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H +/* end file generic/stage1/json_escape_scanner.h for icelake */ +/* including generic/stage1/json_string_scanner.h for icelake: #include */ +/* begin file generic/stage1/json_string_scanner.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace stage1 { + +struct json_string_block { + // We spell out the constructors in the hope of resolving inlining issues with Visual Studio 2017 + simdjson_really_inline json_string_block(uint64_t escaped, uint64_t quote, uint64_t in_string) : + _escaped(escaped), _quote(quote), _in_string(in_string) {} + + // Escaped characters (characters following an escape() character) + simdjson_really_inline uint64_t escaped() const { return _escaped; } + // Real (non-backslashed) quotes + simdjson_really_inline uint64_t quote() const { return _quote; } + // Only characters inside the string (not including the quotes) + simdjson_really_inline uint64_t string_content() const { return _in_string & ~_quote; } + // Return a mask of whether the given characters are inside a string (only works on non-quotes) + simdjson_really_inline uint64_t non_quote_inside_string(uint64_t mask) const { return mask & _in_string; } + // Return a mask of whether the given characters are inside a string (only works on non-quotes) + simdjson_really_inline uint64_t non_quote_outside_string(uint64_t mask) const { return mask & ~_in_string; } + // Tail of string (everything except the start quote) + simdjson_really_inline uint64_t string_tail() const { return _in_string ^ _quote; } + + // escaped characters (backslashed--does not include the hex characters after \u) + uint64_t _escaped; + // real quotes (non-escaped ones) + uint64_t _quote; + // string characters (includes start quote but not end quote) + uint64_t _in_string; +}; + +// Scans blocks for string characters, storing the state necessary to do so +class json_string_scanner { +public: + simdjson_really_inline json_string_block next(const simd::simd8x64& in); + // Returns either UNCLOSED_STRING or SUCCESS + simdjson_really_inline error_code finish(); + +private: + // Scans for escape characters + json_escape_scanner escape_scanner{}; + // Whether the last iteration was still inside a string (all 1's = true, all 0's = false). + uint64_t prev_in_string = 0ULL; +}; + +// +// Return a mask of all string characters plus end quotes. +// +// prev_escaped is overflow saying whether the next character is escaped. +// prev_in_string is overflow saying whether we're still in a string. +// +// Backslash sequences outside of quotes will be detected in stage 2. +// +simdjson_really_inline json_string_block json_string_scanner::next(const simd::simd8x64& in) { + const uint64_t backslash = in.eq('\\'); + const uint64_t escaped = escape_scanner.next(backslash).escaped; + const uint64_t quote = in.eq('"') & ~escaped; + + // + // prefix_xor flips on bits inside the string (and flips off the end quote). + // + // Then we xor with prev_in_string: if we were in a string already, its effect is flipped + // (characters inside strings are outside, and characters outside strings are inside). + // + const uint64_t in_string = prefix_xor(quote) ^ prev_in_string; + + // + // Check if we're still in a string at the end of the box so the next block will know + // + prev_in_string = uint64_t(static_cast(in_string) >> 63); + + // Use ^ to turn the beginning quote off, and the end quote on. + + // We are returning a function-local object so either we get a move constructor + // or we get copy elision. + return json_string_block(escaped, quote, in_string); +} + +simdjson_really_inline error_code json_string_scanner::finish() { + if (prev_in_string) { + return UNCLOSED_STRING; + } + return SUCCESS; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H +/* end file generic/stage1/json_string_scanner.h for icelake */ +/* including generic/stage1/utf8_lookup4_algorithm.h for icelake: #include */ +/* begin file generic/stage1/utf8_lookup4_algorithm.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace utf8_validation { + +using namespace simd; + + simdjson_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) +// Bit 1 = Too Long (ASCII followed by continuation) +// Bit 2 = Overlong 3-byte +// Bit 4 = Surrogate +// Bit 5 = Overlong 2-byte +// Bit 7 = Two Continuations + constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ + // 11______ 11______ + constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ + constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ + constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ + constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ + constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ + constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ + // 11110100 101_____ + // 11110101 1001____ + // 11110101 101_____ + // 1111011_ 1001____ + // 1111011_ 101_____ + // 11111___ 1001____ + // 11111___ 101_____ + constexpr const uint8_t TOO_LARGE_1000 = 1<<6; + // 11110101 1000____ + // 1111011_ 1000____ + // 11111___ 1000____ + constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + + const simd8 byte_1_high = prev1.shr<4>().lookup_16( + // 0_______ ________ + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + // 10______ ________ + TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, + // 1100____ ________ + TOO_SHORT | OVERLONG_2, + // 1101____ ________ + TOO_SHORT, + // 1110____ ________ + TOO_SHORT | OVERLONG_3 | SURROGATE, + // 1111____ ________ + TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + ); + constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . + const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( + // ____0000 ________ + CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, + // ____0001 ________ + CARRY | OVERLONG_2, + // ____001_ ________ + CARRY, + CARRY, + + // ____0100 ________ + CARRY | TOO_LARGE, + // ____0101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____011_ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + + // ____1___ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____1101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000 + ); + const simd8 byte_2_high = input.shr<4>().lookup_16( + // ________ 0_______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + simdjson_inline simd8 check_multibyte_lengths(const simd8 input, + const simd8 prev_input, const simd8 sc) { + simd8 prev2 = input.prev<2>(prev_input); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; + } + + // + // Return nonzero if there are incomplete multibyte characters at the end of the block: + // e.g. if there is a 4-byte character, but it's 3 bytes from the end. + // + simdjson_inline simd8 is_incomplete(const simd8 input) { + // If the previous input's last 3 bytes match this, they're too short (they ended at EOF): + // ... 1111____ 111_____ 11______ +#if SIMDJSON_IMPLEMENTATION_ICELAKE + static const uint8_t max_array[64] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1 + }; +#else + static const uint8_t max_array[32] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1 + }; +#endif + const simd8 max_value(&max_array[sizeof(max_array)-sizeof(simd8)]); + return input.gt_bits(max_value); + } + + struct utf8_checker { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; + // The last input we received + simd8 prev_input_block; + // Whether the last input we received was incomplete (used for ASCII fast path) + simd8 prev_incomplete; + + // + // Check whether the current bytes are valid UTF-8. + // + simdjson_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + simd8 sc = check_special_cases(input, prev1); + this->error |= check_multibyte_lengths(input, prev_input, sc); + } + + // The only problem that can happen at EOF is that a multibyte character is too short + // or a byte value too large in the last bytes: check_special_cases only checks for bytes + // too large in the first of two bytes. + simdjson_inline void check_eof() { + // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't + // possibly finish them. + this->error |= this->prev_incomplete; + } + + simdjson_inline void check_next_input(const simd8x64& input) { + if(simdjson_likely(is_ascii(input))) { + this->error |= this->prev_incomplete; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 1) + ||(simd8x64::NUM_CHUNKS == 2) + || (simd8x64::NUM_CHUNKS == 4), + "We support one, two or four chunks per 64-byte block."); + SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 1) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + } else SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + this->prev_incomplete = is_incomplete(input.chunks[simd8x64::NUM_CHUNKS-1]); + this->prev_input_block = input.chunks[simd8x64::NUM_CHUNKS-1]; + } + } + // do not forget to call check_eof! + simdjson_inline error_code errors() { + return this->error.any_bits_set_anywhere() ? error_code::UTF8_ERROR : error_code::SUCCESS; + } + + }; // struct utf8_checker +} // namespace utf8_validation + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H +/* end file generic/stage1/utf8_lookup4_algorithm.h for icelake */ +/* including generic/stage1/json_scanner.h for icelake: #include */ +/* begin file generic/stage1/json_scanner.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace stage1 { + +/** + * A block of scanned json, with information on operators and scalars. + * + * We seek to identify pseudo-structural characters. Anything that is inside + * a string must be omitted (hence & ~_string.string_tail()). + * Otherwise, pseudo-structural characters come in two forms. + * 1. We have the structural characters ([,],{,},:, comma). The + * term 'structural character' is from the JSON RFC. + * 2. We have the 'scalar pseudo-structural characters'. + * Scalars are quotes, and any character except structural characters and white space. + * + * To identify the scalar pseudo-structural characters, we must look at what comes + * before them: it must be a space, a quote or a structural characters. + * Starting with simdjson v0.3, we identify them by + * negation: we identify everything that is followed by a non-quote scalar, + * and we negate that. Whatever remains must be a 'scalar pseudo-structural character'. + */ +struct json_block { +public: + // We spell out the constructors in the hope of resolving inlining issues with Visual Studio 2017 + simdjson_inline json_block(json_string_block&& string, json_character_block characters, uint64_t follows_potential_nonquote_scalar) : + _string(std::move(string)), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {} + simdjson_inline json_block(json_string_block string, json_character_block characters, uint64_t follows_potential_nonquote_scalar) : + _string(string), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {} + + /** + * The start of structurals. + * In simdjson prior to v0.3, these were called the pseudo-structural characters. + **/ + simdjson_inline uint64_t structural_start() const noexcept { return potential_structural_start() & ~_string.string_tail(); } + /** All JSON whitespace (i.e. not in a string) */ + simdjson_inline uint64_t whitespace() const noexcept { return non_quote_outside_string(_characters.whitespace()); } + + // Helpers + + /** Whether the given characters are inside a string (only works on non-quotes) */ + simdjson_inline uint64_t non_quote_inside_string(uint64_t mask) const noexcept { return _string.non_quote_inside_string(mask); } + /** Whether the given characters are outside a string (only works on non-quotes) */ + simdjson_inline uint64_t non_quote_outside_string(uint64_t mask) const noexcept { return _string.non_quote_outside_string(mask); } + + // string and escape characters + json_string_block _string; + // whitespace, structural characters ('operators'), scalars + json_character_block _characters; + // whether the previous character was a scalar + uint64_t _follows_potential_nonquote_scalar; +private: + // Potential structurals (i.e. disregarding strings) + + /** + * structural elements ([,],{,},:, comma) plus scalar starts like 123, true and "abc". + * They may reside inside a string. + **/ + simdjson_inline uint64_t potential_structural_start() const noexcept { return _characters.op() | potential_scalar_start(); } + /** + * The start of non-operator runs, like 123, true and "abc". + * It main reside inside a string. + **/ + simdjson_inline uint64_t potential_scalar_start() const noexcept { + // The term "scalar" refers to anything except structural characters and white space + // (so letters, numbers, quotes). + // Whenever it is preceded by something that is not a structural element ({,},[,],:, ") nor a white-space + // then we know that it is irrelevant structurally. + return _characters.scalar() & ~follows_potential_scalar(); + } + /** + * Whether the given character is immediately after a non-operator like 123, true. + * The characters following a quote are not included. + */ + simdjson_inline uint64_t follows_potential_scalar() const noexcept { + // _follows_potential_nonquote_scalar: is defined as marking any character that follows a character + // that is not a structural element ({,},[,],:, comma) nor a quote (") and that is not a + // white space. + // It is understood that within quoted region, anything at all could be marked (irrelevant). + return _follows_potential_nonquote_scalar; + } +}; + +/** + * Scans JSON for important bits: structural characters or 'operators', strings, and scalars. + * + * The scanner starts by calculating two distinct things: + * - string characters (taking \" into account) + * - structural characters or 'operators' ([]{},:, comma) + * and scalars (runs of non-operators like 123, true and "abc") + * + * To minimize data dependency (a key component of the scanner's speed), it finds these in parallel: + * in particular, the operator/scalar bit will find plenty of things that are actually part of + * strings. When we're done, json_block will fuse the two together by masking out tokens that are + * part of a string. + */ +class json_scanner { +public: + json_scanner() = default; + simdjson_inline json_block next(const simd::simd8x64& in); + // Returns either UNCLOSED_STRING or SUCCESS + simdjson_inline error_code finish(); + +private: + // Whether the last character of the previous iteration is part of a scalar token + // (anything except whitespace or a structural character/'operator'). + uint64_t prev_scalar = 0ULL; + json_string_scanner string_scanner{}; +}; + + +// +// Check if the current character immediately follows a matching character. +// +// For example, this checks for quotes with backslashes in front of them: +// +// const uint64_t backslashed_quote = in.eq('"') & immediately_follows(in.eq('\'), prev_backslash); +// +simdjson_inline uint64_t follows(const uint64_t match, uint64_t &overflow) { + const uint64_t result = match << 1 | overflow; + overflow = match >> 63; + return result; +} + +simdjson_inline json_block json_scanner::next(const simd::simd8x64& in) { + json_string_block strings = string_scanner.next(in); + // identifies the white-space and the structural characters + json_character_block characters = json_character_block::classify(in); + // The term "scalar" refers to anything except structural characters and white space + // (so letters, numbers, quotes). + // We want follows_scalar to mark anything that follows a non-quote scalar (so letters and numbers). + // + // A terminal quote should either be followed by a structural character (comma, brace, bracket, colon) + // or nothing. However, we still want ' "a string"true ' to mark the 't' of 'true' as a potential + // pseudo-structural character just like we would if we had ' "a string" true '; otherwise we + // may need to add an extra check when parsing strings. + // + // Performance: there are many ways to skin this cat. + const uint64_t nonquote_scalar = characters.scalar() & ~strings.quote(); + uint64_t follows_nonquote_scalar = follows(nonquote_scalar, prev_scalar); + // We are returning a function-local object so either we get a move constructor + // or we get copy elision. + return json_block( + strings,// strings is a function-local object so either it moves or the copy is elided. + characters, + follows_nonquote_scalar + ); +} + +simdjson_inline error_code json_scanner::finish() { + return string_scanner.finish(); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H +/* end file generic/stage1/json_scanner.h for icelake */ + +// All other declarations +/* including generic/stage1/find_next_document_index.h for icelake: #include */ +/* begin file generic/stage1/find_next_document_index.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace stage1 { + +/** + * This algorithm is used to quickly identify the last structural position that + * makes up a complete document. + * + * It does this by going backwards and finding the last *document boundary* (a + * place where one value follows another without a comma between them). If the + * last document (the characters after the boundary) has an equal number of + * start and end brackets, it is considered complete. + * + * Simply put, we iterate over the structural characters, starting from + * the end. We consider that we found the end of a JSON document when the + * first element of the pair is NOT one of these characters: '{' '[' ':' ',' + * and when the second element is NOT one of these characters: '}' ']' ':' ','. + * + * This simple comparison works most of the time, but it does not cover cases + * where the batch's structural indexes contain a perfect amount of documents. + * In such a case, we do not have access to the structural index which follows + * the last document, therefore, we do not have access to the second element in + * the pair, and that means we cannot identify the last document. To fix this + * issue, we keep a count of the open and closed curly/square braces we found + * while searching for the pair. When we find a pair AND the count of open and + * closed curly/square braces is the same, we know that we just passed a + * complete document, therefore the last json buffer location is the end of the + * batch. + */ +simdjson_inline uint32_t find_next_document_index(dom_parser_implementation &parser) { + // Variant: do not count separately, just figure out depth + if(parser.n_structural_indexes == 0) { return 0; } + auto arr_cnt = 0; + auto obj_cnt = 0; + for (auto i = parser.n_structural_indexes - 1; i > 0; i--) { + auto idxb = parser.structural_indexes[i]; + switch (parser.buf[idxb]) { + case ':': + case ',': + continue; + case '}': + obj_cnt--; + continue; + case ']': + arr_cnt--; + continue; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + auto idxa = parser.structural_indexes[i - 1]; + switch (parser.buf[idxa]) { + case '{': + case '[': + case ':': + case ',': + continue; + } + // Last document is complete, so the next document will appear after! + if (!arr_cnt && !obj_cnt) { + return parser.n_structural_indexes; + } + // Last document is incomplete; mark the document at i + 1 as the next one + return i; + } + // If we made it to the end, we want to finish counting to see if we have a full document. + switch (parser.buf[parser.structural_indexes[0]]) { + case '}': + obj_cnt--; + break; + case ']': + arr_cnt--; + break; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + if (!arr_cnt && !obj_cnt) { + // We have a complete document. + return parser.n_structural_indexes; + } + return 0; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H +/* end file generic/stage1/find_next_document_index.h for icelake */ +/* including generic/stage1/json_minifier.h for icelake: #include */ +/* begin file generic/stage1/json_minifier.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses in stage1 +// It is intended to be included multiple times and compiled multiple times +// We assume the file in which it is included already includes +// "simdjson/stage1.h" (this simplifies amalgation) + +namespace simdjson { +namespace icelake { +namespace { +namespace stage1 { + +class json_minifier { +public: + template + static error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept; + +private: + simdjson_inline json_minifier(uint8_t *_dst) + : dst{_dst} + {} + template + simdjson_inline void step(const uint8_t *block_buf, buf_block_reader &reader) noexcept; + simdjson_inline void next(const simd::simd8x64& in, const json_block& block); + simdjson_inline error_code finish(uint8_t *dst_start, size_t &dst_len); + json_scanner scanner{}; + uint8_t *dst; +}; + +simdjson_inline void json_minifier::next(const simd::simd8x64& in, const json_block& block) { + uint64_t mask = block.whitespace(); + dst += in.compress(mask, dst); +} + +simdjson_inline error_code json_minifier::finish(uint8_t *dst_start, size_t &dst_len) { + error_code error = scanner.finish(); + if (error) { dst_len = 0; return error; } + dst_len = dst - dst_start; + return SUCCESS; +} + +template<> +simdjson_inline void json_minifier::step<128>(const uint8_t *block_buf, buf_block_reader<128> &reader) noexcept { + simd::simd8x64 in_1(block_buf); + simd::simd8x64 in_2(block_buf+64); + json_block block_1 = scanner.next(in_1); + json_block block_2 = scanner.next(in_2); + this->next(in_1, block_1); + this->next(in_2, block_2); + reader.advance(); +} + +template<> +simdjson_inline void json_minifier::step<64>(const uint8_t *block_buf, buf_block_reader<64> &reader) noexcept { + simd::simd8x64 in_1(block_buf); + json_block block_1 = scanner.next(in_1); + this->next(block_buf, block_1); + reader.advance(); +} + +template +error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept { + buf_block_reader reader(buf, len); + json_minifier minifier(dst); + + // Index the first n-1 blocks + while (reader.has_full_block()) { + minifier.step(reader.full_block(), reader); + } + + // Index the last (remainder) block, padded with spaces + uint8_t block[STEP_SIZE]; + size_t remaining_bytes = reader.get_remainder(block); + if (remaining_bytes > 0) { + // We do not want to write directly to the output stream. Rather, we write + // to a local buffer (for safety). + uint8_t out_block[STEP_SIZE]; + uint8_t * const guarded_dst{minifier.dst}; + minifier.dst = out_block; + minifier.step(block, reader); + size_t to_write = minifier.dst - out_block; + // In some cases, we could be enticed to consider the padded spaces + // as part of the string. This is fine as long as we do not write more + // than we consumed. + if(to_write > remaining_bytes) { to_write = remaining_bytes; } + memcpy(guarded_dst, out_block, to_write); + minifier.dst = guarded_dst + to_write; + } + return minifier.finish(dst, dst_len); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H +/* end file generic/stage1/json_minifier.h for icelake */ +/* including generic/stage1/json_structural_indexer.h for icelake: #include */ +/* begin file generic/stage1/json_structural_indexer.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses in stage1 +// It is intended to be included multiple times and compiled multiple times +// We assume the file in which it is included already includes +// "simdjson/stage1.h" (this simplifies amalgation) + +namespace simdjson { +namespace icelake { +namespace { +namespace stage1 { + +class bit_indexer { +public: + uint32_t *tail; + + simdjson_inline bit_indexer(uint32_t *index_buf) : tail(index_buf) {} + +#if SIMDJSON_PREFER_REVERSE_BITS + /** + * ARM lacks a fast trailing zero instruction, but it has a fast + * bit reversal instruction and a fast leading zero instruction. + * Thus it may be profitable to reverse the bits (once) and then + * to rely on a sequence of instructions that call the leading + * zero instruction. + * + * Performance notes: + * The chosen routine is not optimal in terms of data dependency + * since zero_leading_bit might require two instructions. However, + * it tends to minimize the total number of instructions which is + * beneficial. + */ + simdjson_inline void write_index(uint32_t idx, uint64_t& rev_bits, int i) { + int lz = leading_zeroes(rev_bits); + this->tail[i] = static_cast(idx) + lz; + rev_bits = zero_leading_bit(rev_bits, lz); + } +#else + /** + * Under recent x64 systems, we often have both a fast trailing zero + * instruction and a fast 'clear-lower-bit' instruction so the following + * algorithm can be competitive. + */ + + simdjson_inline void write_index(uint32_t idx, uint64_t& bits, int i) { + this->tail[i] = idx + trailing_zeroes(bits); + bits = clear_lowest_bit(bits); + } +#endif // SIMDJSON_PREFER_REVERSE_BITS + + template + simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) { + write_index(idx, bits, START); + SIMDJSON_IF_CONSTEXPR (N > 1) { + write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits); + } + return START+N; + } + + template + simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) { + write_indexes(idx, bits); + SIMDJSON_IF_CONSTEXPR ((START+STEP) < END) { + if (simdjson_unlikely((START+STEP) < cnt)) { + write_indexes_stepped<(START+STEP(idx, bits, cnt); + } + } + return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP; + } + + // flatten out values in 'bits' assuming that they are are to have values of idx + // plus their position in the bitvector, and store these indexes at + // base_ptr[base] incrementing base as we go + // will potentially store extra values beyond end of valid bits, so base_ptr + // needs to be large enough to handle this + // + // If the kernel sets SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER, then it + // will provide its own version of the code. +#ifdef SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + simdjson_inline void write(uint32_t idx, uint64_t bits); +#else + simdjson_inline void write(uint32_t idx, uint64_t bits) { + // In some instances, the next branch is expensive because it is mispredicted. + // Unfortunately, in other cases, + // it helps tremendously. + if (bits == 0) + return; + + int cnt = static_cast(count_ones(bits)); + +#if SIMDJSON_PREFER_REVERSE_BITS + bits = reverse_bits(bits); +#endif +#ifdef SIMDJSON_STRUCTURAL_INDEXER_STEP + static constexpr const int STEP = SIMDJSON_STRUCTURAL_INDEXER_STEP; +#else + static constexpr const int STEP = 4; +#endif + static constexpr const int STEP_UNTIL = 24; + + write_indexes_stepped<0, STEP_UNTIL, STEP>(idx, bits, cnt); + SIMDJSON_IF_CONSTEXPR (STEP_UNTIL < 64) { + if (simdjson_unlikely(STEP_UNTIL < cnt)) { + for (int i=STEP_UNTIL; itail += cnt; + } +#endif // SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +}; + +class json_structural_indexer { +public: + /** + * Find the important bits of JSON in a 128-byte chunk, and add them to structural_indexes. + * + * @param partial Setting the partial parameter to true allows the find_structural_bits to + * tolerate unclosed strings. The caller should still ensure that the input is valid UTF-8. If + * you are processing substrings, you may want to call on a function like trimmed_length_safe_utf8. + */ + template + static error_code index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept; + +private: + simdjson_inline json_structural_indexer(uint32_t *structural_indexes); + template + simdjson_inline void step(const uint8_t *block, buf_block_reader &reader) noexcept; + simdjson_inline void next(const simd::simd8x64& in, const json_block& block, size_t idx); + simdjson_inline error_code finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial); + + json_scanner scanner{}; + utf8_checker checker{}; + bit_indexer indexer; + uint64_t prev_structurals = 0; + uint64_t unescaped_chars_error = 0; +}; + +simdjson_inline json_structural_indexer::json_structural_indexer(uint32_t *structural_indexes) : indexer{structural_indexes} {} + +// Skip the last character if it is partial +simdjson_inline size_t trim_partial_utf8(const uint8_t *buf, size_t len) { + if (simdjson_unlikely(len < 3)) { + switch (len) { + case 2: + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (buf[len-2] >= 0xe0) { return len-2; } // 3- and 4-byte characters with only 2 bytes left + return len; + case 1: + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + return len; + case 0: + return len; + } + } + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (buf[len-2] >= 0xe0) { return len-2; } // 3- and 4-byte characters with only 1 byte left + if (buf[len-3] >= 0xf0) { return len-3; } // 4-byte characters with only 3 bytes left + return len; +} + +// +// PERF NOTES: +// We pipe 2 inputs through these stages: +// 1. Load JSON into registers. This takes a long time and is highly parallelizable, so we load +// 2 inputs' worth at once so that by the time step 2 is looking for them input, it's available. +// 2. Scan the JSON for critical data: strings, scalars and operators. This is the critical path. +// The output of step 1 depends entirely on this information. These functions don't quite use +// up enough CPU: the second half of the functions is highly serial, only using 1 execution core +// at a time. The second input's scans has some dependency on the first ones finishing it, but +// they can make a lot of progress before they need that information. +// 3. Step 1 doesn't use enough capacity, so we run some extra stuff while we're waiting for that +// to finish: utf-8 checks and generating the output from the last iteration. +// +// The reason we run 2 inputs at a time, is steps 2 and 3 are *still* not enough to soak up all +// available capacity with just one input. Running 2 at a time seems to give the CPU a good enough +// workout. +// +template +error_code json_structural_indexer::index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept { + if (simdjson_unlikely(len > parser.capacity())) { return CAPACITY; } + // We guard the rest of the code so that we can assume that len > 0 throughout. + if (len == 0) { return EMPTY; } + if (is_streaming(partial)) { + len = trim_partial_utf8(buf, len); + // If you end up with an empty window after trimming + // the partial UTF-8 bytes, then chances are good that you + // have an UTF-8 formatting error. + if(len == 0) { return UTF8_ERROR; } + } + buf_block_reader reader(buf, len); + json_structural_indexer indexer(parser.structural_indexes.get()); + + // Read all but the last block + while (reader.has_full_block()) { + indexer.step(reader.full_block(), reader); + } + // Take care of the last block (will always be there unless file is empty which is + // not supposed to happen.) + uint8_t block[STEP_SIZE]; + if (simdjson_unlikely(reader.get_remainder(block) == 0)) { return UNEXPECTED_ERROR; } + indexer.step(block, reader); + return indexer.finish(parser, reader.block_index(), len, partial); +} + +template<> +simdjson_inline void json_structural_indexer::step<128>(const uint8_t *block, buf_block_reader<128> &reader) noexcept { + simd::simd8x64 in_1(block); + simd::simd8x64 in_2(block+64); + json_block block_1 = scanner.next(in_1); + json_block block_2 = scanner.next(in_2); + this->next(in_1, block_1, reader.block_index()); + this->next(in_2, block_2, reader.block_index()+64); + reader.advance(); +} + +template<> +simdjson_inline void json_structural_indexer::step<64>(const uint8_t *block, buf_block_reader<64> &reader) noexcept { + simd::simd8x64 in_1(block); + json_block block_1 = scanner.next(in_1); + this->next(in_1, block_1, reader.block_index()); + reader.advance(); +} + +simdjson_inline void json_structural_indexer::next(const simd::simd8x64& in, const json_block& block, size_t idx) { + uint64_t unescaped = in.lteq(0x1F); +#if SIMDJSON_UTF8VALIDATION + checker.check_next_input(in); +#endif + indexer.write(uint32_t(idx-64), prev_structurals); // Output *last* iteration's structurals to the parser + prev_structurals = block.structural_start(); + unescaped_chars_error |= block.non_quote_inside_string(unescaped); +} + +simdjson_inline error_code json_structural_indexer::finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial) { + // Write out the final iteration's structurals + indexer.write(uint32_t(idx-64), prev_structurals); + error_code error = scanner.finish(); + // We deliberately break down the next expression so that it is + // human readable. + const bool should_we_exit = is_streaming(partial) ? + ((error != SUCCESS) && (error != UNCLOSED_STRING)) // when partial we tolerate UNCLOSED_STRING + : (error != SUCCESS); // if partial is false, we must have SUCCESS + const bool have_unclosed_string = (error == UNCLOSED_STRING); + if (simdjson_unlikely(should_we_exit)) { return error; } + + if (unescaped_chars_error) { + return UNESCAPED_CHARS; + } + parser.n_structural_indexes = uint32_t(indexer.tail - parser.structural_indexes.get()); + /*** + * The On Demand API requires special padding. + * + * This is related to https://github.com/simdjson/simdjson/issues/906 + * Basically, we want to make sure that if the parsing continues beyond the last (valid) + * structural character, it quickly stops. + * Only three structural characters can be repeated without triggering an error in JSON: [,] and }. + * We repeat the padding character (at 'len'). We don't know what it is, but if the parsing + * continues, then it must be [,] or }. + * Suppose it is ] or }. We backtrack to the first character, what could it be that would + * not trigger an error? It could be ] or } but no, because you can't start a document that way. + * It can't be a comma, a colon or any simple value. So the only way we could continue is + * if the repeated character is [. But if so, the document must start with [. But if the document + * starts with [, it should end with ]. If we enforce that rule, then we would get + * ][[ which is invalid. + * + * This is illustrated with the test array_iterate_unclosed_error() on the following input: + * R"({ "a": [,,)" + **/ + parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); // used later in partial == stage1_mode::streaming_final + parser.structural_indexes[parser.n_structural_indexes + 1] = uint32_t(len); + parser.structural_indexes[parser.n_structural_indexes + 2] = 0; + parser.next_structural_index = 0; + // a valid JSON file cannot have zero structural indexes - we should have found something + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { + return EMPTY; + } + if (simdjson_unlikely(parser.structural_indexes[parser.n_structural_indexes - 1] > len)) { + return UNEXPECTED_ERROR; + } + if (partial == stage1_mode::streaming_partial) { + // If we have an unclosed string, then the last structural + // will be the quote and we want to make sure to omit it. + if(have_unclosed_string) { + parser.n_structural_indexes--; + // a valid JSON file cannot have zero structural indexes - we should have found something + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { return CAPACITY; } + } + // We truncate the input to the end of the last complete document (or zero). + auto new_structural_indexes = find_next_document_index(parser); + if (new_structural_indexes == 0 && parser.n_structural_indexes > 0) { + if(parser.structural_indexes[0] == 0) { + // If the buffer is partial and we started at index 0 but the document is + // incomplete, it's too big to parse. + return CAPACITY; + } else { + // It is possible that the document could be parsed, we just had a lot + // of white space. + parser.n_structural_indexes = 0; + return EMPTY; + } + } + + parser.n_structural_indexes = new_structural_indexes; + } else if (partial == stage1_mode::streaming_final) { + if(have_unclosed_string) { parser.n_structural_indexes--; } + // We truncate the input to the end of the last complete document (or zero). + // Because partial == stage1_mode::streaming_final, it means that we may + // silently ignore trailing garbage. Though it sounds bad, we do it + // deliberately because many people who have streams of JSON documents + // will truncate them for processing. E.g., imagine that you are uncompressing + // the data from a size file or receiving it in chunks from the network. You + // may not know where exactly the last document will be. Meanwhile the + // document_stream instances allow people to know the JSON documents they are + // parsing (see the iterator.source() method). + parser.n_structural_indexes = find_next_document_index(parser); + // We store the initial n_structural_indexes so that the client can see + // whether we used truncation. If initial_n_structural_indexes == parser.n_structural_indexes, + // then this will query parser.structural_indexes[parser.n_structural_indexes] which is len, + // otherwise, it will copy some prior index. + parser.structural_indexes[parser.n_structural_indexes + 1] = parser.structural_indexes[parser.n_structural_indexes]; + // This next line is critical, do not change it unless you understand what you are + // doing. + parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { + // We tolerate an unclosed string at the very end of the stream. Indeed, users + // often load their data in bulk without being careful and they want us to ignore + // the trailing garbage. + return EMPTY; + } + } + checker.check_eof(); + return checker.errors(); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +// Clear CUSTOM_BIT_INDEXER so other implementations can set it if they need to. +#undef SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H +/* end file generic/stage1/json_structural_indexer.h for icelake */ +/* including generic/stage1/utf8_validator.h for icelake: #include */ +/* begin file generic/stage1/utf8_validator.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace stage1 { + +/** + * Validates that the string is actual UTF-8. + */ +template +bool generic_validate_utf8(const uint8_t * input, size_t length) { + checker c{}; + buf_block_reader<64> reader(input, length); + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + c.check_next_input(in); + reader.advance(); + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + c.check_next_input(in); + reader.advance(); + c.check_eof(); + return c.errors() == error_code::SUCCESS; +} + +bool generic_validate_utf8(const char * input, size_t length) { + return generic_validate_utf8(reinterpret_cast(input),length); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H +/* end file generic/stage1/utf8_validator.h for icelake */ +/* end file generic/stage1/amalgamated.h for icelake */ +/* including generic/stage2/amalgamated.h for icelake: #include */ +/* begin file generic/stage2/amalgamated.h for icelake */ +// Stuff other things depend on +/* including generic/stage2/base.h for icelake: #include */ +/* begin file generic/stage2/base.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace stage2 { + +class json_iterator; +class structural_iterator; +struct tape_builder; +struct tape_writer; + +} // namespace stage2 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_BASE_H +/* end file generic/stage2/base.h for icelake */ +/* including generic/stage2/tape_writer.h for icelake: #include */ +/* begin file generic/stage2/tape_writer.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace icelake { +namespace { +namespace stage2 { + +struct tape_writer { + /** The next place to write to tape */ + uint64_t *next_tape_loc; + + /** Write a signed 64-bit value to tape. */ + simdjson_inline void append_s64(int64_t value) noexcept; + + /** Write an unsigned 64-bit value to tape. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + + /** Write a double value to tape. */ + simdjson_inline void append_double(double value) noexcept; + + /** + * Append a tape entry (an 8-bit type,and 56 bits worth of value). + */ + simdjson_inline void append(uint64_t val, internal::tape_type t) noexcept; + + /** + * Skip the current tape entry without writing. + * + * Used to skip the start of the container, since we'll come back later to fill it in when the + * container ends. + */ + simdjson_inline void skip() noexcept; + + /** + * Skip the number of tape entries necessary to write a large u64 or i64. + */ + simdjson_inline void skip_large_integer() noexcept; + + /** + * Skip the number of tape entries necessary to write a double. + */ + simdjson_inline void skip_double() noexcept; + + /** + * Write a value to a known location on tape. + * + * Used to go back and write out the start of a container after the container ends. + */ + simdjson_inline static void write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept; + +private: + /** + * Append both the tape entry, and a supplementary value following it. Used for types that need + * all 64 bits, such as double and uint64_t. + */ + template + simdjson_inline void append2(uint64_t val, T val2, internal::tape_type t) noexcept; +}; // struct tape_writer + +simdjson_inline void tape_writer::append_s64(int64_t value) noexcept { + append2(0, value, internal::tape_type::INT64); +} + +simdjson_inline void tape_writer::append_u64(uint64_t value) noexcept { + append(0, internal::tape_type::UINT64); + *next_tape_loc = value; + next_tape_loc++; +} + +/** Write a double value to tape. */ +simdjson_inline void tape_writer::append_double(double value) noexcept { + append2(0, value, internal::tape_type::DOUBLE); +} + +simdjson_inline void tape_writer::skip() noexcept { + next_tape_loc++; +} + +simdjson_inline void tape_writer::skip_large_integer() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::skip_double() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::append(uint64_t val, internal::tape_type t) noexcept { + *next_tape_loc = val | ((uint64_t(char(t))) << 56); + next_tape_loc++; +} + +template +simdjson_inline void tape_writer::append2(uint64_t val, T val2, internal::tape_type t) noexcept { + append(val, t); + static_assert(sizeof(val2) == sizeof(*next_tape_loc), "Type is not 64 bits!"); + memcpy(next_tape_loc, &val2, sizeof(val2)); + next_tape_loc++; +} + +simdjson_inline void tape_writer::write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept { + tape_loc = val | ((uint64_t(char(t))) << 56); +} + +} // namespace stage2 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H +/* end file generic/stage2/tape_writer.h for icelake */ +/* including generic/stage2/logger.h for icelake: #include */ +/* begin file generic/stage2/logger.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + + +// This is for an internal-only stage 2 specific logger. +// Set LOG_ENABLED = true to log what stage 2 is doing! +namespace simdjson { +namespace icelake { +namespace { +namespace logger { + + static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + static constexpr const int LOG_EVENT_LEN = 20; + static constexpr const int LOG_BUFFER_LEN = 30; + static constexpr const int LOG_SMALL_BUFFER_LEN = 10; + static constexpr const int LOG_INDEX_LEN = 5; + + static int log_depth; // Not threadsafe. Log only. + + // Helper to turn unprintable or newline characters into spaces + static simdjson_inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } + } + + // Print the header and set up log_start + static simdjson_inline void log_start() { + if (LOG_ENABLED) { + log_depth = 0; + printf("\n"); + printf("| %-*s | %-*s | %-*s | %-*s | Detail |\n", LOG_EVENT_LEN, "Event", LOG_BUFFER_LEN, "Buffer", LOG_SMALL_BUFFER_LEN, "Next", 5, "Next#"); + printf("|%.*s|%.*s|%.*s|%.*s|--------|\n", LOG_EVENT_LEN+2, DASHES, LOG_BUFFER_LEN+2, DASHES, LOG_SMALL_BUFFER_LEN+2, DASHES, 5+2, DASHES); + } + } + + simdjson_unused static simdjson_inline void log_string(const char *message) { + if (LOG_ENABLED) { + printf("%s\n", message); + } + } + + // Logs a single line from the stage 2 DOM parser + template + static simdjson_inline void log_line(S &structurals, const char *title_prefix, const char *title, const char *detail) { + if (LOG_ENABLED) { + printf("| %*s%s%-*s ", log_depth*2, "", title_prefix, LOG_EVENT_LEN - log_depth*2 - int(strlen(title_prefix)), title); + auto current_index = structurals.at_beginning() ? nullptr : structurals.next_structural-1; + auto next_index = structurals.next_structural; + auto current = current_index ? &structurals.buf[*current_index] : reinterpret_cast(" "); + auto next = &structurals.buf[*next_index]; + { + // Print the next N characters in the buffer. + printf("| "); + // Otherwise, print the characters starting from the buffer position. + // Print spaces for unprintable or newline characters. + for (int i=0;i */ +/* begin file generic/stage2/json_iterator.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace stage2 { + +class json_iterator { +public: + const uint8_t* const buf; + uint32_t *next_structural; + dom_parser_implementation &dom_parser; + uint32_t depth{0}; + + /** + * Walk the JSON document. + * + * The visitor receives callbacks when values are encountered. All callbacks pass the iterator as + * the first parameter; some callbacks have other parameters as well: + * + * - visit_document_start() - at the beginning. + * - visit_document_end() - at the end (if things were successful). + * + * - visit_array_start() - at the start `[` of a non-empty array. + * - visit_array_end() - at the end `]` of a non-empty array. + * - visit_empty_array() - when an empty array is encountered. + * + * - visit_object_end() - at the start `]` of a non-empty object. + * - visit_object_start() - at the end `]` of a non-empty object. + * - visit_empty_object() - when an empty object is encountered. + * - visit_key(const uint8_t *key) - when a key in an object field is encountered. key is + * guaranteed to point at the first quote of the string (`"key"`). + * - visit_primitive(const uint8_t *value) - when a value is a string, number, boolean or null. + * - visit_root_primitive(iter, uint8_t *value) - when the top-level value is a string, number, boolean or null. + * + * - increment_count(iter) - each time a value is found in an array or object. + */ + template + simdjson_warn_unused simdjson_inline error_code walk_document(V &visitor) noexcept; + + /** + * Create an iterator capable of walking a JSON document. + * + * The document must have already passed through stage 1. + */ + simdjson_inline json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index); + + /** + * Look at the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *peek() const noexcept; + /** + * Advance to the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *advance() noexcept; + /** + * Get the remaining length of the document, from the start of the current token. + */ + simdjson_inline size_t remaining_len() const noexcept; + /** + * Check if we are at the end of the document. + * + * If this is true, there are no more tokens. + */ + simdjson_inline bool at_eof() const noexcept; + /** + * Check if we are at the beginning of the document. + */ + simdjson_inline bool at_beginning() const noexcept; + simdjson_inline uint8_t last_structural() const noexcept; + + /** + * Log that a value has been found. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_value(const char *type) const noexcept; + /** + * Log the start of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_start_value(const char *type) const noexcept; + /** + * Log the end of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_end_value(const char *type) const noexcept; + /** + * Log an error. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_error(const char *error) const noexcept; + + template + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(V &visitor, const uint8_t *value) noexcept; + template + simdjson_warn_unused simdjson_inline error_code visit_primitive(V &visitor, const uint8_t *value) noexcept; +}; + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::walk_document(V &visitor) noexcept { + logger::log_start(); + + // + // Start the document + // + if (at_eof()) { return EMPTY; } + log_start_value("document"); + SIMDJSON_TRY( visitor.visit_document_start(*this) ); + + // + // Read first value + // + { + auto value = advance(); + + // Make sure the outer object or array is closed before continuing; otherwise, there are ways we + // could get into memory corruption. See https://github.com/simdjson/simdjson/issues/906 + if (!STREAMING) { + switch (*value) { + case '{': if (last_structural() != '}') { log_value("starting brace unmatched"); return TAPE_ERROR; }; break; + case '[': if (last_structural() != ']') { log_value("starting bracket unmatched"); return TAPE_ERROR; }; break; + } + } + + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_root_primitive(*this, value) ); break; + } + } + goto document_end; + +// +// Object parser states +// +object_begin: + log_start_value("object"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = false; + SIMDJSON_TRY( visitor.visit_object_start(*this) ); + + { + auto key = advance(); + if (*key != '"') { log_error("Object does not start with a key"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.increment_count(*this) ); + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + +object_field: + if (simdjson_unlikely( *advance() != ':' )) { log_error("Missing colon after key in object"); return TAPE_ERROR; } + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +object_continue: + switch (*advance()) { + case ',': + SIMDJSON_TRY( visitor.increment_count(*this) ); + { + auto key = advance(); + if (simdjson_unlikely( *key != '"' )) { log_error("Key string missing at beginning of field in object"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + goto object_field; + case '}': log_end_value("object"); SIMDJSON_TRY( visitor.visit_object_end(*this) ); goto scope_end; + default: log_error("No comma between object fields"); return TAPE_ERROR; + } + +scope_end: + depth--; + if (depth == 0) { goto document_end; } + if (dom_parser.is_array[depth]) { goto array_continue; } + goto object_continue; + +// +// Array parser states +// +array_begin: + log_start_value("array"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = true; + SIMDJSON_TRY( visitor.visit_array_start(*this) ); + SIMDJSON_TRY( visitor.increment_count(*this) ); + +array_value: + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +array_continue: + switch (*advance()) { + case ',': SIMDJSON_TRY( visitor.increment_count(*this) ); goto array_value; + case ']': log_end_value("array"); SIMDJSON_TRY( visitor.visit_array_end(*this) ); goto scope_end; + default: log_error("Missing comma between array values"); return TAPE_ERROR; + } + +document_end: + log_end_value("document"); + SIMDJSON_TRY( visitor.visit_document_end(*this) ); + + dom_parser.next_structural_index = uint32_t(next_structural - &dom_parser.structural_indexes[0]); + + // If we didn't make it to the end, it's an error + if ( !STREAMING && dom_parser.next_structural_index != dom_parser.n_structural_indexes ) { + log_error("More than one JSON value at the root of the document, or extra characters at the end of the JSON!"); + return TAPE_ERROR; + } + + return SUCCESS; + +} // walk_document() + +simdjson_inline json_iterator::json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index) + : buf{_dom_parser.buf}, + next_structural{&_dom_parser.structural_indexes[start_structural_index]}, + dom_parser{_dom_parser} { +} + +simdjson_inline const uint8_t *json_iterator::peek() const noexcept { + return &buf[*(next_structural)]; +} +simdjson_inline const uint8_t *json_iterator::advance() noexcept { + return &buf[*(next_structural++)]; +} +simdjson_inline size_t json_iterator::remaining_len() const noexcept { + return dom_parser.len - *(next_structural-1); +} + +simdjson_inline bool json_iterator::at_eof() const noexcept { + return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes]; +} +simdjson_inline bool json_iterator::at_beginning() const noexcept { + return next_structural == dom_parser.structural_indexes.get(); +} +simdjson_inline uint8_t json_iterator::last_structural() const noexcept { + return buf[dom_parser.structural_indexes[dom_parser.n_structural_indexes - 1]]; +} + +simdjson_inline void json_iterator::log_value(const char *type) const noexcept { + logger::log_line(*this, "", type, ""); +} + +simdjson_inline void json_iterator::log_start_value(const char *type) const noexcept { + logger::log_line(*this, "+", type, ""); + if (logger::LOG_ENABLED) { logger::log_depth++; } +} + +simdjson_inline void json_iterator::log_end_value(const char *type) const noexcept { + if (logger::LOG_ENABLED) { logger::log_depth--; } + logger::log_line(*this, "-", type, ""); +} + +simdjson_inline void json_iterator::log_error(const char *error) const noexcept { + logger::log_line(*this, "", "ERROR", error); +} + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_root_primitive(V &visitor, const uint8_t *value) noexcept { + switch (*value) { + case '"': return visitor.visit_root_string(*this, value); + case 't': return visitor.visit_root_true_atom(*this, value); + case 'f': return visitor.visit_root_false_atom(*this, value); + case 'n': return visitor.visit_root_null_atom(*this, value); + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return visitor.visit_root_number(*this, value); + default: + log_error("Document starts with a non-value character"); + return TAPE_ERROR; + } +} +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_primitive(V &visitor, const uint8_t *value) noexcept { + // Use the fact that most scalars are going to be either strings or numbers. + if(*value == '"') { + return visitor.visit_string(*this, value); + } else if (((*value - '0') < 10) || (*value == '-')) { + return visitor.visit_number(*this, value); + } + // true, false, null are uncommon. + switch (*value) { + case 't': return visitor.visit_true_atom(*this, value); + case 'f': return visitor.visit_false_atom(*this, value); + case 'n': return visitor.visit_null_atom(*this, value); + default: + log_error("Non-value found when value was expected!"); + return TAPE_ERROR; + } +} + +} // namespace stage2 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H +/* end file generic/stage2/json_iterator.h for icelake */ +/* including generic/stage2/stringparsing.h for icelake: #include */ +/* begin file generic/stage2/stringparsing.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses +// It is intended to be included multiple times and compiled multiple times + +namespace simdjson { +namespace icelake { +namespace { +/// @private +namespace stringparsing { + +// begin copypasta +// These chars yield themselves: " \ / +// b -> backspace, f -> formfeed, n -> newline, r -> cr, t -> horizontal tab +// u not handled in this table as it's complex +static const uint8_t escape_map[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2f, + 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, 0, 0, 0, 0, // 0x4. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x5c, 0, 0, 0, // 0x5. + 0, 0, 0x08, 0, 0, 0, 0x0c, 0, 0, 0, 0, 0, 0, 0, 0x0a, 0, // 0x6. + 0, 0, 0x0d, 0, 0x09, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x7. + + 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, 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, 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, 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, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +// handle a unicode codepoint +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint(const uint8_t **src_ptr, + uint8_t **dst_ptr, bool allow_replacement) { + // Use the default Unicode Character 'REPLACEMENT CHARACTER' (U+FFFD) + constexpr uint32_t substitution_code_point = 0xfffd; + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) != ((static_cast ('\\') << 8) | static_cast ('u'))) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + + // We have already checked that the high surrogate is valid and + // (code_point - 0xd800) < 1024. + // + // Check that code_point_2 is in the range 0xdc00..0xdfff + // and that code_point_2 was parsed from valid hex. + uint32_t low_bit = code_point_2 - 0xdc00; + if (low_bit >> 10) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + code_point = (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + + } + } else if (code_point >= 0xdc00 && code_point <= 0xdfff) { + // If we encounter a low surrogate (not preceded by a high surrogate) + // then we have an error. + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +// handle a unicode codepoint using the wobbly convention +// https://simonsapin.github.io/wtf-8/ +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint_wobbly(const uint8_t **src_ptr, + uint8_t **dst_ptr) { + // It is not ideal that this function is nearly identical to handle_unicode_codepoint. + // + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) == ((static_cast ('\\') << 8) | static_cast ('u'))) { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + uint32_t low_bit = code_point_2 - 0xdc00; + if ((low_bit >> 10) == 0) { + code_point = + (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + } + } + + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +/** + * Unescape a valid UTF-8 string from src to dst, stopping at a final unescaped quote. There + * must be an unescaped quote terminating the string. It returns the final output + * position as pointer. In case of error (e.g., the string has bad escaped codes), + * then null_nullptrptr is returned. It is assumed that the output buffer is large + * enough. E.g., if src points at 'joe"', then dst needs to have four free bytes + + * SIMDJSON_PADDING bytes. + */ +simdjson_warn_unused simdjson_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) { + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint(&src, &dst, allow_replacement)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +simdjson_warn_unused simdjson_inline uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) { + // It is not ideal that this function is nearly identical to parse_string. + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint_wobbly(&src, &dst)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +} // namespace stringparsing +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H +/* end file generic/stage2/stringparsing.h for icelake */ +/* including generic/stage2/structural_iterator.h for icelake: #include */ +/* begin file generic/stage2/structural_iterator.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace stage2 { + +class structural_iterator { +public: + const uint8_t* const buf; + uint32_t *next_structural; + dom_parser_implementation &dom_parser; + + // Start a structural + simdjson_inline structural_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index) + : buf{_dom_parser.buf}, + next_structural{&_dom_parser.structural_indexes[start_structural_index]}, + dom_parser{_dom_parser} { + } + // Get the buffer position of the current structural character + simdjson_inline const uint8_t* current() { + return &buf[*(next_structural-1)]; + } + // Get the current structural character + simdjson_inline char current_char() { + return buf[*(next_structural-1)]; + } + // Get the next structural character without advancing + simdjson_inline char peek_next_char() { + return buf[*next_structural]; + } + simdjson_inline const uint8_t* peek() { + return &buf[*next_structural]; + } + simdjson_inline const uint8_t* advance() { + return &buf[*(next_structural++)]; + } + simdjson_inline char advance_char() { + return buf[*(next_structural++)]; + } + simdjson_inline size_t remaining_len() { + return dom_parser.len - *(next_structural-1); + } + + simdjson_inline bool at_end() { + return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes]; + } + simdjson_inline bool at_beginning() { + return next_structural == dom_parser.structural_indexes.get(); + } +}; + +} // namespace stage2 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H +/* end file generic/stage2/structural_iterator.h for icelake */ +/* including generic/stage2/tape_builder.h for icelake: #include */ +/* begin file generic/stage2/tape_builder.h for icelake */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace icelake { +namespace { +namespace stage2 { + +struct tape_builder { + template + simdjson_warn_unused static simdjson_inline error_code parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept; + + /** Called when a non-empty document starts. */ + simdjson_warn_unused simdjson_inline error_code visit_document_start(json_iterator &iter) noexcept; + /** Called when a non-empty document ends without error. */ + simdjson_warn_unused simdjson_inline error_code visit_document_end(json_iterator &iter) noexcept; + + /** Called when a non-empty array starts. */ + simdjson_warn_unused simdjson_inline error_code visit_array_start(json_iterator &iter) noexcept; + /** Called when a non-empty array ends. */ + simdjson_warn_unused simdjson_inline error_code visit_array_end(json_iterator &iter) noexcept; + /** Called when an empty array is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_array(json_iterator &iter) noexcept; + + /** Called when a non-empty object starts. */ + simdjson_warn_unused simdjson_inline error_code visit_object_start(json_iterator &iter) noexcept; + /** + * Called when a key in a field is encountered. + * + * primitive, visit_object_start, visit_empty_object, visit_array_start, or visit_empty_array + * will be called after this with the field value. + */ + simdjson_warn_unused simdjson_inline error_code visit_key(json_iterator &iter, const uint8_t *key) noexcept; + /** Called when a non-empty object ends. */ + simdjson_warn_unused simdjson_inline error_code visit_object_end(json_iterator &iter) noexcept; + /** Called when an empty object is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_object(json_iterator &iter) noexcept; + + /** + * Called when a string, number, boolean or null is found. + */ + simdjson_warn_unused simdjson_inline error_code visit_primitive(json_iterator &iter, const uint8_t *value) noexcept; + /** + * Called when a string, number, boolean or null is found at the top level of a document (i.e. + * when there is no array or object and the entire document is a single string, number, boolean or + * null. + * + * This is separate from primitive() because simdjson's normal primitive parsing routines assume + * there is at least one more token after the value, which is only true in an array or object. + */ + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_string(json_iterator &iter, const uint8_t *value, bool key = false) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_root_string(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + /** Called each time a new field or element in an array or object is found. */ + simdjson_warn_unused simdjson_inline error_code increment_count(json_iterator &iter) noexcept; + + /** Next location to write to tape */ + tape_writer tape; +private: + /** Next write location in the string buf for stage 2 parsing */ + uint8_t *current_string_buf_loc; + + simdjson_inline tape_builder(dom::document &doc) noexcept; + + simdjson_inline uint32_t next_tape_index(json_iterator &iter) const noexcept; + simdjson_inline void start_container(json_iterator &iter) noexcept; + simdjson_warn_unused simdjson_inline error_code end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_warn_unused simdjson_inline error_code empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_inline uint8_t *on_start_string(json_iterator &iter) noexcept; + simdjson_inline void on_end_string(uint8_t *dst) noexcept; +}; // struct tape_builder + +template +simdjson_warn_unused simdjson_inline error_code tape_builder::parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept { + dom_parser.doc = &doc; + json_iterator iter(dom_parser, STREAMING ? dom_parser.next_structural_index : 0); + tape_builder builder(doc); + return iter.walk_document(builder); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_root_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_object(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_array(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_end(json_iterator &iter) noexcept { + constexpr uint32_t start_tape_index = 0; + tape.append(start_tape_index, internal::tape_type::ROOT); + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter), internal::tape_type::ROOT); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_key(json_iterator &iter, const uint8_t *key) noexcept { + return visit_string(iter, key, true); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::increment_count(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].count++; // we have a key value pair in the object at parser.dom_parser.depth - 1 + return SUCCESS; +} + +simdjson_inline tape_builder::tape_builder(dom::document &doc) noexcept : tape{doc.tape.get()}, current_string_buf_loc{doc.string_buf.get()} {} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_string(json_iterator &iter, const uint8_t *value, bool key) noexcept { + iter.log_value(key ? "key" : "string"); + uint8_t *dst = on_start_string(iter); + dst = stringparsing::parse_string(value+1, dst, false); // We do not allow replacement when the escape characters are invalid. + if (dst == nullptr) { + iter.log_error("Invalid escape in string"); + return STRING_ERROR; + } + on_end_string(dst); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_string(json_iterator &iter, const uint8_t *value) noexcept { + return visit_string(iter, value); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_number(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("number"); + return numberparsing::parse_number(value, tape); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_number(json_iterator &iter, const uint8_t *value) noexcept { + // + // We need to make a copy to make sure that the string is space terminated. + // This is not about padding the input, which should already padded up + // to len + SIMDJSON_PADDING. However, we have no control at this stage + // on how the padding was done. What if the input string was padded with nulls? + // It is quite common for an input string to have an extra null character (C string). + // We do not want to allow 9\0 (where \0 is the null character) inside a JSON + // document, but the string "9\0" by itself is fine. So we make a copy and + // pad the input with spaces when we know that there is just one input element. + // This copy is relatively expensive, but it will almost never be called in + // practice unless you are in the strange scenario where you have many JSON + // documents made of single atoms. + // + std::unique_ptrcopy(new (std::nothrow) uint8_t[iter.remaining_len() + SIMDJSON_PADDING]); + if (copy.get() == nullptr) { return MEMALLOC; } + std::memcpy(copy.get(), value, iter.remaining_len()); + std::memset(copy.get() + iter.remaining_len(), ' ', SIMDJSON_PADDING); + error_code error = visit_number(iter, copy.get()); + return error; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value)) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value, iter.remaining_len())) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value)) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value, iter.remaining_len())) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value)) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value, iter.remaining_len())) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +// private: + +simdjson_inline uint32_t tape_builder::next_tape_index(json_iterator &iter) const noexcept { + return uint32_t(tape.next_tape_loc - iter.dom_parser.doc->tape.get()); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + auto start_index = next_tape_index(iter); + tape.append(start_index+2, start); + tape.append(start_index, end); + return SUCCESS; +} + +simdjson_inline void tape_builder::start_container(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].tape_index = next_tape_index(iter); + iter.dom_parser.open_containers[iter.depth].count = 0; + tape.skip(); // We don't actually *write* the start element until the end. +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + // Write the ending tape element, pointing at the start location + const uint32_t start_tape_index = iter.dom_parser.open_containers[iter.depth].tape_index; + tape.append(start_tape_index, end); + // Write the start tape element, pointing at the end location (and including count) + // count can overflow if it exceeds 24 bits... so we saturate + // the convention being that a cnt of 0xffffff or more is undetermined in value (>= 0xffffff). + const uint32_t count = iter.dom_parser.open_containers[iter.depth].count; + const uint32_t cntsat = count > 0xFFFFFF ? 0xFFFFFF : count; + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter) | (uint64_t(cntsat) << 32), start); + return SUCCESS; +} + +simdjson_inline uint8_t *tape_builder::on_start_string(json_iterator &iter) noexcept { + // we advance the point, accounting for the fact that we have a NULL termination + tape.append(current_string_buf_loc - iter.dom_parser.doc->string_buf.get(), internal::tape_type::STRING); + return current_string_buf_loc + sizeof(uint32_t); +} + +simdjson_inline void tape_builder::on_end_string(uint8_t *dst) noexcept { + uint32_t str_length = uint32_t(dst - (current_string_buf_loc + sizeof(uint32_t))); + // TODO check for overflow in case someone has a crazy string (>=4GB?) + // But only add the overflow check when the document itself exceeds 4GB + // Currently unneeded because we refuse to parse docs larger or equal to 4GB. + memcpy(current_string_buf_loc, &str_length, sizeof(uint32_t)); + // NULL termination is still handy if you expect all your strings to + // be NULL terminated? It comes at a small cost + *dst = 0; + current_string_buf_loc = dst + 1; +} + +} // namespace stage2 +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H +/* end file generic/stage2/tape_builder.h for icelake */ +/* end file generic/stage2/amalgamated.h for icelake */ + +#undef SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +// +// Stage 1 +// + +namespace simdjson { +namespace icelake { + +simdjson_warn_unused error_code implementation::create_dom_parser_implementation( + size_t capacity, + size_t max_depth, + std::unique_ptr& dst +) const noexcept { + dst.reset( new (std::nothrow) dom_parser_implementation() ); + if (!dst) { return MEMALLOC; } + if (auto err = dst->set_capacity(capacity)) + return err; + if (auto err = dst->set_max_depth(max_depth)) + return err; + return SUCCESS; +} + +namespace { + +using namespace simd; + +// This identifies structural characters (comma, colon, braces, brackets), +// and ASCII white-space ('\r','\n','\t',' '). +simdjson_inline json_character_block json_character_block::classify(const simd::simd8x64& in) { + // These lookups rely on the fact that anything < 127 will match the lower 4 bits, which is why + // we can't use the generic lookup_16. + const auto whitespace_table = simd8::repeat_16(' ', 100, 100, 100, 17, 100, 113, 2, 100, '\t', '\n', 112, 100, '\r', 100, 100); + + // The 6 operators (:,[]{}) have these values: + // + // , 2C + // : 3A + // [ 5B + // { 7B + // ] 5D + // } 7D + // + // If you use | 0x20 to turn [ and ] into { and }, the lower 4 bits of each character is unique. + // We exploit this, using a simd 4-bit lookup to tell us which character match against, and then + // match it (against | 0x20). + // + // To prevent recognizing other characters, everything else gets compared with 0, which cannot + // match due to the | 0x20. + // + // NOTE: Due to the | 0x20, this ALSO treats and (control characters 0C and 1A) like , + // and :. This gets caught in stage 2, which checks the actual character to ensure the right + // operators are in the right places. + const auto op_table = simd8::repeat_16( + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, ':', '{', // : = 3A, [ = 5B, { = 7B + ',', '}', 0, 0 // , = 2C, ] = 5D, } = 7D + ); + + // We compute whitespace and op separately. If later code only uses one or the + // other, given the fact that all functions are aggressively inlined, we can + // hope that useless computations will be omitted. This is namely case when + // minifying (we only need whitespace). + + const uint64_t whitespace = in.eq({ + _mm512_shuffle_epi8(whitespace_table, in.chunks[0]) + }); + // Turn [ and ] into { and } + const simd8x64 curlified{ + in.chunks[0] | 0x20 + }; + const uint64_t op = curlified.eq({ + _mm512_shuffle_epi8(op_table, in.chunks[0]) + }); + + return { whitespace, op }; +} + +simdjson_inline bool is_ascii(const simd8x64& input) { + return input.reduce_or().is_ascii(); +} + +simdjson_unused simdjson_inline simd8 must_be_continuation(const simd8 prev1, const simd8 prev2, const simd8 prev3) { + simd8 is_second_byte = prev1.saturating_sub(0xc0u-1); // Only 11______ will be > 0 + simd8 is_third_byte = prev2.saturating_sub(0xe0u-1); // Only 111_____ will be > 0 + simd8 is_fourth_byte = prev3.saturating_sub(0xf0u-1); // Only 1111____ will be > 0 + // Caller requires a bool (all 1's). All values resulting from the subtraction will be <= 64, so signed comparison is fine. + return simd8(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0); +} + +simdjson_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3) { + simd8 is_third_byte = prev2.saturating_sub(0xe0u-1); // Only 111_____ will be > 0 + simd8 is_fourth_byte = prev3.saturating_sub(0xf0u-1); // Only 1111____ will be > 0 + // Caller requires a bool (all 1's). All values resulting from the subtraction will be <= 64, so signed comparison is fine. + return simd8(is_third_byte | is_fourth_byte) > int8_t(0); +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +/** + * We provide a custom version of bit_indexer::write using + * naked intrinsics. + * TODO: make this code more elegant. + */ +// Under GCC 12, the intrinsic _mm512_extracti32x4_epi32 may generate 'maybe uninitialized'. +// as a workaround, we disable warnings within the following function. +SIMDJSON_PUSH_DISABLE_ALL_WARNINGS +namespace simdjson { namespace icelake { namespace { namespace stage1 { +simdjson_inline void bit_indexer::write(uint32_t idx, uint64_t bits) { + // In some instances, the next branch is expensive because it is mispredicted. + // Unfortunately, in other cases, + // it helps tremendously. + if (bits == 0) { return; } + + const __m512i indexes = _mm512_maskz_compress_epi8(bits, _mm512_set_epi32( + 0x3f3e3d3c, 0x3b3a3938, 0x37363534, 0x33323130, + 0x2f2e2d2c, 0x2b2a2928, 0x27262524, 0x23222120, + 0x1f1e1d1c, 0x1b1a1918, 0x17161514, 0x13121110, + 0x0f0e0d0c, 0x0b0a0908, 0x07060504, 0x03020100 + )); + const __m512i start_index = _mm512_set1_epi32(idx); + + const auto count = count_ones(bits); + __m512i t0 = _mm512_cvtepu8_epi32(_mm512_castsi512_si128(indexes)); + _mm512_storeu_si512(this->tail, _mm512_add_epi32(t0, start_index)); + + if(count > 16) { + const __m512i t1 = _mm512_cvtepu8_epi32(_mm512_extracti32x4_epi32(indexes, 1)); + _mm512_storeu_si512(this->tail + 16, _mm512_add_epi32(t1, start_index)); + if(count > 32) { + const __m512i t2 = _mm512_cvtepu8_epi32(_mm512_extracti32x4_epi32(indexes, 2)); + _mm512_storeu_si512(this->tail + 32, _mm512_add_epi32(t2, start_index)); + if(count > 48) { + const __m512i t3 = _mm512_cvtepu8_epi32(_mm512_extracti32x4_epi32(indexes, 3)); + _mm512_storeu_si512(this->tail + 48, _mm512_add_epi32(t3, start_index)); + } + } + } + this->tail += count; +} +}}}} +SIMDJSON_POP_DISABLE_WARNINGS + +// +// Stage 2 +// + +// +// Implementation-specific overrides +// +namespace simdjson { +namespace icelake { + +simdjson_warn_unused error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { + return icelake::stage1::json_minifier::minify<128>(buf, len, dst, dst_len); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage1(const uint8_t *_buf, size_t _len, stage1_mode streaming) noexcept { + this->buf = _buf; + this->len = _len; + return icelake::stage1::json_structural_indexer::index<128>(_buf, _len, *this, streaming); +} + +simdjson_warn_unused bool implementation::validate_utf8(const char *buf, size_t len) const noexcept { + return icelake::stage1::generic_validate_utf8(buf,len); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage2_next(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_string(const uint8_t *src, uint8_t *dst, bool replacement_char) const noexcept { + return icelake::stringparsing::parse_string(src, dst, replacement_char); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept { + return icelake::stringparsing::parse_wobbly_string(src, dst); +} + +simdjson_warn_unused error_code dom_parser_implementation::parse(const uint8_t *_buf, size_t _len, dom::document &_doc) noexcept { + auto error = stage1(_buf, _len, stage1_mode::regular); + if (error) { return error; } + return stage2(_doc); +} + +} // namespace icelake +} // namespace simdjson + +/* including simdjson/icelake/end.h: #include */ +/* begin file simdjson/icelake/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "icelake" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/icelake/end.h */ + +#endif // SIMDJSON_SRC_ICELAKE_CPP +/* end file icelake.cpp */ +#endif +#if SIMDJSON_IMPLEMENTATION_PPC64 +/* including ppc64.cpp: #include */ +/* begin file ppc64.cpp */ +#ifndef SIMDJSON_SRC_PPC64_CPP +#define SIMDJSON_SRC_PPC64_CPP + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* including simdjson/ppc64.h: #include */ +/* begin file simdjson/ppc64.h */ +#ifndef SIMDJSON_PPC64_H +#define SIMDJSON_PPC64_H + +/* including simdjson/ppc64/begin.h: #include "simdjson/ppc64/begin.h" */ +/* begin file simdjson/ppc64/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "ppc64" */ +#define SIMDJSON_IMPLEMENTATION ppc64 +/* including simdjson/ppc64/base.h: #include "simdjson/ppc64/base.h" */ +/* begin file simdjson/ppc64/base.h */ +#ifndef SIMDJSON_PPC64_BASE_H +#define SIMDJSON_PPC64_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Implementation for ALTIVEC (PPC64). + */ +namespace ppc64 { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_BASE_H +/* end file simdjson/ppc64/base.h */ +/* including simdjson/ppc64/intrinsics.h: #include "simdjson/ppc64/intrinsics.h" */ +/* begin file simdjson/ppc64/intrinsics.h */ +#ifndef SIMDJSON_PPC64_INTRINSICS_H +#define SIMDJSON_PPC64_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This should be the correct header whether +// you use visual studio or other compilers. +#include + +// These are defined by altivec.h in GCC toolchain, it is safe to undef them. +#ifdef bool +#undef bool +#endif + +#ifdef vector +#undef vector +#endif + +static_assert(sizeof(__vector unsigned char) <= simdjson::SIMDJSON_PADDING, "insufficient padding for ppc64"); + +#endif // SIMDJSON_PPC64_INTRINSICS_H +/* end file simdjson/ppc64/intrinsics.h */ +/* including simdjson/ppc64/bitmanipulation.h: #include "simdjson/ppc64/bitmanipulation.h" */ +/* begin file simdjson/ppc64/bitmanipulation.h */ +#ifndef SIMDJSON_PPC64_BITMANIPULATION_H +#define SIMDJSON_PPC64_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num - 1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline int count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num); // Visual Studio wants two underscores +} +#else +simdjson_inline int count_ones(uint64_t input_num) { + return __builtin_popcountll(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + *result = value1 + value2; + return *result < value1; +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_BITMANIPULATION_H +/* end file simdjson/ppc64/bitmanipulation.h */ +/* including simdjson/ppc64/bitmask.h: #include "simdjson/ppc64/bitmask.h" */ +/* begin file simdjson/ppc64/bitmask.h */ +#ifndef SIMDJSON_PPC64_BITMASK_H +#define SIMDJSON_PPC64_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is +// encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(uint64_t bitmask) { + // You can use the version below, however gcc sometimes miscompiles + // vec_pmsum_be, it happens somewhere around between 8 and 9th version. + // The performance boost was not noticeable, falling back to a usual + // implementation. + // __vector unsigned long long all_ones = {~0ull, ~0ull}; + // __vector unsigned long long mask = {bitmask, 0}; + // // Clang and GCC return different values for pmsum for ull so cast it to one. + // // Generally it is not specified by ALTIVEC ISA what is returned by + // // vec_pmsum_be. + // #if defined(__LITTLE_ENDIAN__) + // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[0]); + // #else + // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[1]); + // #endif + bitmask ^= bitmask << 1; + bitmask ^= bitmask << 2; + bitmask ^= bitmask << 4; + bitmask ^= bitmask << 8; + bitmask ^= bitmask << 16; + bitmask ^= bitmask << 32; + return bitmask; +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif +/* end file simdjson/ppc64/bitmask.h */ +/* including simdjson/ppc64/numberparsing_defs.h: #include "simdjson/ppc64/numberparsing_defs.h" */ +/* begin file simdjson/ppc64/numberparsing_defs.h */ +#ifndef SIMDJSON_PPC64_NUMBERPARSING_DEFS_H +#define SIMDJSON_PPC64_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#if defined(__linux__) +#include +#elif defined(__FreeBSD__) +#include +#endif + +namespace simdjson { +namespace ppc64 { +namespace numberparsing { + +// we don't have appropriate instructions, so let us use a scalar function +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + uint64_t val; + std::memcpy(&val, chars, sizeof(uint64_t)); +#ifdef __BIG_ENDIAN__ +#if defined(__linux__) + val = bswap_64(val); +#elif defined(__FreeBSD__) + val = bswap64(val); +#endif +#endif + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace ppc64 +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_PPC64_NUMBERPARSING_DEFS_H +/* end file simdjson/ppc64/numberparsing_defs.h */ +/* including simdjson/ppc64/simd.h: #include "simdjson/ppc64/simd.h" */ +/* begin file simdjson/ppc64/simd.h */ +#ifndef SIMDJSON_PPC64_SIMD_H +#define SIMDJSON_PPC64_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace ppc64 { +namespace { +namespace simd { + +using __m128i = __vector unsigned char; + +template struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i &() const { + return this->value; + } + simdjson_inline operator __m128i &() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { + return vec_or(this->value, (__m128i)other); + } + simdjson_inline Child operator&(const Child other) const { + return vec_and(this->value, (__m128i)other); + } + simdjson_inline Child operator^(const Child other) const { + return vec_xor(this->value, (__m128i)other); + } + simdjson_inline Child bit_andnot(const Child other) const { + return vec_andc(this->value, (__m128i)other); + } + simdjson_inline Child &operator|=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast | other; + return *this_cast; + } + simdjson_inline Child &operator&=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast & other; + return *this_cast; + } + simdjson_inline Child &operator^=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast ^ other; + return *this_cast; + } +}; + +template > +struct base8 : base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { + return (__m128i)vec_cmpeq(lhs.value, (__m128i)rhs); + } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(simd8 prev_chunk) const { + __m128i chunk = this->value; +#ifdef __LITTLE_ENDIAN__ + chunk = (__m128i)vec_reve(this->value); + prev_chunk = (__m128i)vec_reve((__m128i)prev_chunk); +#endif + chunk = (__m128i)vec_sld((__m128i)prev_chunk, (__m128i)chunk, 16 - N); +#ifdef __LITTLE_ENDIAN__ + chunk = (__m128i)vec_reve((__m128i)chunk); +#endif + return chunk; + } +}; + +// SIMD byte mask type (returned by things like eq and gt) +template <> struct simd8 : base8 { + static simdjson_inline simd8 splat(bool _value) { + return (__m128i)vec_splats((unsigned char)(-(!!_value))); + } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) + : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) + : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { + __vector unsigned long long result; + const __m128i perm_mask = {0x78, 0x70, 0x68, 0x60, 0x58, 0x50, 0x48, 0x40, + 0x38, 0x30, 0x28, 0x20, 0x18, 0x10, 0x08, 0x00}; + + result = ((__vector unsigned long long)vec_vbpermq((__m128i)this->value, + (__m128i)perm_mask)); +#ifdef __LITTLE_ENDIAN__ + return static_cast(result[1]); +#else + return static_cast(result[0]); +#endif + } + simdjson_inline bool any() const { + return !vec_all_eq(this->value, (__m128i)vec_splats(0)); + } + simdjson_inline simd8 operator~() const { + return this->value ^ (__m128i)splat(true); + } +}; + +template struct base8_numeric : base8 { + static simdjson_inline simd8 splat(T value) { + (void)value; + return (__m128i)vec_splats(value); + } + static simdjson_inline simd8 zero() { return splat(0); } + static simdjson_inline simd8 load(const T values[16]) { + return (__m128i)(vec_vsx_ld(0, reinterpret_cast(values))); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16(T v0, T v1, T v2, T v3, T v4, + T v5, T v6, T v7, T v8, T v9, + T v10, T v11, T v12, T v13, + T v14, T v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, + v14, v15); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) + : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { + vec_vsx_st(this->value, 0, reinterpret_cast<__m128i *>(dst)); + } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { + return (__m128i)((__m128i)this->value + (__m128i)other); + } + simdjson_inline simd8 operator-(const simd8 other) const { + return (__m128i)((__m128i)this->value - (__m128i)other); + } + simdjson_inline simd8 &operator+=(const simd8 other) { + *this = *this + other; + return *static_cast *>(this); + } + simdjson_inline simd8 &operator-=(const simd8 other) { + *this = *this - other; + return *static_cast *>(this); + } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior + // for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return (__m128i)vec_perm((__m128i)lookup_table, (__m128i)lookup_table, this->value); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted + // as a bitset). Passing a 0 value for mask would be equivalent to writing out + // every byte to output. Only the first 16 - count_ones(mask) bytes of the + // result are significant but 16 bytes get written. Design consideration: it + // seems like a function with the signature simd8 compress(uint32_t mask) + // would be sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L *output) const { + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + using internal::thintable_epi8; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. +#ifdef __LITTLE_ENDIAN__ + __m128i shufmask = (__m128i)(__vector unsigned long long){ + thintable_epi8[mask1], thintable_epi8[mask2]}; +#else + __m128i shufmask = (__m128i)(__vector unsigned long long){ + thintable_epi8[mask2], thintable_epi8[mask1]}; + shufmask = (__m128i)vec_reve((__m128i)shufmask); +#endif + // we increment by 0x08 the second half of the mask + shufmask = ((__m128i)shufmask) + + ((__m128i)(__vector int){0, 0, 0x08080808, 0x08080808}); + + // this is the version "nearly pruned" + __m128i pruned = vec_perm(this->value, this->value, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + vec_vsx_ld(0, reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = vec_perm(pruned, (__m128i)vec_splats(0), compactmask); + vec_vsx_st(answer, 0, reinterpret_cast<__m128i *>(output)); + } + + template + simdjson_inline simd8 + lookup_16(L replace0, L replace1, L replace2, L replace3, L replace4, + L replace5, L replace6, L replace7, L replace8, L replace9, + L replace10, L replace11, L replace12, L replace13, L replace14, + L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, replace4, replace5, replace6, + replace7, replace8, replace9, replace10, replace11, replace12, + replace13, replace14, replace15)); + } +}; + +// Signed bytes +template <> struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) + : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t *values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8(int8_t v0, int8_t v1, int8_t v2, int8_t v3, + int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, + int8_t v12, int8_t v13, int8_t v14, int8_t v15) + : simd8((__m128i)(__vector signed char){v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10, v11, v12, v13, v14, + v15}) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 + repeat_16(int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, + int8_t v6, int8_t v7, int8_t v8, int8_t v9, int8_t v10, int8_t v11, + int8_t v12, int8_t v13, int8_t v14, int8_t v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15); + } + + // Order-sensitive comparisons + simdjson_inline simd8 + max_val(const simd8 other) const { + return (__m128i)vec_max((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + min_val(const simd8 other) const { + return (__m128i)vec_min((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + operator>(const simd8 other) const { + return (__m128i)vec_cmpgt((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + operator<(const simd8 other) const { + return (__m128i)vec_cmplt((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } +}; + +// Unsigned bytes +template <> struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) + : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t *values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline + simd8(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, + uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10, + uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15) + : simd8((__m128i){v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15}) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 + repeat_16(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, + uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, + uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, + uint8_t v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15); + } + + // Saturated math + simdjson_inline simd8 + saturating_add(const simd8 other) const { + return (__m128i)vec_adds(this->value, (__m128i)other); + } + simdjson_inline simd8 + saturating_sub(const simd8 other) const { + return (__m128i)vec_subs(this->value, (__m128i)other); + } + + // Order-specific operations + simdjson_inline simd8 + max_val(const simd8 other) const { + return (__m128i)vec_max(this->value, (__m128i)other); + } + simdjson_inline simd8 + min_val(const simd8 other) const { + return (__m128i)vec_min(this->value, (__m128i)other); + } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 + gt_bits(const simd8 other) const { + return this->saturating_sub(other); + } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 + lt_bits(const simd8 other) const { + return other.saturating_sub(*this); + } + simdjson_inline simd8 + operator<=(const simd8 other) const { + return other.max_val(*this) == other; + } + simdjson_inline simd8 + operator>=(const simd8 other) const { + return other.min_val(*this) == other; + } + simdjson_inline simd8 + operator>(const simd8 other) const { + return this->gt_bits(other).any_bits_set(); + } + simdjson_inline simd8 + operator<(const simd8 other) const { + return this->gt_bits(other).any_bits_set(); + } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { + return (__m128i)vec_cmpeq(this->value, (__m128i)vec_splats(uint8_t(0))); + } + simdjson_inline simd8 bits_not_set(simd8 bits) const { + return (*this & bits).bits_not_set(); + } + simdjson_inline simd8 any_bits_set() const { + return ~this->bits_not_set(); + } + simdjson_inline simd8 any_bits_set(simd8 bits) const { + return ~this->bits_not_set(bits); + } + simdjson_inline bool bits_not_set_anywhere() const { + return vec_all_eq(this->value, (__m128i)vec_splats(0)); + } + simdjson_inline bool any_bits_set_anywhere() const { + return !bits_not_set_anywhere(); + } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { + return vec_all_eq(vec_and(this->value, (__m128i)bits), + (__m128i)vec_splats(0)); + } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { + return !bits_not_set_anywhere(bits); + } + template simdjson_inline simd8 shr() const { + return simd8( + (__m128i)vec_sr(this->value, (__m128i)vec_splat_u8(N))); + } + template simdjson_inline simd8 shl() const { + return simd8( + (__m128i)vec_sl(this->value, (__m128i)vec_splat_u8(N))); + } +}; + +template struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, + "PPC64 kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64 &o) = delete; // no copy allowed + simd8x64 & + operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, + const simd8 chunk2, const simd8 chunk3) + : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) + : chunks{simd8::load(ptr), simd8::load(ptr + 16), + simd8::load(ptr + 32), simd8::load(ptr + 48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr + sizeof(simd8) * 0); + this->chunks[1].store(ptr + sizeof(simd8) * 1); + this->chunks[2].store(ptr + sizeof(simd8) * 2); + this->chunks[3].store(ptr + sizeof(simd8) * 3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | + (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T *output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), + output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), + output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), + output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask()); + uint64_t r1 = this->chunks[1].to_bitmask(); + uint64_t r2 = this->chunks[2].to_bitmask(); + uint64_t r3 = this->chunks[3].to_bitmask(); + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64(this->chunks[0] == mask, this->chunks[1] == mask, + this->chunks[2] == mask, this->chunks[3] == mask) + .to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64(this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3]) + .to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64(this->chunks[0] <= mask, this->chunks[1] <= mask, + this->chunks[2] <= mask, this->chunks[3] <= mask) + .to_bitmask(); + } +}; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_SIMD_INPUT_H +/* end file simdjson/ppc64/simd.h */ +/* including simdjson/ppc64/stringparsing_defs.h: #include "simdjson/ppc64/stringparsing_defs.h" */ +/* begin file simdjson/ppc64/stringparsing_defs.h */ +#ifndef SIMDJSON_PPC64_STRINGPARSING_DEFS_H +#define SIMDJSON_PPC64_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/simd.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote + copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { + return ((bs_bits - 1) & quote_bits) != 0; + } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { + return trailing_zeroes(quote_bits); + } + simdjson_inline int backslash_index() { + return trailing_zeroes(bs_bits); + } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote +backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), + "backslash and quote finder must process fewer than " + "SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + sizeof(v0)); + v0.store(dst); + v1.store(dst + sizeof(v0)); + + // Getting a 64-bit bitmask is much cheaper than multiple 16-bit bitmasks on + // PPC; therefore, we smash them together into a 64-byte mask and get the + // bitmask from there. + uint64_t bs_and_quote = + simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_STRINGPARSING_DEFS_H +/* end file simdjson/ppc64/stringparsing_defs.h */ + +#define SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT 1 +/* end file simdjson/ppc64/begin.h */ +/* including simdjson/generic/amalgamated.h for ppc64: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for ppc64 */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for ppc64: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for ppc64 */ +/* including simdjson/generic/jsoncharutils.h for ppc64: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for ppc64 */ +/* including simdjson/generic/atomparsing.h for ppc64: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace ppc64 { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for ppc64 */ +/* including simdjson/generic/dom_parser_implementation.h for ppc64: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { +namespace ppc64 { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for ppc64 */ +/* including simdjson/generic/implementation_simdjson_result_base.h for ppc64: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for ppc64 */ +/* including simdjson/generic/numberparsing.h for ppc64: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace ppc64 { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for ppc64 */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for ppc64: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for ppc64 */ +/* end file simdjson/generic/amalgamated.h for ppc64 */ +/* including simdjson/ppc64/end.h: #include "simdjson/ppc64/end.h" */ +/* begin file simdjson/ppc64/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#undef SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT +/* undefining SIMDJSON_IMPLEMENTATION from "ppc64" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/ppc64/end.h */ + +#endif // SIMDJSON_PPC64_H +/* end file simdjson/ppc64.h */ +/* including simdjson/ppc64/implementation.h: #include */ +/* begin file simdjson/ppc64/implementation.h */ +#ifndef SIMDJSON_PPC64_IMPLEMENTATION_H +#define SIMDJSON_PPC64_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +/** + * Implementation for ALTIVEC (PPC64). + */ +namespace ppc64 { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() + : simdjson::implementation("ppc64", "PPC64 ALTIVEC", + internal::instruction_set::ALTIVEC) {} + + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, size_t max_length, + std::unique_ptr &dst) + const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, + uint8_t *dst, + size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, + size_t len) const noexcept final; +}; + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_IMPLEMENTATION_H +/* end file simdjson/ppc64/implementation.h */ + +/* including simdjson/ppc64/begin.h: #include */ +/* begin file simdjson/ppc64/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "ppc64" */ +#define SIMDJSON_IMPLEMENTATION ppc64 +/* including simdjson/ppc64/base.h: #include "simdjson/ppc64/base.h" */ +/* begin file simdjson/ppc64/base.h */ +#ifndef SIMDJSON_PPC64_BASE_H +#define SIMDJSON_PPC64_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Implementation for ALTIVEC (PPC64). + */ +namespace ppc64 { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_BASE_H +/* end file simdjson/ppc64/base.h */ +/* including simdjson/ppc64/intrinsics.h: #include "simdjson/ppc64/intrinsics.h" */ +/* begin file simdjson/ppc64/intrinsics.h */ +#ifndef SIMDJSON_PPC64_INTRINSICS_H +#define SIMDJSON_PPC64_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This should be the correct header whether +// you use visual studio or other compilers. +#include + +// These are defined by altivec.h in GCC toolchain, it is safe to undef them. +#ifdef bool +#undef bool +#endif + +#ifdef vector +#undef vector +#endif + +static_assert(sizeof(__vector unsigned char) <= simdjson::SIMDJSON_PADDING, "insufficient padding for ppc64"); + +#endif // SIMDJSON_PPC64_INTRINSICS_H +/* end file simdjson/ppc64/intrinsics.h */ +/* including simdjson/ppc64/bitmanipulation.h: #include "simdjson/ppc64/bitmanipulation.h" */ +/* begin file simdjson/ppc64/bitmanipulation.h */ +#ifndef SIMDJSON_PPC64_BITMANIPULATION_H +#define SIMDJSON_PPC64_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num - 1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline int count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num); // Visual Studio wants two underscores +} +#else +simdjson_inline int count_ones(uint64_t input_num) { + return __builtin_popcountll(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + *result = value1 + value2; + return *result < value1; +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_BITMANIPULATION_H +/* end file simdjson/ppc64/bitmanipulation.h */ +/* including simdjson/ppc64/bitmask.h: #include "simdjson/ppc64/bitmask.h" */ +/* begin file simdjson/ppc64/bitmask.h */ +#ifndef SIMDJSON_PPC64_BITMASK_H +#define SIMDJSON_PPC64_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is +// encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(uint64_t bitmask) { + // You can use the version below, however gcc sometimes miscompiles + // vec_pmsum_be, it happens somewhere around between 8 and 9th version. + // The performance boost was not noticeable, falling back to a usual + // implementation. + // __vector unsigned long long all_ones = {~0ull, ~0ull}; + // __vector unsigned long long mask = {bitmask, 0}; + // // Clang and GCC return different values for pmsum for ull so cast it to one. + // // Generally it is not specified by ALTIVEC ISA what is returned by + // // vec_pmsum_be. + // #if defined(__LITTLE_ENDIAN__) + // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[0]); + // #else + // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[1]); + // #endif + bitmask ^= bitmask << 1; + bitmask ^= bitmask << 2; + bitmask ^= bitmask << 4; + bitmask ^= bitmask << 8; + bitmask ^= bitmask << 16; + bitmask ^= bitmask << 32; + return bitmask; +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif +/* end file simdjson/ppc64/bitmask.h */ +/* including simdjson/ppc64/numberparsing_defs.h: #include "simdjson/ppc64/numberparsing_defs.h" */ +/* begin file simdjson/ppc64/numberparsing_defs.h */ +#ifndef SIMDJSON_PPC64_NUMBERPARSING_DEFS_H +#define SIMDJSON_PPC64_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#if defined(__linux__) +#include +#elif defined(__FreeBSD__) +#include +#endif + +namespace simdjson { +namespace ppc64 { +namespace numberparsing { + +// we don't have appropriate instructions, so let us use a scalar function +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + uint64_t val; + std::memcpy(&val, chars, sizeof(uint64_t)); +#ifdef __BIG_ENDIAN__ +#if defined(__linux__) + val = bswap_64(val); +#elif defined(__FreeBSD__) + val = bswap64(val); +#endif +#endif + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace ppc64 +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_PPC64_NUMBERPARSING_DEFS_H +/* end file simdjson/ppc64/numberparsing_defs.h */ +/* including simdjson/ppc64/simd.h: #include "simdjson/ppc64/simd.h" */ +/* begin file simdjson/ppc64/simd.h */ +#ifndef SIMDJSON_PPC64_SIMD_H +#define SIMDJSON_PPC64_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace ppc64 { +namespace { +namespace simd { + +using __m128i = __vector unsigned char; + +template struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i &() const { + return this->value; + } + simdjson_inline operator __m128i &() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { + return vec_or(this->value, (__m128i)other); + } + simdjson_inline Child operator&(const Child other) const { + return vec_and(this->value, (__m128i)other); + } + simdjson_inline Child operator^(const Child other) const { + return vec_xor(this->value, (__m128i)other); + } + simdjson_inline Child bit_andnot(const Child other) const { + return vec_andc(this->value, (__m128i)other); + } + simdjson_inline Child &operator|=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast | other; + return *this_cast; + } + simdjson_inline Child &operator&=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast & other; + return *this_cast; + } + simdjson_inline Child &operator^=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast ^ other; + return *this_cast; + } +}; + +template > +struct base8 : base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { + return (__m128i)vec_cmpeq(lhs.value, (__m128i)rhs); + } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(simd8 prev_chunk) const { + __m128i chunk = this->value; +#ifdef __LITTLE_ENDIAN__ + chunk = (__m128i)vec_reve(this->value); + prev_chunk = (__m128i)vec_reve((__m128i)prev_chunk); +#endif + chunk = (__m128i)vec_sld((__m128i)prev_chunk, (__m128i)chunk, 16 - N); +#ifdef __LITTLE_ENDIAN__ + chunk = (__m128i)vec_reve((__m128i)chunk); +#endif + return chunk; + } +}; + +// SIMD byte mask type (returned by things like eq and gt) +template <> struct simd8 : base8 { + static simdjson_inline simd8 splat(bool _value) { + return (__m128i)vec_splats((unsigned char)(-(!!_value))); + } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) + : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) + : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { + __vector unsigned long long result; + const __m128i perm_mask = {0x78, 0x70, 0x68, 0x60, 0x58, 0x50, 0x48, 0x40, + 0x38, 0x30, 0x28, 0x20, 0x18, 0x10, 0x08, 0x00}; + + result = ((__vector unsigned long long)vec_vbpermq((__m128i)this->value, + (__m128i)perm_mask)); +#ifdef __LITTLE_ENDIAN__ + return static_cast(result[1]); +#else + return static_cast(result[0]); +#endif + } + simdjson_inline bool any() const { + return !vec_all_eq(this->value, (__m128i)vec_splats(0)); + } + simdjson_inline simd8 operator~() const { + return this->value ^ (__m128i)splat(true); + } +}; + +template struct base8_numeric : base8 { + static simdjson_inline simd8 splat(T value) { + (void)value; + return (__m128i)vec_splats(value); + } + static simdjson_inline simd8 zero() { return splat(0); } + static simdjson_inline simd8 load(const T values[16]) { + return (__m128i)(vec_vsx_ld(0, reinterpret_cast(values))); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16(T v0, T v1, T v2, T v3, T v4, + T v5, T v6, T v7, T v8, T v9, + T v10, T v11, T v12, T v13, + T v14, T v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, + v14, v15); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) + : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { + vec_vsx_st(this->value, 0, reinterpret_cast<__m128i *>(dst)); + } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { + return (__m128i)((__m128i)this->value + (__m128i)other); + } + simdjson_inline simd8 operator-(const simd8 other) const { + return (__m128i)((__m128i)this->value - (__m128i)other); + } + simdjson_inline simd8 &operator+=(const simd8 other) { + *this = *this + other; + return *static_cast *>(this); + } + simdjson_inline simd8 &operator-=(const simd8 other) { + *this = *this - other; + return *static_cast *>(this); + } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior + // for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return (__m128i)vec_perm((__m128i)lookup_table, (__m128i)lookup_table, this->value); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted + // as a bitset). Passing a 0 value for mask would be equivalent to writing out + // every byte to output. Only the first 16 - count_ones(mask) bytes of the + // result are significant but 16 bytes get written. Design consideration: it + // seems like a function with the signature simd8 compress(uint32_t mask) + // would be sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L *output) const { + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + using internal::thintable_epi8; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. +#ifdef __LITTLE_ENDIAN__ + __m128i shufmask = (__m128i)(__vector unsigned long long){ + thintable_epi8[mask1], thintable_epi8[mask2]}; +#else + __m128i shufmask = (__m128i)(__vector unsigned long long){ + thintable_epi8[mask2], thintable_epi8[mask1]}; + shufmask = (__m128i)vec_reve((__m128i)shufmask); +#endif + // we increment by 0x08 the second half of the mask + shufmask = ((__m128i)shufmask) + + ((__m128i)(__vector int){0, 0, 0x08080808, 0x08080808}); + + // this is the version "nearly pruned" + __m128i pruned = vec_perm(this->value, this->value, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + vec_vsx_ld(0, reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = vec_perm(pruned, (__m128i)vec_splats(0), compactmask); + vec_vsx_st(answer, 0, reinterpret_cast<__m128i *>(output)); + } + + template + simdjson_inline simd8 + lookup_16(L replace0, L replace1, L replace2, L replace3, L replace4, + L replace5, L replace6, L replace7, L replace8, L replace9, + L replace10, L replace11, L replace12, L replace13, L replace14, + L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, replace4, replace5, replace6, + replace7, replace8, replace9, replace10, replace11, replace12, + replace13, replace14, replace15)); + } +}; + +// Signed bytes +template <> struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) + : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t *values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8(int8_t v0, int8_t v1, int8_t v2, int8_t v3, + int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, + int8_t v12, int8_t v13, int8_t v14, int8_t v15) + : simd8((__m128i)(__vector signed char){v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10, v11, v12, v13, v14, + v15}) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 + repeat_16(int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, + int8_t v6, int8_t v7, int8_t v8, int8_t v9, int8_t v10, int8_t v11, + int8_t v12, int8_t v13, int8_t v14, int8_t v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15); + } + + // Order-sensitive comparisons + simdjson_inline simd8 + max_val(const simd8 other) const { + return (__m128i)vec_max((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + min_val(const simd8 other) const { + return (__m128i)vec_min((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + operator>(const simd8 other) const { + return (__m128i)vec_cmpgt((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + operator<(const simd8 other) const { + return (__m128i)vec_cmplt((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } +}; + +// Unsigned bytes +template <> struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) + : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t *values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline + simd8(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, + uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10, + uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15) + : simd8((__m128i){v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15}) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 + repeat_16(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, + uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, + uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, + uint8_t v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15); + } + + // Saturated math + simdjson_inline simd8 + saturating_add(const simd8 other) const { + return (__m128i)vec_adds(this->value, (__m128i)other); + } + simdjson_inline simd8 + saturating_sub(const simd8 other) const { + return (__m128i)vec_subs(this->value, (__m128i)other); + } + + // Order-specific operations + simdjson_inline simd8 + max_val(const simd8 other) const { + return (__m128i)vec_max(this->value, (__m128i)other); + } + simdjson_inline simd8 + min_val(const simd8 other) const { + return (__m128i)vec_min(this->value, (__m128i)other); + } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 + gt_bits(const simd8 other) const { + return this->saturating_sub(other); + } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 + lt_bits(const simd8 other) const { + return other.saturating_sub(*this); + } + simdjson_inline simd8 + operator<=(const simd8 other) const { + return other.max_val(*this) == other; + } + simdjson_inline simd8 + operator>=(const simd8 other) const { + return other.min_val(*this) == other; + } + simdjson_inline simd8 + operator>(const simd8 other) const { + return this->gt_bits(other).any_bits_set(); + } + simdjson_inline simd8 + operator<(const simd8 other) const { + return this->gt_bits(other).any_bits_set(); + } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { + return (__m128i)vec_cmpeq(this->value, (__m128i)vec_splats(uint8_t(0))); + } + simdjson_inline simd8 bits_not_set(simd8 bits) const { + return (*this & bits).bits_not_set(); + } + simdjson_inline simd8 any_bits_set() const { + return ~this->bits_not_set(); + } + simdjson_inline simd8 any_bits_set(simd8 bits) const { + return ~this->bits_not_set(bits); + } + simdjson_inline bool bits_not_set_anywhere() const { + return vec_all_eq(this->value, (__m128i)vec_splats(0)); + } + simdjson_inline bool any_bits_set_anywhere() const { + return !bits_not_set_anywhere(); + } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { + return vec_all_eq(vec_and(this->value, (__m128i)bits), + (__m128i)vec_splats(0)); + } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { + return !bits_not_set_anywhere(bits); + } + template simdjson_inline simd8 shr() const { + return simd8( + (__m128i)vec_sr(this->value, (__m128i)vec_splat_u8(N))); + } + template simdjson_inline simd8 shl() const { + return simd8( + (__m128i)vec_sl(this->value, (__m128i)vec_splat_u8(N))); + } +}; + +template struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, + "PPC64 kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64 &o) = delete; // no copy allowed + simd8x64 & + operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, + const simd8 chunk2, const simd8 chunk3) + : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) + : chunks{simd8::load(ptr), simd8::load(ptr + 16), + simd8::load(ptr + 32), simd8::load(ptr + 48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr + sizeof(simd8) * 0); + this->chunks[1].store(ptr + sizeof(simd8) * 1); + this->chunks[2].store(ptr + sizeof(simd8) * 2); + this->chunks[3].store(ptr + sizeof(simd8) * 3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | + (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T *output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), + output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), + output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), + output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask()); + uint64_t r1 = this->chunks[1].to_bitmask(); + uint64_t r2 = this->chunks[2].to_bitmask(); + uint64_t r3 = this->chunks[3].to_bitmask(); + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64(this->chunks[0] == mask, this->chunks[1] == mask, + this->chunks[2] == mask, this->chunks[3] == mask) + .to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64(this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3]) + .to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64(this->chunks[0] <= mask, this->chunks[1] <= mask, + this->chunks[2] <= mask, this->chunks[3] <= mask) + .to_bitmask(); + } +}; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_SIMD_INPUT_H +/* end file simdjson/ppc64/simd.h */ +/* including simdjson/ppc64/stringparsing_defs.h: #include "simdjson/ppc64/stringparsing_defs.h" */ +/* begin file simdjson/ppc64/stringparsing_defs.h */ +#ifndef SIMDJSON_PPC64_STRINGPARSING_DEFS_H +#define SIMDJSON_PPC64_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/simd.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote + copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { + return ((bs_bits - 1) & quote_bits) != 0; + } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { + return trailing_zeroes(quote_bits); + } + simdjson_inline int backslash_index() { + return trailing_zeroes(bs_bits); + } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote +backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), + "backslash and quote finder must process fewer than " + "SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + sizeof(v0)); + v0.store(dst); + v1.store(dst + sizeof(v0)); + + // Getting a 64-bit bitmask is much cheaper than multiple 16-bit bitmasks on + // PPC; therefore, we smash them together into a 64-byte mask and get the + // bitmask from there. + uint64_t bs_and_quote = + simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_STRINGPARSING_DEFS_H +/* end file simdjson/ppc64/stringparsing_defs.h */ + +#define SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT 1 +/* end file simdjson/ppc64/begin.h */ +/* including generic/amalgamated.h for ppc64: #include */ +/* begin file generic/amalgamated.h for ppc64 */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_SRC_GENERIC_DEPENDENCIES_H) +#error generic/dependencies.h must be included before generic/amalgamated.h! +#endif + +/* including generic/base.h for ppc64: #include */ +/* begin file generic/base.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +struct json_character_block; + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_BASE_H +/* end file generic/base.h for ppc64 */ +/* including generic/dom_parser_implementation.h for ppc64: #include */ +/* begin file generic/dom_parser_implementation.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// Interface a dom parser implementation must fulfill +namespace simdjson { +namespace ppc64 { +namespace { + +simdjson_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3); +simdjson_inline bool is_ascii(const simd8x64& input); + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file generic/dom_parser_implementation.h for ppc64 */ +/* including generic/json_character_block.h for ppc64: #include */ +/* begin file generic/json_character_block.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +struct json_character_block { + static simdjson_inline json_character_block classify(const simd::simd8x64& in); + + simdjson_inline uint64_t whitespace() const noexcept { return _whitespace; } + simdjson_inline uint64_t op() const noexcept { return _op; } + simdjson_inline uint64_t scalar() const noexcept { return ~(op() | whitespace()); } + + uint64_t _whitespace; + uint64_t _op; +}; + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H +/* end file generic/json_character_block.h for ppc64 */ +/* end file generic/amalgamated.h for ppc64 */ +/* including generic/stage1/amalgamated.h for ppc64: #include */ +/* begin file generic/stage1/amalgamated.h for ppc64 */ +// Stuff other things depend on +/* including generic/stage1/base.h for ppc64: #include */ +/* begin file generic/stage1/base.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage1 { + +class bit_indexer; +template +struct buf_block_reader; +struct json_block; +class json_minifier; +class json_scanner; +struct json_string_block; +class json_string_scanner; +class json_structural_indexer; + +} // namespace stage1 + +namespace utf8_validation { +struct utf8_checker; +} // namespace utf8_validation + +using utf8_validation::utf8_checker; + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_BASE_H +/* end file generic/stage1/base.h for ppc64 */ +/* including generic/stage1/buf_block_reader.h for ppc64: #include */ +/* begin file generic/stage1/buf_block_reader.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage1 { + +// Walks through a buffer in block-sized increments, loading the last part with spaces +template +struct buf_block_reader { +public: + simdjson_inline buf_block_reader(const uint8_t *_buf, size_t _len); + simdjson_inline size_t block_index(); + simdjson_inline bool has_full_block() const; + simdjson_inline const uint8_t *full_block() const; + /** + * Get the last block, padded with spaces. + * + * There will always be a last block, with at least 1 byte, unless len == 0 (in which case this + * function fills the buffer with spaces and returns 0. In particular, if len == STEP_SIZE there + * will be 0 full_blocks and 1 remainder block with STEP_SIZE bytes and no spaces for padding. + * + * @return the number of effective characters in the last block. + */ + simdjson_inline size_t get_remainder(uint8_t *dst) const; + simdjson_inline void advance(); +private: + const uint8_t *buf; + const size_t len; + const size_t lenminusstep; + size_t idx; +}; + +// Routines to print masks and text for debugging bitmask operations +simdjson_unused static char * format_input_text_64(const uint8_t *text) { + static char buf[sizeof(simd8x64) + 1]; + for (size_t i=0; i); i++) { + buf[i] = int8_t(text[i]) < ' ' ? '_' : int8_t(text[i]); + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +// Routines to print masks and text for debugging bitmask operations +simdjson_unused static char * format_input_text(const simd8x64& in) { + static char buf[sizeof(simd8x64) + 1]; + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] < ' ') { buf[i] = '_'; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdjson_unused static char * format_input_text(const simd8x64& in, uint64_t mask) { + static char buf[sizeof(simd8x64) + 1]; + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] <= ' ') { buf[i] = '_'; } + if (!(mask & (size_t(1) << i))) { buf[i] = ' '; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdjson_unused static char * format_mask(uint64_t mask) { + static char buf[sizeof(simd8x64) + 1]; + for (size_t i=0; i<64; i++) { + buf[i] = (mask & (size_t(1) << i)) ? 'X' : ' '; + } + buf[64] = '\0'; + return buf; +} + +template +simdjson_inline buf_block_reader::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {} + +template +simdjson_inline size_t buf_block_reader::block_index() { return idx; } + +template +simdjson_inline bool buf_block_reader::has_full_block() const { + return idx < lenminusstep; +} + +template +simdjson_inline const uint8_t *buf_block_reader::full_block() const { + return &buf[idx]; +} + +template +simdjson_inline size_t buf_block_reader::get_remainder(uint8_t *dst) const { + if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers + std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once. + std::memcpy(dst, buf + idx, len - idx); + return len - idx; +} + +template +simdjson_inline void buf_block_reader::advance() { + idx += STEP_SIZE; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H +/* end file generic/stage1/buf_block_reader.h for ppc64 */ +/* including generic/stage1/json_escape_scanner.h for ppc64: #include */ +/* begin file generic/stage1/json_escape_scanner.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_ESCAPE_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_ESCAPE_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage1 { + +/** + * Scans for escape characters in JSON, taking care with multiple backslashes (\\n vs. \n). + */ +struct json_escape_scanner { + /** The actual escape characters (the backslashes themselves). */ + uint64_t next_is_escaped = 0ULL; + + struct escaped_and_escape { + /** + * Mask of escaped characters. + * + * ``` + * \n \\n \\\n \\\\n \ + * 0100100010100101000 + * n \ \ n \ \ + * ``` + */ + uint64_t escaped; + /** + * Mask of escape characters. + * + * ``` + * \n \\n \\\n \\\\n \ + * 1001000101001010001 + * \ \ \ \ \ \ \ + * ``` + */ + uint64_t escape; + }; + + /** + * Get a mask of both escape and escaped characters (the characters following a backslash). + * + * @param potential_escape A mask of the character that can escape others (but could be + * escaped itself). e.g. block.eq('\\') + */ + simdjson_really_inline escaped_and_escape next(uint64_t backslash) noexcept { + +#if !SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT + if (!backslash) { return {next_escaped_without_backslashes(), 0}; } +#endif + + // | | Mask (shows characters instead of 1's) | Depth | Instructions | + // |--------------------------------|----------------------------------------|-------|---------------------| + // | string | `\\n_\\\n___\\\n___\\\\___\\\\__\\\` | | | + // | | ` even odd even odd odd` | | | + // | potential_escape | ` \ \\\ \\\ \\\\ \\\\ \\\` | 1 | 1 (backslash & ~first_is_escaped) + // | escape_and_terminal_code | ` \n \ \n \ \n \ \ \ \ \ \` | 5 | 5 (next_escape_and_terminal_code()) + // | escaped | `\ \ n \ n \ \ \ \ \ ` X | 6 | 7 (escape_and_terminal_code ^ (potential_escape | first_is_escaped)) + // | escape | ` \ \ \ \ \ \ \ \ \ \` | 6 | 8 (escape_and_terminal_code & backslash) + // | first_is_escaped | `\ ` | 7 (*) | 9 (escape >> 63) () + // (*) this is not needed until the next iteration + uint64_t escape_and_terminal_code = next_escape_and_terminal_code(backslash & ~this->next_is_escaped); + uint64_t escaped = escape_and_terminal_code ^ (backslash | this->next_is_escaped); + uint64_t escape = escape_and_terminal_code & backslash; + this->next_is_escaped = escape >> 63; + return {escaped, escape}; + } + +private: + static constexpr const uint64_t ODD_BITS = 0xAAAAAAAAAAAAAAAAULL; + + simdjson_really_inline uint64_t next_escaped_without_backslashes() noexcept { + uint64_t escaped = this->next_is_escaped; + this->next_is_escaped = 0; + return escaped; + } + + /** + * Returns a mask of the next escape characters (masking out escaped backslashes), along with + * any non-backslash escape codes. + * + * \n \\n \\\n \\\\n returns: + * \n \ \ \n \ \ + * 11 100 1011 10100 + * + * You are expected to mask out the first bit yourself if the previous block had a trailing + * escape. + * + * & the result with potential_escape to get just the escape characters. + * ^ the result with (potential_escape | first_is_escaped) to get escaped characters. + */ + static simdjson_really_inline uint64_t next_escape_and_terminal_code(uint64_t potential_escape) noexcept { + // If we were to just shift and mask out any odd bits, we'd actually get a *half* right answer: + // any even-aligned backslash runs would be correct! Odd-aligned backslash runs would be + // inverted (\\\ would be 010 instead of 101). + // + // ``` + // string: | ____\\\\_\\\\_____ | + // maybe_escaped | ODD | \ \ \ \ | + // even-aligned ^^^ ^^^^ odd-aligned + // ``` + // + // Taking that into account, our basic strategy is: + // + // 1. Use subtraction to produce a mask with 1's for even-aligned runs and 0's for + // odd-aligned runs. + // 2. XOR all odd bits, which masks out the odd bits in even-aligned runs, and brings IN the + // odd bits in odd-aligned runs. + // 3. & with backslash to clean up any stray bits. + // runs are set to 0, and then XORing with "odd": + // + // | | Mask (shows characters instead of 1's) | Instructions | + // |--------------------------------|----------------------------------------|---------------------| + // | string | `\\n_\\\n___\\\n___\\\\___\\\\__\\\` | + // | | ` even odd even odd odd` | + // | maybe_escaped | ` n \\n \\n \\\_ \\\_ \\` X | 1 (potential_escape << 1) + // | maybe_escaped_and_odd | ` \n_ \\n _ \\\n_ _ \\\__ _\\\_ \\\` | 1 (maybe_escaped | odd) + // | even_series_codes_and_odd | ` n_\\\ _ n_ _\\\\ _ _ ` | 1 (maybe_escaped_and_odd - potential_escape) + // | escape_and_terminal_code | ` \n \ \n \ \n \ \ \ \ \ \` | 1 (^ odd) + // + + // Escaped characters are characters following an escape. + uint64_t maybe_escaped = potential_escape << 1; + + // To distinguish odd from even escape sequences, therefore, we turn on any *starting* + // escapes that are on an odd byte. (We actually bring in all odd bits, for speed.) + // - Odd runs of backslashes are 0000, and the code at the end ("n" in \n or \\n) is 1. + // - Odd runs of backslashes are 1111, and the code at the end ("n" in \n or \\n) is 0. + // - All other odd bytes are 1, and even bytes are 0. + uint64_t maybe_escaped_and_odd_bits = maybe_escaped | ODD_BITS; + uint64_t even_series_codes_and_odd_bits = maybe_escaped_and_odd_bits - potential_escape; + + // Now we flip all odd bytes back with xor. This: + // - Makes odd runs of backslashes go from 0000 to 1010 + // - Makes even runs of backslashes go from 1111 to 1010 + // - Sets actually-escaped codes to 1 (the n in \n and \\n: \n = 11, \\n = 100) + // - Resets all other bytes to 0 + return even_series_codes_and_odd_bits ^ ODD_BITS; + } +}; + +} // namespace stage1 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H +/* end file generic/stage1/json_escape_scanner.h for ppc64 */ +/* including generic/stage1/json_string_scanner.h for ppc64: #include */ +/* begin file generic/stage1/json_string_scanner.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage1 { + +struct json_string_block { + // We spell out the constructors in the hope of resolving inlining issues with Visual Studio 2017 + simdjson_really_inline json_string_block(uint64_t escaped, uint64_t quote, uint64_t in_string) : + _escaped(escaped), _quote(quote), _in_string(in_string) {} + + // Escaped characters (characters following an escape() character) + simdjson_really_inline uint64_t escaped() const { return _escaped; } + // Real (non-backslashed) quotes + simdjson_really_inline uint64_t quote() const { return _quote; } + // Only characters inside the string (not including the quotes) + simdjson_really_inline uint64_t string_content() const { return _in_string & ~_quote; } + // Return a mask of whether the given characters are inside a string (only works on non-quotes) + simdjson_really_inline uint64_t non_quote_inside_string(uint64_t mask) const { return mask & _in_string; } + // Return a mask of whether the given characters are inside a string (only works on non-quotes) + simdjson_really_inline uint64_t non_quote_outside_string(uint64_t mask) const { return mask & ~_in_string; } + // Tail of string (everything except the start quote) + simdjson_really_inline uint64_t string_tail() const { return _in_string ^ _quote; } + + // escaped characters (backslashed--does not include the hex characters after \u) + uint64_t _escaped; + // real quotes (non-escaped ones) + uint64_t _quote; + // string characters (includes start quote but not end quote) + uint64_t _in_string; +}; + +// Scans blocks for string characters, storing the state necessary to do so +class json_string_scanner { +public: + simdjson_really_inline json_string_block next(const simd::simd8x64& in); + // Returns either UNCLOSED_STRING or SUCCESS + simdjson_really_inline error_code finish(); + +private: + // Scans for escape characters + json_escape_scanner escape_scanner{}; + // Whether the last iteration was still inside a string (all 1's = true, all 0's = false). + uint64_t prev_in_string = 0ULL; +}; + +// +// Return a mask of all string characters plus end quotes. +// +// prev_escaped is overflow saying whether the next character is escaped. +// prev_in_string is overflow saying whether we're still in a string. +// +// Backslash sequences outside of quotes will be detected in stage 2. +// +simdjson_really_inline json_string_block json_string_scanner::next(const simd::simd8x64& in) { + const uint64_t backslash = in.eq('\\'); + const uint64_t escaped = escape_scanner.next(backslash).escaped; + const uint64_t quote = in.eq('"') & ~escaped; + + // + // prefix_xor flips on bits inside the string (and flips off the end quote). + // + // Then we xor with prev_in_string: if we were in a string already, its effect is flipped + // (characters inside strings are outside, and characters outside strings are inside). + // + const uint64_t in_string = prefix_xor(quote) ^ prev_in_string; + + // + // Check if we're still in a string at the end of the box so the next block will know + // + prev_in_string = uint64_t(static_cast(in_string) >> 63); + + // Use ^ to turn the beginning quote off, and the end quote on. + + // We are returning a function-local object so either we get a move constructor + // or we get copy elision. + return json_string_block(escaped, quote, in_string); +} + +simdjson_really_inline error_code json_string_scanner::finish() { + if (prev_in_string) { + return UNCLOSED_STRING; + } + return SUCCESS; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H +/* end file generic/stage1/json_string_scanner.h for ppc64 */ +/* including generic/stage1/utf8_lookup4_algorithm.h for ppc64: #include */ +/* begin file generic/stage1/utf8_lookup4_algorithm.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace utf8_validation { + +using namespace simd; + + simdjson_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) +// Bit 1 = Too Long (ASCII followed by continuation) +// Bit 2 = Overlong 3-byte +// Bit 4 = Surrogate +// Bit 5 = Overlong 2-byte +// Bit 7 = Two Continuations + constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ + // 11______ 11______ + constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ + constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ + constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ + constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ + constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ + constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ + // 11110100 101_____ + // 11110101 1001____ + // 11110101 101_____ + // 1111011_ 1001____ + // 1111011_ 101_____ + // 11111___ 1001____ + // 11111___ 101_____ + constexpr const uint8_t TOO_LARGE_1000 = 1<<6; + // 11110101 1000____ + // 1111011_ 1000____ + // 11111___ 1000____ + constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + + const simd8 byte_1_high = prev1.shr<4>().lookup_16( + // 0_______ ________ + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + // 10______ ________ + TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, + // 1100____ ________ + TOO_SHORT | OVERLONG_2, + // 1101____ ________ + TOO_SHORT, + // 1110____ ________ + TOO_SHORT | OVERLONG_3 | SURROGATE, + // 1111____ ________ + TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + ); + constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . + const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( + // ____0000 ________ + CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, + // ____0001 ________ + CARRY | OVERLONG_2, + // ____001_ ________ + CARRY, + CARRY, + + // ____0100 ________ + CARRY | TOO_LARGE, + // ____0101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____011_ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + + // ____1___ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____1101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000 + ); + const simd8 byte_2_high = input.shr<4>().lookup_16( + // ________ 0_______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + simdjson_inline simd8 check_multibyte_lengths(const simd8 input, + const simd8 prev_input, const simd8 sc) { + simd8 prev2 = input.prev<2>(prev_input); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; + } + + // + // Return nonzero if there are incomplete multibyte characters at the end of the block: + // e.g. if there is a 4-byte character, but it's 3 bytes from the end. + // + simdjson_inline simd8 is_incomplete(const simd8 input) { + // If the previous input's last 3 bytes match this, they're too short (they ended at EOF): + // ... 1111____ 111_____ 11______ +#if SIMDJSON_IMPLEMENTATION_ICELAKE + static const uint8_t max_array[64] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1 + }; +#else + static const uint8_t max_array[32] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1 + }; +#endif + const simd8 max_value(&max_array[sizeof(max_array)-sizeof(simd8)]); + return input.gt_bits(max_value); + } + + struct utf8_checker { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; + // The last input we received + simd8 prev_input_block; + // Whether the last input we received was incomplete (used for ASCII fast path) + simd8 prev_incomplete; + + // + // Check whether the current bytes are valid UTF-8. + // + simdjson_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + simd8 sc = check_special_cases(input, prev1); + this->error |= check_multibyte_lengths(input, prev_input, sc); + } + + // The only problem that can happen at EOF is that a multibyte character is too short + // or a byte value too large in the last bytes: check_special_cases only checks for bytes + // too large in the first of two bytes. + simdjson_inline void check_eof() { + // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't + // possibly finish them. + this->error |= this->prev_incomplete; + } + + simdjson_inline void check_next_input(const simd8x64& input) { + if(simdjson_likely(is_ascii(input))) { + this->error |= this->prev_incomplete; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 1) + ||(simd8x64::NUM_CHUNKS == 2) + || (simd8x64::NUM_CHUNKS == 4), + "We support one, two or four chunks per 64-byte block."); + SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 1) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + } else SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + this->prev_incomplete = is_incomplete(input.chunks[simd8x64::NUM_CHUNKS-1]); + this->prev_input_block = input.chunks[simd8x64::NUM_CHUNKS-1]; + } + } + // do not forget to call check_eof! + simdjson_inline error_code errors() { + return this->error.any_bits_set_anywhere() ? error_code::UTF8_ERROR : error_code::SUCCESS; + } + + }; // struct utf8_checker +} // namespace utf8_validation + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H +/* end file generic/stage1/utf8_lookup4_algorithm.h for ppc64 */ +/* including generic/stage1/json_scanner.h for ppc64: #include */ +/* begin file generic/stage1/json_scanner.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage1 { + +/** + * A block of scanned json, with information on operators and scalars. + * + * We seek to identify pseudo-structural characters. Anything that is inside + * a string must be omitted (hence & ~_string.string_tail()). + * Otherwise, pseudo-structural characters come in two forms. + * 1. We have the structural characters ([,],{,},:, comma). The + * term 'structural character' is from the JSON RFC. + * 2. We have the 'scalar pseudo-structural characters'. + * Scalars are quotes, and any character except structural characters and white space. + * + * To identify the scalar pseudo-structural characters, we must look at what comes + * before them: it must be a space, a quote or a structural characters. + * Starting with simdjson v0.3, we identify them by + * negation: we identify everything that is followed by a non-quote scalar, + * and we negate that. Whatever remains must be a 'scalar pseudo-structural character'. + */ +struct json_block { +public: + // We spell out the constructors in the hope of resolving inlining issues with Visual Studio 2017 + simdjson_inline json_block(json_string_block&& string, json_character_block characters, uint64_t follows_potential_nonquote_scalar) : + _string(std::move(string)), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {} + simdjson_inline json_block(json_string_block string, json_character_block characters, uint64_t follows_potential_nonquote_scalar) : + _string(string), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {} + + /** + * The start of structurals. + * In simdjson prior to v0.3, these were called the pseudo-structural characters. + **/ + simdjson_inline uint64_t structural_start() const noexcept { return potential_structural_start() & ~_string.string_tail(); } + /** All JSON whitespace (i.e. not in a string) */ + simdjson_inline uint64_t whitespace() const noexcept { return non_quote_outside_string(_characters.whitespace()); } + + // Helpers + + /** Whether the given characters are inside a string (only works on non-quotes) */ + simdjson_inline uint64_t non_quote_inside_string(uint64_t mask) const noexcept { return _string.non_quote_inside_string(mask); } + /** Whether the given characters are outside a string (only works on non-quotes) */ + simdjson_inline uint64_t non_quote_outside_string(uint64_t mask) const noexcept { return _string.non_quote_outside_string(mask); } + + // string and escape characters + json_string_block _string; + // whitespace, structural characters ('operators'), scalars + json_character_block _characters; + // whether the previous character was a scalar + uint64_t _follows_potential_nonquote_scalar; +private: + // Potential structurals (i.e. disregarding strings) + + /** + * structural elements ([,],{,},:, comma) plus scalar starts like 123, true and "abc". + * They may reside inside a string. + **/ + simdjson_inline uint64_t potential_structural_start() const noexcept { return _characters.op() | potential_scalar_start(); } + /** + * The start of non-operator runs, like 123, true and "abc". + * It main reside inside a string. + **/ + simdjson_inline uint64_t potential_scalar_start() const noexcept { + // The term "scalar" refers to anything except structural characters and white space + // (so letters, numbers, quotes). + // Whenever it is preceded by something that is not a structural element ({,},[,],:, ") nor a white-space + // then we know that it is irrelevant structurally. + return _characters.scalar() & ~follows_potential_scalar(); + } + /** + * Whether the given character is immediately after a non-operator like 123, true. + * The characters following a quote are not included. + */ + simdjson_inline uint64_t follows_potential_scalar() const noexcept { + // _follows_potential_nonquote_scalar: is defined as marking any character that follows a character + // that is not a structural element ({,},[,],:, comma) nor a quote (") and that is not a + // white space. + // It is understood that within quoted region, anything at all could be marked (irrelevant). + return _follows_potential_nonquote_scalar; + } +}; + +/** + * Scans JSON for important bits: structural characters or 'operators', strings, and scalars. + * + * The scanner starts by calculating two distinct things: + * - string characters (taking \" into account) + * - structural characters or 'operators' ([]{},:, comma) + * and scalars (runs of non-operators like 123, true and "abc") + * + * To minimize data dependency (a key component of the scanner's speed), it finds these in parallel: + * in particular, the operator/scalar bit will find plenty of things that are actually part of + * strings. When we're done, json_block will fuse the two together by masking out tokens that are + * part of a string. + */ +class json_scanner { +public: + json_scanner() = default; + simdjson_inline json_block next(const simd::simd8x64& in); + // Returns either UNCLOSED_STRING or SUCCESS + simdjson_inline error_code finish(); + +private: + // Whether the last character of the previous iteration is part of a scalar token + // (anything except whitespace or a structural character/'operator'). + uint64_t prev_scalar = 0ULL; + json_string_scanner string_scanner{}; +}; + + +// +// Check if the current character immediately follows a matching character. +// +// For example, this checks for quotes with backslashes in front of them: +// +// const uint64_t backslashed_quote = in.eq('"') & immediately_follows(in.eq('\'), prev_backslash); +// +simdjson_inline uint64_t follows(const uint64_t match, uint64_t &overflow) { + const uint64_t result = match << 1 | overflow; + overflow = match >> 63; + return result; +} + +simdjson_inline json_block json_scanner::next(const simd::simd8x64& in) { + json_string_block strings = string_scanner.next(in); + // identifies the white-space and the structural characters + json_character_block characters = json_character_block::classify(in); + // The term "scalar" refers to anything except structural characters and white space + // (so letters, numbers, quotes). + // We want follows_scalar to mark anything that follows a non-quote scalar (so letters and numbers). + // + // A terminal quote should either be followed by a structural character (comma, brace, bracket, colon) + // or nothing. However, we still want ' "a string"true ' to mark the 't' of 'true' as a potential + // pseudo-structural character just like we would if we had ' "a string" true '; otherwise we + // may need to add an extra check when parsing strings. + // + // Performance: there are many ways to skin this cat. + const uint64_t nonquote_scalar = characters.scalar() & ~strings.quote(); + uint64_t follows_nonquote_scalar = follows(nonquote_scalar, prev_scalar); + // We are returning a function-local object so either we get a move constructor + // or we get copy elision. + return json_block( + strings,// strings is a function-local object so either it moves or the copy is elided. + characters, + follows_nonquote_scalar + ); +} + +simdjson_inline error_code json_scanner::finish() { + return string_scanner.finish(); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H +/* end file generic/stage1/json_scanner.h for ppc64 */ + +// All other declarations +/* including generic/stage1/find_next_document_index.h for ppc64: #include */ +/* begin file generic/stage1/find_next_document_index.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage1 { + +/** + * This algorithm is used to quickly identify the last structural position that + * makes up a complete document. + * + * It does this by going backwards and finding the last *document boundary* (a + * place where one value follows another without a comma between them). If the + * last document (the characters after the boundary) has an equal number of + * start and end brackets, it is considered complete. + * + * Simply put, we iterate over the structural characters, starting from + * the end. We consider that we found the end of a JSON document when the + * first element of the pair is NOT one of these characters: '{' '[' ':' ',' + * and when the second element is NOT one of these characters: '}' ']' ':' ','. + * + * This simple comparison works most of the time, but it does not cover cases + * where the batch's structural indexes contain a perfect amount of documents. + * In such a case, we do not have access to the structural index which follows + * the last document, therefore, we do not have access to the second element in + * the pair, and that means we cannot identify the last document. To fix this + * issue, we keep a count of the open and closed curly/square braces we found + * while searching for the pair. When we find a pair AND the count of open and + * closed curly/square braces is the same, we know that we just passed a + * complete document, therefore the last json buffer location is the end of the + * batch. + */ +simdjson_inline uint32_t find_next_document_index(dom_parser_implementation &parser) { + // Variant: do not count separately, just figure out depth + if(parser.n_structural_indexes == 0) { return 0; } + auto arr_cnt = 0; + auto obj_cnt = 0; + for (auto i = parser.n_structural_indexes - 1; i > 0; i--) { + auto idxb = parser.structural_indexes[i]; + switch (parser.buf[idxb]) { + case ':': + case ',': + continue; + case '}': + obj_cnt--; + continue; + case ']': + arr_cnt--; + continue; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + auto idxa = parser.structural_indexes[i - 1]; + switch (parser.buf[idxa]) { + case '{': + case '[': + case ':': + case ',': + continue; + } + // Last document is complete, so the next document will appear after! + if (!arr_cnt && !obj_cnt) { + return parser.n_structural_indexes; + } + // Last document is incomplete; mark the document at i + 1 as the next one + return i; + } + // If we made it to the end, we want to finish counting to see if we have a full document. + switch (parser.buf[parser.structural_indexes[0]]) { + case '}': + obj_cnt--; + break; + case ']': + arr_cnt--; + break; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + if (!arr_cnt && !obj_cnt) { + // We have a complete document. + return parser.n_structural_indexes; + } + return 0; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H +/* end file generic/stage1/find_next_document_index.h for ppc64 */ +/* including generic/stage1/json_minifier.h for ppc64: #include */ +/* begin file generic/stage1/json_minifier.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses in stage1 +// It is intended to be included multiple times and compiled multiple times +// We assume the file in which it is included already includes +// "simdjson/stage1.h" (this simplifies amalgation) + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage1 { + +class json_minifier { +public: + template + static error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept; + +private: + simdjson_inline json_minifier(uint8_t *_dst) + : dst{_dst} + {} + template + simdjson_inline void step(const uint8_t *block_buf, buf_block_reader &reader) noexcept; + simdjson_inline void next(const simd::simd8x64& in, const json_block& block); + simdjson_inline error_code finish(uint8_t *dst_start, size_t &dst_len); + json_scanner scanner{}; + uint8_t *dst; +}; + +simdjson_inline void json_minifier::next(const simd::simd8x64& in, const json_block& block) { + uint64_t mask = block.whitespace(); + dst += in.compress(mask, dst); +} + +simdjson_inline error_code json_minifier::finish(uint8_t *dst_start, size_t &dst_len) { + error_code error = scanner.finish(); + if (error) { dst_len = 0; return error; } + dst_len = dst - dst_start; + return SUCCESS; +} + +template<> +simdjson_inline void json_minifier::step<128>(const uint8_t *block_buf, buf_block_reader<128> &reader) noexcept { + simd::simd8x64 in_1(block_buf); + simd::simd8x64 in_2(block_buf+64); + json_block block_1 = scanner.next(in_1); + json_block block_2 = scanner.next(in_2); + this->next(in_1, block_1); + this->next(in_2, block_2); + reader.advance(); +} + +template<> +simdjson_inline void json_minifier::step<64>(const uint8_t *block_buf, buf_block_reader<64> &reader) noexcept { + simd::simd8x64 in_1(block_buf); + json_block block_1 = scanner.next(in_1); + this->next(block_buf, block_1); + reader.advance(); +} + +template +error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept { + buf_block_reader reader(buf, len); + json_minifier minifier(dst); + + // Index the first n-1 blocks + while (reader.has_full_block()) { + minifier.step(reader.full_block(), reader); + } + + // Index the last (remainder) block, padded with spaces + uint8_t block[STEP_SIZE]; + size_t remaining_bytes = reader.get_remainder(block); + if (remaining_bytes > 0) { + // We do not want to write directly to the output stream. Rather, we write + // to a local buffer (for safety). + uint8_t out_block[STEP_SIZE]; + uint8_t * const guarded_dst{minifier.dst}; + minifier.dst = out_block; + minifier.step(block, reader); + size_t to_write = minifier.dst - out_block; + // In some cases, we could be enticed to consider the padded spaces + // as part of the string. This is fine as long as we do not write more + // than we consumed. + if(to_write > remaining_bytes) { to_write = remaining_bytes; } + memcpy(guarded_dst, out_block, to_write); + minifier.dst = guarded_dst + to_write; + } + return minifier.finish(dst, dst_len); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H +/* end file generic/stage1/json_minifier.h for ppc64 */ +/* including generic/stage1/json_structural_indexer.h for ppc64: #include */ +/* begin file generic/stage1/json_structural_indexer.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses in stage1 +// It is intended to be included multiple times and compiled multiple times +// We assume the file in which it is included already includes +// "simdjson/stage1.h" (this simplifies amalgation) + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage1 { + +class bit_indexer { +public: + uint32_t *tail; + + simdjson_inline bit_indexer(uint32_t *index_buf) : tail(index_buf) {} + +#if SIMDJSON_PREFER_REVERSE_BITS + /** + * ARM lacks a fast trailing zero instruction, but it has a fast + * bit reversal instruction and a fast leading zero instruction. + * Thus it may be profitable to reverse the bits (once) and then + * to rely on a sequence of instructions that call the leading + * zero instruction. + * + * Performance notes: + * The chosen routine is not optimal in terms of data dependency + * since zero_leading_bit might require two instructions. However, + * it tends to minimize the total number of instructions which is + * beneficial. + */ + simdjson_inline void write_index(uint32_t idx, uint64_t& rev_bits, int i) { + int lz = leading_zeroes(rev_bits); + this->tail[i] = static_cast(idx) + lz; + rev_bits = zero_leading_bit(rev_bits, lz); + } +#else + /** + * Under recent x64 systems, we often have both a fast trailing zero + * instruction and a fast 'clear-lower-bit' instruction so the following + * algorithm can be competitive. + */ + + simdjson_inline void write_index(uint32_t idx, uint64_t& bits, int i) { + this->tail[i] = idx + trailing_zeroes(bits); + bits = clear_lowest_bit(bits); + } +#endif // SIMDJSON_PREFER_REVERSE_BITS + + template + simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) { + write_index(idx, bits, START); + SIMDJSON_IF_CONSTEXPR (N > 1) { + write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits); + } + return START+N; + } + + template + simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) { + write_indexes(idx, bits); + SIMDJSON_IF_CONSTEXPR ((START+STEP) < END) { + if (simdjson_unlikely((START+STEP) < cnt)) { + write_indexes_stepped<(START+STEP(idx, bits, cnt); + } + } + return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP; + } + + // flatten out values in 'bits' assuming that they are are to have values of idx + // plus their position in the bitvector, and store these indexes at + // base_ptr[base] incrementing base as we go + // will potentially store extra values beyond end of valid bits, so base_ptr + // needs to be large enough to handle this + // + // If the kernel sets SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER, then it + // will provide its own version of the code. +#ifdef SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + simdjson_inline void write(uint32_t idx, uint64_t bits); +#else + simdjson_inline void write(uint32_t idx, uint64_t bits) { + // In some instances, the next branch is expensive because it is mispredicted. + // Unfortunately, in other cases, + // it helps tremendously. + if (bits == 0) + return; + + int cnt = static_cast(count_ones(bits)); + +#if SIMDJSON_PREFER_REVERSE_BITS + bits = reverse_bits(bits); +#endif +#ifdef SIMDJSON_STRUCTURAL_INDEXER_STEP + static constexpr const int STEP = SIMDJSON_STRUCTURAL_INDEXER_STEP; +#else + static constexpr const int STEP = 4; +#endif + static constexpr const int STEP_UNTIL = 24; + + write_indexes_stepped<0, STEP_UNTIL, STEP>(idx, bits, cnt); + SIMDJSON_IF_CONSTEXPR (STEP_UNTIL < 64) { + if (simdjson_unlikely(STEP_UNTIL < cnt)) { + for (int i=STEP_UNTIL; itail += cnt; + } +#endif // SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +}; + +class json_structural_indexer { +public: + /** + * Find the important bits of JSON in a 128-byte chunk, and add them to structural_indexes. + * + * @param partial Setting the partial parameter to true allows the find_structural_bits to + * tolerate unclosed strings. The caller should still ensure that the input is valid UTF-8. If + * you are processing substrings, you may want to call on a function like trimmed_length_safe_utf8. + */ + template + static error_code index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept; + +private: + simdjson_inline json_structural_indexer(uint32_t *structural_indexes); + template + simdjson_inline void step(const uint8_t *block, buf_block_reader &reader) noexcept; + simdjson_inline void next(const simd::simd8x64& in, const json_block& block, size_t idx); + simdjson_inline error_code finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial); + + json_scanner scanner{}; + utf8_checker checker{}; + bit_indexer indexer; + uint64_t prev_structurals = 0; + uint64_t unescaped_chars_error = 0; +}; + +simdjson_inline json_structural_indexer::json_structural_indexer(uint32_t *structural_indexes) : indexer{structural_indexes} {} + +// Skip the last character if it is partial +simdjson_inline size_t trim_partial_utf8(const uint8_t *buf, size_t len) { + if (simdjson_unlikely(len < 3)) { + switch (len) { + case 2: + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (buf[len-2] >= 0xe0) { return len-2; } // 3- and 4-byte characters with only 2 bytes left + return len; + case 1: + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + return len; + case 0: + return len; + } + } + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (buf[len-2] >= 0xe0) { return len-2; } // 3- and 4-byte characters with only 1 byte left + if (buf[len-3] >= 0xf0) { return len-3; } // 4-byte characters with only 3 bytes left + return len; +} + +// +// PERF NOTES: +// We pipe 2 inputs through these stages: +// 1. Load JSON into registers. This takes a long time and is highly parallelizable, so we load +// 2 inputs' worth at once so that by the time step 2 is looking for them input, it's available. +// 2. Scan the JSON for critical data: strings, scalars and operators. This is the critical path. +// The output of step 1 depends entirely on this information. These functions don't quite use +// up enough CPU: the second half of the functions is highly serial, only using 1 execution core +// at a time. The second input's scans has some dependency on the first ones finishing it, but +// they can make a lot of progress before they need that information. +// 3. Step 1 doesn't use enough capacity, so we run some extra stuff while we're waiting for that +// to finish: utf-8 checks and generating the output from the last iteration. +// +// The reason we run 2 inputs at a time, is steps 2 and 3 are *still* not enough to soak up all +// available capacity with just one input. Running 2 at a time seems to give the CPU a good enough +// workout. +// +template +error_code json_structural_indexer::index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept { + if (simdjson_unlikely(len > parser.capacity())) { return CAPACITY; } + // We guard the rest of the code so that we can assume that len > 0 throughout. + if (len == 0) { return EMPTY; } + if (is_streaming(partial)) { + len = trim_partial_utf8(buf, len); + // If you end up with an empty window after trimming + // the partial UTF-8 bytes, then chances are good that you + // have an UTF-8 formatting error. + if(len == 0) { return UTF8_ERROR; } + } + buf_block_reader reader(buf, len); + json_structural_indexer indexer(parser.structural_indexes.get()); + + // Read all but the last block + while (reader.has_full_block()) { + indexer.step(reader.full_block(), reader); + } + // Take care of the last block (will always be there unless file is empty which is + // not supposed to happen.) + uint8_t block[STEP_SIZE]; + if (simdjson_unlikely(reader.get_remainder(block) == 0)) { return UNEXPECTED_ERROR; } + indexer.step(block, reader); + return indexer.finish(parser, reader.block_index(), len, partial); +} + +template<> +simdjson_inline void json_structural_indexer::step<128>(const uint8_t *block, buf_block_reader<128> &reader) noexcept { + simd::simd8x64 in_1(block); + simd::simd8x64 in_2(block+64); + json_block block_1 = scanner.next(in_1); + json_block block_2 = scanner.next(in_2); + this->next(in_1, block_1, reader.block_index()); + this->next(in_2, block_2, reader.block_index()+64); + reader.advance(); +} + +template<> +simdjson_inline void json_structural_indexer::step<64>(const uint8_t *block, buf_block_reader<64> &reader) noexcept { + simd::simd8x64 in_1(block); + json_block block_1 = scanner.next(in_1); + this->next(in_1, block_1, reader.block_index()); + reader.advance(); +} + +simdjson_inline void json_structural_indexer::next(const simd::simd8x64& in, const json_block& block, size_t idx) { + uint64_t unescaped = in.lteq(0x1F); +#if SIMDJSON_UTF8VALIDATION + checker.check_next_input(in); +#endif + indexer.write(uint32_t(idx-64), prev_structurals); // Output *last* iteration's structurals to the parser + prev_structurals = block.structural_start(); + unescaped_chars_error |= block.non_quote_inside_string(unescaped); +} + +simdjson_inline error_code json_structural_indexer::finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial) { + // Write out the final iteration's structurals + indexer.write(uint32_t(idx-64), prev_structurals); + error_code error = scanner.finish(); + // We deliberately break down the next expression so that it is + // human readable. + const bool should_we_exit = is_streaming(partial) ? + ((error != SUCCESS) && (error != UNCLOSED_STRING)) // when partial we tolerate UNCLOSED_STRING + : (error != SUCCESS); // if partial is false, we must have SUCCESS + const bool have_unclosed_string = (error == UNCLOSED_STRING); + if (simdjson_unlikely(should_we_exit)) { return error; } + + if (unescaped_chars_error) { + return UNESCAPED_CHARS; + } + parser.n_structural_indexes = uint32_t(indexer.tail - parser.structural_indexes.get()); + /*** + * The On Demand API requires special padding. + * + * This is related to https://github.com/simdjson/simdjson/issues/906 + * Basically, we want to make sure that if the parsing continues beyond the last (valid) + * structural character, it quickly stops. + * Only three structural characters can be repeated without triggering an error in JSON: [,] and }. + * We repeat the padding character (at 'len'). We don't know what it is, but if the parsing + * continues, then it must be [,] or }. + * Suppose it is ] or }. We backtrack to the first character, what could it be that would + * not trigger an error? It could be ] or } but no, because you can't start a document that way. + * It can't be a comma, a colon or any simple value. So the only way we could continue is + * if the repeated character is [. But if so, the document must start with [. But if the document + * starts with [, it should end with ]. If we enforce that rule, then we would get + * ][[ which is invalid. + * + * This is illustrated with the test array_iterate_unclosed_error() on the following input: + * R"({ "a": [,,)" + **/ + parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); // used later in partial == stage1_mode::streaming_final + parser.structural_indexes[parser.n_structural_indexes + 1] = uint32_t(len); + parser.structural_indexes[parser.n_structural_indexes + 2] = 0; + parser.next_structural_index = 0; + // a valid JSON file cannot have zero structural indexes - we should have found something + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { + return EMPTY; + } + if (simdjson_unlikely(parser.structural_indexes[parser.n_structural_indexes - 1] > len)) { + return UNEXPECTED_ERROR; + } + if (partial == stage1_mode::streaming_partial) { + // If we have an unclosed string, then the last structural + // will be the quote and we want to make sure to omit it. + if(have_unclosed_string) { + parser.n_structural_indexes--; + // a valid JSON file cannot have zero structural indexes - we should have found something + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { return CAPACITY; } + } + // We truncate the input to the end of the last complete document (or zero). + auto new_structural_indexes = find_next_document_index(parser); + if (new_structural_indexes == 0 && parser.n_structural_indexes > 0) { + if(parser.structural_indexes[0] == 0) { + // If the buffer is partial and we started at index 0 but the document is + // incomplete, it's too big to parse. + return CAPACITY; + } else { + // It is possible that the document could be parsed, we just had a lot + // of white space. + parser.n_structural_indexes = 0; + return EMPTY; + } + } + + parser.n_structural_indexes = new_structural_indexes; + } else if (partial == stage1_mode::streaming_final) { + if(have_unclosed_string) { parser.n_structural_indexes--; } + // We truncate the input to the end of the last complete document (or zero). + // Because partial == stage1_mode::streaming_final, it means that we may + // silently ignore trailing garbage. Though it sounds bad, we do it + // deliberately because many people who have streams of JSON documents + // will truncate them for processing. E.g., imagine that you are uncompressing + // the data from a size file or receiving it in chunks from the network. You + // may not know where exactly the last document will be. Meanwhile the + // document_stream instances allow people to know the JSON documents they are + // parsing (see the iterator.source() method). + parser.n_structural_indexes = find_next_document_index(parser); + // We store the initial n_structural_indexes so that the client can see + // whether we used truncation. If initial_n_structural_indexes == parser.n_structural_indexes, + // then this will query parser.structural_indexes[parser.n_structural_indexes] which is len, + // otherwise, it will copy some prior index. + parser.structural_indexes[parser.n_structural_indexes + 1] = parser.structural_indexes[parser.n_structural_indexes]; + // This next line is critical, do not change it unless you understand what you are + // doing. + parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { + // We tolerate an unclosed string at the very end of the stream. Indeed, users + // often load their data in bulk without being careful and they want us to ignore + // the trailing garbage. + return EMPTY; + } + } + checker.check_eof(); + return checker.errors(); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +// Clear CUSTOM_BIT_INDEXER so other implementations can set it if they need to. +#undef SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H +/* end file generic/stage1/json_structural_indexer.h for ppc64 */ +/* including generic/stage1/utf8_validator.h for ppc64: #include */ +/* begin file generic/stage1/utf8_validator.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage1 { + +/** + * Validates that the string is actual UTF-8. + */ +template +bool generic_validate_utf8(const uint8_t * input, size_t length) { + checker c{}; + buf_block_reader<64> reader(input, length); + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + c.check_next_input(in); + reader.advance(); + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + c.check_next_input(in); + reader.advance(); + c.check_eof(); + return c.errors() == error_code::SUCCESS; +} + +bool generic_validate_utf8(const char * input, size_t length) { + return generic_validate_utf8(reinterpret_cast(input),length); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H +/* end file generic/stage1/utf8_validator.h for ppc64 */ +/* end file generic/stage1/amalgamated.h for ppc64 */ +/* including generic/stage2/amalgamated.h for ppc64: #include */ +/* begin file generic/stage2/amalgamated.h for ppc64 */ +// Stuff other things depend on +/* including generic/stage2/base.h for ppc64: #include */ +/* begin file generic/stage2/base.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage2 { + +class json_iterator; +class structural_iterator; +struct tape_builder; +struct tape_writer; + +} // namespace stage2 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_BASE_H +/* end file generic/stage2/base.h for ppc64 */ +/* including generic/stage2/tape_writer.h for ppc64: #include */ +/* begin file generic/stage2/tape_writer.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage2 { + +struct tape_writer { + /** The next place to write to tape */ + uint64_t *next_tape_loc; + + /** Write a signed 64-bit value to tape. */ + simdjson_inline void append_s64(int64_t value) noexcept; + + /** Write an unsigned 64-bit value to tape. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + + /** Write a double value to tape. */ + simdjson_inline void append_double(double value) noexcept; + + /** + * Append a tape entry (an 8-bit type,and 56 bits worth of value). + */ + simdjson_inline void append(uint64_t val, internal::tape_type t) noexcept; + + /** + * Skip the current tape entry without writing. + * + * Used to skip the start of the container, since we'll come back later to fill it in when the + * container ends. + */ + simdjson_inline void skip() noexcept; + + /** + * Skip the number of tape entries necessary to write a large u64 or i64. + */ + simdjson_inline void skip_large_integer() noexcept; + + /** + * Skip the number of tape entries necessary to write a double. + */ + simdjson_inline void skip_double() noexcept; + + /** + * Write a value to a known location on tape. + * + * Used to go back and write out the start of a container after the container ends. + */ + simdjson_inline static void write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept; + +private: + /** + * Append both the tape entry, and a supplementary value following it. Used for types that need + * all 64 bits, such as double and uint64_t. + */ + template + simdjson_inline void append2(uint64_t val, T val2, internal::tape_type t) noexcept; +}; // struct tape_writer + +simdjson_inline void tape_writer::append_s64(int64_t value) noexcept { + append2(0, value, internal::tape_type::INT64); +} + +simdjson_inline void tape_writer::append_u64(uint64_t value) noexcept { + append(0, internal::tape_type::UINT64); + *next_tape_loc = value; + next_tape_loc++; +} + +/** Write a double value to tape. */ +simdjson_inline void tape_writer::append_double(double value) noexcept { + append2(0, value, internal::tape_type::DOUBLE); +} + +simdjson_inline void tape_writer::skip() noexcept { + next_tape_loc++; +} + +simdjson_inline void tape_writer::skip_large_integer() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::skip_double() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::append(uint64_t val, internal::tape_type t) noexcept { + *next_tape_loc = val | ((uint64_t(char(t))) << 56); + next_tape_loc++; +} + +template +simdjson_inline void tape_writer::append2(uint64_t val, T val2, internal::tape_type t) noexcept { + append(val, t); + static_assert(sizeof(val2) == sizeof(*next_tape_loc), "Type is not 64 bits!"); + memcpy(next_tape_loc, &val2, sizeof(val2)); + next_tape_loc++; +} + +simdjson_inline void tape_writer::write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept { + tape_loc = val | ((uint64_t(char(t))) << 56); +} + +} // namespace stage2 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H +/* end file generic/stage2/tape_writer.h for ppc64 */ +/* including generic/stage2/logger.h for ppc64: #include */ +/* begin file generic/stage2/logger.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + + +// This is for an internal-only stage 2 specific logger. +// Set LOG_ENABLED = true to log what stage 2 is doing! +namespace simdjson { +namespace ppc64 { +namespace { +namespace logger { + + static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + static constexpr const int LOG_EVENT_LEN = 20; + static constexpr const int LOG_BUFFER_LEN = 30; + static constexpr const int LOG_SMALL_BUFFER_LEN = 10; + static constexpr const int LOG_INDEX_LEN = 5; + + static int log_depth; // Not threadsafe. Log only. + + // Helper to turn unprintable or newline characters into spaces + static simdjson_inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } + } + + // Print the header and set up log_start + static simdjson_inline void log_start() { + if (LOG_ENABLED) { + log_depth = 0; + printf("\n"); + printf("| %-*s | %-*s | %-*s | %-*s | Detail |\n", LOG_EVENT_LEN, "Event", LOG_BUFFER_LEN, "Buffer", LOG_SMALL_BUFFER_LEN, "Next", 5, "Next#"); + printf("|%.*s|%.*s|%.*s|%.*s|--------|\n", LOG_EVENT_LEN+2, DASHES, LOG_BUFFER_LEN+2, DASHES, LOG_SMALL_BUFFER_LEN+2, DASHES, 5+2, DASHES); + } + } + + simdjson_unused static simdjson_inline void log_string(const char *message) { + if (LOG_ENABLED) { + printf("%s\n", message); + } + } + + // Logs a single line from the stage 2 DOM parser + template + static simdjson_inline void log_line(S &structurals, const char *title_prefix, const char *title, const char *detail) { + if (LOG_ENABLED) { + printf("| %*s%s%-*s ", log_depth*2, "", title_prefix, LOG_EVENT_LEN - log_depth*2 - int(strlen(title_prefix)), title); + auto current_index = structurals.at_beginning() ? nullptr : structurals.next_structural-1; + auto next_index = structurals.next_structural; + auto current = current_index ? &structurals.buf[*current_index] : reinterpret_cast(" "); + auto next = &structurals.buf[*next_index]; + { + // Print the next N characters in the buffer. + printf("| "); + // Otherwise, print the characters starting from the buffer position. + // Print spaces for unprintable or newline characters. + for (int i=0;i */ +/* begin file generic/stage2/json_iterator.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage2 { + +class json_iterator { +public: + const uint8_t* const buf; + uint32_t *next_structural; + dom_parser_implementation &dom_parser; + uint32_t depth{0}; + + /** + * Walk the JSON document. + * + * The visitor receives callbacks when values are encountered. All callbacks pass the iterator as + * the first parameter; some callbacks have other parameters as well: + * + * - visit_document_start() - at the beginning. + * - visit_document_end() - at the end (if things were successful). + * + * - visit_array_start() - at the start `[` of a non-empty array. + * - visit_array_end() - at the end `]` of a non-empty array. + * - visit_empty_array() - when an empty array is encountered. + * + * - visit_object_end() - at the start `]` of a non-empty object. + * - visit_object_start() - at the end `]` of a non-empty object. + * - visit_empty_object() - when an empty object is encountered. + * - visit_key(const uint8_t *key) - when a key in an object field is encountered. key is + * guaranteed to point at the first quote of the string (`"key"`). + * - visit_primitive(const uint8_t *value) - when a value is a string, number, boolean or null. + * - visit_root_primitive(iter, uint8_t *value) - when the top-level value is a string, number, boolean or null. + * + * - increment_count(iter) - each time a value is found in an array or object. + */ + template + simdjson_warn_unused simdjson_inline error_code walk_document(V &visitor) noexcept; + + /** + * Create an iterator capable of walking a JSON document. + * + * The document must have already passed through stage 1. + */ + simdjson_inline json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index); + + /** + * Look at the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *peek() const noexcept; + /** + * Advance to the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *advance() noexcept; + /** + * Get the remaining length of the document, from the start of the current token. + */ + simdjson_inline size_t remaining_len() const noexcept; + /** + * Check if we are at the end of the document. + * + * If this is true, there are no more tokens. + */ + simdjson_inline bool at_eof() const noexcept; + /** + * Check if we are at the beginning of the document. + */ + simdjson_inline bool at_beginning() const noexcept; + simdjson_inline uint8_t last_structural() const noexcept; + + /** + * Log that a value has been found. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_value(const char *type) const noexcept; + /** + * Log the start of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_start_value(const char *type) const noexcept; + /** + * Log the end of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_end_value(const char *type) const noexcept; + /** + * Log an error. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_error(const char *error) const noexcept; + + template + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(V &visitor, const uint8_t *value) noexcept; + template + simdjson_warn_unused simdjson_inline error_code visit_primitive(V &visitor, const uint8_t *value) noexcept; +}; + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::walk_document(V &visitor) noexcept { + logger::log_start(); + + // + // Start the document + // + if (at_eof()) { return EMPTY; } + log_start_value("document"); + SIMDJSON_TRY( visitor.visit_document_start(*this) ); + + // + // Read first value + // + { + auto value = advance(); + + // Make sure the outer object or array is closed before continuing; otherwise, there are ways we + // could get into memory corruption. See https://github.com/simdjson/simdjson/issues/906 + if (!STREAMING) { + switch (*value) { + case '{': if (last_structural() != '}') { log_value("starting brace unmatched"); return TAPE_ERROR; }; break; + case '[': if (last_structural() != ']') { log_value("starting bracket unmatched"); return TAPE_ERROR; }; break; + } + } + + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_root_primitive(*this, value) ); break; + } + } + goto document_end; + +// +// Object parser states +// +object_begin: + log_start_value("object"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = false; + SIMDJSON_TRY( visitor.visit_object_start(*this) ); + + { + auto key = advance(); + if (*key != '"') { log_error("Object does not start with a key"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.increment_count(*this) ); + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + +object_field: + if (simdjson_unlikely( *advance() != ':' )) { log_error("Missing colon after key in object"); return TAPE_ERROR; } + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +object_continue: + switch (*advance()) { + case ',': + SIMDJSON_TRY( visitor.increment_count(*this) ); + { + auto key = advance(); + if (simdjson_unlikely( *key != '"' )) { log_error("Key string missing at beginning of field in object"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + goto object_field; + case '}': log_end_value("object"); SIMDJSON_TRY( visitor.visit_object_end(*this) ); goto scope_end; + default: log_error("No comma between object fields"); return TAPE_ERROR; + } + +scope_end: + depth--; + if (depth == 0) { goto document_end; } + if (dom_parser.is_array[depth]) { goto array_continue; } + goto object_continue; + +// +// Array parser states +// +array_begin: + log_start_value("array"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = true; + SIMDJSON_TRY( visitor.visit_array_start(*this) ); + SIMDJSON_TRY( visitor.increment_count(*this) ); + +array_value: + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +array_continue: + switch (*advance()) { + case ',': SIMDJSON_TRY( visitor.increment_count(*this) ); goto array_value; + case ']': log_end_value("array"); SIMDJSON_TRY( visitor.visit_array_end(*this) ); goto scope_end; + default: log_error("Missing comma between array values"); return TAPE_ERROR; + } + +document_end: + log_end_value("document"); + SIMDJSON_TRY( visitor.visit_document_end(*this) ); + + dom_parser.next_structural_index = uint32_t(next_structural - &dom_parser.structural_indexes[0]); + + // If we didn't make it to the end, it's an error + if ( !STREAMING && dom_parser.next_structural_index != dom_parser.n_structural_indexes ) { + log_error("More than one JSON value at the root of the document, or extra characters at the end of the JSON!"); + return TAPE_ERROR; + } + + return SUCCESS; + +} // walk_document() + +simdjson_inline json_iterator::json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index) + : buf{_dom_parser.buf}, + next_structural{&_dom_parser.structural_indexes[start_structural_index]}, + dom_parser{_dom_parser} { +} + +simdjson_inline const uint8_t *json_iterator::peek() const noexcept { + return &buf[*(next_structural)]; +} +simdjson_inline const uint8_t *json_iterator::advance() noexcept { + return &buf[*(next_structural++)]; +} +simdjson_inline size_t json_iterator::remaining_len() const noexcept { + return dom_parser.len - *(next_structural-1); +} + +simdjson_inline bool json_iterator::at_eof() const noexcept { + return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes]; +} +simdjson_inline bool json_iterator::at_beginning() const noexcept { + return next_structural == dom_parser.structural_indexes.get(); +} +simdjson_inline uint8_t json_iterator::last_structural() const noexcept { + return buf[dom_parser.structural_indexes[dom_parser.n_structural_indexes - 1]]; +} + +simdjson_inline void json_iterator::log_value(const char *type) const noexcept { + logger::log_line(*this, "", type, ""); +} + +simdjson_inline void json_iterator::log_start_value(const char *type) const noexcept { + logger::log_line(*this, "+", type, ""); + if (logger::LOG_ENABLED) { logger::log_depth++; } +} + +simdjson_inline void json_iterator::log_end_value(const char *type) const noexcept { + if (logger::LOG_ENABLED) { logger::log_depth--; } + logger::log_line(*this, "-", type, ""); +} + +simdjson_inline void json_iterator::log_error(const char *error) const noexcept { + logger::log_line(*this, "", "ERROR", error); +} + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_root_primitive(V &visitor, const uint8_t *value) noexcept { + switch (*value) { + case '"': return visitor.visit_root_string(*this, value); + case 't': return visitor.visit_root_true_atom(*this, value); + case 'f': return visitor.visit_root_false_atom(*this, value); + case 'n': return visitor.visit_root_null_atom(*this, value); + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return visitor.visit_root_number(*this, value); + default: + log_error("Document starts with a non-value character"); + return TAPE_ERROR; + } +} +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_primitive(V &visitor, const uint8_t *value) noexcept { + // Use the fact that most scalars are going to be either strings or numbers. + if(*value == '"') { + return visitor.visit_string(*this, value); + } else if (((*value - '0') < 10) || (*value == '-')) { + return visitor.visit_number(*this, value); + } + // true, false, null are uncommon. + switch (*value) { + case 't': return visitor.visit_true_atom(*this, value); + case 'f': return visitor.visit_false_atom(*this, value); + case 'n': return visitor.visit_null_atom(*this, value); + default: + log_error("Non-value found when value was expected!"); + return TAPE_ERROR; + } +} + +} // namespace stage2 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H +/* end file generic/stage2/json_iterator.h for ppc64 */ +/* including generic/stage2/stringparsing.h for ppc64: #include */ +/* begin file generic/stage2/stringparsing.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses +// It is intended to be included multiple times and compiled multiple times + +namespace simdjson { +namespace ppc64 { +namespace { +/// @private +namespace stringparsing { + +// begin copypasta +// These chars yield themselves: " \ / +// b -> backspace, f -> formfeed, n -> newline, r -> cr, t -> horizontal tab +// u not handled in this table as it's complex +static const uint8_t escape_map[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2f, + 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, 0, 0, 0, 0, // 0x4. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x5c, 0, 0, 0, // 0x5. + 0, 0, 0x08, 0, 0, 0, 0x0c, 0, 0, 0, 0, 0, 0, 0, 0x0a, 0, // 0x6. + 0, 0, 0x0d, 0, 0x09, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x7. + + 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, 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, 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, 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, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +// handle a unicode codepoint +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint(const uint8_t **src_ptr, + uint8_t **dst_ptr, bool allow_replacement) { + // Use the default Unicode Character 'REPLACEMENT CHARACTER' (U+FFFD) + constexpr uint32_t substitution_code_point = 0xfffd; + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) != ((static_cast ('\\') << 8) | static_cast ('u'))) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + + // We have already checked that the high surrogate is valid and + // (code_point - 0xd800) < 1024. + // + // Check that code_point_2 is in the range 0xdc00..0xdfff + // and that code_point_2 was parsed from valid hex. + uint32_t low_bit = code_point_2 - 0xdc00; + if (low_bit >> 10) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + code_point = (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + + } + } else if (code_point >= 0xdc00 && code_point <= 0xdfff) { + // If we encounter a low surrogate (not preceded by a high surrogate) + // then we have an error. + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +// handle a unicode codepoint using the wobbly convention +// https://simonsapin.github.io/wtf-8/ +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint_wobbly(const uint8_t **src_ptr, + uint8_t **dst_ptr) { + // It is not ideal that this function is nearly identical to handle_unicode_codepoint. + // + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) == ((static_cast ('\\') << 8) | static_cast ('u'))) { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + uint32_t low_bit = code_point_2 - 0xdc00; + if ((low_bit >> 10) == 0) { + code_point = + (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + } + } + + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +/** + * Unescape a valid UTF-8 string from src to dst, stopping at a final unescaped quote. There + * must be an unescaped quote terminating the string. It returns the final output + * position as pointer. In case of error (e.g., the string has bad escaped codes), + * then null_nullptrptr is returned. It is assumed that the output buffer is large + * enough. E.g., if src points at 'joe"', then dst needs to have four free bytes + + * SIMDJSON_PADDING bytes. + */ +simdjson_warn_unused simdjson_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) { + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint(&src, &dst, allow_replacement)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +simdjson_warn_unused simdjson_inline uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) { + // It is not ideal that this function is nearly identical to parse_string. + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint_wobbly(&src, &dst)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +} // namespace stringparsing +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H +/* end file generic/stage2/stringparsing.h for ppc64 */ +/* including generic/stage2/structural_iterator.h for ppc64: #include */ +/* begin file generic/stage2/structural_iterator.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage2 { + +class structural_iterator { +public: + const uint8_t* const buf; + uint32_t *next_structural; + dom_parser_implementation &dom_parser; + + // Start a structural + simdjson_inline structural_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index) + : buf{_dom_parser.buf}, + next_structural{&_dom_parser.structural_indexes[start_structural_index]}, + dom_parser{_dom_parser} { + } + // Get the buffer position of the current structural character + simdjson_inline const uint8_t* current() { + return &buf[*(next_structural-1)]; + } + // Get the current structural character + simdjson_inline char current_char() { + return buf[*(next_structural-1)]; + } + // Get the next structural character without advancing + simdjson_inline char peek_next_char() { + return buf[*next_structural]; + } + simdjson_inline const uint8_t* peek() { + return &buf[*next_structural]; + } + simdjson_inline const uint8_t* advance() { + return &buf[*(next_structural++)]; + } + simdjson_inline char advance_char() { + return buf[*(next_structural++)]; + } + simdjson_inline size_t remaining_len() { + return dom_parser.len - *(next_structural-1); + } + + simdjson_inline bool at_end() { + return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes]; + } + simdjson_inline bool at_beginning() { + return next_structural == dom_parser.structural_indexes.get(); + } +}; + +} // namespace stage2 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H +/* end file generic/stage2/structural_iterator.h for ppc64 */ +/* including generic/stage2/tape_builder.h for ppc64: #include */ +/* begin file generic/stage2/tape_builder.h for ppc64 */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace ppc64 { +namespace { +namespace stage2 { + +struct tape_builder { + template + simdjson_warn_unused static simdjson_inline error_code parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept; + + /** Called when a non-empty document starts. */ + simdjson_warn_unused simdjson_inline error_code visit_document_start(json_iterator &iter) noexcept; + /** Called when a non-empty document ends without error. */ + simdjson_warn_unused simdjson_inline error_code visit_document_end(json_iterator &iter) noexcept; + + /** Called when a non-empty array starts. */ + simdjson_warn_unused simdjson_inline error_code visit_array_start(json_iterator &iter) noexcept; + /** Called when a non-empty array ends. */ + simdjson_warn_unused simdjson_inline error_code visit_array_end(json_iterator &iter) noexcept; + /** Called when an empty array is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_array(json_iterator &iter) noexcept; + + /** Called when a non-empty object starts. */ + simdjson_warn_unused simdjson_inline error_code visit_object_start(json_iterator &iter) noexcept; + /** + * Called when a key in a field is encountered. + * + * primitive, visit_object_start, visit_empty_object, visit_array_start, or visit_empty_array + * will be called after this with the field value. + */ + simdjson_warn_unused simdjson_inline error_code visit_key(json_iterator &iter, const uint8_t *key) noexcept; + /** Called when a non-empty object ends. */ + simdjson_warn_unused simdjson_inline error_code visit_object_end(json_iterator &iter) noexcept; + /** Called when an empty object is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_object(json_iterator &iter) noexcept; + + /** + * Called when a string, number, boolean or null is found. + */ + simdjson_warn_unused simdjson_inline error_code visit_primitive(json_iterator &iter, const uint8_t *value) noexcept; + /** + * Called when a string, number, boolean or null is found at the top level of a document (i.e. + * when there is no array or object and the entire document is a single string, number, boolean or + * null. + * + * This is separate from primitive() because simdjson's normal primitive parsing routines assume + * there is at least one more token after the value, which is only true in an array or object. + */ + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_string(json_iterator &iter, const uint8_t *value, bool key = false) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_root_string(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + /** Called each time a new field or element in an array or object is found. */ + simdjson_warn_unused simdjson_inline error_code increment_count(json_iterator &iter) noexcept; + + /** Next location to write to tape */ + tape_writer tape; +private: + /** Next write location in the string buf for stage 2 parsing */ + uint8_t *current_string_buf_loc; + + simdjson_inline tape_builder(dom::document &doc) noexcept; + + simdjson_inline uint32_t next_tape_index(json_iterator &iter) const noexcept; + simdjson_inline void start_container(json_iterator &iter) noexcept; + simdjson_warn_unused simdjson_inline error_code end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_warn_unused simdjson_inline error_code empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_inline uint8_t *on_start_string(json_iterator &iter) noexcept; + simdjson_inline void on_end_string(uint8_t *dst) noexcept; +}; // struct tape_builder + +template +simdjson_warn_unused simdjson_inline error_code tape_builder::parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept { + dom_parser.doc = &doc; + json_iterator iter(dom_parser, STREAMING ? dom_parser.next_structural_index : 0); + tape_builder builder(doc); + return iter.walk_document(builder); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_root_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_object(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_array(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_end(json_iterator &iter) noexcept { + constexpr uint32_t start_tape_index = 0; + tape.append(start_tape_index, internal::tape_type::ROOT); + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter), internal::tape_type::ROOT); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_key(json_iterator &iter, const uint8_t *key) noexcept { + return visit_string(iter, key, true); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::increment_count(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].count++; // we have a key value pair in the object at parser.dom_parser.depth - 1 + return SUCCESS; +} + +simdjson_inline tape_builder::tape_builder(dom::document &doc) noexcept : tape{doc.tape.get()}, current_string_buf_loc{doc.string_buf.get()} {} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_string(json_iterator &iter, const uint8_t *value, bool key) noexcept { + iter.log_value(key ? "key" : "string"); + uint8_t *dst = on_start_string(iter); + dst = stringparsing::parse_string(value+1, dst, false); // We do not allow replacement when the escape characters are invalid. + if (dst == nullptr) { + iter.log_error("Invalid escape in string"); + return STRING_ERROR; + } + on_end_string(dst); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_string(json_iterator &iter, const uint8_t *value) noexcept { + return visit_string(iter, value); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_number(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("number"); + return numberparsing::parse_number(value, tape); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_number(json_iterator &iter, const uint8_t *value) noexcept { + // + // We need to make a copy to make sure that the string is space terminated. + // This is not about padding the input, which should already padded up + // to len + SIMDJSON_PADDING. However, we have no control at this stage + // on how the padding was done. What if the input string was padded with nulls? + // It is quite common for an input string to have an extra null character (C string). + // We do not want to allow 9\0 (where \0 is the null character) inside a JSON + // document, but the string "9\0" by itself is fine. So we make a copy and + // pad the input with spaces when we know that there is just one input element. + // This copy is relatively expensive, but it will almost never be called in + // practice unless you are in the strange scenario where you have many JSON + // documents made of single atoms. + // + std::unique_ptrcopy(new (std::nothrow) uint8_t[iter.remaining_len() + SIMDJSON_PADDING]); + if (copy.get() == nullptr) { return MEMALLOC; } + std::memcpy(copy.get(), value, iter.remaining_len()); + std::memset(copy.get() + iter.remaining_len(), ' ', SIMDJSON_PADDING); + error_code error = visit_number(iter, copy.get()); + return error; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value)) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value, iter.remaining_len())) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value)) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value, iter.remaining_len())) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value)) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value, iter.remaining_len())) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +// private: + +simdjson_inline uint32_t tape_builder::next_tape_index(json_iterator &iter) const noexcept { + return uint32_t(tape.next_tape_loc - iter.dom_parser.doc->tape.get()); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + auto start_index = next_tape_index(iter); + tape.append(start_index+2, start); + tape.append(start_index, end); + return SUCCESS; +} + +simdjson_inline void tape_builder::start_container(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].tape_index = next_tape_index(iter); + iter.dom_parser.open_containers[iter.depth].count = 0; + tape.skip(); // We don't actually *write* the start element until the end. +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + // Write the ending tape element, pointing at the start location + const uint32_t start_tape_index = iter.dom_parser.open_containers[iter.depth].tape_index; + tape.append(start_tape_index, end); + // Write the start tape element, pointing at the end location (and including count) + // count can overflow if it exceeds 24 bits... so we saturate + // the convention being that a cnt of 0xffffff or more is undetermined in value (>= 0xffffff). + const uint32_t count = iter.dom_parser.open_containers[iter.depth].count; + const uint32_t cntsat = count > 0xFFFFFF ? 0xFFFFFF : count; + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter) | (uint64_t(cntsat) << 32), start); + return SUCCESS; +} + +simdjson_inline uint8_t *tape_builder::on_start_string(json_iterator &iter) noexcept { + // we advance the point, accounting for the fact that we have a NULL termination + tape.append(current_string_buf_loc - iter.dom_parser.doc->string_buf.get(), internal::tape_type::STRING); + return current_string_buf_loc + sizeof(uint32_t); +} + +simdjson_inline void tape_builder::on_end_string(uint8_t *dst) noexcept { + uint32_t str_length = uint32_t(dst - (current_string_buf_loc + sizeof(uint32_t))); + // TODO check for overflow in case someone has a crazy string (>=4GB?) + // But only add the overflow check when the document itself exceeds 4GB + // Currently unneeded because we refuse to parse docs larger or equal to 4GB. + memcpy(current_string_buf_loc, &str_length, sizeof(uint32_t)); + // NULL termination is still handy if you expect all your strings to + // be NULL terminated? It comes at a small cost + *dst = 0; + current_string_buf_loc = dst + 1; +} + +} // namespace stage2 +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H +/* end file generic/stage2/tape_builder.h for ppc64 */ +/* end file generic/stage2/amalgamated.h for ppc64 */ + +// +// Stage 1 +// +namespace simdjson { +namespace ppc64 { + +simdjson_warn_unused error_code implementation::create_dom_parser_implementation( + size_t capacity, + size_t max_depth, + std::unique_ptr& dst +) const noexcept { + dst.reset( new (std::nothrow) dom_parser_implementation() ); + if (!dst) { return MEMALLOC; } + if (auto err = dst->set_capacity(capacity)) + return err; + if (auto err = dst->set_max_depth(max_depth)) + return err; + return SUCCESS; +} + +namespace { + +using namespace simd; + +simdjson_inline json_character_block json_character_block::classify(const simd::simd8x64& in) { + const simd8 table1(16, 0, 0, 0, 0, 0, 0, 0, 0, 8, 12, 1, 2, 9, 0, 0); + const simd8 table2(8, 0, 18, 4, 0, 1, 0, 1, 0, 0, 0, 3, 2, 1, 0, 0); + + simd8x64 v( + (in.chunks[0] & 0xf).lookup_16(table1) & (in.chunks[0].shr<4>()).lookup_16(table2), + (in.chunks[1] & 0xf).lookup_16(table1) & (in.chunks[1].shr<4>()).lookup_16(table2), + (in.chunks[2] & 0xf).lookup_16(table1) & (in.chunks[2].shr<4>()).lookup_16(table2), + (in.chunks[3] & 0xf).lookup_16(table1) & (in.chunks[3].shr<4>()).lookup_16(table2) + ); + + uint64_t op = simd8x64( + v.chunks[0].any_bits_set(0x7), + v.chunks[1].any_bits_set(0x7), + v.chunks[2].any_bits_set(0x7), + v.chunks[3].any_bits_set(0x7) + ).to_bitmask(); + + uint64_t whitespace = simd8x64( + v.chunks[0].any_bits_set(0x18), + v.chunks[1].any_bits_set(0x18), + v.chunks[2].any_bits_set(0x18), + v.chunks[3].any_bits_set(0x18) + ).to_bitmask(); + + return { whitespace, op }; +} + +simdjson_inline bool is_ascii(const simd8x64& input) { + // careful: 0x80 is not ascii. + return input.reduce_or().saturating_sub(0x7fu).bits_not_set_anywhere(); +} + +simdjson_unused simdjson_inline simd8 must_be_continuation(const simd8 prev1, const simd8 prev2, const simd8 prev3) { + simd8 is_second_byte = prev1.saturating_sub(0xc0u-1); // Only 11______ will be > 0 + simd8 is_third_byte = prev2.saturating_sub(0xe0u-1); // Only 111_____ will be > 0 + simd8 is_fourth_byte = prev3.saturating_sub(0xf0u-1); // Only 1111____ will be > 0 + // Caller requires a bool (all 1's). All values resulting from the subtraction will be <= 64, so signed comparison is fine. + return simd8(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0); +} + +simdjson_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3) { + simd8 is_third_byte = prev2.saturating_sub(0xe0u-1); // Only 111_____ will be > 0 + simd8 is_fourth_byte = prev3.saturating_sub(0xf0u-1); // Only 1111____ will be > 0 + // Caller requires a bool (all 1's). All values resulting from the subtraction will be <= 64, so signed comparison is fine. + return simd8(is_third_byte | is_fourth_byte) > int8_t(0); +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +// +// Stage 2 +// + +// +// Implementation-specific overrides +// +namespace simdjson { +namespace ppc64 { + +simdjson_warn_unused error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { + return ppc64::stage1::json_minifier::minify<64>(buf, len, dst, dst_len); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage1(const uint8_t *_buf, size_t _len, stage1_mode streaming) noexcept { + this->buf = _buf; + this->len = _len; + return ppc64::stage1::json_structural_indexer::index<64>(buf, len, *this, streaming); +} + +simdjson_warn_unused bool implementation::validate_utf8(const char *buf, size_t len) const noexcept { + return ppc64::stage1::generic_validate_utf8(buf,len); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage2_next(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_string(const uint8_t *src, uint8_t *dst, bool replacement_char) const noexcept { + return ppc64::stringparsing::parse_string(src, dst, replacement_char); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept { + return ppc64::stringparsing::parse_wobbly_string(src, dst); +} + +simdjson_warn_unused error_code dom_parser_implementation::parse(const uint8_t *_buf, size_t _len, dom::document &_doc) noexcept { + auto error = stage1(_buf, _len, stage1_mode::regular); + if (error) { return error; } + return stage2(_doc); +} + +} // namespace ppc64 +} // namespace simdjson + +/* including simdjson/ppc64/end.h: #include */ +/* begin file simdjson/ppc64/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#undef SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT +/* undefining SIMDJSON_IMPLEMENTATION from "ppc64" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/ppc64/end.h */ + +#endif // SIMDJSON_SRC_PPC64_CPP +/* end file ppc64.cpp */ +#endif +#if SIMDJSON_IMPLEMENTATION_WESTMERE +/* including westmere.cpp: #include */ +/* begin file westmere.cpp */ +#ifndef SIMDJSON_SRC_WESTMERE_CPP +#define SIMDJSON_SRC_WESTMERE_CPP + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* including simdjson/westmere.h: #include */ +/* begin file simdjson/westmere.h */ +#ifndef SIMDJSON_WESTMERE_H +#define SIMDJSON_WESTMERE_H + +/* including simdjson/westmere/begin.h: #include "simdjson/westmere/begin.h" */ +/* begin file simdjson/westmere/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "westmere" */ +#define SIMDJSON_IMPLEMENTATION westmere +/* including simdjson/westmere/base.h: #include "simdjson/westmere/base.h" */ +/* begin file simdjson/westmere/base.h */ +#ifndef SIMDJSON_WESTMERE_BASE_H +#define SIMDJSON_WESTMERE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE +namespace simdjson { +/** + * Implementation for Westmere (Intel SSE4.2). + */ +namespace westmere { + +class implementation; + +namespace { +namespace simd { + +template struct simd8; +template struct simd8x64; + +} // namespace simd +} // unnamed namespace + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BASE_H +/* end file simdjson/westmere/base.h */ +/* including simdjson/westmere/intrinsics.h: #include "simdjson/westmere/intrinsics.h" */ +/* begin file simdjson/westmere/intrinsics.h */ +#ifndef SIMDJSON_WESTMERE_INTRINSICS_H +#define SIMDJSON_WESTMERE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + */ +#include // for _mm_alignr_epi8 +#include // for _mm_clmulepi64_si128 +#endif + +static_assert(sizeof(__m128i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for westmere"); + +#endif // SIMDJSON_WESTMERE_INTRINSICS_H +/* end file simdjson/westmere/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_WESTMERE +SIMDJSON_TARGET_REGION("sse4.2,pclmul,popcnt") +#endif + +/* including simdjson/westmere/bitmanipulation.h: #include "simdjson/westmere/bitmanipulation.h" */ +/* begin file simdjson/westmere/bitmanipulation.h */ +#ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H +#define SIMDJSON_WESTMERE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMANIPULATION_H +/* end file simdjson/westmere/bitmanipulation.h */ +/* including simdjson/westmere/bitmask.h: #include "simdjson/westmere/bitmask.h" */ +/* begin file simdjson/westmere/bitmask.h */ +#ifndef SIMDJSON_WESTMERE_BITMASK_H +#define SIMDJSON_WESTMERE_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processing supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMASK_H +/* end file simdjson/westmere/bitmask.h */ +/* including simdjson/westmere/numberparsing_defs.h: #include "simdjson/westmere/numberparsing_defs.h" */ +/* begin file simdjson/westmere/numberparsing_defs.h */ +#ifndef SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H +#define SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H + +/* including simdjson/westmere/base.h: #include "simdjson/westmere/base.h" */ +/* begin file simdjson/westmere/base.h */ +#ifndef SIMDJSON_WESTMERE_BASE_H +#define SIMDJSON_WESTMERE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE +namespace simdjson { +/** + * Implementation for Westmere (Intel SSE4.2). + */ +namespace westmere { + +class implementation; + +namespace { +namespace simd { + +template struct simd8; +template struct simd8x64; + +} // namespace simd +} // unnamed namespace + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BASE_H +/* end file simdjson/westmere/base.h */ +/* including simdjson/westmere/intrinsics.h: #include "simdjson/westmere/intrinsics.h" */ +/* begin file simdjson/westmere/intrinsics.h */ +#ifndef SIMDJSON_WESTMERE_INTRINSICS_H +#define SIMDJSON_WESTMERE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + */ +#include // for _mm_alignr_epi8 +#include // for _mm_clmulepi64_si128 +#endif + +static_assert(sizeof(__m128i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for westmere"); + +#endif // SIMDJSON_WESTMERE_INTRINSICS_H +/* end file simdjson/westmere/intrinsics.h */ + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace numberparsing { + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace westmere +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H +/* end file simdjson/westmere/numberparsing_defs.h */ +/* including simdjson/westmere/simd.h: #include "simdjson/westmere/simd.h" */ +/* begin file simdjson/westmere/simd.h */ +#ifndef SIMDJSON_WESTMERE_SIMD_H +#define SIMDJSON_WESTMERE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace simd { + + template + struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i&() const { return this->value; } + simdjson_inline operator __m128i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm_or_si128(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm_and_si128(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm_xor_si128(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm_andnot_si128(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + template> + struct base8: base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm_alignr_epi8(*this, prev_chunk, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm_testz_si128(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm_setzero_si128(); } + static simdjson_inline simd8 load(const T values[16]) { + return _mm_loadu_si128(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { return _mm_storeu_si128(reinterpret_cast<__m128i *>(dst), *this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m128i shufmask = _mm_set_epi64x(thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask + shufmask = + _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m128i pruned = _mm_shuffle_epi8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = _mm_shuffle_epi8(pruned, compactmask); + _mm_storeu_si128(reinterpret_cast<__m128i *>(output), answer); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epu8(*this, other); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm_testz_si128(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm_testz_si128(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm_movemask_epi8(_mm_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "Westmere kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() ); + uint64_t r1 = this->chunks[1].to_bitmask() ; + uint64_t r2 = this->chunks[2].to_bitmask() ; + uint64_t r3 = this->chunks[3].to_bitmask() ; + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_SIMD_INPUT_H +/* end file simdjson/westmere/simd.h */ +/* including simdjson/westmere/stringparsing_defs.h: #include "simdjson/westmere/stringparsing_defs.h" */ +/* begin file simdjson/westmere/stringparsing_defs.h */ +#ifndef SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H +#define SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H + +/* including simdjson/westmere/bitmanipulation.h: #include "simdjson/westmere/bitmanipulation.h" */ +/* begin file simdjson/westmere/bitmanipulation.h */ +#ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H +#define SIMDJSON_WESTMERE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMANIPULATION_H +/* end file simdjson/westmere/bitmanipulation.h */ +/* including simdjson/westmere/simd.h: #include "simdjson/westmere/simd.h" */ +/* begin file simdjson/westmere/simd.h */ +#ifndef SIMDJSON_WESTMERE_SIMD_H +#define SIMDJSON_WESTMERE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace simd { + + template + struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i&() const { return this->value; } + simdjson_inline operator __m128i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm_or_si128(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm_and_si128(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm_xor_si128(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm_andnot_si128(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + template> + struct base8: base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm_alignr_epi8(*this, prev_chunk, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm_testz_si128(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm_setzero_si128(); } + static simdjson_inline simd8 load(const T values[16]) { + return _mm_loadu_si128(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { return _mm_storeu_si128(reinterpret_cast<__m128i *>(dst), *this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m128i shufmask = _mm_set_epi64x(thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask + shufmask = + _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m128i pruned = _mm_shuffle_epi8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = _mm_shuffle_epi8(pruned, compactmask); + _mm_storeu_si128(reinterpret_cast<__m128i *>(output), answer); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epu8(*this, other); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm_testz_si128(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm_testz_si128(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm_movemask_epi8(_mm_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "Westmere kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() ); + uint64_t r1 = this->chunks[1].to_bitmask() ; + uint64_t r2 = this->chunks[2].to_bitmask() ; + uint64_t r3 = this->chunks[3].to_bitmask() ; + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_SIMD_INPUT_H +/* end file simdjson/westmere/simd.h */ + +namespace simdjson { +namespace westmere { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + 16); + v0.store(dst); + v1.store(dst + 16); + uint64_t bs_and_quote = simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H +/* end file simdjson/westmere/stringparsing_defs.h */ +/* end file simdjson/westmere/begin.h */ +/* including simdjson/generic/amalgamated.h for westmere: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for westmere */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for westmere: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for westmere */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for westmere */ +/* including simdjson/generic/jsoncharutils.h for westmere: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for westmere */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for westmere */ +/* including simdjson/generic/atomparsing.h for westmere: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for westmere */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace westmere { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for westmere */ +/* including simdjson/generic/dom_parser_implementation.h for westmere: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for westmere */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace westmere +} // namespace simdjson + +namespace simdjson { +namespace westmere { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for westmere */ +/* including simdjson/generic/implementation_simdjson_result_base.h for westmere: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for westmere */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for westmere */ +/* including simdjson/generic/numberparsing.h for westmere: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for westmere */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace westmere { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for westmere */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for westmere: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for westmere */ +/* end file simdjson/generic/amalgamated.h for westmere */ +/* including simdjson/westmere/end.h: #include "simdjson/westmere/end.h" */ +/* begin file simdjson/westmere/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_WESTMERE +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "westmere" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/westmere/end.h */ + +#endif // SIMDJSON_WESTMERE_H +/* end file simdjson/westmere.h */ +/* including simdjson/westmere/implementation.h: #include */ +/* begin file simdjson/westmere/implementation.h */ +#ifndef SIMDJSON_WESTMERE_IMPLEMENTATION_H +#define SIMDJSON_WESTMERE_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE +namespace simdjson { +namespace westmere { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation("westmere", "Intel/AMD SSE4.2", internal::instruction_set::SSE42 | internal::instruction_set::PCLMULQDQ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H +/* end file simdjson/westmere/implementation.h */ + +/* including simdjson/westmere/begin.h: #include */ +/* begin file simdjson/westmere/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "westmere" */ +#define SIMDJSON_IMPLEMENTATION westmere +/* including simdjson/westmere/base.h: #include "simdjson/westmere/base.h" */ +/* begin file simdjson/westmere/base.h */ +#ifndef SIMDJSON_WESTMERE_BASE_H +#define SIMDJSON_WESTMERE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE +namespace simdjson { +/** + * Implementation for Westmere (Intel SSE4.2). + */ +namespace westmere { + +class implementation; + +namespace { +namespace simd { + +template struct simd8; +template struct simd8x64; + +} // namespace simd +} // unnamed namespace + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BASE_H +/* end file simdjson/westmere/base.h */ +/* including simdjson/westmere/intrinsics.h: #include "simdjson/westmere/intrinsics.h" */ +/* begin file simdjson/westmere/intrinsics.h */ +#ifndef SIMDJSON_WESTMERE_INTRINSICS_H +#define SIMDJSON_WESTMERE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + */ +#include // for _mm_alignr_epi8 +#include // for _mm_clmulepi64_si128 +#endif + +static_assert(sizeof(__m128i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for westmere"); + +#endif // SIMDJSON_WESTMERE_INTRINSICS_H +/* end file simdjson/westmere/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_WESTMERE +SIMDJSON_TARGET_REGION("sse4.2,pclmul,popcnt") +#endif + +/* including simdjson/westmere/bitmanipulation.h: #include "simdjson/westmere/bitmanipulation.h" */ +/* begin file simdjson/westmere/bitmanipulation.h */ +#ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H +#define SIMDJSON_WESTMERE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMANIPULATION_H +/* end file simdjson/westmere/bitmanipulation.h */ +/* including simdjson/westmere/bitmask.h: #include "simdjson/westmere/bitmask.h" */ +/* begin file simdjson/westmere/bitmask.h */ +#ifndef SIMDJSON_WESTMERE_BITMASK_H +#define SIMDJSON_WESTMERE_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processing supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMASK_H +/* end file simdjson/westmere/bitmask.h */ +/* including simdjson/westmere/numberparsing_defs.h: #include "simdjson/westmere/numberparsing_defs.h" */ +/* begin file simdjson/westmere/numberparsing_defs.h */ +#ifndef SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H +#define SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H + +/* including simdjson/westmere/base.h: #include "simdjson/westmere/base.h" */ +/* begin file simdjson/westmere/base.h */ +#ifndef SIMDJSON_WESTMERE_BASE_H +#define SIMDJSON_WESTMERE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE +namespace simdjson { +/** + * Implementation for Westmere (Intel SSE4.2). + */ +namespace westmere { + +class implementation; + +namespace { +namespace simd { + +template struct simd8; +template struct simd8x64; + +} // namespace simd +} // unnamed namespace + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BASE_H +/* end file simdjson/westmere/base.h */ +/* including simdjson/westmere/intrinsics.h: #include "simdjson/westmere/intrinsics.h" */ +/* begin file simdjson/westmere/intrinsics.h */ +#ifndef SIMDJSON_WESTMERE_INTRINSICS_H +#define SIMDJSON_WESTMERE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + */ +#include // for _mm_alignr_epi8 +#include // for _mm_clmulepi64_si128 +#endif + +static_assert(sizeof(__m128i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for westmere"); + +#endif // SIMDJSON_WESTMERE_INTRINSICS_H +/* end file simdjson/westmere/intrinsics.h */ + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace numberparsing { + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace westmere +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H +/* end file simdjson/westmere/numberparsing_defs.h */ +/* including simdjson/westmere/simd.h: #include "simdjson/westmere/simd.h" */ +/* begin file simdjson/westmere/simd.h */ +#ifndef SIMDJSON_WESTMERE_SIMD_H +#define SIMDJSON_WESTMERE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace simd { + + template + struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i&() const { return this->value; } + simdjson_inline operator __m128i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm_or_si128(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm_and_si128(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm_xor_si128(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm_andnot_si128(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + template> + struct base8: base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm_alignr_epi8(*this, prev_chunk, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm_testz_si128(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm_setzero_si128(); } + static simdjson_inline simd8 load(const T values[16]) { + return _mm_loadu_si128(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { return _mm_storeu_si128(reinterpret_cast<__m128i *>(dst), *this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m128i shufmask = _mm_set_epi64x(thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask + shufmask = + _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m128i pruned = _mm_shuffle_epi8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = _mm_shuffle_epi8(pruned, compactmask); + _mm_storeu_si128(reinterpret_cast<__m128i *>(output), answer); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epu8(*this, other); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm_testz_si128(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm_testz_si128(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm_movemask_epi8(_mm_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "Westmere kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() ); + uint64_t r1 = this->chunks[1].to_bitmask() ; + uint64_t r2 = this->chunks[2].to_bitmask() ; + uint64_t r3 = this->chunks[3].to_bitmask() ; + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_SIMD_INPUT_H +/* end file simdjson/westmere/simd.h */ +/* including simdjson/westmere/stringparsing_defs.h: #include "simdjson/westmere/stringparsing_defs.h" */ +/* begin file simdjson/westmere/stringparsing_defs.h */ +#ifndef SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H +#define SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H + +/* including simdjson/westmere/bitmanipulation.h: #include "simdjson/westmere/bitmanipulation.h" */ +/* begin file simdjson/westmere/bitmanipulation.h */ +#ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H +#define SIMDJSON_WESTMERE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMANIPULATION_H +/* end file simdjson/westmere/bitmanipulation.h */ +/* including simdjson/westmere/simd.h: #include "simdjson/westmere/simd.h" */ +/* begin file simdjson/westmere/simd.h */ +#ifndef SIMDJSON_WESTMERE_SIMD_H +#define SIMDJSON_WESTMERE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace simd { + + template + struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i&() const { return this->value; } + simdjson_inline operator __m128i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm_or_si128(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm_and_si128(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm_xor_si128(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm_andnot_si128(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + template> + struct base8: base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm_alignr_epi8(*this, prev_chunk, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm_testz_si128(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm_setzero_si128(); } + static simdjson_inline simd8 load(const T values[16]) { + return _mm_loadu_si128(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { return _mm_storeu_si128(reinterpret_cast<__m128i *>(dst), *this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m128i shufmask = _mm_set_epi64x(thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask + shufmask = + _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m128i pruned = _mm_shuffle_epi8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = _mm_shuffle_epi8(pruned, compactmask); + _mm_storeu_si128(reinterpret_cast<__m128i *>(output), answer); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epu8(*this, other); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm_testz_si128(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm_testz_si128(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm_movemask_epi8(_mm_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "Westmere kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() ); + uint64_t r1 = this->chunks[1].to_bitmask() ; + uint64_t r2 = this->chunks[2].to_bitmask() ; + uint64_t r3 = this->chunks[3].to_bitmask() ; + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_SIMD_INPUT_H +/* end file simdjson/westmere/simd.h */ + +namespace simdjson { +namespace westmere { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + 16); + v0.store(dst); + v1.store(dst + 16); + uint64_t bs_and_quote = simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H +/* end file simdjson/westmere/stringparsing_defs.h */ +/* end file simdjson/westmere/begin.h */ +/* including generic/amalgamated.h for westmere: #include */ +/* begin file generic/amalgamated.h for westmere */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_SRC_GENERIC_DEPENDENCIES_H) +#error generic/dependencies.h must be included before generic/amalgamated.h! +#endif + +/* including generic/base.h for westmere: #include */ +/* begin file generic/base.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +struct json_character_block; + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_BASE_H +/* end file generic/base.h for westmere */ +/* including generic/dom_parser_implementation.h for westmere: #include */ +/* begin file generic/dom_parser_implementation.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// Interface a dom parser implementation must fulfill +namespace simdjson { +namespace westmere { +namespace { + +simdjson_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3); +simdjson_inline bool is_ascii(const simd8x64& input); + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file generic/dom_parser_implementation.h for westmere */ +/* including generic/json_character_block.h for westmere: #include */ +/* begin file generic/json_character_block.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +struct json_character_block { + static simdjson_inline json_character_block classify(const simd::simd8x64& in); + + simdjson_inline uint64_t whitespace() const noexcept { return _whitespace; } + simdjson_inline uint64_t op() const noexcept { return _op; } + simdjson_inline uint64_t scalar() const noexcept { return ~(op() | whitespace()); } + + uint64_t _whitespace; + uint64_t _op; +}; + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_JSON_CHARACTER_BLOCK_H +/* end file generic/json_character_block.h for westmere */ +/* end file generic/amalgamated.h for westmere */ +/* including generic/stage1/amalgamated.h for westmere: #include */ +/* begin file generic/stage1/amalgamated.h for westmere */ +// Stuff other things depend on +/* including generic/stage1/base.h for westmere: #include */ +/* begin file generic/stage1/base.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace stage1 { + +class bit_indexer; +template +struct buf_block_reader; +struct json_block; +class json_minifier; +class json_scanner; +struct json_string_block; +class json_string_scanner; +class json_structural_indexer; + +} // namespace stage1 + +namespace utf8_validation { +struct utf8_checker; +} // namespace utf8_validation + +using utf8_validation::utf8_checker; + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_BASE_H +/* end file generic/stage1/base.h for westmere */ +/* including generic/stage1/buf_block_reader.h for westmere: #include */ +/* begin file generic/stage1/buf_block_reader.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace westmere { +namespace { +namespace stage1 { + +// Walks through a buffer in block-sized increments, loading the last part with spaces +template +struct buf_block_reader { +public: + simdjson_inline buf_block_reader(const uint8_t *_buf, size_t _len); + simdjson_inline size_t block_index(); + simdjson_inline bool has_full_block() const; + simdjson_inline const uint8_t *full_block() const; + /** + * Get the last block, padded with spaces. + * + * There will always be a last block, with at least 1 byte, unless len == 0 (in which case this + * function fills the buffer with spaces and returns 0. In particular, if len == STEP_SIZE there + * will be 0 full_blocks and 1 remainder block with STEP_SIZE bytes and no spaces for padding. + * + * @return the number of effective characters in the last block. + */ + simdjson_inline size_t get_remainder(uint8_t *dst) const; + simdjson_inline void advance(); +private: + const uint8_t *buf; + const size_t len; + const size_t lenminusstep; + size_t idx; +}; + +// Routines to print masks and text for debugging bitmask operations +simdjson_unused static char * format_input_text_64(const uint8_t *text) { + static char buf[sizeof(simd8x64) + 1]; + for (size_t i=0; i); i++) { + buf[i] = int8_t(text[i]) < ' ' ? '_' : int8_t(text[i]); + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +// Routines to print masks and text for debugging bitmask operations +simdjson_unused static char * format_input_text(const simd8x64& in) { + static char buf[sizeof(simd8x64) + 1]; + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] < ' ') { buf[i] = '_'; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdjson_unused static char * format_input_text(const simd8x64& in, uint64_t mask) { + static char buf[sizeof(simd8x64) + 1]; + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] <= ' ') { buf[i] = '_'; } + if (!(mask & (size_t(1) << i))) { buf[i] = ' '; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdjson_unused static char * format_mask(uint64_t mask) { + static char buf[sizeof(simd8x64) + 1]; + for (size_t i=0; i<64; i++) { + buf[i] = (mask & (size_t(1) << i)) ? 'X' : ' '; + } + buf[64] = '\0'; + return buf; +} + +template +simdjson_inline buf_block_reader::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {} + +template +simdjson_inline size_t buf_block_reader::block_index() { return idx; } + +template +simdjson_inline bool buf_block_reader::has_full_block() const { + return idx < lenminusstep; +} + +template +simdjson_inline const uint8_t *buf_block_reader::full_block() const { + return &buf[idx]; +} + +template +simdjson_inline size_t buf_block_reader::get_remainder(uint8_t *dst) const { + if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers + std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once. + std::memcpy(dst, buf + idx, len - idx); + return len - idx; +} + +template +simdjson_inline void buf_block_reader::advance() { + idx += STEP_SIZE; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_BUF_BLOCK_READER_H +/* end file generic/stage1/buf_block_reader.h for westmere */ +/* including generic/stage1/json_escape_scanner.h for westmere: #include */ +/* begin file generic/stage1/json_escape_scanner.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_ESCAPE_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_ESCAPE_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace stage1 { + +/** + * Scans for escape characters in JSON, taking care with multiple backslashes (\\n vs. \n). + */ +struct json_escape_scanner { + /** The actual escape characters (the backslashes themselves). */ + uint64_t next_is_escaped = 0ULL; + + struct escaped_and_escape { + /** + * Mask of escaped characters. + * + * ``` + * \n \\n \\\n \\\\n \ + * 0100100010100101000 + * n \ \ n \ \ + * ``` + */ + uint64_t escaped; + /** + * Mask of escape characters. + * + * ``` + * \n \\n \\\n \\\\n \ + * 1001000101001010001 + * \ \ \ \ \ \ \ + * ``` + */ + uint64_t escape; + }; + + /** + * Get a mask of both escape and escaped characters (the characters following a backslash). + * + * @param potential_escape A mask of the character that can escape others (but could be + * escaped itself). e.g. block.eq('\\') + */ + simdjson_really_inline escaped_and_escape next(uint64_t backslash) noexcept { + +#if !SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT + if (!backslash) { return {next_escaped_without_backslashes(), 0}; } +#endif + + // | | Mask (shows characters instead of 1's) | Depth | Instructions | + // |--------------------------------|----------------------------------------|-------|---------------------| + // | string | `\\n_\\\n___\\\n___\\\\___\\\\__\\\` | | | + // | | ` even odd even odd odd` | | | + // | potential_escape | ` \ \\\ \\\ \\\\ \\\\ \\\` | 1 | 1 (backslash & ~first_is_escaped) + // | escape_and_terminal_code | ` \n \ \n \ \n \ \ \ \ \ \` | 5 | 5 (next_escape_and_terminal_code()) + // | escaped | `\ \ n \ n \ \ \ \ \ ` X | 6 | 7 (escape_and_terminal_code ^ (potential_escape | first_is_escaped)) + // | escape | ` \ \ \ \ \ \ \ \ \ \` | 6 | 8 (escape_and_terminal_code & backslash) + // | first_is_escaped | `\ ` | 7 (*) | 9 (escape >> 63) () + // (*) this is not needed until the next iteration + uint64_t escape_and_terminal_code = next_escape_and_terminal_code(backslash & ~this->next_is_escaped); + uint64_t escaped = escape_and_terminal_code ^ (backslash | this->next_is_escaped); + uint64_t escape = escape_and_terminal_code & backslash; + this->next_is_escaped = escape >> 63; + return {escaped, escape}; + } + +private: + static constexpr const uint64_t ODD_BITS = 0xAAAAAAAAAAAAAAAAULL; + + simdjson_really_inline uint64_t next_escaped_without_backslashes() noexcept { + uint64_t escaped = this->next_is_escaped; + this->next_is_escaped = 0; + return escaped; + } + + /** + * Returns a mask of the next escape characters (masking out escaped backslashes), along with + * any non-backslash escape codes. + * + * \n \\n \\\n \\\\n returns: + * \n \ \ \n \ \ + * 11 100 1011 10100 + * + * You are expected to mask out the first bit yourself if the previous block had a trailing + * escape. + * + * & the result with potential_escape to get just the escape characters. + * ^ the result with (potential_escape | first_is_escaped) to get escaped characters. + */ + static simdjson_really_inline uint64_t next_escape_and_terminal_code(uint64_t potential_escape) noexcept { + // If we were to just shift and mask out any odd bits, we'd actually get a *half* right answer: + // any even-aligned backslash runs would be correct! Odd-aligned backslash runs would be + // inverted (\\\ would be 010 instead of 101). + // + // ``` + // string: | ____\\\\_\\\\_____ | + // maybe_escaped | ODD | \ \ \ \ | + // even-aligned ^^^ ^^^^ odd-aligned + // ``` + // + // Taking that into account, our basic strategy is: + // + // 1. Use subtraction to produce a mask with 1's for even-aligned runs and 0's for + // odd-aligned runs. + // 2. XOR all odd bits, which masks out the odd bits in even-aligned runs, and brings IN the + // odd bits in odd-aligned runs. + // 3. & with backslash to clean up any stray bits. + // runs are set to 0, and then XORing with "odd": + // + // | | Mask (shows characters instead of 1's) | Instructions | + // |--------------------------------|----------------------------------------|---------------------| + // | string | `\\n_\\\n___\\\n___\\\\___\\\\__\\\` | + // | | ` even odd even odd odd` | + // | maybe_escaped | ` n \\n \\n \\\_ \\\_ \\` X | 1 (potential_escape << 1) + // | maybe_escaped_and_odd | ` \n_ \\n _ \\\n_ _ \\\__ _\\\_ \\\` | 1 (maybe_escaped | odd) + // | even_series_codes_and_odd | ` n_\\\ _ n_ _\\\\ _ _ ` | 1 (maybe_escaped_and_odd - potential_escape) + // | escape_and_terminal_code | ` \n \ \n \ \n \ \ \ \ \ \` | 1 (^ odd) + // + + // Escaped characters are characters following an escape. + uint64_t maybe_escaped = potential_escape << 1; + + // To distinguish odd from even escape sequences, therefore, we turn on any *starting* + // escapes that are on an odd byte. (We actually bring in all odd bits, for speed.) + // - Odd runs of backslashes are 0000, and the code at the end ("n" in \n or \\n) is 1. + // - Odd runs of backslashes are 1111, and the code at the end ("n" in \n or \\n) is 0. + // - All other odd bytes are 1, and even bytes are 0. + uint64_t maybe_escaped_and_odd_bits = maybe_escaped | ODD_BITS; + uint64_t even_series_codes_and_odd_bits = maybe_escaped_and_odd_bits - potential_escape; + + // Now we flip all odd bytes back with xor. This: + // - Makes odd runs of backslashes go from 0000 to 1010 + // - Makes even runs of backslashes go from 1111 to 1010 + // - Sets actually-escaped codes to 1 (the n in \n and \\n: \n = 11, \\n = 100) + // - Resets all other bytes to 0 + return even_series_codes_and_odd_bits ^ ODD_BITS; + } +}; + +} // namespace stage1 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H +/* end file generic/stage1/json_escape_scanner.h for westmere */ +/* including generic/stage1/json_string_scanner.h for westmere: #include */ +/* begin file generic/stage1/json_string_scanner.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace stage1 { + +struct json_string_block { + // We spell out the constructors in the hope of resolving inlining issues with Visual Studio 2017 + simdjson_really_inline json_string_block(uint64_t escaped, uint64_t quote, uint64_t in_string) : + _escaped(escaped), _quote(quote), _in_string(in_string) {} + + // Escaped characters (characters following an escape() character) + simdjson_really_inline uint64_t escaped() const { return _escaped; } + // Real (non-backslashed) quotes + simdjson_really_inline uint64_t quote() const { return _quote; } + // Only characters inside the string (not including the quotes) + simdjson_really_inline uint64_t string_content() const { return _in_string & ~_quote; } + // Return a mask of whether the given characters are inside a string (only works on non-quotes) + simdjson_really_inline uint64_t non_quote_inside_string(uint64_t mask) const { return mask & _in_string; } + // Return a mask of whether the given characters are inside a string (only works on non-quotes) + simdjson_really_inline uint64_t non_quote_outside_string(uint64_t mask) const { return mask & ~_in_string; } + // Tail of string (everything except the start quote) + simdjson_really_inline uint64_t string_tail() const { return _in_string ^ _quote; } + + // escaped characters (backslashed--does not include the hex characters after \u) + uint64_t _escaped; + // real quotes (non-escaped ones) + uint64_t _quote; + // string characters (includes start quote but not end quote) + uint64_t _in_string; +}; + +// Scans blocks for string characters, storing the state necessary to do so +class json_string_scanner { +public: + simdjson_really_inline json_string_block next(const simd::simd8x64& in); + // Returns either UNCLOSED_STRING or SUCCESS + simdjson_really_inline error_code finish(); + +private: + // Scans for escape characters + json_escape_scanner escape_scanner{}; + // Whether the last iteration was still inside a string (all 1's = true, all 0's = false). + uint64_t prev_in_string = 0ULL; +}; + +// +// Return a mask of all string characters plus end quotes. +// +// prev_escaped is overflow saying whether the next character is escaped. +// prev_in_string is overflow saying whether we're still in a string. +// +// Backslash sequences outside of quotes will be detected in stage 2. +// +simdjson_really_inline json_string_block json_string_scanner::next(const simd::simd8x64& in) { + const uint64_t backslash = in.eq('\\'); + const uint64_t escaped = escape_scanner.next(backslash).escaped; + const uint64_t quote = in.eq('"') & ~escaped; + + // + // prefix_xor flips on bits inside the string (and flips off the end quote). + // + // Then we xor with prev_in_string: if we were in a string already, its effect is flipped + // (characters inside strings are outside, and characters outside strings are inside). + // + const uint64_t in_string = prefix_xor(quote) ^ prev_in_string; + + // + // Check if we're still in a string at the end of the box so the next block will know + // + prev_in_string = uint64_t(static_cast(in_string) >> 63); + + // Use ^ to turn the beginning quote off, and the end quote on. + + // We are returning a function-local object so either we get a move constructor + // or we get copy elision. + return json_string_block(escaped, quote, in_string); +} + +simdjson_really_inline error_code json_string_scanner::finish() { + if (prev_in_string) { + return UNCLOSED_STRING; + } + return SUCCESS; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRING_SCANNER_H +/* end file generic/stage1/json_string_scanner.h for westmere */ +/* including generic/stage1/utf8_lookup4_algorithm.h for westmere: #include */ +/* begin file generic/stage1/utf8_lookup4_algorithm.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace utf8_validation { + +using namespace simd; + + simdjson_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) +// Bit 1 = Too Long (ASCII followed by continuation) +// Bit 2 = Overlong 3-byte +// Bit 4 = Surrogate +// Bit 5 = Overlong 2-byte +// Bit 7 = Two Continuations + constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ + // 11______ 11______ + constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ + constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ + constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ + constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ + constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ + constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ + // 11110100 101_____ + // 11110101 1001____ + // 11110101 101_____ + // 1111011_ 1001____ + // 1111011_ 101_____ + // 11111___ 1001____ + // 11111___ 101_____ + constexpr const uint8_t TOO_LARGE_1000 = 1<<6; + // 11110101 1000____ + // 1111011_ 1000____ + // 11111___ 1000____ + constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + + const simd8 byte_1_high = prev1.shr<4>().lookup_16( + // 0_______ ________ + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + // 10______ ________ + TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, + // 1100____ ________ + TOO_SHORT | OVERLONG_2, + // 1101____ ________ + TOO_SHORT, + // 1110____ ________ + TOO_SHORT | OVERLONG_3 | SURROGATE, + // 1111____ ________ + TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + ); + constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . + const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( + // ____0000 ________ + CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, + // ____0001 ________ + CARRY | OVERLONG_2, + // ____001_ ________ + CARRY, + CARRY, + + // ____0100 ________ + CARRY | TOO_LARGE, + // ____0101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____011_ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + + // ____1___ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____1101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000 + ); + const simd8 byte_2_high = input.shr<4>().lookup_16( + // ________ 0_______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + simdjson_inline simd8 check_multibyte_lengths(const simd8 input, + const simd8 prev_input, const simd8 sc) { + simd8 prev2 = input.prev<2>(prev_input); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; + } + + // + // Return nonzero if there are incomplete multibyte characters at the end of the block: + // e.g. if there is a 4-byte character, but it's 3 bytes from the end. + // + simdjson_inline simd8 is_incomplete(const simd8 input) { + // If the previous input's last 3 bytes match this, they're too short (they ended at EOF): + // ... 1111____ 111_____ 11______ +#if SIMDJSON_IMPLEMENTATION_ICELAKE + static const uint8_t max_array[64] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1 + }; +#else + static const uint8_t max_array[32] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0xf0u-1, 0xe0u-1, 0xc0u-1 + }; +#endif + const simd8 max_value(&max_array[sizeof(max_array)-sizeof(simd8)]); + return input.gt_bits(max_value); + } + + struct utf8_checker { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; + // The last input we received + simd8 prev_input_block; + // Whether the last input we received was incomplete (used for ASCII fast path) + simd8 prev_incomplete; + + // + // Check whether the current bytes are valid UTF-8. + // + simdjson_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + simd8 sc = check_special_cases(input, prev1); + this->error |= check_multibyte_lengths(input, prev_input, sc); + } + + // The only problem that can happen at EOF is that a multibyte character is too short + // or a byte value too large in the last bytes: check_special_cases only checks for bytes + // too large in the first of two bytes. + simdjson_inline void check_eof() { + // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't + // possibly finish them. + this->error |= this->prev_incomplete; + } + + simdjson_inline void check_next_input(const simd8x64& input) { + if(simdjson_likely(is_ascii(input))) { + this->error |= this->prev_incomplete; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 1) + ||(simd8x64::NUM_CHUNKS == 2) + || (simd8x64::NUM_CHUNKS == 4), + "We support one, two or four chunks per 64-byte block."); + SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 1) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + } else SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else SIMDJSON_IF_CONSTEXPR (simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + this->prev_incomplete = is_incomplete(input.chunks[simd8x64::NUM_CHUNKS-1]); + this->prev_input_block = input.chunks[simd8x64::NUM_CHUNKS-1]; + } + } + // do not forget to call check_eof! + simdjson_inline error_code errors() { + return this->error.any_bits_set_anywhere() ? error_code::UTF8_ERROR : error_code::SUCCESS; + } + + }; // struct utf8_checker +} // namespace utf8_validation + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_UTF8_LOOKUP4_ALGORITHM_H +/* end file generic/stage1/utf8_lookup4_algorithm.h for westmere */ +/* including generic/stage1/json_scanner.h for westmere: #include */ +/* begin file generic/stage1/json_scanner.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace stage1 { + +/** + * A block of scanned json, with information on operators and scalars. + * + * We seek to identify pseudo-structural characters. Anything that is inside + * a string must be omitted (hence & ~_string.string_tail()). + * Otherwise, pseudo-structural characters come in two forms. + * 1. We have the structural characters ([,],{,},:, comma). The + * term 'structural character' is from the JSON RFC. + * 2. We have the 'scalar pseudo-structural characters'. + * Scalars are quotes, and any character except structural characters and white space. + * + * To identify the scalar pseudo-structural characters, we must look at what comes + * before them: it must be a space, a quote or a structural characters. + * Starting with simdjson v0.3, we identify them by + * negation: we identify everything that is followed by a non-quote scalar, + * and we negate that. Whatever remains must be a 'scalar pseudo-structural character'. + */ +struct json_block { +public: + // We spell out the constructors in the hope of resolving inlining issues with Visual Studio 2017 + simdjson_inline json_block(json_string_block&& string, json_character_block characters, uint64_t follows_potential_nonquote_scalar) : + _string(std::move(string)), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {} + simdjson_inline json_block(json_string_block string, json_character_block characters, uint64_t follows_potential_nonquote_scalar) : + _string(string), _characters(characters), _follows_potential_nonquote_scalar(follows_potential_nonquote_scalar) {} + + /** + * The start of structurals. + * In simdjson prior to v0.3, these were called the pseudo-structural characters. + **/ + simdjson_inline uint64_t structural_start() const noexcept { return potential_structural_start() & ~_string.string_tail(); } + /** All JSON whitespace (i.e. not in a string) */ + simdjson_inline uint64_t whitespace() const noexcept { return non_quote_outside_string(_characters.whitespace()); } + + // Helpers + + /** Whether the given characters are inside a string (only works on non-quotes) */ + simdjson_inline uint64_t non_quote_inside_string(uint64_t mask) const noexcept { return _string.non_quote_inside_string(mask); } + /** Whether the given characters are outside a string (only works on non-quotes) */ + simdjson_inline uint64_t non_quote_outside_string(uint64_t mask) const noexcept { return _string.non_quote_outside_string(mask); } + + // string and escape characters + json_string_block _string; + // whitespace, structural characters ('operators'), scalars + json_character_block _characters; + // whether the previous character was a scalar + uint64_t _follows_potential_nonquote_scalar; +private: + // Potential structurals (i.e. disregarding strings) + + /** + * structural elements ([,],{,},:, comma) plus scalar starts like 123, true and "abc". + * They may reside inside a string. + **/ + simdjson_inline uint64_t potential_structural_start() const noexcept { return _characters.op() | potential_scalar_start(); } + /** + * The start of non-operator runs, like 123, true and "abc". + * It main reside inside a string. + **/ + simdjson_inline uint64_t potential_scalar_start() const noexcept { + // The term "scalar" refers to anything except structural characters and white space + // (so letters, numbers, quotes). + // Whenever it is preceded by something that is not a structural element ({,},[,],:, ") nor a white-space + // then we know that it is irrelevant structurally. + return _characters.scalar() & ~follows_potential_scalar(); + } + /** + * Whether the given character is immediately after a non-operator like 123, true. + * The characters following a quote are not included. + */ + simdjson_inline uint64_t follows_potential_scalar() const noexcept { + // _follows_potential_nonquote_scalar: is defined as marking any character that follows a character + // that is not a structural element ({,},[,],:, comma) nor a quote (") and that is not a + // white space. + // It is understood that within quoted region, anything at all could be marked (irrelevant). + return _follows_potential_nonquote_scalar; + } +}; + +/** + * Scans JSON for important bits: structural characters or 'operators', strings, and scalars. + * + * The scanner starts by calculating two distinct things: + * - string characters (taking \" into account) + * - structural characters or 'operators' ([]{},:, comma) + * and scalars (runs of non-operators like 123, true and "abc") + * + * To minimize data dependency (a key component of the scanner's speed), it finds these in parallel: + * in particular, the operator/scalar bit will find plenty of things that are actually part of + * strings. When we're done, json_block will fuse the two together by masking out tokens that are + * part of a string. + */ +class json_scanner { +public: + json_scanner() = default; + simdjson_inline json_block next(const simd::simd8x64& in); + // Returns either UNCLOSED_STRING or SUCCESS + simdjson_inline error_code finish(); + +private: + // Whether the last character of the previous iteration is part of a scalar token + // (anything except whitespace or a structural character/'operator'). + uint64_t prev_scalar = 0ULL; + json_string_scanner string_scanner{}; +}; + + +// +// Check if the current character immediately follows a matching character. +// +// For example, this checks for quotes with backslashes in front of them: +// +// const uint64_t backslashed_quote = in.eq('"') & immediately_follows(in.eq('\'), prev_backslash); +// +simdjson_inline uint64_t follows(const uint64_t match, uint64_t &overflow) { + const uint64_t result = match << 1 | overflow; + overflow = match >> 63; + return result; +} + +simdjson_inline json_block json_scanner::next(const simd::simd8x64& in) { + json_string_block strings = string_scanner.next(in); + // identifies the white-space and the structural characters + json_character_block characters = json_character_block::classify(in); + // The term "scalar" refers to anything except structural characters and white space + // (so letters, numbers, quotes). + // We want follows_scalar to mark anything that follows a non-quote scalar (so letters and numbers). + // + // A terminal quote should either be followed by a structural character (comma, brace, bracket, colon) + // or nothing. However, we still want ' "a string"true ' to mark the 't' of 'true' as a potential + // pseudo-structural character just like we would if we had ' "a string" true '; otherwise we + // may need to add an extra check when parsing strings. + // + // Performance: there are many ways to skin this cat. + const uint64_t nonquote_scalar = characters.scalar() & ~strings.quote(); + uint64_t follows_nonquote_scalar = follows(nonquote_scalar, prev_scalar); + // We are returning a function-local object so either we get a move constructor + // or we get copy elision. + return json_block( + strings,// strings is a function-local object so either it moves or the copy is elided. + characters, + follows_nonquote_scalar + ); +} + +simdjson_inline error_code json_scanner::finish() { + return string_scanner.finish(); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_SCANNER_H +/* end file generic/stage1/json_scanner.h for westmere */ + +// All other declarations +/* including generic/stage1/find_next_document_index.h for westmere: #include */ +/* begin file generic/stage1/find_next_document_index.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace stage1 { + +/** + * This algorithm is used to quickly identify the last structural position that + * makes up a complete document. + * + * It does this by going backwards and finding the last *document boundary* (a + * place where one value follows another without a comma between them). If the + * last document (the characters after the boundary) has an equal number of + * start and end brackets, it is considered complete. + * + * Simply put, we iterate over the structural characters, starting from + * the end. We consider that we found the end of a JSON document when the + * first element of the pair is NOT one of these characters: '{' '[' ':' ',' + * and when the second element is NOT one of these characters: '}' ']' ':' ','. + * + * This simple comparison works most of the time, but it does not cover cases + * where the batch's structural indexes contain a perfect amount of documents. + * In such a case, we do not have access to the structural index which follows + * the last document, therefore, we do not have access to the second element in + * the pair, and that means we cannot identify the last document. To fix this + * issue, we keep a count of the open and closed curly/square braces we found + * while searching for the pair. When we find a pair AND the count of open and + * closed curly/square braces is the same, we know that we just passed a + * complete document, therefore the last json buffer location is the end of the + * batch. + */ +simdjson_inline uint32_t find_next_document_index(dom_parser_implementation &parser) { + // Variant: do not count separately, just figure out depth + if(parser.n_structural_indexes == 0) { return 0; } + auto arr_cnt = 0; + auto obj_cnt = 0; + for (auto i = parser.n_structural_indexes - 1; i > 0; i--) { + auto idxb = parser.structural_indexes[i]; + switch (parser.buf[idxb]) { + case ':': + case ',': + continue; + case '}': + obj_cnt--; + continue; + case ']': + arr_cnt--; + continue; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + auto idxa = parser.structural_indexes[i - 1]; + switch (parser.buf[idxa]) { + case '{': + case '[': + case ':': + case ',': + continue; + } + // Last document is complete, so the next document will appear after! + if (!arr_cnt && !obj_cnt) { + return parser.n_structural_indexes; + } + // Last document is incomplete; mark the document at i + 1 as the next one + return i; + } + // If we made it to the end, we want to finish counting to see if we have a full document. + switch (parser.buf[parser.structural_indexes[0]]) { + case '}': + obj_cnt--; + break; + case ']': + arr_cnt--; + break; + case '{': + obj_cnt++; + break; + case '[': + arr_cnt++; + break; + } + if (!arr_cnt && !obj_cnt) { + // We have a complete document. + return parser.n_structural_indexes; + } + return 0; +} + +} // namespace stage1 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_FIND_NEXT_DOCUMENT_INDEX_H +/* end file generic/stage1/find_next_document_index.h for westmere */ +/* including generic/stage1/json_minifier.h for westmere: #include */ +/* begin file generic/stage1/json_minifier.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses in stage1 +// It is intended to be included multiple times and compiled multiple times +// We assume the file in which it is included already includes +// "simdjson/stage1.h" (this simplifies amalgation) + +namespace simdjson { +namespace westmere { +namespace { +namespace stage1 { + +class json_minifier { +public: + template + static error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept; + +private: + simdjson_inline json_minifier(uint8_t *_dst) + : dst{_dst} + {} + template + simdjson_inline void step(const uint8_t *block_buf, buf_block_reader &reader) noexcept; + simdjson_inline void next(const simd::simd8x64& in, const json_block& block); + simdjson_inline error_code finish(uint8_t *dst_start, size_t &dst_len); + json_scanner scanner{}; + uint8_t *dst; +}; + +simdjson_inline void json_minifier::next(const simd::simd8x64& in, const json_block& block) { + uint64_t mask = block.whitespace(); + dst += in.compress(mask, dst); +} + +simdjson_inline error_code json_minifier::finish(uint8_t *dst_start, size_t &dst_len) { + error_code error = scanner.finish(); + if (error) { dst_len = 0; return error; } + dst_len = dst - dst_start; + return SUCCESS; +} + +template<> +simdjson_inline void json_minifier::step<128>(const uint8_t *block_buf, buf_block_reader<128> &reader) noexcept { + simd::simd8x64 in_1(block_buf); + simd::simd8x64 in_2(block_buf+64); + json_block block_1 = scanner.next(in_1); + json_block block_2 = scanner.next(in_2); + this->next(in_1, block_1); + this->next(in_2, block_2); + reader.advance(); +} + +template<> +simdjson_inline void json_minifier::step<64>(const uint8_t *block_buf, buf_block_reader<64> &reader) noexcept { + simd::simd8x64 in_1(block_buf); + json_block block_1 = scanner.next(in_1); + this->next(block_buf, block_1); + reader.advance(); +} + +template +error_code json_minifier::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) noexcept { + buf_block_reader reader(buf, len); + json_minifier minifier(dst); + + // Index the first n-1 blocks + while (reader.has_full_block()) { + minifier.step(reader.full_block(), reader); + } + + // Index the last (remainder) block, padded with spaces + uint8_t block[STEP_SIZE]; + size_t remaining_bytes = reader.get_remainder(block); + if (remaining_bytes > 0) { + // We do not want to write directly to the output stream. Rather, we write + // to a local buffer (for safety). + uint8_t out_block[STEP_SIZE]; + uint8_t * const guarded_dst{minifier.dst}; + minifier.dst = out_block; + minifier.step(block, reader); + size_t to_write = minifier.dst - out_block; + // In some cases, we could be enticed to consider the padded spaces + // as part of the string. This is fine as long as we do not write more + // than we consumed. + if(to_write > remaining_bytes) { to_write = remaining_bytes; } + memcpy(guarded_dst, out_block, to_write); + minifier.dst = guarded_dst + to_write; + } + return minifier.finish(dst, dst_len); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_MINIFIER_H +/* end file generic/stage1/json_minifier.h for westmere */ +/* including generic/stage1/json_structural_indexer.h for westmere: #include */ +/* begin file generic/stage1/json_structural_indexer.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses in stage1 +// It is intended to be included multiple times and compiled multiple times +// We assume the file in which it is included already includes +// "simdjson/stage1.h" (this simplifies amalgation) + +namespace simdjson { +namespace westmere { +namespace { +namespace stage1 { + +class bit_indexer { +public: + uint32_t *tail; + + simdjson_inline bit_indexer(uint32_t *index_buf) : tail(index_buf) {} + +#if SIMDJSON_PREFER_REVERSE_BITS + /** + * ARM lacks a fast trailing zero instruction, but it has a fast + * bit reversal instruction and a fast leading zero instruction. + * Thus it may be profitable to reverse the bits (once) and then + * to rely on a sequence of instructions that call the leading + * zero instruction. + * + * Performance notes: + * The chosen routine is not optimal in terms of data dependency + * since zero_leading_bit might require two instructions. However, + * it tends to minimize the total number of instructions which is + * beneficial. + */ + simdjson_inline void write_index(uint32_t idx, uint64_t& rev_bits, int i) { + int lz = leading_zeroes(rev_bits); + this->tail[i] = static_cast(idx) + lz; + rev_bits = zero_leading_bit(rev_bits, lz); + } +#else + /** + * Under recent x64 systems, we often have both a fast trailing zero + * instruction and a fast 'clear-lower-bit' instruction so the following + * algorithm can be competitive. + */ + + simdjson_inline void write_index(uint32_t idx, uint64_t& bits, int i) { + this->tail[i] = idx + trailing_zeroes(bits); + bits = clear_lowest_bit(bits); + } +#endif // SIMDJSON_PREFER_REVERSE_BITS + + template + simdjson_inline int write_indexes(uint32_t idx, uint64_t& bits) { + write_index(idx, bits, START); + SIMDJSON_IF_CONSTEXPR (N > 1) { + write_indexes<(N-1>0?START+1:START), (N-1>=0?N-1:1)>(idx, bits); + } + return START+N; + } + + template + simdjson_inline int write_indexes_stepped(uint32_t idx, uint64_t& bits, int cnt) { + write_indexes(idx, bits); + SIMDJSON_IF_CONSTEXPR ((START+STEP) < END) { + if (simdjson_unlikely((START+STEP) < cnt)) { + write_indexes_stepped<(START+STEP(idx, bits, cnt); + } + } + return ((END-START) % STEP) == 0 ? END : (END-START) - ((END-START) % STEP) + STEP; + } + + // flatten out values in 'bits' assuming that they are are to have values of idx + // plus their position in the bitvector, and store these indexes at + // base_ptr[base] incrementing base as we go + // will potentially store extra values beyond end of valid bits, so base_ptr + // needs to be large enough to handle this + // + // If the kernel sets SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER, then it + // will provide its own version of the code. +#ifdef SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + simdjson_inline void write(uint32_t idx, uint64_t bits); +#else + simdjson_inline void write(uint32_t idx, uint64_t bits) { + // In some instances, the next branch is expensive because it is mispredicted. + // Unfortunately, in other cases, + // it helps tremendously. + if (bits == 0) + return; + + int cnt = static_cast(count_ones(bits)); + +#if SIMDJSON_PREFER_REVERSE_BITS + bits = reverse_bits(bits); +#endif +#ifdef SIMDJSON_STRUCTURAL_INDEXER_STEP + static constexpr const int STEP = SIMDJSON_STRUCTURAL_INDEXER_STEP; +#else + static constexpr const int STEP = 4; +#endif + static constexpr const int STEP_UNTIL = 24; + + write_indexes_stepped<0, STEP_UNTIL, STEP>(idx, bits, cnt); + SIMDJSON_IF_CONSTEXPR (STEP_UNTIL < 64) { + if (simdjson_unlikely(STEP_UNTIL < cnt)) { + for (int i=STEP_UNTIL; itail += cnt; + } +#endif // SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +}; + +class json_structural_indexer { +public: + /** + * Find the important bits of JSON in a 128-byte chunk, and add them to structural_indexes. + * + * @param partial Setting the partial parameter to true allows the find_structural_bits to + * tolerate unclosed strings. The caller should still ensure that the input is valid UTF-8. If + * you are processing substrings, you may want to call on a function like trimmed_length_safe_utf8. + */ + template + static error_code index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept; + +private: + simdjson_inline json_structural_indexer(uint32_t *structural_indexes); + template + simdjson_inline void step(const uint8_t *block, buf_block_reader &reader) noexcept; + simdjson_inline void next(const simd::simd8x64& in, const json_block& block, size_t idx); + simdjson_inline error_code finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial); + + json_scanner scanner{}; + utf8_checker checker{}; + bit_indexer indexer; + uint64_t prev_structurals = 0; + uint64_t unescaped_chars_error = 0; +}; + +simdjson_inline json_structural_indexer::json_structural_indexer(uint32_t *structural_indexes) : indexer{structural_indexes} {} + +// Skip the last character if it is partial +simdjson_inline size_t trim_partial_utf8(const uint8_t *buf, size_t len) { + if (simdjson_unlikely(len < 3)) { + switch (len) { + case 2: + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (buf[len-2] >= 0xe0) { return len-2; } // 3- and 4-byte characters with only 2 bytes left + return len; + case 1: + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + return len; + case 0: + return len; + } + } + if (buf[len-1] >= 0xc0) { return len-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (buf[len-2] >= 0xe0) { return len-2; } // 3- and 4-byte characters with only 1 byte left + if (buf[len-3] >= 0xf0) { return len-3; } // 4-byte characters with only 3 bytes left + return len; +} + +// +// PERF NOTES: +// We pipe 2 inputs through these stages: +// 1. Load JSON into registers. This takes a long time and is highly parallelizable, so we load +// 2 inputs' worth at once so that by the time step 2 is looking for them input, it's available. +// 2. Scan the JSON for critical data: strings, scalars and operators. This is the critical path. +// The output of step 1 depends entirely on this information. These functions don't quite use +// up enough CPU: the second half of the functions is highly serial, only using 1 execution core +// at a time. The second input's scans has some dependency on the first ones finishing it, but +// they can make a lot of progress before they need that information. +// 3. Step 1 doesn't use enough capacity, so we run some extra stuff while we're waiting for that +// to finish: utf-8 checks and generating the output from the last iteration. +// +// The reason we run 2 inputs at a time, is steps 2 and 3 are *still* not enough to soak up all +// available capacity with just one input. Running 2 at a time seems to give the CPU a good enough +// workout. +// +template +error_code json_structural_indexer::index(const uint8_t *buf, size_t len, dom_parser_implementation &parser, stage1_mode partial) noexcept { + if (simdjson_unlikely(len > parser.capacity())) { return CAPACITY; } + // We guard the rest of the code so that we can assume that len > 0 throughout. + if (len == 0) { return EMPTY; } + if (is_streaming(partial)) { + len = trim_partial_utf8(buf, len); + // If you end up with an empty window after trimming + // the partial UTF-8 bytes, then chances are good that you + // have an UTF-8 formatting error. + if(len == 0) { return UTF8_ERROR; } + } + buf_block_reader reader(buf, len); + json_structural_indexer indexer(parser.structural_indexes.get()); + + // Read all but the last block + while (reader.has_full_block()) { + indexer.step(reader.full_block(), reader); + } + // Take care of the last block (will always be there unless file is empty which is + // not supposed to happen.) + uint8_t block[STEP_SIZE]; + if (simdjson_unlikely(reader.get_remainder(block) == 0)) { return UNEXPECTED_ERROR; } + indexer.step(block, reader); + return indexer.finish(parser, reader.block_index(), len, partial); +} + +template<> +simdjson_inline void json_structural_indexer::step<128>(const uint8_t *block, buf_block_reader<128> &reader) noexcept { + simd::simd8x64 in_1(block); + simd::simd8x64 in_2(block+64); + json_block block_1 = scanner.next(in_1); + json_block block_2 = scanner.next(in_2); + this->next(in_1, block_1, reader.block_index()); + this->next(in_2, block_2, reader.block_index()+64); + reader.advance(); +} + +template<> +simdjson_inline void json_structural_indexer::step<64>(const uint8_t *block, buf_block_reader<64> &reader) noexcept { + simd::simd8x64 in_1(block); + json_block block_1 = scanner.next(in_1); + this->next(in_1, block_1, reader.block_index()); + reader.advance(); +} + +simdjson_inline void json_structural_indexer::next(const simd::simd8x64& in, const json_block& block, size_t idx) { + uint64_t unescaped = in.lteq(0x1F); +#if SIMDJSON_UTF8VALIDATION + checker.check_next_input(in); +#endif + indexer.write(uint32_t(idx-64), prev_structurals); // Output *last* iteration's structurals to the parser + prev_structurals = block.structural_start(); + unescaped_chars_error |= block.non_quote_inside_string(unescaped); +} + +simdjson_inline error_code json_structural_indexer::finish(dom_parser_implementation &parser, size_t idx, size_t len, stage1_mode partial) { + // Write out the final iteration's structurals + indexer.write(uint32_t(idx-64), prev_structurals); + error_code error = scanner.finish(); + // We deliberately break down the next expression so that it is + // human readable. + const bool should_we_exit = is_streaming(partial) ? + ((error != SUCCESS) && (error != UNCLOSED_STRING)) // when partial we tolerate UNCLOSED_STRING + : (error != SUCCESS); // if partial is false, we must have SUCCESS + const bool have_unclosed_string = (error == UNCLOSED_STRING); + if (simdjson_unlikely(should_we_exit)) { return error; } + + if (unescaped_chars_error) { + return UNESCAPED_CHARS; + } + parser.n_structural_indexes = uint32_t(indexer.tail - parser.structural_indexes.get()); + /*** + * The On Demand API requires special padding. + * + * This is related to https://github.com/simdjson/simdjson/issues/906 + * Basically, we want to make sure that if the parsing continues beyond the last (valid) + * structural character, it quickly stops. + * Only three structural characters can be repeated without triggering an error in JSON: [,] and }. + * We repeat the padding character (at 'len'). We don't know what it is, but if the parsing + * continues, then it must be [,] or }. + * Suppose it is ] or }. We backtrack to the first character, what could it be that would + * not trigger an error? It could be ] or } but no, because you can't start a document that way. + * It can't be a comma, a colon or any simple value. So the only way we could continue is + * if the repeated character is [. But if so, the document must start with [. But if the document + * starts with [, it should end with ]. If we enforce that rule, then we would get + * ][[ which is invalid. + * + * This is illustrated with the test array_iterate_unclosed_error() on the following input: + * R"({ "a": [,,)" + **/ + parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); // used later in partial == stage1_mode::streaming_final + parser.structural_indexes[parser.n_structural_indexes + 1] = uint32_t(len); + parser.structural_indexes[parser.n_structural_indexes + 2] = 0; + parser.next_structural_index = 0; + // a valid JSON file cannot have zero structural indexes - we should have found something + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { + return EMPTY; + } + if (simdjson_unlikely(parser.structural_indexes[parser.n_structural_indexes - 1] > len)) { + return UNEXPECTED_ERROR; + } + if (partial == stage1_mode::streaming_partial) { + // If we have an unclosed string, then the last structural + // will be the quote and we want to make sure to omit it. + if(have_unclosed_string) { + parser.n_structural_indexes--; + // a valid JSON file cannot have zero structural indexes - we should have found something + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { return CAPACITY; } + } + // We truncate the input to the end of the last complete document (or zero). + auto new_structural_indexes = find_next_document_index(parser); + if (new_structural_indexes == 0 && parser.n_structural_indexes > 0) { + if(parser.structural_indexes[0] == 0) { + // If the buffer is partial and we started at index 0 but the document is + // incomplete, it's too big to parse. + return CAPACITY; + } else { + // It is possible that the document could be parsed, we just had a lot + // of white space. + parser.n_structural_indexes = 0; + return EMPTY; + } + } + + parser.n_structural_indexes = new_structural_indexes; + } else if (partial == stage1_mode::streaming_final) { + if(have_unclosed_string) { parser.n_structural_indexes--; } + // We truncate the input to the end of the last complete document (or zero). + // Because partial == stage1_mode::streaming_final, it means that we may + // silently ignore trailing garbage. Though it sounds bad, we do it + // deliberately because many people who have streams of JSON documents + // will truncate them for processing. E.g., imagine that you are uncompressing + // the data from a size file or receiving it in chunks from the network. You + // may not know where exactly the last document will be. Meanwhile the + // document_stream instances allow people to know the JSON documents they are + // parsing (see the iterator.source() method). + parser.n_structural_indexes = find_next_document_index(parser); + // We store the initial n_structural_indexes so that the client can see + // whether we used truncation. If initial_n_structural_indexes == parser.n_structural_indexes, + // then this will query parser.structural_indexes[parser.n_structural_indexes] which is len, + // otherwise, it will copy some prior index. + parser.structural_indexes[parser.n_structural_indexes + 1] = parser.structural_indexes[parser.n_structural_indexes]; + // This next line is critical, do not change it unless you understand what you are + // doing. + parser.structural_indexes[parser.n_structural_indexes] = uint32_t(len); + if (simdjson_unlikely(parser.n_structural_indexes == 0u)) { + // We tolerate an unclosed string at the very end of the stream. Indeed, users + // often load their data in bulk without being careful and they want us to ignore + // the trailing garbage. + return EMPTY; + } + } + checker.check_eof(); + return checker.errors(); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +// Clear CUSTOM_BIT_INDEXER so other implementations can set it if they need to. +#undef SIMDJSON_GENERIC_JSON_STRUCTURAL_INDEXER_CUSTOM_BIT_INDEXER + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_JSON_STRUCTURAL_INDEXER_H +/* end file generic/stage1/json_structural_indexer.h for westmere */ +/* including generic/stage1/utf8_validator.h for westmere: #include */ +/* begin file generic/stage1/utf8_validator.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace stage1 { + +/** + * Validates that the string is actual UTF-8. + */ +template +bool generic_validate_utf8(const uint8_t * input, size_t length) { + checker c{}; + buf_block_reader<64> reader(input, length); + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + c.check_next_input(in); + reader.advance(); + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + c.check_next_input(in); + reader.advance(); + c.check_eof(); + return c.errors() == error_code::SUCCESS; +} + +bool generic_validate_utf8(const char * input, size_t length) { + return generic_validate_utf8(reinterpret_cast(input),length); +} + +} // namespace stage1 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE1_UTF8_VALIDATOR_H +/* end file generic/stage1/utf8_validator.h for westmere */ +/* end file generic/stage1/amalgamated.h for westmere */ +/* including generic/stage2/amalgamated.h for westmere: #include */ +/* begin file generic/stage2/amalgamated.h for westmere */ +// Stuff other things depend on +/* including generic/stage2/base.h for westmere: #include */ +/* begin file generic/stage2/base.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_BASE_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace stage2 { + +class json_iterator; +class structural_iterator; +struct tape_builder; +struct tape_writer; + +} // namespace stage2 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_BASE_H +/* end file generic/stage2/base.h for westmere */ +/* including generic/stage2/tape_writer.h for westmere: #include */ +/* begin file generic/stage2/tape_writer.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace westmere { +namespace { +namespace stage2 { + +struct tape_writer { + /** The next place to write to tape */ + uint64_t *next_tape_loc; + + /** Write a signed 64-bit value to tape. */ + simdjson_inline void append_s64(int64_t value) noexcept; + + /** Write an unsigned 64-bit value to tape. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + + /** Write a double value to tape. */ + simdjson_inline void append_double(double value) noexcept; + + /** + * Append a tape entry (an 8-bit type,and 56 bits worth of value). + */ + simdjson_inline void append(uint64_t val, internal::tape_type t) noexcept; + + /** + * Skip the current tape entry without writing. + * + * Used to skip the start of the container, since we'll come back later to fill it in when the + * container ends. + */ + simdjson_inline void skip() noexcept; + + /** + * Skip the number of tape entries necessary to write a large u64 or i64. + */ + simdjson_inline void skip_large_integer() noexcept; + + /** + * Skip the number of tape entries necessary to write a double. + */ + simdjson_inline void skip_double() noexcept; + + /** + * Write a value to a known location on tape. + * + * Used to go back and write out the start of a container after the container ends. + */ + simdjson_inline static void write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept; + +private: + /** + * Append both the tape entry, and a supplementary value following it. Used for types that need + * all 64 bits, such as double and uint64_t. + */ + template + simdjson_inline void append2(uint64_t val, T val2, internal::tape_type t) noexcept; +}; // struct tape_writer + +simdjson_inline void tape_writer::append_s64(int64_t value) noexcept { + append2(0, value, internal::tape_type::INT64); +} + +simdjson_inline void tape_writer::append_u64(uint64_t value) noexcept { + append(0, internal::tape_type::UINT64); + *next_tape_loc = value; + next_tape_loc++; +} + +/** Write a double value to tape. */ +simdjson_inline void tape_writer::append_double(double value) noexcept { + append2(0, value, internal::tape_type::DOUBLE); +} + +simdjson_inline void tape_writer::skip() noexcept { + next_tape_loc++; +} + +simdjson_inline void tape_writer::skip_large_integer() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::skip_double() noexcept { + next_tape_loc += 2; +} + +simdjson_inline void tape_writer::append(uint64_t val, internal::tape_type t) noexcept { + *next_tape_loc = val | ((uint64_t(char(t))) << 56); + next_tape_loc++; +} + +template +simdjson_inline void tape_writer::append2(uint64_t val, T val2, internal::tape_type t) noexcept { + append(val, t); + static_assert(sizeof(val2) == sizeof(*next_tape_loc), "Type is not 64 bits!"); + memcpy(next_tape_loc, &val2, sizeof(val2)); + next_tape_loc++; +} + +simdjson_inline void tape_writer::write(uint64_t &tape_loc, uint64_t val, internal::tape_type t) noexcept { + tape_loc = val | ((uint64_t(char(t))) << 56); +} + +} // namespace stage2 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_WRITER_H +/* end file generic/stage2/tape_writer.h for westmere */ +/* including generic/stage2/logger.h for westmere: #include */ +/* begin file generic/stage2/logger.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_LOGGER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + + +// This is for an internal-only stage 2 specific logger. +// Set LOG_ENABLED = true to log what stage 2 is doing! +namespace simdjson { +namespace westmere { +namespace { +namespace logger { + + static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + static constexpr const int LOG_EVENT_LEN = 20; + static constexpr const int LOG_BUFFER_LEN = 30; + static constexpr const int LOG_SMALL_BUFFER_LEN = 10; + static constexpr const int LOG_INDEX_LEN = 5; + + static int log_depth; // Not threadsafe. Log only. + + // Helper to turn unprintable or newline characters into spaces + static simdjson_inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } + } + + // Print the header and set up log_start + static simdjson_inline void log_start() { + if (LOG_ENABLED) { + log_depth = 0; + printf("\n"); + printf("| %-*s | %-*s | %-*s | %-*s | Detail |\n", LOG_EVENT_LEN, "Event", LOG_BUFFER_LEN, "Buffer", LOG_SMALL_BUFFER_LEN, "Next", 5, "Next#"); + printf("|%.*s|%.*s|%.*s|%.*s|--------|\n", LOG_EVENT_LEN+2, DASHES, LOG_BUFFER_LEN+2, DASHES, LOG_SMALL_BUFFER_LEN+2, DASHES, 5+2, DASHES); + } + } + + simdjson_unused static simdjson_inline void log_string(const char *message) { + if (LOG_ENABLED) { + printf("%s\n", message); + } + } + + // Logs a single line from the stage 2 DOM parser + template + static simdjson_inline void log_line(S &structurals, const char *title_prefix, const char *title, const char *detail) { + if (LOG_ENABLED) { + printf("| %*s%s%-*s ", log_depth*2, "", title_prefix, LOG_EVENT_LEN - log_depth*2 - int(strlen(title_prefix)), title); + auto current_index = structurals.at_beginning() ? nullptr : structurals.next_structural-1; + auto next_index = structurals.next_structural; + auto current = current_index ? &structurals.buf[*current_index] : reinterpret_cast(" "); + auto next = &structurals.buf[*next_index]; + { + // Print the next N characters in the buffer. + printf("| "); + // Otherwise, print the characters starting from the buffer position. + // Print spaces for unprintable or newline characters. + for (int i=0;i */ +/* begin file generic/stage2/json_iterator.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace stage2 { + +class json_iterator { +public: + const uint8_t* const buf; + uint32_t *next_structural; + dom_parser_implementation &dom_parser; + uint32_t depth{0}; + + /** + * Walk the JSON document. + * + * The visitor receives callbacks when values are encountered. All callbacks pass the iterator as + * the first parameter; some callbacks have other parameters as well: + * + * - visit_document_start() - at the beginning. + * - visit_document_end() - at the end (if things were successful). + * + * - visit_array_start() - at the start `[` of a non-empty array. + * - visit_array_end() - at the end `]` of a non-empty array. + * - visit_empty_array() - when an empty array is encountered. + * + * - visit_object_end() - at the start `]` of a non-empty object. + * - visit_object_start() - at the end `]` of a non-empty object. + * - visit_empty_object() - when an empty object is encountered. + * - visit_key(const uint8_t *key) - when a key in an object field is encountered. key is + * guaranteed to point at the first quote of the string (`"key"`). + * - visit_primitive(const uint8_t *value) - when a value is a string, number, boolean or null. + * - visit_root_primitive(iter, uint8_t *value) - when the top-level value is a string, number, boolean or null. + * + * - increment_count(iter) - each time a value is found in an array or object. + */ + template + simdjson_warn_unused simdjson_inline error_code walk_document(V &visitor) noexcept; + + /** + * Create an iterator capable of walking a JSON document. + * + * The document must have already passed through stage 1. + */ + simdjson_inline json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index); + + /** + * Look at the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *peek() const noexcept; + /** + * Advance to the next token. + * + * Tokens can be strings, numbers, booleans, null, or operators (`[{]},:`)). + * + * They may include invalid JSON as well (such as `1.2.3` or `ture`). + */ + simdjson_inline const uint8_t *advance() noexcept; + /** + * Get the remaining length of the document, from the start of the current token. + */ + simdjson_inline size_t remaining_len() const noexcept; + /** + * Check if we are at the end of the document. + * + * If this is true, there are no more tokens. + */ + simdjson_inline bool at_eof() const noexcept; + /** + * Check if we are at the beginning of the document. + */ + simdjson_inline bool at_beginning() const noexcept; + simdjson_inline uint8_t last_structural() const noexcept; + + /** + * Log that a value has been found. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_value(const char *type) const noexcept; + /** + * Log the start of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_start_value(const char *type) const noexcept; + /** + * Log the end of a multipart value. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_end_value(const char *type) const noexcept; + /** + * Log an error. + * + * Set LOG_ENABLED=true in logger.h to see logging. + */ + simdjson_inline void log_error(const char *error) const noexcept; + + template + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(V &visitor, const uint8_t *value) noexcept; + template + simdjson_warn_unused simdjson_inline error_code visit_primitive(V &visitor, const uint8_t *value) noexcept; +}; + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::walk_document(V &visitor) noexcept { + logger::log_start(); + + // + // Start the document + // + if (at_eof()) { return EMPTY; } + log_start_value("document"); + SIMDJSON_TRY( visitor.visit_document_start(*this) ); + + // + // Read first value + // + { + auto value = advance(); + + // Make sure the outer object or array is closed before continuing; otherwise, there are ways we + // could get into memory corruption. See https://github.com/simdjson/simdjson/issues/906 + if (!STREAMING) { + switch (*value) { + case '{': if (last_structural() != '}') { log_value("starting brace unmatched"); return TAPE_ERROR; }; break; + case '[': if (last_structural() != ']') { log_value("starting bracket unmatched"); return TAPE_ERROR; }; break; + } + } + + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_root_primitive(*this, value) ); break; + } + } + goto document_end; + +// +// Object parser states +// +object_begin: + log_start_value("object"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = false; + SIMDJSON_TRY( visitor.visit_object_start(*this) ); + + { + auto key = advance(); + if (*key != '"') { log_error("Object does not start with a key"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.increment_count(*this) ); + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + +object_field: + if (simdjson_unlikely( *advance() != ':' )) { log_error("Missing colon after key in object"); return TAPE_ERROR; } + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +object_continue: + switch (*advance()) { + case ',': + SIMDJSON_TRY( visitor.increment_count(*this) ); + { + auto key = advance(); + if (simdjson_unlikely( *key != '"' )) { log_error("Key string missing at beginning of field in object"); return TAPE_ERROR; } + SIMDJSON_TRY( visitor.visit_key(*this, key) ); + } + goto object_field; + case '}': log_end_value("object"); SIMDJSON_TRY( visitor.visit_object_end(*this) ); goto scope_end; + default: log_error("No comma between object fields"); return TAPE_ERROR; + } + +scope_end: + depth--; + if (depth == 0) { goto document_end; } + if (dom_parser.is_array[depth]) { goto array_continue; } + goto object_continue; + +// +// Array parser states +// +array_begin: + log_start_value("array"); + depth++; + if (depth >= dom_parser.max_depth()) { log_error("Exceeded max depth!"); return DEPTH_ERROR; } + dom_parser.is_array[depth] = true; + SIMDJSON_TRY( visitor.visit_array_start(*this) ); + SIMDJSON_TRY( visitor.increment_count(*this) ); + +array_value: + { + auto value = advance(); + switch (*value) { + case '{': if (*peek() == '}') { advance(); log_value("empty object"); SIMDJSON_TRY( visitor.visit_empty_object(*this) ); break; } goto object_begin; + case '[': if (*peek() == ']') { advance(); log_value("empty array"); SIMDJSON_TRY( visitor.visit_empty_array(*this) ); break; } goto array_begin; + default: SIMDJSON_TRY( visitor.visit_primitive(*this, value) ); break; + } + } + +array_continue: + switch (*advance()) { + case ',': SIMDJSON_TRY( visitor.increment_count(*this) ); goto array_value; + case ']': log_end_value("array"); SIMDJSON_TRY( visitor.visit_array_end(*this) ); goto scope_end; + default: log_error("Missing comma between array values"); return TAPE_ERROR; + } + +document_end: + log_end_value("document"); + SIMDJSON_TRY( visitor.visit_document_end(*this) ); + + dom_parser.next_structural_index = uint32_t(next_structural - &dom_parser.structural_indexes[0]); + + // If we didn't make it to the end, it's an error + if ( !STREAMING && dom_parser.next_structural_index != dom_parser.n_structural_indexes ) { + log_error("More than one JSON value at the root of the document, or extra characters at the end of the JSON!"); + return TAPE_ERROR; + } + + return SUCCESS; + +} // walk_document() + +simdjson_inline json_iterator::json_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index) + : buf{_dom_parser.buf}, + next_structural{&_dom_parser.structural_indexes[start_structural_index]}, + dom_parser{_dom_parser} { +} + +simdjson_inline const uint8_t *json_iterator::peek() const noexcept { + return &buf[*(next_structural)]; +} +simdjson_inline const uint8_t *json_iterator::advance() noexcept { + return &buf[*(next_structural++)]; +} +simdjson_inline size_t json_iterator::remaining_len() const noexcept { + return dom_parser.len - *(next_structural-1); +} + +simdjson_inline bool json_iterator::at_eof() const noexcept { + return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes]; +} +simdjson_inline bool json_iterator::at_beginning() const noexcept { + return next_structural == dom_parser.structural_indexes.get(); +} +simdjson_inline uint8_t json_iterator::last_structural() const noexcept { + return buf[dom_parser.structural_indexes[dom_parser.n_structural_indexes - 1]]; +} + +simdjson_inline void json_iterator::log_value(const char *type) const noexcept { + logger::log_line(*this, "", type, ""); +} + +simdjson_inline void json_iterator::log_start_value(const char *type) const noexcept { + logger::log_line(*this, "+", type, ""); + if (logger::LOG_ENABLED) { logger::log_depth++; } +} + +simdjson_inline void json_iterator::log_end_value(const char *type) const noexcept { + if (logger::LOG_ENABLED) { logger::log_depth--; } + logger::log_line(*this, "-", type, ""); +} + +simdjson_inline void json_iterator::log_error(const char *error) const noexcept { + logger::log_line(*this, "", "ERROR", error); +} + +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_root_primitive(V &visitor, const uint8_t *value) noexcept { + switch (*value) { + case '"': return visitor.visit_root_string(*this, value); + case 't': return visitor.visit_root_true_atom(*this, value); + case 'f': return visitor.visit_root_false_atom(*this, value); + case 'n': return visitor.visit_root_null_atom(*this, value); + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return visitor.visit_root_number(*this, value); + default: + log_error("Document starts with a non-value character"); + return TAPE_ERROR; + } +} +template +simdjson_warn_unused simdjson_inline error_code json_iterator::visit_primitive(V &visitor, const uint8_t *value) noexcept { + // Use the fact that most scalars are going to be either strings or numbers. + if(*value == '"') { + return visitor.visit_string(*this, value); + } else if (((*value - '0') < 10) || (*value == '-')) { + return visitor.visit_number(*this, value); + } + // true, false, null are uncommon. + switch (*value) { + case 't': return visitor.visit_true_atom(*this, value); + case 'f': return visitor.visit_false_atom(*this, value); + case 'n': return visitor.visit_null_atom(*this, value); + default: + log_error("Non-value found when value was expected!"); + return TAPE_ERROR; + } +} + +} // namespace stage2 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_JSON_ITERATOR_H +/* end file generic/stage2/json_iterator.h for westmere */ +/* including generic/stage2/stringparsing.h for westmere: #include */ +/* begin file generic/stage2/stringparsing.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This file contains the common code every implementation uses +// It is intended to be included multiple times and compiled multiple times + +namespace simdjson { +namespace westmere { +namespace { +/// @private +namespace stringparsing { + +// begin copypasta +// These chars yield themselves: " \ / +// b -> backspace, f -> formfeed, n -> newline, r -> cr, t -> horizontal tab +// u not handled in this table as it's complex +static const uint8_t escape_map[256] = { + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x0. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0x22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x2f, + 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, 0, 0, 0, 0, // 0x4. + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0x5c, 0, 0, 0, // 0x5. + 0, 0, 0x08, 0, 0, 0, 0x0c, 0, 0, 0, 0, 0, 0, 0, 0x0a, 0, // 0x6. + 0, 0, 0x0d, 0, 0x09, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 0x7. + + 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, 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, 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, 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, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, +}; + +// handle a unicode codepoint +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint(const uint8_t **src_ptr, + uint8_t **dst_ptr, bool allow_replacement) { + // Use the default Unicode Character 'REPLACEMENT CHARACTER' (U+FFFD) + constexpr uint32_t substitution_code_point = 0xfffd; + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) != ((static_cast ('\\') << 8) | static_cast ('u'))) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + + // We have already checked that the high surrogate is valid and + // (code_point - 0xd800) < 1024. + // + // Check that code_point_2 is in the range 0xdc00..0xdfff + // and that code_point_2 was parsed from valid hex. + uint32_t low_bit = code_point_2 - 0xdc00; + if (low_bit >> 10) { + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } else { + code_point = (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + + } + } else if (code_point >= 0xdc00 && code_point <= 0xdfff) { + // If we encounter a low surrogate (not preceded by a high surrogate) + // then we have an error. + if(!allow_replacement) { return false; } + code_point = substitution_code_point; + } + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +// handle a unicode codepoint using the wobbly convention +// https://simonsapin.github.io/wtf-8/ +// write appropriate values into dest +// src will advance 6 bytes or 12 bytes +// dest will advance a variable amount (return via pointer) +// return true if the unicode codepoint was valid +// We work in little-endian then swap at write time +simdjson_warn_unused +simdjson_inline bool handle_unicode_codepoint_wobbly(const uint8_t **src_ptr, + uint8_t **dst_ptr) { + // It is not ideal that this function is nearly identical to handle_unicode_codepoint. + // + // jsoncharutils::hex_to_u32_nocheck fills high 16 bits of the return value with 1s if the + // conversion isn't valid; we defer the check for this to inside the + // multilingual plane check + uint32_t code_point = jsoncharutils::hex_to_u32_nocheck(*src_ptr + 2); + *src_ptr += 6; + // If we found a high surrogate, we must + // check for low surrogate for characters + // outside the Basic + // Multilingual Plane. + if (code_point >= 0xd800 && code_point < 0xdc00) { + const uint8_t *src_data = *src_ptr; + /* Compiler optimizations convert this to a single 16-bit load and compare on most platforms */ + if (((src_data[0] << 8) | src_data[1]) == ((static_cast ('\\') << 8) | static_cast ('u'))) { + uint32_t code_point_2 = jsoncharutils::hex_to_u32_nocheck(src_data + 2); + uint32_t low_bit = code_point_2 - 0xdc00; + if ((low_bit >> 10) == 0) { + code_point = + (((code_point - 0xd800) << 10) | low_bit) + 0x10000; + *src_ptr += 6; + } + } + } + + size_t offset = jsoncharutils::codepoint_to_utf8(code_point, *dst_ptr); + *dst_ptr += offset; + return offset > 0; +} + + +/** + * Unescape a valid UTF-8 string from src to dst, stopping at a final unescaped quote. There + * must be an unescaped quote terminating the string. It returns the final output + * position as pointer. In case of error (e.g., the string has bad escaped codes), + * then null_nullptrptr is returned. It is assumed that the output buffer is large + * enough. E.g., if src points at 'joe"', then dst needs to have four free bytes + + * SIMDJSON_PADDING bytes. + */ +simdjson_warn_unused simdjson_inline uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) { + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint(&src, &dst, allow_replacement)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +simdjson_warn_unused simdjson_inline uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) { + // It is not ideal that this function is nearly identical to parse_string. + while (1) { + // Copy the next n bytes, and find the backslash and quote in them. + auto bs_quote = backslash_and_quote::copy_and_find(src, dst); + // If the next thing is the end quote, copy and return + if (bs_quote.has_quote_first()) { + // we encountered quotes first. Move dst to point to quotes and exit + return dst + bs_quote.quote_index(); + } + if (bs_quote.has_backslash()) { + /* find out where the backspace is */ + auto bs_dist = bs_quote.backslash_index(); + uint8_t escape_char = src[bs_dist + 1]; + /* we encountered backslash first. Handle backslash */ + if (escape_char == 'u') { + /* move src/dst up to the start; they will be further adjusted + within the unicode codepoint handling code. */ + src += bs_dist; + dst += bs_dist; + if (!handle_unicode_codepoint_wobbly(&src, &dst)) { + return nullptr; + } + } else { + /* simple 1:1 conversion. Will eat bs_dist+2 characters in input and + * write bs_dist+1 characters to output + * note this may reach beyond the part of the buffer we've actually + * seen. I think this is ok */ + uint8_t escape_result = escape_map[escape_char]; + if (escape_result == 0u) { + return nullptr; /* bogus escape value is an error */ + } + dst[bs_dist] = escape_result; + src += bs_dist + 2; + dst += bs_dist + 1; + } + } else { + /* they are the same. Since they can't co-occur, it means we + * encountered neither. */ + src += backslash_and_quote::BYTES_PROCESSED; + dst += backslash_and_quote::BYTES_PROCESSED; + } + } +} + +} // namespace stringparsing +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_STRINGPARSING_H +/* end file generic/stage2/stringparsing.h for westmere */ +/* including generic/stage2/structural_iterator.h for westmere: #include */ +/* begin file generic/stage2/structural_iterator.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace stage2 { + +class structural_iterator { +public: + const uint8_t* const buf; + uint32_t *next_structural; + dom_parser_implementation &dom_parser; + + // Start a structural + simdjson_inline structural_iterator(dom_parser_implementation &_dom_parser, size_t start_structural_index) + : buf{_dom_parser.buf}, + next_structural{&_dom_parser.structural_indexes[start_structural_index]}, + dom_parser{_dom_parser} { + } + // Get the buffer position of the current structural character + simdjson_inline const uint8_t* current() { + return &buf[*(next_structural-1)]; + } + // Get the current structural character + simdjson_inline char current_char() { + return buf[*(next_structural-1)]; + } + // Get the next structural character without advancing + simdjson_inline char peek_next_char() { + return buf[*next_structural]; + } + simdjson_inline const uint8_t* peek() { + return &buf[*next_structural]; + } + simdjson_inline const uint8_t* advance() { + return &buf[*(next_structural++)]; + } + simdjson_inline char advance_char() { + return buf[*(next_structural++)]; + } + simdjson_inline size_t remaining_len() { + return dom_parser.len - *(next_structural-1); + } + + simdjson_inline bool at_end() { + return next_structural == &dom_parser.structural_indexes[dom_parser.n_structural_indexes]; + } + simdjson_inline bool at_beginning() { + return next_structural == dom_parser.structural_indexes.get(); + } +}; + +} // namespace stage2 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_STRUCTURAL_ITERATOR_H +/* end file generic/stage2/structural_iterator.h for westmere */ +/* including generic/stage2/tape_builder.h for westmere: #include */ +/* begin file generic/stage2/tape_builder.h for westmere */ +#ifndef SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #include */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace westmere { +namespace { +namespace stage2 { + +struct tape_builder { + template + simdjson_warn_unused static simdjson_inline error_code parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept; + + /** Called when a non-empty document starts. */ + simdjson_warn_unused simdjson_inline error_code visit_document_start(json_iterator &iter) noexcept; + /** Called when a non-empty document ends without error. */ + simdjson_warn_unused simdjson_inline error_code visit_document_end(json_iterator &iter) noexcept; + + /** Called when a non-empty array starts. */ + simdjson_warn_unused simdjson_inline error_code visit_array_start(json_iterator &iter) noexcept; + /** Called when a non-empty array ends. */ + simdjson_warn_unused simdjson_inline error_code visit_array_end(json_iterator &iter) noexcept; + /** Called when an empty array is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_array(json_iterator &iter) noexcept; + + /** Called when a non-empty object starts. */ + simdjson_warn_unused simdjson_inline error_code visit_object_start(json_iterator &iter) noexcept; + /** + * Called when a key in a field is encountered. + * + * primitive, visit_object_start, visit_empty_object, visit_array_start, or visit_empty_array + * will be called after this with the field value. + */ + simdjson_warn_unused simdjson_inline error_code visit_key(json_iterator &iter, const uint8_t *key) noexcept; + /** Called when a non-empty object ends. */ + simdjson_warn_unused simdjson_inline error_code visit_object_end(json_iterator &iter) noexcept; + /** Called when an empty object is found. */ + simdjson_warn_unused simdjson_inline error_code visit_empty_object(json_iterator &iter) noexcept; + + /** + * Called when a string, number, boolean or null is found. + */ + simdjson_warn_unused simdjson_inline error_code visit_primitive(json_iterator &iter, const uint8_t *value) noexcept; + /** + * Called when a string, number, boolean or null is found at the top level of a document (i.e. + * when there is no array or object and the entire document is a single string, number, boolean or + * null. + * + * This is separate from primitive() because simdjson's normal primitive parsing routines assume + * there is at least one more token after the value, which is only true in an array or object. + */ + simdjson_warn_unused simdjson_inline error_code visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_string(json_iterator &iter, const uint8_t *value, bool key = false) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + simdjson_warn_unused simdjson_inline error_code visit_root_string(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_number(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept; + simdjson_warn_unused simdjson_inline error_code visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept; + + /** Called each time a new field or element in an array or object is found. */ + simdjson_warn_unused simdjson_inline error_code increment_count(json_iterator &iter) noexcept; + + /** Next location to write to tape */ + tape_writer tape; +private: + /** Next write location in the string buf for stage 2 parsing */ + uint8_t *current_string_buf_loc; + + simdjson_inline tape_builder(dom::document &doc) noexcept; + + simdjson_inline uint32_t next_tape_index(json_iterator &iter) const noexcept; + simdjson_inline void start_container(json_iterator &iter) noexcept; + simdjson_warn_unused simdjson_inline error_code end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_warn_unused simdjson_inline error_code empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept; + simdjson_inline uint8_t *on_start_string(json_iterator &iter) noexcept; + simdjson_inline void on_end_string(uint8_t *dst) noexcept; +}; // struct tape_builder + +template +simdjson_warn_unused simdjson_inline error_code tape_builder::parse_document( + dom_parser_implementation &dom_parser, + dom::document &doc) noexcept { + dom_parser.doc = &doc; + json_iterator iter(dom_parser, STREAMING ? dom_parser.next_structural_index : 0); + tape_builder builder(doc); + return iter.walk_document(builder); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_root_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_primitive(json_iterator &iter, const uint8_t *value) noexcept { + return iter.visit_primitive(*this, value); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_object(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_empty_array(json_iterator &iter) noexcept { + return empty_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_start(json_iterator &iter) noexcept { + start_container(iter); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_object_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_OBJECT, internal::tape_type::END_OBJECT); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_array_end(json_iterator &iter) noexcept { + return end_container(iter, internal::tape_type::START_ARRAY, internal::tape_type::END_ARRAY); +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_document_end(json_iterator &iter) noexcept { + constexpr uint32_t start_tape_index = 0; + tape.append(start_tape_index, internal::tape_type::ROOT); + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter), internal::tape_type::ROOT); + return SUCCESS; +} +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_key(json_iterator &iter, const uint8_t *key) noexcept { + return visit_string(iter, key, true); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::increment_count(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].count++; // we have a key value pair in the object at parser.dom_parser.depth - 1 + return SUCCESS; +} + +simdjson_inline tape_builder::tape_builder(dom::document &doc) noexcept : tape{doc.tape.get()}, current_string_buf_loc{doc.string_buf.get()} {} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_string(json_iterator &iter, const uint8_t *value, bool key) noexcept { + iter.log_value(key ? "key" : "string"); + uint8_t *dst = on_start_string(iter); + dst = stringparsing::parse_string(value+1, dst, false); // We do not allow replacement when the escape characters are invalid. + if (dst == nullptr) { + iter.log_error("Invalid escape in string"); + return STRING_ERROR; + } + on_end_string(dst); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_string(json_iterator &iter, const uint8_t *value) noexcept { + return visit_string(iter, value); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_number(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("number"); + return numberparsing::parse_number(value, tape); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_number(json_iterator &iter, const uint8_t *value) noexcept { + // + // We need to make a copy to make sure that the string is space terminated. + // This is not about padding the input, which should already padded up + // to len + SIMDJSON_PADDING. However, we have no control at this stage + // on how the padding was done. What if the input string was padded with nulls? + // It is quite common for an input string to have an extra null character (C string). + // We do not want to allow 9\0 (where \0 is the null character) inside a JSON + // document, but the string "9\0" by itself is fine. So we make a copy and + // pad the input with spaces when we know that there is just one input element. + // This copy is relatively expensive, but it will almost never be called in + // practice unless you are in the strange scenario where you have many JSON + // documents made of single atoms. + // + std::unique_ptrcopy(new (std::nothrow) uint8_t[iter.remaining_len() + SIMDJSON_PADDING]); + if (copy.get() == nullptr) { return MEMALLOC; } + std::memcpy(copy.get(), value, iter.remaining_len()); + std::memset(copy.get() + iter.remaining_len(), ' ', SIMDJSON_PADDING); + error_code error = visit_number(iter, copy.get()); + return error; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value)) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_true_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("true"); + if (!atomparsing::is_valid_true_atom(value, iter.remaining_len())) { return T_ATOM_ERROR; } + tape.append(0, internal::tape_type::TRUE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value)) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_false_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("false"); + if (!atomparsing::is_valid_false_atom(value, iter.remaining_len())) { return F_ATOM_ERROR; } + tape.append(0, internal::tape_type::FALSE_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value)) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::visit_root_null_atom(json_iterator &iter, const uint8_t *value) noexcept { + iter.log_value("null"); + if (!atomparsing::is_valid_null_atom(value, iter.remaining_len())) { return N_ATOM_ERROR; } + tape.append(0, internal::tape_type::NULL_VALUE); + return SUCCESS; +} + +// private: + +simdjson_inline uint32_t tape_builder::next_tape_index(json_iterator &iter) const noexcept { + return uint32_t(tape.next_tape_loc - iter.dom_parser.doc->tape.get()); +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::empty_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + auto start_index = next_tape_index(iter); + tape.append(start_index+2, start); + tape.append(start_index, end); + return SUCCESS; +} + +simdjson_inline void tape_builder::start_container(json_iterator &iter) noexcept { + iter.dom_parser.open_containers[iter.depth].tape_index = next_tape_index(iter); + iter.dom_parser.open_containers[iter.depth].count = 0; + tape.skip(); // We don't actually *write* the start element until the end. +} + +simdjson_warn_unused simdjson_inline error_code tape_builder::end_container(json_iterator &iter, internal::tape_type start, internal::tape_type end) noexcept { + // Write the ending tape element, pointing at the start location + const uint32_t start_tape_index = iter.dom_parser.open_containers[iter.depth].tape_index; + tape.append(start_tape_index, end); + // Write the start tape element, pointing at the end location (and including count) + // count can overflow if it exceeds 24 bits... so we saturate + // the convention being that a cnt of 0xffffff or more is undetermined in value (>= 0xffffff). + const uint32_t count = iter.dom_parser.open_containers[iter.depth].count; + const uint32_t cntsat = count > 0xFFFFFF ? 0xFFFFFF : count; + tape_writer::write(iter.dom_parser.doc->tape[start_tape_index], next_tape_index(iter) | (uint64_t(cntsat) << 32), start); + return SUCCESS; +} + +simdjson_inline uint8_t *tape_builder::on_start_string(json_iterator &iter) noexcept { + // we advance the point, accounting for the fact that we have a NULL termination + tape.append(current_string_buf_loc - iter.dom_parser.doc->string_buf.get(), internal::tape_type::STRING); + return current_string_buf_loc + sizeof(uint32_t); +} + +simdjson_inline void tape_builder::on_end_string(uint8_t *dst) noexcept { + uint32_t str_length = uint32_t(dst - (current_string_buf_loc + sizeof(uint32_t))); + // TODO check for overflow in case someone has a crazy string (>=4GB?) + // But only add the overflow check when the document itself exceeds 4GB + // Currently unneeded because we refuse to parse docs larger or equal to 4GB. + memcpy(current_string_buf_loc, &str_length, sizeof(uint32_t)); + // NULL termination is still handy if you expect all your strings to + // be NULL terminated? It comes at a small cost + *dst = 0; + current_string_buf_loc = dst + 1; +} + +} // namespace stage2 +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_SRC_GENERIC_STAGE2_TAPE_BUILDER_H +/* end file generic/stage2/tape_builder.h for westmere */ +/* end file generic/stage2/amalgamated.h for westmere */ + +// +// Stage 1 +// + +namespace simdjson { +namespace westmere { + +simdjson_warn_unused error_code implementation::create_dom_parser_implementation( + size_t capacity, + size_t max_depth, + std::unique_ptr& dst +) const noexcept { + dst.reset( new (std::nothrow) dom_parser_implementation() ); + if (!dst) { return MEMALLOC; } + if (auto err = dst->set_capacity(capacity)) + return err; + if (auto err = dst->set_max_depth(max_depth)) + return err; + return SUCCESS; +} + +namespace { + +using namespace simd; + +simdjson_inline json_character_block json_character_block::classify(const simd::simd8x64& in) { + // These lookups rely on the fact that anything < 127 will match the lower 4 bits, which is why + // we can't use the generic lookup_16. + auto whitespace_table = simd8::repeat_16(' ', 100, 100, 100, 17, 100, 113, 2, 100, '\t', '\n', 112, 100, '\r', 100, 100); + + // The 6 operators (:,[]{}) have these values: + // + // , 2C + // : 3A + // [ 5B + // { 7B + // ] 5D + // } 7D + // + // If you use | 0x20 to turn [ and ] into { and }, the lower 4 bits of each character is unique. + // We exploit this, using a simd 4-bit lookup to tell us which character match against, and then + // match it (against | 0x20). + // + // To prevent recognizing other characters, everything else gets compared with 0, which cannot + // match due to the | 0x20. + // + // NOTE: Due to the | 0x20, this ALSO treats and (control characters 0C and 1A) like , + // and :. This gets caught in stage 2, which checks the actual character to ensure the right + // operators are in the right places. + const auto op_table = simd8::repeat_16( + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, ':', '{', // : = 3A, [ = 5B, { = 7B + ',', '}', 0, 0 // , = 2C, ] = 5D, } = 7D + ); + + // We compute whitespace and op separately. If the code later only use one or the + // other, given the fact that all functions are aggressively inlined, we can + // hope that useless computations will be omitted. This is namely case when + // minifying (we only need whitespace). + + + const uint64_t whitespace = in.eq({ + _mm_shuffle_epi8(whitespace_table, in.chunks[0]), + _mm_shuffle_epi8(whitespace_table, in.chunks[1]), + _mm_shuffle_epi8(whitespace_table, in.chunks[2]), + _mm_shuffle_epi8(whitespace_table, in.chunks[3]) + }); + // Turn [ and ] into { and } + const simd8x64 curlified{ + in.chunks[0] | 0x20, + in.chunks[1] | 0x20, + in.chunks[2] | 0x20, + in.chunks[3] | 0x20 + }; + const uint64_t op = curlified.eq({ + _mm_shuffle_epi8(op_table, in.chunks[0]), + _mm_shuffle_epi8(op_table, in.chunks[1]), + _mm_shuffle_epi8(op_table, in.chunks[2]), + _mm_shuffle_epi8(op_table, in.chunks[3]) + }); + return { whitespace, op }; +} + +simdjson_inline bool is_ascii(const simd8x64& input) { + return input.reduce_or().is_ascii(); +} + +simdjson_unused simdjson_inline simd8 must_be_continuation(const simd8 prev1, const simd8 prev2, const simd8 prev3) { + simd8 is_second_byte = prev1.saturating_sub(0xc0u-1); // Only 11______ will be > 0 + simd8 is_third_byte = prev2.saturating_sub(0xe0u-1); // Only 111_____ will be > 0 + simd8 is_fourth_byte = prev3.saturating_sub(0xf0u-1); // Only 1111____ will be > 0 + // Caller requires a bool (all 1's). All values resulting from the subtraction will be <= 64, so signed comparison is fine. + return simd8(is_second_byte | is_third_byte | is_fourth_byte) > int8_t(0); +} + +simdjson_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3) { + simd8 is_third_byte = prev2.saturating_sub(0xe0u-1); // Only 111_____ will be > 0 + simd8 is_fourth_byte = prev3.saturating_sub(0xf0u-1); // Only 1111____ will be > 0 + // Caller requires a bool (all 1's). All values resulting from the subtraction will be <= 64, so signed comparison is fine. + return simd8(is_third_byte | is_fourth_byte) > int8_t(0); +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +// +// Stage 2 +// + +// +// Implementation-specific overrides +// + +namespace simdjson { +namespace westmere { + +simdjson_warn_unused error_code implementation::minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept { + return westmere::stage1::json_minifier::minify<64>(buf, len, dst, dst_len); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage1(const uint8_t *_buf, size_t _len, stage1_mode streaming) noexcept { + this->buf = _buf; + this->len = _len; + return westmere::stage1::json_structural_indexer::index<64>(_buf, _len, *this, streaming); +} + +simdjson_warn_unused bool implementation::validate_utf8(const char *buf, size_t len) const noexcept { + return westmere::stage1::generic_validate_utf8(buf,len); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage2(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused error_code dom_parser_implementation::stage2_next(dom::document &_doc) noexcept { + return stage2::tape_builder::parse_document(*this, _doc); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_string(const uint8_t *src, uint8_t *dst, bool replacement_char) const noexcept { + return westmere::stringparsing::parse_string(src, dst, replacement_char); +} + +simdjson_warn_unused uint8_t *dom_parser_implementation::parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept { + return westmere::stringparsing::parse_wobbly_string(src, dst); +} + +simdjson_warn_unused error_code dom_parser_implementation::parse(const uint8_t *_buf, size_t _len, dom::document &_doc) noexcept { + auto error = stage1(_buf, _len, stage1_mode::regular); + if (error) { return error; } + return stage2(_doc); +} + +} // namespace westmere +} // namespace simdjson + +/* including simdjson/westmere/end.h: #include */ +/* begin file simdjson/westmere/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_WESTMERE +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "westmere" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/westmere/end.h */ + +#endif // SIMDJSON_SRC_WESTMERE_CPP +/* end file westmere.cpp */ +#endif + +/* undefining SIMDJSON_CONDITIONAL_INCLUDE */ +#undef SIMDJSON_CONDITIONAL_INCLUDE + +SIMDJSON_POP_DISABLE_UNUSED_WARNINGS + +/* end file simdjson.cpp */ diff --git a/deps/simdjson/simdjson.gyp b/deps/simdjson/simdjson.gyp new file mode 100644 index 00000000000000..5c5707a7de2899 --- /dev/null +++ b/deps/simdjson/simdjson.gyp @@ -0,0 +1,20 @@ +{ + 'variables': { + 'simdjson_sources': [ + 'simdjson.cpp', + ] + }, + 'targets': [ + { + 'target_name': 'simdjson', + 'type': 'static_library', + 'include_dirs': ['.'], + 'direct_dependent_settings': { + 'include_dirs': ['.'], + }, + 'sources': [ + '<@(simdjson_sources)', + ], + }, + ] +} diff --git a/deps/simdjson/simdjson.h b/deps/simdjson/simdjson.h new file mode 100644 index 00000000000000..6cb19b06943fa0 --- /dev/null +++ b/deps/simdjson/simdjson.h @@ -0,0 +1,88552 @@ +/* auto-generated on 2023-12-01 13:55:28 -0500. Do not edit! */ +/* including simdjson.h: */ +/* begin file simdjson.h */ +#ifndef SIMDJSON_H +#define SIMDJSON_H + +/** + * @mainpage + * + * Check the [README.md](https://github.com/simdjson/simdjson/blob/master/README.md#simdjson--parsing-gigabytes-of-json-per-second). + * + * Sample code. See https://github.com/simdjson/simdjson/blob/master/doc/basics.md for more examples. + + #include "simdjson.h" + + int main(void) { + // load from `twitter.json` file: + simdjson::dom::parser parser; + simdjson::dom::element tweets = parser.load("twitter.json"); + std::cout << tweets["search_metadata"]["count"] << " results." << std::endl; + + // Parse and iterate through an array of objects + auto abstract_json = R"( [ + { "12345" : {"a":12.34, "b":56.78, "c": 9998877} }, + { "12545" : {"a":11.44, "b":12.78, "c": 11111111} } + ] )"_padded; + + for (simdjson::dom::object obj : parser.parse(abstract_json)) { + for(const auto key_value : obj) { + cout << "key: " << key_value.key << " : "; + simdjson::dom::object innerobj = key_value.value; + cout << "a: " << double(innerobj["a"]) << ", "; + cout << "b: " << double(innerobj["b"]) << ", "; + cout << "c: " << int64_t(innerobj["c"]) << endl; + } + } + } + */ + +/* including simdjson/common_defs.h: #include "simdjson/common_defs.h" */ +/* begin file simdjson/common_defs.h */ +#ifndef SIMDJSON_COMMON_DEFS_H +#define SIMDJSON_COMMON_DEFS_H + +#include +/* including simdjson/compiler_check.h: #include "simdjson/compiler_check.h" */ +/* begin file simdjson/compiler_check.h */ +#ifndef SIMDJSON_COMPILER_CHECK_H +#define SIMDJSON_COMPILER_CHECK_H + +#ifndef __cplusplus +#error simdjson requires a C++ compiler +#endif + +#ifndef SIMDJSON_CPLUSPLUS +#if defined(_MSVC_LANG) && !defined(__clang__) +#define SIMDJSON_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG) +#else +#define SIMDJSON_CPLUSPLUS __cplusplus +#endif +#endif + +// C++ 17 +#if !defined(SIMDJSON_CPLUSPLUS17) && (SIMDJSON_CPLUSPLUS >= 201703L) +#define SIMDJSON_CPLUSPLUS17 1 +#endif + +// C++ 14 +#if !defined(SIMDJSON_CPLUSPLUS14) && (SIMDJSON_CPLUSPLUS >= 201402L) +#define SIMDJSON_CPLUSPLUS14 1 +#endif + +// C++ 11 +#if !defined(SIMDJSON_CPLUSPLUS11) && (SIMDJSON_CPLUSPLUS >= 201103L) +#define SIMDJSON_CPLUSPLUS11 1 +#endif + +#ifndef SIMDJSON_CPLUSPLUS11 +#error simdjson requires a compiler compliant with the C++11 standard +#endif + +#ifndef SIMDJSON_IF_CONSTEXPR +#if SIMDJSON_CPLUSPLUS17 +#define SIMDJSON_IF_CONSTEXPR if constexpr +#else +#define SIMDJSON_IF_CONSTEXPR if +#endif +#endif + +#endif // SIMDJSON_COMPILER_CHECK_H +/* end file simdjson/compiler_check.h */ +/* including simdjson/portability.h: #include "simdjson/portability.h" */ +/* begin file simdjson/portability.h */ +#ifndef SIMDJSON_PORTABILITY_H +#define SIMDJSON_PORTABILITY_H + +#include +#include +#include +#include +#include +#ifndef _WIN32 +// strcasecmp, strncasecmp +#include +#endif + +#ifdef _MSC_VER +#define SIMDJSON_VISUAL_STUDIO 1 +/** + * We want to differentiate carefully between + * clang under visual studio and regular visual + * studio. + * + * Under clang for Windows, we enable: + * * target pragmas so that part and only part of the + * code gets compiled for advanced instructions. + * + */ +#ifdef __clang__ +// clang under visual studio +#define SIMDJSON_CLANG_VISUAL_STUDIO 1 +#else +// just regular visual studio (best guess) +#define SIMDJSON_REGULAR_VISUAL_STUDIO 1 +#endif // __clang__ +#endif // _MSC_VER + +#if defined(__x86_64__) || defined(_M_AMD64) +#define SIMDJSON_IS_X86_64 1 +#elif defined(__aarch64__) || defined(_M_ARM64) +#define SIMDJSON_IS_ARM64 1 +#elif defined(__riscv) && __riscv_xlen == 64 +#define SIMDJSON_IS_RISCV64 1 +#elif defined(__PPC64__) || defined(_M_PPC64) +#if defined(__ALTIVEC__) +#define SIMDJSON_IS_PPC64_VMX 1 +#endif // defined(__ALTIVEC__) +#else +#define SIMDJSON_IS_32BITS 1 + +#if defined(_M_IX86) || defined(__i386__) +#define SIMDJSON_IS_X86_32BITS 1 +#elif defined(__arm__) || defined(_M_ARM) +#define SIMDJSON_IS_ARM_32BITS 1 +#elif defined(__PPC__) || defined(_M_PPC) +#define SIMDJSON_IS_PPC_32BITS 1 +#endif + +#endif // defined(__x86_64__) || defined(_M_AMD64) +#ifndef SIMDJSON_IS_32BITS +#define SIMDJSON_IS_32BITS 0 +#endif + +#if SIMDJSON_IS_32BITS +#ifndef SIMDJSON_NO_PORTABILITY_WARNING +// In the future, we should allow programmers +// to get warning. +#endif // SIMDJSON_NO_PORTABILITY_WARNING +#endif // SIMDJSON_IS_32BITS + +#define SIMDJSON_CAT_IMPLEMENTATION_(a,...) a ## __VA_ARGS__ +#define SIMDJSON_CAT(a,...) SIMDJSON_CAT_IMPLEMENTATION_(a, __VA_ARGS__) + +#define SIMDJSON_STRINGIFY_IMPLEMENTATION_(a,...) #a SIMDJSON_STRINGIFY(__VA_ARGS__) +#define SIMDJSON_STRINGIFY(a,...) SIMDJSON_CAT_IMPLEMENTATION_(a, __VA_ARGS__) + +// this is almost standard? +#undef SIMDJSON_STRINGIFY_IMPLEMENTATION_ +#undef SIMDJSON_STRINGIFY +#define SIMDJSON_STRINGIFY_IMPLEMENTATION_(a) #a +#define SIMDJSON_STRINGIFY(a) SIMDJSON_STRINGIFY_IMPLEMENTATION_(a) + +// Our fast kernels require 64-bit systems. +// +// On 32-bit x86, we lack 64-bit popcnt, lzcnt, blsr instructions. +// Furthermore, the number of SIMD registers is reduced. +// +// On 32-bit ARM, we would have smaller registers. +// +// The simdjson users should still have the fallback kernel. It is +// slower, but it should run everywhere. + +// +// Enable valid runtime implementations, and select SIMDJSON_BUILTIN_IMPLEMENTATION +// + +// We are going to use runtime dispatch. +#if SIMDJSON_IS_X86_64 +#ifdef __clang__ +// clang does not have GCC push pop +// warning: clang attribute push can't be used within a namespace in clang up +// til 8.0 so SIMDJSON_TARGET_REGION and SIMDJSON_UNTARGET_REGION must be *outside* of a +// namespace. +#define SIMDJSON_TARGET_REGION(T) \ + _Pragma(SIMDJSON_STRINGIFY( \ + clang attribute push(__attribute__((target(T))), apply_to = function))) +#define SIMDJSON_UNTARGET_REGION _Pragma("clang attribute pop") +#elif defined(__GNUC__) +// GCC is easier +#define SIMDJSON_TARGET_REGION(T) \ + _Pragma("GCC push_options") _Pragma(SIMDJSON_STRINGIFY(GCC target(T))) +#define SIMDJSON_UNTARGET_REGION _Pragma("GCC pop_options") +#endif // clang then gcc + +#endif // x86 + +// Default target region macros don't do anything. +#ifndef SIMDJSON_TARGET_REGION +#define SIMDJSON_TARGET_REGION(T) +#define SIMDJSON_UNTARGET_REGION +#endif + +// Is threading enabled? +#if defined(_REENTRANT) || defined(_MT) +#ifndef SIMDJSON_THREADS_ENABLED +#define SIMDJSON_THREADS_ENABLED +#endif +#endif + +// workaround for large stack sizes under -O0. +// https://github.com/simdjson/simdjson/issues/691 +#ifdef __APPLE__ +#ifndef __OPTIMIZE__ +// Apple systems have small stack sizes in secondary threads. +// Lack of compiler optimization may generate high stack usage. +// Users may want to disable threads for safety, but only when +// in debug mode which we detect by the fact that the __OPTIMIZE__ +// macro is not defined. +#undef SIMDJSON_THREADS_ENABLED +#endif +#endif + + +#if defined(__clang__) +#define SIMDJSON_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined"))) +#elif defined(__GNUC__) +#define SIMDJSON_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize_undefined)) +#else +#define SIMDJSON_NO_SANITIZE_UNDEFINED +#endif + + +#if defined(__clang__) || defined(__GNUC__) +#if defined(__has_feature) +# if __has_feature(memory_sanitizer) +#define SIMDJSON_NO_SANITIZE_MEMORY __attribute__((no_sanitize("memory"))) +# endif // if __has_feature(memory_sanitizer) +#endif // defined(__has_feature) +#endif +// make sure it is defined as 'nothing' if it is unapplicable. +#ifndef SIMDJSON_NO_SANITIZE_MEMORY +#define SIMDJSON_NO_SANITIZE_MEMORY +#endif + +#if SIMDJSON_VISUAL_STUDIO +// This is one case where we do not distinguish between +// regular visual studio and clang under visual studio. +// clang under Windows has _stricmp (like visual studio) but not strcasecmp (as clang normally has) +#define simdjson_strcasecmp _stricmp +#define simdjson_strncasecmp _strnicmp +#else +// The strcasecmp, strncasecmp, and strcasestr functions do not work with multibyte strings (e.g. UTF-8). +// So they are only useful for ASCII in our context. +// https://www.gnu.org/software/libunistring/manual/libunistring.html#char-_002a-strings +#define simdjson_strcasecmp strcasecmp +#define simdjson_strncasecmp strncasecmp +#endif + +#if defined(NDEBUG) || defined(__OPTIMIZE__) || (defined(_MSC_VER) && !defined(_DEBUG)) +// If NDEBUG is set, or __OPTIMIZE__ is set, or we are under MSVC in release mode, +// then do away with asserts and use __assume. +#if SIMDJSON_VISUAL_STUDIO +#define SIMDJSON_UNREACHABLE() __assume(0) +#define SIMDJSON_ASSUME(COND) __assume(COND) +#else +#define SIMDJSON_UNREACHABLE() __builtin_unreachable(); +#define SIMDJSON_ASSUME(COND) do { if (!(COND)) __builtin_unreachable(); } while (0) +#endif + +#else // defined(NDEBUG) || defined(__OPTIMIZE__) || (defined(_MSC_VER) && !defined(_DEBUG)) +// This should only ever be enabled in debug mode. +#define SIMDJSON_UNREACHABLE() assert(0); +#define SIMDJSON_ASSUME(COND) assert(COND) + +#endif + +#endif // SIMDJSON_PORTABILITY_H +/* end file simdjson/portability.h */ + +namespace simdjson { +namespace internal { +/** + * @private + * Our own implementation of the C++17 to_chars function. + * Defined in src/to_chars + */ +char *to_chars(char *first, const char *last, double value); +/** + * @private + * A number parsing routine. + * Defined in src/from_chars + */ +double from_chars(const char *first) noexcept; +double from_chars(const char *first, const char* end) noexcept; +} + +#ifndef SIMDJSON_EXCEPTIONS +#if __cpp_exceptions +#define SIMDJSON_EXCEPTIONS 1 +#else +#define SIMDJSON_EXCEPTIONS 0 +#endif +#endif + +} // namespace simdjson + +#if defined(__GNUC__) + // Marks a block with a name so that MCA analysis can see it. + #define SIMDJSON_BEGIN_DEBUG_BLOCK(name) __asm volatile("# LLVM-MCA-BEGIN " #name); + #define SIMDJSON_END_DEBUG_BLOCK(name) __asm volatile("# LLVM-MCA-END " #name); + #define SIMDJSON_DEBUG_BLOCK(name, block) BEGIN_DEBUG_BLOCK(name); block; END_DEBUG_BLOCK(name); +#else + #define SIMDJSON_BEGIN_DEBUG_BLOCK(name) + #define SIMDJSON_END_DEBUG_BLOCK(name) + #define SIMDJSON_DEBUG_BLOCK(name, block) +#endif + +// Align to N-byte boundary +#define SIMDJSON_ROUNDUP_N(a, n) (((a) + ((n)-1)) & ~((n)-1)) +#define SIMDJSON_ROUNDDOWN_N(a, n) ((a) & ~((n)-1)) + +#define SIMDJSON_ISALIGNED_N(ptr, n) (((uintptr_t)(ptr) & ((n)-1)) == 0) + +#if SIMDJSON_REGULAR_VISUAL_STUDIO + + #define simdjson_really_inline __forceinline + #define simdjson_never_inline __declspec(noinline) + + #define simdjson_unused + #define simdjson_warn_unused + + #ifndef simdjson_likely + #define simdjson_likely(x) x + #endif + #ifndef simdjson_unlikely + #define simdjson_unlikely(x) x + #endif + + #define SIMDJSON_PUSH_DISABLE_WARNINGS __pragma(warning( push )) + #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS __pragma(warning( push, 0 )) + #define SIMDJSON_DISABLE_VS_WARNING(WARNING_NUMBER) __pragma(warning( disable : WARNING_NUMBER )) + // Get rid of Intellisense-only warnings (Code Analysis) + // Though __has_include is C++17, it is supported in Visual Studio 2017 or better (_MSC_VER>=1910). + #ifdef __has_include + #if __has_include() + #include + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_VS_WARNING(ALL_CPPCORECHECK_WARNINGS) + #endif + #endif + + #ifndef SIMDJSON_DISABLE_UNDESIRED_WARNINGS + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS + #endif + + #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_VS_WARNING(4996) + #define SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING + #define SIMDJSON_POP_DISABLE_WARNINGS __pragma(warning( pop )) + + #define SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS + #define SIMDJSON_POP_DISABLE_UNUSED_WARNINGS + +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + + #define simdjson_really_inline inline __attribute__((always_inline)) + #define simdjson_never_inline inline __attribute__((noinline)) + + #define simdjson_unused __attribute__((unused)) + #define simdjson_warn_unused __attribute__((warn_unused_result)) + + #ifndef simdjson_likely + #define simdjson_likely(x) __builtin_expect(!!(x), 1) + #endif + #ifndef simdjson_unlikely + #define simdjson_unlikely(x) __builtin_expect(!!(x), 0) + #endif + + #define SIMDJSON_PUSH_DISABLE_WARNINGS _Pragma("GCC diagnostic push") + // gcc doesn't seem to disable all warnings with all and extra, add warnings here as necessary + // We do it separately for clang since it has different warnings. + #ifdef __clang__ + // clang is missing -Wmaybe-uninitialized. + #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS SIMDJSON_PUSH_DISABLE_WARNINGS \ + SIMDJSON_DISABLE_GCC_WARNING(-Weffc++) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wall) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wconversion) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wextra) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wattributes) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wimplicit-fallthrough) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wnon-virtual-dtor) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wreturn-type) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wshadow) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wunused-parameter) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable) + #else // __clang__ + #define SIMDJSON_PUSH_DISABLE_ALL_WARNINGS SIMDJSON_PUSH_DISABLE_WARNINGS \ + SIMDJSON_DISABLE_GCC_WARNING(-Weffc++) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wall) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wconversion) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wextra) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wattributes) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wimplicit-fallthrough) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wnon-virtual-dtor) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wreturn-type) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wshadow) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wunused-parameter) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wunused-variable) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wmaybe-uninitialized) \ + SIMDJSON_DISABLE_GCC_WARNING(-Wformat-security) + #endif // __clang__ + + #define SIMDJSON_PRAGMA(P) _Pragma(#P) + #define SIMDJSON_DISABLE_GCC_WARNING(WARNING) SIMDJSON_PRAGMA(GCC diagnostic ignored #WARNING) + #if SIMDJSON_CLANG_VISUAL_STUDIO + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS SIMDJSON_DISABLE_GCC_WARNING(-Wmicrosoft-include) + #else + #define SIMDJSON_DISABLE_UNDESIRED_WARNINGS + #endif + #define SIMDJSON_DISABLE_DEPRECATED_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wdeprecated-declarations) + #define SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING SIMDJSON_DISABLE_GCC_WARNING(-Wstrict-overflow) + #define SIMDJSON_POP_DISABLE_WARNINGS _Pragma("GCC diagnostic pop") + + #define SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS SIMDJSON_PUSH_DISABLE_WARNINGS \ + SIMDJSON_DISABLE_GCC_WARNING(-Wunused) + #define SIMDJSON_POP_DISABLE_UNUSED_WARNINGS SIMDJSON_POP_DISABLE_WARNINGS + + + +#endif // MSC_VER + +#if defined(simdjson_inline) + // Prefer the user's definition of simdjson_inline; don't define it ourselves. +#elif defined(__GNUC__) && !defined(__OPTIMIZE__) + // If optimizations are disabled, forcing inlining can lead to significant + // code bloat and high compile times. Don't use simdjson_really_inline for + // unoptimized builds. + #define simdjson_inline inline +#else + // Force inlining for most simdjson functions. + #define simdjson_inline simdjson_really_inline +#endif + +#if SIMDJSON_VISUAL_STUDIO + /** + * Windows users need to do some extra work when building + * or using a dynamic library (DLL). When building, we need + * to set SIMDJSON_DLLIMPORTEXPORT to __declspec(dllexport). + * When *using* the DLL, the user needs to set + * SIMDJSON_DLLIMPORTEXPORT __declspec(dllimport). + * + * Static libraries not need require such work. + * + * It does not matter here whether you are using + * the regular visual studio or clang under visual + * studio, you still need to handle these issues. + * + * Non-Windows systems do not have this complexity. + */ + #if SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY + // We set SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY when we build a DLL under Windows. + // It should never happen that both SIMDJSON_BUILDING_WINDOWS_DYNAMIC_LIBRARY and + // SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY are set. + #define SIMDJSON_DLLIMPORTEXPORT __declspec(dllexport) + #elif SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY + // Windows user who call a dynamic library should set SIMDJSON_USING_WINDOWS_DYNAMIC_LIBRARY to 1. + #define SIMDJSON_DLLIMPORTEXPORT __declspec(dllimport) + #else + // We assume by default static linkage + #define SIMDJSON_DLLIMPORTEXPORT + #endif + +/** + * Workaround for the vcpkg package manager. Only vcpkg should + * ever touch the next line. The SIMDJSON_USING_LIBRARY macro is otherwise unused. + */ +#if SIMDJSON_USING_LIBRARY +#define SIMDJSON_DLLIMPORTEXPORT __declspec(dllimport) +#endif +/** + * End of workaround for the vcpkg package manager. + */ +#else + #define SIMDJSON_DLLIMPORTEXPORT +#endif + +// C++17 requires string_view. +#if SIMDJSON_CPLUSPLUS17 +#define SIMDJSON_HAS_STRING_VIEW +#include // by the standard, this has to be safe. +#endif + +// This macro (__cpp_lib_string_view) has to be defined +// for C++17 and better, but if it is otherwise defined, +// we are going to assume that string_view is available +// even if we do not have C++17 support. +#ifdef __cpp_lib_string_view +#define SIMDJSON_HAS_STRING_VIEW +#endif + +// Some systems have string_view even if we do not have C++17 support, +// and even if __cpp_lib_string_view is undefined, it is the case +// with Apple clang version 11. +// We must handle it. *This is important.* +#ifndef SIMDJSON_HAS_STRING_VIEW +#if defined __has_include +// do not combine the next #if with the previous one (unsafe) +#if __has_include () +// now it is safe to trigger the include +#include // though the file is there, it does not follow that we got the implementation +#if defined(_LIBCPP_STRING_VIEW) +// Ah! So we under libc++ which under its Library Fundamentals Technical Specification, which preceded C++17, +// included string_view. +// This means that we have string_view *even though* we may not have C++17. +#define SIMDJSON_HAS_STRING_VIEW +#endif // _LIBCPP_STRING_VIEW +#endif // __has_include () +#endif // defined __has_include +#endif // def SIMDJSON_HAS_STRING_VIEW +// end of complicated but important routine to try to detect string_view. + +// +// Backfill std::string_view using nonstd::string_view on systems where +// we expect that string_view is missing. Important: if we get this wrong, +// we will end up with two string_view definitions and potential trouble. +// That is why we work so hard above to avoid it. +// +#ifndef SIMDJSON_HAS_STRING_VIEW +SIMDJSON_PUSH_DISABLE_ALL_WARNINGS +/* including simdjson/nonstd/string_view.hpp: #include "simdjson/nonstd/string_view.hpp" */ +/* begin file simdjson/nonstd/string_view.hpp */ +// Copyright 2017-2020 by Martin Moene +// +// string-view lite, a C++17-like string_view for C++98 and later. +// For more information see https://github.com/martinmoene/string-view-lite +// +// Distributed under the Boost Software License, Version 1.0. +// (See accompanying file LICENSE.txt or copy at http://www.boost.org/LICENSE_1_0.txt) + +#pragma once + +#ifndef NONSTD_SV_LITE_H_INCLUDED +#define NONSTD_SV_LITE_H_INCLUDED + +#define string_view_lite_MAJOR 1 +#define string_view_lite_MINOR 7 +#define string_view_lite_PATCH 0 + +#define string_view_lite_VERSION nssv_STRINGIFY(string_view_lite_MAJOR) "." nssv_STRINGIFY(string_view_lite_MINOR) "." nssv_STRINGIFY(string_view_lite_PATCH) + +#define nssv_STRINGIFY( x ) nssv_STRINGIFY_( x ) +#define nssv_STRINGIFY_( x ) #x + +// string-view lite configuration: + +#define nssv_STRING_VIEW_DEFAULT 0 +#define nssv_STRING_VIEW_NONSTD 1 +#define nssv_STRING_VIEW_STD 2 + +// tweak header support: + +#ifdef __has_include +# if __has_include() +# include +# endif +#define nssv_HAVE_TWEAK_HEADER 1 +#else +#define nssv_HAVE_TWEAK_HEADER 0 +//# pragma message("string_view.hpp: Note: Tweak header not supported.") +#endif + +// string_view selection and configuration: + +#if !defined( nssv_CONFIG_SELECT_STRING_VIEW ) +# define nssv_CONFIG_SELECT_STRING_VIEW ( nssv_HAVE_STD_STRING_VIEW ? nssv_STRING_VIEW_STD : nssv_STRING_VIEW_NONSTD ) +#endif + +#ifndef nssv_CONFIG_STD_SV_OPERATOR +# define nssv_CONFIG_STD_SV_OPERATOR 0 +#endif + +#ifndef nssv_CONFIG_USR_SV_OPERATOR +# define nssv_CONFIG_USR_SV_OPERATOR 1 +#endif + +#ifdef nssv_CONFIG_CONVERSION_STD_STRING +# define nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS nssv_CONFIG_CONVERSION_STD_STRING +# define nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS nssv_CONFIG_CONVERSION_STD_STRING +#endif + +#ifndef nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS +# define nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS 1 +#endif + +#ifndef nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS +# define nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS 1 +#endif + +#ifndef nssv_CONFIG_NO_STREAM_INSERTION +# define nssv_CONFIG_NO_STREAM_INSERTION 0 +#endif + +// Control presence of exception handling (try and auto discover): + +#ifndef nssv_CONFIG_NO_EXCEPTIONS +# if defined(_MSC_VER) +# include // for _HAS_EXCEPTIONS +# endif +# if defined(__cpp_exceptions) || defined(__EXCEPTIONS) || (_HAS_EXCEPTIONS) +# define nssv_CONFIG_NO_EXCEPTIONS 0 +# else +# define nssv_CONFIG_NO_EXCEPTIONS 1 +# endif +#endif + +// C++ language version detection (C++23 is speculative): +// Note: VC14.0/1900 (VS2015) lacks too much from C++14. + +#ifndef nssv_CPLUSPLUS +# if defined(_MSVC_LANG ) && !defined(__clang__) +# define nssv_CPLUSPLUS (_MSC_VER == 1900 ? 201103L : _MSVC_LANG ) +# else +# define nssv_CPLUSPLUS __cplusplus +# endif +#endif + +#define nssv_CPP98_OR_GREATER ( nssv_CPLUSPLUS >= 199711L ) +#define nssv_CPP11_OR_GREATER ( nssv_CPLUSPLUS >= 201103L ) +#define nssv_CPP11_OR_GREATER_ ( nssv_CPLUSPLUS >= 201103L ) +#define nssv_CPP14_OR_GREATER ( nssv_CPLUSPLUS >= 201402L ) +#define nssv_CPP17_OR_GREATER ( nssv_CPLUSPLUS >= 201703L ) +#define nssv_CPP20_OR_GREATER ( nssv_CPLUSPLUS >= 202002L ) +#define nssv_CPP23_OR_GREATER ( nssv_CPLUSPLUS >= 202300L ) + +// use C++17 std::string_view if available and requested: + +#if nssv_CPP17_OR_GREATER && defined(__has_include ) +# if __has_include( ) +# define nssv_HAVE_STD_STRING_VIEW 1 +# else +# define nssv_HAVE_STD_STRING_VIEW 0 +# endif +#else +# define nssv_HAVE_STD_STRING_VIEW 0 +#endif + +#define nssv_USES_STD_STRING_VIEW ( (nssv_CONFIG_SELECT_STRING_VIEW == nssv_STRING_VIEW_STD) || ((nssv_CONFIG_SELECT_STRING_VIEW == nssv_STRING_VIEW_DEFAULT) && nssv_HAVE_STD_STRING_VIEW) ) + +#define nssv_HAVE_STARTS_WITH ( nssv_CPP20_OR_GREATER || !nssv_USES_STD_STRING_VIEW ) +#define nssv_HAVE_ENDS_WITH nssv_HAVE_STARTS_WITH + +// +// Use C++17 std::string_view: +// + +#if nssv_USES_STD_STRING_VIEW + +#include + +// Extensions for std::string: + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { + +template< class CharT, class Traits, class Allocator = std::allocator > +std::basic_string +to_string( std::basic_string_view v, Allocator const & a = Allocator() ) +{ + return std::basic_string( v.begin(), v.end(), a ); +} + +template< class CharT, class Traits, class Allocator > +std::basic_string_view +to_string_view( std::basic_string const & s ) +{ + return std::basic_string_view( s.data(), s.size() ); +} + +// Literal operators sv and _sv: + +#if nssv_CONFIG_STD_SV_OPERATOR + +using namespace std::literals::string_view_literals; + +#endif + +#if nssv_CONFIG_USR_SV_OPERATOR + +inline namespace literals { +inline namespace string_view_literals { + + +constexpr std::string_view operator "" _sv( const char* str, size_t len ) noexcept // (1) +{ + return std::string_view{ str, len }; +} + +constexpr std::u16string_view operator "" _sv( const char16_t* str, size_t len ) noexcept // (2) +{ + return std::u16string_view{ str, len }; +} + +constexpr std::u32string_view operator "" _sv( const char32_t* str, size_t len ) noexcept // (3) +{ + return std::u32string_view{ str, len }; +} + +constexpr std::wstring_view operator "" _sv( const wchar_t* str, size_t len ) noexcept // (4) +{ + return std::wstring_view{ str, len }; +} + +}} // namespace literals::string_view_literals + +#endif // nssv_CONFIG_USR_SV_OPERATOR + +} // namespace nonstd + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { + +using std::string_view; +using std::wstring_view; +using std::u16string_view; +using std::u32string_view; +using std::basic_string_view; + +// literal "sv" and "_sv", see above + +using std::operator==; +using std::operator!=; +using std::operator<; +using std::operator<=; +using std::operator>; +using std::operator>=; + +using std::operator<<; + +} // namespace nonstd + +#else // nssv_HAVE_STD_STRING_VIEW + +// +// Before C++17: use string_view lite: +// + +// Compiler versions: +// +// MSVC++ 6.0 _MSC_VER == 1200 nssv_COMPILER_MSVC_VERSION == 60 (Visual Studio 6.0) +// MSVC++ 7.0 _MSC_VER == 1300 nssv_COMPILER_MSVC_VERSION == 70 (Visual Studio .NET 2002) +// MSVC++ 7.1 _MSC_VER == 1310 nssv_COMPILER_MSVC_VERSION == 71 (Visual Studio .NET 2003) +// MSVC++ 8.0 _MSC_VER == 1400 nssv_COMPILER_MSVC_VERSION == 80 (Visual Studio 2005) +// MSVC++ 9.0 _MSC_VER == 1500 nssv_COMPILER_MSVC_VERSION == 90 (Visual Studio 2008) +// MSVC++ 10.0 _MSC_VER == 1600 nssv_COMPILER_MSVC_VERSION == 100 (Visual Studio 2010) +// MSVC++ 11.0 _MSC_VER == 1700 nssv_COMPILER_MSVC_VERSION == 110 (Visual Studio 2012) +// MSVC++ 12.0 _MSC_VER == 1800 nssv_COMPILER_MSVC_VERSION == 120 (Visual Studio 2013) +// MSVC++ 14.0 _MSC_VER == 1900 nssv_COMPILER_MSVC_VERSION == 140 (Visual Studio 2015) +// MSVC++ 14.1 _MSC_VER >= 1910 nssv_COMPILER_MSVC_VERSION == 141 (Visual Studio 2017) +// MSVC++ 14.2 _MSC_VER >= 1920 nssv_COMPILER_MSVC_VERSION == 142 (Visual Studio 2019) + +#if defined(_MSC_VER ) && !defined(__clang__) +# define nssv_COMPILER_MSVC_VER (_MSC_VER ) +# define nssv_COMPILER_MSVC_VERSION (_MSC_VER / 10 - 10 * ( 5 + (_MSC_VER < 1900 ) ) ) +#else +# define nssv_COMPILER_MSVC_VER 0 +# define nssv_COMPILER_MSVC_VERSION 0 +#endif + +#define nssv_COMPILER_VERSION( major, minor, patch ) ( 10 * ( 10 * (major) + (minor) ) + (patch) ) + +#if defined( __apple_build_version__ ) +# define nssv_COMPILER_APPLECLANG_VERSION nssv_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) +# define nssv_COMPILER_CLANG_VERSION 0 +#elif defined( __clang__ ) +# define nssv_COMPILER_APPLECLANG_VERSION 0 +# define nssv_COMPILER_CLANG_VERSION nssv_COMPILER_VERSION(__clang_major__, __clang_minor__, __clang_patchlevel__) +#else +# define nssv_COMPILER_APPLECLANG_VERSION 0 +# define nssv_COMPILER_CLANG_VERSION 0 +#endif + +#if defined(__GNUC__) && !defined(__clang__) +# define nssv_COMPILER_GNUC_VERSION nssv_COMPILER_VERSION(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +#else +# define nssv_COMPILER_GNUC_VERSION 0 +#endif + +// half-open range [lo..hi): +#define nssv_BETWEEN( v, lo, hi ) ( (lo) <= (v) && (v) < (hi) ) + +// Presence of language and library features: + +#ifdef _HAS_CPP0X +# define nssv_HAS_CPP0X _HAS_CPP0X +#else +# define nssv_HAS_CPP0X 0 +#endif + +// Unless defined otherwise below, consider VC14 as C++11 for variant-lite: + +#if nssv_COMPILER_MSVC_VER >= 1900 +# undef nssv_CPP11_OR_GREATER +# define nssv_CPP11_OR_GREATER 1 +#endif + +#define nssv_CPP11_90 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1500) +#define nssv_CPP11_100 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1600) +#define nssv_CPP11_110 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1700) +#define nssv_CPP11_120 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1800) +#define nssv_CPP11_140 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1900) +#define nssv_CPP11_141 (nssv_CPP11_OR_GREATER_ || nssv_COMPILER_MSVC_VER >= 1910) + +#define nssv_CPP14_000 (nssv_CPP14_OR_GREATER) +#define nssv_CPP17_000 (nssv_CPP17_OR_GREATER) + +// Presence of C++11 language features: + +#define nssv_HAVE_CONSTEXPR_11 nssv_CPP11_140 +#define nssv_HAVE_EXPLICIT_CONVERSION nssv_CPP11_140 +#define nssv_HAVE_INLINE_NAMESPACE nssv_CPP11_140 +#define nssv_HAVE_IS_DEFAULT nssv_CPP11_140 +#define nssv_HAVE_IS_DELETE nssv_CPP11_140 +#define nssv_HAVE_NOEXCEPT nssv_CPP11_140 +#define nssv_HAVE_NULLPTR nssv_CPP11_100 +#define nssv_HAVE_REF_QUALIFIER nssv_CPP11_140 +#define nssv_HAVE_UNICODE_LITERALS nssv_CPP11_140 +#define nssv_HAVE_USER_DEFINED_LITERALS nssv_CPP11_140 +#define nssv_HAVE_WCHAR16_T nssv_CPP11_100 +#define nssv_HAVE_WCHAR32_T nssv_CPP11_100 + +#if ! ( ( nssv_CPP11_OR_GREATER && nssv_COMPILER_CLANG_VERSION ) || nssv_BETWEEN( nssv_COMPILER_CLANG_VERSION, 300, 400 ) ) +# define nssv_HAVE_STD_DEFINED_LITERALS nssv_CPP11_140 +#else +# define nssv_HAVE_STD_DEFINED_LITERALS 0 +#endif + +// Presence of C++14 language features: + +#define nssv_HAVE_CONSTEXPR_14 nssv_CPP14_000 + +// Presence of C++17 language features: + +#define nssv_HAVE_NODISCARD nssv_CPP17_000 + +// Presence of C++ library features: + +#define nssv_HAVE_STD_HASH nssv_CPP11_120 + +// Presence of compiler intrinsics: + +// Providing char-type specializations for compare() and length() that +// use compiler intrinsics can improve compile- and run-time performance. +// +// The challenge is in using the right combinations of builtin availability +// and its constexpr-ness. +// +// | compiler | __builtin_memcmp (constexpr) | memcmp (constexpr) | +// |----------|------------------------------|---------------------| +// | clang | 4.0 (>= 4.0 ) | any (? ) | +// | clang-a | 9.0 (>= 9.0 ) | any (? ) | +// | gcc | any (constexpr) | any (? ) | +// | msvc | >= 14.2 C++17 (>= 14.2 ) | any (? ) | + +#define nssv_HAVE_BUILTIN_VER ( (nssv_CPP17_000 && nssv_COMPILER_MSVC_VERSION >= 142) || nssv_COMPILER_GNUC_VERSION > 0 || nssv_COMPILER_CLANG_VERSION >= 400 || nssv_COMPILER_APPLECLANG_VERSION >= 900 ) +#define nssv_HAVE_BUILTIN_CE ( nssv_HAVE_BUILTIN_VER ) + +#define nssv_HAVE_BUILTIN_MEMCMP ( (nssv_HAVE_CONSTEXPR_14 && nssv_HAVE_BUILTIN_CE) || !nssv_HAVE_CONSTEXPR_14 ) +#define nssv_HAVE_BUILTIN_STRLEN ( (nssv_HAVE_CONSTEXPR_11 && nssv_HAVE_BUILTIN_CE) || !nssv_HAVE_CONSTEXPR_11 ) + +#ifdef __has_builtin +# define nssv_HAVE_BUILTIN( x ) __has_builtin( x ) +#else +# define nssv_HAVE_BUILTIN( x ) 0 +#endif + +#if nssv_HAVE_BUILTIN(__builtin_memcmp) || nssv_HAVE_BUILTIN_VER +# define nssv_BUILTIN_MEMCMP __builtin_memcmp +#else +# define nssv_BUILTIN_MEMCMP memcmp +#endif + +#if nssv_HAVE_BUILTIN(__builtin_strlen) || nssv_HAVE_BUILTIN_VER +# define nssv_BUILTIN_STRLEN __builtin_strlen +#else +# define nssv_BUILTIN_STRLEN strlen +#endif + +// C++ feature usage: + +#if nssv_HAVE_CONSTEXPR_11 +# define nssv_constexpr constexpr +#else +# define nssv_constexpr /*constexpr*/ +#endif + +#if nssv_HAVE_CONSTEXPR_14 +# define nssv_constexpr14 constexpr +#else +# define nssv_constexpr14 /*constexpr*/ +#endif + +#if nssv_HAVE_EXPLICIT_CONVERSION +# define nssv_explicit explicit +#else +# define nssv_explicit /*explicit*/ +#endif + +#if nssv_HAVE_INLINE_NAMESPACE +# define nssv_inline_ns inline +#else +# define nssv_inline_ns /*inline*/ +#endif + +#if nssv_HAVE_NOEXCEPT +# define nssv_noexcept noexcept +#else +# define nssv_noexcept /*noexcept*/ +#endif + +//#if nssv_HAVE_REF_QUALIFIER +//# define nssv_ref_qual & +//# define nssv_refref_qual && +//#else +//# define nssv_ref_qual /*&*/ +//# define nssv_refref_qual /*&&*/ +//#endif + +#if nssv_HAVE_NULLPTR +# define nssv_nullptr nullptr +#else +# define nssv_nullptr NULL +#endif + +#if nssv_HAVE_NODISCARD +# define nssv_nodiscard [[nodiscard]] +#else +# define nssv_nodiscard /*[[nodiscard]]*/ +#endif + +// Additional includes: + +#include +#include +#include +#include +#include // std::char_traits<> + +#if ! nssv_CONFIG_NO_STREAM_INSERTION +# include +#endif + +#if ! nssv_CONFIG_NO_EXCEPTIONS +# include +#endif + +#if nssv_CPP11_OR_GREATER +# include +#endif + +// Clang, GNUC, MSVC warning suppression macros: + +#if defined(__clang__) +# pragma clang diagnostic ignored "-Wreserved-user-defined-literal" +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wuser-defined-literals" +#elif defined(__GNUC__) +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wliteral-suffix" +#endif // __clang__ + +#if nssv_COMPILER_MSVC_VERSION >= 140 +# define nssv_SUPPRESS_MSGSL_WARNING(expr) [[gsl::suppress(expr)]] +# define nssv_SUPPRESS_MSVC_WARNING(code, descr) __pragma(warning(suppress: code) ) +# define nssv_DISABLE_MSVC_WARNINGS(codes) __pragma(warning(push)) __pragma(warning(disable: codes)) +#else +# define nssv_SUPPRESS_MSGSL_WARNING(expr) +# define nssv_SUPPRESS_MSVC_WARNING(code, descr) +# define nssv_DISABLE_MSVC_WARNINGS(codes) +#endif + +#if defined(__clang__) +# define nssv_RESTORE_WARNINGS() _Pragma("clang diagnostic pop") +#elif defined(__GNUC__) +# define nssv_RESTORE_WARNINGS() _Pragma("GCC diagnostic pop") +#elif nssv_COMPILER_MSVC_VERSION >= 140 +# define nssv_RESTORE_WARNINGS() __pragma(warning(pop )) +#else +# define nssv_RESTORE_WARNINGS() +#endif + +// Suppress the following MSVC (GSL) warnings: +// - C4455, non-gsl : 'operator ""sv': literal suffix identifiers that do not +// start with an underscore are reserved +// - C26472, gsl::t.1 : don't use a static_cast for arithmetic conversions; +// use brace initialization, gsl::narrow_cast or gsl::narow +// - C26481: gsl::b.1 : don't use pointer arithmetic. Use span instead + +nssv_DISABLE_MSVC_WARNINGS( 4455 26481 26472 ) +//nssv_DISABLE_CLANG_WARNINGS( "-Wuser-defined-literals" ) +//nssv_DISABLE_GNUC_WARNINGS( -Wliteral-suffix ) + +namespace nonstd { namespace sv_lite { + +// +// basic_string_view declaration: +// + +template +< + class CharT, + class Traits = std::char_traits +> +class basic_string_view; + +namespace detail { + +// support constexpr comparison in C++14; +// for C++17 and later, use provided traits: + +template< typename CharT > +inline nssv_constexpr14 int compare( CharT const * s1, CharT const * s2, std::size_t count ) +{ + while ( count-- != 0 ) + { + if ( *s1 < *s2 ) return -1; + if ( *s1 > *s2 ) return +1; + ++s1; ++s2; + } + return 0; +} + +#if nssv_HAVE_BUILTIN_MEMCMP + +// specialization of compare() for char, see also generic compare() above: + +inline nssv_constexpr14 int compare( char const * s1, char const * s2, std::size_t count ) +{ + return nssv_BUILTIN_MEMCMP( s1, s2, count ); +} + +#endif + +#if nssv_HAVE_BUILTIN_STRLEN + +// specialization of length() for char, see also generic length() further below: + +inline nssv_constexpr std::size_t length( char const * s ) +{ + return nssv_BUILTIN_STRLEN( s ); +} + +#endif + +#if defined(__OPTIMIZE__) + +// gcc, clang provide __OPTIMIZE__ +// Expect tail call optimization to make length() non-recursive: + +template< typename CharT > +inline nssv_constexpr std::size_t length( CharT * s, std::size_t result = 0 ) +{ + return *s == '\0' ? result : length( s + 1, result + 1 ); +} + +#else // OPTIMIZE + +// non-recursive: + +template< typename CharT > +inline nssv_constexpr14 std::size_t length( CharT * s ) +{ + std::size_t result = 0; + while ( *s++ != '\0' ) + { + ++result; + } + return result; +} + +#endif // OPTIMIZE + +#if nssv_CPP11_OR_GREATER && ! nssv_CPP17_OR_GREATER +#if defined(__OPTIMIZE__) + +// gcc, clang provide __OPTIMIZE__ +// Expect tail call optimization to make search() non-recursive: + +template< class CharT, class Traits = std::char_traits > +constexpr const CharT* search( basic_string_view haystack, basic_string_view needle ) +{ + return haystack.starts_with( needle ) ? haystack.begin() : + haystack.empty() ? haystack.end() : search( haystack.substr(1), needle ); +} + +#else // OPTIMIZE + +// non-recursive: + +template< class CharT, class Traits = std::char_traits > +constexpr const CharT* search( basic_string_view haystack, basic_string_view needle ) +{ + return std::search( haystack.begin(), haystack.end(), needle.begin(), needle.end() ); +} + +#endif // OPTIMIZE +#endif // nssv_CPP11_OR_GREATER && ! nssv_CPP17_OR_GREATER + +} // namespace detail + +// +// basic_string_view: +// + +template +< + class CharT, + class Traits /* = std::char_traits */ +> +class basic_string_view +{ +public: + // Member types: + + typedef Traits traits_type; + typedef CharT value_type; + + typedef CharT * pointer; + typedef CharT const * const_pointer; + typedef CharT & reference; + typedef CharT const & const_reference; + + typedef const_pointer iterator; + typedef const_pointer const_iterator; + typedef std::reverse_iterator< const_iterator > reverse_iterator; + typedef std::reverse_iterator< const_iterator > const_reverse_iterator; + + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + + // 24.4.2.1 Construction and assignment: + + nssv_constexpr basic_string_view() nssv_noexcept + : data_( nssv_nullptr ) + , size_( 0 ) + {} + +#if nssv_CPP11_OR_GREATER + nssv_constexpr basic_string_view( basic_string_view const & other ) nssv_noexcept = default; +#else + nssv_constexpr basic_string_view( basic_string_view const & other ) nssv_noexcept + : data_( other.data_) + , size_( other.size_) + {} +#endif + + nssv_constexpr basic_string_view( CharT const * s, size_type count ) nssv_noexcept // non-standard noexcept + : data_( s ) + , size_( count ) + {} + + nssv_constexpr basic_string_view( CharT const * s) nssv_noexcept // non-standard noexcept + : data_( s ) +#if nssv_CPP17_OR_GREATER + , size_( Traits::length(s) ) +#elif nssv_CPP11_OR_GREATER + , size_( detail::length(s) ) +#else + , size_( Traits::length(s) ) +#endif + {} + +#if nssv_HAVE_NULLPTR +# if nssv_HAVE_IS_DELETE + nssv_constexpr basic_string_view( std::nullptr_t ) nssv_noexcept = delete; +# else + private: nssv_constexpr basic_string_view( std::nullptr_t ) nssv_noexcept; public: +# endif +#endif + + // Assignment: + +#if nssv_CPP11_OR_GREATER + nssv_constexpr14 basic_string_view & operator=( basic_string_view const & other ) nssv_noexcept = default; +#else + nssv_constexpr14 basic_string_view & operator=( basic_string_view const & other ) nssv_noexcept + { + data_ = other.data_; + size_ = other.size_; + return *this; + } +#endif + + // 24.4.2.2 Iterator support: + + nssv_constexpr const_iterator begin() const nssv_noexcept { return data_; } + nssv_constexpr const_iterator end() const nssv_noexcept { return data_ + size_; } + + nssv_constexpr const_iterator cbegin() const nssv_noexcept { return begin(); } + nssv_constexpr const_iterator cend() const nssv_noexcept { return end(); } + + nssv_constexpr const_reverse_iterator rbegin() const nssv_noexcept { return const_reverse_iterator( end() ); } + nssv_constexpr const_reverse_iterator rend() const nssv_noexcept { return const_reverse_iterator( begin() ); } + + nssv_constexpr const_reverse_iterator crbegin() const nssv_noexcept { return rbegin(); } + nssv_constexpr const_reverse_iterator crend() const nssv_noexcept { return rend(); } + + // 24.4.2.3 Capacity: + + nssv_constexpr size_type size() const nssv_noexcept { return size_; } + nssv_constexpr size_type length() const nssv_noexcept { return size_; } + nssv_constexpr size_type max_size() const nssv_noexcept { return (std::numeric_limits< size_type >::max)(); } + + // since C++20 + nssv_nodiscard nssv_constexpr bool empty() const nssv_noexcept + { + return 0 == size_; + } + + // 24.4.2.4 Element access: + + nssv_constexpr const_reference operator[]( size_type pos ) const + { + return data_at( pos ); + } + + nssv_constexpr14 const_reference at( size_type pos ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos < size() ); +#else + if ( pos >= size() ) + { + throw std::out_of_range("nonstd::string_view::at()"); + } +#endif + return data_at( pos ); + } + + nssv_constexpr const_reference front() const { return data_at( 0 ); } + nssv_constexpr const_reference back() const { return data_at( size() - 1 ); } + + nssv_constexpr const_pointer data() const nssv_noexcept { return data_; } + + // 24.4.2.5 Modifiers: + + nssv_constexpr14 void remove_prefix( size_type n ) + { + assert( n <= size() ); + data_ += n; + size_ -= n; + } + + nssv_constexpr14 void remove_suffix( size_type n ) + { + assert( n <= size() ); + size_ -= n; + } + + nssv_constexpr14 void swap( basic_string_view & other ) nssv_noexcept + { + const basic_string_view tmp(other); + other = *this; + *this = tmp; + } + + // 24.4.2.6 String operations: + + size_type copy( CharT * dest, size_type n, size_type pos = 0 ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos <= size() ); +#else + if ( pos > size() ) + { + throw std::out_of_range("nonstd::string_view::copy()"); + } +#endif + const size_type rlen = (std::min)( n, size() - pos ); + + (void) Traits::copy( dest, data() + pos, rlen ); + + return rlen; + } + + nssv_constexpr14 basic_string_view substr( size_type pos = 0, size_type n = npos ) const + { +#if nssv_CONFIG_NO_EXCEPTIONS + assert( pos <= size() ); +#else + if ( pos > size() ) + { + throw std::out_of_range("nonstd::string_view::substr()"); + } +#endif + return basic_string_view( data() + pos, (std::min)( n, size() - pos ) ); + } + + // compare(), 6x: + + nssv_constexpr14 int compare( basic_string_view other ) const nssv_noexcept // (1) + { +#if nssv_CPP17_OR_GREATER + if ( const int result = Traits::compare( data(), other.data(), (std::min)( size(), other.size() ) ) ) +#else + if ( const int result = detail::compare( data(), other.data(), (std::min)( size(), other.size() ) ) ) +#endif + { + return result; + } + + return size() == other.size() ? 0 : size() < other.size() ? -1 : 1; + } + + nssv_constexpr int compare( size_type pos1, size_type n1, basic_string_view other ) const // (2) + { + return substr( pos1, n1 ).compare( other ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, basic_string_view other, size_type pos2, size_type n2 ) const // (3) + { + return substr( pos1, n1 ).compare( other.substr( pos2, n2 ) ); + } + + nssv_constexpr int compare( CharT const * s ) const // (4) + { + return compare( basic_string_view( s ) ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, CharT const * s ) const // (5) + { + return substr( pos1, n1 ).compare( basic_string_view( s ) ); + } + + nssv_constexpr int compare( size_type pos1, size_type n1, CharT const * s, size_type n2 ) const // (6) + { + return substr( pos1, n1 ).compare( basic_string_view( s, n2 ) ); + } + + // 24.4.2.7 Searching: + + // starts_with(), 3x, since C++20: + + nssv_constexpr bool starts_with( basic_string_view v ) const nssv_noexcept // (1) + { + return size() >= v.size() && compare( 0, v.size(), v ) == 0; + } + + nssv_constexpr bool starts_with( CharT c ) const nssv_noexcept // (2) + { + return starts_with( basic_string_view( &c, 1 ) ); + } + + nssv_constexpr bool starts_with( CharT const * s ) const // (3) + { + return starts_with( basic_string_view( s ) ); + } + + // ends_with(), 3x, since C++20: + + nssv_constexpr bool ends_with( basic_string_view v ) const nssv_noexcept // (1) + { + return size() >= v.size() && compare( size() - v.size(), npos, v ) == 0; + } + + nssv_constexpr bool ends_with( CharT c ) const nssv_noexcept // (2) + { + return ends_with( basic_string_view( &c, 1 ) ); + } + + nssv_constexpr bool ends_with( CharT const * s ) const // (3) + { + return ends_with( basic_string_view( s ) ); + } + + // find(), 4x: + + nssv_constexpr size_type find( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return assert( v.size() == 0 || v.data() != nssv_nullptr ) + , pos >= size() + ? npos : to_pos( +#if nssv_CPP11_OR_GREATER && ! nssv_CPP17_OR_GREATER + detail::search( substr(pos), v ) +#else + std::search( cbegin() + pos, cend(), v.cbegin(), v.cend(), Traits::eq ) +#endif + ); + } + + nssv_constexpr size_type find( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find( CharT const * s, size_type pos, size_type n ) const // (3) + { + return find( basic_string_view( s, n ), pos ); + } + + nssv_constexpr size_type find( CharT const * s, size_type pos = 0 ) const // (4) + { + return find( basic_string_view( s ), pos ); + } + + // rfind(), 4x: + + nssv_constexpr14 size_type rfind( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + if ( size() < v.size() ) + { + return npos; + } + + if ( v.empty() ) + { + return (std::min)( size(), pos ); + } + + const_iterator last = cbegin() + (std::min)( size() - v.size(), pos ) + v.size(); + const_iterator result = std::find_end( cbegin(), last, v.cbegin(), v.cend(), Traits::eq ); + + return result != last ? size_type( result - cbegin() ) : npos; + } + + nssv_constexpr14 size_type rfind( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return rfind( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr14 size_type rfind( CharT const * s, size_type pos, size_type n ) const // (3) + { + return rfind( basic_string_view( s, n ), pos ); + } + + nssv_constexpr14 size_type rfind( CharT const * s, size_type pos = npos ) const // (4) + { + return rfind( basic_string_view( s ), pos ); + } + + // find_first_of(), 4x: + + nssv_constexpr size_type find_first_of( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return pos >= size() + ? npos + : to_pos( std::find_first_of( cbegin() + pos, cend(), v.cbegin(), v.cend(), Traits::eq ) ); + } + + nssv_constexpr size_type find_first_of( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find_first_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_first_of( CharT const * s, size_type pos, size_type n ) const // (3) + { + return find_first_of( basic_string_view( s, n ), pos ); + } + + nssv_constexpr size_type find_first_of( CharT const * s, size_type pos = 0 ) const // (4) + { + return find_first_of( basic_string_view( s ), pos ); + } + + // find_last_of(), 4x: + + nssv_constexpr size_type find_last_of( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + return empty() + ? npos + : pos >= size() + ? find_last_of( v, size() - 1 ) + : to_pos( std::find_first_of( const_reverse_iterator( cbegin() + pos + 1 ), crend(), v.cbegin(), v.cend(), Traits::eq ) ); + } + + nssv_constexpr size_type find_last_of( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return find_last_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_last_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_last_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_last_of( CharT const * s, size_type pos = npos ) const // (4) + { + return find_last_of( basic_string_view( s ), pos ); + } + + // find_first_not_of(), 4x: + + nssv_constexpr size_type find_first_not_of( basic_string_view v, size_type pos = 0 ) const nssv_noexcept // (1) + { + return pos >= size() + ? npos + : to_pos( std::find_if( cbegin() + pos, cend(), not_in_view( v ) ) ); + } + + nssv_constexpr size_type find_first_not_of( CharT c, size_type pos = 0 ) const nssv_noexcept // (2) + { + return find_first_not_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_first_not_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_first_not_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_first_not_of( CharT const * s, size_type pos = 0 ) const // (4) + { + return find_first_not_of( basic_string_view( s ), pos ); + } + + // find_last_not_of(), 4x: + + nssv_constexpr size_type find_last_not_of( basic_string_view v, size_type pos = npos ) const nssv_noexcept // (1) + { + return empty() + ? npos + : pos >= size() + ? find_last_not_of( v, size() - 1 ) + : to_pos( std::find_if( const_reverse_iterator( cbegin() + pos + 1 ), crend(), not_in_view( v ) ) ); + } + + nssv_constexpr size_type find_last_not_of( CharT c, size_type pos = npos ) const nssv_noexcept // (2) + { + return find_last_not_of( basic_string_view( &c, 1 ), pos ); + } + + nssv_constexpr size_type find_last_not_of( CharT const * s, size_type pos, size_type count ) const // (3) + { + return find_last_not_of( basic_string_view( s, count ), pos ); + } + + nssv_constexpr size_type find_last_not_of( CharT const * s, size_type pos = npos ) const // (4) + { + return find_last_not_of( basic_string_view( s ), pos ); + } + + // Constants: + +#if nssv_CPP17_OR_GREATER + static nssv_constexpr size_type npos = size_type(-1); +#elif nssv_CPP11_OR_GREATER + enum : size_type { npos = size_type(-1) }; +#else + enum { npos = size_type(-1) }; +#endif + +private: + struct not_in_view + { + const basic_string_view v; + + nssv_constexpr explicit not_in_view( basic_string_view v_ ) : v( v_ ) {} + + nssv_constexpr bool operator()( CharT c ) const + { + return npos == v.find_first_of( c ); + } + }; + + nssv_constexpr size_type to_pos( const_iterator it ) const + { + return it == cend() ? npos : size_type( it - cbegin() ); + } + + nssv_constexpr size_type to_pos( const_reverse_iterator it ) const + { + return it == crend() ? npos : size_type( crend() - it - 1 ); + } + + nssv_constexpr const_reference data_at( size_type pos ) const + { +#if nssv_BETWEEN( nssv_COMPILER_GNUC_VERSION, 1, 500 ) + return data_[pos]; +#else + return assert( pos < size() ), data_[pos]; +#endif + } + +private: + const_pointer data_; + size_type size_; + +public: +#if nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS + + template< class Allocator > + basic_string_view( std::basic_string const & s ) nssv_noexcept + : data_( s.data() ) + , size_( s.size() ) + {} + +#if nssv_HAVE_EXPLICIT_CONVERSION + + template< class Allocator > + explicit operator std::basic_string() const + { + return to_string( Allocator() ); + } + +#endif // nssv_HAVE_EXPLICIT_CONVERSION + +#if nssv_CPP11_OR_GREATER + + template< class Allocator = std::allocator > + std::basic_string + to_string( Allocator const & a = Allocator() ) const + { + return std::basic_string( begin(), end(), a ); + } + +#else + + std::basic_string + to_string() const + { + return std::basic_string( begin(), end() ); + } + + template< class Allocator > + std::basic_string + to_string( Allocator const & a ) const + { + return std::basic_string( begin(), end(), a ); + } + +#endif // nssv_CPP11_OR_GREATER + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_CLASS_METHODS +}; + +// +// Non-member functions: +// + +// 24.4.3 Non-member comparison functions: +// lexicographically compare two string views (function template): + +template< class CharT, class Traits > +nssv_constexpr bool operator== ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +template< class CharT, class Traits > +nssv_constexpr bool operator!= ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +template< class CharT, class Traits > +nssv_constexpr bool operator< ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0; } + +template< class CharT, class Traits > +nssv_constexpr bool operator<= ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0; } + +template< class CharT, class Traits > +nssv_constexpr bool operator> ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0; } + +template< class CharT, class Traits > +nssv_constexpr bool operator>= ( + basic_string_view lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0; } + +// Let S be basic_string_view, and sv be an instance of S. +// Implementations shall provide sufficient additional overloads marked +// constexpr and noexcept so that an object t with an implicit conversion +// to S can be compared according to Table 67. + +#if ! nssv_CPP11_OR_GREATER || nssv_BETWEEN( nssv_COMPILER_MSVC_VERSION, 100, 141 ) + +// accommodate for older compilers: + +// == + +template< class CharT, class Traits> +nssv_constexpr bool operator==( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return lhs.size() == detail::length( rhs ) && lhs.compare( rhs ) == 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator==( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return detail::length( lhs ) == rhs.size() && rhs.compare( lhs ) == 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator==( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator==( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +// != + +template< class CharT, class Traits> +nssv_constexpr bool operator!=( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +template< class CharT, class Traits> +nssv_constexpr bool operator!=( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +template< class CharT, class Traits> +nssv_constexpr bool operator!=( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +template< class CharT, class Traits> +nssv_constexpr bool operator!=( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +// < + +template< class CharT, class Traits> +nssv_constexpr bool operator<( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return rhs.compare( lhs ) > 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return rhs.compare( lhs ) > 0; } + +// <= + +template< class CharT, class Traits> +nssv_constexpr bool operator<=( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<=( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return rhs.compare( lhs ) >= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<=( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator<=( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return rhs.compare( lhs ) >= 0; } + +// > + +template< class CharT, class Traits> +nssv_constexpr bool operator>( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return rhs.compare( lhs ) < 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return rhs.compare( lhs ) < 0; } + +// >= + +template< class CharT, class Traits> +nssv_constexpr bool operator>=( + basic_string_view lhs, + CharT const * rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>=( + CharT const * lhs, + basic_string_view rhs ) nssv_noexcept +{ return rhs.compare( lhs ) <= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>=( + basic_string_view lhs, + std::basic_string rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0; } + +template< class CharT, class Traits> +nssv_constexpr bool operator>=( + std::basic_string rhs, + basic_string_view lhs ) nssv_noexcept +{ return rhs.compare( lhs ) <= 0; } + +#else // newer compilers: + +#define nssv_BASIC_STRING_VIEW_I(T,U) typename std::decay< basic_string_view >::type + +#if defined(_MSC_VER) // issue 40 +# define nssv_MSVC_ORDER(x) , int=x +#else +# define nssv_MSVC_ORDER(x) /*, int=x*/ +#endif + +// == + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator==( + basic_string_view lhs, + nssv_BASIC_STRING_VIEW_I(CharT, Traits) rhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator==( + nssv_BASIC_STRING_VIEW_I(CharT, Traits) lhs, + basic_string_view rhs ) nssv_noexcept +{ return lhs.size() == rhs.size() && lhs.compare( rhs ) == 0; } + +// != + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator!= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator!= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return !( lhs == rhs ); } + +// < + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator< ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator< ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) < 0; } + +// <= + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator<= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator<= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) <= 0; } + +// > + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator> ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator> ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) > 0; } + +// >= + +template< class CharT, class Traits nssv_MSVC_ORDER(1) > +nssv_constexpr bool operator>= ( + basic_string_view < CharT, Traits > lhs, + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0; } + +template< class CharT, class Traits nssv_MSVC_ORDER(2) > +nssv_constexpr bool operator>= ( + nssv_BASIC_STRING_VIEW_I( CharT, Traits ) lhs, + basic_string_view < CharT, Traits > rhs ) nssv_noexcept +{ return lhs.compare( rhs ) >= 0; } + +#undef nssv_MSVC_ORDER +#undef nssv_BASIC_STRING_VIEW_I + +#endif // compiler-dependent approach to comparisons + +// 24.4.4 Inserters and extractors: + +#if ! nssv_CONFIG_NO_STREAM_INSERTION + +namespace detail { + +template< class Stream > +void write_padding( Stream & os, std::streamsize n ) +{ + for ( std::streamsize i = 0; i < n; ++i ) + os.rdbuf()->sputc( os.fill() ); +} + +template< class Stream, class View > +Stream & write_to_stream( Stream & os, View const & sv ) +{ + typename Stream::sentry sentry( os ); + + if ( !sentry ) + return os; + + const std::streamsize length = static_cast( sv.length() ); + + // Whether, and how, to pad: + const bool pad = ( length < os.width() ); + const bool left_pad = pad && ( os.flags() & std::ios_base::adjustfield ) == std::ios_base::right; + + if ( left_pad ) + write_padding( os, os.width() - length ); + + // Write span characters: + os.rdbuf()->sputn( sv.begin(), length ); + + if ( pad && !left_pad ) + write_padding( os, os.width() - length ); + + // Reset output stream width: + os.width( 0 ); + + return os; +} + +} // namespace detail + +template< class CharT, class Traits > +std::basic_ostream & +operator<<( + std::basic_ostream& os, + basic_string_view sv ) +{ + return detail::write_to_stream( os, sv ); +} + +#endif // nssv_CONFIG_NO_STREAM_INSERTION + +// Several typedefs for common character types are provided: + +typedef basic_string_view string_view; +typedef basic_string_view wstring_view; +#if nssv_HAVE_WCHAR16_T +typedef basic_string_view u16string_view; +typedef basic_string_view u32string_view; +#endif + +}} // namespace nonstd::sv_lite + +// +// 24.4.6 Suffix for basic_string_view literals: +// + +#if nssv_HAVE_USER_DEFINED_LITERALS + +namespace nonstd { +nssv_inline_ns namespace literals { +nssv_inline_ns namespace string_view_literals { + +#if nssv_CONFIG_STD_SV_OPERATOR && nssv_HAVE_STD_DEFINED_LITERALS + +nssv_constexpr nonstd::sv_lite::string_view operator "" sv( const char* str, size_t len ) nssv_noexcept // (1) +{ + return nonstd::sv_lite::string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u16string_view operator "" sv( const char16_t* str, size_t len ) nssv_noexcept // (2) +{ + return nonstd::sv_lite::u16string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u32string_view operator "" sv( const char32_t* str, size_t len ) nssv_noexcept // (3) +{ + return nonstd::sv_lite::u32string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::wstring_view operator "" sv( const wchar_t* str, size_t len ) nssv_noexcept // (4) +{ + return nonstd::sv_lite::wstring_view{ str, len }; +} + +#endif // nssv_CONFIG_STD_SV_OPERATOR && nssv_HAVE_STD_DEFINED_LITERALS + +#if nssv_CONFIG_USR_SV_OPERATOR + +nssv_constexpr nonstd::sv_lite::string_view operator "" _sv( const char* str, size_t len ) nssv_noexcept // (1) +{ + return nonstd::sv_lite::string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u16string_view operator "" _sv( const char16_t* str, size_t len ) nssv_noexcept // (2) +{ + return nonstd::sv_lite::u16string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::u32string_view operator "" _sv( const char32_t* str, size_t len ) nssv_noexcept // (3) +{ + return nonstd::sv_lite::u32string_view{ str, len }; +} + +nssv_constexpr nonstd::sv_lite::wstring_view operator "" _sv( const wchar_t* str, size_t len ) nssv_noexcept // (4) +{ + return nonstd::sv_lite::wstring_view{ str, len }; +} + +#endif // nssv_CONFIG_USR_SV_OPERATOR + +}}} // namespace nonstd::literals::string_view_literals + +#endif + +// +// Extensions for std::string: +// + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +namespace nonstd { +namespace sv_lite { + +// Exclude MSVC 14 (19.00): it yields ambiguous to_string(): + +#if nssv_CPP11_OR_GREATER && nssv_COMPILER_MSVC_VERSION != 140 + +template< class CharT, class Traits, class Allocator = std::allocator > +std::basic_string +to_string( basic_string_view v, Allocator const & a = Allocator() ) +{ + return std::basic_string( v.begin(), v.end(), a ); +} + +#else + +template< class CharT, class Traits > +std::basic_string +to_string( basic_string_view v ) +{ + return std::basic_string( v.begin(), v.end() ); +} + +template< class CharT, class Traits, class Allocator > +std::basic_string +to_string( basic_string_view v, Allocator const & a ) +{ + return std::basic_string( v.begin(), v.end(), a ); +} + +#endif // nssv_CPP11_OR_GREATER + +template< class CharT, class Traits, class Allocator > +basic_string_view +to_string_view( std::basic_string const & s ) +{ + return basic_string_view( s.data(), s.size() ); +} + +}} // namespace nonstd::sv_lite + +#endif // nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS + +// +// make types and algorithms available in namespace nonstd: +// + +namespace nonstd { + +using sv_lite::basic_string_view; +using sv_lite::string_view; +using sv_lite::wstring_view; + +#if nssv_HAVE_WCHAR16_T +using sv_lite::u16string_view; +#endif +#if nssv_HAVE_WCHAR32_T +using sv_lite::u32string_view; +#endif + +// literal "sv" + +using sv_lite::operator==; +using sv_lite::operator!=; +using sv_lite::operator<; +using sv_lite::operator<=; +using sv_lite::operator>; +using sv_lite::operator>=; + +#if ! nssv_CONFIG_NO_STREAM_INSERTION +using sv_lite::operator<<; +#endif + +#if nssv_CONFIG_CONVERSION_STD_STRING_FREE_FUNCTIONS +using sv_lite::to_string; +using sv_lite::to_string_view; +#endif + +} // namespace nonstd + +// 24.4.5 Hash support (C++11): + +// Note: The hash value of a string view object is equal to the hash value of +// the corresponding string object. + +#if nssv_HAVE_STD_HASH + +#include + +namespace std { + +template<> +struct hash< nonstd::string_view > +{ +public: + std::size_t operator()( nonstd::string_view v ) const nssv_noexcept + { + return std::hash()( std::string( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::wstring_view > +{ +public: + std::size_t operator()( nonstd::wstring_view v ) const nssv_noexcept + { + return std::hash()( std::wstring( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::u16string_view > +{ +public: + std::size_t operator()( nonstd::u16string_view v ) const nssv_noexcept + { + return std::hash()( std::u16string( v.data(), v.size() ) ); + } +}; + +template<> +struct hash< nonstd::u32string_view > +{ +public: + std::size_t operator()( nonstd::u32string_view v ) const nssv_noexcept + { + return std::hash()( std::u32string( v.data(), v.size() ) ); + } +}; + +} // namespace std + +#endif // nssv_HAVE_STD_HASH + +nssv_RESTORE_WARNINGS() + +#endif // nssv_HAVE_STD_STRING_VIEW +#endif // NONSTD_SV_LITE_H_INCLUDED +/* end file simdjson/nonstd/string_view.hpp */ +SIMDJSON_POP_DISABLE_WARNINGS + +namespace std { + using string_view = nonstd::string_view; +} +#endif // SIMDJSON_HAS_STRING_VIEW +#undef SIMDJSON_HAS_STRING_VIEW // We are not going to need this macro anymore. + +/// If EXPR is an error, returns it. +#define SIMDJSON_TRY(EXPR) { auto _err = (EXPR); if (_err) { return _err; } } + +// Unless the programmer has already set SIMDJSON_DEVELOPMENT_CHECKS, +// we want to set it under debug builds. We detect a debug build +// under Visual Studio when the _DEBUG macro is set. Under the other +// compilers, we use the fact that they define __OPTIMIZE__ whenever +// they allow optimizations. +// It is possible that this could miss some cases where SIMDJSON_DEVELOPMENT_CHECKS +// is helpful, but the programmer can set the macro SIMDJSON_DEVELOPMENT_CHECKS. +// It could also wrongly set SIMDJSON_DEVELOPMENT_CHECKS (e.g., if the programmer +// sets _DEBUG in a release build under Visual Studio, or if some compiler fails to +// set the __OPTIMIZE__ macro). +#ifndef SIMDJSON_DEVELOPMENT_CHECKS +#ifdef _MSC_VER +// Visual Studio seems to set _DEBUG for debug builds. +#ifdef _DEBUG +#define SIMDJSON_DEVELOPMENT_CHECKS 1 +#endif // _DEBUG +#else // _MSC_VER +// All other compilers appear to set __OPTIMIZE__ to a positive integer +// when the compiler is optimizing. +#ifndef __OPTIMIZE__ +#define SIMDJSON_DEVELOPMENT_CHECKS 1 +#endif // __OPTIMIZE__ +#endif // _MSC_VER +#endif // SIMDJSON_DEVELOPMENT_CHECKS + +// The SIMDJSON_CHECK_EOF macro is a feature flag for the "don't require padding" +// feature. + +#if SIMDJSON_CPLUSPLUS17 +// if we have C++, then fallthrough is a default attribute +# define simdjson_fallthrough [[fallthrough]] +// check if we have __attribute__ support +#elif defined(__has_attribute) +// check if we have the __fallthrough__ attribute +#if __has_attribute(__fallthrough__) +// we are good to go: +# define simdjson_fallthrough __attribute__((__fallthrough__)) +#endif // __has_attribute(__fallthrough__) +#endif // SIMDJSON_CPLUSPLUS17 +// on some systems, we simply do not have support for fallthrough, so use a default: +#ifndef simdjson_fallthrough +# define simdjson_fallthrough do {} while (0) /* fallthrough */ +#endif // simdjson_fallthrough + +#if SIMDJSON_DEVELOPMENT_CHECKS +#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { assert ((expr)); } while (0) +#else +#define SIMDJSON_DEVELOPMENT_ASSERT(expr) do { } while (0) +#endif + +#ifndef SIMDJSON_UTF8VALIDATION +#define SIMDJSON_UTF8VALIDATION 1 +#endif + +#ifdef __has_include +// How do we detect that a compiler supports vbmi2? +// For sure if the following header is found, we are ok? +#if __has_include() +#define SIMDJSON_COMPILER_SUPPORTS_VBMI2 1 +#endif +#endif + +#ifdef _MSC_VER +#if _MSC_VER >= 1920 +// Visual Studio 2019 and up support VBMI2 under x64 even if the header +// avx512vbmi2intrin.h is not found. +#define SIMDJSON_COMPILER_SUPPORTS_VBMI2 1 +#endif +#endif + +// By default, we allow AVX512. +#ifndef SIMDJSON_AVX512_ALLOWED +#define SIMDJSON_AVX512_ALLOWED 1 +#endif + +#endif // SIMDJSON_COMMON_DEFS_H +/* end file simdjson/common_defs.h */ + +// This provides the public API for simdjson. +// DOM and ondemand are amalgamated separately, in simdjson.h +/* including simdjson/simdjson_version.h: #include "simdjson/simdjson_version.h" */ +/* begin file simdjson/simdjson_version.h */ +// /include/simdjson/simdjson_version.h automatically generated by release.py, +// do not change by hand +#ifndef SIMDJSON_SIMDJSON_VERSION_H +#define SIMDJSON_SIMDJSON_VERSION_H + +/** The version of simdjson being used (major.minor.revision) */ +#define SIMDJSON_VERSION "3.6.2" + +namespace simdjson { +enum { + /** + * The major version (MAJOR.minor.revision) of simdjson being used. + */ + SIMDJSON_VERSION_MAJOR = 3, + /** + * The minor version (major.MINOR.revision) of simdjson being used. + */ + SIMDJSON_VERSION_MINOR = 6, + /** + * The revision (major.minor.REVISION) of simdjson being used. + */ + SIMDJSON_VERSION_REVISION = 2 +}; +} // namespace simdjson + +#endif // SIMDJSON_SIMDJSON_VERSION_H +/* end file simdjson/simdjson_version.h */ + +/* including simdjson/base.h: #include "simdjson/base.h" */ +/* begin file simdjson/base.h */ +/** + * @file Base declarations for all simdjson headers + * @private + */ +#ifndef SIMDJSON_BASE_H +#define SIMDJSON_BASE_H + +/* skipped duplicate #include "simdjson/common_defs.h" */ +/* skipped duplicate #include "simdjson/compiler_check.h" */ +/* including simdjson/error.h: #include "simdjson/error.h" */ +/* begin file simdjson/error.h */ +#ifndef SIMDJSON_ERROR_H +#define SIMDJSON_ERROR_H + +/* skipped duplicate #include "simdjson/base.h" */ + +#include +#include + +namespace simdjson { + +/** + * All possible errors returned by simdjson. These error codes are subject to change + * and not all simdjson kernel returns the same error code given the same input: it is not + * well defined which error a given input should produce. + * + * Only SUCCESS evaluates to false as a Boolean. All other error codes will evaluate + * to true as a Boolean. + */ +enum error_code { + SUCCESS = 0, ///< No error + CAPACITY, ///< This parser can't support a document that big + MEMALLOC, ///< Error allocating memory, most likely out of memory + TAPE_ERROR, ///< Something went wrong, this is a generic error + DEPTH_ERROR, ///< Your document exceeds the user-specified depth limitation + STRING_ERROR, ///< Problem while parsing a string + T_ATOM_ERROR, ///< Problem while parsing an atom starting with the letter 't' + F_ATOM_ERROR, ///< Problem while parsing an atom starting with the letter 'f' + N_ATOM_ERROR, ///< Problem while parsing an atom starting with the letter 'n' + NUMBER_ERROR, ///< Problem while parsing a number + UTF8_ERROR, ///< the input is not valid UTF-8 + UNINITIALIZED, ///< unknown error, or uninitialized document + EMPTY, ///< no structural element found + UNESCAPED_CHARS, ///< found unescaped characters in a string. + UNCLOSED_STRING, ///< missing quote at the end + UNSUPPORTED_ARCHITECTURE, ///< unsupported architecture + INCORRECT_TYPE, ///< JSON element has a different type than user expected + NUMBER_OUT_OF_RANGE, ///< JSON number does not fit in 64 bits + INDEX_OUT_OF_BOUNDS, ///< JSON array index too large + NO_SUCH_FIELD, ///< JSON field not found in object + IO_ERROR, ///< Error reading a file + INVALID_JSON_POINTER, ///< Invalid JSON pointer reference + INVALID_URI_FRAGMENT, ///< Invalid URI fragment + UNEXPECTED_ERROR, ///< indicative of a bug in simdjson + PARSER_IN_USE, ///< parser is already in use. + OUT_OF_ORDER_ITERATION, ///< tried to iterate an array or object out of order (checked when SIMDJSON_DEVELOPMENT_CHECKS=1) + INSUFFICIENT_PADDING, ///< The JSON doesn't have enough padding for simdjson to safely parse it. + INCOMPLETE_ARRAY_OR_OBJECT, ///< The document ends early. + SCALAR_DOCUMENT_AS_VALUE, ///< A scalar document is treated as a value. + OUT_OF_BOUNDS, ///< Attempted to access location outside of document. + TRAILING_CONTENT, ///< Unexpected trailing content in the JSON input + NUM_ERROR_CODES +}; + +/** + * It is the convention throughout the code that the macro SIMDJSON_DEVELOPMENT_CHECKS determines whether + * we check for OUT_OF_ORDER_ITERATION. The logic behind it is that these errors only occurs when the code + * that was written while breaking some simdjson::ondemand requirement. They should not occur in released + * code after these issues were fixed. + */ + +/** + * Get the error message for the given error code. + * + * dom::parser parser; + * dom::element doc; + * auto error = parser.parse("foo",3).get(doc); + * if (error) { printf("Error: %s\n", error_message(error)); } + * + * @return The error message. + */ +inline const char *error_message(error_code error) noexcept; + +/** + * Write the error message to the output stream + */ +inline std::ostream& operator<<(std::ostream& out, error_code error) noexcept; + +/** + * Exception thrown when an exception-supporting simdjson method is called + */ +struct simdjson_error : public std::exception { + /** + * Create an exception from a simdjson error code. + * @param error The error code + */ + simdjson_error(error_code error) noexcept : _error{error} { } + /** The error message */ + const char *what() const noexcept { return error_message(error()); } + /** The error code */ + error_code error() const noexcept { return _error; } +private: + /** The error code that was used */ + error_code _error; +}; + +namespace internal { + +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::simdjson_result_base { + * simdjson_result() noexcept : internal::simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct simdjson_result_base : protected std::pair { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline simdjson_result_base() noexcept; + + /** + * Create a new error result. + */ + simdjson_inline simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; + +}; // struct simdjson_result_base + +} // namespace internal + +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + */ +template +struct simdjson_result : public internal::simdjson_result_base { + /** + * @private Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline simdjson_result() noexcept; + /** + * @private Create a new successful result. + */ + simdjson_inline simdjson_result(T &&value) noexcept; + /** + * @private Create a new error result. + */ + simdjson_inline simdjson_result(error_code error_code) noexcept; + /** + * @private Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline simdjson_result(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_warn_unused simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; + +}; // struct simdjson_result + +#if SIMDJSON_EXCEPTIONS + +template +inline std::ostream& operator<<(std::ostream& out, simdjson_result value) { return out << value.value(); } +#endif // SIMDJSON_EXCEPTIONS + +#ifndef SIMDJSON_DISABLE_DEPRECATED_API +/** + * @deprecated This is an alias and will be removed, use error_code instead + */ +using ErrorValues [[deprecated("This is an alias and will be removed, use error_code instead")]] = error_code; + +/** + * @deprecated Error codes should be stored and returned as `error_code`, use `error_message()` instead. + */ +[[deprecated("Error codes should be stored and returned as `error_code`, use `error_message()` instead.")]] +inline const std::string error_message(int error) noexcept; +#endif // SIMDJSON_DISABLE_DEPRECATED_API +} // namespace simdjson + +#endif // SIMDJSON_ERROR_H +/* end file simdjson/error.h */ +/* skipped duplicate #include "simdjson/portability.h" */ + +/** + * @brief The top level simdjson namespace, containing everything the library provides. + */ +namespace simdjson { + +SIMDJSON_PUSH_DISABLE_UNUSED_WARNINGS + +/** The maximum document size supported by simdjson. */ +constexpr size_t SIMDJSON_MAXSIZE_BYTES = 0xFFFFFFFF; + +/** + * 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 + */ +constexpr size_t SIMDJSON_PADDING = 64; + +/** + * By default, simdjson supports this many nested objects and arrays. + * + * This is the default for parser::max_depth(). + */ +constexpr size_t DEFAULT_MAX_DEPTH = 1024; + +SIMDJSON_POP_DISABLE_UNUSED_WARNINGS + +class implementation; +struct padded_string; +class padded_string_view; +enum class stage1_mode; + +namespace internal { + +template +class atomic_ptr; +class dom_parser_implementation; +class escape_json_string; +class tape_ref; +struct value128; +enum class tape_type; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_BASE_H +/* end file simdjson/base.h */ + +/* skipped duplicate #include "simdjson/error.h" */ +/* including simdjson/error-inl.h: #include "simdjson/error-inl.h" */ +/* begin file simdjson/error-inl.h */ +#ifndef SIMDJSON_ERROR_INL_H +#define SIMDJSON_ERROR_INL_H + +/* skipped duplicate #include "simdjson/error.h" */ + +#include + +namespace simdjson { +namespace internal { + // We store the error code so we can validate the error message is associated with the right code + struct error_code_info { + error_code code; + const char* message; // do not use a fancy std::string where a simple C string will do (no alloc, no destructor) + }; + // These MUST match the codes in error_code. We check this constraint in basictests. + extern SIMDJSON_DLLIMPORTEXPORT const error_code_info error_codes[]; +} // namespace internal + + +inline const char *error_message(error_code error) noexcept { + // If you're using error_code, we're trusting you got it from the enum. + return internal::error_codes[int(error)].message; +} + +// deprecated function +#ifndef SIMDJSON_DISABLE_DEPRECATED_API +inline const std::string error_message(int error) noexcept { + if (error < 0 || error >= error_code::NUM_ERROR_CODES) { + return internal::error_codes[UNEXPECTED_ERROR].message; + } + return internal::error_codes[error].message; +} +#endif // SIMDJSON_DISABLE_DEPRECATED_API + +inline std::ostream& operator<<(std::ostream& out, error_code error) noexcept { + return out << error_message(error); +} + +namespace internal { + +// +// internal::simdjson_result_base inline implementation +// + +template +simdjson_inline void simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T&& simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline simdjson_result_base::simdjson_result_base(T &&value, error_code error) noexcept + : std::pair(std::forward(value), error) {} +template +simdjson_inline simdjson_result_base::simdjson_result_base(error_code error) noexcept + : simdjson_result_base(T{}, error) {} +template +simdjson_inline simdjson_result_base::simdjson_result_base(T &&value) noexcept + : simdjson_result_base(std::forward(value), SUCCESS) {} +template +simdjson_inline simdjson_result_base::simdjson_result_base() noexcept + : simdjson_result_base(T{}, UNINITIALIZED) {} + +} // namespace internal + +/// +/// simdjson_result inline implementation +/// + +template +simdjson_inline void simdjson_result::tie(T &value, error_code &error) && noexcept { + std::forward>(*this).tie(value, error); +} + +template +simdjson_warn_unused simdjson_inline error_code simdjson_result::get(T &value) && noexcept { + return std::forward>(*this).get(value); +} + +template +simdjson_inline error_code simdjson_result::error() const noexcept { + return internal::simdjson_result_base::error(); +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& simdjson_result::value() & noexcept(false) { + return internal::simdjson_result_base::value(); +} + +template +simdjson_inline T&& simdjson_result::value() && noexcept(false) { + return std::forward>(*this).value(); +} + +template +simdjson_inline T&& simdjson_result::take_value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline simdjson_result::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& simdjson_result::value_unsafe() const& noexcept { + return internal::simdjson_result_base::value_unsafe(); +} + +template +simdjson_inline T&& simdjson_result::value_unsafe() && noexcept { + return std::forward>(*this).value_unsafe(); +} + +template +simdjson_inline simdjson_result::simdjson_result(T &&value, error_code error) noexcept + : internal::simdjson_result_base(std::forward(value), error) {} +template +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : internal::simdjson_result_base(error) {} +template +simdjson_inline simdjson_result::simdjson_result(T &&value) noexcept + : internal::simdjson_result_base(std::forward(value)) {} +template +simdjson_inline simdjson_result::simdjson_result() noexcept + : internal::simdjson_result_base() {} + +} // namespace simdjson + +#endif // SIMDJSON_ERROR_INL_H +/* end file simdjson/error-inl.h */ +/* including simdjson/implementation.h: #include "simdjson/implementation.h" */ +/* begin file simdjson/implementation.h */ +#ifndef SIMDJSON_IMPLEMENTATION_H +#define SIMDJSON_IMPLEMENTATION_H + +/* including simdjson/internal/atomic_ptr.h: #include "simdjson/internal/atomic_ptr.h" */ +/* begin file simdjson/internal/atomic_ptr.h */ +#ifndef SIMDJSON_INTERNAL_ATOMIC_PTR_H +#define SIMDJSON_INTERNAL_ATOMIC_PTR_H + +/* skipped duplicate #include "simdjson/base.h" */ +#include + +namespace simdjson { +namespace internal { + +template +class atomic_ptr { +public: + atomic_ptr(T *_ptr) : ptr{_ptr} {} + + operator const T*() const { return ptr.load(); } + const T& operator*() const { return *ptr; } + const T* operator->() const { return ptr.load(); } + + operator T*() { return ptr.load(); } + T& operator*() { return *ptr; } + T* operator->() { return ptr.load(); } + atomic_ptr& operator=(T *_ptr) { ptr = _ptr; return *this; } + +private: + std::atomic ptr; +}; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_ATOMIC_PTR_H +/* end file simdjson/internal/atomic_ptr.h */ +/* including simdjson/internal/dom_parser_implementation.h: #include "simdjson/internal/dom_parser_implementation.h" */ +/* begin file simdjson/internal/dom_parser_implementation.h */ +#ifndef SIMDJSON_INTERNAL_DOM_PARSER_IMPLEMENTATION_H +#define SIMDJSON_INTERNAL_DOM_PARSER_IMPLEMENTATION_H + +/* skipped duplicate #include "simdjson/base.h" */ +/* skipped duplicate #include "simdjson/error.h" */ +#include + +namespace simdjson { + +namespace dom { +class document; +} // namespace dom + +/** +* This enum is used with the dom_parser_implementation::stage1 function. +* 1) The regular mode expects a fully formed JSON document. +* 2) The streaming_partial mode expects a possibly truncated +* input within a stream on JSON documents. +* 3) The stream_final mode allows us to truncate final +* unterminated strings. It is useful in conjunction with streaming_partial. +*/ +enum class stage1_mode { regular, streaming_partial, streaming_final}; + +/** + * Returns true if mode == streaming_partial or mode == streaming_final + */ +inline bool is_streaming(stage1_mode mode) { + // performance note: it is probably faster to check that mode is different + // from regular than checking that it is either streaming_partial or streaming_final. + return (mode != stage1_mode::regular); + // return (mode == stage1_mode::streaming_partial || mode == stage1_mode::streaming_final); +} + + +namespace internal { + + +/** + * An implementation of simdjson's DOM parser for a particular CPU architecture. + * + * This class is expected to be accessed only by pointer, and never move in memory (though the + * pointer can move). + */ +class dom_parser_implementation { +public: + + /** + * @private For internal implementation use + * + * Run a full JSON parse on a single document (stage1 + stage2). + * + * Guaranteed only to be called when capacity > document length. + * + * Overridden by each implementation. + * + * @param buf The json document to parse. *MUST* be allocated up to len + SIMDJSON_PADDING bytes. + * @param len The length of the json document. + * @return The error code, or SUCCESS if there was no error. + */ + simdjson_warn_unused virtual error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept = 0; + + /** + * @private For internal implementation use + * + * Stage 1 of the document parser. + * + * Guaranteed only to be called when capacity > document length. + * + * Overridden by each implementation. + * + * @param buf The json document to parse. + * @param len The length of the json document. + * @param streaming Whether this is being called by parser::parse_many. + * @return The error code, or SUCCESS if there was no error. + */ + simdjson_warn_unused virtual error_code stage1(const uint8_t *buf, size_t len, stage1_mode streaming) noexcept = 0; + + /** + * @private For internal implementation use + * + * Stage 2 of the document parser. + * + * Called after stage1(). + * + * Overridden by each implementation. + * + * @param doc The document to output to. + * @return The error code, or SUCCESS if there was no error. + */ + simdjson_warn_unused virtual error_code stage2(dom::document &doc) noexcept = 0; + + /** + * @private For internal implementation use + * + * Stage 2 of the document parser for parser::parse_many. + * + * Guaranteed only to be called after stage1(). + * Overridden by each implementation. + * + * @param doc The document to output to. + * @return The error code, SUCCESS if there was no error, or EMPTY if all documents have been parsed. + */ + simdjson_warn_unused virtual error_code stage2_next(dom::document &doc) noexcept = 0; + + /** + * Unescape a valid UTF-8 string from src to dst, stopping at a final unescaped quote. There + * must be an unescaped quote terminating the string. It returns the final output + * position as pointer. In case of error (e.g., the string has bad escaped codes), + * then null_nullptrptr is returned. It is assumed that the output buffer is large + * enough. E.g., if src points at 'joe"', then dst needs to have four free bytes + + * SIMDJSON_PADDING bytes. + * + * Overridden by each implementation. + * + * @param str pointer to the beginning of a valid UTF-8 JSON string, must end with an unescaped quote. + * @param dst pointer to a destination buffer, it must point a region in memory of sufficient size. + * @param allow_replacement whether we allow a replacement character when the UTF-8 contains unmatched surrogate pairs. + * @return end of the of the written region (exclusive) or nullptr in case of error. + */ + simdjson_warn_unused virtual uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept = 0; + + /** + * Unescape a NON-valid UTF-8 string from src to dst, stopping at a final unescaped quote. There + * must be an unescaped quote terminating the string. It returns the final output + * position as pointer. In case of error (e.g., the string has bad escaped codes), + * then null_nullptrptr is returned. It is assumed that the output buffer is large + * enough. E.g., if src points at 'joe"', then dst needs to have four free bytes + + * SIMDJSON_PADDING bytes. + * + * Overridden by each implementation. + * + * @param str pointer to the beginning of a possibly invalid UTF-8 JSON string, must end with an unescaped quote. + * @param dst pointer to a destination buffer, it must point a region in memory of sufficient size. + * @return end of the of the written region (exclusive) or nullptr in case of error. + */ + simdjson_warn_unused virtual uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept = 0; + + /** + * Change the capacity of this parser. + * + * The capacity can never exceed SIMDJSON_MAXSIZE_BYTES (e.g., 4 GB) + * and an CAPACITY error is returned if it is attempted. + * + * Generally used for reallocation. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. + * @return The error code, or SUCCESS if there was no error. + */ + virtual error_code set_capacity(size_t capacity) noexcept = 0; + + /** + * Change the max depth of this parser. + * + * Generally used for reallocation. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. + * @return The error code, or SUCCESS if there was no error. + */ + virtual error_code set_max_depth(size_t max_depth) noexcept = 0; + + /** + * Deallocate this parser. + */ + virtual ~dom_parser_implementation() = default; + + /** Number of structural indices passed from stage 1 to stage 2 */ + uint32_t n_structural_indexes{0}; + /** Structural indices passed from stage 1 to stage 2 */ + std::unique_ptr structural_indexes{}; + /** Next structural index to parse */ + uint32_t next_structural_index{0}; + + /** + * The largest document this parser can support without reallocating. + * + * @return Current capacity, in bytes. + */ + simdjson_inline size_t capacity() const noexcept; + + /** + * The maximum level of nested object and arrays supported by this parser. + * + * @return Maximum depth, in bytes. + */ + simdjson_inline size_t max_depth() const noexcept; + + /** + * Ensure this parser has enough memory to process JSON documents up to `capacity` bytes in length + * and `max_depth` depth. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. Defaults to DEFAULT_MAX_DEPTH. + * @return The error, if there is one. + */ + simdjson_warn_unused inline error_code allocate(size_t capacity, size_t max_depth) noexcept; + + +protected: + /** + * The maximum document length this parser supports. + * + * Buffers are large enough to handle any document up to this length. + */ + size_t _capacity{0}; + + /** + * The maximum depth (number of nested objects and arrays) supported by this parser. + * + * Defaults to DEFAULT_MAX_DEPTH. + */ + size_t _max_depth{0}; + + // Declaring these so that subclasses can use them to implement their constructors. + simdjson_inline dom_parser_implementation() noexcept; + simdjson_inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + simdjson_inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + + simdjson_inline dom_parser_implementation(const dom_parser_implementation &) noexcept = delete; + simdjson_inline dom_parser_implementation &operator=(const dom_parser_implementation &other) noexcept = delete; +}; // class dom_parser_implementation + +simdjson_inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +simdjson_inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +simdjson_inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +simdjson_inline size_t dom_parser_implementation::capacity() const noexcept { + return _capacity; +} + +simdjson_inline size_t dom_parser_implementation::max_depth() const noexcept { + return _max_depth; +} + +simdjson_warn_unused +inline error_code dom_parser_implementation::allocate(size_t capacity, size_t max_depth) noexcept { + if (this->max_depth() != max_depth) { + error_code err = set_max_depth(max_depth); + if (err) { return err; } + } + if (_capacity != capacity) { + error_code err = set_capacity(capacity); + if (err) { return err; } + } + return SUCCESS; +} + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/internal/dom_parser_implementation.h */ + +#include + +namespace simdjson { + +/** + * Validate the UTF-8 string. + * + * @param buf the string to validate. + * @param len the length of the string in bytes. + * @return true if the string is valid UTF-8. + */ +simdjson_warn_unused bool validate_utf8(const char * buf, size_t len) noexcept; +/** + * Validate the UTF-8 string. + * + * @param sv the string_view to validate. + * @return true if the string is valid UTF-8. + */ +simdjson_inline simdjson_warn_unused bool validate_utf8(const std::string_view sv) noexcept { + return validate_utf8(sv.data(), sv.size()); +} + +/** + * Validate the UTF-8 string. + * + * @param p the string to validate. + * @return true if the string is valid UTF-8. + */ +simdjson_inline simdjson_warn_unused bool validate_utf8(const std::string& s) noexcept { + return validate_utf8(s.data(), s.size()); +} + +/** + * 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. + */ +class implementation { +public: + + /** + * The name of this implementation. + * + * const implementation *impl = simdjson::get_active_implementation(); + * cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl; + * + * @return the name of the implementation, e.g. "haswell", "westmere", "arm64". + */ + virtual const std::string &name() const { return _name; } + + /** + * The description of this implementation. + * + * const implementation *impl = simdjson::get_active_implementation(); + * cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl; + * + * @return the description of the implementation, e.g. "Intel/AMD AVX2", "Intel/AMD SSE4.2", "ARM NEON". + */ + virtual const std::string &description() const { return _description; } + + /** + * The instruction sets this implementation is compiled against + * and the current CPU match. This function may poll the current CPU/system + * and should therefore not be called too often if performance is a concern. + * + * @return true if the implementation can be safely used on the current system (determined at runtime). + */ + bool supported_by_runtime_system() const; + + /** + * @private For internal implementation use + * + * The instruction sets this implementation is compiled against. + * + * @return a mask of all required `internal::instruction_set::` values. + */ + virtual uint32_t required_instruction_sets() const { return _required_instruction_sets; } + + /** + * @private For internal implementation use + * + * const implementation *impl = simdjson::get_active_implementation(); + * cout << "simdjson is optimized for " << impl->name() << "(" << impl->description() << ")" << endl; + * + * @param capacity The largest document that will be passed to the parser. + * @param max_depth The maximum JSON object/array nesting this parser is expected to handle. + * @param dst The place to put the resulting parser implementation. + * @return the error code, or SUCCESS if there was no error. + */ + virtual error_code create_dom_parser_implementation( + size_t capacity, + size_t max_depth, + std::unique_ptr &dst + ) const noexcept = 0; + + /** + * @private For internal implementation use + * + * Minify the input string assuming that it represents a JSON string, does not parse or validate. + * + * Overridden by each implementation. + * + * @param buf the json document to minify. + * @param len the length of the json document. + * @param dst the buffer to write the minified document to. *MUST* be allocated up to len + SIMDJSON_PADDING bytes. + * @param dst_len the number of bytes written. Output only. + * @return the error code, or SUCCESS if there was no error. + */ + simdjson_warn_unused virtual error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept = 0; + + + /** + * Validate the UTF-8 string. + * + * Overridden by each implementation. + * + * @param buf the string to validate. + * @param len the length of the string in bytes. + * @return true if and only if the string is valid UTF-8. + */ + simdjson_warn_unused virtual bool validate_utf8(const char *buf, size_t len) const noexcept = 0; + +protected: + /** @private Construct an implementation with the given name and description. For subclasses. */ + simdjson_inline implementation( + std::string_view name, + std::string_view description, + uint32_t required_instruction_sets + ) : + _name(name), + _description(description), + _required_instruction_sets(required_instruction_sets) + { + } + virtual ~implementation()=default; + +private: + /** + * The name of this implementation. + */ + const std::string _name; + + /** + * The description of this implementation. + */ + const std::string _description; + + /** + * Instruction sets required for this implementation. + */ + const uint32_t _required_instruction_sets; +}; + +/** @private */ +namespace internal { + +/** + * The list of available implementations compiled into simdjson. + */ +class available_implementation_list { +public: + /** Get the list of available implementations compiled into simdjson */ + simdjson_inline available_implementation_list() {} + /** Number of implementations */ + size_t size() const noexcept; + /** STL const begin() iterator */ + const implementation * const *begin() const noexcept; + /** STL const end() iterator */ + const implementation * const *end() const noexcept; + + /** + * Get the implementation with the given name. + * + * Case sensitive. + * + * const implementation *impl = simdjson::get_available_implementations()["westmere"]; + * if (!impl) { exit(1); } + * if (!imp->supported_by_runtime_system()) { exit(1); } + * simdjson::get_active_implementation() = impl; + * + * @param name the implementation to find, e.g. "westmere", "haswell", "arm64" + * @return the implementation, or nullptr if the parse failed. + */ + const implementation * operator[](const std::string_view &name) const noexcept { + for (const implementation * impl : *this) { + if (impl->name() == name) { return impl; } + } + return nullptr; + } + + /** + * Detect the most advanced implementation supported by the current host. + * + * This is used to initialize the implementation on startup. + * + * const implementation *impl = simdjson::available_implementation::detect_best_supported(); + * simdjson::get_active_implementation() = impl; + * + * @return the most advanced supported implementation for the current host, or an + * implementation that returns UNSUPPORTED_ARCHITECTURE if there is no supported + * implementation. Will never return nullptr. + */ + const implementation *detect_best_supported() const noexcept; +}; + +} // namespace internal + +/** + * The list of available implementations compiled into simdjson. + */ +extern SIMDJSON_DLLIMPORTEXPORT const internal::available_implementation_list& get_available_implementations(); + +/** + * The active implementation. + * + * Automatically initialized on first use to the most advanced implementation supported by this hardware. + */ +extern SIMDJSON_DLLIMPORTEXPORT internal::atomic_ptr& get_active_implementation(); + +} // namespace simdjson + +#endif // SIMDJSON_IMPLEMENTATION_H +/* end file simdjson/implementation.h */ +/* including simdjson/minify.h: #include "simdjson/minify.h" */ +/* begin file simdjson/minify.h */ +#ifndef SIMDJSON_MINIFY_H +#define SIMDJSON_MINIFY_H + +/* skipped duplicate #include "simdjson/base.h" */ +/* including simdjson/padded_string.h: #include "simdjson/padded_string.h" */ +/* begin file simdjson/padded_string.h */ +#ifndef SIMDJSON_PADDED_STRING_H +#define SIMDJSON_PADDED_STRING_H + +/* skipped duplicate #include "simdjson/base.h" */ +/* skipped duplicate #include "simdjson/error.h" */ + +/* skipped duplicate #include "simdjson/error-inl.h" */ + +#include +#include +#include +#include + +namespace simdjson { + +class padded_string_view; + +/** + * String with extra allocation for ease of use with parser::parse() + * + * This is a move-only class, it cannot be copied. + */ +struct padded_string final { + + /** + * Create a new, empty padded string. + */ + explicit inline padded_string() noexcept; + /** + * Create a new padded string buffer. + * + * @param length the size of the string. + */ + explicit inline padded_string(size_t length) noexcept; + /** + * Create a new padded string by copying the given input. + * + * @param data the buffer to copy + * @param length the number of bytes to copy + */ + explicit inline padded_string(const char *data, size_t length) noexcept; + /** + * Create a new padded string by copying the given input. + * + * @param str_ the string to copy + */ + inline padded_string(const std::string & str_ ) noexcept; + /** + * Create a new padded string by copying the given input. + * + * @param sv_ the string to copy + */ + inline padded_string(std::string_view sv_) noexcept; + /** + * Move one padded string into another. + * + * The original padded string will be reduced to zero capacity. + * + * @param o the string to move. + */ + inline padded_string(padded_string &&o) noexcept; + /** + * Move one padded string into another. + * + * The original padded string will be reduced to zero capacity. + * + * @param o the string to move. + */ + inline padded_string &operator=(padded_string &&o) noexcept; + inline void swap(padded_string &o) noexcept; + ~padded_string() noexcept; + + /** + * The length of the string. + * + * Does not include padding. + */ + size_t size() const noexcept; + + /** + * The length of the string. + * + * Does not include padding. + */ + size_t length() const noexcept; + + /** + * The string data. + **/ + const char *data() const noexcept; + const uint8_t *u8data() const noexcept { return static_cast(static_cast(data_ptr));} + + /** + * The string data. + **/ + char *data() noexcept; + + /** + * Create a std::string_view with the same content. + */ + operator std::string_view() const; + + /** + * Create a padded_string_view with the same content. + */ + operator padded_string_view() const noexcept; + + /** + * Load this padded string from a file. + * + * @return IO_ERROR on error. Be mindful that on some 32-bit systems, + * the file size might be limited to 2 GB. + * + * @param path the path to the file. + **/ + inline static simdjson_result load(std::string_view path) noexcept; + +private: + padded_string &operator=(const padded_string &o) = delete; + padded_string(const padded_string &o) = delete; + + size_t viable_size{0}; + char *data_ptr{nullptr}; + +}; // padded_string + +/** + * Send padded_string instance to an output stream. + * + * @param out The output stream. + * @param s The padded_string instance. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, const padded_string& s) { return out << s.data(); } + +#if SIMDJSON_EXCEPTIONS +/** + * Send padded_string instance to an output stream. + * + * @param out The output stream. + * @param s The padded_string instance. + * @throw simdjson_error if the result being printed has an error. If there is an error with the + * underlying output stream, that error will be propagated (simdjson_error will not be + * thrown). + */ +inline std::ostream& operator<<(std::ostream& out, simdjson_result &s) noexcept(false) { return out << s.value(); } +#endif + +} // namespace simdjson + +// This is deliberately outside of simdjson so that people get it without having to use the namespace +inline simdjson::padded_string operator "" _padded(const char *str, size_t len); + +namespace simdjson { +namespace internal { + +// The allocate_padded_buffer function is a low-level function to allocate memory +// with padding so we can read past the "length" bytes safely. It is used by +// the padded_string class automatically. It returns nullptr in case +// of error: the caller should check for a null pointer. +// The length parameter is the maximum size in bytes of the string. +// The caller is responsible to free the memory (e.g., delete[] (...)). +inline char *allocate_padded_buffer(size_t length) noexcept; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_PADDED_STRING_H +/* end file simdjson/padded_string.h */ +#include +#include +#include + +namespace simdjson { + +/** + * + * Minify the input string assuming that it represents a JSON string, does not parse or validate. + * This function is much faster than parsing a JSON string and then writing a minified version of it. + * However, it does not validate the input. It will merely return an error in simple cases (e.g., if + * there is a string that was never terminated). + * + * + * @param buf the json document to minify. + * @param len the length of the json document. + * @param dst the buffer to write the minified document to. *MUST* be allocated up to len bytes. + * @param dst_len the number of bytes written. Output only. + * @return the error code, or SUCCESS if there was no error. + */ +simdjson_warn_unused error_code minify(const char *buf, size_t len, char *dst, size_t &dst_len) noexcept; + +} // namespace simdjson + +#endif // SIMDJSON_MINIFY_H +/* end file simdjson/minify.h */ +/* skipped duplicate #include "simdjson/padded_string.h" */ +/* including simdjson/padded_string-inl.h: #include "simdjson/padded_string-inl.h" */ +/* begin file simdjson/padded_string-inl.h */ +#ifndef SIMDJSON_PADDED_STRING_INL_H +#define SIMDJSON_PADDED_STRING_INL_H + +/* skipped duplicate #include "simdjson/padded_string.h" */ +/* including simdjson/padded_string_view.h: #include "simdjson/padded_string_view.h" */ +/* begin file simdjson/padded_string_view.h */ +#ifndef SIMDJSON_PADDED_STRING_VIEW_H +#define SIMDJSON_PADDED_STRING_VIEW_H + +/* skipped duplicate #include "simdjson/portability.h" */ +/* skipped duplicate #include "simdjson/base.h" // for SIMDJSON_PADDING */ +/* skipped duplicate #include "simdjson/error.h" */ + +#include +#include +#include +#include + +namespace simdjson { + +/** + * User-provided string that promises it has extra padded bytes at the end for use with parser::parse(). + */ +class padded_string_view : public std::string_view { +private: + size_t _capacity; + +public: + /** Create an empty padded_string_view. */ + inline padded_string_view() noexcept = default; + + /** + * Promise the given buffer has at least SIMDJSON_PADDING extra bytes allocated to it. + * + * @param s The string. + * @param len The length of the string (not including padding). + * @param capacity The allocated length of the string, including padding. + */ + explicit inline padded_string_view(const char* s, size_t len, size_t capacity) noexcept; + /** overload explicit inline padded_string_view(const char* s, size_t len) noexcept */ + explicit inline padded_string_view(const uint8_t* s, size_t len, size_t capacity) noexcept; + + /** + * Promise the given string has at least SIMDJSON_PADDING extra bytes allocated to it. + * + * The capacity of the string will be used to determine its padding. + * + * @param s The string. + */ + explicit inline padded_string_view(const std::string &s) noexcept; + + /** + * Promise the given string_view has at least SIMDJSON_PADDING extra bytes allocated to it. + * + * @param s The string. + * @param capacity The allocated length of the string, including padding. + */ + explicit inline padded_string_view(std::string_view s, size_t capacity) noexcept; + + /** The number of allocated bytes. */ + inline size_t capacity() const noexcept; + + /** + * Remove the UTF-8 Byte Order Mark (BOM) if it exists. + * + * @return whether a BOM was found and removed + */ + inline bool remove_utf8_bom() noexcept; + + /** The amount of padding on the string (capacity() - length()) */ + inline size_t padding() const noexcept; + +}; // padded_string_view + +#if SIMDJSON_EXCEPTIONS +/** + * Send padded_string instance to an output stream. + * + * @param out The output stream. + * @param s The padded_string_view. + * @throw simdjson_error if the result being printed has an error. If there is an error with the + * underlying output stream, that error will be propagated (simdjson_error will not be + * thrown). + */ +inline std::ostream& operator<<(std::ostream& out, simdjson_result &s) noexcept(false); +#endif + +} // namespace simdjson + +#endif // SIMDJSON_PADDED_STRING_VIEW_H +/* end file simdjson/padded_string_view.h */ + +/* skipped duplicate #include "simdjson/error-inl.h" */ +/* including simdjson/padded_string_view-inl.h: #include "simdjson/padded_string_view-inl.h" */ +/* begin file simdjson/padded_string_view-inl.h */ +#ifndef SIMDJSON_PADDED_STRING_VIEW_INL_H +#define SIMDJSON_PADDED_STRING_VIEW_INL_H + +/* skipped duplicate #include "simdjson/padded_string_view.h" */ +/* skipped duplicate #include "simdjson/error-inl.h" */ + +#include /* memcmp */ + +namespace simdjson { + +inline padded_string_view::padded_string_view(const char* s, size_t len, size_t capacity) noexcept + : std::string_view(s, len), _capacity(capacity) +{ +} + +inline padded_string_view::padded_string_view(const uint8_t* s, size_t len, size_t capacity) noexcept + : padded_string_view(reinterpret_cast(s), len, capacity) +{ +} + +inline padded_string_view::padded_string_view(const std::string &s) noexcept + : std::string_view(s), _capacity(s.capacity()) +{ +} + +inline padded_string_view::padded_string_view(std::string_view s, size_t capacity) noexcept + : std::string_view(s), _capacity(capacity) +{ +} + +inline size_t padded_string_view::capacity() const noexcept { return _capacity; } + +inline size_t padded_string_view::padding() const noexcept { return capacity() - length(); } + +inline bool padded_string_view::remove_utf8_bom() noexcept { + if(length() < 3) { return false; } + if (std::memcmp(data(), "\xEF\xBB\xBF", 3) == 0) { + remove_prefix(3); + _capacity -= 3; + return true; + } + return false; +} + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson_result &s) noexcept(false) { return out << s.value(); } +#endif + +} // namespace simdjson + + +#endif // SIMDJSON_PADDED_STRING_VIEW_INL_H +/* end file simdjson/padded_string_view-inl.h */ + +#include + +namespace simdjson { +namespace internal { + +// The allocate_padded_buffer function is a low-level function to allocate memory +// with padding so we can read past the "length" bytes safely. It is used by +// the padded_string class automatically. It returns nullptr in case +// of error: the caller should check for a null pointer. +// The length parameter is the maximum size in bytes of the string. +// The caller is responsible to free the memory (e.g., delete[] (...)). +inline char *allocate_padded_buffer(size_t length) noexcept { + const size_t totalpaddedlength = length + SIMDJSON_PADDING; + if(totalpaddedlength(1UL<<20)) { + return nullptr; + } +#endif + + char *padded_buffer = new (std::nothrow) char[totalpaddedlength]; + if (padded_buffer == nullptr) { + return nullptr; + } + // We write nulls in the padded region to avoid having uninitialized + // content which may trigger warning for some sanitizers + std::memset(padded_buffer + length, 0, totalpaddedlength - length); + return padded_buffer; +} // allocate_padded_buffer() + +} // namespace internal + + +inline padded_string::padded_string() noexcept = default; +inline padded_string::padded_string(size_t length) noexcept + : viable_size(length), data_ptr(internal::allocate_padded_buffer(length)) { +} +inline padded_string::padded_string(const char *data, size_t length) noexcept + : viable_size(length), data_ptr(internal::allocate_padded_buffer(length)) { + if ((data != nullptr) && (data_ptr != nullptr)) { + std::memcpy(data_ptr, data, length); + } +} +// note: do not pass std::string arguments by value +inline padded_string::padded_string(const std::string & str_ ) noexcept + : viable_size(str_.size()), data_ptr(internal::allocate_padded_buffer(str_.size())) { + if (data_ptr != nullptr) { + std::memcpy(data_ptr, str_.data(), str_.size()); + } +} +// note: do pass std::string_view arguments by value +inline padded_string::padded_string(std::string_view sv_) noexcept + : viable_size(sv_.size()), data_ptr(internal::allocate_padded_buffer(sv_.size())) { + if(simdjson_unlikely(!data_ptr)) { + //allocation failed or zero size + viable_size = 0; + return; + } + if (sv_.size()) { + std::memcpy(data_ptr, sv_.data(), sv_.size()); + } +} +inline padded_string::padded_string(padded_string &&o) noexcept + : viable_size(o.viable_size), data_ptr(o.data_ptr) { + o.data_ptr = nullptr; // we take ownership +} + +inline padded_string &padded_string::operator=(padded_string &&o) noexcept { + delete[] data_ptr; + data_ptr = o.data_ptr; + viable_size = o.viable_size; + o.data_ptr = nullptr; // we take ownership + o.viable_size = 0; + return *this; +} + +inline void padded_string::swap(padded_string &o) noexcept { + size_t tmp_viable_size = viable_size; + char *tmp_data_ptr = data_ptr; + viable_size = o.viable_size; + data_ptr = o.data_ptr; + o.data_ptr = tmp_data_ptr; + o.viable_size = tmp_viable_size; +} + +inline padded_string::~padded_string() noexcept { + delete[] data_ptr; +} + +inline size_t padded_string::size() const noexcept { return viable_size; } + +inline size_t padded_string::length() const noexcept { return viable_size; } + +inline const char *padded_string::data() const noexcept { return data_ptr; } + +inline char *padded_string::data() noexcept { return data_ptr; } + +inline padded_string::operator std::string_view() const { return std::string_view(data(), length()); } + +inline padded_string::operator padded_string_view() const noexcept { + return padded_string_view(data(), length(), length() + SIMDJSON_PADDING); +} + +inline simdjson_result padded_string::load(std::string_view filename) noexcept { + // Open the file + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe + std::FILE *fp = std::fopen(filename.data(), "rb"); + SIMDJSON_POP_DISABLE_WARNINGS + + if (fp == nullptr) { + return IO_ERROR; + } + + // Get the file size + int ret; +#if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS + ret = _fseeki64(fp, 0, SEEK_END); +#else + ret = std::fseek(fp, 0, SEEK_END); +#endif // _WIN64 + if(ret < 0) { + std::fclose(fp); + return IO_ERROR; + } +#if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS + __int64 llen = _ftelli64(fp); + if(llen == -1L) { + std::fclose(fp); + return IO_ERROR; + } +#else + long llen = std::ftell(fp); + if((llen < 0) || (llen == LONG_MAX)) { + std::fclose(fp); + return IO_ERROR; + } +#endif + + // Allocate the padded_string + size_t len = static_cast(llen); + padded_string s(len); + if (s.data() == nullptr) { + std::fclose(fp); + return MEMALLOC; + } + + // Read the padded_string + std::rewind(fp); + size_t bytes_read = std::fread(s.data(), 1, len, fp); + if (std::fclose(fp) != 0 || bytes_read != len) { + return IO_ERROR; + } + + return s; +} + +} // namespace simdjson + +inline simdjson::padded_string operator "" _padded(const char *str, size_t len) { + return simdjson::padded_string(str, len); +} + +#endif // SIMDJSON_PADDED_STRING_INL_H +/* end file simdjson/padded_string-inl.h */ +/* skipped duplicate #include "simdjson/padded_string_view.h" */ +/* skipped duplicate #include "simdjson/padded_string_view-inl.h" */ + +/* including simdjson/dom.h: #include "simdjson/dom.h" */ +/* begin file simdjson/dom.h */ +#ifndef SIMDJSON_DOM_H +#define SIMDJSON_DOM_H + +/* including simdjson/dom/base.h: #include "simdjson/dom/base.h" */ +/* begin file simdjson/dom/base.h */ +#ifndef SIMDJSON_DOM_BASE_H +#define SIMDJSON_DOM_BASE_H + +/* skipped duplicate #include "simdjson/base.h" */ + +namespace simdjson { + +/** + * @brief A DOM API on top of the simdjson parser. + */ +namespace dom { + +/** The default batch size for parser.parse_many() and parser.load_many() */ +static constexpr size_t DEFAULT_BATCH_SIZE = 1000000; +/** + * Some adversary might try to set the batch size to 0 or 1, which might cause problems. + * We set a minimum of 32B since anything else is highly likely to be an error. In practice, + * most users will want a much larger batch size. + * + * All non-negative MINIMAL_BATCH_SIZE values should be 'safe' except that, obviously, no JSON + * document can ever span 0 or 1 byte and that very large values would create memory allocation issues. + */ +static constexpr size_t MINIMAL_BATCH_SIZE = 32; + +/** + * It is wasteful to allocate memory for tiny documents (e.g., 4 bytes). + */ +static constexpr size_t MINIMAL_DOCUMENT_CAPACITY = 32; + +class array; +class document; +class document_stream; +class element; +class key_value_pair; +class object; +class parser; + +#ifdef SIMDJSON_THREADS_ENABLED +struct stage1_worker; +#endif // SIMDJSON_THREADS_ENABLED + +} // namespace dom + +namespace internal { + +template +class string_builder; +class tape_ref; + +} // namespace internal + +} // namespace simdjson + +#endif // SIMDJSON_DOM_BASE_H +/* end file simdjson/dom/base.h */ +/* including simdjson/dom/array.h: #include "simdjson/dom/array.h" */ +/* begin file simdjson/dom/array.h */ +#ifndef SIMDJSON_DOM_ARRAY_H +#define SIMDJSON_DOM_ARRAY_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* including simdjson/internal/tape_ref.h: #include "simdjson/internal/tape_ref.h" */ +/* begin file simdjson/internal/tape_ref.h */ +#ifndef SIMDJSON_INTERNAL_TAPE_REF_H +#define SIMDJSON_INTERNAL_TAPE_REF_H + +/* skipped duplicate #include "simdjson/base.h" */ + +namespace simdjson { +namespace dom { +class document; +} // namespace dom + +namespace internal { + +/** + * A reference to an element on the tape. Internal only. + */ +class tape_ref { +public: + simdjson_inline tape_ref() noexcept; + simdjson_inline tape_ref(const dom::document *doc, size_t json_index) noexcept; + inline size_t after_element() const noexcept; + simdjson_inline tape_type tape_ref_type() const noexcept; + simdjson_inline uint64_t tape_value() const noexcept; + simdjson_inline bool is_double() const noexcept; + simdjson_inline bool is_int64() const noexcept; + simdjson_inline bool is_uint64() const noexcept; + simdjson_inline bool is_false() const noexcept; + simdjson_inline bool is_true() const noexcept; + simdjson_inline bool is_null_on_tape() const noexcept;// different name to avoid clash with is_null. + simdjson_inline uint32_t matching_brace_index() const noexcept; + simdjson_inline uint32_t scope_count() const noexcept; + template + simdjson_inline T next_tape_value() const noexcept; + simdjson_inline uint32_t get_string_length() const noexcept; + simdjson_inline const char * get_c_str() const noexcept; + inline std::string_view get_string_view() const noexcept; + simdjson_inline bool is_document_root() const noexcept; + simdjson_inline bool usable() const noexcept; + + /** The document this element references. */ + const dom::document *doc; + + /** The index of this element on `doc.tape[]` */ + size_t json_index; +}; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_TAPE_REF_H +/* end file simdjson/internal/tape_ref.h */ + +namespace simdjson { +namespace dom { + +/** + * JSON array. + */ +class array { +public: + /** Create a new, invalid array */ + simdjson_inline array() noexcept; + + class iterator { + public: + using value_type = element; + using difference_type = std::ptrdiff_t; + + /** + * Get the actual value + */ + inline value_type operator*() const noexcept; + /** + * Get the next value. + * + * Part of the std::iterator interface. + */ + inline iterator& operator++() noexcept; + /** + * Get the next value. + * + * Part of the std::iterator interface. + */ + inline iterator operator++(int) noexcept; + /** + * Check if these values come from the same place in the JSON. + * + * Part of the std::iterator interface. + */ + inline bool operator!=(const iterator& other) const noexcept; + inline bool operator==(const iterator& other) const noexcept; + + inline bool operator<(const iterator& other) const noexcept; + inline bool operator<=(const iterator& other) const noexcept; + inline bool operator>=(const iterator& other) const noexcept; + inline bool operator>(const iterator& other) const noexcept; + + iterator() noexcept = default; + iterator(const iterator&) noexcept = default; + iterator& operator=(const iterator&) noexcept = default; + private: + simdjson_inline iterator(const internal::tape_ref &tape) noexcept; + internal::tape_ref tape; + friend class array; + }; + + /** + * Return the first array element. + * + * Part of the std::iterable interface. + */ + inline iterator begin() const noexcept; + /** + * One past the last array element. + * + * Part of the std::iterable interface. + */ + inline iterator end() const noexcept; + /** + * 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. + */ + inline size_t size() const noexcept; + /** + * Get the total number of slots used by this array on the tape. + * + * 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. + **/ + inline size_t number_of_slots() const noexcept; + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * dom::parser parser; + * array a = parser.parse(R"([ { "foo": { "a": [ 10, 20, 30 ] }} ])"_padded); + * a.at_pointer("/0/foo/a/1") == 20 + * a.at_pointer("0")["foo"]["a"].at(1) == 20 + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) const noexcept; + + /** + * Get the value at the given index. This function has linear-time complexity and + * is equivalent to the following: + * + * size_t i=0; + * for (auto element : *this) { + * if (i == index) { return element; } + * i++; + * } + * return INDEX_OUT_OF_BOUNDS; + * + * Avoid calling the at() function repeatedly. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + inline simdjson_result at(size_t index) const noexcept; + +private: + simdjson_inline array(const internal::tape_ref &tape) noexcept; + internal::tape_ref tape; + friend class element; + friend struct simdjson_result; + template + friend class simdjson::internal::string_builder; +}; + + +} // namespace dom + +/** The result of a JSON conversion that may fail. */ +template<> +struct simdjson_result : public internal::simdjson_result_base { +public: + simdjson_inline simdjson_result() noexcept; ///< @private + simdjson_inline simdjson_result(dom::array value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + + inline simdjson_result at_pointer(std::string_view json_pointer) const noexcept; + inline simdjson_result at(size_t index) const noexcept; + +#if SIMDJSON_EXCEPTIONS + inline dom::array::iterator begin() const noexcept(false); + inline dom::array::iterator end() const noexcept(false); + inline size_t size() const noexcept(false); +#endif // SIMDJSON_EXCEPTIONS +}; + + + +} // namespace simdjson + +#if defined(__cpp_lib_ranges) +#include + +namespace std { +namespace ranges { +template<> +inline constexpr bool enable_view = true; +#if SIMDJSON_EXCEPTIONS +template<> +inline constexpr bool enable_view> = true; +#endif // SIMDJSON_EXCEPTIONS +} // namespace ranges +} // namespace std +#endif // defined(__cpp_lib_ranges) + +#endif // SIMDJSON_DOM_ARRAY_H +/* end file simdjson/dom/array.h */ +/* including simdjson/dom/document_stream.h: #include "simdjson/dom/document_stream.h" */ +/* begin file simdjson/dom/document_stream.h */ +#ifndef SIMDJSON_DOCUMENT_STREAM_H +#define SIMDJSON_DOCUMENT_STREAM_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* including simdjson/dom/parser.h: #include "simdjson/dom/parser.h" */ +/* begin file simdjson/dom/parser.h */ +#ifndef SIMDJSON_DOM_PARSER_H +#define SIMDJSON_DOM_PARSER_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* including simdjson/dom/document.h: #include "simdjson/dom/document.h" */ +/* begin file simdjson/dom/document.h */ +#ifndef SIMDJSON_DOM_DOCUMENT_H +#define SIMDJSON_DOM_DOCUMENT_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ + +#include + +namespace simdjson { +namespace dom { + +/** + * A parsed JSON document. + * + * This class cannot be copied, only moved, to avoid unintended allocations. + */ +class document { +public: + /** + * Create a document container with zero capacity. + * + * The parser will allocate capacity as needed. + */ + document() noexcept = default; + ~document() noexcept = default; + + /** + * Take another document's buffers. + * + * @param other The document to take. Its capacity is zeroed and it is invalidated. + */ + document(document &&other) noexcept = default; + /** @private */ + document(const document &) = delete; // Disallow copying + /** + * Take another document's buffers. + * + * @param other The document to take. Its capacity is zeroed. + */ + document &operator=(document &&other) noexcept = default; + /** @private */ + document &operator=(const document &) = delete; // Disallow copying + + /** + * Get the root element of this document as a JSON array. + */ + element root() const noexcept; + + /** + * @private Dump the raw tape for debugging. + * + * @param os the stream to output to. + * @return false if the tape is likely wrong (e.g., you did not parse a valid JSON). + */ + bool dump_raw_tape(std::ostream &os) const noexcept; + + /** @private Structural values. */ + std::unique_ptr tape{}; + + /** @private String values. + * + * Should be at least byte_capacity. + */ + std::unique_ptr string_buf{}; + /** @private Allocate memory to support + * input JSON documents of up to len bytes. + * + * When calling this function, you lose + * all the data. + * + * The memory allocation is strict: you + * can you use this function to increase + * or lower the amount of allocated memory. + * Passsing zero clears the memory. + */ + error_code allocate(size_t len) noexcept; + /** @private Capacity in bytes, in terms + * of how many bytes of input JSON we can + * support. + */ + size_t capacity() const noexcept; + + +private: + size_t allocated_capacity{0}; + friend class parser; +}; // class document + +} // namespace dom +} // namespace simdjson + +#endif // SIMDJSON_DOM_DOCUMENT_H +/* end file simdjson/dom/document.h */ + +namespace simdjson { + +namespace dom { + +/** + * A persistent document parser. + * + * The parser is designed to be reused, holding the internal buffers necessary to do parsing, + * as well as memory for a single document. The parsed document is overwritten on each parse. + * + * This class cannot be copied, only moved, to avoid unintended allocations. + * + * @note Moving a parser instance may invalidate "dom::element" instances. If you need to + * preserve both the "dom::element" instances and the parser, consider wrapping the parser + * instance in a std::unique_ptr instance: + * + * std::unique_ptr parser(new dom::parser{}); + * auto error = parser->load(f).get(root); + * + * You can then move std::unique_ptr safely. + * + * @note This is not thread safe: one parser cannot produce two documents at the same time! + */ +class parser { +public: + /** + * Create a JSON parser. + * + * The new parser will have zero capacity. + * + * @param max_capacity The maximum document length the parser can automatically handle. The parser + * will allocate more capacity on an as needed basis (when it sees documents too big to handle) + * up to this amount. The parser still starts with zero capacity no matter what this number is: + * to allocate an initial capacity, call allocate() after constructing the parser. + * Defaults to SIMDJSON_MAXSIZE_BYTES (the largest single document simdjson can process). + */ + simdjson_inline explicit parser(size_t max_capacity = SIMDJSON_MAXSIZE_BYTES) noexcept; + /** + * Take another parser's buffers and state. + * + * @param other The parser to take. Its capacity is zeroed. + */ + simdjson_inline parser(parser &&other) noexcept; + parser(const parser &) = delete; ///< @private Disallow copying + /** + * Take another parser's buffers and state. + * + * @param other The parser to take. Its capacity is zeroed. + */ + simdjson_inline parser &operator=(parser &&other) noexcept; + parser &operator=(const parser &) = delete; ///< @private Disallow copying + + /** Deallocate the JSON parser. */ + ~parser()=default; + + /** + * Load a JSON document from a file and return a reference to it. + * + * dom::parser parser; + * const element doc = parser.load("jsonexamples/twitter.json"); + * + * The function is eager: the file's content is loaded in memory inside the parser instance + * and immediately parsed. The file can be deleted after the `parser.load` call. + * + * ### IMPORTANT: Document Lifetime + * + * The JSON document still lives in the parser: this is the most efficient way to parse JSON + * documents because it reuses the same buffers, but you *must* use the document before you + * destroy the parser or call parse() again. + * + * Moving the parser instance is safe, but it invalidates the element instances. You may store + * the parser instance without moving it by wrapping it inside an `unique_ptr` instance like + * so: `std::unique_ptr parser(new dom::parser{});`. + * + * ### Parser Capacity + * + * If the parser's current capacity is less than the file length, it will allocate enough capacity + * to handle it (up to max_capacity). + * + * @param path The path to load. + * @return The document, or an error: + * - IO_ERROR if there was an error opening or reading the file. + * Be mindful that on some 32-bit systems, + * the file size might be limited to 2 GB. + * - MEMALLOC if the parser does not have enough capacity and memory allocation fails. + * - CAPACITY if the parser does not have enough capacity and len > max_capacity. + * - other json errors if parsing fails. You should not rely on these errors to always the same for the + * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). + */ + inline simdjson_result load(const std::string &path) & noexcept; + inline simdjson_result load(const std::string &path) && = delete ; + /** + * Parse a JSON document and return a temporary reference to it. + * + * dom::parser parser; + * element doc_root = parser.parse(buf, len); + * + * The function eagerly parses the input: the input can be modified and discarded after + * the `parser.parse(buf, len)` call has completed. + * + * ### IMPORTANT: Document Lifetime + * + * The JSON document still lives in the parser: this is the most efficient way to parse JSON + * documents because it reuses the same buffers, but you *must* use the document before you + * destroy the parser or call parse() again. + * + * Moving the parser instance is safe, but it invalidates the element instances. You may store + * the parser instance without moving it by wrapping it inside an `unique_ptr` instance like + * so: `std::unique_ptr parser(new dom::parser{});`. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * If realloc_if_needed is true (the default), it is assumed that the buffer does *not* have enough padding, + * and it is copied into an enlarged temporary buffer before parsing. Thus the following is safe: + * + * const char *json = R"({"key":"value"})"; + * const size_t json_len = std::strlen(json); + * simdjson::dom::parser parser; + * simdjson::dom::element element = parser.parse(json, json_len); + * + * If you set realloc_if_needed to false (e.g., parser.parse(json, json_len, false)), + * you must provide a buffer with at least SIMDJSON_PADDING extra bytes at the end. + * The benefit of setting realloc_if_needed to false is that you avoid a temporary + * memory allocation and a copy. + * + * The padded bytes may be read. It is not important how you initialize + * these bytes though we recommend a sensible default like null character values or spaces. + * For example, the following low-level code is safe: + * + * const char *json = R"({"key":"value"})"; + * const size_t json_len = std::strlen(json); + * std::unique_ptr padded_json_copy{new char[json_len + SIMDJSON_PADDING]}; + * std::memcpy(padded_json_copy.get(), json, json_len); + * std::memset(padded_json_copy.get() + json_len, '\0', SIMDJSON_PADDING); + * simdjson::dom::parser parser; + * simdjson::dom::element element = parser.parse(padded_json_copy.get(), json_len, false); + * + * ### Parser Capacity + * + * If the parser's current capacity is less than len, it will allocate enough capacity + * to handle it (up to max_capacity). + * + * @param buf The JSON to parse. Must have at least len + SIMDJSON_PADDING allocated bytes, unless + * realloc_if_needed is true. + * @param len The length of the JSON. + * @param realloc_if_needed Whether to reallocate and enlarge the JSON buffer to add padding. + * @return An element pointing at the root of the document, or an error: + * - MEMALLOC if realloc_if_needed is true or the parser does not have enough capacity, + * and memory allocation fails. + * - CAPACITY if the parser does not have enough capacity and len > max_capacity. + * - other json errors if parsing fails. You should not rely on these errors to always the same for the + * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). + */ + inline simdjson_result parse(const uint8_t *buf, size_t len, bool realloc_if_needed = true) & noexcept; + inline simdjson_result parse(const uint8_t *buf, size_t len, bool realloc_if_needed = true) && =delete; + /** @overload parse(const uint8_t *buf, size_t len, bool realloc_if_needed) */ + simdjson_inline simdjson_result parse(const char *buf, size_t len, bool realloc_if_needed = true) & noexcept; + simdjson_inline simdjson_result parse(const char *buf, size_t len, bool realloc_if_needed = true) && =delete; + /** @overload parse(const uint8_t *buf, size_t len, bool realloc_if_needed) */ + simdjson_inline simdjson_result parse(const std::string &s) & noexcept; + simdjson_inline simdjson_result parse(const std::string &s) && =delete; + /** @overload parse(const uint8_t *buf, size_t len, bool realloc_if_needed) */ + simdjson_inline simdjson_result parse(const padded_string &s) & noexcept; + simdjson_inline simdjson_result parse(const padded_string &s) && =delete; + /** @overload parse(const uint8_t *buf, size_t len, bool realloc_if_needed) */ + simdjson_inline simdjson_result parse(const padded_string_view &v) & noexcept; + simdjson_inline simdjson_result parse(const padded_string_view &v) && =delete; + + /** @private We do not want to allow implicit conversion from C string to std::string. */ + simdjson_inline simdjson_result parse(const char *buf) noexcept = delete; + + /** + * Parse a JSON document into a provide document instance and return a temporary reference to it. + * It is similar to the function `parse` except that instead of parsing into the internal + * `document` instance associated with the parser, it allows the user to provide a document + * instance. + * + * dom::parser parser; + * dom::document doc; + * element doc_root = parser.parse_into_document(doc, buf, len); + * + * The function eagerly parses the input: the input can be modified and discarded after + * the `parser.parse(buf, len)` call has completed. + * + * ### IMPORTANT: Document Lifetime + * + * After the call to parse_into_document, the parser is no longer needed. + * + * The JSON document lives in the document instance: you must keep the document + * instance alive while you navigate through it (i.e., used the returned value from + * parse_into_document). You are encourage to reuse the document instance + * many times with new data to avoid reallocations: + * + * dom::document doc; + * element doc_root1 = parser.parse_into_document(doc, buf1, len); + * //... doc_root1 is a pointer inside doc + * element doc_root2 = parser.parse_into_document(doc, buf1, len); + * //... doc_root2 is a pointer inside doc + * // at this point doc_root1 is no longer safe + * + * Moving the document instance is safe, but it invalidates the element instances. After + * moving a document, you can recover safe access to the document root with its `root()` method. + * + * @param doc The document instance where the parsed data will be stored (on success). + * @param buf The JSON to parse. Must have at least len + SIMDJSON_PADDING allocated bytes, unless + * realloc_if_needed is true. + * @param len The length of the JSON. + * @param realloc_if_needed Whether to reallocate and enlarge the JSON buffer to add padding. + * @return An element pointing at the root of document, or an error: + * - MEMALLOC if realloc_if_needed is true or the parser does not have enough capacity, + * and memory allocation fails. + * - CAPACITY if the parser does not have enough capacity and len > max_capacity. + * - other json errors if parsing fails. You should not rely on these errors to always the same for the + * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). + */ + inline simdjson_result parse_into_document(document& doc, const uint8_t *buf, size_t len, bool realloc_if_needed = true) & noexcept; + inline simdjson_result parse_into_document(document& doc, const uint8_t *buf, size_t len, bool realloc_if_needed = true) && =delete; + /** @overload parse_into_document(const uint8_t *buf, size_t len, bool realloc_if_needed) */ + simdjson_inline simdjson_result parse_into_document(document& doc, const char *buf, size_t len, bool realloc_if_needed = true) & noexcept; + simdjson_inline simdjson_result parse_into_document(document& doc, const char *buf, size_t len, bool realloc_if_needed = true) && =delete; + /** @overload parse_into_document(const uint8_t *buf, size_t len, bool realloc_if_needed) */ + simdjson_inline simdjson_result parse_into_document(document& doc, const std::string &s) & noexcept; + simdjson_inline simdjson_result parse_into_document(document& doc, const std::string &s) && =delete; + /** @overload parse_into_document(const uint8_t *buf, size_t len, bool realloc_if_needed) */ + simdjson_inline simdjson_result parse_into_document(document& doc, const padded_string &s) & noexcept; + simdjson_inline simdjson_result parse_into_document(document& doc, const padded_string &s) && =delete; + + /** @private We do not want to allow implicit conversion from C string to std::string. */ + simdjson_inline simdjson_result parse_into_document(document& doc, const char *buf) noexcept = delete; + + /** + * Load a file containing many JSON documents. + * + * dom::parser parser; + * for (const element doc : parser.load_many(path)) { + * cout << std::string(doc["title"]) << endl; + * } + * + * The file is loaded in memory and can be safely deleted after the `parser.load_many(path)` + * function has returned. The memory is held by the `parser` instance. + * + * The function is lazy: it may be that no more than one JSON document at a time is parsed. + * And, possibly, no document many have been parsed when the `parser.load_many(path)` function + * returned. + * + * If there is a UTF-8 BOM, the parser skips it. + * + * ### Format + * + * The file must contain a series of one or more JSON documents, concatenated into a single + * buffer, separated by whitespace. It effectively parses until it has a fully valid document, + * then starts parsing the next document at that point. (It does this with more parallelism and + * lookahead than you might think, though.) + * + * Documents that consist of an object or array may omit the whitespace between them, concatenating + * with no separator. documents that consist of a single primitive (i.e. documents that are not + * arrays or objects) MUST be separated with whitespace. + * + * The documents must not exceed batch_size bytes (by default 1MB) or they will fail to parse. + * Setting batch_size to excessively large or excesively small values may impact negatively the + * performance. + * + * ### Error Handling + * + * All errors are returned during iteration: if there is a global error such as memory allocation, + * it will be yielded as the first result. Iteration always stops after the first error. + * + * As with all other simdjson methods, non-exception error handling is readily available through + * the same interface, requiring you to check the error before using the document: + * + * dom::parser parser; + * dom::document_stream docs; + * auto error = parser.load_many(path).get(docs); + * if (error) { cerr << error << endl; exit(1); } + * for (auto doc : docs) { + * std::string_view title; + * if ((error = doc["title"].get(title)) { cerr << error << endl; exit(1); } + * cout << title << endl; + * } + * + * ### Threads + * + * When compiled with SIMDJSON_THREADS_ENABLED, this method will use a single thread under the + * hood to do some lookahead. + * + * ### Parser Capacity + * + * If the parser's current capacity is less than batch_size, it will allocate enough capacity + * to handle it (up to max_capacity). + * + * @param path File name pointing at the concatenated JSON to parse. + * @param batch_size The batch size to use. MUST be larger than the largest document. The sweet + * spot is cache-related: small enough to fit in cache, yet big enough to + * parse as many documents as possible in one tight loop. + * Defaults to 1MB (as simdjson::dom::DEFAULT_BATCH_SIZE), which has been a reasonable sweet + * spot in our tests. + * If you set the batch_size to a value smaller than simdjson::dom::MINIMAL_BATCH_SIZE + * (currently 32B), it will be replaced by simdjson::dom::MINIMAL_BATCH_SIZE. + * @return The stream, or an error. An empty input will yield 0 documents rather than an EMPTY error. Errors: + * - IO_ERROR if there was an error opening or reading the file. + * - MEMALLOC if the parser does not have enough capacity and memory allocation fails. + * - CAPACITY if the parser does not have enough capacity and batch_size > max_capacity. + * - other json errors if parsing fails. You should not rely on these errors to always the same for the + * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). + */ + inline simdjson_result load_many(const std::string &path, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept; + + /** + * Parse a buffer containing many JSON documents. + * + * dom::parser parser; + * for (element doc : parser.parse_many(buf, len)) { + * cout << std::string(doc["title"]) << endl; + * } + * + * No copy of the input buffer is made. + * + * The function is lazy: it may be that no more than one JSON document at a time is parsed. + * And, possibly, no document many have been parsed when the `parser.load_many(path)` function + * returned. + * + * The caller is responsabile to ensure that the input string data remains unchanged and is + * not deleted during the loop. In particular, the following is unsafe and will not compile: + * + * auto docs = parser.parse_many("[\"temporary data\"]"_padded); + * // here the string "[\"temporary data\"]" may no longer exist in memory + * // the parser instance may not have even accessed the input yet + * for (element doc : docs) { + * cout << std::string(doc["title"]) << endl; + * } + * + * The following is safe: + * + * auto json = "[\"temporary data\"]"_padded; + * auto docs = parser.parse_many(json); + * for (element doc : docs) { + * cout << std::string(doc["title"]) << endl; + * } + * + * If there is a UTF-8 BOM, the parser skips it. + * + * ### Format + * + * The buffer must contain a series of one or more JSON documents, concatenated into a single + * buffer, separated by whitespace. It effectively parses until it has a fully valid document, + * then starts parsing the next document at that point. (It does this with more parallelism and + * lookahead than you might think, though.) + * + * documents that consist of an object or array may omit the whitespace between them, concatenating + * with no separator. documents that consist of a single primitive (i.e. documents that are not + * arrays or objects) MUST be separated with whitespace. + * + * The documents must not exceed batch_size bytes (by default 1MB) or they will fail to parse. + * Setting batch_size to excessively large or excesively small values may impact negatively the + * performance. + * + * ### Error Handling + * + * All errors are returned during iteration: if there is a global error such as memory allocation, + * it will be yielded as the first result. Iteration always stops after the first error. + * + * As with all other simdjson methods, non-exception error handling is readily available through + * the same interface, requiring you to check the error before using the document: + * + * dom::parser parser; + * dom::document_stream docs; + * auto error = parser.load_many(path).get(docs); + * if (error) { cerr << error << endl; exit(1); } + * for (auto doc : docs) { + * std::string_view title; + * if ((error = doc["title"].get(title)) { cerr << error << endl; exit(1); } + * cout << title << endl; + * } + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * ### Threads + * + * When compiled with SIMDJSON_THREADS_ENABLED, this method will use a single thread under the + * hood to do some lookahead. + * + * ### Parser Capacity + * + * If the parser's current capacity is less than batch_size, it will allocate enough capacity + * to handle it (up to max_capacity). + * + * @param buf The concatenated JSON to parse. Must have at least len + SIMDJSON_PADDING allocated bytes. + * @param len The length of the concatenated JSON. + * @param batch_size The batch size to use. MUST be larger than the largest document. The sweet + * spot is cache-related: small enough to fit in cache, yet big enough to + * parse as many documents as possible in one tight loop. + * Defaults to 10MB, which has been a reasonable sweet spot in our tests. + * @return The stream, or an error. An empty input will yield 0 documents rather than an EMPTY error. Errors: + * - MEMALLOC if the parser does not have enough capacity and memory allocation fails + * - CAPACITY if the parser does not have enough capacity and batch_size > max_capacity. + * - other json errors if parsing fails. You should not rely on these errors to always the same for the + * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). + */ + inline simdjson_result parse_many(const uint8_t *buf, size_t len, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result parse_many(const char *buf, size_t len, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result parse_many(const std::string &s, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept; + inline simdjson_result parse_many(const std::string &&s, size_t batch_size) = delete;// unsafe + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result parse_many(const padded_string &s, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept; + inline simdjson_result parse_many(const padded_string &&s, size_t batch_size) = delete;// unsafe + + /** @private We do not want to allow implicit conversion from C string to std::string. */ + simdjson_result parse_many(const char *buf, size_t batch_size = dom::DEFAULT_BATCH_SIZE) noexcept = delete; + + /** + * Ensure this parser has enough memory to process JSON documents up to `capacity` bytes in length + * and `max_depth` depth. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. Defaults to DEFAULT_MAX_DEPTH. + * @return The error, if there is one. + */ + simdjson_warn_unused inline error_code allocate(size_t capacity, size_t max_depth = DEFAULT_MAX_DEPTH) noexcept; + +#ifndef SIMDJSON_DISABLE_DEPRECATED_API + /** + * @private deprecated because it returns bool instead of error_code, which is our standard for + * failures. Use allocate() instead. + * + * Ensure this parser has enough memory to process JSON documents up to `capacity` bytes in length + * and `max_depth` depth. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. Defaults to DEFAULT_MAX_DEPTH. + * @return true if successful, false if allocation failed. + */ + [[deprecated("Use allocate() instead.")]] + simdjson_warn_unused inline bool allocate_capacity(size_t capacity, size_t max_depth = DEFAULT_MAX_DEPTH) noexcept; +#endif // SIMDJSON_DISABLE_DEPRECATED_API + /** + * The largest document this parser can support without reallocating. + * + * @return Current capacity, in bytes. + */ + simdjson_inline size_t capacity() const noexcept; + + /** + * The largest document this parser can automatically support. + * + * The parser may reallocate internal buffers as needed up to this amount. + * + * @return Maximum capacity, in bytes. + */ + simdjson_inline size_t max_capacity() const noexcept; + + /** + * The maximum level of nested object and arrays supported by this parser. + * + * @return Maximum depth, in bytes. + */ + simdjson_inline size_t max_depth() const noexcept; + + /** + * Set max_capacity. This is the largest document this parser can automatically support. + * + * The parser may reallocate internal buffers as needed up to this amount as documents are passed + * to it. + * + * Note: To avoid limiting the memory to an absurd value, such as zero or two bytes, + * iff you try to set max_capacity to a value lower than MINIMAL_DOCUMENT_CAPACITY, + * then the maximal capacity is set to MINIMAL_DOCUMENT_CAPACITY. + * + * This call will not allocate or deallocate, even if capacity is currently above max_capacity. + * + * @param max_capacity The new maximum capacity, in bytes. + */ + simdjson_inline void set_max_capacity(size_t max_capacity) noexcept; + +#ifdef SIMDJSON_THREADS_ENABLED + /** + * The parser instance can use threads when they are available to speed up some + * operations. It is enabled by default. Changing this attribute will change the + * behavior of the parser for future operations. + */ + bool threaded{true}; +#endif + /** @private Use the new DOM API instead */ + class Iterator; + /** @private Use simdjson_error instead */ + using InvalidJSON [[deprecated("Use simdjson_error instead")]] = simdjson_error; + + /** @private [for benchmarking access] The implementation to use */ + std::unique_ptr implementation{}; + + /** @private Use `if (parser.parse(...).error())` instead */ + bool valid{false}; + /** @private Use `parser.parse(...).error()` instead */ + error_code error{UNINITIALIZED}; + + /** @private Use `parser.parse(...).value()` instead */ + document doc{}; + + /** @private returns true if the document parsed was valid */ + [[deprecated("Use the result of parser.parse() instead")]] + inline bool is_valid() const noexcept; + + /** + * @private return an error code corresponding to the last parsing attempt, see + * simdjson.h will return UNINITIALIZED if no parsing was attempted + */ + [[deprecated("Use the result of parser.parse() instead")]] + inline int get_error_code() const noexcept; + + /** @private return the string equivalent of "get_error_code" */ + [[deprecated("Use error_message() on the result of parser.parse() instead, or cout << error")]] + inline std::string get_error_message() const noexcept; + + /** @private */ + [[deprecated("Use cout << on the result of parser.parse() instead")]] + inline bool print_json(std::ostream &os) const noexcept; + + /** @private Private and deprecated: use `parser.parse(...).doc.dump_raw_tape()` instead */ + inline bool dump_raw_tape(std::ostream &os) const noexcept; + + +private: + /** + * The maximum document length this parser will automatically support. + * + * The parser will not be automatically allocated above this amount. + */ + size_t _max_capacity; + + /** + * The loaded buffer (reused each time load() is called) + */ + std::unique_ptr loaded_bytes; + + /** Capacity of loaded_bytes buffer. */ + size_t _loaded_bytes_capacity{0}; + + // all nodes are stored on the doc.tape using a 64-bit word. + // + // strings, double and ints are stored as + // a 64-bit word with a pointer to the actual value + // + // + // + // for objects or arrays, store [ or { at the beginning and } and ] at the + // end. For the openings ([ or {), we annotate them with a reference to the + // location on the doc.tape of the end, and for then closings (} and ]), we + // annotate them with a reference to the location of the opening + // + // + + /** + * Ensure we have enough capacity to handle at least desired_capacity bytes, + * and auto-allocate if not. This also allocates memory if needed in the + * internal document. + */ + inline error_code ensure_capacity(size_t desired_capacity) noexcept; + /** + * Ensure we have enough capacity to handle at least desired_capacity bytes, + * and auto-allocate if not. This also allocates memory if needed in the + * provided document. + */ + inline error_code ensure_capacity(document& doc, size_t desired_capacity) noexcept; + + /** Read the file into loaded_bytes */ + inline simdjson_result read_file(const std::string &path) noexcept; + + friend class parser::Iterator; + friend class document_stream; + + +}; // class parser + +} // namespace dom +} // namespace simdjson + +#endif // SIMDJSON_DOM_PARSER_H +/* end file simdjson/dom/parser.h */ + +#ifdef SIMDJSON_THREADS_ENABLED +#include +#include +#include +#endif + +namespace simdjson { +namespace dom { + +#ifdef SIMDJSON_THREADS_ENABLED +/** @private Custom worker class **/ +struct stage1_worker { + stage1_worker() noexcept = default; + stage1_worker(const stage1_worker&) = delete; + stage1_worker(stage1_worker&&) = delete; + stage1_worker operator=(const stage1_worker&) = delete; + ~stage1_worker(); + /** + * We only start the thread when it is needed, not at object construction, this may throw. + * You should only call this once. + **/ + void start_thread(); + /** + * Start a stage 1 job. You should first call 'run', then 'finish'. + * You must call start_thread once before. + */ + void run(document_stream * ds, dom::parser * stage1, size_t next_batch_start); + /** Wait for the run to finish (blocking). You should first call 'run', then 'finish'. **/ + void finish(); + +private: + + /** + * Normally, we would never stop the thread. But we do in the destructor. + * This function is only safe assuming that you are not waiting for results. You + * should have called run, then finish, and be done. + **/ + void stop_thread(); + + std::thread thread{}; + /** These three variables define the work done by the thread. **/ + dom::parser * stage1_thread_parser{}; + size_t _next_batch_start{}; + document_stream * owner{}; + /** + * We have two state variables. This could be streamlined to one variable in the future but + * we use two for clarity. + */ + bool has_work{false}; + bool can_work{true}; + + /** + * We lock using a mutex. + */ + std::mutex locking_mutex{}; + std::condition_variable cond_var{}; +}; +#endif + +/** + * A forward-only stream of documents. + * + * Produced by parser::parse_many. + * + */ +class document_stream { +public: + /** + * Construct an uninitialized document_stream. + * + * ```c++ + * document_stream docs; + * error = parser.parse_many(json).get(docs); + * ``` + */ + simdjson_inline document_stream() noexcept; + /** Move one document_stream to another. */ + simdjson_inline document_stream(document_stream &&other) noexcept = default; + /** Move one document_stream to another. */ + simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default; + + simdjson_inline ~document_stream() noexcept; + /** + * Returns the input size in bytes. + */ + inline size_t size_in_bytes() const noexcept; + /** + * After iterating through the stream, this method + * returns the number of bytes that were not parsed at the end + * of the stream. If truncated_bytes() differs from zero, + * then the input was truncated maybe because incomplete JSON + * documents were found at the end of the stream. You + * may need to process the bytes in the interval [size_in_bytes()-truncated_bytes(), size_in_bytes()). + * + * You should only call 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(); + * + */ + inline size_t truncated_bytes() const noexcept; + /** + * An iterator through a forward-only stream of documents. + */ + class iterator { + public: + using value_type = simdjson_result; + using reference = value_type; + + using difference_type = std::ptrdiff_t; + + using iterator_category = std::input_iterator_tag; + + /** + * Default constructor. + */ + simdjson_inline iterator() noexcept; + /** + * Get the current document (or error). + */ + simdjson_inline reference operator*() noexcept; + /** + * Advance to the next document (prefix). + */ + inline iterator& operator++() noexcept; + /** + * Check if we're at the end yet. + * @param other the end iterator to compare to. + */ + simdjson_inline bool operator!=(const iterator &other) const noexcept; + /** + * @private + * + * Gives the current index in the input document in bytes. + * + * document_stream stream = parser.parse_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * auto doc = *i; + * size_t index = i.current_index(); + * } + * + * This function (current_index()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + */ + simdjson_inline size_t current_index() const noexcept; + /** + * @private + * + * Gives a view of the current document. + * + * document_stream stream = parser.parse_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * auto doc = *i; + * std::string_view v = i->source(); + * } + * + * The returned string_view instance is simply a map to the (unparsed) + * source string: it may thus include white-space characters and all manner + * of padding. + * + * This function (source()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + */ + simdjson_inline std::string_view source() const noexcept; + + private: + simdjson_inline iterator(document_stream *s, bool finished) noexcept; + /** The document_stream we're iterating through. */ + document_stream* stream; + /** Whether we're finished or not. */ + bool finished; + friend class document_stream; + }; + + /** + * Start iterating the documents in the stream. + */ + simdjson_inline iterator begin() noexcept; + /** + * The end of the stream, for iterator comparison purposes. + */ + simdjson_inline iterator end() noexcept; + +private: + + document_stream &operator=(const document_stream &) = delete; // Disallow copying + document_stream(const document_stream &other) = delete; // Disallow copying + + /** + * Construct a document_stream. Does not allocate or parse anything until the iterator is + * used. + * + * @param parser is a reference to the parser instance used to generate this document_stream + * @param buf is the raw byte buffer we need to process + * @param len is the length of the raw byte buffer in bytes + * @param batch_size is the size of the windows (must be strictly greater or equal to the largest JSON document) + */ + simdjson_inline document_stream( + dom::parser &parser, + const uint8_t *buf, + size_t len, + size_t batch_size + ) noexcept; + + /** + * Parse the first document in the buffer. Used by begin(), to handle allocation and + * initialization. + */ + inline void start() noexcept; + + /** + * Parse the next document found in the buffer previously given to document_stream. + * + * The content should be a valid JSON document encoded as UTF-8. If there is a + * UTF-8 BOM, the parser skips it. + * + * You do NOT need to pre-allocate a parser. This function takes care of + * pre-allocating a capacity defined by the batch_size defined when creating the + * document_stream object. + * + * The function returns simdjson::EMPTY if there is no more data to be parsed. + * + * The function returns simdjson::SUCCESS (as integer = 0) in case of success + * and indicates that the buffer has successfully been parsed to the end. + * Every document it contained has been parsed without error. + * + * The function returns an error code from simdjson/simdjson.h in case of failure + * such as simdjson::CAPACITY, simdjson::MEMALLOC, simdjson::DEPTH_ERROR and so forth; + * the simdjson::error_message function converts these error codes into a string). + * + * You can also check validity by calling parser.is_valid(). The same parser can + * and should be reused for the other documents in the buffer. + */ + inline void next() noexcept; + + /** + * Pass the next batch through stage 1 and return when finished. + * When threads are enabled, this may wait for the stage 1 thread to finish. + */ + inline void load_batch() noexcept; + + /** Get the next document index. */ + inline size_t next_batch_start() const noexcept; + + /** Pass the next batch through stage 1 with the given parser. */ + inline error_code run_stage1(dom::parser &p, size_t batch_start) noexcept; + + dom::parser *parser; + const uint8_t *buf; + size_t len; + size_t batch_size; + /** The error (or lack thereof) from the current document. */ + error_code error; + size_t batch_start{0}; + size_t doc_index{}; +#ifdef SIMDJSON_THREADS_ENABLED + /** Indicates whether we use threads. Note that this needs to be a constant during the execution of the parsing. */ + bool use_thread; + + inline void load_from_stage1_thread() noexcept; + + /** Start a thread to run stage 1 on the next batch. */ + inline void start_stage1_thread() noexcept; + + /** Wait for the stage 1 thread to finish and capture the results. */ + inline void finish_stage1_thread() noexcept; + + /** The error returned from the stage 1 thread. */ + error_code stage1_thread_error{UNINITIALIZED}; + /** The thread used to run stage 1 against the next batch in the background. */ + friend struct stage1_worker; + std::unique_ptr worker{new(std::nothrow) stage1_worker()}; + /** + * The parser used to run stage 1 in the background. Will be swapped + * with the regular parser when finished. + */ + dom::parser stage1_thread_parser{}; +#endif // SIMDJSON_THREADS_ENABLED + + friend class dom::parser; + friend struct simdjson_result; + friend struct internal::simdjson_result_base; + +}; // class document_stream + +} // namespace dom + +template<> +struct simdjson_result : public internal::simdjson_result_base { +public: + simdjson_inline simdjson_result() noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result(dom::document_stream &&value) noexcept; ///< @private + +#if SIMDJSON_EXCEPTIONS + simdjson_inline dom::document_stream::iterator begin() noexcept(false); + simdjson_inline dom::document_stream::iterator end() noexcept(false); +#else // SIMDJSON_EXCEPTIONS +#ifndef SIMDJSON_DISABLE_DEPRECATED_API + [[deprecated("parse_many() and load_many() may return errors. Use document_stream stream; error = parser.parse_many().get(doc); instead.")]] + simdjson_inline dom::document_stream::iterator begin() noexcept; + [[deprecated("parse_many() and load_many() may return errors. Use document_stream stream; error = parser.parse_many().get(doc); instead.")]] + simdjson_inline dom::document_stream::iterator end() noexcept; +#endif // SIMDJSON_DISABLE_DEPRECATED_API +#endif // SIMDJSON_EXCEPTIONS +}; // struct simdjson_result + +} // namespace simdjson + +#endif // SIMDJSON_DOCUMENT_STREAM_H +/* end file simdjson/dom/document_stream.h */ +/* skipped duplicate #include "simdjson/dom/document.h" */ +/* including simdjson/dom/element.h: #include "simdjson/dom/element.h" */ +/* begin file simdjson/dom/element.h */ +#ifndef SIMDJSON_DOM_ELEMENT_H +#define SIMDJSON_DOM_ELEMENT_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/array.h" */ + +namespace simdjson { +namespace dom { + +/** + * The actual concrete type of a JSON element + * This is the type it is most easily cast to with get<>. + */ +enum class element_type { + ARRAY = '[', ///< dom::array + OBJECT = '{', ///< dom::object + INT64 = 'l', ///< int64_t + UINT64 = 'u', ///< uint64_t: any integer that fits in uint64_t but *not* int64_t + DOUBLE = 'd', ///< double: Any number with a "." or "e" that fits in double. + STRING = '"', ///< std::string_view + BOOL = 't', ///< bool + NULL_VALUE = 'n' ///< null +}; + +/** + * A JSON element. + * + * References an element in a JSON document, representing a JSON null, boolean, string, number, + * array or object. + */ +class element { +public: + /** Create a new, invalid element. */ + simdjson_inline element() noexcept; + + /** The type of this element. */ + simdjson_inline element_type type() const noexcept; + + /** + * 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. + */ + inline simdjson_result get_array() const noexcept; + /** + * 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. + */ + inline simdjson_result get_object() const noexcept; + /** + * Cast this element to a null-terminated C string. + * + * The string is guaranteed to be valid UTF-8. + * + * The length of the string is given by get_string_length(). Because JSON strings + * may contain null characters, it may be incorrect to use strlen to determine the + * string length. + * + * 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. + */ + inline simdjson_result get_c_str() const noexcept; + /** + * Gives the length in bytes of the string. + * + * 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. + */ + inline simdjson_result get_string_length() const noexcept; + /** + * Cast this element to a string. + * + * 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. + */ + inline simdjson_result get_string() const noexcept; + /** + * 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. + */ + inline simdjson_result get_int64() const noexcept; + /** + * 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. + */ + inline simdjson_result get_uint64() const noexcept; + /** + * Cast this element to a double floating-point. + * + * @returns A double value. + * Returns INCORRECT_TYPE if the JSON element is not a number. + */ + inline simdjson_result get_double() const noexcept; + /** + * Cast this element to a bool. + * + * @returns A bool value. + * Returns INCORRECT_TYPE if the JSON element is not a boolean. + */ + inline simdjson_result get_bool() const noexcept; + + /** + * Whether this element is a json array. + * + * Equivalent to is(). + */ + inline bool is_array() const noexcept; + /** + * Whether this element is a json object. + * + * Equivalent to is(). + */ + inline bool is_object() const noexcept; + /** + * Whether this element is a json string. + * + * Equivalent to is() or is(). + */ + inline bool is_string() const noexcept; + /** + * Whether this element is a json number that fits in a signed 64-bit integer. + * + * Equivalent to is(). + */ + inline bool is_int64() const noexcept; + /** + * Whether this element is a json number that fits in an unsigned 64-bit integer. + * + * Equivalent to is(). + */ + inline bool is_uint64() const noexcept; + /** + * Whether this element is a json number that fits in a double. + * + * Equivalent to is(). + */ + inline bool is_double() const noexcept; + + /** + * Whether this element is a json number. + * + * Both integers and floating points will return true. + */ + inline bool is_number() const noexcept; + + /** + * Whether this element is a json `true` or `false`. + * + * Equivalent to is(). + */ + inline bool is_bool() const noexcept; + /** + * Whether this element is a json `null`. + */ + inline bool is_null() const noexcept; + + /** + * Tell whether the value can be cast to provided type (T). + * + * Supported types: + * - Boolean: bool + * - Number: double, uint64_t, int64_t + * - String: std::string_view, const char * + * - Array: dom::array + * - Object: dom::object + * + * @tparam T bool, double, uint64_t, int64_t, std::string_view, const char *, dom::array, dom::object + */ + template + simdjson_inline bool is() const noexcept; + + /** + * Get the value as the provided type (T). + * + * Supported types: + * - Boolean: bool + * - Number: double, uint64_t, int64_t + * - String: std::string_view, const char * + * - Array: dom::array + * - Object: dom::object + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array() or get_string() instead. + * + * @tparam T bool, double, uint64_t, int64_t, std::string_view, const char *, dom::array, dom::object + * + * @returns The value cast to the given type, or: + * INCORRECT_TYPE if the value cannot be cast to the given type. + */ + + template + inline simdjson_result get() const noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are Boolean (bool), numbers (double, uint64_t, int64_t), " + "strings (std::string_view, const char *), arrays (dom::array) and objects (dom::object). " + "We recommand you use get_double(), get_bool(), get_uint64(), get_int64(), " + "get_object(), get_array() or get_string() instead of the get template."); + } + + /** + * Get the value as the provided type (T). + * + * Supported types: + * - Boolean: bool + * - Number: double, uint64_t, int64_t + * - String: std::string_view, const char * + * - Array: dom::array + * - Object: dom::object + * + * @tparam T bool, double, uint64_t, int64_t, std::string_view, const char *, dom::array, dom::object + * + * @param value The variable to set to the value. May not be set if there is an error. + * + * @returns The error that occurred, or SUCCESS if there was no error. + */ + template + simdjson_warn_unused simdjson_inline error_code get(T &value) const noexcept; + + /** + * Get the value as the provided type (T), setting error if it's not the given type. + * + * Supported types: + * - Boolean: bool + * - Number: double, uint64_t, int64_t + * - String: std::string_view, const char * + * - Array: dom::array + * - Object: dom::object + * + * @tparam T bool, double, uint64_t, int64_t, std::string_view, const char *, dom::array, dom::object + * + * @param value The variable to set to the given type. value is undefined if there is an error. + * @param error The variable to store the error. error is set to error_code::SUCCEED if there is an error. + */ + template + inline void tie(T &value, error_code &error) && noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Read this element as a boolean. + * + * @return The boolean value + * @exception simdjson_error(INCORRECT_TYPE) if the JSON element is not a boolean. + */ + inline operator bool() const noexcept(false); + + /** + * Read this element as a null-terminated UTF-8 string. + * + * Be mindful that JSON allows strings to contain null characters. + * + * Does *not* convert other types to a string; requires that the JSON type of the element was + * an actual string. + * + * @return The string value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON element is not a string. + */ + inline explicit operator const char*() const noexcept(false); + + /** + * Read this element as a null-terminated UTF-8 string. + * + * Does *not* convert other types to a string; requires that the JSON type of the element was + * an actual string. + * + * @return The string value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON element is not a string. + */ + inline operator std::string_view() const noexcept(false); + + /** + * Read this element as an unsigned integer. + * + * @return The integer value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON element is not an integer + * @exception simdjson_error(NUMBER_OUT_OF_RANGE) if the integer doesn't fit in 64 bits or is negative + */ + inline operator uint64_t() const noexcept(false); + /** + * Read this element as an signed integer. + * + * @return The integer value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON element is not an integer + * @exception simdjson_error(NUMBER_OUT_OF_RANGE) if the integer doesn't fit in 64 bits + */ + inline operator int64_t() const noexcept(false); + /** + * Read this element as an double. + * + * @return The double value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON element is not a number + * @exception simdjson_error(NUMBER_OUT_OF_RANGE) if the integer doesn't fit in 64 bits or is negative + */ + inline operator double() const noexcept(false); + /** + * Read this element as a JSON array. + * + * @return The JSON array. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON element is not an array + */ + inline operator array() const noexcept(false); + /** + * Read this element as a JSON object (key/value pairs). + * + * @return The JSON object. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON element is not an object + */ + inline operator object() const noexcept(false); + + /** + * Iterate over each element in this array. + * + * @return The beginning of the iteration. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON element is not an array + */ + inline dom::array::iterator begin() const noexcept(false); + + /** + * Iterate over each element in this array. + * + * @return The end of the iteration. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON element is not an array + */ + inline dom::array::iterator end() const noexcept(false); +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the value associated with the given key. + * + * The key will be matched against **unescaped** JSON: + * + * dom::parser parser; + * int64_t(parser.parse(R"({ "a\n": 1 })"_padded)["a\n"]) == 1 + * parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get_uint64().error() == NO_SUCH_FIELD + * + * @return The value associated with this field, or: + * - NO_SUCH_FIELD if the field does not exist in the object + * - INCORRECT_TYPE if this is not an object + */ + inline simdjson_result operator[](std::string_view key) const noexcept; + + /** + * Get the value associated with the given key. + * + * The key will be matched against **unescaped** JSON: + * + * dom::parser parser; + * int64_t(parser.parse(R"({ "a\n": 1 })"_padded)["a\n"]) == 1 + * parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get_uint64().error() == NO_SUCH_FIELD + * + * @return The value associated with this field, or: + * - NO_SUCH_FIELD if the field does not exist in the object + * - INCORRECT_TYPE if this is not an object + */ + inline simdjson_result operator[](const char *key) const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * dom::parser parser; + * element doc = parser.parse(R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded); + * doc.at_pointer("/foo/a/1") == 20 + * doc.at_pointer("/foo")["a"].at(1) == 20 + * doc.at_pointer("")["foo"]["a"].at(1) == 20 + * + * It is allowed for a key to be the empty string: + * + * dom::parser parser; + * object obj = parser.parse(R"({ "": { "a": [ 10, 20, 30 ] }})"_padded); + * obj.at_pointer("//a/1") == 20 + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(const std::string_view json_pointer) const noexcept; + +#ifndef SIMDJSON_DISABLE_DEPRECATED_API + /** + * + * Version 0.4 of simdjson used an incorrect interpretation of the JSON Pointer standard + * and allowed the following : + * + * dom::parser parser; + * element doc = parser.parse(R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded); + * doc.at("foo/a/1") == 20 + * + * Though it is intuitive, it is not compliant with RFC 6901 + * https://tools.ietf.org/html/rfc6901 + * + * For standard compliance, use the at_pointer function instead. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + [[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]] + inline simdjson_result at(const std::string_view json_pointer) const noexcept; +#endif // SIMDJSON_DISABLE_DEPRECATED_API + + /** + * Get the value at the given index. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + inline simdjson_result at(size_t index) const noexcept; + + /** + * Get the value associated with the given key. + * + * The key will be matched against **unescaped** JSON: + * + * dom::parser parser; + * int64_t(parser.parse(R"({ "a\n": 1 })"_padded)["a\n"]) == 1 + * parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get_uint64().error() == NO_SUCH_FIELD + * + * @return The value associated with this field, or: + * - NO_SUCH_FIELD if the field does not exist in the object + */ + inline simdjson_result at_key(std::string_view key) const noexcept; + + /** + * Get the value associated with the given key in a case-insensitive manner. + * + * Note: The key will be matched against **unescaped** JSON. + * + * @return The value associated with this field, or: + * - NO_SUCH_FIELD if the field does not exist in the object + */ + inline simdjson_result at_key_case_insensitive(std::string_view key) const noexcept; + + /** + * operator< defines a total order for element allowing to use them in + * ordered C++ STL containers + * + * @return TRUE if the key appears before the other one in the tape + */ + inline bool operator<(const element &other) const noexcept; + + /** + * operator== allows to verify if two element values reference the + * same JSON item + * + * @return TRUE if the two values references the same JSON element + */ + inline bool operator==(const element &other) const noexcept; + + /** @private for debugging. Prints out the root element. */ + inline bool dump_raw_tape(std::ostream &out) const noexcept; + +private: + simdjson_inline element(const internal::tape_ref &tape) noexcept; + internal::tape_ref tape; + friend class document; + friend class object; + friend class array; + friend struct simdjson_result; + template + friend class simdjson::internal::string_builder; + +}; + +} // namespace dom + +/** The result of a JSON navigation that may fail. */ +template<> +struct simdjson_result : public internal::simdjson_result_base { +public: + simdjson_inline simdjson_result() noexcept; ///< @private + simdjson_inline simdjson_result(dom::element &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + + simdjson_inline simdjson_result type() const noexcept; + template + simdjson_inline bool is() const noexcept; + template + simdjson_inline simdjson_result get() const noexcept; + template + simdjson_warn_unused simdjson_inline error_code get(T &value) const noexcept; + + simdjson_inline simdjson_result get_array() const noexcept; + simdjson_inline simdjson_result get_object() const noexcept; + simdjson_inline simdjson_result get_c_str() const noexcept; + simdjson_inline simdjson_result get_string_length() const noexcept; + simdjson_inline simdjson_result get_string() const noexcept; + simdjson_inline simdjson_result get_int64() const noexcept; + simdjson_inline simdjson_result get_uint64() const noexcept; + simdjson_inline simdjson_result get_double() const noexcept; + simdjson_inline simdjson_result get_bool() const noexcept; + + simdjson_inline bool is_array() const noexcept; + simdjson_inline bool is_object() const noexcept; + simdjson_inline bool is_string() const noexcept; + simdjson_inline bool is_int64() const noexcept; + simdjson_inline bool is_uint64() const noexcept; + simdjson_inline bool is_double() const noexcept; + simdjson_inline bool is_number() const noexcept; + simdjson_inline bool is_bool() const noexcept; + simdjson_inline bool is_null() const noexcept; + + simdjson_inline simdjson_result operator[](std::string_view key) const noexcept; + simdjson_inline simdjson_result operator[](const char *key) const noexcept; + simdjson_inline simdjson_result at_pointer(const std::string_view json_pointer) const noexcept; + [[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]] + simdjson_inline simdjson_result at(const std::string_view json_pointer) const noexcept; + simdjson_inline simdjson_result at(size_t index) const noexcept; + simdjson_inline simdjson_result at_key(std::string_view key) const noexcept; + simdjson_inline simdjson_result at_key_case_insensitive(std::string_view key) const noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator bool() const noexcept(false); + simdjson_inline explicit operator const char*() const noexcept(false); + simdjson_inline operator std::string_view() const noexcept(false); + simdjson_inline operator uint64_t() const noexcept(false); + simdjson_inline operator int64_t() const noexcept(false); + simdjson_inline operator double() const noexcept(false); + simdjson_inline operator dom::array() const noexcept(false); + simdjson_inline operator dom::object() const noexcept(false); + + simdjson_inline dom::array::iterator begin() const noexcept(false); + simdjson_inline dom::array::iterator end() const noexcept(false); +#endif // SIMDJSON_EXCEPTIONS +}; + +} // namespace simdjson + +#endif // SIMDJSON_DOM_DOCUMENT_H +/* end file simdjson/dom/element.h */ +/* including simdjson/dom/object.h: #include "simdjson/dom/object.h" */ +/* begin file simdjson/dom/object.h */ +#ifndef SIMDJSON_DOM_OBJECT_H +#define SIMDJSON_DOM_OBJECT_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/element.h" */ +/* skipped duplicate #include "simdjson/internal/tape_ref.h" */ + +namespace simdjson { +namespace dom { + +/** + * JSON object. + */ +class object { +public: + /** Create a new, invalid object */ + simdjson_inline object() noexcept; + + class iterator { + public: + using value_type = key_value_pair; + using difference_type = std::ptrdiff_t; + + /** + * Get the actual key/value pair + */ + inline const value_type operator*() const noexcept; + /** + * Get the next key/value pair. + * + * Part of the std::iterator interface. + * + */ + inline iterator& operator++() noexcept; + /** + * Get the next key/value pair. + * + * Part of the std::iterator interface. + * + */ + inline iterator operator++(int) noexcept; + /** + * Check if these values come from the same place in the JSON. + * + * Part of the std::iterator interface. + */ + inline bool operator!=(const iterator& other) const noexcept; + inline bool operator==(const iterator& other) const noexcept; + + inline bool operator<(const iterator& other) const noexcept; + inline bool operator<=(const iterator& other) const noexcept; + inline bool operator>=(const iterator& other) const noexcept; + inline bool operator>(const iterator& other) const noexcept; + /** + * Get the key of this key/value pair. + */ + inline std::string_view key() const noexcept; + /** + * Get the length (in bytes) of the key in this key/value pair. + * You should expect this function to be faster than key().size(). + */ + inline uint32_t key_length() const noexcept; + /** + * Returns true if the key in this key/value pair is equal + * to the provided string_view. + */ + inline 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 in a case-insensitive manner. + * Case comparisons may only be handled correctly for ASCII strings. + */ + inline bool key_equals_case_insensitive(std::string_view o) const noexcept; + /** + * Get the key of this key/value pair. + */ + inline const char *key_c_str() const noexcept; + /** + * Get the value of this key/value pair. + */ + inline element value() const noexcept; + + iterator() noexcept = default; + iterator(const iterator&) noexcept = default; + iterator& operator=(const iterator&) noexcept = default; + private: + simdjson_inline iterator(const internal::tape_ref &tape) noexcept; + + internal::tape_ref tape; + + friend class object; + }; + + /** + * Return the first key/value pair. + * + * Part of the std::iterable interface. + */ + inline iterator begin() const noexcept; + /** + * One past the last key/value pair. + * + * Part of the std::iterable interface. + */ + inline iterator end() const noexcept; + /** + * Get the size of the object (number of keys). + * It is a saturated value with a maximum of 0xFFFFFF: if the value + * is 0xFFFFFF then the size is 0xFFFFFF or greater. + */ + inline size_t size() const noexcept; + /** + * Get the value associated with the given key. + * + * The key will be matched against **unescaped** JSON: + * + * dom::parser parser; + * int64_t(parser.parse(R"({ "a\n": 1 })"_padded)["a\n"]) == 1 + * parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get_uint64().error() == NO_SUCH_FIELD + * + * This function has linear-time complexity: the keys are checked one by one. + * + * @return The value associated with this field, or: + * - NO_SUCH_FIELD if the field does not exist in the object + * - INCORRECT_TYPE if this is not an object + */ + inline simdjson_result operator[](std::string_view key) const noexcept; + + /** + * Get the value associated with the given key. + * + * The key will be matched against **unescaped** JSON: + * + * dom::parser parser; + * int64_t(parser.parse(R"({ "a\n": 1 })"_padded)["a\n"]) == 1 + * parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get_uint64().error() == NO_SUCH_FIELD + * + * This function has linear-time complexity: the keys are checked one by one. + * + * @return The value associated with this field, or: + * - NO_SUCH_FIELD if the field does not exist in the object + * - INCORRECT_TYPE if this is not an object + */ + inline simdjson_result operator[](const char *key) const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * dom::parser parser; + * object obj = parser.parse(R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded); + * obj.at_pointer("/foo/a/1") == 20 + * obj.at_pointer("/foo")["a"].at(1) == 20 + * + * It is allowed for a key to be the empty string: + * + * dom::parser parser; + * object obj = parser.parse(R"({ "": { "a": [ 10, 20, 30 ] }})"_padded); + * obj.at_pointer("//a/1") == 20 + * obj.at_pointer("/")["a"].at(1) == 20 + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) const noexcept; + + /** + * Get the value associated with the given key. + * + * The key will be matched against **unescaped** JSON: + * + * dom::parser parser; + * int64_t(parser.parse(R"({ "a\n": 1 })"_padded)["a\n"]) == 1 + * parser.parse(R"({ "a\n": 1 })"_padded)["a\\n"].get_uint64().error() == NO_SUCH_FIELD + * + * This function has linear-time complexity: the keys are checked one by one. + * + * @return The value associated with this field, or: + * - NO_SUCH_FIELD if the field does not exist in the object + */ + inline simdjson_result at_key(std::string_view key) const noexcept; + + /** + * Get the value associated with the given key in a case-insensitive manner. + * It is only guaranteed to work over ASCII inputs. + * + * Note: The key will be matched against **unescaped** JSON. + * + * This function has linear-time complexity: the keys are checked one by one. + * + * @return The value associated with this field, or: + * - NO_SUCH_FIELD if the field does not exist in the object + */ + inline simdjson_result at_key_case_insensitive(std::string_view key) const noexcept; + +private: + simdjson_inline object(const internal::tape_ref &tape) noexcept; + + internal::tape_ref tape; + + friend class element; + friend struct simdjson_result; + template + friend class simdjson::internal::string_builder; +}; + +/** + * Key/value pair in an object. + */ +class key_value_pair { +public: + /** key in the key-value pair **/ + std::string_view key; + /** value in the key-value pair **/ + element value; + +private: + simdjson_inline key_value_pair(std::string_view _key, element _value) noexcept; + friend class object; +}; + +} // namespace dom + +/** The result of a JSON conversion that may fail. */ +template<> +struct simdjson_result : public internal::simdjson_result_base { +public: + simdjson_inline simdjson_result() noexcept; ///< @private + simdjson_inline simdjson_result(dom::object value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + + inline simdjson_result operator[](std::string_view key) const noexcept; + inline simdjson_result operator[](const char *key) const noexcept; + inline simdjson_result at_pointer(std::string_view json_pointer) const noexcept; + inline simdjson_result at_key(std::string_view key) const noexcept; + inline simdjson_result at_key_case_insensitive(std::string_view key) const noexcept; + +#if SIMDJSON_EXCEPTIONS + inline dom::object::iterator begin() const noexcept(false); + inline dom::object::iterator end() const noexcept(false); + inline size_t size() const noexcept(false); +#endif // SIMDJSON_EXCEPTIONS +}; + +} // namespace simdjson + +#if defined(__cpp_lib_ranges) +#include + +namespace std { +namespace ranges { +template<> +inline constexpr bool enable_view = true; +#if SIMDJSON_EXCEPTIONS +template<> +inline constexpr bool enable_view> = true; +#endif // SIMDJSON_EXCEPTIONS +} // namespace ranges +} // namespace std +#endif // defined(__cpp_lib_ranges) + +#endif // SIMDJSON_DOM_OBJECT_H +/* end file simdjson/dom/object.h */ +/* skipped duplicate #include "simdjson/dom/parser.h" */ +/* including simdjson/dom/serialization.h: #include "simdjson/dom/serialization.h" */ +/* begin file simdjson/dom/serialization.h */ +#ifndef SIMDJSON_SERIALIZATION_H +#define SIMDJSON_SERIALIZATION_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/element.h" */ +/* skipped duplicate #include "simdjson/dom/object.h" */ + +#include + +namespace simdjson { + +/** + * The string_builder template and mini_formatter class + * are not part of our public API and are subject to change + * at any time! + */ +namespace internal { + +template +class base_formatter { +public: + /** Add a comma **/ + simdjson_inline void comma(); + /** Start an array, prints [ **/ + simdjson_inline void start_array(); + /** End an array, prints ] **/ + simdjson_inline void end_array(); + /** Start an array, prints { **/ + simdjson_inline void start_object(); + /** Start an array, prints } **/ + simdjson_inline void end_object(); + /** Prints a true **/ + simdjson_inline void true_atom(); + /** Prints a false **/ + simdjson_inline void false_atom(); + /** Prints a null **/ + simdjson_inline void null_atom(); + /** Prints a number **/ + simdjson_inline void number(int64_t x); + /** Prints a number **/ + simdjson_inline void number(uint64_t x); + /** Prints a number **/ + simdjson_inline void number(double x); + /** Prints a key (string + colon) **/ + simdjson_inline void key(std::string_view unescaped); + /** Prints a string. The string is escaped as needed. **/ + simdjson_inline void string(std::string_view unescaped); + /** Clears out the content. **/ + simdjson_inline void clear(); + /** + * Get access to the buffer, it is owned by the instance, but + * the user can make a copy. + **/ + simdjson_inline std::string_view str() const; + + /** Prints one character **/ + simdjson_inline void one_char(char c); + + simdjson_inline void call_print_newline() { + this->print_newline(); + } + + simdjson_inline void call_print_indents(size_t depth) { + this->print_indents(depth); + } + + simdjson_inline void call_print_space() { + this->print_space(); + } + +protected: + // implementation details (subject to change) + /** Backing buffer **/ + std::vector buffer{}; // not ideal! +}; + + +/** + * @private This is the class that we expect to use with the string_builder + * template. It tries to produce a compact version of the JSON element + * as quickly as possible. + */ +class mini_formatter : public base_formatter { +public: + simdjson_inline void print_newline(); + + simdjson_inline void print_indents(size_t depth); + + simdjson_inline void print_space(); +}; + +class pretty_formatter : public base_formatter { +public: + simdjson_inline void print_newline(); + + simdjson_inline void print_indents(size_t depth); + + simdjson_inline void print_space(); + +protected: + int indent_step = 4; +}; + +/** + * @private The string_builder template allows us to construct + * a string from a document element. It is parametrized + * by a "formatter" which handles the details. Thus + * the string_builder template could support both minification + * and prettification, and various other tradeoffs. + */ +template +class string_builder { +public: + /** Construct an initially empty builder, would print the empty string **/ + string_builder() = default; + /** Append an element to the builder (to be printed) **/ + inline void append(simdjson::dom::element value); + /** Append an array to the builder (to be printed) **/ + inline void append(simdjson::dom::array value); + /** Append an object to the builder (to be printed) **/ + inline void append(simdjson::dom::object value); + /** Reset the builder (so that it would print the empty string) **/ + simdjson_inline void clear(); + /** + * Get access to the string. The string_view is owned by the builder + * and it is invalid to use it after the string_builder has been + * destroyed. + * However you can make a copy of the string_view on memory that you + * own. + */ + simdjson_inline std::string_view str() const; + /** Append a key_value_pair to the builder (to be printed) **/ + simdjson_inline void append(simdjson::dom::key_value_pair value); +private: + formatter format{}; +}; + +} // internal + +namespace dom { + +/** + * Print JSON to an output stream. + * + * @param out The output stream. + * @param value The element. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::dom::element value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::dom::array value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. + * + * @param out The output stream. + * @param value The object. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::dom::object value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +} // namespace dom + +/** + * 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] + * + */ +template +std::string to_string(T x) { + // in C++, to_string is standard: http://www.cplusplus.com/reference/string/to_string/ + // Currently minify and to_string are identical but in the future, they may + // differ. + simdjson::internal::string_builder<> sb; + sb.append(x); + std::string_view answer = sb.str(); + return std::string(answer.data(), answer.size()); +} +#if SIMDJSON_EXCEPTIONS +template +std::string to_string(simdjson_result x) { + if (x.error()) { throw simdjson_error(x.error()); } + return to_string(x.value()); +} +#endif + +/** + * 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] + * + */ +template +std::string minify(T x) { + return to_string(x); +} + +#if SIMDJSON_EXCEPTIONS +template +std::string minify(simdjson_result x) { + if (x.error()) { throw simdjson_error(x.error()); } + return to_string(x.value()); +} +#endif + +/** + * Prettifies a JSON element or document, printing the valid JSON with indentation. + * + * dom::parser parser; + * element doc = parser.parse(" [ 1 , 2 , 3 ] "_padded); + * + * // Prints: + * // { + * // [ + * // 1, + * // 2, + * // 3 + * // ] + * // } + * cout << prettify(doc) << endl; + * + */ +template +std::string prettify(T x) { + simdjson::internal::string_builder sb; + sb.append(x); + std::string_view answer = sb.str(); + return std::string(answer.data(), answer.size()); +} + +#if SIMDJSON_EXCEPTIONS +template +std::string prettify(simdjson_result x) { + if (x.error()) { throw simdjson_error(x.error()); } + return to_string(x.value()); +} +#endif + +} // namespace simdjson + + +#endif +/* end file simdjson/dom/serialization.h */ + +// Deprecated API +/* including simdjson/dom/jsonparser.h: #include "simdjson/dom/jsonparser.h" */ +/* begin file simdjson/dom/jsonparser.h */ +// TODO Remove this -- deprecated API and files + +#ifndef SIMDJSON_DOM_JSONPARSER_H +#define SIMDJSON_DOM_JSONPARSER_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/parser.h" */ +/* skipped duplicate #include "simdjson/dom/element.h" */ + +/* including simdjson/dom/parser-inl.h: #include "simdjson/dom/parser-inl.h" */ +/* begin file simdjson/dom/parser-inl.h */ +#ifndef SIMDJSON_PARSER_INL_H +#define SIMDJSON_PARSER_INL_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/document_stream.h" */ +/* skipped duplicate #include "simdjson/implementation.h" */ +/* skipped duplicate #include "simdjson/internal/dom_parser_implementation.h" */ + +/* skipped duplicate #include "simdjson/error-inl.h" */ +/* skipped duplicate #include "simdjson/padded_string-inl.h" */ +/* including simdjson/dom/document_stream-inl.h: #include "simdjson/dom/document_stream-inl.h" */ +/* begin file simdjson/dom/document_stream-inl.h */ +#ifndef SIMDJSON_DOCUMENT_STREAM_INL_H +#define SIMDJSON_DOCUMENT_STREAM_INL_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/document_stream.h" */ +/* including simdjson/dom/element-inl.h: #include "simdjson/dom/element-inl.h" */ +/* begin file simdjson/dom/element-inl.h */ +#ifndef SIMDJSON_ELEMENT_INL_H +#define SIMDJSON_ELEMENT_INL_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/element.h" */ +/* skipped duplicate #include "simdjson/dom/document.h" */ +/* skipped duplicate #include "simdjson/dom/object.h" */ +/* including simdjson/internal/tape_type.h: #include "simdjson/internal/tape_type.h" */ +/* begin file simdjson/internal/tape_type.h */ +#ifndef SIMDJSON_INTERNAL_TAPE_TYPE_H +#define SIMDJSON_INTERNAL_TAPE_TYPE_H + +namespace simdjson { +namespace internal { + +/** + * The possible types in the tape. + */ +enum class tape_type { + ROOT = 'r', + START_ARRAY = '[', + START_OBJECT = '{', + END_ARRAY = ']', + END_OBJECT = '}', + STRING = '"', + INT64 = 'l', + UINT64 = 'u', + DOUBLE = 'd', + TRUE_VALUE = 't', + FALSE_VALUE = 'f', + NULL_VALUE = 'n' +}; // enum class tape_type + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_TAPE_TYPE_H +/* end file simdjson/internal/tape_type.h */ + +/* including simdjson/dom/object-inl.h: #include "simdjson/dom/object-inl.h" */ +/* begin file simdjson/dom/object-inl.h */ +#ifndef SIMDJSON_OBJECT_INL_H +#define SIMDJSON_OBJECT_INL_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/object.h" */ +/* skipped duplicate #include "simdjson/dom/document.h" */ + +/* skipped duplicate #include "simdjson/dom/element-inl.h" */ +/* skipped duplicate #include "simdjson/error-inl.h" */ + +#include + +namespace simdjson { + +// +// simdjson_result inline implementation +// +simdjson_inline simdjson_result::simdjson_result() noexcept + : internal::simdjson_result_base() {} +simdjson_inline simdjson_result::simdjson_result(dom::object value) noexcept + : internal::simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : internal::simdjson_result_base(error) {} + +inline simdjson_result simdjson_result::operator[](std::string_view key) const noexcept { + if (error()) { return error(); } + return first[key]; +} +inline simdjson_result simdjson_result::operator[](const char *key) const noexcept { + if (error()) { return error(); } + return first[key]; +} +inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) const noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} +inline simdjson_result simdjson_result::at_key(std::string_view key) const noexcept { + if (error()) { return error(); } + return first.at_key(key); +} +inline simdjson_result simdjson_result::at_key_case_insensitive(std::string_view key) const noexcept { + if (error()) { return error(); } + return first.at_key_case_insensitive(key); +} + +#if SIMDJSON_EXCEPTIONS + +inline dom::object::iterator simdjson_result::begin() const noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first.begin(); +} +inline dom::object::iterator simdjson_result::end() const noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first.end(); +} +inline size_t simdjson_result::size() const noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first.size(); +} + +#endif // SIMDJSON_EXCEPTIONS + +namespace dom { + +// +// object inline implementation +// +simdjson_inline object::object() noexcept : tape{} {} +simdjson_inline object::object(const internal::tape_ref &_tape) noexcept : tape{_tape} { } +inline object::iterator object::begin() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + return internal::tape_ref(tape.doc, tape.json_index + 1); +} +inline object::iterator object::end() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + return internal::tape_ref(tape.doc, tape.after_element() - 1); +} +inline size_t object::size() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + return tape.scope_count(); +} + +inline simdjson_result object::operator[](std::string_view key) const noexcept { + return at_key(key); +} +inline simdjson_result object::operator[](const char *key) const noexcept { + return at_key(key); +} +inline simdjson_result object::at_pointer(std::string_view json_pointer) const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + if(json_pointer.empty()) { // an empty string means that we return the current node + return element(this->tape); // copy the current node + } else if(json_pointer[0] != '/') { // otherwise there is an error + return INVALID_JSON_POINTER; + } + json_pointer = json_pointer.substr(1); + size_t slash = json_pointer.find('/'); + std::string_view key = json_pointer.substr(0, slash); + // Grab the child with the given key + simdjson_result child; + + // If there is an escape character in the key, unescape it and then get the child. + size_t escape = key.find('~'); + if (escape != std::string_view::npos) { + // Unescape the key + std::string unescaped(key); + do { + switch (unescaped[escape+1]) { + case '0': + unescaped.replace(escape, 2, "~"); + break; + case '1': + unescaped.replace(escape, 2, "/"); + break; + default: + return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer"); + } + escape = unescaped.find('~', escape+1); + } while (escape != std::string::npos); + child = at_key(unescaped); + } else { + child = at_key(key); + } + if(child.error()) { + return child; // we do not continue if there was an error + } + // If there is a /, we have to recurse and look up more of the path + if (slash != std::string_view::npos) { + child = child.at_pointer(json_pointer.substr(slash)); + } + return child; +} + +inline simdjson_result object::at_key(std::string_view key) const noexcept { + iterator end_field = end(); + for (iterator field = begin(); field != end_field; ++field) { + if (field.key_equals(key)) { + return field.value(); + } + } + return NO_SUCH_FIELD; +} +// In case you wonder why we need this, please see +// https://github.com/simdjson/simdjson/issues/323 +// People do seek keys in a case-insensitive manner. +inline simdjson_result object::at_key_case_insensitive(std::string_view key) const noexcept { + iterator end_field = end(); + for (iterator field = begin(); field != end_field; ++field) { + if (field.key_equals_case_insensitive(key)) { + return field.value(); + } + } + return NO_SUCH_FIELD; +} + +// +// object::iterator inline implementation +// +simdjson_inline object::iterator::iterator(const internal::tape_ref &_tape) noexcept : tape{_tape} { } +inline const key_value_pair object::iterator::operator*() const noexcept { + return key_value_pair(key(), value()); +} +inline bool object::iterator::operator!=(const object::iterator& other) const noexcept { + return tape.json_index != other.tape.json_index; +} +inline bool object::iterator::operator==(const object::iterator& other) const noexcept { + return tape.json_index == other.tape.json_index; +} +inline bool object::iterator::operator<(const object::iterator& other) const noexcept { + return tape.json_index < other.tape.json_index; +} +inline bool object::iterator::operator<=(const object::iterator& other) const noexcept { + return tape.json_index <= other.tape.json_index; +} +inline bool object::iterator::operator>=(const object::iterator& other) const noexcept { + return tape.json_index >= other.tape.json_index; +} +inline bool object::iterator::operator>(const object::iterator& other) const noexcept { + return tape.json_index > other.tape.json_index; +} +inline object::iterator& object::iterator::operator++() noexcept { + tape.json_index++; + tape.json_index = tape.after_element(); + return *this; +} +inline object::iterator object::iterator::operator++(int) noexcept { + object::iterator out = *this; + ++*this; + return out; +} +inline std::string_view object::iterator::key() const noexcept { + return tape.get_string_view(); +} +inline uint32_t object::iterator::key_length() const noexcept { + return tape.get_string_length(); +} +inline const char* object::iterator::key_c_str() const noexcept { + return reinterpret_cast(&tape.doc->string_buf[size_t(tape.tape_value()) + sizeof(uint32_t)]); +} +inline element object::iterator::value() const noexcept { + return element(internal::tape_ref(tape.doc, tape.json_index + 1)); +} + +/** + * Design notes: + * Instead of constructing a string_view and then comparing it with a + * user-provided strings, it is probably more performant to have dedicated + * functions taking as a parameter the string we want to compare against + * and return true when they are equal. That avoids the creation of a temporary + * std::string_view. Though it is possible for the compiler to avoid entirely + * any overhead due to string_view, relying too much on compiler magic is + * problematic: compiler magic sometimes fail, and then what do you do? + * Also, enticing users to rely on high-performance function is probably better + * on the long run. + */ + +inline bool object::iterator::key_equals(std::string_view o) const noexcept { + // We use the fact that the key length can be computed quickly + // without access to the string buffer. + const uint32_t len = key_length(); + if(o.size() == len) { + // We avoid construction of a temporary string_view instance. + return (memcmp(o.data(), key_c_str(), len) == 0); + } + return false; +} + +inline bool object::iterator::key_equals_case_insensitive(std::string_view o) const noexcept { + // We use the fact that the key length can be computed quickly + // without access to the string buffer. + const uint32_t len = key_length(); + if(o.size() == len) { + // See For case-insensitive string comparisons, avoid char-by-char functions + // https://lemire.me/blog/2020/04/30/for-case-insensitive-string-comparisons-avoid-char-by-char-functions/ + // Note that it might be worth rolling our own strncasecmp function, with vectorization. + return (simdjson_strncasecmp(o.data(), key_c_str(), len) == 0); + } + return false; +} +// +// key_value_pair inline implementation +// +inline key_value_pair::key_value_pair(std::string_view _key, element _value) noexcept : + key(_key), value(_value) {} + +} // namespace dom + +} // namespace simdjson + +#if defined(__cpp_lib_ranges) +static_assert(std::ranges::view); +static_assert(std::ranges::sized_range); +#if SIMDJSON_EXCEPTIONS +static_assert(std::ranges::view>); +static_assert(std::ranges::sized_range>); +#endif // SIMDJSON_EXCEPTIONS +#endif // defined(__cpp_lib_ranges) + +#endif // SIMDJSON_OBJECT_INL_H +/* end file simdjson/dom/object-inl.h */ +/* skipped duplicate #include "simdjson/error-inl.h" */ + +#include +#include + +namespace simdjson { + +// +// simdjson_result inline implementation +// +simdjson_inline simdjson_result::simdjson_result() noexcept + : internal::simdjson_result_base() {} +simdjson_inline simdjson_result::simdjson_result(dom::element &&value) noexcept + : internal::simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : internal::simdjson_result_base(error) {} +inline simdjson_result simdjson_result::type() const noexcept { + if (error()) { return error(); } + return first.type(); +} + +template +simdjson_inline bool simdjson_result::is() const noexcept { + return !error() && first.is(); +} +template +simdjson_inline simdjson_result simdjson_result::get() const noexcept { + if (error()) { return error(); } + return first.get(); +} +template +simdjson_warn_unused simdjson_inline error_code simdjson_result::get(T &value) const noexcept { + if (error()) { return error(); } + return first.get(value); +} + +simdjson_inline simdjson_result simdjson_result::get_array() const noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() const noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_c_str() const noexcept { + if (error()) { return error(); } + return first.get_c_str(); +} +simdjson_inline simdjson_result simdjson_result::get_string_length() const noexcept { + if (error()) { return error(); } + return first.get_string_length(); +} +simdjson_inline simdjson_result simdjson_result::get_string() const noexcept { + if (error()) { return error(); } + return first.get_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() const noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() const noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_double() const noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() const noexcept { + if (error()) { return error(); } + return first.get_bool(); +} + +simdjson_inline bool simdjson_result::is_array() const noexcept { + return !error() && first.is_array(); +} +simdjson_inline bool simdjson_result::is_object() const noexcept { + return !error() && first.is_object(); +} +simdjson_inline bool simdjson_result::is_string() const noexcept { + return !error() && first.is_string(); +} +simdjson_inline bool simdjson_result::is_int64() const noexcept { + return !error() && first.is_int64(); +} +simdjson_inline bool simdjson_result::is_uint64() const noexcept { + return !error() && first.is_uint64(); +} +simdjson_inline bool simdjson_result::is_double() const noexcept { + return !error() && first.is_double(); +} +simdjson_inline bool simdjson_result::is_number() const noexcept { + return !error() && first.is_number(); +} +simdjson_inline bool simdjson_result::is_bool() const noexcept { + return !error() && first.is_bool(); +} + +simdjson_inline bool simdjson_result::is_null() const noexcept { + return !error() && first.is_null(); +} + +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) const noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) const noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::at_pointer(const std::string_view json_pointer) const noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} +#ifndef SIMDJSON_DISABLE_DEPRECATED_API +[[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]] +simdjson_inline simdjson_result simdjson_result::at(const std::string_view json_pointer) const noexcept { +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_DEPRECATED_WARNING + if (error()) { return error(); } + return first.at(json_pointer); +SIMDJSON_POP_DISABLE_WARNINGS +} +#endif // SIMDJSON_DISABLE_DEPRECATED_API +simdjson_inline simdjson_result simdjson_result::at(size_t index) const noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::at_key(std::string_view key) const noexcept { + if (error()) { return error(); } + return first.at_key(key); +} +simdjson_inline simdjson_result simdjson_result::at_key_case_insensitive(std::string_view key) const noexcept { + if (error()) { return error(); } + return first.at_key_case_insensitive(key); +} + +#if SIMDJSON_EXCEPTIONS + +simdjson_inline simdjson_result::operator bool() const noexcept(false) { + return get(); +} +simdjson_inline simdjson_result::operator const char *() const noexcept(false) { + return get(); +} +simdjson_inline simdjson_result::operator std::string_view() const noexcept(false) { + return get(); +} +simdjson_inline simdjson_result::operator uint64_t() const noexcept(false) { + return get(); +} +simdjson_inline simdjson_result::operator int64_t() const noexcept(false) { + return get(); +} +simdjson_inline simdjson_result::operator double() const noexcept(false) { + return get(); +} +simdjson_inline simdjson_result::operator dom::array() const noexcept(false) { + return get(); +} +simdjson_inline simdjson_result::operator dom::object() const noexcept(false) { + return get(); +} + +simdjson_inline dom::array::iterator simdjson_result::begin() const noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first.begin(); +} +simdjson_inline dom::array::iterator simdjson_result::end() const noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first.end(); +} + +#endif // SIMDJSON_EXCEPTIONS + +namespace dom { + +// +// element inline implementation +// +simdjson_inline element::element() noexcept : tape{} {} +simdjson_inline element::element(const internal::tape_ref &_tape) noexcept : tape{_tape} { } + +inline element_type element::type() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + auto tape_type = tape.tape_ref_type(); + return tape_type == internal::tape_type::FALSE_VALUE ? element_type::BOOL : static_cast(tape_type); +} + +inline simdjson_result element::get_bool() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + if(tape.is_true()) { + return true; + } else if(tape.is_false()) { + return false; + } + return INCORRECT_TYPE; +} +inline simdjson_result element::get_c_str() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + switch (tape.tape_ref_type()) { + case internal::tape_type::STRING: { + return tape.get_c_str(); + } + default: + return INCORRECT_TYPE; + } +} +inline simdjson_result element::get_string_length() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + switch (tape.tape_ref_type()) { + case internal::tape_type::STRING: { + return tape.get_string_length(); + } + default: + return INCORRECT_TYPE; + } +} +inline simdjson_result element::get_string() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + switch (tape.tape_ref_type()) { + case internal::tape_type::STRING: + return tape.get_string_view(); + default: + return INCORRECT_TYPE; + } +} +inline simdjson_result element::get_uint64() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + if(simdjson_unlikely(!tape.is_uint64())) { // branch rarely taken + if(tape.is_int64()) { + int64_t result = tape.next_tape_value(); + if (result < 0) { + return NUMBER_OUT_OF_RANGE; + } + return uint64_t(result); + } + return INCORRECT_TYPE; + } + return tape.next_tape_value(); +} +inline simdjson_result element::get_int64() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + if(simdjson_unlikely(!tape.is_int64())) { // branch rarely taken + if(tape.is_uint64()) { + uint64_t result = tape.next_tape_value(); + // 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 + if (result > uint64_t((std::numeric_limits::max)())) { + return NUMBER_OUT_OF_RANGE; + } + return static_cast(result); + } + return INCORRECT_TYPE; + } + return tape.next_tape_value(); +} +inline simdjson_result element::get_double() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + // Performance considerations: + // 1. Querying tape_ref_type() implies doing a shift, it is fast to just do a straight + // comparison. + // 2. Using a switch-case relies on the compiler guessing what kind of code generation + // we want... But the compiler cannot know that we expect the type to be "double" + // most of the time. + // We can expect get to refer to a double type almost all the time. + // It is important to craft the code accordingly so that the compiler can use this + // information. (This could also be solved with profile-guided optimization.) + if(simdjson_unlikely(!tape.is_double())) { // branch rarely taken + if(tape.is_uint64()) { + return double(tape.next_tape_value()); + } else if(tape.is_int64()) { + return double(tape.next_tape_value()); + } + return INCORRECT_TYPE; + } + // this is common: + return tape.next_tape_value(); +} +inline simdjson_result element::get_array() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + switch (tape.tape_ref_type()) { + case internal::tape_type::START_ARRAY: + return array(tape); + default: + return INCORRECT_TYPE; + } +} +inline simdjson_result element::get_object() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + switch (tape.tape_ref_type()) { + case internal::tape_type::START_OBJECT: + return object(tape); + default: + return INCORRECT_TYPE; + } +} + +template +simdjson_warn_unused simdjson_inline error_code element::get(T &value) const noexcept { + return get().get(value); +} +// An element-specific version prevents recursion with simdjson_result::get(value) +template<> +simdjson_warn_unused simdjson_inline error_code element::get(element &value) const noexcept { + value = element(tape); + return SUCCESS; +} +template +inline void element::tie(T &value, error_code &error) && noexcept { + error = get(value); +} + +template +simdjson_inline bool element::is() const noexcept { + auto result = get(); + return !result.error(); +} + +template<> inline simdjson_result element::get() const noexcept { return get_array(); } +template<> inline simdjson_result element::get() const noexcept { return get_object(); } +template<> inline simdjson_result element::get() const noexcept { return get_c_str(); } +template<> inline simdjson_result element::get() const noexcept { return get_string(); } +template<> inline simdjson_result element::get() const noexcept { return get_int64(); } +template<> inline simdjson_result element::get() const noexcept { return get_uint64(); } +template<> inline simdjson_result element::get() const noexcept { return get_double(); } +template<> inline simdjson_result element::get() const noexcept { return get_bool(); } + +inline bool element::is_array() const noexcept { return is(); } +inline bool element::is_object() const noexcept { return is(); } +inline bool element::is_string() const noexcept { return is(); } +inline bool element::is_int64() const noexcept { return is(); } +inline bool element::is_uint64() const noexcept { return is(); } +inline bool element::is_double() const noexcept { return is(); } +inline bool element::is_bool() const noexcept { return is(); } +inline bool element::is_number() const noexcept { return is_int64() || is_uint64() || is_double(); } + +inline bool element::is_null() const noexcept { + return tape.is_null_on_tape(); +} + +#if SIMDJSON_EXCEPTIONS + +inline element::operator bool() const noexcept(false) { return get(); } +inline element::operator const char*() const noexcept(false) { return get(); } +inline element::operator std::string_view() const noexcept(false) { return get(); } +inline element::operator uint64_t() const noexcept(false) { return get(); } +inline element::operator int64_t() const noexcept(false) { return get(); } +inline element::operator double() const noexcept(false) { return get(); } +inline element::operator array() const noexcept(false) { return get(); } +inline element::operator object() const noexcept(false) { return get(); } + +inline array::iterator element::begin() const noexcept(false) { + return get().begin(); +} +inline array::iterator element::end() const noexcept(false) { + return get().end(); +} + +#endif // SIMDJSON_EXCEPTIONS + +inline simdjson_result element::operator[](std::string_view key) const noexcept { + return at_key(key); +} +inline simdjson_result element::operator[](const char *key) const noexcept { + return at_key(key); +} + +inline simdjson_result element::at_pointer(std::string_view json_pointer) const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + switch (tape.tape_ref_type()) { + case internal::tape_type::START_OBJECT: + return object(tape).at_pointer(json_pointer); + case internal::tape_type::START_ARRAY: + return array(tape).at_pointer(json_pointer); + default: { + if(!json_pointer.empty()) { // a non-empty string is invalid on an atom + return INVALID_JSON_POINTER; + } + // an empty string means that we return the current node + dom::element copy(*this); + return simdjson_result(std::move(copy)); + } + } +} +#ifndef SIMDJSON_DISABLE_DEPRECATED_API +[[deprecated("For standard compliance, use at_pointer instead, and prefix your pointers with a slash '/', see RFC6901 ")]] +inline simdjson_result element::at(std::string_view json_pointer) const noexcept { + // version 0.4 of simdjson allowed non-compliant pointers + auto std_pointer = (json_pointer.empty() ? "" : "/") + std::string(json_pointer.begin(), json_pointer.end()); + return at_pointer(std_pointer); +} +#endif // SIMDJSON_DISABLE_DEPRECATED_API + +inline simdjson_result element::at(size_t index) const noexcept { + return get().at(index); +} +inline simdjson_result element::at_key(std::string_view key) const noexcept { + return get().at_key(key); +} +inline simdjson_result element::at_key_case_insensitive(std::string_view key) const noexcept { + return get().at_key_case_insensitive(key); +} +inline bool element::operator<(const element &other) const noexcept { + return tape.json_index < other.tape.json_index; +} +inline bool element::operator==(const element &other) const noexcept { + return tape.json_index == other.tape.json_index; +} + +inline bool element::dump_raw_tape(std::ostream &out) const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + return tape.doc->dump_raw_tape(out); +} + + +inline std::ostream& operator<<(std::ostream& out, element_type type) { + switch (type) { + case element_type::ARRAY: + return out << "array"; + case element_type::OBJECT: + return out << "object"; + case element_type::INT64: + return out << "int64_t"; + case element_type::UINT64: + return out << "uint64_t"; + case element_type::DOUBLE: + return out << "double"; + case element_type::STRING: + return out << "string"; + case element_type::BOOL: + return out << "bool"; + case element_type::NULL_VALUE: + return out << "null"; + default: + return out << "unexpected content!!!"; // abort() usage is forbidden in the library + } +} + +} // namespace dom + +} // namespace simdjson + +#endif // SIMDJSON_ELEMENT_INL_H +/* end file simdjson/dom/element-inl.h */ +/* skipped duplicate #include "simdjson/dom/parser-inl.h" */ +/* skipped duplicate #include "simdjson/error-inl.h" */ +/* skipped duplicate #include "simdjson/internal/dom_parser_implementation.h" */ + +namespace simdjson { +namespace dom { + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void stage1_worker::finish() { + // After calling "run" someone would call finish() to wait + // for the end of the processing. + // This function will wait until either the thread has done + // the processing or, else, the destructor has been called. + std::unique_lock lock(locking_mutex); + cond_var.wait(lock, [this]{return has_work == false;}); +} + +inline stage1_worker::~stage1_worker() { + // The thread may never outlive the stage1_worker instance + // and will always be stopped/joined before the stage1_worker + // instance is gone. + stop_thread(); +} + +inline void stage1_worker::start_thread() { + std::unique_lock lock(locking_mutex); + if(thread.joinable()) { + return; // This should never happen but we never want to create more than one thread. + } + thread = std::thread([this]{ + while(true) { + std::unique_lock thread_lock(locking_mutex); + // We wait for either "run" or "stop_thread" to be called. + cond_var.wait(thread_lock, [this]{return has_work || !can_work;}); + // If, for some reason, the stop_thread() method was called (i.e., the + // destructor of stage1_worker is called, then we want to immediately destroy + // the thread (and not do any more processing). + if(!can_work) { + break; + } + this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser, + this->_next_batch_start); + this->has_work = false; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify "finish" + thread_lock.unlock(); + } + } + ); +} + + +inline void stage1_worker::stop_thread() { + std::unique_lock lock(locking_mutex); + // We have to make sure that all locks can be released. + can_work = false; + has_work = false; + cond_var.notify_all(); + lock.unlock(); + if(thread.joinable()) { + thread.join(); + } +} + +inline void stage1_worker::run(document_stream * ds, dom::parser * stage1, size_t next_batch_start) { + std::unique_lock lock(locking_mutex); + owner = ds; + _next_batch_start = next_batch_start; + stage1_thread_parser = stage1; + has_work = true; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify the thread lock that we have work + lock.unlock(); +} +#endif + +simdjson_inline document_stream::document_stream( + dom::parser &_parser, + const uint8_t *_buf, + size_t _len, + size_t _batch_size +) noexcept + : parser{&_parser}, + buf{_buf}, + len{_len}, + batch_size{_batch_size <= MINIMAL_BATCH_SIZE ? MINIMAL_BATCH_SIZE : _batch_size}, + error{SUCCESS} +#ifdef SIMDJSON_THREADS_ENABLED + , use_thread(_parser.threaded) // we need to make a copy because _parser.threaded can change +#endif +{ +#ifdef SIMDJSON_THREADS_ENABLED + if(worker.get() == nullptr) { + error = MEMALLOC; + } +#endif +} + +simdjson_inline document_stream::document_stream() noexcept + : parser{nullptr}, + buf{nullptr}, + len{0}, + batch_size{0}, + error{UNINITIALIZED} +#ifdef SIMDJSON_THREADS_ENABLED + , use_thread(false) +#endif +{ +} + +simdjson_inline document_stream::~document_stream() noexcept { +#ifdef SIMDJSON_THREADS_ENABLED + worker.reset(); +#endif +} + +simdjson_inline document_stream::iterator::iterator() noexcept + : stream{nullptr}, finished{true} { +} + +simdjson_inline document_stream::iterator document_stream::begin() noexcept { + start(); + // If there are no documents, we're finished. + return iterator(this, error == EMPTY); +} + +simdjson_inline document_stream::iterator document_stream::end() noexcept { + return iterator(this, true); +} + +simdjson_inline document_stream::iterator::iterator(document_stream* _stream, bool is_end) noexcept + : stream{_stream}, finished{is_end} { +} + +simdjson_inline document_stream::iterator::reference document_stream::iterator::operator*() noexcept { + // Note that in case of error, we do not yet mark + // the iterator as "finished": this detection is done + // in the operator++ function since it is possible + // to call operator++ repeatedly while omitting + // calls to operator*. + if (stream->error) { return stream->error; } + return stream->parser->doc.root(); +} + +simdjson_inline document_stream::iterator& document_stream::iterator::operator++() noexcept { + // If there is an error, then we want the iterator + // to be finished, no matter what. (E.g., we do not + // keep generating documents with errors, or go beyond + // a document with errors.) + // + // Users do not have to call "operator*()" when they use operator++, + // so we need to end the stream in the operator++ function. + // + // Note that setting finished = true is essential otherwise + // we would enter an infinite loop. + if (stream->error) { finished = true; } + // Note that stream->error() is guarded against error conditions + // (it will immediately return if stream->error casts to false). + // In effect, this next function does nothing when (stream->error) + // is true (hence the risk of an infinite loop). + stream->next(); + // If that was the last document, we're finished. + // It is the only type of error we do not want to appear + // in operator*. + if (stream->error == EMPTY) { finished = true; } + // If we had any other kind of error (not EMPTY) then we want + // to pass it along to the operator* and we cannot mark the result + // as "finished" just yet. + return *this; +} + +simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept { + return finished != other.finished; +} + +inline void document_stream::start() noexcept { + if (error) { return; } + error = parser->ensure_capacity(batch_size); + if (error) { return; } + // Always run the first stage 1 parse immediately + batch_start = 0; + error = run_stage1(*parser, batch_start); + while(error == EMPTY) { + // In exceptional cases, we may start with an empty block + batch_start = next_batch_start(); + if (batch_start >= len) { return; } + error = run_stage1(*parser, batch_start); + } + if (error) { return; } +#ifdef SIMDJSON_THREADS_ENABLED + if (use_thread && next_batch_start() < len) { + // Kick off the first thread if needed + error = stage1_thread_parser.ensure_capacity(batch_size); + if (error) { return; } + worker->start_thread(); + start_stage1_thread(); + if (error) { return; } + } +#endif // SIMDJSON_THREADS_ENABLED + next(); +} + +simdjson_inline size_t document_stream::iterator::current_index() const noexcept { + return stream->doc_index; +} + +simdjson_inline std::string_view document_stream::iterator::source() const noexcept { + const char* start = reinterpret_cast(stream->buf) + current_index(); + bool object_or_array = ((*start == '[') || (*start == '{')); + if(object_or_array) { + size_t next_doc_index = stream->batch_start + stream->parser->implementation->structural_indexes[stream->parser->implementation->next_structural_index - 1]; + return std::string_view(start, next_doc_index - current_index() + 1); + } else { + size_t next_doc_index = stream->batch_start + stream->parser->implementation->structural_indexes[stream->parser->implementation->next_structural_index]; + return std::string_view(reinterpret_cast(stream->buf) + current_index(), next_doc_index - current_index() - 1); + } +} + + +inline void document_stream::next() noexcept { + // We always exit at once, once in an error condition. + if (error) { return; } + + // Load the next document from the batch + doc_index = batch_start + parser->implementation->structural_indexes[parser->implementation->next_structural_index]; + error = parser->implementation->stage2_next(parser->doc); + // If that was the last document in the batch, load another batch (if available) + while (error == EMPTY) { + batch_start = next_batch_start(); + if (batch_start >= len) { break; } + +#ifdef SIMDJSON_THREADS_ENABLED + if(use_thread) { + load_from_stage1_thread(); + } else { + error = run_stage1(*parser, batch_start); + } +#else + error = run_stage1(*parser, batch_start); +#endif + if (error) { continue; } // If the error was EMPTY, we may want to load another batch. + // Run stage 2 on the first document in the batch + doc_index = batch_start + parser->implementation->structural_indexes[parser->implementation->next_structural_index]; + error = parser->implementation->stage2_next(parser->doc); + } +} +inline size_t document_stream::size_in_bytes() const noexcept { + return len; +} + +inline size_t document_stream::truncated_bytes() const noexcept { + if(error == CAPACITY) { return len - batch_start; } + return parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] - parser->implementation->structural_indexes[parser->implementation->n_structural_indexes + 1]; +} + +inline size_t document_stream::next_batch_start() const noexcept { + return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes]; +} + +inline error_code document_stream::run_stage1(dom::parser &p, size_t _batch_start) noexcept { + size_t remaining = len - _batch_start; + if (remaining <= batch_size) { + return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final); + } else { + return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial); + } +} + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void document_stream::load_from_stage1_thread() noexcept { + worker->finish(); + // Swap to the parser that was loaded up in the thread. Make sure the parser has + // enough memory to swap to, as well. + std::swap(*parser, stage1_thread_parser); + error = stage1_thread_error; + if (error) { return; } + + // If there's anything left, start the stage 1 thread! + if (next_batch_start() < len) { + start_stage1_thread(); + } +} + +inline void document_stream::start_stage1_thread() noexcept { + // we call the thread on a lambda that will update + // this->stage1_thread_error + // there is only one thread that may write to this value + // TODO this is NOT exception-safe. + this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error + size_t _next_batch_start = this->next_batch_start(); + + worker->run(this, & this->stage1_thread_parser, _next_batch_start); +} + +#endif // SIMDJSON_THREADS_ENABLED + +} // namespace dom + +simdjson_inline simdjson_result::simdjson_result() noexcept + : simdjson_result_base() { +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : simdjson_result_base(error) { +} +simdjson_inline simdjson_result::simdjson_result(dom::document_stream &&value) noexcept + : simdjson_result_base(std::forward(value)) { +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline dom::document_stream::iterator simdjson_result::begin() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first.begin(); +} +simdjson_inline dom::document_stream::iterator simdjson_result::end() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first.end(); +} +#else // SIMDJSON_EXCEPTIONS +#ifndef SIMDJSON_DISABLE_DEPRECATED_API +simdjson_inline dom::document_stream::iterator simdjson_result::begin() noexcept { + first.error = error(); + return first.begin(); +} +simdjson_inline dom::document_stream::iterator simdjson_result::end() noexcept { + first.error = error(); + return first.end(); +} +#endif // SIMDJSON_DISABLE_DEPRECATED_API +#endif // SIMDJSON_EXCEPTIONS + +} // namespace simdjson +#endif // SIMDJSON_DOCUMENT_STREAM_INL_H +/* end file simdjson/dom/document_stream-inl.h */ +/* skipped duplicate #include "simdjson/dom/element-inl.h" */ + +#include +#include /* memcmp */ + +namespace simdjson { +namespace dom { + +// +// parser inline implementation +// +simdjson_inline parser::parser(size_t max_capacity) noexcept + : _max_capacity{max_capacity}, + loaded_bytes(nullptr) { +} +simdjson_inline parser::parser(parser &&other) noexcept = default; +simdjson_inline parser &parser::operator=(parser &&other) noexcept = default; + +inline bool parser::is_valid() const noexcept { return valid; } +inline int parser::get_error_code() const noexcept { return error; } +inline std::string parser::get_error_message() const noexcept { return error_message(error); } + +inline bool parser::dump_raw_tape(std::ostream &os) const noexcept { + return valid ? doc.dump_raw_tape(os) : false; +} + +inline simdjson_result parser::read_file(const std::string &path) noexcept { + // Open the file + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe + std::FILE *fp = std::fopen(path.c_str(), "rb"); + SIMDJSON_POP_DISABLE_WARNINGS + + if (fp == nullptr) { + return IO_ERROR; + } + + // Get the file size + int ret; +#if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS + ret = _fseeki64(fp, 0, SEEK_END); +#else + ret = std::fseek(fp, 0, SEEK_END); +#endif // _WIN64 + if(ret < 0) { + std::fclose(fp); + return IO_ERROR; + } +#if SIMDJSON_VISUAL_STUDIO && !SIMDJSON_IS_32BITS + __int64 len = _ftelli64(fp); + if(len == -1L) { + std::fclose(fp); + return IO_ERROR; + } +#else + long len = std::ftell(fp); + if((len < 0) || (len == LONG_MAX)) { + std::fclose(fp); + return IO_ERROR; + } +#endif + + // Make sure we have enough capacity to load the file + if (_loaded_bytes_capacity < size_t(len)) { + loaded_bytes.reset( internal::allocate_padded_buffer(len) ); + if (!loaded_bytes) { + std::fclose(fp); + return MEMALLOC; + } + _loaded_bytes_capacity = len; + } + + // Read the string + std::rewind(fp); + size_t bytes_read = std::fread(loaded_bytes.get(), 1, len, fp); + if (std::fclose(fp) != 0 || bytes_read != size_t(len)) { + return IO_ERROR; + } + + return bytes_read; +} + +inline simdjson_result parser::load(const std::string &path) & noexcept { + size_t len; + auto _error = read_file(path).get(len); + if (_error) { return _error; } + return parse(loaded_bytes.get(), len, false); +} + +inline simdjson_result parser::load_many(const std::string &path, size_t batch_size) noexcept { + size_t len; + auto _error = read_file(path).get(len); + if (_error) { return _error; } + if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; } + return document_stream(*this, reinterpret_cast(loaded_bytes.get()), len, batch_size); +} + +inline simdjson_result parser::parse_into_document(document& provided_doc, const uint8_t *buf, size_t len, bool realloc_if_needed) & noexcept { + // Important: we need to ensure that document has enough capacity. + // Important: It is possible that provided_doc is actually the internal 'doc' within the parser!!! + error_code _error = ensure_capacity(provided_doc, len); + if (_error) { return _error; } + if (realloc_if_needed) { + // Make sure we have enough capacity to copy len bytes + if (!loaded_bytes || _loaded_bytes_capacity < len) { + loaded_bytes.reset( internal::allocate_padded_buffer(len) ); + if (!loaded_bytes) { + return MEMALLOC; + } + _loaded_bytes_capacity = len; + } + std::memcpy(static_cast(loaded_bytes.get()), buf, len); + buf = reinterpret_cast(loaded_bytes.get()); + } + + if((len >= 3) && (std::memcmp(buf, "\xEF\xBB\xBF", 3) == 0)) { + buf += 3; + len -= 3; + } + _error = implementation->parse(buf, len, provided_doc); + + if (_error) { return _error; } + + return provided_doc.root(); +} + +simdjson_inline simdjson_result parser::parse_into_document(document& provided_doc, const char *buf, size_t len, bool realloc_if_needed) & noexcept { + return parse_into_document(provided_doc, reinterpret_cast(buf), len, realloc_if_needed); +} +simdjson_inline simdjson_result parser::parse_into_document(document& provided_doc, const std::string &s) & noexcept { + return parse_into_document(provided_doc, s.data(), s.length(), s.capacity() - s.length() < SIMDJSON_PADDING); +} +simdjson_inline simdjson_result parser::parse_into_document(document& provided_doc, const padded_string &s) & noexcept { + return parse_into_document(provided_doc, s.data(), s.length(), false); +} + + +inline simdjson_result parser::parse(const uint8_t *buf, size_t len, bool realloc_if_needed) & noexcept { + return parse_into_document(doc, buf, len, realloc_if_needed); +} + +simdjson_inline simdjson_result parser::parse(const char *buf, size_t len, bool realloc_if_needed) & noexcept { + return parse(reinterpret_cast(buf), len, realloc_if_needed); +} +simdjson_inline simdjson_result parser::parse(const std::string &s) & noexcept { + return parse(s.data(), s.length(), s.capacity() - s.length() < SIMDJSON_PADDING); +} +simdjson_inline simdjson_result parser::parse(const padded_string &s) & noexcept { + return parse(s.data(), s.length(), false); +} +simdjson_inline simdjson_result parser::parse(const padded_string_view &v) & noexcept { + return parse(v.data(), v.length(), false); +} + +inline simdjson_result parser::parse_many(const uint8_t *buf, size_t len, size_t batch_size) noexcept { + if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; } + if((len >= 3) && (std::memcmp(buf, "\xEF\xBB\xBF", 3) == 0)) { + buf += 3; + len -= 3; + } + return document_stream(*this, buf, len, batch_size); +} +inline simdjson_result parser::parse_many(const char *buf, size_t len, size_t batch_size) noexcept { + return parse_many(reinterpret_cast(buf), len, batch_size); +} +inline simdjson_result parser::parse_many(const std::string &s, size_t batch_size) noexcept { + return parse_many(s.data(), s.length(), batch_size); +} +inline simdjson_result parser::parse_many(const padded_string &s, size_t batch_size) noexcept { + return parse_many(s.data(), s.length(), batch_size); +} + +simdjson_inline size_t parser::capacity() const noexcept { + return implementation ? implementation->capacity() : 0; +} +simdjson_inline size_t parser::max_capacity() const noexcept { + return _max_capacity; +} +simdjson_inline size_t parser::max_depth() const noexcept { + return implementation ? implementation->max_depth() : DEFAULT_MAX_DEPTH; +} + +simdjson_warn_unused +inline error_code parser::allocate(size_t capacity, size_t max_depth) noexcept { + // + // Reallocate implementation if needed + // + error_code err; + if (implementation) { + err = implementation->allocate(capacity, max_depth); + } else { + err = simdjson::get_active_implementation()->create_dom_parser_implementation(capacity, max_depth, implementation); + } + if (err) { return err; } + return SUCCESS; +} + +#ifndef SIMDJSON_DISABLE_DEPRECATED_API +simdjson_warn_unused +inline bool parser::allocate_capacity(size_t capacity, size_t max_depth) noexcept { + return !allocate(capacity, max_depth); +} +#endif // SIMDJSON_DISABLE_DEPRECATED_API + +inline error_code parser::ensure_capacity(size_t desired_capacity) noexcept { + return ensure_capacity(doc, desired_capacity); +} + + +inline error_code parser::ensure_capacity(document& target_document, size_t desired_capacity) noexcept { + // 1. It is wasteful to allocate a document and a parser for documents spanning less than MINIMAL_DOCUMENT_CAPACITY bytes. + // 2. If we allow desired_capacity = 0 then it is possible to exit this function with implementation == nullptr. + if(desired_capacity < MINIMAL_DOCUMENT_CAPACITY) { desired_capacity = MINIMAL_DOCUMENT_CAPACITY; } + // If we don't have enough capacity, (try to) automatically bump it. + // If the document needs allocation, do it too. + // Both in one if statement to minimize unlikely branching. + // + // Note: we must make sure that this function is called if capacity() == 0. We do so because we + // ensure that desired_capacity > 0. + if (simdjson_unlikely(capacity() < desired_capacity || target_document.capacity() < desired_capacity)) { + if (desired_capacity > max_capacity()) { + return error = CAPACITY; + } + error_code err1 = target_document.capacity() < desired_capacity ? target_document.allocate(desired_capacity) : SUCCESS; + error_code err2 = capacity() < desired_capacity ? allocate(desired_capacity, max_depth()) : SUCCESS; + if(err1 != SUCCESS) { return error = err1; } + if(err2 != SUCCESS) { return error = err2; } + } + return SUCCESS; +} + +simdjson_inline void parser::set_max_capacity(size_t max_capacity) noexcept { + if(max_capacity > MINIMAL_DOCUMENT_CAPACITY) { + _max_capacity = max_capacity; + } else { + _max_capacity = MINIMAL_DOCUMENT_CAPACITY; + } +} + +} // namespace dom +} // namespace simdjson + +#endif // SIMDJSON_PARSER_INL_H +/* end file simdjson/dom/parser-inl.h */ + +namespace simdjson { + +// +// C API (json_parse and build_parsed_json) declarations +// + +#ifndef SIMDJSON_DISABLE_DEPRECATED_API +[[deprecated("Use parser.parse() instead")]] +inline int json_parse(const uint8_t *buf, size_t len, dom::parser &parser, bool realloc_if_needed = true) noexcept { + error_code code = parser.parse(buf, len, realloc_if_needed).error(); + // The deprecated json_parse API is a signal that the user plans to *use* the error code / valid + // bits in the parser instead of heeding the result code. The normal parser unsets those in + // anticipation of making the error code ephemeral. + // Here we put the code back into the parser, until we've removed this method. + parser.valid = code == SUCCESS; + parser.error = code; + return code; +} +[[deprecated("Use parser.parse() instead")]] +inline int json_parse(const char *buf, size_t len, dom::parser &parser, bool realloc_if_needed = true) noexcept { + error_code code = parser.parse(buf, len, realloc_if_needed).error(); + // The deprecated json_parse API is a signal that the user plans to *use* the error code / valid + // bits in the parser instead of heeding the result code. The normal parser unsets those in + // anticipation of making the error code ephemeral. + // Here we put the code back into the parser, until we've removed this method. + parser.valid = code == SUCCESS; + parser.error = code; + return code; +} +[[deprecated("Use parser.parse() instead")]] +inline int json_parse(const std::string &s, dom::parser &parser, bool realloc_if_needed = true) noexcept { + error_code code = parser.parse(s.data(), s.length(), realloc_if_needed).error(); + // The deprecated json_parse API is a signal that the user plans to *use* the error code / valid + // bits in the parser instead of heeding the result code. The normal parser unsets those in + // anticipation of making the error code ephemeral. + // Here we put the code back into the parser, until we've removed this method. + parser.valid = code == SUCCESS; + parser.error = code; + return code; +} +[[deprecated("Use parser.parse() instead")]] +inline int json_parse(const padded_string &s, dom::parser &parser) noexcept { + error_code code = parser.parse(s).error(); + // The deprecated json_parse API is a signal that the user plans to *use* the error code / valid + // bits in the parser instead of heeding the result code. The normal parser unsets those in + // anticipation of making the error code ephemeral. + // Here we put the code back into the parser, until we've removed this method. + parser.valid = code == SUCCESS; + parser.error = code; + return code; +} + +[[deprecated("Use parser.parse() instead")]] +simdjson_warn_unused inline dom::parser build_parsed_json(const uint8_t *buf, size_t len, bool realloc_if_needed = true) noexcept { + dom::parser parser; + error_code code = parser.parse(buf, len, realloc_if_needed).error(); + // The deprecated json_parse API is a signal that the user plans to *use* the error code / valid + // bits in the parser instead of heeding the result code. The normal parser unsets those in + // anticipation of making the error code ephemeral. + // Here we put the code back into the parser, until we've removed this method. + parser.valid = code == SUCCESS; + parser.error = code; + return parser; +} +[[deprecated("Use parser.parse() instead")]] +simdjson_warn_unused inline dom::parser build_parsed_json(const char *buf, size_t len, bool realloc_if_needed = true) noexcept { + dom::parser parser; + error_code code = parser.parse(buf, len, realloc_if_needed).error(); + // The deprecated json_parse API is a signal that the user plans to *use* the error code / valid + // bits in the parser instead of heeding the result code. The normal parser unsets those in + // anticipation of making the error code ephemeral. + // Here we put the code back into the parser, until we've removed this method. + parser.valid = code == SUCCESS; + parser.error = code; + return parser; +} +[[deprecated("Use parser.parse() instead")]] +simdjson_warn_unused inline dom::parser build_parsed_json(const std::string &s, bool realloc_if_needed = true) noexcept { + dom::parser parser; + error_code code = parser.parse(s.data(), s.length(), realloc_if_needed).error(); + // The deprecated json_parse API is a signal that the user plans to *use* the error code / valid + // bits in the parser instead of heeding the result code. The normal parser unsets those in + // anticipation of making the error code ephemeral. + // Here we put the code back into the parser, until we've removed this method. + parser.valid = code == SUCCESS; + parser.error = code; + return parser; +} +[[deprecated("Use parser.parse() instead")]] +simdjson_warn_unused inline dom::parser build_parsed_json(const padded_string &s) noexcept { + dom::parser parser; + error_code code = parser.parse(s).error(); + // The deprecated json_parse API is a signal that the user plans to *use* the error code / valid + // bits in the parser instead of heeding the result code. The normal parser unsets those in + // anticipation of making the error code ephemeral. + // Here we put the code back into the parser, until we've removed this method. + parser.valid = code == SUCCESS; + parser.error = code; + return parser; +} +#endif // SIMDJSON_DISABLE_DEPRECATED_API + +/** @private We do not want to allow implicit conversion from C string to std::string. */ +int json_parse(const char *buf, dom::parser &parser) noexcept = delete; +/** @private We do not want to allow implicit conversion from C string to std::string. */ +dom::parser build_parsed_json(const char *buf) noexcept = delete; + +} // namespace simdjson + +#endif // SIMDJSON_DOM_JSONPARSER_H +/* end file simdjson/dom/jsonparser.h */ +/* including simdjson/dom/parsedjson.h: #include "simdjson/dom/parsedjson.h" */ +/* begin file simdjson/dom/parsedjson.h */ +// TODO Remove this -- deprecated API and files + +#ifndef SIMDJSON_DOM_PARSEDJSON_H +#define SIMDJSON_DOM_PARSEDJSON_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ + +namespace simdjson { + +/** + * @deprecated Use `dom::parser` instead. + */ +using ParsedJson [[deprecated("Use dom::parser instead")]] = dom::parser; + +} // namespace simdjson + +#endif // SIMDJSON_DOM_PARSEDJSON_H +/* end file simdjson/dom/parsedjson.h */ +/* including simdjson/dom/parsedjson_iterator.h: #include "simdjson/dom/parsedjson_iterator.h" */ +/* begin file simdjson/dom/parsedjson_iterator.h */ +// TODO Remove this -- deprecated API and files + +#ifndef SIMDJSON_DOM_PARSEDJSON_ITERATOR_H +#define SIMDJSON_DOM_PARSEDJSON_ITERATOR_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/parser.h" */ + +#ifndef SIMDJSON_DISABLE_DEPRECATED_API + +namespace simdjson { +/** @private **/ +class [[deprecated("Use the new DOM navigation API instead (see doc/basics.md)")]] dom::parser::Iterator { +public: + inline Iterator(const dom::parser &parser) noexcept(false); + inline Iterator(const Iterator &o) noexcept; + inline ~Iterator() noexcept; + + inline Iterator& operator=(const Iterator&) = delete; + + inline bool is_ok() const; + + // useful for debugging purposes + inline size_t get_tape_location() const; + + // useful for debugging purposes + inline size_t get_tape_length() const; + + // returns the current depth (start at 1 with 0 reserved for the fictitious + // root node) + inline size_t get_depth() const; + + // A scope is a series of nodes at the same depth, typically it is either an + // object ({) or an array ([). The root node has type 'r'. + inline uint8_t get_scope_type() const; + + // move forward in document order + inline bool move_forward(); + + // retrieve the character code of what we're looking at: + // [{"slutfn are the possibilities + inline uint8_t get_type() const { + return current_type; // short functions should be inlined! + } + + // get the int64_t value at this node; valid only if get_type is "l" + inline int64_t get_integer() const; + + // get the value as uint64; valid only if if get_type is "u" + inline uint64_t get_unsigned_integer() const; + + // get the string value at this node (NULL ended); valid only if get_type is " + // note that tabs, and line endings are escaped in the returned value (see + // print_with_escapes) return value is valid UTF-8, it may contain NULL chars + // within the string: get_string_length determines the true string length. + inline const char *get_string() const; + + // return the length of the string in bytes + inline uint32_t get_string_length() const; + + // get the double value at this node; valid only if + // get_type() is "d" + inline double get_double() const; + + inline bool is_object_or_array() const { return is_object() || is_array(); } + + inline bool is_object() const { return get_type() == '{'; } + + inline bool is_array() const { return get_type() == '['; } + + inline bool is_string() const { return get_type() == '"'; } + + // Returns true if the current type of the node is an signed integer. + // You can get its value with `get_integer()`. + inline bool is_integer() const { return get_type() == 'l'; } + + // Returns true if the current type of the node is an unsigned integer. + // You can get its value with `get_unsigned_integer()`. + // + // NOTE: + // Only a large value, which is out of range of a 64-bit signed integer, is + // represented internally as an unsigned node. On the other hand, a typical + // positive integer, such as 1, 42, or 1000000, is as a signed node. + // Be aware this function returns false for a signed node. + inline bool is_unsigned_integer() const { return get_type() == 'u'; } + // Returns true if the current type of the node is a double floating-point number. + inline bool is_double() const { return get_type() == 'd'; } + // Returns true if the current type of the node is a number (integer or floating-point). + inline bool is_number() const { + return is_integer() || is_unsigned_integer() || is_double(); + } + // Returns true if the current type of the node is a bool with true value. + inline bool is_true() const { return get_type() == 't'; } + // Returns true if the current type of the node is a bool with false value. + inline bool is_false() const { return get_type() == 'f'; } + // Returns true if the current type of the node is null. + inline bool is_null() const { return get_type() == 'n'; } + // Returns true if the type byte represents an object of an array + static bool is_object_or_array(uint8_t type) { + return ((type == '[') || (type == '{')); + } + + // when at {, go one level deep, looking for a given key + // if successful, we are left pointing at the value, + // if not, we are still pointing at the object ({) + // (in case of repeated keys, this only finds the first one). + // We seek the key using C's strcmp so if your JSON strings contain + // NULL chars, this would trigger a false positive: if you expect that + // to be the case, take extra precautions. + // Furthermore, we do the comparison character-by-character + // without taking into account Unicode equivalence. + inline bool move_to_key(const char *key); + + // as above, but case insensitive lookup (strcmpi instead of strcmp) + inline bool move_to_key_insensitive(const char *key); + + // when at {, go one level deep, looking for a given key + // if successful, we are left pointing at the value, + // if not, we are still pointing at the object ({) + // (in case of repeated keys, this only finds the first one). + // The string we search for can contain NULL values. + // Furthermore, we do the comparison character-by-character + // without taking into account Unicode equivalence. + inline bool move_to_key(const char *key, uint32_t length); + + // when at a key location within an object, this moves to the accompanying + // value (located next to it). This is equivalent but much faster than + // calling "next()". + inline void move_to_value(); + + // when at [, go one level deep, and advance to the given index. + // if successful, we are left pointing at the value, + // if not, we are still pointing at the array ([) + inline bool move_to_index(uint32_t index); + + // Moves the iterator to the value corresponding to the json pointer. + // Always search from the root of the document. + // if successful, we are left pointing at the value, + // if not, we are still pointing the same value we were pointing before the + // call. The json pointer follows the rfc6901 standard's syntax: + // https://tools.ietf.org/html/rfc6901 However, the standard says "If a + // referenced member name is not unique in an object, the member that is + // referenced is undefined, and evaluation fails". Here we just return the + // first corresponding value. The length parameter is the length of the + // jsonpointer string ('pointer'). + inline bool move_to(const char *pointer, uint32_t length); + + // Moves the iterator to the value corresponding to the json pointer. + // Always search from the root of the document. + // if successful, we are left pointing at the value, + // if not, we are still pointing the same value we were pointing before the + // call. The json pointer implementation follows the rfc6901 standard's + // syntax: https://tools.ietf.org/html/rfc6901 However, the standard says + // "If a referenced member name is not unique in an object, the member that + // is referenced is undefined, and evaluation fails". Here we just return + // the first corresponding value. + inline bool move_to(const std::string &pointer); + + private: + // Almost the same as move_to(), except it searches from the current + // position. The pointer's syntax is identical, though that case is not + // handled by the rfc6901 standard. The '/' is still required at the + // beginning. However, contrary to move_to(), the URI Fragment Identifier + // Representation is not supported here. Also, in case of failure, we are + // left pointing at the closest value it could reach. For these reasons it + // is private. It exists because it is used by move_to(). + inline bool relative_move_to(const char *pointer, uint32_t length); + + public: + // throughout return true if we can do the navigation, false + // otherwise + + // Within a given scope (series of nodes at the same depth within either an + // array or an object), we move forward. + // Thus, given [true, null, {"a":1}, [1,2]], we would visit true, null, { + // and [. At the object ({) or at the array ([), you can issue a "down" to + // visit their content. valid if we're not at the end of a scope (returns + // true). + inline bool next(); + + // Within a given scope (series of nodes at the same depth within either an + // array or an object), we move backward. + // Thus, given [true, null, {"a":1}, [1,2]], we would visit ], }, null, true + // when starting at the end of the scope. At the object ({) or at the array + // ([), you can issue a "down" to visit their content. + // Performance warning: This function is implemented by starting again + // from the beginning of the scope and scanning forward. You should expect + // it to be relatively slow. + inline bool prev(); + + // Moves back to either the containing array or object (type { or [) from + // within a contained scope. + // Valid unless we are at the first level of the document + inline bool up(); + + // Valid if we're at a [ or { and it starts a non-empty scope; moves us to + // start of that deeper scope if it not empty. Thus, given [true, null, + // {"a":1}, [1,2]], if we are at the { node, we would move to the "a" node. + inline bool down(); + + // move us to the start of our current scope, + // a scope is a series of nodes at the same level + inline void to_start_scope(); + + inline void rewind(); + + + + // print the node we are currently pointing at + inline bool print(std::ostream &os, bool escape_strings = true) const; + + private: + const document &doc; + size_t max_depth{}; + size_t depth{}; + size_t location{}; // our current location on a tape + size_t tape_length{}; + uint8_t current_type{}; + uint64_t current_val{}; + typedef struct { + size_t start_of_scope; + uint8_t scope_type; + } scopeindex_t; + + scopeindex_t *depth_index{}; +}; + +} // namespace simdjson +#endif // SIMDJSON_DISABLE_DEPRECATED_API + +#endif // SIMDJSON_DOM_PARSEDJSON_ITERATOR_H +/* end file simdjson/dom/parsedjson_iterator.h */ + +// Inline functions +/* including simdjson/dom/array-inl.h: #include "simdjson/dom/array-inl.h" */ +/* begin file simdjson/dom/array-inl.h */ +#ifndef SIMDJSON_ARRAY_INL_H +#define SIMDJSON_ARRAY_INL_H + +#include + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/array.h" */ +/* skipped duplicate #include "simdjson/dom/element.h" */ +/* skipped duplicate #include "simdjson/error-inl.h" */ +/* including simdjson/internal/tape_ref-inl.h: #include "simdjson/internal/tape_ref-inl.h" */ +/* begin file simdjson/internal/tape_ref-inl.h */ +#ifndef SIMDJSON_TAPE_REF_INL_H +#define SIMDJSON_TAPE_REF_INL_H + +/* skipped duplicate #include "simdjson/dom/document.h" */ +/* skipped duplicate #include "simdjson/internal/tape_ref.h" */ +/* skipped duplicate #include "simdjson/internal/tape_type.h" */ + +#include + +namespace simdjson { +namespace internal { + +constexpr const uint64_t JSON_VALUE_MASK = 0x00FFFFFFFFFFFFFF; +constexpr const uint32_t JSON_COUNT_MASK = 0xFFFFFF; + +// +// tape_ref inline implementation +// +simdjson_inline tape_ref::tape_ref() noexcept : doc{nullptr}, json_index{0} {} +simdjson_inline tape_ref::tape_ref(const dom::document *_doc, size_t _json_index) noexcept : doc{_doc}, json_index{_json_index} {} + + +simdjson_inline bool tape_ref::is_document_root() const noexcept { + return json_index == 1; // should we ever change the structure of the tape, this should get updated. +} +simdjson_inline bool tape_ref::usable() const noexcept { + return doc != nullptr; // when the document pointer is null, this tape_ref is uninitialized (should not be accessed). +} +// Some value types have a specific on-tape word value. It can be faster +// to check the type by doing a word-to-word comparison instead of extracting the +// most significant 8 bits. + +simdjson_inline bool tape_ref::is_double() const noexcept { + constexpr uint64_t tape_double = uint64_t(tape_type::DOUBLE)<<56; + return doc->tape[json_index] == tape_double; +} +simdjson_inline bool tape_ref::is_int64() const noexcept { + constexpr uint64_t tape_int64 = uint64_t(tape_type::INT64)<<56; + return doc->tape[json_index] == tape_int64; +} +simdjson_inline bool tape_ref::is_uint64() const noexcept { + constexpr uint64_t tape_uint64 = uint64_t(tape_type::UINT64)<<56; + return doc->tape[json_index] == tape_uint64; +} +simdjson_inline bool tape_ref::is_false() const noexcept { + constexpr uint64_t tape_false = uint64_t(tape_type::FALSE_VALUE)<<56; + return doc->tape[json_index] == tape_false; +} +simdjson_inline bool tape_ref::is_true() const noexcept { + constexpr uint64_t tape_true = uint64_t(tape_type::TRUE_VALUE)<<56; + return doc->tape[json_index] == tape_true; +} +simdjson_inline bool tape_ref::is_null_on_tape() const noexcept { + constexpr uint64_t tape_null = uint64_t(tape_type::NULL_VALUE)<<56; + return doc->tape[json_index] == tape_null; +} + +inline size_t tape_ref::after_element() const noexcept { + switch (tape_ref_type()) { + case tape_type::START_ARRAY: + case tape_type::START_OBJECT: + return matching_brace_index(); + case tape_type::UINT64: + case tape_type::INT64: + case tape_type::DOUBLE: + return json_index + 2; + default: + return json_index + 1; + } +} +simdjson_inline tape_type tape_ref::tape_ref_type() const noexcept { + return static_cast(doc->tape[json_index] >> 56); +} +simdjson_inline uint64_t internal::tape_ref::tape_value() const noexcept { + return doc->tape[json_index] & internal::JSON_VALUE_MASK; +} +simdjson_inline uint32_t internal::tape_ref::matching_brace_index() const noexcept { + return uint32_t(doc->tape[json_index]); +} +simdjson_inline uint32_t internal::tape_ref::scope_count() const noexcept { + return uint32_t((doc->tape[json_index] >> 32) & internal::JSON_COUNT_MASK); +} + +template +simdjson_inline T tape_ref::next_tape_value() const noexcept { + static_assert(sizeof(T) == sizeof(uint64_t), "next_tape_value() template parameter must be 64-bit"); + // Though the following is tempting... + // return *reinterpret_cast(&doc->tape[json_index + 1]); + // It is not generally safe. It is safer, and often faster to rely + // on memcpy. Yes, it is uglier, but it is also encapsulated. + T x; + std::memcpy(&x,&doc->tape[json_index + 1],sizeof(uint64_t)); + return x; +} + +simdjson_inline uint32_t internal::tape_ref::get_string_length() const noexcept { + size_t string_buf_index = size_t(tape_value()); + uint32_t len; + std::memcpy(&len, &doc->string_buf[string_buf_index], sizeof(len)); + return len; +} + +simdjson_inline const char * internal::tape_ref::get_c_str() const noexcept { + size_t string_buf_index = size_t(tape_value()); + return reinterpret_cast(&doc->string_buf[string_buf_index + sizeof(uint32_t)]); +} + +inline std::string_view internal::tape_ref::get_string_view() const noexcept { + return std::string_view( + get_c_str(), + get_string_length() + ); +} + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_TAPE_REF_INL_H +/* end file simdjson/internal/tape_ref-inl.h */ + +#include + +namespace simdjson { + +// +// simdjson_result inline implementation +// +simdjson_inline simdjson_result::simdjson_result() noexcept + : internal::simdjson_result_base() {} +simdjson_inline simdjson_result::simdjson_result(dom::array value) noexcept + : internal::simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : internal::simdjson_result_base(error) {} + +#if SIMDJSON_EXCEPTIONS + +inline dom::array::iterator simdjson_result::begin() const noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first.begin(); +} +inline dom::array::iterator simdjson_result::end() const noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first.end(); +} +inline size_t simdjson_result::size() const noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first.size(); +} + +#endif // SIMDJSON_EXCEPTIONS + +inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) const noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} +inline simdjson_result simdjson_result::at(size_t index) const noexcept { + if (error()) { return error(); } + return first.at(index); +} + +namespace dom { + +// +// array inline implementation +// +simdjson_inline array::array() noexcept : tape{} {} +simdjson_inline array::array(const internal::tape_ref &_tape) noexcept : tape{_tape} {} +inline array::iterator array::begin() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + return internal::tape_ref(tape.doc, tape.json_index + 1); +} +inline array::iterator array::end() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + return internal::tape_ref(tape.doc, tape.after_element() - 1); +} +inline size_t array::size() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + return tape.scope_count(); +} +inline size_t array::number_of_slots() const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + return tape.matching_brace_index() - tape.json_index; +} +inline simdjson_result array::at_pointer(std::string_view json_pointer) const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + if(json_pointer.empty()) { // an empty string means that we return the current node + return element(this->tape); // copy the current node + } else if(json_pointer[0] != '/') { // otherwise there is an error + return INVALID_JSON_POINTER; + } + json_pointer = json_pointer.substr(1); + // - means "the append position" or "the element after the end of the array" + // We don't support this, because we're returning a real element, not a position. + if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; } + + // Read the array index + size_t array_index = 0; + size_t i; + for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) { + uint8_t digit = uint8_t(json_pointer[i] - '0'); + // Check for non-digit in array index. If it's there, we're trying to get a field in an object + if (digit > 9) { return INCORRECT_TYPE; } + array_index = array_index*10 + digit; + } + + // 0 followed by other digits is invalid + if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0" + + // Empty string is invalid; so is a "/" with no digits before it + if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index" + + // Get the child + auto child = array(tape).at(array_index); + // If there is an error, it ends here + if(child.error()) { + return child; + } + // If there is a /, we're not done yet, call recursively. + if (i < json_pointer.length()) { + child = child.at_pointer(json_pointer.substr(i)); + } + return child; +} + +inline simdjson_result array::at(size_t index) const noexcept { + SIMDJSON_DEVELOPMENT_ASSERT(tape.usable()); // https://github.com/simdjson/simdjson/issues/1914 + size_t i=0; + for (auto element : *this) { + if (i == index) { return element; } + i++; + } + return INDEX_OUT_OF_BOUNDS; +} + +// +// array::iterator inline implementation +// +simdjson_inline array::iterator::iterator(const internal::tape_ref &_tape) noexcept : tape{_tape} { } +inline element array::iterator::operator*() const noexcept { + return element(tape); +} +inline array::iterator& array::iterator::operator++() noexcept { + tape.json_index = tape.after_element(); + return *this; +} +inline array::iterator array::iterator::operator++(int) noexcept { + array::iterator out = *this; + ++*this; + return out; +} +inline bool array::iterator::operator!=(const array::iterator& other) const noexcept { + return tape.json_index != other.tape.json_index; +} +inline bool array::iterator::operator==(const array::iterator& other) const noexcept { + return tape.json_index == other.tape.json_index; +} +inline bool array::iterator::operator<(const array::iterator& other) const noexcept { + return tape.json_index < other.tape.json_index; +} +inline bool array::iterator::operator<=(const array::iterator& other) const noexcept { + return tape.json_index <= other.tape.json_index; +} +inline bool array::iterator::operator>=(const array::iterator& other) const noexcept { + return tape.json_index >= other.tape.json_index; +} +inline bool array::iterator::operator>(const array::iterator& other) const noexcept { + return tape.json_index > other.tape.json_index; +} + +} // namespace dom + + +} // namespace simdjson + +/* skipped duplicate #include "simdjson/dom/element-inl.h" */ + +#if defined(__cpp_lib_ranges) +static_assert(std::ranges::view); +static_assert(std::ranges::sized_range); +#if SIMDJSON_EXCEPTIONS +static_assert(std::ranges::view>); +static_assert(std::ranges::sized_range>); +#endif // SIMDJSON_EXCEPTIONS +#endif // defined(__cpp_lib_ranges) + +#endif // SIMDJSON_ARRAY_INL_H +/* end file simdjson/dom/array-inl.h */ +/* skipped duplicate #include "simdjson/dom/document_stream-inl.h" */ +/* including simdjson/dom/document-inl.h: #include "simdjson/dom/document-inl.h" */ +/* begin file simdjson/dom/document-inl.h */ +#ifndef SIMDJSON_DOCUMENT_INL_H +#define SIMDJSON_DOCUMENT_INL_H + +// Inline implementations go in here. + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/document.h" */ +/* skipped duplicate #include "simdjson/dom/element-inl.h" */ +/* skipped duplicate #include "simdjson/internal/tape_ref-inl.h" */ +/* including simdjson/internal/jsonformatutils.h: #include "simdjson/internal/jsonformatutils.h" */ +/* begin file simdjson/internal/jsonformatutils.h */ +#ifndef SIMDJSON_INTERNAL_JSONFORMATUTILS_H +#define SIMDJSON_INTERNAL_JSONFORMATUTILS_H + +/* skipped duplicate #include "simdjson/base.h" */ +#include +#include +#include + +namespace simdjson { +namespace internal { + +inline std::ostream& operator<<(std::ostream& out, const escape_json_string &str); + +class escape_json_string { +public: + escape_json_string(std::string_view _str) noexcept : str{_str} {} + operator std::string() const noexcept { std::stringstream s; s << *this; return s.str(); } +private: + std::string_view str; + friend std::ostream& operator<<(std::ostream& out, const escape_json_string &unescaped); +}; + +inline std::ostream& operator<<(std::ostream& out, const escape_json_string &unescaped) { + for (size_t i=0; i(unescaped.str[i]) <= 0x1F) { + // TODO can this be done once at the beginning, or will it mess up << char? + std::ios::fmtflags f(out.flags()); + out << "\\u" << std::hex << std::setw(4) << std::setfill('0') << int(unescaped.str[i]); + out.flags(f); + } else { + out << unescaped.str[i]; + } + } + } + return out; +} + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_JSONFORMATUTILS_H +/* end file simdjson/internal/jsonformatutils.h */ + +#include + +namespace simdjson { +namespace dom { + +// +// document inline implementation +// +inline element document::root() const noexcept { + return element(internal::tape_ref(this, 1)); +} +simdjson_warn_unused +inline size_t document::capacity() const noexcept { + return allocated_capacity; +} + +simdjson_warn_unused +inline error_code document::allocate(size_t capacity) noexcept { + if (capacity == 0) { + string_buf.reset(); + tape.reset(); + allocated_capacity = 0; + return SUCCESS; + } + + // a pathological input like "[[[[..." would generate capacity tape elements, so + // need a capacity of at least capacity + 1, but it is also possible to do + // 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" + //where capacity + 1 tape elements are + // generated, see issue https://github.com/simdjson/simdjson/issues/345 + size_t tape_capacity = SIMDJSON_ROUNDUP_N(capacity + 3, 64); + // a document with only zero-length strings... could have capacity/3 string + // and we would need capacity/3 * 5 bytes on the string buffer + size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * capacity / 3 + SIMDJSON_PADDING, 64); + string_buf.reset( new (std::nothrow) uint8_t[string_capacity]); + tape.reset(new (std::nothrow) uint64_t[tape_capacity]); + if(!(string_buf && tape)) { + allocated_capacity = 0; + string_buf.reset(); + tape.reset(); + return MEMALLOC; + } + // Technically the allocated_capacity might be larger than capacity + // so the next line is pessimistic. + allocated_capacity = capacity; + return SUCCESS; +} + +inline bool document::dump_raw_tape(std::ostream &os) const noexcept { + uint32_t string_length; + size_t tape_idx = 0; + uint64_t tape_val = tape[tape_idx]; + uint8_t type = uint8_t(tape_val >> 56); + os << tape_idx << " : " << type; + tape_idx++; + size_t how_many = 0; + if (type == 'r') { + how_many = size_t(tape_val & internal::JSON_VALUE_MASK); + } else { + // Error: no starting root node? + return false; + } + os << "\t// pointing to " << how_many << " (right after last node)\n"; + uint64_t payload; + for (; tape_idx < how_many; tape_idx++) { + os << tape_idx << " : "; + tape_val = tape[tape_idx]; + payload = tape_val & internal::JSON_VALUE_MASK; + type = uint8_t(tape_val >> 56); + switch (type) { + case '"': // we have a string + os << "string \""; + std::memcpy(&string_length, string_buf.get() + payload, sizeof(uint32_t)); + os << internal::escape_json_string(std::string_view( + reinterpret_cast(string_buf.get() + payload + sizeof(uint32_t)), + string_length + )); + os << '"'; + os << '\n'; + break; + case 'l': // we have a long int + if (tape_idx + 1 >= how_many) { + return false; + } + os << "integer " << static_cast(tape[++tape_idx]) << "\n"; + break; + case 'u': // we have a long uint + if (tape_idx + 1 >= how_many) { + return false; + } + os << "unsigned integer " << tape[++tape_idx] << "\n"; + break; + case 'd': // we have a double + os << "float "; + if (tape_idx + 1 >= how_many) { + return false; + } + double answer; + std::memcpy(&answer, &tape[++tape_idx], sizeof(answer)); + os << answer << '\n'; + break; + case 'n': // we have a null + os << "null\n"; + break; + case 't': // we have a true + os << "true\n"; + break; + case 'f': // we have a false + os << "false\n"; + break; + case '{': // we have an object + os << "{\t// pointing to next tape location " << uint32_t(payload) + << " (first node after the scope), " + << " saturated count " + << ((payload >> 32) & internal::JSON_COUNT_MASK)<< "\n"; + break; case '}': // we end an object + os << "}\t// pointing to previous tape location " << uint32_t(payload) + << " (start of the scope)\n"; + break; + case '[': // we start an array + os << "[\t// pointing to next tape location " << uint32_t(payload) + << " (first node after the scope), " + << " saturated count " + << ((payload >> 32) & internal::JSON_COUNT_MASK)<< "\n"; + break; + case ']': // we end an array + os << "]\t// pointing to previous tape location " << uint32_t(payload) + << " (start of the scope)\n"; + break; + case 'r': // we start and end with the root node + // should we be hitting the root node? + return false; + default: + return false; + } + } + tape_val = tape[tape_idx]; + payload = tape_val & internal::JSON_VALUE_MASK; + type = uint8_t(tape_val >> 56); + os << tape_idx << " : " << type << "\t// pointing to " << payload + << " (start root)\n"; + return true; +} + +} // namespace dom +} // namespace simdjson + +#endif // SIMDJSON_DOCUMENT_INL_H +/* end file simdjson/dom/document-inl.h */ +/* skipped duplicate #include "simdjson/dom/element-inl.h" */ +/* skipped duplicate #include "simdjson/dom/object-inl.h" */ +/* including simdjson/dom/parsedjson_iterator-inl.h: #include "simdjson/dom/parsedjson_iterator-inl.h" */ +/* begin file simdjson/dom/parsedjson_iterator-inl.h */ +#ifndef SIMDJSON_PARSEDJSON_ITERATOR_INL_H +#define SIMDJSON_PARSEDJSON_ITERATOR_INL_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/parsedjson_iterator.h" */ +/* skipped duplicate #include "simdjson/internal/jsonformatutils.h" */ + +/* skipped duplicate #include "simdjson/dom/parser-inl.h" */ +/* skipped duplicate #include "simdjson/internal/tape_ref-inl.h" */ + +#include +#include +#include +#include + +#ifndef SIMDJSON_DISABLE_DEPRECATED_API + +namespace simdjson { + +// VS2017 reports deprecated warnings when you define a deprecated class's methods. +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_DEPRECATED_WARNING + +// Because of template weirdness, the actual class definition is inline in the document class +simdjson_warn_unused bool dom::parser::Iterator::is_ok() const { + return location < tape_length; +} + +// useful for debugging purposes +size_t dom::parser::Iterator::get_tape_location() const { + return location; +} + +// useful for debugging purposes +size_t dom::parser::Iterator::get_tape_length() const { + return tape_length; +} + +// returns the current depth (start at 1 with 0 reserved for the fictitious root +// node) +size_t dom::parser::Iterator::get_depth() const { + return depth; +} + +// A scope is a series of nodes at the same depth, typically it is either an +// object ({) or an array ([). The root node has type 'r'. +uint8_t dom::parser::Iterator::get_scope_type() const { + return depth_index[depth].scope_type; +} + +bool dom::parser::Iterator::move_forward() { + if (location + 1 >= tape_length) { + return false; // we are at the end! + } + + if ((current_type == '[') || (current_type == '{')) { + // We are entering a new scope + depth++; + assert(depth < max_depth); + depth_index[depth].start_of_scope = location; + depth_index[depth].scope_type = current_type; + } else if ((current_type == ']') || (current_type == '}')) { + // Leaving a scope. + depth--; + } else if (is_number()) { + // these types use 2 locations on the tape, not just one. + location += 1; + } + + location += 1; + current_val = doc.tape[location]; + current_type = uint8_t(current_val >> 56); + return true; +} + +void dom::parser::Iterator::move_to_value() { + // assume that we are on a key, so move by 1. + location += 1; + current_val = doc.tape[location]; + current_type = uint8_t(current_val >> 56); +} + +bool dom::parser::Iterator::move_to_key(const char *key) { + if (down()) { + do { + const bool right_key = (strcmp(get_string(), key) == 0); + move_to_value(); + if (right_key) { + return true; + } + } while (next()); + up(); + } + return false; +} + +bool dom::parser::Iterator::move_to_key_insensitive( + const char *key) { + if (down()) { + do { + const bool right_key = (simdjson_strcasecmp(get_string(), key) == 0); + move_to_value(); + if (right_key) { + return true; + } + } while (next()); + up(); + } + return false; +} + +bool dom::parser::Iterator::move_to_key(const char *key, + uint32_t length) { + if (down()) { + do { + bool right_key = ((get_string_length() == length) && + (memcmp(get_string(), key, length) == 0)); + move_to_value(); + if (right_key) { + return true; + } + } while (next()); + up(); + } + return false; +} + +bool dom::parser::Iterator::move_to_index(uint32_t index) { + if (down()) { + uint32_t i = 0; + for (; i < index; i++) { + if (!next()) { + break; + } + } + if (i == index) { + return true; + } + up(); + } + return false; +} + +bool dom::parser::Iterator::prev() { + size_t target_location = location; + to_start_scope(); + size_t npos = location; + if (target_location == npos) { + return false; // we were already at the start + } + size_t oldnpos; + // we have that npos < target_location here + do { + oldnpos = npos; + if ((current_type == '[') || (current_type == '{')) { + // we need to jump + npos = uint32_t(current_val); + } else { + npos = npos + ((current_type == 'd' || current_type == 'l') ? 2 : 1); + } + } while (npos < target_location); + location = oldnpos; + current_val = doc.tape[location]; + current_type = uint8_t(current_val >> 56); + return true; +} + +bool dom::parser::Iterator::up() { + if (depth == 1) { + return false; // don't allow moving back to root + } + to_start_scope(); + // next we just move to the previous value + depth--; + location -= 1; + current_val = doc.tape[location]; + current_type = uint8_t(current_val >> 56); + return true; +} + +bool dom::parser::Iterator::down() { + if (location + 1 >= tape_length) { + return false; + } + if ((current_type == '[') || (current_type == '{')) { + size_t npos = uint32_t(current_val); + if (npos == location + 2) { + return false; // we have an empty scope + } + depth++; + assert(depth < max_depth); + location = location + 1; + depth_index[depth].start_of_scope = location; + depth_index[depth].scope_type = current_type; + current_val = doc.tape[location]; + current_type = uint8_t(current_val >> 56); + return true; + } + return false; +} + +void dom::parser::Iterator::to_start_scope() { + location = depth_index[depth].start_of_scope; + current_val = doc.tape[location]; + current_type = uint8_t(current_val >> 56); +} + +inline void dom::parser::Iterator::rewind() { + while (up()) + ; +} + + +bool dom::parser::Iterator::next() { + size_t npos; + if ((current_type == '[') || (current_type == '{')) { + // we need to jump + npos = uint32_t(current_val); + } else { + npos = location + (is_number() ? 2 : 1); + } + uint64_t next_val = doc.tape[npos]; + uint8_t next_type = uint8_t(next_val >> 56); + if ((next_type == ']') || (next_type == '}')) { + return false; // we reached the end of the scope + } + location = npos; + current_val = next_val; + current_type = next_type; + return true; +} +dom::parser::Iterator::Iterator(const dom::parser &pj) noexcept(false) + : doc(pj.doc) +{ +#if SIMDJSON_EXCEPTIONS + if (!pj.valid) { throw simdjson_error(pj.error); } +#else + if (!pj.valid) { return; } // abort() usage is forbidden in the library +#endif + + max_depth = pj.max_depth(); + depth_index = new scopeindex_t[max_depth + 1]; + depth_index[0].start_of_scope = location; + current_val = doc.tape[location++]; + current_type = uint8_t(current_val >> 56); + depth_index[0].scope_type = current_type; + tape_length = size_t(current_val & internal::JSON_VALUE_MASK); + if (location < tape_length) { + // If we make it here, then depth_capacity must >=2, but the compiler + // may not know this. + current_val = doc.tape[location]; + current_type = uint8_t(current_val >> 56); + depth++; + assert(depth < max_depth); + depth_index[depth].start_of_scope = location; + depth_index[depth].scope_type = current_type; + } +} +dom::parser::Iterator::Iterator( + const dom::parser::Iterator &o) noexcept + : doc(o.doc), + max_depth(o.depth), + depth(o.depth), + location(o.location), + tape_length(o.tape_length), + current_type(o.current_type), + current_val(o.current_val) +{ + depth_index = new scopeindex_t[max_depth+1]; + std::memcpy(depth_index, o.depth_index, (depth + 1) * sizeof(depth_index[0])); +} + +dom::parser::Iterator::~Iterator() noexcept { + if (depth_index) { delete[] depth_index; } +} + +bool dom::parser::Iterator::print(std::ostream &os, bool escape_strings) const { + if (!is_ok()) { + return false; + } + switch (current_type) { + case '"': // we have a string + os << '"'; + if (escape_strings) { + os << internal::escape_json_string(std::string_view(get_string(), get_string_length())); + } else { + // was: os << get_string();, but given that we can include null chars, we + // have to do something crazier: + std::copy(get_string(), get_string() + get_string_length(), std::ostream_iterator(os)); + } + os << '"'; + break; + case 'l': // we have a long int + os << get_integer(); + break; + case 'u': + os << get_unsigned_integer(); + break; + case 'd': + os << get_double(); + break; + case 'n': // we have a null + os << "null"; + break; + case 't': // we have a true + os << "true"; + break; + case 'f': // we have a false + os << "false"; + break; + case '{': // we have an object + case '}': // we end an object + case '[': // we start an array + case ']': // we end an array + os << char(current_type); + break; + default: + return false; + } + return true; +} + +bool dom::parser::Iterator::move_to(const char *pointer, + uint32_t length) { + char *new_pointer = nullptr; + if (pointer[0] == '#') { + // Converting fragment representation to string representation + new_pointer = new char[length]; + uint32_t new_length = 0; + for (uint32_t i = 1; i < length; i++) { + if (pointer[i] == '%' && pointer[i + 1] == 'x') { +#if __cpp_exceptions + try { +#endif + int fragment = + std::stoi(std::string(&pointer[i + 2], 2), nullptr, 16); + if (fragment == '\\' || fragment == '"' || (fragment <= 0x1F)) { + // escaping the character + new_pointer[new_length] = '\\'; + new_length++; + } + new_pointer[new_length] = char(fragment); + i += 3; +#if __cpp_exceptions + } catch (std::invalid_argument &) { + delete[] new_pointer; + return false; // the fragment is invalid + } +#endif + } else { + new_pointer[new_length] = pointer[i]; + } + new_length++; + } + length = new_length; + pointer = new_pointer; + } + + // saving the current state + size_t depth_s = depth; + size_t location_s = location; + uint8_t current_type_s = current_type; + uint64_t current_val_s = current_val; + + rewind(); // The json pointer is used from the root of the document. + + bool found = relative_move_to(pointer, length); + delete[] new_pointer; + + if (!found) { + // since the pointer has found nothing, we get back to the original + // position. + depth = depth_s; + location = location_s; + current_type = current_type_s; + current_val = current_val_s; + } + + return found; +} + +inline bool dom::parser::Iterator::move_to(const std::string &pointer) { + return move_to(pointer.c_str(), uint32_t(pointer.length())); +} + +inline int64_t dom::parser::Iterator::get_integer() const { + if (location + 1 >= tape_length) { + return 0; // default value in case of error + } + return static_cast(doc.tape[location + 1]); +} + +inline uint64_t dom::parser::Iterator::get_unsigned_integer() const { + if (location + 1 >= tape_length) { + return 0; // default value in case of error + } + return doc.tape[location + 1]; +} + +inline const char * dom::parser::Iterator::get_string() const { + return reinterpret_cast( + doc.string_buf.get() + (current_val & internal::JSON_VALUE_MASK) + sizeof(uint32_t)); +} + +inline uint32_t dom::parser::Iterator::get_string_length() const { + uint32_t answer; + std::memcpy(&answer, + reinterpret_cast(doc.string_buf.get() + + (current_val & internal::JSON_VALUE_MASK)), + sizeof(uint32_t)); + return answer; +} + +inline double dom::parser::Iterator::get_double() const { + if (location + 1 >= tape_length) { + return std::numeric_limits::quiet_NaN(); // default value in + // case of error + } + double answer; + std::memcpy(&answer, &doc.tape[location + 1], sizeof(answer)); + return answer; +} + +bool dom::parser::Iterator::relative_move_to(const char *pointer, + uint32_t length) { + if (length == 0) { + // returns the whole document + return true; + } + + if (pointer[0] != '/') { + // '/' must be the first character + return false; + } + + // finding the key in an object or the index in an array + std::string key_or_index; + uint32_t offset = 1; + + // checking for the "-" case + if (is_array() && pointer[1] == '-') { + if (length != 2) { + // the pointer must be exactly "/-" + // there can't be anything more after '-' as an index + return false; + } + key_or_index = '-'; + offset = length; // will skip the loop coming right after + } + + // We either transform the first reference token to a valid json key + // or we make sure it is a valid index in an array. + for (; offset < length; offset++) { + if (pointer[offset] == '/') { + // beginning of the next key or index + break; + } + if (is_array() && (pointer[offset] < '0' || pointer[offset] > '9')) { + // the index of an array must be an integer + // we also make sure std::stoi won't discard whitespaces later + return false; + } + if (pointer[offset] == '~') { + // "~1" represents "/" + if (pointer[offset + 1] == '1') { + key_or_index += '/'; + offset++; + continue; + } + // "~0" represents "~" + if (pointer[offset + 1] == '0') { + key_or_index += '~'; + offset++; + continue; + } + } + if (pointer[offset] == '\\') { + if (pointer[offset + 1] == '\\' || pointer[offset + 1] == '"' || + (pointer[offset + 1] <= 0x1F)) { + key_or_index += pointer[offset + 1]; + offset++; + continue; + } + return false; // invalid escaped character + } + if (pointer[offset] == '\"') { + // unescaped quote character. this is an invalid case. + // lets do nothing and assume most pointers will be valid. + // it won't find any corresponding json key anyway. + // return false; + } + key_or_index += pointer[offset]; + } + + bool found = false; + if (is_object()) { + if (move_to_key(key_or_index.c_str(), uint32_t(key_or_index.length()))) { + found = relative_move_to(pointer + offset, length - offset); + } + } else if (is_array()) { + if (key_or_index == "-") { // handling "-" case first + if (down()) { + while (next()) + ; // moving to the end of the array + // moving to the nonexistent value right after... + size_t npos; + if ((current_type == '[') || (current_type == '{')) { + // we need to jump + npos = uint32_t(current_val); + } else { + npos = + location + ((current_type == 'd' || current_type == 'l') ? 2 : 1); + } + location = npos; + current_val = doc.tape[npos]; + current_type = uint8_t(current_val >> 56); + return true; // how could it fail ? + } + } else { // regular numeric index + // The index can't have a leading '0' + if (key_or_index[0] == '0' && key_or_index.length() > 1) { + return false; + } + // it cannot be empty + if (key_or_index.length() == 0) { + return false; + } + // we already checked the index contains only valid digits + uint32_t index = std::stoi(key_or_index); + if (move_to_index(index)) { + found = relative_move_to(pointer + offset, length - offset); + } + } + } + + return found; +} + +SIMDJSON_POP_DISABLE_WARNINGS +} // namespace simdjson + +#endif // SIMDJSON_DISABLE_DEPRECATED_API + + +#endif // SIMDJSON_PARSEDJSON_ITERATOR_INL_H +/* end file simdjson/dom/parsedjson_iterator-inl.h */ +/* skipped duplicate #include "simdjson/dom/parser-inl.h" */ +/* skipped duplicate #include "simdjson/internal/tape_ref-inl.h" */ +/* including simdjson/dom/serialization-inl.h: #include "simdjson/dom/serialization-inl.h" */ +/* begin file simdjson/dom/serialization-inl.h */ + +#ifndef SIMDJSON_SERIALIZATION_INL_H +#define SIMDJSON_SERIALIZATION_INL_H + +/* skipped duplicate #include "simdjson/dom/base.h" */ +/* skipped duplicate #include "simdjson/dom/serialization.h" */ +/* skipped duplicate #include "simdjson/dom/parser.h" */ +/* skipped duplicate #include "simdjson/internal/tape_type.h" */ + +/* skipped duplicate #include "simdjson/dom/array-inl.h" */ +/* skipped duplicate #include "simdjson/dom/object-inl.h" */ +/* skipped duplicate #include "simdjson/internal/tape_ref-inl.h" */ + +#include + +namespace simdjson { +namespace dom { +inline bool parser::print_json(std::ostream &os) const noexcept { + if (!valid) { return false; } + simdjson::internal::string_builder<> sb; + sb.append(doc.root()); + std::string_view answer = sb.str(); + os << answer; + return true; +} + +inline std::ostream& operator<<(std::ostream& out, simdjson::dom::element value) { + simdjson::internal::string_builder<> sb; + sb.append(value); + return (out << sb.str()); +} +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#endif +inline std::ostream& operator<<(std::ostream& out, simdjson::dom::array value) { + simdjson::internal::string_builder<> sb; + sb.append(value); + return (out << sb.str()); +} +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#endif +inline std::ostream& operator<<(std::ostream& out, simdjson::dom::object value) { + simdjson::internal::string_builder<> sb; + sb.append(value); + return (out << sb.str()); +} +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#endif + +} // namespace dom + +/*** + * Number utility functions + **/ +namespace { +/**@private + * Escape sequence like \b or \u0001 + * We expect that most compilers will use 8 bytes for this data structure. + **/ +struct escape_sequence { + uint8_t length; + const char string[7]; // technically, we only ever need 6 characters, we pad to 8 +}; +/**@private + * This converts a signed integer into a character sequence. + * The caller is responsible for providing enough memory (at least + * 20 characters.) + * Though various runtime libraries provide itoa functions, + * it is not part of the C++ standard. The C++17 standard + * adds the to_chars functions which would do as well, but + * we want to support C++11. + */ +static char *fast_itoa(char *output, int64_t value) noexcept { + // This is a standard implementation of itoa. + char buffer[20]; + uint64_t value_positive; + // In general, negating a signed integer is unsafe. + if(value < 0) { + *output++ = '-'; + // Doing value_positive = -value; while avoiding + // undefined behavior warnings. + // It assumes two complement's which is universal at this + // point in time. + std::memcpy(&value_positive, &value, sizeof(value)); + value_positive = (~value_positive) + 1; // this is a negation + } else { + value_positive = value; + } + // We work solely with value_positive. It *might* be easier + // for an optimizing compiler to deal with an unsigned variable + // as far as performance goes. + const char *const end_buffer = buffer + 20; + char *write_pointer = buffer + 19; + // A faster approach is possible if we expect large integers: + // unroll the loop (work in 100s, 1000s) and use some kind of + // memoization. + while(value_positive >= 10) { + *write_pointer-- = char('0' + (value_positive % 10)); + value_positive /= 10; + } + *write_pointer = char('0' + value_positive); + size_t len = end_buffer - write_pointer; + std::memcpy(output, write_pointer, len); + return output + len; +} +/**@private + * This converts an unsigned integer into a character sequence. + * The caller is responsible for providing enough memory (at least + * 19 characters.) + * Though various runtime libraries provide itoa functions, + * it is not part of the C++ standard. The C++17 standard + * adds the to_chars functions which would do as well, but + * we want to support C++11. + */ +static char *fast_itoa(char *output, uint64_t value) noexcept { + // This is a standard implementation of itoa. + char buffer[20]; + const char *const end_buffer = buffer + 20; + char *write_pointer = buffer + 19; + // A faster approach is possible if we expect large integers: + // unroll the loop (work in 100s, 1000s) and use some kind of + // memoization. + while(value >= 10) { + *write_pointer-- = char('0' + (value % 10)); + value /= 10; + }; + *write_pointer = char('0' + value); + size_t len = end_buffer - write_pointer; + std::memcpy(output, write_pointer, len); + return output + len; +} + + +} // anonymous namespace +namespace internal { + +/*** + * Minifier/formatter code. + **/ + +template +simdjson_inline void base_formatter::number(uint64_t x) { + char number_buffer[24]; + char *newp = fast_itoa(number_buffer, x); + buffer.insert(buffer.end(), number_buffer, newp); +} + +template +simdjson_inline void base_formatter::number(int64_t x) { + char number_buffer[24]; + char *newp = fast_itoa(number_buffer, x); + buffer.insert(buffer.end(), number_buffer, newp); +} + +template +simdjson_inline void base_formatter::number(double x) { + char number_buffer[24]; + // Currently, passing the nullptr to the second argument is + // safe because our implementation does not check the second + // argument. + char *newp = internal::to_chars(number_buffer, nullptr, x); + buffer.insert(buffer.end(), number_buffer, newp); +} + +template +simdjson_inline void base_formatter::start_array() { one_char('['); } + + +template +simdjson_inline void base_formatter::end_array() { one_char(']'); } + +template +simdjson_inline void base_formatter::start_object() { one_char('{'); } + +template +simdjson_inline void base_formatter::end_object() { one_char('}'); } + +template +simdjson_inline void base_formatter::comma() { one_char(','); } + +template +simdjson_inline void base_formatter::true_atom() { + const char * s = "true"; + buffer.insert(buffer.end(), s, s + 4); +} + +template +simdjson_inline void base_formatter::false_atom() { + const char * s = "false"; + buffer.insert(buffer.end(), s, s + 5); +} + +template +simdjson_inline void base_formatter::null_atom() { + const char * s = "null"; + buffer.insert(buffer.end(), s, s + 4); +} + +template +simdjson_inline void base_formatter::one_char(char c) { buffer.push_back(c); } + +template +simdjson_inline void base_formatter::key(std::string_view unescaped) { + string(unescaped); + one_char(':'); +} + +template +simdjson_inline void base_formatter::string(std::string_view unescaped) { + one_char('\"'); + size_t i = 0; + // Fast path for the case where we have no control character, no ", and no backslash. + // This should include most keys. + // + // We would like to use 'bool' but some compilers take offense to bitwise operation + // with bool types. + constexpr static char needs_escaping[] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, + 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, + 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, + 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, + 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, + 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, + 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, + 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, + 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, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + for(;i + 8 <= unescaped.length(); i += 8) { + // Poor's man vectorization. This could get much faster if we used SIMD. + // + // It is not the case that replacing '|' with '||' would be neutral performance-wise. + if(needs_escaping[uint8_t(unescaped[i])] | needs_escaping[uint8_t(unescaped[i+1])] + | needs_escaping[uint8_t(unescaped[i+2])] | needs_escaping[uint8_t(unescaped[i+3])] + | needs_escaping[uint8_t(unescaped[i+4])] | needs_escaping[uint8_t(unescaped[i+5])] + | needs_escaping[uint8_t(unescaped[i+6])] | needs_escaping[uint8_t(unescaped[i+7])] + ) { break; } + } + for(;i < unescaped.length(); i++) { + if(needs_escaping[uint8_t(unescaped[i])]) { break; } + } + // The following is also possible and omits a 256-byte table, but it is slower: + // for (; (i < unescaped.length()) && (uint8_t(unescaped[i]) > 0x1F) + // && (unescaped[i] != '\"') && (unescaped[i] != '\\'); i++) {} + + // At least for long strings, the following should be fast. We could + // do better by integrating the checks and the insertion. + buffer.insert(buffer.end(), unescaped.data(), unescaped.data() + i); + // We caught a control character if we enter this loop (slow). + // Note that we are do not restart from the beginning, but rather we continue + // from the point where we encountered something that requires escaping. + for (; i < unescaped.length(); i++) { + switch (unescaped[i]) { + case '\"': + { + const char * s = "\\\""; + buffer.insert(buffer.end(), s, s + 2); + } + break; + case '\\': + { + const char * s = "\\\\"; + buffer.insert(buffer.end(), s, s + 2); + } + break; + default: + if (uint8_t(unescaped[i]) <= 0x1F) { + // If packed, this uses 8 * 32 bytes. + // Note that we expect most compilers to embed this code in the data + // section. + constexpr static escape_sequence escaped[32] = { + {6, "\\u0000"}, {6, "\\u0001"}, {6, "\\u0002"}, {6, "\\u0003"}, + {6, "\\u0004"}, {6, "\\u0005"}, {6, "\\u0006"}, {6, "\\u0007"}, + {2, "\\b"}, {2, "\\t"}, {2, "\\n"}, {6, "\\u000b"}, + {2, "\\f"}, {2, "\\r"}, {6, "\\u000e"}, {6, "\\u000f"}, + {6, "\\u0010"}, {6, "\\u0011"}, {6, "\\u0012"}, {6, "\\u0013"}, + {6, "\\u0014"}, {6, "\\u0015"}, {6, "\\u0016"}, {6, "\\u0017"}, + {6, "\\u0018"}, {6, "\\u0019"}, {6, "\\u001a"}, {6, "\\u001b"}, + {6, "\\u001c"}, {6, "\\u001d"}, {6, "\\u001e"}, {6, "\\u001f"}}; + auto u = escaped[uint8_t(unescaped[i])]; + buffer.insert(buffer.end(), u.string, u.string + u.length); + } else { + one_char(unescaped[i]); + } + } // switch + } // for + one_char('\"'); +} + + +template +inline void base_formatter::clear() { + buffer.clear(); +} + +template +simdjson_inline std::string_view base_formatter::str() const { + return std::string_view(buffer.data(), buffer.size()); +} + +simdjson_inline void mini_formatter::print_newline() { + return; +} + +simdjson_inline void mini_formatter::print_indents(size_t depth) { + (void)depth; + return; +} + +simdjson_inline void mini_formatter::print_space() { + return; +} + +simdjson_inline void pretty_formatter::print_newline() { + one_char('\n'); +} + +simdjson_inline void pretty_formatter::print_indents(size_t depth) { + if(this->indent_step <= 0) { + return; + } + for(size_t i = 0; i < this->indent_step * depth; i++) { + one_char(' '); + } +} + +simdjson_inline void pretty_formatter::print_space() { + one_char(' '); +} + +/*** + * String building code. + **/ + +template +inline void string_builder::append(simdjson::dom::element value) { + // using tape_type = simdjson::internal::tape_type; + size_t depth = 0; + constexpr size_t MAX_DEPTH = 16; + bool is_object[MAX_DEPTH]; + is_object[0] = false; + bool after_value = false; + + internal::tape_ref iter(value.tape); + do { + // print commas after each value + if (after_value) { + format.comma(); + format.print_newline(); + } + + format.print_indents(depth); + + // If we are in an object, print the next key and :, and skip to the next + // value. + if (is_object[depth]) { + format.key(iter.get_string_view()); + format.print_space(); + iter.json_index++; + } + switch (iter.tape_ref_type()) { + + // Arrays + case tape_type::START_ARRAY: { + // If we're too deep, we need to recurse to go deeper. + depth++; + if (simdjson_unlikely(depth >= MAX_DEPTH)) { + append(simdjson::dom::array(iter)); + iter.json_index = iter.matching_brace_index() - 1; // Jump to the ] + depth--; + break; + } + + // Output start [ + format.start_array(); + iter.json_index++; + + // Handle empty [] (we don't want to come back around and print commas) + if (iter.tape_ref_type() == tape_type::END_ARRAY) { + format.end_array(); + depth--; + break; + } + + is_object[depth] = false; + after_value = false; + format.print_newline(); + continue; + } + + // Objects + case tape_type::START_OBJECT: { + // If we're too deep, we need to recurse to go deeper. + depth++; + if (simdjson_unlikely(depth >= MAX_DEPTH)) { + append(simdjson::dom::object(iter)); + iter.json_index = iter.matching_brace_index() - 1; // Jump to the } + depth--; + break; + } + + // Output start { + format.start_object(); + iter.json_index++; + + // Handle empty {} (we don't want to come back around and print commas) + if (iter.tape_ref_type() == tape_type::END_OBJECT) { + format.end_object(); + depth--; + break; + } + + is_object[depth] = true; + after_value = false; + format.print_newline(); + continue; + } + + // Scalars + case tape_type::STRING: + format.string(iter.get_string_view()); + break; + case tape_type::INT64: + format.number(iter.next_tape_value()); + iter.json_index++; // numbers take up 2 spots, so we need to increment + // extra + break; + case tape_type::UINT64: + format.number(iter.next_tape_value()); + iter.json_index++; // numbers take up 2 spots, so we need to increment + // extra + break; + case tape_type::DOUBLE: + format.number(iter.next_tape_value()); + iter.json_index++; // numbers take up 2 spots, so we need to increment + // extra + break; + case tape_type::TRUE_VALUE: + format.true_atom(); + break; + case tape_type::FALSE_VALUE: + format.false_atom(); + break; + case tape_type::NULL_VALUE: + format.null_atom(); + break; + + // These are impossible + case tape_type::END_ARRAY: + case tape_type::END_OBJECT: + case tape_type::ROOT: + SIMDJSON_UNREACHABLE(); + } + iter.json_index++; + after_value = true; + + // Handle multiple ends in a row + while (depth != 0 && (iter.tape_ref_type() == tape_type::END_ARRAY || + iter.tape_ref_type() == tape_type::END_OBJECT)) { + format.print_newline(); + depth--; + format.print_indents(depth); + if (iter.tape_ref_type() == tape_type::END_ARRAY) { + format.end_array(); + } else { + format.end_object(); + } + iter.json_index++; + } + + // Stop when we're at depth 0 + } while (depth != 0); + + format.print_newline(); +} + +template +inline void string_builder::append(simdjson::dom::object value) { + format.start_object(); + auto pair = value.begin(); + auto end = value.end(); + if (pair != end) { + append(*pair); + for (++pair; pair != end; ++pair) { + format.comma(); + append(*pair); + } + } + format.end_object(); +} + +template +inline void string_builder::append(simdjson::dom::array value) { + format.start_array(); + auto iter = value.begin(); + auto end = value.end(); + if (iter != end) { + append(*iter); + for (++iter; iter != end; ++iter) { + format.comma(); + append(*iter); + } + } + format.end_array(); +} + +template +simdjson_inline void string_builder::append(simdjson::dom::key_value_pair kv) { + format.key(kv.key); + append(kv.value); +} + +template +simdjson_inline void string_builder::clear() { + format.clear(); +} + +template +simdjson_inline std::string_view string_builder::str() const { + return format.str(); +} + + +} // namespace internal +} // namespace simdjson + +#endif +/* end file simdjson/dom/serialization-inl.h */ + +#endif // SIMDJSON_DOM_H +/* end file simdjson/dom.h */ +/* including simdjson/ondemand.h: #include "simdjson/ondemand.h" */ +/* begin file simdjson/ondemand.h */ +#ifndef SIMDJSON_ONDEMAND_H +#define SIMDJSON_ONDEMAND_H + +/* including simdjson/builtin/ondemand.h: #include "simdjson/builtin/ondemand.h" */ +/* begin file simdjson/builtin/ondemand.h */ +#ifndef SIMDJSON_BUILTIN_ONDEMAND_H +#define SIMDJSON_BUILTIN_ONDEMAND_H + +/* including simdjson/builtin.h: #include "simdjson/builtin.h" */ +/* begin file simdjson/builtin.h */ +#ifndef SIMDJSON_BUILTIN_H +#define SIMDJSON_BUILTIN_H + +/* including simdjson/builtin/base.h: #include "simdjson/builtin/base.h" */ +/* begin file simdjson/builtin/base.h */ +#ifndef SIMDJSON_BUILTIN_BASE_H +#define SIMDJSON_BUILTIN_BASE_H + +/* skipped duplicate #include "simdjson/base.h" */ +/* including simdjson/implementation_detection.h: #include "simdjson/implementation_detection.h" */ +/* begin file simdjson/implementation_detection.h */ +#ifndef SIMDJSON_IMPLEMENTATION_DETECTION_H +#define SIMDJSON_IMPLEMENTATION_DETECTION_H + +/* skipped duplicate #include "simdjson/base.h" */ + +// 0 is reserved, because undefined SIMDJSON_IMPLEMENTATION equals 0 in preprocessor macros. +#define SIMDJSON_IMPLEMENTATION_ID_arm64 1 +#define SIMDJSON_IMPLEMENTATION_ID_fallback 2 +#define SIMDJSON_IMPLEMENTATION_ID_haswell 3 +#define SIMDJSON_IMPLEMENTATION_ID_icelake 4 +#define SIMDJSON_IMPLEMENTATION_ID_ppc64 5 +#define SIMDJSON_IMPLEMENTATION_ID_westmere 6 + +#define SIMDJSON_IMPLEMENTATION_ID_FOR(IMPL) SIMDJSON_CAT(SIMDJSON_IMPLEMENTATION_ID_, IMPL) +#define SIMDJSON_IMPLEMENTATION_ID SIMDJSON_IMPLEMENTATION_ID_FOR(SIMDJSON_IMPLEMENTATION) + +#define SIMDJSON_IMPLEMENTATION_IS(IMPL) SIMDJSON_IMPLEMENTATION_ID == SIMDJSON_IMPLEMENTATION_ID_FOR(IMPL) + +// +// First, figure out which implementations can be run. Doing it here makes it so we don't have to worry about the order +// in which we include them. +// + +#ifndef SIMDJSON_IMPLEMENTATION_ARM64 +#define SIMDJSON_IMPLEMENTATION_ARM64 (SIMDJSON_IS_ARM64) +#endif +#define SIMDJSON_CAN_ALWAYS_RUN_ARM64 SIMDJSON_IMPLEMENTATION_ARM64 && SIMDJSON_IS_ARM64 + +// Default Icelake to on if this is x86-64. Even if we're not compiled for it, it could be selected +// at runtime. +#ifndef SIMDJSON_IMPLEMENTATION_ICELAKE +#define SIMDJSON_IMPLEMENTATION_ICELAKE ((SIMDJSON_IS_X86_64) && (SIMDJSON_AVX512_ALLOWED) && (SIMDJSON_COMPILER_SUPPORTS_VBMI2)) +#endif + +#ifdef _MSC_VER +// To see why (__BMI__) && (__PCLMUL__) && (__LZCNT__) are not part of this next line, see +// https://github.com/simdjson/simdjson/issues/1247 +#define SIMDJSON_CAN_ALWAYS_RUN_ICELAKE ((SIMDJSON_IMPLEMENTATION_ICELAKE) && (__AVX2__) && (__AVX512F__) && (__AVX512DQ__) && (__AVX512CD__) && (__AVX512BW__) && (__AVX512VL__) && (__AVX512VBMI2__)) +#else +#define SIMDJSON_CAN_ALWAYS_RUN_ICELAKE ((SIMDJSON_IMPLEMENTATION_ICELAKE) && (__AVX2__) && (__BMI__) && (__PCLMUL__) && (__LZCNT__) && (__AVX512F__) && (__AVX512DQ__) && (__AVX512CD__) && (__AVX512BW__) && (__AVX512VL__) && (__AVX512VBMI2__)) +#endif + +// Default Haswell to on if this is x86-64. Even if we're not compiled for it, it could be selected +// at runtime. +#ifndef SIMDJSON_IMPLEMENTATION_HASWELL +#if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +// if icelake is always available, never enable haswell. +#define SIMDJSON_IMPLEMENTATION_HASWELL 0 +#else +#define SIMDJSON_IMPLEMENTATION_HASWELL SIMDJSON_IS_X86_64 +#endif +#endif +#ifdef _MSC_VER +// To see why (__BMI__) && (__PCLMUL__) && (__LZCNT__) are not part of this next line, see +// https://github.com/simdjson/simdjson/issues/1247 +#define SIMDJSON_CAN_ALWAYS_RUN_HASWELL ((SIMDJSON_IMPLEMENTATION_HASWELL) && (SIMDJSON_IS_X86_64) && (__AVX2__)) +#else +#define SIMDJSON_CAN_ALWAYS_RUN_HASWELL ((SIMDJSON_IMPLEMENTATION_HASWELL) && (SIMDJSON_IS_X86_64) && (__AVX2__) && (__BMI__) && (__PCLMUL__) && (__LZCNT__)) +#endif + +// Default Westmere to on if this is x86-64. +#ifndef SIMDJSON_IMPLEMENTATION_WESTMERE +#if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE || SIMDJSON_CAN_ALWAYS_RUN_HASWELL +// if icelake or haswell are always available, never enable westmere. +#define SIMDJSON_IMPLEMENTATION_WESTMERE 0 +#else +#define SIMDJSON_IMPLEMENTATION_WESTMERE SIMDJSON_IS_X86_64 +#endif +#endif +#define SIMDJSON_CAN_ALWAYS_RUN_WESTMERE (SIMDJSON_IMPLEMENTATION_WESTMERE && SIMDJSON_IS_X86_64 && __SSE4_2__ && __PCLMUL__) + +#ifndef SIMDJSON_IMPLEMENTATION_PPC64 +#define SIMDJSON_IMPLEMENTATION_PPC64 (SIMDJSON_IS_PPC64 && SIMDJSON_IS_PPC64_VMX) +#endif +#define SIMDJSON_CAN_ALWAYS_RUN_PPC64 SIMDJSON_IMPLEMENTATION_PPC64 && SIMDJSON_IS_PPC64 && SIMDJSON_IS_PPC64_VMX + +// Default Fallback to on unless a builtin implementation has already been selected. +#ifndef SIMDJSON_IMPLEMENTATION_FALLBACK +#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 +// if anything at all except fallback can always run, then disable fallback. +#define SIMDJSON_IMPLEMENTATION_FALLBACK 0 +#else +#define SIMDJSON_IMPLEMENTATION_FALLBACK 1 +#endif +#endif +#define SIMDJSON_CAN_ALWAYS_RUN_FALLBACK SIMDJSON_IMPLEMENTATION_FALLBACK + +// Determine the best builtin implementation +#ifndef SIMDJSON_BUILTIN_IMPLEMENTATION + +#if SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +#define SIMDJSON_BUILTIN_IMPLEMENTATION icelake +#elif SIMDJSON_CAN_ALWAYS_RUN_HASWELL +#define SIMDJSON_BUILTIN_IMPLEMENTATION haswell +#elif SIMDJSON_CAN_ALWAYS_RUN_WESTMERE +#define SIMDJSON_BUILTIN_IMPLEMENTATION westmere +#elif SIMDJSON_CAN_ALWAYS_RUN_ARM64 +#define SIMDJSON_BUILTIN_IMPLEMENTATION arm64 +#elif SIMDJSON_CAN_ALWAYS_RUN_PPC64 +#define SIMDJSON_BUILTIN_IMPLEMENTATION ppc64 +#elif SIMDJSON_CAN_ALWAYS_RUN_FALLBACK +#define SIMDJSON_BUILTIN_IMPLEMENTATION fallback +#else +#error "All possible implementations (including fallback) have been disabled! simdjson will not run." +#endif + +#endif // SIMDJSON_BUILTIN_IMPLEMENTATION + +#define SIMDJSON_BUILTIN_IMPLEMENTATION_ID SIMDJSON_IMPLEMENTATION_ID_FOR(SIMDJSON_BUILTIN_IMPLEMENTATION) +#define SIMDJSON_BUILTIN_IMPLEMENTATION_IS(IMPL) SIMDJSON_BUILTIN_IMPLEMENTATION_ID == SIMDJSON_IMPLEMENTATION_ID_FOR(IMPL) + +#endif // SIMDJSON_IMPLEMENTATION_DETECTION_H +/* end file simdjson/implementation_detection.h */ + +namespace simdjson { +#if SIMDJSON_BUILTIN_IMPLEMENTATION_IS(arm64) + namespace arm64 {} +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(fallback) + namespace fallback {} +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(haswell) + namespace haswell {} +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(icelake) + namespace icelake {} +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(ppc64) + namespace ppc64 {} +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(westmere) + namespace westmere {} +#else +#error Unknown SIMDJSON_BUILTIN_IMPLEMENTATION +#endif + + /** + * Represents the best statically linked simdjson implementation that can be used by the compiling + * program. + * + * Detects what options the program is compiled against, and picks the minimum implementation that + * will work on any computer that can run the program. For example, if you compile with g++ + * -march=westmere, it will pick the westmere implementation. The haswell implementation will + * still be available, and can be selected at runtime, but the builtin implementation (and any + * code that uses it) will use westmere. + */ + namespace builtin = SIMDJSON_BUILTIN_IMPLEMENTATION; +} // namespace simdjson + +#endif // SIMDJSON_BUILTIN_BASE_H +/* end file simdjson/builtin/base.h */ +/* including simdjson/builtin/implementation.h: #include "simdjson/builtin/implementation.h" */ +/* begin file simdjson/builtin/implementation.h */ +#ifndef SIMDJSON_BUILTIN_IMPLEMENTATION_H +#define SIMDJSON_BUILTIN_IMPLEMENTATION_H + +/* skipped duplicate #include "simdjson/builtin/base.h" */ + +/* including simdjson/generic/dependencies.h: #include "simdjson/generic/dependencies.h" */ +/* begin file simdjson/generic/dependencies.h */ +#ifdef SIMDJSON_CONDITIONAL_INCLUDE +#error simdjson/generic/dependencies.h must be included before defining SIMDJSON_CONDITIONAL_INCLUDE! +#endif + +#ifndef SIMDJSON_GENERIC_DEPENDENCIES_H +#define SIMDJSON_GENERIC_DEPENDENCIES_H + +// Internal headers needed for generics. +// All includes referencing simdjson headers *not* under simdjson/generic must be here! +// Otherwise, amalgamation will fail. +/* skipped duplicate #include "simdjson/base.h" */ +/* skipped duplicate #include "simdjson/implementation.h" */ +/* skipped duplicate #include "simdjson/implementation_detection.h" */ +/* including simdjson/internal/instruction_set.h: #include "simdjson/internal/instruction_set.h" */ +/* begin file simdjson/internal/instruction_set.h */ +/* From +https://github.com/endorno/pytorch/blob/master/torch/lib/TH/generic/simd/simd.h +Highly modified. + +Copyright (c) 2016- Facebook, Inc (Adam Paszke) +Copyright (c) 2014- Facebook, Inc (Soumith Chintala) +Copyright (c) 2011-2014 Idiap Research Institute (Ronan Collobert) +Copyright (c) 2012-2014 Deepmind Technologies (Koray Kavukcuoglu) +Copyright (c) 2011-2012 NEC Laboratories America (Koray Kavukcuoglu) +Copyright (c) 2011-2013 NYU (Clement Farabet) +Copyright (c) 2006-2010 NEC Laboratories America (Ronan Collobert, Leon Bottou, +Iain Melvin, Jason Weston) Copyright (c) 2006 Idiap Research Institute +(Samy Bengio) Copyright (c) 2001-2004 Idiap Research Institute (Ronan Collobert, +Samy Bengio, Johnny Mariethoz) + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +3. Neither the names of Facebook, Deepmind Technologies, NYU, NEC Laboratories +America and IDIAP Research Institute nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE +LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. +*/ + +#ifndef SIMDJSON_INTERNAL_INSTRUCTION_SET_H +#define SIMDJSON_INTERNAL_INSTRUCTION_SET_H + +namespace simdjson { +namespace internal { + +enum instruction_set { + DEFAULT = 0x0, + NEON = 0x1, + AVX2 = 0x4, + SSE42 = 0x8, + PCLMULQDQ = 0x10, + BMI1 = 0x20, + BMI2 = 0x40, + ALTIVEC = 0x80, + AVX512F = 0x100, + AVX512DQ = 0x200, + AVX512IFMA = 0x400, + AVX512PF = 0x800, + AVX512ER = 0x1000, + AVX512CD = 0x2000, + AVX512BW = 0x4000, + AVX512VL = 0x8000, + AVX512VBMI2 = 0x10000 +}; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_INSTRUCTION_SET_H +/* end file simdjson/internal/instruction_set.h */ +/* skipped duplicate #include "simdjson/internal/dom_parser_implementation.h" */ +/* including simdjson/internal/jsoncharutils_tables.h: #include "simdjson/internal/jsoncharutils_tables.h" */ +/* begin file simdjson/internal/jsoncharutils_tables.h */ +#ifndef SIMDJSON_INTERNAL_JSONCHARUTILS_TABLES_H +#define SIMDJSON_INTERNAL_JSONCHARUTILS_TABLES_H + +/* skipped duplicate #include "simdjson/base.h" */ + +#ifdef JSON_TEST_STRINGS +void found_string(const uint8_t *buf, const uint8_t *parsed_begin, + const uint8_t *parsed_end); +void found_bad_string(const uint8_t *buf); +#endif + +namespace simdjson { +namespace internal { +// structural chars here are +// they are { 0x7b } 0x7d : 0x3a [ 0x5b ] 0x5d , 0x2c (and NULL) +// we are also interested in the four whitespace characters +// space 0x20, linefeed 0x0a, horizontal tab 0x09 and carriage return 0x0d + +extern SIMDJSON_DLLIMPORTEXPORT const bool structural_or_whitespace_negated[256]; +extern SIMDJSON_DLLIMPORTEXPORT const bool structural_or_whitespace[256]; +extern SIMDJSON_DLLIMPORTEXPORT const uint32_t digit_to_val32[886]; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_JSONCHARUTILS_TABLES_H +/* end file simdjson/internal/jsoncharutils_tables.h */ +/* including simdjson/internal/numberparsing_tables.h: #include "simdjson/internal/numberparsing_tables.h" */ +/* begin file simdjson/internal/numberparsing_tables.h */ +#ifndef SIMDJSON_INTERNAL_NUMBERPARSING_TABLES_H +#define SIMDJSON_INTERNAL_NUMBERPARSING_TABLES_H + +/* skipped duplicate #include "simdjson/base.h" */ + +namespace simdjson { +namespace internal { +/** + * The smallest non-zero float (binary64) is 2^-1074. + * We take as input numbers of the form w x 10^q where w < 2^64. + * We have that w * 10^-343 < 2^(64-344) 5^-343 < 2^-1076. + * However, we have that + * (2^64-1) * 10^-342 = (2^64-1) * 2^-342 * 5^-342 > 2^-1074. + * Thus it is possible for a number of the form w * 10^-342 where + * w is a 64-bit value to be a non-zero floating-point number. + ********* + * Any number of form w * 10^309 where w>= 1 is going to be + * infinite in binary64 so we never need to worry about powers + * of 5 greater than 308. + */ +constexpr int smallest_power = -342; +constexpr int largest_power = 308; + +/** + * Represents a 128-bit value. + * low: least significant 64 bits. + * high: most significant 64 bits. + */ +struct value128 { + uint64_t low; + uint64_t high; +}; + + +// Precomputed powers of ten from 10^0 to 10^22. These +// can be represented exactly using the double type. +extern SIMDJSON_DLLIMPORTEXPORT const double power_of_ten[]; + + +/** + * When mapping numbers from decimal to binary, + * we go from w * 10^q to m * 2^p but we have + * 10^q = 5^q * 2^q, so effectively + * we are trying to match + * w * 2^q * 5^q to m * 2^p. Thus the powers of two + * are not a concern since they can be represented + * exactly using the binary notation, only the powers of five + * affect the binary significand. + */ + + +// The truncated powers of five from 5^-342 all the way to 5^308 +// The mantissa is truncated to 128 bits, and +// never rounded up. Uses about 10KB. +extern SIMDJSON_DLLIMPORTEXPORT const uint64_t power_of_five_128[]; +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_NUMBERPARSING_TABLES_H +/* end file simdjson/internal/numberparsing_tables.h */ +/* including simdjson/internal/simdprune_tables.h: #include "simdjson/internal/simdprune_tables.h" */ +/* begin file simdjson/internal/simdprune_tables.h */ +#ifndef SIMDJSON_INTERNAL_SIMDPRUNE_TABLES_H +#define SIMDJSON_INTERNAL_SIMDPRUNE_TABLES_H + +/* skipped duplicate #include "simdjson/base.h" */ + +#include + +namespace simdjson { // table modified and copied from +namespace internal { // http://graphics.stanford.edu/~seander/bithacks.html#CountBitsSetTable + +extern SIMDJSON_DLLIMPORTEXPORT const unsigned char BitsSetTable256mul2[256]; + +extern SIMDJSON_DLLIMPORTEXPORT const uint8_t pshufb_combine_table[272]; + +// 256 * 8 bytes = 2kB, easily fits in cache. +extern SIMDJSON_DLLIMPORTEXPORT const uint64_t thintable_epi8[256]; + +} // namespace internal +} // namespace simdjson + +#endif // SIMDJSON_INTERNAL_SIMDPRUNE_TABLES_H +/* end file simdjson/internal/simdprune_tables.h */ + +#endif // SIMDJSON_GENERIC_DEPENDENCIES_H +/* end file simdjson/generic/dependencies.h */ + +/* defining SIMDJSON_CONDITIONAL_INCLUDE */ +#define SIMDJSON_CONDITIONAL_INCLUDE + +#if SIMDJSON_BUILTIN_IMPLEMENTATION_IS(arm64) +/* including simdjson/arm64/implementation.h: #include "simdjson/arm64/implementation.h" */ +/* begin file simdjson/arm64/implementation.h */ +#ifndef SIMDJSON_ARM64_IMPLEMENTATION_H +#define SIMDJSON_ARM64_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation("arm64", "ARM NEON", internal::instruction_set::NEON) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_IMPLEMENTATION_H +/* end file simdjson/arm64/implementation.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(fallback) +/* including simdjson/fallback/implementation.h: #include "simdjson/fallback/implementation.h" */ +/* begin file simdjson/fallback/implementation.h */ +#ifndef SIMDJSON_FALLBACK_IMPLEMENTATION_H +#define SIMDJSON_FALLBACK_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation( + "fallback", + "Generic fallback implementation", + 0 + ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_IMPLEMENTATION_H +/* end file simdjson/fallback/implementation.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(haswell) +/* including simdjson/haswell/implementation.h: #include "simdjson/haswell/implementation.h" */ +/* begin file simdjson/haswell/implementation.h */ +#ifndef SIMDJSON_HASWELL_IMPLEMENTATION_H +#define SIMDJSON_HASWELL_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_HASWELL +namespace simdjson { +namespace haswell { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation( + "haswell", + "Intel/AMD AVX2", + internal::instruction_set::AVX2 | internal::instruction_set::PCLMULQDQ | internal::instruction_set::BMI1 | internal::instruction_set::BMI2 + ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_IMPLEMENTATION_H +/* end file simdjson/haswell/implementation.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(icelake) +/* including simdjson/icelake/implementation.h: #include "simdjson/icelake/implementation.h" */ +/* begin file simdjson/icelake/implementation.h */ +#ifndef SIMDJSON_ICELAKE_IMPLEMENTATION_H +#define SIMDJSON_ICELAKE_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_ICELAKE +namespace simdjson { +namespace icelake { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation( + "icelake", + "Intel/AMD AVX512", + 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 + ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_IMPLEMENTATION_H +/* end file simdjson/icelake/implementation.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(ppc64) +/* including simdjson/ppc64/implementation.h: #include "simdjson/ppc64/implementation.h" */ +/* begin file simdjson/ppc64/implementation.h */ +#ifndef SIMDJSON_PPC64_IMPLEMENTATION_H +#define SIMDJSON_PPC64_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +/** + * Implementation for ALTIVEC (PPC64). + */ +namespace ppc64 { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() + : simdjson::implementation("ppc64", "PPC64 ALTIVEC", + internal::instruction_set::ALTIVEC) {} + + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, size_t max_length, + std::unique_ptr &dst) + const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, + uint8_t *dst, + size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, + size_t len) const noexcept final; +}; + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_IMPLEMENTATION_H +/* end file simdjson/ppc64/implementation.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(westmere) +/* including simdjson/westmere/implementation.h: #include "simdjson/westmere/implementation.h" */ +/* begin file simdjson/westmere/implementation.h */ +#ifndef SIMDJSON_WESTMERE_IMPLEMENTATION_H +#define SIMDJSON_WESTMERE_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/instruction_set.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE +namespace simdjson { +namespace westmere { + +/** + * @private + */ +class implementation final : public simdjson::implementation { +public: + simdjson_inline implementation() : simdjson::implementation("westmere", "Intel/AMD SSE4.2", internal::instruction_set::SSE42 | internal::instruction_set::PCLMULQDQ) {} + simdjson_warn_unused error_code create_dom_parser_implementation( + size_t capacity, + size_t max_length, + std::unique_ptr& dst + ) const noexcept final; + simdjson_warn_unused error_code minify(const uint8_t *buf, size_t len, uint8_t *dst, size_t &dst_len) const noexcept final; + simdjson_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; +}; + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H +/* end file simdjson/westmere/implementation.h */ +#else +#error Unknown SIMDJSON_BUILTIN_IMPLEMENTATION +#endif + +/* undefining SIMDJSON_CONDITIONAL_INCLUDE */ +#undef SIMDJSON_CONDITIONAL_INCLUDE + +namespace simdjson { + /** + * Function which returns a pointer to an implementation matching the "builtin" implementation. + * The builtin implementation is the best statically linked simdjson implementation that can be used by the compiling + * program. If you compile with g++ -march=haswell, this will return the haswell implementation. + * It is handy to be able to check what builtin was used: builtin_implementation()->name(). + */ + const implementation * builtin_implementation(); +} // namespace simdjson + +#endif // SIMDJSON_BUILTIN_IMPLEMENTATION_H +/* end file simdjson/builtin/implementation.h */ + +/* skipped duplicate #include "simdjson/generic/dependencies.h" */ + +/* defining SIMDJSON_CONDITIONAL_INCLUDE */ +#define SIMDJSON_CONDITIONAL_INCLUDE + +#if SIMDJSON_BUILTIN_IMPLEMENTATION_IS(arm64) +/* including simdjson/arm64.h: #include "simdjson/arm64.h" */ +/* begin file simdjson/arm64.h */ +#ifndef SIMDJSON_ARM64_H +#define SIMDJSON_ARM64_H + +/* including simdjson/arm64/begin.h: #include "simdjson/arm64/begin.h" */ +/* begin file simdjson/arm64/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "arm64" */ +#define SIMDJSON_IMPLEMENTATION arm64 +/* including simdjson/arm64/base.h: #include "simdjson/arm64/base.h" */ +/* begin file simdjson/arm64/base.h */ +#ifndef SIMDJSON_ARM64_BASE_H +#define SIMDJSON_ARM64_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Implementation for NEON (ARMv8). + */ +namespace arm64 { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_BASE_H +/* end file simdjson/arm64/base.h */ +/* including simdjson/arm64/intrinsics.h: #include "simdjson/arm64/intrinsics.h" */ +/* begin file simdjson/arm64/intrinsics.h */ +#ifndef SIMDJSON_ARM64_INTRINSICS_H +#define SIMDJSON_ARM64_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This should be the correct header whether +// you use visual studio or other compilers. +#include + +static_assert(sizeof(uint8x16_t) <= simdjson::SIMDJSON_PADDING, "insufficient padding for arm64"); + +#endif // SIMDJSON_ARM64_INTRINSICS_H +/* end file simdjson/arm64/intrinsics.h */ +/* including simdjson/arm64/bitmanipulation.h: #include "simdjson/arm64/bitmanipulation.h" */ +/* begin file simdjson/arm64/bitmanipulation.h */ +#ifndef SIMDJSON_ARM64_BITMANIPULATION_H +#define SIMDJSON_ARM64_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int count_ones(uint64_t input_num) { + return vaddv_u8(vcnt_u8(vcreate_u8(input_num))); +} + + +#if defined(__GNUC__) // catches clang and gcc +/** + * ARM has a fast 64-bit "bit reversal function" that is handy. However, + * it is not generally available as an intrinsic function under Visual + * Studio (though this might be changing). Even under clang/gcc, we + * apparently need to invoke inline assembly. + */ +/* + * We use SIMDJSON_PREFER_REVERSE_BITS as a hint that algorithms that + * work well with bit reversal may use it. + */ +#define SIMDJSON_PREFER_REVERSE_BITS 1 + +/* reverse the bits */ +simdjson_inline uint64_t reverse_bits(uint64_t input_num) { + uint64_t rev_bits; + __asm("rbit %0, %1" : "=r"(rev_bits) : "r"(input_num)); + return rev_bits; +} + +/** + * Flips bit at index 63 - lz. Thus if you have 'leading_zeroes' leading zeroes, + * then this will set to zero the leading bit. It is possible for leading_zeroes to be + * greating or equal to 63 in which case we trigger undefined behavior, but the output + * of such undefined behavior is never used. + **/ +SIMDJSON_NO_SANITIZE_UNDEFINED +simdjson_inline uint64_t zero_leading_bit(uint64_t rev_bits, int leading_zeroes) { + return rev_bits ^ (uint64_t(0x8000000000000000) >> leading_zeroes); +} + +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, uint64_t *result) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + *result = value1 + value2; + return *result < value1; +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_BITMANIPULATION_H +/* end file simdjson/arm64/bitmanipulation.h */ +/* including simdjson/arm64/bitmask.h: #include "simdjson/arm64/bitmask.h" */ +/* begin file simdjson/arm64/bitmask.h */ +#ifndef SIMDJSON_ARM64_BITMASK_H +#define SIMDJSON_ARM64_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(uint64_t bitmask) { + ///////////// + // We could do this with PMULL, but it is apparently slow. + // + //#ifdef __ARM_FEATURE_CRYPTO // some ARM processors lack this extension + //return vmull_p64(-1ULL, bitmask); + //#else + // Analysis by @sebpop: + // When diffing the assembly for src/stage1_find_marks.cpp I see that the eors are all spread out + // in between other vector code, so effectively the extra cycles of the sequence do not matter + // because the GPR units are idle otherwise and the critical path is on the FP side. + // Also the PMULL requires two extra fmovs: GPR->FP (3 cycles in N1, 5 cycles in A72 ) + // and FP->GPR (2 cycles on N1 and 5 cycles on A72.) + /////////// + bitmask ^= bitmask << 1; + bitmask ^= bitmask << 2; + bitmask ^= bitmask << 4; + bitmask ^= bitmask << 8; + bitmask ^= bitmask << 16; + bitmask ^= bitmask << 32; + return bitmask; +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif +/* end file simdjson/arm64/bitmask.h */ +/* including simdjson/arm64/numberparsing_defs.h: #include "simdjson/arm64/numberparsing_defs.h" */ +/* begin file simdjson/arm64/numberparsing_defs.h */ +#ifndef SIMDJSON_ARM64_NUMBERPARSING_DEFS_H +#define SIMDJSON_ARM64_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#if _M_ARM64 +// __umulh requires intrin.h +#include +#endif // _M_ARM64 + +namespace simdjson { +namespace arm64 { +namespace numberparsing { + +// we don't have SSE, so let us use a scalar function +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + uint64_t val; + std::memcpy(&val, chars, sizeof(uint64_t)); + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace arm64 +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_ARM64_NUMBERPARSING_DEFS_H +/* end file simdjson/arm64/numberparsing_defs.h */ +/* including simdjson/arm64/simd.h: #include "simdjson/arm64/simd.h" */ +/* begin file simdjson/arm64/simd.h */ +#ifndef SIMDJSON_ARM64_SIMD_H +#define SIMDJSON_ARM64_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace simd { + +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO +namespace { +// Start of private section with Visual Studio workaround + + +#ifndef simdjson_make_uint8x16_t +#define simdjson_make_uint8x16_t(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, \ + x13, x14, x15, x16) \ + ([=]() { \ + uint8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8, \ + x9, x10, x11, x12, x13, x14, x15, x16}; \ + return vld1q_u8(array); \ + }()) +#endif +#ifndef simdjson_make_int8x16_t +#define simdjson_make_int8x16_t(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, \ + x13, x14, x15, x16) \ + ([=]() { \ + int8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8, \ + x9, x10, x11, x12, x13, x14, x15, x16}; \ + return vld1q_s8(array); \ + }()) +#endif + +#ifndef simdjson_make_uint8x8_t +#define simdjson_make_uint8x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + uint8_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1_u8(array); \ + }()) +#endif +#ifndef simdjson_make_int8x8_t +#define simdjson_make_int8x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + int8_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1_s8(array); \ + }()) +#endif +#ifndef simdjson_make_uint16x8_t +#define simdjson_make_uint16x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + uint16_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1q_u16(array); \ + }()) +#endif +#ifndef simdjson_make_int16x8_t +#define simdjson_make_int16x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + int16_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1q_s16(array); \ + }()) +#endif + +// End of private section with Visual Studio workaround +} // namespace +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO + + + template + struct simd8; + + // + // Base class of simd8 and simd8, both of which use uint8x16_t internally. + // + template> + struct base_u8 { + uint8x16_t value; + static const int SIZE = sizeof(value); + + // Conversion from/to SIMD register + simdjson_inline base_u8(const uint8x16_t _value) : value(_value) {} + simdjson_inline operator const uint8x16_t&() const { return this->value; } + simdjson_inline operator uint8x16_t&() { return this->value; } + + // Bit operations + simdjson_inline simd8 operator|(const simd8 other) const { return vorrq_u8(*this, other); } + simdjson_inline simd8 operator&(const simd8 other) const { return vandq_u8(*this, other); } + simdjson_inline simd8 operator^(const simd8 other) const { return veorq_u8(*this, other); } + simdjson_inline simd8 bit_andnot(const simd8 other) const { return vbicq_u8(*this, other); } + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + simdjson_inline simd8& operator|=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline simd8& operator&=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline simd8& operator^=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast ^ other; return *this_cast; } + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return vceqq_u8(lhs, rhs); } + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return vextq_u8(prev_chunk, *this, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base_u8 { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + static simdjson_inline simd8 splat(bool _value) { return vmovq_n_u8(uint8_t(-(!!_value))); } + + simdjson_inline simd8(const uint8x16_t _value) : base_u8(_value) {} + // False constructor + simdjson_inline simd8() : simd8(vdupq_n_u8(0)) {} + // Splat constructor + simdjson_inline simd8(bool _value) : simd8(splat(_value)) {} + + // We return uint32_t instead of uint16_t because that seems to be more efficient for most + // purposes (cutting it down to uint16_t costs performance in some compilers). + simdjson_inline uint32_t to_bitmask() const { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + const uint8x16_t bit_mask = simdjson_make_uint8x16_t(0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80); +#else + const uint8x16_t bit_mask = {0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; +#endif + auto minput = *this & bit_mask; + uint8x16_t tmp = vpaddq_u8(minput, minput); + tmp = vpaddq_u8(tmp, tmp); + tmp = vpaddq_u8(tmp, tmp); + return vgetq_lane_u16(vreinterpretq_u16_u8(tmp), 0); + } + simdjson_inline bool any() const { return vmaxvq_u8(*this) != 0; } + }; + + // Unsigned bytes + template<> + struct simd8: base_u8 { + static simdjson_inline uint8x16_t splat(uint8_t _value) { return vmovq_n_u8(_value); } + static simdjson_inline uint8x16_t zero() { return vdupq_n_u8(0); } + static simdjson_inline uint8x16_t load(const uint8_t* values) { return vld1q_u8(values); } + + simdjson_inline simd8(const uint8x16_t _value) : base_u8(_value) {} + // Zero constructor + simdjson_inline simd8() : simd8(zero()) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[16]) : simd8(load(values)) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Member-by-member initialization +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(simdjson_make_uint8x16_t( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} +#else + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(uint8x16_t{ + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + }) {} +#endif + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Store to array + simdjson_inline void store(uint8_t dst[16]) const { return vst1q_u8(dst, *this); } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return vqaddq_u8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return vqsubq_u8(*this, other); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return vaddq_u8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return vsubq_u8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *this; } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *this; } + + // Order-specific operations + simdjson_inline uint8_t max_val() const { return vmaxvq_u8(*this); } + simdjson_inline uint8_t min_val() const { return vminvq_u8(*this); } + simdjson_inline simd8 max_val(const simd8 other) const { return vmaxq_u8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return vminq_u8(*this, other); } + simdjson_inline simd8 operator<=(const simd8 other) const { return vcleq_u8(*this, other); } + simdjson_inline simd8 operator>=(const simd8 other) const { return vcgeq_u8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return vcltq_u8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return vcgtq_u8(*this, other); } + // Same as >, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's. + simdjson_inline simd8 gt_bits(const simd8 other) const { return simd8(*this > other); } + // Same as <, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's. + simdjson_inline simd8 lt_bits(const simd8 other) const { return simd8(*this < other); } + + // Bit-specific operations + simdjson_inline simd8 any_bits_set(simd8 bits) const { return vtstq_u8(*this, bits); } + simdjson_inline bool any_bits_set_anywhere() const { return this->max_val() != 0; } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return (*this & bits).any_bits_set_anywhere(); } + template + simdjson_inline simd8 shr() const { return vshrq_n_u8(*this, N); } + template + simdjson_inline simd8 shl() const { return vshlq_n_u8(*this, N); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return lookup_table.apply_lookup_16_to(*this); + } + + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint16_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + uint64x2_t shufmask64 = {thintable_epi8[mask1], thintable_epi8[mask2]}; + uint8x16_t shufmask = vreinterpretq_u8_u64(shufmask64); + // we increment by 0x08 the second half of the mask +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + uint8x16_t inc = simdjson_make_uint8x16_t(0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08); +#else + uint8x16_t inc = {0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}; +#endif + shufmask = vaddq_u8(shufmask, inc); + // this is the version "nearly pruned" + uint8x16_t pruned = vqtbl1q_u8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + uint8x16_t compactmask = vld1q_u8(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + uint8x16_t answer = vqtbl1q_u8(pruned, compactmask); + vst1q_u8(reinterpret_cast(output), answer); + } + + // Copies all bytes corresponding to a 0 in the low half of the mask (interpreted as a + // bitset) to output1, then those corresponding to a 0 in the high half to output2. + template + simdjson_inline void compress_halves(uint16_t mask, L *output1, L *output2) const { + using internal::thintable_epi8; + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + uint8x8_t compactmask1 = vcreate_u8(thintable_epi8[mask1]); + uint8x8_t compactmask2 = vcreate_u8(thintable_epi8[mask2]); + // we increment by 0x08 the second half of the mask +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + uint8x8_t inc = simdjson_make_uint8x8_t(0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08); +#else + uint8x8_t inc = {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}; +#endif + compactmask2 = vadd_u8(compactmask2, inc); + // store each result (with the second store possibly overlapping the first) + vst1_u8((uint8_t*)output1, vqtbl1_u8(*this, compactmask1)); + vst1_u8((uint8_t*)output2, vqtbl1_u8(*this, compactmask2)); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + + template + simdjson_inline simd8 apply_lookup_16_to(const simd8 original) { + return vqtbl1q_u8(*this, simd8(original)); + } + }; + + // Signed bytes + template<> + struct simd8 { + int8x16_t value; + + static simdjson_inline simd8 splat(int8_t _value) { return vmovq_n_s8(_value); } + static simdjson_inline simd8 zero() { return vdupq_n_s8(0); } + static simdjson_inline simd8 load(const int8_t values[16]) { return vld1q_s8(values); } + + // Conversion from/to SIMD register + simdjson_inline simd8(const int8x16_t _value) : value{_value} {} + simdjson_inline operator const int8x16_t&() const { return this->value; } + simdjson_inline operator int8x16_t&() { return this->value; } + + // Zero constructor + simdjson_inline simd8() : simd8(zero()) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(simdjson_make_int8x16_t( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} +#else + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(int8x16_t{ + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + }) {} +#endif + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Store to array + simdjson_inline void store(int8_t dst[16]) const { return vst1q_s8(dst, *this); } + + // Explicit conversion to/from unsigned + // + // Under Visual Studio/ARM64 uint8x16_t and int8x16_t are apparently the same type. + // In theory, we could check this occurrence with std::same_as and std::enabled_if but it is C++14 + // and relatively ugly and hard to read. +#ifndef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline explicit simd8(const uint8x16_t other): simd8(vreinterpretq_s8_u8(other)) {} +#endif + simdjson_inline explicit operator simd8() const { return vreinterpretq_u8_s8(this->value); } + + // Math + simdjson_inline simd8 operator+(const simd8 other) const { return vaddq_s8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return vsubq_s8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *this; } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *this; } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return vmaxq_s8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return vminq_s8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return vcgtq_s8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return vcltq_s8(*this, other); } + simdjson_inline simd8 operator==(const simd8 other) const { return vceqq_s8(*this, other); } + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return vextq_s8(prev_chunk, *this, 16 - N); + } + + // Perform a lookup assuming no value is larger than 16 + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return lookup_table.apply_lookup_16_to(*this); + } + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + + template + simdjson_inline simd8 apply_lookup_16_to(const simd8 original) { + return vqtbl1q_s8(*this, simd8(original)); + } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "ARM kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + uint64_t popcounts = vget_lane_u64(vreinterpret_u64_u8(vcnt_u8(vcreate_u8(~mask))), 0); + // compute the prefix sum of the popcounts of each byte + uint64_t offsets = popcounts * 0x0101010101010101; + this->chunks[0].compress_halves(uint16_t(mask), output, &output[popcounts & 0xFF]); + this->chunks[1].compress_halves(uint16_t(mask >> 16), &output[(offsets >> 8) & 0xFF], &output[(offsets >> 16) & 0xFF]); + this->chunks[2].compress_halves(uint16_t(mask >> 32), &output[(offsets >> 24) & 0xFF], &output[(offsets >> 32) & 0xFF]); + this->chunks[3].compress_halves(uint16_t(mask >> 48), &output[(offsets >> 40) & 0xFF], &output[(offsets >> 48) & 0xFF]); + return offsets >> 56; + } + + simdjson_inline uint64_t to_bitmask() const { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + const uint8x16_t bit_mask = simdjson_make_uint8x16_t( + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 + ); +#else + const uint8x16_t bit_mask = { + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 + }; +#endif + // Add each of the elements next to each other, successively, to stuff each 8 byte mask into one. + uint8x16_t sum0 = vpaddq_u8(this->chunks[0] & bit_mask, this->chunks[1] & bit_mask); + uint8x16_t sum1 = vpaddq_u8(this->chunks[2] & bit_mask, this->chunks[3] & bit_mask); + sum0 = vpaddq_u8(sum0, sum1); + sum0 = vpaddq_u8(sum0, sum0); + return vgetq_lane_u64(vreinterpretq_u64_u8(sum0), 0); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_SIMD_H +/* end file simdjson/arm64/simd.h */ +/* including simdjson/arm64/stringparsing_defs.h: #include "simdjson/arm64/stringparsing_defs.h" */ +/* begin file simdjson/arm64/stringparsing_defs.h */ +#ifndef SIMDJSON_ARM64_STRINGPARSING_DEFS_H +#define SIMDJSON_ARM64_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + sizeof(v0)); + v0.store(dst); + v1.store(dst + sizeof(v0)); + + // Getting a 64-bit bitmask is much cheaper than multiple 16-bit bitmasks on ARM; therefore, we + // smash them together into a 64-byte mask and get the bitmask from there. + uint64_t bs_and_quote = simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_STRINGPARSING_DEFS_H +/* end file simdjson/arm64/stringparsing_defs.h */ + +#define SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT 1 +/* end file simdjson/arm64/begin.h */ +/* including simdjson/generic/amalgamated.h for arm64: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for arm64 */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for arm64: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for arm64 */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for arm64 */ +/* including simdjson/generic/jsoncharutils.h for arm64: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for arm64 */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for arm64 */ +/* including simdjson/generic/atomparsing.h for arm64: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace arm64 { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for arm64 */ +/* including simdjson/generic/dom_parser_implementation.h for arm64: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for arm64 */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { +namespace arm64 { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for arm64 */ +/* including simdjson/generic/implementation_simdjson_result_base.h for arm64: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for arm64 */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for arm64 */ +/* including simdjson/generic/numberparsing.h for arm64: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for arm64 */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace arm64 { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for arm64 */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for arm64: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for arm64 */ +/* end file simdjson/generic/amalgamated.h for arm64 */ +/* including simdjson/arm64/end.h: #include "simdjson/arm64/end.h" */ +/* begin file simdjson/arm64/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#undef SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT +/* undefining SIMDJSON_IMPLEMENTATION from "arm64" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/arm64/end.h */ + +#endif // SIMDJSON_ARM64_H +/* end file simdjson/arm64.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(fallback) +/* including simdjson/fallback.h: #include "simdjson/fallback.h" */ +/* begin file simdjson/fallback.h */ +#ifndef SIMDJSON_FALLBACK_H +#define SIMDJSON_FALLBACK_H + +/* including simdjson/fallback/begin.h: #include "simdjson/fallback/begin.h" */ +/* begin file simdjson/fallback/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "fallback" */ +#define SIMDJSON_IMPLEMENTATION fallback +/* including simdjson/fallback/base.h: #include "simdjson/fallback/base.h" */ +/* begin file simdjson/fallback/base.h */ +#ifndef SIMDJSON_FALLBACK_BASE_H +#define SIMDJSON_FALLBACK_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Fallback implementation (runs on any machine). + */ +namespace fallback { + +class implementation; + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_BASE_H +/* end file simdjson/fallback/base.h */ +/* including simdjson/fallback/bitmanipulation.h: #include "simdjson/fallback/bitmanipulation.h" */ +/* begin file simdjson/fallback/bitmanipulation.h */ +#ifndef SIMDJSON_FALLBACK_BITMANIPULATION_H +#define SIMDJSON_FALLBACK_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { + +#if defined(_MSC_VER) && !defined(_M_ARM64) && !defined(_M_X64) +static inline unsigned char _BitScanForward64(unsigned long* ret, uint64_t x) { + unsigned long x0 = (unsigned long)x, top, bottom; + _BitScanForward(&top, (unsigned long)(x >> 32)); + _BitScanForward(&bottom, x0); + *ret = x0 ? bottom : 32 + top; + return x != 0; +} +static unsigned char _BitScanReverse64(unsigned long* ret, uint64_t x) { + unsigned long x1 = (unsigned long)(x >> 32), top, bottom; + _BitScanReverse(&top, x1); + _BitScanReverse(&bottom, (unsigned long)x); + *ret = x1 ? top + 32 : bottom; + return x != 0; +} +#endif + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#ifdef _MSC_VER + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// _MSC_VER +} + +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_BITMANIPULATION_H +/* end file simdjson/fallback/bitmanipulation.h */ +/* including simdjson/fallback/stringparsing_defs.h: #include "simdjson/fallback/stringparsing_defs.h" */ +/* begin file simdjson/fallback/stringparsing_defs.h */ +#ifndef SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H +#define SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 1; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return c == '"'; } + simdjson_inline bool has_backslash() { return c == '\\'; } + simdjson_inline int quote_index() { return c == '"' ? 0 : 1; } + simdjson_inline int backslash_index() { return c == '\\' ? 0 : 1; } + + uint8_t c; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // store to dest unconditionally - we can overwrite the bits we don't like later + dst[0] = src[0]; + return { src[0] }; +} + +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H +/* end file simdjson/fallback/stringparsing_defs.h */ +/* including simdjson/fallback/numberparsing_defs.h: #include "simdjson/fallback/numberparsing_defs.h" */ +/* begin file simdjson/fallback/numberparsing_defs.h */ +#ifndef SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H +#define SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#ifdef JSON_TEST_NUMBERS // for unit testing +void found_invalid_number(const uint8_t *buf); +void found_integer(int64_t result, const uint8_t *buf); +void found_unsigned_integer(uint64_t result, const uint8_t *buf); +void found_float(double result, const uint8_t *buf); +#endif + +namespace simdjson { +namespace fallback { +namespace numberparsing { + +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const char *chars) { + uint64_t val; + memcpy(&val, chars, sizeof(uint64_t)); + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + return parse_eight_digits_unrolled(reinterpret_cast(chars)); +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace fallback +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H +/* end file simdjson/fallback/numberparsing_defs.h */ +/* end file simdjson/fallback/begin.h */ +/* including simdjson/generic/amalgamated.h for fallback: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for fallback */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for fallback: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for fallback */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for fallback */ +/* including simdjson/generic/jsoncharutils.h for fallback: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for fallback */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for fallback */ +/* including simdjson/generic/atomparsing.h for fallback: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for fallback */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace fallback { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for fallback */ +/* including simdjson/generic/dom_parser_implementation.h for fallback: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for fallback */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace fallback +} // namespace simdjson + +namespace simdjson { +namespace fallback { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for fallback */ +/* including simdjson/generic/implementation_simdjson_result_base.h for fallback: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for fallback */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for fallback */ +/* including simdjson/generic/numberparsing.h for fallback: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for fallback */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace fallback { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for fallback */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for fallback: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for fallback */ +/* end file simdjson/generic/amalgamated.h for fallback */ +/* including simdjson/fallback/end.h: #include "simdjson/fallback/end.h" */ +/* begin file simdjson/fallback/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* undefining SIMDJSON_IMPLEMENTATION from "fallback" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/fallback/end.h */ + +#endif // SIMDJSON_FALLBACK_H +/* end file simdjson/fallback.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(haswell) +/* including simdjson/haswell.h: #include "simdjson/haswell.h" */ +/* begin file simdjson/haswell.h */ +#ifndef SIMDJSON_HASWELL_H +#define SIMDJSON_HASWELL_H + +/* including simdjson/haswell/begin.h: #include "simdjson/haswell/begin.h" */ +/* begin file simdjson/haswell/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "haswell" */ +#define SIMDJSON_IMPLEMENTATION haswell + +/* including simdjson/haswell/base.h: #include "simdjson/haswell/base.h" */ +/* begin file simdjson/haswell/base.h */ +#ifndef SIMDJSON_HASWELL_BASE_H +#define SIMDJSON_HASWELL_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_HASWELL +namespace simdjson { +/** + * Implementation for Haswell (Intel AVX2). + */ +namespace haswell { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BASE_H +/* end file simdjson/haswell/base.h */ +/* including simdjson/haswell/intrinsics.h: #include "simdjson/haswell/intrinsics.h" */ +/* begin file simdjson/haswell/intrinsics.h */ +#ifndef SIMDJSON_HASWELL_INTRINSICS_H +#define SIMDJSON_HASWELL_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + * e.g., if __AVX2__ is set... in turn, we normally set these + * macros by compiling against the corresponding architecture + * (e.g., arch:AVX2, -mavx2, etc.) which compiles the whole + * software with these advanced instructions. In simdjson, we + * want to compile the whole program for a generic target, + * and only target our specific kernels. As a workaround, + * we directly include the needed headers. These headers would + * normally guard against such usage, but we carefully included + * (or ) before, so the headers + * are fooled. + */ +#include // for _blsr_u64 +#include // for __lzcnt64 +#include // for most things (AVX2, AVX512, _popcnt64) +#include +#include +#include +#include +#include // for _mm_clmulepi64_si128 +// unfortunately, we may not get _blsr_u64, but, thankfully, clang +// has it as a macro. +#ifndef _blsr_u64 +// we roll our own +#define _blsr_u64(n) ((n - 1) & n) +#endif // _blsr_u64 +#endif // SIMDJSON_CLANG_VISUAL_STUDIO + +static_assert(sizeof(__m256i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for haswell kernel."); + +#endif // SIMDJSON_HASWELL_INTRINSICS_H +/* end file simdjson/haswell/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_HASWELL +SIMDJSON_TARGET_REGION("avx2,bmi,pclmul,lzcnt,popcnt") +#endif + +/* including simdjson/haswell/bitmanipulation.h: #include "simdjson/haswell/bitmanipulation.h" */ +/* begin file simdjson/haswell/bitmanipulation.h */ +#ifndef SIMDJSON_HASWELL_BITMANIPULATION_H +#define SIMDJSON_HASWELL_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmask.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return (int)_tzcnt_u64(input_num); +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + //////// + // You might expect the next line to be equivalent to + // return (int)_tzcnt_u64(input_num); + // but the generated code differs and might be less efficient? + //////// + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return _blsr_u64(input_num); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { + return int(_lzcnt_u64(input_num)); +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BITMANIPULATION_H +/* end file simdjson/haswell/bitmanipulation.h */ +/* including simdjson/haswell/bitmask.h: #include "simdjson/haswell/bitmask.h" */ +/* begin file simdjson/haswell/bitmask.h */ +#ifndef SIMDJSON_HASWELL_BITMASK_H +#define SIMDJSON_HASWELL_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processor supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BITMASK_H +/* end file simdjson/haswell/bitmask.h */ +/* including simdjson/haswell/numberparsing_defs.h: #include "simdjson/haswell/numberparsing_defs.h" */ +/* begin file simdjson/haswell/numberparsing_defs.h */ +#ifndef SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H +#define SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace numberparsing { + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace haswell +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H +/* end file simdjson/haswell/numberparsing_defs.h */ +/* including simdjson/haswell/simd.h: #include "simdjson/haswell/simd.h" */ +/* begin file simdjson/haswell/simd.h */ +#ifndef SIMDJSON_HASWELL_SIMD_H +#define SIMDJSON_HASWELL_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace simd { + + // Forward-declared so they can be used by splat and friends. + template + struct base { + __m256i value; + + // Zero constructor + simdjson_inline base() : value{__m256i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m256i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m256i&() const { return this->value; } + simdjson_inline operator __m256i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm256_or_si256(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm256_and_si256(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm256_xor_si256(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm256_andnot_si256(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + // Forward-declared so they can be used by splat and friends. + template + struct simd8; + + template> + struct base8: base> { + typedef uint32_t bitmask_t; + typedef uint64_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m256i _value) : base>(_value) {} + + friend simdjson_really_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm256_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm256_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m256i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm256_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm256_testz_si256(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm256_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm256_setzero_si256(); } + static simdjson_inline simd8 load(const T values[32]) { + return _mm256_loadu_si256(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m256i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[32]) const { return _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst), *this); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm256_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm256_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm256_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint32_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in four steps, first 8 bytes and then second 8 bytes... + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // second least significant 8 bits + uint8_t mask3 = uint8_t(mask >> 16); // ... + uint8_t mask4 = uint8_t(mask >> 24); // ... + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m256i shufmask = _mm256_set_epi64x(thintable_epi8[mask4], thintable_epi8[mask3], + thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask and so forth + shufmask = + _mm256_add_epi8(shufmask, _mm256_set_epi32(0x18181818, 0x18181818, + 0x10101010, 0x10101010, 0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m256i pruned = _mm256_shuffle_epi8(*this, shufmask); + // we still need to put the pieces back together. + // we compute the popcount of the first words: + int pop1 = BitsSetTable256mul2[mask1]; + int pop3 = BitsSetTable256mul2[mask3]; + + // then load the corresponding mask + // could be done with _mm256_loadu2_m128i but many standard libraries omit this intrinsic. + __m256i v256 = _mm256_castsi128_si256( + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8))); + __m256i compactmask = _mm256_insertf128_si256(v256, + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop3 * 8)), 1); + __m256i almostthere = _mm256_shuffle_epi8(pruned, compactmask); + // We just need to write out the result. + // This is the tricky bit that is hard to do + // if we want to return a SIMD register, since there + // is no single-instruction approach to recombine + // the two 128-bit lanes with an offset. + __m128i v128; + v128 = _mm256_castsi256_si128(almostthere); + _mm_storeu_si128( reinterpret_cast<__m128i *>(output), v128); + v128 = _mm256_extractf128_si256(almostthere, 1); + _mm_storeu_si128( reinterpret_cast<__m128i *>(output + 16 - count_ones(mask & 0xFFFF)), v128); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m256i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t values[32]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15, + int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23, + int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31 + ) : simd8(_mm256_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v16,v17,v18,v19,v20,v21,v22,v23, + v24,v25,v26,v27,v28,v29,v30,v31 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm256_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm256_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm256_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm256_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m256i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[32]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15, + uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23, + uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31 + ) : simd8(_mm256_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v16,v17,v18,v19,v20,v21,v22,v23, + v24,v25,v26,v27,v28,v29,v30,v31 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm256_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm256_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm256_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm256_min_epu8(other, *this); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->lt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm256_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm256_testz_si256(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm256_testz_si256(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm256_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm256_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm256_movemask_epi8(_mm256_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 2, "Haswell kernel should use two registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1) : chunks{chunk0, chunk1} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+32)} {} + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + uint32_t mask1 = uint32_t(mask); + uint32_t mask2 = uint32_t(mask >> 32); + this->chunks[0].compress(mask1, output); + this->chunks[1].compress(mask2, output + 32 - count_ones(mask1)); + return 64 - count_ones(mask); + } + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r_lo = uint32_t(this->chunks[0].to_bitmask()); + uint64_t r_hi = this->chunks[1].to_bitmask(); + return r_lo | (r_hi << 32); + } + + simdjson_inline simd8 reduce_or() const { + return this->chunks[0] | this->chunks[1]; + } + + simdjson_inline simd8x64 bit_or(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] | mask, + this->chunks[1] | mask + ); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_SIMD_H +/* end file simdjson/haswell/simd.h */ +/* including simdjson/haswell/stringparsing_defs.h: #include "simdjson/haswell/stringparsing_defs.h" */ +/* begin file simdjson/haswell/stringparsing_defs.h */ +#ifndef SIMDJSON_HASWELL_STRINGPARSING_DEFS_H +#define SIMDJSON_HASWELL_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 15 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v(src); + // store to dest unconditionally - we can overwrite the bits we don't like later + v.store(dst); + return { + static_cast((v == '\\').to_bitmask()), // bs_bits + static_cast((v == '"').to_bitmask()), // quote_bits + }; +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_STRINGPARSING_DEFS_H +/* end file simdjson/haswell/stringparsing_defs.h */ +/* end file simdjson/haswell/begin.h */ +/* including simdjson/generic/amalgamated.h for haswell: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for haswell */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for haswell: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for haswell */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for haswell */ +/* including simdjson/generic/jsoncharutils.h for haswell: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for haswell */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for haswell */ +/* including simdjson/generic/atomparsing.h for haswell: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for haswell */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace haswell { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for haswell */ +/* including simdjson/generic/dom_parser_implementation.h for haswell: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for haswell */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace haswell +} // namespace simdjson + +namespace simdjson { +namespace haswell { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for haswell */ +/* including simdjson/generic/implementation_simdjson_result_base.h for haswell: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for haswell */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for haswell */ +/* including simdjson/generic/numberparsing.h for haswell: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for haswell */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace haswell { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for haswell */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for haswell: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for haswell */ +/* end file simdjson/generic/amalgamated.h for haswell */ +/* including simdjson/haswell/end.h: #include "simdjson/haswell/end.h" */ +/* begin file simdjson/haswell/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_HASWELL +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "haswell" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/haswell/end.h */ + +#endif // SIMDJSON_HASWELL_H +/* end file simdjson/haswell.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(icelake) +/* including simdjson/icelake.h: #include "simdjson/icelake.h" */ +/* begin file simdjson/icelake.h */ +#ifndef SIMDJSON_ICELAKE_H +#define SIMDJSON_ICELAKE_H + +/* including simdjson/icelake/begin.h: #include "simdjson/icelake/begin.h" */ +/* begin file simdjson/icelake/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "icelake" */ +#define SIMDJSON_IMPLEMENTATION icelake +/* including simdjson/icelake/base.h: #include "simdjson/icelake/base.h" */ +/* begin file simdjson/icelake/base.h */ +#ifndef SIMDJSON_ICELAKE_BASE_H +#define SIMDJSON_ICELAKE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_ICELAKE +namespace simdjson { +/** + * Implementation for Icelake (Intel AVX512). + */ +namespace icelake { + +class implementation; + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BASE_H +/* end file simdjson/icelake/base.h */ +/* including simdjson/icelake/intrinsics.h: #include "simdjson/icelake/intrinsics.h" */ +/* begin file simdjson/icelake/intrinsics.h */ +#ifndef SIMDJSON_ICELAKE_INTRINSICS_H +#define SIMDJSON_ICELAKE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + * e.g., if __AVX2__ is set... in turn, we normally set these + * macros by compiling against the corresponding architecture + * (e.g., arch:AVX2, -mavx2, etc.) which compiles the whole + * software with these advanced instructions. In simdjson, we + * want to compile the whole program for a generic target, + * and only target our specific kernels. As a workaround, + * we directly include the needed headers. These headers would + * normally guard against such usage, but we carefully included + * (or ) before, so the headers + * are fooled. + */ +#include // for _blsr_u64 +#include // for __lzcnt64 +#include // for most things (AVX2, AVX512, _popcnt64) +#include +#include +#include +#include +#include // for _mm_clmulepi64_si128 +// Important: we need the AVX-512 headers: +#include +#include +#include +#include +#include +#include +#include +// unfortunately, we may not get _blsr_u64, but, thankfully, clang +// has it as a macro. +#ifndef _blsr_u64 +// we roll our own +#define _blsr_u64(n) ((n - 1) & n) +#endif // _blsr_u64 +#endif // SIMDJSON_CLANG_VISUAL_STUDIO + +static_assert(sizeof(__m512i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for icelake"); + +#endif // SIMDJSON_ICELAKE_INTRINSICS_H +/* end file simdjson/icelake/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +SIMDJSON_TARGET_REGION("avx512f,avx512dq,avx512cd,avx512bw,avx512vbmi,avx512vbmi2,avx512vl,avx2,bmi,pclmul,lzcnt,popcnt") +#endif + +/* including simdjson/icelake/bitmanipulation.h: #include "simdjson/icelake/bitmanipulation.h" */ +/* begin file simdjson/icelake/bitmanipulation.h */ +#ifndef SIMDJSON_ICELAKE_BITMANIPULATION_H +#define SIMDJSON_ICELAKE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return (int)_tzcnt_u64(input_num); +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + //////// + // You might expect the next line to be equivalent to + // return (int)_tzcnt_u64(input_num); + // but the generated code differs and might be less efficient? + //////// + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return _blsr_u64(input_num); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { + return int(_lzcnt_u64(input_num)); +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BITMANIPULATION_H +/* end file simdjson/icelake/bitmanipulation.h */ +/* including simdjson/icelake/bitmask.h: #include "simdjson/icelake/bitmask.h" */ +/* begin file simdjson/icelake/bitmask.h */ +#ifndef SIMDJSON_ICELAKE_BITMASK_H +#define SIMDJSON_ICELAKE_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processor supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BITMASK_H +/* end file simdjson/icelake/bitmask.h */ +/* including simdjson/icelake/simd.h: #include "simdjson/icelake/simd.h" */ +/* begin file simdjson/icelake/simd.h */ +#ifndef SIMDJSON_ICELAKE_SIMD_H +#define SIMDJSON_ICELAKE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if defined(__GNUC__) && !defined(__clang__) +#if __GNUC__ == 8 +#define SIMDJSON_GCC8 1 +#endif // __GNUC__ == 8 +#endif // defined(__GNUC__) && !defined(__clang__) + +#if SIMDJSON_GCC8 +/** + * GCC 8 fails to provide _mm512_set_epi8. We roll our own. + */ +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) { + 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), + 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), + 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), + 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), + 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), + 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), + 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), + 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)); +} +#endif // SIMDJSON_GCC8 + + + +namespace simdjson { +namespace icelake { +namespace { +namespace simd { + + // Forward-declared so they can be used by splat and friends. + template + struct base { + __m512i value; + + // Zero constructor + simdjson_inline base() : value{__m512i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m512i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m512i&() const { return this->value; } + simdjson_inline operator __m512i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm512_or_si512(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm512_and_si512(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm512_xor_si512(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm512_andnot_si512(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + // Forward-declared so they can be used by splat and friends. + template + struct simd8; + + template> + struct base8: base> { + typedef uint32_t bitmask_t; + typedef uint64_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m512i _value) : base>(_value) {} + + friend simdjson_really_inline uint64_t operator==(const simd8 lhs, const simd8 rhs) { + return _mm512_cmpeq_epi8_mask(lhs, rhs); + } + + static const int SIZE = sizeof(base::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + // workaround for compilers unable to figure out that 16 - N is a constant (GCC 8) + constexpr int shift = 16 - N; + return _mm512_alignr_epi8(*this, _mm512_permutex2var_epi64(prev_chunk, _mm512_set_epi64(13, 12, 11, 10, 9, 8, 7, 6), *this), shift); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm512_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m512i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + simdjson_inline bool any() const { return !!_mm512_test_epi8_mask (*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm512_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm512_setzero_si512(); } + static simdjson_inline simd8 load(const T values[64]) { + return _mm512_loadu_si512(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m512i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[64]) const { return _mm512_storeu_si512(reinterpret_cast<__m512i *>(dst), *this); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm512_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm512_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm512_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint64_t mask, L * output) const { + _mm512_mask_compressstoreu_epi8 (output,~mask,*this); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m512i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t values[64]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15, + int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23, + int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31, + int8_t v32, int8_t v33, int8_t v34, int8_t v35, int8_t v36, int8_t v37, int8_t v38, int8_t v39, + int8_t v40, int8_t v41, int8_t v42, int8_t v43, int8_t v44, int8_t v45, int8_t v46, int8_t v47, + int8_t v48, int8_t v49, int8_t v50, int8_t v51, int8_t v52, int8_t v53, int8_t v54, int8_t v55, + int8_t v56, int8_t v57, int8_t v58, int8_t v59, int8_t v60, int8_t v61, int8_t v62, int8_t v63 + ) : simd8(_mm512_set_epi8( + v63, v62, v61, v60, v59, v58, v57, v56, + v55, v54, v53, v52, v51, v50, v49, v48, + v47, v46, v45, v44, v43, v42, v41, v40, + v39, v38, v37, v36, v35, v34, v33, v32, + v31, v30, v29, v28, v27, v26, v25, v24, + v23, v22, v21, v20, v19, v18, v17, v16, + v15, v14, v13, v12, v11, v10, v9, v8, + v7, v6, v5, v4, v3, v2, v1, v0 + )) {} + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm512_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm512_min_epi8(*this, other); } + + simdjson_inline simd8 operator>(const simd8 other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(*this, other),_mm512_set1_epi8(uint8_t(0x80))); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(other, *this),_mm512_set1_epi8(uint8_t(0x80))); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m512i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[64]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15, + uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23, + uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31, + uint8_t v32, uint8_t v33, uint8_t v34, uint8_t v35, uint8_t v36, uint8_t v37, uint8_t v38, uint8_t v39, + uint8_t v40, uint8_t v41, uint8_t v42, uint8_t v43, uint8_t v44, uint8_t v45, uint8_t v46, uint8_t v47, + uint8_t v48, uint8_t v49, uint8_t v50, uint8_t v51, uint8_t v52, uint8_t v53, uint8_t v54, uint8_t v55, + uint8_t v56, uint8_t v57, uint8_t v58, uint8_t v59, uint8_t v60, uint8_t v61, uint8_t v62, uint8_t v63 + ) : simd8(_mm512_set_epi8( + v63, v62, v61, v60, v59, v58, v57, v56, + v55, v54, v53, v52, v51, v50, v49, v48, + v47, v46, v45, v44, v43, v42, v41, v40, + v39, v38, v37, v36, v35, v34, v33, v32, + v31, v30, v29, v28, v27, v26, v25, v24, + v23, v22, v21, v20, v19, v18, v17, v16, + v15, v14, v13, v12, v11, v10, v9, v8, + v7, v6, v5, v4, v3, v2, v1, v0 + )) {} + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm512_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm512_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm512_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm512_min_epu8(other, *this); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline uint64_t operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline uint64_t operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->lt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return _mm512_mask_blend_epi8(*this == uint8_t(0), _mm512_set1_epi8(0), _mm512_set1_epi8(-1)); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + + simdjson_inline bool is_ascii() const { return _mm512_movepi8_mask(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { + return !_mm512_test_epi8_mask(*this, *this); + } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return !_mm512_test_epi8_mask(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm512_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm512_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline uint64_t get_bit() const { return _mm512_movepi8_mask(_mm512_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 1, "Icelake kernel should use one register per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1) : chunks{chunk0, chunk1} {} + simdjson_inline simd8x64(const simd8 chunk0) : chunks{chunk0} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr)} {} + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(mask, output); + return 64 - count_ones(mask); + } + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + } + + simdjson_inline simd8 reduce_or() const { + return this->chunks[0]; + } + + simdjson_inline simd8x64 bit_or(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] | mask + ); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return this->chunks[0] == mask; + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return this->chunks[0] == other.chunks[0]; + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return this->chunks[0] <= mask; + } + }; // struct simd8x64 + +} // namespace simd + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_SIMD_H +/* end file simdjson/icelake/simd.h */ +/* including simdjson/icelake/stringparsing_defs.h: #include "simdjson/icelake/stringparsing_defs.h" */ +/* begin file simdjson/icelake/stringparsing_defs.h */ +#ifndef SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H +#define SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 64; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint64_t bs_bits; + uint64_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 15 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v(src); + // store to dest unconditionally - we can overwrite the bits we don't like later + v.store(dst); + return { + static_cast(v == '\\'), // bs_bits + static_cast(v == '"'), // quote_bits + }; +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H +/* end file simdjson/icelake/stringparsing_defs.h */ +/* including simdjson/icelake/numberparsing_defs.h: #include "simdjson/icelake/numberparsing_defs.h" */ +/* begin file simdjson/icelake/numberparsing_defs.h */ +#ifndef SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H +#define SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace numberparsing { + +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace icelake +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H +/* end file simdjson/icelake/numberparsing_defs.h */ +/* end file simdjson/icelake/begin.h */ +/* including simdjson/generic/amalgamated.h for icelake: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for icelake */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for icelake: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for icelake */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for icelake */ +/* including simdjson/generic/jsoncharutils.h for icelake: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for icelake */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for icelake */ +/* including simdjson/generic/atomparsing.h for icelake: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for icelake */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace icelake { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for icelake */ +/* including simdjson/generic/dom_parser_implementation.h for icelake: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for icelake */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace icelake +} // namespace simdjson + +namespace simdjson { +namespace icelake { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for icelake */ +/* including simdjson/generic/implementation_simdjson_result_base.h for icelake: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for icelake */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for icelake */ +/* including simdjson/generic/numberparsing.h for icelake: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for icelake */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace icelake { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for icelake */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for icelake: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for icelake */ +/* end file simdjson/generic/amalgamated.h for icelake */ +/* including simdjson/icelake/end.h: #include "simdjson/icelake/end.h" */ +/* begin file simdjson/icelake/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "icelake" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/icelake/end.h */ + +#endif // SIMDJSON_ICELAKE_H +/* end file simdjson/icelake.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(ppc64) +/* including simdjson/ppc64.h: #include "simdjson/ppc64.h" */ +/* begin file simdjson/ppc64.h */ +#ifndef SIMDJSON_PPC64_H +#define SIMDJSON_PPC64_H + +/* including simdjson/ppc64/begin.h: #include "simdjson/ppc64/begin.h" */ +/* begin file simdjson/ppc64/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "ppc64" */ +#define SIMDJSON_IMPLEMENTATION ppc64 +/* including simdjson/ppc64/base.h: #include "simdjson/ppc64/base.h" */ +/* begin file simdjson/ppc64/base.h */ +#ifndef SIMDJSON_PPC64_BASE_H +#define SIMDJSON_PPC64_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Implementation for ALTIVEC (PPC64). + */ +namespace ppc64 { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_BASE_H +/* end file simdjson/ppc64/base.h */ +/* including simdjson/ppc64/intrinsics.h: #include "simdjson/ppc64/intrinsics.h" */ +/* begin file simdjson/ppc64/intrinsics.h */ +#ifndef SIMDJSON_PPC64_INTRINSICS_H +#define SIMDJSON_PPC64_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This should be the correct header whether +// you use visual studio or other compilers. +#include + +// These are defined by altivec.h in GCC toolchain, it is safe to undef them. +#ifdef bool +#undef bool +#endif + +#ifdef vector +#undef vector +#endif + +static_assert(sizeof(__vector unsigned char) <= simdjson::SIMDJSON_PADDING, "insufficient padding for ppc64"); + +#endif // SIMDJSON_PPC64_INTRINSICS_H +/* end file simdjson/ppc64/intrinsics.h */ +/* including simdjson/ppc64/bitmanipulation.h: #include "simdjson/ppc64/bitmanipulation.h" */ +/* begin file simdjson/ppc64/bitmanipulation.h */ +#ifndef SIMDJSON_PPC64_BITMANIPULATION_H +#define SIMDJSON_PPC64_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num - 1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline int count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num); // Visual Studio wants two underscores +} +#else +simdjson_inline int count_ones(uint64_t input_num) { + return __builtin_popcountll(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + *result = value1 + value2; + return *result < value1; +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_BITMANIPULATION_H +/* end file simdjson/ppc64/bitmanipulation.h */ +/* including simdjson/ppc64/bitmask.h: #include "simdjson/ppc64/bitmask.h" */ +/* begin file simdjson/ppc64/bitmask.h */ +#ifndef SIMDJSON_PPC64_BITMASK_H +#define SIMDJSON_PPC64_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is +// encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(uint64_t bitmask) { + // You can use the version below, however gcc sometimes miscompiles + // vec_pmsum_be, it happens somewhere around between 8 and 9th version. + // The performance boost was not noticeable, falling back to a usual + // implementation. + // __vector unsigned long long all_ones = {~0ull, ~0ull}; + // __vector unsigned long long mask = {bitmask, 0}; + // // Clang and GCC return different values for pmsum for ull so cast it to one. + // // Generally it is not specified by ALTIVEC ISA what is returned by + // // vec_pmsum_be. + // #if defined(__LITTLE_ENDIAN__) + // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[0]); + // #else + // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[1]); + // #endif + bitmask ^= bitmask << 1; + bitmask ^= bitmask << 2; + bitmask ^= bitmask << 4; + bitmask ^= bitmask << 8; + bitmask ^= bitmask << 16; + bitmask ^= bitmask << 32; + return bitmask; +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif +/* end file simdjson/ppc64/bitmask.h */ +/* including simdjson/ppc64/numberparsing_defs.h: #include "simdjson/ppc64/numberparsing_defs.h" */ +/* begin file simdjson/ppc64/numberparsing_defs.h */ +#ifndef SIMDJSON_PPC64_NUMBERPARSING_DEFS_H +#define SIMDJSON_PPC64_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#if defined(__linux__) +#include +#elif defined(__FreeBSD__) +#include +#endif + +namespace simdjson { +namespace ppc64 { +namespace numberparsing { + +// we don't have appropriate instructions, so let us use a scalar function +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + uint64_t val; + std::memcpy(&val, chars, sizeof(uint64_t)); +#ifdef __BIG_ENDIAN__ +#if defined(__linux__) + val = bswap_64(val); +#elif defined(__FreeBSD__) + val = bswap64(val); +#endif +#endif + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace ppc64 +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_PPC64_NUMBERPARSING_DEFS_H +/* end file simdjson/ppc64/numberparsing_defs.h */ +/* including simdjson/ppc64/simd.h: #include "simdjson/ppc64/simd.h" */ +/* begin file simdjson/ppc64/simd.h */ +#ifndef SIMDJSON_PPC64_SIMD_H +#define SIMDJSON_PPC64_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace ppc64 { +namespace { +namespace simd { + +using __m128i = __vector unsigned char; + +template struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i &() const { + return this->value; + } + simdjson_inline operator __m128i &() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { + return vec_or(this->value, (__m128i)other); + } + simdjson_inline Child operator&(const Child other) const { + return vec_and(this->value, (__m128i)other); + } + simdjson_inline Child operator^(const Child other) const { + return vec_xor(this->value, (__m128i)other); + } + simdjson_inline Child bit_andnot(const Child other) const { + return vec_andc(this->value, (__m128i)other); + } + simdjson_inline Child &operator|=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast | other; + return *this_cast; + } + simdjson_inline Child &operator&=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast & other; + return *this_cast; + } + simdjson_inline Child &operator^=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast ^ other; + return *this_cast; + } +}; + +template > +struct base8 : base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { + return (__m128i)vec_cmpeq(lhs.value, (__m128i)rhs); + } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(simd8 prev_chunk) const { + __m128i chunk = this->value; +#ifdef __LITTLE_ENDIAN__ + chunk = (__m128i)vec_reve(this->value); + prev_chunk = (__m128i)vec_reve((__m128i)prev_chunk); +#endif + chunk = (__m128i)vec_sld((__m128i)prev_chunk, (__m128i)chunk, 16 - N); +#ifdef __LITTLE_ENDIAN__ + chunk = (__m128i)vec_reve((__m128i)chunk); +#endif + return chunk; + } +}; + +// SIMD byte mask type (returned by things like eq and gt) +template <> struct simd8 : base8 { + static simdjson_inline simd8 splat(bool _value) { + return (__m128i)vec_splats((unsigned char)(-(!!_value))); + } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) + : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) + : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { + __vector unsigned long long result; + const __m128i perm_mask = {0x78, 0x70, 0x68, 0x60, 0x58, 0x50, 0x48, 0x40, + 0x38, 0x30, 0x28, 0x20, 0x18, 0x10, 0x08, 0x00}; + + result = ((__vector unsigned long long)vec_vbpermq((__m128i)this->value, + (__m128i)perm_mask)); +#ifdef __LITTLE_ENDIAN__ + return static_cast(result[1]); +#else + return static_cast(result[0]); +#endif + } + simdjson_inline bool any() const { + return !vec_all_eq(this->value, (__m128i)vec_splats(0)); + } + simdjson_inline simd8 operator~() const { + return this->value ^ (__m128i)splat(true); + } +}; + +template struct base8_numeric : base8 { + static simdjson_inline simd8 splat(T value) { + (void)value; + return (__m128i)vec_splats(value); + } + static simdjson_inline simd8 zero() { return splat(0); } + static simdjson_inline simd8 load(const T values[16]) { + return (__m128i)(vec_vsx_ld(0, reinterpret_cast(values))); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16(T v0, T v1, T v2, T v3, T v4, + T v5, T v6, T v7, T v8, T v9, + T v10, T v11, T v12, T v13, + T v14, T v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, + v14, v15); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) + : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { + vec_vsx_st(this->value, 0, reinterpret_cast<__m128i *>(dst)); + } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { + return (__m128i)((__m128i)this->value + (__m128i)other); + } + simdjson_inline simd8 operator-(const simd8 other) const { + return (__m128i)((__m128i)this->value - (__m128i)other); + } + simdjson_inline simd8 &operator+=(const simd8 other) { + *this = *this + other; + return *static_cast *>(this); + } + simdjson_inline simd8 &operator-=(const simd8 other) { + *this = *this - other; + return *static_cast *>(this); + } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior + // for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return (__m128i)vec_perm((__m128i)lookup_table, (__m128i)lookup_table, this->value); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted + // as a bitset). Passing a 0 value for mask would be equivalent to writing out + // every byte to output. Only the first 16 - count_ones(mask) bytes of the + // result are significant but 16 bytes get written. Design consideration: it + // seems like a function with the signature simd8 compress(uint32_t mask) + // would be sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L *output) const { + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + using internal::thintable_epi8; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. +#ifdef __LITTLE_ENDIAN__ + __m128i shufmask = (__m128i)(__vector unsigned long long){ + thintable_epi8[mask1], thintable_epi8[mask2]}; +#else + __m128i shufmask = (__m128i)(__vector unsigned long long){ + thintable_epi8[mask2], thintable_epi8[mask1]}; + shufmask = (__m128i)vec_reve((__m128i)shufmask); +#endif + // we increment by 0x08 the second half of the mask + shufmask = ((__m128i)shufmask) + + ((__m128i)(__vector int){0, 0, 0x08080808, 0x08080808}); + + // this is the version "nearly pruned" + __m128i pruned = vec_perm(this->value, this->value, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + vec_vsx_ld(0, reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = vec_perm(pruned, (__m128i)vec_splats(0), compactmask); + vec_vsx_st(answer, 0, reinterpret_cast<__m128i *>(output)); + } + + template + simdjson_inline simd8 + lookup_16(L replace0, L replace1, L replace2, L replace3, L replace4, + L replace5, L replace6, L replace7, L replace8, L replace9, + L replace10, L replace11, L replace12, L replace13, L replace14, + L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, replace4, replace5, replace6, + replace7, replace8, replace9, replace10, replace11, replace12, + replace13, replace14, replace15)); + } +}; + +// Signed bytes +template <> struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) + : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t *values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8(int8_t v0, int8_t v1, int8_t v2, int8_t v3, + int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, + int8_t v12, int8_t v13, int8_t v14, int8_t v15) + : simd8((__m128i)(__vector signed char){v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10, v11, v12, v13, v14, + v15}) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 + repeat_16(int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, + int8_t v6, int8_t v7, int8_t v8, int8_t v9, int8_t v10, int8_t v11, + int8_t v12, int8_t v13, int8_t v14, int8_t v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15); + } + + // Order-sensitive comparisons + simdjson_inline simd8 + max_val(const simd8 other) const { + return (__m128i)vec_max((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + min_val(const simd8 other) const { + return (__m128i)vec_min((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + operator>(const simd8 other) const { + return (__m128i)vec_cmpgt((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + operator<(const simd8 other) const { + return (__m128i)vec_cmplt((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } +}; + +// Unsigned bytes +template <> struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) + : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t *values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline + simd8(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, + uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10, + uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15) + : simd8((__m128i){v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15}) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 + repeat_16(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, + uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, + uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, + uint8_t v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15); + } + + // Saturated math + simdjson_inline simd8 + saturating_add(const simd8 other) const { + return (__m128i)vec_adds(this->value, (__m128i)other); + } + simdjson_inline simd8 + saturating_sub(const simd8 other) const { + return (__m128i)vec_subs(this->value, (__m128i)other); + } + + // Order-specific operations + simdjson_inline simd8 + max_val(const simd8 other) const { + return (__m128i)vec_max(this->value, (__m128i)other); + } + simdjson_inline simd8 + min_val(const simd8 other) const { + return (__m128i)vec_min(this->value, (__m128i)other); + } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 + gt_bits(const simd8 other) const { + return this->saturating_sub(other); + } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 + lt_bits(const simd8 other) const { + return other.saturating_sub(*this); + } + simdjson_inline simd8 + operator<=(const simd8 other) const { + return other.max_val(*this) == other; + } + simdjson_inline simd8 + operator>=(const simd8 other) const { + return other.min_val(*this) == other; + } + simdjson_inline simd8 + operator>(const simd8 other) const { + return this->gt_bits(other).any_bits_set(); + } + simdjson_inline simd8 + operator<(const simd8 other) const { + return this->gt_bits(other).any_bits_set(); + } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { + return (__m128i)vec_cmpeq(this->value, (__m128i)vec_splats(uint8_t(0))); + } + simdjson_inline simd8 bits_not_set(simd8 bits) const { + return (*this & bits).bits_not_set(); + } + simdjson_inline simd8 any_bits_set() const { + return ~this->bits_not_set(); + } + simdjson_inline simd8 any_bits_set(simd8 bits) const { + return ~this->bits_not_set(bits); + } + simdjson_inline bool bits_not_set_anywhere() const { + return vec_all_eq(this->value, (__m128i)vec_splats(0)); + } + simdjson_inline bool any_bits_set_anywhere() const { + return !bits_not_set_anywhere(); + } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { + return vec_all_eq(vec_and(this->value, (__m128i)bits), + (__m128i)vec_splats(0)); + } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { + return !bits_not_set_anywhere(bits); + } + template simdjson_inline simd8 shr() const { + return simd8( + (__m128i)vec_sr(this->value, (__m128i)vec_splat_u8(N))); + } + template simdjson_inline simd8 shl() const { + return simd8( + (__m128i)vec_sl(this->value, (__m128i)vec_splat_u8(N))); + } +}; + +template struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, + "PPC64 kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64 &o) = delete; // no copy allowed + simd8x64 & + operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, + const simd8 chunk2, const simd8 chunk3) + : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) + : chunks{simd8::load(ptr), simd8::load(ptr + 16), + simd8::load(ptr + 32), simd8::load(ptr + 48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr + sizeof(simd8) * 0); + this->chunks[1].store(ptr + sizeof(simd8) * 1); + this->chunks[2].store(ptr + sizeof(simd8) * 2); + this->chunks[3].store(ptr + sizeof(simd8) * 3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | + (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T *output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), + output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), + output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), + output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask()); + uint64_t r1 = this->chunks[1].to_bitmask(); + uint64_t r2 = this->chunks[2].to_bitmask(); + uint64_t r3 = this->chunks[3].to_bitmask(); + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64(this->chunks[0] == mask, this->chunks[1] == mask, + this->chunks[2] == mask, this->chunks[3] == mask) + .to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64(this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3]) + .to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64(this->chunks[0] <= mask, this->chunks[1] <= mask, + this->chunks[2] <= mask, this->chunks[3] <= mask) + .to_bitmask(); + } +}; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_SIMD_INPUT_H +/* end file simdjson/ppc64/simd.h */ +/* including simdjson/ppc64/stringparsing_defs.h: #include "simdjson/ppc64/stringparsing_defs.h" */ +/* begin file simdjson/ppc64/stringparsing_defs.h */ +#ifndef SIMDJSON_PPC64_STRINGPARSING_DEFS_H +#define SIMDJSON_PPC64_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/simd.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote + copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { + return ((bs_bits - 1) & quote_bits) != 0; + } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { + return trailing_zeroes(quote_bits); + } + simdjson_inline int backslash_index() { + return trailing_zeroes(bs_bits); + } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote +backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), + "backslash and quote finder must process fewer than " + "SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + sizeof(v0)); + v0.store(dst); + v1.store(dst + sizeof(v0)); + + // Getting a 64-bit bitmask is much cheaper than multiple 16-bit bitmasks on + // PPC; therefore, we smash them together into a 64-byte mask and get the + // bitmask from there. + uint64_t bs_and_quote = + simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_STRINGPARSING_DEFS_H +/* end file simdjson/ppc64/stringparsing_defs.h */ + +#define SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT 1 +/* end file simdjson/ppc64/begin.h */ +/* including simdjson/generic/amalgamated.h for ppc64: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for ppc64 */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for ppc64: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for ppc64 */ +/* including simdjson/generic/jsoncharutils.h for ppc64: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for ppc64 */ +/* including simdjson/generic/atomparsing.h for ppc64: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace ppc64 { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for ppc64 */ +/* including simdjson/generic/dom_parser_implementation.h for ppc64: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { +namespace ppc64 { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for ppc64 */ +/* including simdjson/generic/implementation_simdjson_result_base.h for ppc64: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for ppc64 */ +/* including simdjson/generic/numberparsing.h for ppc64: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace ppc64 { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for ppc64 */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for ppc64: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for ppc64 */ +/* end file simdjson/generic/amalgamated.h for ppc64 */ +/* including simdjson/ppc64/end.h: #include "simdjson/ppc64/end.h" */ +/* begin file simdjson/ppc64/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#undef SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT +/* undefining SIMDJSON_IMPLEMENTATION from "ppc64" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/ppc64/end.h */ + +#endif // SIMDJSON_PPC64_H +/* end file simdjson/ppc64.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(westmere) +/* including simdjson/westmere.h: #include "simdjson/westmere.h" */ +/* begin file simdjson/westmere.h */ +#ifndef SIMDJSON_WESTMERE_H +#define SIMDJSON_WESTMERE_H + +/* including simdjson/westmere/begin.h: #include "simdjson/westmere/begin.h" */ +/* begin file simdjson/westmere/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "westmere" */ +#define SIMDJSON_IMPLEMENTATION westmere +/* including simdjson/westmere/base.h: #include "simdjson/westmere/base.h" */ +/* begin file simdjson/westmere/base.h */ +#ifndef SIMDJSON_WESTMERE_BASE_H +#define SIMDJSON_WESTMERE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE +namespace simdjson { +/** + * Implementation for Westmere (Intel SSE4.2). + */ +namespace westmere { + +class implementation; + +namespace { +namespace simd { + +template struct simd8; +template struct simd8x64; + +} // namespace simd +} // unnamed namespace + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BASE_H +/* end file simdjson/westmere/base.h */ +/* including simdjson/westmere/intrinsics.h: #include "simdjson/westmere/intrinsics.h" */ +/* begin file simdjson/westmere/intrinsics.h */ +#ifndef SIMDJSON_WESTMERE_INTRINSICS_H +#define SIMDJSON_WESTMERE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + */ +#include // for _mm_alignr_epi8 +#include // for _mm_clmulepi64_si128 +#endif + +static_assert(sizeof(__m128i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for westmere"); + +#endif // SIMDJSON_WESTMERE_INTRINSICS_H +/* end file simdjson/westmere/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_WESTMERE +SIMDJSON_TARGET_REGION("sse4.2,pclmul,popcnt") +#endif + +/* including simdjson/westmere/bitmanipulation.h: #include "simdjson/westmere/bitmanipulation.h" */ +/* begin file simdjson/westmere/bitmanipulation.h */ +#ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H +#define SIMDJSON_WESTMERE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMANIPULATION_H +/* end file simdjson/westmere/bitmanipulation.h */ +/* including simdjson/westmere/bitmask.h: #include "simdjson/westmere/bitmask.h" */ +/* begin file simdjson/westmere/bitmask.h */ +#ifndef SIMDJSON_WESTMERE_BITMASK_H +#define SIMDJSON_WESTMERE_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processing supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMASK_H +/* end file simdjson/westmere/bitmask.h */ +/* including simdjson/westmere/numberparsing_defs.h: #include "simdjson/westmere/numberparsing_defs.h" */ +/* begin file simdjson/westmere/numberparsing_defs.h */ +#ifndef SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H +#define SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H + +/* including simdjson/westmere/base.h: #include "simdjson/westmere/base.h" */ +/* begin file simdjson/westmere/base.h */ +#ifndef SIMDJSON_WESTMERE_BASE_H +#define SIMDJSON_WESTMERE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE +namespace simdjson { +/** + * Implementation for Westmere (Intel SSE4.2). + */ +namespace westmere { + +class implementation; + +namespace { +namespace simd { + +template struct simd8; +template struct simd8x64; + +} // namespace simd +} // unnamed namespace + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BASE_H +/* end file simdjson/westmere/base.h */ +/* including simdjson/westmere/intrinsics.h: #include "simdjson/westmere/intrinsics.h" */ +/* begin file simdjson/westmere/intrinsics.h */ +#ifndef SIMDJSON_WESTMERE_INTRINSICS_H +#define SIMDJSON_WESTMERE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + */ +#include // for _mm_alignr_epi8 +#include // for _mm_clmulepi64_si128 +#endif + +static_assert(sizeof(__m128i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for westmere"); + +#endif // SIMDJSON_WESTMERE_INTRINSICS_H +/* end file simdjson/westmere/intrinsics.h */ + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace numberparsing { + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace westmere +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H +/* end file simdjson/westmere/numberparsing_defs.h */ +/* including simdjson/westmere/simd.h: #include "simdjson/westmere/simd.h" */ +/* begin file simdjson/westmere/simd.h */ +#ifndef SIMDJSON_WESTMERE_SIMD_H +#define SIMDJSON_WESTMERE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace simd { + + template + struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i&() const { return this->value; } + simdjson_inline operator __m128i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm_or_si128(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm_and_si128(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm_xor_si128(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm_andnot_si128(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + template> + struct base8: base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm_alignr_epi8(*this, prev_chunk, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm_testz_si128(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm_setzero_si128(); } + static simdjson_inline simd8 load(const T values[16]) { + return _mm_loadu_si128(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { return _mm_storeu_si128(reinterpret_cast<__m128i *>(dst), *this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m128i shufmask = _mm_set_epi64x(thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask + shufmask = + _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m128i pruned = _mm_shuffle_epi8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = _mm_shuffle_epi8(pruned, compactmask); + _mm_storeu_si128(reinterpret_cast<__m128i *>(output), answer); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epu8(*this, other); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm_testz_si128(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm_testz_si128(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm_movemask_epi8(_mm_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "Westmere kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() ); + uint64_t r1 = this->chunks[1].to_bitmask() ; + uint64_t r2 = this->chunks[2].to_bitmask() ; + uint64_t r3 = this->chunks[3].to_bitmask() ; + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_SIMD_INPUT_H +/* end file simdjson/westmere/simd.h */ +/* including simdjson/westmere/stringparsing_defs.h: #include "simdjson/westmere/stringparsing_defs.h" */ +/* begin file simdjson/westmere/stringparsing_defs.h */ +#ifndef SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H +#define SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H + +/* including simdjson/westmere/bitmanipulation.h: #include "simdjson/westmere/bitmanipulation.h" */ +/* begin file simdjson/westmere/bitmanipulation.h */ +#ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H +#define SIMDJSON_WESTMERE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMANIPULATION_H +/* end file simdjson/westmere/bitmanipulation.h */ +/* including simdjson/westmere/simd.h: #include "simdjson/westmere/simd.h" */ +/* begin file simdjson/westmere/simd.h */ +#ifndef SIMDJSON_WESTMERE_SIMD_H +#define SIMDJSON_WESTMERE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace simd { + + template + struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i&() const { return this->value; } + simdjson_inline operator __m128i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm_or_si128(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm_and_si128(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm_xor_si128(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm_andnot_si128(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + template> + struct base8: base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm_alignr_epi8(*this, prev_chunk, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm_testz_si128(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm_setzero_si128(); } + static simdjson_inline simd8 load(const T values[16]) { + return _mm_loadu_si128(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { return _mm_storeu_si128(reinterpret_cast<__m128i *>(dst), *this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m128i shufmask = _mm_set_epi64x(thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask + shufmask = + _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m128i pruned = _mm_shuffle_epi8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = _mm_shuffle_epi8(pruned, compactmask); + _mm_storeu_si128(reinterpret_cast<__m128i *>(output), answer); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epu8(*this, other); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm_testz_si128(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm_testz_si128(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm_movemask_epi8(_mm_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "Westmere kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() ); + uint64_t r1 = this->chunks[1].to_bitmask() ; + uint64_t r2 = this->chunks[2].to_bitmask() ; + uint64_t r3 = this->chunks[3].to_bitmask() ; + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_SIMD_INPUT_H +/* end file simdjson/westmere/simd.h */ + +namespace simdjson { +namespace westmere { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + 16); + v0.store(dst); + v1.store(dst + 16); + uint64_t bs_and_quote = simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H +/* end file simdjson/westmere/stringparsing_defs.h */ +/* end file simdjson/westmere/begin.h */ +/* including simdjson/generic/amalgamated.h for westmere: #include "simdjson/generic/amalgamated.h" */ +/* begin file simdjson/generic/amalgamated.h for westmere */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_DEPENDENCIES_H) +#error simdjson/generic/dependencies.h must be included before simdjson/generic/amalgamated.h! +#endif + +/* including simdjson/generic/base.h for westmere: #include "simdjson/generic/base.h" */ +/* begin file simdjson/generic/base.h for westmere */ +#ifndef SIMDJSON_GENERIC_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): // If we haven't got an implementation yet, we're in the editor, editing a generic file! Just */ +/* amalgamation skipped (editor-only): // use the most advanced one we can so the most possible stuff can be tested. */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation_detection.h" */ +/* amalgamation skipped (editor-only): #if SIMDJSON_IMPLEMENTATION_ICELAKE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_HASWELL */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_WESTMERE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_ARM64 */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_PPC64 */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/begin.h" */ +/* amalgamation skipped (editor-only): #elif SIMDJSON_IMPLEMENTATION_FALLBACK */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/begin.h" */ +/* amalgamation skipped (editor-only): #else */ +/* amalgamation skipped (editor-only): #error "All possible implementations (including fallback) have been disabled! simdjson will not run." */ +/* amalgamation skipped (editor-only): #endif */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_IMPLEMENTATION */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { + +struct open_container; +class dom_parser_implementation; + +/** + * The type of a JSON number + */ +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 +}; + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_BASE_H +/* end file simdjson/generic/base.h for westmere */ +/* including simdjson/generic/jsoncharutils.h for westmere: #include "simdjson/generic/jsoncharutils.h" */ +/* begin file simdjson/generic/jsoncharutils.h for westmere */ +#ifndef SIMDJSON_GENERIC_JSONCHARUTILS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_JSONCHARUTILS_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/jsoncharutils_tables.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace jsoncharutils { + +// return non-zero if not a structural or whitespace char +// zero otherwise +simdjson_inline uint32_t is_not_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace_negated[c]; +} + +simdjson_inline uint32_t is_structural_or_whitespace(uint8_t c) { + return internal::structural_or_whitespace[c]; +} + +// returns a value with the high 16 bits set if not valid +// otherwise returns the conversion of the 4 hex digits at src into the bottom +// 16 bits of the 32-bit return register +// +// see +// https://lemire.me/blog/2019/04/17/parsing-short-hexadecimal-strings-efficiently/ +static inline uint32_t hex_to_u32_nocheck( + const uint8_t *src) { // strictly speaking, static inline is a C-ism + uint32_t v1 = internal::digit_to_val32[630 + src[0]]; + uint32_t v2 = internal::digit_to_val32[420 + src[1]]; + uint32_t v3 = internal::digit_to_val32[210 + src[2]]; + uint32_t v4 = internal::digit_to_val32[0 + src[3]]; + return v1 | v2 | v3 | v4; +} + +// given a code point cp, writes to c +// the utf-8 code, outputting the length in +// bytes, if the length is zero, the code point +// is invalid +// +// This can possibly be made faster using pdep +// and clz and table lookups, but JSON documents +// have few escaped code points, and the following +// function looks cheap. +// +// Note: we assume that surrogates are treated separately +// +simdjson_inline size_t codepoint_to_utf8(uint32_t cp, uint8_t *c) { + if (cp <= 0x7F) { + c[0] = uint8_t(cp); + return 1; // ascii + } + if (cp <= 0x7FF) { + c[0] = uint8_t((cp >> 6) + 192); + c[1] = uint8_t((cp & 63) + 128); + return 2; // universal plane + // Surrogates are treated elsewhere... + //} //else if (0xd800 <= cp && cp <= 0xdfff) { + // return 0; // surrogates // could put assert here + } else if (cp <= 0xFFFF) { + c[0] = uint8_t((cp >> 12) + 224); + c[1] = uint8_t(((cp >> 6) & 63) + 128); + c[2] = uint8_t((cp & 63) + 128); + return 3; + } else if (cp <= 0x10FFFF) { // if you know you have a valid code point, this + // is not needed + c[0] = uint8_t((cp >> 18) + 240); + c[1] = uint8_t(((cp >> 12) & 63) + 128); + c[2] = uint8_t(((cp >> 6) & 63) + 128); + c[3] = uint8_t((cp & 63) + 128); + return 4; + } + // will return 0 when the code point was too large. + return 0; // bad r +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +} // namespace jsoncharutils +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_JSONCHARUTILS_H +/* end file simdjson/generic/jsoncharutils.h for westmere */ +/* including simdjson/generic/atomparsing.h for westmere: #include "simdjson/generic/atomparsing.h" */ +/* begin file simdjson/generic/atomparsing.h for westmere */ +#ifndef SIMDJSON_GENERIC_ATOMPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ATOMPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace westmere { +namespace { +/// @private +namespace atomparsing { + +// The string_to_uint32 is exclusively used to map literal strings to 32-bit values. +// We use memcpy instead of a pointer cast to avoid undefined behaviors since we cannot +// be certain that the character pointer will be properly aligned. +// You might think that using memcpy makes this function expensive, but you'd be wrong. +// All decent optimizing compilers (GCC, clang, Visual Studio) will compile string_to_uint32("false"); +// to the compile-time constant 1936482662. +simdjson_inline uint32_t string_to_uint32(const char* str) { uint32_t val; std::memcpy(&val, str, sizeof(uint32_t)); return val; } + + +// Again in str4ncmp we use a memcpy to avoid undefined behavior. The memcpy may appear expensive. +// Yet all decent optimizing compilers will compile memcpy to a single instruction, just about. +simdjson_warn_unused +simdjson_inline uint32_t str4ncmp(const uint8_t *src, const char* atom) { + uint32_t srcval; // we want to avoid unaligned 32-bit loads (undefined in C/C++) + static_assert(sizeof(uint32_t) <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be larger than 4 bytes"); + std::memcpy(&srcval, src, sizeof(uint32_t)); + return srcval ^ string_to_uint32(atom); +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src) { + return (str4ncmp(src, "true") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_true_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_true_atom(src); } + else if (len == 4) { return !str4ncmp(src, "true"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src) { + return (str4ncmp(src+1, "alse") | jsoncharutils::is_not_structural_or_whitespace(src[5])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_false_atom(const uint8_t *src, size_t len) { + if (len > 5) { return is_valid_false_atom(src); } + else if (len == 5) { return !str4ncmp(src+1, "alse"); } + else { return false; } +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src) { + return (str4ncmp(src, "null") | jsoncharutils::is_not_structural_or_whitespace(src[4])) == 0; +} + +simdjson_warn_unused +simdjson_inline bool is_valid_null_atom(const uint8_t *src, size_t len) { + if (len > 4) { return is_valid_null_atom(src); } + else if (len == 4) { return !str4ncmp(src, "null"); } + else { return false; } +} + +} // namespace atomparsing +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ATOMPARSING_H +/* end file simdjson/generic/atomparsing.h for westmere */ +/* including simdjson/generic/dom_parser_implementation.h for westmere: #include "simdjson/generic/dom_parser_implementation.h" */ +/* begin file simdjson/generic/dom_parser_implementation.h for westmere */ +#ifndef SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { + +// expectation: sizeof(open_container) = 64/8. +struct open_container { + uint32_t tape_index; // where, on the tape, does the scope ([,{) begins + uint32_t count; // how many elements in the scope +}; // struct open_container + +static_assert(sizeof(open_container) == 64/8, "Open container must be 64 bits"); + +class dom_parser_implementation final : public internal::dom_parser_implementation { +public: + /** Tape location of each open { or [ */ + std::unique_ptr open_containers{}; + /** Whether each open container is a [ or { */ + std::unique_ptr is_array{}; + /** Buffer passed to stage 1 */ + const uint8_t *buf{}; + /** Length passed to stage 1 */ + size_t len{0}; + /** Document passed to stage 2 */ + dom::document *doc{}; + + inline dom_parser_implementation() noexcept; + inline dom_parser_implementation(dom_parser_implementation &&other) noexcept; + inline dom_parser_implementation &operator=(dom_parser_implementation &&other) noexcept; + dom_parser_implementation(const dom_parser_implementation &) = delete; + dom_parser_implementation &operator=(const dom_parser_implementation &) = delete; + + simdjson_warn_unused error_code parse(const uint8_t *buf, size_t len, dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage1(const uint8_t *buf, size_t len, stage1_mode partial) noexcept final; + simdjson_warn_unused error_code stage2(dom::document &doc) noexcept final; + simdjson_warn_unused error_code stage2_next(dom::document &doc) noexcept final; + simdjson_warn_unused uint8_t *parse_string(const uint8_t *src, uint8_t *dst, bool allow_replacement) const noexcept final; + simdjson_warn_unused uint8_t *parse_wobbly_string(const uint8_t *src, uint8_t *dst) const noexcept final; + inline simdjson_warn_unused error_code set_capacity(size_t capacity) noexcept final; + inline simdjson_warn_unused error_code set_max_depth(size_t max_depth) noexcept final; +private: + simdjson_inline simdjson_warn_unused error_code set_capacity_stage1(size_t capacity); + +}; + +} // namespace westmere +} // namespace simdjson + +namespace simdjson { +namespace westmere { + +inline dom_parser_implementation::dom_parser_implementation() noexcept = default; +inline dom_parser_implementation::dom_parser_implementation(dom_parser_implementation &&other) noexcept = default; +inline dom_parser_implementation &dom_parser_implementation::operator=(dom_parser_implementation &&other) noexcept = default; + +// Leaving these here so they can be inlined if so desired +inline simdjson_warn_unused error_code dom_parser_implementation::set_capacity(size_t capacity) noexcept { + if(capacity > SIMDJSON_MAXSIZE_BYTES) { return CAPACITY; } + // Stage 1 index output + size_t max_structures = SIMDJSON_ROUNDUP_N(capacity, 64) + 2 + 7; + structural_indexes.reset( new (std::nothrow) uint32_t[max_structures] ); + if (!structural_indexes) { _capacity = 0; return MEMALLOC; } + structural_indexes[0] = 0; + n_structural_indexes = 0; + + _capacity = capacity; + return SUCCESS; +} + +inline simdjson_warn_unused error_code dom_parser_implementation::set_max_depth(size_t max_depth) noexcept { + // Stage 2 stacks + open_containers.reset(new (std::nothrow) open_container[max_depth]); + is_array.reset(new (std::nothrow) bool[max_depth]); + if (!is_array || !open_containers) { _max_depth = 0; return MEMALLOC; } + + _max_depth = max_depth; + return SUCCESS; +} + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_DOM_PARSER_IMPLEMENTATION_H +/* end file simdjson/generic/dom_parser_implementation.h for westmere */ +/* including simdjson/generic/implementation_simdjson_result_base.h for westmere: #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base.h for westmere */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { + +// This is a near copy of include/error.h's implementation_simdjson_result_base, except it doesn't use std::pair +// so we can avoid inlining errors +// TODO reconcile these! +/** + * The result of a simdjson operation that could fail. + * + * Gives the option of reading error codes, or throwing an exception by casting to the desired result. + * + * This is a base class for implementations that want to add functions to the result type for + * chaining. + * + * Override like: + * + * struct simdjson_result : public internal::implementation_simdjson_result_base { + * simdjson_result() noexcept : internal::implementation_simdjson_result_base() {} + * simdjson_result(error_code error) noexcept : internal::implementation_simdjson_result_base(error) {} + * simdjson_result(T &&value) noexcept : internal::implementation_simdjson_result_base(std::forward(value)) {} + * simdjson_result(T &&value, error_code error) noexcept : internal::implementation_simdjson_result_base(value, error) {} + * // Your extra methods here + * } + * + * Then any method returning simdjson_result will be chainable with your methods. + */ +template +struct implementation_simdjson_result_base { + + /** + * Create a new empty result with error = UNINITIALIZED. + */ + simdjson_inline implementation_simdjson_result_base() noexcept = default; + + /** + * Create a new error result. + */ + simdjson_inline implementation_simdjson_result_base(error_code error) noexcept; + + /** + * Create a new successful result. + */ + simdjson_inline implementation_simdjson_result_base(T &&value) noexcept; + + /** + * Create a new result with both things (use if you don't want to branch when creating the result). + */ + simdjson_inline implementation_simdjson_result_base(T &&value, error_code error) noexcept; + + /** + * Move the value and the error to the provided variables. + * + * @param value The variable to assign the value to. May not be set if there is an error. + * @param error The variable to assign the error to. Set to SUCCESS if there is no error. + */ + simdjson_inline void tie(T &value, error_code &error) && noexcept; + + /** + * Move the value to the provided variable. + * + * @param value The variable to assign the value to. May not be set if there is an error. + */ + simdjson_inline error_code get(T &value) && noexcept; + + /** + * The error. + */ + simdjson_inline error_code error() const noexcept; + +#if SIMDJSON_EXCEPTIONS + + /** + * Get the result value. + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T& value() & noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& value() && noexcept(false); + + /** + * Take the result value (move it). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline T&& take_value() && noexcept(false); + + /** + * Cast to the value (will throw on error). + * + * @throw simdjson_error if there was an error. + */ + simdjson_inline operator T&&() && noexcept(false); + + +#endif // SIMDJSON_EXCEPTIONS + + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline const T& value_unsafe() const& noexcept; + /** + * Get the result value. This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T& value_unsafe() & noexcept; + /** + * Take the result value (move it). This function is safe if and only + * the error() method returns a value that evaluates to false. + */ + simdjson_inline T&& value_unsafe() && noexcept; +protected: + /** users should never directly access first and second. **/ + T first{}; /** Users should never directly access 'first'. **/ + error_code second{UNINITIALIZED}; /** Users should never directly access 'second'. **/ +}; // struct implementation_simdjson_result_base + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_H +/* end file simdjson/generic/implementation_simdjson_result_base.h for westmere */ +/* including simdjson/generic/numberparsing.h for westmere: #include "simdjson/generic/numberparsing.h" */ +/* begin file simdjson/generic/numberparsing.h for westmere */ +#ifndef SIMDJSON_GENERIC_NUMBERPARSING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_NUMBERPARSING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/jsoncharutils.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include +#include + +namespace simdjson { +namespace westmere { +namespace numberparsing { + +#ifdef JSON_TEST_NUMBERS +#define INVALID_NUMBER(SRC) (found_invalid_number((SRC)), NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (found_integer((VALUE), (SRC)), (WRITER).append_s64((VALUE))) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (found_unsigned_integer((VALUE), (SRC)), (WRITER).append_u64((VALUE))) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (found_float((VALUE), (SRC)), (WRITER).append_double((VALUE))) +#else +#define INVALID_NUMBER(SRC) (NUMBER_ERROR) +#define WRITE_INTEGER(VALUE, SRC, WRITER) (WRITER).append_s64((VALUE)) +#define WRITE_UNSIGNED(VALUE, SRC, WRITER) (WRITER).append_u64((VALUE)) +#define WRITE_DOUBLE(VALUE, SRC, WRITER) (WRITER).append_double((VALUE)) +#endif + +namespace { + +// Convert a mantissa, an exponent and a sign bit into an ieee64 double. +// The real_exponent needs to be in [0, 2046] (technically real_exponent = 2047 would be acceptable). +// The mantissa should be in [0,1<<53). The bit at index (1ULL << 52) while be zeroed. +simdjson_inline double to_double(uint64_t mantissa, uint64_t real_exponent, bool negative) { + double d; + mantissa &= ~(1ULL << 52); + mantissa |= real_exponent << 52; + mantissa |= ((static_cast(negative)) << 63); + std::memcpy(&d, &mantissa, sizeof(d)); + return d; +} + +// Attempts to compute i * 10^(power) exactly; and if "negative" is +// true, negate the result. +// This function will only work in some cases, when it does not work, success is +// set to false. This should work *most of the time* (like 99% of the time). +// We assume that power is in the [smallest_power, +// largest_power] interval: the caller is responsible for this check. +simdjson_inline bool compute_float_64(int64_t power, uint64_t i, bool negative, double &d) { + // we start with a fast path + // It was described in + // Clinger WD. How to read floating point numbers accurately. + // ACM SIGPLAN Notices. 1990 +#ifndef FLT_EVAL_METHOD +#error "FLT_EVAL_METHOD should be defined, please include cfloat." +#endif +#if (FLT_EVAL_METHOD != 1) && (FLT_EVAL_METHOD != 0) + // We cannot be certain that x/y is rounded to nearest. + if (0 <= power && power <= 22 && i <= 9007199254740991) +#else + if (-22 <= power && power <= 22 && i <= 9007199254740991) +#endif + { + // convert the integer into a double. This is lossless since + // 0 <= i <= 2^53 - 1. + d = double(i); + // + // The general idea is as follows. + // If 0 <= s < 2^53 and if 10^0 <= p <= 10^22 then + // 1) Both s and p can be represented exactly as 64-bit floating-point + // values + // (binary64). + // 2) Because s and p can be represented exactly as floating-point values, + // then s * p + // and s / p will produce correctly rounded values. + // + if (power < 0) { + d = d / simdjson::internal::power_of_ten[-power]; + } else { + d = d * simdjson::internal::power_of_ten[power]; + } + if (negative) { + d = -d; + } + return true; + } + // When 22 < power && power < 22 + 16, we could + // hope for another, secondary fast path. It was + // described by David M. Gay in "Correctly rounded + // binary-decimal and decimal-binary conversions." (1990) + // If you need to compute i * 10^(22 + x) for x < 16, + // first compute i * 10^x, if you know that result is exact + // (e.g., when i * 10^x < 2^53), + // then you can still proceed and do (i * 10^x) * 10^22. + // Is this worth your time? + // You need 22 < power *and* power < 22 + 16 *and* (i * 10^(x-22) < 2^53) + // for this second fast path to work. + // If you you have 22 < power *and* power < 22 + 16, and then you + // optimistically compute "i * 10^(x-22)", there is still a chance that you + // have wasted your time if i * 10^(x-22) >= 2^53. It makes the use cases of + // this optimization maybe less common than we would like. Source: + // http://www.exploringbinary.com/fast-path-decimal-to-floating-point-conversion/ + // also used in RapidJSON: https://rapidjson.org/strtod_8h_source.html + + // The fast path has now failed, so we are failing back on the slower path. + + // In the slow path, we need to adjust i so that it is > 1<<63 which is always + // possible, except if i == 0, so we handle i == 0 separately. + if(i == 0) { + d = negative ? -0.0 : 0.0; + return true; + } + + + // The exponent is 1024 + 63 + power + // + floor(log(5**power)/log(2)). + // The 1024 comes from the ieee64 standard. + // The 63 comes from the fact that we use a 64-bit word. + // + // Computing floor(log(5**power)/log(2)) could be + // slow. Instead we use a fast function. + // + // For power in (-400,350), we have that + // (((152170 + 65536) * power ) >> 16); + // is equal to + // floor(log(5**power)/log(2)) + power when power >= 0 + // and it is equal to + // ceil(log(5**-power)/log(2)) + power when power < 0 + // + // The 65536 is (1<<16) and corresponds to + // (65536 * power) >> 16 ---> power + // + // ((152170 * power ) >> 16) is equal to + // floor(log(5**power)/log(2)) + // + // Note that this is not magic: 152170/(1<<16) is + // approximatively equal to log(5)/log(2). + // The 1<<16 value is a power of two; we could use a + // larger power of 2 if we wanted to. + // + int64_t exponent = (((152170 + 65536) * power) >> 16) + 1024 + 63; + + + // We want the most significant bit of i to be 1. Shift if needed. + int lz = leading_zeroes(i); + i <<= lz; + + + // We are going to need to do some 64-bit arithmetic to get a precise product. + // We use a table lookup approach. + // It is safe because + // power >= smallest_power + // and power <= largest_power + // We recover the mantissa of the power, it has a leading 1. It is always + // rounded down. + // + // We want the most significant 64 bits of the product. We know + // this will be non-zero because the most significant bit of i is + // 1. + const uint32_t index = 2 * uint32_t(power - simdjson::internal::smallest_power); + // 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.) + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 firstproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index]); + // Both i and power_of_five_128[index] have their most significant bit set to 1 which + // implies that the either the most or the second most significant bit of the product + // is 1. We pack values in this manner for efficiency reasons: it maximizes the use + // we make of the product. It also makes it easy to reason about the product: there + // is 0 or 1 leading zero in the product. + + // Unless the least significant 9 bits of the high (64-bit) part of the full + // product are all 1s, then we know that the most significant 55 bits are + // exact and no further work is needed. Having 55 bits is necessary because + // we need 53 bits for the mantissa but we have to have one rounding bit and + // we can waste a bit if the most significant bit of the product is zero. + if((firstproduct.high & 0x1FF) == 0x1FF) { + // We want to compute i * 5^q, but only care about the top 55 bits at most. + // Consider the scenario where q>=0. Then 5^q may not fit in 64-bits. Doing + // the full computation is wasteful. So we do what is called a "truncated + // multiplication". + // We take the most significant 64-bits, and we put them in + // power_of_five_128[index]. Usually, that's good enough to approximate i * 5^q + // to the desired approximation using one multiplication. Sometimes it does not suffice. + // Then we store the next most significant 64 bits in power_of_five_128[index + 1], and + // then we get a better approximation to i * 5^q. + // + // That's for when q>=0. The logic for q<0 is somewhat similar but it is somewhat + // more complicated. + // + // There is an extra layer of complexity in that we need more than 55 bits of + // accuracy in the round-to-even scenario. + // + // The full_multiplication function computes the 128-bit product of two 64-bit words + // with a returned value of type value128 with a "low component" corresponding to the + // 64-bit least significant bits of the product and with a "high component" corresponding + // to the 64-bit most significant bits of the product. + simdjson::internal::value128 secondproduct = full_multiplication(i, simdjson::internal::power_of_five_128[index + 1]); + firstproduct.low += secondproduct.high; + if(secondproduct.high > firstproduct.low) { firstproduct.high++; } + // As it has been proven by Noble Mushtak and Daniel Lemire in "Fast Number Parsing Without + // Fallback" (https://arxiv.org/abs/2212.06644), at this point we are sure that the product + // is sufficiently accurate, and more computation is not needed. + } + uint64_t lower = firstproduct.low; + uint64_t upper = firstproduct.high; + // The final mantissa should be 53 bits with a leading 1. + // We shift it so that it occupies 54 bits with a leading 1. + /////// + uint64_t upperbit = upper >> 63; + uint64_t mantissa = upper >> (upperbit + 9); + lz += int(1 ^ upperbit); + + // Here we have mantissa < (1<<54). + int64_t real_exponent = exponent - lz; + if (simdjson_unlikely(real_exponent <= 0)) { // we have a subnormal? + // Here have that real_exponent <= 0 so -real_exponent >= 0 + if(-real_exponent + 1 >= 64) { // if we have more than 64 bits below the minimum exponent, you have a zero for sure. + d = negative ? -0.0 : 0.0; + return true; + } + // next line is safe because -real_exponent + 1 < 0 + mantissa >>= -real_exponent + 1; + // Thankfully, we can't have both "round-to-even" and subnormals because + // "round-to-even" only occurs for powers close to 0. + mantissa += (mantissa & 1); // round up + mantissa >>= 1; + // There is a weird scenario where we don't have a subnormal but just. + // Suppose we start with 2.2250738585072013e-308, we end up + // with 0x3fffffffffffff x 2^-1023-53 which is technically subnormal + // whereas 0x40000000000000 x 2^-1023-53 is normal. Now, we need to round + // up 0x3fffffffffffff x 2^-1023-53 and once we do, we are no longer + // subnormal, but we can only know this after rounding. + // So we only declare a subnormal if we are smaller than the threshold. + real_exponent = (mantissa < (uint64_t(1) << 52)) ? 0 : 1; + d = to_double(mantissa, real_exponent, negative); + return true; + } + // We have to round to even. The "to even" part + // is only a problem when we are right in between two floats + // which we guard against. + // If we have lots of trailing zeros, we may fall right between two + // floating-point values. + // + // The round-to-even cases take the form of a number 2m+1 which is in (2^53,2^54] + // times a power of two. That is, it is right between a number with binary significand + // m and another number with binary significand m+1; and it must be the case + // that it cannot be represented by a float itself. + // + // We must have that w * 10 ^q == (2m+1) * 2^p for some power of two 2^p. + // Recall that 10^q = 5^q * 2^q. + // When q >= 0, we must have that (2m+1) is divible by 5^q, so 5^q <= 2^54. We have that + // 5^23 <= 2^54 and it is the last power of five to qualify, so q <= 23. + // When q<0, we have w >= (2m+1) x 5^{-q}. We must have that w<2^{64} so + // (2m+1) x 5^{-q} < 2^{64}. We have that 2m+1>2^{53}. Hence, we must have + // 2^{53} x 5^{-q} < 2^{64}. + // Hence we have 5^{-q} < 2^{11}$ or q>= -4. + // + // We require lower <= 1 and not lower == 0 because we could not prove that + // that lower == 0 is implied; but we could prove that lower <= 1 is a necessary and sufficient test. + if (simdjson_unlikely((lower <= 1) && (power >= -4) && (power <= 23) && ((mantissa & 3) == 1))) { + if((mantissa << (upperbit + 64 - 53 - 2)) == upper) { + mantissa &= ~1; // flip it so that we do not round up + } + } + + mantissa += mantissa & 1; + mantissa >>= 1; + + // Here we have mantissa < (1<<53), unless there was an overflow + if (mantissa >= (1ULL << 53)) { + ////////// + // This will happen when parsing values such as 7.2057594037927933e+16 + //////// + mantissa = (1ULL << 52); + real_exponent++; + } + mantissa &= ~(1ULL << 52); + // we have to check that real_exponent is in range, otherwise we bail out + if (simdjson_unlikely(real_exponent > 2046)) { + // We have an infinite value!!! We could actually throw an error here if we could. + return false; + } + d = to_double(mantissa, real_exponent, negative); + return true; +} + +// We call a fallback floating-point parser that might be slow. Note +// it will accept JSON numbers, but the JSON spec. is more restrictive so +// before you call parse_float_fallback, you need to have validated the input +// string with the JSON grammar. +// It will return an error (false) if the parsed number is infinite. +// The string parsing itself always succeeds. We know that there is at least +// one digit. +static bool parse_float_fallback(const uint8_t *ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +static bool parse_float_fallback(const uint8_t *ptr, const uint8_t *end_ptr, double *outDouble) { + *outDouble = simdjson::internal::from_chars(reinterpret_cast(ptr), reinterpret_cast(end_ptr)); + // We do not accept infinite values. + + // Detecting finite values in a portable manner is ridiculously hard, ideally + // we would want to do: + // return !std::isfinite(*outDouble); + // but that mysteriously fails under legacy/old libc++ libraries, see + // https://github.com/simdjson/simdjson/issues/1286 + // + // Therefore, fall back to this solution (the extra parens are there + // to handle that max may be a macro on windows). + return !(*outDouble > (std::numeric_limits::max)() || *outDouble < std::numeric_limits::lowest()); +} + +// check quickly whether the next 8 chars are made of digits +// at a glance, it looks better than Mula's +// http://0x80.pl/articles/swar-digits-validate.html +simdjson_inline bool is_made_of_eight_digits_fast(const uint8_t *chars) { + uint64_t val; + // this can read up to 7 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(7 <= SIMDJSON_PADDING, "SIMDJSON_PADDING must be bigger than 7"); + std::memcpy(&val, chars, 8); + // a branchy method might be faster: + // return (( val & 0xF0F0F0F0F0F0F0F0 ) == 0x3030303030303030) + // && (( (val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0 ) == + // 0x3030303030303030); + return (((val & 0xF0F0F0F0F0F0F0F0) | + (((val + 0x0606060606060606) & 0xF0F0F0F0F0F0F0F0) >> 4)) == + 0x3333333333333333); +} + +template +SIMDJSON_NO_SANITIZE_UNDEFINED // We deliberately allow overflow here and check later +simdjson_inline bool parse_digit(const uint8_t c, I &i) { + const uint8_t digit = static_cast(c - '0'); + if (digit > 9) { + return false; + } + // PERF NOTE: multiplication by 10 is cheaper than arbitrary integer multiplication + i = 10 * i + digit; // might overflow, we will handle the overflow later + return true; +} + +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) { + // we continue with the fiction that we have an integer. If the + // floating point number is representable as x * 10^z for some integer + // z that fits in 53 bits, then we will be able to convert back the + // the integer into a float in a lossless manner. + const uint8_t *const first_after_period = p; + +#ifdef SIMDJSON_SWAR_NUMBER_PARSING +#if SIMDJSON_SWAR_NUMBER_PARSING + // this helps if we have lots of decimals! + // this turns out to be frequent enough. + if (is_made_of_eight_digits_fast(p)) { + i = i * 100000000 + parse_eight_digits_unrolled(p); + p += 8; + } +#endif // SIMDJSON_SWAR_NUMBER_PARSING +#endif // #ifdef SIMDJSON_SWAR_NUMBER_PARSING + // Unrolling the first digit makes a small difference on some implementations (e.g. westmere) + if (parse_digit(*p, i)) { ++p; } + while (parse_digit(*p, i)) { p++; } + exponent = first_after_period - p; + // Decimal without digits (123.) is illegal + if (exponent == 0) { + return INVALID_NUMBER(src); + } + return SUCCESS; +} + +simdjson_inline error_code parse_exponent(simdjson_unused const uint8_t *const src, const uint8_t *&p, int64_t &exponent) { + // Exp Sign: -123.456e[-]78 + bool neg_exp = ('-' == *p); + if (neg_exp || '+' == *p) { p++; } // Skip + as well + + // Exponent: -123.456e-[78] + auto start_exp = p; + int64_t exp_number = 0; + while (parse_digit(*p, exp_number)) { ++p; } + // It is possible for parse_digit to overflow. + // In particular, it could overflow to INT64_MIN, and we cannot do - INT64_MIN. + // Thus we *must* check for possible overflow before we negate exp_number. + + // Performance notes: it may seem like combining the two "simdjson_unlikely checks" below into + // a single simdjson_unlikely path would be faster. The reasoning is sound, but the compiler may + // not oblige and may, in fact, generate two distinct paths in any case. It might be + // possible to do uint64_t(p - start_exp - 1) >= 18 but it could end up trading off + // instructions for a simdjson_likely branch, an unconclusive gain. + + // If there were no digits, it's an error. + if (simdjson_unlikely(p == start_exp)) { + return INVALID_NUMBER(src); + } + // We have a valid positive exponent in exp_number at this point, except that + // it may have overflowed. + + // If there were more than 18 digits, we may have overflowed the integer. We have to do + // something!!!! + if (simdjson_unlikely(p > start_exp+18)) { + // Skip leading zeroes: 1e000000000000000000001 is technically valid and doesn't overflow + while (*start_exp == '0') { start_exp++; } + // 19 digits could overflow int64_t and is kind of absurd anyway. We don't + // support exponents smaller than -999,999,999,999,999,999 and bigger + // than 999,999,999,999,999,999. + // We can truncate. + // Note that 999999999999999999 is assuredly too large. The maximal ieee64 value before + // infinity is ~1.8e308. The smallest subnormal is ~5e-324. So, actually, we could + // truncate at 324. + // Note that there is no reason to fail per se at this point in time. + // E.g., 0e999999999999999999999 is a fine number. + if (p > start_exp+18) { exp_number = 999999999999999999; } + } + // At this point, we know that exp_number is a sane, positive, signed integer. + // It is <= 999,999,999,999,999,999. As long as 'exponent' is in + // [-8223372036854775808, 8223372036854775808], we won't overflow. Because 'exponent' + // is bounded in magnitude by the size of the JSON input, we are fine in this universe. + // To sum it up: the next line should never overflow. + exponent += (neg_exp ? -exp_number : exp_number); + return SUCCESS; +} + +simdjson_inline size_t significant_digits(const uint8_t * start_digits, size_t digit_count) { + // It is possible that the integer had an overflow. + // We have to handle the case where we have 0.0000somenumber. + const uint8_t *start = start_digits; + while ((*start == '0') || (*start == '.')) { ++start; } + // we over-decrement by one when there is a '.' + return digit_count - size_t(start - start_digits); +} + +} // unnamed namespace + +/** @private */ +template +error_code slow_float_parsing(simdjson_unused const uint8_t * src, W writer) { + double d; + if (parse_float_fallback(src, &d)) { + writer.append_double(d); + return SUCCESS; + } + return INVALID_NUMBER(src); +} + +/** @private */ +template +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) { + // If we frequently had to deal with long strings of digits, + // we could extend our code by using a 128-bit integer instead + // of a 64-bit integer. However, this is uncommon in practice. + // + // 9999999999999999999 < 2**64 so we can accommodate 19 digits. + // If we have a decimal separator, then digit_count - 1 is the number of digits, but we + // may not have a decimal separator! + if (simdjson_unlikely(digit_count > 19 && significant_digits(start_digits, digit_count) > 19)) { + // Ok, chances are good that we had an overflow! + // this is almost never going to get called!!! + // we start anew, going slowly!!! + // This will happen in the following examples: + // 10000000000000000000000000000000000000000000e+308 + // 3.1415926535897932384626433832795028841971693993751 + // + // NOTE: This makes a *copy* of the writer and passes it to slow_float_parsing. This happens + // because slow_float_parsing is a non-inlined function. If we passed our writer reference to + // it, it would force it to be stored in memory, preventing the compiler from picking it apart + // and putting into registers. i.e. if we pass it as reference, it gets slow. + // This is what forces the skip_double, as well. + error_code error = slow_float_parsing(src, writer); + writer.skip_double(); + return error; + } + // NOTE: it's weird that the simdjson_unlikely() only wraps half the if, but it seems to get slower any other + // way we've tried: https://github.com/simdjson/simdjson/pull/990#discussion_r448497331 + // To future reader: we'd love if someone found a better way, or at least could explain this result! + if (simdjson_unlikely(exponent < simdjson::internal::smallest_power) || (exponent > simdjson::internal::largest_power)) { + // + // Important: smallest_power is such that it leads to a zero value. + // Observe that 18446744073709551615e-343 == 0, i.e. (2**64 - 1) e -343 is zero + // so something x 10^-343 goes to zero, but not so with something x 10^-342. + static_assert(simdjson::internal::smallest_power <= -342, "smallest_power is not small enough"); + // + if((exponent < simdjson::internal::smallest_power) || (i == 0)) { + // E.g. Parse "-0.0e-999" into the same value as "-0.0". See https://en.wikipedia.org/wiki/Signed_zero + WRITE_DOUBLE(negative ? -0.0 : 0.0, src, writer); + return SUCCESS; + } else { // (exponent > largest_power) and (i != 0) + // We have, for sure, an infinite value and simdjson refuses to parse infinite values. + return INVALID_NUMBER(src); + } + } + double d; + if (!compute_float_64(exponent, i, negative, d)) { + // we are almost never going to get here. + if (!parse_float_fallback(src, &d)) { return INVALID_NUMBER(src); } + } + WRITE_DOUBLE(d, src, writer); + return SUCCESS; +} + +// for performance analysis, it is sometimes useful to skip parsing +#ifdef SIMDJSON_SKIPNUMBERPARSING + +template +simdjson_inline error_code parse_number(const uint8_t *const, W &writer) { + writer.append_s64(0); // always write zero + return SUCCESS; // always succeeds +} + +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * const src) noexcept { return 0; } +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { return false; } +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { return number_type::signed_integer; } +#else + +// parse the number at src +// define JSON_TEST_NUMBERS for unit testing +// +// It is assumed that the number is followed by a structural ({,},],[) character +// or a white space character. If that is not the case (e.g., when the JSON +// document is made of a single number), then it is necessary to copy the +// content and append a space before calling this function. +// +// Our objective is accurate parsing (ULP of 0) at high speed. +template +simdjson_inline error_code parse_number(const uint8_t *const src, W &writer) { + + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + if (digit_count == 0 || ('0' == *start_digits && digit_count > 1)) { return INVALID_NUMBER(src); } + + // + // Handle floats if there is a . or e (or both) + // + int64_t exponent = 0; + bool is_float = false; + if ('.' == *p) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_decimal_after_separator(src, p, i, exponent) ); + digit_count = int(p - start_digits); // used later to guard against overflows + } + if (('e' == *p) || ('E' == *p)) { + is_float = true; + ++p; + SIMDJSON_TRY( parse_exponent(src, p, exponent) ); + } + if (is_float) { + const bool dirty_end = jsoncharutils::is_not_structural_or_whitespace(*p); + SIMDJSON_TRY( write_float(src, negative, i, start_digits, digit_count, exponent, writer) ); + if (dirty_end) { return INVALID_NUMBER(src); } + return SUCCESS; + } + + // The longest negative 64-bit number is 19 digits. + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + size_t longest_digit_count = negative ? 19 : 20; + if (digit_count > longest_digit_count) { return INVALID_NUMBER(src); } + if (digit_count == longest_digit_count) { + if (negative) { + // Anything negative above INT64_MAX+1 is invalid + if (i > uint64_t(INT64_MAX)+1) { return INVALID_NUMBER(src); } + WRITE_INTEGER(~i+1, src, writer); + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + } else if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INVALID_NUMBER(src); } + } + + // Write unsigned if it doesn't fit in a signed integer. + if (i > uint64_t(INT64_MAX)) { + WRITE_UNSIGNED(i, src, writer); + } else { + WRITE_INTEGER(negative ? (~i+1) : i, src, writer); + } + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return INVALID_NUMBER(src); } + return SUCCESS; +} + +// Inlineable functions +namespace { + +// This table can be used to characterize the final character of an integer +// string. For JSON structural character and allowable white space characters, +// we return SUCCESS. For 'e', '.' and 'E', we return INCORRECT_TYPE. Otherwise +// we return NUMBER_ERROR. +// Optimization note: we could easily reduce the size of the table by half (to 128) +// at the cost of an extra branch. +// Optimization note: we want the values to use at most 8 bits (not, e.g., 32 bits): +static_assert(error_code(uint8_t(NUMBER_ERROR))== NUMBER_ERROR, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(SUCCESS))== SUCCESS, "bad NUMBER_ERROR cast"); +static_assert(error_code(uint8_t(INCORRECT_TYPE))== INCORRECT_TYPE, "bad NUMBER_ERROR cast"); + +const uint8_t integer_string_finisher[256] = { + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, INCORRECT_TYPE, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, SUCCESS, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, INCORRECT_TYPE, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, SUCCESS, NUMBER_ERROR, + SUCCESS, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, NUMBER_ERROR, + NUMBER_ERROR}; + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + + +// Parse any number from 0 to 18,446,744,073,709,551,615 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_unsigned(const uint8_t * const src, const uint8_t * const src_end) noexcept { + const uint8_t *p = src; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if ((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + if (src[0] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from 0 to 18,446,744,073,709,551,615 +simdjson_unused simdjson_inline simdjson_result parse_unsigned_in_string(const uint8_t * const src) noexcept { + const uint8_t *p = src + 1; + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // The longest positive 64-bit number is 20 digits. + // We do it this way so we don't trigger this branch unless we must. + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > 20)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > 20)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if (*p != '"') { return NUMBER_ERROR; } + + if (digit_count == 20) { + // Positive overflow check: + // - A 20 digit number starting with 2-9 is overflow, because 18,446,744,073,709,551,615 is the + // biggest uint64_t. + // - A 20 digit number starting with 1 is overflow if it is less than INT64_MAX. + // If we got here, it's a 20 digit number starting with the digit "1". + // - If a 20 digit number starting with 1 overflowed (i*10+digit), the result will be smaller + // than 1,553,255,926,290,448,384. + // - That is smaller than the smallest possible 20-digit number the user could write: + // 10,000,000,000,000,000,000. + // - Therefore, if the number is positive and lower than that, it's overflow. + // - The value we are looking at is less than or equal to INT64_MAX. + // + // Note: we use src[1] and not src[0] because src[0] is the quote character in this + // instance. + if (src[1] != uint8_t('1') || i <= uint64_t(INT64_MAX)) { return INCORRECT_TYPE; } + } + + return i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while (parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_integer(const uint8_t * const src, const uint8_t * const src_end) noexcept { + // + // Check for minus sign + // + if(src == src_end) { return NUMBER_ERROR; } + bool negative = (*src == '-'); + const uint8_t *p = src + uint8_t(negative); + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = p; + uint64_t i = 0; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(p - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*p)) { + // return (*p == '.' || *p == 'e' || *p == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if((p != src_end) && integer_string_finisher[*p] != SUCCESS) { return error_code(integer_string_finisher[*p]); } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +// Parse any number from -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 +simdjson_unused simdjson_inline simdjson_result parse_integer_in_string(const uint8_t *src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + // PERF NOTE: we don't use is_made_of_eight_digits_fast because large integers like 123456789 are rare + const uint8_t *const start_digits = src; + uint64_t i = 0; + while (parse_digit(*src, i)) { src++; } + + // If there were no digits, or if the integer starts with 0 and has more than one digit, it's an error. + // Optimization note: size_t is expected to be unsigned. + size_t digit_count = size_t(src - start_digits); + // We go from + // -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 + // so we can never represent numbers that have more than 19 digits. + size_t longest_digit_count = 19; + // Optimization note: the compiler can probably merge + // ((digit_count == 0) || (digit_count > longest_digit_count)) + // into a single branch since digit_count is unsigned. + if ((digit_count == 0) || (digit_count > longest_digit_count)) { return INCORRECT_TYPE; } + // Here digit_count > 0. + if (('0' == *start_digits) && (digit_count > 1)) { return NUMBER_ERROR; } + // We can do the following... + // if (!jsoncharutils::is_structural_or_whitespace(*src)) { + // return (*src == '.' || *src == 'e' || *src == 'E') ? INCORRECT_TYPE : NUMBER_ERROR; + // } + // as a single table lookup: + if(*src != '"') { return NUMBER_ERROR; } + // Negative numbers have can go down to - INT64_MAX - 1 whereas positive numbers are limited to INT64_MAX. + // Performance note: This check is only needed when digit_count == longest_digit_count but it is + // so cheap that we might as well always make it. + if(i > uint64_t(INT64_MAX) + uint64_t(negative)) { return INCORRECT_TYPE; } + return negative ? (~i+1) : i; +} + +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline bool is_negative(const uint8_t * src) noexcept { + return (*src == '-'); +} + +simdjson_unused simdjson_inline simdjson_result is_integer(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { return true; } + return false; +} + +simdjson_unused simdjson_inline simdjson_result get_number_type(const uint8_t * src) noexcept { + bool negative = (*src == '-'); + src += uint8_t(negative); + const uint8_t *p = src; + while(static_cast(*p - '0') <= 9) { p++; } + if ( p == src ) { return NUMBER_ERROR; } + if (jsoncharutils::is_structural_or_whitespace(*p)) { + // We have an integer. + // If the number is negative and valid, it must be a signed integer. + if(negative) { return number_type::signed_integer; } + // We want values larger or equal to 9223372036854775808 to be unsigned + // integers, and the other values to be signed integers. + int digit_count = int(p - src); + if(digit_count >= 19) { + const uint8_t * smaller_big_integer = reinterpret_cast("9223372036854775808"); + if((digit_count >= 20) || (memcmp(src, smaller_big_integer, 19) >= 0)) { + return number_type::unsigned_integer; + } + } + return number_type::signed_integer; + } + // Hopefully, we have 'e' or 'E' or '.'. + return number_type::floating_point_number; +} + +// Never read at src_end or beyond +simdjson_unused simdjson_inline simdjson_result parse_double(const uint8_t * src, const uint8_t * const src_end) noexcept { + if(src == src_end) { return NUMBER_ERROR; } + // + // Check for minus sign + // + bool negative = (*src == '-'); + src += uint8_t(negative); + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + if(p == src_end) { return NUMBER_ERROR; } + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while ((p != src_end) && parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely((p != src_end) && (*p == '.'))) { + p++; + const uint8_t *start_decimal_digits = p; + if ((p == src_end) || !parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while ((p != src_end) && parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if ((p != src_end) && (*p == 'e' || *p == 'E')) { + p++; + if(p == src_end) { return NUMBER_ERROR; } + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while ((p != src_end) && parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if ((p != src_end) && jsoncharutils::is_not_structural_or_whitespace(*p)) { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), src_end, &d)) { + return NUMBER_ERROR; + } + return d; +} + +simdjson_unused simdjson_inline simdjson_result parse_double_in_string(const uint8_t * src) noexcept { + // + // Check for minus sign + // + bool negative = (*(src + 1) == '-'); + src += uint8_t(negative) + 1; + + // + // Parse the integer part. + // + uint64_t i = 0; + const uint8_t *p = src; + p += parse_digit(*p, i); + bool leading_zero = (i == 0); + while (parse_digit(*p, i)) { p++; } + // no integer digits, or 0123 (zero must be solo) + if ( p == src ) { return INCORRECT_TYPE; } + if ( (leading_zero && p != src+1)) { return NUMBER_ERROR; } + + // + // Parse the decimal part. + // + int64_t exponent = 0; + bool overflow; + if (simdjson_likely(*p == '.')) { + p++; + const uint8_t *start_decimal_digits = p; + if (!parse_digit(*p, i)) { return NUMBER_ERROR; } // no decimal digits + p++; + while (parse_digit(*p, i)) { p++; } + exponent = -(p - start_decimal_digits); + + // Overflow check. More than 19 digits (minus the decimal) may be overflow. + overflow = p-src-1 > 19; + if (simdjson_unlikely(overflow && leading_zero)) { + // Skip leading 0.00000 and see if it still overflows + const uint8_t *start_digits = src + 2; + while (*start_digits == '0') { start_digits++; } + overflow = start_digits-src > 19; + } + } else { + overflow = p-src > 19; + } + + // + // Parse the exponent + // + if (*p == 'e' || *p == 'E') { + p++; + bool exp_neg = *p == '-'; + p += exp_neg || *p == '+'; + + uint64_t exp = 0; + const uint8_t *start_exp_digits = p; + while (parse_digit(*p, exp)) { p++; } + // no exp digits, or 20+ exp digits + if (p-start_exp_digits == 0 || p-start_exp_digits > 19) { return NUMBER_ERROR; } + + exponent += exp_neg ? 0-exp : exp; + } + + if (*p != '"') { return NUMBER_ERROR; } + + overflow = overflow || exponent < simdjson::internal::smallest_power || exponent > simdjson::internal::largest_power; + + // + // Assemble (or slow-parse) the float + // + double d; + if (simdjson_likely(!overflow)) { + if (compute_float_64(exponent, i, negative, d)) { return d; } + } + if (!parse_float_fallback(src - uint8_t(negative), &d)) { + return NUMBER_ERROR; + } + return d; +} + +} // unnamed namespace +#endif // SIMDJSON_SKIPNUMBERPARSING + +} // namespace numberparsing + +inline std::ostream& operator<<(std::ostream& out, number_type type) noexcept { + switch (type) { + case number_type::signed_integer: out << "integer in [-9223372036854775808,9223372036854775808)"; break; + case number_type::unsigned_integer: out << "unsigned integer in [9223372036854775808,18446744073709551616)"; break; + case number_type::floating_point_number: out << "floating-point number (binary64)"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_NUMBERPARSING_H +/* end file simdjson/generic/numberparsing.h for westmere */ + +/* including simdjson/generic/implementation_simdjson_result_base-inl.h for westmere: #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* begin file simdjson/generic/implementation_simdjson_result_base-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { + +// +// internal::implementation_simdjson_result_base inline implementation +// + +template +simdjson_inline void implementation_simdjson_result_base::tie(T &value, error_code &error) && noexcept { + error = this->second; + if (!error) { + value = std::forward>(*this).first; + } +} + +template +simdjson_warn_unused simdjson_inline error_code implementation_simdjson_result_base::get(T &value) && noexcept { + error_code error; + std::forward>(*this).tie(value, error); + return error; +} + +template +simdjson_inline error_code implementation_simdjson_result_base::error() const noexcept { + return this->second; +} + +#if SIMDJSON_EXCEPTIONS + +template +simdjson_inline T& implementation_simdjson_result_base::value() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +template +simdjson_inline T&& implementation_simdjson_result_base::take_value() && noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::operator T&&() && noexcept(false) { + return std::forward>(*this).take_value(); +} + +#endif // SIMDJSON_EXCEPTIONS + +template +simdjson_inline const T& implementation_simdjson_result_base::value_unsafe() const& noexcept { + return this->first; +} + +template +simdjson_inline T& implementation_simdjson_result_base::value_unsafe() & noexcept { + return this->first; +} + +template +simdjson_inline T&& implementation_simdjson_result_base::value_unsafe() && noexcept { + return std::forward(this->first); +} + +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value, error_code error) noexcept + : first{std::forward(value)}, second{error} {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(error_code error) noexcept + : implementation_simdjson_result_base(T{}, error) {} +template +simdjson_inline implementation_simdjson_result_base::implementation_simdjson_result_base(T &&value) noexcept + : implementation_simdjson_result_base(std::forward(value), SUCCESS) {} + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_IMPLEMENTATION_SIMDJSON_RESULT_BASE_INL_H +/* end file simdjson/generic/implementation_simdjson_result_base-inl.h for westmere */ +/* end file simdjson/generic/amalgamated.h for westmere */ +/* including simdjson/westmere/end.h: #include "simdjson/westmere/end.h" */ +/* begin file simdjson/westmere/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_WESTMERE +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "westmere" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/westmere/end.h */ + +#endif // SIMDJSON_WESTMERE_H +/* end file simdjson/westmere.h */ +#else +#error Unknown SIMDJSON_BUILTIN_IMPLEMENTATION +#endif + +/* undefining SIMDJSON_CONDITIONAL_INCLUDE */ +#undef SIMDJSON_CONDITIONAL_INCLUDE + +#endif // SIMDJSON_BUILTIN_H +/* end file simdjson/builtin.h */ +/* skipped duplicate #include "simdjson/builtin/base.h" */ + +/* including simdjson/generic/ondemand/dependencies.h: #include "simdjson/generic/ondemand/dependencies.h" */ +/* begin file simdjson/generic/ondemand/dependencies.h */ +#ifdef SIMDJSON_CONDITIONAL_INCLUDE +#error simdjson/generic/ondemand/dependencies.h must be included before defining SIMDJSON_CONDITIONAL_INCLUDE! +#endif + +#ifndef SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H +#define SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H + +// Internal headers needed for ondemand generics. +// All includes not under simdjson/generic/ondemand must be here! +// Otherwise, amalgamation will fail. +/* skipped duplicate #include "simdjson/dom/base.h" // for MINIMAL_DOCUMENT_CAPACITY */ +/* skipped duplicate #include "simdjson/implementation.h" */ +/* skipped duplicate #include "simdjson/padded_string.h" */ +/* skipped duplicate #include "simdjson/padded_string_view.h" */ +/* skipped duplicate #include "simdjson/internal/dom_parser_implementation.h" */ + +#endif // SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H +/* end file simdjson/generic/ondemand/dependencies.h */ + +/* defining SIMDJSON_CONDITIONAL_INCLUDE */ +#define SIMDJSON_CONDITIONAL_INCLUDE + +#if SIMDJSON_BUILTIN_IMPLEMENTATION_IS(arm64) +/* including simdjson/arm64/ondemand.h: #include "simdjson/arm64/ondemand.h" */ +/* begin file simdjson/arm64/ondemand.h */ +#ifndef SIMDJSON_ARM64_ONDEMAND_H +#define SIMDJSON_ARM64_ONDEMAND_H + +/* including simdjson/arm64/begin.h: #include "simdjson/arm64/begin.h" */ +/* begin file simdjson/arm64/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "arm64" */ +#define SIMDJSON_IMPLEMENTATION arm64 +/* including simdjson/arm64/base.h: #include "simdjson/arm64/base.h" */ +/* begin file simdjson/arm64/base.h */ +#ifndef SIMDJSON_ARM64_BASE_H +#define SIMDJSON_ARM64_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Implementation for NEON (ARMv8). + */ +namespace arm64 { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_BASE_H +/* end file simdjson/arm64/base.h */ +/* including simdjson/arm64/intrinsics.h: #include "simdjson/arm64/intrinsics.h" */ +/* begin file simdjson/arm64/intrinsics.h */ +#ifndef SIMDJSON_ARM64_INTRINSICS_H +#define SIMDJSON_ARM64_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This should be the correct header whether +// you use visual studio or other compilers. +#include + +static_assert(sizeof(uint8x16_t) <= simdjson::SIMDJSON_PADDING, "insufficient padding for arm64"); + +#endif // SIMDJSON_ARM64_INTRINSICS_H +/* end file simdjson/arm64/intrinsics.h */ +/* including simdjson/arm64/bitmanipulation.h: #include "simdjson/arm64/bitmanipulation.h" */ +/* begin file simdjson/arm64/bitmanipulation.h */ +#ifndef SIMDJSON_ARM64_BITMANIPULATION_H +#define SIMDJSON_ARM64_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int count_ones(uint64_t input_num) { + return vaddv_u8(vcnt_u8(vcreate_u8(input_num))); +} + + +#if defined(__GNUC__) // catches clang and gcc +/** + * ARM has a fast 64-bit "bit reversal function" that is handy. However, + * it is not generally available as an intrinsic function under Visual + * Studio (though this might be changing). Even under clang/gcc, we + * apparently need to invoke inline assembly. + */ +/* + * We use SIMDJSON_PREFER_REVERSE_BITS as a hint that algorithms that + * work well with bit reversal may use it. + */ +#define SIMDJSON_PREFER_REVERSE_BITS 1 + +/* reverse the bits */ +simdjson_inline uint64_t reverse_bits(uint64_t input_num) { + uint64_t rev_bits; + __asm("rbit %0, %1" : "=r"(rev_bits) : "r"(input_num)); + return rev_bits; +} + +/** + * Flips bit at index 63 - lz. Thus if you have 'leading_zeroes' leading zeroes, + * then this will set to zero the leading bit. It is possible for leading_zeroes to be + * greating or equal to 63 in which case we trigger undefined behavior, but the output + * of such undefined behavior is never used. + **/ +SIMDJSON_NO_SANITIZE_UNDEFINED +simdjson_inline uint64_t zero_leading_bit(uint64_t rev_bits, int leading_zeroes) { + return rev_bits ^ (uint64_t(0x8000000000000000) >> leading_zeroes); +} + +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, uint64_t *result) { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + *result = value1 + value2; + return *result < value1; +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_BITMANIPULATION_H +/* end file simdjson/arm64/bitmanipulation.h */ +/* including simdjson/arm64/bitmask.h: #include "simdjson/arm64/bitmask.h" */ +/* begin file simdjson/arm64/bitmask.h */ +#ifndef SIMDJSON_ARM64_BITMASK_H +#define SIMDJSON_ARM64_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(uint64_t bitmask) { + ///////////// + // We could do this with PMULL, but it is apparently slow. + // + //#ifdef __ARM_FEATURE_CRYPTO // some ARM processors lack this extension + //return vmull_p64(-1ULL, bitmask); + //#else + // Analysis by @sebpop: + // When diffing the assembly for src/stage1_find_marks.cpp I see that the eors are all spread out + // in between other vector code, so effectively the extra cycles of the sequence do not matter + // because the GPR units are idle otherwise and the critical path is on the FP side. + // Also the PMULL requires two extra fmovs: GPR->FP (3 cycles in N1, 5 cycles in A72 ) + // and FP->GPR (2 cycles on N1 and 5 cycles on A72.) + /////////// + bitmask ^= bitmask << 1; + bitmask ^= bitmask << 2; + bitmask ^= bitmask << 4; + bitmask ^= bitmask << 8; + bitmask ^= bitmask << 16; + bitmask ^= bitmask << 32; + return bitmask; +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif +/* end file simdjson/arm64/bitmask.h */ +/* including simdjson/arm64/numberparsing_defs.h: #include "simdjson/arm64/numberparsing_defs.h" */ +/* begin file simdjson/arm64/numberparsing_defs.h */ +#ifndef SIMDJSON_ARM64_NUMBERPARSING_DEFS_H +#define SIMDJSON_ARM64_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#if _M_ARM64 +// __umulh requires intrin.h +#include +#endif // _M_ARM64 + +namespace simdjson { +namespace arm64 { +namespace numberparsing { + +// we don't have SSE, so let us use a scalar function +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + uint64_t val; + std::memcpy(&val, chars, sizeof(uint64_t)); + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace arm64 +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_ARM64_NUMBERPARSING_DEFS_H +/* end file simdjson/arm64/numberparsing_defs.h */ +/* including simdjson/arm64/simd.h: #include "simdjson/arm64/simd.h" */ +/* begin file simdjson/arm64/simd.h */ +#ifndef SIMDJSON_ARM64_SIMD_H +#define SIMDJSON_ARM64_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { +namespace simd { + +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO +namespace { +// Start of private section with Visual Studio workaround + + +#ifndef simdjson_make_uint8x16_t +#define simdjson_make_uint8x16_t(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, \ + x13, x14, x15, x16) \ + ([=]() { \ + uint8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8, \ + x9, x10, x11, x12, x13, x14, x15, x16}; \ + return vld1q_u8(array); \ + }()) +#endif +#ifndef simdjson_make_int8x16_t +#define simdjson_make_int8x16_t(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, \ + x13, x14, x15, x16) \ + ([=]() { \ + int8_t array[16] = {x1, x2, x3, x4, x5, x6, x7, x8, \ + x9, x10, x11, x12, x13, x14, x15, x16}; \ + return vld1q_s8(array); \ + }()) +#endif + +#ifndef simdjson_make_uint8x8_t +#define simdjson_make_uint8x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + uint8_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1_u8(array); \ + }()) +#endif +#ifndef simdjson_make_int8x8_t +#define simdjson_make_int8x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + int8_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1_s8(array); \ + }()) +#endif +#ifndef simdjson_make_uint16x8_t +#define simdjson_make_uint16x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + uint16_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1q_u16(array); \ + }()) +#endif +#ifndef simdjson_make_int16x8_t +#define simdjson_make_int16x8_t(x1, x2, x3, x4, x5, x6, x7, x8) \ + ([=]() { \ + int16_t array[8] = {x1, x2, x3, x4, x5, x6, x7, x8}; \ + return vld1q_s16(array); \ + }()) +#endif + +// End of private section with Visual Studio workaround +} // namespace +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO + + + template + struct simd8; + + // + // Base class of simd8 and simd8, both of which use uint8x16_t internally. + // + template> + struct base_u8 { + uint8x16_t value; + static const int SIZE = sizeof(value); + + // Conversion from/to SIMD register + simdjson_inline base_u8(const uint8x16_t _value) : value(_value) {} + simdjson_inline operator const uint8x16_t&() const { return this->value; } + simdjson_inline operator uint8x16_t&() { return this->value; } + + // Bit operations + simdjson_inline simd8 operator|(const simd8 other) const { return vorrq_u8(*this, other); } + simdjson_inline simd8 operator&(const simd8 other) const { return vandq_u8(*this, other); } + simdjson_inline simd8 operator^(const simd8 other) const { return veorq_u8(*this, other); } + simdjson_inline simd8 bit_andnot(const simd8 other) const { return vbicq_u8(*this, other); } + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + simdjson_inline simd8& operator|=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline simd8& operator&=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline simd8& operator^=(const simd8 other) { auto this_cast = static_cast*>(this); *this_cast = *this_cast ^ other; return *this_cast; } + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return vceqq_u8(lhs, rhs); } + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return vextq_u8(prev_chunk, *this, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base_u8 { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + static simdjson_inline simd8 splat(bool _value) { return vmovq_n_u8(uint8_t(-(!!_value))); } + + simdjson_inline simd8(const uint8x16_t _value) : base_u8(_value) {} + // False constructor + simdjson_inline simd8() : simd8(vdupq_n_u8(0)) {} + // Splat constructor + simdjson_inline simd8(bool _value) : simd8(splat(_value)) {} + + // We return uint32_t instead of uint16_t because that seems to be more efficient for most + // purposes (cutting it down to uint16_t costs performance in some compilers). + simdjson_inline uint32_t to_bitmask() const { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + const uint8x16_t bit_mask = simdjson_make_uint8x16_t(0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80); +#else + const uint8x16_t bit_mask = {0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80}; +#endif + auto minput = *this & bit_mask; + uint8x16_t tmp = vpaddq_u8(minput, minput); + tmp = vpaddq_u8(tmp, tmp); + tmp = vpaddq_u8(tmp, tmp); + return vgetq_lane_u16(vreinterpretq_u16_u8(tmp), 0); + } + simdjson_inline bool any() const { return vmaxvq_u8(*this) != 0; } + }; + + // Unsigned bytes + template<> + struct simd8: base_u8 { + static simdjson_inline uint8x16_t splat(uint8_t _value) { return vmovq_n_u8(_value); } + static simdjson_inline uint8x16_t zero() { return vdupq_n_u8(0); } + static simdjson_inline uint8x16_t load(const uint8_t* values) { return vld1q_u8(values); } + + simdjson_inline simd8(const uint8x16_t _value) : base_u8(_value) {} + // Zero constructor + simdjson_inline simd8() : simd8(zero()) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[16]) : simd8(load(values)) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Member-by-member initialization +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(simdjson_make_uint8x16_t( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} +#else + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(uint8x16_t{ + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + }) {} +#endif + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Store to array + simdjson_inline void store(uint8_t dst[16]) const { return vst1q_u8(dst, *this); } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return vqaddq_u8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return vqsubq_u8(*this, other); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return vaddq_u8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return vsubq_u8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *this; } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *this; } + + // Order-specific operations + simdjson_inline uint8_t max_val() const { return vmaxvq_u8(*this); } + simdjson_inline uint8_t min_val() const { return vminvq_u8(*this); } + simdjson_inline simd8 max_val(const simd8 other) const { return vmaxq_u8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return vminq_u8(*this, other); } + simdjson_inline simd8 operator<=(const simd8 other) const { return vcleq_u8(*this, other); } + simdjson_inline simd8 operator>=(const simd8 other) const { return vcgeq_u8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return vcltq_u8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return vcgtq_u8(*this, other); } + // Same as >, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's. + simdjson_inline simd8 gt_bits(const simd8 other) const { return simd8(*this > other); } + // Same as <, but instead of guaranteeing all 1's == true, false = 0 and true = nonzero. For ARM, returns all 1's. + simdjson_inline simd8 lt_bits(const simd8 other) const { return simd8(*this < other); } + + // Bit-specific operations + simdjson_inline simd8 any_bits_set(simd8 bits) const { return vtstq_u8(*this, bits); } + simdjson_inline bool any_bits_set_anywhere() const { return this->max_val() != 0; } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return (*this & bits).any_bits_set_anywhere(); } + template + simdjson_inline simd8 shr() const { return vshrq_n_u8(*this, N); } + template + simdjson_inline simd8 shl() const { return vshlq_n_u8(*this, N); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return lookup_table.apply_lookup_16_to(*this); + } + + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint16_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + uint64x2_t shufmask64 = {thintable_epi8[mask1], thintable_epi8[mask2]}; + uint8x16_t shufmask = vreinterpretq_u8_u64(shufmask64); + // we increment by 0x08 the second half of the mask +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + uint8x16_t inc = simdjson_make_uint8x16_t(0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08); +#else + uint8x16_t inc = {0, 0, 0, 0, 0, 0, 0, 0, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}; +#endif + shufmask = vaddq_u8(shufmask, inc); + // this is the version "nearly pruned" + uint8x16_t pruned = vqtbl1q_u8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + uint8x16_t compactmask = vld1q_u8(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + uint8x16_t answer = vqtbl1q_u8(pruned, compactmask); + vst1q_u8(reinterpret_cast(output), answer); + } + + // Copies all bytes corresponding to a 0 in the low half of the mask (interpreted as a + // bitset) to output1, then those corresponding to a 0 in the high half to output2. + template + simdjson_inline void compress_halves(uint16_t mask, L *output1, L *output2) const { + using internal::thintable_epi8; + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + uint8x8_t compactmask1 = vcreate_u8(thintable_epi8[mask1]); + uint8x8_t compactmask2 = vcreate_u8(thintable_epi8[mask2]); + // we increment by 0x08 the second half of the mask +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + uint8x8_t inc = simdjson_make_uint8x8_t(0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08); +#else + uint8x8_t inc = {0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08, 0x08}; +#endif + compactmask2 = vadd_u8(compactmask2, inc); + // store each result (with the second store possibly overlapping the first) + vst1_u8((uint8_t*)output1, vqtbl1_u8(*this, compactmask1)); + vst1_u8((uint8_t*)output2, vqtbl1_u8(*this, compactmask2)); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + + template + simdjson_inline simd8 apply_lookup_16_to(const simd8 original) { + return vqtbl1q_u8(*this, simd8(original)); + } + }; + + // Signed bytes + template<> + struct simd8 { + int8x16_t value; + + static simdjson_inline simd8 splat(int8_t _value) { return vmovq_n_s8(_value); } + static simdjson_inline simd8 zero() { return vdupq_n_s8(0); } + static simdjson_inline simd8 load(const int8_t values[16]) { return vld1q_s8(values); } + + // Conversion from/to SIMD register + simdjson_inline simd8(const int8x16_t _value) : value{_value} {} + simdjson_inline operator const int8x16_t&() const { return this->value; } + simdjson_inline operator int8x16_t&() { return this->value; } + + // Zero constructor + simdjson_inline simd8() : simd8(zero()) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(simdjson_make_int8x16_t( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} +#else + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(int8x16_t{ + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + }) {} +#endif + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Store to array + simdjson_inline void store(int8_t dst[16]) const { return vst1q_s8(dst, *this); } + + // Explicit conversion to/from unsigned + // + // Under Visual Studio/ARM64 uint8x16_t and int8x16_t are apparently the same type. + // In theory, we could check this occurrence with std::same_as and std::enabled_if but it is C++14 + // and relatively ugly and hard to read. +#ifndef SIMDJSON_REGULAR_VISUAL_STUDIO + simdjson_inline explicit simd8(const uint8x16_t other): simd8(vreinterpretq_s8_u8(other)) {} +#endif + simdjson_inline explicit operator simd8() const { return vreinterpretq_u8_s8(this->value); } + + // Math + simdjson_inline simd8 operator+(const simd8 other) const { return vaddq_s8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return vsubq_s8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *this; } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *this; } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return vmaxq_s8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return vminq_s8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return vcgtq_s8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return vcltq_s8(*this, other); } + simdjson_inline simd8 operator==(const simd8 other) const { return vceqq_s8(*this, other); } + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return vextq_s8(prev_chunk, *this, 16 - N); + } + + // Perform a lookup assuming no value is larger than 16 + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return lookup_table.apply_lookup_16_to(*this); + } + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + + template + simdjson_inline simd8 apply_lookup_16_to(const simd8 original) { + return vqtbl1q_s8(*this, simd8(original)); + } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "ARM kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + uint64_t popcounts = vget_lane_u64(vreinterpret_u64_u8(vcnt_u8(vcreate_u8(~mask))), 0); + // compute the prefix sum of the popcounts of each byte + uint64_t offsets = popcounts * 0x0101010101010101; + this->chunks[0].compress_halves(uint16_t(mask), output, &output[popcounts & 0xFF]); + this->chunks[1].compress_halves(uint16_t(mask >> 16), &output[(offsets >> 8) & 0xFF], &output[(offsets >> 16) & 0xFF]); + this->chunks[2].compress_halves(uint16_t(mask >> 32), &output[(offsets >> 24) & 0xFF], &output[(offsets >> 32) & 0xFF]); + this->chunks[3].compress_halves(uint16_t(mask >> 48), &output[(offsets >> 40) & 0xFF], &output[(offsets >> 48) & 0xFF]); + return offsets >> 56; + } + + simdjson_inline uint64_t to_bitmask() const { +#ifdef SIMDJSON_REGULAR_VISUAL_STUDIO + const uint8x16_t bit_mask = simdjson_make_uint8x16_t( + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 + ); +#else + const uint8x16_t bit_mask = { + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80, + 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80 + }; +#endif + // Add each of the elements next to each other, successively, to stuff each 8 byte mask into one. + uint8x16_t sum0 = vpaddq_u8(this->chunks[0] & bit_mask, this->chunks[1] & bit_mask); + uint8x16_t sum1 = vpaddq_u8(this->chunks[2] & bit_mask, this->chunks[3] & bit_mask); + sum0 = vpaddq_u8(sum0, sum1); + sum0 = vpaddq_u8(sum0, sum0); + return vgetq_lane_u64(vreinterpretq_u64_u8(sum0), 0); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_SIMD_H +/* end file simdjson/arm64/simd.h */ +/* including simdjson/arm64/stringparsing_defs.h: #include "simdjson/arm64/stringparsing_defs.h" */ +/* begin file simdjson/arm64/stringparsing_defs.h */ +#ifndef SIMDJSON_ARM64_STRINGPARSING_DEFS_H +#define SIMDJSON_ARM64_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + sizeof(v0)); + v0.store(dst); + v1.store(dst + sizeof(v0)); + + // Getting a 64-bit bitmask is much cheaper than multiple 16-bit bitmasks on ARM; therefore, we + // smash them together into a 64-byte mask and get the bitmask from there. + uint64_t bs_and_quote = simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_ARM64_STRINGPARSING_DEFS_H +/* end file simdjson/arm64/stringparsing_defs.h */ + +#define SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT 1 +/* end file simdjson/arm64/begin.h */ +/* including simdjson/generic/ondemand/amalgamated.h for arm64: #include "simdjson/generic/ondemand/amalgamated.h" */ +/* begin file simdjson/generic/ondemand/amalgamated.h for arm64 */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H) +#error simdjson/generic/ondemand/dependencies.h must be included before simdjson/generic/ondemand/amalgamated.h! +#endif + +// Stuff other things depend on +/* including simdjson/generic/ondemand/base.h for arm64: #include "simdjson/generic/ondemand/base.h" */ +/* begin file simdjson/generic/ondemand/base.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +/** + * A fast, simple, DOM-like interface that parses JSON as you use it. + * + * Designed for maximum speed and a lower memory profile. + */ +namespace ondemand { + +/** Represents the depth of a JSON value (number of nested arrays/objects). */ +using depth_t = int32_t; + +/** @copydoc simdjson::arm64::number_type */ +using number_type = simdjson::arm64::number_type; + +/** @private Position in the JSON buffer indexes */ +using token_position = const uint32_t *; + +class array; +class array_iterator; +class document; +class document_reference; +class document_stream; +class field; +class json_iterator; +enum class json_type; +struct number; +class object; +class object_iterator; +class parser; +class raw_json_string; +class token_iterator; +class value; +class value_iterator; + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_BASE_H +/* end file simdjson/generic/ondemand/base.h for arm64 */ +/* including simdjson/generic/ondemand/value_iterator.h for arm64: #include "simdjson/generic/ondemand/value_iterator.h" */ +/* begin file simdjson/generic/ondemand/value_iterator.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * Iterates through a single JSON value at a particular depth. + * + * Does not keep track of the type of value: provides methods for objects, arrays and scalars and expects + * the caller to call the right ones. + * + * @private This is not intended for external use. + */ +class value_iterator { +protected: + /** The underlying JSON iterator */ + json_iterator *_json_iter{}; + /** The depth of this value */ + depth_t _depth{}; + /** + * The starting token index for this value + */ + token_position _start_position{}; + +public: + simdjson_inline value_iterator() noexcept = default; + + /** + * Denote that we're starting a document. + */ + simdjson_inline void start_document() noexcept; + + /** + * Skips a non-iterated or partially-iterated JSON value, whether it is a scalar, array or object. + * + * Optimized for scalars. + */ + simdjson_warn_unused simdjson_inline error_code skip_child() noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is at the start of the value + */ + simdjson_inline bool at_start() const noexcept; + + /** + * Tell whether the value is open--if the value has not been used, or the array/object is still open. + */ + simdjson_inline bool is_open() const noexcept; + + /** + * Tell whether the value is at an object's first field (just after the {). + */ + simdjson_inline bool at_first_field() const noexcept; + + /** + * Abandon all iteration. + */ + simdjson_inline void abandon() noexcept; + + /** + * Get the child value as a value_iterator. + */ + simdjson_inline value_iterator child_value() const noexcept; + + /** + * Get the depth of this value. + */ + simdjson_inline int32_t depth() const noexcept; + + /** + * Get the JSON type of this value. + * + * @error TAPE_ERROR when the JSON value is a bad token like "}" "," or "alse". + */ + simdjson_inline simdjson_result type() const noexcept; + + /** + * @addtogroup object Object iteration + * + * Methods to iterate and find object fields. These methods generally *assume* the value is + * actually an object; the caller is responsible for keeping track of that fact. + * + * @{ + */ + + /** + * Start an object iteration. + * + * @returns Whether the object had any fields (returns false for empty). + * @error INCORRECT_TYPE if there is no opening { + */ + simdjson_warn_unused simdjson_inline simdjson_result start_object() noexcept; + /** + * Start an object iteration from the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_object() noexcept; + /** + * Checks whether an object could be started from the root. May be called by start_root_object. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_object() noexcept; + /** + * Start an object iteration after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_object() noexcept; + /** + * Start an object iteration from the root, after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_object() noexcept; + + /** + * Moves to the next field in an object. + * + * Looks for , and }. If } is found, the object is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_field() noexcept; + + /** + * Get the current field's key. + */ + simdjson_warn_unused simdjson_inline simdjson_result field_key() noexcept; + + /** + * Pass the : in the field and move to its value. + */ + simdjson_warn_unused simdjson_inline error_code field_value() noexcept; + + /** + * Find the next field with the given key. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline error_code find_field(const std::string_view key) noexcept; + + /** + * Find the next field with the given key, *without* unescaping. This assumes object order: it + * will not find the field if it was already passed when looking for some *other* field. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_raw(const std::string_view key) noexcept; + + /** + * Find the field with the given key without regard to order, and *without* unescaping. + * + * This is an unordered object lookup: if the field is not found initially, it will cycle around and scan from the beginning. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_unordered_raw(const std::string_view key) noexcept; + + /** @} */ + + /** + * @addtogroup array Array iteration + * Methods to iterate over array elements. These methods generally *assume* the value is actually + * an object; the caller is responsible for keeping track of that fact. + * @{ + */ + + /** + * Check for an opening [ and start an array iteration. + * + * @returns Whether the array had any elements (returns false for empty). + * @error INCORRECT_TYPE If there is no [. + */ + simdjson_warn_unused simdjson_inline simdjson_result start_array() noexcept; + /** + * Check for an opening [ and start an array iteration while at the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_array() noexcept; + /** + * Checks whether an array could be started from the root. May be called by start_root_array. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_array() noexcept; + /** + * Start an array iteration, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_array() noexcept; + /** + * Start an array iteration from the root, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_array() noexcept; + + /** + * Moves to the next element in an array. + * + * Looks for , and ]. If ] is found, the array is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return Whether there is another element in the array. + * @error TAPE_ERROR If there is a comma missing between elements. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_element() noexcept; + + /** + * Get a child value iterator. + */ + simdjson_warn_unused simdjson_inline value_iterator child() const noexcept; + + /** @} */ + + /** + * @defgroup scalar Scalar values + * @addtogroup scalar + * @{ + */ + + simdjson_warn_unused simdjson_inline simdjson_result get_string(bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_bool() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_null() noexcept; + simdjson_warn_unused simdjson_inline bool is_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_integer() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + simdjson_warn_unused simdjson_inline simdjson_result get_root_string(bool check_trailing, bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_wobbly_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_raw_json_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_bool(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline bool is_root_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_integer(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number_type(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_null(bool check_trailing) noexcept; + + simdjson_inline error_code error() const noexcept; + simdjson_inline uint8_t *&string_buf_loc() noexcept; + simdjson_inline const json_iterator &json_iter() const noexcept; + simdjson_inline json_iterator &json_iter() noexcept; + + simdjson_inline void assert_is_valid() const noexcept; + simdjson_inline bool is_valid() const noexcept; + + /** @} */ +protected: + /** + * Restarts an array iteration. + * @returns Whether the array has any elements (returns false for empty). + */ + simdjson_inline simdjson_result reset_array() noexcept; + /** + * Restarts an object iteration. + * @returns Whether the object has any fields (returns false for empty). + */ + simdjson_inline simdjson_result reset_object() noexcept; + /** + * move_at_start(): moves us so that we are pointing at the beginning of + * the container. It updates the index so that at_start() is true and it + * syncs the depth. The user can then create a new container instance. + * + * Usage: used with value::count_elements(). + **/ + simdjson_inline void move_at_start() noexcept; + + /** + * move_at_container_start(): moves us so that we are pointing at the beginning of + * the container so that assert_at_container_start() passes. + * + * Usage: used with reset_array() and reset_object(). + **/ + simdjson_inline void move_at_container_start() noexcept; + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + simdjson_inline value_iterator(json_iterator *json_iter, depth_t depth, token_position start_index) noexcept; + + simdjson_inline simdjson_result parse_null(const uint8_t *json) const noexcept; + simdjson_inline simdjson_result parse_bool(const uint8_t *json) const noexcept; + simdjson_inline const uint8_t *peek_start() const noexcept; + simdjson_inline uint32_t peek_start_length() const noexcept; + + /** + * The general idea of the advance_... methods and the peek_* methods + * is that you first peek and check that you have desired type. If you do, + * and only if you do, then you advance. + * + * We used to unconditionally advance. But this made reasoning about our + * current state difficult. + * Suppose you always advance. Look at the 'value' matching the key + * "shadowable" in the following example... + * + * ({"globals":{"a":{"shadowable":[}}}}) + * + * If the user thinks it is a Boolean and asks for it, then we check the '[', + * decide it is not a Boolean, but still move into the next character ('}'). Now + * we are left pointing at '}' right after a '['. And we have not yet reported + * an error, only that we do not have a Boolean. + * + * If, instead, you just stand your ground until it is content that you know, then + * you will only even move beyond the '[' if the user tells you that you have an + * array. So you will be at the '}' character inside the array and, hopefully, you + * will then catch the error because an array cannot start with '}', but the code + * processing Boolean values does not know this. + * + * So the contract is: first call 'peek_...' and then call 'advance_...' only + * if you have determined that it is a type you can handle. + * + * Unfortunately, it makes the code more verbose, longer and maybe more error prone. + */ + + simdjson_inline void advance_scalar(const char *type) noexcept; + simdjson_inline void advance_root_scalar(const char *type) noexcept; + simdjson_inline void advance_non_root_scalar(const char *type) noexcept; + + simdjson_inline const uint8_t *peek_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_root_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_non_root_scalar(const char *type) noexcept; + + + simdjson_inline error_code start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept; + simdjson_inline error_code end_container() noexcept; + + /** + * Advance to a place expecting a value (increasing depth). + * + * @return The current token (the one left behind). + * @error TAPE_ERROR If the document ended early. + */ + simdjson_inline simdjson_result advance_to_value() noexcept; + + simdjson_inline error_code incorrect_type_error(const char *message) const noexcept; + simdjson_inline error_code error_unless_more_tokens(uint32_t tokens=1) const noexcept; + + simdjson_inline bool is_at_start() const noexcept; + /** + * is_at_iterator_start() returns true on an array or object after it has just been + * created, whether the instance is empty or not. + * + * Usage: used by array::begin() in debug mode (SIMDJSON_DEVELOPMENT_CHECKS) + */ + simdjson_inline bool is_at_iterator_start() const noexcept; + + /** + * Assuming that we are within an object, this returns true if we + * are pointing at a key. + * + * Usage: the skip_child() method should never be used while we are pointing + * at a key inside an object. + */ + simdjson_inline bool is_at_key() const noexcept; + + inline void assert_at_start() const noexcept; + inline void assert_at_container_start() const noexcept; + inline void assert_at_root() const noexcept; + inline void assert_at_child() const noexcept; + inline void assert_at_next() const noexcept; + inline void assert_at_non_root_start() const noexcept; + + /** Get the starting position of this value */ + simdjson_inline token_position start_position() const noexcept; + + /** @copydoc error_code json_iterator::position() const noexcept; */ + simdjson_inline token_position position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position last_position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position end_position() const noexcept; + /** @copydoc error_code json_iterator::report_error(error_code error, const char *message) noexcept; */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + friend class document; + friend class object; + friend class array; + friend class value; +}; // value_iterator + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::value_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H +/* end file simdjson/generic/ondemand/value_iterator.h for arm64 */ +/* including simdjson/generic/ondemand/value.h for arm64: #include "simdjson/generic/ondemand/value.h" */ +/* begin file simdjson/generic/ondemand/value.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * 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. + */ +class value { +public: + /** + * Create a new invalid value. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline value() noexcept = default; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) noexcept; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() noexcept; + + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() noexcept; + + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + + /** + * Cast this JSON value (inside string) to a unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + + /** + * Cast this JSON value to a "wobbly" string. + * + * The string is may not be a valid UTF-8 string. + * See https://simonsapin.github.io/wtf-8/ + * + * Important: a value should be consumed once. Calling get_wobbly_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * @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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); +#endif + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + * + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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). + * + * @return 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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the value is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the value is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the value is an integer number. 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). + * + * 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. However, if this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view is guaranteed to be + * a non-space token. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + * + * See also value::raw_json(). + */ + simdjson_inline std::string_view raw_json_token() noexcept; + + /** + * Get a string_view pointing at this value in the JSON document. + * If this element is an array or an object, it consumes the array or the object + * and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + * If this element is a scalar (string, number, Boolean, null), it returns what + * raw_json_token() would return. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + simdjson_inline simdjson_result current_location() noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. + * + * Calling at_pointer() on non-document instances (e.g., arrays and objects) is not + * standardized (by RFC 6901). We provide some experimental support for JSON pointers + * on non-document instances. Yet it is not the case when calling at_pointer on an array + * or an object instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + +protected: + /** + * Create a value. + */ + simdjson_inline value(const value_iterator &iter) noexcept; + + /** + * Skip this value, allowing iteration to continue. + */ + simdjson_inline void skip() noexcept; + + /** + * Start a value at the current position. + * + * (It should already be started; this is just a self-documentation method.) + */ + static simdjson_inline value start(const value_iterator &iter) noexcept; + + /** + * Resume a value. + */ + static simdjson_inline value resume(const value_iterator &iter) noexcept; + + /** + * Get the object, starting or resuming it as necessary + */ + simdjson_inline simdjson_result start_or_resume_object() noexcept; + + // simdjson_inline void log_value(const char *type) const noexcept; + // simdjson_inline void log_error(const char *message) const noexcept; + + value_iterator iter{}; + + friend class document; + friend class array_iterator; + friend class field; + friend class object; + friend struct simdjson_result; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::value &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result get_array() noexcept; + simdjson_inline simdjson_result get_object() noexcept; + + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() noexcept; + + template simdjson_inline error_code get(T &out) noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator arm64::ondemand::array() noexcept(false); + simdjson_inline operator arm64::ondemand::object() noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator arm64::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * 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). + */ + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + + /** @copydoc simdjson_inline std::string_view value::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + + /** @copydoc simdjson_inline simdjson_result current_location() noexcept */ + simdjson_inline simdjson_result current_location() noexcept; + /** @copydoc simdjson_inline int32_t current_depth() const noexcept */ + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_H +/* end file simdjson/generic/ondemand/value.h for arm64 */ +/* including simdjson/generic/ondemand/logger.h for arm64: #include "simdjson/generic/ondemand/logger.h" */ +/* begin file simdjson/generic/ondemand/logger.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +// Logging should be free unless SIMDJSON_VERBOSE_LOGGING is set. Importantly, it is critical +// that the call to the log functions be side-effect free. Thus, for example, you should not +// create temporary std::string instances. +namespace logger { + +enum class log_level : int32_t { + info = 0, + error = 1 +}; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + +// We do not want these functions to be 'really inlined' since real inlining is +// for performance purposes and if you are using the loggers, you do not care about +// performance (or should not). +static inline void log_headers() noexcept; +// If args are provided, title will be treated as format string +template +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; +template +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; +static inline void log_event(const json_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_value(const json_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_start_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; + +static inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail="") noexcept; +static inline void log_error(const json_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +static inline void log_event(const value_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const value_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_error(const value_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +} // namespace logger +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_H +/* end file simdjson/generic/ondemand/logger.h for arm64 */ +/* including simdjson/generic/ondemand/token_iterator.h for arm64: #include "simdjson/generic/ondemand/token_iterator.h" */ +/* begin file simdjson/generic/ondemand/token_iterator.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * Iterates through JSON tokens (`{` `}` `[` `]` `,` `:` `""` `123` `true` `false` `null`) + * detected by stage 1. + * + * @private This is not intended for external use. + */ +class token_iterator { +public: + /** + * Create a new invalid token_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline token_iterator() noexcept = default; + simdjson_inline token_iterator(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator &operator=(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator(const token_iterator &other) noexcept = default; + simdjson_inline token_iterator &operator=(const token_iterator &other) noexcept = default; + + /** + * Advance to the next token (returning the current one). + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + /** + * Reports the current offset in bytes from the start of the underlying buffer. + */ + simdjson_inline uint32_t current_offset() const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + + /** + * Return the current index. + */ + simdjson_inline token_position position() const noexcept; + /** + * Reset to a previously saved index. + */ + simdjson_inline void set_position(token_position target_position) noexcept; + + // NOTE: we don't support a full C++ iterator interface, because we expect people to make + // different calls to advance the iterator based on *their own* state. + + simdjson_inline bool operator==(const token_iterator &other) const noexcept; + simdjson_inline bool operator!=(const token_iterator &other) const noexcept; + simdjson_inline bool operator>(const token_iterator &other) const noexcept; + simdjson_inline bool operator>=(const token_iterator &other) const noexcept; + simdjson_inline bool operator<(const token_iterator &other) const noexcept; + simdjson_inline bool operator<=(const token_iterator &other) const noexcept; + +protected: + simdjson_inline token_iterator(const uint8_t *buf, token_position position) noexcept; + + /** + * Get the index of the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_index(int32_t delta=0) const noexcept; + /** + * Get the index of the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline uint32_t peek_index(token_position position) const noexcept; + + const uint8_t *buf{}; + token_position _position{}; + + friend class json_iterator; + friend class value_iterator; + friend class object; + template + 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; + template + 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; +}; + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::token_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H +/* end file simdjson/generic/ondemand/token_iterator.h for arm64 */ +/* including simdjson/generic/ondemand/json_iterator.h for arm64: #include "simdjson/generic/ondemand/json_iterator.h" */ +/* begin file simdjson/generic/ondemand/json_iterator.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * Iterates through JSON tokens, keeping track of depth and string buffer. + * + * @private This is not intended for external use. + */ +class json_iterator { +protected: + token_iterator token{}; + ondemand::parser *parser{}; + /** + * Next free location in the string buffer. + * + * Used by raw_json_string::unescape() to have a place to unescape strings to. + */ + uint8_t *_string_buf_loc{}; + /** + * JSON error, if there is one. + * + * INCORRECT_TYPE and NO_SUCH_FIELD are *not* stored here, ever. + * + * PERF NOTE: we *hope* this will be elided into control flow, as it is only used (a) in the first + * iteration of the loop, or (b) for the final iteration after a missing comma is found in ++. If + * this is not elided, we should make sure it's at least not using up a register. Failing that, + * we should store it in document so there's only one of them. + */ + error_code error{SUCCESS}; + /** + * Depth of the current token in the JSON. + * + * - 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. + */ + depth_t _depth{}; + /** + * Beginning of the document indexes. + * Normally we have root == parser->implementation->structural_indexes.get() + * but this may differ, especially in streaming mode (where we have several + * documents); + */ + token_position _root{}; + /** + * Normally, a json_iterator operates over a single document, but in + * some cases, we may have a stream of documents. This attribute is meant + * as meta-data: the json_iterator works the same irrespective of the + * value of this attribute. + */ + bool _streaming{false}; + +public: + simdjson_inline json_iterator() noexcept = default; + simdjson_inline json_iterator(json_iterator &&other) noexcept; + simdjson_inline json_iterator &operator=(json_iterator &&other) noexcept; + simdjson_inline explicit json_iterator(const json_iterator &other) noexcept = default; + simdjson_inline json_iterator &operator=(const json_iterator &other) noexcept = default; + /** + * Skips a JSON value, whether it is a scalar, array or object. + */ + simdjson_warn_unused simdjson_inline error_code skip_child(depth_t parent_depth) noexcept; + + /** + * Tell whether the iterator is still at the start + */ + simdjson_inline bool at_root() const noexcept; + + /** + * Tell whether we should be expected to run in streaming + * mode (iterating over many documents). It is pure metadata + * that does not affect how the iterator works. It is used by + * start_root_array() and start_root_object(). + */ + simdjson_inline bool streaming() const noexcept; + + /** + * Get the root value iterator + */ + simdjson_inline token_position root_position() const noexcept; + /** + * Assert that we are at the document depth (== 1) + */ + simdjson_inline void assert_at_document_depth() const noexcept; + /** + * Assert that we are at the root of the document + */ + simdjson_inline void assert_at_root() const noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is live (has not been moved). + */ + simdjson_inline bool is_alive() const noexcept; + + /** + * Abandon this iterator, setting depth to 0 (as if the document is finished). + */ + simdjson_inline void abandon() noexcept; + + /** + * Advance the current token without modifying depth. + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + + /** + * Returns true if there is a single token in the index (i.e., it is + * a JSON with a scalar value such as a single number). + * + * @return whether there is a single token + */ + simdjson_inline bool is_single_token() const noexcept; + + /** + * Assert that there are at least the given number of tokens left. + * + * Has no effect in release builds. + */ + simdjson_inline void assert_more_tokens(uint32_t required_tokens=1) const noexcept; + /** + * Assert that the given position addresses an actual token (is within bounds). + * + * Has no effect in release builds. + */ + simdjson_inline void assert_valid_position(token_position position) const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + /** + * Get a pointer to the current location in the input buffer. + * + * This is not null-terminated; it is a view into the JSON. + * + * You may be pointing outside of the input buffer: it is not generally + * safe to dereference this pointer. + */ + simdjson_inline const uint8_t *unsafe_pointer() const noexcept; + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token to retrieve. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token to retrieve. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + /** + * Get the JSON text for the last token in the document. + * + * This is not null-terminated; it is a view into the JSON. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek_last() const noexcept; + + /** + * Ascend one level. + * + * Validates that the depth - 1 == parent_depth. + * + * @param parent_depth the expected parent depth. + */ + simdjson_inline void ascend_to(depth_t parent_depth) noexcept; + + /** + * Descend one level. + * + * Validates that the new depth == child_depth. + * + * @param child_depth the expected child depth. + */ + simdjson_inline void descend_to(depth_t child_depth) noexcept; + simdjson_inline void descend_to(depth_t child_depth, int32_t delta) noexcept; + + /** + * Get current depth. + */ + simdjson_inline depth_t depth() const noexcept; + + /** + * Get current (writeable) location in the string buffer. + */ + simdjson_inline uint8_t *&string_buf_loc() noexcept; + + /** + * Report an unrecoverable error, preventing further iteration. + * + * @param error The error to report. Must not be SUCCESS, UNINITIALIZED, INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + /** + * Log error, but don't stop iteration. + * @param error The error to report. Must be INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code optional_error(error_code error, const char *message) noexcept; + + /** + * Take an input in json containing max_len characters and attempt to copy it over to tmpbuf, a buffer with + * N bytes of capacity. It will return false if N is too small (smaller than max_len) of if it is zero. + * The buffer (tmpbuf) is padded with space characters. + */ + simdjson_warn_unused simdjson_inline bool copy_to_buffer(const uint8_t *json, uint32_t max_len, uint8_t *tmpbuf, size_t N) noexcept; + + simdjson_inline token_position position() const noexcept; + /** + * Write the raw_json_string to the string buffer and return a string_view. + * Each raw_json_string should be unescaped once, or else the string buffer might + * overflow. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, bool allow_replacement) noexcept; + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in) noexcept; + + simdjson_inline void reenter_child(token_position position, depth_t child_depth) noexcept; + + simdjson_inline error_code consume_character(char c) noexcept; +#if SIMDJSON_DEVELOPMENT_CHECKS + simdjson_inline token_position start_position(depth_t depth) const noexcept; + simdjson_inline void set_start_position(depth_t depth, token_position position) noexcept; +#endif + + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Updates this json iterator so that it is back at the beginning of the document, + * as if it had just been created. + */ + inline void rewind() noexcept; + /** + * This checks whether the {,},[,] are balanced so that the document + * ends with proper zero depth. This requires scanning the whole document + * and it may be expensive. It is expected that it will be rarely called. + * It does not attempt to match { with } and [ with ]. + */ + inline bool balanced() const noexcept; +protected: + simdjson_inline json_iterator(const uint8_t *buf, ondemand::parser *parser) noexcept; + /// The last token before the end + simdjson_inline token_position last_position() const noexcept; + /// The token *at* the end. This points at gibberish and should only be used for comparison. + simdjson_inline token_position end_position() const noexcept; + /// The end of the buffer. + simdjson_inline token_position end() const noexcept; + + friend class document; + friend class document_stream; + friend class object; + friend class array; + friend class value; + friend class raw_json_string; + friend class parser; + friend class value_iterator; + template + 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; + template + 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; +}; // json_iterator + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::json_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H +/* end file simdjson/generic/ondemand/json_iterator.h for arm64 */ +/* including simdjson/generic/ondemand/json_type.h for arm64: #include "simdjson/generic/ondemand/json_type.h" */ +/* begin file simdjson/generic/ondemand/json_type.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * The type of a JSON value. + */ +enum class json_type { + // Start at 1 to catch uninitialized / default values more easily + array=1, ///< A JSON array ( [ 1, 2, 3 ... ] ) + 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" ...) + boolean, ///< A JSON boolean (true or false) + null ///< A JSON null (null) +}; + +/** + * A type representing a JSON number. + * The design of the struct is deliberately straight-forward. All + * functions return standard values with no error check. + */ +struct number { + + /** + * 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 + * }; + */ + simdjson_inline ondemand::number_type get_number_type() const noexcept; + /** + * return true if the automatically determined type of + * the number is number_type::unsigned_integer. + */ + simdjson_inline bool is_uint64() const noexcept; + /** + * return the value as a uint64_t, only valid if is_uint64() is true. + */ + simdjson_inline uint64_t get_uint64() const noexcept; + simdjson_inline operator uint64_t() const noexcept; + + /** + * return true if the automatically determined type of + * the number is number_type::signed_integer. + */ + simdjson_inline bool is_int64() const noexcept; + /** + * return the value as a int64_t, only valid if is_int64() is true. + */ + simdjson_inline int64_t get_int64() const noexcept; + simdjson_inline operator int64_t() const noexcept; + + + /** + * return true if the automatically determined type of + * the number is number_type::floating_point_number. + */ + simdjson_inline bool is_double() const noexcept; + /** + * return the value as a double, only valid if is_double() is true. + */ + simdjson_inline double get_double() const noexcept; + simdjson_inline operator double() const noexcept; + + /** + * Convert the number to a double. Though it always succeed, the conversion + * may be lossy if the number cannot be represented exactly. + */ + simdjson_inline double as_double() const noexcept; + + +protected: + /** + * The next block of declaration is designed so that we can call the number parsing + * functions on a number type. They are protected and should never be used outside + * of the core simdjson library. + */ + friend class value_iterator; + template + friend error_code numberparsing::slow_float_parsing(simdjson_unused const uint8_t * src, W writer); + template + 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); + template + friend error_code numberparsing::parse_number(const uint8_t *const src, W &writer); + /** Store a signed 64-bit value to the number. */ + simdjson_inline void append_s64(int64_t value) noexcept; + /** Store an unsigned 64-bit value to the number. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + /** Store a double value to the number. */ + simdjson_inline void append_double(double value) noexcept; + /** Specifies that the value is a double, but leave it undefined. */ + simdjson_inline void skip_double() noexcept; + /** + * End of friend declarations. + */ + + /** + * Our attributes are a union type (size = 64 bits) + * followed by a type indicator. + */ + union { + double floating_point_number; + int64_t signed_integer; + uint64_t unsigned_integer; + } payload{0}; + number_type type{number_type::signed_integer}; +}; + +/** + * Write the JSON type to the output stream + * + * @param out The output stream. + * @param type The json_type. + */ +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept; + +#if SIMDJSON_EXCEPTIONS +/** + * Send JSON type to an output stream. + * + * @param out The output stream. + * @param type The json_type. + * @throw simdjson_error if the result being printed has an error. If there is an error with the + * underlying output stream, that error will be propagated (simdjson_error will not be + * thrown). + */ +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false); +#endif + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::json_type &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H +/* end file simdjson/generic/ondemand/json_type.h for arm64 */ +/* including simdjson/generic/ondemand/raw_json_string.h for arm64: #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * A string escaped per JSON rules, terminated with quote ("). They are used to represent + * unescaped keys inside JSON documents. + * + * (In other words, a pointer to the beginning of a string, just after the start quote, inside a + * JSON file.) + * + * This class is deliberately simplistic and has little functionality. You can + * compare a raw_json_string instance with an unescaped C string, but + * that is nearly all you can do. + * + * 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(). + * + */ +class raw_json_string { +public: + /** + * Create a new invalid raw_json_string. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline raw_json_string() noexcept = default; + + /** + * Create a new invalid raw_json_string pointed at the given location in the JSON. + * + * 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. + */ + simdjson_inline raw_json_string(const uint8_t * _buf) noexcept; + /** + * 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. + */ + simdjson_inline const char * raw() const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done) on target.size() characters, + * and if the raw_json_string instance has a quote character at byte index target.size(). + * We never read more than length + 1 bytes in the raw_json_string instance. + * If length is smaller than target.size(), this will return false. + * + * 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. + */ + 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-byte equal (no escaping is done). + * The std::string_view instance should not contain unescaped quote characters: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * Performance: the comparison is done byte-by-byte which might be inefficient for + * long strings. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + * The provided C string should not contain an unescaped quote character: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(const char* target) const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(const char* target) const noexcept; + + /** + * 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!). + */ + static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept; + static simdjson_inline bool is_free_from_unescaped_quote(const char* target) noexcept; + +private: + + + /** + * This will set the inner pointer to zero, effectively making + * this instance unusable. + */ + simdjson_inline void consume() noexcept { buf = nullptr; } + + /** + * Checks whether the inner pointer is non-null and thus usable. + */ + simdjson_inline simdjson_warn_unused bool alive() const noexcept { return buf != nullptr; } + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result will be a valid UTF-8. + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + * @param allow_replacement Whether we allow replacement of invalid surrogate pairs. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape(json_iterator &iter, bool allow_replacement) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result may not be a valid UTF-8. https://simonsapin.github.io/wtf-8/ + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(json_iterator &iter) const noexcept; + const uint8_t * buf{}; + friend class object; + friend class field; + friend class parser; + friend struct simdjson_result; +}; + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &, const raw_json_string &) noexcept; + +/** + * 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. + */ +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept; +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept; + + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::raw_json_string &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private + + simdjson_inline simdjson_result raw() const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape(arm64::ondemand::json_iterator &iter, bool allow_replacement) const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(arm64::ondemand::json_iterator &iter) const noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H +/* end file simdjson/generic/ondemand/raw_json_string.h for arm64 */ +/* including simdjson/generic/ondemand/parser.h for arm64: #include "simdjson/generic/ondemand/parser.h" */ +/* begin file simdjson/generic/ondemand/parser.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * The default batch size for document_stream instances for this On Demand kernel. + * Note that different On Demand kernel may use a different DEFAULT_BATCH_SIZE value + * in the future. + */ +static constexpr size_t DEFAULT_BATCH_SIZE = 1000000; +/** + * Some adversary might try to set the batch size to 0 or 1, which might cause problems. + * We set a minimum of 32B since anything else is highly likely to be an error. In practice, + * most users will want a much larger batch size. + * + * All non-negative MINIMAL_BATCH_SIZE values should be 'safe' except that, obviously, no JSON + * document can ever span 0 or 1 byte and that very large values would create memory allocation issues. + */ +static constexpr size_t MINIMAL_BATCH_SIZE = 32; + +/** + * A JSON fragment iterator. + * + * This holds the actual iterator as well as the buffer for writing strings. + */ +class parser { +public: + /** + * Create a JSON parser. + * + * The new parser will have zero capacity. + */ + inline explicit parser(size_t max_capacity = SIMDJSON_MAXSIZE_BYTES) noexcept; + + inline parser(parser &&other) noexcept = default; + simdjson_inline parser(const parser &other) = delete; + simdjson_inline parser &operator=(const parser &other) = delete; + simdjson_inline parser &operator=(parser &&other) noexcept = default; + + /** Deallocate the JSON parser. */ + inline ~parser() noexcept = default; + + /** + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * document doc = parser.iterate(json); + * + * It is expected that the content is a valid UTF-8 file, containing a valid JSON document. + * Otherwise the iterate method may return an error. In particular, the whole input should be + * valid: we do not attempt to tolerate incorrect content either before or after a JSON + * document. If there is a UTF-8 BOM, the parser skips it. + * + * ### IMPORTANT: Validate what you use + * + * Calling iterate on an invalid JSON document may not immediately trigger an error. The call to + * iterate does not parse and validate the whole document. + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * @param len The length of the JSON. + * @param capacity The number of bytes allocated in the JSON (must be at least len+SIMDJSON_PADDING). + * + * @return The document, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate(padded_string_view json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const char *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const uint8_t *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string_view json, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(padded_string &&json) & noexcept = delete; + + /** + * @private + * + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * json_iterator doc = parser.iterate(json); + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * The ondemand::document instance holds the iterator. The document must remain in scope + * while you are accessing instances of ondemand::value, ondemand::object, ondemand::array. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * + * @return The iterator, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate_raw(padded_string_view json) & noexcept; + + + /** + * Parse a buffer containing many JSON documents. + * + * auto json = R"({ "foo": 1 } { "foo": 2 } { "foo": 3 } )"_padded; + * ondemand::parser parser; + * ondemand::document_stream docs = parser.iterate_many(json); + * for (auto & doc : docs) { + * std::cout << doc["foo"] << std::endl; + * } + * // Prints 1 2 3 + * + * No copy of the input buffer is made. + * + * The function is lazy: it may be that no more than one JSON document at a time is parsed. + * + * The caller is responsabile to ensure that the input string data remains unchanged and is + * not deleted during the loop. + * + * ### Format + * + * The buffer must contain a series of one or more JSON documents, concatenated into a single + * buffer, separated by ASCII whitespace. It effectively parses until it has a fully valid document, + * then starts parsing the next document at that point. (It does this with more parallelism and + * lookahead than you might think, though.) + * + * documents that consist of an object or array may omit the whitespace between them, concatenating + * with no separator. Documents that consist of a single primitive (i.e. documents that are not + * arrays or objects) MUST be separated with ASCII whitespace. + * + * The characters inside a JSON document, and between JSON documents, must be valid Unicode (UTF-8). + * If there is a UTF-8 BOM, the parser skips it. + * + * The documents must not exceed batch_size bytes (by default 1MB) or they will fail to parse. + * Setting batch_size to excessively large or excessively small values may impact negatively the + * performance. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * ### Threads + * + * When compiled with SIMDJSON_THREADS_ENABLED, this method will use a single thread under the + * hood to do some lookahead. + * + * ### Parser Capacity + * + * If the parser's current capacity is less than batch_size, it will allocate enough capacity + * to handle it (up to max_capacity). + * + * @param buf The concatenated JSON to parse. + * @param len The length of the concatenated JSON. + * @param batch_size The batch size to use. MUST be larger than the largest document. The sweet + * spot is cache-related: small enough to fit in cache, yet big enough to + * parse as many documents as possible in one tight loop. + * Defaults to 10MB, which has been a reasonable sweet spot in our tests. + * @param allow_comma_separated (defaults on false) This allows a mode where the documents are + * separated by commas instead of whitespace. It comes with a performance + * penalty because the entire document is indexed at once (and the document must be + * less than 4 GB), and there is no multithreading. In this mode, the batch_size parameter + * is effectively ignored, as it is set to at least the document size. + * @return The stream, or an error. An empty input will yield 0 documents rather than an EMPTY error. Errors: + * - MEMALLOC if the parser does not have enough capacity and memory allocation fails + * - CAPACITY if the parser does not have enough capacity and batch_size > max_capacity. + * - other json errors if parsing fails. You should not rely on these errors to always the same for the + * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). + */ + inline simdjson_result iterate_many(const uint8_t *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const char *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const std::string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const std::string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const padded_string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const padded_string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + + /** @private We do not want to allow implicit conversion from C string to std::string. */ + simdjson_result iterate_many(const char *buf, size_t batch_size = DEFAULT_BATCH_SIZE) noexcept = delete; + + /** The capacity of this parser (the largest document it can process). */ + simdjson_inline size_t capacity() const noexcept; + /** The maximum capacity of this parser (the largest document it is allowed to process). */ + simdjson_inline size_t max_capacity() const noexcept; + simdjson_inline void set_max_capacity(size_t max_capacity) noexcept; + /** + * 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. + */ + simdjson_inline size_t max_depth() const noexcept; + + /** + * Ensure this parser has enough memory to process JSON documents up to `capacity` bytes in length + * and `max_depth` depth. + * + * The max_depth 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. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. Defaults to DEFAULT_MAX_DEPTH. + * @return The error, if there is one. + */ + simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept; + + #ifdef SIMDJSON_THREADS_ENABLED + /** + * The parser instance can use threads when they are available to speed up some + * operations. It is enabled by default. Changing this attribute will change the + * behavior of the parser for future operations. + */ + bool threaded{true}; + #endif + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result must be valid UTF-8. + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @param allow_replacement Whether we allow a replacement if the input string contains unmatched surrogate pairs. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement = false) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result may not be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept; + +private: + /** @private [for benchmarking access] The implementation to use */ + std::unique_ptr implementation{}; + size_t _capacity{0}; + size_t _max_capacity; + size_t _max_depth{DEFAULT_MAX_DEPTH}; + std::unique_ptr string_buf{}; +#if SIMDJSON_DEVELOPMENT_CHECKS + std::unique_ptr start_positions{}; +#endif + + friend class json_iterator; + friend class document_stream; +}; + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::parser &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_H +/* end file simdjson/generic/ondemand/parser.h for arm64 */ + +// All other declarations +/* including simdjson/generic/ondemand/array.h for arm64: #include "simdjson/generic/ondemand/array.h" */ +/* begin file simdjson/generic/ondemand/array.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * A forward-only JSON array. + */ +class array { +public: + /** + * Create a new invalid array. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline array() noexcept = default; + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result is_empty() & noexcept; + /** + * Reset the iterator so that we are pointing back at the + * beginning of the array. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"([ { "foo": { "a": [ 10, 20, 30 ] }} ])"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/0/foo/a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an array + * instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * Consumes the array and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Get the value at the given index. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; +protected: + /** + * Go to the end of the array, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + + /** + * Begin array iteration. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + */ + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + /** + * Begin array iteration from the root. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + * @error TAPE_ERROR if there is no closing ] at the end of the document. + */ + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + /** + * Begin array iteration. + * + * This version of the method should be called after the initial [ has been verified, and is + * intended for use by switch statements that check the type of a value. + * + * @param iter The iterator. Must be after the initial [. Will be *moved* into the resulting array. + */ + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + + /** + * Create an array at the given Internal array creation. Call array::start() or array::started() instead of this. + * + * @param iter The iterator. Must either be at the start of the first element with iter.is_alive() + * == true, or past the [] with is_alive() == false if the array is empty. Will be *moved* + * into the resulting array. + */ + simdjson_inline array(const value_iterator &iter) noexcept; + + /** + * Iterator marking current position. + * + * iter.is_alive() == false indicates iteration is complete. + */ + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; + friend struct simdjson_result; + friend class array_iterator; +}; + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::array &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + inline simdjson_result count_elements() & noexcept; + inline simdjson_result is_empty() & noexcept; + inline simdjson_result reset() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_H +/* end file simdjson/generic/ondemand/array.h for arm64 */ +/* including simdjson/generic/ondemand/array_iterator.h for arm64: #include "simdjson/generic/ondemand/array_iterator.h" */ +/* begin file simdjson/generic/ondemand/array_iterator.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * A forward-only JSON array. + * + * This is an input_iterator, meaning: + * - It is forward-only + * - * must be called exactly once per element. + * - ++ must be called exactly once in between each * (*, ++, *, ++, * ...) + */ +class array_iterator { +public: + /** Create a new, invalid array iterator. */ + simdjson_inline array_iterator() noexcept = default; + + // + // Iterator interface + // + + /** + * Get the current element. + * + * Part of the std::iterator interface. + */ + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + /** + * Check if we are at the end of the JSON. + * + * Part of the std::iterator interface. + * + * @return true if there are no more elements in the JSON array. + */ + simdjson_inline bool operator==(const array_iterator &) const noexcept; + /** + * Check if there are more elements in the JSON array. + * + * Part of the std::iterator interface. + * + * @return true if there are more elements in the JSON array. + */ + simdjson_inline bool operator!=(const array_iterator &) const noexcept; + /** + * Move to the next element. + * + * Part of the std::iterator interface. + */ + simdjson_inline array_iterator &operator++() noexcept; + +private: + value_iterator iter{}; + + simdjson_inline array_iterator(const value_iterator &iter) noexcept; + + friend class array; + friend class value; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::array_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H +/* end file simdjson/generic/ondemand/array_iterator.h for arm64 */ +/* including simdjson/generic/ondemand/document.h for arm64: #include "simdjson/generic/ondemand/document.h" */ +/* begin file simdjson/generic/ondemand/document.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * A JSON document. It holds a json_iterator instance. + * + * Used by tokens to get text, and string buffer location. + * + * You must keep the document around during iteration. + */ +class document { +public: + /** + * Create a new invalid document. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline document() noexcept = default; + simdjson_inline document(const document &other) noexcept = delete; // pass your documents by reference, not by copy + simdjson_inline document(document &&other) noexcept = default; + simdjson_inline document &operator=(const document &other) noexcept = delete; + simdjson_inline document &operator=(document &&other) noexcept = default; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() & noexcept; + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() & noexcept; + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + /** + * Cast this JSON value (inside string) to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: Calling get_string() twice on the same document is an error. + * + * @param Whether to allow a replacement character for unmatched surrogate pairs. + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + /** + * Cast this JSON value to a string. + * + * The string is not guaranteed to be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * + * Important: Calling get_wobbly_string() twice on the same document is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is set to 1 (which is the case when building in Debug mode + * by default), and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value if a JSON array or object cannot be found. + * @returns SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result get_value() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() & noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + /** @overload template simdjson_result get() & noexcept */ + template simdjson_inline simdjson_result get() && noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool, value + * + * Be mindful that the document instance must remain in scope while you are accessing object, array and value instances. + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) & noexcept; + /** @overload template error_code get(T &out) & noexcept */ + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() & noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() & noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * 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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is defined, and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value value if a JSON array or object cannot be found. + * @exception SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline operator value() noexcept(false); +#endif + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * To check that an object is empty, it is more performant to use + * the is_empty() method. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) & noexcept; + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to + * a key a single time. Doing object["mykey"].to_string()and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the document is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the document is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the document is an integer number. 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. If this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view may be the padded buffer. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + /** + * 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). + */ + inline void rewind() noexcept; + /** + * Returns debugging information. + */ + inline std::string to_debug_string() noexcept; + /** + * Some unrecoverable error conditions may render the document instance unusable. + * The is_alive() method returns true when the document is still suitable. + */ + inline bool is_alive() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Returns true if this document has been fully parsed. + * If you have consumed the whole document and at_end() returns + * false, then there may be trailing content. + */ + inline bool at_end() const noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() automatically calls rewind between each call. Thus + * all values, objects and arrays that you have created so far (including unescaped strings) + * are invalidated. After calling at_pointer, you need to consume the result: string values + * should be stored in your own variables, arrays should be decoded and stored in your own array-like + * structures and so forth. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + * - SCALAR_DOCUMENT_AS_VALUE if the json_pointer is empty and the document is not a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; +protected: + /** + * Consumes the document. + */ + simdjson_inline error_code consume() noexcept; + + simdjson_inline document(ondemand::json_iterator &&iter) noexcept; + simdjson_inline const uint8_t *text(uint32_t idx) const noexcept; + + simdjson_inline value_iterator resume_value_iterator() noexcept; + simdjson_inline value_iterator get_root_value_iterator() noexcept; + simdjson_inline simdjson_result start_or_resume_object() noexcept; + static simdjson_inline document start(ondemand::json_iterator &&iter) noexcept; + + // + // Fields + // + json_iterator iter{}; ///< Current position in the document + static constexpr depth_t DOCUMENT_DEPTH = 0; ///< document depth is always 0 + + friend class array_iterator; + friend class value; + friend class ondemand::parser; + friend class object; + friend class array; + friend class field; + friend class token; + friend class document_stream; + friend class document_reference; +}; + + +/** + * A document_reference is a thin wrapper around a document reference instance. + */ +class document_reference { +public: + simdjson_inline document_reference() noexcept; + simdjson_inline document_reference(document &d) noexcept; + simdjson_inline document_reference(const document_reference &other) noexcept = default; + simdjson_inline document_reference& operator=(const document_reference &other) noexcept = default; + simdjson_inline void rewind() noexcept; + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + + simdjson_inline simdjson_result is_null() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + simdjson_inline operator document&() const noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator array() & noexcept(false); + simdjson_inline operator object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +private: + document *doc{nullptr}; +}; +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::document &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() & noexcept; + template simdjson_inline simdjson_result get() && noexcept; + + template simdjson_inline error_code get(T &out) & noexcept; + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator arm64::ondemand::array() & noexcept(false); + simdjson_inline operator arm64::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator arm64::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator arm64::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool at_end() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + + + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::document_reference value, error_code error) noexcept; + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator arm64::ondemand::array() & noexcept(false); + simdjson_inline operator arm64::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator arm64::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator arm64::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document_reference::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H +/* end file simdjson/generic/ondemand/document.h for arm64 */ +/* including simdjson/generic/ondemand/document_stream.h for arm64: #include "simdjson/generic/ondemand/document_stream.h" */ +/* begin file simdjson/generic/ondemand/document_stream.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#ifdef SIMDJSON_THREADS_ENABLED +#include +#include +#include +#endif + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED +/** @private Custom worker class **/ +struct stage1_worker { + stage1_worker() noexcept = default; + stage1_worker(const stage1_worker&) = delete; + stage1_worker(stage1_worker&&) = delete; + stage1_worker operator=(const stage1_worker&) = delete; + ~stage1_worker(); + /** + * We only start the thread when it is needed, not at object construction, this may throw. + * You should only call this once. + **/ + void start_thread(); + /** + * Start a stage 1 job. You should first call 'run', then 'finish'. + * You must call start_thread once before. + */ + void run(document_stream * ds, parser * stage1, size_t next_batch_start); + /** Wait for the run to finish (blocking). You should first call 'run', then 'finish'. **/ + void finish(); + +private: + + /** + * Normally, we would never stop the thread. But we do in the destructor. + * This function is only safe assuming that you are not waiting for results. You + * should have called run, then finish, and be done. + **/ + void stop_thread(); + + std::thread thread{}; + /** These three variables define the work done by the thread. **/ + ondemand::parser * stage1_thread_parser{}; + size_t _next_batch_start{}; + document_stream * owner{}; + /** + * We have two state variables. This could be streamlined to one variable in the future but + * we use two for clarity. + */ + bool has_work{false}; + bool can_work{true}; + + /** + * We lock using a mutex. + */ + std::mutex locking_mutex{}; + std::condition_variable cond_var{}; + + friend class document_stream; +}; +#endif // SIMDJSON_THREADS_ENABLED + +/** + * A forward-only stream of documents. + * + * Produced by parser::iterate_many. + * + */ +class document_stream { +public: + /** + * Construct an uninitialized document_stream. + * + * ```c++ + * document_stream docs; + * auto error = parser.iterate_many(json).get(docs); + * ``` + */ + simdjson_inline document_stream() noexcept; + /** Move one document_stream to another. */ + simdjson_inline document_stream(document_stream &&other) noexcept = default; + /** Move one document_stream to another. */ + simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default; + + simdjson_inline ~document_stream() noexcept; + + /** + * Returns the input size in bytes. + */ + inline size_t size_in_bytes() const noexcept; + + /** + * After iterating through the stream, this method + * returns the number of bytes that were not parsed at the end + * of the stream. If truncated_bytes() differs from zero, + * then the input was truncated maybe because incomplete JSON + * documents were found at the end of the stream. You + * may need to process the bytes in the interval [size_in_bytes()-truncated_bytes(), size_in_bytes()). + * + * You should only call 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(); + * + */ + inline size_t truncated_bytes() const noexcept; + + class iterator { + public: + using value_type = simdjson_result; + using reference = value_type; + + using difference_type = std::ptrdiff_t; + + using iterator_category = std::input_iterator_tag; + + /** + * Default constructor. + */ + simdjson_inline iterator() noexcept; + /** + * Get the current document (or error). + */ + simdjson_inline simdjson_result operator*() noexcept; + /** + * Advance to the next document (prefix). + */ + inline iterator& operator++() noexcept; + /** + * Check if we're at the end yet. + * @param other the end iterator to compare to. + */ + simdjson_inline bool operator!=(const iterator &other) const noexcept; + /** + * @private + * + * Gives the current index in the input document in bytes. + * + * document_stream stream = parser.parse_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * auto doc = *i; + * size_t index = i.current_index(); + * } + * + * This function (current_index()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + */ + simdjson_inline size_t current_index() const noexcept; + + /** + * @private + * + * Gives a view of the current document at the current position. + * + * document_stream stream = parser.iterate_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * std::string_view v = i.source(); + * } + * + * The returned string_view instance is simply a map to the (unparsed) + * source string: it may thus include white-space characters and all manner + * of padding. + * + * This function (source()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + * + */ + simdjson_inline std::string_view source() const noexcept; + + /** + * Returns error of the stream (if any). + */ + inline error_code error() const noexcept; + + private: + simdjson_inline iterator(document_stream *s, bool finished) noexcept; + /** The document_stream we're iterating through. */ + document_stream* stream; + /** Whether we're finished or not. */ + bool finished; + + friend class document; + friend class document_stream; + friend class json_iterator; + }; + + /** + * Start iterating the documents in the stream. + */ + simdjson_inline iterator begin() noexcept; + /** + * The end of the stream, for iterator comparison purposes. + */ + simdjson_inline iterator end() noexcept; + +private: + + document_stream &operator=(const document_stream &) = delete; // Disallow copying + document_stream(const document_stream &other) = delete; // Disallow copying + + /** + * Construct a document_stream. Does not allocate or parse anything until the iterator is + * used. + * + * @param parser is a reference to the parser instance used to generate this document_stream + * @param buf is the raw byte buffer we need to process + * @param len is the length of the raw byte buffer in bytes + * @param batch_size is the size of the windows (must be strictly greater or equal to the largest JSON document) + */ + simdjson_inline document_stream( + ondemand::parser &parser, + const uint8_t *buf, + size_t len, + size_t batch_size, + bool allow_comma_separated + ) noexcept; + + /** + * Parse the first document in the buffer. Used by begin(), to handle allocation and + * initialization. + */ + inline void start() noexcept; + + /** + * Parse the next document found in the buffer previously given to document_stream. + * + * The content should be a valid JSON document encoded as UTF-8. If there is a + * UTF-8 BOM, the parser skips it. + * + * You do NOT need to pre-allocate a parser. This function takes care of + * pre-allocating a capacity defined by the batch_size defined when creating the + * document_stream object. + * + * The function returns simdjson::EMPTY if there is no more data to be parsed. + * + * The function returns simdjson::SUCCESS (as integer = 0) in case of success + * and indicates that the buffer has successfully been parsed to the end. + * Every document it contained has been parsed without error. + * + * The function returns an error code from simdjson/simdjson.h in case of failure + * such as simdjson::CAPACITY, simdjson::MEMALLOC, simdjson::DEPTH_ERROR and so forth; + * the simdjson::error_message function converts these error codes into a string). + * + * You can also check validity by calling parser.is_valid(). The same parser can + * and should be reused for the other documents in the buffer. + */ + inline void next() noexcept; + + /** Move the json_iterator of the document to the location of the next document in the stream. */ + inline void next_document() noexcept; + + /** Get the next document index. */ + inline size_t next_batch_start() const noexcept; + + /** Pass the next batch through stage 1 with the given parser. */ + inline error_code run_stage1(ondemand::parser &p, size_t batch_start) noexcept; + + // Fields + ondemand::parser *parser; + const uint8_t *buf; + size_t len; + size_t batch_size; + bool allow_comma_separated; + /** + * We are going to use just one document instance. The document owns + * the json_iterator. It implies that we only ever pass a reference + * to the document to the users. + */ + document doc{}; + /** The error (or lack thereof) from the current document. */ + error_code error; + size_t batch_start{0}; + size_t doc_index{}; + + #ifdef SIMDJSON_THREADS_ENABLED + /** Indicates whether we use threads. Note that this needs to be a constant during the execution of the parsing. */ + bool use_thread; + + inline void load_from_stage1_thread() noexcept; + + /** Start a thread to run stage 1 on the next batch. */ + inline void start_stage1_thread() noexcept; + + /** Wait for the stage 1 thread to finish and capture the results. */ + inline void finish_stage1_thread() noexcept; + + /** The error returned from the stage 1 thread. */ + error_code stage1_thread_error{UNINITIALIZED}; + /** The thread used to run stage 1 against the next batch in the background. */ + std::unique_ptr worker{new(std::nothrow) stage1_worker()}; + /** + * The parser used to run stage 1 in the background. Will be swapped + * with the regular parser when finished. + */ + ondemand::parser stage1_thread_parser{}; + + friend struct stage1_worker; + #endif // SIMDJSON_THREADS_ENABLED + + friend class parser; + friend class document; + friend class json_iterator; + friend struct simdjson_result; + friend struct internal::simdjson_result_base; +}; // document_stream + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::document_stream &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H +/* end file simdjson/generic/ondemand/document_stream.h for arm64 */ +/* including simdjson/generic/ondemand/field.h for arm64: #include "simdjson/generic/ondemand/field.h" */ +/* begin file simdjson/generic/ondemand/field.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * A JSON field (key/value pair) in an object. + * + * Returned from object iteration. + * + * Extends from std::pair so you can use C++ algorithms that rely on pairs. + */ +class field : public std::pair { +public: + /** + * Create a new invalid field. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline field() noexcept; + + /** + * Get the key as a string_view (for higher speed, consider raw_key). + * We deliberately use a more cumbersome name (unescaped_key) to force users + * to think twice about using it. + * + * This consumes the key: once you have called unescaped_key(), you cannot + * call it again nor can you call key(). + */ + simdjson_inline simdjson_warn_unused simdjson_result unescaped_key(bool allow_replacement) noexcept; + /** + * Get the key as a raw_json_string. Can be used for direct comparison with + * an unescaped C string: e.g., key() == "test". + */ + simdjson_inline raw_json_string key() const noexcept; + /** + * Get the field value. + */ + simdjson_inline ondemand::value &value() & noexcept; + /** + * @overload ondemand::value &ondemand::value() & noexcept + */ + simdjson_inline ondemand::value value() && noexcept; + +protected: + simdjson_inline field(raw_json_string key, ondemand::value &&value) noexcept; + static simdjson_inline simdjson_result start(value_iterator &parent_iter) noexcept; + static simdjson_inline simdjson_result start(const value_iterator &parent_iter, raw_json_string key) noexcept; + friend struct simdjson_result; + friend class object_iterator; +}; + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::field &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result unescaped_key(bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result key() noexcept; + simdjson_inline simdjson_result value() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_H +/* end file simdjson/generic/ondemand/field.h for arm64 */ +/* including simdjson/generic/ondemand/object.h for arm64: #include "simdjson/generic/ondemand/object.h" */ +/* begin file simdjson/generic/ondemand/object.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +/** + * A forward-only JSON object field iterator. + */ +class object { +public: + /** + * Create a new invalid object. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a + * key a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an object + * instance: there is no rewind and no invalidation. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + + /** + * Reset the iterator so that we are pointing back at the + * beginning of the object. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * 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. + */ + inline simdjson_result is_empty() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; + +protected: + /** + * Go to the end of the object, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + static simdjson_inline object resume(const value_iterator &iter) noexcept; + simdjson_inline object(const value_iterator &iter) noexcept; + + simdjson_warn_unused simdjson_inline error_code find_field_raw(const std::string_view key) noexcept; + + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::object &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + inline simdjson_result reset() noexcept; + inline simdjson_result is_empty() noexcept; + inline simdjson_result count_fields() & noexcept; + inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_H +/* end file simdjson/generic/ondemand/object.h for arm64 */ +/* including simdjson/generic/ondemand/object_iterator.h for arm64: #include "simdjson/generic/ondemand/object_iterator.h" */ +/* begin file simdjson/generic/ondemand/object_iterator.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +class object_iterator { +public: + /** + * Create a new invalid object_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object_iterator() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline simdjson_result operator*() noexcept; + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const object_iterator &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const object_iterator &) const noexcept; + // Checks for ']' and ',' + simdjson_inline object_iterator &operator++() noexcept; + +private: + /** + * The underlying JSON iterator. + * + * PERF NOTE: expected to be elided in favor of the parent document: this is set when the object + * is first used, and never changes afterwards. + */ + value_iterator iter{}; + + simdjson_inline object_iterator(const value_iterator &iter) noexcept; + friend struct simdjson_result; + friend class object; +}; + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public arm64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(arm64::ondemand::object_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + // Checks for ']' and ',' + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H +/* end file simdjson/generic/ondemand/object_iterator.h for arm64 */ +/* including simdjson/generic/ondemand/serialization.h for arm64: #include "simdjson/generic/ondemand/serialization.h" */ +/* begin file simdjson/generic/ondemand/serialization.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * 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. + */ +inline simdjson_result to_json_string(arm64::ondemand::document& x) noexcept; +/** + * Create a string-view instance out of a value instance. 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. + */ +inline simdjson_result to_json_string(arm64::ondemand::value& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(arm64::ondemand::object& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(arm64::ondemand::array& x) noexcept; +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +} // namespace simdjson + +/** + * We want to support argument-dependent lookup (ADL). + * Hence we should define operator<< in the namespace + * where the argument (here value, object, etc.) resides. + * Credit: @madhur4127 + * See https://github.com/simdjson/simdjson/issues/1768 + */ +namespace simdjson { namespace arm64 { namespace ondemand { + +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The element. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::value x); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::array value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::document& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::document_reference& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The object. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::object value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +}}} // namespace simdjson::arm64::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H +/* end file simdjson/generic/ondemand/serialization.h for arm64 */ + +// Inline definitions +/* including simdjson/generic/ondemand/array-inl.h for arm64: #include "simdjson/generic/ondemand/array-inl.h" */ +/* begin file simdjson/generic/ondemand/array-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter->depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the array is first found and the iterator is just past the `{`. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the `,` before the next value (or `]`). In this state, +// depth == iter->depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter->depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter->depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the array iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet element may be missing or not be an +// array--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter->depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between elements, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter->depth == depth, and at_start == false. +// +// ## Terminal State +// +// The terminal state has iter->depth < depth. at_start is always false. +// +// - Finished: When we have reached a `]` or have reported an error, we are finished. We signal this +// by decrementing depth. In this state, iter->depth < depth, at_start == false, and +// error == SUCCESS. +// + +simdjson_inline array::array(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result array::start(value_iterator &iter) noexcept { + // We don't need to know if the array is empty to start iteration, but we do want to know if there + // is an error--thus `simdjson_unused`. + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::start_root(value_iterator &iter) noexcept { + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_root_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::started(value_iterator &iter) noexcept { + bool has_value; + SIMDJSON_TRY(iter.started_array().get(has_value)); + return array(iter); +} + +simdjson_inline simdjson_result array::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return array_iterator(iter); +} +simdjson_inline simdjson_result array::end() noexcept { + return array_iterator(iter); +} +simdjson_inline error_code array::consume() noexcept { + auto error = iter.json_iter().skip_child(iter.depth()-1); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result array::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter._json_iter->unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline simdjson_result array::count_elements() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the array after counting the number of elements. + iter.reset_array(); + return count; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline simdjson_result array::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_array().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +inline simdjson_result array::reset() & noexcept { + return iter.reset_array(); +} + +inline simdjson_result array::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + // - means "the append position" or "the element after the end of the array" + // We don't support this, because we're returning a real element, not a position. + if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; } + + // Read the array index + size_t array_index = 0; + size_t i; + for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) { + uint8_t digit = uint8_t(json_pointer[i] - '0'); + // Check for non-digit in array index. If it's there, we're trying to get a field in an object + if (digit > 9) { return INCORRECT_TYPE; } + array_index = array_index*10 + digit; + } + + // 0 followed by other digits is invalid + if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0" + + // Empty string is invalid; so is a "/" with no digits before it + if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index" + // Get the child + auto child = at(array_index); + // If there is an error, it ends here + if(child.error()) { + return child; + } + + // If there is a /, we're not done yet, call recursively. + if (i < json_pointer.length()) { + child = child.at_pointer(json_pointer.substr(i)); + } + return child; +} + +simdjson_inline simdjson_result array::at(size_t index) noexcept { + size_t i = 0; + for (auto value : *this) { + if (i == index) { return value; } + i++; + } + return INDEX_OUT_OF_BOUNDS; +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + arm64::ondemand::array &&value +) noexcept + : implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept + : implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::is_empty() & noexcept { + if (error()) { return error(); } + return first.is_empty(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H +/* end file simdjson/generic/ondemand/array-inl.h for arm64 */ +/* including simdjson/generic/ondemand/array_iterator-inl.h for arm64: #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/array_iterator-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +simdjson_inline array_iterator::array_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result array_iterator::operator*() noexcept { + if (iter.error()) { iter.abandon(); return iter.error(); } + return value(iter.child()); +} +simdjson_inline bool array_iterator::operator==(const array_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool array_iterator::operator!=(const array_iterator &) const noexcept { + return iter.is_open(); +} +simdjson_inline array_iterator &array_iterator::operator++() noexcept { + error_code error; + // PERF NOTE this is a safety rail ... users should exit loops as soon as they receive an error, so we'll never get here. + // However, it does not seem to make a perf difference, so we add it out of an abundance of caution. + if (( error = iter.error() )) { return *this; } + if (( error = iter.skip_child() )) { return *this; } + if (( error = iter.has_next_element().error() )) { return *this; } + return *this; +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + arm64::ondemand::array_iterator &&value +) noexcept + : arm64::implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : arm64::implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++(first); + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/array_iterator-inl.h for arm64 */ +/* including simdjson/generic/ondemand/document-inl.h for arm64: #include "simdjson/generic/ondemand/document-inl.h" */ +/* begin file simdjson/generic/ondemand/document-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +simdjson_inline document::document(ondemand::json_iterator &&_iter) noexcept + : iter{std::forward(_iter)} +{ + logger::log_start_value(iter, "document"); +} + +simdjson_inline document document::start(json_iterator &&iter) noexcept { + return document(std::forward(iter)); +} + +inline void document::rewind() noexcept { + iter.rewind(); +} + +inline std::string document::to_debug_string() noexcept { + return iter.to_string(); +} + +inline simdjson_result document::current_location() const noexcept { + return iter.current_location(); +} + +inline int32_t document::current_depth() const noexcept { + return iter.depth(); +} + +inline bool document::at_end() const noexcept { + return iter.at_end(); +} + + +inline bool document::is_alive() noexcept { + return iter.is_alive(); +} +simdjson_inline value_iterator document::resume_value_iterator() noexcept { + return value_iterator(&iter, 1, iter.root_position()); +} +simdjson_inline value_iterator document::get_root_value_iterator() noexcept { + return resume_value_iterator(); +} +simdjson_inline simdjson_result document::start_or_resume_object() noexcept { + if (iter.at_root()) { + return get_object(); + } else { + return object::resume(resume_value_iterator()); + } +} +simdjson_inline simdjson_result document::get_value() noexcept { + // Make sure we start any arrays or objects before returning, so that start_root_() + // gets called. + + // It is the convention throughout the code that the macro `SIMDJSON_DEVELOPMENT_CHECKS` determines whether + // we check for OUT_OF_ORDER_ITERATION. Proper on::demand code should never trigger this error. +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.at_root()) { return OUT_OF_ORDER_ITERATION; } +#endif + // assert_at_root() serves two purposes: in Debug mode, whether or not + // SIMDJSON_DEVELOPMENT_CHECKS is set or not, it checks that we are at the root of + // the document (this will typically be redundant). In release mode, it generates + // SIMDJSON_ASSUME statements to allow the compiler to make assumptions. + iter.assert_at_root(); + switch (*iter.peek()) { + case '[': { + // The following lines check that the document ends with ]. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_array(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + case '{': { + // The following lines would check that the document ends with }. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_object(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + default: + // Unfortunately, scalar documents are a special case in simdjson and they cannot + // be safely converted to value instances. + return SCALAR_DOCUMENT_AS_VALUE; + } +} +simdjson_inline simdjson_result document::get_array() & noexcept { + auto value = get_root_value_iterator(); + return array::start_root(value); +} +simdjson_inline simdjson_result document::get_object() & noexcept { + auto value = get_root_value_iterator(); + return object::start_root(value); +} + +/** + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. 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. + */ + +simdjson_inline simdjson_result document::get_uint64() noexcept { + return get_root_value_iterator().get_root_uint64(true); +} +simdjson_inline simdjson_result document::get_uint64_in_string() noexcept { + return get_root_value_iterator().get_root_uint64_in_string(true); +} +simdjson_inline simdjson_result document::get_int64() noexcept { + return get_root_value_iterator().get_root_int64(true); +} +simdjson_inline simdjson_result document::get_int64_in_string() noexcept { + return get_root_value_iterator().get_root_int64_in_string(true); +} +simdjson_inline simdjson_result document::get_double() noexcept { + return get_root_value_iterator().get_root_double(true); +} +simdjson_inline simdjson_result document::get_double_in_string() noexcept { + return get_root_value_iterator().get_root_double_in_string(true); +} +simdjson_inline simdjson_result document::get_string(bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(true, allow_replacement); +} +template +simdjson_inline error_code document::get_string(string_type& receiver, bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(receiver, true, allow_replacement); +} +simdjson_inline simdjson_result document::get_wobbly_string() noexcept { + return get_root_value_iterator().get_root_wobbly_string(true); +} +simdjson_inline simdjson_result document::get_raw_json_string() noexcept { + return get_root_value_iterator().get_root_raw_json_string(true); +} +simdjson_inline simdjson_result document::get_bool() noexcept { + return get_root_value_iterator().get_root_bool(true); +} +simdjson_inline simdjson_result document::is_null() noexcept { + return get_root_value_iterator().is_root_null(true); +} + +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_array(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_object(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_double(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_bool(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_value(); } + +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_double(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_uint64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_int64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_bool(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_value(); } + +template simdjson_inline error_code document::get(T &out) & noexcept { + return get().get(out); +} +template simdjson_inline error_code document::get(T &out) && noexcept { + return std::forward(*this).get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document::operator array() & noexcept(false) { return get_array(); } +simdjson_inline document::operator object() & noexcept(false) { return get_object(); } +simdjson_inline document::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document::operator double() noexcept(false) { return get_double(); } +simdjson_inline document::operator std::string_view() noexcept(false) { return get_string(false); } +simdjson_inline document::operator raw_json_string() noexcept(false) { return get_raw_json_string(); } +simdjson_inline document::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document::operator value() noexcept(false) { return get_value(); } + +#endif +simdjson_inline simdjson_result document::count_elements() & noexcept { + auto a = get_array(); + simdjson_result answer = a.count_elements(); + /* If there was an array, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::count_fields() & noexcept { + auto a = get_object(); + simdjson_result answer = a.count_fields(); + /* If there was an object, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::at(size_t index) & noexcept { + auto a = get_array(); + return a.at(index); +} +simdjson_inline simdjson_result document::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result document::end() & noexcept { + return {}; +} + +simdjson_inline simdjson_result document::find_field(std::string_view key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field(const char *key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field_unordered(std::string_view key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::find_field_unordered(const char *key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::operator[](std::string_view key) & noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result document::operator[](const char *key) & noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline error_code document::consume() noexcept { + auto error = iter.skip_child(0); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result document::raw_json() noexcept { + auto _iter = get_root_value_iterator(); + const uint8_t * starting_point{_iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter.unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result document::type() noexcept { + return get_root_value_iterator().type(); +} + +simdjson_inline simdjson_result document::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool document::is_negative() noexcept { + return get_root_value_iterator().is_root_negative(); +} + +simdjson_inline simdjson_result document::is_integer() noexcept { + return get_root_value_iterator().is_root_integer(true); +} + +simdjson_inline simdjson_result document::get_number_type() noexcept { + return get_root_value_iterator().get_root_number_type(true); +} + +simdjson_inline simdjson_result document::get_number() noexcept { + return get_root_value_iterator().get_root_number(true); +} + + +simdjson_inline simdjson_result document::raw_json_token() noexcept { + auto _iter = get_root_value_iterator(); + return std::string_view(reinterpret_cast(_iter.peek_start()), _iter.peek_start_length()); +} + +simdjson_inline simdjson_result document::at_pointer(std::string_view json_pointer) noexcept { + rewind(); // Rewind the document each time at_pointer is called + if (json_pointer.empty()) { + return this->get_value(); + } + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + arm64::ondemand::document &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base( + error + ) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template +simdjson_inline simdjson_result simdjson_result::get() & noexcept { + if (error()) { return error(); } + return first.get(); +} +template +simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first).get(); +} +template +simdjson_inline error_code simdjson_result::get(T &out) & noexcept { + if (error()) { return error(); } + return first.get(out); +} +template +simdjson_inline error_code simdjson_result::get(T &out) && noexcept { + if (error()) { return error(); } + return std::forward(first).get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() & noexcept = delete; +template<> simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first); +} +template<> simdjson_inline error_code simdjson_result::get(arm64::ondemand::document &out) & noexcept = delete; +template<> simdjson_inline error_code simdjson_result::get(arm64::ondemand::document &out) && noexcept { + if (error()) { return error(); } + out = std::forward(first); + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} + +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} + + +simdjson_inline bool simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} + +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} + +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} + +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} + + +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator arm64::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator arm64::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator arm64::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator arm64::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline bool simdjson_result::at_end() const noexcept { + if (error()) { return error(); } + return first.at_end(); +} + + +simdjson_inline int32_t simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +simdjson_inline document_reference::document_reference() noexcept : doc{nullptr} {} +simdjson_inline document_reference::document_reference(document &d) noexcept : doc(&d) {} +simdjson_inline void document_reference::rewind() noexcept { doc->rewind(); } +simdjson_inline simdjson_result document_reference::get_array() & noexcept { return doc->get_array(); } +simdjson_inline simdjson_result document_reference::get_object() & noexcept { return doc->get_object(); } +/** + * The document_reference instances are used primarily/solely for streams of JSON + * documents. + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. + * + * 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. + */ +simdjson_inline simdjson_result document_reference::get_uint64() noexcept { return doc->get_root_value_iterator().get_root_uint64(false); } +simdjson_inline simdjson_result document_reference::get_uint64_in_string() noexcept { return doc->get_root_value_iterator().get_root_uint64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_int64() noexcept { return doc->get_root_value_iterator().get_root_int64(false); } +simdjson_inline simdjson_result document_reference::get_int64_in_string() noexcept { return doc->get_root_value_iterator().get_root_int64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_double() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_double_in_string() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_string(bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(false, allow_replacement); } +template +simdjson_inline error_code document_reference::get_string(string_type& receiver, bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(receiver, false, allow_replacement); } +simdjson_inline simdjson_result document_reference::get_wobbly_string() noexcept { return doc->get_root_value_iterator().get_root_wobbly_string(false); } +simdjson_inline simdjson_result document_reference::get_raw_json_string() noexcept { return doc->get_root_value_iterator().get_root_raw_json_string(false); } +simdjson_inline simdjson_result document_reference::get_bool() noexcept { return doc->get_root_value_iterator().get_root_bool(false); } +simdjson_inline simdjson_result document_reference::get_value() noexcept { return doc->get_value(); } +simdjson_inline simdjson_result document_reference::is_null() noexcept { return doc->get_root_value_iterator().is_root_null(false); } + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document_reference::operator array() & noexcept(false) { return array(*doc); } +simdjson_inline document_reference::operator object() & noexcept(false) { return object(*doc); } +simdjson_inline document_reference::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document_reference::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document_reference::operator double() noexcept(false) { return get_double(); } +simdjson_inline document_reference::operator std::string_view() noexcept(false) { return std::string_view(*doc); } +simdjson_inline document_reference::operator raw_json_string() noexcept(false) { return raw_json_string(*doc); } +simdjson_inline document_reference::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document_reference::operator value() noexcept(false) { return value(*doc); } +#endif +simdjson_inline simdjson_result document_reference::count_elements() & noexcept { return doc->count_elements(); } +simdjson_inline simdjson_result document_reference::count_fields() & noexcept { return doc->count_fields(); } +simdjson_inline simdjson_result document_reference::at(size_t index) & noexcept { return doc->at(index); } +simdjson_inline simdjson_result document_reference::begin() & noexcept { return doc->begin(); } +simdjson_inline simdjson_result document_reference::end() & noexcept { return doc->end(); } +simdjson_inline simdjson_result document_reference::find_field(std::string_view key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::find_field(const char *key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::operator[](std::string_view key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::operator[](const char *key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::find_field_unordered(std::string_view key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::find_field_unordered(const char *key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::type() noexcept { return doc->type(); } +simdjson_inline simdjson_result document_reference::is_scalar() noexcept { return doc->is_scalar(); } +simdjson_inline simdjson_result document_reference::current_location() noexcept { return doc->current_location(); } +simdjson_inline int32_t document_reference::current_depth() const noexcept { return doc->current_depth(); } +simdjson_inline bool document_reference::is_negative() noexcept { return doc->is_negative(); } +simdjson_inline simdjson_result document_reference::is_integer() noexcept { return doc->get_root_value_iterator().is_root_integer(false); } +simdjson_inline simdjson_result document_reference::get_number_type() noexcept { return doc->get_root_value_iterator().get_root_number_type(false); } +simdjson_inline simdjson_result document_reference::get_number() noexcept { return doc->get_root_value_iterator().get_root_number(false); } +simdjson_inline simdjson_result document_reference::raw_json_token() noexcept { return doc->raw_json_token(); } +simdjson_inline simdjson_result document_reference::at_pointer(std::string_view json_pointer) noexcept { return doc->at_pointer(json_pointer); } +simdjson_inline simdjson_result document_reference::raw_json() noexcept { return doc->raw_json();} +simdjson_inline document_reference::operator document&() const noexcept { return *doc; } + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + + + +namespace simdjson { +simdjson_inline simdjson_result::simdjson_result(arm64::ondemand::document_reference value, error_code error) + noexcept : implementation_simdjson_result_base(std::forward(value), error) {} + + +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator arm64::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator arm64::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator arm64::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator arm64::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H +/* end file simdjson/generic/ondemand/document-inl.h for arm64 */ +/* including simdjson/generic/ondemand/document_stream-inl.h for arm64: #include "simdjson/generic/ondemand/document_stream-inl.h" */ +/* begin file simdjson/generic/ondemand/document_stream-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void stage1_worker::finish() { + // After calling "run" someone would call finish() to wait + // for the end of the processing. + // This function will wait until either the thread has done + // the processing or, else, the destructor has been called. + std::unique_lock lock(locking_mutex); + cond_var.wait(lock, [this]{return has_work == false;}); +} + +inline stage1_worker::~stage1_worker() { + // The thread may never outlive the stage1_worker instance + // and will always be stopped/joined before the stage1_worker + // instance is gone. + stop_thread(); +} + +inline void stage1_worker::start_thread() { + std::unique_lock lock(locking_mutex); + if(thread.joinable()) { + return; // This should never happen but we never want to create more than one thread. + } + thread = std::thread([this]{ + while(true) { + std::unique_lock thread_lock(locking_mutex); + // We wait for either "run" or "stop_thread" to be called. + cond_var.wait(thread_lock, [this]{return has_work || !can_work;}); + // If, for some reason, the stop_thread() method was called (i.e., the + // destructor of stage1_worker is called, then we want to immediately destroy + // the thread (and not do any more processing). + if(!can_work) { + break; + } + this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser, + this->_next_batch_start); + this->has_work = false; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify "finish" + thread_lock.unlock(); + } + } + ); +} + + +inline void stage1_worker::stop_thread() { + std::unique_lock lock(locking_mutex); + // We have to make sure that all locks can be released. + can_work = false; + has_work = false; + cond_var.notify_all(); + lock.unlock(); + if(thread.joinable()) { + thread.join(); + } +} + +inline void stage1_worker::run(document_stream * ds, parser * stage1, size_t next_batch_start) { + std::unique_lock lock(locking_mutex); + owner = ds; + _next_batch_start = next_batch_start; + stage1_thread_parser = stage1; + has_work = true; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify the thread lock that we have work + lock.unlock(); +} + +#endif // SIMDJSON_THREADS_ENABLED + +simdjson_inline document_stream::document_stream( + ondemand::parser &_parser, + const uint8_t *_buf, + size_t _len, + size_t _batch_size, + bool _allow_comma_separated +) noexcept + : parser{&_parser}, + buf{_buf}, + len{_len}, + batch_size{_batch_size <= MINIMAL_BATCH_SIZE ? MINIMAL_BATCH_SIZE : _batch_size}, + allow_comma_separated{_allow_comma_separated}, + error{SUCCESS} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(_parser.threaded) // we need to make a copy because _parser.threaded can change + #endif +{ +#ifdef SIMDJSON_THREADS_ENABLED + if(worker.get() == nullptr) { + error = MEMALLOC; + } +#endif +} + +simdjson_inline document_stream::document_stream() noexcept + : parser{nullptr}, + buf{nullptr}, + len{0}, + batch_size{0}, + allow_comma_separated{false}, + error{UNINITIALIZED} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(false) + #endif +{ +} + +simdjson_inline document_stream::~document_stream() noexcept +{ + #ifdef SIMDJSON_THREADS_ENABLED + worker.reset(); + #endif +} + +inline size_t document_stream::size_in_bytes() const noexcept { + return len; +} + +inline size_t document_stream::truncated_bytes() const noexcept { + if(error == CAPACITY) { return len - batch_start; } + return parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] - parser->implementation->structural_indexes[parser->implementation->n_structural_indexes + 1]; +} + +simdjson_inline document_stream::iterator::iterator() noexcept + : stream{nullptr}, finished{true} { +} + +simdjson_inline document_stream::iterator::iterator(document_stream* _stream, bool is_end) noexcept + : stream{_stream}, finished{is_end} { +} + +simdjson_inline simdjson_result document_stream::iterator::operator*() noexcept { + //if(stream->error) { return stream->error; } + return simdjson_result(stream->doc, stream->error); +} + +simdjson_inline document_stream::iterator& document_stream::iterator::operator++() noexcept { + // If there is an error, then we want the iterator + // to be finished, no matter what. (E.g., we do not + // keep generating documents with errors, or go beyond + // a document with errors.) + // + // Users do not have to call "operator*()" when they use operator++, + // so we need to end the stream in the operator++ function. + // + // Note that setting finished = true is essential otherwise + // we would enter an infinite loop. + if (stream->error) { finished = true; } + // Note that stream->error() is guarded against error conditions + // (it will immediately return if stream->error casts to false). + // In effect, this next function does nothing when (stream->error) + // is true (hence the risk of an infinite loop). + stream->next(); + // If that was the last document, we're finished. + // It is the only type of error we do not want to appear + // in operator*. + if (stream->error == EMPTY) { finished = true; } + // If we had any other kind of error (not EMPTY) then we want + // to pass it along to the operator* and we cannot mark the result + // as "finished" just yet. + return *this; +} + +simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept { + return finished != other.finished; +} + +simdjson_inline document_stream::iterator document_stream::begin() noexcept { + start(); + // If there are no documents, we're finished. + return iterator(this, error == EMPTY); +} + +simdjson_inline document_stream::iterator document_stream::end() noexcept { + return iterator(this, true); +} + +inline void document_stream::start() noexcept { + if (error) { return; } + error = parser->allocate(batch_size); + if (error) { return; } + // Always run the first stage 1 parse immediately + batch_start = 0; + error = run_stage1(*parser, batch_start); + while(error == EMPTY) { + // In exceptional cases, we may start with an empty block + batch_start = next_batch_start(); + if (batch_start >= len) { return; } + error = run_stage1(*parser, batch_start); + } + if (error) { return; } + doc_index = batch_start; + doc = document(json_iterator(&buf[batch_start], parser)); + doc.iter._streaming = true; + + #ifdef SIMDJSON_THREADS_ENABLED + if (use_thread && next_batch_start() < len) { + // Kick off the first thread on next batch if needed + error = stage1_thread_parser.allocate(batch_size); + if (error) { return; } + worker->start_thread(); + start_stage1_thread(); + if (error) { return; } + } + #endif // SIMDJSON_THREADS_ENABLED +} + +inline void document_stream::next() noexcept { + // We always enter at once once in an error condition. + if (error) { return; } + next_document(); + if (error) { return; } + auto cur_struct_index = doc.iter._root - parser->implementation->structural_indexes.get(); + doc_index = batch_start + parser->implementation->structural_indexes[cur_struct_index]; + + // Check if at end of structural indexes (i.e. at end of batch) + if(cur_struct_index >= static_cast(parser->implementation->n_structural_indexes)) { + error = EMPTY; + // Load another batch (if available) + while (error == EMPTY) { + batch_start = next_batch_start(); + if (batch_start >= len) { break; } + #ifdef SIMDJSON_THREADS_ENABLED + if(use_thread) { + load_from_stage1_thread(); + } else { + error = run_stage1(*parser, batch_start); + } + #else + error = run_stage1(*parser, batch_start); + #endif + /** + * Whenever we move to another window, we need to update all pointers to make + * it appear as if the input buffer started at the beginning of the window. + * + * Take this input: + * + * {"z":5} {"1":1,"2":2,"4":4} [7, 10, 9] [15, 11, 12, 13] [154, 110, 112, 1311] + * + * Say you process the following window... + * + * '{"z":5} {"1":1,"2":2,"4":4} [7, 10, 9]' + * + * When you do so, the json_iterator has a pointer at the beginning of the memory region + * (pointing at the beginning of '{"z"...'. + * + * When you move to the window that starts at... + * + * '[7, 10, 9] [15, 11, 12, 13] ... + * + * then it is not sufficient to just run stage 1. You also need to re-anchor the + * json_iterator so that it believes we are starting at '[7, 10, 9]...'. + * + * Under the DOM front-end, this gets done automatically because the parser owns + * the pointer the data, and when you call stage1 and then stage2 on the same + * parser, then stage2 will run on the pointer acquired by stage1. + * + * That is, stage1 calls "this->buf = _buf" so the parser remembers the buffer that + * we used. But json_iterator has no callback when stage1 is called on the parser. + * In fact, I think that the parser is unaware of json_iterator. + * + * + * So we need to re-anchor the json_iterator after each call to stage 1 so that + * all of the pointers are in sync. + */ + doc.iter = json_iterator(&buf[batch_start], parser); + doc.iter._streaming = true; + /** + * End of resync. + */ + + if (error) { continue; } // If the error was EMPTY, we may want to load another batch. + doc_index = batch_start; + } + } +} + +inline void document_stream::next_document() noexcept { + // Go to next place where depth=0 (document depth) + error = doc.iter.skip_child(0); + if (error) { return; } + // Always set depth=1 at the start of document + doc.iter._depth = 1; + // consume comma if comma separated is allowed + if (allow_comma_separated) { doc.iter.consume_character(','); } + // Resets the string buffer at the beginning, thus invalidating the strings. + doc.iter._string_buf_loc = parser->string_buf.get(); + doc.iter._root = doc.iter.position(); +} + +inline size_t document_stream::next_batch_start() const noexcept { + return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes]; +} + +inline error_code document_stream::run_stage1(ondemand::parser &p, size_t _batch_start) noexcept { + // This code only updates the structural index in the parser, it does not update any json_iterator + // instance. + size_t remaining = len - _batch_start; + if (remaining <= batch_size) { + return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final); + } else { + return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial); + } +} + +simdjson_inline size_t document_stream::iterator::current_index() const noexcept { + return stream->doc_index; +} + +simdjson_inline std::string_view document_stream::iterator::source() const noexcept { + auto depth = stream->doc.iter.depth(); + auto cur_struct_index = stream->doc.iter._root - stream->parser->implementation->structural_indexes.get(); + + // If at root, process the first token to determine if scalar value + if (stream->doc.iter.at_root()) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': // Depth=1 already at start of document + break; + case '}': case ']': + depth--; + break; + default: // Scalar value document + // TODO: Remove any trailing whitespaces + // This returns a string spanning from start of value to the beginning of the next document (excluded) + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[++cur_struct_index] - current_index() - 1); + } + cur_struct_index++; + } + + while (cur_struct_index <= static_cast(stream->parser->implementation->n_structural_indexes)) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': + depth++; + break; + case '}': case ']': + depth--; + break; + } + if (depth == 0) { break; } + cur_struct_index++; + } + + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[cur_struct_index] - current_index() + stream->batch_start + 1);; +} + +inline error_code document_stream::iterator::error() const noexcept { + return stream->error; +} + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void document_stream::load_from_stage1_thread() noexcept { + worker->finish(); + // Swap to the parser that was loaded up in the thread. Make sure the parser has + // enough memory to swap to, as well. + std::swap(stage1_thread_parser,*parser); + error = stage1_thread_error; + if (error) { return; } + + // If there's anything left, start the stage 1 thread! + if (next_batch_start() < len) { + start_stage1_thread(); + } +} + +inline void document_stream::start_stage1_thread() noexcept { + // we call the thread on a lambda that will update + // this->stage1_thread_error + // there is only one thread that may write to this value + // TODO this is NOT exception-safe. + this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error + size_t _next_batch_start = this->next_batch_start(); + + worker->run(this, & this->stage1_thread_parser, _next_batch_start); +} + +#endif // SIMDJSON_THREADS_ENABLED + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result::simdjson_result( + arm64::ondemand::document_stream &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} + +} + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H +/* end file simdjson/generic/ondemand/document_stream-inl.h for arm64 */ +/* including simdjson/generic/ondemand/field-inl.h for arm64: #include "simdjson/generic/ondemand/field-inl.h" */ +/* begin file simdjson/generic/ondemand/field-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +// clang 6 doesn't think the default constructor can be noexcept, so we make it explicit +simdjson_inline field::field() noexcept : std::pair() {} + +simdjson_inline field::field(raw_json_string key, ondemand::value &&value) noexcept + : std::pair(key, std::forward(value)) +{ +} + +simdjson_inline simdjson_result field::start(value_iterator &parent_iter) noexcept { + raw_json_string key; + SIMDJSON_TRY( parent_iter.field_key().get(key) ); + SIMDJSON_TRY( parent_iter.field_value() ); + return field::start(parent_iter, key); +} + +simdjson_inline simdjson_result field::start(const value_iterator &parent_iter, raw_json_string key) noexcept { + return field(key, parent_iter.child()); +} + +simdjson_inline simdjson_warn_unused simdjson_result field::unescaped_key(bool allow_replacement) noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() but Visual Studio won't let us. + simdjson_result answer = first.unescape(second.iter.json_iter(), allow_replacement); + first.consume(); + return answer; +} + +simdjson_inline raw_json_string field::key() const noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() by Visual Studio won't let us. + return first; +} + +simdjson_inline value &field::value() & noexcept { + return second; +} + +simdjson_inline value field::value() && noexcept { + return std::forward(*this).second; +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + arm64::ondemand::field &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::key() noexcept { + if (error()) { return error(); } + return first.key(); +} +simdjson_inline simdjson_result simdjson_result::unescaped_key(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.unescaped_key(allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::value() noexcept { + if (error()) { return error(); } + return std::move(first.value()); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H +/* end file simdjson/generic/ondemand/field-inl.h for arm64 */ +/* including simdjson/generic/ondemand/json_iterator-inl.h for arm64: #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/json_iterator-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +simdjson_inline json_iterator::json_iterator(json_iterator &&other) noexcept + : token(std::forward(other.token)), + parser{other.parser}, + _string_buf_loc{other._string_buf_loc}, + error{other.error}, + _depth{other._depth}, + _root{other._root}, + _streaming{other._streaming} +{ + other.parser = nullptr; +} +simdjson_inline json_iterator &json_iterator::operator=(json_iterator &&other) noexcept { + token = other.token; + parser = other.parser; + _string_buf_loc = other._string_buf_loc; + error = other.error; + _depth = other._depth; + _root = other._root; + _streaming = other._streaming; + other.parser = nullptr; + return *this; +} + +simdjson_inline json_iterator::json_iterator(const uint8_t *buf, ondemand::parser *_parser) noexcept + : token(buf, &_parser->implementation->structural_indexes[0]), + parser{_parser}, + _string_buf_loc{parser->string_buf.get()}, + _depth{1}, + _root{parser->implementation->structural_indexes.get()}, + _streaming{false} + +{ + logger::log_headers(); +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif +} + +inline void json_iterator::rewind() noexcept { + token.set_position( root_position() ); + logger::log_headers(); // We start again + _string_buf_loc = parser->string_buf.get(); + _depth = 1; +} + +inline bool json_iterator::balanced() const noexcept { + token_iterator ti(token); + int32_t count{0}; + ti.set_position( root_position() ); + while(ti.peek() <= peek_last()) { + switch (*ti.return_current_and_advance()) + { + case '[': case '{': + count++; + break; + case ']': case '}': + count--; + break; + default: + break; + } + } + return count == 0; +} + + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and parent_depth, which is a desired effect. The warning does not show up if the +// skip_child() function is not marked inline). +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline error_code json_iterator::skip_child(depth_t parent_depth) noexcept { + if (depth() <= parent_depth) { return SUCCESS; } + switch (*return_current_and_advance()) { + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + + // For the first open array/object in a value, we've already incremented depth, so keep it the same + // We never stop at colon, but if we did, it wouldn't affect depth + case '[': case '{': case ':': + logger::log_start_value(*this, "skip"); + break; + // If there is a comma, we have just finished a value in an array/object, and need to get back in + case ',': + logger::log_value(*this, "skip"); + break; + // ] or } means we just finished a value and need to jump out of the array/object + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } +#if SIMDJSON_CHECK_EOF + // If there are no more tokens, the parent is incomplete. + if (at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "Missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + break; + case '"': + if(*peek() == ':') { + // We are at a key!!! + // This might happen if you just started an object and you skip it immediately. + // Performance note: it would be nice to get rid of this check as it is somewhat + // expensive. + // https://github.com/simdjson/simdjson/issues/1742 + logger::log_value(*this, "key"); + return_current_and_advance(); // eat up the ':' + break; // important!!! + } + simdjson_fallthrough; + // Anything else must be a scalar value + default: + // For the first scalar, we will have incremented depth already, so we decrement it here. + logger::log_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + } + + // Now that we've considered the first value, we only increment/decrement for arrays/objects + while (position() < end_position()) { + switch (*return_current_and_advance()) { + case '[': case '{': + logger::log_start_value(*this, "skip"); + _depth++; + break; + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + default: + logger::log_value(*this, "skip", ""); + break; + } + } + + return report_error(TAPE_ERROR, "not enough close braces"); +} + +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool json_iterator::at_root() const noexcept { + return position() == root_position(); +} + +simdjson_inline bool json_iterator::is_single_token() const noexcept { + return parser->implementation->n_structural_indexes == 1; +} + +simdjson_inline bool json_iterator::streaming() const noexcept { + return _streaming; +} + +simdjson_inline token_position json_iterator::root_position() const noexcept { + return _root; +} + +simdjson_inline void json_iterator::assert_at_document_depth() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +} + +simdjson_inline void json_iterator::assert_at_root() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + // Under Visual Studio, the next SIMDJSON_ASSUME fails with: the argument + // has side effects that will be discarded. + SIMDJSON_ASSUME( token.position() == _root ); +#endif +} + +simdjson_inline void json_iterator::assert_more_tokens(uint32_t required_tokens) const noexcept { + assert_valid_position(token._position + required_tokens - 1); +} + +simdjson_inline void json_iterator::assert_valid_position(token_position position) const noexcept { +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME( position >= &parser->implementation->structural_indexes[0] ); + SIMDJSON_ASSUME( position < &parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] ); +#endif +} + +simdjson_inline bool json_iterator::at_end() const noexcept { + return position() == end_position(); +} +simdjson_inline token_position json_iterator::end_position() const noexcept { + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + return &parser->implementation->structural_indexes[n_structural_indexes]; +} + +inline std::string json_iterator::to_string() const noexcept { + if( !is_alive() ) { return "dead json_iterator instance"; } + const char * current_structural = reinterpret_cast(token.peek()); + return std::string("json_iterator [ depth : ") + std::to_string(_depth) + + std::string(", structural : '") + std::string(current_structural,1) + + std::string("', offset : ") + std::to_string(token.current_offset()) + + std::string("', error : ") + error_message(error) + + std::string(" ]"); +} + +inline simdjson_result json_iterator::current_location() const noexcept { + if (!is_alive()) { // Unrecoverable error + if (!at_root()) { + return reinterpret_cast(token.peek(-1)); + } else { + return reinterpret_cast(token.peek()); + } + } + if (at_end()) { + return OUT_OF_BOUNDS; + } + return reinterpret_cast(token.peek()); +} + +simdjson_inline bool json_iterator::is_alive() const noexcept { + return parser; +} + +simdjson_inline void json_iterator::abandon() noexcept { + parser = nullptr; + _depth = 0; +} + +simdjson_inline const uint8_t *json_iterator::return_current_and_advance() noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif // SIMDJSON_CHECK_EOF + return token.return_current_and_advance(); +} + +simdjson_inline const uint8_t *json_iterator::unsafe_pointer() const noexcept { + // deliberately done without safety guard: + return token.peek(); +} + +simdjson_inline const uint8_t *json_iterator::peek(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // SIMDJSON_CHECK_EOF + return token.peek(delta); +} + +simdjson_inline uint32_t json_iterator::peek_length(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // #if SIMDJSON_CHECK_EOF + return token.peek_length(delta); +} + +simdjson_inline const uint8_t *json_iterator::peek(token_position position) const noexcept { + // todo: currently we require end-of-string buffering, but the following + // assert_valid_position should be turned on if/when we lift that condition. + // assert_valid_position(position); + // This is almost surely related to SIMDJSON_CHECK_EOF but given that SIMDJSON_CHECK_EOF + // is ON by default, we have no choice but to disable it for real with a comment. + return token.peek(position); +} + +simdjson_inline uint32_t json_iterator::peek_length(token_position position) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_valid_position(position); +#endif // SIMDJSON_CHECK_EOF + return token.peek_length(position); +} + +simdjson_inline token_position json_iterator::last_position() const noexcept { + // The following line fails under some compilers... + // SIMDJSON_ASSUME(parser->implementation->n_structural_indexes > 0); + // since it has side-effects. + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + SIMDJSON_ASSUME(n_structural_indexes > 0); + return &parser->implementation->structural_indexes[n_structural_indexes - 1]; +} +simdjson_inline const uint8_t *json_iterator::peek_last() const noexcept { + return token.peek(last_position()); +} + +simdjson_inline void json_iterator::ascend_to(depth_t parent_depth) noexcept { + SIMDJSON_ASSUME(parent_depth >= 0 && parent_depth < INT32_MAX - 1); + SIMDJSON_ASSUME(_depth == parent_depth + 1); + _depth = parent_depth; +} + +simdjson_inline void json_iterator::descend_to(depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); + _depth = child_depth; +} + +simdjson_inline depth_t json_iterator::depth() const noexcept { + return _depth; +} + +simdjson_inline uint8_t *&json_iterator::string_buf_loc() noexcept { + return _string_buf_loc; +} + +simdjson_inline error_code json_iterator::report_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error != SUCCESS && _error != UNINITIALIZED && _error != INCORRECT_TYPE && _error != NO_SUCH_FIELD); + logger::log_error(*this, message); + error = _error; + return error; +} + +simdjson_inline token_position json_iterator::position() const noexcept { + return token.position(); +} + +simdjson_inline simdjson_result json_iterator::unescape(raw_json_string in, bool allow_replacement) noexcept { + return parser->unescape(in, _string_buf_loc, allow_replacement); +} + +simdjson_inline simdjson_result json_iterator::unescape_wobbly(raw_json_string in) noexcept { + return parser->unescape_wobbly(in, _string_buf_loc); +} + +simdjson_inline void json_iterator::reenter_child(token_position position, depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); +#if SIMDJSON_DEVELOPMENT_CHECKS +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME(size_t(child_depth) < parser->max_depth()); + SIMDJSON_ASSUME(position >= parser->start_positions[child_depth]); +#endif +#endif + token.set_position(position); + _depth = child_depth; +} + +simdjson_inline error_code json_iterator::consume_character(char c) noexcept { + if (*peek() == c) { + return_current_and_advance(); + return SUCCESS; + } + return TAPE_ERROR; +} + +#if SIMDJSON_DEVELOPMENT_CHECKS + +simdjson_inline token_position json_iterator::start_position(depth_t depth) const noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + return size_t(depth) < parser->max_depth() ? parser->start_positions[depth] : 0; +} + +simdjson_inline void json_iterator::set_start_position(depth_t depth, token_position position) noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + if(size_t(depth) < parser->max_depth()) { parser->start_positions[depth] = position; } +} + +#endif + + +simdjson_inline error_code json_iterator::optional_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error == INCORRECT_TYPE || _error == NO_SUCH_FIELD); + logger::log_error(*this, message); + return _error; +} + + +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 { + // This function is not expected to be called in performance-sensitive settings. + // Let us guard against silly cases: + if((N < max_len) || (N == 0)) { return false; } + // Copy to the buffer. + std::memcpy(tmpbuf, json, max_len); + if(N > max_len) { // We pad whatever remains with ' '. + std::memset(tmpbuf + max_len, ' ', N - max_len); + } + return true; +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(arm64::ondemand::json_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/json_iterator-inl.h for arm64 */ +/* including simdjson/generic/ondemand/json_type-inl.h for arm64: #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* begin file simdjson/generic/ondemand/json_type-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept { + switch (type) { + case json_type::array: out << "array"; break; + case json_type::object: out << "object"; break; + case json_type::number: out << "number"; break; + case json_type::string: out << "string"; break; + case json_type::boolean: out << "boolean"; break; + case json_type::null: out << "null"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false) { + return out << type.value(); +} +#endif + + + +simdjson_inline number_type number::get_number_type() const noexcept { + return type; +} + +simdjson_inline bool number::is_uint64() const noexcept { + return get_number_type() == number_type::unsigned_integer; +} + +simdjson_inline uint64_t number::get_uint64() const noexcept { + return payload.unsigned_integer; +} + +simdjson_inline number::operator uint64_t() const noexcept { + return get_uint64(); +} + + +simdjson_inline bool number::is_int64() const noexcept { + return get_number_type() == number_type::signed_integer; +} + +simdjson_inline int64_t number::get_int64() const noexcept { + return payload.signed_integer; +} + +simdjson_inline number::operator int64_t() const noexcept { + return get_int64(); +} + +simdjson_inline bool number::is_double() const noexcept { + return get_number_type() == number_type::floating_point_number; +} + +simdjson_inline double number::get_double() const noexcept { + return payload.floating_point_number; +} + +simdjson_inline number::operator double() const noexcept { + return get_double(); +} + +simdjson_inline double number::as_double() const noexcept { + if(is_double()) { + return payload.floating_point_number; + } + if(is_int64()) { + return double(payload.signed_integer); + } + return double(payload.unsigned_integer); +} + +simdjson_inline void number::append_s64(int64_t value) noexcept { + payload.signed_integer = value; + type = number_type::signed_integer; +} + +simdjson_inline void number::append_u64(uint64_t value) noexcept { + payload.unsigned_integer = value; + type = number_type::unsigned_integer; +} + +simdjson_inline void number::append_double(double value) noexcept { + payload.floating_point_number = value; + type = number_type::floating_point_number; +} + +simdjson_inline void number::skip_double() noexcept { + type = number_type::floating_point_number; +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(arm64::ondemand::json_type &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H +/* end file simdjson/generic/ondemand/json_type-inl.h for arm64 */ +/* including simdjson/generic/ondemand/logger-inl.h for arm64: #include "simdjson/generic/ondemand/logger-inl.h" */ +/* begin file simdjson/generic/ondemand/logger-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace arm64 { +namespace ondemand { +namespace logger { + +static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; +static constexpr const int LOG_EVENT_LEN = 20; +static constexpr const int LOG_BUFFER_LEN = 30; +static constexpr const int LOG_SMALL_BUFFER_LEN = 10; +static int log_depth = 0; // Not threadsafe. Log only. + +// Helper to turn unprintable or newline characters into spaces +static inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } +} + +template +static inline std::string string_format(const std::string& format, const Args&... args) +{ + SIMDJSON_PUSH_DISABLE_ALL_WARNINGS + int size_s = std::snprintf(nullptr, 0, format.c_str(), args...) + 1; + auto size = static_cast(size_s); + if (size <= 0) return std::string(); + std::unique_ptr buf(new char[size]); + std::snprintf(buf.get(), size, format.c_str(), args...); + SIMDJSON_POP_DISABLE_WARNINGS + return std::string(buf.get(), buf.get() + size - 1); +} + +static inline log_level get_log_level_from_env() +{ + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe + char *lvl = getenv("SIMDJSON_LOG_LEVEL"); + SIMDJSON_POP_DISABLE_WARNINGS + if (lvl && simdjson_strcasecmp(lvl, "ERROR") == 0) { return log_level::error; } + return log_level::info; +} + +static inline log_level log_threshold() +{ + static log_level threshold = get_log_level_from_env(); + return threshold; +} + +static inline bool should_log(log_level level) +{ + return level >= log_threshold(); +} + +inline void log_event(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "", type, detail, log_level::info); +} +inline void log_value(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "+", type, detail, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} +inline void log_start_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_line(iter, "+", type, "", delta, depth_delta, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} + +inline void log_end_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + if (LOG_ENABLED) { log_depth--; } + log_line(iter, "-", type, "", delta, depth_delta, log_level::info); +} + +inline void log_error(const json_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_line(iter, "ERROR: ", error, detail, delta, depth_delta, log_level::error); +} +inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail) noexcept { + log_line(iter, index, depth, "ERROR: ", error, detail, log_level::error); +} + +inline void log_event(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_event(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_value(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_value(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_start_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_start_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_end_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_end_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_error(const value_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_error(iter.json_iter(), error, detail, delta, depth_delta); +} + +inline void log_headers() noexcept { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(log_level::info))) { + // Technically a static variable is not thread-safe, but if you are using threads and logging... well... + static bool displayed_hint{false}; + log_depth = 0; + printf("\n"); + if (!displayed_hint) { + // We only print this helpful header once. + printf("# Logging provides the depth and position of the iterator user-visible steps:\n"); + printf("# +array says 'this is where we were when we discovered the start array'\n"); + printf( + "# -array says 'this is where we were when we ended the array'\n"); + printf("# skip says 'this is a structural or value I am skipping'\n"); + printf("# +/-skip says 'this is a start/end array or object I am skipping'\n"); + printf("#\n"); + printf("# The indentation of the terms (array, string,...) indicates the depth,\n"); + printf("# in addition to the depth being displayed.\n"); + printf("#\n"); + printf("# Every token in the document has a single depth determined by the tokens before it,\n"); + printf("# and is not affected by what the token actually is.\n"); + printf("#\n"); + printf("# Not all structural elements are presented as tokens in the logs.\n"); + printf("#\n"); + printf("# We never give control to the user within an empty array or an empty object.\n"); + printf("#\n"); + printf("# Inside an array, having a depth greater than the array's depth means that\n"); + printf("# we are pointing inside a value.\n"); + printf("# Having a depth equal to the array means that we are pointing right before a value.\n"); + printf("# Having a depth smaller than the array means that we have moved beyond the array.\n"); + displayed_hint = true; + } + printf("\n"); + printf("| %-*s ", LOG_EVENT_LEN, "Event"); + printf("| %-*s ", LOG_BUFFER_LEN, "Buffer"); + printf("| %-*s ", LOG_SMALL_BUFFER_LEN, "Next"); + // printf("| %-*s ", 5, "Next#"); + printf("| %-*s ", 5, "Depth"); + printf("| Detail "); + printf("|\n"); + + printf("|%.*s", LOG_EVENT_LEN + 2, DASHES); + printf("|%.*s", LOG_BUFFER_LEN + 2, DASHES); + printf("|%.*s", LOG_SMALL_BUFFER_LEN + 2, DASHES); + // printf("|%.*s", 5+2, DASHES); + printf("|%.*s", 5 + 2, DASHES); + printf("|--------"); + printf("|\n"); + fflush(stdout); + } + } +} + +template +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 { + log_line(iter, iter.position()+delta, depth_t(iter.depth()+depth_delta), title_prefix, title, detail, level, std::forward(args)...); +} + +template +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 { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(level))) { + const int indent = depth * 2; + const auto buf = iter.token.buf; + auto msg = string_format(title, std::forward(args)...); + printf("| %*s%s%-*s ", indent, "", title_prefix, + LOG_EVENT_LEN - indent - int(strlen(title_prefix)), msg.c_str()); + { + // Print the current structural. + printf("| "); + // Before we begin, the index might point right before the document. + // This could be unsafe, see https://github.com/simdjson/simdjson/discussions/1938 + if (index < iter._root) { + printf("%*s", LOG_BUFFER_LEN, ""); + } else { + auto current_structural = &buf[*index]; + for (int i = 0; i < LOG_BUFFER_LEN; i++) { + printf("%c", printable_char(current_structural[i])); + } + } + printf(" "); + } + { + // Print the next structural. + printf("| "); + auto next_structural = &buf[*(index + 1)]; + for (int i = 0; i < LOG_SMALL_BUFFER_LEN; i++) { + printf("%c", printable_char(next_structural[i])); + } + printf(" "); + } + // printf("| %5u ", *(index+1)); + printf("| %5i ", depth); + printf("| %6.*s ", int(detail.size()), detail.data()); + printf("|\n"); + fflush(stdout); + } + } +} + +} // namespace logger +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H +/* end file simdjson/generic/ondemand/logger-inl.h for arm64 */ +/* including simdjson/generic/ondemand/object-inl.h for arm64: #include "simdjson/generic/ondemand/object-inl.h" */ +/* begin file simdjson/generic/ondemand/object-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) & noexcept { + return find_field_unordered(key); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) && noexcept { + return std::forward(*this).find_field_unordered(key); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} + +simdjson_inline simdjson_result object::start(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_object().error() ); + return object(iter); +} +simdjson_inline simdjson_result object::start_root(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_root_object().error() ); + return object(iter); +} +simdjson_inline error_code object::consume() noexcept { + if(iter.is_at_key()) { + /** + * 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. + */ + simdjson_unused raw_json_string actual_key; + auto error = iter.field_key().get(actual_key); + if (error) { iter.abandon(); return error; }; + // Let us move to the value while we are at it. + if ((error = iter.field_value())) { iter.abandon(); return error; } + } + auto error_skip = iter.json_iter().skip_child(iter.depth()-1); + if(error_skip) { iter.abandon(); } + return error_skip; +} + +simdjson_inline simdjson_result object::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + const uint8_t * final_point{iter._json_iter->peek()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result object::started(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.started_object().error() ); + return object(iter); +} + +simdjson_inline object object::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline object::object(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result object::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return object_iterator(iter); +} +simdjson_inline simdjson_result object::end() noexcept { + return object_iterator(iter); +} + +inline simdjson_result object::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + size_t slash = json_pointer.find('/'); + std::string_view key = json_pointer.substr(0, slash); + // Grab the child with the given key + simdjson_result child; + + // If there is an escape character in the key, unescape it and then get the child. + size_t escape = key.find('~'); + if (escape != std::string_view::npos) { + // Unescape the key + std::string unescaped(key); + do { + switch (unescaped[escape+1]) { + case '0': + unescaped.replace(escape, 2, "~"); + break; + case '1': + unescaped.replace(escape, 2, "/"); + break; + default: + return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer"); + } + escape = unescaped.find('~', escape+1); + } while (escape != std::string::npos); + child = find_field(unescaped); // Take note find_field does not unescape keys when matching + } else { + child = find_field(key); + } + if(child.error()) { + return child; // we do not continue if there was an error + } + // If there is a /, we have to recurse and look up more of the path + if (slash != std::string_view::npos) { + child = child.at_pointer(json_pointer.substr(slash)); + } + return child; +} + +simdjson_inline simdjson_result object::count_fields() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the object after counting the number of elements. + iter.reset_object(); + return count; +} + +simdjson_inline simdjson_result object::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_object().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +simdjson_inline simdjson_result object::reset() & noexcept { + return iter.reset_object(); +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(arm64::ondemand::object &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first)[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +inline simdjson_result simdjson_result::reset() noexcept { + if (error()) { return error(); } + return first.reset(); +} + +inline simdjson_result simdjson_result::is_empty() noexcept { + if (error()) { return error(); } + return first.is_empty(); +} + +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H +/* end file simdjson/generic/ondemand/object-inl.h for arm64 */ +/* including simdjson/generic/ondemand/object_iterator-inl.h for arm64: #include "simdjson/generic/ondemand/object_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/object_iterator-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +// +// object_iterator +// + +simdjson_inline object_iterator::object_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result object_iterator::operator*() noexcept { + error_code error = iter.error(); + if (error) { iter.abandon(); return error; } + auto result = field::start(iter); + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (result.error()) { iter.abandon(); } + return result; +} +simdjson_inline bool object_iterator::operator==(const object_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool object_iterator::operator!=(const object_iterator &) const noexcept { + return iter.is_open(); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline object_iterator &object_iterator::operator++() noexcept { + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (!iter.is_open()) { return *this; } // Iterator will be released if there is an error + + simdjson_unused error_code error; + if ((error = iter.skip_child() )) { return *this; } + + simdjson_unused bool has_value; + if ((error = iter.has_next_field().get(has_value) )) { return *this; }; + return *this; +} +SIMDJSON_POP_DISABLE_WARNINGS + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter.depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the object is first found and the iterator is just past the {. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the , or } before the next value. In this state, +// depth == iter.depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter.depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter.depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the object iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet field may be missing or not be an +// object--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter.depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between fields, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter.depth == depth, and at_start == false. +// +// Errors that occur while reading a field to give to the user (such as when the key is not a +// string or the field is missing a colon) are yielded immediately. Depth is then decremented, +// moving to the Finished state without transitioning through an Error state at all. +// +// ## Terminal State +// +// The terminal state has iter.depth < depth. at_start is always false. +// +// - Finished: When we have reached a }, we are finished. We signal this by decrementing depth. +// In this state, iter.depth < depth, at_start == false, and error == SUCCESS. +// + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + arm64::ondemand::object_iterator &&value +) noexcept + : implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +// Checks for ']' and ',' +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++first; + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/object_iterator-inl.h for arm64 */ +/* including simdjson/generic/ondemand/parser-inl.h for arm64: #include "simdjson/generic/ondemand/parser-inl.h" */ +/* begin file simdjson/generic/ondemand/parser-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string_view.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/dom/base.h" // for MINIMAL_DOCUMENT_CAPACITY */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +simdjson_inline parser::parser(size_t max_capacity) noexcept + : _max_capacity{max_capacity} { +} + +simdjson_warn_unused simdjson_inline error_code parser::allocate(size_t new_capacity, size_t new_max_depth) noexcept { + if (new_capacity > max_capacity()) { return CAPACITY; } + if (string_buf && new_capacity == capacity() && new_max_depth == max_depth()) { return SUCCESS; } + + // string_capacity copied from document::allocate + _capacity = 0; + size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * new_capacity / 3 + SIMDJSON_PADDING, 64); + string_buf.reset(new (std::nothrow) uint8_t[string_capacity]); +#if SIMDJSON_DEVELOPMENT_CHECKS + start_positions.reset(new (std::nothrow) token_position[new_max_depth]); +#endif + if (implementation) { + SIMDJSON_TRY( implementation->set_capacity(new_capacity) ); + SIMDJSON_TRY( implementation->set_max_depth(new_max_depth) ); + } else { + SIMDJSON_TRY( simdjson::get_active_implementation()->create_dom_parser_implementation(new_capacity, new_max_depth, implementation) ); + } + _capacity = new_capacity; + _max_depth = new_max_depth; + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length() || !string_buf) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return document::start({ reinterpret_cast(json.data()), this }); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const char *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const uint8_t *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string_view json, size_t allocated) & noexcept { + return iterate(padded_string_view(json, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string &json) & noexcept { + if(json.capacity() - json.size() < SIMDJSON_PADDING) { + json.reserve(json.size() + SIMDJSON_PADDING); + } + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const std::string &json) & noexcept { + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + padded_string_view json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + const padded_string &json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate_raw(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length()) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return json_iterator(reinterpret_cast(json.data()), this); +} + +inline simdjson_result parser::iterate_many(const uint8_t *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; } + if((len >= 3) && (std::memcmp(buf, "\xEF\xBB\xBF", 3) == 0)) { + buf += 3; + len -= 3; + } + if(allow_comma_separated && batch_size < len) { batch_size = len; } + return document_stream(*this, buf, len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const char *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(reinterpret_cast(buf), len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const std::string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const padded_string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} + +simdjson_inline size_t parser::capacity() const noexcept { + return _capacity; +} +simdjson_inline size_t parser::max_capacity() const noexcept { + return _max_capacity; +} +simdjson_inline size_t parser::max_depth() const noexcept { + return _max_depth; +} + +simdjson_inline void parser::set_max_capacity(size_t max_capacity) noexcept { + if(max_capacity < dom::MINIMAL_DOCUMENT_CAPACITY) { + _max_capacity = max_capacity; + } else { + _max_capacity = dom::MINIMAL_DOCUMENT_CAPACITY; + } +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement) const noexcept { + uint8_t *end = implementation->parse_string(in.buf, dst, allow_replacement); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept { + uint8_t *end = implementation->parse_wobbly_string(in.buf, dst); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(arm64::ondemand::parser &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H +/* end file simdjson/generic/ondemand/parser-inl.h for arm64 */ +/* including simdjson/generic/ondemand/raw_json_string-inl.h for arm64: #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +namespace arm64 { +namespace ondemand { + +simdjson_inline raw_json_string::raw_json_string(const uint8_t * _buf) noexcept : buf{_buf} {} + +simdjson_inline const char * raw_json_string::raw() const noexcept { return reinterpret_cast(buf); } + + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(std::string_view target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;pos < target.size() && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;pos < target.size();pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(const char* target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;target[pos] && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;target[pos];pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept { + // If we are going to call memcmp, then we must know something about the length of the raw_json_string. + return (length >= target.size()) && (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); +} + +simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + if(target.size() <= SIMDJSON_PADDING) { + return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); + } + const char * r{raw()}; + size_t pos{0}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept { + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(const char * target) const noexcept { + // Assumptions: 'target' does not contain unescaped quote characters, is null terminated and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(const char* target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept { + return a.unsafe_is_equal(c); +} + +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept { + return a == c; +} + +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept { + return !(a == c); +} + +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept { + return !(a == c); +} + + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape(json_iterator &iter, bool allow_replacement) const noexcept { + return iter.unescape(*this, allow_replacement); +} + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape_wobbly(json_iterator &iter) const noexcept { + return iter.unescape_wobbly(*this); +} + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &out, const raw_json_string &str) noexcept { + bool in_escape = false; + const char *s = str.raw(); + while (true) { + switch (*s) { + case '\\': in_escape = !in_escape; break; + case '"': if (in_escape) { in_escape = false; } else { return out; } break; + default: if (in_escape) { in_escape = false; } + } + out << *s; + s++; + } +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(arm64::ondemand::raw_json_string &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::raw() const noexcept { + if (error()) { return error(); } + return first.raw(); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape(arm64::ondemand::json_iterator &iter, bool allow_replacement) const noexcept { + if (error()) { return error(); } + return first.unescape(iter, allow_replacement); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape_wobbly(arm64::ondemand::json_iterator &iter) const noexcept { + if (error()) { return error(); } + return first.unescape_wobbly(iter); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H +/* end file simdjson/generic/ondemand/raw_json_string-inl.h for arm64 */ +/* including simdjson/generic/ondemand/serialization-inl.h for arm64: #include "simdjson/generic/ondemand/serialization-inl.h" */ +/* begin file simdjson/generic/ondemand/serialization-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/serialization.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +inline std::string_view trim(const std::string_view str) noexcept { + // We can almost surely do better by rolling our own find_first_not_of function. + size_t first = str.find_first_not_of(" \t\n\r"); + // If we have the empty string (just white space), then no trimming is possible, and + // we return the empty string_view. + if (std::string_view::npos == first) { return std::string_view(); } + size_t last = str.find_last_not_of(" \t\n\r"); + return str.substr(first, (last - first + 1)); +} + + +inline simdjson_result to_json_string(arm64::ondemand::document& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(arm64::ondemand::document_reference& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(arm64::ondemand::value& x) noexcept { + /** + * 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. + */ + using namespace arm64::ondemand; + arm64::ondemand::json_type t; + auto error = x.type().get(t); + if(error != SUCCESS) { return error; } + switch (t) + { + case json_type::array: + { + arm64::ondemand::array array; + error = x.get_array().get(array); + if(error) { return error; } + return to_json_string(array); + } + case json_type::object: + { + arm64::ondemand::object object; + error = x.get_object().get(object); + if(error) { return error; } + return to_json_string(object); + } + default: + return trim(x.raw_json_token()); + } +} + +inline simdjson_result to_json_string(arm64::ondemand::object& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(arm64::ondemand::array& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} +} // namespace simdjson + +namespace simdjson { namespace arm64 { namespace ondemand { + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::document_reference& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::arm64::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif +}}} // namespace simdjson::arm64::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H +/* end file simdjson/generic/ondemand/serialization-inl.h for arm64 */ +/* including simdjson/generic/ondemand/token_iterator-inl.h for arm64: #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/token_iterator-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +simdjson_inline token_iterator::token_iterator( + const uint8_t *_buf, + token_position position +) noexcept : buf{_buf}, _position{position} +{ +} + +simdjson_inline uint32_t token_iterator::current_offset() const noexcept { + return *(_position); +} + + +simdjson_inline const uint8_t *token_iterator::return_current_and_advance() noexcept { + return &buf[*(_position++)]; +} + +simdjson_inline const uint8_t *token_iterator::peek(token_position position) const noexcept { + return &buf[*position]; +} +simdjson_inline uint32_t token_iterator::peek_index(token_position position) const noexcept { + return *position; +} +simdjson_inline uint32_t token_iterator::peek_length(token_position position) const noexcept { + return *(position+1) - *position; +} + +simdjson_inline const uint8_t *token_iterator::peek(int32_t delta) const noexcept { + return &buf[*(_position+delta)]; +} +simdjson_inline uint32_t token_iterator::peek_index(int32_t delta) const noexcept { + return *(_position+delta); +} +simdjson_inline uint32_t token_iterator::peek_length(int32_t delta) const noexcept { + return *(_position+delta+1) - *(_position+delta); +} + +simdjson_inline token_position token_iterator::position() const noexcept { + return _position; +} +simdjson_inline void token_iterator::set_position(token_position target_position) noexcept { + _position = target_position; +} + +simdjson_inline bool token_iterator::operator==(const token_iterator &other) const noexcept { + return _position == other._position; +} +simdjson_inline bool token_iterator::operator!=(const token_iterator &other) const noexcept { + return _position != other._position; +} +simdjson_inline bool token_iterator::operator>(const token_iterator &other) const noexcept { + return _position > other._position; +} +simdjson_inline bool token_iterator::operator>=(const token_iterator &other) const noexcept { + return _position >= other._position; +} +simdjson_inline bool token_iterator::operator<(const token_iterator &other) const noexcept { + return _position < other._position; +} +simdjson_inline bool token_iterator::operator<=(const token_iterator &other) const noexcept { + return _position <= other._position; +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(arm64::ondemand::token_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/token_iterator-inl.h for arm64 */ +/* including simdjson/generic/ondemand/value-inl.h for arm64: #include "simdjson/generic/ondemand/value-inl.h" */ +/* begin file simdjson/generic/ondemand/value-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +simdjson_inline value::value(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} +simdjson_inline value value::start(const value_iterator &iter) noexcept { + return iter; +} +simdjson_inline value value::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline simdjson_result value::get_array() noexcept { + return array::start(iter); +} +simdjson_inline simdjson_result value::get_object() noexcept { + return object::start(iter); +} +simdjson_inline simdjson_result value::start_or_resume_object() noexcept { + if (iter.at_start()) { + return get_object(); + } else { + return object::resume(iter); + } +} + +simdjson_inline simdjson_result value::get_raw_json_string() noexcept { + return iter.get_raw_json_string(); +} +simdjson_inline simdjson_result value::get_string(bool allow_replacement) noexcept { + return iter.get_string(allow_replacement); +} +template +simdjson_inline error_code value::get_string(string_type& receiver, bool allow_replacement) noexcept { + return iter.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result value::get_wobbly_string() noexcept { + return iter.get_wobbly_string(); +} +simdjson_inline simdjson_result value::get_double() noexcept { + return iter.get_double(); +} +simdjson_inline simdjson_result value::get_double_in_string() noexcept { + return iter.get_double_in_string(); +} +simdjson_inline simdjson_result value::get_uint64() noexcept { + return iter.get_uint64(); +} +simdjson_inline simdjson_result value::get_uint64_in_string() noexcept { + return iter.get_uint64_in_string(); +} +simdjson_inline simdjson_result value::get_int64() noexcept { + return iter.get_int64(); +} +simdjson_inline simdjson_result value::get_int64_in_string() noexcept { + return iter.get_int64_in_string(); +} +simdjson_inline simdjson_result value::get_bool() noexcept { + return iter.get_bool(); +} +simdjson_inline simdjson_result value::is_null() noexcept { + return iter.is_null(); +} +template<> simdjson_inline simdjson_result value::get() noexcept { return get_array(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_object(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_number(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_double(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_bool(); } + +template simdjson_inline error_code value::get(T &out) noexcept { + return get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline value::operator array() noexcept(false) { + return get_array(); +} +simdjson_inline value::operator object() noexcept(false) { + return get_object(); +} +simdjson_inline value::operator uint64_t() noexcept(false) { + return get_uint64(); +} +simdjson_inline value::operator int64_t() noexcept(false) { + return get_int64(); +} +simdjson_inline value::operator double() noexcept(false) { + return get_double(); +} +simdjson_inline value::operator std::string_view() noexcept(false) { + return get_string(false); +} +simdjson_inline value::operator raw_json_string() noexcept(false) { + return get_raw_json_string(); +} +simdjson_inline value::operator bool() noexcept(false) { + return get_bool(); +} +#endif + +simdjson_inline simdjson_result value::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result value::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result value::count_elements() & noexcept { + simdjson_result answer; + auto a = get_array(); + answer = a.count_elements(); + // count_elements leaves you pointing inside the array, at the first element. + // We need to move back so that the user can create a new array (which requires that + // we point at '['). + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::count_fields() & noexcept { + simdjson_result answer; + auto a = get_object(); + answer = a.count_fields(); + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::at(size_t index) noexcept { + auto a = get_array(); + return a.at(index); +} + +simdjson_inline simdjson_result value::find_field(std::string_view key) noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result value::find_field(const char *key) noexcept { + return start_or_resume_object().find_field(key); +} + +simdjson_inline simdjson_result value::find_field_unordered(std::string_view key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result value::find_field_unordered(const char *key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} + +simdjson_inline simdjson_result value::operator[](std::string_view key) noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result value::operator[](const char *key) noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline simdjson_result value::type() noexcept { + return iter.type(); +} + +simdjson_inline simdjson_result value::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool value::is_negative() noexcept { + return iter.is_negative(); +} + +simdjson_inline simdjson_result value::is_integer() noexcept { + return iter.is_integer(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number_type() noexcept { + return iter.get_number_type(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number() noexcept { + return iter.get_number(); +} + +simdjson_inline std::string_view value::raw_json_token() noexcept { + return std::string_view(reinterpret_cast(iter.peek_start()), iter.peek_start_length()); +} + +simdjson_inline simdjson_result value::raw_json() noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: { + ondemand::array array; + SIMDJSON_TRY(get_array().get(array)); + return array.raw_json(); + } + case json_type::object: { + ondemand::object object; + SIMDJSON_TRY(get_object().get(object)); + return object.raw_json(); + } + default: + return raw_json_token(); + } +} + +simdjson_inline simdjson_result value::current_location() noexcept { + return iter.json_iter().current_location(); +} + +simdjson_inline int32_t value::current_depth() const noexcept{ + return iter.json_iter().depth(); +} + +simdjson_inline simdjson_result value::at_pointer(std::string_view json_pointer) noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + arm64::ondemand::value &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + if (error()) { return error(); } + return {}; +} + +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} + +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) noexcept { + if (error()) { return error(); } + return first[key]; +} + +simdjson_inline simdjson_result simdjson_result::get_array() noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return first.get(); +} +template simdjson_inline error_code simdjson_result::get(T &out) noexcept { + if (error()) { return error(); } + return first.get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return std::move(first); +} +template<> simdjson_inline error_code simdjson_result::get(arm64::ondemand::value &out) noexcept { + if (error()) { return error(); } + out = first; + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator arm64::ondemand::array() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator arm64::ondemand::object() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator arm64::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H +/* end file simdjson/generic/ondemand/value-inl.h for arm64 */ +/* including simdjson/generic/ondemand/value_iterator-inl.h for arm64: #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/value_iterator-inl.h for arm64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/atomparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace arm64 { +namespace ondemand { + +simdjson_inline value_iterator::value_iterator( + json_iterator *json_iter, + depth_t depth, + token_position start_position +) noexcept : _json_iter{json_iter}, _depth{depth}, _start_position{start_position} +{ +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_root_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_object() noexcept { + assert_at_container_start(); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + if (*_json_iter->peek() == '}') { + logger::log_value(*_json_iter, "empty object"); + _json_iter->return_current_and_advance(); + end_container(); + return false; + } + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_object() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // object: e.g., `{"a":2} foo }`. Users concerned with garbage content should + // call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != '}') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing } at end"); + } + // If the last character is } *and* the first gibberish character is also '}' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == '}') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed object. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_object() noexcept { + auto error = check_root_object(); + if(error) { return error; } + return started_object(); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::end_container() noexcept { +#if SIMDJSON_CHECK_EOF + if (depth() > 1 && at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing parent ] or }"); } + // if (depth() <= 1 && !at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + _json_iter->ascend_to(depth()-1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_field() noexcept { + assert_at_next(); + + // It's illegal to call this unless there are more tokens: anything that ends in } or ] is + // obligated to verify there are more tokens if they are not the top level. + switch (*_json_iter->return_current_and_advance()) { + case '}': + logger::log_end_value(*_json_iter, "object"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between object fields"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_raw(const std::string_view key) noexcept { + error_code error; + bool has_value; + // + // Initially, the object can be in one of a few different places: + // + // 1. The start of the object, at the first field: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + if (at_first_field()) { + has_value = true; + + // + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + return false; + + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + if ((error = skip_child() )) { abandon(); return error; } + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + while (has_value) { + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + //if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); // Skip the value entirely + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + + // If the loop ended, we're out of fields to look at. + return false; +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_unordered_raw(const std::string_view key) noexcept { + /** + * When find_field_unordered_raw is called, we can either be pointing at the + * first key, pointing outside (at the closing brace) or if a key was matched + * we can be either pointing right afterthe ':' right before the value (that we need skip), + * or we may have consumed the value and we might be at a comma or at the + * final brace (ready for a call to has_next_field()). + */ + error_code error; + bool has_value; + + // First, we scan from that point to the end. + // If we don't find a match, we may loop back around, and scan from the beginning to that point. + token_position search_start = _json_iter->position(); + + // We want to know whether we need to go back to the beginning. + bool at_first = at_first_field(); + /////////////// + // Initially, the object can be in one of a few different places: + // + // 1. At the first key: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + // + if (at_first) { + has_value = true; + + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { + +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + SIMDJSON_TRY(reset_object().get(has_value)); + at_first = true; + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + // If someone queried a key but they not did access the value, then we are left pointing + // at the ':' and we need to move forward through the value... If the value was + // processed then skip_child() does not move the iterator (but may adjust the depth). + if ((error = skip_child() )) { abandon(); return error; } + search_start = _json_iter->position(); + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + + // After initial processing, we will be in one of two states: + // + // ``` + // // At the beginning of a field + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // At the end of the object + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // ``` + // + // Next, we find a match starting from the current position. + while (has_value) { + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + // Performance note: it maybe wasteful to rewind to the beginning when there might be + // no other query following. Indeed, it would require reskipping the whole object. + // Instead, you can just stay where you are. If there is a new query, there is always time + // to rewind. + if(at_first) { return false; } + + // If we reach the end without finding a match, search the rest of the fields starting at the + // beginning of the object. + // (We have already run through the object before, so we've already validated its structure. We + // don't check errors in this bit.) + SIMDJSON_TRY(reset_object().get(has_value)); + while (true) { + SIMDJSON_ASSUME(has_value); // we should reach search_start before ever reaching the end of the object + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + error = field_key().get(actual_key); SIMDJSON_ASSUME(!error); + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + error = field_value(); SIMDJSON_ASSUME(!error); + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // If we reached the end of the key-value pair we started from, then we know + // that the key is not there so we return false. We are either right before + // the next comma or the final brace. + if(_json_iter->position() == search_start) { return false; } + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + error = has_next_field().get(has_value); SIMDJSON_ASSUME(!error); + // If we make the mistake of exiting here, then we could be left pointing at a key + // in the middle of an object. That's not an allowable state. + } + // If the loop ended, we're out of fields to look at. The program should + // never reach this point. + return false; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::field_key() noexcept { + assert_at_next(); + + const uint8_t *key = _json_iter->return_current_and_advance(); + if (*(key++) != '"') { return report_error(TAPE_ERROR, "Object key is not a string"); } + return raw_json_string(key); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::field_value() noexcept { + assert_at_next(); + + if (*_json_iter->return_current_and_advance() != ':') { return report_error(TAPE_ERROR, "Missing colon in object field"); } + _json_iter->descend_to(depth()+1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_root_array(); +} + +inline std::string value_iterator::to_string() const noexcept { + auto answer = std::string("value_iterator [ depth : ") + std::to_string(_depth) + std::string(", "); + if(_json_iter != nullptr) { answer += _json_iter->to_string(); } + answer += std::string(" ]"); + return answer; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_array() noexcept { + assert_at_container_start(); + if (*_json_iter->peek() == ']') { + logger::log_value(*_json_iter, "empty array"); + _json_iter->return_current_and_advance(); + SIMDJSON_TRY( end_container() ); + return false; + } + _json_iter->descend_to(depth()+1); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_array() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // array: e.g., `[1, 2] foo]`. Users concerned with garbage content should + // also call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != ']') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing ] at end"); + } + // If the last character is ] *and* the first gibberish character is also ']' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == ']') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed array. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_array() noexcept { + auto error = check_root_array(); + if (error) { return error; } + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_element() noexcept { + assert_at_next(); + + logger::log_event(*this, "has_next_element"); + switch (*_json_iter->return_current_and_advance()) { + case ']': + logger::log_end_value(*_json_iter, "array"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + _json_iter->descend_to(depth()+1); + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between array elements"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_bool(const uint8_t *json) const noexcept { + auto not_true = atomparsing::str4ncmp(json, "true"); + auto not_false = atomparsing::str4ncmp(json, "fals") | (json[4] ^ 'e'); + bool error = (not_true && not_false) || jsoncharutils::is_not_structural_or_whitespace(json[not_true ? 5 : 4]); + if (error) { return incorrect_type_error("Not a boolean"); } + return simdjson_result(!not_true); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_null(const uint8_t *json) const noexcept { + bool is_null_string = !atomparsing::str4ncmp(json, "null") && jsoncharutils::is_structural_or_whitespace(json[4]); + // if we start with 'n', we must be a null + if(!is_null_string && json[0]=='n') { return incorrect_type_error("Not a null but starts with n"); } + return is_null_string; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_string(bool allow_replacement) noexcept { + return get_raw_json_string().unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_string(string_type& receiver, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_string(allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_wobbly_string() noexcept { + return get_raw_json_string().unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_raw_json_string() noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64() noexcept { + auto result = numberparsing::parse_unsigned(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64_in_string() noexcept { + auto result = numberparsing::parse_unsigned_in_string(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64() noexcept { + auto result = numberparsing::parse_integer(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64_in_string() noexcept { + auto result = numberparsing::parse_integer_in_string(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double() noexcept { + auto result = numberparsing::parse_double(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double_in_string() noexcept { + auto result = numberparsing::parse_double_in_string(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_bool() noexcept { + auto result = parse_bool(peek_non_root_scalar("bool")); + if(result.error() == SUCCESS) { advance_non_root_scalar("bool"); } + return result; +} +simdjson_inline simdjson_result value_iterator::is_null() noexcept { + bool is_null_value; + SIMDJSON_TRY(parse_null(peek_non_root_scalar("null")).get(is_null_value)); + if(is_null_value) { advance_non_root_scalar("null"); } + return is_null_value; +} +simdjson_inline bool value_iterator::is_negative() noexcept { + return numberparsing::is_negative(peek_non_root_scalar("numbersign")); +} +simdjson_inline bool value_iterator::is_root_negative() noexcept { + return numberparsing::is_negative(peek_root_scalar("numbersign")); +} +simdjson_inline simdjson_result value_iterator::is_integer() noexcept { + return numberparsing::is_integer(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number_type() noexcept { + return numberparsing::get_number_type(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number() noexcept { + number num; + error_code error = numberparsing::parse_number(peek_non_root_scalar("number"), num); + if(error) { return error; } + return num; +} + +simdjson_inline simdjson_result value_iterator::is_root_integer(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("is_root_integer"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + return false; // if there are more than 20 characters, it cannot be represented as an integer. + } + auto answer = numberparsing::is_integer(tmpbuf); + // If the parsing was a success, we must still check that it is + // a single scalar. Note that we parse first because of cases like '[]' where + // getting TRAILING_CONTENT is wrong. + if(check_trailing && (answer.error() == SUCCESS) && (!_json_iter->is_single_token())) { return TRAILING_CONTENT; } + return answer; +} + +simdjson_inline simdjson_result value_iterator::get_root_number_type(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto answer = numberparsing::get_number_type(tmpbuf); + if (check_trailing && (answer.error() == SUCCESS) && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + return answer; +} +simdjson_inline simdjson_result value_iterator::get_root_number(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + number num; + error_code error = numberparsing::parse_number(tmpbuf, num); + if(error) { return error; } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("number"); + return num; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_string(bool check_trailing, bool allow_replacement) noexcept { + return get_root_raw_json_string(check_trailing).unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_root_string(check_trailing, allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_wobbly_string(bool check_trailing) noexcept { + return get_root_raw_json_string(check_trailing).unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_raw_json_string(bool check_trailing) noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_bool(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("bool"); + uint8_t tmpbuf[5+1+1]; // +1 for null termination + tmpbuf[5+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 5+1)) { return incorrect_type_error("Not a boolean"); } + auto result = parse_bool(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("bool"); + } + return result; +} +simdjson_inline simdjson_result value_iterator::is_root_null(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("null"); + bool result = (max_len >= 4 && !atomparsing::str4ncmp(json, "null") && + (max_len == 4 || jsoncharutils::is_structural_or_whitespace(json[4]))); + if(result) { // we have something that looks like a null. + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("null"); + } + return result; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::skip_child() noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth >= _depth ); + + return _json_iter->skip_child(depth()); +} + +simdjson_inline value_iterator value_iterator::child() const noexcept { + assert_at_child(); + return { _json_iter, depth()+1, _json_iter->token.position() }; +} + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and iterator depth, which is a desired effect. It does not happen if is_open is +// marked non-inline. +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline bool value_iterator::is_open() const noexcept { + return _json_iter->depth() >= depth(); +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool value_iterator::at_end() const noexcept { + return _json_iter->at_end(); +} + +simdjson_inline bool value_iterator::at_start() const noexcept { + return _json_iter->token.position() == start_position(); +} + +simdjson_inline bool value_iterator::at_first_field() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + return _json_iter->token.position() == start_position() + 1; +} + +simdjson_inline void value_iterator::abandon() noexcept { + _json_iter->abandon(); +} + +simdjson_warn_unused simdjson_inline depth_t value_iterator::depth() const noexcept { + return _depth; +} +simdjson_warn_unused simdjson_inline error_code value_iterator::error() const noexcept { + return _json_iter->error; +} +simdjson_warn_unused simdjson_inline uint8_t *&value_iterator::string_buf_loc() noexcept { + return _json_iter->string_buf_loc(); +} +simdjson_warn_unused simdjson_inline const json_iterator &value_iterator::json_iter() const noexcept { + return *_json_iter; +} +simdjson_warn_unused simdjson_inline json_iterator &value_iterator::json_iter() noexcept { + return *_json_iter; +} + +simdjson_inline const uint8_t *value_iterator::peek_start() const noexcept { + return _json_iter->peek(start_position()); +} +simdjson_inline uint32_t value_iterator::peek_start_length() const noexcept { + return _json_iter->peek_length(start_position()); +} + +simdjson_inline const uint8_t *value_iterator::peek_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return peek_start(); } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return; } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept { + logger::log_start_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + const uint8_t *json; + if (!is_at_start()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + json = peek_start(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + } else { + assert_at_start(); + /** + * We should be prudent. Let us peek. If it is not the right type, we + * return an error. Only once we have determined that we have the right + * type are we allowed to advance! + */ + json = _json_iter->peek(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + _json_iter->return_current_and_advance(); + } + + + return SUCCESS; +} + + +simdjson_inline const uint8_t *value_iterator::peek_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_root(); + return _json_iter->peek(); +} +simdjson_inline const uint8_t *value_iterator::peek_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_non_root_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_root(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} +simdjson_inline void value_iterator::advance_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_non_root_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::incorrect_type_error(const char *message) const noexcept { + logger::log_error(*_json_iter, start_position(), depth(), message); + return INCORRECT_TYPE; +} + +simdjson_inline bool value_iterator::is_at_start() const noexcept { + return position() == start_position(); +} + +simdjson_inline bool value_iterator::is_at_key() const noexcept { + // Keys are at the same depth as the object. + // Note here that we could be safer and check that we are within an object, + // but we do not. + return _depth == _json_iter->_depth && *_json_iter->peek() == '"'; +} + +simdjson_inline bool value_iterator::is_at_iterator_start() const noexcept { + // We can legitimately be either at the first value ([1]), or after the array if it's empty ([]). + auto delta = position() - start_position(); + return delta == 1 || delta == 2; +} + +inline void value_iterator::assert_at_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_container_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position + 1 ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_next() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +simdjson_inline void value_iterator::move_at_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position); +} + +simdjson_inline void value_iterator::move_at_container_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position + 1); +} + +simdjson_inline simdjson_result value_iterator::reset_array() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_array(); +} + +simdjson_inline simdjson_result value_iterator::reset_object() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_object(); +} + +inline void value_iterator::assert_at_child() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth + 1 ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_root() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth == 1 ); +} + +inline void value_iterator::assert_at_non_root_start() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth > 1 ); +} + +inline void value_iterator::assert_is_valid() const noexcept { + SIMDJSON_ASSUME( _json_iter != nullptr ); +} + +simdjson_inline bool value_iterator::is_valid() const noexcept { + return _json_iter != nullptr; +} + +simdjson_inline simdjson_result value_iterator::type() const noexcept { + switch (*peek_start()) { + case '{': + return json_type::object; + case '[': + return json_type::array; + case '"': + return json_type::string; + case 'n': + return json_type::null; + case 't': case 'f': + return json_type::boolean; + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return json_type::number; + default: + return TAPE_ERROR; + } +} + +simdjson_inline token_position value_iterator::start_position() const noexcept { + return _start_position; +} + +simdjson_inline token_position value_iterator::position() const noexcept { + return _json_iter->position(); +} + +simdjson_inline token_position value_iterator::end_position() const noexcept { + return _json_iter->end_position(); +} + +simdjson_inline token_position value_iterator::last_position() const noexcept { + return _json_iter->last_position(); +} + +simdjson_inline error_code value_iterator::report_error(error_code error, const char *message) noexcept { + return _json_iter->report_error(error, message); +} + +} // namespace ondemand +} // namespace arm64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(arm64::ondemand::value_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/value_iterator-inl.h for arm64 */ +/* end file simdjson/generic/ondemand/amalgamated.h for arm64 */ +/* including simdjson/arm64/end.h: #include "simdjson/arm64/end.h" */ +/* begin file simdjson/arm64/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/arm64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#undef SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT +/* undefining SIMDJSON_IMPLEMENTATION from "arm64" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/arm64/end.h */ + +#endif // SIMDJSON_ARM64_ONDEMAND_H +/* end file simdjson/arm64/ondemand.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(fallback) +/* including simdjson/fallback/ondemand.h: #include "simdjson/fallback/ondemand.h" */ +/* begin file simdjson/fallback/ondemand.h */ +#ifndef SIMDJSON_FALLBACK_ONDEMAND_H +#define SIMDJSON_FALLBACK_ONDEMAND_H + +/* including simdjson/fallback/begin.h: #include "simdjson/fallback/begin.h" */ +/* begin file simdjson/fallback/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "fallback" */ +#define SIMDJSON_IMPLEMENTATION fallback +/* including simdjson/fallback/base.h: #include "simdjson/fallback/base.h" */ +/* begin file simdjson/fallback/base.h */ +#ifndef SIMDJSON_FALLBACK_BASE_H +#define SIMDJSON_FALLBACK_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Fallback implementation (runs on any machine). + */ +namespace fallback { + +class implementation; + +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_BASE_H +/* end file simdjson/fallback/base.h */ +/* including simdjson/fallback/bitmanipulation.h: #include "simdjson/fallback/bitmanipulation.h" */ +/* begin file simdjson/fallback/bitmanipulation.h */ +#ifndef SIMDJSON_FALLBACK_BITMANIPULATION_H +#define SIMDJSON_FALLBACK_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { + +#if defined(_MSC_VER) && !defined(_M_ARM64) && !defined(_M_X64) +static inline unsigned char _BitScanForward64(unsigned long* ret, uint64_t x) { + unsigned long x0 = (unsigned long)x, top, bottom; + _BitScanForward(&top, (unsigned long)(x >> 32)); + _BitScanForward(&bottom, x0); + *ret = x0 ? bottom : 32 + top; + return x != 0; +} +static unsigned char _BitScanReverse64(unsigned long* ret, uint64_t x) { + unsigned long x1 = (unsigned long)(x >> 32), top, bottom; + _BitScanReverse(&top, x1); + _BitScanReverse(&bottom, (unsigned long)x); + *ret = x1 ? top + 32 : bottom; + return x != 0; +} +#endif + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#ifdef _MSC_VER + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// _MSC_VER +} + +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_BITMANIPULATION_H +/* end file simdjson/fallback/bitmanipulation.h */ +/* including simdjson/fallback/stringparsing_defs.h: #include "simdjson/fallback/stringparsing_defs.h" */ +/* begin file simdjson/fallback/stringparsing_defs.h */ +#ifndef SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H +#define SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace { + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 1; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return c == '"'; } + simdjson_inline bool has_backslash() { return c == '\\'; } + simdjson_inline int quote_index() { return c == '"' ? 0 : 1; } + simdjson_inline int backslash_index() { return c == '\\' ? 0 : 1; } + + uint8_t c; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // store to dest unconditionally - we can overwrite the bits we don't like later + dst[0] = src[0]; + return { src[0] }; +} + +} // unnamed namespace +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_FALLBACK_STRINGPARSING_DEFS_H +/* end file simdjson/fallback/stringparsing_defs.h */ +/* including simdjson/fallback/numberparsing_defs.h: #include "simdjson/fallback/numberparsing_defs.h" */ +/* begin file simdjson/fallback/numberparsing_defs.h */ +#ifndef SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H +#define SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#ifdef JSON_TEST_NUMBERS // for unit testing +void found_invalid_number(const uint8_t *buf); +void found_integer(int64_t result, const uint8_t *buf); +void found_unsigned_integer(uint64_t result, const uint8_t *buf); +void found_float(double result, const uint8_t *buf); +#endif + +namespace simdjson { +namespace fallback { +namespace numberparsing { + +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const char *chars) { + uint64_t val; + memcpy(&val, chars, sizeof(uint64_t)); + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + return parse_eight_digits_unrolled(reinterpret_cast(chars)); +} + +#if SIMDJSON_IS_32BITS // _umul128 for x86, arm +// this is a slow emulation routine for 32-bit +// +static simdjson_inline uint64_t __emulu(uint32_t x, uint32_t y) { + return x * (uint64_t)y; +} +static simdjson_inline uint64_t _umul128(uint64_t ab, uint64_t cd, uint64_t *hi) { + uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd); + uint64_t bd = __emulu((uint32_t)ab, (uint32_t)cd); + uint64_t adbc = ad + __emulu((uint32_t)ab, (uint32_t)(cd >> 32)); + uint64_t adbc_carry = !!(adbc < ad); + uint64_t lo = bd + (adbc << 32); + *hi = __emulu((uint32_t)(ab >> 32), (uint32_t)(cd >> 32)) + (adbc >> 32) + + (adbc_carry << 32) + !!(lo < bd); + return lo; +} +#endif + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace fallback +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_FALLBACK_NUMBERPARSING_DEFS_H +/* end file simdjson/fallback/numberparsing_defs.h */ +/* end file simdjson/fallback/begin.h */ +/* including simdjson/generic/ondemand/amalgamated.h for fallback: #include "simdjson/generic/ondemand/amalgamated.h" */ +/* begin file simdjson/generic/ondemand/amalgamated.h for fallback */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H) +#error simdjson/generic/ondemand/dependencies.h must be included before simdjson/generic/ondemand/amalgamated.h! +#endif + +// Stuff other things depend on +/* including simdjson/generic/ondemand/base.h for fallback: #include "simdjson/generic/ondemand/base.h" */ +/* begin file simdjson/generic/ondemand/base.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +/** + * A fast, simple, DOM-like interface that parses JSON as you use it. + * + * Designed for maximum speed and a lower memory profile. + */ +namespace ondemand { + +/** Represents the depth of a JSON value (number of nested arrays/objects). */ +using depth_t = int32_t; + +/** @copydoc simdjson::fallback::number_type */ +using number_type = simdjson::fallback::number_type; + +/** @private Position in the JSON buffer indexes */ +using token_position = const uint32_t *; + +class array; +class array_iterator; +class document; +class document_reference; +class document_stream; +class field; +class json_iterator; +enum class json_type; +struct number; +class object; +class object_iterator; +class parser; +class raw_json_string; +class token_iterator; +class value; +class value_iterator; + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_BASE_H +/* end file simdjson/generic/ondemand/base.h for fallback */ +/* including simdjson/generic/ondemand/value_iterator.h for fallback: #include "simdjson/generic/ondemand/value_iterator.h" */ +/* begin file simdjson/generic/ondemand/value_iterator.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * Iterates through a single JSON value at a particular depth. + * + * Does not keep track of the type of value: provides methods for objects, arrays and scalars and expects + * the caller to call the right ones. + * + * @private This is not intended for external use. + */ +class value_iterator { +protected: + /** The underlying JSON iterator */ + json_iterator *_json_iter{}; + /** The depth of this value */ + depth_t _depth{}; + /** + * The starting token index for this value + */ + token_position _start_position{}; + +public: + simdjson_inline value_iterator() noexcept = default; + + /** + * Denote that we're starting a document. + */ + simdjson_inline void start_document() noexcept; + + /** + * Skips a non-iterated or partially-iterated JSON value, whether it is a scalar, array or object. + * + * Optimized for scalars. + */ + simdjson_warn_unused simdjson_inline error_code skip_child() noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is at the start of the value + */ + simdjson_inline bool at_start() const noexcept; + + /** + * Tell whether the value is open--if the value has not been used, or the array/object is still open. + */ + simdjson_inline bool is_open() const noexcept; + + /** + * Tell whether the value is at an object's first field (just after the {). + */ + simdjson_inline bool at_first_field() const noexcept; + + /** + * Abandon all iteration. + */ + simdjson_inline void abandon() noexcept; + + /** + * Get the child value as a value_iterator. + */ + simdjson_inline value_iterator child_value() const noexcept; + + /** + * Get the depth of this value. + */ + simdjson_inline int32_t depth() const noexcept; + + /** + * Get the JSON type of this value. + * + * @error TAPE_ERROR when the JSON value is a bad token like "}" "," or "alse". + */ + simdjson_inline simdjson_result type() const noexcept; + + /** + * @addtogroup object Object iteration + * + * Methods to iterate and find object fields. These methods generally *assume* the value is + * actually an object; the caller is responsible for keeping track of that fact. + * + * @{ + */ + + /** + * Start an object iteration. + * + * @returns Whether the object had any fields (returns false for empty). + * @error INCORRECT_TYPE if there is no opening { + */ + simdjson_warn_unused simdjson_inline simdjson_result start_object() noexcept; + /** + * Start an object iteration from the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_object() noexcept; + /** + * Checks whether an object could be started from the root. May be called by start_root_object. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_object() noexcept; + /** + * Start an object iteration after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_object() noexcept; + /** + * Start an object iteration from the root, after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_object() noexcept; + + /** + * Moves to the next field in an object. + * + * Looks for , and }. If } is found, the object is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_field() noexcept; + + /** + * Get the current field's key. + */ + simdjson_warn_unused simdjson_inline simdjson_result field_key() noexcept; + + /** + * Pass the : in the field and move to its value. + */ + simdjson_warn_unused simdjson_inline error_code field_value() noexcept; + + /** + * Find the next field with the given key. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline error_code find_field(const std::string_view key) noexcept; + + /** + * Find the next field with the given key, *without* unescaping. This assumes object order: it + * will not find the field if it was already passed when looking for some *other* field. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_raw(const std::string_view key) noexcept; + + /** + * Find the field with the given key without regard to order, and *without* unescaping. + * + * This is an unordered object lookup: if the field is not found initially, it will cycle around and scan from the beginning. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_unordered_raw(const std::string_view key) noexcept; + + /** @} */ + + /** + * @addtogroup array Array iteration + * Methods to iterate over array elements. These methods generally *assume* the value is actually + * an object; the caller is responsible for keeping track of that fact. + * @{ + */ + + /** + * Check for an opening [ and start an array iteration. + * + * @returns Whether the array had any elements (returns false for empty). + * @error INCORRECT_TYPE If there is no [. + */ + simdjson_warn_unused simdjson_inline simdjson_result start_array() noexcept; + /** + * Check for an opening [ and start an array iteration while at the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_array() noexcept; + /** + * Checks whether an array could be started from the root. May be called by start_root_array. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_array() noexcept; + /** + * Start an array iteration, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_array() noexcept; + /** + * Start an array iteration from the root, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_array() noexcept; + + /** + * Moves to the next element in an array. + * + * Looks for , and ]. If ] is found, the array is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return Whether there is another element in the array. + * @error TAPE_ERROR If there is a comma missing between elements. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_element() noexcept; + + /** + * Get a child value iterator. + */ + simdjson_warn_unused simdjson_inline value_iterator child() const noexcept; + + /** @} */ + + /** + * @defgroup scalar Scalar values + * @addtogroup scalar + * @{ + */ + + simdjson_warn_unused simdjson_inline simdjson_result get_string(bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_bool() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_null() noexcept; + simdjson_warn_unused simdjson_inline bool is_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_integer() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + simdjson_warn_unused simdjson_inline simdjson_result get_root_string(bool check_trailing, bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_wobbly_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_raw_json_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_bool(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline bool is_root_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_integer(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number_type(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_null(bool check_trailing) noexcept; + + simdjson_inline error_code error() const noexcept; + simdjson_inline uint8_t *&string_buf_loc() noexcept; + simdjson_inline const json_iterator &json_iter() const noexcept; + simdjson_inline json_iterator &json_iter() noexcept; + + simdjson_inline void assert_is_valid() const noexcept; + simdjson_inline bool is_valid() const noexcept; + + /** @} */ +protected: + /** + * Restarts an array iteration. + * @returns Whether the array has any elements (returns false for empty). + */ + simdjson_inline simdjson_result reset_array() noexcept; + /** + * Restarts an object iteration. + * @returns Whether the object has any fields (returns false for empty). + */ + simdjson_inline simdjson_result reset_object() noexcept; + /** + * move_at_start(): moves us so that we are pointing at the beginning of + * the container. It updates the index so that at_start() is true and it + * syncs the depth. The user can then create a new container instance. + * + * Usage: used with value::count_elements(). + **/ + simdjson_inline void move_at_start() noexcept; + + /** + * move_at_container_start(): moves us so that we are pointing at the beginning of + * the container so that assert_at_container_start() passes. + * + * Usage: used with reset_array() and reset_object(). + **/ + simdjson_inline void move_at_container_start() noexcept; + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + simdjson_inline value_iterator(json_iterator *json_iter, depth_t depth, token_position start_index) noexcept; + + simdjson_inline simdjson_result parse_null(const uint8_t *json) const noexcept; + simdjson_inline simdjson_result parse_bool(const uint8_t *json) const noexcept; + simdjson_inline const uint8_t *peek_start() const noexcept; + simdjson_inline uint32_t peek_start_length() const noexcept; + + /** + * The general idea of the advance_... methods and the peek_* methods + * is that you first peek and check that you have desired type. If you do, + * and only if you do, then you advance. + * + * We used to unconditionally advance. But this made reasoning about our + * current state difficult. + * Suppose you always advance. Look at the 'value' matching the key + * "shadowable" in the following example... + * + * ({"globals":{"a":{"shadowable":[}}}}) + * + * If the user thinks it is a Boolean and asks for it, then we check the '[', + * decide it is not a Boolean, but still move into the next character ('}'). Now + * we are left pointing at '}' right after a '['. And we have not yet reported + * an error, only that we do not have a Boolean. + * + * If, instead, you just stand your ground until it is content that you know, then + * you will only even move beyond the '[' if the user tells you that you have an + * array. So you will be at the '}' character inside the array and, hopefully, you + * will then catch the error because an array cannot start with '}', but the code + * processing Boolean values does not know this. + * + * So the contract is: first call 'peek_...' and then call 'advance_...' only + * if you have determined that it is a type you can handle. + * + * Unfortunately, it makes the code more verbose, longer and maybe more error prone. + */ + + simdjson_inline void advance_scalar(const char *type) noexcept; + simdjson_inline void advance_root_scalar(const char *type) noexcept; + simdjson_inline void advance_non_root_scalar(const char *type) noexcept; + + simdjson_inline const uint8_t *peek_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_root_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_non_root_scalar(const char *type) noexcept; + + + simdjson_inline error_code start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept; + simdjson_inline error_code end_container() noexcept; + + /** + * Advance to a place expecting a value (increasing depth). + * + * @return The current token (the one left behind). + * @error TAPE_ERROR If the document ended early. + */ + simdjson_inline simdjson_result advance_to_value() noexcept; + + simdjson_inline error_code incorrect_type_error(const char *message) const noexcept; + simdjson_inline error_code error_unless_more_tokens(uint32_t tokens=1) const noexcept; + + simdjson_inline bool is_at_start() const noexcept; + /** + * is_at_iterator_start() returns true on an array or object after it has just been + * created, whether the instance is empty or not. + * + * Usage: used by array::begin() in debug mode (SIMDJSON_DEVELOPMENT_CHECKS) + */ + simdjson_inline bool is_at_iterator_start() const noexcept; + + /** + * Assuming that we are within an object, this returns true if we + * are pointing at a key. + * + * Usage: the skip_child() method should never be used while we are pointing + * at a key inside an object. + */ + simdjson_inline bool is_at_key() const noexcept; + + inline void assert_at_start() const noexcept; + inline void assert_at_container_start() const noexcept; + inline void assert_at_root() const noexcept; + inline void assert_at_child() const noexcept; + inline void assert_at_next() const noexcept; + inline void assert_at_non_root_start() const noexcept; + + /** Get the starting position of this value */ + simdjson_inline token_position start_position() const noexcept; + + /** @copydoc error_code json_iterator::position() const noexcept; */ + simdjson_inline token_position position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position last_position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position end_position() const noexcept; + /** @copydoc error_code json_iterator::report_error(error_code error, const char *message) noexcept; */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + friend class document; + friend class object; + friend class array; + friend class value; +}; // value_iterator + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::value_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H +/* end file simdjson/generic/ondemand/value_iterator.h for fallback */ +/* including simdjson/generic/ondemand/value.h for fallback: #include "simdjson/generic/ondemand/value.h" */ +/* begin file simdjson/generic/ondemand/value.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * 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. + */ +class value { +public: + /** + * Create a new invalid value. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline value() noexcept = default; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) noexcept; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() noexcept; + + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() noexcept; + + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + + /** + * Cast this JSON value (inside string) to a unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + + /** + * Cast this JSON value to a "wobbly" string. + * + * The string is may not be a valid UTF-8 string. + * See https://simonsapin.github.io/wtf-8/ + * + * Important: a value should be consumed once. Calling get_wobbly_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * @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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); +#endif + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + * + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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). + * + * @return 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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the value is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the value is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the value is an integer number. 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). + * + * 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. However, if this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view is guaranteed to be + * a non-space token. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + * + * See also value::raw_json(). + */ + simdjson_inline std::string_view raw_json_token() noexcept; + + /** + * Get a string_view pointing at this value in the JSON document. + * If this element is an array or an object, it consumes the array or the object + * and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + * If this element is a scalar (string, number, Boolean, null), it returns what + * raw_json_token() would return. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + simdjson_inline simdjson_result current_location() noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. + * + * Calling at_pointer() on non-document instances (e.g., arrays and objects) is not + * standardized (by RFC 6901). We provide some experimental support for JSON pointers + * on non-document instances. Yet it is not the case when calling at_pointer on an array + * or an object instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + +protected: + /** + * Create a value. + */ + simdjson_inline value(const value_iterator &iter) noexcept; + + /** + * Skip this value, allowing iteration to continue. + */ + simdjson_inline void skip() noexcept; + + /** + * Start a value at the current position. + * + * (It should already be started; this is just a self-documentation method.) + */ + static simdjson_inline value start(const value_iterator &iter) noexcept; + + /** + * Resume a value. + */ + static simdjson_inline value resume(const value_iterator &iter) noexcept; + + /** + * Get the object, starting or resuming it as necessary + */ + simdjson_inline simdjson_result start_or_resume_object() noexcept; + + // simdjson_inline void log_value(const char *type) const noexcept; + // simdjson_inline void log_error(const char *message) const noexcept; + + value_iterator iter{}; + + friend class document; + friend class array_iterator; + friend class field; + friend class object; + friend struct simdjson_result; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::value &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result get_array() noexcept; + simdjson_inline simdjson_result get_object() noexcept; + + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() noexcept; + + template simdjson_inline error_code get(T &out) noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator fallback::ondemand::array() noexcept(false); + simdjson_inline operator fallback::ondemand::object() noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator fallback::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * 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). + */ + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + + /** @copydoc simdjson_inline std::string_view value::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + + /** @copydoc simdjson_inline simdjson_result current_location() noexcept */ + simdjson_inline simdjson_result current_location() noexcept; + /** @copydoc simdjson_inline int32_t current_depth() const noexcept */ + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_H +/* end file simdjson/generic/ondemand/value.h for fallback */ +/* including simdjson/generic/ondemand/logger.h for fallback: #include "simdjson/generic/ondemand/logger.h" */ +/* begin file simdjson/generic/ondemand/logger.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +// Logging should be free unless SIMDJSON_VERBOSE_LOGGING is set. Importantly, it is critical +// that the call to the log functions be side-effect free. Thus, for example, you should not +// create temporary std::string instances. +namespace logger { + +enum class log_level : int32_t { + info = 0, + error = 1 +}; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + +// We do not want these functions to be 'really inlined' since real inlining is +// for performance purposes and if you are using the loggers, you do not care about +// performance (or should not). +static inline void log_headers() noexcept; +// If args are provided, title will be treated as format string +template +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; +template +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; +static inline void log_event(const json_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_value(const json_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_start_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; + +static inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail="") noexcept; +static inline void log_error(const json_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +static inline void log_event(const value_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const value_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_error(const value_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +} // namespace logger +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_H +/* end file simdjson/generic/ondemand/logger.h for fallback */ +/* including simdjson/generic/ondemand/token_iterator.h for fallback: #include "simdjson/generic/ondemand/token_iterator.h" */ +/* begin file simdjson/generic/ondemand/token_iterator.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * Iterates through JSON tokens (`{` `}` `[` `]` `,` `:` `""` `123` `true` `false` `null`) + * detected by stage 1. + * + * @private This is not intended for external use. + */ +class token_iterator { +public: + /** + * Create a new invalid token_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline token_iterator() noexcept = default; + simdjson_inline token_iterator(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator &operator=(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator(const token_iterator &other) noexcept = default; + simdjson_inline token_iterator &operator=(const token_iterator &other) noexcept = default; + + /** + * Advance to the next token (returning the current one). + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + /** + * Reports the current offset in bytes from the start of the underlying buffer. + */ + simdjson_inline uint32_t current_offset() const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + + /** + * Return the current index. + */ + simdjson_inline token_position position() const noexcept; + /** + * Reset to a previously saved index. + */ + simdjson_inline void set_position(token_position target_position) noexcept; + + // NOTE: we don't support a full C++ iterator interface, because we expect people to make + // different calls to advance the iterator based on *their own* state. + + simdjson_inline bool operator==(const token_iterator &other) const noexcept; + simdjson_inline bool operator!=(const token_iterator &other) const noexcept; + simdjson_inline bool operator>(const token_iterator &other) const noexcept; + simdjson_inline bool operator>=(const token_iterator &other) const noexcept; + simdjson_inline bool operator<(const token_iterator &other) const noexcept; + simdjson_inline bool operator<=(const token_iterator &other) const noexcept; + +protected: + simdjson_inline token_iterator(const uint8_t *buf, token_position position) noexcept; + + /** + * Get the index of the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_index(int32_t delta=0) const noexcept; + /** + * Get the index of the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline uint32_t peek_index(token_position position) const noexcept; + + const uint8_t *buf{}; + token_position _position{}; + + friend class json_iterator; + friend class value_iterator; + friend class object; + template + 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; + template + 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; +}; + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::token_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H +/* end file simdjson/generic/ondemand/token_iterator.h for fallback */ +/* including simdjson/generic/ondemand/json_iterator.h for fallback: #include "simdjson/generic/ondemand/json_iterator.h" */ +/* begin file simdjson/generic/ondemand/json_iterator.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * Iterates through JSON tokens, keeping track of depth and string buffer. + * + * @private This is not intended for external use. + */ +class json_iterator { +protected: + token_iterator token{}; + ondemand::parser *parser{}; + /** + * Next free location in the string buffer. + * + * Used by raw_json_string::unescape() to have a place to unescape strings to. + */ + uint8_t *_string_buf_loc{}; + /** + * JSON error, if there is one. + * + * INCORRECT_TYPE and NO_SUCH_FIELD are *not* stored here, ever. + * + * PERF NOTE: we *hope* this will be elided into control flow, as it is only used (a) in the first + * iteration of the loop, or (b) for the final iteration after a missing comma is found in ++. If + * this is not elided, we should make sure it's at least not using up a register. Failing that, + * we should store it in document so there's only one of them. + */ + error_code error{SUCCESS}; + /** + * Depth of the current token in the JSON. + * + * - 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. + */ + depth_t _depth{}; + /** + * Beginning of the document indexes. + * Normally we have root == parser->implementation->structural_indexes.get() + * but this may differ, especially in streaming mode (where we have several + * documents); + */ + token_position _root{}; + /** + * Normally, a json_iterator operates over a single document, but in + * some cases, we may have a stream of documents. This attribute is meant + * as meta-data: the json_iterator works the same irrespective of the + * value of this attribute. + */ + bool _streaming{false}; + +public: + simdjson_inline json_iterator() noexcept = default; + simdjson_inline json_iterator(json_iterator &&other) noexcept; + simdjson_inline json_iterator &operator=(json_iterator &&other) noexcept; + simdjson_inline explicit json_iterator(const json_iterator &other) noexcept = default; + simdjson_inline json_iterator &operator=(const json_iterator &other) noexcept = default; + /** + * Skips a JSON value, whether it is a scalar, array or object. + */ + simdjson_warn_unused simdjson_inline error_code skip_child(depth_t parent_depth) noexcept; + + /** + * Tell whether the iterator is still at the start + */ + simdjson_inline bool at_root() const noexcept; + + /** + * Tell whether we should be expected to run in streaming + * mode (iterating over many documents). It is pure metadata + * that does not affect how the iterator works. It is used by + * start_root_array() and start_root_object(). + */ + simdjson_inline bool streaming() const noexcept; + + /** + * Get the root value iterator + */ + simdjson_inline token_position root_position() const noexcept; + /** + * Assert that we are at the document depth (== 1) + */ + simdjson_inline void assert_at_document_depth() const noexcept; + /** + * Assert that we are at the root of the document + */ + simdjson_inline void assert_at_root() const noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is live (has not been moved). + */ + simdjson_inline bool is_alive() const noexcept; + + /** + * Abandon this iterator, setting depth to 0 (as if the document is finished). + */ + simdjson_inline void abandon() noexcept; + + /** + * Advance the current token without modifying depth. + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + + /** + * Returns true if there is a single token in the index (i.e., it is + * a JSON with a scalar value such as a single number). + * + * @return whether there is a single token + */ + simdjson_inline bool is_single_token() const noexcept; + + /** + * Assert that there are at least the given number of tokens left. + * + * Has no effect in release builds. + */ + simdjson_inline void assert_more_tokens(uint32_t required_tokens=1) const noexcept; + /** + * Assert that the given position addresses an actual token (is within bounds). + * + * Has no effect in release builds. + */ + simdjson_inline void assert_valid_position(token_position position) const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + /** + * Get a pointer to the current location in the input buffer. + * + * This is not null-terminated; it is a view into the JSON. + * + * You may be pointing outside of the input buffer: it is not generally + * safe to dereference this pointer. + */ + simdjson_inline const uint8_t *unsafe_pointer() const noexcept; + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token to retrieve. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token to retrieve. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + /** + * Get the JSON text for the last token in the document. + * + * This is not null-terminated; it is a view into the JSON. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek_last() const noexcept; + + /** + * Ascend one level. + * + * Validates that the depth - 1 == parent_depth. + * + * @param parent_depth the expected parent depth. + */ + simdjson_inline void ascend_to(depth_t parent_depth) noexcept; + + /** + * Descend one level. + * + * Validates that the new depth == child_depth. + * + * @param child_depth the expected child depth. + */ + simdjson_inline void descend_to(depth_t child_depth) noexcept; + simdjson_inline void descend_to(depth_t child_depth, int32_t delta) noexcept; + + /** + * Get current depth. + */ + simdjson_inline depth_t depth() const noexcept; + + /** + * Get current (writeable) location in the string buffer. + */ + simdjson_inline uint8_t *&string_buf_loc() noexcept; + + /** + * Report an unrecoverable error, preventing further iteration. + * + * @param error The error to report. Must not be SUCCESS, UNINITIALIZED, INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + /** + * Log error, but don't stop iteration. + * @param error The error to report. Must be INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code optional_error(error_code error, const char *message) noexcept; + + /** + * Take an input in json containing max_len characters and attempt to copy it over to tmpbuf, a buffer with + * N bytes of capacity. It will return false if N is too small (smaller than max_len) of if it is zero. + * The buffer (tmpbuf) is padded with space characters. + */ + simdjson_warn_unused simdjson_inline bool copy_to_buffer(const uint8_t *json, uint32_t max_len, uint8_t *tmpbuf, size_t N) noexcept; + + simdjson_inline token_position position() const noexcept; + /** + * Write the raw_json_string to the string buffer and return a string_view. + * Each raw_json_string should be unescaped once, or else the string buffer might + * overflow. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, bool allow_replacement) noexcept; + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in) noexcept; + + simdjson_inline void reenter_child(token_position position, depth_t child_depth) noexcept; + + simdjson_inline error_code consume_character(char c) noexcept; +#if SIMDJSON_DEVELOPMENT_CHECKS + simdjson_inline token_position start_position(depth_t depth) const noexcept; + simdjson_inline void set_start_position(depth_t depth, token_position position) noexcept; +#endif + + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Updates this json iterator so that it is back at the beginning of the document, + * as if it had just been created. + */ + inline void rewind() noexcept; + /** + * This checks whether the {,},[,] are balanced so that the document + * ends with proper zero depth. This requires scanning the whole document + * and it may be expensive. It is expected that it will be rarely called. + * It does not attempt to match { with } and [ with ]. + */ + inline bool balanced() const noexcept; +protected: + simdjson_inline json_iterator(const uint8_t *buf, ondemand::parser *parser) noexcept; + /// The last token before the end + simdjson_inline token_position last_position() const noexcept; + /// The token *at* the end. This points at gibberish and should only be used for comparison. + simdjson_inline token_position end_position() const noexcept; + /// The end of the buffer. + simdjson_inline token_position end() const noexcept; + + friend class document; + friend class document_stream; + friend class object; + friend class array; + friend class value; + friend class raw_json_string; + friend class parser; + friend class value_iterator; + template + 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; + template + 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; +}; // json_iterator + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::json_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H +/* end file simdjson/generic/ondemand/json_iterator.h for fallback */ +/* including simdjson/generic/ondemand/json_type.h for fallback: #include "simdjson/generic/ondemand/json_type.h" */ +/* begin file simdjson/generic/ondemand/json_type.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * The type of a JSON value. + */ +enum class json_type { + // Start at 1 to catch uninitialized / default values more easily + array=1, ///< A JSON array ( [ 1, 2, 3 ... ] ) + 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" ...) + boolean, ///< A JSON boolean (true or false) + null ///< A JSON null (null) +}; + +/** + * A type representing a JSON number. + * The design of the struct is deliberately straight-forward. All + * functions return standard values with no error check. + */ +struct number { + + /** + * 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 + * }; + */ + simdjson_inline ondemand::number_type get_number_type() const noexcept; + /** + * return true if the automatically determined type of + * the number is number_type::unsigned_integer. + */ + simdjson_inline bool is_uint64() const noexcept; + /** + * return the value as a uint64_t, only valid if is_uint64() is true. + */ + simdjson_inline uint64_t get_uint64() const noexcept; + simdjson_inline operator uint64_t() const noexcept; + + /** + * return true if the automatically determined type of + * the number is number_type::signed_integer. + */ + simdjson_inline bool is_int64() const noexcept; + /** + * return the value as a int64_t, only valid if is_int64() is true. + */ + simdjson_inline int64_t get_int64() const noexcept; + simdjson_inline operator int64_t() const noexcept; + + + /** + * return true if the automatically determined type of + * the number is number_type::floating_point_number. + */ + simdjson_inline bool is_double() const noexcept; + /** + * return the value as a double, only valid if is_double() is true. + */ + simdjson_inline double get_double() const noexcept; + simdjson_inline operator double() const noexcept; + + /** + * Convert the number to a double. Though it always succeed, the conversion + * may be lossy if the number cannot be represented exactly. + */ + simdjson_inline double as_double() const noexcept; + + +protected: + /** + * The next block of declaration is designed so that we can call the number parsing + * functions on a number type. They are protected and should never be used outside + * of the core simdjson library. + */ + friend class value_iterator; + template + friend error_code numberparsing::slow_float_parsing(simdjson_unused const uint8_t * src, W writer); + template + 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); + template + friend error_code numberparsing::parse_number(const uint8_t *const src, W &writer); + /** Store a signed 64-bit value to the number. */ + simdjson_inline void append_s64(int64_t value) noexcept; + /** Store an unsigned 64-bit value to the number. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + /** Store a double value to the number. */ + simdjson_inline void append_double(double value) noexcept; + /** Specifies that the value is a double, but leave it undefined. */ + simdjson_inline void skip_double() noexcept; + /** + * End of friend declarations. + */ + + /** + * Our attributes are a union type (size = 64 bits) + * followed by a type indicator. + */ + union { + double floating_point_number; + int64_t signed_integer; + uint64_t unsigned_integer; + } payload{0}; + number_type type{number_type::signed_integer}; +}; + +/** + * Write the JSON type to the output stream + * + * @param out The output stream. + * @param type The json_type. + */ +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept; + +#if SIMDJSON_EXCEPTIONS +/** + * Send JSON type to an output stream. + * + * @param out The output stream. + * @param type The json_type. + * @throw simdjson_error if the result being printed has an error. If there is an error with the + * underlying output stream, that error will be propagated (simdjson_error will not be + * thrown). + */ +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false); +#endif + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::json_type &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H +/* end file simdjson/generic/ondemand/json_type.h for fallback */ +/* including simdjson/generic/ondemand/raw_json_string.h for fallback: #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * A string escaped per JSON rules, terminated with quote ("). They are used to represent + * unescaped keys inside JSON documents. + * + * (In other words, a pointer to the beginning of a string, just after the start quote, inside a + * JSON file.) + * + * This class is deliberately simplistic and has little functionality. You can + * compare a raw_json_string instance with an unescaped C string, but + * that is nearly all you can do. + * + * 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(). + * + */ +class raw_json_string { +public: + /** + * Create a new invalid raw_json_string. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline raw_json_string() noexcept = default; + + /** + * Create a new invalid raw_json_string pointed at the given location in the JSON. + * + * 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. + */ + simdjson_inline raw_json_string(const uint8_t * _buf) noexcept; + /** + * 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. + */ + simdjson_inline const char * raw() const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done) on target.size() characters, + * and if the raw_json_string instance has a quote character at byte index target.size(). + * We never read more than length + 1 bytes in the raw_json_string instance. + * If length is smaller than target.size(), this will return false. + * + * 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. + */ + 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-byte equal (no escaping is done). + * The std::string_view instance should not contain unescaped quote characters: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * Performance: the comparison is done byte-by-byte which might be inefficient for + * long strings. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + * The provided C string should not contain an unescaped quote character: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(const char* target) const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(const char* target) const noexcept; + + /** + * 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!). + */ + static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept; + static simdjson_inline bool is_free_from_unescaped_quote(const char* target) noexcept; + +private: + + + /** + * This will set the inner pointer to zero, effectively making + * this instance unusable. + */ + simdjson_inline void consume() noexcept { buf = nullptr; } + + /** + * Checks whether the inner pointer is non-null and thus usable. + */ + simdjson_inline simdjson_warn_unused bool alive() const noexcept { return buf != nullptr; } + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result will be a valid UTF-8. + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + * @param allow_replacement Whether we allow replacement of invalid surrogate pairs. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape(json_iterator &iter, bool allow_replacement) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result may not be a valid UTF-8. https://simonsapin.github.io/wtf-8/ + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(json_iterator &iter) const noexcept; + const uint8_t * buf{}; + friend class object; + friend class field; + friend class parser; + friend struct simdjson_result; +}; + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &, const raw_json_string &) noexcept; + +/** + * 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. + */ +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept; +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept; + + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::raw_json_string &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private + + simdjson_inline simdjson_result raw() const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape(fallback::ondemand::json_iterator &iter, bool allow_replacement) const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(fallback::ondemand::json_iterator &iter) const noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H +/* end file simdjson/generic/ondemand/raw_json_string.h for fallback */ +/* including simdjson/generic/ondemand/parser.h for fallback: #include "simdjson/generic/ondemand/parser.h" */ +/* begin file simdjson/generic/ondemand/parser.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * The default batch size for document_stream instances for this On Demand kernel. + * Note that different On Demand kernel may use a different DEFAULT_BATCH_SIZE value + * in the future. + */ +static constexpr size_t DEFAULT_BATCH_SIZE = 1000000; +/** + * Some adversary might try to set the batch size to 0 or 1, which might cause problems. + * We set a minimum of 32B since anything else is highly likely to be an error. In practice, + * most users will want a much larger batch size. + * + * All non-negative MINIMAL_BATCH_SIZE values should be 'safe' except that, obviously, no JSON + * document can ever span 0 or 1 byte and that very large values would create memory allocation issues. + */ +static constexpr size_t MINIMAL_BATCH_SIZE = 32; + +/** + * A JSON fragment iterator. + * + * This holds the actual iterator as well as the buffer for writing strings. + */ +class parser { +public: + /** + * Create a JSON parser. + * + * The new parser will have zero capacity. + */ + inline explicit parser(size_t max_capacity = SIMDJSON_MAXSIZE_BYTES) noexcept; + + inline parser(parser &&other) noexcept = default; + simdjson_inline parser(const parser &other) = delete; + simdjson_inline parser &operator=(const parser &other) = delete; + simdjson_inline parser &operator=(parser &&other) noexcept = default; + + /** Deallocate the JSON parser. */ + inline ~parser() noexcept = default; + + /** + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * document doc = parser.iterate(json); + * + * It is expected that the content is a valid UTF-8 file, containing a valid JSON document. + * Otherwise the iterate method may return an error. In particular, the whole input should be + * valid: we do not attempt to tolerate incorrect content either before or after a JSON + * document. If there is a UTF-8 BOM, the parser skips it. + * + * ### IMPORTANT: Validate what you use + * + * Calling iterate on an invalid JSON document may not immediately trigger an error. The call to + * iterate does not parse and validate the whole document. + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * @param len The length of the JSON. + * @param capacity The number of bytes allocated in the JSON (must be at least len+SIMDJSON_PADDING). + * + * @return The document, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate(padded_string_view json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const char *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const uint8_t *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string_view json, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(padded_string &&json) & noexcept = delete; + + /** + * @private + * + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * json_iterator doc = parser.iterate(json); + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * The ondemand::document instance holds the iterator. The document must remain in scope + * while you are accessing instances of ondemand::value, ondemand::object, ondemand::array. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * + * @return The iterator, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate_raw(padded_string_view json) & noexcept; + + + /** + * Parse a buffer containing many JSON documents. + * + * auto json = R"({ "foo": 1 } { "foo": 2 } { "foo": 3 } )"_padded; + * ondemand::parser parser; + * ondemand::document_stream docs = parser.iterate_many(json); + * for (auto & doc : docs) { + * std::cout << doc["foo"] << std::endl; + * } + * // Prints 1 2 3 + * + * No copy of the input buffer is made. + * + * The function is lazy: it may be that no more than one JSON document at a time is parsed. + * + * The caller is responsabile to ensure that the input string data remains unchanged and is + * not deleted during the loop. + * + * ### Format + * + * The buffer must contain a series of one or more JSON documents, concatenated into a single + * buffer, separated by ASCII whitespace. It effectively parses until it has a fully valid document, + * then starts parsing the next document at that point. (It does this with more parallelism and + * lookahead than you might think, though.) + * + * documents that consist of an object or array may omit the whitespace between them, concatenating + * with no separator. Documents that consist of a single primitive (i.e. documents that are not + * arrays or objects) MUST be separated with ASCII whitespace. + * + * The characters inside a JSON document, and between JSON documents, must be valid Unicode (UTF-8). + * If there is a UTF-8 BOM, the parser skips it. + * + * The documents must not exceed batch_size bytes (by default 1MB) or they will fail to parse. + * Setting batch_size to excessively large or excessively small values may impact negatively the + * performance. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * ### Threads + * + * When compiled with SIMDJSON_THREADS_ENABLED, this method will use a single thread under the + * hood to do some lookahead. + * + * ### Parser Capacity + * + * If the parser's current capacity is less than batch_size, it will allocate enough capacity + * to handle it (up to max_capacity). + * + * @param buf The concatenated JSON to parse. + * @param len The length of the concatenated JSON. + * @param batch_size The batch size to use. MUST be larger than the largest document. The sweet + * spot is cache-related: small enough to fit in cache, yet big enough to + * parse as many documents as possible in one tight loop. + * Defaults to 10MB, which has been a reasonable sweet spot in our tests. + * @param allow_comma_separated (defaults on false) This allows a mode where the documents are + * separated by commas instead of whitespace. It comes with a performance + * penalty because the entire document is indexed at once (and the document must be + * less than 4 GB), and there is no multithreading. In this mode, the batch_size parameter + * is effectively ignored, as it is set to at least the document size. + * @return The stream, or an error. An empty input will yield 0 documents rather than an EMPTY error. Errors: + * - MEMALLOC if the parser does not have enough capacity and memory allocation fails + * - CAPACITY if the parser does not have enough capacity and batch_size > max_capacity. + * - other json errors if parsing fails. You should not rely on these errors to always the same for the + * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). + */ + inline simdjson_result iterate_many(const uint8_t *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const char *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const std::string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const std::string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const padded_string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const padded_string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + + /** @private We do not want to allow implicit conversion from C string to std::string. */ + simdjson_result iterate_many(const char *buf, size_t batch_size = DEFAULT_BATCH_SIZE) noexcept = delete; + + /** The capacity of this parser (the largest document it can process). */ + simdjson_inline size_t capacity() const noexcept; + /** The maximum capacity of this parser (the largest document it is allowed to process). */ + simdjson_inline size_t max_capacity() const noexcept; + simdjson_inline void set_max_capacity(size_t max_capacity) noexcept; + /** + * 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. + */ + simdjson_inline size_t max_depth() const noexcept; + + /** + * Ensure this parser has enough memory to process JSON documents up to `capacity` bytes in length + * and `max_depth` depth. + * + * The max_depth 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. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. Defaults to DEFAULT_MAX_DEPTH. + * @return The error, if there is one. + */ + simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept; + + #ifdef SIMDJSON_THREADS_ENABLED + /** + * The parser instance can use threads when they are available to speed up some + * operations. It is enabled by default. Changing this attribute will change the + * behavior of the parser for future operations. + */ + bool threaded{true}; + #endif + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result must be valid UTF-8. + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @param allow_replacement Whether we allow a replacement if the input string contains unmatched surrogate pairs. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement = false) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result may not be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept; + +private: + /** @private [for benchmarking access] The implementation to use */ + std::unique_ptr implementation{}; + size_t _capacity{0}; + size_t _max_capacity; + size_t _max_depth{DEFAULT_MAX_DEPTH}; + std::unique_ptr string_buf{}; +#if SIMDJSON_DEVELOPMENT_CHECKS + std::unique_ptr start_positions{}; +#endif + + friend class json_iterator; + friend class document_stream; +}; + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::parser &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_H +/* end file simdjson/generic/ondemand/parser.h for fallback */ + +// All other declarations +/* including simdjson/generic/ondemand/array.h for fallback: #include "simdjson/generic/ondemand/array.h" */ +/* begin file simdjson/generic/ondemand/array.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * A forward-only JSON array. + */ +class array { +public: + /** + * Create a new invalid array. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline array() noexcept = default; + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result is_empty() & noexcept; + /** + * Reset the iterator so that we are pointing back at the + * beginning of the array. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"([ { "foo": { "a": [ 10, 20, 30 ] }} ])"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/0/foo/a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an array + * instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * Consumes the array and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Get the value at the given index. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; +protected: + /** + * Go to the end of the array, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + + /** + * Begin array iteration. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + */ + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + /** + * Begin array iteration from the root. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + * @error TAPE_ERROR if there is no closing ] at the end of the document. + */ + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + /** + * Begin array iteration. + * + * This version of the method should be called after the initial [ has been verified, and is + * intended for use by switch statements that check the type of a value. + * + * @param iter The iterator. Must be after the initial [. Will be *moved* into the resulting array. + */ + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + + /** + * Create an array at the given Internal array creation. Call array::start() or array::started() instead of this. + * + * @param iter The iterator. Must either be at the start of the first element with iter.is_alive() + * == true, or past the [] with is_alive() == false if the array is empty. Will be *moved* + * into the resulting array. + */ + simdjson_inline array(const value_iterator &iter) noexcept; + + /** + * Iterator marking current position. + * + * iter.is_alive() == false indicates iteration is complete. + */ + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; + friend struct simdjson_result; + friend class array_iterator; +}; + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::array &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + inline simdjson_result count_elements() & noexcept; + inline simdjson_result is_empty() & noexcept; + inline simdjson_result reset() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_H +/* end file simdjson/generic/ondemand/array.h for fallback */ +/* including simdjson/generic/ondemand/array_iterator.h for fallback: #include "simdjson/generic/ondemand/array_iterator.h" */ +/* begin file simdjson/generic/ondemand/array_iterator.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * A forward-only JSON array. + * + * This is an input_iterator, meaning: + * - It is forward-only + * - * must be called exactly once per element. + * - ++ must be called exactly once in between each * (*, ++, *, ++, * ...) + */ +class array_iterator { +public: + /** Create a new, invalid array iterator. */ + simdjson_inline array_iterator() noexcept = default; + + // + // Iterator interface + // + + /** + * Get the current element. + * + * Part of the std::iterator interface. + */ + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + /** + * Check if we are at the end of the JSON. + * + * Part of the std::iterator interface. + * + * @return true if there are no more elements in the JSON array. + */ + simdjson_inline bool operator==(const array_iterator &) const noexcept; + /** + * Check if there are more elements in the JSON array. + * + * Part of the std::iterator interface. + * + * @return true if there are more elements in the JSON array. + */ + simdjson_inline bool operator!=(const array_iterator &) const noexcept; + /** + * Move to the next element. + * + * Part of the std::iterator interface. + */ + simdjson_inline array_iterator &operator++() noexcept; + +private: + value_iterator iter{}; + + simdjson_inline array_iterator(const value_iterator &iter) noexcept; + + friend class array; + friend class value; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::array_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H +/* end file simdjson/generic/ondemand/array_iterator.h for fallback */ +/* including simdjson/generic/ondemand/document.h for fallback: #include "simdjson/generic/ondemand/document.h" */ +/* begin file simdjson/generic/ondemand/document.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * A JSON document. It holds a json_iterator instance. + * + * Used by tokens to get text, and string buffer location. + * + * You must keep the document around during iteration. + */ +class document { +public: + /** + * Create a new invalid document. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline document() noexcept = default; + simdjson_inline document(const document &other) noexcept = delete; // pass your documents by reference, not by copy + simdjson_inline document(document &&other) noexcept = default; + simdjson_inline document &operator=(const document &other) noexcept = delete; + simdjson_inline document &operator=(document &&other) noexcept = default; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() & noexcept; + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() & noexcept; + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + /** + * Cast this JSON value (inside string) to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: Calling get_string() twice on the same document is an error. + * + * @param Whether to allow a replacement character for unmatched surrogate pairs. + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + /** + * Cast this JSON value to a string. + * + * The string is not guaranteed to be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * + * Important: Calling get_wobbly_string() twice on the same document is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is set to 1 (which is the case when building in Debug mode + * by default), and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value if a JSON array or object cannot be found. + * @returns SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result get_value() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() & noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + /** @overload template simdjson_result get() & noexcept */ + template simdjson_inline simdjson_result get() && noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool, value + * + * Be mindful that the document instance must remain in scope while you are accessing object, array and value instances. + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) & noexcept; + /** @overload template error_code get(T &out) & noexcept */ + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() & noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() & noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * 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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is defined, and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value value if a JSON array or object cannot be found. + * @exception SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline operator value() noexcept(false); +#endif + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * To check that an object is empty, it is more performant to use + * the is_empty() method. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) & noexcept; + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to + * a key a single time. Doing object["mykey"].to_string()and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the document is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the document is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the document is an integer number. 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. If this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view may be the padded buffer. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + /** + * 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). + */ + inline void rewind() noexcept; + /** + * Returns debugging information. + */ + inline std::string to_debug_string() noexcept; + /** + * Some unrecoverable error conditions may render the document instance unusable. + * The is_alive() method returns true when the document is still suitable. + */ + inline bool is_alive() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Returns true if this document has been fully parsed. + * If you have consumed the whole document and at_end() returns + * false, then there may be trailing content. + */ + inline bool at_end() const noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() automatically calls rewind between each call. Thus + * all values, objects and arrays that you have created so far (including unescaped strings) + * are invalidated. After calling at_pointer, you need to consume the result: string values + * should be stored in your own variables, arrays should be decoded and stored in your own array-like + * structures and so forth. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + * - SCALAR_DOCUMENT_AS_VALUE if the json_pointer is empty and the document is not a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; +protected: + /** + * Consumes the document. + */ + simdjson_inline error_code consume() noexcept; + + simdjson_inline document(ondemand::json_iterator &&iter) noexcept; + simdjson_inline const uint8_t *text(uint32_t idx) const noexcept; + + simdjson_inline value_iterator resume_value_iterator() noexcept; + simdjson_inline value_iterator get_root_value_iterator() noexcept; + simdjson_inline simdjson_result start_or_resume_object() noexcept; + static simdjson_inline document start(ondemand::json_iterator &&iter) noexcept; + + // + // Fields + // + json_iterator iter{}; ///< Current position in the document + static constexpr depth_t DOCUMENT_DEPTH = 0; ///< document depth is always 0 + + friend class array_iterator; + friend class value; + friend class ondemand::parser; + friend class object; + friend class array; + friend class field; + friend class token; + friend class document_stream; + friend class document_reference; +}; + + +/** + * A document_reference is a thin wrapper around a document reference instance. + */ +class document_reference { +public: + simdjson_inline document_reference() noexcept; + simdjson_inline document_reference(document &d) noexcept; + simdjson_inline document_reference(const document_reference &other) noexcept = default; + simdjson_inline document_reference& operator=(const document_reference &other) noexcept = default; + simdjson_inline void rewind() noexcept; + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + + simdjson_inline simdjson_result is_null() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + simdjson_inline operator document&() const noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator array() & noexcept(false); + simdjson_inline operator object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +private: + document *doc{nullptr}; +}; +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::document &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() & noexcept; + template simdjson_inline simdjson_result get() && noexcept; + + template simdjson_inline error_code get(T &out) & noexcept; + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator fallback::ondemand::array() & noexcept(false); + simdjson_inline operator fallback::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator fallback::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator fallback::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool at_end() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + + + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::document_reference value, error_code error) noexcept; + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator fallback::ondemand::array() & noexcept(false); + simdjson_inline operator fallback::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator fallback::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator fallback::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document_reference::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H +/* end file simdjson/generic/ondemand/document.h for fallback */ +/* including simdjson/generic/ondemand/document_stream.h for fallback: #include "simdjson/generic/ondemand/document_stream.h" */ +/* begin file simdjson/generic/ondemand/document_stream.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#ifdef SIMDJSON_THREADS_ENABLED +#include +#include +#include +#endif + +namespace simdjson { +namespace fallback { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED +/** @private Custom worker class **/ +struct stage1_worker { + stage1_worker() noexcept = default; + stage1_worker(const stage1_worker&) = delete; + stage1_worker(stage1_worker&&) = delete; + stage1_worker operator=(const stage1_worker&) = delete; + ~stage1_worker(); + /** + * We only start the thread when it is needed, not at object construction, this may throw. + * You should only call this once. + **/ + void start_thread(); + /** + * Start a stage 1 job. You should first call 'run', then 'finish'. + * You must call start_thread once before. + */ + void run(document_stream * ds, parser * stage1, size_t next_batch_start); + /** Wait for the run to finish (blocking). You should first call 'run', then 'finish'. **/ + void finish(); + +private: + + /** + * Normally, we would never stop the thread. But we do in the destructor. + * This function is only safe assuming that you are not waiting for results. You + * should have called run, then finish, and be done. + **/ + void stop_thread(); + + std::thread thread{}; + /** These three variables define the work done by the thread. **/ + ondemand::parser * stage1_thread_parser{}; + size_t _next_batch_start{}; + document_stream * owner{}; + /** + * We have two state variables. This could be streamlined to one variable in the future but + * we use two for clarity. + */ + bool has_work{false}; + bool can_work{true}; + + /** + * We lock using a mutex. + */ + std::mutex locking_mutex{}; + std::condition_variable cond_var{}; + + friend class document_stream; +}; +#endif // SIMDJSON_THREADS_ENABLED + +/** + * A forward-only stream of documents. + * + * Produced by parser::iterate_many. + * + */ +class document_stream { +public: + /** + * Construct an uninitialized document_stream. + * + * ```c++ + * document_stream docs; + * auto error = parser.iterate_many(json).get(docs); + * ``` + */ + simdjson_inline document_stream() noexcept; + /** Move one document_stream to another. */ + simdjson_inline document_stream(document_stream &&other) noexcept = default; + /** Move one document_stream to another. */ + simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default; + + simdjson_inline ~document_stream() noexcept; + + /** + * Returns the input size in bytes. + */ + inline size_t size_in_bytes() const noexcept; + + /** + * After iterating through the stream, this method + * returns the number of bytes that were not parsed at the end + * of the stream. If truncated_bytes() differs from zero, + * then the input was truncated maybe because incomplete JSON + * documents were found at the end of the stream. You + * may need to process the bytes in the interval [size_in_bytes()-truncated_bytes(), size_in_bytes()). + * + * You should only call 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(); + * + */ + inline size_t truncated_bytes() const noexcept; + + class iterator { + public: + using value_type = simdjson_result; + using reference = value_type; + + using difference_type = std::ptrdiff_t; + + using iterator_category = std::input_iterator_tag; + + /** + * Default constructor. + */ + simdjson_inline iterator() noexcept; + /** + * Get the current document (or error). + */ + simdjson_inline simdjson_result operator*() noexcept; + /** + * Advance to the next document (prefix). + */ + inline iterator& operator++() noexcept; + /** + * Check if we're at the end yet. + * @param other the end iterator to compare to. + */ + simdjson_inline bool operator!=(const iterator &other) const noexcept; + /** + * @private + * + * Gives the current index in the input document in bytes. + * + * document_stream stream = parser.parse_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * auto doc = *i; + * size_t index = i.current_index(); + * } + * + * This function (current_index()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + */ + simdjson_inline size_t current_index() const noexcept; + + /** + * @private + * + * Gives a view of the current document at the current position. + * + * document_stream stream = parser.iterate_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * std::string_view v = i.source(); + * } + * + * The returned string_view instance is simply a map to the (unparsed) + * source string: it may thus include white-space characters and all manner + * of padding. + * + * This function (source()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + * + */ + simdjson_inline std::string_view source() const noexcept; + + /** + * Returns error of the stream (if any). + */ + inline error_code error() const noexcept; + + private: + simdjson_inline iterator(document_stream *s, bool finished) noexcept; + /** The document_stream we're iterating through. */ + document_stream* stream; + /** Whether we're finished or not. */ + bool finished; + + friend class document; + friend class document_stream; + friend class json_iterator; + }; + + /** + * Start iterating the documents in the stream. + */ + simdjson_inline iterator begin() noexcept; + /** + * The end of the stream, for iterator comparison purposes. + */ + simdjson_inline iterator end() noexcept; + +private: + + document_stream &operator=(const document_stream &) = delete; // Disallow copying + document_stream(const document_stream &other) = delete; // Disallow copying + + /** + * Construct a document_stream. Does not allocate or parse anything until the iterator is + * used. + * + * @param parser is a reference to the parser instance used to generate this document_stream + * @param buf is the raw byte buffer we need to process + * @param len is the length of the raw byte buffer in bytes + * @param batch_size is the size of the windows (must be strictly greater or equal to the largest JSON document) + */ + simdjson_inline document_stream( + ondemand::parser &parser, + const uint8_t *buf, + size_t len, + size_t batch_size, + bool allow_comma_separated + ) noexcept; + + /** + * Parse the first document in the buffer. Used by begin(), to handle allocation and + * initialization. + */ + inline void start() noexcept; + + /** + * Parse the next document found in the buffer previously given to document_stream. + * + * The content should be a valid JSON document encoded as UTF-8. If there is a + * UTF-8 BOM, the parser skips it. + * + * You do NOT need to pre-allocate a parser. This function takes care of + * pre-allocating a capacity defined by the batch_size defined when creating the + * document_stream object. + * + * The function returns simdjson::EMPTY if there is no more data to be parsed. + * + * The function returns simdjson::SUCCESS (as integer = 0) in case of success + * and indicates that the buffer has successfully been parsed to the end. + * Every document it contained has been parsed without error. + * + * The function returns an error code from simdjson/simdjson.h in case of failure + * such as simdjson::CAPACITY, simdjson::MEMALLOC, simdjson::DEPTH_ERROR and so forth; + * the simdjson::error_message function converts these error codes into a string). + * + * You can also check validity by calling parser.is_valid(). The same parser can + * and should be reused for the other documents in the buffer. + */ + inline void next() noexcept; + + /** Move the json_iterator of the document to the location of the next document in the stream. */ + inline void next_document() noexcept; + + /** Get the next document index. */ + inline size_t next_batch_start() const noexcept; + + /** Pass the next batch through stage 1 with the given parser. */ + inline error_code run_stage1(ondemand::parser &p, size_t batch_start) noexcept; + + // Fields + ondemand::parser *parser; + const uint8_t *buf; + size_t len; + size_t batch_size; + bool allow_comma_separated; + /** + * We are going to use just one document instance. The document owns + * the json_iterator. It implies that we only ever pass a reference + * to the document to the users. + */ + document doc{}; + /** The error (or lack thereof) from the current document. */ + error_code error; + size_t batch_start{0}; + size_t doc_index{}; + + #ifdef SIMDJSON_THREADS_ENABLED + /** Indicates whether we use threads. Note that this needs to be a constant during the execution of the parsing. */ + bool use_thread; + + inline void load_from_stage1_thread() noexcept; + + /** Start a thread to run stage 1 on the next batch. */ + inline void start_stage1_thread() noexcept; + + /** Wait for the stage 1 thread to finish and capture the results. */ + inline void finish_stage1_thread() noexcept; + + /** The error returned from the stage 1 thread. */ + error_code stage1_thread_error{UNINITIALIZED}; + /** The thread used to run stage 1 against the next batch in the background. */ + std::unique_ptr worker{new(std::nothrow) stage1_worker()}; + /** + * The parser used to run stage 1 in the background. Will be swapped + * with the regular parser when finished. + */ + ondemand::parser stage1_thread_parser{}; + + friend struct stage1_worker; + #endif // SIMDJSON_THREADS_ENABLED + + friend class parser; + friend class document; + friend class json_iterator; + friend struct simdjson_result; + friend struct internal::simdjson_result_base; +}; // document_stream + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::document_stream &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H +/* end file simdjson/generic/ondemand/document_stream.h for fallback */ +/* including simdjson/generic/ondemand/field.h for fallback: #include "simdjson/generic/ondemand/field.h" */ +/* begin file simdjson/generic/ondemand/field.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * A JSON field (key/value pair) in an object. + * + * Returned from object iteration. + * + * Extends from std::pair so you can use C++ algorithms that rely on pairs. + */ +class field : public std::pair { +public: + /** + * Create a new invalid field. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline field() noexcept; + + /** + * Get the key as a string_view (for higher speed, consider raw_key). + * We deliberately use a more cumbersome name (unescaped_key) to force users + * to think twice about using it. + * + * This consumes the key: once you have called unescaped_key(), you cannot + * call it again nor can you call key(). + */ + simdjson_inline simdjson_warn_unused simdjson_result unescaped_key(bool allow_replacement) noexcept; + /** + * Get the key as a raw_json_string. Can be used for direct comparison with + * an unescaped C string: e.g., key() == "test". + */ + simdjson_inline raw_json_string key() const noexcept; + /** + * Get the field value. + */ + simdjson_inline ondemand::value &value() & noexcept; + /** + * @overload ondemand::value &ondemand::value() & noexcept + */ + simdjson_inline ondemand::value value() && noexcept; + +protected: + simdjson_inline field(raw_json_string key, ondemand::value &&value) noexcept; + static simdjson_inline simdjson_result start(value_iterator &parent_iter) noexcept; + static simdjson_inline simdjson_result start(const value_iterator &parent_iter, raw_json_string key) noexcept; + friend struct simdjson_result; + friend class object_iterator; +}; + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::field &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result unescaped_key(bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result key() noexcept; + simdjson_inline simdjson_result value() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_H +/* end file simdjson/generic/ondemand/field.h for fallback */ +/* including simdjson/generic/ondemand/object.h for fallback: #include "simdjson/generic/ondemand/object.h" */ +/* begin file simdjson/generic/ondemand/object.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +/** + * A forward-only JSON object field iterator. + */ +class object { +public: + /** + * Create a new invalid object. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a + * key a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an object + * instance: there is no rewind and no invalidation. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + + /** + * Reset the iterator so that we are pointing back at the + * beginning of the object. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * 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. + */ + inline simdjson_result is_empty() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; + +protected: + /** + * Go to the end of the object, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + static simdjson_inline object resume(const value_iterator &iter) noexcept; + simdjson_inline object(const value_iterator &iter) noexcept; + + simdjson_warn_unused simdjson_inline error_code find_field_raw(const std::string_view key) noexcept; + + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::object &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + inline simdjson_result reset() noexcept; + inline simdjson_result is_empty() noexcept; + inline simdjson_result count_fields() & noexcept; + inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_H +/* end file simdjson/generic/ondemand/object.h for fallback */ +/* including simdjson/generic/ondemand/object_iterator.h for fallback: #include "simdjson/generic/ondemand/object_iterator.h" */ +/* begin file simdjson/generic/ondemand/object_iterator.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +class object_iterator { +public: + /** + * Create a new invalid object_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object_iterator() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline simdjson_result operator*() noexcept; + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const object_iterator &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const object_iterator &) const noexcept; + // Checks for ']' and ',' + simdjson_inline object_iterator &operator++() noexcept; + +private: + /** + * The underlying JSON iterator. + * + * PERF NOTE: expected to be elided in favor of the parent document: this is set when the object + * is first used, and never changes afterwards. + */ + value_iterator iter{}; + + simdjson_inline object_iterator(const value_iterator &iter) noexcept; + friend struct simdjson_result; + friend class object; +}; + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public fallback::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(fallback::ondemand::object_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + // Checks for ']' and ',' + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H +/* end file simdjson/generic/ondemand/object_iterator.h for fallback */ +/* including simdjson/generic/ondemand/serialization.h for fallback: #include "simdjson/generic/ondemand/serialization.h" */ +/* begin file simdjson/generic/ondemand/serialization.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * 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. + */ +inline simdjson_result to_json_string(fallback::ondemand::document& x) noexcept; +/** + * Create a string-view instance out of a value instance. 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. + */ +inline simdjson_result to_json_string(fallback::ondemand::value& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(fallback::ondemand::object& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(fallback::ondemand::array& x) noexcept; +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +} // namespace simdjson + +/** + * We want to support argument-dependent lookup (ADL). + * Hence we should define operator<< in the namespace + * where the argument (here value, object, etc.) resides. + * Credit: @madhur4127 + * See https://github.com/simdjson/simdjson/issues/1768 + */ +namespace simdjson { namespace fallback { namespace ondemand { + +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The element. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::value x); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::array value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::document& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::document_reference& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The object. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::object value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +}}} // namespace simdjson::fallback::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H +/* end file simdjson/generic/ondemand/serialization.h for fallback */ + +// Inline definitions +/* including simdjson/generic/ondemand/array-inl.h for fallback: #include "simdjson/generic/ondemand/array-inl.h" */ +/* begin file simdjson/generic/ondemand/array-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter->depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the array is first found and the iterator is just past the `{`. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the `,` before the next value (or `]`). In this state, +// depth == iter->depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter->depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter->depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the array iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet element may be missing or not be an +// array--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter->depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between elements, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter->depth == depth, and at_start == false. +// +// ## Terminal State +// +// The terminal state has iter->depth < depth. at_start is always false. +// +// - Finished: When we have reached a `]` or have reported an error, we are finished. We signal this +// by decrementing depth. In this state, iter->depth < depth, at_start == false, and +// error == SUCCESS. +// + +simdjson_inline array::array(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result array::start(value_iterator &iter) noexcept { + // We don't need to know if the array is empty to start iteration, but we do want to know if there + // is an error--thus `simdjson_unused`. + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::start_root(value_iterator &iter) noexcept { + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_root_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::started(value_iterator &iter) noexcept { + bool has_value; + SIMDJSON_TRY(iter.started_array().get(has_value)); + return array(iter); +} + +simdjson_inline simdjson_result array::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return array_iterator(iter); +} +simdjson_inline simdjson_result array::end() noexcept { + return array_iterator(iter); +} +simdjson_inline error_code array::consume() noexcept { + auto error = iter.json_iter().skip_child(iter.depth()-1); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result array::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter._json_iter->unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline simdjson_result array::count_elements() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the array after counting the number of elements. + iter.reset_array(); + return count; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline simdjson_result array::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_array().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +inline simdjson_result array::reset() & noexcept { + return iter.reset_array(); +} + +inline simdjson_result array::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + // - means "the append position" or "the element after the end of the array" + // We don't support this, because we're returning a real element, not a position. + if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; } + + // Read the array index + size_t array_index = 0; + size_t i; + for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) { + uint8_t digit = uint8_t(json_pointer[i] - '0'); + // Check for non-digit in array index. If it's there, we're trying to get a field in an object + if (digit > 9) { return INCORRECT_TYPE; } + array_index = array_index*10 + digit; + } + + // 0 followed by other digits is invalid + if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0" + + // Empty string is invalid; so is a "/" with no digits before it + if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index" + // Get the child + auto child = at(array_index); + // If there is an error, it ends here + if(child.error()) { + return child; + } + + // If there is a /, we're not done yet, call recursively. + if (i < json_pointer.length()) { + child = child.at_pointer(json_pointer.substr(i)); + } + return child; +} + +simdjson_inline simdjson_result array::at(size_t index) noexcept { + size_t i = 0; + for (auto value : *this) { + if (i == index) { return value; } + i++; + } + return INDEX_OUT_OF_BOUNDS; +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + fallback::ondemand::array &&value +) noexcept + : implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept + : implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::is_empty() & noexcept { + if (error()) { return error(); } + return first.is_empty(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H +/* end file simdjson/generic/ondemand/array-inl.h for fallback */ +/* including simdjson/generic/ondemand/array_iterator-inl.h for fallback: #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/array_iterator-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +simdjson_inline array_iterator::array_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result array_iterator::operator*() noexcept { + if (iter.error()) { iter.abandon(); return iter.error(); } + return value(iter.child()); +} +simdjson_inline bool array_iterator::operator==(const array_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool array_iterator::operator!=(const array_iterator &) const noexcept { + return iter.is_open(); +} +simdjson_inline array_iterator &array_iterator::operator++() noexcept { + error_code error; + // PERF NOTE this is a safety rail ... users should exit loops as soon as they receive an error, so we'll never get here. + // However, it does not seem to make a perf difference, so we add it out of an abundance of caution. + if (( error = iter.error() )) { return *this; } + if (( error = iter.skip_child() )) { return *this; } + if (( error = iter.has_next_element().error() )) { return *this; } + return *this; +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + fallback::ondemand::array_iterator &&value +) noexcept + : fallback::implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : fallback::implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++(first); + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/array_iterator-inl.h for fallback */ +/* including simdjson/generic/ondemand/document-inl.h for fallback: #include "simdjson/generic/ondemand/document-inl.h" */ +/* begin file simdjson/generic/ondemand/document-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +simdjson_inline document::document(ondemand::json_iterator &&_iter) noexcept + : iter{std::forward(_iter)} +{ + logger::log_start_value(iter, "document"); +} + +simdjson_inline document document::start(json_iterator &&iter) noexcept { + return document(std::forward(iter)); +} + +inline void document::rewind() noexcept { + iter.rewind(); +} + +inline std::string document::to_debug_string() noexcept { + return iter.to_string(); +} + +inline simdjson_result document::current_location() const noexcept { + return iter.current_location(); +} + +inline int32_t document::current_depth() const noexcept { + return iter.depth(); +} + +inline bool document::at_end() const noexcept { + return iter.at_end(); +} + + +inline bool document::is_alive() noexcept { + return iter.is_alive(); +} +simdjson_inline value_iterator document::resume_value_iterator() noexcept { + return value_iterator(&iter, 1, iter.root_position()); +} +simdjson_inline value_iterator document::get_root_value_iterator() noexcept { + return resume_value_iterator(); +} +simdjson_inline simdjson_result document::start_or_resume_object() noexcept { + if (iter.at_root()) { + return get_object(); + } else { + return object::resume(resume_value_iterator()); + } +} +simdjson_inline simdjson_result document::get_value() noexcept { + // Make sure we start any arrays or objects before returning, so that start_root_() + // gets called. + + // It is the convention throughout the code that the macro `SIMDJSON_DEVELOPMENT_CHECKS` determines whether + // we check for OUT_OF_ORDER_ITERATION. Proper on::demand code should never trigger this error. +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.at_root()) { return OUT_OF_ORDER_ITERATION; } +#endif + // assert_at_root() serves two purposes: in Debug mode, whether or not + // SIMDJSON_DEVELOPMENT_CHECKS is set or not, it checks that we are at the root of + // the document (this will typically be redundant). In release mode, it generates + // SIMDJSON_ASSUME statements to allow the compiler to make assumptions. + iter.assert_at_root(); + switch (*iter.peek()) { + case '[': { + // The following lines check that the document ends with ]. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_array(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + case '{': { + // The following lines would check that the document ends with }. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_object(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + default: + // Unfortunately, scalar documents are a special case in simdjson and they cannot + // be safely converted to value instances. + return SCALAR_DOCUMENT_AS_VALUE; + } +} +simdjson_inline simdjson_result document::get_array() & noexcept { + auto value = get_root_value_iterator(); + return array::start_root(value); +} +simdjson_inline simdjson_result document::get_object() & noexcept { + auto value = get_root_value_iterator(); + return object::start_root(value); +} + +/** + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. 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. + */ + +simdjson_inline simdjson_result document::get_uint64() noexcept { + return get_root_value_iterator().get_root_uint64(true); +} +simdjson_inline simdjson_result document::get_uint64_in_string() noexcept { + return get_root_value_iterator().get_root_uint64_in_string(true); +} +simdjson_inline simdjson_result document::get_int64() noexcept { + return get_root_value_iterator().get_root_int64(true); +} +simdjson_inline simdjson_result document::get_int64_in_string() noexcept { + return get_root_value_iterator().get_root_int64_in_string(true); +} +simdjson_inline simdjson_result document::get_double() noexcept { + return get_root_value_iterator().get_root_double(true); +} +simdjson_inline simdjson_result document::get_double_in_string() noexcept { + return get_root_value_iterator().get_root_double_in_string(true); +} +simdjson_inline simdjson_result document::get_string(bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(true, allow_replacement); +} +template +simdjson_inline error_code document::get_string(string_type& receiver, bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(receiver, true, allow_replacement); +} +simdjson_inline simdjson_result document::get_wobbly_string() noexcept { + return get_root_value_iterator().get_root_wobbly_string(true); +} +simdjson_inline simdjson_result document::get_raw_json_string() noexcept { + return get_root_value_iterator().get_root_raw_json_string(true); +} +simdjson_inline simdjson_result document::get_bool() noexcept { + return get_root_value_iterator().get_root_bool(true); +} +simdjson_inline simdjson_result document::is_null() noexcept { + return get_root_value_iterator().is_root_null(true); +} + +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_array(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_object(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_double(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_bool(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_value(); } + +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_double(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_uint64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_int64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_bool(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_value(); } + +template simdjson_inline error_code document::get(T &out) & noexcept { + return get().get(out); +} +template simdjson_inline error_code document::get(T &out) && noexcept { + return std::forward(*this).get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document::operator array() & noexcept(false) { return get_array(); } +simdjson_inline document::operator object() & noexcept(false) { return get_object(); } +simdjson_inline document::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document::operator double() noexcept(false) { return get_double(); } +simdjson_inline document::operator std::string_view() noexcept(false) { return get_string(false); } +simdjson_inline document::operator raw_json_string() noexcept(false) { return get_raw_json_string(); } +simdjson_inline document::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document::operator value() noexcept(false) { return get_value(); } + +#endif +simdjson_inline simdjson_result document::count_elements() & noexcept { + auto a = get_array(); + simdjson_result answer = a.count_elements(); + /* If there was an array, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::count_fields() & noexcept { + auto a = get_object(); + simdjson_result answer = a.count_fields(); + /* If there was an object, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::at(size_t index) & noexcept { + auto a = get_array(); + return a.at(index); +} +simdjson_inline simdjson_result document::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result document::end() & noexcept { + return {}; +} + +simdjson_inline simdjson_result document::find_field(std::string_view key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field(const char *key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field_unordered(std::string_view key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::find_field_unordered(const char *key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::operator[](std::string_view key) & noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result document::operator[](const char *key) & noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline error_code document::consume() noexcept { + auto error = iter.skip_child(0); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result document::raw_json() noexcept { + auto _iter = get_root_value_iterator(); + const uint8_t * starting_point{_iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter.unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result document::type() noexcept { + return get_root_value_iterator().type(); +} + +simdjson_inline simdjson_result document::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool document::is_negative() noexcept { + return get_root_value_iterator().is_root_negative(); +} + +simdjson_inline simdjson_result document::is_integer() noexcept { + return get_root_value_iterator().is_root_integer(true); +} + +simdjson_inline simdjson_result document::get_number_type() noexcept { + return get_root_value_iterator().get_root_number_type(true); +} + +simdjson_inline simdjson_result document::get_number() noexcept { + return get_root_value_iterator().get_root_number(true); +} + + +simdjson_inline simdjson_result document::raw_json_token() noexcept { + auto _iter = get_root_value_iterator(); + return std::string_view(reinterpret_cast(_iter.peek_start()), _iter.peek_start_length()); +} + +simdjson_inline simdjson_result document::at_pointer(std::string_view json_pointer) noexcept { + rewind(); // Rewind the document each time at_pointer is called + if (json_pointer.empty()) { + return this->get_value(); + } + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + fallback::ondemand::document &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base( + error + ) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template +simdjson_inline simdjson_result simdjson_result::get() & noexcept { + if (error()) { return error(); } + return first.get(); +} +template +simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first).get(); +} +template +simdjson_inline error_code simdjson_result::get(T &out) & noexcept { + if (error()) { return error(); } + return first.get(out); +} +template +simdjson_inline error_code simdjson_result::get(T &out) && noexcept { + if (error()) { return error(); } + return std::forward(first).get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() & noexcept = delete; +template<> simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first); +} +template<> simdjson_inline error_code simdjson_result::get(fallback::ondemand::document &out) & noexcept = delete; +template<> simdjson_inline error_code simdjson_result::get(fallback::ondemand::document &out) && noexcept { + if (error()) { return error(); } + out = std::forward(first); + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} + +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} + + +simdjson_inline bool simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} + +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} + +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} + +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} + + +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator fallback::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator fallback::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator fallback::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator fallback::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline bool simdjson_result::at_end() const noexcept { + if (error()) { return error(); } + return first.at_end(); +} + + +simdjson_inline int32_t simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + + +namespace simdjson { +namespace fallback { +namespace ondemand { + +simdjson_inline document_reference::document_reference() noexcept : doc{nullptr} {} +simdjson_inline document_reference::document_reference(document &d) noexcept : doc(&d) {} +simdjson_inline void document_reference::rewind() noexcept { doc->rewind(); } +simdjson_inline simdjson_result document_reference::get_array() & noexcept { return doc->get_array(); } +simdjson_inline simdjson_result document_reference::get_object() & noexcept { return doc->get_object(); } +/** + * The document_reference instances are used primarily/solely for streams of JSON + * documents. + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. + * + * 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. + */ +simdjson_inline simdjson_result document_reference::get_uint64() noexcept { return doc->get_root_value_iterator().get_root_uint64(false); } +simdjson_inline simdjson_result document_reference::get_uint64_in_string() noexcept { return doc->get_root_value_iterator().get_root_uint64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_int64() noexcept { return doc->get_root_value_iterator().get_root_int64(false); } +simdjson_inline simdjson_result document_reference::get_int64_in_string() noexcept { return doc->get_root_value_iterator().get_root_int64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_double() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_double_in_string() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_string(bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(false, allow_replacement); } +template +simdjson_inline error_code document_reference::get_string(string_type& receiver, bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(receiver, false, allow_replacement); } +simdjson_inline simdjson_result document_reference::get_wobbly_string() noexcept { return doc->get_root_value_iterator().get_root_wobbly_string(false); } +simdjson_inline simdjson_result document_reference::get_raw_json_string() noexcept { return doc->get_root_value_iterator().get_root_raw_json_string(false); } +simdjson_inline simdjson_result document_reference::get_bool() noexcept { return doc->get_root_value_iterator().get_root_bool(false); } +simdjson_inline simdjson_result document_reference::get_value() noexcept { return doc->get_value(); } +simdjson_inline simdjson_result document_reference::is_null() noexcept { return doc->get_root_value_iterator().is_root_null(false); } + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document_reference::operator array() & noexcept(false) { return array(*doc); } +simdjson_inline document_reference::operator object() & noexcept(false) { return object(*doc); } +simdjson_inline document_reference::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document_reference::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document_reference::operator double() noexcept(false) { return get_double(); } +simdjson_inline document_reference::operator std::string_view() noexcept(false) { return std::string_view(*doc); } +simdjson_inline document_reference::operator raw_json_string() noexcept(false) { return raw_json_string(*doc); } +simdjson_inline document_reference::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document_reference::operator value() noexcept(false) { return value(*doc); } +#endif +simdjson_inline simdjson_result document_reference::count_elements() & noexcept { return doc->count_elements(); } +simdjson_inline simdjson_result document_reference::count_fields() & noexcept { return doc->count_fields(); } +simdjson_inline simdjson_result document_reference::at(size_t index) & noexcept { return doc->at(index); } +simdjson_inline simdjson_result document_reference::begin() & noexcept { return doc->begin(); } +simdjson_inline simdjson_result document_reference::end() & noexcept { return doc->end(); } +simdjson_inline simdjson_result document_reference::find_field(std::string_view key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::find_field(const char *key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::operator[](std::string_view key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::operator[](const char *key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::find_field_unordered(std::string_view key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::find_field_unordered(const char *key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::type() noexcept { return doc->type(); } +simdjson_inline simdjson_result document_reference::is_scalar() noexcept { return doc->is_scalar(); } +simdjson_inline simdjson_result document_reference::current_location() noexcept { return doc->current_location(); } +simdjson_inline int32_t document_reference::current_depth() const noexcept { return doc->current_depth(); } +simdjson_inline bool document_reference::is_negative() noexcept { return doc->is_negative(); } +simdjson_inline simdjson_result document_reference::is_integer() noexcept { return doc->get_root_value_iterator().is_root_integer(false); } +simdjson_inline simdjson_result document_reference::get_number_type() noexcept { return doc->get_root_value_iterator().get_root_number_type(false); } +simdjson_inline simdjson_result document_reference::get_number() noexcept { return doc->get_root_value_iterator().get_root_number(false); } +simdjson_inline simdjson_result document_reference::raw_json_token() noexcept { return doc->raw_json_token(); } +simdjson_inline simdjson_result document_reference::at_pointer(std::string_view json_pointer) noexcept { return doc->at_pointer(json_pointer); } +simdjson_inline simdjson_result document_reference::raw_json() noexcept { return doc->raw_json();} +simdjson_inline document_reference::operator document&() const noexcept { return *doc; } + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + + + +namespace simdjson { +simdjson_inline simdjson_result::simdjson_result(fallback::ondemand::document_reference value, error_code error) + noexcept : implementation_simdjson_result_base(std::forward(value), error) {} + + +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator fallback::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator fallback::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator fallback::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator fallback::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H +/* end file simdjson/generic/ondemand/document-inl.h for fallback */ +/* including simdjson/generic/ondemand/document_stream-inl.h for fallback: #include "simdjson/generic/ondemand/document_stream-inl.h" */ +/* begin file simdjson/generic/ondemand/document_stream-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace fallback { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void stage1_worker::finish() { + // After calling "run" someone would call finish() to wait + // for the end of the processing. + // This function will wait until either the thread has done + // the processing or, else, the destructor has been called. + std::unique_lock lock(locking_mutex); + cond_var.wait(lock, [this]{return has_work == false;}); +} + +inline stage1_worker::~stage1_worker() { + // The thread may never outlive the stage1_worker instance + // and will always be stopped/joined before the stage1_worker + // instance is gone. + stop_thread(); +} + +inline void stage1_worker::start_thread() { + std::unique_lock lock(locking_mutex); + if(thread.joinable()) { + return; // This should never happen but we never want to create more than one thread. + } + thread = std::thread([this]{ + while(true) { + std::unique_lock thread_lock(locking_mutex); + // We wait for either "run" or "stop_thread" to be called. + cond_var.wait(thread_lock, [this]{return has_work || !can_work;}); + // If, for some reason, the stop_thread() method was called (i.e., the + // destructor of stage1_worker is called, then we want to immediately destroy + // the thread (and not do any more processing). + if(!can_work) { + break; + } + this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser, + this->_next_batch_start); + this->has_work = false; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify "finish" + thread_lock.unlock(); + } + } + ); +} + + +inline void stage1_worker::stop_thread() { + std::unique_lock lock(locking_mutex); + // We have to make sure that all locks can be released. + can_work = false; + has_work = false; + cond_var.notify_all(); + lock.unlock(); + if(thread.joinable()) { + thread.join(); + } +} + +inline void stage1_worker::run(document_stream * ds, parser * stage1, size_t next_batch_start) { + std::unique_lock lock(locking_mutex); + owner = ds; + _next_batch_start = next_batch_start; + stage1_thread_parser = stage1; + has_work = true; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify the thread lock that we have work + lock.unlock(); +} + +#endif // SIMDJSON_THREADS_ENABLED + +simdjson_inline document_stream::document_stream( + ondemand::parser &_parser, + const uint8_t *_buf, + size_t _len, + size_t _batch_size, + bool _allow_comma_separated +) noexcept + : parser{&_parser}, + buf{_buf}, + len{_len}, + batch_size{_batch_size <= MINIMAL_BATCH_SIZE ? MINIMAL_BATCH_SIZE : _batch_size}, + allow_comma_separated{_allow_comma_separated}, + error{SUCCESS} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(_parser.threaded) // we need to make a copy because _parser.threaded can change + #endif +{ +#ifdef SIMDJSON_THREADS_ENABLED + if(worker.get() == nullptr) { + error = MEMALLOC; + } +#endif +} + +simdjson_inline document_stream::document_stream() noexcept + : parser{nullptr}, + buf{nullptr}, + len{0}, + batch_size{0}, + allow_comma_separated{false}, + error{UNINITIALIZED} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(false) + #endif +{ +} + +simdjson_inline document_stream::~document_stream() noexcept +{ + #ifdef SIMDJSON_THREADS_ENABLED + worker.reset(); + #endif +} + +inline size_t document_stream::size_in_bytes() const noexcept { + return len; +} + +inline size_t document_stream::truncated_bytes() const noexcept { + if(error == CAPACITY) { return len - batch_start; } + return parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] - parser->implementation->structural_indexes[parser->implementation->n_structural_indexes + 1]; +} + +simdjson_inline document_stream::iterator::iterator() noexcept + : stream{nullptr}, finished{true} { +} + +simdjson_inline document_stream::iterator::iterator(document_stream* _stream, bool is_end) noexcept + : stream{_stream}, finished{is_end} { +} + +simdjson_inline simdjson_result document_stream::iterator::operator*() noexcept { + //if(stream->error) { return stream->error; } + return simdjson_result(stream->doc, stream->error); +} + +simdjson_inline document_stream::iterator& document_stream::iterator::operator++() noexcept { + // If there is an error, then we want the iterator + // to be finished, no matter what. (E.g., we do not + // keep generating documents with errors, or go beyond + // a document with errors.) + // + // Users do not have to call "operator*()" when they use operator++, + // so we need to end the stream in the operator++ function. + // + // Note that setting finished = true is essential otherwise + // we would enter an infinite loop. + if (stream->error) { finished = true; } + // Note that stream->error() is guarded against error conditions + // (it will immediately return if stream->error casts to false). + // In effect, this next function does nothing when (stream->error) + // is true (hence the risk of an infinite loop). + stream->next(); + // If that was the last document, we're finished. + // It is the only type of error we do not want to appear + // in operator*. + if (stream->error == EMPTY) { finished = true; } + // If we had any other kind of error (not EMPTY) then we want + // to pass it along to the operator* and we cannot mark the result + // as "finished" just yet. + return *this; +} + +simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept { + return finished != other.finished; +} + +simdjson_inline document_stream::iterator document_stream::begin() noexcept { + start(); + // If there are no documents, we're finished. + return iterator(this, error == EMPTY); +} + +simdjson_inline document_stream::iterator document_stream::end() noexcept { + return iterator(this, true); +} + +inline void document_stream::start() noexcept { + if (error) { return; } + error = parser->allocate(batch_size); + if (error) { return; } + // Always run the first stage 1 parse immediately + batch_start = 0; + error = run_stage1(*parser, batch_start); + while(error == EMPTY) { + // In exceptional cases, we may start with an empty block + batch_start = next_batch_start(); + if (batch_start >= len) { return; } + error = run_stage1(*parser, batch_start); + } + if (error) { return; } + doc_index = batch_start; + doc = document(json_iterator(&buf[batch_start], parser)); + doc.iter._streaming = true; + + #ifdef SIMDJSON_THREADS_ENABLED + if (use_thread && next_batch_start() < len) { + // Kick off the first thread on next batch if needed + error = stage1_thread_parser.allocate(batch_size); + if (error) { return; } + worker->start_thread(); + start_stage1_thread(); + if (error) { return; } + } + #endif // SIMDJSON_THREADS_ENABLED +} + +inline void document_stream::next() noexcept { + // We always enter at once once in an error condition. + if (error) { return; } + next_document(); + if (error) { return; } + auto cur_struct_index = doc.iter._root - parser->implementation->structural_indexes.get(); + doc_index = batch_start + parser->implementation->structural_indexes[cur_struct_index]; + + // Check if at end of structural indexes (i.e. at end of batch) + if(cur_struct_index >= static_cast(parser->implementation->n_structural_indexes)) { + error = EMPTY; + // Load another batch (if available) + while (error == EMPTY) { + batch_start = next_batch_start(); + if (batch_start >= len) { break; } + #ifdef SIMDJSON_THREADS_ENABLED + if(use_thread) { + load_from_stage1_thread(); + } else { + error = run_stage1(*parser, batch_start); + } + #else + error = run_stage1(*parser, batch_start); + #endif + /** + * Whenever we move to another window, we need to update all pointers to make + * it appear as if the input buffer started at the beginning of the window. + * + * Take this input: + * + * {"z":5} {"1":1,"2":2,"4":4} [7, 10, 9] [15, 11, 12, 13] [154, 110, 112, 1311] + * + * Say you process the following window... + * + * '{"z":5} {"1":1,"2":2,"4":4} [7, 10, 9]' + * + * When you do so, the json_iterator has a pointer at the beginning of the memory region + * (pointing at the beginning of '{"z"...'. + * + * When you move to the window that starts at... + * + * '[7, 10, 9] [15, 11, 12, 13] ... + * + * then it is not sufficient to just run stage 1. You also need to re-anchor the + * json_iterator so that it believes we are starting at '[7, 10, 9]...'. + * + * Under the DOM front-end, this gets done automatically because the parser owns + * the pointer the data, and when you call stage1 and then stage2 on the same + * parser, then stage2 will run on the pointer acquired by stage1. + * + * That is, stage1 calls "this->buf = _buf" so the parser remembers the buffer that + * we used. But json_iterator has no callback when stage1 is called on the parser. + * In fact, I think that the parser is unaware of json_iterator. + * + * + * So we need to re-anchor the json_iterator after each call to stage 1 so that + * all of the pointers are in sync. + */ + doc.iter = json_iterator(&buf[batch_start], parser); + doc.iter._streaming = true; + /** + * End of resync. + */ + + if (error) { continue; } // If the error was EMPTY, we may want to load another batch. + doc_index = batch_start; + } + } +} + +inline void document_stream::next_document() noexcept { + // Go to next place where depth=0 (document depth) + error = doc.iter.skip_child(0); + if (error) { return; } + // Always set depth=1 at the start of document + doc.iter._depth = 1; + // consume comma if comma separated is allowed + if (allow_comma_separated) { doc.iter.consume_character(','); } + // Resets the string buffer at the beginning, thus invalidating the strings. + doc.iter._string_buf_loc = parser->string_buf.get(); + doc.iter._root = doc.iter.position(); +} + +inline size_t document_stream::next_batch_start() const noexcept { + return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes]; +} + +inline error_code document_stream::run_stage1(ondemand::parser &p, size_t _batch_start) noexcept { + // This code only updates the structural index in the parser, it does not update any json_iterator + // instance. + size_t remaining = len - _batch_start; + if (remaining <= batch_size) { + return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final); + } else { + return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial); + } +} + +simdjson_inline size_t document_stream::iterator::current_index() const noexcept { + return stream->doc_index; +} + +simdjson_inline std::string_view document_stream::iterator::source() const noexcept { + auto depth = stream->doc.iter.depth(); + auto cur_struct_index = stream->doc.iter._root - stream->parser->implementation->structural_indexes.get(); + + // If at root, process the first token to determine if scalar value + if (stream->doc.iter.at_root()) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': // Depth=1 already at start of document + break; + case '}': case ']': + depth--; + break; + default: // Scalar value document + // TODO: Remove any trailing whitespaces + // This returns a string spanning from start of value to the beginning of the next document (excluded) + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[++cur_struct_index] - current_index() - 1); + } + cur_struct_index++; + } + + while (cur_struct_index <= static_cast(stream->parser->implementation->n_structural_indexes)) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': + depth++; + break; + case '}': case ']': + depth--; + break; + } + if (depth == 0) { break; } + cur_struct_index++; + } + + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[cur_struct_index] - current_index() + stream->batch_start + 1);; +} + +inline error_code document_stream::iterator::error() const noexcept { + return stream->error; +} + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void document_stream::load_from_stage1_thread() noexcept { + worker->finish(); + // Swap to the parser that was loaded up in the thread. Make sure the parser has + // enough memory to swap to, as well. + std::swap(stage1_thread_parser,*parser); + error = stage1_thread_error; + if (error) { return; } + + // If there's anything left, start the stage 1 thread! + if (next_batch_start() < len) { + start_stage1_thread(); + } +} + +inline void document_stream::start_stage1_thread() noexcept { + // we call the thread on a lambda that will update + // this->stage1_thread_error + // there is only one thread that may write to this value + // TODO this is NOT exception-safe. + this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error + size_t _next_batch_start = this->next_batch_start(); + + worker->run(this, & this->stage1_thread_parser, _next_batch_start); +} + +#endif // SIMDJSON_THREADS_ENABLED + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result::simdjson_result( + fallback::ondemand::document_stream &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} + +} + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H +/* end file simdjson/generic/ondemand/document_stream-inl.h for fallback */ +/* including simdjson/generic/ondemand/field-inl.h for fallback: #include "simdjson/generic/ondemand/field-inl.h" */ +/* begin file simdjson/generic/ondemand/field-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +// clang 6 doesn't think the default constructor can be noexcept, so we make it explicit +simdjson_inline field::field() noexcept : std::pair() {} + +simdjson_inline field::field(raw_json_string key, ondemand::value &&value) noexcept + : std::pair(key, std::forward(value)) +{ +} + +simdjson_inline simdjson_result field::start(value_iterator &parent_iter) noexcept { + raw_json_string key; + SIMDJSON_TRY( parent_iter.field_key().get(key) ); + SIMDJSON_TRY( parent_iter.field_value() ); + return field::start(parent_iter, key); +} + +simdjson_inline simdjson_result field::start(const value_iterator &parent_iter, raw_json_string key) noexcept { + return field(key, parent_iter.child()); +} + +simdjson_inline simdjson_warn_unused simdjson_result field::unescaped_key(bool allow_replacement) noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() but Visual Studio won't let us. + simdjson_result answer = first.unescape(second.iter.json_iter(), allow_replacement); + first.consume(); + return answer; +} + +simdjson_inline raw_json_string field::key() const noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() by Visual Studio won't let us. + return first; +} + +simdjson_inline value &field::value() & noexcept { + return second; +} + +simdjson_inline value field::value() && noexcept { + return std::forward(*this).second; +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + fallback::ondemand::field &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::key() noexcept { + if (error()) { return error(); } + return first.key(); +} +simdjson_inline simdjson_result simdjson_result::unescaped_key(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.unescaped_key(allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::value() noexcept { + if (error()) { return error(); } + return std::move(first.value()); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H +/* end file simdjson/generic/ondemand/field-inl.h for fallback */ +/* including simdjson/generic/ondemand/json_iterator-inl.h for fallback: #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/json_iterator-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +simdjson_inline json_iterator::json_iterator(json_iterator &&other) noexcept + : token(std::forward(other.token)), + parser{other.parser}, + _string_buf_loc{other._string_buf_loc}, + error{other.error}, + _depth{other._depth}, + _root{other._root}, + _streaming{other._streaming} +{ + other.parser = nullptr; +} +simdjson_inline json_iterator &json_iterator::operator=(json_iterator &&other) noexcept { + token = other.token; + parser = other.parser; + _string_buf_loc = other._string_buf_loc; + error = other.error; + _depth = other._depth; + _root = other._root; + _streaming = other._streaming; + other.parser = nullptr; + return *this; +} + +simdjson_inline json_iterator::json_iterator(const uint8_t *buf, ondemand::parser *_parser) noexcept + : token(buf, &_parser->implementation->structural_indexes[0]), + parser{_parser}, + _string_buf_loc{parser->string_buf.get()}, + _depth{1}, + _root{parser->implementation->structural_indexes.get()}, + _streaming{false} + +{ + logger::log_headers(); +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif +} + +inline void json_iterator::rewind() noexcept { + token.set_position( root_position() ); + logger::log_headers(); // We start again + _string_buf_loc = parser->string_buf.get(); + _depth = 1; +} + +inline bool json_iterator::balanced() const noexcept { + token_iterator ti(token); + int32_t count{0}; + ti.set_position( root_position() ); + while(ti.peek() <= peek_last()) { + switch (*ti.return_current_and_advance()) + { + case '[': case '{': + count++; + break; + case ']': case '}': + count--; + break; + default: + break; + } + } + return count == 0; +} + + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and parent_depth, which is a desired effect. The warning does not show up if the +// skip_child() function is not marked inline). +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline error_code json_iterator::skip_child(depth_t parent_depth) noexcept { + if (depth() <= parent_depth) { return SUCCESS; } + switch (*return_current_and_advance()) { + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + + // For the first open array/object in a value, we've already incremented depth, so keep it the same + // We never stop at colon, but if we did, it wouldn't affect depth + case '[': case '{': case ':': + logger::log_start_value(*this, "skip"); + break; + // If there is a comma, we have just finished a value in an array/object, and need to get back in + case ',': + logger::log_value(*this, "skip"); + break; + // ] or } means we just finished a value and need to jump out of the array/object + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } +#if SIMDJSON_CHECK_EOF + // If there are no more tokens, the parent is incomplete. + if (at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "Missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + break; + case '"': + if(*peek() == ':') { + // We are at a key!!! + // This might happen if you just started an object and you skip it immediately. + // Performance note: it would be nice to get rid of this check as it is somewhat + // expensive. + // https://github.com/simdjson/simdjson/issues/1742 + logger::log_value(*this, "key"); + return_current_and_advance(); // eat up the ':' + break; // important!!! + } + simdjson_fallthrough; + // Anything else must be a scalar value + default: + // For the first scalar, we will have incremented depth already, so we decrement it here. + logger::log_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + } + + // Now that we've considered the first value, we only increment/decrement for arrays/objects + while (position() < end_position()) { + switch (*return_current_and_advance()) { + case '[': case '{': + logger::log_start_value(*this, "skip"); + _depth++; + break; + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + default: + logger::log_value(*this, "skip", ""); + break; + } + } + + return report_error(TAPE_ERROR, "not enough close braces"); +} + +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool json_iterator::at_root() const noexcept { + return position() == root_position(); +} + +simdjson_inline bool json_iterator::is_single_token() const noexcept { + return parser->implementation->n_structural_indexes == 1; +} + +simdjson_inline bool json_iterator::streaming() const noexcept { + return _streaming; +} + +simdjson_inline token_position json_iterator::root_position() const noexcept { + return _root; +} + +simdjson_inline void json_iterator::assert_at_document_depth() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +} + +simdjson_inline void json_iterator::assert_at_root() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + // Under Visual Studio, the next SIMDJSON_ASSUME fails with: the argument + // has side effects that will be discarded. + SIMDJSON_ASSUME( token.position() == _root ); +#endif +} + +simdjson_inline void json_iterator::assert_more_tokens(uint32_t required_tokens) const noexcept { + assert_valid_position(token._position + required_tokens - 1); +} + +simdjson_inline void json_iterator::assert_valid_position(token_position position) const noexcept { +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME( position >= &parser->implementation->structural_indexes[0] ); + SIMDJSON_ASSUME( position < &parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] ); +#endif +} + +simdjson_inline bool json_iterator::at_end() const noexcept { + return position() == end_position(); +} +simdjson_inline token_position json_iterator::end_position() const noexcept { + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + return &parser->implementation->structural_indexes[n_structural_indexes]; +} + +inline std::string json_iterator::to_string() const noexcept { + if( !is_alive() ) { return "dead json_iterator instance"; } + const char * current_structural = reinterpret_cast(token.peek()); + return std::string("json_iterator [ depth : ") + std::to_string(_depth) + + std::string(", structural : '") + std::string(current_structural,1) + + std::string("', offset : ") + std::to_string(token.current_offset()) + + std::string("', error : ") + error_message(error) + + std::string(" ]"); +} + +inline simdjson_result json_iterator::current_location() const noexcept { + if (!is_alive()) { // Unrecoverable error + if (!at_root()) { + return reinterpret_cast(token.peek(-1)); + } else { + return reinterpret_cast(token.peek()); + } + } + if (at_end()) { + return OUT_OF_BOUNDS; + } + return reinterpret_cast(token.peek()); +} + +simdjson_inline bool json_iterator::is_alive() const noexcept { + return parser; +} + +simdjson_inline void json_iterator::abandon() noexcept { + parser = nullptr; + _depth = 0; +} + +simdjson_inline const uint8_t *json_iterator::return_current_and_advance() noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif // SIMDJSON_CHECK_EOF + return token.return_current_and_advance(); +} + +simdjson_inline const uint8_t *json_iterator::unsafe_pointer() const noexcept { + // deliberately done without safety guard: + return token.peek(); +} + +simdjson_inline const uint8_t *json_iterator::peek(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // SIMDJSON_CHECK_EOF + return token.peek(delta); +} + +simdjson_inline uint32_t json_iterator::peek_length(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // #if SIMDJSON_CHECK_EOF + return token.peek_length(delta); +} + +simdjson_inline const uint8_t *json_iterator::peek(token_position position) const noexcept { + // todo: currently we require end-of-string buffering, but the following + // assert_valid_position should be turned on if/when we lift that condition. + // assert_valid_position(position); + // This is almost surely related to SIMDJSON_CHECK_EOF but given that SIMDJSON_CHECK_EOF + // is ON by default, we have no choice but to disable it for real with a comment. + return token.peek(position); +} + +simdjson_inline uint32_t json_iterator::peek_length(token_position position) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_valid_position(position); +#endif // SIMDJSON_CHECK_EOF + return token.peek_length(position); +} + +simdjson_inline token_position json_iterator::last_position() const noexcept { + // The following line fails under some compilers... + // SIMDJSON_ASSUME(parser->implementation->n_structural_indexes > 0); + // since it has side-effects. + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + SIMDJSON_ASSUME(n_structural_indexes > 0); + return &parser->implementation->structural_indexes[n_structural_indexes - 1]; +} +simdjson_inline const uint8_t *json_iterator::peek_last() const noexcept { + return token.peek(last_position()); +} + +simdjson_inline void json_iterator::ascend_to(depth_t parent_depth) noexcept { + SIMDJSON_ASSUME(parent_depth >= 0 && parent_depth < INT32_MAX - 1); + SIMDJSON_ASSUME(_depth == parent_depth + 1); + _depth = parent_depth; +} + +simdjson_inline void json_iterator::descend_to(depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); + _depth = child_depth; +} + +simdjson_inline depth_t json_iterator::depth() const noexcept { + return _depth; +} + +simdjson_inline uint8_t *&json_iterator::string_buf_loc() noexcept { + return _string_buf_loc; +} + +simdjson_inline error_code json_iterator::report_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error != SUCCESS && _error != UNINITIALIZED && _error != INCORRECT_TYPE && _error != NO_SUCH_FIELD); + logger::log_error(*this, message); + error = _error; + return error; +} + +simdjson_inline token_position json_iterator::position() const noexcept { + return token.position(); +} + +simdjson_inline simdjson_result json_iterator::unescape(raw_json_string in, bool allow_replacement) noexcept { + return parser->unescape(in, _string_buf_loc, allow_replacement); +} + +simdjson_inline simdjson_result json_iterator::unescape_wobbly(raw_json_string in) noexcept { + return parser->unescape_wobbly(in, _string_buf_loc); +} + +simdjson_inline void json_iterator::reenter_child(token_position position, depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); +#if SIMDJSON_DEVELOPMENT_CHECKS +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME(size_t(child_depth) < parser->max_depth()); + SIMDJSON_ASSUME(position >= parser->start_positions[child_depth]); +#endif +#endif + token.set_position(position); + _depth = child_depth; +} + +simdjson_inline error_code json_iterator::consume_character(char c) noexcept { + if (*peek() == c) { + return_current_and_advance(); + return SUCCESS; + } + return TAPE_ERROR; +} + +#if SIMDJSON_DEVELOPMENT_CHECKS + +simdjson_inline token_position json_iterator::start_position(depth_t depth) const noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + return size_t(depth) < parser->max_depth() ? parser->start_positions[depth] : 0; +} + +simdjson_inline void json_iterator::set_start_position(depth_t depth, token_position position) noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + if(size_t(depth) < parser->max_depth()) { parser->start_positions[depth] = position; } +} + +#endif + + +simdjson_inline error_code json_iterator::optional_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error == INCORRECT_TYPE || _error == NO_SUCH_FIELD); + logger::log_error(*this, message); + return _error; +} + + +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 { + // This function is not expected to be called in performance-sensitive settings. + // Let us guard against silly cases: + if((N < max_len) || (N == 0)) { return false; } + // Copy to the buffer. + std::memcpy(tmpbuf, json, max_len); + if(N > max_len) { // We pad whatever remains with ' '. + std::memset(tmpbuf + max_len, ' ', N - max_len); + } + return true; +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(fallback::ondemand::json_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/json_iterator-inl.h for fallback */ +/* including simdjson/generic/ondemand/json_type-inl.h for fallback: #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* begin file simdjson/generic/ondemand/json_type-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept { + switch (type) { + case json_type::array: out << "array"; break; + case json_type::object: out << "object"; break; + case json_type::number: out << "number"; break; + case json_type::string: out << "string"; break; + case json_type::boolean: out << "boolean"; break; + case json_type::null: out << "null"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false) { + return out << type.value(); +} +#endif + + + +simdjson_inline number_type number::get_number_type() const noexcept { + return type; +} + +simdjson_inline bool number::is_uint64() const noexcept { + return get_number_type() == number_type::unsigned_integer; +} + +simdjson_inline uint64_t number::get_uint64() const noexcept { + return payload.unsigned_integer; +} + +simdjson_inline number::operator uint64_t() const noexcept { + return get_uint64(); +} + + +simdjson_inline bool number::is_int64() const noexcept { + return get_number_type() == number_type::signed_integer; +} + +simdjson_inline int64_t number::get_int64() const noexcept { + return payload.signed_integer; +} + +simdjson_inline number::operator int64_t() const noexcept { + return get_int64(); +} + +simdjson_inline bool number::is_double() const noexcept { + return get_number_type() == number_type::floating_point_number; +} + +simdjson_inline double number::get_double() const noexcept { + return payload.floating_point_number; +} + +simdjson_inline number::operator double() const noexcept { + return get_double(); +} + +simdjson_inline double number::as_double() const noexcept { + if(is_double()) { + return payload.floating_point_number; + } + if(is_int64()) { + return double(payload.signed_integer); + } + return double(payload.unsigned_integer); +} + +simdjson_inline void number::append_s64(int64_t value) noexcept { + payload.signed_integer = value; + type = number_type::signed_integer; +} + +simdjson_inline void number::append_u64(uint64_t value) noexcept { + payload.unsigned_integer = value; + type = number_type::unsigned_integer; +} + +simdjson_inline void number::append_double(double value) noexcept { + payload.floating_point_number = value; + type = number_type::floating_point_number; +} + +simdjson_inline void number::skip_double() noexcept { + type = number_type::floating_point_number; +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(fallback::ondemand::json_type &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H +/* end file simdjson/generic/ondemand/json_type-inl.h for fallback */ +/* including simdjson/generic/ondemand/logger-inl.h for fallback: #include "simdjson/generic/ondemand/logger-inl.h" */ +/* begin file simdjson/generic/ondemand/logger-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace fallback { +namespace ondemand { +namespace logger { + +static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; +static constexpr const int LOG_EVENT_LEN = 20; +static constexpr const int LOG_BUFFER_LEN = 30; +static constexpr const int LOG_SMALL_BUFFER_LEN = 10; +static int log_depth = 0; // Not threadsafe. Log only. + +// Helper to turn unprintable or newline characters into spaces +static inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } +} + +template +static inline std::string string_format(const std::string& format, const Args&... args) +{ + SIMDJSON_PUSH_DISABLE_ALL_WARNINGS + int size_s = std::snprintf(nullptr, 0, format.c_str(), args...) + 1; + auto size = static_cast(size_s); + if (size <= 0) return std::string(); + std::unique_ptr buf(new char[size]); + std::snprintf(buf.get(), size, format.c_str(), args...); + SIMDJSON_POP_DISABLE_WARNINGS + return std::string(buf.get(), buf.get() + size - 1); +} + +static inline log_level get_log_level_from_env() +{ + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe + char *lvl = getenv("SIMDJSON_LOG_LEVEL"); + SIMDJSON_POP_DISABLE_WARNINGS + if (lvl && simdjson_strcasecmp(lvl, "ERROR") == 0) { return log_level::error; } + return log_level::info; +} + +static inline log_level log_threshold() +{ + static log_level threshold = get_log_level_from_env(); + return threshold; +} + +static inline bool should_log(log_level level) +{ + return level >= log_threshold(); +} + +inline void log_event(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "", type, detail, log_level::info); +} +inline void log_value(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "+", type, detail, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} +inline void log_start_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_line(iter, "+", type, "", delta, depth_delta, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} + +inline void log_end_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + if (LOG_ENABLED) { log_depth--; } + log_line(iter, "-", type, "", delta, depth_delta, log_level::info); +} + +inline void log_error(const json_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_line(iter, "ERROR: ", error, detail, delta, depth_delta, log_level::error); +} +inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail) noexcept { + log_line(iter, index, depth, "ERROR: ", error, detail, log_level::error); +} + +inline void log_event(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_event(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_value(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_value(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_start_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_start_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_end_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_end_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_error(const value_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_error(iter.json_iter(), error, detail, delta, depth_delta); +} + +inline void log_headers() noexcept { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(log_level::info))) { + // Technically a static variable is not thread-safe, but if you are using threads and logging... well... + static bool displayed_hint{false}; + log_depth = 0; + printf("\n"); + if (!displayed_hint) { + // We only print this helpful header once. + printf("# Logging provides the depth and position of the iterator user-visible steps:\n"); + printf("# +array says 'this is where we were when we discovered the start array'\n"); + printf( + "# -array says 'this is where we were when we ended the array'\n"); + printf("# skip says 'this is a structural or value I am skipping'\n"); + printf("# +/-skip says 'this is a start/end array or object I am skipping'\n"); + printf("#\n"); + printf("# The indentation of the terms (array, string,...) indicates the depth,\n"); + printf("# in addition to the depth being displayed.\n"); + printf("#\n"); + printf("# Every token in the document has a single depth determined by the tokens before it,\n"); + printf("# and is not affected by what the token actually is.\n"); + printf("#\n"); + printf("# Not all structural elements are presented as tokens in the logs.\n"); + printf("#\n"); + printf("# We never give control to the user within an empty array or an empty object.\n"); + printf("#\n"); + printf("# Inside an array, having a depth greater than the array's depth means that\n"); + printf("# we are pointing inside a value.\n"); + printf("# Having a depth equal to the array means that we are pointing right before a value.\n"); + printf("# Having a depth smaller than the array means that we have moved beyond the array.\n"); + displayed_hint = true; + } + printf("\n"); + printf("| %-*s ", LOG_EVENT_LEN, "Event"); + printf("| %-*s ", LOG_BUFFER_LEN, "Buffer"); + printf("| %-*s ", LOG_SMALL_BUFFER_LEN, "Next"); + // printf("| %-*s ", 5, "Next#"); + printf("| %-*s ", 5, "Depth"); + printf("| Detail "); + printf("|\n"); + + printf("|%.*s", LOG_EVENT_LEN + 2, DASHES); + printf("|%.*s", LOG_BUFFER_LEN + 2, DASHES); + printf("|%.*s", LOG_SMALL_BUFFER_LEN + 2, DASHES); + // printf("|%.*s", 5+2, DASHES); + printf("|%.*s", 5 + 2, DASHES); + printf("|--------"); + printf("|\n"); + fflush(stdout); + } + } +} + +template +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 { + log_line(iter, iter.position()+delta, depth_t(iter.depth()+depth_delta), title_prefix, title, detail, level, std::forward(args)...); +} + +template +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 { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(level))) { + const int indent = depth * 2; + const auto buf = iter.token.buf; + auto msg = string_format(title, std::forward(args)...); + printf("| %*s%s%-*s ", indent, "", title_prefix, + LOG_EVENT_LEN - indent - int(strlen(title_prefix)), msg.c_str()); + { + // Print the current structural. + printf("| "); + // Before we begin, the index might point right before the document. + // This could be unsafe, see https://github.com/simdjson/simdjson/discussions/1938 + if (index < iter._root) { + printf("%*s", LOG_BUFFER_LEN, ""); + } else { + auto current_structural = &buf[*index]; + for (int i = 0; i < LOG_BUFFER_LEN; i++) { + printf("%c", printable_char(current_structural[i])); + } + } + printf(" "); + } + { + // Print the next structural. + printf("| "); + auto next_structural = &buf[*(index + 1)]; + for (int i = 0; i < LOG_SMALL_BUFFER_LEN; i++) { + printf("%c", printable_char(next_structural[i])); + } + printf(" "); + } + // printf("| %5u ", *(index+1)); + printf("| %5i ", depth); + printf("| %6.*s ", int(detail.size()), detail.data()); + printf("|\n"); + fflush(stdout); + } + } +} + +} // namespace logger +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H +/* end file simdjson/generic/ondemand/logger-inl.h for fallback */ +/* including simdjson/generic/ondemand/object-inl.h for fallback: #include "simdjson/generic/ondemand/object-inl.h" */ +/* begin file simdjson/generic/ondemand/object-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) & noexcept { + return find_field_unordered(key); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) && noexcept { + return std::forward(*this).find_field_unordered(key); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} + +simdjson_inline simdjson_result object::start(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_object().error() ); + return object(iter); +} +simdjson_inline simdjson_result object::start_root(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_root_object().error() ); + return object(iter); +} +simdjson_inline error_code object::consume() noexcept { + if(iter.is_at_key()) { + /** + * 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. + */ + simdjson_unused raw_json_string actual_key; + auto error = iter.field_key().get(actual_key); + if (error) { iter.abandon(); return error; }; + // Let us move to the value while we are at it. + if ((error = iter.field_value())) { iter.abandon(); return error; } + } + auto error_skip = iter.json_iter().skip_child(iter.depth()-1); + if(error_skip) { iter.abandon(); } + return error_skip; +} + +simdjson_inline simdjson_result object::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + const uint8_t * final_point{iter._json_iter->peek()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result object::started(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.started_object().error() ); + return object(iter); +} + +simdjson_inline object object::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline object::object(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result object::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return object_iterator(iter); +} +simdjson_inline simdjson_result object::end() noexcept { + return object_iterator(iter); +} + +inline simdjson_result object::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + size_t slash = json_pointer.find('/'); + std::string_view key = json_pointer.substr(0, slash); + // Grab the child with the given key + simdjson_result child; + + // If there is an escape character in the key, unescape it and then get the child. + size_t escape = key.find('~'); + if (escape != std::string_view::npos) { + // Unescape the key + std::string unescaped(key); + do { + switch (unescaped[escape+1]) { + case '0': + unescaped.replace(escape, 2, "~"); + break; + case '1': + unescaped.replace(escape, 2, "/"); + break; + default: + return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer"); + } + escape = unescaped.find('~', escape+1); + } while (escape != std::string::npos); + child = find_field(unescaped); // Take note find_field does not unescape keys when matching + } else { + child = find_field(key); + } + if(child.error()) { + return child; // we do not continue if there was an error + } + // If there is a /, we have to recurse and look up more of the path + if (slash != std::string_view::npos) { + child = child.at_pointer(json_pointer.substr(slash)); + } + return child; +} + +simdjson_inline simdjson_result object::count_fields() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the object after counting the number of elements. + iter.reset_object(); + return count; +} + +simdjson_inline simdjson_result object::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_object().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +simdjson_inline simdjson_result object::reset() & noexcept { + return iter.reset_object(); +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(fallback::ondemand::object &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first)[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +inline simdjson_result simdjson_result::reset() noexcept { + if (error()) { return error(); } + return first.reset(); +} + +inline simdjson_result simdjson_result::is_empty() noexcept { + if (error()) { return error(); } + return first.is_empty(); +} + +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H +/* end file simdjson/generic/ondemand/object-inl.h for fallback */ +/* including simdjson/generic/ondemand/object_iterator-inl.h for fallback: #include "simdjson/generic/ondemand/object_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/object_iterator-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +// +// object_iterator +// + +simdjson_inline object_iterator::object_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result object_iterator::operator*() noexcept { + error_code error = iter.error(); + if (error) { iter.abandon(); return error; } + auto result = field::start(iter); + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (result.error()) { iter.abandon(); } + return result; +} +simdjson_inline bool object_iterator::operator==(const object_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool object_iterator::operator!=(const object_iterator &) const noexcept { + return iter.is_open(); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline object_iterator &object_iterator::operator++() noexcept { + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (!iter.is_open()) { return *this; } // Iterator will be released if there is an error + + simdjson_unused error_code error; + if ((error = iter.skip_child() )) { return *this; } + + simdjson_unused bool has_value; + if ((error = iter.has_next_field().get(has_value) )) { return *this; }; + return *this; +} +SIMDJSON_POP_DISABLE_WARNINGS + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter.depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the object is first found and the iterator is just past the {. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the , or } before the next value. In this state, +// depth == iter.depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter.depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter.depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the object iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet field may be missing or not be an +// object--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter.depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between fields, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter.depth == depth, and at_start == false. +// +// Errors that occur while reading a field to give to the user (such as when the key is not a +// string or the field is missing a colon) are yielded immediately. Depth is then decremented, +// moving to the Finished state without transitioning through an Error state at all. +// +// ## Terminal State +// +// The terminal state has iter.depth < depth. at_start is always false. +// +// - Finished: When we have reached a }, we are finished. We signal this by decrementing depth. +// In this state, iter.depth < depth, at_start == false, and error == SUCCESS. +// + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + fallback::ondemand::object_iterator &&value +) noexcept + : implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +// Checks for ']' and ',' +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++first; + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/object_iterator-inl.h for fallback */ +/* including simdjson/generic/ondemand/parser-inl.h for fallback: #include "simdjson/generic/ondemand/parser-inl.h" */ +/* begin file simdjson/generic/ondemand/parser-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string_view.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/dom/base.h" // for MINIMAL_DOCUMENT_CAPACITY */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +simdjson_inline parser::parser(size_t max_capacity) noexcept + : _max_capacity{max_capacity} { +} + +simdjson_warn_unused simdjson_inline error_code parser::allocate(size_t new_capacity, size_t new_max_depth) noexcept { + if (new_capacity > max_capacity()) { return CAPACITY; } + if (string_buf && new_capacity == capacity() && new_max_depth == max_depth()) { return SUCCESS; } + + // string_capacity copied from document::allocate + _capacity = 0; + size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * new_capacity / 3 + SIMDJSON_PADDING, 64); + string_buf.reset(new (std::nothrow) uint8_t[string_capacity]); +#if SIMDJSON_DEVELOPMENT_CHECKS + start_positions.reset(new (std::nothrow) token_position[new_max_depth]); +#endif + if (implementation) { + SIMDJSON_TRY( implementation->set_capacity(new_capacity) ); + SIMDJSON_TRY( implementation->set_max_depth(new_max_depth) ); + } else { + SIMDJSON_TRY( simdjson::get_active_implementation()->create_dom_parser_implementation(new_capacity, new_max_depth, implementation) ); + } + _capacity = new_capacity; + _max_depth = new_max_depth; + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length() || !string_buf) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return document::start({ reinterpret_cast(json.data()), this }); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const char *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const uint8_t *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string_view json, size_t allocated) & noexcept { + return iterate(padded_string_view(json, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string &json) & noexcept { + if(json.capacity() - json.size() < SIMDJSON_PADDING) { + json.reserve(json.size() + SIMDJSON_PADDING); + } + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const std::string &json) & noexcept { + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + padded_string_view json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + const padded_string &json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate_raw(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length()) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return json_iterator(reinterpret_cast(json.data()), this); +} + +inline simdjson_result parser::iterate_many(const uint8_t *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; } + if((len >= 3) && (std::memcmp(buf, "\xEF\xBB\xBF", 3) == 0)) { + buf += 3; + len -= 3; + } + if(allow_comma_separated && batch_size < len) { batch_size = len; } + return document_stream(*this, buf, len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const char *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(reinterpret_cast(buf), len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const std::string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const padded_string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} + +simdjson_inline size_t parser::capacity() const noexcept { + return _capacity; +} +simdjson_inline size_t parser::max_capacity() const noexcept { + return _max_capacity; +} +simdjson_inline size_t parser::max_depth() const noexcept { + return _max_depth; +} + +simdjson_inline void parser::set_max_capacity(size_t max_capacity) noexcept { + if(max_capacity < dom::MINIMAL_DOCUMENT_CAPACITY) { + _max_capacity = max_capacity; + } else { + _max_capacity = dom::MINIMAL_DOCUMENT_CAPACITY; + } +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement) const noexcept { + uint8_t *end = implementation->parse_string(in.buf, dst, allow_replacement); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept { + uint8_t *end = implementation->parse_wobbly_string(in.buf, dst); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(fallback::ondemand::parser &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H +/* end file simdjson/generic/ondemand/parser-inl.h for fallback */ +/* including simdjson/generic/ondemand/raw_json_string-inl.h for fallback: #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +namespace fallback { +namespace ondemand { + +simdjson_inline raw_json_string::raw_json_string(const uint8_t * _buf) noexcept : buf{_buf} {} + +simdjson_inline const char * raw_json_string::raw() const noexcept { return reinterpret_cast(buf); } + + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(std::string_view target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;pos < target.size() && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;pos < target.size();pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(const char* target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;target[pos] && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;target[pos];pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept { + // If we are going to call memcmp, then we must know something about the length of the raw_json_string. + return (length >= target.size()) && (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); +} + +simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + if(target.size() <= SIMDJSON_PADDING) { + return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); + } + const char * r{raw()}; + size_t pos{0}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept { + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(const char * target) const noexcept { + // Assumptions: 'target' does not contain unescaped quote characters, is null terminated and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(const char* target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept { + return a.unsafe_is_equal(c); +} + +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept { + return a == c; +} + +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept { + return !(a == c); +} + +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept { + return !(a == c); +} + + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape(json_iterator &iter, bool allow_replacement) const noexcept { + return iter.unescape(*this, allow_replacement); +} + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape_wobbly(json_iterator &iter) const noexcept { + return iter.unescape_wobbly(*this); +} + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &out, const raw_json_string &str) noexcept { + bool in_escape = false; + const char *s = str.raw(); + while (true) { + switch (*s) { + case '\\': in_escape = !in_escape; break; + case '"': if (in_escape) { in_escape = false; } else { return out; } break; + default: if (in_escape) { in_escape = false; } + } + out << *s; + s++; + } +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(fallback::ondemand::raw_json_string &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::raw() const noexcept { + if (error()) { return error(); } + return first.raw(); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape(fallback::ondemand::json_iterator &iter, bool allow_replacement) const noexcept { + if (error()) { return error(); } + return first.unescape(iter, allow_replacement); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape_wobbly(fallback::ondemand::json_iterator &iter) const noexcept { + if (error()) { return error(); } + return first.unescape_wobbly(iter); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H +/* end file simdjson/generic/ondemand/raw_json_string-inl.h for fallback */ +/* including simdjson/generic/ondemand/serialization-inl.h for fallback: #include "simdjson/generic/ondemand/serialization-inl.h" */ +/* begin file simdjson/generic/ondemand/serialization-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/serialization.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +inline std::string_view trim(const std::string_view str) noexcept { + // We can almost surely do better by rolling our own find_first_not_of function. + size_t first = str.find_first_not_of(" \t\n\r"); + // If we have the empty string (just white space), then no trimming is possible, and + // we return the empty string_view. + if (std::string_view::npos == first) { return std::string_view(); } + size_t last = str.find_last_not_of(" \t\n\r"); + return str.substr(first, (last - first + 1)); +} + + +inline simdjson_result to_json_string(fallback::ondemand::document& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(fallback::ondemand::document_reference& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(fallback::ondemand::value& x) noexcept { + /** + * 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. + */ + using namespace fallback::ondemand; + fallback::ondemand::json_type t; + auto error = x.type().get(t); + if(error != SUCCESS) { return error; } + switch (t) + { + case json_type::array: + { + fallback::ondemand::array array; + error = x.get_array().get(array); + if(error) { return error; } + return to_json_string(array); + } + case json_type::object: + { + fallback::ondemand::object object; + error = x.get_object().get(object); + if(error) { return error; } + return to_json_string(object); + } + default: + return trim(x.raw_json_token()); + } +} + +inline simdjson_result to_json_string(fallback::ondemand::object& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(fallback::ondemand::array& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} +} // namespace simdjson + +namespace simdjson { namespace fallback { namespace ondemand { + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::document_reference& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::fallback::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif +}}} // namespace simdjson::fallback::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H +/* end file simdjson/generic/ondemand/serialization-inl.h for fallback */ +/* including simdjson/generic/ondemand/token_iterator-inl.h for fallback: #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/token_iterator-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +simdjson_inline token_iterator::token_iterator( + const uint8_t *_buf, + token_position position +) noexcept : buf{_buf}, _position{position} +{ +} + +simdjson_inline uint32_t token_iterator::current_offset() const noexcept { + return *(_position); +} + + +simdjson_inline const uint8_t *token_iterator::return_current_and_advance() noexcept { + return &buf[*(_position++)]; +} + +simdjson_inline const uint8_t *token_iterator::peek(token_position position) const noexcept { + return &buf[*position]; +} +simdjson_inline uint32_t token_iterator::peek_index(token_position position) const noexcept { + return *position; +} +simdjson_inline uint32_t token_iterator::peek_length(token_position position) const noexcept { + return *(position+1) - *position; +} + +simdjson_inline const uint8_t *token_iterator::peek(int32_t delta) const noexcept { + return &buf[*(_position+delta)]; +} +simdjson_inline uint32_t token_iterator::peek_index(int32_t delta) const noexcept { + return *(_position+delta); +} +simdjson_inline uint32_t token_iterator::peek_length(int32_t delta) const noexcept { + return *(_position+delta+1) - *(_position+delta); +} + +simdjson_inline token_position token_iterator::position() const noexcept { + return _position; +} +simdjson_inline void token_iterator::set_position(token_position target_position) noexcept { + _position = target_position; +} + +simdjson_inline bool token_iterator::operator==(const token_iterator &other) const noexcept { + return _position == other._position; +} +simdjson_inline bool token_iterator::operator!=(const token_iterator &other) const noexcept { + return _position != other._position; +} +simdjson_inline bool token_iterator::operator>(const token_iterator &other) const noexcept { + return _position > other._position; +} +simdjson_inline bool token_iterator::operator>=(const token_iterator &other) const noexcept { + return _position >= other._position; +} +simdjson_inline bool token_iterator::operator<(const token_iterator &other) const noexcept { + return _position < other._position; +} +simdjson_inline bool token_iterator::operator<=(const token_iterator &other) const noexcept { + return _position <= other._position; +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(fallback::ondemand::token_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/token_iterator-inl.h for fallback */ +/* including simdjson/generic/ondemand/value-inl.h for fallback: #include "simdjson/generic/ondemand/value-inl.h" */ +/* begin file simdjson/generic/ondemand/value-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +simdjson_inline value::value(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} +simdjson_inline value value::start(const value_iterator &iter) noexcept { + return iter; +} +simdjson_inline value value::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline simdjson_result value::get_array() noexcept { + return array::start(iter); +} +simdjson_inline simdjson_result value::get_object() noexcept { + return object::start(iter); +} +simdjson_inline simdjson_result value::start_or_resume_object() noexcept { + if (iter.at_start()) { + return get_object(); + } else { + return object::resume(iter); + } +} + +simdjson_inline simdjson_result value::get_raw_json_string() noexcept { + return iter.get_raw_json_string(); +} +simdjson_inline simdjson_result value::get_string(bool allow_replacement) noexcept { + return iter.get_string(allow_replacement); +} +template +simdjson_inline error_code value::get_string(string_type& receiver, bool allow_replacement) noexcept { + return iter.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result value::get_wobbly_string() noexcept { + return iter.get_wobbly_string(); +} +simdjson_inline simdjson_result value::get_double() noexcept { + return iter.get_double(); +} +simdjson_inline simdjson_result value::get_double_in_string() noexcept { + return iter.get_double_in_string(); +} +simdjson_inline simdjson_result value::get_uint64() noexcept { + return iter.get_uint64(); +} +simdjson_inline simdjson_result value::get_uint64_in_string() noexcept { + return iter.get_uint64_in_string(); +} +simdjson_inline simdjson_result value::get_int64() noexcept { + return iter.get_int64(); +} +simdjson_inline simdjson_result value::get_int64_in_string() noexcept { + return iter.get_int64_in_string(); +} +simdjson_inline simdjson_result value::get_bool() noexcept { + return iter.get_bool(); +} +simdjson_inline simdjson_result value::is_null() noexcept { + return iter.is_null(); +} +template<> simdjson_inline simdjson_result value::get() noexcept { return get_array(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_object(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_number(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_double(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_bool(); } + +template simdjson_inline error_code value::get(T &out) noexcept { + return get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline value::operator array() noexcept(false) { + return get_array(); +} +simdjson_inline value::operator object() noexcept(false) { + return get_object(); +} +simdjson_inline value::operator uint64_t() noexcept(false) { + return get_uint64(); +} +simdjson_inline value::operator int64_t() noexcept(false) { + return get_int64(); +} +simdjson_inline value::operator double() noexcept(false) { + return get_double(); +} +simdjson_inline value::operator std::string_view() noexcept(false) { + return get_string(false); +} +simdjson_inline value::operator raw_json_string() noexcept(false) { + return get_raw_json_string(); +} +simdjson_inline value::operator bool() noexcept(false) { + return get_bool(); +} +#endif + +simdjson_inline simdjson_result value::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result value::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result value::count_elements() & noexcept { + simdjson_result answer; + auto a = get_array(); + answer = a.count_elements(); + // count_elements leaves you pointing inside the array, at the first element. + // We need to move back so that the user can create a new array (which requires that + // we point at '['). + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::count_fields() & noexcept { + simdjson_result answer; + auto a = get_object(); + answer = a.count_fields(); + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::at(size_t index) noexcept { + auto a = get_array(); + return a.at(index); +} + +simdjson_inline simdjson_result value::find_field(std::string_view key) noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result value::find_field(const char *key) noexcept { + return start_or_resume_object().find_field(key); +} + +simdjson_inline simdjson_result value::find_field_unordered(std::string_view key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result value::find_field_unordered(const char *key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} + +simdjson_inline simdjson_result value::operator[](std::string_view key) noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result value::operator[](const char *key) noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline simdjson_result value::type() noexcept { + return iter.type(); +} + +simdjson_inline simdjson_result value::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool value::is_negative() noexcept { + return iter.is_negative(); +} + +simdjson_inline simdjson_result value::is_integer() noexcept { + return iter.is_integer(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number_type() noexcept { + return iter.get_number_type(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number() noexcept { + return iter.get_number(); +} + +simdjson_inline std::string_view value::raw_json_token() noexcept { + return std::string_view(reinterpret_cast(iter.peek_start()), iter.peek_start_length()); +} + +simdjson_inline simdjson_result value::raw_json() noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: { + ondemand::array array; + SIMDJSON_TRY(get_array().get(array)); + return array.raw_json(); + } + case json_type::object: { + ondemand::object object; + SIMDJSON_TRY(get_object().get(object)); + return object.raw_json(); + } + default: + return raw_json_token(); + } +} + +simdjson_inline simdjson_result value::current_location() noexcept { + return iter.json_iter().current_location(); +} + +simdjson_inline int32_t value::current_depth() const noexcept{ + return iter.json_iter().depth(); +} + +simdjson_inline simdjson_result value::at_pointer(std::string_view json_pointer) noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + fallback::ondemand::value &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + if (error()) { return error(); } + return {}; +} + +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} + +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) noexcept { + if (error()) { return error(); } + return first[key]; +} + +simdjson_inline simdjson_result simdjson_result::get_array() noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return first.get(); +} +template simdjson_inline error_code simdjson_result::get(T &out) noexcept { + if (error()) { return error(); } + return first.get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return std::move(first); +} +template<> simdjson_inline error_code simdjson_result::get(fallback::ondemand::value &out) noexcept { + if (error()) { return error(); } + out = first; + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator fallback::ondemand::array() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator fallback::ondemand::object() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator fallback::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H +/* end file simdjson/generic/ondemand/value-inl.h for fallback */ +/* including simdjson/generic/ondemand/value_iterator-inl.h for fallback: #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/value_iterator-inl.h for fallback */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/atomparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace fallback { +namespace ondemand { + +simdjson_inline value_iterator::value_iterator( + json_iterator *json_iter, + depth_t depth, + token_position start_position +) noexcept : _json_iter{json_iter}, _depth{depth}, _start_position{start_position} +{ +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_root_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_object() noexcept { + assert_at_container_start(); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + if (*_json_iter->peek() == '}') { + logger::log_value(*_json_iter, "empty object"); + _json_iter->return_current_and_advance(); + end_container(); + return false; + } + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_object() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // object: e.g., `{"a":2} foo }`. Users concerned with garbage content should + // call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != '}') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing } at end"); + } + // If the last character is } *and* the first gibberish character is also '}' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == '}') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed object. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_object() noexcept { + auto error = check_root_object(); + if(error) { return error; } + return started_object(); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::end_container() noexcept { +#if SIMDJSON_CHECK_EOF + if (depth() > 1 && at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing parent ] or }"); } + // if (depth() <= 1 && !at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + _json_iter->ascend_to(depth()-1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_field() noexcept { + assert_at_next(); + + // It's illegal to call this unless there are more tokens: anything that ends in } or ] is + // obligated to verify there are more tokens if they are not the top level. + switch (*_json_iter->return_current_and_advance()) { + case '}': + logger::log_end_value(*_json_iter, "object"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between object fields"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_raw(const std::string_view key) noexcept { + error_code error; + bool has_value; + // + // Initially, the object can be in one of a few different places: + // + // 1. The start of the object, at the first field: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + if (at_first_field()) { + has_value = true; + + // + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + return false; + + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + if ((error = skip_child() )) { abandon(); return error; } + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + while (has_value) { + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + //if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); // Skip the value entirely + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + + // If the loop ended, we're out of fields to look at. + return false; +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_unordered_raw(const std::string_view key) noexcept { + /** + * When find_field_unordered_raw is called, we can either be pointing at the + * first key, pointing outside (at the closing brace) or if a key was matched + * we can be either pointing right afterthe ':' right before the value (that we need skip), + * or we may have consumed the value and we might be at a comma or at the + * final brace (ready for a call to has_next_field()). + */ + error_code error; + bool has_value; + + // First, we scan from that point to the end. + // If we don't find a match, we may loop back around, and scan from the beginning to that point. + token_position search_start = _json_iter->position(); + + // We want to know whether we need to go back to the beginning. + bool at_first = at_first_field(); + /////////////// + // Initially, the object can be in one of a few different places: + // + // 1. At the first key: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + // + if (at_first) { + has_value = true; + + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { + +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + SIMDJSON_TRY(reset_object().get(has_value)); + at_first = true; + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + // If someone queried a key but they not did access the value, then we are left pointing + // at the ':' and we need to move forward through the value... If the value was + // processed then skip_child() does not move the iterator (but may adjust the depth). + if ((error = skip_child() )) { abandon(); return error; } + search_start = _json_iter->position(); + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + + // After initial processing, we will be in one of two states: + // + // ``` + // // At the beginning of a field + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // At the end of the object + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // ``` + // + // Next, we find a match starting from the current position. + while (has_value) { + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + // Performance note: it maybe wasteful to rewind to the beginning when there might be + // no other query following. Indeed, it would require reskipping the whole object. + // Instead, you can just stay where you are. If there is a new query, there is always time + // to rewind. + if(at_first) { return false; } + + // If we reach the end without finding a match, search the rest of the fields starting at the + // beginning of the object. + // (We have already run through the object before, so we've already validated its structure. We + // don't check errors in this bit.) + SIMDJSON_TRY(reset_object().get(has_value)); + while (true) { + SIMDJSON_ASSUME(has_value); // we should reach search_start before ever reaching the end of the object + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + error = field_key().get(actual_key); SIMDJSON_ASSUME(!error); + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + error = field_value(); SIMDJSON_ASSUME(!error); + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // If we reached the end of the key-value pair we started from, then we know + // that the key is not there so we return false. We are either right before + // the next comma or the final brace. + if(_json_iter->position() == search_start) { return false; } + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + error = has_next_field().get(has_value); SIMDJSON_ASSUME(!error); + // If we make the mistake of exiting here, then we could be left pointing at a key + // in the middle of an object. That's not an allowable state. + } + // If the loop ended, we're out of fields to look at. The program should + // never reach this point. + return false; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::field_key() noexcept { + assert_at_next(); + + const uint8_t *key = _json_iter->return_current_and_advance(); + if (*(key++) != '"') { return report_error(TAPE_ERROR, "Object key is not a string"); } + return raw_json_string(key); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::field_value() noexcept { + assert_at_next(); + + if (*_json_iter->return_current_and_advance() != ':') { return report_error(TAPE_ERROR, "Missing colon in object field"); } + _json_iter->descend_to(depth()+1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_root_array(); +} + +inline std::string value_iterator::to_string() const noexcept { + auto answer = std::string("value_iterator [ depth : ") + std::to_string(_depth) + std::string(", "); + if(_json_iter != nullptr) { answer += _json_iter->to_string(); } + answer += std::string(" ]"); + return answer; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_array() noexcept { + assert_at_container_start(); + if (*_json_iter->peek() == ']') { + logger::log_value(*_json_iter, "empty array"); + _json_iter->return_current_and_advance(); + SIMDJSON_TRY( end_container() ); + return false; + } + _json_iter->descend_to(depth()+1); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_array() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // array: e.g., `[1, 2] foo]`. Users concerned with garbage content should + // also call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != ']') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing ] at end"); + } + // If the last character is ] *and* the first gibberish character is also ']' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == ']') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed array. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_array() noexcept { + auto error = check_root_array(); + if (error) { return error; } + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_element() noexcept { + assert_at_next(); + + logger::log_event(*this, "has_next_element"); + switch (*_json_iter->return_current_and_advance()) { + case ']': + logger::log_end_value(*_json_iter, "array"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + _json_iter->descend_to(depth()+1); + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between array elements"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_bool(const uint8_t *json) const noexcept { + auto not_true = atomparsing::str4ncmp(json, "true"); + auto not_false = atomparsing::str4ncmp(json, "fals") | (json[4] ^ 'e'); + bool error = (not_true && not_false) || jsoncharutils::is_not_structural_or_whitespace(json[not_true ? 5 : 4]); + if (error) { return incorrect_type_error("Not a boolean"); } + return simdjson_result(!not_true); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_null(const uint8_t *json) const noexcept { + bool is_null_string = !atomparsing::str4ncmp(json, "null") && jsoncharutils::is_structural_or_whitespace(json[4]); + // if we start with 'n', we must be a null + if(!is_null_string && json[0]=='n') { return incorrect_type_error("Not a null but starts with n"); } + return is_null_string; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_string(bool allow_replacement) noexcept { + return get_raw_json_string().unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_string(string_type& receiver, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_string(allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_wobbly_string() noexcept { + return get_raw_json_string().unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_raw_json_string() noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64() noexcept { + auto result = numberparsing::parse_unsigned(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64_in_string() noexcept { + auto result = numberparsing::parse_unsigned_in_string(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64() noexcept { + auto result = numberparsing::parse_integer(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64_in_string() noexcept { + auto result = numberparsing::parse_integer_in_string(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double() noexcept { + auto result = numberparsing::parse_double(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double_in_string() noexcept { + auto result = numberparsing::parse_double_in_string(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_bool() noexcept { + auto result = parse_bool(peek_non_root_scalar("bool")); + if(result.error() == SUCCESS) { advance_non_root_scalar("bool"); } + return result; +} +simdjson_inline simdjson_result value_iterator::is_null() noexcept { + bool is_null_value; + SIMDJSON_TRY(parse_null(peek_non_root_scalar("null")).get(is_null_value)); + if(is_null_value) { advance_non_root_scalar("null"); } + return is_null_value; +} +simdjson_inline bool value_iterator::is_negative() noexcept { + return numberparsing::is_negative(peek_non_root_scalar("numbersign")); +} +simdjson_inline bool value_iterator::is_root_negative() noexcept { + return numberparsing::is_negative(peek_root_scalar("numbersign")); +} +simdjson_inline simdjson_result value_iterator::is_integer() noexcept { + return numberparsing::is_integer(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number_type() noexcept { + return numberparsing::get_number_type(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number() noexcept { + number num; + error_code error = numberparsing::parse_number(peek_non_root_scalar("number"), num); + if(error) { return error; } + return num; +} + +simdjson_inline simdjson_result value_iterator::is_root_integer(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("is_root_integer"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + return false; // if there are more than 20 characters, it cannot be represented as an integer. + } + auto answer = numberparsing::is_integer(tmpbuf); + // If the parsing was a success, we must still check that it is + // a single scalar. Note that we parse first because of cases like '[]' where + // getting TRAILING_CONTENT is wrong. + if(check_trailing && (answer.error() == SUCCESS) && (!_json_iter->is_single_token())) { return TRAILING_CONTENT; } + return answer; +} + +simdjson_inline simdjson_result value_iterator::get_root_number_type(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto answer = numberparsing::get_number_type(tmpbuf); + if (check_trailing && (answer.error() == SUCCESS) && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + return answer; +} +simdjson_inline simdjson_result value_iterator::get_root_number(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + number num; + error_code error = numberparsing::parse_number(tmpbuf, num); + if(error) { return error; } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("number"); + return num; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_string(bool check_trailing, bool allow_replacement) noexcept { + return get_root_raw_json_string(check_trailing).unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_root_string(check_trailing, allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_wobbly_string(bool check_trailing) noexcept { + return get_root_raw_json_string(check_trailing).unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_raw_json_string(bool check_trailing) noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_bool(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("bool"); + uint8_t tmpbuf[5+1+1]; // +1 for null termination + tmpbuf[5+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 5+1)) { return incorrect_type_error("Not a boolean"); } + auto result = parse_bool(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("bool"); + } + return result; +} +simdjson_inline simdjson_result value_iterator::is_root_null(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("null"); + bool result = (max_len >= 4 && !atomparsing::str4ncmp(json, "null") && + (max_len == 4 || jsoncharutils::is_structural_or_whitespace(json[4]))); + if(result) { // we have something that looks like a null. + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("null"); + } + return result; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::skip_child() noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth >= _depth ); + + return _json_iter->skip_child(depth()); +} + +simdjson_inline value_iterator value_iterator::child() const noexcept { + assert_at_child(); + return { _json_iter, depth()+1, _json_iter->token.position() }; +} + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and iterator depth, which is a desired effect. It does not happen if is_open is +// marked non-inline. +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline bool value_iterator::is_open() const noexcept { + return _json_iter->depth() >= depth(); +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool value_iterator::at_end() const noexcept { + return _json_iter->at_end(); +} + +simdjson_inline bool value_iterator::at_start() const noexcept { + return _json_iter->token.position() == start_position(); +} + +simdjson_inline bool value_iterator::at_first_field() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + return _json_iter->token.position() == start_position() + 1; +} + +simdjson_inline void value_iterator::abandon() noexcept { + _json_iter->abandon(); +} + +simdjson_warn_unused simdjson_inline depth_t value_iterator::depth() const noexcept { + return _depth; +} +simdjson_warn_unused simdjson_inline error_code value_iterator::error() const noexcept { + return _json_iter->error; +} +simdjson_warn_unused simdjson_inline uint8_t *&value_iterator::string_buf_loc() noexcept { + return _json_iter->string_buf_loc(); +} +simdjson_warn_unused simdjson_inline const json_iterator &value_iterator::json_iter() const noexcept { + return *_json_iter; +} +simdjson_warn_unused simdjson_inline json_iterator &value_iterator::json_iter() noexcept { + return *_json_iter; +} + +simdjson_inline const uint8_t *value_iterator::peek_start() const noexcept { + return _json_iter->peek(start_position()); +} +simdjson_inline uint32_t value_iterator::peek_start_length() const noexcept { + return _json_iter->peek_length(start_position()); +} + +simdjson_inline const uint8_t *value_iterator::peek_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return peek_start(); } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return; } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept { + logger::log_start_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + const uint8_t *json; + if (!is_at_start()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + json = peek_start(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + } else { + assert_at_start(); + /** + * We should be prudent. Let us peek. If it is not the right type, we + * return an error. Only once we have determined that we have the right + * type are we allowed to advance! + */ + json = _json_iter->peek(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + _json_iter->return_current_and_advance(); + } + + + return SUCCESS; +} + + +simdjson_inline const uint8_t *value_iterator::peek_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_root(); + return _json_iter->peek(); +} +simdjson_inline const uint8_t *value_iterator::peek_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_non_root_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_root(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} +simdjson_inline void value_iterator::advance_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_non_root_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::incorrect_type_error(const char *message) const noexcept { + logger::log_error(*_json_iter, start_position(), depth(), message); + return INCORRECT_TYPE; +} + +simdjson_inline bool value_iterator::is_at_start() const noexcept { + return position() == start_position(); +} + +simdjson_inline bool value_iterator::is_at_key() const noexcept { + // Keys are at the same depth as the object. + // Note here that we could be safer and check that we are within an object, + // but we do not. + return _depth == _json_iter->_depth && *_json_iter->peek() == '"'; +} + +simdjson_inline bool value_iterator::is_at_iterator_start() const noexcept { + // We can legitimately be either at the first value ([1]), or after the array if it's empty ([]). + auto delta = position() - start_position(); + return delta == 1 || delta == 2; +} + +inline void value_iterator::assert_at_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_container_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position + 1 ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_next() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +simdjson_inline void value_iterator::move_at_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position); +} + +simdjson_inline void value_iterator::move_at_container_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position + 1); +} + +simdjson_inline simdjson_result value_iterator::reset_array() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_array(); +} + +simdjson_inline simdjson_result value_iterator::reset_object() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_object(); +} + +inline void value_iterator::assert_at_child() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth + 1 ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_root() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth == 1 ); +} + +inline void value_iterator::assert_at_non_root_start() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth > 1 ); +} + +inline void value_iterator::assert_is_valid() const noexcept { + SIMDJSON_ASSUME( _json_iter != nullptr ); +} + +simdjson_inline bool value_iterator::is_valid() const noexcept { + return _json_iter != nullptr; +} + +simdjson_inline simdjson_result value_iterator::type() const noexcept { + switch (*peek_start()) { + case '{': + return json_type::object; + case '[': + return json_type::array; + case '"': + return json_type::string; + case 'n': + return json_type::null; + case 't': case 'f': + return json_type::boolean; + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return json_type::number; + default: + return TAPE_ERROR; + } +} + +simdjson_inline token_position value_iterator::start_position() const noexcept { + return _start_position; +} + +simdjson_inline token_position value_iterator::position() const noexcept { + return _json_iter->position(); +} + +simdjson_inline token_position value_iterator::end_position() const noexcept { + return _json_iter->end_position(); +} + +simdjson_inline token_position value_iterator::last_position() const noexcept { + return _json_iter->last_position(); +} + +simdjson_inline error_code value_iterator::report_error(error_code error, const char *message) noexcept { + return _json_iter->report_error(error, message); +} + +} // namespace ondemand +} // namespace fallback +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(fallback::ondemand::value_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/value_iterator-inl.h for fallback */ +/* end file simdjson/generic/ondemand/amalgamated.h for fallback */ +/* including simdjson/fallback/end.h: #include "simdjson/fallback/end.h" */ +/* begin file simdjson/fallback/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/fallback/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* undefining SIMDJSON_IMPLEMENTATION from "fallback" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/fallback/end.h */ + +#endif // SIMDJSON_FALLBACK_ONDEMAND_H +/* end file simdjson/fallback/ondemand.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(haswell) +/* including simdjson/haswell/ondemand.h: #include "simdjson/haswell/ondemand.h" */ +/* begin file simdjson/haswell/ondemand.h */ +#ifndef SIMDJSON_HASWELL_ONDEMAND_H +#define SIMDJSON_HASWELL_ONDEMAND_H + +/* including simdjson/haswell/begin.h: #include "simdjson/haswell/begin.h" */ +/* begin file simdjson/haswell/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "haswell" */ +#define SIMDJSON_IMPLEMENTATION haswell + +/* including simdjson/haswell/base.h: #include "simdjson/haswell/base.h" */ +/* begin file simdjson/haswell/base.h */ +#ifndef SIMDJSON_HASWELL_BASE_H +#define SIMDJSON_HASWELL_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_HASWELL +namespace simdjson { +/** + * Implementation for Haswell (Intel AVX2). + */ +namespace haswell { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BASE_H +/* end file simdjson/haswell/base.h */ +/* including simdjson/haswell/intrinsics.h: #include "simdjson/haswell/intrinsics.h" */ +/* begin file simdjson/haswell/intrinsics.h */ +#ifndef SIMDJSON_HASWELL_INTRINSICS_H +#define SIMDJSON_HASWELL_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + * e.g., if __AVX2__ is set... in turn, we normally set these + * macros by compiling against the corresponding architecture + * (e.g., arch:AVX2, -mavx2, etc.) which compiles the whole + * software with these advanced instructions. In simdjson, we + * want to compile the whole program for a generic target, + * and only target our specific kernels. As a workaround, + * we directly include the needed headers. These headers would + * normally guard against such usage, but we carefully included + * (or ) before, so the headers + * are fooled. + */ +#include // for _blsr_u64 +#include // for __lzcnt64 +#include // for most things (AVX2, AVX512, _popcnt64) +#include +#include +#include +#include +#include // for _mm_clmulepi64_si128 +// unfortunately, we may not get _blsr_u64, but, thankfully, clang +// has it as a macro. +#ifndef _blsr_u64 +// we roll our own +#define _blsr_u64(n) ((n - 1) & n) +#endif // _blsr_u64 +#endif // SIMDJSON_CLANG_VISUAL_STUDIO + +static_assert(sizeof(__m256i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for haswell kernel."); + +#endif // SIMDJSON_HASWELL_INTRINSICS_H +/* end file simdjson/haswell/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_HASWELL +SIMDJSON_TARGET_REGION("avx2,bmi,pclmul,lzcnt,popcnt") +#endif + +/* including simdjson/haswell/bitmanipulation.h: #include "simdjson/haswell/bitmanipulation.h" */ +/* begin file simdjson/haswell/bitmanipulation.h */ +#ifndef SIMDJSON_HASWELL_BITMANIPULATION_H +#define SIMDJSON_HASWELL_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmask.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return (int)_tzcnt_u64(input_num); +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + //////// + // You might expect the next line to be equivalent to + // return (int)_tzcnt_u64(input_num); + // but the generated code differs and might be less efficient? + //////// + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return _blsr_u64(input_num); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { + return int(_lzcnt_u64(input_num)); +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BITMANIPULATION_H +/* end file simdjson/haswell/bitmanipulation.h */ +/* including simdjson/haswell/bitmask.h: #include "simdjson/haswell/bitmask.h" */ +/* begin file simdjson/haswell/bitmask.h */ +#ifndef SIMDJSON_HASWELL_BITMASK_H +#define SIMDJSON_HASWELL_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processor supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_BITMASK_H +/* end file simdjson/haswell/bitmask.h */ +/* including simdjson/haswell/numberparsing_defs.h: #include "simdjson/haswell/numberparsing_defs.h" */ +/* begin file simdjson/haswell/numberparsing_defs.h */ +#ifndef SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H +#define SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace numberparsing { + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace haswell +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_HASWELL_NUMBERPARSING_DEFS_H +/* end file simdjson/haswell/numberparsing_defs.h */ +/* including simdjson/haswell/simd.h: #include "simdjson/haswell/simd.h" */ +/* begin file simdjson/haswell/simd.h */ +#ifndef SIMDJSON_HASWELL_SIMD_H +#define SIMDJSON_HASWELL_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { +namespace simd { + + // Forward-declared so they can be used by splat and friends. + template + struct base { + __m256i value; + + // Zero constructor + simdjson_inline base() : value{__m256i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m256i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m256i&() const { return this->value; } + simdjson_inline operator __m256i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm256_or_si256(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm256_and_si256(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm256_xor_si256(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm256_andnot_si256(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + // Forward-declared so they can be used by splat and friends. + template + struct simd8; + + template> + struct base8: base> { + typedef uint32_t bitmask_t; + typedef uint64_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m256i _value) : base>(_value) {} + + friend simdjson_really_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm256_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm256_alignr_epi8(*this, _mm256_permute2x128_si256(prev_chunk, *this, 0x21), 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm256_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m256i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm256_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm256_testz_si256(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm256_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm256_setzero_si256(); } + static simdjson_inline simd8 load(const T values[32]) { + return _mm256_loadu_si256(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m256i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[32]) const { return _mm256_storeu_si256(reinterpret_cast<__m256i *>(dst), *this); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm256_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm256_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm256_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint32_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in four steps, first 8 bytes and then second 8 bytes... + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // second least significant 8 bits + uint8_t mask3 = uint8_t(mask >> 16); // ... + uint8_t mask4 = uint8_t(mask >> 24); // ... + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m256i shufmask = _mm256_set_epi64x(thintable_epi8[mask4], thintable_epi8[mask3], + thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask and so forth + shufmask = + _mm256_add_epi8(shufmask, _mm256_set_epi32(0x18181818, 0x18181818, + 0x10101010, 0x10101010, 0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m256i pruned = _mm256_shuffle_epi8(*this, shufmask); + // we still need to put the pieces back together. + // we compute the popcount of the first words: + int pop1 = BitsSetTable256mul2[mask1]; + int pop3 = BitsSetTable256mul2[mask3]; + + // then load the corresponding mask + // could be done with _mm256_loadu2_m128i but many standard libraries omit this intrinsic. + __m256i v256 = _mm256_castsi128_si256( + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8))); + __m256i compactmask = _mm256_insertf128_si256(v256, + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop3 * 8)), 1); + __m256i almostthere = _mm256_shuffle_epi8(pruned, compactmask); + // We just need to write out the result. + // This is the tricky bit that is hard to do + // if we want to return a SIMD register, since there + // is no single-instruction approach to recombine + // the two 128-bit lanes with an offset. + __m128i v128; + v128 = _mm256_castsi256_si128(almostthere); + _mm_storeu_si128( reinterpret_cast<__m128i *>(output), v128); + v128 = _mm256_extractf128_si256(almostthere, 1); + _mm_storeu_si128( reinterpret_cast<__m128i *>(output + 16 - count_ones(mask & 0xFFFF)), v128); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m256i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t values[32]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15, + int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23, + int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31 + ) : simd8(_mm256_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v16,v17,v18,v19,v20,v21,v22,v23, + v24,v25,v26,v27,v28,v29,v30,v31 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm256_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm256_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm256_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm256_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m256i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[32]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15, + uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23, + uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31 + ) : simd8(_mm256_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v16,v17,v18,v19,v20,v21,v22,v23, + v24,v25,v26,v27,v28,v29,v30,v31 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm256_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm256_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm256_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm256_min_epu8(other, *this); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->lt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm256_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm256_testz_si256(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm256_testz_si256(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm256_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm256_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm256_movemask_epi8(_mm256_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 2, "Haswell kernel should use two registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1) : chunks{chunk0, chunk1} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+32)} {} + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + uint32_t mask1 = uint32_t(mask); + uint32_t mask2 = uint32_t(mask >> 32); + this->chunks[0].compress(mask1, output); + this->chunks[1].compress(mask2, output + 32 - count_ones(mask1)); + return 64 - count_ones(mask); + } + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r_lo = uint32_t(this->chunks[0].to_bitmask()); + uint64_t r_hi = this->chunks[1].to_bitmask(); + return r_lo | (r_hi << 32); + } + + simdjson_inline simd8 reduce_or() const { + return this->chunks[0] | this->chunks[1]; + } + + simdjson_inline simd8x64 bit_or(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] | mask, + this->chunks[1] | mask + ); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_SIMD_H +/* end file simdjson/haswell/simd.h */ +/* including simdjson/haswell/stringparsing_defs.h: #include "simdjson/haswell/stringparsing_defs.h" */ +/* begin file simdjson/haswell/stringparsing_defs.h */ +#ifndef SIMDJSON_HASWELL_STRINGPARSING_DEFS_H +#define SIMDJSON_HASWELL_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 15 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v(src); + // store to dest unconditionally - we can overwrite the bits we don't like later + v.store(dst); + return { + static_cast((v == '\\').to_bitmask()), // bs_bits + static_cast((v == '"').to_bitmask()), // quote_bits + }; +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_HASWELL_STRINGPARSING_DEFS_H +/* end file simdjson/haswell/stringparsing_defs.h */ +/* end file simdjson/haswell/begin.h */ +/* including simdjson/generic/ondemand/amalgamated.h for haswell: #include "simdjson/generic/ondemand/amalgamated.h" */ +/* begin file simdjson/generic/ondemand/amalgamated.h for haswell */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H) +#error simdjson/generic/ondemand/dependencies.h must be included before simdjson/generic/ondemand/amalgamated.h! +#endif + +// Stuff other things depend on +/* including simdjson/generic/ondemand/base.h for haswell: #include "simdjson/generic/ondemand/base.h" */ +/* begin file simdjson/generic/ondemand/base.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +/** + * A fast, simple, DOM-like interface that parses JSON as you use it. + * + * Designed for maximum speed and a lower memory profile. + */ +namespace ondemand { + +/** Represents the depth of a JSON value (number of nested arrays/objects). */ +using depth_t = int32_t; + +/** @copydoc simdjson::haswell::number_type */ +using number_type = simdjson::haswell::number_type; + +/** @private Position in the JSON buffer indexes */ +using token_position = const uint32_t *; + +class array; +class array_iterator; +class document; +class document_reference; +class document_stream; +class field; +class json_iterator; +enum class json_type; +struct number; +class object; +class object_iterator; +class parser; +class raw_json_string; +class token_iterator; +class value; +class value_iterator; + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_BASE_H +/* end file simdjson/generic/ondemand/base.h for haswell */ +/* including simdjson/generic/ondemand/value_iterator.h for haswell: #include "simdjson/generic/ondemand/value_iterator.h" */ +/* begin file simdjson/generic/ondemand/value_iterator.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * Iterates through a single JSON value at a particular depth. + * + * Does not keep track of the type of value: provides methods for objects, arrays and scalars and expects + * the caller to call the right ones. + * + * @private This is not intended for external use. + */ +class value_iterator { +protected: + /** The underlying JSON iterator */ + json_iterator *_json_iter{}; + /** The depth of this value */ + depth_t _depth{}; + /** + * The starting token index for this value + */ + token_position _start_position{}; + +public: + simdjson_inline value_iterator() noexcept = default; + + /** + * Denote that we're starting a document. + */ + simdjson_inline void start_document() noexcept; + + /** + * Skips a non-iterated or partially-iterated JSON value, whether it is a scalar, array or object. + * + * Optimized for scalars. + */ + simdjson_warn_unused simdjson_inline error_code skip_child() noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is at the start of the value + */ + simdjson_inline bool at_start() const noexcept; + + /** + * Tell whether the value is open--if the value has not been used, or the array/object is still open. + */ + simdjson_inline bool is_open() const noexcept; + + /** + * Tell whether the value is at an object's first field (just after the {). + */ + simdjson_inline bool at_first_field() const noexcept; + + /** + * Abandon all iteration. + */ + simdjson_inline void abandon() noexcept; + + /** + * Get the child value as a value_iterator. + */ + simdjson_inline value_iterator child_value() const noexcept; + + /** + * Get the depth of this value. + */ + simdjson_inline int32_t depth() const noexcept; + + /** + * Get the JSON type of this value. + * + * @error TAPE_ERROR when the JSON value is a bad token like "}" "," or "alse". + */ + simdjson_inline simdjson_result type() const noexcept; + + /** + * @addtogroup object Object iteration + * + * Methods to iterate and find object fields. These methods generally *assume* the value is + * actually an object; the caller is responsible for keeping track of that fact. + * + * @{ + */ + + /** + * Start an object iteration. + * + * @returns Whether the object had any fields (returns false for empty). + * @error INCORRECT_TYPE if there is no opening { + */ + simdjson_warn_unused simdjson_inline simdjson_result start_object() noexcept; + /** + * Start an object iteration from the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_object() noexcept; + /** + * Checks whether an object could be started from the root. May be called by start_root_object. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_object() noexcept; + /** + * Start an object iteration after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_object() noexcept; + /** + * Start an object iteration from the root, after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_object() noexcept; + + /** + * Moves to the next field in an object. + * + * Looks for , and }. If } is found, the object is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_field() noexcept; + + /** + * Get the current field's key. + */ + simdjson_warn_unused simdjson_inline simdjson_result field_key() noexcept; + + /** + * Pass the : in the field and move to its value. + */ + simdjson_warn_unused simdjson_inline error_code field_value() noexcept; + + /** + * Find the next field with the given key. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline error_code find_field(const std::string_view key) noexcept; + + /** + * Find the next field with the given key, *without* unescaping. This assumes object order: it + * will not find the field if it was already passed when looking for some *other* field. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_raw(const std::string_view key) noexcept; + + /** + * Find the field with the given key without regard to order, and *without* unescaping. + * + * This is an unordered object lookup: if the field is not found initially, it will cycle around and scan from the beginning. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_unordered_raw(const std::string_view key) noexcept; + + /** @} */ + + /** + * @addtogroup array Array iteration + * Methods to iterate over array elements. These methods generally *assume* the value is actually + * an object; the caller is responsible for keeping track of that fact. + * @{ + */ + + /** + * Check for an opening [ and start an array iteration. + * + * @returns Whether the array had any elements (returns false for empty). + * @error INCORRECT_TYPE If there is no [. + */ + simdjson_warn_unused simdjson_inline simdjson_result start_array() noexcept; + /** + * Check for an opening [ and start an array iteration while at the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_array() noexcept; + /** + * Checks whether an array could be started from the root. May be called by start_root_array. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_array() noexcept; + /** + * Start an array iteration, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_array() noexcept; + /** + * Start an array iteration from the root, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_array() noexcept; + + /** + * Moves to the next element in an array. + * + * Looks for , and ]. If ] is found, the array is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return Whether there is another element in the array. + * @error TAPE_ERROR If there is a comma missing between elements. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_element() noexcept; + + /** + * Get a child value iterator. + */ + simdjson_warn_unused simdjson_inline value_iterator child() const noexcept; + + /** @} */ + + /** + * @defgroup scalar Scalar values + * @addtogroup scalar + * @{ + */ + + simdjson_warn_unused simdjson_inline simdjson_result get_string(bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_bool() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_null() noexcept; + simdjson_warn_unused simdjson_inline bool is_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_integer() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + simdjson_warn_unused simdjson_inline simdjson_result get_root_string(bool check_trailing, bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_wobbly_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_raw_json_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_bool(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline bool is_root_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_integer(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number_type(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_null(bool check_trailing) noexcept; + + simdjson_inline error_code error() const noexcept; + simdjson_inline uint8_t *&string_buf_loc() noexcept; + simdjson_inline const json_iterator &json_iter() const noexcept; + simdjson_inline json_iterator &json_iter() noexcept; + + simdjson_inline void assert_is_valid() const noexcept; + simdjson_inline bool is_valid() const noexcept; + + /** @} */ +protected: + /** + * Restarts an array iteration. + * @returns Whether the array has any elements (returns false for empty). + */ + simdjson_inline simdjson_result reset_array() noexcept; + /** + * Restarts an object iteration. + * @returns Whether the object has any fields (returns false for empty). + */ + simdjson_inline simdjson_result reset_object() noexcept; + /** + * move_at_start(): moves us so that we are pointing at the beginning of + * the container. It updates the index so that at_start() is true and it + * syncs the depth. The user can then create a new container instance. + * + * Usage: used with value::count_elements(). + **/ + simdjson_inline void move_at_start() noexcept; + + /** + * move_at_container_start(): moves us so that we are pointing at the beginning of + * the container so that assert_at_container_start() passes. + * + * Usage: used with reset_array() and reset_object(). + **/ + simdjson_inline void move_at_container_start() noexcept; + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + simdjson_inline value_iterator(json_iterator *json_iter, depth_t depth, token_position start_index) noexcept; + + simdjson_inline simdjson_result parse_null(const uint8_t *json) const noexcept; + simdjson_inline simdjson_result parse_bool(const uint8_t *json) const noexcept; + simdjson_inline const uint8_t *peek_start() const noexcept; + simdjson_inline uint32_t peek_start_length() const noexcept; + + /** + * The general idea of the advance_... methods and the peek_* methods + * is that you first peek and check that you have desired type. If you do, + * and only if you do, then you advance. + * + * We used to unconditionally advance. But this made reasoning about our + * current state difficult. + * Suppose you always advance. Look at the 'value' matching the key + * "shadowable" in the following example... + * + * ({"globals":{"a":{"shadowable":[}}}}) + * + * If the user thinks it is a Boolean and asks for it, then we check the '[', + * decide it is not a Boolean, but still move into the next character ('}'). Now + * we are left pointing at '}' right after a '['. And we have not yet reported + * an error, only that we do not have a Boolean. + * + * If, instead, you just stand your ground until it is content that you know, then + * you will only even move beyond the '[' if the user tells you that you have an + * array. So you will be at the '}' character inside the array and, hopefully, you + * will then catch the error because an array cannot start with '}', but the code + * processing Boolean values does not know this. + * + * So the contract is: first call 'peek_...' and then call 'advance_...' only + * if you have determined that it is a type you can handle. + * + * Unfortunately, it makes the code more verbose, longer and maybe more error prone. + */ + + simdjson_inline void advance_scalar(const char *type) noexcept; + simdjson_inline void advance_root_scalar(const char *type) noexcept; + simdjson_inline void advance_non_root_scalar(const char *type) noexcept; + + simdjson_inline const uint8_t *peek_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_root_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_non_root_scalar(const char *type) noexcept; + + + simdjson_inline error_code start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept; + simdjson_inline error_code end_container() noexcept; + + /** + * Advance to a place expecting a value (increasing depth). + * + * @return The current token (the one left behind). + * @error TAPE_ERROR If the document ended early. + */ + simdjson_inline simdjson_result advance_to_value() noexcept; + + simdjson_inline error_code incorrect_type_error(const char *message) const noexcept; + simdjson_inline error_code error_unless_more_tokens(uint32_t tokens=1) const noexcept; + + simdjson_inline bool is_at_start() const noexcept; + /** + * is_at_iterator_start() returns true on an array or object after it has just been + * created, whether the instance is empty or not. + * + * Usage: used by array::begin() in debug mode (SIMDJSON_DEVELOPMENT_CHECKS) + */ + simdjson_inline bool is_at_iterator_start() const noexcept; + + /** + * Assuming that we are within an object, this returns true if we + * are pointing at a key. + * + * Usage: the skip_child() method should never be used while we are pointing + * at a key inside an object. + */ + simdjson_inline bool is_at_key() const noexcept; + + inline void assert_at_start() const noexcept; + inline void assert_at_container_start() const noexcept; + inline void assert_at_root() const noexcept; + inline void assert_at_child() const noexcept; + inline void assert_at_next() const noexcept; + inline void assert_at_non_root_start() const noexcept; + + /** Get the starting position of this value */ + simdjson_inline token_position start_position() const noexcept; + + /** @copydoc error_code json_iterator::position() const noexcept; */ + simdjson_inline token_position position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position last_position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position end_position() const noexcept; + /** @copydoc error_code json_iterator::report_error(error_code error, const char *message) noexcept; */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + friend class document; + friend class object; + friend class array; + friend class value; +}; // value_iterator + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::value_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H +/* end file simdjson/generic/ondemand/value_iterator.h for haswell */ +/* including simdjson/generic/ondemand/value.h for haswell: #include "simdjson/generic/ondemand/value.h" */ +/* begin file simdjson/generic/ondemand/value.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * 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. + */ +class value { +public: + /** + * Create a new invalid value. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline value() noexcept = default; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) noexcept; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() noexcept; + + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() noexcept; + + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + + /** + * Cast this JSON value (inside string) to a unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + + /** + * Cast this JSON value to a "wobbly" string. + * + * The string is may not be a valid UTF-8 string. + * See https://simonsapin.github.io/wtf-8/ + * + * Important: a value should be consumed once. Calling get_wobbly_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * @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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); +#endif + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + * + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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). + * + * @return 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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the value is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the value is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the value is an integer number. 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). + * + * 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. However, if this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view is guaranteed to be + * a non-space token. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + * + * See also value::raw_json(). + */ + simdjson_inline std::string_view raw_json_token() noexcept; + + /** + * Get a string_view pointing at this value in the JSON document. + * If this element is an array or an object, it consumes the array or the object + * and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + * If this element is a scalar (string, number, Boolean, null), it returns what + * raw_json_token() would return. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + simdjson_inline simdjson_result current_location() noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. + * + * Calling at_pointer() on non-document instances (e.g., arrays and objects) is not + * standardized (by RFC 6901). We provide some experimental support for JSON pointers + * on non-document instances. Yet it is not the case when calling at_pointer on an array + * or an object instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + +protected: + /** + * Create a value. + */ + simdjson_inline value(const value_iterator &iter) noexcept; + + /** + * Skip this value, allowing iteration to continue. + */ + simdjson_inline void skip() noexcept; + + /** + * Start a value at the current position. + * + * (It should already be started; this is just a self-documentation method.) + */ + static simdjson_inline value start(const value_iterator &iter) noexcept; + + /** + * Resume a value. + */ + static simdjson_inline value resume(const value_iterator &iter) noexcept; + + /** + * Get the object, starting or resuming it as necessary + */ + simdjson_inline simdjson_result start_or_resume_object() noexcept; + + // simdjson_inline void log_value(const char *type) const noexcept; + // simdjson_inline void log_error(const char *message) const noexcept; + + value_iterator iter{}; + + friend class document; + friend class array_iterator; + friend class field; + friend class object; + friend struct simdjson_result; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::value &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result get_array() noexcept; + simdjson_inline simdjson_result get_object() noexcept; + + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() noexcept; + + template simdjson_inline error_code get(T &out) noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator haswell::ondemand::array() noexcept(false); + simdjson_inline operator haswell::ondemand::object() noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator haswell::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * 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). + */ + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + + /** @copydoc simdjson_inline std::string_view value::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + + /** @copydoc simdjson_inline simdjson_result current_location() noexcept */ + simdjson_inline simdjson_result current_location() noexcept; + /** @copydoc simdjson_inline int32_t current_depth() const noexcept */ + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_H +/* end file simdjson/generic/ondemand/value.h for haswell */ +/* including simdjson/generic/ondemand/logger.h for haswell: #include "simdjson/generic/ondemand/logger.h" */ +/* begin file simdjson/generic/ondemand/logger.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +// Logging should be free unless SIMDJSON_VERBOSE_LOGGING is set. Importantly, it is critical +// that the call to the log functions be side-effect free. Thus, for example, you should not +// create temporary std::string instances. +namespace logger { + +enum class log_level : int32_t { + info = 0, + error = 1 +}; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + +// We do not want these functions to be 'really inlined' since real inlining is +// for performance purposes and if you are using the loggers, you do not care about +// performance (or should not). +static inline void log_headers() noexcept; +// If args are provided, title will be treated as format string +template +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; +template +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; +static inline void log_event(const json_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_value(const json_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_start_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; + +static inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail="") noexcept; +static inline void log_error(const json_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +static inline void log_event(const value_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const value_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_error(const value_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +} // namespace logger +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_H +/* end file simdjson/generic/ondemand/logger.h for haswell */ +/* including simdjson/generic/ondemand/token_iterator.h for haswell: #include "simdjson/generic/ondemand/token_iterator.h" */ +/* begin file simdjson/generic/ondemand/token_iterator.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * Iterates through JSON tokens (`{` `}` `[` `]` `,` `:` `""` `123` `true` `false` `null`) + * detected by stage 1. + * + * @private This is not intended for external use. + */ +class token_iterator { +public: + /** + * Create a new invalid token_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline token_iterator() noexcept = default; + simdjson_inline token_iterator(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator &operator=(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator(const token_iterator &other) noexcept = default; + simdjson_inline token_iterator &operator=(const token_iterator &other) noexcept = default; + + /** + * Advance to the next token (returning the current one). + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + /** + * Reports the current offset in bytes from the start of the underlying buffer. + */ + simdjson_inline uint32_t current_offset() const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + + /** + * Return the current index. + */ + simdjson_inline token_position position() const noexcept; + /** + * Reset to a previously saved index. + */ + simdjson_inline void set_position(token_position target_position) noexcept; + + // NOTE: we don't support a full C++ iterator interface, because we expect people to make + // different calls to advance the iterator based on *their own* state. + + simdjson_inline bool operator==(const token_iterator &other) const noexcept; + simdjson_inline bool operator!=(const token_iterator &other) const noexcept; + simdjson_inline bool operator>(const token_iterator &other) const noexcept; + simdjson_inline bool operator>=(const token_iterator &other) const noexcept; + simdjson_inline bool operator<(const token_iterator &other) const noexcept; + simdjson_inline bool operator<=(const token_iterator &other) const noexcept; + +protected: + simdjson_inline token_iterator(const uint8_t *buf, token_position position) noexcept; + + /** + * Get the index of the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_index(int32_t delta=0) const noexcept; + /** + * Get the index of the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline uint32_t peek_index(token_position position) const noexcept; + + const uint8_t *buf{}; + token_position _position{}; + + friend class json_iterator; + friend class value_iterator; + friend class object; + template + 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; + template + 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; +}; + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::token_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H +/* end file simdjson/generic/ondemand/token_iterator.h for haswell */ +/* including simdjson/generic/ondemand/json_iterator.h for haswell: #include "simdjson/generic/ondemand/json_iterator.h" */ +/* begin file simdjson/generic/ondemand/json_iterator.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * Iterates through JSON tokens, keeping track of depth and string buffer. + * + * @private This is not intended for external use. + */ +class json_iterator { +protected: + token_iterator token{}; + ondemand::parser *parser{}; + /** + * Next free location in the string buffer. + * + * Used by raw_json_string::unescape() to have a place to unescape strings to. + */ + uint8_t *_string_buf_loc{}; + /** + * JSON error, if there is one. + * + * INCORRECT_TYPE and NO_SUCH_FIELD are *not* stored here, ever. + * + * PERF NOTE: we *hope* this will be elided into control flow, as it is only used (a) in the first + * iteration of the loop, or (b) for the final iteration after a missing comma is found in ++. If + * this is not elided, we should make sure it's at least not using up a register. Failing that, + * we should store it in document so there's only one of them. + */ + error_code error{SUCCESS}; + /** + * Depth of the current token in the JSON. + * + * - 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. + */ + depth_t _depth{}; + /** + * Beginning of the document indexes. + * Normally we have root == parser->implementation->structural_indexes.get() + * but this may differ, especially in streaming mode (where we have several + * documents); + */ + token_position _root{}; + /** + * Normally, a json_iterator operates over a single document, but in + * some cases, we may have a stream of documents. This attribute is meant + * as meta-data: the json_iterator works the same irrespective of the + * value of this attribute. + */ + bool _streaming{false}; + +public: + simdjson_inline json_iterator() noexcept = default; + simdjson_inline json_iterator(json_iterator &&other) noexcept; + simdjson_inline json_iterator &operator=(json_iterator &&other) noexcept; + simdjson_inline explicit json_iterator(const json_iterator &other) noexcept = default; + simdjson_inline json_iterator &operator=(const json_iterator &other) noexcept = default; + /** + * Skips a JSON value, whether it is a scalar, array or object. + */ + simdjson_warn_unused simdjson_inline error_code skip_child(depth_t parent_depth) noexcept; + + /** + * Tell whether the iterator is still at the start + */ + simdjson_inline bool at_root() const noexcept; + + /** + * Tell whether we should be expected to run in streaming + * mode (iterating over many documents). It is pure metadata + * that does not affect how the iterator works. It is used by + * start_root_array() and start_root_object(). + */ + simdjson_inline bool streaming() const noexcept; + + /** + * Get the root value iterator + */ + simdjson_inline token_position root_position() const noexcept; + /** + * Assert that we are at the document depth (== 1) + */ + simdjson_inline void assert_at_document_depth() const noexcept; + /** + * Assert that we are at the root of the document + */ + simdjson_inline void assert_at_root() const noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is live (has not been moved). + */ + simdjson_inline bool is_alive() const noexcept; + + /** + * Abandon this iterator, setting depth to 0 (as if the document is finished). + */ + simdjson_inline void abandon() noexcept; + + /** + * Advance the current token without modifying depth. + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + + /** + * Returns true if there is a single token in the index (i.e., it is + * a JSON with a scalar value such as a single number). + * + * @return whether there is a single token + */ + simdjson_inline bool is_single_token() const noexcept; + + /** + * Assert that there are at least the given number of tokens left. + * + * Has no effect in release builds. + */ + simdjson_inline void assert_more_tokens(uint32_t required_tokens=1) const noexcept; + /** + * Assert that the given position addresses an actual token (is within bounds). + * + * Has no effect in release builds. + */ + simdjson_inline void assert_valid_position(token_position position) const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + /** + * Get a pointer to the current location in the input buffer. + * + * This is not null-terminated; it is a view into the JSON. + * + * You may be pointing outside of the input buffer: it is not generally + * safe to dereference this pointer. + */ + simdjson_inline const uint8_t *unsafe_pointer() const noexcept; + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token to retrieve. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token to retrieve. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + /** + * Get the JSON text for the last token in the document. + * + * This is not null-terminated; it is a view into the JSON. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek_last() const noexcept; + + /** + * Ascend one level. + * + * Validates that the depth - 1 == parent_depth. + * + * @param parent_depth the expected parent depth. + */ + simdjson_inline void ascend_to(depth_t parent_depth) noexcept; + + /** + * Descend one level. + * + * Validates that the new depth == child_depth. + * + * @param child_depth the expected child depth. + */ + simdjson_inline void descend_to(depth_t child_depth) noexcept; + simdjson_inline void descend_to(depth_t child_depth, int32_t delta) noexcept; + + /** + * Get current depth. + */ + simdjson_inline depth_t depth() const noexcept; + + /** + * Get current (writeable) location in the string buffer. + */ + simdjson_inline uint8_t *&string_buf_loc() noexcept; + + /** + * Report an unrecoverable error, preventing further iteration. + * + * @param error The error to report. Must not be SUCCESS, UNINITIALIZED, INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + /** + * Log error, but don't stop iteration. + * @param error The error to report. Must be INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code optional_error(error_code error, const char *message) noexcept; + + /** + * Take an input in json containing max_len characters and attempt to copy it over to tmpbuf, a buffer with + * N bytes of capacity. It will return false if N is too small (smaller than max_len) of if it is zero. + * The buffer (tmpbuf) is padded with space characters. + */ + simdjson_warn_unused simdjson_inline bool copy_to_buffer(const uint8_t *json, uint32_t max_len, uint8_t *tmpbuf, size_t N) noexcept; + + simdjson_inline token_position position() const noexcept; + /** + * Write the raw_json_string to the string buffer and return a string_view. + * Each raw_json_string should be unescaped once, or else the string buffer might + * overflow. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, bool allow_replacement) noexcept; + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in) noexcept; + + simdjson_inline void reenter_child(token_position position, depth_t child_depth) noexcept; + + simdjson_inline error_code consume_character(char c) noexcept; +#if SIMDJSON_DEVELOPMENT_CHECKS + simdjson_inline token_position start_position(depth_t depth) const noexcept; + simdjson_inline void set_start_position(depth_t depth, token_position position) noexcept; +#endif + + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Updates this json iterator so that it is back at the beginning of the document, + * as if it had just been created. + */ + inline void rewind() noexcept; + /** + * This checks whether the {,},[,] are balanced so that the document + * ends with proper zero depth. This requires scanning the whole document + * and it may be expensive. It is expected that it will be rarely called. + * It does not attempt to match { with } and [ with ]. + */ + inline bool balanced() const noexcept; +protected: + simdjson_inline json_iterator(const uint8_t *buf, ondemand::parser *parser) noexcept; + /// The last token before the end + simdjson_inline token_position last_position() const noexcept; + /// The token *at* the end. This points at gibberish and should only be used for comparison. + simdjson_inline token_position end_position() const noexcept; + /// The end of the buffer. + simdjson_inline token_position end() const noexcept; + + friend class document; + friend class document_stream; + friend class object; + friend class array; + friend class value; + friend class raw_json_string; + friend class parser; + friend class value_iterator; + template + 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; + template + 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; +}; // json_iterator + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::json_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H +/* end file simdjson/generic/ondemand/json_iterator.h for haswell */ +/* including simdjson/generic/ondemand/json_type.h for haswell: #include "simdjson/generic/ondemand/json_type.h" */ +/* begin file simdjson/generic/ondemand/json_type.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * The type of a JSON value. + */ +enum class json_type { + // Start at 1 to catch uninitialized / default values more easily + array=1, ///< A JSON array ( [ 1, 2, 3 ... ] ) + 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" ...) + boolean, ///< A JSON boolean (true or false) + null ///< A JSON null (null) +}; + +/** + * A type representing a JSON number. + * The design of the struct is deliberately straight-forward. All + * functions return standard values with no error check. + */ +struct number { + + /** + * 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 + * }; + */ + simdjson_inline ondemand::number_type get_number_type() const noexcept; + /** + * return true if the automatically determined type of + * the number is number_type::unsigned_integer. + */ + simdjson_inline bool is_uint64() const noexcept; + /** + * return the value as a uint64_t, only valid if is_uint64() is true. + */ + simdjson_inline uint64_t get_uint64() const noexcept; + simdjson_inline operator uint64_t() const noexcept; + + /** + * return true if the automatically determined type of + * the number is number_type::signed_integer. + */ + simdjson_inline bool is_int64() const noexcept; + /** + * return the value as a int64_t, only valid if is_int64() is true. + */ + simdjson_inline int64_t get_int64() const noexcept; + simdjson_inline operator int64_t() const noexcept; + + + /** + * return true if the automatically determined type of + * the number is number_type::floating_point_number. + */ + simdjson_inline bool is_double() const noexcept; + /** + * return the value as a double, only valid if is_double() is true. + */ + simdjson_inline double get_double() const noexcept; + simdjson_inline operator double() const noexcept; + + /** + * Convert the number to a double. Though it always succeed, the conversion + * may be lossy if the number cannot be represented exactly. + */ + simdjson_inline double as_double() const noexcept; + + +protected: + /** + * The next block of declaration is designed so that we can call the number parsing + * functions on a number type. They are protected and should never be used outside + * of the core simdjson library. + */ + friend class value_iterator; + template + friend error_code numberparsing::slow_float_parsing(simdjson_unused const uint8_t * src, W writer); + template + 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); + template + friend error_code numberparsing::parse_number(const uint8_t *const src, W &writer); + /** Store a signed 64-bit value to the number. */ + simdjson_inline void append_s64(int64_t value) noexcept; + /** Store an unsigned 64-bit value to the number. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + /** Store a double value to the number. */ + simdjson_inline void append_double(double value) noexcept; + /** Specifies that the value is a double, but leave it undefined. */ + simdjson_inline void skip_double() noexcept; + /** + * End of friend declarations. + */ + + /** + * Our attributes are a union type (size = 64 bits) + * followed by a type indicator. + */ + union { + double floating_point_number; + int64_t signed_integer; + uint64_t unsigned_integer; + } payload{0}; + number_type type{number_type::signed_integer}; +}; + +/** + * Write the JSON type to the output stream + * + * @param out The output stream. + * @param type The json_type. + */ +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept; + +#if SIMDJSON_EXCEPTIONS +/** + * Send JSON type to an output stream. + * + * @param out The output stream. + * @param type The json_type. + * @throw simdjson_error if the result being printed has an error. If there is an error with the + * underlying output stream, that error will be propagated (simdjson_error will not be + * thrown). + */ +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false); +#endif + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::json_type &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H +/* end file simdjson/generic/ondemand/json_type.h for haswell */ +/* including simdjson/generic/ondemand/raw_json_string.h for haswell: #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * A string escaped per JSON rules, terminated with quote ("). They are used to represent + * unescaped keys inside JSON documents. + * + * (In other words, a pointer to the beginning of a string, just after the start quote, inside a + * JSON file.) + * + * This class is deliberately simplistic and has little functionality. You can + * compare a raw_json_string instance with an unescaped C string, but + * that is nearly all you can do. + * + * 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(). + * + */ +class raw_json_string { +public: + /** + * Create a new invalid raw_json_string. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline raw_json_string() noexcept = default; + + /** + * Create a new invalid raw_json_string pointed at the given location in the JSON. + * + * 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. + */ + simdjson_inline raw_json_string(const uint8_t * _buf) noexcept; + /** + * 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. + */ + simdjson_inline const char * raw() const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done) on target.size() characters, + * and if the raw_json_string instance has a quote character at byte index target.size(). + * We never read more than length + 1 bytes in the raw_json_string instance. + * If length is smaller than target.size(), this will return false. + * + * 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. + */ + 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-byte equal (no escaping is done). + * The std::string_view instance should not contain unescaped quote characters: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * Performance: the comparison is done byte-by-byte which might be inefficient for + * long strings. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + * The provided C string should not contain an unescaped quote character: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(const char* target) const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(const char* target) const noexcept; + + /** + * 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!). + */ + static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept; + static simdjson_inline bool is_free_from_unescaped_quote(const char* target) noexcept; + +private: + + + /** + * This will set the inner pointer to zero, effectively making + * this instance unusable. + */ + simdjson_inline void consume() noexcept { buf = nullptr; } + + /** + * Checks whether the inner pointer is non-null and thus usable. + */ + simdjson_inline simdjson_warn_unused bool alive() const noexcept { return buf != nullptr; } + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result will be a valid UTF-8. + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + * @param allow_replacement Whether we allow replacement of invalid surrogate pairs. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape(json_iterator &iter, bool allow_replacement) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result may not be a valid UTF-8. https://simonsapin.github.io/wtf-8/ + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(json_iterator &iter) const noexcept; + const uint8_t * buf{}; + friend class object; + friend class field; + friend class parser; + friend struct simdjson_result; +}; + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &, const raw_json_string &) noexcept; + +/** + * 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. + */ +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept; +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept; + + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::raw_json_string &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private + + simdjson_inline simdjson_result raw() const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape(haswell::ondemand::json_iterator &iter, bool allow_replacement) const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(haswell::ondemand::json_iterator &iter) const noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H +/* end file simdjson/generic/ondemand/raw_json_string.h for haswell */ +/* including simdjson/generic/ondemand/parser.h for haswell: #include "simdjson/generic/ondemand/parser.h" */ +/* begin file simdjson/generic/ondemand/parser.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * The default batch size for document_stream instances for this On Demand kernel. + * Note that different On Demand kernel may use a different DEFAULT_BATCH_SIZE value + * in the future. + */ +static constexpr size_t DEFAULT_BATCH_SIZE = 1000000; +/** + * Some adversary might try to set the batch size to 0 or 1, which might cause problems. + * We set a minimum of 32B since anything else is highly likely to be an error. In practice, + * most users will want a much larger batch size. + * + * All non-negative MINIMAL_BATCH_SIZE values should be 'safe' except that, obviously, no JSON + * document can ever span 0 or 1 byte and that very large values would create memory allocation issues. + */ +static constexpr size_t MINIMAL_BATCH_SIZE = 32; + +/** + * A JSON fragment iterator. + * + * This holds the actual iterator as well as the buffer for writing strings. + */ +class parser { +public: + /** + * Create a JSON parser. + * + * The new parser will have zero capacity. + */ + inline explicit parser(size_t max_capacity = SIMDJSON_MAXSIZE_BYTES) noexcept; + + inline parser(parser &&other) noexcept = default; + simdjson_inline parser(const parser &other) = delete; + simdjson_inline parser &operator=(const parser &other) = delete; + simdjson_inline parser &operator=(parser &&other) noexcept = default; + + /** Deallocate the JSON parser. */ + inline ~parser() noexcept = default; + + /** + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * document doc = parser.iterate(json); + * + * It is expected that the content is a valid UTF-8 file, containing a valid JSON document. + * Otherwise the iterate method may return an error. In particular, the whole input should be + * valid: we do not attempt to tolerate incorrect content either before or after a JSON + * document. If there is a UTF-8 BOM, the parser skips it. + * + * ### IMPORTANT: Validate what you use + * + * Calling iterate on an invalid JSON document may not immediately trigger an error. The call to + * iterate does not parse and validate the whole document. + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * @param len The length of the JSON. + * @param capacity The number of bytes allocated in the JSON (must be at least len+SIMDJSON_PADDING). + * + * @return The document, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate(padded_string_view json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const char *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const uint8_t *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string_view json, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(padded_string &&json) & noexcept = delete; + + /** + * @private + * + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * json_iterator doc = parser.iterate(json); + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * The ondemand::document instance holds the iterator. The document must remain in scope + * while you are accessing instances of ondemand::value, ondemand::object, ondemand::array. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * + * @return The iterator, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate_raw(padded_string_view json) & noexcept; + + + /** + * Parse a buffer containing many JSON documents. + * + * auto json = R"({ "foo": 1 } { "foo": 2 } { "foo": 3 } )"_padded; + * ondemand::parser parser; + * ondemand::document_stream docs = parser.iterate_many(json); + * for (auto & doc : docs) { + * std::cout << doc["foo"] << std::endl; + * } + * // Prints 1 2 3 + * + * No copy of the input buffer is made. + * + * The function is lazy: it may be that no more than one JSON document at a time is parsed. + * + * The caller is responsabile to ensure that the input string data remains unchanged and is + * not deleted during the loop. + * + * ### Format + * + * The buffer must contain a series of one or more JSON documents, concatenated into a single + * buffer, separated by ASCII whitespace. It effectively parses until it has a fully valid document, + * then starts parsing the next document at that point. (It does this with more parallelism and + * lookahead than you might think, though.) + * + * documents that consist of an object or array may omit the whitespace between them, concatenating + * with no separator. Documents that consist of a single primitive (i.e. documents that are not + * arrays or objects) MUST be separated with ASCII whitespace. + * + * The characters inside a JSON document, and between JSON documents, must be valid Unicode (UTF-8). + * If there is a UTF-8 BOM, the parser skips it. + * + * The documents must not exceed batch_size bytes (by default 1MB) or they will fail to parse. + * Setting batch_size to excessively large or excessively small values may impact negatively the + * performance. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * ### Threads + * + * When compiled with SIMDJSON_THREADS_ENABLED, this method will use a single thread under the + * hood to do some lookahead. + * + * ### Parser Capacity + * + * If the parser's current capacity is less than batch_size, it will allocate enough capacity + * to handle it (up to max_capacity). + * + * @param buf The concatenated JSON to parse. + * @param len The length of the concatenated JSON. + * @param batch_size The batch size to use. MUST be larger than the largest document. The sweet + * spot is cache-related: small enough to fit in cache, yet big enough to + * parse as many documents as possible in one tight loop. + * Defaults to 10MB, which has been a reasonable sweet spot in our tests. + * @param allow_comma_separated (defaults on false) This allows a mode where the documents are + * separated by commas instead of whitespace. It comes with a performance + * penalty because the entire document is indexed at once (and the document must be + * less than 4 GB), and there is no multithreading. In this mode, the batch_size parameter + * is effectively ignored, as it is set to at least the document size. + * @return The stream, or an error. An empty input will yield 0 documents rather than an EMPTY error. Errors: + * - MEMALLOC if the parser does not have enough capacity and memory allocation fails + * - CAPACITY if the parser does not have enough capacity and batch_size > max_capacity. + * - other json errors if parsing fails. You should not rely on these errors to always the same for the + * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). + */ + inline simdjson_result iterate_many(const uint8_t *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const char *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const std::string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const std::string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const padded_string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const padded_string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + + /** @private We do not want to allow implicit conversion from C string to std::string. */ + simdjson_result iterate_many(const char *buf, size_t batch_size = DEFAULT_BATCH_SIZE) noexcept = delete; + + /** The capacity of this parser (the largest document it can process). */ + simdjson_inline size_t capacity() const noexcept; + /** The maximum capacity of this parser (the largest document it is allowed to process). */ + simdjson_inline size_t max_capacity() const noexcept; + simdjson_inline void set_max_capacity(size_t max_capacity) noexcept; + /** + * 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. + */ + simdjson_inline size_t max_depth() const noexcept; + + /** + * Ensure this parser has enough memory to process JSON documents up to `capacity` bytes in length + * and `max_depth` depth. + * + * The max_depth 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. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. Defaults to DEFAULT_MAX_DEPTH. + * @return The error, if there is one. + */ + simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept; + + #ifdef SIMDJSON_THREADS_ENABLED + /** + * The parser instance can use threads when they are available to speed up some + * operations. It is enabled by default. Changing this attribute will change the + * behavior of the parser for future operations. + */ + bool threaded{true}; + #endif + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result must be valid UTF-8. + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @param allow_replacement Whether we allow a replacement if the input string contains unmatched surrogate pairs. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement = false) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result may not be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept; + +private: + /** @private [for benchmarking access] The implementation to use */ + std::unique_ptr implementation{}; + size_t _capacity{0}; + size_t _max_capacity; + size_t _max_depth{DEFAULT_MAX_DEPTH}; + std::unique_ptr string_buf{}; +#if SIMDJSON_DEVELOPMENT_CHECKS + std::unique_ptr start_positions{}; +#endif + + friend class json_iterator; + friend class document_stream; +}; + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::parser &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_H +/* end file simdjson/generic/ondemand/parser.h for haswell */ + +// All other declarations +/* including simdjson/generic/ondemand/array.h for haswell: #include "simdjson/generic/ondemand/array.h" */ +/* begin file simdjson/generic/ondemand/array.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * A forward-only JSON array. + */ +class array { +public: + /** + * Create a new invalid array. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline array() noexcept = default; + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result is_empty() & noexcept; + /** + * Reset the iterator so that we are pointing back at the + * beginning of the array. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"([ { "foo": { "a": [ 10, 20, 30 ] }} ])"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/0/foo/a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an array + * instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * Consumes the array and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Get the value at the given index. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; +protected: + /** + * Go to the end of the array, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + + /** + * Begin array iteration. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + */ + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + /** + * Begin array iteration from the root. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + * @error TAPE_ERROR if there is no closing ] at the end of the document. + */ + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + /** + * Begin array iteration. + * + * This version of the method should be called after the initial [ has been verified, and is + * intended for use by switch statements that check the type of a value. + * + * @param iter The iterator. Must be after the initial [. Will be *moved* into the resulting array. + */ + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + + /** + * Create an array at the given Internal array creation. Call array::start() or array::started() instead of this. + * + * @param iter The iterator. Must either be at the start of the first element with iter.is_alive() + * == true, or past the [] with is_alive() == false if the array is empty. Will be *moved* + * into the resulting array. + */ + simdjson_inline array(const value_iterator &iter) noexcept; + + /** + * Iterator marking current position. + * + * iter.is_alive() == false indicates iteration is complete. + */ + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; + friend struct simdjson_result; + friend class array_iterator; +}; + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::array &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + inline simdjson_result count_elements() & noexcept; + inline simdjson_result is_empty() & noexcept; + inline simdjson_result reset() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_H +/* end file simdjson/generic/ondemand/array.h for haswell */ +/* including simdjson/generic/ondemand/array_iterator.h for haswell: #include "simdjson/generic/ondemand/array_iterator.h" */ +/* begin file simdjson/generic/ondemand/array_iterator.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * A forward-only JSON array. + * + * This is an input_iterator, meaning: + * - It is forward-only + * - * must be called exactly once per element. + * - ++ must be called exactly once in between each * (*, ++, *, ++, * ...) + */ +class array_iterator { +public: + /** Create a new, invalid array iterator. */ + simdjson_inline array_iterator() noexcept = default; + + // + // Iterator interface + // + + /** + * Get the current element. + * + * Part of the std::iterator interface. + */ + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + /** + * Check if we are at the end of the JSON. + * + * Part of the std::iterator interface. + * + * @return true if there are no more elements in the JSON array. + */ + simdjson_inline bool operator==(const array_iterator &) const noexcept; + /** + * Check if there are more elements in the JSON array. + * + * Part of the std::iterator interface. + * + * @return true if there are more elements in the JSON array. + */ + simdjson_inline bool operator!=(const array_iterator &) const noexcept; + /** + * Move to the next element. + * + * Part of the std::iterator interface. + */ + simdjson_inline array_iterator &operator++() noexcept; + +private: + value_iterator iter{}; + + simdjson_inline array_iterator(const value_iterator &iter) noexcept; + + friend class array; + friend class value; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::array_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H +/* end file simdjson/generic/ondemand/array_iterator.h for haswell */ +/* including simdjson/generic/ondemand/document.h for haswell: #include "simdjson/generic/ondemand/document.h" */ +/* begin file simdjson/generic/ondemand/document.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * A JSON document. It holds a json_iterator instance. + * + * Used by tokens to get text, and string buffer location. + * + * You must keep the document around during iteration. + */ +class document { +public: + /** + * Create a new invalid document. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline document() noexcept = default; + simdjson_inline document(const document &other) noexcept = delete; // pass your documents by reference, not by copy + simdjson_inline document(document &&other) noexcept = default; + simdjson_inline document &operator=(const document &other) noexcept = delete; + simdjson_inline document &operator=(document &&other) noexcept = default; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() & noexcept; + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() & noexcept; + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + /** + * Cast this JSON value (inside string) to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: Calling get_string() twice on the same document is an error. + * + * @param Whether to allow a replacement character for unmatched surrogate pairs. + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + /** + * Cast this JSON value to a string. + * + * The string is not guaranteed to be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * + * Important: Calling get_wobbly_string() twice on the same document is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is set to 1 (which is the case when building in Debug mode + * by default), and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value if a JSON array or object cannot be found. + * @returns SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result get_value() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() & noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + /** @overload template simdjson_result get() & noexcept */ + template simdjson_inline simdjson_result get() && noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool, value + * + * Be mindful that the document instance must remain in scope while you are accessing object, array and value instances. + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) & noexcept; + /** @overload template error_code get(T &out) & noexcept */ + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() & noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() & noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * 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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is defined, and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value value if a JSON array or object cannot be found. + * @exception SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline operator value() noexcept(false); +#endif + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * To check that an object is empty, it is more performant to use + * the is_empty() method. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) & noexcept; + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to + * a key a single time. Doing object["mykey"].to_string()and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the document is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the document is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the document is an integer number. 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. If this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view may be the padded buffer. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + /** + * 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). + */ + inline void rewind() noexcept; + /** + * Returns debugging information. + */ + inline std::string to_debug_string() noexcept; + /** + * Some unrecoverable error conditions may render the document instance unusable. + * The is_alive() method returns true when the document is still suitable. + */ + inline bool is_alive() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Returns true if this document has been fully parsed. + * If you have consumed the whole document and at_end() returns + * false, then there may be trailing content. + */ + inline bool at_end() const noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() automatically calls rewind between each call. Thus + * all values, objects and arrays that you have created so far (including unescaped strings) + * are invalidated. After calling at_pointer, you need to consume the result: string values + * should be stored in your own variables, arrays should be decoded and stored in your own array-like + * structures and so forth. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + * - SCALAR_DOCUMENT_AS_VALUE if the json_pointer is empty and the document is not a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; +protected: + /** + * Consumes the document. + */ + simdjson_inline error_code consume() noexcept; + + simdjson_inline document(ondemand::json_iterator &&iter) noexcept; + simdjson_inline const uint8_t *text(uint32_t idx) const noexcept; + + simdjson_inline value_iterator resume_value_iterator() noexcept; + simdjson_inline value_iterator get_root_value_iterator() noexcept; + simdjson_inline simdjson_result start_or_resume_object() noexcept; + static simdjson_inline document start(ondemand::json_iterator &&iter) noexcept; + + // + // Fields + // + json_iterator iter{}; ///< Current position in the document + static constexpr depth_t DOCUMENT_DEPTH = 0; ///< document depth is always 0 + + friend class array_iterator; + friend class value; + friend class ondemand::parser; + friend class object; + friend class array; + friend class field; + friend class token; + friend class document_stream; + friend class document_reference; +}; + + +/** + * A document_reference is a thin wrapper around a document reference instance. + */ +class document_reference { +public: + simdjson_inline document_reference() noexcept; + simdjson_inline document_reference(document &d) noexcept; + simdjson_inline document_reference(const document_reference &other) noexcept = default; + simdjson_inline document_reference& operator=(const document_reference &other) noexcept = default; + simdjson_inline void rewind() noexcept; + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + + simdjson_inline simdjson_result is_null() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + simdjson_inline operator document&() const noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator array() & noexcept(false); + simdjson_inline operator object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +private: + document *doc{nullptr}; +}; +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::document &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() & noexcept; + template simdjson_inline simdjson_result get() && noexcept; + + template simdjson_inline error_code get(T &out) & noexcept; + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator haswell::ondemand::array() & noexcept(false); + simdjson_inline operator haswell::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator haswell::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator haswell::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool at_end() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + + + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::document_reference value, error_code error) noexcept; + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator haswell::ondemand::array() & noexcept(false); + simdjson_inline operator haswell::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator haswell::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator haswell::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document_reference::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H +/* end file simdjson/generic/ondemand/document.h for haswell */ +/* including simdjson/generic/ondemand/document_stream.h for haswell: #include "simdjson/generic/ondemand/document_stream.h" */ +/* begin file simdjson/generic/ondemand/document_stream.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#ifdef SIMDJSON_THREADS_ENABLED +#include +#include +#include +#endif + +namespace simdjson { +namespace haswell { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED +/** @private Custom worker class **/ +struct stage1_worker { + stage1_worker() noexcept = default; + stage1_worker(const stage1_worker&) = delete; + stage1_worker(stage1_worker&&) = delete; + stage1_worker operator=(const stage1_worker&) = delete; + ~stage1_worker(); + /** + * We only start the thread when it is needed, not at object construction, this may throw. + * You should only call this once. + **/ + void start_thread(); + /** + * Start a stage 1 job. You should first call 'run', then 'finish'. + * You must call start_thread once before. + */ + void run(document_stream * ds, parser * stage1, size_t next_batch_start); + /** Wait for the run to finish (blocking). You should first call 'run', then 'finish'. **/ + void finish(); + +private: + + /** + * Normally, we would never stop the thread. But we do in the destructor. + * This function is only safe assuming that you are not waiting for results. You + * should have called run, then finish, and be done. + **/ + void stop_thread(); + + std::thread thread{}; + /** These three variables define the work done by the thread. **/ + ondemand::parser * stage1_thread_parser{}; + size_t _next_batch_start{}; + document_stream * owner{}; + /** + * We have two state variables. This could be streamlined to one variable in the future but + * we use two for clarity. + */ + bool has_work{false}; + bool can_work{true}; + + /** + * We lock using a mutex. + */ + std::mutex locking_mutex{}; + std::condition_variable cond_var{}; + + friend class document_stream; +}; +#endif // SIMDJSON_THREADS_ENABLED + +/** + * A forward-only stream of documents. + * + * Produced by parser::iterate_many. + * + */ +class document_stream { +public: + /** + * Construct an uninitialized document_stream. + * + * ```c++ + * document_stream docs; + * auto error = parser.iterate_many(json).get(docs); + * ``` + */ + simdjson_inline document_stream() noexcept; + /** Move one document_stream to another. */ + simdjson_inline document_stream(document_stream &&other) noexcept = default; + /** Move one document_stream to another. */ + simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default; + + simdjson_inline ~document_stream() noexcept; + + /** + * Returns the input size in bytes. + */ + inline size_t size_in_bytes() const noexcept; + + /** + * After iterating through the stream, this method + * returns the number of bytes that were not parsed at the end + * of the stream. If truncated_bytes() differs from zero, + * then the input was truncated maybe because incomplete JSON + * documents were found at the end of the stream. You + * may need to process the bytes in the interval [size_in_bytes()-truncated_bytes(), size_in_bytes()). + * + * You should only call 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(); + * + */ + inline size_t truncated_bytes() const noexcept; + + class iterator { + public: + using value_type = simdjson_result; + using reference = value_type; + + using difference_type = std::ptrdiff_t; + + using iterator_category = std::input_iterator_tag; + + /** + * Default constructor. + */ + simdjson_inline iterator() noexcept; + /** + * Get the current document (or error). + */ + simdjson_inline simdjson_result operator*() noexcept; + /** + * Advance to the next document (prefix). + */ + inline iterator& operator++() noexcept; + /** + * Check if we're at the end yet. + * @param other the end iterator to compare to. + */ + simdjson_inline bool operator!=(const iterator &other) const noexcept; + /** + * @private + * + * Gives the current index in the input document in bytes. + * + * document_stream stream = parser.parse_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * auto doc = *i; + * size_t index = i.current_index(); + * } + * + * This function (current_index()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + */ + simdjson_inline size_t current_index() const noexcept; + + /** + * @private + * + * Gives a view of the current document at the current position. + * + * document_stream stream = parser.iterate_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * std::string_view v = i.source(); + * } + * + * The returned string_view instance is simply a map to the (unparsed) + * source string: it may thus include white-space characters and all manner + * of padding. + * + * This function (source()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + * + */ + simdjson_inline std::string_view source() const noexcept; + + /** + * Returns error of the stream (if any). + */ + inline error_code error() const noexcept; + + private: + simdjson_inline iterator(document_stream *s, bool finished) noexcept; + /** The document_stream we're iterating through. */ + document_stream* stream; + /** Whether we're finished or not. */ + bool finished; + + friend class document; + friend class document_stream; + friend class json_iterator; + }; + + /** + * Start iterating the documents in the stream. + */ + simdjson_inline iterator begin() noexcept; + /** + * The end of the stream, for iterator comparison purposes. + */ + simdjson_inline iterator end() noexcept; + +private: + + document_stream &operator=(const document_stream &) = delete; // Disallow copying + document_stream(const document_stream &other) = delete; // Disallow copying + + /** + * Construct a document_stream. Does not allocate or parse anything until the iterator is + * used. + * + * @param parser is a reference to the parser instance used to generate this document_stream + * @param buf is the raw byte buffer we need to process + * @param len is the length of the raw byte buffer in bytes + * @param batch_size is the size of the windows (must be strictly greater or equal to the largest JSON document) + */ + simdjson_inline document_stream( + ondemand::parser &parser, + const uint8_t *buf, + size_t len, + size_t batch_size, + bool allow_comma_separated + ) noexcept; + + /** + * Parse the first document in the buffer. Used by begin(), to handle allocation and + * initialization. + */ + inline void start() noexcept; + + /** + * Parse the next document found in the buffer previously given to document_stream. + * + * The content should be a valid JSON document encoded as UTF-8. If there is a + * UTF-8 BOM, the parser skips it. + * + * You do NOT need to pre-allocate a parser. This function takes care of + * pre-allocating a capacity defined by the batch_size defined when creating the + * document_stream object. + * + * The function returns simdjson::EMPTY if there is no more data to be parsed. + * + * The function returns simdjson::SUCCESS (as integer = 0) in case of success + * and indicates that the buffer has successfully been parsed to the end. + * Every document it contained has been parsed without error. + * + * The function returns an error code from simdjson/simdjson.h in case of failure + * such as simdjson::CAPACITY, simdjson::MEMALLOC, simdjson::DEPTH_ERROR and so forth; + * the simdjson::error_message function converts these error codes into a string). + * + * You can also check validity by calling parser.is_valid(). The same parser can + * and should be reused for the other documents in the buffer. + */ + inline void next() noexcept; + + /** Move the json_iterator of the document to the location of the next document in the stream. */ + inline void next_document() noexcept; + + /** Get the next document index. */ + inline size_t next_batch_start() const noexcept; + + /** Pass the next batch through stage 1 with the given parser. */ + inline error_code run_stage1(ondemand::parser &p, size_t batch_start) noexcept; + + // Fields + ondemand::parser *parser; + const uint8_t *buf; + size_t len; + size_t batch_size; + bool allow_comma_separated; + /** + * We are going to use just one document instance. The document owns + * the json_iterator. It implies that we only ever pass a reference + * to the document to the users. + */ + document doc{}; + /** The error (or lack thereof) from the current document. */ + error_code error; + size_t batch_start{0}; + size_t doc_index{}; + + #ifdef SIMDJSON_THREADS_ENABLED + /** Indicates whether we use threads. Note that this needs to be a constant during the execution of the parsing. */ + bool use_thread; + + inline void load_from_stage1_thread() noexcept; + + /** Start a thread to run stage 1 on the next batch. */ + inline void start_stage1_thread() noexcept; + + /** Wait for the stage 1 thread to finish and capture the results. */ + inline void finish_stage1_thread() noexcept; + + /** The error returned from the stage 1 thread. */ + error_code stage1_thread_error{UNINITIALIZED}; + /** The thread used to run stage 1 against the next batch in the background. */ + std::unique_ptr worker{new(std::nothrow) stage1_worker()}; + /** + * The parser used to run stage 1 in the background. Will be swapped + * with the regular parser when finished. + */ + ondemand::parser stage1_thread_parser{}; + + friend struct stage1_worker; + #endif // SIMDJSON_THREADS_ENABLED + + friend class parser; + friend class document; + friend class json_iterator; + friend struct simdjson_result; + friend struct internal::simdjson_result_base; +}; // document_stream + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::document_stream &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H +/* end file simdjson/generic/ondemand/document_stream.h for haswell */ +/* including simdjson/generic/ondemand/field.h for haswell: #include "simdjson/generic/ondemand/field.h" */ +/* begin file simdjson/generic/ondemand/field.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * A JSON field (key/value pair) in an object. + * + * Returned from object iteration. + * + * Extends from std::pair so you can use C++ algorithms that rely on pairs. + */ +class field : public std::pair { +public: + /** + * Create a new invalid field. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline field() noexcept; + + /** + * Get the key as a string_view (for higher speed, consider raw_key). + * We deliberately use a more cumbersome name (unescaped_key) to force users + * to think twice about using it. + * + * This consumes the key: once you have called unescaped_key(), you cannot + * call it again nor can you call key(). + */ + simdjson_inline simdjson_warn_unused simdjson_result unescaped_key(bool allow_replacement) noexcept; + /** + * Get the key as a raw_json_string. Can be used for direct comparison with + * an unescaped C string: e.g., key() == "test". + */ + simdjson_inline raw_json_string key() const noexcept; + /** + * Get the field value. + */ + simdjson_inline ondemand::value &value() & noexcept; + /** + * @overload ondemand::value &ondemand::value() & noexcept + */ + simdjson_inline ondemand::value value() && noexcept; + +protected: + simdjson_inline field(raw_json_string key, ondemand::value &&value) noexcept; + static simdjson_inline simdjson_result start(value_iterator &parent_iter) noexcept; + static simdjson_inline simdjson_result start(const value_iterator &parent_iter, raw_json_string key) noexcept; + friend struct simdjson_result; + friend class object_iterator; +}; + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::field &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result unescaped_key(bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result key() noexcept; + simdjson_inline simdjson_result value() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_H +/* end file simdjson/generic/ondemand/field.h for haswell */ +/* including simdjson/generic/ondemand/object.h for haswell: #include "simdjson/generic/ondemand/object.h" */ +/* begin file simdjson/generic/ondemand/object.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +/** + * A forward-only JSON object field iterator. + */ +class object { +public: + /** + * Create a new invalid object. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a + * key a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an object + * instance: there is no rewind and no invalidation. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + + /** + * Reset the iterator so that we are pointing back at the + * beginning of the object. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * 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. + */ + inline simdjson_result is_empty() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; + +protected: + /** + * Go to the end of the object, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + static simdjson_inline object resume(const value_iterator &iter) noexcept; + simdjson_inline object(const value_iterator &iter) noexcept; + + simdjson_warn_unused simdjson_inline error_code find_field_raw(const std::string_view key) noexcept; + + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::object &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + inline simdjson_result reset() noexcept; + inline simdjson_result is_empty() noexcept; + inline simdjson_result count_fields() & noexcept; + inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_H +/* end file simdjson/generic/ondemand/object.h for haswell */ +/* including simdjson/generic/ondemand/object_iterator.h for haswell: #include "simdjson/generic/ondemand/object_iterator.h" */ +/* begin file simdjson/generic/ondemand/object_iterator.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +class object_iterator { +public: + /** + * Create a new invalid object_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object_iterator() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline simdjson_result operator*() noexcept; + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const object_iterator &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const object_iterator &) const noexcept; + // Checks for ']' and ',' + simdjson_inline object_iterator &operator++() noexcept; + +private: + /** + * The underlying JSON iterator. + * + * PERF NOTE: expected to be elided in favor of the parent document: this is set when the object + * is first used, and never changes afterwards. + */ + value_iterator iter{}; + + simdjson_inline object_iterator(const value_iterator &iter) noexcept; + friend struct simdjson_result; + friend class object; +}; + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public haswell::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(haswell::ondemand::object_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + // Checks for ']' and ',' + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H +/* end file simdjson/generic/ondemand/object_iterator.h for haswell */ +/* including simdjson/generic/ondemand/serialization.h for haswell: #include "simdjson/generic/ondemand/serialization.h" */ +/* begin file simdjson/generic/ondemand/serialization.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * 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. + */ +inline simdjson_result to_json_string(haswell::ondemand::document& x) noexcept; +/** + * Create a string-view instance out of a value instance. 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. + */ +inline simdjson_result to_json_string(haswell::ondemand::value& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(haswell::ondemand::object& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(haswell::ondemand::array& x) noexcept; +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +} // namespace simdjson + +/** + * We want to support argument-dependent lookup (ADL). + * Hence we should define operator<< in the namespace + * where the argument (here value, object, etc.) resides. + * Credit: @madhur4127 + * See https://github.com/simdjson/simdjson/issues/1768 + */ +namespace simdjson { namespace haswell { namespace ondemand { + +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The element. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::value x); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::array value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::document& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::document_reference& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The object. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::object value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +}}} // namespace simdjson::haswell::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H +/* end file simdjson/generic/ondemand/serialization.h for haswell */ + +// Inline definitions +/* including simdjson/generic/ondemand/array-inl.h for haswell: #include "simdjson/generic/ondemand/array-inl.h" */ +/* begin file simdjson/generic/ondemand/array-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter->depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the array is first found and the iterator is just past the `{`. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the `,` before the next value (or `]`). In this state, +// depth == iter->depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter->depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter->depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the array iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet element may be missing or not be an +// array--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter->depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between elements, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter->depth == depth, and at_start == false. +// +// ## Terminal State +// +// The terminal state has iter->depth < depth. at_start is always false. +// +// - Finished: When we have reached a `]` or have reported an error, we are finished. We signal this +// by decrementing depth. In this state, iter->depth < depth, at_start == false, and +// error == SUCCESS. +// + +simdjson_inline array::array(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result array::start(value_iterator &iter) noexcept { + // We don't need to know if the array is empty to start iteration, but we do want to know if there + // is an error--thus `simdjson_unused`. + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::start_root(value_iterator &iter) noexcept { + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_root_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::started(value_iterator &iter) noexcept { + bool has_value; + SIMDJSON_TRY(iter.started_array().get(has_value)); + return array(iter); +} + +simdjson_inline simdjson_result array::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return array_iterator(iter); +} +simdjson_inline simdjson_result array::end() noexcept { + return array_iterator(iter); +} +simdjson_inline error_code array::consume() noexcept { + auto error = iter.json_iter().skip_child(iter.depth()-1); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result array::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter._json_iter->unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline simdjson_result array::count_elements() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the array after counting the number of elements. + iter.reset_array(); + return count; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline simdjson_result array::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_array().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +inline simdjson_result array::reset() & noexcept { + return iter.reset_array(); +} + +inline simdjson_result array::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + // - means "the append position" or "the element after the end of the array" + // We don't support this, because we're returning a real element, not a position. + if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; } + + // Read the array index + size_t array_index = 0; + size_t i; + for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) { + uint8_t digit = uint8_t(json_pointer[i] - '0'); + // Check for non-digit in array index. If it's there, we're trying to get a field in an object + if (digit > 9) { return INCORRECT_TYPE; } + array_index = array_index*10 + digit; + } + + // 0 followed by other digits is invalid + if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0" + + // Empty string is invalid; so is a "/" with no digits before it + if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index" + // Get the child + auto child = at(array_index); + // If there is an error, it ends here + if(child.error()) { + return child; + } + + // If there is a /, we're not done yet, call recursively. + if (i < json_pointer.length()) { + child = child.at_pointer(json_pointer.substr(i)); + } + return child; +} + +simdjson_inline simdjson_result array::at(size_t index) noexcept { + size_t i = 0; + for (auto value : *this) { + if (i == index) { return value; } + i++; + } + return INDEX_OUT_OF_BOUNDS; +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + haswell::ondemand::array &&value +) noexcept + : implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept + : implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::is_empty() & noexcept { + if (error()) { return error(); } + return first.is_empty(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H +/* end file simdjson/generic/ondemand/array-inl.h for haswell */ +/* including simdjson/generic/ondemand/array_iterator-inl.h for haswell: #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/array_iterator-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +simdjson_inline array_iterator::array_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result array_iterator::operator*() noexcept { + if (iter.error()) { iter.abandon(); return iter.error(); } + return value(iter.child()); +} +simdjson_inline bool array_iterator::operator==(const array_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool array_iterator::operator!=(const array_iterator &) const noexcept { + return iter.is_open(); +} +simdjson_inline array_iterator &array_iterator::operator++() noexcept { + error_code error; + // PERF NOTE this is a safety rail ... users should exit loops as soon as they receive an error, so we'll never get here. + // However, it does not seem to make a perf difference, so we add it out of an abundance of caution. + if (( error = iter.error() )) { return *this; } + if (( error = iter.skip_child() )) { return *this; } + if (( error = iter.has_next_element().error() )) { return *this; } + return *this; +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + haswell::ondemand::array_iterator &&value +) noexcept + : haswell::implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : haswell::implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++(first); + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/array_iterator-inl.h for haswell */ +/* including simdjson/generic/ondemand/document-inl.h for haswell: #include "simdjson/generic/ondemand/document-inl.h" */ +/* begin file simdjson/generic/ondemand/document-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +simdjson_inline document::document(ondemand::json_iterator &&_iter) noexcept + : iter{std::forward(_iter)} +{ + logger::log_start_value(iter, "document"); +} + +simdjson_inline document document::start(json_iterator &&iter) noexcept { + return document(std::forward(iter)); +} + +inline void document::rewind() noexcept { + iter.rewind(); +} + +inline std::string document::to_debug_string() noexcept { + return iter.to_string(); +} + +inline simdjson_result document::current_location() const noexcept { + return iter.current_location(); +} + +inline int32_t document::current_depth() const noexcept { + return iter.depth(); +} + +inline bool document::at_end() const noexcept { + return iter.at_end(); +} + + +inline bool document::is_alive() noexcept { + return iter.is_alive(); +} +simdjson_inline value_iterator document::resume_value_iterator() noexcept { + return value_iterator(&iter, 1, iter.root_position()); +} +simdjson_inline value_iterator document::get_root_value_iterator() noexcept { + return resume_value_iterator(); +} +simdjson_inline simdjson_result document::start_or_resume_object() noexcept { + if (iter.at_root()) { + return get_object(); + } else { + return object::resume(resume_value_iterator()); + } +} +simdjson_inline simdjson_result document::get_value() noexcept { + // Make sure we start any arrays or objects before returning, so that start_root_() + // gets called. + + // It is the convention throughout the code that the macro `SIMDJSON_DEVELOPMENT_CHECKS` determines whether + // we check for OUT_OF_ORDER_ITERATION. Proper on::demand code should never trigger this error. +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.at_root()) { return OUT_OF_ORDER_ITERATION; } +#endif + // assert_at_root() serves two purposes: in Debug mode, whether or not + // SIMDJSON_DEVELOPMENT_CHECKS is set or not, it checks that we are at the root of + // the document (this will typically be redundant). In release mode, it generates + // SIMDJSON_ASSUME statements to allow the compiler to make assumptions. + iter.assert_at_root(); + switch (*iter.peek()) { + case '[': { + // The following lines check that the document ends with ]. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_array(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + case '{': { + // The following lines would check that the document ends with }. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_object(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + default: + // Unfortunately, scalar documents are a special case in simdjson and they cannot + // be safely converted to value instances. + return SCALAR_DOCUMENT_AS_VALUE; + } +} +simdjson_inline simdjson_result document::get_array() & noexcept { + auto value = get_root_value_iterator(); + return array::start_root(value); +} +simdjson_inline simdjson_result document::get_object() & noexcept { + auto value = get_root_value_iterator(); + return object::start_root(value); +} + +/** + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. 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. + */ + +simdjson_inline simdjson_result document::get_uint64() noexcept { + return get_root_value_iterator().get_root_uint64(true); +} +simdjson_inline simdjson_result document::get_uint64_in_string() noexcept { + return get_root_value_iterator().get_root_uint64_in_string(true); +} +simdjson_inline simdjson_result document::get_int64() noexcept { + return get_root_value_iterator().get_root_int64(true); +} +simdjson_inline simdjson_result document::get_int64_in_string() noexcept { + return get_root_value_iterator().get_root_int64_in_string(true); +} +simdjson_inline simdjson_result document::get_double() noexcept { + return get_root_value_iterator().get_root_double(true); +} +simdjson_inline simdjson_result document::get_double_in_string() noexcept { + return get_root_value_iterator().get_root_double_in_string(true); +} +simdjson_inline simdjson_result document::get_string(bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(true, allow_replacement); +} +template +simdjson_inline error_code document::get_string(string_type& receiver, bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(receiver, true, allow_replacement); +} +simdjson_inline simdjson_result document::get_wobbly_string() noexcept { + return get_root_value_iterator().get_root_wobbly_string(true); +} +simdjson_inline simdjson_result document::get_raw_json_string() noexcept { + return get_root_value_iterator().get_root_raw_json_string(true); +} +simdjson_inline simdjson_result document::get_bool() noexcept { + return get_root_value_iterator().get_root_bool(true); +} +simdjson_inline simdjson_result document::is_null() noexcept { + return get_root_value_iterator().is_root_null(true); +} + +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_array(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_object(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_double(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_bool(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_value(); } + +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_double(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_uint64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_int64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_bool(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_value(); } + +template simdjson_inline error_code document::get(T &out) & noexcept { + return get().get(out); +} +template simdjson_inline error_code document::get(T &out) && noexcept { + return std::forward(*this).get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document::operator array() & noexcept(false) { return get_array(); } +simdjson_inline document::operator object() & noexcept(false) { return get_object(); } +simdjson_inline document::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document::operator double() noexcept(false) { return get_double(); } +simdjson_inline document::operator std::string_view() noexcept(false) { return get_string(false); } +simdjson_inline document::operator raw_json_string() noexcept(false) { return get_raw_json_string(); } +simdjson_inline document::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document::operator value() noexcept(false) { return get_value(); } + +#endif +simdjson_inline simdjson_result document::count_elements() & noexcept { + auto a = get_array(); + simdjson_result answer = a.count_elements(); + /* If there was an array, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::count_fields() & noexcept { + auto a = get_object(); + simdjson_result answer = a.count_fields(); + /* If there was an object, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::at(size_t index) & noexcept { + auto a = get_array(); + return a.at(index); +} +simdjson_inline simdjson_result document::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result document::end() & noexcept { + return {}; +} + +simdjson_inline simdjson_result document::find_field(std::string_view key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field(const char *key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field_unordered(std::string_view key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::find_field_unordered(const char *key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::operator[](std::string_view key) & noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result document::operator[](const char *key) & noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline error_code document::consume() noexcept { + auto error = iter.skip_child(0); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result document::raw_json() noexcept { + auto _iter = get_root_value_iterator(); + const uint8_t * starting_point{_iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter.unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result document::type() noexcept { + return get_root_value_iterator().type(); +} + +simdjson_inline simdjson_result document::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool document::is_negative() noexcept { + return get_root_value_iterator().is_root_negative(); +} + +simdjson_inline simdjson_result document::is_integer() noexcept { + return get_root_value_iterator().is_root_integer(true); +} + +simdjson_inline simdjson_result document::get_number_type() noexcept { + return get_root_value_iterator().get_root_number_type(true); +} + +simdjson_inline simdjson_result document::get_number() noexcept { + return get_root_value_iterator().get_root_number(true); +} + + +simdjson_inline simdjson_result document::raw_json_token() noexcept { + auto _iter = get_root_value_iterator(); + return std::string_view(reinterpret_cast(_iter.peek_start()), _iter.peek_start_length()); +} + +simdjson_inline simdjson_result document::at_pointer(std::string_view json_pointer) noexcept { + rewind(); // Rewind the document each time at_pointer is called + if (json_pointer.empty()) { + return this->get_value(); + } + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + haswell::ondemand::document &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base( + error + ) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template +simdjson_inline simdjson_result simdjson_result::get() & noexcept { + if (error()) { return error(); } + return first.get(); +} +template +simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first).get(); +} +template +simdjson_inline error_code simdjson_result::get(T &out) & noexcept { + if (error()) { return error(); } + return first.get(out); +} +template +simdjson_inline error_code simdjson_result::get(T &out) && noexcept { + if (error()) { return error(); } + return std::forward(first).get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() & noexcept = delete; +template<> simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first); +} +template<> simdjson_inline error_code simdjson_result::get(haswell::ondemand::document &out) & noexcept = delete; +template<> simdjson_inline error_code simdjson_result::get(haswell::ondemand::document &out) && noexcept { + if (error()) { return error(); } + out = std::forward(first); + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} + +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} + + +simdjson_inline bool simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} + +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} + +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} + +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} + + +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator haswell::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator haswell::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator haswell::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator haswell::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline bool simdjson_result::at_end() const noexcept { + if (error()) { return error(); } + return first.at_end(); +} + + +simdjson_inline int32_t simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + + +namespace simdjson { +namespace haswell { +namespace ondemand { + +simdjson_inline document_reference::document_reference() noexcept : doc{nullptr} {} +simdjson_inline document_reference::document_reference(document &d) noexcept : doc(&d) {} +simdjson_inline void document_reference::rewind() noexcept { doc->rewind(); } +simdjson_inline simdjson_result document_reference::get_array() & noexcept { return doc->get_array(); } +simdjson_inline simdjson_result document_reference::get_object() & noexcept { return doc->get_object(); } +/** + * The document_reference instances are used primarily/solely for streams of JSON + * documents. + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. + * + * 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. + */ +simdjson_inline simdjson_result document_reference::get_uint64() noexcept { return doc->get_root_value_iterator().get_root_uint64(false); } +simdjson_inline simdjson_result document_reference::get_uint64_in_string() noexcept { return doc->get_root_value_iterator().get_root_uint64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_int64() noexcept { return doc->get_root_value_iterator().get_root_int64(false); } +simdjson_inline simdjson_result document_reference::get_int64_in_string() noexcept { return doc->get_root_value_iterator().get_root_int64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_double() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_double_in_string() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_string(bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(false, allow_replacement); } +template +simdjson_inline error_code document_reference::get_string(string_type& receiver, bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(receiver, false, allow_replacement); } +simdjson_inline simdjson_result document_reference::get_wobbly_string() noexcept { return doc->get_root_value_iterator().get_root_wobbly_string(false); } +simdjson_inline simdjson_result document_reference::get_raw_json_string() noexcept { return doc->get_root_value_iterator().get_root_raw_json_string(false); } +simdjson_inline simdjson_result document_reference::get_bool() noexcept { return doc->get_root_value_iterator().get_root_bool(false); } +simdjson_inline simdjson_result document_reference::get_value() noexcept { return doc->get_value(); } +simdjson_inline simdjson_result document_reference::is_null() noexcept { return doc->get_root_value_iterator().is_root_null(false); } + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document_reference::operator array() & noexcept(false) { return array(*doc); } +simdjson_inline document_reference::operator object() & noexcept(false) { return object(*doc); } +simdjson_inline document_reference::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document_reference::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document_reference::operator double() noexcept(false) { return get_double(); } +simdjson_inline document_reference::operator std::string_view() noexcept(false) { return std::string_view(*doc); } +simdjson_inline document_reference::operator raw_json_string() noexcept(false) { return raw_json_string(*doc); } +simdjson_inline document_reference::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document_reference::operator value() noexcept(false) { return value(*doc); } +#endif +simdjson_inline simdjson_result document_reference::count_elements() & noexcept { return doc->count_elements(); } +simdjson_inline simdjson_result document_reference::count_fields() & noexcept { return doc->count_fields(); } +simdjson_inline simdjson_result document_reference::at(size_t index) & noexcept { return doc->at(index); } +simdjson_inline simdjson_result document_reference::begin() & noexcept { return doc->begin(); } +simdjson_inline simdjson_result document_reference::end() & noexcept { return doc->end(); } +simdjson_inline simdjson_result document_reference::find_field(std::string_view key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::find_field(const char *key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::operator[](std::string_view key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::operator[](const char *key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::find_field_unordered(std::string_view key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::find_field_unordered(const char *key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::type() noexcept { return doc->type(); } +simdjson_inline simdjson_result document_reference::is_scalar() noexcept { return doc->is_scalar(); } +simdjson_inline simdjson_result document_reference::current_location() noexcept { return doc->current_location(); } +simdjson_inline int32_t document_reference::current_depth() const noexcept { return doc->current_depth(); } +simdjson_inline bool document_reference::is_negative() noexcept { return doc->is_negative(); } +simdjson_inline simdjson_result document_reference::is_integer() noexcept { return doc->get_root_value_iterator().is_root_integer(false); } +simdjson_inline simdjson_result document_reference::get_number_type() noexcept { return doc->get_root_value_iterator().get_root_number_type(false); } +simdjson_inline simdjson_result document_reference::get_number() noexcept { return doc->get_root_value_iterator().get_root_number(false); } +simdjson_inline simdjson_result document_reference::raw_json_token() noexcept { return doc->raw_json_token(); } +simdjson_inline simdjson_result document_reference::at_pointer(std::string_view json_pointer) noexcept { return doc->at_pointer(json_pointer); } +simdjson_inline simdjson_result document_reference::raw_json() noexcept { return doc->raw_json();} +simdjson_inline document_reference::operator document&() const noexcept { return *doc; } + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + + + +namespace simdjson { +simdjson_inline simdjson_result::simdjson_result(haswell::ondemand::document_reference value, error_code error) + noexcept : implementation_simdjson_result_base(std::forward(value), error) {} + + +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator haswell::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator haswell::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator haswell::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator haswell::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H +/* end file simdjson/generic/ondemand/document-inl.h for haswell */ +/* including simdjson/generic/ondemand/document_stream-inl.h for haswell: #include "simdjson/generic/ondemand/document_stream-inl.h" */ +/* begin file simdjson/generic/ondemand/document_stream-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace haswell { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void stage1_worker::finish() { + // After calling "run" someone would call finish() to wait + // for the end of the processing. + // This function will wait until either the thread has done + // the processing or, else, the destructor has been called. + std::unique_lock lock(locking_mutex); + cond_var.wait(lock, [this]{return has_work == false;}); +} + +inline stage1_worker::~stage1_worker() { + // The thread may never outlive the stage1_worker instance + // and will always be stopped/joined before the stage1_worker + // instance is gone. + stop_thread(); +} + +inline void stage1_worker::start_thread() { + std::unique_lock lock(locking_mutex); + if(thread.joinable()) { + return; // This should never happen but we never want to create more than one thread. + } + thread = std::thread([this]{ + while(true) { + std::unique_lock thread_lock(locking_mutex); + // We wait for either "run" or "stop_thread" to be called. + cond_var.wait(thread_lock, [this]{return has_work || !can_work;}); + // If, for some reason, the stop_thread() method was called (i.e., the + // destructor of stage1_worker is called, then we want to immediately destroy + // the thread (and not do any more processing). + if(!can_work) { + break; + } + this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser, + this->_next_batch_start); + this->has_work = false; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify "finish" + thread_lock.unlock(); + } + } + ); +} + + +inline void stage1_worker::stop_thread() { + std::unique_lock lock(locking_mutex); + // We have to make sure that all locks can be released. + can_work = false; + has_work = false; + cond_var.notify_all(); + lock.unlock(); + if(thread.joinable()) { + thread.join(); + } +} + +inline void stage1_worker::run(document_stream * ds, parser * stage1, size_t next_batch_start) { + std::unique_lock lock(locking_mutex); + owner = ds; + _next_batch_start = next_batch_start; + stage1_thread_parser = stage1; + has_work = true; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify the thread lock that we have work + lock.unlock(); +} + +#endif // SIMDJSON_THREADS_ENABLED + +simdjson_inline document_stream::document_stream( + ondemand::parser &_parser, + const uint8_t *_buf, + size_t _len, + size_t _batch_size, + bool _allow_comma_separated +) noexcept + : parser{&_parser}, + buf{_buf}, + len{_len}, + batch_size{_batch_size <= MINIMAL_BATCH_SIZE ? MINIMAL_BATCH_SIZE : _batch_size}, + allow_comma_separated{_allow_comma_separated}, + error{SUCCESS} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(_parser.threaded) // we need to make a copy because _parser.threaded can change + #endif +{ +#ifdef SIMDJSON_THREADS_ENABLED + if(worker.get() == nullptr) { + error = MEMALLOC; + } +#endif +} + +simdjson_inline document_stream::document_stream() noexcept + : parser{nullptr}, + buf{nullptr}, + len{0}, + batch_size{0}, + allow_comma_separated{false}, + error{UNINITIALIZED} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(false) + #endif +{ +} + +simdjson_inline document_stream::~document_stream() noexcept +{ + #ifdef SIMDJSON_THREADS_ENABLED + worker.reset(); + #endif +} + +inline size_t document_stream::size_in_bytes() const noexcept { + return len; +} + +inline size_t document_stream::truncated_bytes() const noexcept { + if(error == CAPACITY) { return len - batch_start; } + return parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] - parser->implementation->structural_indexes[parser->implementation->n_structural_indexes + 1]; +} + +simdjson_inline document_stream::iterator::iterator() noexcept + : stream{nullptr}, finished{true} { +} + +simdjson_inline document_stream::iterator::iterator(document_stream* _stream, bool is_end) noexcept + : stream{_stream}, finished{is_end} { +} + +simdjson_inline simdjson_result document_stream::iterator::operator*() noexcept { + //if(stream->error) { return stream->error; } + return simdjson_result(stream->doc, stream->error); +} + +simdjson_inline document_stream::iterator& document_stream::iterator::operator++() noexcept { + // If there is an error, then we want the iterator + // to be finished, no matter what. (E.g., we do not + // keep generating documents with errors, or go beyond + // a document with errors.) + // + // Users do not have to call "operator*()" when they use operator++, + // so we need to end the stream in the operator++ function. + // + // Note that setting finished = true is essential otherwise + // we would enter an infinite loop. + if (stream->error) { finished = true; } + // Note that stream->error() is guarded against error conditions + // (it will immediately return if stream->error casts to false). + // In effect, this next function does nothing when (stream->error) + // is true (hence the risk of an infinite loop). + stream->next(); + // If that was the last document, we're finished. + // It is the only type of error we do not want to appear + // in operator*. + if (stream->error == EMPTY) { finished = true; } + // If we had any other kind of error (not EMPTY) then we want + // to pass it along to the operator* and we cannot mark the result + // as "finished" just yet. + return *this; +} + +simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept { + return finished != other.finished; +} + +simdjson_inline document_stream::iterator document_stream::begin() noexcept { + start(); + // If there are no documents, we're finished. + return iterator(this, error == EMPTY); +} + +simdjson_inline document_stream::iterator document_stream::end() noexcept { + return iterator(this, true); +} + +inline void document_stream::start() noexcept { + if (error) { return; } + error = parser->allocate(batch_size); + if (error) { return; } + // Always run the first stage 1 parse immediately + batch_start = 0; + error = run_stage1(*parser, batch_start); + while(error == EMPTY) { + // In exceptional cases, we may start with an empty block + batch_start = next_batch_start(); + if (batch_start >= len) { return; } + error = run_stage1(*parser, batch_start); + } + if (error) { return; } + doc_index = batch_start; + doc = document(json_iterator(&buf[batch_start], parser)); + doc.iter._streaming = true; + + #ifdef SIMDJSON_THREADS_ENABLED + if (use_thread && next_batch_start() < len) { + // Kick off the first thread on next batch if needed + error = stage1_thread_parser.allocate(batch_size); + if (error) { return; } + worker->start_thread(); + start_stage1_thread(); + if (error) { return; } + } + #endif // SIMDJSON_THREADS_ENABLED +} + +inline void document_stream::next() noexcept { + // We always enter at once once in an error condition. + if (error) { return; } + next_document(); + if (error) { return; } + auto cur_struct_index = doc.iter._root - parser->implementation->structural_indexes.get(); + doc_index = batch_start + parser->implementation->structural_indexes[cur_struct_index]; + + // Check if at end of structural indexes (i.e. at end of batch) + if(cur_struct_index >= static_cast(parser->implementation->n_structural_indexes)) { + error = EMPTY; + // Load another batch (if available) + while (error == EMPTY) { + batch_start = next_batch_start(); + if (batch_start >= len) { break; } + #ifdef SIMDJSON_THREADS_ENABLED + if(use_thread) { + load_from_stage1_thread(); + } else { + error = run_stage1(*parser, batch_start); + } + #else + error = run_stage1(*parser, batch_start); + #endif + /** + * Whenever we move to another window, we need to update all pointers to make + * it appear as if the input buffer started at the beginning of the window. + * + * Take this input: + * + * {"z":5} {"1":1,"2":2,"4":4} [7, 10, 9] [15, 11, 12, 13] [154, 110, 112, 1311] + * + * Say you process the following window... + * + * '{"z":5} {"1":1,"2":2,"4":4} [7, 10, 9]' + * + * When you do so, the json_iterator has a pointer at the beginning of the memory region + * (pointing at the beginning of '{"z"...'. + * + * When you move to the window that starts at... + * + * '[7, 10, 9] [15, 11, 12, 13] ... + * + * then it is not sufficient to just run stage 1. You also need to re-anchor the + * json_iterator so that it believes we are starting at '[7, 10, 9]...'. + * + * Under the DOM front-end, this gets done automatically because the parser owns + * the pointer the data, and when you call stage1 and then stage2 on the same + * parser, then stage2 will run on the pointer acquired by stage1. + * + * That is, stage1 calls "this->buf = _buf" so the parser remembers the buffer that + * we used. But json_iterator has no callback when stage1 is called on the parser. + * In fact, I think that the parser is unaware of json_iterator. + * + * + * So we need to re-anchor the json_iterator after each call to stage 1 so that + * all of the pointers are in sync. + */ + doc.iter = json_iterator(&buf[batch_start], parser); + doc.iter._streaming = true; + /** + * End of resync. + */ + + if (error) { continue; } // If the error was EMPTY, we may want to load another batch. + doc_index = batch_start; + } + } +} + +inline void document_stream::next_document() noexcept { + // Go to next place where depth=0 (document depth) + error = doc.iter.skip_child(0); + if (error) { return; } + // Always set depth=1 at the start of document + doc.iter._depth = 1; + // consume comma if comma separated is allowed + if (allow_comma_separated) { doc.iter.consume_character(','); } + // Resets the string buffer at the beginning, thus invalidating the strings. + doc.iter._string_buf_loc = parser->string_buf.get(); + doc.iter._root = doc.iter.position(); +} + +inline size_t document_stream::next_batch_start() const noexcept { + return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes]; +} + +inline error_code document_stream::run_stage1(ondemand::parser &p, size_t _batch_start) noexcept { + // This code only updates the structural index in the parser, it does not update any json_iterator + // instance. + size_t remaining = len - _batch_start; + if (remaining <= batch_size) { + return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final); + } else { + return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial); + } +} + +simdjson_inline size_t document_stream::iterator::current_index() const noexcept { + return stream->doc_index; +} + +simdjson_inline std::string_view document_stream::iterator::source() const noexcept { + auto depth = stream->doc.iter.depth(); + auto cur_struct_index = stream->doc.iter._root - stream->parser->implementation->structural_indexes.get(); + + // If at root, process the first token to determine if scalar value + if (stream->doc.iter.at_root()) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': // Depth=1 already at start of document + break; + case '}': case ']': + depth--; + break; + default: // Scalar value document + // TODO: Remove any trailing whitespaces + // This returns a string spanning from start of value to the beginning of the next document (excluded) + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[++cur_struct_index] - current_index() - 1); + } + cur_struct_index++; + } + + while (cur_struct_index <= static_cast(stream->parser->implementation->n_structural_indexes)) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': + depth++; + break; + case '}': case ']': + depth--; + break; + } + if (depth == 0) { break; } + cur_struct_index++; + } + + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[cur_struct_index] - current_index() + stream->batch_start + 1);; +} + +inline error_code document_stream::iterator::error() const noexcept { + return stream->error; +} + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void document_stream::load_from_stage1_thread() noexcept { + worker->finish(); + // Swap to the parser that was loaded up in the thread. Make sure the parser has + // enough memory to swap to, as well. + std::swap(stage1_thread_parser,*parser); + error = stage1_thread_error; + if (error) { return; } + + // If there's anything left, start the stage 1 thread! + if (next_batch_start() < len) { + start_stage1_thread(); + } +} + +inline void document_stream::start_stage1_thread() noexcept { + // we call the thread on a lambda that will update + // this->stage1_thread_error + // there is only one thread that may write to this value + // TODO this is NOT exception-safe. + this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error + size_t _next_batch_start = this->next_batch_start(); + + worker->run(this, & this->stage1_thread_parser, _next_batch_start); +} + +#endif // SIMDJSON_THREADS_ENABLED + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result::simdjson_result( + haswell::ondemand::document_stream &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} + +} + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H +/* end file simdjson/generic/ondemand/document_stream-inl.h for haswell */ +/* including simdjson/generic/ondemand/field-inl.h for haswell: #include "simdjson/generic/ondemand/field-inl.h" */ +/* begin file simdjson/generic/ondemand/field-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +// clang 6 doesn't think the default constructor can be noexcept, so we make it explicit +simdjson_inline field::field() noexcept : std::pair() {} + +simdjson_inline field::field(raw_json_string key, ondemand::value &&value) noexcept + : std::pair(key, std::forward(value)) +{ +} + +simdjson_inline simdjson_result field::start(value_iterator &parent_iter) noexcept { + raw_json_string key; + SIMDJSON_TRY( parent_iter.field_key().get(key) ); + SIMDJSON_TRY( parent_iter.field_value() ); + return field::start(parent_iter, key); +} + +simdjson_inline simdjson_result field::start(const value_iterator &parent_iter, raw_json_string key) noexcept { + return field(key, parent_iter.child()); +} + +simdjson_inline simdjson_warn_unused simdjson_result field::unescaped_key(bool allow_replacement) noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() but Visual Studio won't let us. + simdjson_result answer = first.unescape(second.iter.json_iter(), allow_replacement); + first.consume(); + return answer; +} + +simdjson_inline raw_json_string field::key() const noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() by Visual Studio won't let us. + return first; +} + +simdjson_inline value &field::value() & noexcept { + return second; +} + +simdjson_inline value field::value() && noexcept { + return std::forward(*this).second; +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + haswell::ondemand::field &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::key() noexcept { + if (error()) { return error(); } + return first.key(); +} +simdjson_inline simdjson_result simdjson_result::unescaped_key(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.unescaped_key(allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::value() noexcept { + if (error()) { return error(); } + return std::move(first.value()); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H +/* end file simdjson/generic/ondemand/field-inl.h for haswell */ +/* including simdjson/generic/ondemand/json_iterator-inl.h for haswell: #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/json_iterator-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +simdjson_inline json_iterator::json_iterator(json_iterator &&other) noexcept + : token(std::forward(other.token)), + parser{other.parser}, + _string_buf_loc{other._string_buf_loc}, + error{other.error}, + _depth{other._depth}, + _root{other._root}, + _streaming{other._streaming} +{ + other.parser = nullptr; +} +simdjson_inline json_iterator &json_iterator::operator=(json_iterator &&other) noexcept { + token = other.token; + parser = other.parser; + _string_buf_loc = other._string_buf_loc; + error = other.error; + _depth = other._depth; + _root = other._root; + _streaming = other._streaming; + other.parser = nullptr; + return *this; +} + +simdjson_inline json_iterator::json_iterator(const uint8_t *buf, ondemand::parser *_parser) noexcept + : token(buf, &_parser->implementation->structural_indexes[0]), + parser{_parser}, + _string_buf_loc{parser->string_buf.get()}, + _depth{1}, + _root{parser->implementation->structural_indexes.get()}, + _streaming{false} + +{ + logger::log_headers(); +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif +} + +inline void json_iterator::rewind() noexcept { + token.set_position( root_position() ); + logger::log_headers(); // We start again + _string_buf_loc = parser->string_buf.get(); + _depth = 1; +} + +inline bool json_iterator::balanced() const noexcept { + token_iterator ti(token); + int32_t count{0}; + ti.set_position( root_position() ); + while(ti.peek() <= peek_last()) { + switch (*ti.return_current_and_advance()) + { + case '[': case '{': + count++; + break; + case ']': case '}': + count--; + break; + default: + break; + } + } + return count == 0; +} + + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and parent_depth, which is a desired effect. The warning does not show up if the +// skip_child() function is not marked inline). +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline error_code json_iterator::skip_child(depth_t parent_depth) noexcept { + if (depth() <= parent_depth) { return SUCCESS; } + switch (*return_current_and_advance()) { + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + + // For the first open array/object in a value, we've already incremented depth, so keep it the same + // We never stop at colon, but if we did, it wouldn't affect depth + case '[': case '{': case ':': + logger::log_start_value(*this, "skip"); + break; + // If there is a comma, we have just finished a value in an array/object, and need to get back in + case ',': + logger::log_value(*this, "skip"); + break; + // ] or } means we just finished a value and need to jump out of the array/object + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } +#if SIMDJSON_CHECK_EOF + // If there are no more tokens, the parent is incomplete. + if (at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "Missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + break; + case '"': + if(*peek() == ':') { + // We are at a key!!! + // This might happen if you just started an object and you skip it immediately. + // Performance note: it would be nice to get rid of this check as it is somewhat + // expensive. + // https://github.com/simdjson/simdjson/issues/1742 + logger::log_value(*this, "key"); + return_current_and_advance(); // eat up the ':' + break; // important!!! + } + simdjson_fallthrough; + // Anything else must be a scalar value + default: + // For the first scalar, we will have incremented depth already, so we decrement it here. + logger::log_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + } + + // Now that we've considered the first value, we only increment/decrement for arrays/objects + while (position() < end_position()) { + switch (*return_current_and_advance()) { + case '[': case '{': + logger::log_start_value(*this, "skip"); + _depth++; + break; + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + default: + logger::log_value(*this, "skip", ""); + break; + } + } + + return report_error(TAPE_ERROR, "not enough close braces"); +} + +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool json_iterator::at_root() const noexcept { + return position() == root_position(); +} + +simdjson_inline bool json_iterator::is_single_token() const noexcept { + return parser->implementation->n_structural_indexes == 1; +} + +simdjson_inline bool json_iterator::streaming() const noexcept { + return _streaming; +} + +simdjson_inline token_position json_iterator::root_position() const noexcept { + return _root; +} + +simdjson_inline void json_iterator::assert_at_document_depth() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +} + +simdjson_inline void json_iterator::assert_at_root() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + // Under Visual Studio, the next SIMDJSON_ASSUME fails with: the argument + // has side effects that will be discarded. + SIMDJSON_ASSUME( token.position() == _root ); +#endif +} + +simdjson_inline void json_iterator::assert_more_tokens(uint32_t required_tokens) const noexcept { + assert_valid_position(token._position + required_tokens - 1); +} + +simdjson_inline void json_iterator::assert_valid_position(token_position position) const noexcept { +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME( position >= &parser->implementation->structural_indexes[0] ); + SIMDJSON_ASSUME( position < &parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] ); +#endif +} + +simdjson_inline bool json_iterator::at_end() const noexcept { + return position() == end_position(); +} +simdjson_inline token_position json_iterator::end_position() const noexcept { + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + return &parser->implementation->structural_indexes[n_structural_indexes]; +} + +inline std::string json_iterator::to_string() const noexcept { + if( !is_alive() ) { return "dead json_iterator instance"; } + const char * current_structural = reinterpret_cast(token.peek()); + return std::string("json_iterator [ depth : ") + std::to_string(_depth) + + std::string(", structural : '") + std::string(current_structural,1) + + std::string("', offset : ") + std::to_string(token.current_offset()) + + std::string("', error : ") + error_message(error) + + std::string(" ]"); +} + +inline simdjson_result json_iterator::current_location() const noexcept { + if (!is_alive()) { // Unrecoverable error + if (!at_root()) { + return reinterpret_cast(token.peek(-1)); + } else { + return reinterpret_cast(token.peek()); + } + } + if (at_end()) { + return OUT_OF_BOUNDS; + } + return reinterpret_cast(token.peek()); +} + +simdjson_inline bool json_iterator::is_alive() const noexcept { + return parser; +} + +simdjson_inline void json_iterator::abandon() noexcept { + parser = nullptr; + _depth = 0; +} + +simdjson_inline const uint8_t *json_iterator::return_current_and_advance() noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif // SIMDJSON_CHECK_EOF + return token.return_current_and_advance(); +} + +simdjson_inline const uint8_t *json_iterator::unsafe_pointer() const noexcept { + // deliberately done without safety guard: + return token.peek(); +} + +simdjson_inline const uint8_t *json_iterator::peek(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // SIMDJSON_CHECK_EOF + return token.peek(delta); +} + +simdjson_inline uint32_t json_iterator::peek_length(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // #if SIMDJSON_CHECK_EOF + return token.peek_length(delta); +} + +simdjson_inline const uint8_t *json_iterator::peek(token_position position) const noexcept { + // todo: currently we require end-of-string buffering, but the following + // assert_valid_position should be turned on if/when we lift that condition. + // assert_valid_position(position); + // This is almost surely related to SIMDJSON_CHECK_EOF but given that SIMDJSON_CHECK_EOF + // is ON by default, we have no choice but to disable it for real with a comment. + return token.peek(position); +} + +simdjson_inline uint32_t json_iterator::peek_length(token_position position) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_valid_position(position); +#endif // SIMDJSON_CHECK_EOF + return token.peek_length(position); +} + +simdjson_inline token_position json_iterator::last_position() const noexcept { + // The following line fails under some compilers... + // SIMDJSON_ASSUME(parser->implementation->n_structural_indexes > 0); + // since it has side-effects. + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + SIMDJSON_ASSUME(n_structural_indexes > 0); + return &parser->implementation->structural_indexes[n_structural_indexes - 1]; +} +simdjson_inline const uint8_t *json_iterator::peek_last() const noexcept { + return token.peek(last_position()); +} + +simdjson_inline void json_iterator::ascend_to(depth_t parent_depth) noexcept { + SIMDJSON_ASSUME(parent_depth >= 0 && parent_depth < INT32_MAX - 1); + SIMDJSON_ASSUME(_depth == parent_depth + 1); + _depth = parent_depth; +} + +simdjson_inline void json_iterator::descend_to(depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); + _depth = child_depth; +} + +simdjson_inline depth_t json_iterator::depth() const noexcept { + return _depth; +} + +simdjson_inline uint8_t *&json_iterator::string_buf_loc() noexcept { + return _string_buf_loc; +} + +simdjson_inline error_code json_iterator::report_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error != SUCCESS && _error != UNINITIALIZED && _error != INCORRECT_TYPE && _error != NO_SUCH_FIELD); + logger::log_error(*this, message); + error = _error; + return error; +} + +simdjson_inline token_position json_iterator::position() const noexcept { + return token.position(); +} + +simdjson_inline simdjson_result json_iterator::unescape(raw_json_string in, bool allow_replacement) noexcept { + return parser->unescape(in, _string_buf_loc, allow_replacement); +} + +simdjson_inline simdjson_result json_iterator::unescape_wobbly(raw_json_string in) noexcept { + return parser->unescape_wobbly(in, _string_buf_loc); +} + +simdjson_inline void json_iterator::reenter_child(token_position position, depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); +#if SIMDJSON_DEVELOPMENT_CHECKS +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME(size_t(child_depth) < parser->max_depth()); + SIMDJSON_ASSUME(position >= parser->start_positions[child_depth]); +#endif +#endif + token.set_position(position); + _depth = child_depth; +} + +simdjson_inline error_code json_iterator::consume_character(char c) noexcept { + if (*peek() == c) { + return_current_and_advance(); + return SUCCESS; + } + return TAPE_ERROR; +} + +#if SIMDJSON_DEVELOPMENT_CHECKS + +simdjson_inline token_position json_iterator::start_position(depth_t depth) const noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + return size_t(depth) < parser->max_depth() ? parser->start_positions[depth] : 0; +} + +simdjson_inline void json_iterator::set_start_position(depth_t depth, token_position position) noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + if(size_t(depth) < parser->max_depth()) { parser->start_positions[depth] = position; } +} + +#endif + + +simdjson_inline error_code json_iterator::optional_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error == INCORRECT_TYPE || _error == NO_SUCH_FIELD); + logger::log_error(*this, message); + return _error; +} + + +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 { + // This function is not expected to be called in performance-sensitive settings. + // Let us guard against silly cases: + if((N < max_len) || (N == 0)) { return false; } + // Copy to the buffer. + std::memcpy(tmpbuf, json, max_len); + if(N > max_len) { // We pad whatever remains with ' '. + std::memset(tmpbuf + max_len, ' ', N - max_len); + } + return true; +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(haswell::ondemand::json_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/json_iterator-inl.h for haswell */ +/* including simdjson/generic/ondemand/json_type-inl.h for haswell: #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* begin file simdjson/generic/ondemand/json_type-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept { + switch (type) { + case json_type::array: out << "array"; break; + case json_type::object: out << "object"; break; + case json_type::number: out << "number"; break; + case json_type::string: out << "string"; break; + case json_type::boolean: out << "boolean"; break; + case json_type::null: out << "null"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false) { + return out << type.value(); +} +#endif + + + +simdjson_inline number_type number::get_number_type() const noexcept { + return type; +} + +simdjson_inline bool number::is_uint64() const noexcept { + return get_number_type() == number_type::unsigned_integer; +} + +simdjson_inline uint64_t number::get_uint64() const noexcept { + return payload.unsigned_integer; +} + +simdjson_inline number::operator uint64_t() const noexcept { + return get_uint64(); +} + + +simdjson_inline bool number::is_int64() const noexcept { + return get_number_type() == number_type::signed_integer; +} + +simdjson_inline int64_t number::get_int64() const noexcept { + return payload.signed_integer; +} + +simdjson_inline number::operator int64_t() const noexcept { + return get_int64(); +} + +simdjson_inline bool number::is_double() const noexcept { + return get_number_type() == number_type::floating_point_number; +} + +simdjson_inline double number::get_double() const noexcept { + return payload.floating_point_number; +} + +simdjson_inline number::operator double() const noexcept { + return get_double(); +} + +simdjson_inline double number::as_double() const noexcept { + if(is_double()) { + return payload.floating_point_number; + } + if(is_int64()) { + return double(payload.signed_integer); + } + return double(payload.unsigned_integer); +} + +simdjson_inline void number::append_s64(int64_t value) noexcept { + payload.signed_integer = value; + type = number_type::signed_integer; +} + +simdjson_inline void number::append_u64(uint64_t value) noexcept { + payload.unsigned_integer = value; + type = number_type::unsigned_integer; +} + +simdjson_inline void number::append_double(double value) noexcept { + payload.floating_point_number = value; + type = number_type::floating_point_number; +} + +simdjson_inline void number::skip_double() noexcept { + type = number_type::floating_point_number; +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(haswell::ondemand::json_type &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H +/* end file simdjson/generic/ondemand/json_type-inl.h for haswell */ +/* including simdjson/generic/ondemand/logger-inl.h for haswell: #include "simdjson/generic/ondemand/logger-inl.h" */ +/* begin file simdjson/generic/ondemand/logger-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace haswell { +namespace ondemand { +namespace logger { + +static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; +static constexpr const int LOG_EVENT_LEN = 20; +static constexpr const int LOG_BUFFER_LEN = 30; +static constexpr const int LOG_SMALL_BUFFER_LEN = 10; +static int log_depth = 0; // Not threadsafe. Log only. + +// Helper to turn unprintable or newline characters into spaces +static inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } +} + +template +static inline std::string string_format(const std::string& format, const Args&... args) +{ + SIMDJSON_PUSH_DISABLE_ALL_WARNINGS + int size_s = std::snprintf(nullptr, 0, format.c_str(), args...) + 1; + auto size = static_cast(size_s); + if (size <= 0) return std::string(); + std::unique_ptr buf(new char[size]); + std::snprintf(buf.get(), size, format.c_str(), args...); + SIMDJSON_POP_DISABLE_WARNINGS + return std::string(buf.get(), buf.get() + size - 1); +} + +static inline log_level get_log_level_from_env() +{ + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe + char *lvl = getenv("SIMDJSON_LOG_LEVEL"); + SIMDJSON_POP_DISABLE_WARNINGS + if (lvl && simdjson_strcasecmp(lvl, "ERROR") == 0) { return log_level::error; } + return log_level::info; +} + +static inline log_level log_threshold() +{ + static log_level threshold = get_log_level_from_env(); + return threshold; +} + +static inline bool should_log(log_level level) +{ + return level >= log_threshold(); +} + +inline void log_event(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "", type, detail, log_level::info); +} +inline void log_value(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "+", type, detail, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} +inline void log_start_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_line(iter, "+", type, "", delta, depth_delta, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} + +inline void log_end_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + if (LOG_ENABLED) { log_depth--; } + log_line(iter, "-", type, "", delta, depth_delta, log_level::info); +} + +inline void log_error(const json_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_line(iter, "ERROR: ", error, detail, delta, depth_delta, log_level::error); +} +inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail) noexcept { + log_line(iter, index, depth, "ERROR: ", error, detail, log_level::error); +} + +inline void log_event(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_event(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_value(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_value(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_start_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_start_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_end_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_end_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_error(const value_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_error(iter.json_iter(), error, detail, delta, depth_delta); +} + +inline void log_headers() noexcept { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(log_level::info))) { + // Technically a static variable is not thread-safe, but if you are using threads and logging... well... + static bool displayed_hint{false}; + log_depth = 0; + printf("\n"); + if (!displayed_hint) { + // We only print this helpful header once. + printf("# Logging provides the depth and position of the iterator user-visible steps:\n"); + printf("# +array says 'this is where we were when we discovered the start array'\n"); + printf( + "# -array says 'this is where we were when we ended the array'\n"); + printf("# skip says 'this is a structural or value I am skipping'\n"); + printf("# +/-skip says 'this is a start/end array or object I am skipping'\n"); + printf("#\n"); + printf("# The indentation of the terms (array, string,...) indicates the depth,\n"); + printf("# in addition to the depth being displayed.\n"); + printf("#\n"); + printf("# Every token in the document has a single depth determined by the tokens before it,\n"); + printf("# and is not affected by what the token actually is.\n"); + printf("#\n"); + printf("# Not all structural elements are presented as tokens in the logs.\n"); + printf("#\n"); + printf("# We never give control to the user within an empty array or an empty object.\n"); + printf("#\n"); + printf("# Inside an array, having a depth greater than the array's depth means that\n"); + printf("# we are pointing inside a value.\n"); + printf("# Having a depth equal to the array means that we are pointing right before a value.\n"); + printf("# Having a depth smaller than the array means that we have moved beyond the array.\n"); + displayed_hint = true; + } + printf("\n"); + printf("| %-*s ", LOG_EVENT_LEN, "Event"); + printf("| %-*s ", LOG_BUFFER_LEN, "Buffer"); + printf("| %-*s ", LOG_SMALL_BUFFER_LEN, "Next"); + // printf("| %-*s ", 5, "Next#"); + printf("| %-*s ", 5, "Depth"); + printf("| Detail "); + printf("|\n"); + + printf("|%.*s", LOG_EVENT_LEN + 2, DASHES); + printf("|%.*s", LOG_BUFFER_LEN + 2, DASHES); + printf("|%.*s", LOG_SMALL_BUFFER_LEN + 2, DASHES); + // printf("|%.*s", 5+2, DASHES); + printf("|%.*s", 5 + 2, DASHES); + printf("|--------"); + printf("|\n"); + fflush(stdout); + } + } +} + +template +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 { + log_line(iter, iter.position()+delta, depth_t(iter.depth()+depth_delta), title_prefix, title, detail, level, std::forward(args)...); +} + +template +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 { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(level))) { + const int indent = depth * 2; + const auto buf = iter.token.buf; + auto msg = string_format(title, std::forward(args)...); + printf("| %*s%s%-*s ", indent, "", title_prefix, + LOG_EVENT_LEN - indent - int(strlen(title_prefix)), msg.c_str()); + { + // Print the current structural. + printf("| "); + // Before we begin, the index might point right before the document. + // This could be unsafe, see https://github.com/simdjson/simdjson/discussions/1938 + if (index < iter._root) { + printf("%*s", LOG_BUFFER_LEN, ""); + } else { + auto current_structural = &buf[*index]; + for (int i = 0; i < LOG_BUFFER_LEN; i++) { + printf("%c", printable_char(current_structural[i])); + } + } + printf(" "); + } + { + // Print the next structural. + printf("| "); + auto next_structural = &buf[*(index + 1)]; + for (int i = 0; i < LOG_SMALL_BUFFER_LEN; i++) { + printf("%c", printable_char(next_structural[i])); + } + printf(" "); + } + // printf("| %5u ", *(index+1)); + printf("| %5i ", depth); + printf("| %6.*s ", int(detail.size()), detail.data()); + printf("|\n"); + fflush(stdout); + } + } +} + +} // namespace logger +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H +/* end file simdjson/generic/ondemand/logger-inl.h for haswell */ +/* including simdjson/generic/ondemand/object-inl.h for haswell: #include "simdjson/generic/ondemand/object-inl.h" */ +/* begin file simdjson/generic/ondemand/object-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) & noexcept { + return find_field_unordered(key); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) && noexcept { + return std::forward(*this).find_field_unordered(key); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} + +simdjson_inline simdjson_result object::start(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_object().error() ); + return object(iter); +} +simdjson_inline simdjson_result object::start_root(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_root_object().error() ); + return object(iter); +} +simdjson_inline error_code object::consume() noexcept { + if(iter.is_at_key()) { + /** + * 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. + */ + simdjson_unused raw_json_string actual_key; + auto error = iter.field_key().get(actual_key); + if (error) { iter.abandon(); return error; }; + // Let us move to the value while we are at it. + if ((error = iter.field_value())) { iter.abandon(); return error; } + } + auto error_skip = iter.json_iter().skip_child(iter.depth()-1); + if(error_skip) { iter.abandon(); } + return error_skip; +} + +simdjson_inline simdjson_result object::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + const uint8_t * final_point{iter._json_iter->peek()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result object::started(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.started_object().error() ); + return object(iter); +} + +simdjson_inline object object::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline object::object(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result object::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return object_iterator(iter); +} +simdjson_inline simdjson_result object::end() noexcept { + return object_iterator(iter); +} + +inline simdjson_result object::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + size_t slash = json_pointer.find('/'); + std::string_view key = json_pointer.substr(0, slash); + // Grab the child with the given key + simdjson_result child; + + // If there is an escape character in the key, unescape it and then get the child. + size_t escape = key.find('~'); + if (escape != std::string_view::npos) { + // Unescape the key + std::string unescaped(key); + do { + switch (unescaped[escape+1]) { + case '0': + unescaped.replace(escape, 2, "~"); + break; + case '1': + unescaped.replace(escape, 2, "/"); + break; + default: + return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer"); + } + escape = unescaped.find('~', escape+1); + } while (escape != std::string::npos); + child = find_field(unescaped); // Take note find_field does not unescape keys when matching + } else { + child = find_field(key); + } + if(child.error()) { + return child; // we do not continue if there was an error + } + // If there is a /, we have to recurse and look up more of the path + if (slash != std::string_view::npos) { + child = child.at_pointer(json_pointer.substr(slash)); + } + return child; +} + +simdjson_inline simdjson_result object::count_fields() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the object after counting the number of elements. + iter.reset_object(); + return count; +} + +simdjson_inline simdjson_result object::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_object().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +simdjson_inline simdjson_result object::reset() & noexcept { + return iter.reset_object(); +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(haswell::ondemand::object &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first)[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +inline simdjson_result simdjson_result::reset() noexcept { + if (error()) { return error(); } + return first.reset(); +} + +inline simdjson_result simdjson_result::is_empty() noexcept { + if (error()) { return error(); } + return first.is_empty(); +} + +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H +/* end file simdjson/generic/ondemand/object-inl.h for haswell */ +/* including simdjson/generic/ondemand/object_iterator-inl.h for haswell: #include "simdjson/generic/ondemand/object_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/object_iterator-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +// +// object_iterator +// + +simdjson_inline object_iterator::object_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result object_iterator::operator*() noexcept { + error_code error = iter.error(); + if (error) { iter.abandon(); return error; } + auto result = field::start(iter); + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (result.error()) { iter.abandon(); } + return result; +} +simdjson_inline bool object_iterator::operator==(const object_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool object_iterator::operator!=(const object_iterator &) const noexcept { + return iter.is_open(); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline object_iterator &object_iterator::operator++() noexcept { + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (!iter.is_open()) { return *this; } // Iterator will be released if there is an error + + simdjson_unused error_code error; + if ((error = iter.skip_child() )) { return *this; } + + simdjson_unused bool has_value; + if ((error = iter.has_next_field().get(has_value) )) { return *this; }; + return *this; +} +SIMDJSON_POP_DISABLE_WARNINGS + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter.depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the object is first found and the iterator is just past the {. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the , or } before the next value. In this state, +// depth == iter.depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter.depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter.depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the object iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet field may be missing or not be an +// object--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter.depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between fields, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter.depth == depth, and at_start == false. +// +// Errors that occur while reading a field to give to the user (such as when the key is not a +// string or the field is missing a colon) are yielded immediately. Depth is then decremented, +// moving to the Finished state without transitioning through an Error state at all. +// +// ## Terminal State +// +// The terminal state has iter.depth < depth. at_start is always false. +// +// - Finished: When we have reached a }, we are finished. We signal this by decrementing depth. +// In this state, iter.depth < depth, at_start == false, and error == SUCCESS. +// + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + haswell::ondemand::object_iterator &&value +) noexcept + : implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +// Checks for ']' and ',' +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++first; + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/object_iterator-inl.h for haswell */ +/* including simdjson/generic/ondemand/parser-inl.h for haswell: #include "simdjson/generic/ondemand/parser-inl.h" */ +/* begin file simdjson/generic/ondemand/parser-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string_view.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/dom/base.h" // for MINIMAL_DOCUMENT_CAPACITY */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +simdjson_inline parser::parser(size_t max_capacity) noexcept + : _max_capacity{max_capacity} { +} + +simdjson_warn_unused simdjson_inline error_code parser::allocate(size_t new_capacity, size_t new_max_depth) noexcept { + if (new_capacity > max_capacity()) { return CAPACITY; } + if (string_buf && new_capacity == capacity() && new_max_depth == max_depth()) { return SUCCESS; } + + // string_capacity copied from document::allocate + _capacity = 0; + size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * new_capacity / 3 + SIMDJSON_PADDING, 64); + string_buf.reset(new (std::nothrow) uint8_t[string_capacity]); +#if SIMDJSON_DEVELOPMENT_CHECKS + start_positions.reset(new (std::nothrow) token_position[new_max_depth]); +#endif + if (implementation) { + SIMDJSON_TRY( implementation->set_capacity(new_capacity) ); + SIMDJSON_TRY( implementation->set_max_depth(new_max_depth) ); + } else { + SIMDJSON_TRY( simdjson::get_active_implementation()->create_dom_parser_implementation(new_capacity, new_max_depth, implementation) ); + } + _capacity = new_capacity; + _max_depth = new_max_depth; + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length() || !string_buf) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return document::start({ reinterpret_cast(json.data()), this }); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const char *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const uint8_t *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string_view json, size_t allocated) & noexcept { + return iterate(padded_string_view(json, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string &json) & noexcept { + if(json.capacity() - json.size() < SIMDJSON_PADDING) { + json.reserve(json.size() + SIMDJSON_PADDING); + } + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const std::string &json) & noexcept { + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + padded_string_view json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + const padded_string &json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate_raw(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length()) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return json_iterator(reinterpret_cast(json.data()), this); +} + +inline simdjson_result parser::iterate_many(const uint8_t *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; } + if((len >= 3) && (std::memcmp(buf, "\xEF\xBB\xBF", 3) == 0)) { + buf += 3; + len -= 3; + } + if(allow_comma_separated && batch_size < len) { batch_size = len; } + return document_stream(*this, buf, len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const char *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(reinterpret_cast(buf), len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const std::string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const padded_string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} + +simdjson_inline size_t parser::capacity() const noexcept { + return _capacity; +} +simdjson_inline size_t parser::max_capacity() const noexcept { + return _max_capacity; +} +simdjson_inline size_t parser::max_depth() const noexcept { + return _max_depth; +} + +simdjson_inline void parser::set_max_capacity(size_t max_capacity) noexcept { + if(max_capacity < dom::MINIMAL_DOCUMENT_CAPACITY) { + _max_capacity = max_capacity; + } else { + _max_capacity = dom::MINIMAL_DOCUMENT_CAPACITY; + } +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement) const noexcept { + uint8_t *end = implementation->parse_string(in.buf, dst, allow_replacement); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept { + uint8_t *end = implementation->parse_wobbly_string(in.buf, dst); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(haswell::ondemand::parser &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H +/* end file simdjson/generic/ondemand/parser-inl.h for haswell */ +/* including simdjson/generic/ondemand/raw_json_string-inl.h for haswell: #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +namespace haswell { +namespace ondemand { + +simdjson_inline raw_json_string::raw_json_string(const uint8_t * _buf) noexcept : buf{_buf} {} + +simdjson_inline const char * raw_json_string::raw() const noexcept { return reinterpret_cast(buf); } + + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(std::string_view target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;pos < target.size() && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;pos < target.size();pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(const char* target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;target[pos] && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;target[pos];pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept { + // If we are going to call memcmp, then we must know something about the length of the raw_json_string. + return (length >= target.size()) && (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); +} + +simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + if(target.size() <= SIMDJSON_PADDING) { + return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); + } + const char * r{raw()}; + size_t pos{0}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept { + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(const char * target) const noexcept { + // Assumptions: 'target' does not contain unescaped quote characters, is null terminated and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(const char* target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept { + return a.unsafe_is_equal(c); +} + +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept { + return a == c; +} + +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept { + return !(a == c); +} + +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept { + return !(a == c); +} + + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape(json_iterator &iter, bool allow_replacement) const noexcept { + return iter.unescape(*this, allow_replacement); +} + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape_wobbly(json_iterator &iter) const noexcept { + return iter.unescape_wobbly(*this); +} + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &out, const raw_json_string &str) noexcept { + bool in_escape = false; + const char *s = str.raw(); + while (true) { + switch (*s) { + case '\\': in_escape = !in_escape; break; + case '"': if (in_escape) { in_escape = false; } else { return out; } break; + default: if (in_escape) { in_escape = false; } + } + out << *s; + s++; + } +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(haswell::ondemand::raw_json_string &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::raw() const noexcept { + if (error()) { return error(); } + return first.raw(); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape(haswell::ondemand::json_iterator &iter, bool allow_replacement) const noexcept { + if (error()) { return error(); } + return first.unescape(iter, allow_replacement); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape_wobbly(haswell::ondemand::json_iterator &iter) const noexcept { + if (error()) { return error(); } + return first.unescape_wobbly(iter); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H +/* end file simdjson/generic/ondemand/raw_json_string-inl.h for haswell */ +/* including simdjson/generic/ondemand/serialization-inl.h for haswell: #include "simdjson/generic/ondemand/serialization-inl.h" */ +/* begin file simdjson/generic/ondemand/serialization-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/serialization.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +inline std::string_view trim(const std::string_view str) noexcept { + // We can almost surely do better by rolling our own find_first_not_of function. + size_t first = str.find_first_not_of(" \t\n\r"); + // If we have the empty string (just white space), then no trimming is possible, and + // we return the empty string_view. + if (std::string_view::npos == first) { return std::string_view(); } + size_t last = str.find_last_not_of(" \t\n\r"); + return str.substr(first, (last - first + 1)); +} + + +inline simdjson_result to_json_string(haswell::ondemand::document& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(haswell::ondemand::document_reference& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(haswell::ondemand::value& x) noexcept { + /** + * 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. + */ + using namespace haswell::ondemand; + haswell::ondemand::json_type t; + auto error = x.type().get(t); + if(error != SUCCESS) { return error; } + switch (t) + { + case json_type::array: + { + haswell::ondemand::array array; + error = x.get_array().get(array); + if(error) { return error; } + return to_json_string(array); + } + case json_type::object: + { + haswell::ondemand::object object; + error = x.get_object().get(object); + if(error) { return error; } + return to_json_string(object); + } + default: + return trim(x.raw_json_token()); + } +} + +inline simdjson_result to_json_string(haswell::ondemand::object& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(haswell::ondemand::array& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} +} // namespace simdjson + +namespace simdjson { namespace haswell { namespace ondemand { + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::document_reference& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::haswell::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif +}}} // namespace simdjson::haswell::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H +/* end file simdjson/generic/ondemand/serialization-inl.h for haswell */ +/* including simdjson/generic/ondemand/token_iterator-inl.h for haswell: #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/token_iterator-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +simdjson_inline token_iterator::token_iterator( + const uint8_t *_buf, + token_position position +) noexcept : buf{_buf}, _position{position} +{ +} + +simdjson_inline uint32_t token_iterator::current_offset() const noexcept { + return *(_position); +} + + +simdjson_inline const uint8_t *token_iterator::return_current_and_advance() noexcept { + return &buf[*(_position++)]; +} + +simdjson_inline const uint8_t *token_iterator::peek(token_position position) const noexcept { + return &buf[*position]; +} +simdjson_inline uint32_t token_iterator::peek_index(token_position position) const noexcept { + return *position; +} +simdjson_inline uint32_t token_iterator::peek_length(token_position position) const noexcept { + return *(position+1) - *position; +} + +simdjson_inline const uint8_t *token_iterator::peek(int32_t delta) const noexcept { + return &buf[*(_position+delta)]; +} +simdjson_inline uint32_t token_iterator::peek_index(int32_t delta) const noexcept { + return *(_position+delta); +} +simdjson_inline uint32_t token_iterator::peek_length(int32_t delta) const noexcept { + return *(_position+delta+1) - *(_position+delta); +} + +simdjson_inline token_position token_iterator::position() const noexcept { + return _position; +} +simdjson_inline void token_iterator::set_position(token_position target_position) noexcept { + _position = target_position; +} + +simdjson_inline bool token_iterator::operator==(const token_iterator &other) const noexcept { + return _position == other._position; +} +simdjson_inline bool token_iterator::operator!=(const token_iterator &other) const noexcept { + return _position != other._position; +} +simdjson_inline bool token_iterator::operator>(const token_iterator &other) const noexcept { + return _position > other._position; +} +simdjson_inline bool token_iterator::operator>=(const token_iterator &other) const noexcept { + return _position >= other._position; +} +simdjson_inline bool token_iterator::operator<(const token_iterator &other) const noexcept { + return _position < other._position; +} +simdjson_inline bool token_iterator::operator<=(const token_iterator &other) const noexcept { + return _position <= other._position; +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(haswell::ondemand::token_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/token_iterator-inl.h for haswell */ +/* including simdjson/generic/ondemand/value-inl.h for haswell: #include "simdjson/generic/ondemand/value-inl.h" */ +/* begin file simdjson/generic/ondemand/value-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +simdjson_inline value::value(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} +simdjson_inline value value::start(const value_iterator &iter) noexcept { + return iter; +} +simdjson_inline value value::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline simdjson_result value::get_array() noexcept { + return array::start(iter); +} +simdjson_inline simdjson_result value::get_object() noexcept { + return object::start(iter); +} +simdjson_inline simdjson_result value::start_or_resume_object() noexcept { + if (iter.at_start()) { + return get_object(); + } else { + return object::resume(iter); + } +} + +simdjson_inline simdjson_result value::get_raw_json_string() noexcept { + return iter.get_raw_json_string(); +} +simdjson_inline simdjson_result value::get_string(bool allow_replacement) noexcept { + return iter.get_string(allow_replacement); +} +template +simdjson_inline error_code value::get_string(string_type& receiver, bool allow_replacement) noexcept { + return iter.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result value::get_wobbly_string() noexcept { + return iter.get_wobbly_string(); +} +simdjson_inline simdjson_result value::get_double() noexcept { + return iter.get_double(); +} +simdjson_inline simdjson_result value::get_double_in_string() noexcept { + return iter.get_double_in_string(); +} +simdjson_inline simdjson_result value::get_uint64() noexcept { + return iter.get_uint64(); +} +simdjson_inline simdjson_result value::get_uint64_in_string() noexcept { + return iter.get_uint64_in_string(); +} +simdjson_inline simdjson_result value::get_int64() noexcept { + return iter.get_int64(); +} +simdjson_inline simdjson_result value::get_int64_in_string() noexcept { + return iter.get_int64_in_string(); +} +simdjson_inline simdjson_result value::get_bool() noexcept { + return iter.get_bool(); +} +simdjson_inline simdjson_result value::is_null() noexcept { + return iter.is_null(); +} +template<> simdjson_inline simdjson_result value::get() noexcept { return get_array(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_object(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_number(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_double(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_bool(); } + +template simdjson_inline error_code value::get(T &out) noexcept { + return get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline value::operator array() noexcept(false) { + return get_array(); +} +simdjson_inline value::operator object() noexcept(false) { + return get_object(); +} +simdjson_inline value::operator uint64_t() noexcept(false) { + return get_uint64(); +} +simdjson_inline value::operator int64_t() noexcept(false) { + return get_int64(); +} +simdjson_inline value::operator double() noexcept(false) { + return get_double(); +} +simdjson_inline value::operator std::string_view() noexcept(false) { + return get_string(false); +} +simdjson_inline value::operator raw_json_string() noexcept(false) { + return get_raw_json_string(); +} +simdjson_inline value::operator bool() noexcept(false) { + return get_bool(); +} +#endif + +simdjson_inline simdjson_result value::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result value::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result value::count_elements() & noexcept { + simdjson_result answer; + auto a = get_array(); + answer = a.count_elements(); + // count_elements leaves you pointing inside the array, at the first element. + // We need to move back so that the user can create a new array (which requires that + // we point at '['). + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::count_fields() & noexcept { + simdjson_result answer; + auto a = get_object(); + answer = a.count_fields(); + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::at(size_t index) noexcept { + auto a = get_array(); + return a.at(index); +} + +simdjson_inline simdjson_result value::find_field(std::string_view key) noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result value::find_field(const char *key) noexcept { + return start_or_resume_object().find_field(key); +} + +simdjson_inline simdjson_result value::find_field_unordered(std::string_view key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result value::find_field_unordered(const char *key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} + +simdjson_inline simdjson_result value::operator[](std::string_view key) noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result value::operator[](const char *key) noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline simdjson_result value::type() noexcept { + return iter.type(); +} + +simdjson_inline simdjson_result value::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool value::is_negative() noexcept { + return iter.is_negative(); +} + +simdjson_inline simdjson_result value::is_integer() noexcept { + return iter.is_integer(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number_type() noexcept { + return iter.get_number_type(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number() noexcept { + return iter.get_number(); +} + +simdjson_inline std::string_view value::raw_json_token() noexcept { + return std::string_view(reinterpret_cast(iter.peek_start()), iter.peek_start_length()); +} + +simdjson_inline simdjson_result value::raw_json() noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: { + ondemand::array array; + SIMDJSON_TRY(get_array().get(array)); + return array.raw_json(); + } + case json_type::object: { + ondemand::object object; + SIMDJSON_TRY(get_object().get(object)); + return object.raw_json(); + } + default: + return raw_json_token(); + } +} + +simdjson_inline simdjson_result value::current_location() noexcept { + return iter.json_iter().current_location(); +} + +simdjson_inline int32_t value::current_depth() const noexcept{ + return iter.json_iter().depth(); +} + +simdjson_inline simdjson_result value::at_pointer(std::string_view json_pointer) noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + haswell::ondemand::value &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + if (error()) { return error(); } + return {}; +} + +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} + +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) noexcept { + if (error()) { return error(); } + return first[key]; +} + +simdjson_inline simdjson_result simdjson_result::get_array() noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return first.get(); +} +template simdjson_inline error_code simdjson_result::get(T &out) noexcept { + if (error()) { return error(); } + return first.get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return std::move(first); +} +template<> simdjson_inline error_code simdjson_result::get(haswell::ondemand::value &out) noexcept { + if (error()) { return error(); } + out = first; + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator haswell::ondemand::array() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator haswell::ondemand::object() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator haswell::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H +/* end file simdjson/generic/ondemand/value-inl.h for haswell */ +/* including simdjson/generic/ondemand/value_iterator-inl.h for haswell: #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/value_iterator-inl.h for haswell */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/atomparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace haswell { +namespace ondemand { + +simdjson_inline value_iterator::value_iterator( + json_iterator *json_iter, + depth_t depth, + token_position start_position +) noexcept : _json_iter{json_iter}, _depth{depth}, _start_position{start_position} +{ +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_root_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_object() noexcept { + assert_at_container_start(); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + if (*_json_iter->peek() == '}') { + logger::log_value(*_json_iter, "empty object"); + _json_iter->return_current_and_advance(); + end_container(); + return false; + } + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_object() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // object: e.g., `{"a":2} foo }`. Users concerned with garbage content should + // call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != '}') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing } at end"); + } + // If the last character is } *and* the first gibberish character is also '}' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == '}') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed object. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_object() noexcept { + auto error = check_root_object(); + if(error) { return error; } + return started_object(); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::end_container() noexcept { +#if SIMDJSON_CHECK_EOF + if (depth() > 1 && at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing parent ] or }"); } + // if (depth() <= 1 && !at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + _json_iter->ascend_to(depth()-1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_field() noexcept { + assert_at_next(); + + // It's illegal to call this unless there are more tokens: anything that ends in } or ] is + // obligated to verify there are more tokens if they are not the top level. + switch (*_json_iter->return_current_and_advance()) { + case '}': + logger::log_end_value(*_json_iter, "object"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between object fields"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_raw(const std::string_view key) noexcept { + error_code error; + bool has_value; + // + // Initially, the object can be in one of a few different places: + // + // 1. The start of the object, at the first field: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + if (at_first_field()) { + has_value = true; + + // + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + return false; + + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + if ((error = skip_child() )) { abandon(); return error; } + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + while (has_value) { + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + //if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); // Skip the value entirely + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + + // If the loop ended, we're out of fields to look at. + return false; +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_unordered_raw(const std::string_view key) noexcept { + /** + * When find_field_unordered_raw is called, we can either be pointing at the + * first key, pointing outside (at the closing brace) or if a key was matched + * we can be either pointing right afterthe ':' right before the value (that we need skip), + * or we may have consumed the value and we might be at a comma or at the + * final brace (ready for a call to has_next_field()). + */ + error_code error; + bool has_value; + + // First, we scan from that point to the end. + // If we don't find a match, we may loop back around, and scan from the beginning to that point. + token_position search_start = _json_iter->position(); + + // We want to know whether we need to go back to the beginning. + bool at_first = at_first_field(); + /////////////// + // Initially, the object can be in one of a few different places: + // + // 1. At the first key: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + // + if (at_first) { + has_value = true; + + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { + +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + SIMDJSON_TRY(reset_object().get(has_value)); + at_first = true; + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + // If someone queried a key but they not did access the value, then we are left pointing + // at the ':' and we need to move forward through the value... If the value was + // processed then skip_child() does not move the iterator (but may adjust the depth). + if ((error = skip_child() )) { abandon(); return error; } + search_start = _json_iter->position(); + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + + // After initial processing, we will be in one of two states: + // + // ``` + // // At the beginning of a field + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // At the end of the object + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // ``` + // + // Next, we find a match starting from the current position. + while (has_value) { + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + // Performance note: it maybe wasteful to rewind to the beginning when there might be + // no other query following. Indeed, it would require reskipping the whole object. + // Instead, you can just stay where you are. If there is a new query, there is always time + // to rewind. + if(at_first) { return false; } + + // If we reach the end without finding a match, search the rest of the fields starting at the + // beginning of the object. + // (We have already run through the object before, so we've already validated its structure. We + // don't check errors in this bit.) + SIMDJSON_TRY(reset_object().get(has_value)); + while (true) { + SIMDJSON_ASSUME(has_value); // we should reach search_start before ever reaching the end of the object + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + error = field_key().get(actual_key); SIMDJSON_ASSUME(!error); + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + error = field_value(); SIMDJSON_ASSUME(!error); + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // If we reached the end of the key-value pair we started from, then we know + // that the key is not there so we return false. We are either right before + // the next comma or the final brace. + if(_json_iter->position() == search_start) { return false; } + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + error = has_next_field().get(has_value); SIMDJSON_ASSUME(!error); + // If we make the mistake of exiting here, then we could be left pointing at a key + // in the middle of an object. That's not an allowable state. + } + // If the loop ended, we're out of fields to look at. The program should + // never reach this point. + return false; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::field_key() noexcept { + assert_at_next(); + + const uint8_t *key = _json_iter->return_current_and_advance(); + if (*(key++) != '"') { return report_error(TAPE_ERROR, "Object key is not a string"); } + return raw_json_string(key); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::field_value() noexcept { + assert_at_next(); + + if (*_json_iter->return_current_and_advance() != ':') { return report_error(TAPE_ERROR, "Missing colon in object field"); } + _json_iter->descend_to(depth()+1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_root_array(); +} + +inline std::string value_iterator::to_string() const noexcept { + auto answer = std::string("value_iterator [ depth : ") + std::to_string(_depth) + std::string(", "); + if(_json_iter != nullptr) { answer += _json_iter->to_string(); } + answer += std::string(" ]"); + return answer; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_array() noexcept { + assert_at_container_start(); + if (*_json_iter->peek() == ']') { + logger::log_value(*_json_iter, "empty array"); + _json_iter->return_current_and_advance(); + SIMDJSON_TRY( end_container() ); + return false; + } + _json_iter->descend_to(depth()+1); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_array() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // array: e.g., `[1, 2] foo]`. Users concerned with garbage content should + // also call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != ']') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing ] at end"); + } + // If the last character is ] *and* the first gibberish character is also ']' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == ']') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed array. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_array() noexcept { + auto error = check_root_array(); + if (error) { return error; } + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_element() noexcept { + assert_at_next(); + + logger::log_event(*this, "has_next_element"); + switch (*_json_iter->return_current_and_advance()) { + case ']': + logger::log_end_value(*_json_iter, "array"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + _json_iter->descend_to(depth()+1); + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between array elements"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_bool(const uint8_t *json) const noexcept { + auto not_true = atomparsing::str4ncmp(json, "true"); + auto not_false = atomparsing::str4ncmp(json, "fals") | (json[4] ^ 'e'); + bool error = (not_true && not_false) || jsoncharutils::is_not_structural_or_whitespace(json[not_true ? 5 : 4]); + if (error) { return incorrect_type_error("Not a boolean"); } + return simdjson_result(!not_true); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_null(const uint8_t *json) const noexcept { + bool is_null_string = !atomparsing::str4ncmp(json, "null") && jsoncharutils::is_structural_or_whitespace(json[4]); + // if we start with 'n', we must be a null + if(!is_null_string && json[0]=='n') { return incorrect_type_error("Not a null but starts with n"); } + return is_null_string; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_string(bool allow_replacement) noexcept { + return get_raw_json_string().unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_string(string_type& receiver, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_string(allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_wobbly_string() noexcept { + return get_raw_json_string().unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_raw_json_string() noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64() noexcept { + auto result = numberparsing::parse_unsigned(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64_in_string() noexcept { + auto result = numberparsing::parse_unsigned_in_string(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64() noexcept { + auto result = numberparsing::parse_integer(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64_in_string() noexcept { + auto result = numberparsing::parse_integer_in_string(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double() noexcept { + auto result = numberparsing::parse_double(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double_in_string() noexcept { + auto result = numberparsing::parse_double_in_string(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_bool() noexcept { + auto result = parse_bool(peek_non_root_scalar("bool")); + if(result.error() == SUCCESS) { advance_non_root_scalar("bool"); } + return result; +} +simdjson_inline simdjson_result value_iterator::is_null() noexcept { + bool is_null_value; + SIMDJSON_TRY(parse_null(peek_non_root_scalar("null")).get(is_null_value)); + if(is_null_value) { advance_non_root_scalar("null"); } + return is_null_value; +} +simdjson_inline bool value_iterator::is_negative() noexcept { + return numberparsing::is_negative(peek_non_root_scalar("numbersign")); +} +simdjson_inline bool value_iterator::is_root_negative() noexcept { + return numberparsing::is_negative(peek_root_scalar("numbersign")); +} +simdjson_inline simdjson_result value_iterator::is_integer() noexcept { + return numberparsing::is_integer(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number_type() noexcept { + return numberparsing::get_number_type(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number() noexcept { + number num; + error_code error = numberparsing::parse_number(peek_non_root_scalar("number"), num); + if(error) { return error; } + return num; +} + +simdjson_inline simdjson_result value_iterator::is_root_integer(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("is_root_integer"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + return false; // if there are more than 20 characters, it cannot be represented as an integer. + } + auto answer = numberparsing::is_integer(tmpbuf); + // If the parsing was a success, we must still check that it is + // a single scalar. Note that we parse first because of cases like '[]' where + // getting TRAILING_CONTENT is wrong. + if(check_trailing && (answer.error() == SUCCESS) && (!_json_iter->is_single_token())) { return TRAILING_CONTENT; } + return answer; +} + +simdjson_inline simdjson_result value_iterator::get_root_number_type(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto answer = numberparsing::get_number_type(tmpbuf); + if (check_trailing && (answer.error() == SUCCESS) && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + return answer; +} +simdjson_inline simdjson_result value_iterator::get_root_number(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + number num; + error_code error = numberparsing::parse_number(tmpbuf, num); + if(error) { return error; } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("number"); + return num; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_string(bool check_trailing, bool allow_replacement) noexcept { + return get_root_raw_json_string(check_trailing).unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_root_string(check_trailing, allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_wobbly_string(bool check_trailing) noexcept { + return get_root_raw_json_string(check_trailing).unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_raw_json_string(bool check_trailing) noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_bool(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("bool"); + uint8_t tmpbuf[5+1+1]; // +1 for null termination + tmpbuf[5+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 5+1)) { return incorrect_type_error("Not a boolean"); } + auto result = parse_bool(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("bool"); + } + return result; +} +simdjson_inline simdjson_result value_iterator::is_root_null(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("null"); + bool result = (max_len >= 4 && !atomparsing::str4ncmp(json, "null") && + (max_len == 4 || jsoncharutils::is_structural_or_whitespace(json[4]))); + if(result) { // we have something that looks like a null. + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("null"); + } + return result; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::skip_child() noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth >= _depth ); + + return _json_iter->skip_child(depth()); +} + +simdjson_inline value_iterator value_iterator::child() const noexcept { + assert_at_child(); + return { _json_iter, depth()+1, _json_iter->token.position() }; +} + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and iterator depth, which is a desired effect. It does not happen if is_open is +// marked non-inline. +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline bool value_iterator::is_open() const noexcept { + return _json_iter->depth() >= depth(); +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool value_iterator::at_end() const noexcept { + return _json_iter->at_end(); +} + +simdjson_inline bool value_iterator::at_start() const noexcept { + return _json_iter->token.position() == start_position(); +} + +simdjson_inline bool value_iterator::at_first_field() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + return _json_iter->token.position() == start_position() + 1; +} + +simdjson_inline void value_iterator::abandon() noexcept { + _json_iter->abandon(); +} + +simdjson_warn_unused simdjson_inline depth_t value_iterator::depth() const noexcept { + return _depth; +} +simdjson_warn_unused simdjson_inline error_code value_iterator::error() const noexcept { + return _json_iter->error; +} +simdjson_warn_unused simdjson_inline uint8_t *&value_iterator::string_buf_loc() noexcept { + return _json_iter->string_buf_loc(); +} +simdjson_warn_unused simdjson_inline const json_iterator &value_iterator::json_iter() const noexcept { + return *_json_iter; +} +simdjson_warn_unused simdjson_inline json_iterator &value_iterator::json_iter() noexcept { + return *_json_iter; +} + +simdjson_inline const uint8_t *value_iterator::peek_start() const noexcept { + return _json_iter->peek(start_position()); +} +simdjson_inline uint32_t value_iterator::peek_start_length() const noexcept { + return _json_iter->peek_length(start_position()); +} + +simdjson_inline const uint8_t *value_iterator::peek_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return peek_start(); } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return; } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept { + logger::log_start_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + const uint8_t *json; + if (!is_at_start()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + json = peek_start(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + } else { + assert_at_start(); + /** + * We should be prudent. Let us peek. If it is not the right type, we + * return an error. Only once we have determined that we have the right + * type are we allowed to advance! + */ + json = _json_iter->peek(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + _json_iter->return_current_and_advance(); + } + + + return SUCCESS; +} + + +simdjson_inline const uint8_t *value_iterator::peek_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_root(); + return _json_iter->peek(); +} +simdjson_inline const uint8_t *value_iterator::peek_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_non_root_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_root(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} +simdjson_inline void value_iterator::advance_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_non_root_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::incorrect_type_error(const char *message) const noexcept { + logger::log_error(*_json_iter, start_position(), depth(), message); + return INCORRECT_TYPE; +} + +simdjson_inline bool value_iterator::is_at_start() const noexcept { + return position() == start_position(); +} + +simdjson_inline bool value_iterator::is_at_key() const noexcept { + // Keys are at the same depth as the object. + // Note here that we could be safer and check that we are within an object, + // but we do not. + return _depth == _json_iter->_depth && *_json_iter->peek() == '"'; +} + +simdjson_inline bool value_iterator::is_at_iterator_start() const noexcept { + // We can legitimately be either at the first value ([1]), or after the array if it's empty ([]). + auto delta = position() - start_position(); + return delta == 1 || delta == 2; +} + +inline void value_iterator::assert_at_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_container_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position + 1 ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_next() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +simdjson_inline void value_iterator::move_at_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position); +} + +simdjson_inline void value_iterator::move_at_container_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position + 1); +} + +simdjson_inline simdjson_result value_iterator::reset_array() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_array(); +} + +simdjson_inline simdjson_result value_iterator::reset_object() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_object(); +} + +inline void value_iterator::assert_at_child() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth + 1 ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_root() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth == 1 ); +} + +inline void value_iterator::assert_at_non_root_start() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth > 1 ); +} + +inline void value_iterator::assert_is_valid() const noexcept { + SIMDJSON_ASSUME( _json_iter != nullptr ); +} + +simdjson_inline bool value_iterator::is_valid() const noexcept { + return _json_iter != nullptr; +} + +simdjson_inline simdjson_result value_iterator::type() const noexcept { + switch (*peek_start()) { + case '{': + return json_type::object; + case '[': + return json_type::array; + case '"': + return json_type::string; + case 'n': + return json_type::null; + case 't': case 'f': + return json_type::boolean; + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return json_type::number; + default: + return TAPE_ERROR; + } +} + +simdjson_inline token_position value_iterator::start_position() const noexcept { + return _start_position; +} + +simdjson_inline token_position value_iterator::position() const noexcept { + return _json_iter->position(); +} + +simdjson_inline token_position value_iterator::end_position() const noexcept { + return _json_iter->end_position(); +} + +simdjson_inline token_position value_iterator::last_position() const noexcept { + return _json_iter->last_position(); +} + +simdjson_inline error_code value_iterator::report_error(error_code error, const char *message) noexcept { + return _json_iter->report_error(error, message); +} + +} // namespace ondemand +} // namespace haswell +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(haswell::ondemand::value_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/value_iterator-inl.h for haswell */ +/* end file simdjson/generic/ondemand/amalgamated.h for haswell */ +/* including simdjson/haswell/end.h: #include "simdjson/haswell/end.h" */ +/* begin file simdjson/haswell/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/haswell/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_HASWELL +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "haswell" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/haswell/end.h */ + +#endif // SIMDJSON_HASWELL_ONDEMAND_H +/* end file simdjson/haswell/ondemand.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(icelake) +/* including simdjson/icelake/ondemand.h: #include "simdjson/icelake/ondemand.h" */ +/* begin file simdjson/icelake/ondemand.h */ +#ifndef SIMDJSON_ICELAKE_ONDEMAND_H +#define SIMDJSON_ICELAKE_ONDEMAND_H + +/* including simdjson/icelake/begin.h: #include "simdjson/icelake/begin.h" */ +/* begin file simdjson/icelake/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "icelake" */ +#define SIMDJSON_IMPLEMENTATION icelake +/* including simdjson/icelake/base.h: #include "simdjson/icelake/base.h" */ +/* begin file simdjson/icelake/base.h */ +#ifndef SIMDJSON_ICELAKE_BASE_H +#define SIMDJSON_ICELAKE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_ICELAKE +namespace simdjson { +/** + * Implementation for Icelake (Intel AVX512). + */ +namespace icelake { + +class implementation; + +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BASE_H +/* end file simdjson/icelake/base.h */ +/* including simdjson/icelake/intrinsics.h: #include "simdjson/icelake/intrinsics.h" */ +/* begin file simdjson/icelake/intrinsics.h */ +#ifndef SIMDJSON_ICELAKE_INTRINSICS_H +#define SIMDJSON_ICELAKE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + * e.g., if __AVX2__ is set... in turn, we normally set these + * macros by compiling against the corresponding architecture + * (e.g., arch:AVX2, -mavx2, etc.) which compiles the whole + * software with these advanced instructions. In simdjson, we + * want to compile the whole program for a generic target, + * and only target our specific kernels. As a workaround, + * we directly include the needed headers. These headers would + * normally guard against such usage, but we carefully included + * (or ) before, so the headers + * are fooled. + */ +#include // for _blsr_u64 +#include // for __lzcnt64 +#include // for most things (AVX2, AVX512, _popcnt64) +#include +#include +#include +#include +#include // for _mm_clmulepi64_si128 +// Important: we need the AVX-512 headers: +#include +#include +#include +#include +#include +#include +#include +// unfortunately, we may not get _blsr_u64, but, thankfully, clang +// has it as a macro. +#ifndef _blsr_u64 +// we roll our own +#define _blsr_u64(n) ((n - 1) & n) +#endif // _blsr_u64 +#endif // SIMDJSON_CLANG_VISUAL_STUDIO + +static_assert(sizeof(__m512i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for icelake"); + +#endif // SIMDJSON_ICELAKE_INTRINSICS_H +/* end file simdjson/icelake/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +SIMDJSON_TARGET_REGION("avx512f,avx512dq,avx512cd,avx512bw,avx512vbmi,avx512vbmi2,avx512vl,avx2,bmi,pclmul,lzcnt,popcnt") +#endif + +/* including simdjson/icelake/bitmanipulation.h: #include "simdjson/icelake/bitmanipulation.h" */ +/* begin file simdjson/icelake/bitmanipulation.h */ +#ifndef SIMDJSON_ICELAKE_BITMANIPULATION_H +#define SIMDJSON_ICELAKE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return (int)_tzcnt_u64(input_num); +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + //////// + // You might expect the next line to be equivalent to + // return (int)_tzcnt_u64(input_num); + // but the generated code differs and might be less efficient? + //////// + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return _blsr_u64(input_num); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { + return int(_lzcnt_u64(input_num)); +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BITMANIPULATION_H +/* end file simdjson/icelake/bitmanipulation.h */ +/* including simdjson/icelake/bitmask.h: #include "simdjson/icelake/bitmask.h" */ +/* begin file simdjson/icelake/bitmask.h */ +#ifndef SIMDJSON_ICELAKE_BITMASK_H +#define SIMDJSON_ICELAKE_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processor supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_BITMASK_H +/* end file simdjson/icelake/bitmask.h */ +/* including simdjson/icelake/simd.h: #include "simdjson/icelake/simd.h" */ +/* begin file simdjson/icelake/simd.h */ +#ifndef SIMDJSON_ICELAKE_SIMD_H +#define SIMDJSON_ICELAKE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if defined(__GNUC__) && !defined(__clang__) +#if __GNUC__ == 8 +#define SIMDJSON_GCC8 1 +#endif // __GNUC__ == 8 +#endif // defined(__GNUC__) && !defined(__clang__) + +#if SIMDJSON_GCC8 +/** + * GCC 8 fails to provide _mm512_set_epi8. We roll our own. + */ +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) { + 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), + 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), + 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), + 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), + 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), + 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), + 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), + 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)); +} +#endif // SIMDJSON_GCC8 + + + +namespace simdjson { +namespace icelake { +namespace { +namespace simd { + + // Forward-declared so they can be used by splat and friends. + template + struct base { + __m512i value; + + // Zero constructor + simdjson_inline base() : value{__m512i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m512i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m512i&() const { return this->value; } + simdjson_inline operator __m512i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm512_or_si512(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm512_and_si512(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm512_xor_si512(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm512_andnot_si512(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + // Forward-declared so they can be used by splat and friends. + template + struct simd8; + + template> + struct base8: base> { + typedef uint32_t bitmask_t; + typedef uint64_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m512i _value) : base>(_value) {} + + friend simdjson_really_inline uint64_t operator==(const simd8 lhs, const simd8 rhs) { + return _mm512_cmpeq_epi8_mask(lhs, rhs); + } + + static const int SIZE = sizeof(base::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + // workaround for compilers unable to figure out that 16 - N is a constant (GCC 8) + constexpr int shift = 16 - N; + return _mm512_alignr_epi8(*this, _mm512_permutex2var_epi64(prev_chunk, _mm512_set_epi64(13, 12, 11, 10, 9, 8, 7, 6), *this), shift); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm512_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m512i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + simdjson_inline bool any() const { return !!_mm512_test_epi8_mask (*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm512_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm512_setzero_si512(); } + static simdjson_inline simd8 load(const T values[64]) { + return _mm512_loadu_si512(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m512i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[64]) const { return _mm512_storeu_si512(reinterpret_cast<__m512i *>(dst), *this); } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm512_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm512_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm512_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 32 - count_ones(mask) bytes of the result are significant but 32 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint64_t mask, L * output) const { + _mm512_mask_compressstoreu_epi8 (output,~mask,*this); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m512i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t values[64]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15, + int8_t v16, int8_t v17, int8_t v18, int8_t v19, int8_t v20, int8_t v21, int8_t v22, int8_t v23, + int8_t v24, int8_t v25, int8_t v26, int8_t v27, int8_t v28, int8_t v29, int8_t v30, int8_t v31, + int8_t v32, int8_t v33, int8_t v34, int8_t v35, int8_t v36, int8_t v37, int8_t v38, int8_t v39, + int8_t v40, int8_t v41, int8_t v42, int8_t v43, int8_t v44, int8_t v45, int8_t v46, int8_t v47, + int8_t v48, int8_t v49, int8_t v50, int8_t v51, int8_t v52, int8_t v53, int8_t v54, int8_t v55, + int8_t v56, int8_t v57, int8_t v58, int8_t v59, int8_t v60, int8_t v61, int8_t v62, int8_t v63 + ) : simd8(_mm512_set_epi8( + v63, v62, v61, v60, v59, v58, v57, v56, + v55, v54, v53, v52, v51, v50, v49, v48, + v47, v46, v45, v44, v43, v42, v41, v40, + v39, v38, v37, v36, v35, v34, v33, v32, + v31, v30, v29, v28, v27, v26, v25, v24, + v23, v22, v21, v20, v19, v18, v17, v16, + v15, v14, v13, v12, v11, v10, v9, v8, + v7, v6, v5, v4, v3, v2, v1, v0 + )) {} + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm512_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm512_min_epi8(*this, other); } + + simdjson_inline simd8 operator>(const simd8 other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(*this, other),_mm512_set1_epi8(uint8_t(0x80))); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm512_maskz_abs_epi8(_mm512_cmpgt_epi8_mask(other, *this),_mm512_set1_epi8(uint8_t(0x80))); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m512i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t values[64]) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15, + uint8_t v16, uint8_t v17, uint8_t v18, uint8_t v19, uint8_t v20, uint8_t v21, uint8_t v22, uint8_t v23, + uint8_t v24, uint8_t v25, uint8_t v26, uint8_t v27, uint8_t v28, uint8_t v29, uint8_t v30, uint8_t v31, + uint8_t v32, uint8_t v33, uint8_t v34, uint8_t v35, uint8_t v36, uint8_t v37, uint8_t v38, uint8_t v39, + uint8_t v40, uint8_t v41, uint8_t v42, uint8_t v43, uint8_t v44, uint8_t v45, uint8_t v46, uint8_t v47, + uint8_t v48, uint8_t v49, uint8_t v50, uint8_t v51, uint8_t v52, uint8_t v53, uint8_t v54, uint8_t v55, + uint8_t v56, uint8_t v57, uint8_t v58, uint8_t v59, uint8_t v60, uint8_t v61, uint8_t v62, uint8_t v63 + ) : simd8(_mm512_set_epi8( + v63, v62, v61, v60, v59, v58, v57, v56, + v55, v54, v53, v52, v51, v50, v49, v48, + v47, v46, v45, v44, v43, v42, v41, v40, + v39, v38, v37, v36, v35, v34, v33, v32, + v31, v30, v29, v28, v27, v26, v25, v24, + v23, v22, v21, v20, v19, v18, v17, v16, + v15, v14, v13, v12, v11, v10, v9, v8, + v7, v6, v5, v4, v3, v2, v1, v0 + )) {} + + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15, + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm512_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm512_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm512_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm512_min_epu8(other, *this); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline uint64_t operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline uint64_t operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->lt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return _mm512_mask_blend_epi8(*this == uint8_t(0), _mm512_set1_epi8(0), _mm512_set1_epi8(-1)); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + + simdjson_inline bool is_ascii() const { return _mm512_movepi8_mask(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { + return !_mm512_test_epi8_mask(*this, *this); + } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return !_mm512_test_epi8_mask(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm512_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm512_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline uint64_t get_bit() const { return _mm512_movepi8_mask(_mm512_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 1, "Icelake kernel should use one register per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1) : chunks{chunk0, chunk1} {} + simdjson_inline simd8x64(const simd8 chunk0) : chunks{chunk0} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr)} {} + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(mask, output); + return 64 - count_ones(mask); + } + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + } + + simdjson_inline simd8 reduce_or() const { + return this->chunks[0]; + } + + simdjson_inline simd8x64 bit_or(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] | mask + ); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return this->chunks[0] == mask; + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return this->chunks[0] == other.chunks[0]; + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return this->chunks[0] <= mask; + } + }; // struct simd8x64 + +} // namespace simd + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_SIMD_H +/* end file simdjson/icelake/simd.h */ +/* including simdjson/icelake/stringparsing_defs.h: #include "simdjson/icelake/stringparsing_defs.h" */ +/* begin file simdjson/icelake/stringparsing_defs.h */ +#ifndef SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H +#define SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/simd.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 64; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return ((quote_bits - 1) & bs_bits) != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint64_t bs_bits; + uint64_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 15 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v(src); + // store to dest unconditionally - we can overwrite the bits we don't like later + v.store(dst); + return { + static_cast(v == '\\'), // bs_bits + static_cast(v == '"'), // quote_bits + }; +} + +} // unnamed namespace +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_ICELAKE_STRINGPARSING_DEFS_H +/* end file simdjson/icelake/stringparsing_defs.h */ +/* including simdjson/icelake/numberparsing_defs.h: #include "simdjson/icelake/numberparsing_defs.h" */ +/* begin file simdjson/icelake/numberparsing_defs.h */ +#ifndef SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H +#define SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace numberparsing { + +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace icelake +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_ICELAKE_NUMBERPARSING_DEFS_H +/* end file simdjson/icelake/numberparsing_defs.h */ +/* end file simdjson/icelake/begin.h */ +/* including simdjson/generic/ondemand/amalgamated.h for icelake: #include "simdjson/generic/ondemand/amalgamated.h" */ +/* begin file simdjson/generic/ondemand/amalgamated.h for icelake */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H) +#error simdjson/generic/ondemand/dependencies.h must be included before simdjson/generic/ondemand/amalgamated.h! +#endif + +// Stuff other things depend on +/* including simdjson/generic/ondemand/base.h for icelake: #include "simdjson/generic/ondemand/base.h" */ +/* begin file simdjson/generic/ondemand/base.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +/** + * A fast, simple, DOM-like interface that parses JSON as you use it. + * + * Designed for maximum speed and a lower memory profile. + */ +namespace ondemand { + +/** Represents the depth of a JSON value (number of nested arrays/objects). */ +using depth_t = int32_t; + +/** @copydoc simdjson::icelake::number_type */ +using number_type = simdjson::icelake::number_type; + +/** @private Position in the JSON buffer indexes */ +using token_position = const uint32_t *; + +class array; +class array_iterator; +class document; +class document_reference; +class document_stream; +class field; +class json_iterator; +enum class json_type; +struct number; +class object; +class object_iterator; +class parser; +class raw_json_string; +class token_iterator; +class value; +class value_iterator; + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_BASE_H +/* end file simdjson/generic/ondemand/base.h for icelake */ +/* including simdjson/generic/ondemand/value_iterator.h for icelake: #include "simdjson/generic/ondemand/value_iterator.h" */ +/* begin file simdjson/generic/ondemand/value_iterator.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * Iterates through a single JSON value at a particular depth. + * + * Does not keep track of the type of value: provides methods for objects, arrays and scalars and expects + * the caller to call the right ones. + * + * @private This is not intended for external use. + */ +class value_iterator { +protected: + /** The underlying JSON iterator */ + json_iterator *_json_iter{}; + /** The depth of this value */ + depth_t _depth{}; + /** + * The starting token index for this value + */ + token_position _start_position{}; + +public: + simdjson_inline value_iterator() noexcept = default; + + /** + * Denote that we're starting a document. + */ + simdjson_inline void start_document() noexcept; + + /** + * Skips a non-iterated or partially-iterated JSON value, whether it is a scalar, array or object. + * + * Optimized for scalars. + */ + simdjson_warn_unused simdjson_inline error_code skip_child() noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is at the start of the value + */ + simdjson_inline bool at_start() const noexcept; + + /** + * Tell whether the value is open--if the value has not been used, or the array/object is still open. + */ + simdjson_inline bool is_open() const noexcept; + + /** + * Tell whether the value is at an object's first field (just after the {). + */ + simdjson_inline bool at_first_field() const noexcept; + + /** + * Abandon all iteration. + */ + simdjson_inline void abandon() noexcept; + + /** + * Get the child value as a value_iterator. + */ + simdjson_inline value_iterator child_value() const noexcept; + + /** + * Get the depth of this value. + */ + simdjson_inline int32_t depth() const noexcept; + + /** + * Get the JSON type of this value. + * + * @error TAPE_ERROR when the JSON value is a bad token like "}" "," or "alse". + */ + simdjson_inline simdjson_result type() const noexcept; + + /** + * @addtogroup object Object iteration + * + * Methods to iterate and find object fields. These methods generally *assume* the value is + * actually an object; the caller is responsible for keeping track of that fact. + * + * @{ + */ + + /** + * Start an object iteration. + * + * @returns Whether the object had any fields (returns false for empty). + * @error INCORRECT_TYPE if there is no opening { + */ + simdjson_warn_unused simdjson_inline simdjson_result start_object() noexcept; + /** + * Start an object iteration from the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_object() noexcept; + /** + * Checks whether an object could be started from the root. May be called by start_root_object. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_object() noexcept; + /** + * Start an object iteration after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_object() noexcept; + /** + * Start an object iteration from the root, after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_object() noexcept; + + /** + * Moves to the next field in an object. + * + * Looks for , and }. If } is found, the object is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_field() noexcept; + + /** + * Get the current field's key. + */ + simdjson_warn_unused simdjson_inline simdjson_result field_key() noexcept; + + /** + * Pass the : in the field and move to its value. + */ + simdjson_warn_unused simdjson_inline error_code field_value() noexcept; + + /** + * Find the next field with the given key. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline error_code find_field(const std::string_view key) noexcept; + + /** + * Find the next field with the given key, *without* unescaping. This assumes object order: it + * will not find the field if it was already passed when looking for some *other* field. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_raw(const std::string_view key) noexcept; + + /** + * Find the field with the given key without regard to order, and *without* unescaping. + * + * This is an unordered object lookup: if the field is not found initially, it will cycle around and scan from the beginning. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_unordered_raw(const std::string_view key) noexcept; + + /** @} */ + + /** + * @addtogroup array Array iteration + * Methods to iterate over array elements. These methods generally *assume* the value is actually + * an object; the caller is responsible for keeping track of that fact. + * @{ + */ + + /** + * Check for an opening [ and start an array iteration. + * + * @returns Whether the array had any elements (returns false for empty). + * @error INCORRECT_TYPE If there is no [. + */ + simdjson_warn_unused simdjson_inline simdjson_result start_array() noexcept; + /** + * Check for an opening [ and start an array iteration while at the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_array() noexcept; + /** + * Checks whether an array could be started from the root. May be called by start_root_array. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_array() noexcept; + /** + * Start an array iteration, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_array() noexcept; + /** + * Start an array iteration from the root, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_array() noexcept; + + /** + * Moves to the next element in an array. + * + * Looks for , and ]. If ] is found, the array is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return Whether there is another element in the array. + * @error TAPE_ERROR If there is a comma missing between elements. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_element() noexcept; + + /** + * Get a child value iterator. + */ + simdjson_warn_unused simdjson_inline value_iterator child() const noexcept; + + /** @} */ + + /** + * @defgroup scalar Scalar values + * @addtogroup scalar + * @{ + */ + + simdjson_warn_unused simdjson_inline simdjson_result get_string(bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_bool() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_null() noexcept; + simdjson_warn_unused simdjson_inline bool is_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_integer() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + simdjson_warn_unused simdjson_inline simdjson_result get_root_string(bool check_trailing, bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_wobbly_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_raw_json_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_bool(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline bool is_root_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_integer(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number_type(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_null(bool check_trailing) noexcept; + + simdjson_inline error_code error() const noexcept; + simdjson_inline uint8_t *&string_buf_loc() noexcept; + simdjson_inline const json_iterator &json_iter() const noexcept; + simdjson_inline json_iterator &json_iter() noexcept; + + simdjson_inline void assert_is_valid() const noexcept; + simdjson_inline bool is_valid() const noexcept; + + /** @} */ +protected: + /** + * Restarts an array iteration. + * @returns Whether the array has any elements (returns false for empty). + */ + simdjson_inline simdjson_result reset_array() noexcept; + /** + * Restarts an object iteration. + * @returns Whether the object has any fields (returns false for empty). + */ + simdjson_inline simdjson_result reset_object() noexcept; + /** + * move_at_start(): moves us so that we are pointing at the beginning of + * the container. It updates the index so that at_start() is true and it + * syncs the depth. The user can then create a new container instance. + * + * Usage: used with value::count_elements(). + **/ + simdjson_inline void move_at_start() noexcept; + + /** + * move_at_container_start(): moves us so that we are pointing at the beginning of + * the container so that assert_at_container_start() passes. + * + * Usage: used with reset_array() and reset_object(). + **/ + simdjson_inline void move_at_container_start() noexcept; + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + simdjson_inline value_iterator(json_iterator *json_iter, depth_t depth, token_position start_index) noexcept; + + simdjson_inline simdjson_result parse_null(const uint8_t *json) const noexcept; + simdjson_inline simdjson_result parse_bool(const uint8_t *json) const noexcept; + simdjson_inline const uint8_t *peek_start() const noexcept; + simdjson_inline uint32_t peek_start_length() const noexcept; + + /** + * The general idea of the advance_... methods and the peek_* methods + * is that you first peek and check that you have desired type. If you do, + * and only if you do, then you advance. + * + * We used to unconditionally advance. But this made reasoning about our + * current state difficult. + * Suppose you always advance. Look at the 'value' matching the key + * "shadowable" in the following example... + * + * ({"globals":{"a":{"shadowable":[}}}}) + * + * If the user thinks it is a Boolean and asks for it, then we check the '[', + * decide it is not a Boolean, but still move into the next character ('}'). Now + * we are left pointing at '}' right after a '['. And we have not yet reported + * an error, only that we do not have a Boolean. + * + * If, instead, you just stand your ground until it is content that you know, then + * you will only even move beyond the '[' if the user tells you that you have an + * array. So you will be at the '}' character inside the array and, hopefully, you + * will then catch the error because an array cannot start with '}', but the code + * processing Boolean values does not know this. + * + * So the contract is: first call 'peek_...' and then call 'advance_...' only + * if you have determined that it is a type you can handle. + * + * Unfortunately, it makes the code more verbose, longer and maybe more error prone. + */ + + simdjson_inline void advance_scalar(const char *type) noexcept; + simdjson_inline void advance_root_scalar(const char *type) noexcept; + simdjson_inline void advance_non_root_scalar(const char *type) noexcept; + + simdjson_inline const uint8_t *peek_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_root_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_non_root_scalar(const char *type) noexcept; + + + simdjson_inline error_code start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept; + simdjson_inline error_code end_container() noexcept; + + /** + * Advance to a place expecting a value (increasing depth). + * + * @return The current token (the one left behind). + * @error TAPE_ERROR If the document ended early. + */ + simdjson_inline simdjson_result advance_to_value() noexcept; + + simdjson_inline error_code incorrect_type_error(const char *message) const noexcept; + simdjson_inline error_code error_unless_more_tokens(uint32_t tokens=1) const noexcept; + + simdjson_inline bool is_at_start() const noexcept; + /** + * is_at_iterator_start() returns true on an array or object after it has just been + * created, whether the instance is empty or not. + * + * Usage: used by array::begin() in debug mode (SIMDJSON_DEVELOPMENT_CHECKS) + */ + simdjson_inline bool is_at_iterator_start() const noexcept; + + /** + * Assuming that we are within an object, this returns true if we + * are pointing at a key. + * + * Usage: the skip_child() method should never be used while we are pointing + * at a key inside an object. + */ + simdjson_inline bool is_at_key() const noexcept; + + inline void assert_at_start() const noexcept; + inline void assert_at_container_start() const noexcept; + inline void assert_at_root() const noexcept; + inline void assert_at_child() const noexcept; + inline void assert_at_next() const noexcept; + inline void assert_at_non_root_start() const noexcept; + + /** Get the starting position of this value */ + simdjson_inline token_position start_position() const noexcept; + + /** @copydoc error_code json_iterator::position() const noexcept; */ + simdjson_inline token_position position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position last_position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position end_position() const noexcept; + /** @copydoc error_code json_iterator::report_error(error_code error, const char *message) noexcept; */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + friend class document; + friend class object; + friend class array; + friend class value; +}; // value_iterator + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::value_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H +/* end file simdjson/generic/ondemand/value_iterator.h for icelake */ +/* including simdjson/generic/ondemand/value.h for icelake: #include "simdjson/generic/ondemand/value.h" */ +/* begin file simdjson/generic/ondemand/value.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * 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. + */ +class value { +public: + /** + * Create a new invalid value. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline value() noexcept = default; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) noexcept; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() noexcept; + + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() noexcept; + + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + + /** + * Cast this JSON value (inside string) to a unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + + /** + * Cast this JSON value to a "wobbly" string. + * + * The string is may not be a valid UTF-8 string. + * See https://simonsapin.github.io/wtf-8/ + * + * Important: a value should be consumed once. Calling get_wobbly_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * @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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); +#endif + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + * + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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). + * + * @return 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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the value is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the value is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the value is an integer number. 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). + * + * 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. However, if this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view is guaranteed to be + * a non-space token. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + * + * See also value::raw_json(). + */ + simdjson_inline std::string_view raw_json_token() noexcept; + + /** + * Get a string_view pointing at this value in the JSON document. + * If this element is an array or an object, it consumes the array or the object + * and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + * If this element is a scalar (string, number, Boolean, null), it returns what + * raw_json_token() would return. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + simdjson_inline simdjson_result current_location() noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. + * + * Calling at_pointer() on non-document instances (e.g., arrays and objects) is not + * standardized (by RFC 6901). We provide some experimental support for JSON pointers + * on non-document instances. Yet it is not the case when calling at_pointer on an array + * or an object instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + +protected: + /** + * Create a value. + */ + simdjson_inline value(const value_iterator &iter) noexcept; + + /** + * Skip this value, allowing iteration to continue. + */ + simdjson_inline void skip() noexcept; + + /** + * Start a value at the current position. + * + * (It should already be started; this is just a self-documentation method.) + */ + static simdjson_inline value start(const value_iterator &iter) noexcept; + + /** + * Resume a value. + */ + static simdjson_inline value resume(const value_iterator &iter) noexcept; + + /** + * Get the object, starting or resuming it as necessary + */ + simdjson_inline simdjson_result start_or_resume_object() noexcept; + + // simdjson_inline void log_value(const char *type) const noexcept; + // simdjson_inline void log_error(const char *message) const noexcept; + + value_iterator iter{}; + + friend class document; + friend class array_iterator; + friend class field; + friend class object; + friend struct simdjson_result; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::value &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result get_array() noexcept; + simdjson_inline simdjson_result get_object() noexcept; + + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() noexcept; + + template simdjson_inline error_code get(T &out) noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator icelake::ondemand::array() noexcept(false); + simdjson_inline operator icelake::ondemand::object() noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator icelake::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * 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). + */ + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + + /** @copydoc simdjson_inline std::string_view value::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + + /** @copydoc simdjson_inline simdjson_result current_location() noexcept */ + simdjson_inline simdjson_result current_location() noexcept; + /** @copydoc simdjson_inline int32_t current_depth() const noexcept */ + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_H +/* end file simdjson/generic/ondemand/value.h for icelake */ +/* including simdjson/generic/ondemand/logger.h for icelake: #include "simdjson/generic/ondemand/logger.h" */ +/* begin file simdjson/generic/ondemand/logger.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +// Logging should be free unless SIMDJSON_VERBOSE_LOGGING is set. Importantly, it is critical +// that the call to the log functions be side-effect free. Thus, for example, you should not +// create temporary std::string instances. +namespace logger { + +enum class log_level : int32_t { + info = 0, + error = 1 +}; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + +// We do not want these functions to be 'really inlined' since real inlining is +// for performance purposes and if you are using the loggers, you do not care about +// performance (or should not). +static inline void log_headers() noexcept; +// If args are provided, title will be treated as format string +template +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; +template +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; +static inline void log_event(const json_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_value(const json_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_start_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; + +static inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail="") noexcept; +static inline void log_error(const json_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +static inline void log_event(const value_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const value_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_error(const value_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +} // namespace logger +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_H +/* end file simdjson/generic/ondemand/logger.h for icelake */ +/* including simdjson/generic/ondemand/token_iterator.h for icelake: #include "simdjson/generic/ondemand/token_iterator.h" */ +/* begin file simdjson/generic/ondemand/token_iterator.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * Iterates through JSON tokens (`{` `}` `[` `]` `,` `:` `""` `123` `true` `false` `null`) + * detected by stage 1. + * + * @private This is not intended for external use. + */ +class token_iterator { +public: + /** + * Create a new invalid token_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline token_iterator() noexcept = default; + simdjson_inline token_iterator(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator &operator=(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator(const token_iterator &other) noexcept = default; + simdjson_inline token_iterator &operator=(const token_iterator &other) noexcept = default; + + /** + * Advance to the next token (returning the current one). + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + /** + * Reports the current offset in bytes from the start of the underlying buffer. + */ + simdjson_inline uint32_t current_offset() const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + + /** + * Return the current index. + */ + simdjson_inline token_position position() const noexcept; + /** + * Reset to a previously saved index. + */ + simdjson_inline void set_position(token_position target_position) noexcept; + + // NOTE: we don't support a full C++ iterator interface, because we expect people to make + // different calls to advance the iterator based on *their own* state. + + simdjson_inline bool operator==(const token_iterator &other) const noexcept; + simdjson_inline bool operator!=(const token_iterator &other) const noexcept; + simdjson_inline bool operator>(const token_iterator &other) const noexcept; + simdjson_inline bool operator>=(const token_iterator &other) const noexcept; + simdjson_inline bool operator<(const token_iterator &other) const noexcept; + simdjson_inline bool operator<=(const token_iterator &other) const noexcept; + +protected: + simdjson_inline token_iterator(const uint8_t *buf, token_position position) noexcept; + + /** + * Get the index of the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_index(int32_t delta=0) const noexcept; + /** + * Get the index of the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline uint32_t peek_index(token_position position) const noexcept; + + const uint8_t *buf{}; + token_position _position{}; + + friend class json_iterator; + friend class value_iterator; + friend class object; + template + 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; + template + 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; +}; + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::token_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H +/* end file simdjson/generic/ondemand/token_iterator.h for icelake */ +/* including simdjson/generic/ondemand/json_iterator.h for icelake: #include "simdjson/generic/ondemand/json_iterator.h" */ +/* begin file simdjson/generic/ondemand/json_iterator.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * Iterates through JSON tokens, keeping track of depth and string buffer. + * + * @private This is not intended for external use. + */ +class json_iterator { +protected: + token_iterator token{}; + ondemand::parser *parser{}; + /** + * Next free location in the string buffer. + * + * Used by raw_json_string::unescape() to have a place to unescape strings to. + */ + uint8_t *_string_buf_loc{}; + /** + * JSON error, if there is one. + * + * INCORRECT_TYPE and NO_SUCH_FIELD are *not* stored here, ever. + * + * PERF NOTE: we *hope* this will be elided into control flow, as it is only used (a) in the first + * iteration of the loop, or (b) for the final iteration after a missing comma is found in ++. If + * this is not elided, we should make sure it's at least not using up a register. Failing that, + * we should store it in document so there's only one of them. + */ + error_code error{SUCCESS}; + /** + * Depth of the current token in the JSON. + * + * - 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. + */ + depth_t _depth{}; + /** + * Beginning of the document indexes. + * Normally we have root == parser->implementation->structural_indexes.get() + * but this may differ, especially in streaming mode (where we have several + * documents); + */ + token_position _root{}; + /** + * Normally, a json_iterator operates over a single document, but in + * some cases, we may have a stream of documents. This attribute is meant + * as meta-data: the json_iterator works the same irrespective of the + * value of this attribute. + */ + bool _streaming{false}; + +public: + simdjson_inline json_iterator() noexcept = default; + simdjson_inline json_iterator(json_iterator &&other) noexcept; + simdjson_inline json_iterator &operator=(json_iterator &&other) noexcept; + simdjson_inline explicit json_iterator(const json_iterator &other) noexcept = default; + simdjson_inline json_iterator &operator=(const json_iterator &other) noexcept = default; + /** + * Skips a JSON value, whether it is a scalar, array or object. + */ + simdjson_warn_unused simdjson_inline error_code skip_child(depth_t parent_depth) noexcept; + + /** + * Tell whether the iterator is still at the start + */ + simdjson_inline bool at_root() const noexcept; + + /** + * Tell whether we should be expected to run in streaming + * mode (iterating over many documents). It is pure metadata + * that does not affect how the iterator works. It is used by + * start_root_array() and start_root_object(). + */ + simdjson_inline bool streaming() const noexcept; + + /** + * Get the root value iterator + */ + simdjson_inline token_position root_position() const noexcept; + /** + * Assert that we are at the document depth (== 1) + */ + simdjson_inline void assert_at_document_depth() const noexcept; + /** + * Assert that we are at the root of the document + */ + simdjson_inline void assert_at_root() const noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is live (has not been moved). + */ + simdjson_inline bool is_alive() const noexcept; + + /** + * Abandon this iterator, setting depth to 0 (as if the document is finished). + */ + simdjson_inline void abandon() noexcept; + + /** + * Advance the current token without modifying depth. + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + + /** + * Returns true if there is a single token in the index (i.e., it is + * a JSON with a scalar value such as a single number). + * + * @return whether there is a single token + */ + simdjson_inline bool is_single_token() const noexcept; + + /** + * Assert that there are at least the given number of tokens left. + * + * Has no effect in release builds. + */ + simdjson_inline void assert_more_tokens(uint32_t required_tokens=1) const noexcept; + /** + * Assert that the given position addresses an actual token (is within bounds). + * + * Has no effect in release builds. + */ + simdjson_inline void assert_valid_position(token_position position) const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + /** + * Get a pointer to the current location in the input buffer. + * + * This is not null-terminated; it is a view into the JSON. + * + * You may be pointing outside of the input buffer: it is not generally + * safe to dereference this pointer. + */ + simdjson_inline const uint8_t *unsafe_pointer() const noexcept; + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token to retrieve. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token to retrieve. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + /** + * Get the JSON text for the last token in the document. + * + * This is not null-terminated; it is a view into the JSON. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek_last() const noexcept; + + /** + * Ascend one level. + * + * Validates that the depth - 1 == parent_depth. + * + * @param parent_depth the expected parent depth. + */ + simdjson_inline void ascend_to(depth_t parent_depth) noexcept; + + /** + * Descend one level. + * + * Validates that the new depth == child_depth. + * + * @param child_depth the expected child depth. + */ + simdjson_inline void descend_to(depth_t child_depth) noexcept; + simdjson_inline void descend_to(depth_t child_depth, int32_t delta) noexcept; + + /** + * Get current depth. + */ + simdjson_inline depth_t depth() const noexcept; + + /** + * Get current (writeable) location in the string buffer. + */ + simdjson_inline uint8_t *&string_buf_loc() noexcept; + + /** + * Report an unrecoverable error, preventing further iteration. + * + * @param error The error to report. Must not be SUCCESS, UNINITIALIZED, INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + /** + * Log error, but don't stop iteration. + * @param error The error to report. Must be INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code optional_error(error_code error, const char *message) noexcept; + + /** + * Take an input in json containing max_len characters and attempt to copy it over to tmpbuf, a buffer with + * N bytes of capacity. It will return false if N is too small (smaller than max_len) of if it is zero. + * The buffer (tmpbuf) is padded with space characters. + */ + simdjson_warn_unused simdjson_inline bool copy_to_buffer(const uint8_t *json, uint32_t max_len, uint8_t *tmpbuf, size_t N) noexcept; + + simdjson_inline token_position position() const noexcept; + /** + * Write the raw_json_string to the string buffer and return a string_view. + * Each raw_json_string should be unescaped once, or else the string buffer might + * overflow. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, bool allow_replacement) noexcept; + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in) noexcept; + + simdjson_inline void reenter_child(token_position position, depth_t child_depth) noexcept; + + simdjson_inline error_code consume_character(char c) noexcept; +#if SIMDJSON_DEVELOPMENT_CHECKS + simdjson_inline token_position start_position(depth_t depth) const noexcept; + simdjson_inline void set_start_position(depth_t depth, token_position position) noexcept; +#endif + + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Updates this json iterator so that it is back at the beginning of the document, + * as if it had just been created. + */ + inline void rewind() noexcept; + /** + * This checks whether the {,},[,] are balanced so that the document + * ends with proper zero depth. This requires scanning the whole document + * and it may be expensive. It is expected that it will be rarely called. + * It does not attempt to match { with } and [ with ]. + */ + inline bool balanced() const noexcept; +protected: + simdjson_inline json_iterator(const uint8_t *buf, ondemand::parser *parser) noexcept; + /// The last token before the end + simdjson_inline token_position last_position() const noexcept; + /// The token *at* the end. This points at gibberish and should only be used for comparison. + simdjson_inline token_position end_position() const noexcept; + /// The end of the buffer. + simdjson_inline token_position end() const noexcept; + + friend class document; + friend class document_stream; + friend class object; + friend class array; + friend class value; + friend class raw_json_string; + friend class parser; + friend class value_iterator; + template + 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; + template + 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; +}; // json_iterator + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::json_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H +/* end file simdjson/generic/ondemand/json_iterator.h for icelake */ +/* including simdjson/generic/ondemand/json_type.h for icelake: #include "simdjson/generic/ondemand/json_type.h" */ +/* begin file simdjson/generic/ondemand/json_type.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * The type of a JSON value. + */ +enum class json_type { + // Start at 1 to catch uninitialized / default values more easily + array=1, ///< A JSON array ( [ 1, 2, 3 ... ] ) + 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" ...) + boolean, ///< A JSON boolean (true or false) + null ///< A JSON null (null) +}; + +/** + * A type representing a JSON number. + * The design of the struct is deliberately straight-forward. All + * functions return standard values with no error check. + */ +struct number { + + /** + * 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 + * }; + */ + simdjson_inline ondemand::number_type get_number_type() const noexcept; + /** + * return true if the automatically determined type of + * the number is number_type::unsigned_integer. + */ + simdjson_inline bool is_uint64() const noexcept; + /** + * return the value as a uint64_t, only valid if is_uint64() is true. + */ + simdjson_inline uint64_t get_uint64() const noexcept; + simdjson_inline operator uint64_t() const noexcept; + + /** + * return true if the automatically determined type of + * the number is number_type::signed_integer. + */ + simdjson_inline bool is_int64() const noexcept; + /** + * return the value as a int64_t, only valid if is_int64() is true. + */ + simdjson_inline int64_t get_int64() const noexcept; + simdjson_inline operator int64_t() const noexcept; + + + /** + * return true if the automatically determined type of + * the number is number_type::floating_point_number. + */ + simdjson_inline bool is_double() const noexcept; + /** + * return the value as a double, only valid if is_double() is true. + */ + simdjson_inline double get_double() const noexcept; + simdjson_inline operator double() const noexcept; + + /** + * Convert the number to a double. Though it always succeed, the conversion + * may be lossy if the number cannot be represented exactly. + */ + simdjson_inline double as_double() const noexcept; + + +protected: + /** + * The next block of declaration is designed so that we can call the number parsing + * functions on a number type. They are protected and should never be used outside + * of the core simdjson library. + */ + friend class value_iterator; + template + friend error_code numberparsing::slow_float_parsing(simdjson_unused const uint8_t * src, W writer); + template + 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); + template + friend error_code numberparsing::parse_number(const uint8_t *const src, W &writer); + /** Store a signed 64-bit value to the number. */ + simdjson_inline void append_s64(int64_t value) noexcept; + /** Store an unsigned 64-bit value to the number. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + /** Store a double value to the number. */ + simdjson_inline void append_double(double value) noexcept; + /** Specifies that the value is a double, but leave it undefined. */ + simdjson_inline void skip_double() noexcept; + /** + * End of friend declarations. + */ + + /** + * Our attributes are a union type (size = 64 bits) + * followed by a type indicator. + */ + union { + double floating_point_number; + int64_t signed_integer; + uint64_t unsigned_integer; + } payload{0}; + number_type type{number_type::signed_integer}; +}; + +/** + * Write the JSON type to the output stream + * + * @param out The output stream. + * @param type The json_type. + */ +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept; + +#if SIMDJSON_EXCEPTIONS +/** + * Send JSON type to an output stream. + * + * @param out The output stream. + * @param type The json_type. + * @throw simdjson_error if the result being printed has an error. If there is an error with the + * underlying output stream, that error will be propagated (simdjson_error will not be + * thrown). + */ +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false); +#endif + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::json_type &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H +/* end file simdjson/generic/ondemand/json_type.h for icelake */ +/* including simdjson/generic/ondemand/raw_json_string.h for icelake: #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * A string escaped per JSON rules, terminated with quote ("). They are used to represent + * unescaped keys inside JSON documents. + * + * (In other words, a pointer to the beginning of a string, just after the start quote, inside a + * JSON file.) + * + * This class is deliberately simplistic and has little functionality. You can + * compare a raw_json_string instance with an unescaped C string, but + * that is nearly all you can do. + * + * 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(). + * + */ +class raw_json_string { +public: + /** + * Create a new invalid raw_json_string. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline raw_json_string() noexcept = default; + + /** + * Create a new invalid raw_json_string pointed at the given location in the JSON. + * + * 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. + */ + simdjson_inline raw_json_string(const uint8_t * _buf) noexcept; + /** + * 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. + */ + simdjson_inline const char * raw() const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done) on target.size() characters, + * and if the raw_json_string instance has a quote character at byte index target.size(). + * We never read more than length + 1 bytes in the raw_json_string instance. + * If length is smaller than target.size(), this will return false. + * + * 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. + */ + 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-byte equal (no escaping is done). + * The std::string_view instance should not contain unescaped quote characters: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * Performance: the comparison is done byte-by-byte which might be inefficient for + * long strings. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + * The provided C string should not contain an unescaped quote character: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(const char* target) const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(const char* target) const noexcept; + + /** + * 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!). + */ + static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept; + static simdjson_inline bool is_free_from_unescaped_quote(const char* target) noexcept; + +private: + + + /** + * This will set the inner pointer to zero, effectively making + * this instance unusable. + */ + simdjson_inline void consume() noexcept { buf = nullptr; } + + /** + * Checks whether the inner pointer is non-null and thus usable. + */ + simdjson_inline simdjson_warn_unused bool alive() const noexcept { return buf != nullptr; } + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result will be a valid UTF-8. + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + * @param allow_replacement Whether we allow replacement of invalid surrogate pairs. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape(json_iterator &iter, bool allow_replacement) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result may not be a valid UTF-8. https://simonsapin.github.io/wtf-8/ + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(json_iterator &iter) const noexcept; + const uint8_t * buf{}; + friend class object; + friend class field; + friend class parser; + friend struct simdjson_result; +}; + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &, const raw_json_string &) noexcept; + +/** + * 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. + */ +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept; +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept; + + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::raw_json_string &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private + + simdjson_inline simdjson_result raw() const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape(icelake::ondemand::json_iterator &iter, bool allow_replacement) const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(icelake::ondemand::json_iterator &iter) const noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H +/* end file simdjson/generic/ondemand/raw_json_string.h for icelake */ +/* including simdjson/generic/ondemand/parser.h for icelake: #include "simdjson/generic/ondemand/parser.h" */ +/* begin file simdjson/generic/ondemand/parser.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * The default batch size for document_stream instances for this On Demand kernel. + * Note that different On Demand kernel may use a different DEFAULT_BATCH_SIZE value + * in the future. + */ +static constexpr size_t DEFAULT_BATCH_SIZE = 1000000; +/** + * Some adversary might try to set the batch size to 0 or 1, which might cause problems. + * We set a minimum of 32B since anything else is highly likely to be an error. In practice, + * most users will want a much larger batch size. + * + * All non-negative MINIMAL_BATCH_SIZE values should be 'safe' except that, obviously, no JSON + * document can ever span 0 or 1 byte and that very large values would create memory allocation issues. + */ +static constexpr size_t MINIMAL_BATCH_SIZE = 32; + +/** + * A JSON fragment iterator. + * + * This holds the actual iterator as well as the buffer for writing strings. + */ +class parser { +public: + /** + * Create a JSON parser. + * + * The new parser will have zero capacity. + */ + inline explicit parser(size_t max_capacity = SIMDJSON_MAXSIZE_BYTES) noexcept; + + inline parser(parser &&other) noexcept = default; + simdjson_inline parser(const parser &other) = delete; + simdjson_inline parser &operator=(const parser &other) = delete; + simdjson_inline parser &operator=(parser &&other) noexcept = default; + + /** Deallocate the JSON parser. */ + inline ~parser() noexcept = default; + + /** + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * document doc = parser.iterate(json); + * + * It is expected that the content is a valid UTF-8 file, containing a valid JSON document. + * Otherwise the iterate method may return an error. In particular, the whole input should be + * valid: we do not attempt to tolerate incorrect content either before or after a JSON + * document. If there is a UTF-8 BOM, the parser skips it. + * + * ### IMPORTANT: Validate what you use + * + * Calling iterate on an invalid JSON document may not immediately trigger an error. The call to + * iterate does not parse and validate the whole document. + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * @param len The length of the JSON. + * @param capacity The number of bytes allocated in the JSON (must be at least len+SIMDJSON_PADDING). + * + * @return The document, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate(padded_string_view json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const char *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const uint8_t *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string_view json, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(padded_string &&json) & noexcept = delete; + + /** + * @private + * + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * json_iterator doc = parser.iterate(json); + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * The ondemand::document instance holds the iterator. The document must remain in scope + * while you are accessing instances of ondemand::value, ondemand::object, ondemand::array. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * + * @return The iterator, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate_raw(padded_string_view json) & noexcept; + + + /** + * Parse a buffer containing many JSON documents. + * + * auto json = R"({ "foo": 1 } { "foo": 2 } { "foo": 3 } )"_padded; + * ondemand::parser parser; + * ondemand::document_stream docs = parser.iterate_many(json); + * for (auto & doc : docs) { + * std::cout << doc["foo"] << std::endl; + * } + * // Prints 1 2 3 + * + * No copy of the input buffer is made. + * + * The function is lazy: it may be that no more than one JSON document at a time is parsed. + * + * The caller is responsabile to ensure that the input string data remains unchanged and is + * not deleted during the loop. + * + * ### Format + * + * The buffer must contain a series of one or more JSON documents, concatenated into a single + * buffer, separated by ASCII whitespace. It effectively parses until it has a fully valid document, + * then starts parsing the next document at that point. (It does this with more parallelism and + * lookahead than you might think, though.) + * + * documents that consist of an object or array may omit the whitespace between them, concatenating + * with no separator. Documents that consist of a single primitive (i.e. documents that are not + * arrays or objects) MUST be separated with ASCII whitespace. + * + * The characters inside a JSON document, and between JSON documents, must be valid Unicode (UTF-8). + * If there is a UTF-8 BOM, the parser skips it. + * + * The documents must not exceed batch_size bytes (by default 1MB) or they will fail to parse. + * Setting batch_size to excessively large or excessively small values may impact negatively the + * performance. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * ### Threads + * + * When compiled with SIMDJSON_THREADS_ENABLED, this method will use a single thread under the + * hood to do some lookahead. + * + * ### Parser Capacity + * + * If the parser's current capacity is less than batch_size, it will allocate enough capacity + * to handle it (up to max_capacity). + * + * @param buf The concatenated JSON to parse. + * @param len The length of the concatenated JSON. + * @param batch_size The batch size to use. MUST be larger than the largest document. The sweet + * spot is cache-related: small enough to fit in cache, yet big enough to + * parse as many documents as possible in one tight loop. + * Defaults to 10MB, which has been a reasonable sweet spot in our tests. + * @param allow_comma_separated (defaults on false) This allows a mode where the documents are + * separated by commas instead of whitespace. It comes with a performance + * penalty because the entire document is indexed at once (and the document must be + * less than 4 GB), and there is no multithreading. In this mode, the batch_size parameter + * is effectively ignored, as it is set to at least the document size. + * @return The stream, or an error. An empty input will yield 0 documents rather than an EMPTY error. Errors: + * - MEMALLOC if the parser does not have enough capacity and memory allocation fails + * - CAPACITY if the parser does not have enough capacity and batch_size > max_capacity. + * - other json errors if parsing fails. You should not rely on these errors to always the same for the + * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). + */ + inline simdjson_result iterate_many(const uint8_t *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const char *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const std::string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const std::string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const padded_string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const padded_string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + + /** @private We do not want to allow implicit conversion from C string to std::string. */ + simdjson_result iterate_many(const char *buf, size_t batch_size = DEFAULT_BATCH_SIZE) noexcept = delete; + + /** The capacity of this parser (the largest document it can process). */ + simdjson_inline size_t capacity() const noexcept; + /** The maximum capacity of this parser (the largest document it is allowed to process). */ + simdjson_inline size_t max_capacity() const noexcept; + simdjson_inline void set_max_capacity(size_t max_capacity) noexcept; + /** + * 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. + */ + simdjson_inline size_t max_depth() const noexcept; + + /** + * Ensure this parser has enough memory to process JSON documents up to `capacity` bytes in length + * and `max_depth` depth. + * + * The max_depth 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. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. Defaults to DEFAULT_MAX_DEPTH. + * @return The error, if there is one. + */ + simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept; + + #ifdef SIMDJSON_THREADS_ENABLED + /** + * The parser instance can use threads when they are available to speed up some + * operations. It is enabled by default. Changing this attribute will change the + * behavior of the parser for future operations. + */ + bool threaded{true}; + #endif + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result must be valid UTF-8. + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @param allow_replacement Whether we allow a replacement if the input string contains unmatched surrogate pairs. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement = false) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result may not be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept; + +private: + /** @private [for benchmarking access] The implementation to use */ + std::unique_ptr implementation{}; + size_t _capacity{0}; + size_t _max_capacity; + size_t _max_depth{DEFAULT_MAX_DEPTH}; + std::unique_ptr string_buf{}; +#if SIMDJSON_DEVELOPMENT_CHECKS + std::unique_ptr start_positions{}; +#endif + + friend class json_iterator; + friend class document_stream; +}; + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::parser &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_H +/* end file simdjson/generic/ondemand/parser.h for icelake */ + +// All other declarations +/* including simdjson/generic/ondemand/array.h for icelake: #include "simdjson/generic/ondemand/array.h" */ +/* begin file simdjson/generic/ondemand/array.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * A forward-only JSON array. + */ +class array { +public: + /** + * Create a new invalid array. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline array() noexcept = default; + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result is_empty() & noexcept; + /** + * Reset the iterator so that we are pointing back at the + * beginning of the array. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"([ { "foo": { "a": [ 10, 20, 30 ] }} ])"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/0/foo/a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an array + * instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * Consumes the array and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Get the value at the given index. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; +protected: + /** + * Go to the end of the array, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + + /** + * Begin array iteration. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + */ + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + /** + * Begin array iteration from the root. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + * @error TAPE_ERROR if there is no closing ] at the end of the document. + */ + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + /** + * Begin array iteration. + * + * This version of the method should be called after the initial [ has been verified, and is + * intended for use by switch statements that check the type of a value. + * + * @param iter The iterator. Must be after the initial [. Will be *moved* into the resulting array. + */ + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + + /** + * Create an array at the given Internal array creation. Call array::start() or array::started() instead of this. + * + * @param iter The iterator. Must either be at the start of the first element with iter.is_alive() + * == true, or past the [] with is_alive() == false if the array is empty. Will be *moved* + * into the resulting array. + */ + simdjson_inline array(const value_iterator &iter) noexcept; + + /** + * Iterator marking current position. + * + * iter.is_alive() == false indicates iteration is complete. + */ + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; + friend struct simdjson_result; + friend class array_iterator; +}; + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::array &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + inline simdjson_result count_elements() & noexcept; + inline simdjson_result is_empty() & noexcept; + inline simdjson_result reset() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_H +/* end file simdjson/generic/ondemand/array.h for icelake */ +/* including simdjson/generic/ondemand/array_iterator.h for icelake: #include "simdjson/generic/ondemand/array_iterator.h" */ +/* begin file simdjson/generic/ondemand/array_iterator.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * A forward-only JSON array. + * + * This is an input_iterator, meaning: + * - It is forward-only + * - * must be called exactly once per element. + * - ++ must be called exactly once in between each * (*, ++, *, ++, * ...) + */ +class array_iterator { +public: + /** Create a new, invalid array iterator. */ + simdjson_inline array_iterator() noexcept = default; + + // + // Iterator interface + // + + /** + * Get the current element. + * + * Part of the std::iterator interface. + */ + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + /** + * Check if we are at the end of the JSON. + * + * Part of the std::iterator interface. + * + * @return true if there are no more elements in the JSON array. + */ + simdjson_inline bool operator==(const array_iterator &) const noexcept; + /** + * Check if there are more elements in the JSON array. + * + * Part of the std::iterator interface. + * + * @return true if there are more elements in the JSON array. + */ + simdjson_inline bool operator!=(const array_iterator &) const noexcept; + /** + * Move to the next element. + * + * Part of the std::iterator interface. + */ + simdjson_inline array_iterator &operator++() noexcept; + +private: + value_iterator iter{}; + + simdjson_inline array_iterator(const value_iterator &iter) noexcept; + + friend class array; + friend class value; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::array_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H +/* end file simdjson/generic/ondemand/array_iterator.h for icelake */ +/* including simdjson/generic/ondemand/document.h for icelake: #include "simdjson/generic/ondemand/document.h" */ +/* begin file simdjson/generic/ondemand/document.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * A JSON document. It holds a json_iterator instance. + * + * Used by tokens to get text, and string buffer location. + * + * You must keep the document around during iteration. + */ +class document { +public: + /** + * Create a new invalid document. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline document() noexcept = default; + simdjson_inline document(const document &other) noexcept = delete; // pass your documents by reference, not by copy + simdjson_inline document(document &&other) noexcept = default; + simdjson_inline document &operator=(const document &other) noexcept = delete; + simdjson_inline document &operator=(document &&other) noexcept = default; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() & noexcept; + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() & noexcept; + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + /** + * Cast this JSON value (inside string) to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: Calling get_string() twice on the same document is an error. + * + * @param Whether to allow a replacement character for unmatched surrogate pairs. + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + /** + * Cast this JSON value to a string. + * + * The string is not guaranteed to be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * + * Important: Calling get_wobbly_string() twice on the same document is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is set to 1 (which is the case when building in Debug mode + * by default), and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value if a JSON array or object cannot be found. + * @returns SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result get_value() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() & noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + /** @overload template simdjson_result get() & noexcept */ + template simdjson_inline simdjson_result get() && noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool, value + * + * Be mindful that the document instance must remain in scope while you are accessing object, array and value instances. + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) & noexcept; + /** @overload template error_code get(T &out) & noexcept */ + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() & noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() & noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * 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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is defined, and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value value if a JSON array or object cannot be found. + * @exception SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline operator value() noexcept(false); +#endif + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * To check that an object is empty, it is more performant to use + * the is_empty() method. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) & noexcept; + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to + * a key a single time. Doing object["mykey"].to_string()and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the document is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the document is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the document is an integer number. 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. If this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view may be the padded buffer. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + /** + * 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). + */ + inline void rewind() noexcept; + /** + * Returns debugging information. + */ + inline std::string to_debug_string() noexcept; + /** + * Some unrecoverable error conditions may render the document instance unusable. + * The is_alive() method returns true when the document is still suitable. + */ + inline bool is_alive() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Returns true if this document has been fully parsed. + * If you have consumed the whole document and at_end() returns + * false, then there may be trailing content. + */ + inline bool at_end() const noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() automatically calls rewind between each call. Thus + * all values, objects and arrays that you have created so far (including unescaped strings) + * are invalidated. After calling at_pointer, you need to consume the result: string values + * should be stored in your own variables, arrays should be decoded and stored in your own array-like + * structures and so forth. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + * - SCALAR_DOCUMENT_AS_VALUE if the json_pointer is empty and the document is not a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; +protected: + /** + * Consumes the document. + */ + simdjson_inline error_code consume() noexcept; + + simdjson_inline document(ondemand::json_iterator &&iter) noexcept; + simdjson_inline const uint8_t *text(uint32_t idx) const noexcept; + + simdjson_inline value_iterator resume_value_iterator() noexcept; + simdjson_inline value_iterator get_root_value_iterator() noexcept; + simdjson_inline simdjson_result start_or_resume_object() noexcept; + static simdjson_inline document start(ondemand::json_iterator &&iter) noexcept; + + // + // Fields + // + json_iterator iter{}; ///< Current position in the document + static constexpr depth_t DOCUMENT_DEPTH = 0; ///< document depth is always 0 + + friend class array_iterator; + friend class value; + friend class ondemand::parser; + friend class object; + friend class array; + friend class field; + friend class token; + friend class document_stream; + friend class document_reference; +}; + + +/** + * A document_reference is a thin wrapper around a document reference instance. + */ +class document_reference { +public: + simdjson_inline document_reference() noexcept; + simdjson_inline document_reference(document &d) noexcept; + simdjson_inline document_reference(const document_reference &other) noexcept = default; + simdjson_inline document_reference& operator=(const document_reference &other) noexcept = default; + simdjson_inline void rewind() noexcept; + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + + simdjson_inline simdjson_result is_null() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + simdjson_inline operator document&() const noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator array() & noexcept(false); + simdjson_inline operator object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +private: + document *doc{nullptr}; +}; +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::document &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() & noexcept; + template simdjson_inline simdjson_result get() && noexcept; + + template simdjson_inline error_code get(T &out) & noexcept; + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator icelake::ondemand::array() & noexcept(false); + simdjson_inline operator icelake::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator icelake::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator icelake::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool at_end() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + + + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::document_reference value, error_code error) noexcept; + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator icelake::ondemand::array() & noexcept(false); + simdjson_inline operator icelake::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator icelake::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator icelake::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document_reference::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H +/* end file simdjson/generic/ondemand/document.h for icelake */ +/* including simdjson/generic/ondemand/document_stream.h for icelake: #include "simdjson/generic/ondemand/document_stream.h" */ +/* begin file simdjson/generic/ondemand/document_stream.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#ifdef SIMDJSON_THREADS_ENABLED +#include +#include +#include +#endif + +namespace simdjson { +namespace icelake { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED +/** @private Custom worker class **/ +struct stage1_worker { + stage1_worker() noexcept = default; + stage1_worker(const stage1_worker&) = delete; + stage1_worker(stage1_worker&&) = delete; + stage1_worker operator=(const stage1_worker&) = delete; + ~stage1_worker(); + /** + * We only start the thread when it is needed, not at object construction, this may throw. + * You should only call this once. + **/ + void start_thread(); + /** + * Start a stage 1 job. You should first call 'run', then 'finish'. + * You must call start_thread once before. + */ + void run(document_stream * ds, parser * stage1, size_t next_batch_start); + /** Wait for the run to finish (blocking). You should first call 'run', then 'finish'. **/ + void finish(); + +private: + + /** + * Normally, we would never stop the thread. But we do in the destructor. + * This function is only safe assuming that you are not waiting for results. You + * should have called run, then finish, and be done. + **/ + void stop_thread(); + + std::thread thread{}; + /** These three variables define the work done by the thread. **/ + ondemand::parser * stage1_thread_parser{}; + size_t _next_batch_start{}; + document_stream * owner{}; + /** + * We have two state variables. This could be streamlined to one variable in the future but + * we use two for clarity. + */ + bool has_work{false}; + bool can_work{true}; + + /** + * We lock using a mutex. + */ + std::mutex locking_mutex{}; + std::condition_variable cond_var{}; + + friend class document_stream; +}; +#endif // SIMDJSON_THREADS_ENABLED + +/** + * A forward-only stream of documents. + * + * Produced by parser::iterate_many. + * + */ +class document_stream { +public: + /** + * Construct an uninitialized document_stream. + * + * ```c++ + * document_stream docs; + * auto error = parser.iterate_many(json).get(docs); + * ``` + */ + simdjson_inline document_stream() noexcept; + /** Move one document_stream to another. */ + simdjson_inline document_stream(document_stream &&other) noexcept = default; + /** Move one document_stream to another. */ + simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default; + + simdjson_inline ~document_stream() noexcept; + + /** + * Returns the input size in bytes. + */ + inline size_t size_in_bytes() const noexcept; + + /** + * After iterating through the stream, this method + * returns the number of bytes that were not parsed at the end + * of the stream. If truncated_bytes() differs from zero, + * then the input was truncated maybe because incomplete JSON + * documents were found at the end of the stream. You + * may need to process the bytes in the interval [size_in_bytes()-truncated_bytes(), size_in_bytes()). + * + * You should only call 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(); + * + */ + inline size_t truncated_bytes() const noexcept; + + class iterator { + public: + using value_type = simdjson_result; + using reference = value_type; + + using difference_type = std::ptrdiff_t; + + using iterator_category = std::input_iterator_tag; + + /** + * Default constructor. + */ + simdjson_inline iterator() noexcept; + /** + * Get the current document (or error). + */ + simdjson_inline simdjson_result operator*() noexcept; + /** + * Advance to the next document (prefix). + */ + inline iterator& operator++() noexcept; + /** + * Check if we're at the end yet. + * @param other the end iterator to compare to. + */ + simdjson_inline bool operator!=(const iterator &other) const noexcept; + /** + * @private + * + * Gives the current index in the input document in bytes. + * + * document_stream stream = parser.parse_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * auto doc = *i; + * size_t index = i.current_index(); + * } + * + * This function (current_index()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + */ + simdjson_inline size_t current_index() const noexcept; + + /** + * @private + * + * Gives a view of the current document at the current position. + * + * document_stream stream = parser.iterate_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * std::string_view v = i.source(); + * } + * + * The returned string_view instance is simply a map to the (unparsed) + * source string: it may thus include white-space characters and all manner + * of padding. + * + * This function (source()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + * + */ + simdjson_inline std::string_view source() const noexcept; + + /** + * Returns error of the stream (if any). + */ + inline error_code error() const noexcept; + + private: + simdjson_inline iterator(document_stream *s, bool finished) noexcept; + /** The document_stream we're iterating through. */ + document_stream* stream; + /** Whether we're finished or not. */ + bool finished; + + friend class document; + friend class document_stream; + friend class json_iterator; + }; + + /** + * Start iterating the documents in the stream. + */ + simdjson_inline iterator begin() noexcept; + /** + * The end of the stream, for iterator comparison purposes. + */ + simdjson_inline iterator end() noexcept; + +private: + + document_stream &operator=(const document_stream &) = delete; // Disallow copying + document_stream(const document_stream &other) = delete; // Disallow copying + + /** + * Construct a document_stream. Does not allocate or parse anything until the iterator is + * used. + * + * @param parser is a reference to the parser instance used to generate this document_stream + * @param buf is the raw byte buffer we need to process + * @param len is the length of the raw byte buffer in bytes + * @param batch_size is the size of the windows (must be strictly greater or equal to the largest JSON document) + */ + simdjson_inline document_stream( + ondemand::parser &parser, + const uint8_t *buf, + size_t len, + size_t batch_size, + bool allow_comma_separated + ) noexcept; + + /** + * Parse the first document in the buffer. Used by begin(), to handle allocation and + * initialization. + */ + inline void start() noexcept; + + /** + * Parse the next document found in the buffer previously given to document_stream. + * + * The content should be a valid JSON document encoded as UTF-8. If there is a + * UTF-8 BOM, the parser skips it. + * + * You do NOT need to pre-allocate a parser. This function takes care of + * pre-allocating a capacity defined by the batch_size defined when creating the + * document_stream object. + * + * The function returns simdjson::EMPTY if there is no more data to be parsed. + * + * The function returns simdjson::SUCCESS (as integer = 0) in case of success + * and indicates that the buffer has successfully been parsed to the end. + * Every document it contained has been parsed without error. + * + * The function returns an error code from simdjson/simdjson.h in case of failure + * such as simdjson::CAPACITY, simdjson::MEMALLOC, simdjson::DEPTH_ERROR and so forth; + * the simdjson::error_message function converts these error codes into a string). + * + * You can also check validity by calling parser.is_valid(). The same parser can + * and should be reused for the other documents in the buffer. + */ + inline void next() noexcept; + + /** Move the json_iterator of the document to the location of the next document in the stream. */ + inline void next_document() noexcept; + + /** Get the next document index. */ + inline size_t next_batch_start() const noexcept; + + /** Pass the next batch through stage 1 with the given parser. */ + inline error_code run_stage1(ondemand::parser &p, size_t batch_start) noexcept; + + // Fields + ondemand::parser *parser; + const uint8_t *buf; + size_t len; + size_t batch_size; + bool allow_comma_separated; + /** + * We are going to use just one document instance. The document owns + * the json_iterator. It implies that we only ever pass a reference + * to the document to the users. + */ + document doc{}; + /** The error (or lack thereof) from the current document. */ + error_code error; + size_t batch_start{0}; + size_t doc_index{}; + + #ifdef SIMDJSON_THREADS_ENABLED + /** Indicates whether we use threads. Note that this needs to be a constant during the execution of the parsing. */ + bool use_thread; + + inline void load_from_stage1_thread() noexcept; + + /** Start a thread to run stage 1 on the next batch. */ + inline void start_stage1_thread() noexcept; + + /** Wait for the stage 1 thread to finish and capture the results. */ + inline void finish_stage1_thread() noexcept; + + /** The error returned from the stage 1 thread. */ + error_code stage1_thread_error{UNINITIALIZED}; + /** The thread used to run stage 1 against the next batch in the background. */ + std::unique_ptr worker{new(std::nothrow) stage1_worker()}; + /** + * The parser used to run stage 1 in the background. Will be swapped + * with the regular parser when finished. + */ + ondemand::parser stage1_thread_parser{}; + + friend struct stage1_worker; + #endif // SIMDJSON_THREADS_ENABLED + + friend class parser; + friend class document; + friend class json_iterator; + friend struct simdjson_result; + friend struct internal::simdjson_result_base; +}; // document_stream + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::document_stream &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H +/* end file simdjson/generic/ondemand/document_stream.h for icelake */ +/* including simdjson/generic/ondemand/field.h for icelake: #include "simdjson/generic/ondemand/field.h" */ +/* begin file simdjson/generic/ondemand/field.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * A JSON field (key/value pair) in an object. + * + * Returned from object iteration. + * + * Extends from std::pair so you can use C++ algorithms that rely on pairs. + */ +class field : public std::pair { +public: + /** + * Create a new invalid field. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline field() noexcept; + + /** + * Get the key as a string_view (for higher speed, consider raw_key). + * We deliberately use a more cumbersome name (unescaped_key) to force users + * to think twice about using it. + * + * This consumes the key: once you have called unescaped_key(), you cannot + * call it again nor can you call key(). + */ + simdjson_inline simdjson_warn_unused simdjson_result unescaped_key(bool allow_replacement) noexcept; + /** + * Get the key as a raw_json_string. Can be used for direct comparison with + * an unescaped C string: e.g., key() == "test". + */ + simdjson_inline raw_json_string key() const noexcept; + /** + * Get the field value. + */ + simdjson_inline ondemand::value &value() & noexcept; + /** + * @overload ondemand::value &ondemand::value() & noexcept + */ + simdjson_inline ondemand::value value() && noexcept; + +protected: + simdjson_inline field(raw_json_string key, ondemand::value &&value) noexcept; + static simdjson_inline simdjson_result start(value_iterator &parent_iter) noexcept; + static simdjson_inline simdjson_result start(const value_iterator &parent_iter, raw_json_string key) noexcept; + friend struct simdjson_result; + friend class object_iterator; +}; + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::field &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result unescaped_key(bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result key() noexcept; + simdjson_inline simdjson_result value() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_H +/* end file simdjson/generic/ondemand/field.h for icelake */ +/* including simdjson/generic/ondemand/object.h for icelake: #include "simdjson/generic/ondemand/object.h" */ +/* begin file simdjson/generic/ondemand/object.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +/** + * A forward-only JSON object field iterator. + */ +class object { +public: + /** + * Create a new invalid object. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a + * key a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an object + * instance: there is no rewind and no invalidation. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + + /** + * Reset the iterator so that we are pointing back at the + * beginning of the object. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * 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. + */ + inline simdjson_result is_empty() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; + +protected: + /** + * Go to the end of the object, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + static simdjson_inline object resume(const value_iterator &iter) noexcept; + simdjson_inline object(const value_iterator &iter) noexcept; + + simdjson_warn_unused simdjson_inline error_code find_field_raw(const std::string_view key) noexcept; + + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::object &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + inline simdjson_result reset() noexcept; + inline simdjson_result is_empty() noexcept; + inline simdjson_result count_fields() & noexcept; + inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_H +/* end file simdjson/generic/ondemand/object.h for icelake */ +/* including simdjson/generic/ondemand/object_iterator.h for icelake: #include "simdjson/generic/ondemand/object_iterator.h" */ +/* begin file simdjson/generic/ondemand/object_iterator.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +class object_iterator { +public: + /** + * Create a new invalid object_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object_iterator() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline simdjson_result operator*() noexcept; + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const object_iterator &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const object_iterator &) const noexcept; + // Checks for ']' and ',' + simdjson_inline object_iterator &operator++() noexcept; + +private: + /** + * The underlying JSON iterator. + * + * PERF NOTE: expected to be elided in favor of the parent document: this is set when the object + * is first used, and never changes afterwards. + */ + value_iterator iter{}; + + simdjson_inline object_iterator(const value_iterator &iter) noexcept; + friend struct simdjson_result; + friend class object; +}; + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public icelake::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(icelake::ondemand::object_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + // Checks for ']' and ',' + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H +/* end file simdjson/generic/ondemand/object_iterator.h for icelake */ +/* including simdjson/generic/ondemand/serialization.h for icelake: #include "simdjson/generic/ondemand/serialization.h" */ +/* begin file simdjson/generic/ondemand/serialization.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * 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. + */ +inline simdjson_result to_json_string(icelake::ondemand::document& x) noexcept; +/** + * Create a string-view instance out of a value instance. 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. + */ +inline simdjson_result to_json_string(icelake::ondemand::value& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(icelake::ondemand::object& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(icelake::ondemand::array& x) noexcept; +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +} // namespace simdjson + +/** + * We want to support argument-dependent lookup (ADL). + * Hence we should define operator<< in the namespace + * where the argument (here value, object, etc.) resides. + * Credit: @madhur4127 + * See https://github.com/simdjson/simdjson/issues/1768 + */ +namespace simdjson { namespace icelake { namespace ondemand { + +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The element. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::value x); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::array value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::document& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::document_reference& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The object. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::object value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +}}} // namespace simdjson::icelake::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H +/* end file simdjson/generic/ondemand/serialization.h for icelake */ + +// Inline definitions +/* including simdjson/generic/ondemand/array-inl.h for icelake: #include "simdjson/generic/ondemand/array-inl.h" */ +/* begin file simdjson/generic/ondemand/array-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter->depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the array is first found and the iterator is just past the `{`. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the `,` before the next value (or `]`). In this state, +// depth == iter->depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter->depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter->depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the array iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet element may be missing or not be an +// array--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter->depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between elements, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter->depth == depth, and at_start == false. +// +// ## Terminal State +// +// The terminal state has iter->depth < depth. at_start is always false. +// +// - Finished: When we have reached a `]` or have reported an error, we are finished. We signal this +// by decrementing depth. In this state, iter->depth < depth, at_start == false, and +// error == SUCCESS. +// + +simdjson_inline array::array(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result array::start(value_iterator &iter) noexcept { + // We don't need to know if the array is empty to start iteration, but we do want to know if there + // is an error--thus `simdjson_unused`. + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::start_root(value_iterator &iter) noexcept { + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_root_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::started(value_iterator &iter) noexcept { + bool has_value; + SIMDJSON_TRY(iter.started_array().get(has_value)); + return array(iter); +} + +simdjson_inline simdjson_result array::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return array_iterator(iter); +} +simdjson_inline simdjson_result array::end() noexcept { + return array_iterator(iter); +} +simdjson_inline error_code array::consume() noexcept { + auto error = iter.json_iter().skip_child(iter.depth()-1); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result array::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter._json_iter->unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline simdjson_result array::count_elements() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the array after counting the number of elements. + iter.reset_array(); + return count; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline simdjson_result array::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_array().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +inline simdjson_result array::reset() & noexcept { + return iter.reset_array(); +} + +inline simdjson_result array::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + // - means "the append position" or "the element after the end of the array" + // We don't support this, because we're returning a real element, not a position. + if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; } + + // Read the array index + size_t array_index = 0; + size_t i; + for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) { + uint8_t digit = uint8_t(json_pointer[i] - '0'); + // Check for non-digit in array index. If it's there, we're trying to get a field in an object + if (digit > 9) { return INCORRECT_TYPE; } + array_index = array_index*10 + digit; + } + + // 0 followed by other digits is invalid + if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0" + + // Empty string is invalid; so is a "/" with no digits before it + if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index" + // Get the child + auto child = at(array_index); + // If there is an error, it ends here + if(child.error()) { + return child; + } + + // If there is a /, we're not done yet, call recursively. + if (i < json_pointer.length()) { + child = child.at_pointer(json_pointer.substr(i)); + } + return child; +} + +simdjson_inline simdjson_result array::at(size_t index) noexcept { + size_t i = 0; + for (auto value : *this) { + if (i == index) { return value; } + i++; + } + return INDEX_OUT_OF_BOUNDS; +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + icelake::ondemand::array &&value +) noexcept + : implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept + : implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::is_empty() & noexcept { + if (error()) { return error(); } + return first.is_empty(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H +/* end file simdjson/generic/ondemand/array-inl.h for icelake */ +/* including simdjson/generic/ondemand/array_iterator-inl.h for icelake: #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/array_iterator-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +simdjson_inline array_iterator::array_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result array_iterator::operator*() noexcept { + if (iter.error()) { iter.abandon(); return iter.error(); } + return value(iter.child()); +} +simdjson_inline bool array_iterator::operator==(const array_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool array_iterator::operator!=(const array_iterator &) const noexcept { + return iter.is_open(); +} +simdjson_inline array_iterator &array_iterator::operator++() noexcept { + error_code error; + // PERF NOTE this is a safety rail ... users should exit loops as soon as they receive an error, so we'll never get here. + // However, it does not seem to make a perf difference, so we add it out of an abundance of caution. + if (( error = iter.error() )) { return *this; } + if (( error = iter.skip_child() )) { return *this; } + if (( error = iter.has_next_element().error() )) { return *this; } + return *this; +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + icelake::ondemand::array_iterator &&value +) noexcept + : icelake::implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : icelake::implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++(first); + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/array_iterator-inl.h for icelake */ +/* including simdjson/generic/ondemand/document-inl.h for icelake: #include "simdjson/generic/ondemand/document-inl.h" */ +/* begin file simdjson/generic/ondemand/document-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +simdjson_inline document::document(ondemand::json_iterator &&_iter) noexcept + : iter{std::forward(_iter)} +{ + logger::log_start_value(iter, "document"); +} + +simdjson_inline document document::start(json_iterator &&iter) noexcept { + return document(std::forward(iter)); +} + +inline void document::rewind() noexcept { + iter.rewind(); +} + +inline std::string document::to_debug_string() noexcept { + return iter.to_string(); +} + +inline simdjson_result document::current_location() const noexcept { + return iter.current_location(); +} + +inline int32_t document::current_depth() const noexcept { + return iter.depth(); +} + +inline bool document::at_end() const noexcept { + return iter.at_end(); +} + + +inline bool document::is_alive() noexcept { + return iter.is_alive(); +} +simdjson_inline value_iterator document::resume_value_iterator() noexcept { + return value_iterator(&iter, 1, iter.root_position()); +} +simdjson_inline value_iterator document::get_root_value_iterator() noexcept { + return resume_value_iterator(); +} +simdjson_inline simdjson_result document::start_or_resume_object() noexcept { + if (iter.at_root()) { + return get_object(); + } else { + return object::resume(resume_value_iterator()); + } +} +simdjson_inline simdjson_result document::get_value() noexcept { + // Make sure we start any arrays or objects before returning, so that start_root_() + // gets called. + + // It is the convention throughout the code that the macro `SIMDJSON_DEVELOPMENT_CHECKS` determines whether + // we check for OUT_OF_ORDER_ITERATION. Proper on::demand code should never trigger this error. +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.at_root()) { return OUT_OF_ORDER_ITERATION; } +#endif + // assert_at_root() serves two purposes: in Debug mode, whether or not + // SIMDJSON_DEVELOPMENT_CHECKS is set or not, it checks that we are at the root of + // the document (this will typically be redundant). In release mode, it generates + // SIMDJSON_ASSUME statements to allow the compiler to make assumptions. + iter.assert_at_root(); + switch (*iter.peek()) { + case '[': { + // The following lines check that the document ends with ]. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_array(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + case '{': { + // The following lines would check that the document ends with }. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_object(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + default: + // Unfortunately, scalar documents are a special case in simdjson and they cannot + // be safely converted to value instances. + return SCALAR_DOCUMENT_AS_VALUE; + } +} +simdjson_inline simdjson_result document::get_array() & noexcept { + auto value = get_root_value_iterator(); + return array::start_root(value); +} +simdjson_inline simdjson_result document::get_object() & noexcept { + auto value = get_root_value_iterator(); + return object::start_root(value); +} + +/** + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. 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. + */ + +simdjson_inline simdjson_result document::get_uint64() noexcept { + return get_root_value_iterator().get_root_uint64(true); +} +simdjson_inline simdjson_result document::get_uint64_in_string() noexcept { + return get_root_value_iterator().get_root_uint64_in_string(true); +} +simdjson_inline simdjson_result document::get_int64() noexcept { + return get_root_value_iterator().get_root_int64(true); +} +simdjson_inline simdjson_result document::get_int64_in_string() noexcept { + return get_root_value_iterator().get_root_int64_in_string(true); +} +simdjson_inline simdjson_result document::get_double() noexcept { + return get_root_value_iterator().get_root_double(true); +} +simdjson_inline simdjson_result document::get_double_in_string() noexcept { + return get_root_value_iterator().get_root_double_in_string(true); +} +simdjson_inline simdjson_result document::get_string(bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(true, allow_replacement); +} +template +simdjson_inline error_code document::get_string(string_type& receiver, bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(receiver, true, allow_replacement); +} +simdjson_inline simdjson_result document::get_wobbly_string() noexcept { + return get_root_value_iterator().get_root_wobbly_string(true); +} +simdjson_inline simdjson_result document::get_raw_json_string() noexcept { + return get_root_value_iterator().get_root_raw_json_string(true); +} +simdjson_inline simdjson_result document::get_bool() noexcept { + return get_root_value_iterator().get_root_bool(true); +} +simdjson_inline simdjson_result document::is_null() noexcept { + return get_root_value_iterator().is_root_null(true); +} + +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_array(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_object(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_double(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_bool(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_value(); } + +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_double(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_uint64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_int64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_bool(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_value(); } + +template simdjson_inline error_code document::get(T &out) & noexcept { + return get().get(out); +} +template simdjson_inline error_code document::get(T &out) && noexcept { + return std::forward(*this).get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document::operator array() & noexcept(false) { return get_array(); } +simdjson_inline document::operator object() & noexcept(false) { return get_object(); } +simdjson_inline document::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document::operator double() noexcept(false) { return get_double(); } +simdjson_inline document::operator std::string_view() noexcept(false) { return get_string(false); } +simdjson_inline document::operator raw_json_string() noexcept(false) { return get_raw_json_string(); } +simdjson_inline document::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document::operator value() noexcept(false) { return get_value(); } + +#endif +simdjson_inline simdjson_result document::count_elements() & noexcept { + auto a = get_array(); + simdjson_result answer = a.count_elements(); + /* If there was an array, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::count_fields() & noexcept { + auto a = get_object(); + simdjson_result answer = a.count_fields(); + /* If there was an object, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::at(size_t index) & noexcept { + auto a = get_array(); + return a.at(index); +} +simdjson_inline simdjson_result document::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result document::end() & noexcept { + return {}; +} + +simdjson_inline simdjson_result document::find_field(std::string_view key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field(const char *key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field_unordered(std::string_view key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::find_field_unordered(const char *key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::operator[](std::string_view key) & noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result document::operator[](const char *key) & noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline error_code document::consume() noexcept { + auto error = iter.skip_child(0); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result document::raw_json() noexcept { + auto _iter = get_root_value_iterator(); + const uint8_t * starting_point{_iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter.unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result document::type() noexcept { + return get_root_value_iterator().type(); +} + +simdjson_inline simdjson_result document::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool document::is_negative() noexcept { + return get_root_value_iterator().is_root_negative(); +} + +simdjson_inline simdjson_result document::is_integer() noexcept { + return get_root_value_iterator().is_root_integer(true); +} + +simdjson_inline simdjson_result document::get_number_type() noexcept { + return get_root_value_iterator().get_root_number_type(true); +} + +simdjson_inline simdjson_result document::get_number() noexcept { + return get_root_value_iterator().get_root_number(true); +} + + +simdjson_inline simdjson_result document::raw_json_token() noexcept { + auto _iter = get_root_value_iterator(); + return std::string_view(reinterpret_cast(_iter.peek_start()), _iter.peek_start_length()); +} + +simdjson_inline simdjson_result document::at_pointer(std::string_view json_pointer) noexcept { + rewind(); // Rewind the document each time at_pointer is called + if (json_pointer.empty()) { + return this->get_value(); + } + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + icelake::ondemand::document &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base( + error + ) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template +simdjson_inline simdjson_result simdjson_result::get() & noexcept { + if (error()) { return error(); } + return first.get(); +} +template +simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first).get(); +} +template +simdjson_inline error_code simdjson_result::get(T &out) & noexcept { + if (error()) { return error(); } + return first.get(out); +} +template +simdjson_inline error_code simdjson_result::get(T &out) && noexcept { + if (error()) { return error(); } + return std::forward(first).get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() & noexcept = delete; +template<> simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first); +} +template<> simdjson_inline error_code simdjson_result::get(icelake::ondemand::document &out) & noexcept = delete; +template<> simdjson_inline error_code simdjson_result::get(icelake::ondemand::document &out) && noexcept { + if (error()) { return error(); } + out = std::forward(first); + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} + +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} + + +simdjson_inline bool simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} + +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} + +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} + +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} + + +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator icelake::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator icelake::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator icelake::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator icelake::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline bool simdjson_result::at_end() const noexcept { + if (error()) { return error(); } + return first.at_end(); +} + + +simdjson_inline int32_t simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + + +namespace simdjson { +namespace icelake { +namespace ondemand { + +simdjson_inline document_reference::document_reference() noexcept : doc{nullptr} {} +simdjson_inline document_reference::document_reference(document &d) noexcept : doc(&d) {} +simdjson_inline void document_reference::rewind() noexcept { doc->rewind(); } +simdjson_inline simdjson_result document_reference::get_array() & noexcept { return doc->get_array(); } +simdjson_inline simdjson_result document_reference::get_object() & noexcept { return doc->get_object(); } +/** + * The document_reference instances are used primarily/solely for streams of JSON + * documents. + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. + * + * 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. + */ +simdjson_inline simdjson_result document_reference::get_uint64() noexcept { return doc->get_root_value_iterator().get_root_uint64(false); } +simdjson_inline simdjson_result document_reference::get_uint64_in_string() noexcept { return doc->get_root_value_iterator().get_root_uint64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_int64() noexcept { return doc->get_root_value_iterator().get_root_int64(false); } +simdjson_inline simdjson_result document_reference::get_int64_in_string() noexcept { return doc->get_root_value_iterator().get_root_int64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_double() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_double_in_string() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_string(bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(false, allow_replacement); } +template +simdjson_inline error_code document_reference::get_string(string_type& receiver, bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(receiver, false, allow_replacement); } +simdjson_inline simdjson_result document_reference::get_wobbly_string() noexcept { return doc->get_root_value_iterator().get_root_wobbly_string(false); } +simdjson_inline simdjson_result document_reference::get_raw_json_string() noexcept { return doc->get_root_value_iterator().get_root_raw_json_string(false); } +simdjson_inline simdjson_result document_reference::get_bool() noexcept { return doc->get_root_value_iterator().get_root_bool(false); } +simdjson_inline simdjson_result document_reference::get_value() noexcept { return doc->get_value(); } +simdjson_inline simdjson_result document_reference::is_null() noexcept { return doc->get_root_value_iterator().is_root_null(false); } + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document_reference::operator array() & noexcept(false) { return array(*doc); } +simdjson_inline document_reference::operator object() & noexcept(false) { return object(*doc); } +simdjson_inline document_reference::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document_reference::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document_reference::operator double() noexcept(false) { return get_double(); } +simdjson_inline document_reference::operator std::string_view() noexcept(false) { return std::string_view(*doc); } +simdjson_inline document_reference::operator raw_json_string() noexcept(false) { return raw_json_string(*doc); } +simdjson_inline document_reference::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document_reference::operator value() noexcept(false) { return value(*doc); } +#endif +simdjson_inline simdjson_result document_reference::count_elements() & noexcept { return doc->count_elements(); } +simdjson_inline simdjson_result document_reference::count_fields() & noexcept { return doc->count_fields(); } +simdjson_inline simdjson_result document_reference::at(size_t index) & noexcept { return doc->at(index); } +simdjson_inline simdjson_result document_reference::begin() & noexcept { return doc->begin(); } +simdjson_inline simdjson_result document_reference::end() & noexcept { return doc->end(); } +simdjson_inline simdjson_result document_reference::find_field(std::string_view key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::find_field(const char *key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::operator[](std::string_view key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::operator[](const char *key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::find_field_unordered(std::string_view key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::find_field_unordered(const char *key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::type() noexcept { return doc->type(); } +simdjson_inline simdjson_result document_reference::is_scalar() noexcept { return doc->is_scalar(); } +simdjson_inline simdjson_result document_reference::current_location() noexcept { return doc->current_location(); } +simdjson_inline int32_t document_reference::current_depth() const noexcept { return doc->current_depth(); } +simdjson_inline bool document_reference::is_negative() noexcept { return doc->is_negative(); } +simdjson_inline simdjson_result document_reference::is_integer() noexcept { return doc->get_root_value_iterator().is_root_integer(false); } +simdjson_inline simdjson_result document_reference::get_number_type() noexcept { return doc->get_root_value_iterator().get_root_number_type(false); } +simdjson_inline simdjson_result document_reference::get_number() noexcept { return doc->get_root_value_iterator().get_root_number(false); } +simdjson_inline simdjson_result document_reference::raw_json_token() noexcept { return doc->raw_json_token(); } +simdjson_inline simdjson_result document_reference::at_pointer(std::string_view json_pointer) noexcept { return doc->at_pointer(json_pointer); } +simdjson_inline simdjson_result document_reference::raw_json() noexcept { return doc->raw_json();} +simdjson_inline document_reference::operator document&() const noexcept { return *doc; } + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + + + +namespace simdjson { +simdjson_inline simdjson_result::simdjson_result(icelake::ondemand::document_reference value, error_code error) + noexcept : implementation_simdjson_result_base(std::forward(value), error) {} + + +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator icelake::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator icelake::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator icelake::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator icelake::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H +/* end file simdjson/generic/ondemand/document-inl.h for icelake */ +/* including simdjson/generic/ondemand/document_stream-inl.h for icelake: #include "simdjson/generic/ondemand/document_stream-inl.h" */ +/* begin file simdjson/generic/ondemand/document_stream-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace icelake { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void stage1_worker::finish() { + // After calling "run" someone would call finish() to wait + // for the end of the processing. + // This function will wait until either the thread has done + // the processing or, else, the destructor has been called. + std::unique_lock lock(locking_mutex); + cond_var.wait(lock, [this]{return has_work == false;}); +} + +inline stage1_worker::~stage1_worker() { + // The thread may never outlive the stage1_worker instance + // and will always be stopped/joined before the stage1_worker + // instance is gone. + stop_thread(); +} + +inline void stage1_worker::start_thread() { + std::unique_lock lock(locking_mutex); + if(thread.joinable()) { + return; // This should never happen but we never want to create more than one thread. + } + thread = std::thread([this]{ + while(true) { + std::unique_lock thread_lock(locking_mutex); + // We wait for either "run" or "stop_thread" to be called. + cond_var.wait(thread_lock, [this]{return has_work || !can_work;}); + // If, for some reason, the stop_thread() method was called (i.e., the + // destructor of stage1_worker is called, then we want to immediately destroy + // the thread (and not do any more processing). + if(!can_work) { + break; + } + this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser, + this->_next_batch_start); + this->has_work = false; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify "finish" + thread_lock.unlock(); + } + } + ); +} + + +inline void stage1_worker::stop_thread() { + std::unique_lock lock(locking_mutex); + // We have to make sure that all locks can be released. + can_work = false; + has_work = false; + cond_var.notify_all(); + lock.unlock(); + if(thread.joinable()) { + thread.join(); + } +} + +inline void stage1_worker::run(document_stream * ds, parser * stage1, size_t next_batch_start) { + std::unique_lock lock(locking_mutex); + owner = ds; + _next_batch_start = next_batch_start; + stage1_thread_parser = stage1; + has_work = true; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify the thread lock that we have work + lock.unlock(); +} + +#endif // SIMDJSON_THREADS_ENABLED + +simdjson_inline document_stream::document_stream( + ondemand::parser &_parser, + const uint8_t *_buf, + size_t _len, + size_t _batch_size, + bool _allow_comma_separated +) noexcept + : parser{&_parser}, + buf{_buf}, + len{_len}, + batch_size{_batch_size <= MINIMAL_BATCH_SIZE ? MINIMAL_BATCH_SIZE : _batch_size}, + allow_comma_separated{_allow_comma_separated}, + error{SUCCESS} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(_parser.threaded) // we need to make a copy because _parser.threaded can change + #endif +{ +#ifdef SIMDJSON_THREADS_ENABLED + if(worker.get() == nullptr) { + error = MEMALLOC; + } +#endif +} + +simdjson_inline document_stream::document_stream() noexcept + : parser{nullptr}, + buf{nullptr}, + len{0}, + batch_size{0}, + allow_comma_separated{false}, + error{UNINITIALIZED} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(false) + #endif +{ +} + +simdjson_inline document_stream::~document_stream() noexcept +{ + #ifdef SIMDJSON_THREADS_ENABLED + worker.reset(); + #endif +} + +inline size_t document_stream::size_in_bytes() const noexcept { + return len; +} + +inline size_t document_stream::truncated_bytes() const noexcept { + if(error == CAPACITY) { return len - batch_start; } + return parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] - parser->implementation->structural_indexes[parser->implementation->n_structural_indexes + 1]; +} + +simdjson_inline document_stream::iterator::iterator() noexcept + : stream{nullptr}, finished{true} { +} + +simdjson_inline document_stream::iterator::iterator(document_stream* _stream, bool is_end) noexcept + : stream{_stream}, finished{is_end} { +} + +simdjson_inline simdjson_result document_stream::iterator::operator*() noexcept { + //if(stream->error) { return stream->error; } + return simdjson_result(stream->doc, stream->error); +} + +simdjson_inline document_stream::iterator& document_stream::iterator::operator++() noexcept { + // If there is an error, then we want the iterator + // to be finished, no matter what. (E.g., we do not + // keep generating documents with errors, or go beyond + // a document with errors.) + // + // Users do not have to call "operator*()" when they use operator++, + // so we need to end the stream in the operator++ function. + // + // Note that setting finished = true is essential otherwise + // we would enter an infinite loop. + if (stream->error) { finished = true; } + // Note that stream->error() is guarded against error conditions + // (it will immediately return if stream->error casts to false). + // In effect, this next function does nothing when (stream->error) + // is true (hence the risk of an infinite loop). + stream->next(); + // If that was the last document, we're finished. + // It is the only type of error we do not want to appear + // in operator*. + if (stream->error == EMPTY) { finished = true; } + // If we had any other kind of error (not EMPTY) then we want + // to pass it along to the operator* and we cannot mark the result + // as "finished" just yet. + return *this; +} + +simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept { + return finished != other.finished; +} + +simdjson_inline document_stream::iterator document_stream::begin() noexcept { + start(); + // If there are no documents, we're finished. + return iterator(this, error == EMPTY); +} + +simdjson_inline document_stream::iterator document_stream::end() noexcept { + return iterator(this, true); +} + +inline void document_stream::start() noexcept { + if (error) { return; } + error = parser->allocate(batch_size); + if (error) { return; } + // Always run the first stage 1 parse immediately + batch_start = 0; + error = run_stage1(*parser, batch_start); + while(error == EMPTY) { + // In exceptional cases, we may start with an empty block + batch_start = next_batch_start(); + if (batch_start >= len) { return; } + error = run_stage1(*parser, batch_start); + } + if (error) { return; } + doc_index = batch_start; + doc = document(json_iterator(&buf[batch_start], parser)); + doc.iter._streaming = true; + + #ifdef SIMDJSON_THREADS_ENABLED + if (use_thread && next_batch_start() < len) { + // Kick off the first thread on next batch if needed + error = stage1_thread_parser.allocate(batch_size); + if (error) { return; } + worker->start_thread(); + start_stage1_thread(); + if (error) { return; } + } + #endif // SIMDJSON_THREADS_ENABLED +} + +inline void document_stream::next() noexcept { + // We always enter at once once in an error condition. + if (error) { return; } + next_document(); + if (error) { return; } + auto cur_struct_index = doc.iter._root - parser->implementation->structural_indexes.get(); + doc_index = batch_start + parser->implementation->structural_indexes[cur_struct_index]; + + // Check if at end of structural indexes (i.e. at end of batch) + if(cur_struct_index >= static_cast(parser->implementation->n_structural_indexes)) { + error = EMPTY; + // Load another batch (if available) + while (error == EMPTY) { + batch_start = next_batch_start(); + if (batch_start >= len) { break; } + #ifdef SIMDJSON_THREADS_ENABLED + if(use_thread) { + load_from_stage1_thread(); + } else { + error = run_stage1(*parser, batch_start); + } + #else + error = run_stage1(*parser, batch_start); + #endif + /** + * Whenever we move to another window, we need to update all pointers to make + * it appear as if the input buffer started at the beginning of the window. + * + * Take this input: + * + * {"z":5} {"1":1,"2":2,"4":4} [7, 10, 9] [15, 11, 12, 13] [154, 110, 112, 1311] + * + * Say you process the following window... + * + * '{"z":5} {"1":1,"2":2,"4":4} [7, 10, 9]' + * + * When you do so, the json_iterator has a pointer at the beginning of the memory region + * (pointing at the beginning of '{"z"...'. + * + * When you move to the window that starts at... + * + * '[7, 10, 9] [15, 11, 12, 13] ... + * + * then it is not sufficient to just run stage 1. You also need to re-anchor the + * json_iterator so that it believes we are starting at '[7, 10, 9]...'. + * + * Under the DOM front-end, this gets done automatically because the parser owns + * the pointer the data, and when you call stage1 and then stage2 on the same + * parser, then stage2 will run on the pointer acquired by stage1. + * + * That is, stage1 calls "this->buf = _buf" so the parser remembers the buffer that + * we used. But json_iterator has no callback when stage1 is called on the parser. + * In fact, I think that the parser is unaware of json_iterator. + * + * + * So we need to re-anchor the json_iterator after each call to stage 1 so that + * all of the pointers are in sync. + */ + doc.iter = json_iterator(&buf[batch_start], parser); + doc.iter._streaming = true; + /** + * End of resync. + */ + + if (error) { continue; } // If the error was EMPTY, we may want to load another batch. + doc_index = batch_start; + } + } +} + +inline void document_stream::next_document() noexcept { + // Go to next place where depth=0 (document depth) + error = doc.iter.skip_child(0); + if (error) { return; } + // Always set depth=1 at the start of document + doc.iter._depth = 1; + // consume comma if comma separated is allowed + if (allow_comma_separated) { doc.iter.consume_character(','); } + // Resets the string buffer at the beginning, thus invalidating the strings. + doc.iter._string_buf_loc = parser->string_buf.get(); + doc.iter._root = doc.iter.position(); +} + +inline size_t document_stream::next_batch_start() const noexcept { + return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes]; +} + +inline error_code document_stream::run_stage1(ondemand::parser &p, size_t _batch_start) noexcept { + // This code only updates the structural index in the parser, it does not update any json_iterator + // instance. + size_t remaining = len - _batch_start; + if (remaining <= batch_size) { + return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final); + } else { + return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial); + } +} + +simdjson_inline size_t document_stream::iterator::current_index() const noexcept { + return stream->doc_index; +} + +simdjson_inline std::string_view document_stream::iterator::source() const noexcept { + auto depth = stream->doc.iter.depth(); + auto cur_struct_index = stream->doc.iter._root - stream->parser->implementation->structural_indexes.get(); + + // If at root, process the first token to determine if scalar value + if (stream->doc.iter.at_root()) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': // Depth=1 already at start of document + break; + case '}': case ']': + depth--; + break; + default: // Scalar value document + // TODO: Remove any trailing whitespaces + // This returns a string spanning from start of value to the beginning of the next document (excluded) + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[++cur_struct_index] - current_index() - 1); + } + cur_struct_index++; + } + + while (cur_struct_index <= static_cast(stream->parser->implementation->n_structural_indexes)) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': + depth++; + break; + case '}': case ']': + depth--; + break; + } + if (depth == 0) { break; } + cur_struct_index++; + } + + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[cur_struct_index] - current_index() + stream->batch_start + 1);; +} + +inline error_code document_stream::iterator::error() const noexcept { + return stream->error; +} + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void document_stream::load_from_stage1_thread() noexcept { + worker->finish(); + // Swap to the parser that was loaded up in the thread. Make sure the parser has + // enough memory to swap to, as well. + std::swap(stage1_thread_parser,*parser); + error = stage1_thread_error; + if (error) { return; } + + // If there's anything left, start the stage 1 thread! + if (next_batch_start() < len) { + start_stage1_thread(); + } +} + +inline void document_stream::start_stage1_thread() noexcept { + // we call the thread on a lambda that will update + // this->stage1_thread_error + // there is only one thread that may write to this value + // TODO this is NOT exception-safe. + this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error + size_t _next_batch_start = this->next_batch_start(); + + worker->run(this, & this->stage1_thread_parser, _next_batch_start); +} + +#endif // SIMDJSON_THREADS_ENABLED + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result::simdjson_result( + icelake::ondemand::document_stream &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} + +} + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H +/* end file simdjson/generic/ondemand/document_stream-inl.h for icelake */ +/* including simdjson/generic/ondemand/field-inl.h for icelake: #include "simdjson/generic/ondemand/field-inl.h" */ +/* begin file simdjson/generic/ondemand/field-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +// clang 6 doesn't think the default constructor can be noexcept, so we make it explicit +simdjson_inline field::field() noexcept : std::pair() {} + +simdjson_inline field::field(raw_json_string key, ondemand::value &&value) noexcept + : std::pair(key, std::forward(value)) +{ +} + +simdjson_inline simdjson_result field::start(value_iterator &parent_iter) noexcept { + raw_json_string key; + SIMDJSON_TRY( parent_iter.field_key().get(key) ); + SIMDJSON_TRY( parent_iter.field_value() ); + return field::start(parent_iter, key); +} + +simdjson_inline simdjson_result field::start(const value_iterator &parent_iter, raw_json_string key) noexcept { + return field(key, parent_iter.child()); +} + +simdjson_inline simdjson_warn_unused simdjson_result field::unescaped_key(bool allow_replacement) noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() but Visual Studio won't let us. + simdjson_result answer = first.unescape(second.iter.json_iter(), allow_replacement); + first.consume(); + return answer; +} + +simdjson_inline raw_json_string field::key() const noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() by Visual Studio won't let us. + return first; +} + +simdjson_inline value &field::value() & noexcept { + return second; +} + +simdjson_inline value field::value() && noexcept { + return std::forward(*this).second; +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + icelake::ondemand::field &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::key() noexcept { + if (error()) { return error(); } + return first.key(); +} +simdjson_inline simdjson_result simdjson_result::unescaped_key(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.unescaped_key(allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::value() noexcept { + if (error()) { return error(); } + return std::move(first.value()); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H +/* end file simdjson/generic/ondemand/field-inl.h for icelake */ +/* including simdjson/generic/ondemand/json_iterator-inl.h for icelake: #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/json_iterator-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +simdjson_inline json_iterator::json_iterator(json_iterator &&other) noexcept + : token(std::forward(other.token)), + parser{other.parser}, + _string_buf_loc{other._string_buf_loc}, + error{other.error}, + _depth{other._depth}, + _root{other._root}, + _streaming{other._streaming} +{ + other.parser = nullptr; +} +simdjson_inline json_iterator &json_iterator::operator=(json_iterator &&other) noexcept { + token = other.token; + parser = other.parser; + _string_buf_loc = other._string_buf_loc; + error = other.error; + _depth = other._depth; + _root = other._root; + _streaming = other._streaming; + other.parser = nullptr; + return *this; +} + +simdjson_inline json_iterator::json_iterator(const uint8_t *buf, ondemand::parser *_parser) noexcept + : token(buf, &_parser->implementation->structural_indexes[0]), + parser{_parser}, + _string_buf_loc{parser->string_buf.get()}, + _depth{1}, + _root{parser->implementation->structural_indexes.get()}, + _streaming{false} + +{ + logger::log_headers(); +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif +} + +inline void json_iterator::rewind() noexcept { + token.set_position( root_position() ); + logger::log_headers(); // We start again + _string_buf_loc = parser->string_buf.get(); + _depth = 1; +} + +inline bool json_iterator::balanced() const noexcept { + token_iterator ti(token); + int32_t count{0}; + ti.set_position( root_position() ); + while(ti.peek() <= peek_last()) { + switch (*ti.return_current_and_advance()) + { + case '[': case '{': + count++; + break; + case ']': case '}': + count--; + break; + default: + break; + } + } + return count == 0; +} + + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and parent_depth, which is a desired effect. The warning does not show up if the +// skip_child() function is not marked inline). +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline error_code json_iterator::skip_child(depth_t parent_depth) noexcept { + if (depth() <= parent_depth) { return SUCCESS; } + switch (*return_current_and_advance()) { + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + + // For the first open array/object in a value, we've already incremented depth, so keep it the same + // We never stop at colon, but if we did, it wouldn't affect depth + case '[': case '{': case ':': + logger::log_start_value(*this, "skip"); + break; + // If there is a comma, we have just finished a value in an array/object, and need to get back in + case ',': + logger::log_value(*this, "skip"); + break; + // ] or } means we just finished a value and need to jump out of the array/object + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } +#if SIMDJSON_CHECK_EOF + // If there are no more tokens, the parent is incomplete. + if (at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "Missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + break; + case '"': + if(*peek() == ':') { + // We are at a key!!! + // This might happen if you just started an object and you skip it immediately. + // Performance note: it would be nice to get rid of this check as it is somewhat + // expensive. + // https://github.com/simdjson/simdjson/issues/1742 + logger::log_value(*this, "key"); + return_current_and_advance(); // eat up the ':' + break; // important!!! + } + simdjson_fallthrough; + // Anything else must be a scalar value + default: + // For the first scalar, we will have incremented depth already, so we decrement it here. + logger::log_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + } + + // Now that we've considered the first value, we only increment/decrement for arrays/objects + while (position() < end_position()) { + switch (*return_current_and_advance()) { + case '[': case '{': + logger::log_start_value(*this, "skip"); + _depth++; + break; + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + default: + logger::log_value(*this, "skip", ""); + break; + } + } + + return report_error(TAPE_ERROR, "not enough close braces"); +} + +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool json_iterator::at_root() const noexcept { + return position() == root_position(); +} + +simdjson_inline bool json_iterator::is_single_token() const noexcept { + return parser->implementation->n_structural_indexes == 1; +} + +simdjson_inline bool json_iterator::streaming() const noexcept { + return _streaming; +} + +simdjson_inline token_position json_iterator::root_position() const noexcept { + return _root; +} + +simdjson_inline void json_iterator::assert_at_document_depth() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +} + +simdjson_inline void json_iterator::assert_at_root() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + // Under Visual Studio, the next SIMDJSON_ASSUME fails with: the argument + // has side effects that will be discarded. + SIMDJSON_ASSUME( token.position() == _root ); +#endif +} + +simdjson_inline void json_iterator::assert_more_tokens(uint32_t required_tokens) const noexcept { + assert_valid_position(token._position + required_tokens - 1); +} + +simdjson_inline void json_iterator::assert_valid_position(token_position position) const noexcept { +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME( position >= &parser->implementation->structural_indexes[0] ); + SIMDJSON_ASSUME( position < &parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] ); +#endif +} + +simdjson_inline bool json_iterator::at_end() const noexcept { + return position() == end_position(); +} +simdjson_inline token_position json_iterator::end_position() const noexcept { + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + return &parser->implementation->structural_indexes[n_structural_indexes]; +} + +inline std::string json_iterator::to_string() const noexcept { + if( !is_alive() ) { return "dead json_iterator instance"; } + const char * current_structural = reinterpret_cast(token.peek()); + return std::string("json_iterator [ depth : ") + std::to_string(_depth) + + std::string(", structural : '") + std::string(current_structural,1) + + std::string("', offset : ") + std::to_string(token.current_offset()) + + std::string("', error : ") + error_message(error) + + std::string(" ]"); +} + +inline simdjson_result json_iterator::current_location() const noexcept { + if (!is_alive()) { // Unrecoverable error + if (!at_root()) { + return reinterpret_cast(token.peek(-1)); + } else { + return reinterpret_cast(token.peek()); + } + } + if (at_end()) { + return OUT_OF_BOUNDS; + } + return reinterpret_cast(token.peek()); +} + +simdjson_inline bool json_iterator::is_alive() const noexcept { + return parser; +} + +simdjson_inline void json_iterator::abandon() noexcept { + parser = nullptr; + _depth = 0; +} + +simdjson_inline const uint8_t *json_iterator::return_current_and_advance() noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif // SIMDJSON_CHECK_EOF + return token.return_current_and_advance(); +} + +simdjson_inline const uint8_t *json_iterator::unsafe_pointer() const noexcept { + // deliberately done without safety guard: + return token.peek(); +} + +simdjson_inline const uint8_t *json_iterator::peek(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // SIMDJSON_CHECK_EOF + return token.peek(delta); +} + +simdjson_inline uint32_t json_iterator::peek_length(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // #if SIMDJSON_CHECK_EOF + return token.peek_length(delta); +} + +simdjson_inline const uint8_t *json_iterator::peek(token_position position) const noexcept { + // todo: currently we require end-of-string buffering, but the following + // assert_valid_position should be turned on if/when we lift that condition. + // assert_valid_position(position); + // This is almost surely related to SIMDJSON_CHECK_EOF but given that SIMDJSON_CHECK_EOF + // is ON by default, we have no choice but to disable it for real with a comment. + return token.peek(position); +} + +simdjson_inline uint32_t json_iterator::peek_length(token_position position) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_valid_position(position); +#endif // SIMDJSON_CHECK_EOF + return token.peek_length(position); +} + +simdjson_inline token_position json_iterator::last_position() const noexcept { + // The following line fails under some compilers... + // SIMDJSON_ASSUME(parser->implementation->n_structural_indexes > 0); + // since it has side-effects. + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + SIMDJSON_ASSUME(n_structural_indexes > 0); + return &parser->implementation->structural_indexes[n_structural_indexes - 1]; +} +simdjson_inline const uint8_t *json_iterator::peek_last() const noexcept { + return token.peek(last_position()); +} + +simdjson_inline void json_iterator::ascend_to(depth_t parent_depth) noexcept { + SIMDJSON_ASSUME(parent_depth >= 0 && parent_depth < INT32_MAX - 1); + SIMDJSON_ASSUME(_depth == parent_depth + 1); + _depth = parent_depth; +} + +simdjson_inline void json_iterator::descend_to(depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); + _depth = child_depth; +} + +simdjson_inline depth_t json_iterator::depth() const noexcept { + return _depth; +} + +simdjson_inline uint8_t *&json_iterator::string_buf_loc() noexcept { + return _string_buf_loc; +} + +simdjson_inline error_code json_iterator::report_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error != SUCCESS && _error != UNINITIALIZED && _error != INCORRECT_TYPE && _error != NO_SUCH_FIELD); + logger::log_error(*this, message); + error = _error; + return error; +} + +simdjson_inline token_position json_iterator::position() const noexcept { + return token.position(); +} + +simdjson_inline simdjson_result json_iterator::unescape(raw_json_string in, bool allow_replacement) noexcept { + return parser->unescape(in, _string_buf_loc, allow_replacement); +} + +simdjson_inline simdjson_result json_iterator::unescape_wobbly(raw_json_string in) noexcept { + return parser->unescape_wobbly(in, _string_buf_loc); +} + +simdjson_inline void json_iterator::reenter_child(token_position position, depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); +#if SIMDJSON_DEVELOPMENT_CHECKS +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME(size_t(child_depth) < parser->max_depth()); + SIMDJSON_ASSUME(position >= parser->start_positions[child_depth]); +#endif +#endif + token.set_position(position); + _depth = child_depth; +} + +simdjson_inline error_code json_iterator::consume_character(char c) noexcept { + if (*peek() == c) { + return_current_and_advance(); + return SUCCESS; + } + return TAPE_ERROR; +} + +#if SIMDJSON_DEVELOPMENT_CHECKS + +simdjson_inline token_position json_iterator::start_position(depth_t depth) const noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + return size_t(depth) < parser->max_depth() ? parser->start_positions[depth] : 0; +} + +simdjson_inline void json_iterator::set_start_position(depth_t depth, token_position position) noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + if(size_t(depth) < parser->max_depth()) { parser->start_positions[depth] = position; } +} + +#endif + + +simdjson_inline error_code json_iterator::optional_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error == INCORRECT_TYPE || _error == NO_SUCH_FIELD); + logger::log_error(*this, message); + return _error; +} + + +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 { + // This function is not expected to be called in performance-sensitive settings. + // Let us guard against silly cases: + if((N < max_len) || (N == 0)) { return false; } + // Copy to the buffer. + std::memcpy(tmpbuf, json, max_len); + if(N > max_len) { // We pad whatever remains with ' '. + std::memset(tmpbuf + max_len, ' ', N - max_len); + } + return true; +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(icelake::ondemand::json_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/json_iterator-inl.h for icelake */ +/* including simdjson/generic/ondemand/json_type-inl.h for icelake: #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* begin file simdjson/generic/ondemand/json_type-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept { + switch (type) { + case json_type::array: out << "array"; break; + case json_type::object: out << "object"; break; + case json_type::number: out << "number"; break; + case json_type::string: out << "string"; break; + case json_type::boolean: out << "boolean"; break; + case json_type::null: out << "null"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false) { + return out << type.value(); +} +#endif + + + +simdjson_inline number_type number::get_number_type() const noexcept { + return type; +} + +simdjson_inline bool number::is_uint64() const noexcept { + return get_number_type() == number_type::unsigned_integer; +} + +simdjson_inline uint64_t number::get_uint64() const noexcept { + return payload.unsigned_integer; +} + +simdjson_inline number::operator uint64_t() const noexcept { + return get_uint64(); +} + + +simdjson_inline bool number::is_int64() const noexcept { + return get_number_type() == number_type::signed_integer; +} + +simdjson_inline int64_t number::get_int64() const noexcept { + return payload.signed_integer; +} + +simdjson_inline number::operator int64_t() const noexcept { + return get_int64(); +} + +simdjson_inline bool number::is_double() const noexcept { + return get_number_type() == number_type::floating_point_number; +} + +simdjson_inline double number::get_double() const noexcept { + return payload.floating_point_number; +} + +simdjson_inline number::operator double() const noexcept { + return get_double(); +} + +simdjson_inline double number::as_double() const noexcept { + if(is_double()) { + return payload.floating_point_number; + } + if(is_int64()) { + return double(payload.signed_integer); + } + return double(payload.unsigned_integer); +} + +simdjson_inline void number::append_s64(int64_t value) noexcept { + payload.signed_integer = value; + type = number_type::signed_integer; +} + +simdjson_inline void number::append_u64(uint64_t value) noexcept { + payload.unsigned_integer = value; + type = number_type::unsigned_integer; +} + +simdjson_inline void number::append_double(double value) noexcept { + payload.floating_point_number = value; + type = number_type::floating_point_number; +} + +simdjson_inline void number::skip_double() noexcept { + type = number_type::floating_point_number; +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(icelake::ondemand::json_type &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H +/* end file simdjson/generic/ondemand/json_type-inl.h for icelake */ +/* including simdjson/generic/ondemand/logger-inl.h for icelake: #include "simdjson/generic/ondemand/logger-inl.h" */ +/* begin file simdjson/generic/ondemand/logger-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace icelake { +namespace ondemand { +namespace logger { + +static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; +static constexpr const int LOG_EVENT_LEN = 20; +static constexpr const int LOG_BUFFER_LEN = 30; +static constexpr const int LOG_SMALL_BUFFER_LEN = 10; +static int log_depth = 0; // Not threadsafe. Log only. + +// Helper to turn unprintable or newline characters into spaces +static inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } +} + +template +static inline std::string string_format(const std::string& format, const Args&... args) +{ + SIMDJSON_PUSH_DISABLE_ALL_WARNINGS + int size_s = std::snprintf(nullptr, 0, format.c_str(), args...) + 1; + auto size = static_cast(size_s); + if (size <= 0) return std::string(); + std::unique_ptr buf(new char[size]); + std::snprintf(buf.get(), size, format.c_str(), args...); + SIMDJSON_POP_DISABLE_WARNINGS + return std::string(buf.get(), buf.get() + size - 1); +} + +static inline log_level get_log_level_from_env() +{ + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe + char *lvl = getenv("SIMDJSON_LOG_LEVEL"); + SIMDJSON_POP_DISABLE_WARNINGS + if (lvl && simdjson_strcasecmp(lvl, "ERROR") == 0) { return log_level::error; } + return log_level::info; +} + +static inline log_level log_threshold() +{ + static log_level threshold = get_log_level_from_env(); + return threshold; +} + +static inline bool should_log(log_level level) +{ + return level >= log_threshold(); +} + +inline void log_event(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "", type, detail, log_level::info); +} +inline void log_value(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "+", type, detail, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} +inline void log_start_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_line(iter, "+", type, "", delta, depth_delta, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} + +inline void log_end_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + if (LOG_ENABLED) { log_depth--; } + log_line(iter, "-", type, "", delta, depth_delta, log_level::info); +} + +inline void log_error(const json_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_line(iter, "ERROR: ", error, detail, delta, depth_delta, log_level::error); +} +inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail) noexcept { + log_line(iter, index, depth, "ERROR: ", error, detail, log_level::error); +} + +inline void log_event(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_event(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_value(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_value(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_start_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_start_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_end_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_end_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_error(const value_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_error(iter.json_iter(), error, detail, delta, depth_delta); +} + +inline void log_headers() noexcept { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(log_level::info))) { + // Technically a static variable is not thread-safe, but if you are using threads and logging... well... + static bool displayed_hint{false}; + log_depth = 0; + printf("\n"); + if (!displayed_hint) { + // We only print this helpful header once. + printf("# Logging provides the depth and position of the iterator user-visible steps:\n"); + printf("# +array says 'this is where we were when we discovered the start array'\n"); + printf( + "# -array says 'this is where we were when we ended the array'\n"); + printf("# skip says 'this is a structural or value I am skipping'\n"); + printf("# +/-skip says 'this is a start/end array or object I am skipping'\n"); + printf("#\n"); + printf("# The indentation of the terms (array, string,...) indicates the depth,\n"); + printf("# in addition to the depth being displayed.\n"); + printf("#\n"); + printf("# Every token in the document has a single depth determined by the tokens before it,\n"); + printf("# and is not affected by what the token actually is.\n"); + printf("#\n"); + printf("# Not all structural elements are presented as tokens in the logs.\n"); + printf("#\n"); + printf("# We never give control to the user within an empty array or an empty object.\n"); + printf("#\n"); + printf("# Inside an array, having a depth greater than the array's depth means that\n"); + printf("# we are pointing inside a value.\n"); + printf("# Having a depth equal to the array means that we are pointing right before a value.\n"); + printf("# Having a depth smaller than the array means that we have moved beyond the array.\n"); + displayed_hint = true; + } + printf("\n"); + printf("| %-*s ", LOG_EVENT_LEN, "Event"); + printf("| %-*s ", LOG_BUFFER_LEN, "Buffer"); + printf("| %-*s ", LOG_SMALL_BUFFER_LEN, "Next"); + // printf("| %-*s ", 5, "Next#"); + printf("| %-*s ", 5, "Depth"); + printf("| Detail "); + printf("|\n"); + + printf("|%.*s", LOG_EVENT_LEN + 2, DASHES); + printf("|%.*s", LOG_BUFFER_LEN + 2, DASHES); + printf("|%.*s", LOG_SMALL_BUFFER_LEN + 2, DASHES); + // printf("|%.*s", 5+2, DASHES); + printf("|%.*s", 5 + 2, DASHES); + printf("|--------"); + printf("|\n"); + fflush(stdout); + } + } +} + +template +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 { + log_line(iter, iter.position()+delta, depth_t(iter.depth()+depth_delta), title_prefix, title, detail, level, std::forward(args)...); +} + +template +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 { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(level))) { + const int indent = depth * 2; + const auto buf = iter.token.buf; + auto msg = string_format(title, std::forward(args)...); + printf("| %*s%s%-*s ", indent, "", title_prefix, + LOG_EVENT_LEN - indent - int(strlen(title_prefix)), msg.c_str()); + { + // Print the current structural. + printf("| "); + // Before we begin, the index might point right before the document. + // This could be unsafe, see https://github.com/simdjson/simdjson/discussions/1938 + if (index < iter._root) { + printf("%*s", LOG_BUFFER_LEN, ""); + } else { + auto current_structural = &buf[*index]; + for (int i = 0; i < LOG_BUFFER_LEN; i++) { + printf("%c", printable_char(current_structural[i])); + } + } + printf(" "); + } + { + // Print the next structural. + printf("| "); + auto next_structural = &buf[*(index + 1)]; + for (int i = 0; i < LOG_SMALL_BUFFER_LEN; i++) { + printf("%c", printable_char(next_structural[i])); + } + printf(" "); + } + // printf("| %5u ", *(index+1)); + printf("| %5i ", depth); + printf("| %6.*s ", int(detail.size()), detail.data()); + printf("|\n"); + fflush(stdout); + } + } +} + +} // namespace logger +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H +/* end file simdjson/generic/ondemand/logger-inl.h for icelake */ +/* including simdjson/generic/ondemand/object-inl.h for icelake: #include "simdjson/generic/ondemand/object-inl.h" */ +/* begin file simdjson/generic/ondemand/object-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) & noexcept { + return find_field_unordered(key); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) && noexcept { + return std::forward(*this).find_field_unordered(key); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} + +simdjson_inline simdjson_result object::start(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_object().error() ); + return object(iter); +} +simdjson_inline simdjson_result object::start_root(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_root_object().error() ); + return object(iter); +} +simdjson_inline error_code object::consume() noexcept { + if(iter.is_at_key()) { + /** + * 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. + */ + simdjson_unused raw_json_string actual_key; + auto error = iter.field_key().get(actual_key); + if (error) { iter.abandon(); return error; }; + // Let us move to the value while we are at it. + if ((error = iter.field_value())) { iter.abandon(); return error; } + } + auto error_skip = iter.json_iter().skip_child(iter.depth()-1); + if(error_skip) { iter.abandon(); } + return error_skip; +} + +simdjson_inline simdjson_result object::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + const uint8_t * final_point{iter._json_iter->peek()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result object::started(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.started_object().error() ); + return object(iter); +} + +simdjson_inline object object::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline object::object(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result object::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return object_iterator(iter); +} +simdjson_inline simdjson_result object::end() noexcept { + return object_iterator(iter); +} + +inline simdjson_result object::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + size_t slash = json_pointer.find('/'); + std::string_view key = json_pointer.substr(0, slash); + // Grab the child with the given key + simdjson_result child; + + // If there is an escape character in the key, unescape it and then get the child. + size_t escape = key.find('~'); + if (escape != std::string_view::npos) { + // Unescape the key + std::string unescaped(key); + do { + switch (unescaped[escape+1]) { + case '0': + unescaped.replace(escape, 2, "~"); + break; + case '1': + unescaped.replace(escape, 2, "/"); + break; + default: + return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer"); + } + escape = unescaped.find('~', escape+1); + } while (escape != std::string::npos); + child = find_field(unescaped); // Take note find_field does not unescape keys when matching + } else { + child = find_field(key); + } + if(child.error()) { + return child; // we do not continue if there was an error + } + // If there is a /, we have to recurse and look up more of the path + if (slash != std::string_view::npos) { + child = child.at_pointer(json_pointer.substr(slash)); + } + return child; +} + +simdjson_inline simdjson_result object::count_fields() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the object after counting the number of elements. + iter.reset_object(); + return count; +} + +simdjson_inline simdjson_result object::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_object().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +simdjson_inline simdjson_result object::reset() & noexcept { + return iter.reset_object(); +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(icelake::ondemand::object &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first)[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +inline simdjson_result simdjson_result::reset() noexcept { + if (error()) { return error(); } + return first.reset(); +} + +inline simdjson_result simdjson_result::is_empty() noexcept { + if (error()) { return error(); } + return first.is_empty(); +} + +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H +/* end file simdjson/generic/ondemand/object-inl.h for icelake */ +/* including simdjson/generic/ondemand/object_iterator-inl.h for icelake: #include "simdjson/generic/ondemand/object_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/object_iterator-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +// +// object_iterator +// + +simdjson_inline object_iterator::object_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result object_iterator::operator*() noexcept { + error_code error = iter.error(); + if (error) { iter.abandon(); return error; } + auto result = field::start(iter); + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (result.error()) { iter.abandon(); } + return result; +} +simdjson_inline bool object_iterator::operator==(const object_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool object_iterator::operator!=(const object_iterator &) const noexcept { + return iter.is_open(); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline object_iterator &object_iterator::operator++() noexcept { + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (!iter.is_open()) { return *this; } // Iterator will be released if there is an error + + simdjson_unused error_code error; + if ((error = iter.skip_child() )) { return *this; } + + simdjson_unused bool has_value; + if ((error = iter.has_next_field().get(has_value) )) { return *this; }; + return *this; +} +SIMDJSON_POP_DISABLE_WARNINGS + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter.depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the object is first found and the iterator is just past the {. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the , or } before the next value. In this state, +// depth == iter.depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter.depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter.depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the object iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet field may be missing or not be an +// object--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter.depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between fields, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter.depth == depth, and at_start == false. +// +// Errors that occur while reading a field to give to the user (such as when the key is not a +// string or the field is missing a colon) are yielded immediately. Depth is then decremented, +// moving to the Finished state without transitioning through an Error state at all. +// +// ## Terminal State +// +// The terminal state has iter.depth < depth. at_start is always false. +// +// - Finished: When we have reached a }, we are finished. We signal this by decrementing depth. +// In this state, iter.depth < depth, at_start == false, and error == SUCCESS. +// + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + icelake::ondemand::object_iterator &&value +) noexcept + : implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +// Checks for ']' and ',' +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++first; + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/object_iterator-inl.h for icelake */ +/* including simdjson/generic/ondemand/parser-inl.h for icelake: #include "simdjson/generic/ondemand/parser-inl.h" */ +/* begin file simdjson/generic/ondemand/parser-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string_view.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/dom/base.h" // for MINIMAL_DOCUMENT_CAPACITY */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +simdjson_inline parser::parser(size_t max_capacity) noexcept + : _max_capacity{max_capacity} { +} + +simdjson_warn_unused simdjson_inline error_code parser::allocate(size_t new_capacity, size_t new_max_depth) noexcept { + if (new_capacity > max_capacity()) { return CAPACITY; } + if (string_buf && new_capacity == capacity() && new_max_depth == max_depth()) { return SUCCESS; } + + // string_capacity copied from document::allocate + _capacity = 0; + size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * new_capacity / 3 + SIMDJSON_PADDING, 64); + string_buf.reset(new (std::nothrow) uint8_t[string_capacity]); +#if SIMDJSON_DEVELOPMENT_CHECKS + start_positions.reset(new (std::nothrow) token_position[new_max_depth]); +#endif + if (implementation) { + SIMDJSON_TRY( implementation->set_capacity(new_capacity) ); + SIMDJSON_TRY( implementation->set_max_depth(new_max_depth) ); + } else { + SIMDJSON_TRY( simdjson::get_active_implementation()->create_dom_parser_implementation(new_capacity, new_max_depth, implementation) ); + } + _capacity = new_capacity; + _max_depth = new_max_depth; + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length() || !string_buf) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return document::start({ reinterpret_cast(json.data()), this }); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const char *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const uint8_t *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string_view json, size_t allocated) & noexcept { + return iterate(padded_string_view(json, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string &json) & noexcept { + if(json.capacity() - json.size() < SIMDJSON_PADDING) { + json.reserve(json.size() + SIMDJSON_PADDING); + } + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const std::string &json) & noexcept { + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + padded_string_view json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + const padded_string &json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate_raw(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length()) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return json_iterator(reinterpret_cast(json.data()), this); +} + +inline simdjson_result parser::iterate_many(const uint8_t *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; } + if((len >= 3) && (std::memcmp(buf, "\xEF\xBB\xBF", 3) == 0)) { + buf += 3; + len -= 3; + } + if(allow_comma_separated && batch_size < len) { batch_size = len; } + return document_stream(*this, buf, len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const char *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(reinterpret_cast(buf), len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const std::string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const padded_string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} + +simdjson_inline size_t parser::capacity() const noexcept { + return _capacity; +} +simdjson_inline size_t parser::max_capacity() const noexcept { + return _max_capacity; +} +simdjson_inline size_t parser::max_depth() const noexcept { + return _max_depth; +} + +simdjson_inline void parser::set_max_capacity(size_t max_capacity) noexcept { + if(max_capacity < dom::MINIMAL_DOCUMENT_CAPACITY) { + _max_capacity = max_capacity; + } else { + _max_capacity = dom::MINIMAL_DOCUMENT_CAPACITY; + } +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement) const noexcept { + uint8_t *end = implementation->parse_string(in.buf, dst, allow_replacement); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept { + uint8_t *end = implementation->parse_wobbly_string(in.buf, dst); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(icelake::ondemand::parser &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H +/* end file simdjson/generic/ondemand/parser-inl.h for icelake */ +/* including simdjson/generic/ondemand/raw_json_string-inl.h for icelake: #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +namespace icelake { +namespace ondemand { + +simdjson_inline raw_json_string::raw_json_string(const uint8_t * _buf) noexcept : buf{_buf} {} + +simdjson_inline const char * raw_json_string::raw() const noexcept { return reinterpret_cast(buf); } + + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(std::string_view target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;pos < target.size() && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;pos < target.size();pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(const char* target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;target[pos] && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;target[pos];pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept { + // If we are going to call memcmp, then we must know something about the length of the raw_json_string. + return (length >= target.size()) && (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); +} + +simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + if(target.size() <= SIMDJSON_PADDING) { + return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); + } + const char * r{raw()}; + size_t pos{0}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept { + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(const char * target) const noexcept { + // Assumptions: 'target' does not contain unescaped quote characters, is null terminated and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(const char* target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept { + return a.unsafe_is_equal(c); +} + +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept { + return a == c; +} + +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept { + return !(a == c); +} + +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept { + return !(a == c); +} + + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape(json_iterator &iter, bool allow_replacement) const noexcept { + return iter.unescape(*this, allow_replacement); +} + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape_wobbly(json_iterator &iter) const noexcept { + return iter.unescape_wobbly(*this); +} + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &out, const raw_json_string &str) noexcept { + bool in_escape = false; + const char *s = str.raw(); + while (true) { + switch (*s) { + case '\\': in_escape = !in_escape; break; + case '"': if (in_escape) { in_escape = false; } else { return out; } break; + default: if (in_escape) { in_escape = false; } + } + out << *s; + s++; + } +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(icelake::ondemand::raw_json_string &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::raw() const noexcept { + if (error()) { return error(); } + return first.raw(); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape(icelake::ondemand::json_iterator &iter, bool allow_replacement) const noexcept { + if (error()) { return error(); } + return first.unescape(iter, allow_replacement); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape_wobbly(icelake::ondemand::json_iterator &iter) const noexcept { + if (error()) { return error(); } + return first.unescape_wobbly(iter); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H +/* end file simdjson/generic/ondemand/raw_json_string-inl.h for icelake */ +/* including simdjson/generic/ondemand/serialization-inl.h for icelake: #include "simdjson/generic/ondemand/serialization-inl.h" */ +/* begin file simdjson/generic/ondemand/serialization-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/serialization.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +inline std::string_view trim(const std::string_view str) noexcept { + // We can almost surely do better by rolling our own find_first_not_of function. + size_t first = str.find_first_not_of(" \t\n\r"); + // If we have the empty string (just white space), then no trimming is possible, and + // we return the empty string_view. + if (std::string_view::npos == first) { return std::string_view(); } + size_t last = str.find_last_not_of(" \t\n\r"); + return str.substr(first, (last - first + 1)); +} + + +inline simdjson_result to_json_string(icelake::ondemand::document& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(icelake::ondemand::document_reference& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(icelake::ondemand::value& x) noexcept { + /** + * 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. + */ + using namespace icelake::ondemand; + icelake::ondemand::json_type t; + auto error = x.type().get(t); + if(error != SUCCESS) { return error; } + switch (t) + { + case json_type::array: + { + icelake::ondemand::array array; + error = x.get_array().get(array); + if(error) { return error; } + return to_json_string(array); + } + case json_type::object: + { + icelake::ondemand::object object; + error = x.get_object().get(object); + if(error) { return error; } + return to_json_string(object); + } + default: + return trim(x.raw_json_token()); + } +} + +inline simdjson_result to_json_string(icelake::ondemand::object& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(icelake::ondemand::array& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} +} // namespace simdjson + +namespace simdjson { namespace icelake { namespace ondemand { + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::document_reference& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::icelake::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif +}}} // namespace simdjson::icelake::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H +/* end file simdjson/generic/ondemand/serialization-inl.h for icelake */ +/* including simdjson/generic/ondemand/token_iterator-inl.h for icelake: #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/token_iterator-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +simdjson_inline token_iterator::token_iterator( + const uint8_t *_buf, + token_position position +) noexcept : buf{_buf}, _position{position} +{ +} + +simdjson_inline uint32_t token_iterator::current_offset() const noexcept { + return *(_position); +} + + +simdjson_inline const uint8_t *token_iterator::return_current_and_advance() noexcept { + return &buf[*(_position++)]; +} + +simdjson_inline const uint8_t *token_iterator::peek(token_position position) const noexcept { + return &buf[*position]; +} +simdjson_inline uint32_t token_iterator::peek_index(token_position position) const noexcept { + return *position; +} +simdjson_inline uint32_t token_iterator::peek_length(token_position position) const noexcept { + return *(position+1) - *position; +} + +simdjson_inline const uint8_t *token_iterator::peek(int32_t delta) const noexcept { + return &buf[*(_position+delta)]; +} +simdjson_inline uint32_t token_iterator::peek_index(int32_t delta) const noexcept { + return *(_position+delta); +} +simdjson_inline uint32_t token_iterator::peek_length(int32_t delta) const noexcept { + return *(_position+delta+1) - *(_position+delta); +} + +simdjson_inline token_position token_iterator::position() const noexcept { + return _position; +} +simdjson_inline void token_iterator::set_position(token_position target_position) noexcept { + _position = target_position; +} + +simdjson_inline bool token_iterator::operator==(const token_iterator &other) const noexcept { + return _position == other._position; +} +simdjson_inline bool token_iterator::operator!=(const token_iterator &other) const noexcept { + return _position != other._position; +} +simdjson_inline bool token_iterator::operator>(const token_iterator &other) const noexcept { + return _position > other._position; +} +simdjson_inline bool token_iterator::operator>=(const token_iterator &other) const noexcept { + return _position >= other._position; +} +simdjson_inline bool token_iterator::operator<(const token_iterator &other) const noexcept { + return _position < other._position; +} +simdjson_inline bool token_iterator::operator<=(const token_iterator &other) const noexcept { + return _position <= other._position; +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(icelake::ondemand::token_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/token_iterator-inl.h for icelake */ +/* including simdjson/generic/ondemand/value-inl.h for icelake: #include "simdjson/generic/ondemand/value-inl.h" */ +/* begin file simdjson/generic/ondemand/value-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +simdjson_inline value::value(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} +simdjson_inline value value::start(const value_iterator &iter) noexcept { + return iter; +} +simdjson_inline value value::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline simdjson_result value::get_array() noexcept { + return array::start(iter); +} +simdjson_inline simdjson_result value::get_object() noexcept { + return object::start(iter); +} +simdjson_inline simdjson_result value::start_or_resume_object() noexcept { + if (iter.at_start()) { + return get_object(); + } else { + return object::resume(iter); + } +} + +simdjson_inline simdjson_result value::get_raw_json_string() noexcept { + return iter.get_raw_json_string(); +} +simdjson_inline simdjson_result value::get_string(bool allow_replacement) noexcept { + return iter.get_string(allow_replacement); +} +template +simdjson_inline error_code value::get_string(string_type& receiver, bool allow_replacement) noexcept { + return iter.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result value::get_wobbly_string() noexcept { + return iter.get_wobbly_string(); +} +simdjson_inline simdjson_result value::get_double() noexcept { + return iter.get_double(); +} +simdjson_inline simdjson_result value::get_double_in_string() noexcept { + return iter.get_double_in_string(); +} +simdjson_inline simdjson_result value::get_uint64() noexcept { + return iter.get_uint64(); +} +simdjson_inline simdjson_result value::get_uint64_in_string() noexcept { + return iter.get_uint64_in_string(); +} +simdjson_inline simdjson_result value::get_int64() noexcept { + return iter.get_int64(); +} +simdjson_inline simdjson_result value::get_int64_in_string() noexcept { + return iter.get_int64_in_string(); +} +simdjson_inline simdjson_result value::get_bool() noexcept { + return iter.get_bool(); +} +simdjson_inline simdjson_result value::is_null() noexcept { + return iter.is_null(); +} +template<> simdjson_inline simdjson_result value::get() noexcept { return get_array(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_object(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_number(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_double(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_bool(); } + +template simdjson_inline error_code value::get(T &out) noexcept { + return get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline value::operator array() noexcept(false) { + return get_array(); +} +simdjson_inline value::operator object() noexcept(false) { + return get_object(); +} +simdjson_inline value::operator uint64_t() noexcept(false) { + return get_uint64(); +} +simdjson_inline value::operator int64_t() noexcept(false) { + return get_int64(); +} +simdjson_inline value::operator double() noexcept(false) { + return get_double(); +} +simdjson_inline value::operator std::string_view() noexcept(false) { + return get_string(false); +} +simdjson_inline value::operator raw_json_string() noexcept(false) { + return get_raw_json_string(); +} +simdjson_inline value::operator bool() noexcept(false) { + return get_bool(); +} +#endif + +simdjson_inline simdjson_result value::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result value::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result value::count_elements() & noexcept { + simdjson_result answer; + auto a = get_array(); + answer = a.count_elements(); + // count_elements leaves you pointing inside the array, at the first element. + // We need to move back so that the user can create a new array (which requires that + // we point at '['). + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::count_fields() & noexcept { + simdjson_result answer; + auto a = get_object(); + answer = a.count_fields(); + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::at(size_t index) noexcept { + auto a = get_array(); + return a.at(index); +} + +simdjson_inline simdjson_result value::find_field(std::string_view key) noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result value::find_field(const char *key) noexcept { + return start_or_resume_object().find_field(key); +} + +simdjson_inline simdjson_result value::find_field_unordered(std::string_view key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result value::find_field_unordered(const char *key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} + +simdjson_inline simdjson_result value::operator[](std::string_view key) noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result value::operator[](const char *key) noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline simdjson_result value::type() noexcept { + return iter.type(); +} + +simdjson_inline simdjson_result value::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool value::is_negative() noexcept { + return iter.is_negative(); +} + +simdjson_inline simdjson_result value::is_integer() noexcept { + return iter.is_integer(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number_type() noexcept { + return iter.get_number_type(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number() noexcept { + return iter.get_number(); +} + +simdjson_inline std::string_view value::raw_json_token() noexcept { + return std::string_view(reinterpret_cast(iter.peek_start()), iter.peek_start_length()); +} + +simdjson_inline simdjson_result value::raw_json() noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: { + ondemand::array array; + SIMDJSON_TRY(get_array().get(array)); + return array.raw_json(); + } + case json_type::object: { + ondemand::object object; + SIMDJSON_TRY(get_object().get(object)); + return object.raw_json(); + } + default: + return raw_json_token(); + } +} + +simdjson_inline simdjson_result value::current_location() noexcept { + return iter.json_iter().current_location(); +} + +simdjson_inline int32_t value::current_depth() const noexcept{ + return iter.json_iter().depth(); +} + +simdjson_inline simdjson_result value::at_pointer(std::string_view json_pointer) noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + icelake::ondemand::value &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + if (error()) { return error(); } + return {}; +} + +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} + +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) noexcept { + if (error()) { return error(); } + return first[key]; +} + +simdjson_inline simdjson_result simdjson_result::get_array() noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return first.get(); +} +template simdjson_inline error_code simdjson_result::get(T &out) noexcept { + if (error()) { return error(); } + return first.get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return std::move(first); +} +template<> simdjson_inline error_code simdjson_result::get(icelake::ondemand::value &out) noexcept { + if (error()) { return error(); } + out = first; + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator icelake::ondemand::array() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator icelake::ondemand::object() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator icelake::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H +/* end file simdjson/generic/ondemand/value-inl.h for icelake */ +/* including simdjson/generic/ondemand/value_iterator-inl.h for icelake: #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/value_iterator-inl.h for icelake */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/atomparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace icelake { +namespace ondemand { + +simdjson_inline value_iterator::value_iterator( + json_iterator *json_iter, + depth_t depth, + token_position start_position +) noexcept : _json_iter{json_iter}, _depth{depth}, _start_position{start_position} +{ +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_root_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_object() noexcept { + assert_at_container_start(); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + if (*_json_iter->peek() == '}') { + logger::log_value(*_json_iter, "empty object"); + _json_iter->return_current_and_advance(); + end_container(); + return false; + } + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_object() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // object: e.g., `{"a":2} foo }`. Users concerned with garbage content should + // call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != '}') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing } at end"); + } + // If the last character is } *and* the first gibberish character is also '}' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == '}') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed object. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_object() noexcept { + auto error = check_root_object(); + if(error) { return error; } + return started_object(); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::end_container() noexcept { +#if SIMDJSON_CHECK_EOF + if (depth() > 1 && at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing parent ] or }"); } + // if (depth() <= 1 && !at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + _json_iter->ascend_to(depth()-1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_field() noexcept { + assert_at_next(); + + // It's illegal to call this unless there are more tokens: anything that ends in } or ] is + // obligated to verify there are more tokens if they are not the top level. + switch (*_json_iter->return_current_and_advance()) { + case '}': + logger::log_end_value(*_json_iter, "object"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between object fields"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_raw(const std::string_view key) noexcept { + error_code error; + bool has_value; + // + // Initially, the object can be in one of a few different places: + // + // 1. The start of the object, at the first field: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + if (at_first_field()) { + has_value = true; + + // + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + return false; + + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + if ((error = skip_child() )) { abandon(); return error; } + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + while (has_value) { + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + //if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); // Skip the value entirely + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + + // If the loop ended, we're out of fields to look at. + return false; +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_unordered_raw(const std::string_view key) noexcept { + /** + * When find_field_unordered_raw is called, we can either be pointing at the + * first key, pointing outside (at the closing brace) or if a key was matched + * we can be either pointing right afterthe ':' right before the value (that we need skip), + * or we may have consumed the value and we might be at a comma or at the + * final brace (ready for a call to has_next_field()). + */ + error_code error; + bool has_value; + + // First, we scan from that point to the end. + // If we don't find a match, we may loop back around, and scan from the beginning to that point. + token_position search_start = _json_iter->position(); + + // We want to know whether we need to go back to the beginning. + bool at_first = at_first_field(); + /////////////// + // Initially, the object can be in one of a few different places: + // + // 1. At the first key: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + // + if (at_first) { + has_value = true; + + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { + +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + SIMDJSON_TRY(reset_object().get(has_value)); + at_first = true; + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + // If someone queried a key but they not did access the value, then we are left pointing + // at the ':' and we need to move forward through the value... If the value was + // processed then skip_child() does not move the iterator (but may adjust the depth). + if ((error = skip_child() )) { abandon(); return error; } + search_start = _json_iter->position(); + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + + // After initial processing, we will be in one of two states: + // + // ``` + // // At the beginning of a field + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // At the end of the object + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // ``` + // + // Next, we find a match starting from the current position. + while (has_value) { + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + // Performance note: it maybe wasteful to rewind to the beginning when there might be + // no other query following. Indeed, it would require reskipping the whole object. + // Instead, you can just stay where you are. If there is a new query, there is always time + // to rewind. + if(at_first) { return false; } + + // If we reach the end without finding a match, search the rest of the fields starting at the + // beginning of the object. + // (We have already run through the object before, so we've already validated its structure. We + // don't check errors in this bit.) + SIMDJSON_TRY(reset_object().get(has_value)); + while (true) { + SIMDJSON_ASSUME(has_value); // we should reach search_start before ever reaching the end of the object + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + error = field_key().get(actual_key); SIMDJSON_ASSUME(!error); + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + error = field_value(); SIMDJSON_ASSUME(!error); + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // If we reached the end of the key-value pair we started from, then we know + // that the key is not there so we return false. We are either right before + // the next comma or the final brace. + if(_json_iter->position() == search_start) { return false; } + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + error = has_next_field().get(has_value); SIMDJSON_ASSUME(!error); + // If we make the mistake of exiting here, then we could be left pointing at a key + // in the middle of an object. That's not an allowable state. + } + // If the loop ended, we're out of fields to look at. The program should + // never reach this point. + return false; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::field_key() noexcept { + assert_at_next(); + + const uint8_t *key = _json_iter->return_current_and_advance(); + if (*(key++) != '"') { return report_error(TAPE_ERROR, "Object key is not a string"); } + return raw_json_string(key); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::field_value() noexcept { + assert_at_next(); + + if (*_json_iter->return_current_and_advance() != ':') { return report_error(TAPE_ERROR, "Missing colon in object field"); } + _json_iter->descend_to(depth()+1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_root_array(); +} + +inline std::string value_iterator::to_string() const noexcept { + auto answer = std::string("value_iterator [ depth : ") + std::to_string(_depth) + std::string(", "); + if(_json_iter != nullptr) { answer += _json_iter->to_string(); } + answer += std::string(" ]"); + return answer; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_array() noexcept { + assert_at_container_start(); + if (*_json_iter->peek() == ']') { + logger::log_value(*_json_iter, "empty array"); + _json_iter->return_current_and_advance(); + SIMDJSON_TRY( end_container() ); + return false; + } + _json_iter->descend_to(depth()+1); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_array() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // array: e.g., `[1, 2] foo]`. Users concerned with garbage content should + // also call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != ']') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing ] at end"); + } + // If the last character is ] *and* the first gibberish character is also ']' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == ']') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed array. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_array() noexcept { + auto error = check_root_array(); + if (error) { return error; } + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_element() noexcept { + assert_at_next(); + + logger::log_event(*this, "has_next_element"); + switch (*_json_iter->return_current_and_advance()) { + case ']': + logger::log_end_value(*_json_iter, "array"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + _json_iter->descend_to(depth()+1); + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between array elements"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_bool(const uint8_t *json) const noexcept { + auto not_true = atomparsing::str4ncmp(json, "true"); + auto not_false = atomparsing::str4ncmp(json, "fals") | (json[4] ^ 'e'); + bool error = (not_true && not_false) || jsoncharutils::is_not_structural_or_whitespace(json[not_true ? 5 : 4]); + if (error) { return incorrect_type_error("Not a boolean"); } + return simdjson_result(!not_true); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_null(const uint8_t *json) const noexcept { + bool is_null_string = !atomparsing::str4ncmp(json, "null") && jsoncharutils::is_structural_or_whitespace(json[4]); + // if we start with 'n', we must be a null + if(!is_null_string && json[0]=='n') { return incorrect_type_error("Not a null but starts with n"); } + return is_null_string; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_string(bool allow_replacement) noexcept { + return get_raw_json_string().unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_string(string_type& receiver, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_string(allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_wobbly_string() noexcept { + return get_raw_json_string().unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_raw_json_string() noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64() noexcept { + auto result = numberparsing::parse_unsigned(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64_in_string() noexcept { + auto result = numberparsing::parse_unsigned_in_string(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64() noexcept { + auto result = numberparsing::parse_integer(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64_in_string() noexcept { + auto result = numberparsing::parse_integer_in_string(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double() noexcept { + auto result = numberparsing::parse_double(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double_in_string() noexcept { + auto result = numberparsing::parse_double_in_string(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_bool() noexcept { + auto result = parse_bool(peek_non_root_scalar("bool")); + if(result.error() == SUCCESS) { advance_non_root_scalar("bool"); } + return result; +} +simdjson_inline simdjson_result value_iterator::is_null() noexcept { + bool is_null_value; + SIMDJSON_TRY(parse_null(peek_non_root_scalar("null")).get(is_null_value)); + if(is_null_value) { advance_non_root_scalar("null"); } + return is_null_value; +} +simdjson_inline bool value_iterator::is_negative() noexcept { + return numberparsing::is_negative(peek_non_root_scalar("numbersign")); +} +simdjson_inline bool value_iterator::is_root_negative() noexcept { + return numberparsing::is_negative(peek_root_scalar("numbersign")); +} +simdjson_inline simdjson_result value_iterator::is_integer() noexcept { + return numberparsing::is_integer(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number_type() noexcept { + return numberparsing::get_number_type(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number() noexcept { + number num; + error_code error = numberparsing::parse_number(peek_non_root_scalar("number"), num); + if(error) { return error; } + return num; +} + +simdjson_inline simdjson_result value_iterator::is_root_integer(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("is_root_integer"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + return false; // if there are more than 20 characters, it cannot be represented as an integer. + } + auto answer = numberparsing::is_integer(tmpbuf); + // If the parsing was a success, we must still check that it is + // a single scalar. Note that we parse first because of cases like '[]' where + // getting TRAILING_CONTENT is wrong. + if(check_trailing && (answer.error() == SUCCESS) && (!_json_iter->is_single_token())) { return TRAILING_CONTENT; } + return answer; +} + +simdjson_inline simdjson_result value_iterator::get_root_number_type(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto answer = numberparsing::get_number_type(tmpbuf); + if (check_trailing && (answer.error() == SUCCESS) && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + return answer; +} +simdjson_inline simdjson_result value_iterator::get_root_number(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + number num; + error_code error = numberparsing::parse_number(tmpbuf, num); + if(error) { return error; } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("number"); + return num; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_string(bool check_trailing, bool allow_replacement) noexcept { + return get_root_raw_json_string(check_trailing).unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_root_string(check_trailing, allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_wobbly_string(bool check_trailing) noexcept { + return get_root_raw_json_string(check_trailing).unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_raw_json_string(bool check_trailing) noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_bool(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("bool"); + uint8_t tmpbuf[5+1+1]; // +1 for null termination + tmpbuf[5+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 5+1)) { return incorrect_type_error("Not a boolean"); } + auto result = parse_bool(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("bool"); + } + return result; +} +simdjson_inline simdjson_result value_iterator::is_root_null(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("null"); + bool result = (max_len >= 4 && !atomparsing::str4ncmp(json, "null") && + (max_len == 4 || jsoncharutils::is_structural_or_whitespace(json[4]))); + if(result) { // we have something that looks like a null. + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("null"); + } + return result; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::skip_child() noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth >= _depth ); + + return _json_iter->skip_child(depth()); +} + +simdjson_inline value_iterator value_iterator::child() const noexcept { + assert_at_child(); + return { _json_iter, depth()+1, _json_iter->token.position() }; +} + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and iterator depth, which is a desired effect. It does not happen if is_open is +// marked non-inline. +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline bool value_iterator::is_open() const noexcept { + return _json_iter->depth() >= depth(); +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool value_iterator::at_end() const noexcept { + return _json_iter->at_end(); +} + +simdjson_inline bool value_iterator::at_start() const noexcept { + return _json_iter->token.position() == start_position(); +} + +simdjson_inline bool value_iterator::at_first_field() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + return _json_iter->token.position() == start_position() + 1; +} + +simdjson_inline void value_iterator::abandon() noexcept { + _json_iter->abandon(); +} + +simdjson_warn_unused simdjson_inline depth_t value_iterator::depth() const noexcept { + return _depth; +} +simdjson_warn_unused simdjson_inline error_code value_iterator::error() const noexcept { + return _json_iter->error; +} +simdjson_warn_unused simdjson_inline uint8_t *&value_iterator::string_buf_loc() noexcept { + return _json_iter->string_buf_loc(); +} +simdjson_warn_unused simdjson_inline const json_iterator &value_iterator::json_iter() const noexcept { + return *_json_iter; +} +simdjson_warn_unused simdjson_inline json_iterator &value_iterator::json_iter() noexcept { + return *_json_iter; +} + +simdjson_inline const uint8_t *value_iterator::peek_start() const noexcept { + return _json_iter->peek(start_position()); +} +simdjson_inline uint32_t value_iterator::peek_start_length() const noexcept { + return _json_iter->peek_length(start_position()); +} + +simdjson_inline const uint8_t *value_iterator::peek_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return peek_start(); } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return; } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept { + logger::log_start_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + const uint8_t *json; + if (!is_at_start()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + json = peek_start(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + } else { + assert_at_start(); + /** + * We should be prudent. Let us peek. If it is not the right type, we + * return an error. Only once we have determined that we have the right + * type are we allowed to advance! + */ + json = _json_iter->peek(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + _json_iter->return_current_and_advance(); + } + + + return SUCCESS; +} + + +simdjson_inline const uint8_t *value_iterator::peek_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_root(); + return _json_iter->peek(); +} +simdjson_inline const uint8_t *value_iterator::peek_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_non_root_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_root(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} +simdjson_inline void value_iterator::advance_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_non_root_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::incorrect_type_error(const char *message) const noexcept { + logger::log_error(*_json_iter, start_position(), depth(), message); + return INCORRECT_TYPE; +} + +simdjson_inline bool value_iterator::is_at_start() const noexcept { + return position() == start_position(); +} + +simdjson_inline bool value_iterator::is_at_key() const noexcept { + // Keys are at the same depth as the object. + // Note here that we could be safer and check that we are within an object, + // but we do not. + return _depth == _json_iter->_depth && *_json_iter->peek() == '"'; +} + +simdjson_inline bool value_iterator::is_at_iterator_start() const noexcept { + // We can legitimately be either at the first value ([1]), or after the array if it's empty ([]). + auto delta = position() - start_position(); + return delta == 1 || delta == 2; +} + +inline void value_iterator::assert_at_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_container_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position + 1 ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_next() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +simdjson_inline void value_iterator::move_at_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position); +} + +simdjson_inline void value_iterator::move_at_container_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position + 1); +} + +simdjson_inline simdjson_result value_iterator::reset_array() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_array(); +} + +simdjson_inline simdjson_result value_iterator::reset_object() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_object(); +} + +inline void value_iterator::assert_at_child() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth + 1 ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_root() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth == 1 ); +} + +inline void value_iterator::assert_at_non_root_start() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth > 1 ); +} + +inline void value_iterator::assert_is_valid() const noexcept { + SIMDJSON_ASSUME( _json_iter != nullptr ); +} + +simdjson_inline bool value_iterator::is_valid() const noexcept { + return _json_iter != nullptr; +} + +simdjson_inline simdjson_result value_iterator::type() const noexcept { + switch (*peek_start()) { + case '{': + return json_type::object; + case '[': + return json_type::array; + case '"': + return json_type::string; + case 'n': + return json_type::null; + case 't': case 'f': + return json_type::boolean; + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return json_type::number; + default: + return TAPE_ERROR; + } +} + +simdjson_inline token_position value_iterator::start_position() const noexcept { + return _start_position; +} + +simdjson_inline token_position value_iterator::position() const noexcept { + return _json_iter->position(); +} + +simdjson_inline token_position value_iterator::end_position() const noexcept { + return _json_iter->end_position(); +} + +simdjson_inline token_position value_iterator::last_position() const noexcept { + return _json_iter->last_position(); +} + +simdjson_inline error_code value_iterator::report_error(error_code error, const char *message) noexcept { + return _json_iter->report_error(error, message); +} + +} // namespace ondemand +} // namespace icelake +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(icelake::ondemand::value_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/value_iterator-inl.h for icelake */ +/* end file simdjson/generic/ondemand/amalgamated.h for icelake */ +/* including simdjson/icelake/end.h: #include "simdjson/icelake/end.h" */ +/* begin file simdjson/icelake/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/icelake/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_ICELAKE +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "icelake" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/icelake/end.h */ + +#endif // SIMDJSON_ICELAKE_ONDEMAND_H +/* end file simdjson/icelake/ondemand.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(ppc64) +/* including simdjson/ppc64/ondemand.h: #include "simdjson/ppc64/ondemand.h" */ +/* begin file simdjson/ppc64/ondemand.h */ +#ifndef SIMDJSON_PPC64_ONDEMAND_H +#define SIMDJSON_PPC64_ONDEMAND_H + +/* including simdjson/ppc64/begin.h: #include "simdjson/ppc64/begin.h" */ +/* begin file simdjson/ppc64/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "ppc64" */ +#define SIMDJSON_IMPLEMENTATION ppc64 +/* including simdjson/ppc64/base.h: #include "simdjson/ppc64/base.h" */ +/* begin file simdjson/ppc64/base.h */ +#ifndef SIMDJSON_PPC64_BASE_H +#define SIMDJSON_PPC64_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * Implementation for ALTIVEC (PPC64). + */ +namespace ppc64 { + +class implementation; + +namespace { +namespace simd { +template struct simd8; +template struct simd8x64; +} // namespace simd +} // unnamed namespace + +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_BASE_H +/* end file simdjson/ppc64/base.h */ +/* including simdjson/ppc64/intrinsics.h: #include "simdjson/ppc64/intrinsics.h" */ +/* begin file simdjson/ppc64/intrinsics.h */ +#ifndef SIMDJSON_PPC64_INTRINSICS_H +#define SIMDJSON_PPC64_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// This should be the correct header whether +// you use visual studio or other compilers. +#include + +// These are defined by altivec.h in GCC toolchain, it is safe to undef them. +#ifdef bool +#undef bool +#endif + +#ifdef vector +#undef vector +#endif + +static_assert(sizeof(__vector unsigned char) <= simdjson::SIMDJSON_PADDING, "insufficient padding for ppc64"); + +#endif // SIMDJSON_PPC64_INTRINSICS_H +/* end file simdjson/ppc64/intrinsics.h */ +/* including simdjson/ppc64/bitmanipulation.h: #include "simdjson/ppc64/bitmanipulation.h" */ +/* begin file simdjson/ppc64/bitmanipulation.h */ +#ifndef SIMDJSON_PPC64_BITMANIPULATION_H +#define SIMDJSON_PPC64_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num - 1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline int count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num); // Visual Studio wants two underscores +} +#else +simdjson_inline int count_ones(uint64_t input_num) { + return __builtin_popcountll(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + *result = value1 + value2; + return *result < value1; +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_BITMANIPULATION_H +/* end file simdjson/ppc64/bitmanipulation.h */ +/* including simdjson/ppc64/bitmask.h: #include "simdjson/ppc64/bitmask.h" */ +/* begin file simdjson/ppc64/bitmask.h */ +#ifndef SIMDJSON_PPC64_BITMASK_H +#define SIMDJSON_PPC64_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is +// encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(uint64_t bitmask) { + // You can use the version below, however gcc sometimes miscompiles + // vec_pmsum_be, it happens somewhere around between 8 and 9th version. + // The performance boost was not noticeable, falling back to a usual + // implementation. + // __vector unsigned long long all_ones = {~0ull, ~0ull}; + // __vector unsigned long long mask = {bitmask, 0}; + // // Clang and GCC return different values for pmsum for ull so cast it to one. + // // Generally it is not specified by ALTIVEC ISA what is returned by + // // vec_pmsum_be. + // #if defined(__LITTLE_ENDIAN__) + // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[0]); + // #else + // return (uint64_t)(((__vector unsigned long long)vec_pmsum_be(all_ones, mask))[1]); + // #endif + bitmask ^= bitmask << 1; + bitmask ^= bitmask << 2; + bitmask ^= bitmask << 4; + bitmask ^= bitmask << 8; + bitmask ^= bitmask << 16; + bitmask ^= bitmask << 32; + return bitmask; +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif +/* end file simdjson/ppc64/bitmask.h */ +/* including simdjson/ppc64/numberparsing_defs.h: #include "simdjson/ppc64/numberparsing_defs.h" */ +/* begin file simdjson/ppc64/numberparsing_defs.h */ +#ifndef SIMDJSON_PPC64_NUMBERPARSING_DEFS_H +#define SIMDJSON_PPC64_NUMBERPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/intrinsics.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +#if defined(__linux__) +#include +#elif defined(__FreeBSD__) +#include +#endif + +namespace simdjson { +namespace ppc64 { +namespace numberparsing { + +// we don't have appropriate instructions, so let us use a scalar function +// credit: https://johnnylee-sde.github.io/Fast-numeric-string-to-int/ +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + uint64_t val; + std::memcpy(&val, chars, sizeof(uint64_t)); +#ifdef __BIG_ENDIAN__ +#if defined(__linux__) + val = bswap_64(val); +#elif defined(__FreeBSD__) + val = bswap64(val); +#endif +#endif + val = (val & 0x0F0F0F0F0F0F0F0F) * 2561 >> 8; + val = (val & 0x00FF00FF00FF00FF) * 6553601 >> 16; + return uint32_t((val & 0x0000FFFF0000FFFF) * 42949672960001 >> 32); +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace ppc64 +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_PPC64_NUMBERPARSING_DEFS_H +/* end file simdjson/ppc64/numberparsing_defs.h */ +/* including simdjson/ppc64/simd.h: #include "simdjson/ppc64/simd.h" */ +/* begin file simdjson/ppc64/simd.h */ +#ifndef SIMDJSON_PPC64_SIMD_H +#define SIMDJSON_PPC64_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace ppc64 { +namespace { +namespace simd { + +using __m128i = __vector unsigned char; + +template struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i &() const { + return this->value; + } + simdjson_inline operator __m128i &() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { + return vec_or(this->value, (__m128i)other); + } + simdjson_inline Child operator&(const Child other) const { + return vec_and(this->value, (__m128i)other); + } + simdjson_inline Child operator^(const Child other) const { + return vec_xor(this->value, (__m128i)other); + } + simdjson_inline Child bit_andnot(const Child other) const { + return vec_andc(this->value, (__m128i)other); + } + simdjson_inline Child &operator|=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast | other; + return *this_cast; + } + simdjson_inline Child &operator&=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast & other; + return *this_cast; + } + simdjson_inline Child &operator^=(const Child other) { + auto this_cast = static_cast(this); + *this_cast = *this_cast ^ other; + return *this_cast; + } +}; + +template > +struct base8 : base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { + return (__m128i)vec_cmpeq(lhs.value, (__m128i)rhs); + } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(simd8 prev_chunk) const { + __m128i chunk = this->value; +#ifdef __LITTLE_ENDIAN__ + chunk = (__m128i)vec_reve(this->value); + prev_chunk = (__m128i)vec_reve((__m128i)prev_chunk); +#endif + chunk = (__m128i)vec_sld((__m128i)prev_chunk, (__m128i)chunk, 16 - N); +#ifdef __LITTLE_ENDIAN__ + chunk = (__m128i)vec_reve((__m128i)chunk); +#endif + return chunk; + } +}; + +// SIMD byte mask type (returned by things like eq and gt) +template <> struct simd8 : base8 { + static simdjson_inline simd8 splat(bool _value) { + return (__m128i)vec_splats((unsigned char)(-(!!_value))); + } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) + : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) + : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { + __vector unsigned long long result; + const __m128i perm_mask = {0x78, 0x70, 0x68, 0x60, 0x58, 0x50, 0x48, 0x40, + 0x38, 0x30, 0x28, 0x20, 0x18, 0x10, 0x08, 0x00}; + + result = ((__vector unsigned long long)vec_vbpermq((__m128i)this->value, + (__m128i)perm_mask)); +#ifdef __LITTLE_ENDIAN__ + return static_cast(result[1]); +#else + return static_cast(result[0]); +#endif + } + simdjson_inline bool any() const { + return !vec_all_eq(this->value, (__m128i)vec_splats(0)); + } + simdjson_inline simd8 operator~() const { + return this->value ^ (__m128i)splat(true); + } +}; + +template struct base8_numeric : base8 { + static simdjson_inline simd8 splat(T value) { + (void)value; + return (__m128i)vec_splats(value); + } + static simdjson_inline simd8 zero() { return splat(0); } + static simdjson_inline simd8 load(const T values[16]) { + return (__m128i)(vec_vsx_ld(0, reinterpret_cast(values))); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16(T v0, T v1, T v2, T v3, T v4, + T v5, T v6, T v7, T v8, T v9, + T v10, T v11, T v12, T v13, + T v14, T v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, v13, + v14, v15); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) + : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { + vec_vsx_st(this->value, 0, reinterpret_cast<__m128i *>(dst)); + } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { + return (__m128i)((__m128i)this->value + (__m128i)other); + } + simdjson_inline simd8 operator-(const simd8 other) const { + return (__m128i)((__m128i)this->value - (__m128i)other); + } + simdjson_inline simd8 &operator+=(const simd8 other) { + *this = *this + other; + return *static_cast *>(this); + } + simdjson_inline simd8 &operator-=(const simd8 other) { + *this = *this - other; + return *static_cast *>(this); + } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior + // for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return (__m128i)vec_perm((__m128i)lookup_table, (__m128i)lookup_table, this->value); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted + // as a bitset). Passing a 0 value for mask would be equivalent to writing out + // every byte to output. Only the first 16 - count_ones(mask) bytes of the + // result are significant but 16 bytes get written. Design consideration: it + // seems like a function with the signature simd8 compress(uint32_t mask) + // would be sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L *output) const { + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + using internal::thintable_epi8; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. +#ifdef __LITTLE_ENDIAN__ + __m128i shufmask = (__m128i)(__vector unsigned long long){ + thintable_epi8[mask1], thintable_epi8[mask2]}; +#else + __m128i shufmask = (__m128i)(__vector unsigned long long){ + thintable_epi8[mask2], thintable_epi8[mask1]}; + shufmask = (__m128i)vec_reve((__m128i)shufmask); +#endif + // we increment by 0x08 the second half of the mask + shufmask = ((__m128i)shufmask) + + ((__m128i)(__vector int){0, 0, 0x08080808, 0x08080808}); + + // this is the version "nearly pruned" + __m128i pruned = vec_perm(this->value, this->value, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + vec_vsx_ld(0, reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = vec_perm(pruned, (__m128i)vec_splats(0), compactmask); + vec_vsx_st(answer, 0, reinterpret_cast<__m128i *>(output)); + } + + template + simdjson_inline simd8 + lookup_16(L replace0, L replace1, L replace2, L replace3, L replace4, + L replace5, L replace6, L replace7, L replace8, L replace9, + L replace10, L replace11, L replace12, L replace13, L replace14, + L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, replace4, replace5, replace6, + replace7, replace8, replace9, replace10, replace11, replace12, + replace13, replace14, replace15)); + } +}; + +// Signed bytes +template <> struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) + : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t *values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8(int8_t v0, int8_t v1, int8_t v2, int8_t v3, + int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, + int8_t v12, int8_t v13, int8_t v14, int8_t v15) + : simd8((__m128i)(__vector signed char){v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10, v11, v12, v13, v14, + v15}) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 + repeat_16(int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, + int8_t v6, int8_t v7, int8_t v8, int8_t v9, int8_t v10, int8_t v11, + int8_t v12, int8_t v13, int8_t v14, int8_t v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15); + } + + // Order-sensitive comparisons + simdjson_inline simd8 + max_val(const simd8 other) const { + return (__m128i)vec_max((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + min_val(const simd8 other) const { + return (__m128i)vec_min((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + operator>(const simd8 other) const { + return (__m128i)vec_cmpgt((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } + simdjson_inline simd8 + operator<(const simd8 other) const { + return (__m128i)vec_cmplt((__vector signed char)this->value, + (__vector signed char)(__m128i)other); + } +}; + +// Unsigned bytes +template <> struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) + : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t *values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline + simd8(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, + uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, uint8_t v10, + uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15) + : simd8((__m128i){v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15}) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 + repeat_16(uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, + uint8_t v5, uint8_t v6, uint8_t v7, uint8_t v8, uint8_t v9, + uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, + uint8_t v15) { + return simd8(v0, v1, v2, v3, v4, v5, v6, v7, v8, v9, v10, v11, v12, + v13, v14, v15); + } + + // Saturated math + simdjson_inline simd8 + saturating_add(const simd8 other) const { + return (__m128i)vec_adds(this->value, (__m128i)other); + } + simdjson_inline simd8 + saturating_sub(const simd8 other) const { + return (__m128i)vec_subs(this->value, (__m128i)other); + } + + // Order-specific operations + simdjson_inline simd8 + max_val(const simd8 other) const { + return (__m128i)vec_max(this->value, (__m128i)other); + } + simdjson_inline simd8 + min_val(const simd8 other) const { + return (__m128i)vec_min(this->value, (__m128i)other); + } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 + gt_bits(const simd8 other) const { + return this->saturating_sub(other); + } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 + lt_bits(const simd8 other) const { + return other.saturating_sub(*this); + } + simdjson_inline simd8 + operator<=(const simd8 other) const { + return other.max_val(*this) == other; + } + simdjson_inline simd8 + operator>=(const simd8 other) const { + return other.min_val(*this) == other; + } + simdjson_inline simd8 + operator>(const simd8 other) const { + return this->gt_bits(other).any_bits_set(); + } + simdjson_inline simd8 + operator<(const simd8 other) const { + return this->gt_bits(other).any_bits_set(); + } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { + return (__m128i)vec_cmpeq(this->value, (__m128i)vec_splats(uint8_t(0))); + } + simdjson_inline simd8 bits_not_set(simd8 bits) const { + return (*this & bits).bits_not_set(); + } + simdjson_inline simd8 any_bits_set() const { + return ~this->bits_not_set(); + } + simdjson_inline simd8 any_bits_set(simd8 bits) const { + return ~this->bits_not_set(bits); + } + simdjson_inline bool bits_not_set_anywhere() const { + return vec_all_eq(this->value, (__m128i)vec_splats(0)); + } + simdjson_inline bool any_bits_set_anywhere() const { + return !bits_not_set_anywhere(); + } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { + return vec_all_eq(vec_and(this->value, (__m128i)bits), + (__m128i)vec_splats(0)); + } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { + return !bits_not_set_anywhere(bits); + } + template simdjson_inline simd8 shr() const { + return simd8( + (__m128i)vec_sr(this->value, (__m128i)vec_splat_u8(N))); + } + template simdjson_inline simd8 shl() const { + return simd8( + (__m128i)vec_sl(this->value, (__m128i)vec_splat_u8(N))); + } +}; + +template struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, + "PPC64 kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64 &o) = delete; // no copy allowed + simd8x64 & + operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, + const simd8 chunk2, const simd8 chunk3) + : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) + : chunks{simd8::load(ptr), simd8::load(ptr + 16), + simd8::load(ptr + 32), simd8::load(ptr + 48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr + sizeof(simd8) * 0); + this->chunks[1].store(ptr + sizeof(simd8) * 1); + this->chunks[2].store(ptr + sizeof(simd8) * 2); + this->chunks[3].store(ptr + sizeof(simd8) * 3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | + (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T *output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), + output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), + output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), + output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask()); + uint64_t r1 = this->chunks[1].to_bitmask(); + uint64_t r2 = this->chunks[2].to_bitmask(); + uint64_t r3 = this->chunks[3].to_bitmask(); + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64(this->chunks[0] == mask, this->chunks[1] == mask, + this->chunks[2] == mask, this->chunks[3] == mask) + .to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64(this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3]) + .to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64(this->chunks[0] <= mask, this->chunks[1] <= mask, + this->chunks[2] <= mask, this->chunks[3] <= mask) + .to_bitmask(); + } +}; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_SIMD_INPUT_H +/* end file simdjson/ppc64/simd.h */ +/* including simdjson/ppc64/stringparsing_defs.h: #include "simdjson/ppc64/stringparsing_defs.h" */ +/* begin file simdjson/ppc64/stringparsing_defs.h */ +#ifndef SIMDJSON_PPC64_STRINGPARSING_DEFS_H +#define SIMDJSON_PPC64_STRINGPARSING_DEFS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/simd.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote + copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { + return ((bs_bits - 1) & quote_bits) != 0; + } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { + return trailing_zeroes(quote_bits); + } + simdjson_inline int backslash_index() { + return trailing_zeroes(bs_bits); + } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote +backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), + "backslash and quote finder must process fewer than " + "SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + sizeof(v0)); + v0.store(dst); + v1.store(dst + sizeof(v0)); + + // Getting a 64-bit bitmask is much cheaper than multiple 16-bit bitmasks on + // PPC; therefore, we smash them together into a 64-byte mask and get the + // bitmask from there. + uint64_t bs_and_quote = + simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_PPC64_STRINGPARSING_DEFS_H +/* end file simdjson/ppc64/stringparsing_defs.h */ + +#define SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT 1 +/* end file simdjson/ppc64/begin.h */ +/* including simdjson/generic/ondemand/amalgamated.h for ppc64: #include "simdjson/generic/ondemand/amalgamated.h" */ +/* begin file simdjson/generic/ondemand/amalgamated.h for ppc64 */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H) +#error simdjson/generic/ondemand/dependencies.h must be included before simdjson/generic/ondemand/amalgamated.h! +#endif + +// Stuff other things depend on +/* including simdjson/generic/ondemand/base.h for ppc64: #include "simdjson/generic/ondemand/base.h" */ +/* begin file simdjson/generic/ondemand/base.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +/** + * A fast, simple, DOM-like interface that parses JSON as you use it. + * + * Designed for maximum speed and a lower memory profile. + */ +namespace ondemand { + +/** Represents the depth of a JSON value (number of nested arrays/objects). */ +using depth_t = int32_t; + +/** @copydoc simdjson::ppc64::number_type */ +using number_type = simdjson::ppc64::number_type; + +/** @private Position in the JSON buffer indexes */ +using token_position = const uint32_t *; + +class array; +class array_iterator; +class document; +class document_reference; +class document_stream; +class field; +class json_iterator; +enum class json_type; +struct number; +class object; +class object_iterator; +class parser; +class raw_json_string; +class token_iterator; +class value; +class value_iterator; + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_BASE_H +/* end file simdjson/generic/ondemand/base.h for ppc64 */ +/* including simdjson/generic/ondemand/value_iterator.h for ppc64: #include "simdjson/generic/ondemand/value_iterator.h" */ +/* begin file simdjson/generic/ondemand/value_iterator.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * Iterates through a single JSON value at a particular depth. + * + * Does not keep track of the type of value: provides methods for objects, arrays and scalars and expects + * the caller to call the right ones. + * + * @private This is not intended for external use. + */ +class value_iterator { +protected: + /** The underlying JSON iterator */ + json_iterator *_json_iter{}; + /** The depth of this value */ + depth_t _depth{}; + /** + * The starting token index for this value + */ + token_position _start_position{}; + +public: + simdjson_inline value_iterator() noexcept = default; + + /** + * Denote that we're starting a document. + */ + simdjson_inline void start_document() noexcept; + + /** + * Skips a non-iterated or partially-iterated JSON value, whether it is a scalar, array or object. + * + * Optimized for scalars. + */ + simdjson_warn_unused simdjson_inline error_code skip_child() noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is at the start of the value + */ + simdjson_inline bool at_start() const noexcept; + + /** + * Tell whether the value is open--if the value has not been used, or the array/object is still open. + */ + simdjson_inline bool is_open() const noexcept; + + /** + * Tell whether the value is at an object's first field (just after the {). + */ + simdjson_inline bool at_first_field() const noexcept; + + /** + * Abandon all iteration. + */ + simdjson_inline void abandon() noexcept; + + /** + * Get the child value as a value_iterator. + */ + simdjson_inline value_iterator child_value() const noexcept; + + /** + * Get the depth of this value. + */ + simdjson_inline int32_t depth() const noexcept; + + /** + * Get the JSON type of this value. + * + * @error TAPE_ERROR when the JSON value is a bad token like "}" "," or "alse". + */ + simdjson_inline simdjson_result type() const noexcept; + + /** + * @addtogroup object Object iteration + * + * Methods to iterate and find object fields. These methods generally *assume* the value is + * actually an object; the caller is responsible for keeping track of that fact. + * + * @{ + */ + + /** + * Start an object iteration. + * + * @returns Whether the object had any fields (returns false for empty). + * @error INCORRECT_TYPE if there is no opening { + */ + simdjson_warn_unused simdjson_inline simdjson_result start_object() noexcept; + /** + * Start an object iteration from the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_object() noexcept; + /** + * Checks whether an object could be started from the root. May be called by start_root_object. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_object() noexcept; + /** + * Start an object iteration after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_object() noexcept; + /** + * Start an object iteration from the root, after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_object() noexcept; + + /** + * Moves to the next field in an object. + * + * Looks for , and }. If } is found, the object is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_field() noexcept; + + /** + * Get the current field's key. + */ + simdjson_warn_unused simdjson_inline simdjson_result field_key() noexcept; + + /** + * Pass the : in the field and move to its value. + */ + simdjson_warn_unused simdjson_inline error_code field_value() noexcept; + + /** + * Find the next field with the given key. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline error_code find_field(const std::string_view key) noexcept; + + /** + * Find the next field with the given key, *without* unescaping. This assumes object order: it + * will not find the field if it was already passed when looking for some *other* field. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_raw(const std::string_view key) noexcept; + + /** + * Find the field with the given key without regard to order, and *without* unescaping. + * + * This is an unordered object lookup: if the field is not found initially, it will cycle around and scan from the beginning. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_unordered_raw(const std::string_view key) noexcept; + + /** @} */ + + /** + * @addtogroup array Array iteration + * Methods to iterate over array elements. These methods generally *assume* the value is actually + * an object; the caller is responsible for keeping track of that fact. + * @{ + */ + + /** + * Check for an opening [ and start an array iteration. + * + * @returns Whether the array had any elements (returns false for empty). + * @error INCORRECT_TYPE If there is no [. + */ + simdjson_warn_unused simdjson_inline simdjson_result start_array() noexcept; + /** + * Check for an opening [ and start an array iteration while at the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_array() noexcept; + /** + * Checks whether an array could be started from the root. May be called by start_root_array. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_array() noexcept; + /** + * Start an array iteration, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_array() noexcept; + /** + * Start an array iteration from the root, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_array() noexcept; + + /** + * Moves to the next element in an array. + * + * Looks for , and ]. If ] is found, the array is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return Whether there is another element in the array. + * @error TAPE_ERROR If there is a comma missing between elements. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_element() noexcept; + + /** + * Get a child value iterator. + */ + simdjson_warn_unused simdjson_inline value_iterator child() const noexcept; + + /** @} */ + + /** + * @defgroup scalar Scalar values + * @addtogroup scalar + * @{ + */ + + simdjson_warn_unused simdjson_inline simdjson_result get_string(bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_bool() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_null() noexcept; + simdjson_warn_unused simdjson_inline bool is_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_integer() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + simdjson_warn_unused simdjson_inline simdjson_result get_root_string(bool check_trailing, bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_wobbly_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_raw_json_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_bool(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline bool is_root_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_integer(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number_type(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_null(bool check_trailing) noexcept; + + simdjson_inline error_code error() const noexcept; + simdjson_inline uint8_t *&string_buf_loc() noexcept; + simdjson_inline const json_iterator &json_iter() const noexcept; + simdjson_inline json_iterator &json_iter() noexcept; + + simdjson_inline void assert_is_valid() const noexcept; + simdjson_inline bool is_valid() const noexcept; + + /** @} */ +protected: + /** + * Restarts an array iteration. + * @returns Whether the array has any elements (returns false for empty). + */ + simdjson_inline simdjson_result reset_array() noexcept; + /** + * Restarts an object iteration. + * @returns Whether the object has any fields (returns false for empty). + */ + simdjson_inline simdjson_result reset_object() noexcept; + /** + * move_at_start(): moves us so that we are pointing at the beginning of + * the container. It updates the index so that at_start() is true and it + * syncs the depth. The user can then create a new container instance. + * + * Usage: used with value::count_elements(). + **/ + simdjson_inline void move_at_start() noexcept; + + /** + * move_at_container_start(): moves us so that we are pointing at the beginning of + * the container so that assert_at_container_start() passes. + * + * Usage: used with reset_array() and reset_object(). + **/ + simdjson_inline void move_at_container_start() noexcept; + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + simdjson_inline value_iterator(json_iterator *json_iter, depth_t depth, token_position start_index) noexcept; + + simdjson_inline simdjson_result parse_null(const uint8_t *json) const noexcept; + simdjson_inline simdjson_result parse_bool(const uint8_t *json) const noexcept; + simdjson_inline const uint8_t *peek_start() const noexcept; + simdjson_inline uint32_t peek_start_length() const noexcept; + + /** + * The general idea of the advance_... methods and the peek_* methods + * is that you first peek and check that you have desired type. If you do, + * and only if you do, then you advance. + * + * We used to unconditionally advance. But this made reasoning about our + * current state difficult. + * Suppose you always advance. Look at the 'value' matching the key + * "shadowable" in the following example... + * + * ({"globals":{"a":{"shadowable":[}}}}) + * + * If the user thinks it is a Boolean and asks for it, then we check the '[', + * decide it is not a Boolean, but still move into the next character ('}'). Now + * we are left pointing at '}' right after a '['. And we have not yet reported + * an error, only that we do not have a Boolean. + * + * If, instead, you just stand your ground until it is content that you know, then + * you will only even move beyond the '[' if the user tells you that you have an + * array. So you will be at the '}' character inside the array and, hopefully, you + * will then catch the error because an array cannot start with '}', but the code + * processing Boolean values does not know this. + * + * So the contract is: first call 'peek_...' and then call 'advance_...' only + * if you have determined that it is a type you can handle. + * + * Unfortunately, it makes the code more verbose, longer and maybe more error prone. + */ + + simdjson_inline void advance_scalar(const char *type) noexcept; + simdjson_inline void advance_root_scalar(const char *type) noexcept; + simdjson_inline void advance_non_root_scalar(const char *type) noexcept; + + simdjson_inline const uint8_t *peek_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_root_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_non_root_scalar(const char *type) noexcept; + + + simdjson_inline error_code start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept; + simdjson_inline error_code end_container() noexcept; + + /** + * Advance to a place expecting a value (increasing depth). + * + * @return The current token (the one left behind). + * @error TAPE_ERROR If the document ended early. + */ + simdjson_inline simdjson_result advance_to_value() noexcept; + + simdjson_inline error_code incorrect_type_error(const char *message) const noexcept; + simdjson_inline error_code error_unless_more_tokens(uint32_t tokens=1) const noexcept; + + simdjson_inline bool is_at_start() const noexcept; + /** + * is_at_iterator_start() returns true on an array or object after it has just been + * created, whether the instance is empty or not. + * + * Usage: used by array::begin() in debug mode (SIMDJSON_DEVELOPMENT_CHECKS) + */ + simdjson_inline bool is_at_iterator_start() const noexcept; + + /** + * Assuming that we are within an object, this returns true if we + * are pointing at a key. + * + * Usage: the skip_child() method should never be used while we are pointing + * at a key inside an object. + */ + simdjson_inline bool is_at_key() const noexcept; + + inline void assert_at_start() const noexcept; + inline void assert_at_container_start() const noexcept; + inline void assert_at_root() const noexcept; + inline void assert_at_child() const noexcept; + inline void assert_at_next() const noexcept; + inline void assert_at_non_root_start() const noexcept; + + /** Get the starting position of this value */ + simdjson_inline token_position start_position() const noexcept; + + /** @copydoc error_code json_iterator::position() const noexcept; */ + simdjson_inline token_position position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position last_position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position end_position() const noexcept; + /** @copydoc error_code json_iterator::report_error(error_code error, const char *message) noexcept; */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + friend class document; + friend class object; + friend class array; + friend class value; +}; // value_iterator + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::value_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H +/* end file simdjson/generic/ondemand/value_iterator.h for ppc64 */ +/* including simdjson/generic/ondemand/value.h for ppc64: #include "simdjson/generic/ondemand/value.h" */ +/* begin file simdjson/generic/ondemand/value.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * 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. + */ +class value { +public: + /** + * Create a new invalid value. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline value() noexcept = default; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) noexcept; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() noexcept; + + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() noexcept; + + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + + /** + * Cast this JSON value (inside string) to a unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + + /** + * Cast this JSON value to a "wobbly" string. + * + * The string is may not be a valid UTF-8 string. + * See https://simonsapin.github.io/wtf-8/ + * + * Important: a value should be consumed once. Calling get_wobbly_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * @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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); +#endif + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + * + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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). + * + * @return 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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the value is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the value is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the value is an integer number. 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). + * + * 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. However, if this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view is guaranteed to be + * a non-space token. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + * + * See also value::raw_json(). + */ + simdjson_inline std::string_view raw_json_token() noexcept; + + /** + * Get a string_view pointing at this value in the JSON document. + * If this element is an array or an object, it consumes the array or the object + * and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + * If this element is a scalar (string, number, Boolean, null), it returns what + * raw_json_token() would return. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + simdjson_inline simdjson_result current_location() noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. + * + * Calling at_pointer() on non-document instances (e.g., arrays and objects) is not + * standardized (by RFC 6901). We provide some experimental support for JSON pointers + * on non-document instances. Yet it is not the case when calling at_pointer on an array + * or an object instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + +protected: + /** + * Create a value. + */ + simdjson_inline value(const value_iterator &iter) noexcept; + + /** + * Skip this value, allowing iteration to continue. + */ + simdjson_inline void skip() noexcept; + + /** + * Start a value at the current position. + * + * (It should already be started; this is just a self-documentation method.) + */ + static simdjson_inline value start(const value_iterator &iter) noexcept; + + /** + * Resume a value. + */ + static simdjson_inline value resume(const value_iterator &iter) noexcept; + + /** + * Get the object, starting or resuming it as necessary + */ + simdjson_inline simdjson_result start_or_resume_object() noexcept; + + // simdjson_inline void log_value(const char *type) const noexcept; + // simdjson_inline void log_error(const char *message) const noexcept; + + value_iterator iter{}; + + friend class document; + friend class array_iterator; + friend class field; + friend class object; + friend struct simdjson_result; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::value &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result get_array() noexcept; + simdjson_inline simdjson_result get_object() noexcept; + + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() noexcept; + + template simdjson_inline error_code get(T &out) noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator ppc64::ondemand::array() noexcept(false); + simdjson_inline operator ppc64::ondemand::object() noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator ppc64::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * 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). + */ + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + + /** @copydoc simdjson_inline std::string_view value::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + + /** @copydoc simdjson_inline simdjson_result current_location() noexcept */ + simdjson_inline simdjson_result current_location() noexcept; + /** @copydoc simdjson_inline int32_t current_depth() const noexcept */ + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_H +/* end file simdjson/generic/ondemand/value.h for ppc64 */ +/* including simdjson/generic/ondemand/logger.h for ppc64: #include "simdjson/generic/ondemand/logger.h" */ +/* begin file simdjson/generic/ondemand/logger.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +// Logging should be free unless SIMDJSON_VERBOSE_LOGGING is set. Importantly, it is critical +// that the call to the log functions be side-effect free. Thus, for example, you should not +// create temporary std::string instances. +namespace logger { + +enum class log_level : int32_t { + info = 0, + error = 1 +}; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + +// We do not want these functions to be 'really inlined' since real inlining is +// for performance purposes and if you are using the loggers, you do not care about +// performance (or should not). +static inline void log_headers() noexcept; +// If args are provided, title will be treated as format string +template +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; +template +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; +static inline void log_event(const json_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_value(const json_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_start_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; + +static inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail="") noexcept; +static inline void log_error(const json_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +static inline void log_event(const value_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const value_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_error(const value_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +} // namespace logger +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_H +/* end file simdjson/generic/ondemand/logger.h for ppc64 */ +/* including simdjson/generic/ondemand/token_iterator.h for ppc64: #include "simdjson/generic/ondemand/token_iterator.h" */ +/* begin file simdjson/generic/ondemand/token_iterator.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * Iterates through JSON tokens (`{` `}` `[` `]` `,` `:` `""` `123` `true` `false` `null`) + * detected by stage 1. + * + * @private This is not intended for external use. + */ +class token_iterator { +public: + /** + * Create a new invalid token_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline token_iterator() noexcept = default; + simdjson_inline token_iterator(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator &operator=(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator(const token_iterator &other) noexcept = default; + simdjson_inline token_iterator &operator=(const token_iterator &other) noexcept = default; + + /** + * Advance to the next token (returning the current one). + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + /** + * Reports the current offset in bytes from the start of the underlying buffer. + */ + simdjson_inline uint32_t current_offset() const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + + /** + * Return the current index. + */ + simdjson_inline token_position position() const noexcept; + /** + * Reset to a previously saved index. + */ + simdjson_inline void set_position(token_position target_position) noexcept; + + // NOTE: we don't support a full C++ iterator interface, because we expect people to make + // different calls to advance the iterator based on *their own* state. + + simdjson_inline bool operator==(const token_iterator &other) const noexcept; + simdjson_inline bool operator!=(const token_iterator &other) const noexcept; + simdjson_inline bool operator>(const token_iterator &other) const noexcept; + simdjson_inline bool operator>=(const token_iterator &other) const noexcept; + simdjson_inline bool operator<(const token_iterator &other) const noexcept; + simdjson_inline bool operator<=(const token_iterator &other) const noexcept; + +protected: + simdjson_inline token_iterator(const uint8_t *buf, token_position position) noexcept; + + /** + * Get the index of the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_index(int32_t delta=0) const noexcept; + /** + * Get the index of the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline uint32_t peek_index(token_position position) const noexcept; + + const uint8_t *buf{}; + token_position _position{}; + + friend class json_iterator; + friend class value_iterator; + friend class object; + template + 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; + template + 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; +}; + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::token_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H +/* end file simdjson/generic/ondemand/token_iterator.h for ppc64 */ +/* including simdjson/generic/ondemand/json_iterator.h for ppc64: #include "simdjson/generic/ondemand/json_iterator.h" */ +/* begin file simdjson/generic/ondemand/json_iterator.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * Iterates through JSON tokens, keeping track of depth and string buffer. + * + * @private This is not intended for external use. + */ +class json_iterator { +protected: + token_iterator token{}; + ondemand::parser *parser{}; + /** + * Next free location in the string buffer. + * + * Used by raw_json_string::unescape() to have a place to unescape strings to. + */ + uint8_t *_string_buf_loc{}; + /** + * JSON error, if there is one. + * + * INCORRECT_TYPE and NO_SUCH_FIELD are *not* stored here, ever. + * + * PERF NOTE: we *hope* this will be elided into control flow, as it is only used (a) in the first + * iteration of the loop, or (b) for the final iteration after a missing comma is found in ++. If + * this is not elided, we should make sure it's at least not using up a register. Failing that, + * we should store it in document so there's only one of them. + */ + error_code error{SUCCESS}; + /** + * Depth of the current token in the JSON. + * + * - 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. + */ + depth_t _depth{}; + /** + * Beginning of the document indexes. + * Normally we have root == parser->implementation->structural_indexes.get() + * but this may differ, especially in streaming mode (where we have several + * documents); + */ + token_position _root{}; + /** + * Normally, a json_iterator operates over a single document, but in + * some cases, we may have a stream of documents. This attribute is meant + * as meta-data: the json_iterator works the same irrespective of the + * value of this attribute. + */ + bool _streaming{false}; + +public: + simdjson_inline json_iterator() noexcept = default; + simdjson_inline json_iterator(json_iterator &&other) noexcept; + simdjson_inline json_iterator &operator=(json_iterator &&other) noexcept; + simdjson_inline explicit json_iterator(const json_iterator &other) noexcept = default; + simdjson_inline json_iterator &operator=(const json_iterator &other) noexcept = default; + /** + * Skips a JSON value, whether it is a scalar, array or object. + */ + simdjson_warn_unused simdjson_inline error_code skip_child(depth_t parent_depth) noexcept; + + /** + * Tell whether the iterator is still at the start + */ + simdjson_inline bool at_root() const noexcept; + + /** + * Tell whether we should be expected to run in streaming + * mode (iterating over many documents). It is pure metadata + * that does not affect how the iterator works. It is used by + * start_root_array() and start_root_object(). + */ + simdjson_inline bool streaming() const noexcept; + + /** + * Get the root value iterator + */ + simdjson_inline token_position root_position() const noexcept; + /** + * Assert that we are at the document depth (== 1) + */ + simdjson_inline void assert_at_document_depth() const noexcept; + /** + * Assert that we are at the root of the document + */ + simdjson_inline void assert_at_root() const noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is live (has not been moved). + */ + simdjson_inline bool is_alive() const noexcept; + + /** + * Abandon this iterator, setting depth to 0 (as if the document is finished). + */ + simdjson_inline void abandon() noexcept; + + /** + * Advance the current token without modifying depth. + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + + /** + * Returns true if there is a single token in the index (i.e., it is + * a JSON with a scalar value such as a single number). + * + * @return whether there is a single token + */ + simdjson_inline bool is_single_token() const noexcept; + + /** + * Assert that there are at least the given number of tokens left. + * + * Has no effect in release builds. + */ + simdjson_inline void assert_more_tokens(uint32_t required_tokens=1) const noexcept; + /** + * Assert that the given position addresses an actual token (is within bounds). + * + * Has no effect in release builds. + */ + simdjson_inline void assert_valid_position(token_position position) const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + /** + * Get a pointer to the current location in the input buffer. + * + * This is not null-terminated; it is a view into the JSON. + * + * You may be pointing outside of the input buffer: it is not generally + * safe to dereference this pointer. + */ + simdjson_inline const uint8_t *unsafe_pointer() const noexcept; + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token to retrieve. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token to retrieve. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + /** + * Get the JSON text for the last token in the document. + * + * This is not null-terminated; it is a view into the JSON. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek_last() const noexcept; + + /** + * Ascend one level. + * + * Validates that the depth - 1 == parent_depth. + * + * @param parent_depth the expected parent depth. + */ + simdjson_inline void ascend_to(depth_t parent_depth) noexcept; + + /** + * Descend one level. + * + * Validates that the new depth == child_depth. + * + * @param child_depth the expected child depth. + */ + simdjson_inline void descend_to(depth_t child_depth) noexcept; + simdjson_inline void descend_to(depth_t child_depth, int32_t delta) noexcept; + + /** + * Get current depth. + */ + simdjson_inline depth_t depth() const noexcept; + + /** + * Get current (writeable) location in the string buffer. + */ + simdjson_inline uint8_t *&string_buf_loc() noexcept; + + /** + * Report an unrecoverable error, preventing further iteration. + * + * @param error The error to report. Must not be SUCCESS, UNINITIALIZED, INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + /** + * Log error, but don't stop iteration. + * @param error The error to report. Must be INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code optional_error(error_code error, const char *message) noexcept; + + /** + * Take an input in json containing max_len characters and attempt to copy it over to tmpbuf, a buffer with + * N bytes of capacity. It will return false if N is too small (smaller than max_len) of if it is zero. + * The buffer (tmpbuf) is padded with space characters. + */ + simdjson_warn_unused simdjson_inline bool copy_to_buffer(const uint8_t *json, uint32_t max_len, uint8_t *tmpbuf, size_t N) noexcept; + + simdjson_inline token_position position() const noexcept; + /** + * Write the raw_json_string to the string buffer and return a string_view. + * Each raw_json_string should be unescaped once, or else the string buffer might + * overflow. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, bool allow_replacement) noexcept; + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in) noexcept; + + simdjson_inline void reenter_child(token_position position, depth_t child_depth) noexcept; + + simdjson_inline error_code consume_character(char c) noexcept; +#if SIMDJSON_DEVELOPMENT_CHECKS + simdjson_inline token_position start_position(depth_t depth) const noexcept; + simdjson_inline void set_start_position(depth_t depth, token_position position) noexcept; +#endif + + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Updates this json iterator so that it is back at the beginning of the document, + * as if it had just been created. + */ + inline void rewind() noexcept; + /** + * This checks whether the {,},[,] are balanced so that the document + * ends with proper zero depth. This requires scanning the whole document + * and it may be expensive. It is expected that it will be rarely called. + * It does not attempt to match { with } and [ with ]. + */ + inline bool balanced() const noexcept; +protected: + simdjson_inline json_iterator(const uint8_t *buf, ondemand::parser *parser) noexcept; + /// The last token before the end + simdjson_inline token_position last_position() const noexcept; + /// The token *at* the end. This points at gibberish and should only be used for comparison. + simdjson_inline token_position end_position() const noexcept; + /// The end of the buffer. + simdjson_inline token_position end() const noexcept; + + friend class document; + friend class document_stream; + friend class object; + friend class array; + friend class value; + friend class raw_json_string; + friend class parser; + friend class value_iterator; + template + 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; + template + 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; +}; // json_iterator + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::json_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H +/* end file simdjson/generic/ondemand/json_iterator.h for ppc64 */ +/* including simdjson/generic/ondemand/json_type.h for ppc64: #include "simdjson/generic/ondemand/json_type.h" */ +/* begin file simdjson/generic/ondemand/json_type.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * The type of a JSON value. + */ +enum class json_type { + // Start at 1 to catch uninitialized / default values more easily + array=1, ///< A JSON array ( [ 1, 2, 3 ... ] ) + 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" ...) + boolean, ///< A JSON boolean (true or false) + null ///< A JSON null (null) +}; + +/** + * A type representing a JSON number. + * The design of the struct is deliberately straight-forward. All + * functions return standard values with no error check. + */ +struct number { + + /** + * 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 + * }; + */ + simdjson_inline ondemand::number_type get_number_type() const noexcept; + /** + * return true if the automatically determined type of + * the number is number_type::unsigned_integer. + */ + simdjson_inline bool is_uint64() const noexcept; + /** + * return the value as a uint64_t, only valid if is_uint64() is true. + */ + simdjson_inline uint64_t get_uint64() const noexcept; + simdjson_inline operator uint64_t() const noexcept; + + /** + * return true if the automatically determined type of + * the number is number_type::signed_integer. + */ + simdjson_inline bool is_int64() const noexcept; + /** + * return the value as a int64_t, only valid if is_int64() is true. + */ + simdjson_inline int64_t get_int64() const noexcept; + simdjson_inline operator int64_t() const noexcept; + + + /** + * return true if the automatically determined type of + * the number is number_type::floating_point_number. + */ + simdjson_inline bool is_double() const noexcept; + /** + * return the value as a double, only valid if is_double() is true. + */ + simdjson_inline double get_double() const noexcept; + simdjson_inline operator double() const noexcept; + + /** + * Convert the number to a double. Though it always succeed, the conversion + * may be lossy if the number cannot be represented exactly. + */ + simdjson_inline double as_double() const noexcept; + + +protected: + /** + * The next block of declaration is designed so that we can call the number parsing + * functions on a number type. They are protected and should never be used outside + * of the core simdjson library. + */ + friend class value_iterator; + template + friend error_code numberparsing::slow_float_parsing(simdjson_unused const uint8_t * src, W writer); + template + 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); + template + friend error_code numberparsing::parse_number(const uint8_t *const src, W &writer); + /** Store a signed 64-bit value to the number. */ + simdjson_inline void append_s64(int64_t value) noexcept; + /** Store an unsigned 64-bit value to the number. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + /** Store a double value to the number. */ + simdjson_inline void append_double(double value) noexcept; + /** Specifies that the value is a double, but leave it undefined. */ + simdjson_inline void skip_double() noexcept; + /** + * End of friend declarations. + */ + + /** + * Our attributes are a union type (size = 64 bits) + * followed by a type indicator. + */ + union { + double floating_point_number; + int64_t signed_integer; + uint64_t unsigned_integer; + } payload{0}; + number_type type{number_type::signed_integer}; +}; + +/** + * Write the JSON type to the output stream + * + * @param out The output stream. + * @param type The json_type. + */ +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept; + +#if SIMDJSON_EXCEPTIONS +/** + * Send JSON type to an output stream. + * + * @param out The output stream. + * @param type The json_type. + * @throw simdjson_error if the result being printed has an error. If there is an error with the + * underlying output stream, that error will be propagated (simdjson_error will not be + * thrown). + */ +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false); +#endif + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::json_type &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H +/* end file simdjson/generic/ondemand/json_type.h for ppc64 */ +/* including simdjson/generic/ondemand/raw_json_string.h for ppc64: #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * A string escaped per JSON rules, terminated with quote ("). They are used to represent + * unescaped keys inside JSON documents. + * + * (In other words, a pointer to the beginning of a string, just after the start quote, inside a + * JSON file.) + * + * This class is deliberately simplistic and has little functionality. You can + * compare a raw_json_string instance with an unescaped C string, but + * that is nearly all you can do. + * + * 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(). + * + */ +class raw_json_string { +public: + /** + * Create a new invalid raw_json_string. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline raw_json_string() noexcept = default; + + /** + * Create a new invalid raw_json_string pointed at the given location in the JSON. + * + * 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. + */ + simdjson_inline raw_json_string(const uint8_t * _buf) noexcept; + /** + * 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. + */ + simdjson_inline const char * raw() const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done) on target.size() characters, + * and if the raw_json_string instance has a quote character at byte index target.size(). + * We never read more than length + 1 bytes in the raw_json_string instance. + * If length is smaller than target.size(), this will return false. + * + * 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. + */ + 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-byte equal (no escaping is done). + * The std::string_view instance should not contain unescaped quote characters: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * Performance: the comparison is done byte-by-byte which might be inefficient for + * long strings. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + * The provided C string should not contain an unescaped quote character: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(const char* target) const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(const char* target) const noexcept; + + /** + * 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!). + */ + static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept; + static simdjson_inline bool is_free_from_unescaped_quote(const char* target) noexcept; + +private: + + + /** + * This will set the inner pointer to zero, effectively making + * this instance unusable. + */ + simdjson_inline void consume() noexcept { buf = nullptr; } + + /** + * Checks whether the inner pointer is non-null and thus usable. + */ + simdjson_inline simdjson_warn_unused bool alive() const noexcept { return buf != nullptr; } + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result will be a valid UTF-8. + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + * @param allow_replacement Whether we allow replacement of invalid surrogate pairs. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape(json_iterator &iter, bool allow_replacement) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result may not be a valid UTF-8. https://simonsapin.github.io/wtf-8/ + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(json_iterator &iter) const noexcept; + const uint8_t * buf{}; + friend class object; + friend class field; + friend class parser; + friend struct simdjson_result; +}; + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &, const raw_json_string &) noexcept; + +/** + * 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. + */ +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept; +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept; + + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::raw_json_string &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private + + simdjson_inline simdjson_result raw() const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape(ppc64::ondemand::json_iterator &iter, bool allow_replacement) const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(ppc64::ondemand::json_iterator &iter) const noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H +/* end file simdjson/generic/ondemand/raw_json_string.h for ppc64 */ +/* including simdjson/generic/ondemand/parser.h for ppc64: #include "simdjson/generic/ondemand/parser.h" */ +/* begin file simdjson/generic/ondemand/parser.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * The default batch size for document_stream instances for this On Demand kernel. + * Note that different On Demand kernel may use a different DEFAULT_BATCH_SIZE value + * in the future. + */ +static constexpr size_t DEFAULT_BATCH_SIZE = 1000000; +/** + * Some adversary might try to set the batch size to 0 or 1, which might cause problems. + * We set a minimum of 32B since anything else is highly likely to be an error. In practice, + * most users will want a much larger batch size. + * + * All non-negative MINIMAL_BATCH_SIZE values should be 'safe' except that, obviously, no JSON + * document can ever span 0 or 1 byte and that very large values would create memory allocation issues. + */ +static constexpr size_t MINIMAL_BATCH_SIZE = 32; + +/** + * A JSON fragment iterator. + * + * This holds the actual iterator as well as the buffer for writing strings. + */ +class parser { +public: + /** + * Create a JSON parser. + * + * The new parser will have zero capacity. + */ + inline explicit parser(size_t max_capacity = SIMDJSON_MAXSIZE_BYTES) noexcept; + + inline parser(parser &&other) noexcept = default; + simdjson_inline parser(const parser &other) = delete; + simdjson_inline parser &operator=(const parser &other) = delete; + simdjson_inline parser &operator=(parser &&other) noexcept = default; + + /** Deallocate the JSON parser. */ + inline ~parser() noexcept = default; + + /** + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * document doc = parser.iterate(json); + * + * It is expected that the content is a valid UTF-8 file, containing a valid JSON document. + * Otherwise the iterate method may return an error. In particular, the whole input should be + * valid: we do not attempt to tolerate incorrect content either before or after a JSON + * document. If there is a UTF-8 BOM, the parser skips it. + * + * ### IMPORTANT: Validate what you use + * + * Calling iterate on an invalid JSON document may not immediately trigger an error. The call to + * iterate does not parse and validate the whole document. + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * @param len The length of the JSON. + * @param capacity The number of bytes allocated in the JSON (must be at least len+SIMDJSON_PADDING). + * + * @return The document, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate(padded_string_view json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const char *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const uint8_t *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string_view json, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(padded_string &&json) & noexcept = delete; + + /** + * @private + * + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * json_iterator doc = parser.iterate(json); + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * The ondemand::document instance holds the iterator. The document must remain in scope + * while you are accessing instances of ondemand::value, ondemand::object, ondemand::array. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * + * @return The iterator, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate_raw(padded_string_view json) & noexcept; + + + /** + * Parse a buffer containing many JSON documents. + * + * auto json = R"({ "foo": 1 } { "foo": 2 } { "foo": 3 } )"_padded; + * ondemand::parser parser; + * ondemand::document_stream docs = parser.iterate_many(json); + * for (auto & doc : docs) { + * std::cout << doc["foo"] << std::endl; + * } + * // Prints 1 2 3 + * + * No copy of the input buffer is made. + * + * The function is lazy: it may be that no more than one JSON document at a time is parsed. + * + * The caller is responsabile to ensure that the input string data remains unchanged and is + * not deleted during the loop. + * + * ### Format + * + * The buffer must contain a series of one or more JSON documents, concatenated into a single + * buffer, separated by ASCII whitespace. It effectively parses until it has a fully valid document, + * then starts parsing the next document at that point. (It does this with more parallelism and + * lookahead than you might think, though.) + * + * documents that consist of an object or array may omit the whitespace between them, concatenating + * with no separator. Documents that consist of a single primitive (i.e. documents that are not + * arrays or objects) MUST be separated with ASCII whitespace. + * + * The characters inside a JSON document, and between JSON documents, must be valid Unicode (UTF-8). + * If there is a UTF-8 BOM, the parser skips it. + * + * The documents must not exceed batch_size bytes (by default 1MB) or they will fail to parse. + * Setting batch_size to excessively large or excessively small values may impact negatively the + * performance. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * ### Threads + * + * When compiled with SIMDJSON_THREADS_ENABLED, this method will use a single thread under the + * hood to do some lookahead. + * + * ### Parser Capacity + * + * If the parser's current capacity is less than batch_size, it will allocate enough capacity + * to handle it (up to max_capacity). + * + * @param buf The concatenated JSON to parse. + * @param len The length of the concatenated JSON. + * @param batch_size The batch size to use. MUST be larger than the largest document. The sweet + * spot is cache-related: small enough to fit in cache, yet big enough to + * parse as many documents as possible in one tight loop. + * Defaults to 10MB, which has been a reasonable sweet spot in our tests. + * @param allow_comma_separated (defaults on false) This allows a mode where the documents are + * separated by commas instead of whitespace. It comes with a performance + * penalty because the entire document is indexed at once (and the document must be + * less than 4 GB), and there is no multithreading. In this mode, the batch_size parameter + * is effectively ignored, as it is set to at least the document size. + * @return The stream, or an error. An empty input will yield 0 documents rather than an EMPTY error. Errors: + * - MEMALLOC if the parser does not have enough capacity and memory allocation fails + * - CAPACITY if the parser does not have enough capacity and batch_size > max_capacity. + * - other json errors if parsing fails. You should not rely on these errors to always the same for the + * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). + */ + inline simdjson_result iterate_many(const uint8_t *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const char *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const std::string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const std::string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const padded_string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const padded_string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + + /** @private We do not want to allow implicit conversion from C string to std::string. */ + simdjson_result iterate_many(const char *buf, size_t batch_size = DEFAULT_BATCH_SIZE) noexcept = delete; + + /** The capacity of this parser (the largest document it can process). */ + simdjson_inline size_t capacity() const noexcept; + /** The maximum capacity of this parser (the largest document it is allowed to process). */ + simdjson_inline size_t max_capacity() const noexcept; + simdjson_inline void set_max_capacity(size_t max_capacity) noexcept; + /** + * 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. + */ + simdjson_inline size_t max_depth() const noexcept; + + /** + * Ensure this parser has enough memory to process JSON documents up to `capacity` bytes in length + * and `max_depth` depth. + * + * The max_depth 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. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. Defaults to DEFAULT_MAX_DEPTH. + * @return The error, if there is one. + */ + simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept; + + #ifdef SIMDJSON_THREADS_ENABLED + /** + * The parser instance can use threads when they are available to speed up some + * operations. It is enabled by default. Changing this attribute will change the + * behavior of the parser for future operations. + */ + bool threaded{true}; + #endif + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result must be valid UTF-8. + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @param allow_replacement Whether we allow a replacement if the input string contains unmatched surrogate pairs. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement = false) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result may not be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept; + +private: + /** @private [for benchmarking access] The implementation to use */ + std::unique_ptr implementation{}; + size_t _capacity{0}; + size_t _max_capacity; + size_t _max_depth{DEFAULT_MAX_DEPTH}; + std::unique_ptr string_buf{}; +#if SIMDJSON_DEVELOPMENT_CHECKS + std::unique_ptr start_positions{}; +#endif + + friend class json_iterator; + friend class document_stream; +}; + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::parser &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_H +/* end file simdjson/generic/ondemand/parser.h for ppc64 */ + +// All other declarations +/* including simdjson/generic/ondemand/array.h for ppc64: #include "simdjson/generic/ondemand/array.h" */ +/* begin file simdjson/generic/ondemand/array.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * A forward-only JSON array. + */ +class array { +public: + /** + * Create a new invalid array. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline array() noexcept = default; + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result is_empty() & noexcept; + /** + * Reset the iterator so that we are pointing back at the + * beginning of the array. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"([ { "foo": { "a": [ 10, 20, 30 ] }} ])"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/0/foo/a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an array + * instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * Consumes the array and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Get the value at the given index. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; +protected: + /** + * Go to the end of the array, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + + /** + * Begin array iteration. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + */ + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + /** + * Begin array iteration from the root. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + * @error TAPE_ERROR if there is no closing ] at the end of the document. + */ + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + /** + * Begin array iteration. + * + * This version of the method should be called after the initial [ has been verified, and is + * intended for use by switch statements that check the type of a value. + * + * @param iter The iterator. Must be after the initial [. Will be *moved* into the resulting array. + */ + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + + /** + * Create an array at the given Internal array creation. Call array::start() or array::started() instead of this. + * + * @param iter The iterator. Must either be at the start of the first element with iter.is_alive() + * == true, or past the [] with is_alive() == false if the array is empty. Will be *moved* + * into the resulting array. + */ + simdjson_inline array(const value_iterator &iter) noexcept; + + /** + * Iterator marking current position. + * + * iter.is_alive() == false indicates iteration is complete. + */ + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; + friend struct simdjson_result; + friend class array_iterator; +}; + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::array &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + inline simdjson_result count_elements() & noexcept; + inline simdjson_result is_empty() & noexcept; + inline simdjson_result reset() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_H +/* end file simdjson/generic/ondemand/array.h for ppc64 */ +/* including simdjson/generic/ondemand/array_iterator.h for ppc64: #include "simdjson/generic/ondemand/array_iterator.h" */ +/* begin file simdjson/generic/ondemand/array_iterator.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * A forward-only JSON array. + * + * This is an input_iterator, meaning: + * - It is forward-only + * - * must be called exactly once per element. + * - ++ must be called exactly once in between each * (*, ++, *, ++, * ...) + */ +class array_iterator { +public: + /** Create a new, invalid array iterator. */ + simdjson_inline array_iterator() noexcept = default; + + // + // Iterator interface + // + + /** + * Get the current element. + * + * Part of the std::iterator interface. + */ + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + /** + * Check if we are at the end of the JSON. + * + * Part of the std::iterator interface. + * + * @return true if there are no more elements in the JSON array. + */ + simdjson_inline bool operator==(const array_iterator &) const noexcept; + /** + * Check if there are more elements in the JSON array. + * + * Part of the std::iterator interface. + * + * @return true if there are more elements in the JSON array. + */ + simdjson_inline bool operator!=(const array_iterator &) const noexcept; + /** + * Move to the next element. + * + * Part of the std::iterator interface. + */ + simdjson_inline array_iterator &operator++() noexcept; + +private: + value_iterator iter{}; + + simdjson_inline array_iterator(const value_iterator &iter) noexcept; + + friend class array; + friend class value; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::array_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H +/* end file simdjson/generic/ondemand/array_iterator.h for ppc64 */ +/* including simdjson/generic/ondemand/document.h for ppc64: #include "simdjson/generic/ondemand/document.h" */ +/* begin file simdjson/generic/ondemand/document.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * A JSON document. It holds a json_iterator instance. + * + * Used by tokens to get text, and string buffer location. + * + * You must keep the document around during iteration. + */ +class document { +public: + /** + * Create a new invalid document. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline document() noexcept = default; + simdjson_inline document(const document &other) noexcept = delete; // pass your documents by reference, not by copy + simdjson_inline document(document &&other) noexcept = default; + simdjson_inline document &operator=(const document &other) noexcept = delete; + simdjson_inline document &operator=(document &&other) noexcept = default; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() & noexcept; + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() & noexcept; + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + /** + * Cast this JSON value (inside string) to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: Calling get_string() twice on the same document is an error. + * + * @param Whether to allow a replacement character for unmatched surrogate pairs. + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + /** + * Cast this JSON value to a string. + * + * The string is not guaranteed to be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * + * Important: Calling get_wobbly_string() twice on the same document is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is set to 1 (which is the case when building in Debug mode + * by default), and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value if a JSON array or object cannot be found. + * @returns SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result get_value() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() & noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + /** @overload template simdjson_result get() & noexcept */ + template simdjson_inline simdjson_result get() && noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool, value + * + * Be mindful that the document instance must remain in scope while you are accessing object, array and value instances. + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) & noexcept; + /** @overload template error_code get(T &out) & noexcept */ + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() & noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() & noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * 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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is defined, and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value value if a JSON array or object cannot be found. + * @exception SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline operator value() noexcept(false); +#endif + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * To check that an object is empty, it is more performant to use + * the is_empty() method. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) & noexcept; + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to + * a key a single time. Doing object["mykey"].to_string()and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the document is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the document is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the document is an integer number. 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. If this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view may be the padded buffer. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + /** + * 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). + */ + inline void rewind() noexcept; + /** + * Returns debugging information. + */ + inline std::string to_debug_string() noexcept; + /** + * Some unrecoverable error conditions may render the document instance unusable. + * The is_alive() method returns true when the document is still suitable. + */ + inline bool is_alive() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Returns true if this document has been fully parsed. + * If you have consumed the whole document and at_end() returns + * false, then there may be trailing content. + */ + inline bool at_end() const noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() automatically calls rewind between each call. Thus + * all values, objects and arrays that you have created so far (including unescaped strings) + * are invalidated. After calling at_pointer, you need to consume the result: string values + * should be stored in your own variables, arrays should be decoded and stored in your own array-like + * structures and so forth. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + * - SCALAR_DOCUMENT_AS_VALUE if the json_pointer is empty and the document is not a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; +protected: + /** + * Consumes the document. + */ + simdjson_inline error_code consume() noexcept; + + simdjson_inline document(ondemand::json_iterator &&iter) noexcept; + simdjson_inline const uint8_t *text(uint32_t idx) const noexcept; + + simdjson_inline value_iterator resume_value_iterator() noexcept; + simdjson_inline value_iterator get_root_value_iterator() noexcept; + simdjson_inline simdjson_result start_or_resume_object() noexcept; + static simdjson_inline document start(ondemand::json_iterator &&iter) noexcept; + + // + // Fields + // + json_iterator iter{}; ///< Current position in the document + static constexpr depth_t DOCUMENT_DEPTH = 0; ///< document depth is always 0 + + friend class array_iterator; + friend class value; + friend class ondemand::parser; + friend class object; + friend class array; + friend class field; + friend class token; + friend class document_stream; + friend class document_reference; +}; + + +/** + * A document_reference is a thin wrapper around a document reference instance. + */ +class document_reference { +public: + simdjson_inline document_reference() noexcept; + simdjson_inline document_reference(document &d) noexcept; + simdjson_inline document_reference(const document_reference &other) noexcept = default; + simdjson_inline document_reference& operator=(const document_reference &other) noexcept = default; + simdjson_inline void rewind() noexcept; + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + + simdjson_inline simdjson_result is_null() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + simdjson_inline operator document&() const noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator array() & noexcept(false); + simdjson_inline operator object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +private: + document *doc{nullptr}; +}; +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::document &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() & noexcept; + template simdjson_inline simdjson_result get() && noexcept; + + template simdjson_inline error_code get(T &out) & noexcept; + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator ppc64::ondemand::array() & noexcept(false); + simdjson_inline operator ppc64::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator ppc64::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator ppc64::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool at_end() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + + + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::document_reference value, error_code error) noexcept; + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator ppc64::ondemand::array() & noexcept(false); + simdjson_inline operator ppc64::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator ppc64::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator ppc64::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document_reference::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H +/* end file simdjson/generic/ondemand/document.h for ppc64 */ +/* including simdjson/generic/ondemand/document_stream.h for ppc64: #include "simdjson/generic/ondemand/document_stream.h" */ +/* begin file simdjson/generic/ondemand/document_stream.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#ifdef SIMDJSON_THREADS_ENABLED +#include +#include +#include +#endif + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED +/** @private Custom worker class **/ +struct stage1_worker { + stage1_worker() noexcept = default; + stage1_worker(const stage1_worker&) = delete; + stage1_worker(stage1_worker&&) = delete; + stage1_worker operator=(const stage1_worker&) = delete; + ~stage1_worker(); + /** + * We only start the thread when it is needed, not at object construction, this may throw. + * You should only call this once. + **/ + void start_thread(); + /** + * Start a stage 1 job. You should first call 'run', then 'finish'. + * You must call start_thread once before. + */ + void run(document_stream * ds, parser * stage1, size_t next_batch_start); + /** Wait for the run to finish (blocking). You should first call 'run', then 'finish'. **/ + void finish(); + +private: + + /** + * Normally, we would never stop the thread. But we do in the destructor. + * This function is only safe assuming that you are not waiting for results. You + * should have called run, then finish, and be done. + **/ + void stop_thread(); + + std::thread thread{}; + /** These three variables define the work done by the thread. **/ + ondemand::parser * stage1_thread_parser{}; + size_t _next_batch_start{}; + document_stream * owner{}; + /** + * We have two state variables. This could be streamlined to one variable in the future but + * we use two for clarity. + */ + bool has_work{false}; + bool can_work{true}; + + /** + * We lock using a mutex. + */ + std::mutex locking_mutex{}; + std::condition_variable cond_var{}; + + friend class document_stream; +}; +#endif // SIMDJSON_THREADS_ENABLED + +/** + * A forward-only stream of documents. + * + * Produced by parser::iterate_many. + * + */ +class document_stream { +public: + /** + * Construct an uninitialized document_stream. + * + * ```c++ + * document_stream docs; + * auto error = parser.iterate_many(json).get(docs); + * ``` + */ + simdjson_inline document_stream() noexcept; + /** Move one document_stream to another. */ + simdjson_inline document_stream(document_stream &&other) noexcept = default; + /** Move one document_stream to another. */ + simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default; + + simdjson_inline ~document_stream() noexcept; + + /** + * Returns the input size in bytes. + */ + inline size_t size_in_bytes() const noexcept; + + /** + * After iterating through the stream, this method + * returns the number of bytes that were not parsed at the end + * of the stream. If truncated_bytes() differs from zero, + * then the input was truncated maybe because incomplete JSON + * documents were found at the end of the stream. You + * may need to process the bytes in the interval [size_in_bytes()-truncated_bytes(), size_in_bytes()). + * + * You should only call 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(); + * + */ + inline size_t truncated_bytes() const noexcept; + + class iterator { + public: + using value_type = simdjson_result; + using reference = value_type; + + using difference_type = std::ptrdiff_t; + + using iterator_category = std::input_iterator_tag; + + /** + * Default constructor. + */ + simdjson_inline iterator() noexcept; + /** + * Get the current document (or error). + */ + simdjson_inline simdjson_result operator*() noexcept; + /** + * Advance to the next document (prefix). + */ + inline iterator& operator++() noexcept; + /** + * Check if we're at the end yet. + * @param other the end iterator to compare to. + */ + simdjson_inline bool operator!=(const iterator &other) const noexcept; + /** + * @private + * + * Gives the current index in the input document in bytes. + * + * document_stream stream = parser.parse_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * auto doc = *i; + * size_t index = i.current_index(); + * } + * + * This function (current_index()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + */ + simdjson_inline size_t current_index() const noexcept; + + /** + * @private + * + * Gives a view of the current document at the current position. + * + * document_stream stream = parser.iterate_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * std::string_view v = i.source(); + * } + * + * The returned string_view instance is simply a map to the (unparsed) + * source string: it may thus include white-space characters and all manner + * of padding. + * + * This function (source()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + * + */ + simdjson_inline std::string_view source() const noexcept; + + /** + * Returns error of the stream (if any). + */ + inline error_code error() const noexcept; + + private: + simdjson_inline iterator(document_stream *s, bool finished) noexcept; + /** The document_stream we're iterating through. */ + document_stream* stream; + /** Whether we're finished or not. */ + bool finished; + + friend class document; + friend class document_stream; + friend class json_iterator; + }; + + /** + * Start iterating the documents in the stream. + */ + simdjson_inline iterator begin() noexcept; + /** + * The end of the stream, for iterator comparison purposes. + */ + simdjson_inline iterator end() noexcept; + +private: + + document_stream &operator=(const document_stream &) = delete; // Disallow copying + document_stream(const document_stream &other) = delete; // Disallow copying + + /** + * Construct a document_stream. Does not allocate or parse anything until the iterator is + * used. + * + * @param parser is a reference to the parser instance used to generate this document_stream + * @param buf is the raw byte buffer we need to process + * @param len is the length of the raw byte buffer in bytes + * @param batch_size is the size of the windows (must be strictly greater or equal to the largest JSON document) + */ + simdjson_inline document_stream( + ondemand::parser &parser, + const uint8_t *buf, + size_t len, + size_t batch_size, + bool allow_comma_separated + ) noexcept; + + /** + * Parse the first document in the buffer. Used by begin(), to handle allocation and + * initialization. + */ + inline void start() noexcept; + + /** + * Parse the next document found in the buffer previously given to document_stream. + * + * The content should be a valid JSON document encoded as UTF-8. If there is a + * UTF-8 BOM, the parser skips it. + * + * You do NOT need to pre-allocate a parser. This function takes care of + * pre-allocating a capacity defined by the batch_size defined when creating the + * document_stream object. + * + * The function returns simdjson::EMPTY if there is no more data to be parsed. + * + * The function returns simdjson::SUCCESS (as integer = 0) in case of success + * and indicates that the buffer has successfully been parsed to the end. + * Every document it contained has been parsed without error. + * + * The function returns an error code from simdjson/simdjson.h in case of failure + * such as simdjson::CAPACITY, simdjson::MEMALLOC, simdjson::DEPTH_ERROR and so forth; + * the simdjson::error_message function converts these error codes into a string). + * + * You can also check validity by calling parser.is_valid(). The same parser can + * and should be reused for the other documents in the buffer. + */ + inline void next() noexcept; + + /** Move the json_iterator of the document to the location of the next document in the stream. */ + inline void next_document() noexcept; + + /** Get the next document index. */ + inline size_t next_batch_start() const noexcept; + + /** Pass the next batch through stage 1 with the given parser. */ + inline error_code run_stage1(ondemand::parser &p, size_t batch_start) noexcept; + + // Fields + ondemand::parser *parser; + const uint8_t *buf; + size_t len; + size_t batch_size; + bool allow_comma_separated; + /** + * We are going to use just one document instance. The document owns + * the json_iterator. It implies that we only ever pass a reference + * to the document to the users. + */ + document doc{}; + /** The error (or lack thereof) from the current document. */ + error_code error; + size_t batch_start{0}; + size_t doc_index{}; + + #ifdef SIMDJSON_THREADS_ENABLED + /** Indicates whether we use threads. Note that this needs to be a constant during the execution of the parsing. */ + bool use_thread; + + inline void load_from_stage1_thread() noexcept; + + /** Start a thread to run stage 1 on the next batch. */ + inline void start_stage1_thread() noexcept; + + /** Wait for the stage 1 thread to finish and capture the results. */ + inline void finish_stage1_thread() noexcept; + + /** The error returned from the stage 1 thread. */ + error_code stage1_thread_error{UNINITIALIZED}; + /** The thread used to run stage 1 against the next batch in the background. */ + std::unique_ptr worker{new(std::nothrow) stage1_worker()}; + /** + * The parser used to run stage 1 in the background. Will be swapped + * with the regular parser when finished. + */ + ondemand::parser stage1_thread_parser{}; + + friend struct stage1_worker; + #endif // SIMDJSON_THREADS_ENABLED + + friend class parser; + friend class document; + friend class json_iterator; + friend struct simdjson_result; + friend struct internal::simdjson_result_base; +}; // document_stream + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::document_stream &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H +/* end file simdjson/generic/ondemand/document_stream.h for ppc64 */ +/* including simdjson/generic/ondemand/field.h for ppc64: #include "simdjson/generic/ondemand/field.h" */ +/* begin file simdjson/generic/ondemand/field.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * A JSON field (key/value pair) in an object. + * + * Returned from object iteration. + * + * Extends from std::pair so you can use C++ algorithms that rely on pairs. + */ +class field : public std::pair { +public: + /** + * Create a new invalid field. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline field() noexcept; + + /** + * Get the key as a string_view (for higher speed, consider raw_key). + * We deliberately use a more cumbersome name (unescaped_key) to force users + * to think twice about using it. + * + * This consumes the key: once you have called unescaped_key(), you cannot + * call it again nor can you call key(). + */ + simdjson_inline simdjson_warn_unused simdjson_result unescaped_key(bool allow_replacement) noexcept; + /** + * Get the key as a raw_json_string. Can be used for direct comparison with + * an unescaped C string: e.g., key() == "test". + */ + simdjson_inline raw_json_string key() const noexcept; + /** + * Get the field value. + */ + simdjson_inline ondemand::value &value() & noexcept; + /** + * @overload ondemand::value &ondemand::value() & noexcept + */ + simdjson_inline ondemand::value value() && noexcept; + +protected: + simdjson_inline field(raw_json_string key, ondemand::value &&value) noexcept; + static simdjson_inline simdjson_result start(value_iterator &parent_iter) noexcept; + static simdjson_inline simdjson_result start(const value_iterator &parent_iter, raw_json_string key) noexcept; + friend struct simdjson_result; + friend class object_iterator; +}; + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::field &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result unescaped_key(bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result key() noexcept; + simdjson_inline simdjson_result value() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_H +/* end file simdjson/generic/ondemand/field.h for ppc64 */ +/* including simdjson/generic/ondemand/object.h for ppc64: #include "simdjson/generic/ondemand/object.h" */ +/* begin file simdjson/generic/ondemand/object.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +/** + * A forward-only JSON object field iterator. + */ +class object { +public: + /** + * Create a new invalid object. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a + * key a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an object + * instance: there is no rewind and no invalidation. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + + /** + * Reset the iterator so that we are pointing back at the + * beginning of the object. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * 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. + */ + inline simdjson_result is_empty() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; + +protected: + /** + * Go to the end of the object, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + static simdjson_inline object resume(const value_iterator &iter) noexcept; + simdjson_inline object(const value_iterator &iter) noexcept; + + simdjson_warn_unused simdjson_inline error_code find_field_raw(const std::string_view key) noexcept; + + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::object &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + inline simdjson_result reset() noexcept; + inline simdjson_result is_empty() noexcept; + inline simdjson_result count_fields() & noexcept; + inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_H +/* end file simdjson/generic/ondemand/object.h for ppc64 */ +/* including simdjson/generic/ondemand/object_iterator.h for ppc64: #include "simdjson/generic/ondemand/object_iterator.h" */ +/* begin file simdjson/generic/ondemand/object_iterator.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +class object_iterator { +public: + /** + * Create a new invalid object_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object_iterator() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline simdjson_result operator*() noexcept; + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const object_iterator &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const object_iterator &) const noexcept; + // Checks for ']' and ',' + simdjson_inline object_iterator &operator++() noexcept; + +private: + /** + * The underlying JSON iterator. + * + * PERF NOTE: expected to be elided in favor of the parent document: this is set when the object + * is first used, and never changes afterwards. + */ + value_iterator iter{}; + + simdjson_inline object_iterator(const value_iterator &iter) noexcept; + friend struct simdjson_result; + friend class object; +}; + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public ppc64::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(ppc64::ondemand::object_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + // Checks for ']' and ',' + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H +/* end file simdjson/generic/ondemand/object_iterator.h for ppc64 */ +/* including simdjson/generic/ondemand/serialization.h for ppc64: #include "simdjson/generic/ondemand/serialization.h" */ +/* begin file simdjson/generic/ondemand/serialization.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * 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. + */ +inline simdjson_result to_json_string(ppc64::ondemand::document& x) noexcept; +/** + * Create a string-view instance out of a value instance. 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. + */ +inline simdjson_result to_json_string(ppc64::ondemand::value& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(ppc64::ondemand::object& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(ppc64::ondemand::array& x) noexcept; +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +} // namespace simdjson + +/** + * We want to support argument-dependent lookup (ADL). + * Hence we should define operator<< in the namespace + * where the argument (here value, object, etc.) resides. + * Credit: @madhur4127 + * See https://github.com/simdjson/simdjson/issues/1768 + */ +namespace simdjson { namespace ppc64 { namespace ondemand { + +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The element. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::value x); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::array value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::document& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::document_reference& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The object. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::object value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +}}} // namespace simdjson::ppc64::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H +/* end file simdjson/generic/ondemand/serialization.h for ppc64 */ + +// Inline definitions +/* including simdjson/generic/ondemand/array-inl.h for ppc64: #include "simdjson/generic/ondemand/array-inl.h" */ +/* begin file simdjson/generic/ondemand/array-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter->depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the array is first found and the iterator is just past the `{`. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the `,` before the next value (or `]`). In this state, +// depth == iter->depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter->depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter->depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the array iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet element may be missing or not be an +// array--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter->depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between elements, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter->depth == depth, and at_start == false. +// +// ## Terminal State +// +// The terminal state has iter->depth < depth. at_start is always false. +// +// - Finished: When we have reached a `]` or have reported an error, we are finished. We signal this +// by decrementing depth. In this state, iter->depth < depth, at_start == false, and +// error == SUCCESS. +// + +simdjson_inline array::array(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result array::start(value_iterator &iter) noexcept { + // We don't need to know if the array is empty to start iteration, but we do want to know if there + // is an error--thus `simdjson_unused`. + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::start_root(value_iterator &iter) noexcept { + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_root_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::started(value_iterator &iter) noexcept { + bool has_value; + SIMDJSON_TRY(iter.started_array().get(has_value)); + return array(iter); +} + +simdjson_inline simdjson_result array::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return array_iterator(iter); +} +simdjson_inline simdjson_result array::end() noexcept { + return array_iterator(iter); +} +simdjson_inline error_code array::consume() noexcept { + auto error = iter.json_iter().skip_child(iter.depth()-1); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result array::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter._json_iter->unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline simdjson_result array::count_elements() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the array after counting the number of elements. + iter.reset_array(); + return count; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline simdjson_result array::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_array().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +inline simdjson_result array::reset() & noexcept { + return iter.reset_array(); +} + +inline simdjson_result array::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + // - means "the append position" or "the element after the end of the array" + // We don't support this, because we're returning a real element, not a position. + if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; } + + // Read the array index + size_t array_index = 0; + size_t i; + for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) { + uint8_t digit = uint8_t(json_pointer[i] - '0'); + // Check for non-digit in array index. If it's there, we're trying to get a field in an object + if (digit > 9) { return INCORRECT_TYPE; } + array_index = array_index*10 + digit; + } + + // 0 followed by other digits is invalid + if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0" + + // Empty string is invalid; so is a "/" with no digits before it + if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index" + // Get the child + auto child = at(array_index); + // If there is an error, it ends here + if(child.error()) { + return child; + } + + // If there is a /, we're not done yet, call recursively. + if (i < json_pointer.length()) { + child = child.at_pointer(json_pointer.substr(i)); + } + return child; +} + +simdjson_inline simdjson_result array::at(size_t index) noexcept { + size_t i = 0; + for (auto value : *this) { + if (i == index) { return value; } + i++; + } + return INDEX_OUT_OF_BOUNDS; +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + ppc64::ondemand::array &&value +) noexcept + : implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept + : implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::is_empty() & noexcept { + if (error()) { return error(); } + return first.is_empty(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H +/* end file simdjson/generic/ondemand/array-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/array_iterator-inl.h for ppc64: #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/array_iterator-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +simdjson_inline array_iterator::array_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result array_iterator::operator*() noexcept { + if (iter.error()) { iter.abandon(); return iter.error(); } + return value(iter.child()); +} +simdjson_inline bool array_iterator::operator==(const array_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool array_iterator::operator!=(const array_iterator &) const noexcept { + return iter.is_open(); +} +simdjson_inline array_iterator &array_iterator::operator++() noexcept { + error_code error; + // PERF NOTE this is a safety rail ... users should exit loops as soon as they receive an error, so we'll never get here. + // However, it does not seem to make a perf difference, so we add it out of an abundance of caution. + if (( error = iter.error() )) { return *this; } + if (( error = iter.skip_child() )) { return *this; } + if (( error = iter.has_next_element().error() )) { return *this; } + return *this; +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + ppc64::ondemand::array_iterator &&value +) noexcept + : ppc64::implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : ppc64::implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++(first); + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/array_iterator-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/document-inl.h for ppc64: #include "simdjson/generic/ondemand/document-inl.h" */ +/* begin file simdjson/generic/ondemand/document-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +simdjson_inline document::document(ondemand::json_iterator &&_iter) noexcept + : iter{std::forward(_iter)} +{ + logger::log_start_value(iter, "document"); +} + +simdjson_inline document document::start(json_iterator &&iter) noexcept { + return document(std::forward(iter)); +} + +inline void document::rewind() noexcept { + iter.rewind(); +} + +inline std::string document::to_debug_string() noexcept { + return iter.to_string(); +} + +inline simdjson_result document::current_location() const noexcept { + return iter.current_location(); +} + +inline int32_t document::current_depth() const noexcept { + return iter.depth(); +} + +inline bool document::at_end() const noexcept { + return iter.at_end(); +} + + +inline bool document::is_alive() noexcept { + return iter.is_alive(); +} +simdjson_inline value_iterator document::resume_value_iterator() noexcept { + return value_iterator(&iter, 1, iter.root_position()); +} +simdjson_inline value_iterator document::get_root_value_iterator() noexcept { + return resume_value_iterator(); +} +simdjson_inline simdjson_result document::start_or_resume_object() noexcept { + if (iter.at_root()) { + return get_object(); + } else { + return object::resume(resume_value_iterator()); + } +} +simdjson_inline simdjson_result document::get_value() noexcept { + // Make sure we start any arrays or objects before returning, so that start_root_() + // gets called. + + // It is the convention throughout the code that the macro `SIMDJSON_DEVELOPMENT_CHECKS` determines whether + // we check for OUT_OF_ORDER_ITERATION. Proper on::demand code should never trigger this error. +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.at_root()) { return OUT_OF_ORDER_ITERATION; } +#endif + // assert_at_root() serves two purposes: in Debug mode, whether or not + // SIMDJSON_DEVELOPMENT_CHECKS is set or not, it checks that we are at the root of + // the document (this will typically be redundant). In release mode, it generates + // SIMDJSON_ASSUME statements to allow the compiler to make assumptions. + iter.assert_at_root(); + switch (*iter.peek()) { + case '[': { + // The following lines check that the document ends with ]. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_array(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + case '{': { + // The following lines would check that the document ends with }. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_object(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + default: + // Unfortunately, scalar documents are a special case in simdjson and they cannot + // be safely converted to value instances. + return SCALAR_DOCUMENT_AS_VALUE; + } +} +simdjson_inline simdjson_result document::get_array() & noexcept { + auto value = get_root_value_iterator(); + return array::start_root(value); +} +simdjson_inline simdjson_result document::get_object() & noexcept { + auto value = get_root_value_iterator(); + return object::start_root(value); +} + +/** + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. 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. + */ + +simdjson_inline simdjson_result document::get_uint64() noexcept { + return get_root_value_iterator().get_root_uint64(true); +} +simdjson_inline simdjson_result document::get_uint64_in_string() noexcept { + return get_root_value_iterator().get_root_uint64_in_string(true); +} +simdjson_inline simdjson_result document::get_int64() noexcept { + return get_root_value_iterator().get_root_int64(true); +} +simdjson_inline simdjson_result document::get_int64_in_string() noexcept { + return get_root_value_iterator().get_root_int64_in_string(true); +} +simdjson_inline simdjson_result document::get_double() noexcept { + return get_root_value_iterator().get_root_double(true); +} +simdjson_inline simdjson_result document::get_double_in_string() noexcept { + return get_root_value_iterator().get_root_double_in_string(true); +} +simdjson_inline simdjson_result document::get_string(bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(true, allow_replacement); +} +template +simdjson_inline error_code document::get_string(string_type& receiver, bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(receiver, true, allow_replacement); +} +simdjson_inline simdjson_result document::get_wobbly_string() noexcept { + return get_root_value_iterator().get_root_wobbly_string(true); +} +simdjson_inline simdjson_result document::get_raw_json_string() noexcept { + return get_root_value_iterator().get_root_raw_json_string(true); +} +simdjson_inline simdjson_result document::get_bool() noexcept { + return get_root_value_iterator().get_root_bool(true); +} +simdjson_inline simdjson_result document::is_null() noexcept { + return get_root_value_iterator().is_root_null(true); +} + +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_array(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_object(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_double(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_bool(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_value(); } + +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_double(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_uint64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_int64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_bool(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_value(); } + +template simdjson_inline error_code document::get(T &out) & noexcept { + return get().get(out); +} +template simdjson_inline error_code document::get(T &out) && noexcept { + return std::forward(*this).get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document::operator array() & noexcept(false) { return get_array(); } +simdjson_inline document::operator object() & noexcept(false) { return get_object(); } +simdjson_inline document::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document::operator double() noexcept(false) { return get_double(); } +simdjson_inline document::operator std::string_view() noexcept(false) { return get_string(false); } +simdjson_inline document::operator raw_json_string() noexcept(false) { return get_raw_json_string(); } +simdjson_inline document::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document::operator value() noexcept(false) { return get_value(); } + +#endif +simdjson_inline simdjson_result document::count_elements() & noexcept { + auto a = get_array(); + simdjson_result answer = a.count_elements(); + /* If there was an array, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::count_fields() & noexcept { + auto a = get_object(); + simdjson_result answer = a.count_fields(); + /* If there was an object, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::at(size_t index) & noexcept { + auto a = get_array(); + return a.at(index); +} +simdjson_inline simdjson_result document::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result document::end() & noexcept { + return {}; +} + +simdjson_inline simdjson_result document::find_field(std::string_view key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field(const char *key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field_unordered(std::string_view key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::find_field_unordered(const char *key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::operator[](std::string_view key) & noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result document::operator[](const char *key) & noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline error_code document::consume() noexcept { + auto error = iter.skip_child(0); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result document::raw_json() noexcept { + auto _iter = get_root_value_iterator(); + const uint8_t * starting_point{_iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter.unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result document::type() noexcept { + return get_root_value_iterator().type(); +} + +simdjson_inline simdjson_result document::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool document::is_negative() noexcept { + return get_root_value_iterator().is_root_negative(); +} + +simdjson_inline simdjson_result document::is_integer() noexcept { + return get_root_value_iterator().is_root_integer(true); +} + +simdjson_inline simdjson_result document::get_number_type() noexcept { + return get_root_value_iterator().get_root_number_type(true); +} + +simdjson_inline simdjson_result document::get_number() noexcept { + return get_root_value_iterator().get_root_number(true); +} + + +simdjson_inline simdjson_result document::raw_json_token() noexcept { + auto _iter = get_root_value_iterator(); + return std::string_view(reinterpret_cast(_iter.peek_start()), _iter.peek_start_length()); +} + +simdjson_inline simdjson_result document::at_pointer(std::string_view json_pointer) noexcept { + rewind(); // Rewind the document each time at_pointer is called + if (json_pointer.empty()) { + return this->get_value(); + } + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + ppc64::ondemand::document &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base( + error + ) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template +simdjson_inline simdjson_result simdjson_result::get() & noexcept { + if (error()) { return error(); } + return first.get(); +} +template +simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first).get(); +} +template +simdjson_inline error_code simdjson_result::get(T &out) & noexcept { + if (error()) { return error(); } + return first.get(out); +} +template +simdjson_inline error_code simdjson_result::get(T &out) && noexcept { + if (error()) { return error(); } + return std::forward(first).get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() & noexcept = delete; +template<> simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first); +} +template<> simdjson_inline error_code simdjson_result::get(ppc64::ondemand::document &out) & noexcept = delete; +template<> simdjson_inline error_code simdjson_result::get(ppc64::ondemand::document &out) && noexcept { + if (error()) { return error(); } + out = std::forward(first); + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} + +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} + + +simdjson_inline bool simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} + +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} + +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} + +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} + + +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator ppc64::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator ppc64::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator ppc64::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator ppc64::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline bool simdjson_result::at_end() const noexcept { + if (error()) { return error(); } + return first.at_end(); +} + + +simdjson_inline int32_t simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +simdjson_inline document_reference::document_reference() noexcept : doc{nullptr} {} +simdjson_inline document_reference::document_reference(document &d) noexcept : doc(&d) {} +simdjson_inline void document_reference::rewind() noexcept { doc->rewind(); } +simdjson_inline simdjson_result document_reference::get_array() & noexcept { return doc->get_array(); } +simdjson_inline simdjson_result document_reference::get_object() & noexcept { return doc->get_object(); } +/** + * The document_reference instances are used primarily/solely for streams of JSON + * documents. + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. + * + * 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. + */ +simdjson_inline simdjson_result document_reference::get_uint64() noexcept { return doc->get_root_value_iterator().get_root_uint64(false); } +simdjson_inline simdjson_result document_reference::get_uint64_in_string() noexcept { return doc->get_root_value_iterator().get_root_uint64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_int64() noexcept { return doc->get_root_value_iterator().get_root_int64(false); } +simdjson_inline simdjson_result document_reference::get_int64_in_string() noexcept { return doc->get_root_value_iterator().get_root_int64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_double() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_double_in_string() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_string(bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(false, allow_replacement); } +template +simdjson_inline error_code document_reference::get_string(string_type& receiver, bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(receiver, false, allow_replacement); } +simdjson_inline simdjson_result document_reference::get_wobbly_string() noexcept { return doc->get_root_value_iterator().get_root_wobbly_string(false); } +simdjson_inline simdjson_result document_reference::get_raw_json_string() noexcept { return doc->get_root_value_iterator().get_root_raw_json_string(false); } +simdjson_inline simdjson_result document_reference::get_bool() noexcept { return doc->get_root_value_iterator().get_root_bool(false); } +simdjson_inline simdjson_result document_reference::get_value() noexcept { return doc->get_value(); } +simdjson_inline simdjson_result document_reference::is_null() noexcept { return doc->get_root_value_iterator().is_root_null(false); } + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document_reference::operator array() & noexcept(false) { return array(*doc); } +simdjson_inline document_reference::operator object() & noexcept(false) { return object(*doc); } +simdjson_inline document_reference::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document_reference::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document_reference::operator double() noexcept(false) { return get_double(); } +simdjson_inline document_reference::operator std::string_view() noexcept(false) { return std::string_view(*doc); } +simdjson_inline document_reference::operator raw_json_string() noexcept(false) { return raw_json_string(*doc); } +simdjson_inline document_reference::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document_reference::operator value() noexcept(false) { return value(*doc); } +#endif +simdjson_inline simdjson_result document_reference::count_elements() & noexcept { return doc->count_elements(); } +simdjson_inline simdjson_result document_reference::count_fields() & noexcept { return doc->count_fields(); } +simdjson_inline simdjson_result document_reference::at(size_t index) & noexcept { return doc->at(index); } +simdjson_inline simdjson_result document_reference::begin() & noexcept { return doc->begin(); } +simdjson_inline simdjson_result document_reference::end() & noexcept { return doc->end(); } +simdjson_inline simdjson_result document_reference::find_field(std::string_view key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::find_field(const char *key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::operator[](std::string_view key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::operator[](const char *key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::find_field_unordered(std::string_view key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::find_field_unordered(const char *key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::type() noexcept { return doc->type(); } +simdjson_inline simdjson_result document_reference::is_scalar() noexcept { return doc->is_scalar(); } +simdjson_inline simdjson_result document_reference::current_location() noexcept { return doc->current_location(); } +simdjson_inline int32_t document_reference::current_depth() const noexcept { return doc->current_depth(); } +simdjson_inline bool document_reference::is_negative() noexcept { return doc->is_negative(); } +simdjson_inline simdjson_result document_reference::is_integer() noexcept { return doc->get_root_value_iterator().is_root_integer(false); } +simdjson_inline simdjson_result document_reference::get_number_type() noexcept { return doc->get_root_value_iterator().get_root_number_type(false); } +simdjson_inline simdjson_result document_reference::get_number() noexcept { return doc->get_root_value_iterator().get_root_number(false); } +simdjson_inline simdjson_result document_reference::raw_json_token() noexcept { return doc->raw_json_token(); } +simdjson_inline simdjson_result document_reference::at_pointer(std::string_view json_pointer) noexcept { return doc->at_pointer(json_pointer); } +simdjson_inline simdjson_result document_reference::raw_json() noexcept { return doc->raw_json();} +simdjson_inline document_reference::operator document&() const noexcept { return *doc; } + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + + + +namespace simdjson { +simdjson_inline simdjson_result::simdjson_result(ppc64::ondemand::document_reference value, error_code error) + noexcept : implementation_simdjson_result_base(std::forward(value), error) {} + + +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator ppc64::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator ppc64::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator ppc64::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator ppc64::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H +/* end file simdjson/generic/ondemand/document-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/document_stream-inl.h for ppc64: #include "simdjson/generic/ondemand/document_stream-inl.h" */ +/* begin file simdjson/generic/ondemand/document_stream-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void stage1_worker::finish() { + // After calling "run" someone would call finish() to wait + // for the end of the processing. + // This function will wait until either the thread has done + // the processing or, else, the destructor has been called. + std::unique_lock lock(locking_mutex); + cond_var.wait(lock, [this]{return has_work == false;}); +} + +inline stage1_worker::~stage1_worker() { + // The thread may never outlive the stage1_worker instance + // and will always be stopped/joined before the stage1_worker + // instance is gone. + stop_thread(); +} + +inline void stage1_worker::start_thread() { + std::unique_lock lock(locking_mutex); + if(thread.joinable()) { + return; // This should never happen but we never want to create more than one thread. + } + thread = std::thread([this]{ + while(true) { + std::unique_lock thread_lock(locking_mutex); + // We wait for either "run" or "stop_thread" to be called. + cond_var.wait(thread_lock, [this]{return has_work || !can_work;}); + // If, for some reason, the stop_thread() method was called (i.e., the + // destructor of stage1_worker is called, then we want to immediately destroy + // the thread (and not do any more processing). + if(!can_work) { + break; + } + this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser, + this->_next_batch_start); + this->has_work = false; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify "finish" + thread_lock.unlock(); + } + } + ); +} + + +inline void stage1_worker::stop_thread() { + std::unique_lock lock(locking_mutex); + // We have to make sure that all locks can be released. + can_work = false; + has_work = false; + cond_var.notify_all(); + lock.unlock(); + if(thread.joinable()) { + thread.join(); + } +} + +inline void stage1_worker::run(document_stream * ds, parser * stage1, size_t next_batch_start) { + std::unique_lock lock(locking_mutex); + owner = ds; + _next_batch_start = next_batch_start; + stage1_thread_parser = stage1; + has_work = true; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify the thread lock that we have work + lock.unlock(); +} + +#endif // SIMDJSON_THREADS_ENABLED + +simdjson_inline document_stream::document_stream( + ondemand::parser &_parser, + const uint8_t *_buf, + size_t _len, + size_t _batch_size, + bool _allow_comma_separated +) noexcept + : parser{&_parser}, + buf{_buf}, + len{_len}, + batch_size{_batch_size <= MINIMAL_BATCH_SIZE ? MINIMAL_BATCH_SIZE : _batch_size}, + allow_comma_separated{_allow_comma_separated}, + error{SUCCESS} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(_parser.threaded) // we need to make a copy because _parser.threaded can change + #endif +{ +#ifdef SIMDJSON_THREADS_ENABLED + if(worker.get() == nullptr) { + error = MEMALLOC; + } +#endif +} + +simdjson_inline document_stream::document_stream() noexcept + : parser{nullptr}, + buf{nullptr}, + len{0}, + batch_size{0}, + allow_comma_separated{false}, + error{UNINITIALIZED} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(false) + #endif +{ +} + +simdjson_inline document_stream::~document_stream() noexcept +{ + #ifdef SIMDJSON_THREADS_ENABLED + worker.reset(); + #endif +} + +inline size_t document_stream::size_in_bytes() const noexcept { + return len; +} + +inline size_t document_stream::truncated_bytes() const noexcept { + if(error == CAPACITY) { return len - batch_start; } + return parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] - parser->implementation->structural_indexes[parser->implementation->n_structural_indexes + 1]; +} + +simdjson_inline document_stream::iterator::iterator() noexcept + : stream{nullptr}, finished{true} { +} + +simdjson_inline document_stream::iterator::iterator(document_stream* _stream, bool is_end) noexcept + : stream{_stream}, finished{is_end} { +} + +simdjson_inline simdjson_result document_stream::iterator::operator*() noexcept { + //if(stream->error) { return stream->error; } + return simdjson_result(stream->doc, stream->error); +} + +simdjson_inline document_stream::iterator& document_stream::iterator::operator++() noexcept { + // If there is an error, then we want the iterator + // to be finished, no matter what. (E.g., we do not + // keep generating documents with errors, or go beyond + // a document with errors.) + // + // Users do not have to call "operator*()" when they use operator++, + // so we need to end the stream in the operator++ function. + // + // Note that setting finished = true is essential otherwise + // we would enter an infinite loop. + if (stream->error) { finished = true; } + // Note that stream->error() is guarded against error conditions + // (it will immediately return if stream->error casts to false). + // In effect, this next function does nothing when (stream->error) + // is true (hence the risk of an infinite loop). + stream->next(); + // If that was the last document, we're finished. + // It is the only type of error we do not want to appear + // in operator*. + if (stream->error == EMPTY) { finished = true; } + // If we had any other kind of error (not EMPTY) then we want + // to pass it along to the operator* and we cannot mark the result + // as "finished" just yet. + return *this; +} + +simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept { + return finished != other.finished; +} + +simdjson_inline document_stream::iterator document_stream::begin() noexcept { + start(); + // If there are no documents, we're finished. + return iterator(this, error == EMPTY); +} + +simdjson_inline document_stream::iterator document_stream::end() noexcept { + return iterator(this, true); +} + +inline void document_stream::start() noexcept { + if (error) { return; } + error = parser->allocate(batch_size); + if (error) { return; } + // Always run the first stage 1 parse immediately + batch_start = 0; + error = run_stage1(*parser, batch_start); + while(error == EMPTY) { + // In exceptional cases, we may start with an empty block + batch_start = next_batch_start(); + if (batch_start >= len) { return; } + error = run_stage1(*parser, batch_start); + } + if (error) { return; } + doc_index = batch_start; + doc = document(json_iterator(&buf[batch_start], parser)); + doc.iter._streaming = true; + + #ifdef SIMDJSON_THREADS_ENABLED + if (use_thread && next_batch_start() < len) { + // Kick off the first thread on next batch if needed + error = stage1_thread_parser.allocate(batch_size); + if (error) { return; } + worker->start_thread(); + start_stage1_thread(); + if (error) { return; } + } + #endif // SIMDJSON_THREADS_ENABLED +} + +inline void document_stream::next() noexcept { + // We always enter at once once in an error condition. + if (error) { return; } + next_document(); + if (error) { return; } + auto cur_struct_index = doc.iter._root - parser->implementation->structural_indexes.get(); + doc_index = batch_start + parser->implementation->structural_indexes[cur_struct_index]; + + // Check if at end of structural indexes (i.e. at end of batch) + if(cur_struct_index >= static_cast(parser->implementation->n_structural_indexes)) { + error = EMPTY; + // Load another batch (if available) + while (error == EMPTY) { + batch_start = next_batch_start(); + if (batch_start >= len) { break; } + #ifdef SIMDJSON_THREADS_ENABLED + if(use_thread) { + load_from_stage1_thread(); + } else { + error = run_stage1(*parser, batch_start); + } + #else + error = run_stage1(*parser, batch_start); + #endif + /** + * Whenever we move to another window, we need to update all pointers to make + * it appear as if the input buffer started at the beginning of the window. + * + * Take this input: + * + * {"z":5} {"1":1,"2":2,"4":4} [7, 10, 9] [15, 11, 12, 13] [154, 110, 112, 1311] + * + * Say you process the following window... + * + * '{"z":5} {"1":1,"2":2,"4":4} [7, 10, 9]' + * + * When you do so, the json_iterator has a pointer at the beginning of the memory region + * (pointing at the beginning of '{"z"...'. + * + * When you move to the window that starts at... + * + * '[7, 10, 9] [15, 11, 12, 13] ... + * + * then it is not sufficient to just run stage 1. You also need to re-anchor the + * json_iterator so that it believes we are starting at '[7, 10, 9]...'. + * + * Under the DOM front-end, this gets done automatically because the parser owns + * the pointer the data, and when you call stage1 and then stage2 on the same + * parser, then stage2 will run on the pointer acquired by stage1. + * + * That is, stage1 calls "this->buf = _buf" so the parser remembers the buffer that + * we used. But json_iterator has no callback when stage1 is called on the parser. + * In fact, I think that the parser is unaware of json_iterator. + * + * + * So we need to re-anchor the json_iterator after each call to stage 1 so that + * all of the pointers are in sync. + */ + doc.iter = json_iterator(&buf[batch_start], parser); + doc.iter._streaming = true; + /** + * End of resync. + */ + + if (error) { continue; } // If the error was EMPTY, we may want to load another batch. + doc_index = batch_start; + } + } +} + +inline void document_stream::next_document() noexcept { + // Go to next place where depth=0 (document depth) + error = doc.iter.skip_child(0); + if (error) { return; } + // Always set depth=1 at the start of document + doc.iter._depth = 1; + // consume comma if comma separated is allowed + if (allow_comma_separated) { doc.iter.consume_character(','); } + // Resets the string buffer at the beginning, thus invalidating the strings. + doc.iter._string_buf_loc = parser->string_buf.get(); + doc.iter._root = doc.iter.position(); +} + +inline size_t document_stream::next_batch_start() const noexcept { + return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes]; +} + +inline error_code document_stream::run_stage1(ondemand::parser &p, size_t _batch_start) noexcept { + // This code only updates the structural index in the parser, it does not update any json_iterator + // instance. + size_t remaining = len - _batch_start; + if (remaining <= batch_size) { + return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final); + } else { + return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial); + } +} + +simdjson_inline size_t document_stream::iterator::current_index() const noexcept { + return stream->doc_index; +} + +simdjson_inline std::string_view document_stream::iterator::source() const noexcept { + auto depth = stream->doc.iter.depth(); + auto cur_struct_index = stream->doc.iter._root - stream->parser->implementation->structural_indexes.get(); + + // If at root, process the first token to determine if scalar value + if (stream->doc.iter.at_root()) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': // Depth=1 already at start of document + break; + case '}': case ']': + depth--; + break; + default: // Scalar value document + // TODO: Remove any trailing whitespaces + // This returns a string spanning from start of value to the beginning of the next document (excluded) + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[++cur_struct_index] - current_index() - 1); + } + cur_struct_index++; + } + + while (cur_struct_index <= static_cast(stream->parser->implementation->n_structural_indexes)) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': + depth++; + break; + case '}': case ']': + depth--; + break; + } + if (depth == 0) { break; } + cur_struct_index++; + } + + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[cur_struct_index] - current_index() + stream->batch_start + 1);; +} + +inline error_code document_stream::iterator::error() const noexcept { + return stream->error; +} + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void document_stream::load_from_stage1_thread() noexcept { + worker->finish(); + // Swap to the parser that was loaded up in the thread. Make sure the parser has + // enough memory to swap to, as well. + std::swap(stage1_thread_parser,*parser); + error = stage1_thread_error; + if (error) { return; } + + // If there's anything left, start the stage 1 thread! + if (next_batch_start() < len) { + start_stage1_thread(); + } +} + +inline void document_stream::start_stage1_thread() noexcept { + // we call the thread on a lambda that will update + // this->stage1_thread_error + // there is only one thread that may write to this value + // TODO this is NOT exception-safe. + this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error + size_t _next_batch_start = this->next_batch_start(); + + worker->run(this, & this->stage1_thread_parser, _next_batch_start); +} + +#endif // SIMDJSON_THREADS_ENABLED + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result::simdjson_result( + ppc64::ondemand::document_stream &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} + +} + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H +/* end file simdjson/generic/ondemand/document_stream-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/field-inl.h for ppc64: #include "simdjson/generic/ondemand/field-inl.h" */ +/* begin file simdjson/generic/ondemand/field-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +// clang 6 doesn't think the default constructor can be noexcept, so we make it explicit +simdjson_inline field::field() noexcept : std::pair() {} + +simdjson_inline field::field(raw_json_string key, ondemand::value &&value) noexcept + : std::pair(key, std::forward(value)) +{ +} + +simdjson_inline simdjson_result field::start(value_iterator &parent_iter) noexcept { + raw_json_string key; + SIMDJSON_TRY( parent_iter.field_key().get(key) ); + SIMDJSON_TRY( parent_iter.field_value() ); + return field::start(parent_iter, key); +} + +simdjson_inline simdjson_result field::start(const value_iterator &parent_iter, raw_json_string key) noexcept { + return field(key, parent_iter.child()); +} + +simdjson_inline simdjson_warn_unused simdjson_result field::unescaped_key(bool allow_replacement) noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() but Visual Studio won't let us. + simdjson_result answer = first.unescape(second.iter.json_iter(), allow_replacement); + first.consume(); + return answer; +} + +simdjson_inline raw_json_string field::key() const noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() by Visual Studio won't let us. + return first; +} + +simdjson_inline value &field::value() & noexcept { + return second; +} + +simdjson_inline value field::value() && noexcept { + return std::forward(*this).second; +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + ppc64::ondemand::field &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::key() noexcept { + if (error()) { return error(); } + return first.key(); +} +simdjson_inline simdjson_result simdjson_result::unescaped_key(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.unescaped_key(allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::value() noexcept { + if (error()) { return error(); } + return std::move(first.value()); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H +/* end file simdjson/generic/ondemand/field-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/json_iterator-inl.h for ppc64: #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/json_iterator-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +simdjson_inline json_iterator::json_iterator(json_iterator &&other) noexcept + : token(std::forward(other.token)), + parser{other.parser}, + _string_buf_loc{other._string_buf_loc}, + error{other.error}, + _depth{other._depth}, + _root{other._root}, + _streaming{other._streaming} +{ + other.parser = nullptr; +} +simdjson_inline json_iterator &json_iterator::operator=(json_iterator &&other) noexcept { + token = other.token; + parser = other.parser; + _string_buf_loc = other._string_buf_loc; + error = other.error; + _depth = other._depth; + _root = other._root; + _streaming = other._streaming; + other.parser = nullptr; + return *this; +} + +simdjson_inline json_iterator::json_iterator(const uint8_t *buf, ondemand::parser *_parser) noexcept + : token(buf, &_parser->implementation->structural_indexes[0]), + parser{_parser}, + _string_buf_loc{parser->string_buf.get()}, + _depth{1}, + _root{parser->implementation->structural_indexes.get()}, + _streaming{false} + +{ + logger::log_headers(); +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif +} + +inline void json_iterator::rewind() noexcept { + token.set_position( root_position() ); + logger::log_headers(); // We start again + _string_buf_loc = parser->string_buf.get(); + _depth = 1; +} + +inline bool json_iterator::balanced() const noexcept { + token_iterator ti(token); + int32_t count{0}; + ti.set_position( root_position() ); + while(ti.peek() <= peek_last()) { + switch (*ti.return_current_and_advance()) + { + case '[': case '{': + count++; + break; + case ']': case '}': + count--; + break; + default: + break; + } + } + return count == 0; +} + + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and parent_depth, which is a desired effect. The warning does not show up if the +// skip_child() function is not marked inline). +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline error_code json_iterator::skip_child(depth_t parent_depth) noexcept { + if (depth() <= parent_depth) { return SUCCESS; } + switch (*return_current_and_advance()) { + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + + // For the first open array/object in a value, we've already incremented depth, so keep it the same + // We never stop at colon, but if we did, it wouldn't affect depth + case '[': case '{': case ':': + logger::log_start_value(*this, "skip"); + break; + // If there is a comma, we have just finished a value in an array/object, and need to get back in + case ',': + logger::log_value(*this, "skip"); + break; + // ] or } means we just finished a value and need to jump out of the array/object + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } +#if SIMDJSON_CHECK_EOF + // If there are no more tokens, the parent is incomplete. + if (at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "Missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + break; + case '"': + if(*peek() == ':') { + // We are at a key!!! + // This might happen if you just started an object and you skip it immediately. + // Performance note: it would be nice to get rid of this check as it is somewhat + // expensive. + // https://github.com/simdjson/simdjson/issues/1742 + logger::log_value(*this, "key"); + return_current_and_advance(); // eat up the ':' + break; // important!!! + } + simdjson_fallthrough; + // Anything else must be a scalar value + default: + // For the first scalar, we will have incremented depth already, so we decrement it here. + logger::log_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + } + + // Now that we've considered the first value, we only increment/decrement for arrays/objects + while (position() < end_position()) { + switch (*return_current_and_advance()) { + case '[': case '{': + logger::log_start_value(*this, "skip"); + _depth++; + break; + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + default: + logger::log_value(*this, "skip", ""); + break; + } + } + + return report_error(TAPE_ERROR, "not enough close braces"); +} + +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool json_iterator::at_root() const noexcept { + return position() == root_position(); +} + +simdjson_inline bool json_iterator::is_single_token() const noexcept { + return parser->implementation->n_structural_indexes == 1; +} + +simdjson_inline bool json_iterator::streaming() const noexcept { + return _streaming; +} + +simdjson_inline token_position json_iterator::root_position() const noexcept { + return _root; +} + +simdjson_inline void json_iterator::assert_at_document_depth() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +} + +simdjson_inline void json_iterator::assert_at_root() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + // Under Visual Studio, the next SIMDJSON_ASSUME fails with: the argument + // has side effects that will be discarded. + SIMDJSON_ASSUME( token.position() == _root ); +#endif +} + +simdjson_inline void json_iterator::assert_more_tokens(uint32_t required_tokens) const noexcept { + assert_valid_position(token._position + required_tokens - 1); +} + +simdjson_inline void json_iterator::assert_valid_position(token_position position) const noexcept { +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME( position >= &parser->implementation->structural_indexes[0] ); + SIMDJSON_ASSUME( position < &parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] ); +#endif +} + +simdjson_inline bool json_iterator::at_end() const noexcept { + return position() == end_position(); +} +simdjson_inline token_position json_iterator::end_position() const noexcept { + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + return &parser->implementation->structural_indexes[n_structural_indexes]; +} + +inline std::string json_iterator::to_string() const noexcept { + if( !is_alive() ) { return "dead json_iterator instance"; } + const char * current_structural = reinterpret_cast(token.peek()); + return std::string("json_iterator [ depth : ") + std::to_string(_depth) + + std::string(", structural : '") + std::string(current_structural,1) + + std::string("', offset : ") + std::to_string(token.current_offset()) + + std::string("', error : ") + error_message(error) + + std::string(" ]"); +} + +inline simdjson_result json_iterator::current_location() const noexcept { + if (!is_alive()) { // Unrecoverable error + if (!at_root()) { + return reinterpret_cast(token.peek(-1)); + } else { + return reinterpret_cast(token.peek()); + } + } + if (at_end()) { + return OUT_OF_BOUNDS; + } + return reinterpret_cast(token.peek()); +} + +simdjson_inline bool json_iterator::is_alive() const noexcept { + return parser; +} + +simdjson_inline void json_iterator::abandon() noexcept { + parser = nullptr; + _depth = 0; +} + +simdjson_inline const uint8_t *json_iterator::return_current_and_advance() noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif // SIMDJSON_CHECK_EOF + return token.return_current_and_advance(); +} + +simdjson_inline const uint8_t *json_iterator::unsafe_pointer() const noexcept { + // deliberately done without safety guard: + return token.peek(); +} + +simdjson_inline const uint8_t *json_iterator::peek(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // SIMDJSON_CHECK_EOF + return token.peek(delta); +} + +simdjson_inline uint32_t json_iterator::peek_length(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // #if SIMDJSON_CHECK_EOF + return token.peek_length(delta); +} + +simdjson_inline const uint8_t *json_iterator::peek(token_position position) const noexcept { + // todo: currently we require end-of-string buffering, but the following + // assert_valid_position should be turned on if/when we lift that condition. + // assert_valid_position(position); + // This is almost surely related to SIMDJSON_CHECK_EOF but given that SIMDJSON_CHECK_EOF + // is ON by default, we have no choice but to disable it for real with a comment. + return token.peek(position); +} + +simdjson_inline uint32_t json_iterator::peek_length(token_position position) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_valid_position(position); +#endif // SIMDJSON_CHECK_EOF + return token.peek_length(position); +} + +simdjson_inline token_position json_iterator::last_position() const noexcept { + // The following line fails under some compilers... + // SIMDJSON_ASSUME(parser->implementation->n_structural_indexes > 0); + // since it has side-effects. + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + SIMDJSON_ASSUME(n_structural_indexes > 0); + return &parser->implementation->structural_indexes[n_structural_indexes - 1]; +} +simdjson_inline const uint8_t *json_iterator::peek_last() const noexcept { + return token.peek(last_position()); +} + +simdjson_inline void json_iterator::ascend_to(depth_t parent_depth) noexcept { + SIMDJSON_ASSUME(parent_depth >= 0 && parent_depth < INT32_MAX - 1); + SIMDJSON_ASSUME(_depth == parent_depth + 1); + _depth = parent_depth; +} + +simdjson_inline void json_iterator::descend_to(depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); + _depth = child_depth; +} + +simdjson_inline depth_t json_iterator::depth() const noexcept { + return _depth; +} + +simdjson_inline uint8_t *&json_iterator::string_buf_loc() noexcept { + return _string_buf_loc; +} + +simdjson_inline error_code json_iterator::report_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error != SUCCESS && _error != UNINITIALIZED && _error != INCORRECT_TYPE && _error != NO_SUCH_FIELD); + logger::log_error(*this, message); + error = _error; + return error; +} + +simdjson_inline token_position json_iterator::position() const noexcept { + return token.position(); +} + +simdjson_inline simdjson_result json_iterator::unescape(raw_json_string in, bool allow_replacement) noexcept { + return parser->unescape(in, _string_buf_loc, allow_replacement); +} + +simdjson_inline simdjson_result json_iterator::unescape_wobbly(raw_json_string in) noexcept { + return parser->unescape_wobbly(in, _string_buf_loc); +} + +simdjson_inline void json_iterator::reenter_child(token_position position, depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); +#if SIMDJSON_DEVELOPMENT_CHECKS +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME(size_t(child_depth) < parser->max_depth()); + SIMDJSON_ASSUME(position >= parser->start_positions[child_depth]); +#endif +#endif + token.set_position(position); + _depth = child_depth; +} + +simdjson_inline error_code json_iterator::consume_character(char c) noexcept { + if (*peek() == c) { + return_current_and_advance(); + return SUCCESS; + } + return TAPE_ERROR; +} + +#if SIMDJSON_DEVELOPMENT_CHECKS + +simdjson_inline token_position json_iterator::start_position(depth_t depth) const noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + return size_t(depth) < parser->max_depth() ? parser->start_positions[depth] : 0; +} + +simdjson_inline void json_iterator::set_start_position(depth_t depth, token_position position) noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + if(size_t(depth) < parser->max_depth()) { parser->start_positions[depth] = position; } +} + +#endif + + +simdjson_inline error_code json_iterator::optional_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error == INCORRECT_TYPE || _error == NO_SUCH_FIELD); + logger::log_error(*this, message); + return _error; +} + + +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 { + // This function is not expected to be called in performance-sensitive settings. + // Let us guard against silly cases: + if((N < max_len) || (N == 0)) { return false; } + // Copy to the buffer. + std::memcpy(tmpbuf, json, max_len); + if(N > max_len) { // We pad whatever remains with ' '. + std::memset(tmpbuf + max_len, ' ', N - max_len); + } + return true; +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(ppc64::ondemand::json_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/json_iterator-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/json_type-inl.h for ppc64: #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* begin file simdjson/generic/ondemand/json_type-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept { + switch (type) { + case json_type::array: out << "array"; break; + case json_type::object: out << "object"; break; + case json_type::number: out << "number"; break; + case json_type::string: out << "string"; break; + case json_type::boolean: out << "boolean"; break; + case json_type::null: out << "null"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false) { + return out << type.value(); +} +#endif + + + +simdjson_inline number_type number::get_number_type() const noexcept { + return type; +} + +simdjson_inline bool number::is_uint64() const noexcept { + return get_number_type() == number_type::unsigned_integer; +} + +simdjson_inline uint64_t number::get_uint64() const noexcept { + return payload.unsigned_integer; +} + +simdjson_inline number::operator uint64_t() const noexcept { + return get_uint64(); +} + + +simdjson_inline bool number::is_int64() const noexcept { + return get_number_type() == number_type::signed_integer; +} + +simdjson_inline int64_t number::get_int64() const noexcept { + return payload.signed_integer; +} + +simdjson_inline number::operator int64_t() const noexcept { + return get_int64(); +} + +simdjson_inline bool number::is_double() const noexcept { + return get_number_type() == number_type::floating_point_number; +} + +simdjson_inline double number::get_double() const noexcept { + return payload.floating_point_number; +} + +simdjson_inline number::operator double() const noexcept { + return get_double(); +} + +simdjson_inline double number::as_double() const noexcept { + if(is_double()) { + return payload.floating_point_number; + } + if(is_int64()) { + return double(payload.signed_integer); + } + return double(payload.unsigned_integer); +} + +simdjson_inline void number::append_s64(int64_t value) noexcept { + payload.signed_integer = value; + type = number_type::signed_integer; +} + +simdjson_inline void number::append_u64(uint64_t value) noexcept { + payload.unsigned_integer = value; + type = number_type::unsigned_integer; +} + +simdjson_inline void number::append_double(double value) noexcept { + payload.floating_point_number = value; + type = number_type::floating_point_number; +} + +simdjson_inline void number::skip_double() noexcept { + type = number_type::floating_point_number; +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(ppc64::ondemand::json_type &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H +/* end file simdjson/generic/ondemand/json_type-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/logger-inl.h for ppc64: #include "simdjson/generic/ondemand/logger-inl.h" */ +/* begin file simdjson/generic/ondemand/logger-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace ppc64 { +namespace ondemand { +namespace logger { + +static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; +static constexpr const int LOG_EVENT_LEN = 20; +static constexpr const int LOG_BUFFER_LEN = 30; +static constexpr const int LOG_SMALL_BUFFER_LEN = 10; +static int log_depth = 0; // Not threadsafe. Log only. + +// Helper to turn unprintable or newline characters into spaces +static inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } +} + +template +static inline std::string string_format(const std::string& format, const Args&... args) +{ + SIMDJSON_PUSH_DISABLE_ALL_WARNINGS + int size_s = std::snprintf(nullptr, 0, format.c_str(), args...) + 1; + auto size = static_cast(size_s); + if (size <= 0) return std::string(); + std::unique_ptr buf(new char[size]); + std::snprintf(buf.get(), size, format.c_str(), args...); + SIMDJSON_POP_DISABLE_WARNINGS + return std::string(buf.get(), buf.get() + size - 1); +} + +static inline log_level get_log_level_from_env() +{ + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe + char *lvl = getenv("SIMDJSON_LOG_LEVEL"); + SIMDJSON_POP_DISABLE_WARNINGS + if (lvl && simdjson_strcasecmp(lvl, "ERROR") == 0) { return log_level::error; } + return log_level::info; +} + +static inline log_level log_threshold() +{ + static log_level threshold = get_log_level_from_env(); + return threshold; +} + +static inline bool should_log(log_level level) +{ + return level >= log_threshold(); +} + +inline void log_event(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "", type, detail, log_level::info); +} +inline void log_value(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "+", type, detail, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} +inline void log_start_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_line(iter, "+", type, "", delta, depth_delta, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} + +inline void log_end_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + if (LOG_ENABLED) { log_depth--; } + log_line(iter, "-", type, "", delta, depth_delta, log_level::info); +} + +inline void log_error(const json_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_line(iter, "ERROR: ", error, detail, delta, depth_delta, log_level::error); +} +inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail) noexcept { + log_line(iter, index, depth, "ERROR: ", error, detail, log_level::error); +} + +inline void log_event(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_event(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_value(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_value(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_start_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_start_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_end_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_end_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_error(const value_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_error(iter.json_iter(), error, detail, delta, depth_delta); +} + +inline void log_headers() noexcept { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(log_level::info))) { + // Technically a static variable is not thread-safe, but if you are using threads and logging... well... + static bool displayed_hint{false}; + log_depth = 0; + printf("\n"); + if (!displayed_hint) { + // We only print this helpful header once. + printf("# Logging provides the depth and position of the iterator user-visible steps:\n"); + printf("# +array says 'this is where we were when we discovered the start array'\n"); + printf( + "# -array says 'this is where we were when we ended the array'\n"); + printf("# skip says 'this is a structural or value I am skipping'\n"); + printf("# +/-skip says 'this is a start/end array or object I am skipping'\n"); + printf("#\n"); + printf("# The indentation of the terms (array, string,...) indicates the depth,\n"); + printf("# in addition to the depth being displayed.\n"); + printf("#\n"); + printf("# Every token in the document has a single depth determined by the tokens before it,\n"); + printf("# and is not affected by what the token actually is.\n"); + printf("#\n"); + printf("# Not all structural elements are presented as tokens in the logs.\n"); + printf("#\n"); + printf("# We never give control to the user within an empty array or an empty object.\n"); + printf("#\n"); + printf("# Inside an array, having a depth greater than the array's depth means that\n"); + printf("# we are pointing inside a value.\n"); + printf("# Having a depth equal to the array means that we are pointing right before a value.\n"); + printf("# Having a depth smaller than the array means that we have moved beyond the array.\n"); + displayed_hint = true; + } + printf("\n"); + printf("| %-*s ", LOG_EVENT_LEN, "Event"); + printf("| %-*s ", LOG_BUFFER_LEN, "Buffer"); + printf("| %-*s ", LOG_SMALL_BUFFER_LEN, "Next"); + // printf("| %-*s ", 5, "Next#"); + printf("| %-*s ", 5, "Depth"); + printf("| Detail "); + printf("|\n"); + + printf("|%.*s", LOG_EVENT_LEN + 2, DASHES); + printf("|%.*s", LOG_BUFFER_LEN + 2, DASHES); + printf("|%.*s", LOG_SMALL_BUFFER_LEN + 2, DASHES); + // printf("|%.*s", 5+2, DASHES); + printf("|%.*s", 5 + 2, DASHES); + printf("|--------"); + printf("|\n"); + fflush(stdout); + } + } +} + +template +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 { + log_line(iter, iter.position()+delta, depth_t(iter.depth()+depth_delta), title_prefix, title, detail, level, std::forward(args)...); +} + +template +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 { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(level))) { + const int indent = depth * 2; + const auto buf = iter.token.buf; + auto msg = string_format(title, std::forward(args)...); + printf("| %*s%s%-*s ", indent, "", title_prefix, + LOG_EVENT_LEN - indent - int(strlen(title_prefix)), msg.c_str()); + { + // Print the current structural. + printf("| "); + // Before we begin, the index might point right before the document. + // This could be unsafe, see https://github.com/simdjson/simdjson/discussions/1938 + if (index < iter._root) { + printf("%*s", LOG_BUFFER_LEN, ""); + } else { + auto current_structural = &buf[*index]; + for (int i = 0; i < LOG_BUFFER_LEN; i++) { + printf("%c", printable_char(current_structural[i])); + } + } + printf(" "); + } + { + // Print the next structural. + printf("| "); + auto next_structural = &buf[*(index + 1)]; + for (int i = 0; i < LOG_SMALL_BUFFER_LEN; i++) { + printf("%c", printable_char(next_structural[i])); + } + printf(" "); + } + // printf("| %5u ", *(index+1)); + printf("| %5i ", depth); + printf("| %6.*s ", int(detail.size()), detail.data()); + printf("|\n"); + fflush(stdout); + } + } +} + +} // namespace logger +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H +/* end file simdjson/generic/ondemand/logger-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/object-inl.h for ppc64: #include "simdjson/generic/ondemand/object-inl.h" */ +/* begin file simdjson/generic/ondemand/object-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) & noexcept { + return find_field_unordered(key); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) && noexcept { + return std::forward(*this).find_field_unordered(key); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} + +simdjson_inline simdjson_result object::start(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_object().error() ); + return object(iter); +} +simdjson_inline simdjson_result object::start_root(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_root_object().error() ); + return object(iter); +} +simdjson_inline error_code object::consume() noexcept { + if(iter.is_at_key()) { + /** + * 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. + */ + simdjson_unused raw_json_string actual_key; + auto error = iter.field_key().get(actual_key); + if (error) { iter.abandon(); return error; }; + // Let us move to the value while we are at it. + if ((error = iter.field_value())) { iter.abandon(); return error; } + } + auto error_skip = iter.json_iter().skip_child(iter.depth()-1); + if(error_skip) { iter.abandon(); } + return error_skip; +} + +simdjson_inline simdjson_result object::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + const uint8_t * final_point{iter._json_iter->peek()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result object::started(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.started_object().error() ); + return object(iter); +} + +simdjson_inline object object::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline object::object(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result object::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return object_iterator(iter); +} +simdjson_inline simdjson_result object::end() noexcept { + return object_iterator(iter); +} + +inline simdjson_result object::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + size_t slash = json_pointer.find('/'); + std::string_view key = json_pointer.substr(0, slash); + // Grab the child with the given key + simdjson_result child; + + // If there is an escape character in the key, unescape it and then get the child. + size_t escape = key.find('~'); + if (escape != std::string_view::npos) { + // Unescape the key + std::string unescaped(key); + do { + switch (unescaped[escape+1]) { + case '0': + unescaped.replace(escape, 2, "~"); + break; + case '1': + unescaped.replace(escape, 2, "/"); + break; + default: + return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer"); + } + escape = unescaped.find('~', escape+1); + } while (escape != std::string::npos); + child = find_field(unescaped); // Take note find_field does not unescape keys when matching + } else { + child = find_field(key); + } + if(child.error()) { + return child; // we do not continue if there was an error + } + // If there is a /, we have to recurse and look up more of the path + if (slash != std::string_view::npos) { + child = child.at_pointer(json_pointer.substr(slash)); + } + return child; +} + +simdjson_inline simdjson_result object::count_fields() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the object after counting the number of elements. + iter.reset_object(); + return count; +} + +simdjson_inline simdjson_result object::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_object().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +simdjson_inline simdjson_result object::reset() & noexcept { + return iter.reset_object(); +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(ppc64::ondemand::object &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first)[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +inline simdjson_result simdjson_result::reset() noexcept { + if (error()) { return error(); } + return first.reset(); +} + +inline simdjson_result simdjson_result::is_empty() noexcept { + if (error()) { return error(); } + return first.is_empty(); +} + +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H +/* end file simdjson/generic/ondemand/object-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/object_iterator-inl.h for ppc64: #include "simdjson/generic/ondemand/object_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/object_iterator-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +// +// object_iterator +// + +simdjson_inline object_iterator::object_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result object_iterator::operator*() noexcept { + error_code error = iter.error(); + if (error) { iter.abandon(); return error; } + auto result = field::start(iter); + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (result.error()) { iter.abandon(); } + return result; +} +simdjson_inline bool object_iterator::operator==(const object_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool object_iterator::operator!=(const object_iterator &) const noexcept { + return iter.is_open(); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline object_iterator &object_iterator::operator++() noexcept { + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (!iter.is_open()) { return *this; } // Iterator will be released if there is an error + + simdjson_unused error_code error; + if ((error = iter.skip_child() )) { return *this; } + + simdjson_unused bool has_value; + if ((error = iter.has_next_field().get(has_value) )) { return *this; }; + return *this; +} +SIMDJSON_POP_DISABLE_WARNINGS + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter.depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the object is first found and the iterator is just past the {. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the , or } before the next value. In this state, +// depth == iter.depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter.depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter.depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the object iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet field may be missing or not be an +// object--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter.depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between fields, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter.depth == depth, and at_start == false. +// +// Errors that occur while reading a field to give to the user (such as when the key is not a +// string or the field is missing a colon) are yielded immediately. Depth is then decremented, +// moving to the Finished state without transitioning through an Error state at all. +// +// ## Terminal State +// +// The terminal state has iter.depth < depth. at_start is always false. +// +// - Finished: When we have reached a }, we are finished. We signal this by decrementing depth. +// In this state, iter.depth < depth, at_start == false, and error == SUCCESS. +// + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + ppc64::ondemand::object_iterator &&value +) noexcept + : implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +// Checks for ']' and ',' +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++first; + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/object_iterator-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/parser-inl.h for ppc64: #include "simdjson/generic/ondemand/parser-inl.h" */ +/* begin file simdjson/generic/ondemand/parser-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string_view.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/dom/base.h" // for MINIMAL_DOCUMENT_CAPACITY */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +simdjson_inline parser::parser(size_t max_capacity) noexcept + : _max_capacity{max_capacity} { +} + +simdjson_warn_unused simdjson_inline error_code parser::allocate(size_t new_capacity, size_t new_max_depth) noexcept { + if (new_capacity > max_capacity()) { return CAPACITY; } + if (string_buf && new_capacity == capacity() && new_max_depth == max_depth()) { return SUCCESS; } + + // string_capacity copied from document::allocate + _capacity = 0; + size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * new_capacity / 3 + SIMDJSON_PADDING, 64); + string_buf.reset(new (std::nothrow) uint8_t[string_capacity]); +#if SIMDJSON_DEVELOPMENT_CHECKS + start_positions.reset(new (std::nothrow) token_position[new_max_depth]); +#endif + if (implementation) { + SIMDJSON_TRY( implementation->set_capacity(new_capacity) ); + SIMDJSON_TRY( implementation->set_max_depth(new_max_depth) ); + } else { + SIMDJSON_TRY( simdjson::get_active_implementation()->create_dom_parser_implementation(new_capacity, new_max_depth, implementation) ); + } + _capacity = new_capacity; + _max_depth = new_max_depth; + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length() || !string_buf) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return document::start({ reinterpret_cast(json.data()), this }); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const char *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const uint8_t *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string_view json, size_t allocated) & noexcept { + return iterate(padded_string_view(json, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string &json) & noexcept { + if(json.capacity() - json.size() < SIMDJSON_PADDING) { + json.reserve(json.size() + SIMDJSON_PADDING); + } + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const std::string &json) & noexcept { + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + padded_string_view json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + const padded_string &json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate_raw(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length()) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return json_iterator(reinterpret_cast(json.data()), this); +} + +inline simdjson_result parser::iterate_many(const uint8_t *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; } + if((len >= 3) && (std::memcmp(buf, "\xEF\xBB\xBF", 3) == 0)) { + buf += 3; + len -= 3; + } + if(allow_comma_separated && batch_size < len) { batch_size = len; } + return document_stream(*this, buf, len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const char *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(reinterpret_cast(buf), len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const std::string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const padded_string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} + +simdjson_inline size_t parser::capacity() const noexcept { + return _capacity; +} +simdjson_inline size_t parser::max_capacity() const noexcept { + return _max_capacity; +} +simdjson_inline size_t parser::max_depth() const noexcept { + return _max_depth; +} + +simdjson_inline void parser::set_max_capacity(size_t max_capacity) noexcept { + if(max_capacity < dom::MINIMAL_DOCUMENT_CAPACITY) { + _max_capacity = max_capacity; + } else { + _max_capacity = dom::MINIMAL_DOCUMENT_CAPACITY; + } +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement) const noexcept { + uint8_t *end = implementation->parse_string(in.buf, dst, allow_replacement); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept { + uint8_t *end = implementation->parse_wobbly_string(in.buf, dst); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(ppc64::ondemand::parser &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H +/* end file simdjson/generic/ondemand/parser-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/raw_json_string-inl.h for ppc64: #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +namespace ppc64 { +namespace ondemand { + +simdjson_inline raw_json_string::raw_json_string(const uint8_t * _buf) noexcept : buf{_buf} {} + +simdjson_inline const char * raw_json_string::raw() const noexcept { return reinterpret_cast(buf); } + + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(std::string_view target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;pos < target.size() && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;pos < target.size();pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(const char* target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;target[pos] && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;target[pos];pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept { + // If we are going to call memcmp, then we must know something about the length of the raw_json_string. + return (length >= target.size()) && (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); +} + +simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + if(target.size() <= SIMDJSON_PADDING) { + return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); + } + const char * r{raw()}; + size_t pos{0}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept { + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(const char * target) const noexcept { + // Assumptions: 'target' does not contain unescaped quote characters, is null terminated and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(const char* target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept { + return a.unsafe_is_equal(c); +} + +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept { + return a == c; +} + +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept { + return !(a == c); +} + +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept { + return !(a == c); +} + + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape(json_iterator &iter, bool allow_replacement) const noexcept { + return iter.unescape(*this, allow_replacement); +} + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape_wobbly(json_iterator &iter) const noexcept { + return iter.unescape_wobbly(*this); +} + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &out, const raw_json_string &str) noexcept { + bool in_escape = false; + const char *s = str.raw(); + while (true) { + switch (*s) { + case '\\': in_escape = !in_escape; break; + case '"': if (in_escape) { in_escape = false; } else { return out; } break; + default: if (in_escape) { in_escape = false; } + } + out << *s; + s++; + } +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(ppc64::ondemand::raw_json_string &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::raw() const noexcept { + if (error()) { return error(); } + return first.raw(); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape(ppc64::ondemand::json_iterator &iter, bool allow_replacement) const noexcept { + if (error()) { return error(); } + return first.unescape(iter, allow_replacement); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape_wobbly(ppc64::ondemand::json_iterator &iter) const noexcept { + if (error()) { return error(); } + return first.unescape_wobbly(iter); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H +/* end file simdjson/generic/ondemand/raw_json_string-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/serialization-inl.h for ppc64: #include "simdjson/generic/ondemand/serialization-inl.h" */ +/* begin file simdjson/generic/ondemand/serialization-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/serialization.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +inline std::string_view trim(const std::string_view str) noexcept { + // We can almost surely do better by rolling our own find_first_not_of function. + size_t first = str.find_first_not_of(" \t\n\r"); + // If we have the empty string (just white space), then no trimming is possible, and + // we return the empty string_view. + if (std::string_view::npos == first) { return std::string_view(); } + size_t last = str.find_last_not_of(" \t\n\r"); + return str.substr(first, (last - first + 1)); +} + + +inline simdjson_result to_json_string(ppc64::ondemand::document& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(ppc64::ondemand::document_reference& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(ppc64::ondemand::value& x) noexcept { + /** + * 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. + */ + using namespace ppc64::ondemand; + ppc64::ondemand::json_type t; + auto error = x.type().get(t); + if(error != SUCCESS) { return error; } + switch (t) + { + case json_type::array: + { + ppc64::ondemand::array array; + error = x.get_array().get(array); + if(error) { return error; } + return to_json_string(array); + } + case json_type::object: + { + ppc64::ondemand::object object; + error = x.get_object().get(object); + if(error) { return error; } + return to_json_string(object); + } + default: + return trim(x.raw_json_token()); + } +} + +inline simdjson_result to_json_string(ppc64::ondemand::object& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(ppc64::ondemand::array& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} +} // namespace simdjson + +namespace simdjson { namespace ppc64 { namespace ondemand { + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::document_reference& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::ppc64::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif +}}} // namespace simdjson::ppc64::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H +/* end file simdjson/generic/ondemand/serialization-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/token_iterator-inl.h for ppc64: #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/token_iterator-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +simdjson_inline token_iterator::token_iterator( + const uint8_t *_buf, + token_position position +) noexcept : buf{_buf}, _position{position} +{ +} + +simdjson_inline uint32_t token_iterator::current_offset() const noexcept { + return *(_position); +} + + +simdjson_inline const uint8_t *token_iterator::return_current_and_advance() noexcept { + return &buf[*(_position++)]; +} + +simdjson_inline const uint8_t *token_iterator::peek(token_position position) const noexcept { + return &buf[*position]; +} +simdjson_inline uint32_t token_iterator::peek_index(token_position position) const noexcept { + return *position; +} +simdjson_inline uint32_t token_iterator::peek_length(token_position position) const noexcept { + return *(position+1) - *position; +} + +simdjson_inline const uint8_t *token_iterator::peek(int32_t delta) const noexcept { + return &buf[*(_position+delta)]; +} +simdjson_inline uint32_t token_iterator::peek_index(int32_t delta) const noexcept { + return *(_position+delta); +} +simdjson_inline uint32_t token_iterator::peek_length(int32_t delta) const noexcept { + return *(_position+delta+1) - *(_position+delta); +} + +simdjson_inline token_position token_iterator::position() const noexcept { + return _position; +} +simdjson_inline void token_iterator::set_position(token_position target_position) noexcept { + _position = target_position; +} + +simdjson_inline bool token_iterator::operator==(const token_iterator &other) const noexcept { + return _position == other._position; +} +simdjson_inline bool token_iterator::operator!=(const token_iterator &other) const noexcept { + return _position != other._position; +} +simdjson_inline bool token_iterator::operator>(const token_iterator &other) const noexcept { + return _position > other._position; +} +simdjson_inline bool token_iterator::operator>=(const token_iterator &other) const noexcept { + return _position >= other._position; +} +simdjson_inline bool token_iterator::operator<(const token_iterator &other) const noexcept { + return _position < other._position; +} +simdjson_inline bool token_iterator::operator<=(const token_iterator &other) const noexcept { + return _position <= other._position; +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(ppc64::ondemand::token_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/token_iterator-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/value-inl.h for ppc64: #include "simdjson/generic/ondemand/value-inl.h" */ +/* begin file simdjson/generic/ondemand/value-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +simdjson_inline value::value(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} +simdjson_inline value value::start(const value_iterator &iter) noexcept { + return iter; +} +simdjson_inline value value::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline simdjson_result value::get_array() noexcept { + return array::start(iter); +} +simdjson_inline simdjson_result value::get_object() noexcept { + return object::start(iter); +} +simdjson_inline simdjson_result value::start_or_resume_object() noexcept { + if (iter.at_start()) { + return get_object(); + } else { + return object::resume(iter); + } +} + +simdjson_inline simdjson_result value::get_raw_json_string() noexcept { + return iter.get_raw_json_string(); +} +simdjson_inline simdjson_result value::get_string(bool allow_replacement) noexcept { + return iter.get_string(allow_replacement); +} +template +simdjson_inline error_code value::get_string(string_type& receiver, bool allow_replacement) noexcept { + return iter.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result value::get_wobbly_string() noexcept { + return iter.get_wobbly_string(); +} +simdjson_inline simdjson_result value::get_double() noexcept { + return iter.get_double(); +} +simdjson_inline simdjson_result value::get_double_in_string() noexcept { + return iter.get_double_in_string(); +} +simdjson_inline simdjson_result value::get_uint64() noexcept { + return iter.get_uint64(); +} +simdjson_inline simdjson_result value::get_uint64_in_string() noexcept { + return iter.get_uint64_in_string(); +} +simdjson_inline simdjson_result value::get_int64() noexcept { + return iter.get_int64(); +} +simdjson_inline simdjson_result value::get_int64_in_string() noexcept { + return iter.get_int64_in_string(); +} +simdjson_inline simdjson_result value::get_bool() noexcept { + return iter.get_bool(); +} +simdjson_inline simdjson_result value::is_null() noexcept { + return iter.is_null(); +} +template<> simdjson_inline simdjson_result value::get() noexcept { return get_array(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_object(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_number(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_double(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_bool(); } + +template simdjson_inline error_code value::get(T &out) noexcept { + return get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline value::operator array() noexcept(false) { + return get_array(); +} +simdjson_inline value::operator object() noexcept(false) { + return get_object(); +} +simdjson_inline value::operator uint64_t() noexcept(false) { + return get_uint64(); +} +simdjson_inline value::operator int64_t() noexcept(false) { + return get_int64(); +} +simdjson_inline value::operator double() noexcept(false) { + return get_double(); +} +simdjson_inline value::operator std::string_view() noexcept(false) { + return get_string(false); +} +simdjson_inline value::operator raw_json_string() noexcept(false) { + return get_raw_json_string(); +} +simdjson_inline value::operator bool() noexcept(false) { + return get_bool(); +} +#endif + +simdjson_inline simdjson_result value::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result value::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result value::count_elements() & noexcept { + simdjson_result answer; + auto a = get_array(); + answer = a.count_elements(); + // count_elements leaves you pointing inside the array, at the first element. + // We need to move back so that the user can create a new array (which requires that + // we point at '['). + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::count_fields() & noexcept { + simdjson_result answer; + auto a = get_object(); + answer = a.count_fields(); + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::at(size_t index) noexcept { + auto a = get_array(); + return a.at(index); +} + +simdjson_inline simdjson_result value::find_field(std::string_view key) noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result value::find_field(const char *key) noexcept { + return start_or_resume_object().find_field(key); +} + +simdjson_inline simdjson_result value::find_field_unordered(std::string_view key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result value::find_field_unordered(const char *key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} + +simdjson_inline simdjson_result value::operator[](std::string_view key) noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result value::operator[](const char *key) noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline simdjson_result value::type() noexcept { + return iter.type(); +} + +simdjson_inline simdjson_result value::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool value::is_negative() noexcept { + return iter.is_negative(); +} + +simdjson_inline simdjson_result value::is_integer() noexcept { + return iter.is_integer(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number_type() noexcept { + return iter.get_number_type(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number() noexcept { + return iter.get_number(); +} + +simdjson_inline std::string_view value::raw_json_token() noexcept { + return std::string_view(reinterpret_cast(iter.peek_start()), iter.peek_start_length()); +} + +simdjson_inline simdjson_result value::raw_json() noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: { + ondemand::array array; + SIMDJSON_TRY(get_array().get(array)); + return array.raw_json(); + } + case json_type::object: { + ondemand::object object; + SIMDJSON_TRY(get_object().get(object)); + return object.raw_json(); + } + default: + return raw_json_token(); + } +} + +simdjson_inline simdjson_result value::current_location() noexcept { + return iter.json_iter().current_location(); +} + +simdjson_inline int32_t value::current_depth() const noexcept{ + return iter.json_iter().depth(); +} + +simdjson_inline simdjson_result value::at_pointer(std::string_view json_pointer) noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + ppc64::ondemand::value &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + if (error()) { return error(); } + return {}; +} + +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} + +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) noexcept { + if (error()) { return error(); } + return first[key]; +} + +simdjson_inline simdjson_result simdjson_result::get_array() noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return first.get(); +} +template simdjson_inline error_code simdjson_result::get(T &out) noexcept { + if (error()) { return error(); } + return first.get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return std::move(first); +} +template<> simdjson_inline error_code simdjson_result::get(ppc64::ondemand::value &out) noexcept { + if (error()) { return error(); } + out = first; + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator ppc64::ondemand::array() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator ppc64::ondemand::object() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator ppc64::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H +/* end file simdjson/generic/ondemand/value-inl.h for ppc64 */ +/* including simdjson/generic/ondemand/value_iterator-inl.h for ppc64: #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/value_iterator-inl.h for ppc64 */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/atomparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace ppc64 { +namespace ondemand { + +simdjson_inline value_iterator::value_iterator( + json_iterator *json_iter, + depth_t depth, + token_position start_position +) noexcept : _json_iter{json_iter}, _depth{depth}, _start_position{start_position} +{ +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_root_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_object() noexcept { + assert_at_container_start(); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + if (*_json_iter->peek() == '}') { + logger::log_value(*_json_iter, "empty object"); + _json_iter->return_current_and_advance(); + end_container(); + return false; + } + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_object() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // object: e.g., `{"a":2} foo }`. Users concerned with garbage content should + // call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != '}') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing } at end"); + } + // If the last character is } *and* the first gibberish character is also '}' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == '}') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed object. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_object() noexcept { + auto error = check_root_object(); + if(error) { return error; } + return started_object(); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::end_container() noexcept { +#if SIMDJSON_CHECK_EOF + if (depth() > 1 && at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing parent ] or }"); } + // if (depth() <= 1 && !at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + _json_iter->ascend_to(depth()-1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_field() noexcept { + assert_at_next(); + + // It's illegal to call this unless there are more tokens: anything that ends in } or ] is + // obligated to verify there are more tokens if they are not the top level. + switch (*_json_iter->return_current_and_advance()) { + case '}': + logger::log_end_value(*_json_iter, "object"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between object fields"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_raw(const std::string_view key) noexcept { + error_code error; + bool has_value; + // + // Initially, the object can be in one of a few different places: + // + // 1. The start of the object, at the first field: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + if (at_first_field()) { + has_value = true; + + // + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + return false; + + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + if ((error = skip_child() )) { abandon(); return error; } + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + while (has_value) { + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + //if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); // Skip the value entirely + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + + // If the loop ended, we're out of fields to look at. + return false; +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_unordered_raw(const std::string_view key) noexcept { + /** + * When find_field_unordered_raw is called, we can either be pointing at the + * first key, pointing outside (at the closing brace) or if a key was matched + * we can be either pointing right afterthe ':' right before the value (that we need skip), + * or we may have consumed the value and we might be at a comma or at the + * final brace (ready for a call to has_next_field()). + */ + error_code error; + bool has_value; + + // First, we scan from that point to the end. + // If we don't find a match, we may loop back around, and scan from the beginning to that point. + token_position search_start = _json_iter->position(); + + // We want to know whether we need to go back to the beginning. + bool at_first = at_first_field(); + /////////////// + // Initially, the object can be in one of a few different places: + // + // 1. At the first key: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + // + if (at_first) { + has_value = true; + + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { + +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + SIMDJSON_TRY(reset_object().get(has_value)); + at_first = true; + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + // If someone queried a key but they not did access the value, then we are left pointing + // at the ':' and we need to move forward through the value... If the value was + // processed then skip_child() does not move the iterator (but may adjust the depth). + if ((error = skip_child() )) { abandon(); return error; } + search_start = _json_iter->position(); + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + + // After initial processing, we will be in one of two states: + // + // ``` + // // At the beginning of a field + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // At the end of the object + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // ``` + // + // Next, we find a match starting from the current position. + while (has_value) { + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + // Performance note: it maybe wasteful to rewind to the beginning when there might be + // no other query following. Indeed, it would require reskipping the whole object. + // Instead, you can just stay where you are. If there is a new query, there is always time + // to rewind. + if(at_first) { return false; } + + // If we reach the end without finding a match, search the rest of the fields starting at the + // beginning of the object. + // (We have already run through the object before, so we've already validated its structure. We + // don't check errors in this bit.) + SIMDJSON_TRY(reset_object().get(has_value)); + while (true) { + SIMDJSON_ASSUME(has_value); // we should reach search_start before ever reaching the end of the object + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + error = field_key().get(actual_key); SIMDJSON_ASSUME(!error); + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + error = field_value(); SIMDJSON_ASSUME(!error); + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // If we reached the end of the key-value pair we started from, then we know + // that the key is not there so we return false. We are either right before + // the next comma or the final brace. + if(_json_iter->position() == search_start) { return false; } + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + error = has_next_field().get(has_value); SIMDJSON_ASSUME(!error); + // If we make the mistake of exiting here, then we could be left pointing at a key + // in the middle of an object. That's not an allowable state. + } + // If the loop ended, we're out of fields to look at. The program should + // never reach this point. + return false; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::field_key() noexcept { + assert_at_next(); + + const uint8_t *key = _json_iter->return_current_and_advance(); + if (*(key++) != '"') { return report_error(TAPE_ERROR, "Object key is not a string"); } + return raw_json_string(key); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::field_value() noexcept { + assert_at_next(); + + if (*_json_iter->return_current_and_advance() != ':') { return report_error(TAPE_ERROR, "Missing colon in object field"); } + _json_iter->descend_to(depth()+1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_root_array(); +} + +inline std::string value_iterator::to_string() const noexcept { + auto answer = std::string("value_iterator [ depth : ") + std::to_string(_depth) + std::string(", "); + if(_json_iter != nullptr) { answer += _json_iter->to_string(); } + answer += std::string(" ]"); + return answer; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_array() noexcept { + assert_at_container_start(); + if (*_json_iter->peek() == ']') { + logger::log_value(*_json_iter, "empty array"); + _json_iter->return_current_and_advance(); + SIMDJSON_TRY( end_container() ); + return false; + } + _json_iter->descend_to(depth()+1); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_array() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // array: e.g., `[1, 2] foo]`. Users concerned with garbage content should + // also call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != ']') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing ] at end"); + } + // If the last character is ] *and* the first gibberish character is also ']' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == ']') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed array. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_array() noexcept { + auto error = check_root_array(); + if (error) { return error; } + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_element() noexcept { + assert_at_next(); + + logger::log_event(*this, "has_next_element"); + switch (*_json_iter->return_current_and_advance()) { + case ']': + logger::log_end_value(*_json_iter, "array"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + _json_iter->descend_to(depth()+1); + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between array elements"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_bool(const uint8_t *json) const noexcept { + auto not_true = atomparsing::str4ncmp(json, "true"); + auto not_false = atomparsing::str4ncmp(json, "fals") | (json[4] ^ 'e'); + bool error = (not_true && not_false) || jsoncharutils::is_not_structural_or_whitespace(json[not_true ? 5 : 4]); + if (error) { return incorrect_type_error("Not a boolean"); } + return simdjson_result(!not_true); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_null(const uint8_t *json) const noexcept { + bool is_null_string = !atomparsing::str4ncmp(json, "null") && jsoncharutils::is_structural_or_whitespace(json[4]); + // if we start with 'n', we must be a null + if(!is_null_string && json[0]=='n') { return incorrect_type_error("Not a null but starts with n"); } + return is_null_string; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_string(bool allow_replacement) noexcept { + return get_raw_json_string().unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_string(string_type& receiver, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_string(allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_wobbly_string() noexcept { + return get_raw_json_string().unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_raw_json_string() noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64() noexcept { + auto result = numberparsing::parse_unsigned(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64_in_string() noexcept { + auto result = numberparsing::parse_unsigned_in_string(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64() noexcept { + auto result = numberparsing::parse_integer(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64_in_string() noexcept { + auto result = numberparsing::parse_integer_in_string(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double() noexcept { + auto result = numberparsing::parse_double(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double_in_string() noexcept { + auto result = numberparsing::parse_double_in_string(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_bool() noexcept { + auto result = parse_bool(peek_non_root_scalar("bool")); + if(result.error() == SUCCESS) { advance_non_root_scalar("bool"); } + return result; +} +simdjson_inline simdjson_result value_iterator::is_null() noexcept { + bool is_null_value; + SIMDJSON_TRY(parse_null(peek_non_root_scalar("null")).get(is_null_value)); + if(is_null_value) { advance_non_root_scalar("null"); } + return is_null_value; +} +simdjson_inline bool value_iterator::is_negative() noexcept { + return numberparsing::is_negative(peek_non_root_scalar("numbersign")); +} +simdjson_inline bool value_iterator::is_root_negative() noexcept { + return numberparsing::is_negative(peek_root_scalar("numbersign")); +} +simdjson_inline simdjson_result value_iterator::is_integer() noexcept { + return numberparsing::is_integer(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number_type() noexcept { + return numberparsing::get_number_type(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number() noexcept { + number num; + error_code error = numberparsing::parse_number(peek_non_root_scalar("number"), num); + if(error) { return error; } + return num; +} + +simdjson_inline simdjson_result value_iterator::is_root_integer(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("is_root_integer"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + return false; // if there are more than 20 characters, it cannot be represented as an integer. + } + auto answer = numberparsing::is_integer(tmpbuf); + // If the parsing was a success, we must still check that it is + // a single scalar. Note that we parse first because of cases like '[]' where + // getting TRAILING_CONTENT is wrong. + if(check_trailing && (answer.error() == SUCCESS) && (!_json_iter->is_single_token())) { return TRAILING_CONTENT; } + return answer; +} + +simdjson_inline simdjson_result value_iterator::get_root_number_type(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto answer = numberparsing::get_number_type(tmpbuf); + if (check_trailing && (answer.error() == SUCCESS) && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + return answer; +} +simdjson_inline simdjson_result value_iterator::get_root_number(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + number num; + error_code error = numberparsing::parse_number(tmpbuf, num); + if(error) { return error; } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("number"); + return num; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_string(bool check_trailing, bool allow_replacement) noexcept { + return get_root_raw_json_string(check_trailing).unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_root_string(check_trailing, allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_wobbly_string(bool check_trailing) noexcept { + return get_root_raw_json_string(check_trailing).unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_raw_json_string(bool check_trailing) noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_bool(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("bool"); + uint8_t tmpbuf[5+1+1]; // +1 for null termination + tmpbuf[5+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 5+1)) { return incorrect_type_error("Not a boolean"); } + auto result = parse_bool(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("bool"); + } + return result; +} +simdjson_inline simdjson_result value_iterator::is_root_null(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("null"); + bool result = (max_len >= 4 && !atomparsing::str4ncmp(json, "null") && + (max_len == 4 || jsoncharutils::is_structural_or_whitespace(json[4]))); + if(result) { // we have something that looks like a null. + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("null"); + } + return result; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::skip_child() noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth >= _depth ); + + return _json_iter->skip_child(depth()); +} + +simdjson_inline value_iterator value_iterator::child() const noexcept { + assert_at_child(); + return { _json_iter, depth()+1, _json_iter->token.position() }; +} + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and iterator depth, which is a desired effect. It does not happen if is_open is +// marked non-inline. +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline bool value_iterator::is_open() const noexcept { + return _json_iter->depth() >= depth(); +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool value_iterator::at_end() const noexcept { + return _json_iter->at_end(); +} + +simdjson_inline bool value_iterator::at_start() const noexcept { + return _json_iter->token.position() == start_position(); +} + +simdjson_inline bool value_iterator::at_first_field() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + return _json_iter->token.position() == start_position() + 1; +} + +simdjson_inline void value_iterator::abandon() noexcept { + _json_iter->abandon(); +} + +simdjson_warn_unused simdjson_inline depth_t value_iterator::depth() const noexcept { + return _depth; +} +simdjson_warn_unused simdjson_inline error_code value_iterator::error() const noexcept { + return _json_iter->error; +} +simdjson_warn_unused simdjson_inline uint8_t *&value_iterator::string_buf_loc() noexcept { + return _json_iter->string_buf_loc(); +} +simdjson_warn_unused simdjson_inline const json_iterator &value_iterator::json_iter() const noexcept { + return *_json_iter; +} +simdjson_warn_unused simdjson_inline json_iterator &value_iterator::json_iter() noexcept { + return *_json_iter; +} + +simdjson_inline const uint8_t *value_iterator::peek_start() const noexcept { + return _json_iter->peek(start_position()); +} +simdjson_inline uint32_t value_iterator::peek_start_length() const noexcept { + return _json_iter->peek_length(start_position()); +} + +simdjson_inline const uint8_t *value_iterator::peek_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return peek_start(); } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return; } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept { + logger::log_start_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + const uint8_t *json; + if (!is_at_start()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + json = peek_start(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + } else { + assert_at_start(); + /** + * We should be prudent. Let us peek. If it is not the right type, we + * return an error. Only once we have determined that we have the right + * type are we allowed to advance! + */ + json = _json_iter->peek(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + _json_iter->return_current_and_advance(); + } + + + return SUCCESS; +} + + +simdjson_inline const uint8_t *value_iterator::peek_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_root(); + return _json_iter->peek(); +} +simdjson_inline const uint8_t *value_iterator::peek_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_non_root_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_root(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} +simdjson_inline void value_iterator::advance_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_non_root_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::incorrect_type_error(const char *message) const noexcept { + logger::log_error(*_json_iter, start_position(), depth(), message); + return INCORRECT_TYPE; +} + +simdjson_inline bool value_iterator::is_at_start() const noexcept { + return position() == start_position(); +} + +simdjson_inline bool value_iterator::is_at_key() const noexcept { + // Keys are at the same depth as the object. + // Note here that we could be safer and check that we are within an object, + // but we do not. + return _depth == _json_iter->_depth && *_json_iter->peek() == '"'; +} + +simdjson_inline bool value_iterator::is_at_iterator_start() const noexcept { + // We can legitimately be either at the first value ([1]), or after the array if it's empty ([]). + auto delta = position() - start_position(); + return delta == 1 || delta == 2; +} + +inline void value_iterator::assert_at_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_container_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position + 1 ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_next() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +simdjson_inline void value_iterator::move_at_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position); +} + +simdjson_inline void value_iterator::move_at_container_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position + 1); +} + +simdjson_inline simdjson_result value_iterator::reset_array() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_array(); +} + +simdjson_inline simdjson_result value_iterator::reset_object() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_object(); +} + +inline void value_iterator::assert_at_child() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth + 1 ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_root() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth == 1 ); +} + +inline void value_iterator::assert_at_non_root_start() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth > 1 ); +} + +inline void value_iterator::assert_is_valid() const noexcept { + SIMDJSON_ASSUME( _json_iter != nullptr ); +} + +simdjson_inline bool value_iterator::is_valid() const noexcept { + return _json_iter != nullptr; +} + +simdjson_inline simdjson_result value_iterator::type() const noexcept { + switch (*peek_start()) { + case '{': + return json_type::object; + case '[': + return json_type::array; + case '"': + return json_type::string; + case 'n': + return json_type::null; + case 't': case 'f': + return json_type::boolean; + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return json_type::number; + default: + return TAPE_ERROR; + } +} + +simdjson_inline token_position value_iterator::start_position() const noexcept { + return _start_position; +} + +simdjson_inline token_position value_iterator::position() const noexcept { + return _json_iter->position(); +} + +simdjson_inline token_position value_iterator::end_position() const noexcept { + return _json_iter->end_position(); +} + +simdjson_inline token_position value_iterator::last_position() const noexcept { + return _json_iter->last_position(); +} + +simdjson_inline error_code value_iterator::report_error(error_code error, const char *message) noexcept { + return _json_iter->report_error(error, message); +} + +} // namespace ondemand +} // namespace ppc64 +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(ppc64::ondemand::value_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/value_iterator-inl.h for ppc64 */ +/* end file simdjson/generic/ondemand/amalgamated.h for ppc64 */ +/* including simdjson/ppc64/end.h: #include "simdjson/ppc64/end.h" */ +/* begin file simdjson/ppc64/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/ppc64/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#undef SIMDJSON_SKIP_BACKSLASH_SHORT_CIRCUIT +/* undefining SIMDJSON_IMPLEMENTATION from "ppc64" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/ppc64/end.h */ + +#endif // SIMDJSON_PPC64_ONDEMAND_H +/* end file simdjson/ppc64/ondemand.h */ +#elif SIMDJSON_BUILTIN_IMPLEMENTATION_IS(westmere) +/* including simdjson/westmere/ondemand.h: #include "simdjson/westmere/ondemand.h" */ +/* begin file simdjson/westmere/ondemand.h */ +#ifndef SIMDJSON_WESTMERE_ONDEMAND_H +#define SIMDJSON_WESTMERE_ONDEMAND_H + +/* including simdjson/westmere/begin.h: #include "simdjson/westmere/begin.h" */ +/* begin file simdjson/westmere/begin.h */ +/* defining SIMDJSON_IMPLEMENTATION to "westmere" */ +#define SIMDJSON_IMPLEMENTATION westmere +/* including simdjson/westmere/base.h: #include "simdjson/westmere/base.h" */ +/* begin file simdjson/westmere/base.h */ +#ifndef SIMDJSON_WESTMERE_BASE_H +#define SIMDJSON_WESTMERE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE +namespace simdjson { +/** + * Implementation for Westmere (Intel SSE4.2). + */ +namespace westmere { + +class implementation; + +namespace { +namespace simd { + +template struct simd8; +template struct simd8x64; + +} // namespace simd +} // unnamed namespace + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BASE_H +/* end file simdjson/westmere/base.h */ +/* including simdjson/westmere/intrinsics.h: #include "simdjson/westmere/intrinsics.h" */ +/* begin file simdjson/westmere/intrinsics.h */ +#ifndef SIMDJSON_WESTMERE_INTRINSICS_H +#define SIMDJSON_WESTMERE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + */ +#include // for _mm_alignr_epi8 +#include // for _mm_clmulepi64_si128 +#endif + +static_assert(sizeof(__m128i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for westmere"); + +#endif // SIMDJSON_WESTMERE_INTRINSICS_H +/* end file simdjson/westmere/intrinsics.h */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_WESTMERE +SIMDJSON_TARGET_REGION("sse4.2,pclmul,popcnt") +#endif + +/* including simdjson/westmere/bitmanipulation.h: #include "simdjson/westmere/bitmanipulation.h" */ +/* begin file simdjson/westmere/bitmanipulation.h */ +#ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H +#define SIMDJSON_WESTMERE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMANIPULATION_H +/* end file simdjson/westmere/bitmanipulation.h */ +/* including simdjson/westmere/bitmask.h: #include "simdjson/westmere/bitmask.h" */ +/* begin file simdjson/westmere/bitmask.h */ +#ifndef SIMDJSON_WESTMERE_BITMASK_H +#define SIMDJSON_WESTMERE_BITMASK_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// +// Perform a "cumulative bitwise xor," flipping bits each time a 1 is encountered. +// +// For example, prefix_xor(00100100) == 00011100 +// +simdjson_inline uint64_t prefix_xor(const uint64_t bitmask) { + // There should be no such thing with a processing supporting avx2 + // but not clmul. + __m128i all_ones = _mm_set1_epi8('\xFF'); + __m128i result = _mm_clmulepi64_si128(_mm_set_epi64x(0ULL, bitmask), all_ones, 0); + return _mm_cvtsi128_si64(result); +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMASK_H +/* end file simdjson/westmere/bitmask.h */ +/* including simdjson/westmere/numberparsing_defs.h: #include "simdjson/westmere/numberparsing_defs.h" */ +/* begin file simdjson/westmere/numberparsing_defs.h */ +#ifndef SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H +#define SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H + +/* including simdjson/westmere/base.h: #include "simdjson/westmere/base.h" */ +/* begin file simdjson/westmere/base.h */ +#ifndef SIMDJSON_WESTMERE_BASE_H +#define SIMDJSON_WESTMERE_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +// The constructor may be executed on any host, so we take care not to use SIMDJSON_TARGET_WESTMERE +namespace simdjson { +/** + * Implementation for Westmere (Intel SSE4.2). + */ +namespace westmere { + +class implementation; + +namespace { +namespace simd { + +template struct simd8; +template struct simd8x64; + +} // namespace simd +} // unnamed namespace + +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BASE_H +/* end file simdjson/westmere/base.h */ +/* including simdjson/westmere/intrinsics.h: #include "simdjson/westmere/intrinsics.h" */ +/* begin file simdjson/westmere/intrinsics.h */ +#ifndef SIMDJSON_WESTMERE_INTRINSICS_H +#define SIMDJSON_WESTMERE_INTRINSICS_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if SIMDJSON_VISUAL_STUDIO +// under clang within visual studio, this will include +#include // visual studio or clang +#else +#include // elsewhere +#endif // SIMDJSON_VISUAL_STUDIO + + +#if SIMDJSON_CLANG_VISUAL_STUDIO +/** + * You are not supposed, normally, to include these + * headers directly. Instead you should either include intrin.h + * or x86intrin.h. However, when compiling with clang + * under Windows (i.e., when _MSC_VER is set), these headers + * only get included *if* the corresponding features are detected + * from macros: + */ +#include // for _mm_alignr_epi8 +#include // for _mm_clmulepi64_si128 +#endif + +static_assert(sizeof(__m128i) <= simdjson::SIMDJSON_PADDING, "insufficient padding for westmere"); + +#endif // SIMDJSON_WESTMERE_INTRINSICS_H +/* end file simdjson/westmere/intrinsics.h */ + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/numberparsing_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace numberparsing { + +/** @private */ +static simdjson_inline uint32_t parse_eight_digits_unrolled(const uint8_t *chars) { + // this actually computes *16* values so we are being wasteful. + const __m128i ascii0 = _mm_set1_epi8('0'); + const __m128i mul_1_10 = + _mm_setr_epi8(10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1, 10, 1); + const __m128i mul_1_100 = _mm_setr_epi16(100, 1, 100, 1, 100, 1, 100, 1); + const __m128i mul_1_10000 = + _mm_setr_epi16(10000, 1, 10000, 1, 10000, 1, 10000, 1); + const __m128i input = _mm_sub_epi8( + _mm_loadu_si128(reinterpret_cast(chars)), ascii0); + const __m128i t1 = _mm_maddubs_epi16(input, mul_1_10); + const __m128i t2 = _mm_madd_epi16(t1, mul_1_100); + const __m128i t3 = _mm_packus_epi32(t2, t2); + const __m128i t4 = _mm_madd_epi16(t3, mul_1_10000); + return _mm_cvtsi128_si32( + t4); // only captures the sum of the first 8 digits, drop the rest +} + +/** @private */ +simdjson_inline internal::value128 full_multiplication(uint64_t value1, uint64_t value2) { + internal::value128 answer; +#if SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS +#ifdef _M_ARM64 + // ARM64 has native support for 64-bit multiplications, no need to emultate + answer.high = __umulh(value1, value2); + answer.low = value1 * value2; +#else + answer.low = _umul128(value1, value2, &answer.high); // _umul128 not available on ARM64 +#endif // _M_ARM64 +#else // SIMDJSON_REGULAR_VISUAL_STUDIO || SIMDJSON_IS_32BITS + __uint128_t r = (static_cast<__uint128_t>(value1)) * value2; + answer.low = uint64_t(r); + answer.high = uint64_t(r >> 64); +#endif + return answer; +} + +} // namespace numberparsing +} // namespace westmere +} // namespace simdjson + +#define SIMDJSON_SWAR_NUMBER_PARSING 1 + +#endif // SIMDJSON_WESTMERE_NUMBERPARSING_DEFS_H +/* end file simdjson/westmere/numberparsing_defs.h */ +/* including simdjson/westmere/simd.h: #include "simdjson/westmere/simd.h" */ +/* begin file simdjson/westmere/simd.h */ +#ifndef SIMDJSON_WESTMERE_SIMD_H +#define SIMDJSON_WESTMERE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace simd { + + template + struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i&() const { return this->value; } + simdjson_inline operator __m128i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm_or_si128(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm_and_si128(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm_xor_si128(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm_andnot_si128(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + template> + struct base8: base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm_alignr_epi8(*this, prev_chunk, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm_testz_si128(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm_setzero_si128(); } + static simdjson_inline simd8 load(const T values[16]) { + return _mm_loadu_si128(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { return _mm_storeu_si128(reinterpret_cast<__m128i *>(dst), *this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m128i shufmask = _mm_set_epi64x(thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask + shufmask = + _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m128i pruned = _mm_shuffle_epi8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = _mm_shuffle_epi8(pruned, compactmask); + _mm_storeu_si128(reinterpret_cast<__m128i *>(output), answer); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epu8(*this, other); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm_testz_si128(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm_testz_si128(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm_movemask_epi8(_mm_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "Westmere kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() ); + uint64_t r1 = this->chunks[1].to_bitmask() ; + uint64_t r2 = this->chunks[2].to_bitmask() ; + uint64_t r3 = this->chunks[3].to_bitmask() ; + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_SIMD_INPUT_H +/* end file simdjson/westmere/simd.h */ +/* including simdjson/westmere/stringparsing_defs.h: #include "simdjson/westmere/stringparsing_defs.h" */ +/* begin file simdjson/westmere/stringparsing_defs.h */ +#ifndef SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H +#define SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H + +/* including simdjson/westmere/bitmanipulation.h: #include "simdjson/westmere/bitmanipulation.h" */ +/* begin file simdjson/westmere/bitmanipulation.h */ +#ifndef SIMDJSON_WESTMERE_BITMANIPULATION_H +#define SIMDJSON_WESTMERE_BITMANIPULATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/intrinsics.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { + +// We sometimes call trailing_zero on inputs that are zero, +// but the algorithms do not end up using the returned value. +// Sadly, sanitizers are not smart enough to figure it out. +SIMDJSON_NO_SANITIZE_UNDEFINED +// This function can be used safely even if not all bytes have been +// initialized. +// See issue https://github.com/simdjson/simdjson/issues/1965 +SIMDJSON_NO_SANITIZE_MEMORY +simdjson_inline int trailing_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long ret; + // Search the mask data from least significant bit (LSB) + // to the most significant bit (MSB) for a set bit (1). + _BitScanForward64(&ret, input_num); + return (int)ret; +#else // SIMDJSON_REGULAR_VISUAL_STUDIO + return __builtin_ctzll(input_num); +#endif // SIMDJSON_REGULAR_VISUAL_STUDIO +} + +/* result might be undefined when input_num is zero */ +simdjson_inline uint64_t clear_lowest_bit(uint64_t input_num) { + return input_num & (input_num-1); +} + +/* result might be undefined when input_num is zero */ +simdjson_inline int leading_zeroes(uint64_t input_num) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + unsigned long leading_zero = 0; + // Search the mask data from most significant bit (MSB) + // to least significant bit (LSB) for a set bit (1). + if (_BitScanReverse64(&leading_zero, input_num)) + return (int)(63 - leading_zero); + else + return 64; +#else + return __builtin_clzll(input_num); +#endif// SIMDJSON_REGULAR_VISUAL_STUDIO +} + +#if SIMDJSON_REGULAR_VISUAL_STUDIO +simdjson_inline unsigned __int64 count_ones(uint64_t input_num) { + // note: we do not support legacy 32-bit Windows in this kernel + return __popcnt64(input_num);// Visual Studio wants two underscores +} +#else +simdjson_inline long long int count_ones(uint64_t input_num) { + return _popcnt64(input_num); +} +#endif + +simdjson_inline bool add_overflow(uint64_t value1, uint64_t value2, + uint64_t *result) { +#if SIMDJSON_REGULAR_VISUAL_STUDIO + return _addcarry_u64(0, value1, value2, + reinterpret_cast(result)); +#else + return __builtin_uaddll_overflow(value1, value2, + reinterpret_cast(result)); +#endif +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_BITMANIPULATION_H +/* end file simdjson/westmere/bitmanipulation.h */ +/* including simdjson/westmere/simd.h: #include "simdjson/westmere/simd.h" */ +/* begin file simdjson/westmere/simd.h */ +#ifndef SIMDJSON_WESTMERE_SIMD_H +#define SIMDJSON_WESTMERE_SIMD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/bitmanipulation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/simdprune_tables.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace { +namespace simd { + + template + struct base { + __m128i value; + + // Zero constructor + simdjson_inline base() : value{__m128i()} {} + + // Conversion from SIMD register + simdjson_inline base(const __m128i _value) : value(_value) {} + + // Conversion to SIMD register + simdjson_inline operator const __m128i&() const { return this->value; } + simdjson_inline operator __m128i&() { return this->value; } + + // Bit operations + simdjson_inline Child operator|(const Child other) const { return _mm_or_si128(*this, other); } + simdjson_inline Child operator&(const Child other) const { return _mm_and_si128(*this, other); } + simdjson_inline Child operator^(const Child other) const { return _mm_xor_si128(*this, other); } + simdjson_inline Child bit_andnot(const Child other) const { return _mm_andnot_si128(other, *this); } + simdjson_inline Child& operator|=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast | other; return *this_cast; } + simdjson_inline Child& operator&=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast & other; return *this_cast; } + simdjson_inline Child& operator^=(const Child other) { auto this_cast = static_cast(this); *this_cast = *this_cast ^ other; return *this_cast; } + }; + + template> + struct base8: base> { + typedef uint16_t bitmask_t; + typedef uint32_t bitmask2_t; + + simdjson_inline base8() : base>() {} + simdjson_inline base8(const __m128i _value) : base>(_value) {} + + friend simdjson_inline Mask operator==(const simd8 lhs, const simd8 rhs) { return _mm_cmpeq_epi8(lhs, rhs); } + + static const int SIZE = sizeof(base>::value); + + template + simdjson_inline simd8 prev(const simd8 prev_chunk) const { + return _mm_alignr_epi8(*this, prev_chunk, 16 - N); + } + }; + + // SIMD byte mask type (returned by things like eq and gt) + template<> + struct simd8: base8 { + static simdjson_inline simd8 splat(bool _value) { return _mm_set1_epi8(uint8_t(-(!!_value))); } + + simdjson_inline simd8() : base8() {} + simdjson_inline simd8(const __m128i _value) : base8(_value) {} + // Splat constructor + simdjson_inline simd8(bool _value) : base8(splat(_value)) {} + + simdjson_inline int to_bitmask() const { return _mm_movemask_epi8(*this); } + simdjson_inline bool any() const { return !_mm_testz_si128(*this, *this); } + simdjson_inline simd8 operator~() const { return *this ^ true; } + }; + + template + struct base8_numeric: base8 { + static simdjson_inline simd8 splat(T _value) { return _mm_set1_epi8(_value); } + static simdjson_inline simd8 zero() { return _mm_setzero_si128(); } + static simdjson_inline simd8 load(const T values[16]) { + return _mm_loadu_si128(reinterpret_cast(values)); + } + // Repeat 16 values as many times as necessary (usually for lookup tables) + static simdjson_inline simd8 repeat_16( + T v0, T v1, T v2, T v3, T v4, T v5, T v6, T v7, + T v8, T v9, T v10, T v11, T v12, T v13, T v14, T v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + simdjson_inline base8_numeric() : base8() {} + simdjson_inline base8_numeric(const __m128i _value) : base8(_value) {} + + // Store to array + simdjson_inline void store(T dst[16]) const { return _mm_storeu_si128(reinterpret_cast<__m128i *>(dst), *this); } + + // Override to distinguish from bool version + simdjson_inline simd8 operator~() const { return *this ^ 0xFFu; } + + // Addition/subtraction are the same for signed and unsigned + simdjson_inline simd8 operator+(const simd8 other) const { return _mm_add_epi8(*this, other); } + simdjson_inline simd8 operator-(const simd8 other) const { return _mm_sub_epi8(*this, other); } + simdjson_inline simd8& operator+=(const simd8 other) { *this = *this + other; return *static_cast*>(this); } + simdjson_inline simd8& operator-=(const simd8 other) { *this = *this - other; return *static_cast*>(this); } + + // Perform a lookup assuming the value is between 0 and 16 (undefined behavior for out of range values) + template + simdjson_inline simd8 lookup_16(simd8 lookup_table) const { + return _mm_shuffle_epi8(lookup_table, *this); + } + + // Copies to 'output" all bytes corresponding to a 0 in the mask (interpreted as a bitset). + // Passing a 0 value for mask would be equivalent to writing out every byte to output. + // Only the first 16 - count_ones(mask) bytes of the result are significant but 16 bytes + // get written. + // Design consideration: it seems like a function with the + // signature simd8 compress(uint32_t mask) would be + // sensible, but the AVX ISA makes this kind of approach difficult. + template + simdjson_inline void compress(uint16_t mask, L * output) const { + using internal::thintable_epi8; + using internal::BitsSetTable256mul2; + using internal::pshufb_combine_table; + // this particular implementation was inspired by work done by @animetosho + // we do it in two steps, first 8 bytes and then second 8 bytes + uint8_t mask1 = uint8_t(mask); // least significant 8 bits + uint8_t mask2 = uint8_t(mask >> 8); // most significant 8 bits + // next line just loads the 64-bit values thintable_epi8[mask1] and + // thintable_epi8[mask2] into a 128-bit register, using only + // two instructions on most compilers. + __m128i shufmask = _mm_set_epi64x(thintable_epi8[mask2], thintable_epi8[mask1]); + // we increment by 0x08 the second half of the mask + shufmask = + _mm_add_epi8(shufmask, _mm_set_epi32(0x08080808, 0x08080808, 0, 0)); + // this is the version "nearly pruned" + __m128i pruned = _mm_shuffle_epi8(*this, shufmask); + // we still need to put the two halves together. + // we compute the popcount of the first half: + int pop1 = BitsSetTable256mul2[mask1]; + // then load the corresponding mask, what it does is to write + // only the first pop1 bytes from the first 8 bytes, and then + // it fills in with the bytes from the second 8 bytes + some filling + // at the end. + __m128i compactmask = + _mm_loadu_si128(reinterpret_cast(pshufb_combine_table + pop1 * 8)); + __m128i answer = _mm_shuffle_epi8(pruned, compactmask); + _mm_storeu_si128(reinterpret_cast<__m128i *>(output), answer); + } + + template + simdjson_inline simd8 lookup_16( + L replace0, L replace1, L replace2, L replace3, + L replace4, L replace5, L replace6, L replace7, + L replace8, L replace9, L replace10, L replace11, + L replace12, L replace13, L replace14, L replace15) const { + return lookup_16(simd8::repeat_16( + replace0, replace1, replace2, replace3, + replace4, replace5, replace6, replace7, + replace8, replace9, replace10, replace11, + replace12, replace13, replace14, replace15 + )); + } + }; + + // Signed bytes + template<> + struct simd8 : base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(int8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const int8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + int8_t v0, int8_t v1, int8_t v2, int8_t v3, int8_t v4, int8_t v5, int8_t v6, int8_t v7, + int8_t v8, int8_t v9, int8_t v10, int8_t v11, int8_t v12, int8_t v13, int8_t v14, int8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Order-sensitive comparisons + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epi8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epi8(*this, other); } + simdjson_inline simd8 operator>(const simd8 other) const { return _mm_cmpgt_epi8(*this, other); } + simdjson_inline simd8 operator<(const simd8 other) const { return _mm_cmpgt_epi8(other, *this); } + }; + + // Unsigned bytes + template<> + struct simd8: base8_numeric { + simdjson_inline simd8() : base8_numeric() {} + simdjson_inline simd8(const __m128i _value) : base8_numeric(_value) {} + // Splat constructor + simdjson_inline simd8(uint8_t _value) : simd8(splat(_value)) {} + // Array constructor + simdjson_inline simd8(const uint8_t* values) : simd8(load(values)) {} + // Member-by-member initialization + simdjson_inline simd8( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) : simd8(_mm_setr_epi8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + )) {} + // Repeat 16 values as many times as necessary (usually for lookup tables) + simdjson_inline static simd8 repeat_16( + uint8_t v0, uint8_t v1, uint8_t v2, uint8_t v3, uint8_t v4, uint8_t v5, uint8_t v6, uint8_t v7, + uint8_t v8, uint8_t v9, uint8_t v10, uint8_t v11, uint8_t v12, uint8_t v13, uint8_t v14, uint8_t v15 + ) { + return simd8( + v0, v1, v2, v3, v4, v5, v6, v7, + v8, v9, v10,v11,v12,v13,v14,v15 + ); + } + + // Saturated math + simdjson_inline simd8 saturating_add(const simd8 other) const { return _mm_adds_epu8(*this, other); } + simdjson_inline simd8 saturating_sub(const simd8 other) const { return _mm_subs_epu8(*this, other); } + + // Order-specific operations + simdjson_inline simd8 max_val(const simd8 other) const { return _mm_max_epu8(*this, other); } + simdjson_inline simd8 min_val(const simd8 other) const { return _mm_min_epu8(*this, other); } + // Same as >, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 gt_bits(const simd8 other) const { return this->saturating_sub(other); } + // Same as <, but only guarantees true is nonzero (< guarantees true = -1) + simdjson_inline simd8 lt_bits(const simd8 other) const { return other.saturating_sub(*this); } + simdjson_inline simd8 operator<=(const simd8 other) const { return other.max_val(*this) == other; } + simdjson_inline simd8 operator>=(const simd8 other) const { return other.min_val(*this) == other; } + simdjson_inline simd8 operator>(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + simdjson_inline simd8 operator<(const simd8 other) const { return this->gt_bits(other).any_bits_set(); } + + // Bit-specific operations + simdjson_inline simd8 bits_not_set() const { return *this == uint8_t(0); } + simdjson_inline simd8 bits_not_set(simd8 bits) const { return (*this & bits).bits_not_set(); } + simdjson_inline simd8 any_bits_set() const { return ~this->bits_not_set(); } + simdjson_inline simd8 any_bits_set(simd8 bits) const { return ~this->bits_not_set(bits); } + simdjson_inline bool is_ascii() const { return _mm_movemask_epi8(*this) == 0; } + simdjson_inline bool bits_not_set_anywhere() const { return _mm_testz_si128(*this, *this); } + simdjson_inline bool any_bits_set_anywhere() const { return !bits_not_set_anywhere(); } + simdjson_inline bool bits_not_set_anywhere(simd8 bits) const { return _mm_testz_si128(*this, bits); } + simdjson_inline bool any_bits_set_anywhere(simd8 bits) const { return !bits_not_set_anywhere(bits); } + template + simdjson_inline simd8 shr() const { return simd8(_mm_srli_epi16(*this, N)) & uint8_t(0xFFu >> N); } + template + simdjson_inline simd8 shl() const { return simd8(_mm_slli_epi16(*this, N)) & uint8_t(0xFFu << N); } + // Get one of the bits and make a bitmask out of it. + // e.g. value.get_bit<7>() gets the high bit + template + simdjson_inline int get_bit() const { return _mm_movemask_epi8(_mm_slli_epi16(*this, 7-N)); } + }; + + template + struct simd8x64 { + static constexpr int NUM_CHUNKS = 64 / sizeof(simd8); + static_assert(NUM_CHUNKS == 4, "Westmere kernel should use four registers per 64-byte block."); + const simd8 chunks[NUM_CHUNKS]; + + simd8x64(const simd8x64& o) = delete; // no copy allowed + simd8x64& operator=(const simd8& other) = delete; // no assignment allowed + simd8x64() = delete; // no default constructor allowed + + simdjson_inline simd8x64(const simd8 chunk0, const simd8 chunk1, const simd8 chunk2, const simd8 chunk3) : chunks{chunk0, chunk1, chunk2, chunk3} {} + simdjson_inline simd8x64(const T ptr[64]) : chunks{simd8::load(ptr), simd8::load(ptr+16), simd8::load(ptr+32), simd8::load(ptr+48)} {} + + simdjson_inline void store(T ptr[64]) const { + this->chunks[0].store(ptr+sizeof(simd8)*0); + this->chunks[1].store(ptr+sizeof(simd8)*1); + this->chunks[2].store(ptr+sizeof(simd8)*2); + this->chunks[3].store(ptr+sizeof(simd8)*3); + } + + simdjson_inline simd8 reduce_or() const { + return (this->chunks[0] | this->chunks[1]) | (this->chunks[2] | this->chunks[3]); + } + + simdjson_inline uint64_t compress(uint64_t mask, T * output) const { + this->chunks[0].compress(uint16_t(mask), output); + this->chunks[1].compress(uint16_t(mask >> 16), output + 16 - count_ones(mask & 0xFFFF)); + this->chunks[2].compress(uint16_t(mask >> 32), output + 32 - count_ones(mask & 0xFFFFFFFF)); + this->chunks[3].compress(uint16_t(mask >> 48), output + 48 - count_ones(mask & 0xFFFFFFFFFFFF)); + return 64 - count_ones(mask); + } + + simdjson_inline uint64_t to_bitmask() const { + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() ); + uint64_t r1 = this->chunks[1].to_bitmask() ; + uint64_t r2 = this->chunks[2].to_bitmask() ; + uint64_t r3 = this->chunks[3].to_bitmask() ; + return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); + } + + simdjson_inline uint64_t eq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] == mask, + this->chunks[1] == mask, + this->chunks[2] == mask, + this->chunks[3] == mask + ).to_bitmask(); + } + + simdjson_inline uint64_t eq(const simd8x64 &other) const { + return simd8x64( + this->chunks[0] == other.chunks[0], + this->chunks[1] == other.chunks[1], + this->chunks[2] == other.chunks[2], + this->chunks[3] == other.chunks[3] + ).to_bitmask(); + } + + simdjson_inline uint64_t lteq(const T m) const { + const simd8 mask = simd8::splat(m); + return simd8x64( + this->chunks[0] <= mask, + this->chunks[1] <= mask, + this->chunks[2] <= mask, + this->chunks[3] <= mask + ).to_bitmask(); + } + }; // struct simd8x64 + +} // namespace simd +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_SIMD_INPUT_H +/* end file simdjson/westmere/simd.h */ + +namespace simdjson { +namespace westmere { +namespace { + +using namespace simd; + +// Holds backslashes and quotes locations. +struct backslash_and_quote { +public: + static constexpr uint32_t BYTES_PROCESSED = 32; + simdjson_inline static backslash_and_quote copy_and_find(const uint8_t *src, uint8_t *dst); + + simdjson_inline bool has_quote_first() { return ((bs_bits - 1) & quote_bits) != 0; } + simdjson_inline bool has_backslash() { return bs_bits != 0; } + simdjson_inline int quote_index() { return trailing_zeroes(quote_bits); } + simdjson_inline int backslash_index() { return trailing_zeroes(bs_bits); } + + uint32_t bs_bits; + uint32_t quote_bits; +}; // struct backslash_and_quote + +simdjson_inline backslash_and_quote backslash_and_quote::copy_and_find(const uint8_t *src, uint8_t *dst) { + // this can read up to 31 bytes beyond the buffer size, but we require + // SIMDJSON_PADDING of padding + static_assert(SIMDJSON_PADDING >= (BYTES_PROCESSED - 1), "backslash and quote finder must process fewer than SIMDJSON_PADDING bytes"); + simd8 v0(src); + simd8 v1(src + 16); + v0.store(dst); + v1.store(dst + 16); + uint64_t bs_and_quote = simd8x64(v0 == '\\', v1 == '\\', v0 == '"', v1 == '"').to_bitmask(); + return { + uint32_t(bs_and_quote), // bs_bits + uint32_t(bs_and_quote >> 32) // quote_bits + }; +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_WESTMERE_STRINGPARSING_DEFS_H +/* end file simdjson/westmere/stringparsing_defs.h */ +/* end file simdjson/westmere/begin.h */ +/* including simdjson/generic/ondemand/amalgamated.h for westmere: #include "simdjson/generic/ondemand/amalgamated.h" */ +/* begin file simdjson/generic/ondemand/amalgamated.h for westmere */ +#if defined(SIMDJSON_CONDITIONAL_INCLUDE) && !defined(SIMDJSON_GENERIC_ONDEMAND_DEPENDENCIES_H) +#error simdjson/generic/ondemand/dependencies.h must be included before simdjson/generic/ondemand/amalgamated.h! +#endif + +// Stuff other things depend on +/* including simdjson/generic/ondemand/base.h for westmere: #include "simdjson/generic/ondemand/base.h" */ +/* begin file simdjson/generic/ondemand/base.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_BASE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_BASE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +/** + * A fast, simple, DOM-like interface that parses JSON as you use it. + * + * Designed for maximum speed and a lower memory profile. + */ +namespace ondemand { + +/** Represents the depth of a JSON value (number of nested arrays/objects). */ +using depth_t = int32_t; + +/** @copydoc simdjson::westmere::number_type */ +using number_type = simdjson::westmere::number_type; + +/** @private Position in the JSON buffer indexes */ +using token_position = const uint32_t *; + +class array; +class array_iterator; +class document; +class document_reference; +class document_stream; +class field; +class json_iterator; +enum class json_type; +struct number; +class object; +class object_iterator; +class parser; +class raw_json_string; +class token_iterator; +class value; +class value_iterator; + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_BASE_H +/* end file simdjson/generic/ondemand/base.h for westmere */ +/* including simdjson/generic/ondemand/value_iterator.h for westmere: #include "simdjson/generic/ondemand/value_iterator.h" */ +/* begin file simdjson/generic/ondemand/value_iterator.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * Iterates through a single JSON value at a particular depth. + * + * Does not keep track of the type of value: provides methods for objects, arrays and scalars and expects + * the caller to call the right ones. + * + * @private This is not intended for external use. + */ +class value_iterator { +protected: + /** The underlying JSON iterator */ + json_iterator *_json_iter{}; + /** The depth of this value */ + depth_t _depth{}; + /** + * The starting token index for this value + */ + token_position _start_position{}; + +public: + simdjson_inline value_iterator() noexcept = default; + + /** + * Denote that we're starting a document. + */ + simdjson_inline void start_document() noexcept; + + /** + * Skips a non-iterated or partially-iterated JSON value, whether it is a scalar, array or object. + * + * Optimized for scalars. + */ + simdjson_warn_unused simdjson_inline error_code skip_child() noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is at the start of the value + */ + simdjson_inline bool at_start() const noexcept; + + /** + * Tell whether the value is open--if the value has not been used, or the array/object is still open. + */ + simdjson_inline bool is_open() const noexcept; + + /** + * Tell whether the value is at an object's first field (just after the {). + */ + simdjson_inline bool at_first_field() const noexcept; + + /** + * Abandon all iteration. + */ + simdjson_inline void abandon() noexcept; + + /** + * Get the child value as a value_iterator. + */ + simdjson_inline value_iterator child_value() const noexcept; + + /** + * Get the depth of this value. + */ + simdjson_inline int32_t depth() const noexcept; + + /** + * Get the JSON type of this value. + * + * @error TAPE_ERROR when the JSON value is a bad token like "}" "," or "alse". + */ + simdjson_inline simdjson_result type() const noexcept; + + /** + * @addtogroup object Object iteration + * + * Methods to iterate and find object fields. These methods generally *assume* the value is + * actually an object; the caller is responsible for keeping track of that fact. + * + * @{ + */ + + /** + * Start an object iteration. + * + * @returns Whether the object had any fields (returns false for empty). + * @error INCORRECT_TYPE if there is no opening { + */ + simdjson_warn_unused simdjson_inline simdjson_result start_object() noexcept; + /** + * Start an object iteration from the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_object() noexcept; + /** + * Checks whether an object could be started from the root. May be called by start_root_object. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_object() noexcept; + /** + * Start an object iteration after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_object() noexcept; + /** + * Start an object iteration from the root, after the user has already checked and moved past the {. + * + * Does not move the iterator unless the object is empty ({}). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_object() noexcept; + + /** + * Moves to the next field in an object. + * + * Looks for , and }. If } is found, the object is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_field() noexcept; + + /** + * Get the current field's key. + */ + simdjson_warn_unused simdjson_inline simdjson_result field_key() noexcept; + + /** + * Pass the : in the field and move to its value. + */ + simdjson_warn_unused simdjson_inline error_code field_value() noexcept; + + /** + * Find the next field with the given key. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline error_code find_field(const std::string_view key) noexcept; + + /** + * Find the next field with the given key, *without* unescaping. This assumes object order: it + * will not find the field if it was already passed when looking for some *other* field. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_raw(const std::string_view key) noexcept; + + /** + * Find the field with the given key without regard to order, and *without* unescaping. + * + * This is an unordered object lookup: if the field is not found initially, it will cycle around and scan from the beginning. + * + * Assumes you have called next_field() or otherwise matched the previous value. + * + * This means the iterator must be sitting at the next key: + * + * ``` + * { "a": 1, "b": 2 } + * ^ + * ``` + * + * Key is *raw JSON,* meaning it will be matched against the verbatim JSON without attempting to + * unescape it. This works well for typical ASCII and UTF-8 keys (almost all of them), but may + * fail to match some keys with escapes (\u, \n, etc.). + */ + simdjson_warn_unused simdjson_inline simdjson_result find_field_unordered_raw(const std::string_view key) noexcept; + + /** @} */ + + /** + * @addtogroup array Array iteration + * Methods to iterate over array elements. These methods generally *assume* the value is actually + * an object; the caller is responsible for keeping track of that fact. + * @{ + */ + + /** + * Check for an opening [ and start an array iteration. + * + * @returns Whether the array had any elements (returns false for empty). + * @error INCORRECT_TYPE If there is no [. + */ + simdjson_warn_unused simdjson_inline simdjson_result start_array() noexcept; + /** + * Check for an opening [ and start an array iteration while at the root. + * + * @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 + */ + simdjson_warn_unused simdjson_inline simdjson_result start_root_array() noexcept; + /** + * Checks whether an array could be started from the root. May be called by start_root_array. + * + * @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 + */ + simdjson_warn_unused simdjson_inline error_code check_root_array() noexcept; + /** + * Start an array iteration, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_array() noexcept; + /** + * Start an array iteration from the root, after the user has already checked and moved past the [. + * + * Does not move the iterator unless the array is empty ([]). + * + * @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). + */ + simdjson_warn_unused simdjson_inline simdjson_result started_root_array() noexcept; + + /** + * Moves to the next element in an array. + * + * Looks for , and ]. If ] is found, the array is finished and the iterator advances past it. + * Otherwise, it advances to the next value. + * + * @return Whether there is another element in the array. + * @error TAPE_ERROR If there is a comma missing between elements. + */ + simdjson_warn_unused simdjson_inline simdjson_result has_next_element() noexcept; + + /** + * Get a child value iterator. + */ + simdjson_warn_unused simdjson_inline value_iterator child() const noexcept; + + /** @} */ + + /** + * @defgroup scalar Scalar values + * @addtogroup scalar + * @{ + */ + + simdjson_warn_unused simdjson_inline simdjson_result get_string(bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_bool() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_null() noexcept; + simdjson_warn_unused simdjson_inline bool is_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_integer() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + simdjson_warn_unused simdjson_inline simdjson_result get_root_string(bool check_trailing, bool allow_replacement) noexcept; + template + simdjson_warn_unused simdjson_inline error_code get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_wobbly_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_raw_json_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_uint64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_int64_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_double_in_string(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_bool(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline bool is_root_negative() noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_integer(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number_type(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result get_root_number(bool check_trailing) noexcept; + simdjson_warn_unused simdjson_inline simdjson_result is_root_null(bool check_trailing) noexcept; + + simdjson_inline error_code error() const noexcept; + simdjson_inline uint8_t *&string_buf_loc() noexcept; + simdjson_inline const json_iterator &json_iter() const noexcept; + simdjson_inline json_iterator &json_iter() noexcept; + + simdjson_inline void assert_is_valid() const noexcept; + simdjson_inline bool is_valid() const noexcept; + + /** @} */ +protected: + /** + * Restarts an array iteration. + * @returns Whether the array has any elements (returns false for empty). + */ + simdjson_inline simdjson_result reset_array() noexcept; + /** + * Restarts an object iteration. + * @returns Whether the object has any fields (returns false for empty). + */ + simdjson_inline simdjson_result reset_object() noexcept; + /** + * move_at_start(): moves us so that we are pointing at the beginning of + * the container. It updates the index so that at_start() is true and it + * syncs the depth. The user can then create a new container instance. + * + * Usage: used with value::count_elements(). + **/ + simdjson_inline void move_at_start() noexcept; + + /** + * move_at_container_start(): moves us so that we are pointing at the beginning of + * the container so that assert_at_container_start() passes. + * + * Usage: used with reset_array() and reset_object(). + **/ + simdjson_inline void move_at_container_start() noexcept; + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + simdjson_inline value_iterator(json_iterator *json_iter, depth_t depth, token_position start_index) noexcept; + + simdjson_inline simdjson_result parse_null(const uint8_t *json) const noexcept; + simdjson_inline simdjson_result parse_bool(const uint8_t *json) const noexcept; + simdjson_inline const uint8_t *peek_start() const noexcept; + simdjson_inline uint32_t peek_start_length() const noexcept; + + /** + * The general idea of the advance_... methods and the peek_* methods + * is that you first peek and check that you have desired type. If you do, + * and only if you do, then you advance. + * + * We used to unconditionally advance. But this made reasoning about our + * current state difficult. + * Suppose you always advance. Look at the 'value' matching the key + * "shadowable" in the following example... + * + * ({"globals":{"a":{"shadowable":[}}}}) + * + * If the user thinks it is a Boolean and asks for it, then we check the '[', + * decide it is not a Boolean, but still move into the next character ('}'). Now + * we are left pointing at '}' right after a '['. And we have not yet reported + * an error, only that we do not have a Boolean. + * + * If, instead, you just stand your ground until it is content that you know, then + * you will only even move beyond the '[' if the user tells you that you have an + * array. So you will be at the '}' character inside the array and, hopefully, you + * will then catch the error because an array cannot start with '}', but the code + * processing Boolean values does not know this. + * + * So the contract is: first call 'peek_...' and then call 'advance_...' only + * if you have determined that it is a type you can handle. + * + * Unfortunately, it makes the code more verbose, longer and maybe more error prone. + */ + + simdjson_inline void advance_scalar(const char *type) noexcept; + simdjson_inline void advance_root_scalar(const char *type) noexcept; + simdjson_inline void advance_non_root_scalar(const char *type) noexcept; + + simdjson_inline const uint8_t *peek_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_root_scalar(const char *type) noexcept; + simdjson_inline const uint8_t *peek_non_root_scalar(const char *type) noexcept; + + + simdjson_inline error_code start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept; + simdjson_inline error_code end_container() noexcept; + + /** + * Advance to a place expecting a value (increasing depth). + * + * @return The current token (the one left behind). + * @error TAPE_ERROR If the document ended early. + */ + simdjson_inline simdjson_result advance_to_value() noexcept; + + simdjson_inline error_code incorrect_type_error(const char *message) const noexcept; + simdjson_inline error_code error_unless_more_tokens(uint32_t tokens=1) const noexcept; + + simdjson_inline bool is_at_start() const noexcept; + /** + * is_at_iterator_start() returns true on an array or object after it has just been + * created, whether the instance is empty or not. + * + * Usage: used by array::begin() in debug mode (SIMDJSON_DEVELOPMENT_CHECKS) + */ + simdjson_inline bool is_at_iterator_start() const noexcept; + + /** + * Assuming that we are within an object, this returns true if we + * are pointing at a key. + * + * Usage: the skip_child() method should never be used while we are pointing + * at a key inside an object. + */ + simdjson_inline bool is_at_key() const noexcept; + + inline void assert_at_start() const noexcept; + inline void assert_at_container_start() const noexcept; + inline void assert_at_root() const noexcept; + inline void assert_at_child() const noexcept; + inline void assert_at_next() const noexcept; + inline void assert_at_non_root_start() const noexcept; + + /** Get the starting position of this value */ + simdjson_inline token_position start_position() const noexcept; + + /** @copydoc error_code json_iterator::position() const noexcept; */ + simdjson_inline token_position position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position last_position() const noexcept; + /** @copydoc error_code json_iterator::end_position() const noexcept; */ + simdjson_inline token_position end_position() const noexcept; + /** @copydoc error_code json_iterator::report_error(error_code error, const char *message) noexcept; */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + friend class document; + friend class object; + friend class array; + friend class value; +}; // value_iterator + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::value_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_H +/* end file simdjson/generic/ondemand/value_iterator.h for westmere */ +/* including simdjson/generic/ondemand/value.h for westmere: #include "simdjson/generic/ondemand/value.h" */ +/* begin file simdjson/generic/ondemand/value.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * 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. + */ +class value { +public: + /** + * Create a new invalid value. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline value() noexcept = default; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) noexcept; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() noexcept; + + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() noexcept; + + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + + /** + * Cast this JSON value (inside string) to a unsigned integer. + * + * @returns A unsigned 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + + /** + * Cast this JSON value to a "wobbly" string. + * + * The string is may not be a valid UTF-8 string. + * See https://simonsapin.github.io/wtf-8/ + * + * Important: a value should be consumed once. Calling get_wobbly_string() twice on the same value + * is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Equivalent to get(). + * + * @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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); +#endif + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + * + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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). + * + * @return 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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the value is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the value is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the value is an integer number. 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). + * + * 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. However, if this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view is guaranteed to be + * a non-space token. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + * + * See also value::raw_json(). + */ + simdjson_inline std::string_view raw_json_token() noexcept; + + /** + * Get a string_view pointing at this value in the JSON document. + * If this element is an array or an object, it consumes the array or the object + * and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + * If this element is a scalar (string, number, Boolean, null), it returns what + * raw_json_token() would return. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + simdjson_inline simdjson_result current_location() noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. + * + * Calling at_pointer() on non-document instances (e.g., arrays and objects) is not + * standardized (by RFC 6901). We provide some experimental support for JSON pointers + * on non-document instances. Yet it is not the case when calling at_pointer on an array + * or an object instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + +protected: + /** + * Create a value. + */ + simdjson_inline value(const value_iterator &iter) noexcept; + + /** + * Skip this value, allowing iteration to continue. + */ + simdjson_inline void skip() noexcept; + + /** + * Start a value at the current position. + * + * (It should already be started; this is just a self-documentation method.) + */ + static simdjson_inline value start(const value_iterator &iter) noexcept; + + /** + * Resume a value. + */ + static simdjson_inline value resume(const value_iterator &iter) noexcept; + + /** + * Get the object, starting or resuming it as necessary + */ + simdjson_inline simdjson_result start_or_resume_object() noexcept; + + // simdjson_inline void log_value(const char *type) const noexcept; + // simdjson_inline void log_error(const char *message) const noexcept; + + value_iterator iter{}; + + friend class document; + friend class array_iterator; + friend class field; + friend class object; + friend struct simdjson_result; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::value &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result get_array() noexcept; + simdjson_inline simdjson_result get_object() noexcept; + + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() noexcept; + + template simdjson_inline error_code get(T &out) noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator westmere::ondemand::array() noexcept(false); + simdjson_inline operator westmere::ondemand::object() noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator westmere::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) noexcept; + + /** + * 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). + */ + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + + /** @copydoc simdjson_inline std::string_view value::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + + /** @copydoc simdjson_inline simdjson_result current_location() noexcept */ + simdjson_inline simdjson_result current_location() noexcept; + /** @copydoc simdjson_inline int32_t current_depth() const noexcept */ + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_H +/* end file simdjson/generic/ondemand/value.h for westmere */ +/* including simdjson/generic/ondemand/logger.h for westmere: #include "simdjson/generic/ondemand/logger.h" */ +/* begin file simdjson/generic/ondemand/logger.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +// Logging should be free unless SIMDJSON_VERBOSE_LOGGING is set. Importantly, it is critical +// that the call to the log functions be side-effect free. Thus, for example, you should not +// create temporary std::string instances. +namespace logger { + +enum class log_level : int32_t { + info = 0, + error = 1 +}; + +#if SIMDJSON_VERBOSE_LOGGING + static constexpr const bool LOG_ENABLED = true; +#else + static constexpr const bool LOG_ENABLED = false; +#endif + +// We do not want these functions to be 'really inlined' since real inlining is +// for performance purposes and if you are using the loggers, you do not care about +// performance (or should not). +static inline void log_headers() noexcept; +// If args are provided, title will be treated as format string +template +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; +template +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; +static inline void log_event(const json_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_value(const json_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail="") noexcept; +static inline void log_start_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const json_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; + +static inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail="") noexcept; +static inline void log_error(const json_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +static inline void log_event(const value_iterator &iter, const char *type, std::string_view detail="", int delta=0, int depth_delta=0) noexcept; +static inline void log_value(const value_iterator &iter, const char *type, std::string_view detail="", int delta=-1, int depth_delta=0) noexcept; +static inline void log_start_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_end_value(const value_iterator &iter, const char *type, int delta=-1, int depth_delta=0) noexcept; +static inline void log_error(const value_iterator &iter, const char *error, const char *detail="", int delta=-1, int depth_delta=0) noexcept; + +} // namespace logger +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_H +/* end file simdjson/generic/ondemand/logger.h for westmere */ +/* including simdjson/generic/ondemand/token_iterator.h for westmere: #include "simdjson/generic/ondemand/token_iterator.h" */ +/* begin file simdjson/generic/ondemand/token_iterator.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * Iterates through JSON tokens (`{` `}` `[` `]` `,` `:` `""` `123` `true` `false` `null`) + * detected by stage 1. + * + * @private This is not intended for external use. + */ +class token_iterator { +public: + /** + * Create a new invalid token_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline token_iterator() noexcept = default; + simdjson_inline token_iterator(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator &operator=(token_iterator &&other) noexcept = default; + simdjson_inline token_iterator(const token_iterator &other) noexcept = default; + simdjson_inline token_iterator &operator=(const token_iterator &other) noexcept = default; + + /** + * Advance to the next token (returning the current one). + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + /** + * Reports the current offset in bytes from the start of the underlying buffer. + */ + simdjson_inline uint32_t current_offset() const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for a given token. + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + + /** + * Return the current index. + */ + simdjson_inline token_position position() const noexcept; + /** + * Reset to a previously saved index. + */ + simdjson_inline void set_position(token_position target_position) noexcept; + + // NOTE: we don't support a full C++ iterator interface, because we expect people to make + // different calls to advance the iterator based on *their own* state. + + simdjson_inline bool operator==(const token_iterator &other) const noexcept; + simdjson_inline bool operator!=(const token_iterator &other) const noexcept; + simdjson_inline bool operator>(const token_iterator &other) const noexcept; + simdjson_inline bool operator>=(const token_iterator &other) const noexcept; + simdjson_inline bool operator<(const token_iterator &other) const noexcept; + simdjson_inline bool operator<=(const token_iterator &other) const noexcept; + +protected: + simdjson_inline token_iterator(const uint8_t *buf, token_position position) noexcept; + + /** + * Get the index of the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = current token, + * 1 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_index(int32_t delta=0) const noexcept; + /** + * Get the index of the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token. + * + */ + simdjson_inline uint32_t peek_index(token_position position) const noexcept; + + const uint8_t *buf{}; + token_position _position{}; + + friend class json_iterator; + friend class value_iterator; + friend class object; + template + 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; + template + 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; +}; + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::token_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_H +/* end file simdjson/generic/ondemand/token_iterator.h for westmere */ +/* including simdjson/generic/ondemand/json_iterator.h for westmere: #include "simdjson/generic/ondemand/json_iterator.h" */ +/* begin file simdjson/generic/ondemand/json_iterator.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * Iterates through JSON tokens, keeping track of depth and string buffer. + * + * @private This is not intended for external use. + */ +class json_iterator { +protected: + token_iterator token{}; + ondemand::parser *parser{}; + /** + * Next free location in the string buffer. + * + * Used by raw_json_string::unescape() to have a place to unescape strings to. + */ + uint8_t *_string_buf_loc{}; + /** + * JSON error, if there is one. + * + * INCORRECT_TYPE and NO_SUCH_FIELD are *not* stored here, ever. + * + * PERF NOTE: we *hope* this will be elided into control flow, as it is only used (a) in the first + * iteration of the loop, or (b) for the final iteration after a missing comma is found in ++. If + * this is not elided, we should make sure it's at least not using up a register. Failing that, + * we should store it in document so there's only one of them. + */ + error_code error{SUCCESS}; + /** + * Depth of the current token in the JSON. + * + * - 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. + */ + depth_t _depth{}; + /** + * Beginning of the document indexes. + * Normally we have root == parser->implementation->structural_indexes.get() + * but this may differ, especially in streaming mode (where we have several + * documents); + */ + token_position _root{}; + /** + * Normally, a json_iterator operates over a single document, but in + * some cases, we may have a stream of documents. This attribute is meant + * as meta-data: the json_iterator works the same irrespective of the + * value of this attribute. + */ + bool _streaming{false}; + +public: + simdjson_inline json_iterator() noexcept = default; + simdjson_inline json_iterator(json_iterator &&other) noexcept; + simdjson_inline json_iterator &operator=(json_iterator &&other) noexcept; + simdjson_inline explicit json_iterator(const json_iterator &other) noexcept = default; + simdjson_inline json_iterator &operator=(const json_iterator &other) noexcept = default; + /** + * Skips a JSON value, whether it is a scalar, array or object. + */ + simdjson_warn_unused simdjson_inline error_code skip_child(depth_t parent_depth) noexcept; + + /** + * Tell whether the iterator is still at the start + */ + simdjson_inline bool at_root() const noexcept; + + /** + * Tell whether we should be expected to run in streaming + * mode (iterating over many documents). It is pure metadata + * that does not affect how the iterator works. It is used by + * start_root_array() and start_root_object(). + */ + simdjson_inline bool streaming() const noexcept; + + /** + * Get the root value iterator + */ + simdjson_inline token_position root_position() const noexcept; + /** + * Assert that we are at the document depth (== 1) + */ + simdjson_inline void assert_at_document_depth() const noexcept; + /** + * Assert that we are at the root of the document + */ + simdjson_inline void assert_at_root() const noexcept; + + /** + * Tell whether the iterator is at the EOF mark + */ + simdjson_inline bool at_end() const noexcept; + + /** + * Tell whether the iterator is live (has not been moved). + */ + simdjson_inline bool is_alive() const noexcept; + + /** + * Abandon this iterator, setting depth to 0 (as if the document is finished). + */ + simdjson_inline void abandon() noexcept; + + /** + * Advance the current token without modifying depth. + */ + simdjson_inline const uint8_t *return_current_and_advance() noexcept; + + /** + * Returns true if there is a single token in the index (i.e., it is + * a JSON with a scalar value such as a single number). + * + * @return whether there is a single token + */ + simdjson_inline bool is_single_token() const noexcept; + + /** + * Assert that there are at least the given number of tokens left. + * + * Has no effect in release builds. + */ + simdjson_inline void assert_more_tokens(uint32_t required_tokens=1) const noexcept; + /** + * Assert that the given position addresses an actual token (is within bounds). + * + * Has no effect in release builds. + */ + simdjson_inline void assert_valid_position(token_position position) const noexcept; + /** + * Get the JSON text for a given token (relative). + * + * This is not null-terminated; it is a view into the JSON. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(int32_t delta=0) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param delta The relative position of the token to retrieve. e.g. 0 = next token, -1 = prev token. + */ + simdjson_inline uint32_t peek_length(int32_t delta=0) const noexcept; + /** + * Get a pointer to the current location in the input buffer. + * + * This is not null-terminated; it is a view into the JSON. + * + * You may be pointing outside of the input buffer: it is not generally + * safe to dereference this pointer. + */ + simdjson_inline const uint8_t *unsafe_pointer() const noexcept; + /** + * Get the JSON text for a given token. + * + * This is not null-terminated; it is a view into the JSON. + * + * @param position The position of the token to retrieve. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek(token_position position) const noexcept; + /** + * Get the maximum length of the JSON text for the current token (or relative). + * + * The length will include any whitespace at the end of the token. + * + * @param position The position of the token to retrieve. + */ + simdjson_inline uint32_t peek_length(token_position position) const noexcept; + /** + * Get the JSON text for the last token in the document. + * + * This is not null-terminated; it is a view into the JSON. + * + * TODO consider a string_view, assuming the length will get stripped out by the optimizer when + * it isn't used ... + */ + simdjson_inline const uint8_t *peek_last() const noexcept; + + /** + * Ascend one level. + * + * Validates that the depth - 1 == parent_depth. + * + * @param parent_depth the expected parent depth. + */ + simdjson_inline void ascend_to(depth_t parent_depth) noexcept; + + /** + * Descend one level. + * + * Validates that the new depth == child_depth. + * + * @param child_depth the expected child depth. + */ + simdjson_inline void descend_to(depth_t child_depth) noexcept; + simdjson_inline void descend_to(depth_t child_depth, int32_t delta) noexcept; + + /** + * Get current depth. + */ + simdjson_inline depth_t depth() const noexcept; + + /** + * Get current (writeable) location in the string buffer. + */ + simdjson_inline uint8_t *&string_buf_loc() noexcept; + + /** + * Report an unrecoverable error, preventing further iteration. + * + * @param error The error to report. Must not be SUCCESS, UNINITIALIZED, INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code report_error(error_code error, const char *message) noexcept; + + /** + * Log error, but don't stop iteration. + * @param error The error to report. Must be INCORRECT_TYPE, or NO_SUCH_FIELD. + * @param message An error message to report with the error. + */ + simdjson_inline error_code optional_error(error_code error, const char *message) noexcept; + + /** + * Take an input in json containing max_len characters and attempt to copy it over to tmpbuf, a buffer with + * N bytes of capacity. It will return false if N is too small (smaller than max_len) of if it is zero. + * The buffer (tmpbuf) is padded with space characters. + */ + simdjson_warn_unused simdjson_inline bool copy_to_buffer(const uint8_t *json, uint32_t max_len, uint8_t *tmpbuf, size_t N) noexcept; + + simdjson_inline token_position position() const noexcept; + /** + * Write the raw_json_string to the string buffer and return a string_view. + * Each raw_json_string should be unescaped once, or else the string buffer might + * overflow. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, bool allow_replacement) noexcept; + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in) noexcept; + + simdjson_inline void reenter_child(token_position position, depth_t child_depth) noexcept; + + simdjson_inline error_code consume_character(char c) noexcept; +#if SIMDJSON_DEVELOPMENT_CHECKS + simdjson_inline token_position start_position(depth_t depth) const noexcept; + simdjson_inline void set_start_position(depth_t depth, token_position position) noexcept; +#endif + + /* Useful for debugging and logging purposes. */ + inline std::string to_string() const noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Updates this json iterator so that it is back at the beginning of the document, + * as if it had just been created. + */ + inline void rewind() noexcept; + /** + * This checks whether the {,},[,] are balanced so that the document + * ends with proper zero depth. This requires scanning the whole document + * and it may be expensive. It is expected that it will be rarely called. + * It does not attempt to match { with } and [ with ]. + */ + inline bool balanced() const noexcept; +protected: + simdjson_inline json_iterator(const uint8_t *buf, ondemand::parser *parser) noexcept; + /// The last token before the end + simdjson_inline token_position last_position() const noexcept; + /// The token *at* the end. This points at gibberish and should only be used for comparison. + simdjson_inline token_position end_position() const noexcept; + /// The end of the buffer. + simdjson_inline token_position end() const noexcept; + + friend class document; + friend class document_stream; + friend class object; + friend class array; + friend class value; + friend class raw_json_string; + friend class parser; + friend class value_iterator; + template + 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; + template + 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; +}; // json_iterator + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::json_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_H +/* end file simdjson/generic/ondemand/json_iterator.h for westmere */ +/* including simdjson/generic/ondemand/json_type.h for westmere: #include "simdjson/generic/ondemand/json_type.h" */ +/* begin file simdjson/generic/ondemand/json_type.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * The type of a JSON value. + */ +enum class json_type { + // Start at 1 to catch uninitialized / default values more easily + array=1, ///< A JSON array ( [ 1, 2, 3 ... ] ) + 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" ...) + boolean, ///< A JSON boolean (true or false) + null ///< A JSON null (null) +}; + +/** + * A type representing a JSON number. + * The design of the struct is deliberately straight-forward. All + * functions return standard values with no error check. + */ +struct number { + + /** + * 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 + * }; + */ + simdjson_inline ondemand::number_type get_number_type() const noexcept; + /** + * return true if the automatically determined type of + * the number is number_type::unsigned_integer. + */ + simdjson_inline bool is_uint64() const noexcept; + /** + * return the value as a uint64_t, only valid if is_uint64() is true. + */ + simdjson_inline uint64_t get_uint64() const noexcept; + simdjson_inline operator uint64_t() const noexcept; + + /** + * return true if the automatically determined type of + * the number is number_type::signed_integer. + */ + simdjson_inline bool is_int64() const noexcept; + /** + * return the value as a int64_t, only valid if is_int64() is true. + */ + simdjson_inline int64_t get_int64() const noexcept; + simdjson_inline operator int64_t() const noexcept; + + + /** + * return true if the automatically determined type of + * the number is number_type::floating_point_number. + */ + simdjson_inline bool is_double() const noexcept; + /** + * return the value as a double, only valid if is_double() is true. + */ + simdjson_inline double get_double() const noexcept; + simdjson_inline operator double() const noexcept; + + /** + * Convert the number to a double. Though it always succeed, the conversion + * may be lossy if the number cannot be represented exactly. + */ + simdjson_inline double as_double() const noexcept; + + +protected: + /** + * The next block of declaration is designed so that we can call the number parsing + * functions on a number type. They are protected and should never be used outside + * of the core simdjson library. + */ + friend class value_iterator; + template + friend error_code numberparsing::slow_float_parsing(simdjson_unused const uint8_t * src, W writer); + template + 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); + template + friend error_code numberparsing::parse_number(const uint8_t *const src, W &writer); + /** Store a signed 64-bit value to the number. */ + simdjson_inline void append_s64(int64_t value) noexcept; + /** Store an unsigned 64-bit value to the number. */ + simdjson_inline void append_u64(uint64_t value) noexcept; + /** Store a double value to the number. */ + simdjson_inline void append_double(double value) noexcept; + /** Specifies that the value is a double, but leave it undefined. */ + simdjson_inline void skip_double() noexcept; + /** + * End of friend declarations. + */ + + /** + * Our attributes are a union type (size = 64 bits) + * followed by a type indicator. + */ + union { + double floating_point_number; + int64_t signed_integer; + uint64_t unsigned_integer; + } payload{0}; + number_type type{number_type::signed_integer}; +}; + +/** + * Write the JSON type to the output stream + * + * @param out The output stream. + * @param type The json_type. + */ +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept; + +#if SIMDJSON_EXCEPTIONS +/** + * Send JSON type to an output stream. + * + * @param out The output stream. + * @param type The json_type. + * @throw simdjson_error if the result being printed has an error. If there is an error with the + * underlying output stream, that error will be propagated (simdjson_error will not be + * thrown). + */ +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false); +#endif + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::json_type &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_H +/* end file simdjson/generic/ondemand/json_type.h for westmere */ +/* including simdjson/generic/ondemand/raw_json_string.h for westmere: #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * A string escaped per JSON rules, terminated with quote ("). They are used to represent + * unescaped keys inside JSON documents. + * + * (In other words, a pointer to the beginning of a string, just after the start quote, inside a + * JSON file.) + * + * This class is deliberately simplistic and has little functionality. You can + * compare a raw_json_string instance with an unescaped C string, but + * that is nearly all you can do. + * + * 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(). + * + */ +class raw_json_string { +public: + /** + * Create a new invalid raw_json_string. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline raw_json_string() noexcept = default; + + /** + * Create a new invalid raw_json_string pointed at the given location in the JSON. + * + * 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. + */ + simdjson_inline raw_json_string(const uint8_t * _buf) noexcept; + /** + * 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. + */ + simdjson_inline const char * raw() const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done) on target.size() characters, + * and if the raw_json_string instance has a quote character at byte index target.size(). + * We never read more than length + 1 bytes in the raw_json_string instance. + * If length is smaller than target.size(), this will return false. + * + * 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. + */ + 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-byte equal (no escaping is done). + * The std::string_view instance should not contain unescaped quote characters: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * Performance: the comparison is done byte-by-byte which might be inefficient for + * long strings. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + * The provided C string should not contain an unescaped quote character: + * the caller is responsible for this check. See is_free_from_unescaped_quote. + * + * 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); + */ + simdjson_inline bool unsafe_is_equal(const char* target) const noexcept; + + /** + * This compares the current instance to the std::string_view target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(std::string_view target) const noexcept; + + /** + * This compares the current instance to the C string target: returns true if + * they are byte-by-byte equal (no escaping is done). + */ + simdjson_inline bool is_equal(const char* target) const noexcept; + + /** + * 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!). + */ + static simdjson_inline bool is_free_from_unescaped_quote(std::string_view target) noexcept; + static simdjson_inline bool is_free_from_unescaped_quote(const char* target) noexcept; + +private: + + + /** + * This will set the inner pointer to zero, effectively making + * this instance unusable. + */ + simdjson_inline void consume() noexcept { buf = nullptr; } + + /** + * Checks whether the inner pointer is non-null and thus usable. + */ + simdjson_inline simdjson_warn_unused bool alive() const noexcept { return buf != nullptr; } + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result will be a valid UTF-8. + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + * @param allow_replacement Whether we allow replacement of invalid surrogate pairs. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape(json_iterator &iter, bool allow_replacement) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. + * The result may not be a valid UTF-8. https://simonsapin.github.io/wtf-8/ + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid until the next parse() call on the parser. + * + * @param iter A json_iterator, which contains a buffer where the string will be written. + */ + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(json_iterator &iter) const noexcept; + const uint8_t * buf{}; + friend class object; + friend class field; + friend class parser; + friend struct simdjson_result; +}; + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &, const raw_json_string &) noexcept; + +/** + * 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. + */ +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept; +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept; +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept; + + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::raw_json_string &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline ~simdjson_result() noexcept = default; ///< @private + + simdjson_inline simdjson_result raw() const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape(westmere::ondemand::json_iterator &iter, bool allow_replacement) const noexcept; + simdjson_inline simdjson_warn_unused simdjson_result unescape_wobbly(westmere::ondemand::json_iterator &iter) const noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_H +/* end file simdjson/generic/ondemand/raw_json_string.h for westmere */ +/* including simdjson/generic/ondemand/parser.h for westmere: #include "simdjson/generic/ondemand/parser.h" */ +/* begin file simdjson/generic/ondemand/parser.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * The default batch size for document_stream instances for this On Demand kernel. + * Note that different On Demand kernel may use a different DEFAULT_BATCH_SIZE value + * in the future. + */ +static constexpr size_t DEFAULT_BATCH_SIZE = 1000000; +/** + * Some adversary might try to set the batch size to 0 or 1, which might cause problems. + * We set a minimum of 32B since anything else is highly likely to be an error. In practice, + * most users will want a much larger batch size. + * + * All non-negative MINIMAL_BATCH_SIZE values should be 'safe' except that, obviously, no JSON + * document can ever span 0 or 1 byte and that very large values would create memory allocation issues. + */ +static constexpr size_t MINIMAL_BATCH_SIZE = 32; + +/** + * A JSON fragment iterator. + * + * This holds the actual iterator as well as the buffer for writing strings. + */ +class parser { +public: + /** + * Create a JSON parser. + * + * The new parser will have zero capacity. + */ + inline explicit parser(size_t max_capacity = SIMDJSON_MAXSIZE_BYTES) noexcept; + + inline parser(parser &&other) noexcept = default; + simdjson_inline parser(const parser &other) = delete; + simdjson_inline parser &operator=(const parser &other) = delete; + simdjson_inline parser &operator=(parser &&other) noexcept = default; + + /** Deallocate the JSON parser. */ + inline ~parser() noexcept = default; + + /** + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * document doc = parser.iterate(json); + * + * It is expected that the content is a valid UTF-8 file, containing a valid JSON document. + * Otherwise the iterate method may return an error. In particular, the whole input should be + * valid: we do not attempt to tolerate incorrect content either before or after a JSON + * document. If there is a UTF-8 BOM, the parser skips it. + * + * ### IMPORTANT: Validate what you use + * + * Calling iterate on an invalid JSON document may not immediately trigger an error. The call to + * iterate does not parse and validate the whole document. + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * @param len The length of the JSON. + * @param capacity The number of bytes allocated in the JSON (must be at least len+SIMDJSON_PADDING). + * + * @return The document, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate(padded_string_view json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const char *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const uint8_t *json, size_t len, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string_view json, size_t capacity) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(std::string &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(const simdjson_result &json) & noexcept; + /** @overload simdjson_result iterate(padded_string_view json) & noexcept */ + simdjson_warn_unused simdjson_result iterate(padded_string &&json) & noexcept = delete; + + /** + * @private + * + * Start iterating an on-demand JSON document. + * + * ondemand::parser parser; + * json_iterator doc = parser.iterate(json); + * + * ### IMPORTANT: Buffer Lifetime + * + * Because parsing is done while you iterate, you *must* keep the JSON buffer around at least as + * long as the document iteration. + * + * ### IMPORTANT: Document Lifetime + * + * Only one iteration at a time can happen per parser, and the parser *must* be kept alive during + * iteration to ensure intermediate buffers can be accessed. Any document must be destroyed before + * you call parse() again or destroy the parser. + * + * The ondemand::document instance holds the iterator. The document must remain in scope + * while you are accessing instances of ondemand::value, ondemand::object, ondemand::array. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * @param json The JSON to parse. + * + * @return The iterator, or an error: + * - INSUFFICIENT_PADDING if the input has less than SIMDJSON_PADDING extra bytes. + * - MEMALLOC if realloc_if_needed the parser does not have enough capacity, and memory + * allocation fails. + * - EMPTY if the document is all whitespace. + * - UTF8_ERROR if the document is not valid UTF-8. + * - UNESCAPED_CHARS if a string contains control characters that must be escaped + * - UNCLOSED_STRING if there is an unclosed string in the document. + */ + simdjson_warn_unused simdjson_result iterate_raw(padded_string_view json) & noexcept; + + + /** + * Parse a buffer containing many JSON documents. + * + * auto json = R"({ "foo": 1 } { "foo": 2 } { "foo": 3 } )"_padded; + * ondemand::parser parser; + * ondemand::document_stream docs = parser.iterate_many(json); + * for (auto & doc : docs) { + * std::cout << doc["foo"] << std::endl; + * } + * // Prints 1 2 3 + * + * No copy of the input buffer is made. + * + * The function is lazy: it may be that no more than one JSON document at a time is parsed. + * + * The caller is responsabile to ensure that the input string data remains unchanged and is + * not deleted during the loop. + * + * ### Format + * + * The buffer must contain a series of one or more JSON documents, concatenated into a single + * buffer, separated by ASCII whitespace. It effectively parses until it has a fully valid document, + * then starts parsing the next document at that point. (It does this with more parallelism and + * lookahead than you might think, though.) + * + * documents that consist of an object or array may omit the whitespace between them, concatenating + * with no separator. Documents that consist of a single primitive (i.e. documents that are not + * arrays or objects) MUST be separated with ASCII whitespace. + * + * The characters inside a JSON document, and between JSON documents, must be valid Unicode (UTF-8). + * If there is a UTF-8 BOM, the parser skips it. + * + * The documents must not exceed batch_size bytes (by default 1MB) or they will fail to parse. + * Setting batch_size to excessively large or excessively small values may impact negatively the + * performance. + * + * ### REQUIRED: Buffer Padding + * + * The buffer must have at least SIMDJSON_PADDING extra allocated bytes. It does not matter what + * those bytes are initialized to, as long as they are allocated. These bytes will be read: if you + * using a sanitizer that verifies that no uninitialized byte is read, then you should initialize the + * SIMDJSON_PADDING bytes to avoid runtime warnings. + * + * ### Threads + * + * When compiled with SIMDJSON_THREADS_ENABLED, this method will use a single thread under the + * hood to do some lookahead. + * + * ### Parser Capacity + * + * If the parser's current capacity is less than batch_size, it will allocate enough capacity + * to handle it (up to max_capacity). + * + * @param buf The concatenated JSON to parse. + * @param len The length of the concatenated JSON. + * @param batch_size The batch size to use. MUST be larger than the largest document. The sweet + * spot is cache-related: small enough to fit in cache, yet big enough to + * parse as many documents as possible in one tight loop. + * Defaults to 10MB, which has been a reasonable sweet spot in our tests. + * @param allow_comma_separated (defaults on false) This allows a mode where the documents are + * separated by commas instead of whitespace. It comes with a performance + * penalty because the entire document is indexed at once (and the document must be + * less than 4 GB), and there is no multithreading. In this mode, the batch_size parameter + * is effectively ignored, as it is set to at least the document size. + * @return The stream, or an error. An empty input will yield 0 documents rather than an EMPTY error. Errors: + * - MEMALLOC if the parser does not have enough capacity and memory allocation fails + * - CAPACITY if the parser does not have enough capacity and batch_size > max_capacity. + * - other json errors if parsing fails. You should not rely on these errors to always the same for the + * same document: they may vary under runtime dispatch (so they may vary depending on your system and hardware). + */ + inline simdjson_result iterate_many(const uint8_t *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const char *buf, size_t len, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const std::string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const std::string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + /** @overload parse_many(const uint8_t *buf, size_t len, size_t batch_size) */ + inline simdjson_result iterate_many(const padded_string &s, size_t batch_size = DEFAULT_BATCH_SIZE, bool allow_comma_separated = false) noexcept; + inline simdjson_result iterate_many(const padded_string &&s, size_t batch_size, bool allow_comma_separated = false) = delete;// unsafe + + /** @private We do not want to allow implicit conversion from C string to std::string. */ + simdjson_result iterate_many(const char *buf, size_t batch_size = DEFAULT_BATCH_SIZE) noexcept = delete; + + /** The capacity of this parser (the largest document it can process). */ + simdjson_inline size_t capacity() const noexcept; + /** The maximum capacity of this parser (the largest document it is allowed to process). */ + simdjson_inline size_t max_capacity() const noexcept; + simdjson_inline void set_max_capacity(size_t max_capacity) noexcept; + /** + * 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. + */ + simdjson_inline size_t max_depth() const noexcept; + + /** + * Ensure this parser has enough memory to process JSON documents up to `capacity` bytes in length + * and `max_depth` depth. + * + * The max_depth 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. + * + * @param capacity The new capacity. + * @param max_depth The new max_depth. Defaults to DEFAULT_MAX_DEPTH. + * @return The error, if there is one. + */ + simdjson_warn_unused error_code allocate(size_t capacity, size_t max_depth=DEFAULT_MAX_DEPTH) noexcept; + + #ifdef SIMDJSON_THREADS_ENABLED + /** + * The parser instance can use threads when they are available to speed up some + * operations. It is enabled by default. Changing this attribute will change the + * behavior of the parser for future operations. + */ + bool threaded{true}; + #endif + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result must be valid UTF-8. + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @param allow_replacement Whether we allow a replacement if the input string contains unmatched surrogate pairs. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement = false) const noexcept; + + /** + * Unescape this JSON string, replacing \\ with \, \n with newline, etc. to a user-provided buffer. + * The result may not be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * The provided pointer is advanced to the end of the string by reference, and a string_view instance + * is returned. You can ensure that your buffer is large enough by allocating a block of memory at least + * as large as the input JSON plus SIMDJSON_PADDING and then unescape all strings to this one buffer. + * + * This unescape function is a low-level function. If you want a more user-friendly approach, you should + * avoid raw_json_string instances (e.g., by calling unescaped_key() instead of key() or get_string() + * instead of get_raw_json_string()). + * + * ## IMPORTANT: string_view lifetime + * + * The string_view is only valid as long as the bytes in dst. + * + * @param raw_json_string input + * @param dst A pointer to a buffer at least large enough to write this string as well as + * an additional SIMDJSON_PADDING bytes. + * @return A string_view pointing at the unescaped string in dst + * @error STRING_ERROR if escapes are incorrect. + */ + simdjson_inline simdjson_result unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept; + +private: + /** @private [for benchmarking access] The implementation to use */ + std::unique_ptr implementation{}; + size_t _capacity{0}; + size_t _max_capacity; + size_t _max_depth{DEFAULT_MAX_DEPTH}; + std::unique_ptr string_buf{}; +#if SIMDJSON_DEVELOPMENT_CHECKS + std::unique_ptr start_positions{}; +#endif + + friend class json_iterator; + friend class document_stream; +}; + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::parser &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_H +/* end file simdjson/generic/ondemand/parser.h for westmere */ + +// All other declarations +/* including simdjson/generic/ondemand/array.h for westmere: #include "simdjson/generic/ondemand/array.h" */ +/* begin file simdjson/generic/ondemand/array.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * A forward-only JSON array. + */ +class array { +public: + /** + * Create a new invalid array. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline array() noexcept = default; + + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() noexcept; + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result is_empty() & noexcept; + /** + * Reset the iterator so that we are pointing back at the + * beginning of the array. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"([ { "foo": { "a": [ 10, 20, 30 ] }} ])"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/0/foo/a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an array + * instance: there is no rewind and no invalidation. + * + * You may only call at_pointer on an array after it has been created, but before it has + * been first accessed. When calling at_pointer on an array, the pointer is advanced to + * the location indicated by the JSON pointer (in case of success). It is no longer possible + * to call at_pointer on the same array. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * Consumes the array and returns a string_view instance corresponding to the + * array as represented in JSON. It points inside the original document. + */ + simdjson_inline simdjson_result raw_json() noexcept; + + /** + * Get the value at the given index. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) noexcept; +protected: + /** + * Go to the end of the array, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + + /** + * Begin array iteration. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + */ + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + /** + * Begin array iteration from the root. + * + * @param iter The iterator. Must be where the initial [ is expected. Will be *moved* into the + * resulting array. + * @error INCORRECT_TYPE if the iterator is not at [. + * @error TAPE_ERROR if there is no closing ] at the end of the document. + */ + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + /** + * Begin array iteration. + * + * This version of the method should be called after the initial [ has been verified, and is + * intended for use by switch statements that check the type of a value. + * + * @param iter The iterator. Must be after the initial [. Will be *moved* into the resulting array. + */ + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + + /** + * Create an array at the given Internal array creation. Call array::start() or array::started() instead of this. + * + * @param iter The iterator. Must either be at the start of the first element with iter.is_alive() + * == true, or past the [] with is_alive() == false if the array is empty. Will be *moved* + * into the resulting array. + */ + simdjson_inline array(const value_iterator &iter) noexcept; + + /** + * Iterator marking current position. + * + * iter.is_alive() == false indicates iteration is complete. + */ + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; + friend struct simdjson_result; + friend class array_iterator; +}; + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::array &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + inline simdjson_result count_elements() & noexcept; + inline simdjson_result is_empty() & noexcept; + inline simdjson_result reset() & noexcept; + simdjson_inline simdjson_result at(size_t index) noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_H +/* end file simdjson/generic/ondemand/array.h for westmere */ +/* including simdjson/generic/ondemand/array_iterator.h for westmere: #include "simdjson/generic/ondemand/array_iterator.h" */ +/* begin file simdjson/generic/ondemand/array_iterator.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * A forward-only JSON array. + * + * This is an input_iterator, meaning: + * - It is forward-only + * - * must be called exactly once per element. + * - ++ must be called exactly once in between each * (*, ++, *, ++, * ...) + */ +class array_iterator { +public: + /** Create a new, invalid array iterator. */ + simdjson_inline array_iterator() noexcept = default; + + // + // Iterator interface + // + + /** + * Get the current element. + * + * Part of the std::iterator interface. + */ + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + /** + * Check if we are at the end of the JSON. + * + * Part of the std::iterator interface. + * + * @return true if there are no more elements in the JSON array. + */ + simdjson_inline bool operator==(const array_iterator &) const noexcept; + /** + * Check if there are more elements in the JSON array. + * + * Part of the std::iterator interface. + * + * @return true if there are more elements in the JSON array. + */ + simdjson_inline bool operator!=(const array_iterator &) const noexcept; + /** + * Move to the next element. + * + * Part of the std::iterator interface. + */ + simdjson_inline array_iterator &operator++() noexcept; + +private: + value_iterator iter{}; + + simdjson_inline array_iterator(const value_iterator &iter) noexcept; + + friend class array; + friend class value; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::array_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_H +/* end file simdjson/generic/ondemand/array_iterator.h for westmere */ +/* including simdjson/generic/ondemand/document.h for westmere: #include "simdjson/generic/ondemand/document.h" */ +/* begin file simdjson/generic/ondemand/document.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * A JSON document. It holds a json_iterator instance. + * + * Used by tokens to get text, and string buffer location. + * + * You must keep the document around during iteration. + */ +class document { +public: + /** + * Create a new invalid document. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline document() noexcept = default; + simdjson_inline document(const document &other) noexcept = delete; // pass your documents by reference, not by copy + simdjson_inline document(document &&other) noexcept = default; + simdjson_inline document &operator=(const document &other) noexcept = delete; + simdjson_inline document &operator=(document &&other) noexcept = default; + + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @returns INCORRECT_TYPE If the JSON value is not an array. + */ + simdjson_inline simdjson_result get_array() & noexcept; + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @returns INCORRECT_TYPE If the JSON value is not an object. + */ + simdjson_inline simdjson_result get_object() & noexcept; + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64() noexcept; + /** + * Cast this JSON value (inside string) to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64() noexcept; + /** + * Cast this JSON value (inside string) to a signed integer. + * + * @returns A signed 64-bit integer. + * @returns INCORRECT_TYPE If the JSON value is not a 64-bit integer. + */ + simdjson_inline simdjson_result get_int64_in_string() noexcept; + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double() noexcept; + + /** + * Cast this JSON value (inside string) to a double. + * + * @returns A double. + * @returns INCORRECT_TYPE If the JSON value is not a valid floating-point number. + */ + simdjson_inline simdjson_result get_double_in_string() noexcept; + /** + * Cast this JSON value to a string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: Calling get_string() twice on the same document is an error. + * + * @param Whether to allow a replacement character for unmatched surrogate pairs. + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + /** + * Attempts to fill the provided std::string reference with the parsed value of the current string. + * + * The string is guaranteed to be valid UTF-8. + * + * Important: a value should be consumed once. Calling get_string() twice on the same value + * is an error. + * + * Performance: This method may be slower than get_string() or get_string(bool) because it may need to allocate memory. + * We recommend you avoid allocating an std::string unless you need to. + * + * @returns INCORRECT_TYPE if the JSON value is not a string. Otherwise, we return SUCCESS. + */ + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + /** + * Cast this JSON value to a string. + * + * The string is not guaranteed to be valid UTF-8. See https://simonsapin.github.io/wtf-8/ + * + * Important: Calling get_wobbly_string() twice on the same document is an error. + * + * @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 value is not a string. + */ + simdjson_inline simdjson_result get_wobbly_string() noexcept; + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @returns INCORRECT_TYPE if the JSON value is not a string. + */ + simdjson_inline simdjson_result get_raw_json_string() noexcept; + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @returns INCORRECT_TYPE if the JSON value is not true or false. + */ + simdjson_inline simdjson_result get_bool() noexcept; + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is set to 1 (which is the case when building in Debug mode + * by default), and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value if a JSON array or object cannot be found. + * @returns SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result get_value() noexcept; + + /** + * Checks if this JSON value is null. If and only if the value is + * null, then it is consumed (we advance). If we find a token that + * begins with 'n' but is not 'null', then an error is returned. + * + * @returns Whether the value is null. + * @returns INCORRECT_TYPE If the JSON value begins with 'n' and is not 'null'. + */ + simdjson_inline simdjson_result is_null() noexcept; + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool + * + * You may use get_double(), get_bool(), get_uint64(), get_int64(), + * get_object(), get_array(), get_raw_json_string(), or get_string() instead. + * + * @returns A value of the given type, parsed from the JSON. + * @returns INCORRECT_TYPE If the JSON value is not the given type. + */ + template simdjson_inline simdjson_result get() & noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + /** @overload template simdjson_result get() & noexcept */ + template simdjson_inline simdjson_result get() && noexcept { + // Unless the simdjson library provides an inline implementation, calling this method should + // immediately fail. + static_assert(!sizeof(T), "The get method with given type is not implemented by the simdjson library. " + "The supported types are ondemand::object, ondemand::array, raw_json_string, std::string_view, uint64_t, " + "int64_t, double, and bool. We recommend you use get_double(), get_bool(), get_uint64(), get_int64(), " + " get_object(), get_array(), get_raw_json_string(), or get_string() instead of the get template."); + } + + /** + * Get this value as the given type. + * + * Supported types: object, array, raw_json_string, string_view, uint64_t, int64_t, double, bool, value + * + * Be mindful that the document instance must remain in scope while you are accessing object, array and value instances. + * + * @param out This is set to a value of the given type, parsed from the JSON. If there is an error, this may not be initialized. + * @returns INCORRECT_TYPE If the JSON value is not an object. + * @returns SUCCESS If the parse succeeded and the out parameter was set to the value. + */ + template simdjson_inline error_code get(T &out) & noexcept; + /** @overload template error_code get(T &out) & noexcept */ + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + /** + * Cast this JSON value to an array. + * + * @returns An object that can be used to iterate the array. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an array. + */ + simdjson_inline operator array() & noexcept(false); + /** + * Cast this JSON value to an object. + * + * @returns An object that can be used to look up or iterate fields. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not an object. + */ + simdjson_inline operator object() & noexcept(false); + /** + * Cast this JSON value to an unsigned integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit unsigned integer. + */ + simdjson_inline operator uint64_t() noexcept(false); + /** + * Cast this JSON value to a signed integer. + * + * @returns A signed 64-bit integer. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a 64-bit integer. + */ + simdjson_inline operator int64_t() noexcept(false); + /** + * Cast this JSON value to a double. + * + * @returns A double. + * @exception simdjson_error(INCORRECT_TYPE) If the JSON value is not a valid floating-point number. + */ + simdjson_inline operator double() noexcept(false); + /** + * Cast this JSON value to a string. + * + * 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. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator std::string_view() noexcept(false); + /** + * Cast this JSON value to a raw_json_string. + * + * The string is guaranteed to be valid UTF-8, and may have escapes in it (e.g. \\ or \n). + * + * @returns A pointer to the raw JSON for the given string. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not a string. + */ + simdjson_inline operator raw_json_string() noexcept(false); + /** + * Cast this JSON value to a bool. + * + * @returns A bool value. + * @exception simdjson_error(INCORRECT_TYPE) if the JSON value is not true or false. + */ + simdjson_inline operator bool() noexcept(false); + /** + * Cast this JSON value to a value when the document is an object or an array. + * + * You must not have begun iterating through the object or array. When + * SIMDJSON_DEVELOPMENT_CHECKS is defined, and you have already begun iterating, + * you will get an OUT_OF_ORDER_ITERATION error. If you have begun iterating, you can use + * rewind() to reset the document to its initial state before calling this method. + * + * @returns A value value if a JSON array or object cannot be found. + * @exception SCALAR_DOCUMENT_AS_VALUE error is the document is a scalar (see is_scalar() function). + */ + simdjson_inline operator value() noexcept(false); +#endif + /** + * This method scans the array and counts the number of elements. + * 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. + */ + simdjson_inline simdjson_result count_elements() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * To check that an object is empty, it is more performant to use + * the is_empty() method. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * Get the value at the given index in the array. This function has linear-time complexity. + * This function should only be called once on an array instance since the array iterator is not reset between each call. + * + * @return The value at the given index, or: + * - INDEX_OUT_OF_BOUNDS if the array index is larger than an array length + */ + simdjson_inline simdjson_result at(size_t index) & noexcept; + /** + * Begin array iteration. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result begin() & noexcept; + /** + * Sentinel representing the end of the array. + * + * Part of the std::iterable interface. + */ + simdjson_inline simdjson_result end() & noexcept; + + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to + * a key a single time. Doing object["mykey"].to_string()and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. E.g., the array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + + /** + * Get the type of this JSON value. It does not validate or consume the value. + * E.g., you must still call "is_null()" to check that a value is null even if + * "type()" returns json_type::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". + */ + simdjson_inline simdjson_result type() noexcept; + + /** + * Checks whether the document is a scalar (string, number, null, Boolean). + * 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". + */ + simdjson_inline simdjson_result is_scalar() noexcept; + + /** + * Checks whether the document is a negative number. + * + * @returns true if the number if negative. + */ + simdjson_inline bool is_negative() noexcept; + /** + * Checks whether the document is an integer number. 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. + */ + simdjson_inline simdjson_result is_integer() noexcept; + /** + * Determine the number type (integer or floating-point number) as quickly + * as possible. This function does not fully validate the input. It is + * useful when you only need to classify the numbers, without parsing them. + * + * If you are planning to retrieve the value or you need full validation, + * consider using the get_number() method instead: it will fully parse + * and validate the input, and give you access to the type: + * get_number().get_number_type(). + * + * get_number_type() is number_type::unsigned_integer if we have + * an integer greater or equal to 9223372036854775808 + * get_number_type() is number_type::signed_integer if we have an + * integer that is less than 9223372036854775808 + * Otherwise, get_number_type() has value number_type::floating_point_number + * + * 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 + */ + simdjson_inline simdjson_result get_number_type() noexcept; + + /** + * Attempt to parse an ondemand::number. An ondemand::number may + * contain an integer value or a floating-point value, the simdjson + * library will autodetect the type. Thus it is a dynamically typed + * number. Before accessing the value, you must determine the detected + * type. + * + * number.get_number_type() is number_type::signed_integer if we have + * an integer in [-9223372036854775808,9223372036854775808) + * You can recover the value by calling number.get_int64() and you + * have that number.is_int64() is true. + * + * number.get_number_type() is number_type::unsigned_integer if we have + * an integer in [9223372036854775808,18446744073709551616) + * You can recover the value by calling number.get_uint64() and you + * have that number.is_uint64() is true. + * + * 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. + */ + simdjson_warn_unused simdjson_inline simdjson_result get_number() noexcept; + + /** + * Get the raw JSON for this token. + * + * The string_view will always point into the input buffer. + * + * The string_view will start at the beginning of the token, and include the entire token + * *as well as all spaces until the next token (or EOF).* This means, for example, that a + * string token always begins with a " and is always terminated by the final ", possibly + * followed by a number of spaces. + * + * The string_view is *not* null-terminated. If this is a scalar (string, number, + * boolean, or null), the character after the end of the string_view may be the padded buffer. + * + * Tokens include: + * - { + * - [ + * - "a string (possibly with UTF-8 or backslashed characters like \\\")". + * - -1.2e-100 + * - true + * - false + * - null + */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + /** + * 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). + */ + inline void rewind() noexcept; + /** + * Returns debugging information. + */ + inline std::string to_debug_string() noexcept; + /** + * Some unrecoverable error conditions may render the document instance unusable. + * The is_alive() method returns true when the document is still suitable. + */ + inline bool is_alive() noexcept; + + /** + * Returns the current location in the document if in bounds. + */ + inline simdjson_result current_location() const noexcept; + + /** + * Returns true if this document has been fully parsed. + * If you have consumed the whole document and at_end() returns + * false, then there may be trailing content. + */ + inline bool at_end() const noexcept; + + /** + * 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. + */ + simdjson_inline int32_t current_depth() const noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() automatically calls rewind between each call. Thus + * all values, objects and arrays that you have created so far (including unescaped strings) + * are invalidated. After calling at_pointer, you need to consume the result: string values + * should be stored in your own variables, arrays should be decoded and stored in your own array-like + * structures and so forth. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + * - SCALAR_DOCUMENT_AS_VALUE if the json_pointer is empty and the document is not a scalar (see is_scalar() function). + */ + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; +protected: + /** + * Consumes the document. + */ + simdjson_inline error_code consume() noexcept; + + simdjson_inline document(ondemand::json_iterator &&iter) noexcept; + simdjson_inline const uint8_t *text(uint32_t idx) const noexcept; + + simdjson_inline value_iterator resume_value_iterator() noexcept; + simdjson_inline value_iterator get_root_value_iterator() noexcept; + simdjson_inline simdjson_result start_or_resume_object() noexcept; + static simdjson_inline document start(ondemand::json_iterator &&iter) noexcept; + + // + // Fields + // + json_iterator iter{}; ///< Current position in the document + static constexpr depth_t DOCUMENT_DEPTH = 0; ///< document depth is always 0 + + friend class array_iterator; + friend class value; + friend class ondemand::parser; + friend class object; + friend class array; + friend class field; + friend class token; + friend class document_stream; + friend class document_reference; +}; + + +/** + * A document_reference is a thin wrapper around a document reference instance. + */ +class document_reference { +public: + simdjson_inline document_reference() noexcept; + simdjson_inline document_reference(document &d) noexcept; + simdjson_inline document_reference(const document_reference &other) noexcept = default; + simdjson_inline document_reference& operator=(const document_reference &other) noexcept = default; + simdjson_inline void rewind() noexcept; + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + + simdjson_inline simdjson_result is_null() noexcept; + simdjson_inline simdjson_result raw_json() noexcept; + simdjson_inline operator document&() const noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator array() & noexcept(false); + simdjson_inline operator object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + simdjson_inline simdjson_result raw_json_token() noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +private: + document *doc{nullptr}; +}; +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::document &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + + template simdjson_inline simdjson_result get() & noexcept; + template simdjson_inline simdjson_result get() && noexcept; + + template simdjson_inline error_code get(T &out) & noexcept; + template simdjson_inline error_code get(T &out) && noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator westmere::ondemand::array() & noexcept(false); + simdjson_inline operator westmere::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator westmere::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator westmere::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline int32_t current_depth() const noexcept; + simdjson_inline bool at_end() const noexcept; + simdjson_inline bool is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + + + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::document_reference value, error_code error) noexcept; + simdjson_inline simdjson_result() noexcept = default; + simdjson_inline error_code rewind() noexcept; + + simdjson_inline simdjson_result get_array() & noexcept; + simdjson_inline simdjson_result get_object() & noexcept; + simdjson_inline simdjson_result get_uint64() noexcept; + simdjson_inline simdjson_result get_uint64_in_string() noexcept; + simdjson_inline simdjson_result get_int64() noexcept; + simdjson_inline simdjson_result get_int64_in_string() noexcept; + simdjson_inline simdjson_result get_double() noexcept; + simdjson_inline simdjson_result get_double_in_string() noexcept; + simdjson_inline simdjson_result get_string(bool allow_replacement = false) noexcept; + template + simdjson_inline error_code get_string(string_type& receiver, bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result get_wobbly_string() noexcept; + simdjson_inline simdjson_result get_raw_json_string() noexcept; + simdjson_inline simdjson_result get_bool() noexcept; + simdjson_inline simdjson_result get_value() noexcept; + simdjson_inline simdjson_result is_null() noexcept; + +#if SIMDJSON_EXCEPTIONS + simdjson_inline operator westmere::ondemand::array() & noexcept(false); + simdjson_inline operator westmere::ondemand::object() & noexcept(false); + simdjson_inline operator uint64_t() noexcept(false); + simdjson_inline operator int64_t() noexcept(false); + simdjson_inline operator double() noexcept(false); + simdjson_inline operator std::string_view() noexcept(false); + simdjson_inline operator westmere::ondemand::raw_json_string() noexcept(false); + simdjson_inline operator bool() noexcept(false); + simdjson_inline operator westmere::ondemand::value() noexcept(false); +#endif + simdjson_inline simdjson_result count_elements() & noexcept; + simdjson_inline simdjson_result count_fields() & noexcept; + simdjson_inline simdjson_result at(size_t index) & noexcept; + simdjson_inline simdjson_result begin() & noexcept; + simdjson_inline simdjson_result end() & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(const char *key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](const char *key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(const char *key) & noexcept; + simdjson_inline simdjson_result type() noexcept; + simdjson_inline simdjson_result is_scalar() noexcept; + simdjson_inline simdjson_result current_location() noexcept; + simdjson_inline simdjson_result current_depth() const noexcept; + simdjson_inline simdjson_result is_negative() noexcept; + simdjson_inline simdjson_result is_integer() noexcept; + simdjson_inline simdjson_result get_number_type() noexcept; + simdjson_inline simdjson_result get_number() noexcept; + /** @copydoc simdjson_inline std::string_view document_reference::raw_json_token() const noexcept */ + simdjson_inline simdjson_result raw_json_token() noexcept; + + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; +}; + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_H +/* end file simdjson/generic/ondemand/document.h for westmere */ +/* including simdjson/generic/ondemand/document_stream.h for westmere: #include "simdjson/generic/ondemand/document_stream.h" */ +/* begin file simdjson/generic/ondemand/document_stream.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#ifdef SIMDJSON_THREADS_ENABLED +#include +#include +#include +#endif + +namespace simdjson { +namespace westmere { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED +/** @private Custom worker class **/ +struct stage1_worker { + stage1_worker() noexcept = default; + stage1_worker(const stage1_worker&) = delete; + stage1_worker(stage1_worker&&) = delete; + stage1_worker operator=(const stage1_worker&) = delete; + ~stage1_worker(); + /** + * We only start the thread when it is needed, not at object construction, this may throw. + * You should only call this once. + **/ + void start_thread(); + /** + * Start a stage 1 job. You should first call 'run', then 'finish'. + * You must call start_thread once before. + */ + void run(document_stream * ds, parser * stage1, size_t next_batch_start); + /** Wait for the run to finish (blocking). You should first call 'run', then 'finish'. **/ + void finish(); + +private: + + /** + * Normally, we would never stop the thread. But we do in the destructor. + * This function is only safe assuming that you are not waiting for results. You + * should have called run, then finish, and be done. + **/ + void stop_thread(); + + std::thread thread{}; + /** These three variables define the work done by the thread. **/ + ondemand::parser * stage1_thread_parser{}; + size_t _next_batch_start{}; + document_stream * owner{}; + /** + * We have two state variables. This could be streamlined to one variable in the future but + * we use two for clarity. + */ + bool has_work{false}; + bool can_work{true}; + + /** + * We lock using a mutex. + */ + std::mutex locking_mutex{}; + std::condition_variable cond_var{}; + + friend class document_stream; +}; +#endif // SIMDJSON_THREADS_ENABLED + +/** + * A forward-only stream of documents. + * + * Produced by parser::iterate_many. + * + */ +class document_stream { +public: + /** + * Construct an uninitialized document_stream. + * + * ```c++ + * document_stream docs; + * auto error = parser.iterate_many(json).get(docs); + * ``` + */ + simdjson_inline document_stream() noexcept; + /** Move one document_stream to another. */ + simdjson_inline document_stream(document_stream &&other) noexcept = default; + /** Move one document_stream to another. */ + simdjson_inline document_stream &operator=(document_stream &&other) noexcept = default; + + simdjson_inline ~document_stream() noexcept; + + /** + * Returns the input size in bytes. + */ + inline size_t size_in_bytes() const noexcept; + + /** + * After iterating through the stream, this method + * returns the number of bytes that were not parsed at the end + * of the stream. If truncated_bytes() differs from zero, + * then the input was truncated maybe because incomplete JSON + * documents were found at the end of the stream. You + * may need to process the bytes in the interval [size_in_bytes()-truncated_bytes(), size_in_bytes()). + * + * You should only call 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(); + * + */ + inline size_t truncated_bytes() const noexcept; + + class iterator { + public: + using value_type = simdjson_result; + using reference = value_type; + + using difference_type = std::ptrdiff_t; + + using iterator_category = std::input_iterator_tag; + + /** + * Default constructor. + */ + simdjson_inline iterator() noexcept; + /** + * Get the current document (or error). + */ + simdjson_inline simdjson_result operator*() noexcept; + /** + * Advance to the next document (prefix). + */ + inline iterator& operator++() noexcept; + /** + * Check if we're at the end yet. + * @param other the end iterator to compare to. + */ + simdjson_inline bool operator!=(const iterator &other) const noexcept; + /** + * @private + * + * Gives the current index in the input document in bytes. + * + * document_stream stream = parser.parse_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * auto doc = *i; + * size_t index = i.current_index(); + * } + * + * This function (current_index()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + */ + simdjson_inline size_t current_index() const noexcept; + + /** + * @private + * + * Gives a view of the current document at the current position. + * + * document_stream stream = parser.iterate_many(json,window); + * for(auto i = stream.begin(); i != stream.end(); ++i) { + * std::string_view v = i.source(); + * } + * + * The returned string_view instance is simply a map to the (unparsed) + * source string: it may thus include white-space characters and all manner + * of padding. + * + * This function (source()) is experimental and the usage + * may change in future versions of simdjson: we find the API somewhat + * awkward and we would like to offer something friendlier. + * + */ + simdjson_inline std::string_view source() const noexcept; + + /** + * Returns error of the stream (if any). + */ + inline error_code error() const noexcept; + + private: + simdjson_inline iterator(document_stream *s, bool finished) noexcept; + /** The document_stream we're iterating through. */ + document_stream* stream; + /** Whether we're finished or not. */ + bool finished; + + friend class document; + friend class document_stream; + friend class json_iterator; + }; + + /** + * Start iterating the documents in the stream. + */ + simdjson_inline iterator begin() noexcept; + /** + * The end of the stream, for iterator comparison purposes. + */ + simdjson_inline iterator end() noexcept; + +private: + + document_stream &operator=(const document_stream &) = delete; // Disallow copying + document_stream(const document_stream &other) = delete; // Disallow copying + + /** + * Construct a document_stream. Does not allocate or parse anything until the iterator is + * used. + * + * @param parser is a reference to the parser instance used to generate this document_stream + * @param buf is the raw byte buffer we need to process + * @param len is the length of the raw byte buffer in bytes + * @param batch_size is the size of the windows (must be strictly greater or equal to the largest JSON document) + */ + simdjson_inline document_stream( + ondemand::parser &parser, + const uint8_t *buf, + size_t len, + size_t batch_size, + bool allow_comma_separated + ) noexcept; + + /** + * Parse the first document in the buffer. Used by begin(), to handle allocation and + * initialization. + */ + inline void start() noexcept; + + /** + * Parse the next document found in the buffer previously given to document_stream. + * + * The content should be a valid JSON document encoded as UTF-8. If there is a + * UTF-8 BOM, the parser skips it. + * + * You do NOT need to pre-allocate a parser. This function takes care of + * pre-allocating a capacity defined by the batch_size defined when creating the + * document_stream object. + * + * The function returns simdjson::EMPTY if there is no more data to be parsed. + * + * The function returns simdjson::SUCCESS (as integer = 0) in case of success + * and indicates that the buffer has successfully been parsed to the end. + * Every document it contained has been parsed without error. + * + * The function returns an error code from simdjson/simdjson.h in case of failure + * such as simdjson::CAPACITY, simdjson::MEMALLOC, simdjson::DEPTH_ERROR and so forth; + * the simdjson::error_message function converts these error codes into a string). + * + * You can also check validity by calling parser.is_valid(). The same parser can + * and should be reused for the other documents in the buffer. + */ + inline void next() noexcept; + + /** Move the json_iterator of the document to the location of the next document in the stream. */ + inline void next_document() noexcept; + + /** Get the next document index. */ + inline size_t next_batch_start() const noexcept; + + /** Pass the next batch through stage 1 with the given parser. */ + inline error_code run_stage1(ondemand::parser &p, size_t batch_start) noexcept; + + // Fields + ondemand::parser *parser; + const uint8_t *buf; + size_t len; + size_t batch_size; + bool allow_comma_separated; + /** + * We are going to use just one document instance. The document owns + * the json_iterator. It implies that we only ever pass a reference + * to the document to the users. + */ + document doc{}; + /** The error (or lack thereof) from the current document. */ + error_code error; + size_t batch_start{0}; + size_t doc_index{}; + + #ifdef SIMDJSON_THREADS_ENABLED + /** Indicates whether we use threads. Note that this needs to be a constant during the execution of the parsing. */ + bool use_thread; + + inline void load_from_stage1_thread() noexcept; + + /** Start a thread to run stage 1 on the next batch. */ + inline void start_stage1_thread() noexcept; + + /** Wait for the stage 1 thread to finish and capture the results. */ + inline void finish_stage1_thread() noexcept; + + /** The error returned from the stage 1 thread. */ + error_code stage1_thread_error{UNINITIALIZED}; + /** The thread used to run stage 1 against the next batch in the background. */ + std::unique_ptr worker{new(std::nothrow) stage1_worker()}; + /** + * The parser used to run stage 1 in the background. Will be swapped + * with the regular parser when finished. + */ + ondemand::parser stage1_thread_parser{}; + + friend struct stage1_worker; + #endif // SIMDJSON_THREADS_ENABLED + + friend class parser; + friend class document; + friend class json_iterator; + friend struct simdjson_result; + friend struct internal::simdjson_result_base; +}; // document_stream + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::document_stream &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_H +/* end file simdjson/generic/ondemand/document_stream.h for westmere */ +/* including simdjson/generic/ondemand/field.h for westmere: #include "simdjson/generic/ondemand/field.h" */ +/* begin file simdjson/generic/ondemand/field.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * A JSON field (key/value pair) in an object. + * + * Returned from object iteration. + * + * Extends from std::pair so you can use C++ algorithms that rely on pairs. + */ +class field : public std::pair { +public: + /** + * Create a new invalid field. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline field() noexcept; + + /** + * Get the key as a string_view (for higher speed, consider raw_key). + * We deliberately use a more cumbersome name (unescaped_key) to force users + * to think twice about using it. + * + * This consumes the key: once you have called unescaped_key(), you cannot + * call it again nor can you call key(). + */ + simdjson_inline simdjson_warn_unused simdjson_result unescaped_key(bool allow_replacement) noexcept; + /** + * Get the key as a raw_json_string. Can be used for direct comparison with + * an unescaped C string: e.g., key() == "test". + */ + simdjson_inline raw_json_string key() const noexcept; + /** + * Get the field value. + */ + simdjson_inline ondemand::value &value() & noexcept; + /** + * @overload ondemand::value &ondemand::value() & noexcept + */ + simdjson_inline ondemand::value value() && noexcept; + +protected: + simdjson_inline field(raw_json_string key, ondemand::value &&value) noexcept; + static simdjson_inline simdjson_result start(value_iterator &parent_iter) noexcept; + static simdjson_inline simdjson_result start(const value_iterator &parent_iter, raw_json_string key) noexcept; + friend struct simdjson_result; + friend class object_iterator; +}; + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::field &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result unescaped_key(bool allow_replacement = false) noexcept; + simdjson_inline simdjson_result key() noexcept; + simdjson_inline simdjson_result value() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_H +/* end file simdjson/generic/ondemand/field.h for westmere */ +/* including simdjson/generic/ondemand/object.h for westmere: #include "simdjson/generic/ondemand/object.h" */ +/* begin file simdjson/generic/ondemand/object.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +/** + * A forward-only JSON object field iterator. + */ +class object { +public: + /** + * Create a new invalid object. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + /** + * Look up a field by name on an object (order-sensitive). + * + * The following code reads z, then y, then x, and thus will not retrieve x or y if fed the + * JSON `{ "x": 1, "y": 2, "z": 3 }`: + * + * ```c++ + * simdjson::ondemand::parser parser; + * auto obj = parser.parse(R"( { "x": 1, "y": 2, "z": 3 } )"_padded); + * double z = obj.find_field("z"); + * double y = obj.find_field("y"); + * double x = obj.find_field("x"); + * ``` + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * **Raw Keys:** The lookup will be done against the *raw* key, and will not unescape keys. + * e.g. `object["a"]` will match `{ "a": 1 }`, but will *not* match `{ "\u0061": 1 }`. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a + * key a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() + * is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + + /** + * Look up a field by name on an object, without regard to key order. + * + * **Performance Notes:** This is a bit less performant than find_field(), though its effect varies + * and often appears negligible. It starts out normally, starting out at the last field; but if + * the field is not found, it scans from the beginning of the object to see if it missed it. That + * missing case has a non-cache-friendly bump and lots of extra scanning, especially if the object + * in question is large. The fact that the extra code is there also bumps the executable size. + * + * It is the default, however, because it would be highly surprising (and hard to debug) if the + * default behavior failed to look up a field just because it was in the wrong order--and many + * APIs assume this. Therefore, you must be explicit if you want to treat objects as out of order. + * + * Use find_field() if you are sure fields will be in order (or are willing to treat it as if the + * field wasn't there when they aren't). + * + * If you have multiple fields with a matching key ({"x": 1, "x": 1}) be mindful + * that only one field is returned. + * + * You must consume the fields on an object one at a time. A request for a new key + * invalidates previous field values: it makes them unsafe. The value instance you get + * from `content["bids"]` becomes invalid when you call `content["asks"]`. The array + * given by content["bids"].get_array() should not be accessed after you have called + * content["asks"].get_array(). You can detect such mistakes by first compiling and running + * the code in Debug mode (or with the macro `SIMDJSON_DEVELOPMENT_CHECKS` set to 1): an + * OUT_OF_ORDER_ITERATION error is generated. + * + * You are expected to access keys only once. You should access the value corresponding to a key + * a single time. Doing object["mykey"].to_string() and then again object["mykey"].to_string() is an error. + * + * @param key The key to look up. + * @returns The value of the field, or NO_SUCH_FIELD if the field is not in the object. + */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + /** @overload simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; */ + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + + /** + * Get the value associated with the given JSON pointer. We use the RFC 6901 + * https://tools.ietf.org/html/rfc6901 standard, interpreting the current node + * as the root of its own JSON document. + * + * ondemand::parser parser; + * auto json = R"({ "foo": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("/foo/a/1") == 20 + * + * It is allowed for a key to be the empty string: + * + * ondemand::parser parser; + * auto json = R"({ "": { "a": [ 10, 20, 30 ] }})"_padded; + * auto doc = parser.iterate(json); + * doc.at_pointer("//a/1") == 20 + * + * Note that at_pointer() called on the document automatically calls the document's rewind + * method between each call. It invalidates all previously accessed arrays, objects and values + * that have not been consumed. Yet it is not the case when calling at_pointer on an object + * instance: there is no rewind and no invalidation. + * + * You may call at_pointer more than once on an object, but each time the pointer is advanced + * to be within the value matched by the key indicated by the JSON pointer query. Thus any preceding + * key (as well as the current key) can no longer be used with following JSON pointer calls. + * + * Also note that at_pointer() relies on find_field() which implies that we do not unescape keys when matching. + * + * @return The value associated with the given JSON pointer, or: + * - NO_SUCH_FIELD if a field does not exist in an object + * - INDEX_OUT_OF_BOUNDS if an array index is larger than an array length + * - INCORRECT_TYPE if a non-integer is used to access an array + * - INVALID_JSON_POINTER if the JSON pointer is invalid and cannot be parsed + */ + inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + + /** + * Reset the iterator so that we are pointing back at the + * beginning of the object. 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) + */ + inline simdjson_result reset() & noexcept; + /** + * 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. + */ + inline simdjson_result is_empty() & noexcept; + /** + * This method scans the object and counts the number of key-value pairs. + * The count_fields method should always be called before you have begun + * iterating through the object: it is expected that you are pointing at + * the beginning of the object. + * The runtime complexity is linear in the size of the object. 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. + * + * 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. + */ + simdjson_inline simdjson_result count_fields() & noexcept; + /** + * 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. + */ + simdjson_inline simdjson_result raw_json() noexcept; + +protected: + /** + * Go to the end of the object, no matter where you are right now. + */ + simdjson_inline error_code consume() noexcept; + static simdjson_inline simdjson_result start(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result start_root(value_iterator &iter) noexcept; + static simdjson_inline simdjson_result started(value_iterator &iter) noexcept; + static simdjson_inline object resume(const value_iterator &iter) noexcept; + simdjson_inline object(const value_iterator &iter) noexcept; + + simdjson_warn_unused simdjson_inline error_code find_field_raw(const std::string_view key) noexcept; + + value_iterator iter{}; + + friend class value; + friend class document; + friend struct simdjson_result; +}; + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::object &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + simdjson_inline simdjson_result begin() noexcept; + simdjson_inline simdjson_result end() noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field(std::string_view key) && noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) & noexcept; + simdjson_inline simdjson_result find_field_unordered(std::string_view key) && noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) & noexcept; + simdjson_inline simdjson_result operator[](std::string_view key) && noexcept; + simdjson_inline simdjson_result at_pointer(std::string_view json_pointer) noexcept; + inline simdjson_result reset() noexcept; + inline simdjson_result is_empty() noexcept; + inline simdjson_result count_fields() & noexcept; + inline simdjson_result raw_json() noexcept; + +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_H +/* end file simdjson/generic/ondemand/object.h for westmere */ +/* including simdjson/generic/ondemand/object_iterator.h for westmere: #include "simdjson/generic/ondemand/object_iterator.h" */ +/* begin file simdjson/generic/ondemand/object_iterator.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +class object_iterator { +public: + /** + * Create a new invalid object_iterator. + * + * Exists so you can declare a variable and later assign to it before use. + */ + simdjson_inline object_iterator() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + // MUST ONLY BE CALLED ONCE PER ITERATION. + simdjson_inline simdjson_result operator*() noexcept; + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const object_iterator &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const object_iterator &) const noexcept; + // Checks for ']' and ',' + simdjson_inline object_iterator &operator++() noexcept; + +private: + /** + * The underlying JSON iterator. + * + * PERF NOTE: expected to be elided in favor of the parent document: this is set when the object + * is first used, and never changes afterwards. + */ + value_iterator iter{}; + + simdjson_inline object_iterator(const value_iterator &iter) noexcept; + friend struct simdjson_result; + friend class object; +}; + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +template<> +struct simdjson_result : public westmere::implementation_simdjson_result_base { +public: + simdjson_inline simdjson_result(westmere::ondemand::object_iterator &&value) noexcept; ///< @private + simdjson_inline simdjson_result(error_code error) noexcept; ///< @private + simdjson_inline simdjson_result() noexcept = default; + + // + // Iterator interface + // + + // Reads key and value, yielding them to the user. + simdjson_inline simdjson_result operator*() noexcept; // MUST ONLY BE CALLED ONCE PER ITERATION. + // Assumes it's being compared with the end. true if depth < iter->depth. + simdjson_inline bool operator==(const simdjson_result &) const noexcept; + // Assumes it's being compared with the end. true if depth >= iter->depth. + simdjson_inline bool operator!=(const simdjson_result &) const noexcept; + // Checks for ']' and ',' + simdjson_inline simdjson_result &operator++() noexcept; +}; + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_H +/* end file simdjson/generic/ondemand/object_iterator.h for westmere */ +/* including simdjson/generic/ondemand/serialization.h for westmere: #include "simdjson/generic/ondemand/serialization.h" */ +/* begin file simdjson/generic/ondemand/serialization.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +/** + * 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. + */ +inline simdjson_result to_json_string(westmere::ondemand::document& x) noexcept; +/** + * Create a string-view instance out of a value instance. 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. + */ +inline simdjson_result to_json_string(westmere::ondemand::value& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(westmere::ondemand::object& x) noexcept; +/** + * 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. + */ +inline simdjson_result to_json_string(westmere::ondemand::array& x) noexcept; +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +inline simdjson_result to_json_string(simdjson_result x); +} // namespace simdjson + +/** + * We want to support argument-dependent lookup (ADL). + * Hence we should define operator<< in the namespace + * where the argument (here value, object, etc.) resides. + * Credit: @madhur4127 + * See https://github.com/simdjson/simdjson/issues/1768 + */ +namespace simdjson { namespace westmere { namespace ondemand { + +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The element. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::value x); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::array value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The array. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::document& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::document_reference& value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x); +#endif +/** + * Print JSON to an output stream. It does not + * validate the content. + * + * @param out The output stream. + * @param value The object. + * @throw if there is an error with the underlying output stream. simdjson itself will not throw. + */ +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::object value); +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x); +#endif +}}} // namespace simdjson::westmere::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_H +/* end file simdjson/generic/ondemand/serialization.h for westmere */ + +// Inline definitions +/* including simdjson/generic/ondemand/array-inl.h for westmere: #include "simdjson/generic/ondemand/array-inl.h" */ +/* begin file simdjson/generic/ondemand/array-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter->depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the array is first found and the iterator is just past the `{`. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the `,` before the next value (or `]`). In this state, +// depth == iter->depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter->depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter->depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the array iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet element may be missing or not be an +// array--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter->depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between elements, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter->depth == depth, and at_start == false. +// +// ## Terminal State +// +// The terminal state has iter->depth < depth. at_start is always false. +// +// - Finished: When we have reached a `]` or have reported an error, we are finished. We signal this +// by decrementing depth. In this state, iter->depth < depth, at_start == false, and +// error == SUCCESS. +// + +simdjson_inline array::array(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result array::start(value_iterator &iter) noexcept { + // We don't need to know if the array is empty to start iteration, but we do want to know if there + // is an error--thus `simdjson_unused`. + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::start_root(value_iterator &iter) noexcept { + simdjson_unused bool has_value; + SIMDJSON_TRY( iter.start_root_array().get(has_value) ); + return array(iter); +} +simdjson_inline simdjson_result array::started(value_iterator &iter) noexcept { + bool has_value; + SIMDJSON_TRY(iter.started_array().get(has_value)); + return array(iter); +} + +simdjson_inline simdjson_result array::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return array_iterator(iter); +} +simdjson_inline simdjson_result array::end() noexcept { + return array_iterator(iter); +} +simdjson_inline error_code array::consume() noexcept { + auto error = iter.json_iter().skip_child(iter.depth()-1); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result array::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter._json_iter->unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline simdjson_result array::count_elements() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the array after counting the number of elements. + iter.reset_array(); + return count; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline simdjson_result array::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_array().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +inline simdjson_result array::reset() & noexcept { + return iter.reset_array(); +} + +inline simdjson_result array::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + // - means "the append position" or "the element after the end of the array" + // We don't support this, because we're returning a real element, not a position. + if (json_pointer == "-") { return INDEX_OUT_OF_BOUNDS; } + + // Read the array index + size_t array_index = 0; + size_t i; + for (i = 0; i < json_pointer.length() && json_pointer[i] != '/'; i++) { + uint8_t digit = uint8_t(json_pointer[i] - '0'); + // Check for non-digit in array index. If it's there, we're trying to get a field in an object + if (digit > 9) { return INCORRECT_TYPE; } + array_index = array_index*10 + digit; + } + + // 0 followed by other digits is invalid + if (i > 1 && json_pointer[0] == '0') { return INVALID_JSON_POINTER; } // "JSON pointer array index has other characters after 0" + + // Empty string is invalid; so is a "/" with no digits before it + if (i == 0) { return INVALID_JSON_POINTER; } // "Empty string in JSON pointer array index" + // Get the child + auto child = at(array_index); + // If there is an error, it ends here + if(child.error()) { + return child; + } + + // If there is a /, we're not done yet, call recursively. + if (i < json_pointer.length()) { + child = child.at_pointer(json_pointer.substr(i)); + } + return child; +} + +simdjson_inline simdjson_result array::at(size_t index) noexcept { + size_t i = 0; + for (auto value : *this) { + if (i == index) { return value; } + i++; + } + return INDEX_OUT_OF_BOUNDS; +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + westmere::ondemand::array &&value +) noexcept + : implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept + : implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::is_empty() & noexcept { + if (error()) { return error(); } + return first.is_empty(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_INL_H +/* end file simdjson/generic/ondemand/array-inl.h for westmere */ +/* including simdjson/generic/ondemand/array_iterator-inl.h for westmere: #include "simdjson/generic/ondemand/array_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/array_iterator-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +simdjson_inline array_iterator::array_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result array_iterator::operator*() noexcept { + if (iter.error()) { iter.abandon(); return iter.error(); } + return value(iter.child()); +} +simdjson_inline bool array_iterator::operator==(const array_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool array_iterator::operator!=(const array_iterator &) const noexcept { + return iter.is_open(); +} +simdjson_inline array_iterator &array_iterator::operator++() noexcept { + error_code error; + // PERF NOTE this is a safety rail ... users should exit loops as soon as they receive an error, so we'll never get here. + // However, it does not seem to make a perf difference, so we add it out of an abundance of caution. + if (( error = iter.error() )) { return *this; } + if (( error = iter.skip_child() )) { return *this; } + if (( error = iter.has_next_element().error() )) { return *this; } + return *this; +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + westmere::ondemand::array_iterator &&value +) noexcept + : westmere::implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : westmere::implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++(first); + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_ARRAY_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/array_iterator-inl.h for westmere */ +/* including simdjson/generic/ondemand/document-inl.h for westmere: #include "simdjson/generic/ondemand/document-inl.h" */ +/* begin file simdjson/generic/ondemand/document-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +simdjson_inline document::document(ondemand::json_iterator &&_iter) noexcept + : iter{std::forward(_iter)} +{ + logger::log_start_value(iter, "document"); +} + +simdjson_inline document document::start(json_iterator &&iter) noexcept { + return document(std::forward(iter)); +} + +inline void document::rewind() noexcept { + iter.rewind(); +} + +inline std::string document::to_debug_string() noexcept { + return iter.to_string(); +} + +inline simdjson_result document::current_location() const noexcept { + return iter.current_location(); +} + +inline int32_t document::current_depth() const noexcept { + return iter.depth(); +} + +inline bool document::at_end() const noexcept { + return iter.at_end(); +} + + +inline bool document::is_alive() noexcept { + return iter.is_alive(); +} +simdjson_inline value_iterator document::resume_value_iterator() noexcept { + return value_iterator(&iter, 1, iter.root_position()); +} +simdjson_inline value_iterator document::get_root_value_iterator() noexcept { + return resume_value_iterator(); +} +simdjson_inline simdjson_result document::start_or_resume_object() noexcept { + if (iter.at_root()) { + return get_object(); + } else { + return object::resume(resume_value_iterator()); + } +} +simdjson_inline simdjson_result document::get_value() noexcept { + // Make sure we start any arrays or objects before returning, so that start_root_() + // gets called. + + // It is the convention throughout the code that the macro `SIMDJSON_DEVELOPMENT_CHECKS` determines whether + // we check for OUT_OF_ORDER_ITERATION. Proper on::demand code should never trigger this error. +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.at_root()) { return OUT_OF_ORDER_ITERATION; } +#endif + // assert_at_root() serves two purposes: in Debug mode, whether or not + // SIMDJSON_DEVELOPMENT_CHECKS is set or not, it checks that we are at the root of + // the document (this will typically be redundant). In release mode, it generates + // SIMDJSON_ASSUME statements to allow the compiler to make assumptions. + iter.assert_at_root(); + switch (*iter.peek()) { + case '[': { + // The following lines check that the document ends with ]. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_array(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + case '{': { + // The following lines would check that the document ends with }. + auto value_iterator = get_root_value_iterator(); + auto error = value_iterator.check_root_object(); + if(error) { return error; } + return value(get_root_value_iterator()); + } + default: + // Unfortunately, scalar documents are a special case in simdjson and they cannot + // be safely converted to value instances. + return SCALAR_DOCUMENT_AS_VALUE; + } +} +simdjson_inline simdjson_result document::get_array() & noexcept { + auto value = get_root_value_iterator(); + return array::start_root(value); +} +simdjson_inline simdjson_result document::get_object() & noexcept { + auto value = get_root_value_iterator(); + return object::start_root(value); +} + +/** + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. 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. + */ + +simdjson_inline simdjson_result document::get_uint64() noexcept { + return get_root_value_iterator().get_root_uint64(true); +} +simdjson_inline simdjson_result document::get_uint64_in_string() noexcept { + return get_root_value_iterator().get_root_uint64_in_string(true); +} +simdjson_inline simdjson_result document::get_int64() noexcept { + return get_root_value_iterator().get_root_int64(true); +} +simdjson_inline simdjson_result document::get_int64_in_string() noexcept { + return get_root_value_iterator().get_root_int64_in_string(true); +} +simdjson_inline simdjson_result document::get_double() noexcept { + return get_root_value_iterator().get_root_double(true); +} +simdjson_inline simdjson_result document::get_double_in_string() noexcept { + return get_root_value_iterator().get_root_double_in_string(true); +} +simdjson_inline simdjson_result document::get_string(bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(true, allow_replacement); +} +template +simdjson_inline error_code document::get_string(string_type& receiver, bool allow_replacement) noexcept { + return get_root_value_iterator().get_root_string(receiver, true, allow_replacement); +} +simdjson_inline simdjson_result document::get_wobbly_string() noexcept { + return get_root_value_iterator().get_root_wobbly_string(true); +} +simdjson_inline simdjson_result document::get_raw_json_string() noexcept { + return get_root_value_iterator().get_root_raw_json_string(true); +} +simdjson_inline simdjson_result document::get_bool() noexcept { + return get_root_value_iterator().get_root_bool(true); +} +simdjson_inline simdjson_result document::is_null() noexcept { + return get_root_value_iterator().is_root_null(true); +} + +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_array(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_object(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_double(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_bool(); } +template<> simdjson_inline simdjson_result document::get() & noexcept { return get_value(); } + +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_double(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_uint64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_int64(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return std::forward(*this).get_bool(); } +template<> simdjson_inline simdjson_result document::get() && noexcept { return get_value(); } + +template simdjson_inline error_code document::get(T &out) & noexcept { + return get().get(out); +} +template simdjson_inline error_code document::get(T &out) && noexcept { + return std::forward(*this).get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document::operator array() & noexcept(false) { return get_array(); } +simdjson_inline document::operator object() & noexcept(false) { return get_object(); } +simdjson_inline document::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document::operator double() noexcept(false) { return get_double(); } +simdjson_inline document::operator std::string_view() noexcept(false) { return get_string(false); } +simdjson_inline document::operator raw_json_string() noexcept(false) { return get_raw_json_string(); } +simdjson_inline document::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document::operator value() noexcept(false) { return get_value(); } + +#endif +simdjson_inline simdjson_result document::count_elements() & noexcept { + auto a = get_array(); + simdjson_result answer = a.count_elements(); + /* If there was an array, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::count_fields() & noexcept { + auto a = get_object(); + simdjson_result answer = a.count_fields(); + /* If there was an object, we are now left pointing at its first element. */ + if(answer.error() == SUCCESS) { rewind(); } + return answer; +} +simdjson_inline simdjson_result document::at(size_t index) & noexcept { + auto a = get_array(); + return a.at(index); +} +simdjson_inline simdjson_result document::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result document::end() & noexcept { + return {}; +} + +simdjson_inline simdjson_result document::find_field(std::string_view key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field(const char *key) & noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result document::find_field_unordered(std::string_view key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::find_field_unordered(const char *key) & noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result document::operator[](std::string_view key) & noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result document::operator[](const char *key) & noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline error_code document::consume() noexcept { + auto error = iter.skip_child(0); + if(error) { iter.abandon(); } + return error; +} + +simdjson_inline simdjson_result document::raw_json() noexcept { + auto _iter = get_root_value_iterator(); + const uint8_t * starting_point{_iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + // After 'consume()', we could be left pointing just beyond the document, but that + // is ok because we are not going to dereference the final pointer position, we just + // use it to compute the length in bytes. + const uint8_t * final_point{iter.unsafe_pointer()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result document::type() noexcept { + return get_root_value_iterator().type(); +} + +simdjson_inline simdjson_result document::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool document::is_negative() noexcept { + return get_root_value_iterator().is_root_negative(); +} + +simdjson_inline simdjson_result document::is_integer() noexcept { + return get_root_value_iterator().is_root_integer(true); +} + +simdjson_inline simdjson_result document::get_number_type() noexcept { + return get_root_value_iterator().get_root_number_type(true); +} + +simdjson_inline simdjson_result document::get_number() noexcept { + return get_root_value_iterator().get_root_number(true); +} + + +simdjson_inline simdjson_result document::raw_json_token() noexcept { + auto _iter = get_root_value_iterator(); + return std::string_view(reinterpret_cast(_iter.peek_start()), _iter.peek_start_length()); +} + +simdjson_inline simdjson_result document::at_pointer(std::string_view json_pointer) noexcept { + rewind(); // Rewind the document each time at_pointer is called + if (json_pointer.empty()) { + return this->get_value(); + } + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + westmere::ondemand::document &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base( + error + ) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template +simdjson_inline simdjson_result simdjson_result::get() & noexcept { + if (error()) { return error(); } + return first.get(); +} +template +simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first).get(); +} +template +simdjson_inline error_code simdjson_result::get(T &out) & noexcept { + if (error()) { return error(); } + return first.get(out); +} +template +simdjson_inline error_code simdjson_result::get(T &out) && noexcept { + if (error()) { return error(); } + return std::forward(first).get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() & noexcept = delete; +template<> simdjson_inline simdjson_result simdjson_result::get() && noexcept { + if (error()) { return error(); } + return std::forward(first); +} +template<> simdjson_inline error_code simdjson_result::get(westmere::ondemand::document &out) & noexcept = delete; +template<> simdjson_inline error_code simdjson_result::get(westmere::ondemand::document &out) && noexcept { + if (error()) { return error(); } + out = std::forward(first); + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} + +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} + + +simdjson_inline bool simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} + +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} + +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} + +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} + + +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator westmere::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator westmere::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator westmere::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator westmere::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline bool simdjson_result::at_end() const noexcept { + if (error()) { return error(); } + return first.at_end(); +} + + +simdjson_inline int32_t simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + + +namespace simdjson { +namespace westmere { +namespace ondemand { + +simdjson_inline document_reference::document_reference() noexcept : doc{nullptr} {} +simdjson_inline document_reference::document_reference(document &d) noexcept : doc(&d) {} +simdjson_inline void document_reference::rewind() noexcept { doc->rewind(); } +simdjson_inline simdjson_result document_reference::get_array() & noexcept { return doc->get_array(); } +simdjson_inline simdjson_result document_reference::get_object() & noexcept { return doc->get_object(); } +/** + * The document_reference instances are used primarily/solely for streams of JSON + * documents. + * We decided that calling 'get_double()' on the JSON document '1.233 blabla' should + * give an error, so we check for trailing content. + * + * 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. + */ +simdjson_inline simdjson_result document_reference::get_uint64() noexcept { return doc->get_root_value_iterator().get_root_uint64(false); } +simdjson_inline simdjson_result document_reference::get_uint64_in_string() noexcept { return doc->get_root_value_iterator().get_root_uint64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_int64() noexcept { return doc->get_root_value_iterator().get_root_int64(false); } +simdjson_inline simdjson_result document_reference::get_int64_in_string() noexcept { return doc->get_root_value_iterator().get_root_int64_in_string(false); } +simdjson_inline simdjson_result document_reference::get_double() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_double_in_string() noexcept { return doc->get_root_value_iterator().get_root_double(false); } +simdjson_inline simdjson_result document_reference::get_string(bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(false, allow_replacement); } +template +simdjson_inline error_code document_reference::get_string(string_type& receiver, bool allow_replacement) noexcept { return doc->get_root_value_iterator().get_root_string(receiver, false, allow_replacement); } +simdjson_inline simdjson_result document_reference::get_wobbly_string() noexcept { return doc->get_root_value_iterator().get_root_wobbly_string(false); } +simdjson_inline simdjson_result document_reference::get_raw_json_string() noexcept { return doc->get_root_value_iterator().get_root_raw_json_string(false); } +simdjson_inline simdjson_result document_reference::get_bool() noexcept { return doc->get_root_value_iterator().get_root_bool(false); } +simdjson_inline simdjson_result document_reference::get_value() noexcept { return doc->get_value(); } +simdjson_inline simdjson_result document_reference::is_null() noexcept { return doc->get_root_value_iterator().is_root_null(false); } + +#if SIMDJSON_EXCEPTIONS +simdjson_inline document_reference::operator array() & noexcept(false) { return array(*doc); } +simdjson_inline document_reference::operator object() & noexcept(false) { return object(*doc); } +simdjson_inline document_reference::operator uint64_t() noexcept(false) { return get_uint64(); } +simdjson_inline document_reference::operator int64_t() noexcept(false) { return get_int64(); } +simdjson_inline document_reference::operator double() noexcept(false) { return get_double(); } +simdjson_inline document_reference::operator std::string_view() noexcept(false) { return std::string_view(*doc); } +simdjson_inline document_reference::operator raw_json_string() noexcept(false) { return raw_json_string(*doc); } +simdjson_inline document_reference::operator bool() noexcept(false) { return get_bool(); } +simdjson_inline document_reference::operator value() noexcept(false) { return value(*doc); } +#endif +simdjson_inline simdjson_result document_reference::count_elements() & noexcept { return doc->count_elements(); } +simdjson_inline simdjson_result document_reference::count_fields() & noexcept { return doc->count_fields(); } +simdjson_inline simdjson_result document_reference::at(size_t index) & noexcept { return doc->at(index); } +simdjson_inline simdjson_result document_reference::begin() & noexcept { return doc->begin(); } +simdjson_inline simdjson_result document_reference::end() & noexcept { return doc->end(); } +simdjson_inline simdjson_result document_reference::find_field(std::string_view key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::find_field(const char *key) & noexcept { return doc->find_field(key); } +simdjson_inline simdjson_result document_reference::operator[](std::string_view key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::operator[](const char *key) & noexcept { return (*doc)[key]; } +simdjson_inline simdjson_result document_reference::find_field_unordered(std::string_view key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::find_field_unordered(const char *key) & noexcept { return doc->find_field_unordered(key); } +simdjson_inline simdjson_result document_reference::type() noexcept { return doc->type(); } +simdjson_inline simdjson_result document_reference::is_scalar() noexcept { return doc->is_scalar(); } +simdjson_inline simdjson_result document_reference::current_location() noexcept { return doc->current_location(); } +simdjson_inline int32_t document_reference::current_depth() const noexcept { return doc->current_depth(); } +simdjson_inline bool document_reference::is_negative() noexcept { return doc->is_negative(); } +simdjson_inline simdjson_result document_reference::is_integer() noexcept { return doc->get_root_value_iterator().is_root_integer(false); } +simdjson_inline simdjson_result document_reference::get_number_type() noexcept { return doc->get_root_value_iterator().get_root_number_type(false); } +simdjson_inline simdjson_result document_reference::get_number() noexcept { return doc->get_root_value_iterator().get_root_number(false); } +simdjson_inline simdjson_result document_reference::raw_json_token() noexcept { return doc->raw_json_token(); } +simdjson_inline simdjson_result document_reference::at_pointer(std::string_view json_pointer) noexcept { return doc->at_pointer(json_pointer); } +simdjson_inline simdjson_result document_reference::raw_json() noexcept { return doc->raw_json();} +simdjson_inline document_reference::operator document&() const noexcept { return *doc; } + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + + + +namespace simdjson { +simdjson_inline simdjson_result::simdjson_result(westmere::ondemand::document_reference value, error_code error) + noexcept : implementation_simdjson_result_base(std::forward(value), error) {} + + +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) & noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline error_code simdjson_result::rewind() noexcept { + if (error()) { return error(); } + first.rewind(); + return SUCCESS; +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::get_array() & noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() & noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::get_value() noexcept { + if (error()) { return error(); } + return first.get_value(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator westmere::ondemand::array() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator westmere::ondemand::object() & noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator westmere::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator westmere::ondemand::value() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_INL_H +/* end file simdjson/generic/ondemand/document-inl.h for westmere */ +/* including simdjson/generic/ondemand/document_stream-inl.h for westmere: #include "simdjson/generic/ondemand/document_stream-inl.h" */ +/* begin file simdjson/generic/ondemand/document_stream-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace westmere { +namespace ondemand { + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void stage1_worker::finish() { + // After calling "run" someone would call finish() to wait + // for the end of the processing. + // This function will wait until either the thread has done + // the processing or, else, the destructor has been called. + std::unique_lock lock(locking_mutex); + cond_var.wait(lock, [this]{return has_work == false;}); +} + +inline stage1_worker::~stage1_worker() { + // The thread may never outlive the stage1_worker instance + // and will always be stopped/joined before the stage1_worker + // instance is gone. + stop_thread(); +} + +inline void stage1_worker::start_thread() { + std::unique_lock lock(locking_mutex); + if(thread.joinable()) { + return; // This should never happen but we never want to create more than one thread. + } + thread = std::thread([this]{ + while(true) { + std::unique_lock thread_lock(locking_mutex); + // We wait for either "run" or "stop_thread" to be called. + cond_var.wait(thread_lock, [this]{return has_work || !can_work;}); + // If, for some reason, the stop_thread() method was called (i.e., the + // destructor of stage1_worker is called, then we want to immediately destroy + // the thread (and not do any more processing). + if(!can_work) { + break; + } + this->owner->stage1_thread_error = this->owner->run_stage1(*this->stage1_thread_parser, + this->_next_batch_start); + this->has_work = false; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify "finish" + thread_lock.unlock(); + } + } + ); +} + + +inline void stage1_worker::stop_thread() { + std::unique_lock lock(locking_mutex); + // We have to make sure that all locks can be released. + can_work = false; + has_work = false; + cond_var.notify_all(); + lock.unlock(); + if(thread.joinable()) { + thread.join(); + } +} + +inline void stage1_worker::run(document_stream * ds, parser * stage1, size_t next_batch_start) { + std::unique_lock lock(locking_mutex); + owner = ds; + _next_batch_start = next_batch_start; + stage1_thread_parser = stage1; + has_work = true; + // The condition variable call should be moved after thread_lock.unlock() for performance + // reasons but thread sanitizers may report it as a data race if we do. + // See https://stackoverflow.com/questions/35775501/c-should-condition-variable-be-notified-under-lock + cond_var.notify_one(); // will notify the thread lock that we have work + lock.unlock(); +} + +#endif // SIMDJSON_THREADS_ENABLED + +simdjson_inline document_stream::document_stream( + ondemand::parser &_parser, + const uint8_t *_buf, + size_t _len, + size_t _batch_size, + bool _allow_comma_separated +) noexcept + : parser{&_parser}, + buf{_buf}, + len{_len}, + batch_size{_batch_size <= MINIMAL_BATCH_SIZE ? MINIMAL_BATCH_SIZE : _batch_size}, + allow_comma_separated{_allow_comma_separated}, + error{SUCCESS} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(_parser.threaded) // we need to make a copy because _parser.threaded can change + #endif +{ +#ifdef SIMDJSON_THREADS_ENABLED + if(worker.get() == nullptr) { + error = MEMALLOC; + } +#endif +} + +simdjson_inline document_stream::document_stream() noexcept + : parser{nullptr}, + buf{nullptr}, + len{0}, + batch_size{0}, + allow_comma_separated{false}, + error{UNINITIALIZED} + #ifdef SIMDJSON_THREADS_ENABLED + , use_thread(false) + #endif +{ +} + +simdjson_inline document_stream::~document_stream() noexcept +{ + #ifdef SIMDJSON_THREADS_ENABLED + worker.reset(); + #endif +} + +inline size_t document_stream::size_in_bytes() const noexcept { + return len; +} + +inline size_t document_stream::truncated_bytes() const noexcept { + if(error == CAPACITY) { return len - batch_start; } + return parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] - parser->implementation->structural_indexes[parser->implementation->n_structural_indexes + 1]; +} + +simdjson_inline document_stream::iterator::iterator() noexcept + : stream{nullptr}, finished{true} { +} + +simdjson_inline document_stream::iterator::iterator(document_stream* _stream, bool is_end) noexcept + : stream{_stream}, finished{is_end} { +} + +simdjson_inline simdjson_result document_stream::iterator::operator*() noexcept { + //if(stream->error) { return stream->error; } + return simdjson_result(stream->doc, stream->error); +} + +simdjson_inline document_stream::iterator& document_stream::iterator::operator++() noexcept { + // If there is an error, then we want the iterator + // to be finished, no matter what. (E.g., we do not + // keep generating documents with errors, or go beyond + // a document with errors.) + // + // Users do not have to call "operator*()" when they use operator++, + // so we need to end the stream in the operator++ function. + // + // Note that setting finished = true is essential otherwise + // we would enter an infinite loop. + if (stream->error) { finished = true; } + // Note that stream->error() is guarded against error conditions + // (it will immediately return if stream->error casts to false). + // In effect, this next function does nothing when (stream->error) + // is true (hence the risk of an infinite loop). + stream->next(); + // If that was the last document, we're finished. + // It is the only type of error we do not want to appear + // in operator*. + if (stream->error == EMPTY) { finished = true; } + // If we had any other kind of error (not EMPTY) then we want + // to pass it along to the operator* and we cannot mark the result + // as "finished" just yet. + return *this; +} + +simdjson_inline bool document_stream::iterator::operator!=(const document_stream::iterator &other) const noexcept { + return finished != other.finished; +} + +simdjson_inline document_stream::iterator document_stream::begin() noexcept { + start(); + // If there are no documents, we're finished. + return iterator(this, error == EMPTY); +} + +simdjson_inline document_stream::iterator document_stream::end() noexcept { + return iterator(this, true); +} + +inline void document_stream::start() noexcept { + if (error) { return; } + error = parser->allocate(batch_size); + if (error) { return; } + // Always run the first stage 1 parse immediately + batch_start = 0; + error = run_stage1(*parser, batch_start); + while(error == EMPTY) { + // In exceptional cases, we may start with an empty block + batch_start = next_batch_start(); + if (batch_start >= len) { return; } + error = run_stage1(*parser, batch_start); + } + if (error) { return; } + doc_index = batch_start; + doc = document(json_iterator(&buf[batch_start], parser)); + doc.iter._streaming = true; + + #ifdef SIMDJSON_THREADS_ENABLED + if (use_thread && next_batch_start() < len) { + // Kick off the first thread on next batch if needed + error = stage1_thread_parser.allocate(batch_size); + if (error) { return; } + worker->start_thread(); + start_stage1_thread(); + if (error) { return; } + } + #endif // SIMDJSON_THREADS_ENABLED +} + +inline void document_stream::next() noexcept { + // We always enter at once once in an error condition. + if (error) { return; } + next_document(); + if (error) { return; } + auto cur_struct_index = doc.iter._root - parser->implementation->structural_indexes.get(); + doc_index = batch_start + parser->implementation->structural_indexes[cur_struct_index]; + + // Check if at end of structural indexes (i.e. at end of batch) + if(cur_struct_index >= static_cast(parser->implementation->n_structural_indexes)) { + error = EMPTY; + // Load another batch (if available) + while (error == EMPTY) { + batch_start = next_batch_start(); + if (batch_start >= len) { break; } + #ifdef SIMDJSON_THREADS_ENABLED + if(use_thread) { + load_from_stage1_thread(); + } else { + error = run_stage1(*parser, batch_start); + } + #else + error = run_stage1(*parser, batch_start); + #endif + /** + * Whenever we move to another window, we need to update all pointers to make + * it appear as if the input buffer started at the beginning of the window. + * + * Take this input: + * + * {"z":5} {"1":1,"2":2,"4":4} [7, 10, 9] [15, 11, 12, 13] [154, 110, 112, 1311] + * + * Say you process the following window... + * + * '{"z":5} {"1":1,"2":2,"4":4} [7, 10, 9]' + * + * When you do so, the json_iterator has a pointer at the beginning of the memory region + * (pointing at the beginning of '{"z"...'. + * + * When you move to the window that starts at... + * + * '[7, 10, 9] [15, 11, 12, 13] ... + * + * then it is not sufficient to just run stage 1. You also need to re-anchor the + * json_iterator so that it believes we are starting at '[7, 10, 9]...'. + * + * Under the DOM front-end, this gets done automatically because the parser owns + * the pointer the data, and when you call stage1 and then stage2 on the same + * parser, then stage2 will run on the pointer acquired by stage1. + * + * That is, stage1 calls "this->buf = _buf" so the parser remembers the buffer that + * we used. But json_iterator has no callback when stage1 is called on the parser. + * In fact, I think that the parser is unaware of json_iterator. + * + * + * So we need to re-anchor the json_iterator after each call to stage 1 so that + * all of the pointers are in sync. + */ + doc.iter = json_iterator(&buf[batch_start], parser); + doc.iter._streaming = true; + /** + * End of resync. + */ + + if (error) { continue; } // If the error was EMPTY, we may want to load another batch. + doc_index = batch_start; + } + } +} + +inline void document_stream::next_document() noexcept { + // Go to next place where depth=0 (document depth) + error = doc.iter.skip_child(0); + if (error) { return; } + // Always set depth=1 at the start of document + doc.iter._depth = 1; + // consume comma if comma separated is allowed + if (allow_comma_separated) { doc.iter.consume_character(','); } + // Resets the string buffer at the beginning, thus invalidating the strings. + doc.iter._string_buf_loc = parser->string_buf.get(); + doc.iter._root = doc.iter.position(); +} + +inline size_t document_stream::next_batch_start() const noexcept { + return batch_start + parser->implementation->structural_indexes[parser->implementation->n_structural_indexes]; +} + +inline error_code document_stream::run_stage1(ondemand::parser &p, size_t _batch_start) noexcept { + // This code only updates the structural index in the parser, it does not update any json_iterator + // instance. + size_t remaining = len - _batch_start; + if (remaining <= batch_size) { + return p.implementation->stage1(&buf[_batch_start], remaining, stage1_mode::streaming_final); + } else { + return p.implementation->stage1(&buf[_batch_start], batch_size, stage1_mode::streaming_partial); + } +} + +simdjson_inline size_t document_stream::iterator::current_index() const noexcept { + return stream->doc_index; +} + +simdjson_inline std::string_view document_stream::iterator::source() const noexcept { + auto depth = stream->doc.iter.depth(); + auto cur_struct_index = stream->doc.iter._root - stream->parser->implementation->structural_indexes.get(); + + // If at root, process the first token to determine if scalar value + if (stream->doc.iter.at_root()) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': // Depth=1 already at start of document + break; + case '}': case ']': + depth--; + break; + default: // Scalar value document + // TODO: Remove any trailing whitespaces + // This returns a string spanning from start of value to the beginning of the next document (excluded) + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[++cur_struct_index] - current_index() - 1); + } + cur_struct_index++; + } + + while (cur_struct_index <= static_cast(stream->parser->implementation->n_structural_indexes)) { + switch (stream->buf[stream->batch_start + stream->parser->implementation->structural_indexes[cur_struct_index]]) { + case '{': case '[': + depth++; + break; + case '}': case ']': + depth--; + break; + } + if (depth == 0) { break; } + cur_struct_index++; + } + + return std::string_view(reinterpret_cast(stream->buf) + current_index(), stream->parser->implementation->structural_indexes[cur_struct_index] - current_index() + stream->batch_start + 1);; +} + +inline error_code document_stream::iterator::error() const noexcept { + return stream->error; +} + +#ifdef SIMDJSON_THREADS_ENABLED + +inline void document_stream::load_from_stage1_thread() noexcept { + worker->finish(); + // Swap to the parser that was loaded up in the thread. Make sure the parser has + // enough memory to swap to, as well. + std::swap(stage1_thread_parser,*parser); + error = stage1_thread_error; + if (error) { return; } + + // If there's anything left, start the stage 1 thread! + if (next_batch_start() < len) { + start_stage1_thread(); + } +} + +inline void document_stream::start_stage1_thread() noexcept { + // we call the thread on a lambda that will update + // this->stage1_thread_error + // there is only one thread that may write to this value + // TODO this is NOT exception-safe. + this->stage1_thread_error = UNINITIALIZED; // In case something goes wrong, make sure it's an error + size_t _next_batch_start = this->next_batch_start(); + + worker->run(this, & this->stage1_thread_parser, _next_batch_start); +} + +#endif // SIMDJSON_THREADS_ENABLED + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result::simdjson_result( + westmere::ondemand::document_stream &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} + +} + +#endif // SIMDJSON_GENERIC_ONDEMAND_DOCUMENT_STREAM_INL_H +/* end file simdjson/generic/ondemand/document_stream-inl.h for westmere */ +/* including simdjson/generic/ondemand/field-inl.h for westmere: #include "simdjson/generic/ondemand/field-inl.h" */ +/* begin file simdjson/generic/ondemand/field-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +// clang 6 doesn't think the default constructor can be noexcept, so we make it explicit +simdjson_inline field::field() noexcept : std::pair() {} + +simdjson_inline field::field(raw_json_string key, ondemand::value &&value) noexcept + : std::pair(key, std::forward(value)) +{ +} + +simdjson_inline simdjson_result field::start(value_iterator &parent_iter) noexcept { + raw_json_string key; + SIMDJSON_TRY( parent_iter.field_key().get(key) ); + SIMDJSON_TRY( parent_iter.field_value() ); + return field::start(parent_iter, key); +} + +simdjson_inline simdjson_result field::start(const value_iterator &parent_iter, raw_json_string key) noexcept { + return field(key, parent_iter.child()); +} + +simdjson_inline simdjson_warn_unused simdjson_result field::unescaped_key(bool allow_replacement) noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() but Visual Studio won't let us. + simdjson_result answer = first.unescape(second.iter.json_iter(), allow_replacement); + first.consume(); + return answer; +} + +simdjson_inline raw_json_string field::key() const noexcept { + SIMDJSON_ASSUME(first.buf != nullptr); // We would like to call .alive() by Visual Studio won't let us. + return first; +} + +simdjson_inline value &field::value() & noexcept { + return second; +} + +simdjson_inline value field::value() && noexcept { + return std::forward(*this).second; +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + westmere::ondemand::field &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} + +simdjson_inline simdjson_result simdjson_result::key() noexcept { + if (error()) { return error(); } + return first.key(); +} +simdjson_inline simdjson_result simdjson_result::unescaped_key(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.unescaped_key(allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::value() noexcept { + if (error()) { return error(); } + return std::move(first.value()); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_FIELD_INL_H +/* end file simdjson/generic/ondemand/field-inl.h for westmere */ +/* including simdjson/generic/ondemand/json_iterator-inl.h for westmere: #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/json_iterator-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +simdjson_inline json_iterator::json_iterator(json_iterator &&other) noexcept + : token(std::forward(other.token)), + parser{other.parser}, + _string_buf_loc{other._string_buf_loc}, + error{other.error}, + _depth{other._depth}, + _root{other._root}, + _streaming{other._streaming} +{ + other.parser = nullptr; +} +simdjson_inline json_iterator &json_iterator::operator=(json_iterator &&other) noexcept { + token = other.token; + parser = other.parser; + _string_buf_loc = other._string_buf_loc; + error = other.error; + _depth = other._depth; + _root = other._root; + _streaming = other._streaming; + other.parser = nullptr; + return *this; +} + +simdjson_inline json_iterator::json_iterator(const uint8_t *buf, ondemand::parser *_parser) noexcept + : token(buf, &_parser->implementation->structural_indexes[0]), + parser{_parser}, + _string_buf_loc{parser->string_buf.get()}, + _depth{1}, + _root{parser->implementation->structural_indexes.get()}, + _streaming{false} + +{ + logger::log_headers(); +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif +} + +inline void json_iterator::rewind() noexcept { + token.set_position( root_position() ); + logger::log_headers(); // We start again + _string_buf_loc = parser->string_buf.get(); + _depth = 1; +} + +inline bool json_iterator::balanced() const noexcept { + token_iterator ti(token); + int32_t count{0}; + ti.set_position( root_position() ); + while(ti.peek() <= peek_last()) { + switch (*ti.return_current_and_advance()) + { + case '[': case '{': + count++; + break; + case ']': case '}': + count--; + break; + default: + break; + } + } + return count == 0; +} + + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and parent_depth, which is a desired effect. The warning does not show up if the +// skip_child() function is not marked inline). +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline error_code json_iterator::skip_child(depth_t parent_depth) noexcept { + if (depth() <= parent_depth) { return SUCCESS; } + switch (*return_current_and_advance()) { + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + + // For the first open array/object in a value, we've already incremented depth, so keep it the same + // We never stop at colon, but if we did, it wouldn't affect depth + case '[': case '{': case ':': + logger::log_start_value(*this, "skip"); + break; + // If there is a comma, we have just finished a value in an array/object, and need to get back in + case ',': + logger::log_value(*this, "skip"); + break; + // ] or } means we just finished a value and need to jump out of the array/object + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } +#if SIMDJSON_CHECK_EOF + // If there are no more tokens, the parent is incomplete. + if (at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "Missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + break; + case '"': + if(*peek() == ':') { + // We are at a key!!! + // This might happen if you just started an object and you skip it immediately. + // Performance note: it would be nice to get rid of this check as it is somewhat + // expensive. + // https://github.com/simdjson/simdjson/issues/1742 + logger::log_value(*this, "key"); + return_current_and_advance(); // eat up the ':' + break; // important!!! + } + simdjson_fallthrough; + // Anything else must be a scalar value + default: + // For the first scalar, we will have incremented depth already, so we decrement it here. + logger::log_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + } + + // Now that we've considered the first value, we only increment/decrement for arrays/objects + while (position() < end_position()) { + switch (*return_current_and_advance()) { + case '[': case '{': + logger::log_start_value(*this, "skip"); + _depth++; + break; + // TODO consider whether matching braces is a requirement: if non-matching braces indicates + // *missing* braces, then future lookups are not in the object/arrays they think they are, + // violating the rule "validate enough structure that the user can be confident they are + // looking at the right values." + // PERF TODO we can eliminate the switch here with a lookup of how much to add to depth + case ']': case '}': + logger::log_end_value(*this, "skip"); + _depth--; + if (depth() <= parent_depth) { return SUCCESS; } + break; + default: + logger::log_value(*this, "skip", ""); + break; + } + } + + return report_error(TAPE_ERROR, "not enough close braces"); +} + +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool json_iterator::at_root() const noexcept { + return position() == root_position(); +} + +simdjson_inline bool json_iterator::is_single_token() const noexcept { + return parser->implementation->n_structural_indexes == 1; +} + +simdjson_inline bool json_iterator::streaming() const noexcept { + return _streaming; +} + +simdjson_inline token_position json_iterator::root_position() const noexcept { + return _root; +} + +simdjson_inline void json_iterator::assert_at_document_depth() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +} + +simdjson_inline void json_iterator::assert_at_root() const noexcept { + SIMDJSON_ASSUME( _depth == 1 ); +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + // Under Visual Studio, the next SIMDJSON_ASSUME fails with: the argument + // has side effects that will be discarded. + SIMDJSON_ASSUME( token.position() == _root ); +#endif +} + +simdjson_inline void json_iterator::assert_more_tokens(uint32_t required_tokens) const noexcept { + assert_valid_position(token._position + required_tokens - 1); +} + +simdjson_inline void json_iterator::assert_valid_position(token_position position) const noexcept { +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME( position >= &parser->implementation->structural_indexes[0] ); + SIMDJSON_ASSUME( position < &parser->implementation->structural_indexes[parser->implementation->n_structural_indexes] ); +#endif +} + +simdjson_inline bool json_iterator::at_end() const noexcept { + return position() == end_position(); +} +simdjson_inline token_position json_iterator::end_position() const noexcept { + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + return &parser->implementation->structural_indexes[n_structural_indexes]; +} + +inline std::string json_iterator::to_string() const noexcept { + if( !is_alive() ) { return "dead json_iterator instance"; } + const char * current_structural = reinterpret_cast(token.peek()); + return std::string("json_iterator [ depth : ") + std::to_string(_depth) + + std::string(", structural : '") + std::string(current_structural,1) + + std::string("', offset : ") + std::to_string(token.current_offset()) + + std::string("', error : ") + error_message(error) + + std::string(" ]"); +} + +inline simdjson_result json_iterator::current_location() const noexcept { + if (!is_alive()) { // Unrecoverable error + if (!at_root()) { + return reinterpret_cast(token.peek(-1)); + } else { + return reinterpret_cast(token.peek()); + } + } + if (at_end()) { + return OUT_OF_BOUNDS; + } + return reinterpret_cast(token.peek()); +} + +simdjson_inline bool json_iterator::is_alive() const noexcept { + return parser; +} + +simdjson_inline void json_iterator::abandon() noexcept { + parser = nullptr; + _depth = 0; +} + +simdjson_inline const uint8_t *json_iterator::return_current_and_advance() noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(); +#endif // SIMDJSON_CHECK_EOF + return token.return_current_and_advance(); +} + +simdjson_inline const uint8_t *json_iterator::unsafe_pointer() const noexcept { + // deliberately done without safety guard: + return token.peek(); +} + +simdjson_inline const uint8_t *json_iterator::peek(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // SIMDJSON_CHECK_EOF + return token.peek(delta); +} + +simdjson_inline uint32_t json_iterator::peek_length(int32_t delta) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_more_tokens(delta+1); +#endif // #if SIMDJSON_CHECK_EOF + return token.peek_length(delta); +} + +simdjson_inline const uint8_t *json_iterator::peek(token_position position) const noexcept { + // todo: currently we require end-of-string buffering, but the following + // assert_valid_position should be turned on if/when we lift that condition. + // assert_valid_position(position); + // This is almost surely related to SIMDJSON_CHECK_EOF but given that SIMDJSON_CHECK_EOF + // is ON by default, we have no choice but to disable it for real with a comment. + return token.peek(position); +} + +simdjson_inline uint32_t json_iterator::peek_length(token_position position) const noexcept { +#if SIMDJSON_CHECK_EOF + assert_valid_position(position); +#endif // SIMDJSON_CHECK_EOF + return token.peek_length(position); +} + +simdjson_inline token_position json_iterator::last_position() const noexcept { + // The following line fails under some compilers... + // SIMDJSON_ASSUME(parser->implementation->n_structural_indexes > 0); + // since it has side-effects. + uint32_t n_structural_indexes{parser->implementation->n_structural_indexes}; + SIMDJSON_ASSUME(n_structural_indexes > 0); + return &parser->implementation->structural_indexes[n_structural_indexes - 1]; +} +simdjson_inline const uint8_t *json_iterator::peek_last() const noexcept { + return token.peek(last_position()); +} + +simdjson_inline void json_iterator::ascend_to(depth_t parent_depth) noexcept { + SIMDJSON_ASSUME(parent_depth >= 0 && parent_depth < INT32_MAX - 1); + SIMDJSON_ASSUME(_depth == parent_depth + 1); + _depth = parent_depth; +} + +simdjson_inline void json_iterator::descend_to(depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); + _depth = child_depth; +} + +simdjson_inline depth_t json_iterator::depth() const noexcept { + return _depth; +} + +simdjson_inline uint8_t *&json_iterator::string_buf_loc() noexcept { + return _string_buf_loc; +} + +simdjson_inline error_code json_iterator::report_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error != SUCCESS && _error != UNINITIALIZED && _error != INCORRECT_TYPE && _error != NO_SUCH_FIELD); + logger::log_error(*this, message); + error = _error; + return error; +} + +simdjson_inline token_position json_iterator::position() const noexcept { + return token.position(); +} + +simdjson_inline simdjson_result json_iterator::unescape(raw_json_string in, bool allow_replacement) noexcept { + return parser->unescape(in, _string_buf_loc, allow_replacement); +} + +simdjson_inline simdjson_result json_iterator::unescape_wobbly(raw_json_string in) noexcept { + return parser->unescape_wobbly(in, _string_buf_loc); +} + +simdjson_inline void json_iterator::reenter_child(token_position position, depth_t child_depth) noexcept { + SIMDJSON_ASSUME(child_depth >= 1 && child_depth < INT32_MAX); + SIMDJSON_ASSUME(_depth == child_depth - 1); +#if SIMDJSON_DEVELOPMENT_CHECKS +#ifndef SIMDJSON_CLANG_VISUAL_STUDIO + SIMDJSON_ASSUME(size_t(child_depth) < parser->max_depth()); + SIMDJSON_ASSUME(position >= parser->start_positions[child_depth]); +#endif +#endif + token.set_position(position); + _depth = child_depth; +} + +simdjson_inline error_code json_iterator::consume_character(char c) noexcept { + if (*peek() == c) { + return_current_and_advance(); + return SUCCESS; + } + return TAPE_ERROR; +} + +#if SIMDJSON_DEVELOPMENT_CHECKS + +simdjson_inline token_position json_iterator::start_position(depth_t depth) const noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + return size_t(depth) < parser->max_depth() ? parser->start_positions[depth] : 0; +} + +simdjson_inline void json_iterator::set_start_position(depth_t depth, token_position position) noexcept { + SIMDJSON_ASSUME(size_t(depth) < parser->max_depth()); + if(size_t(depth) < parser->max_depth()) { parser->start_positions[depth] = position; } +} + +#endif + + +simdjson_inline error_code json_iterator::optional_error(error_code _error, const char *message) noexcept { + SIMDJSON_ASSUME(_error == INCORRECT_TYPE || _error == NO_SUCH_FIELD); + logger::log_error(*this, message); + return _error; +} + + +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 { + // This function is not expected to be called in performance-sensitive settings. + // Let us guard against silly cases: + if((N < max_len) || (N == 0)) { return false; } + // Copy to the buffer. + std::memcpy(tmpbuf, json, max_len); + if(N > max_len) { // We pad whatever remains with ' '. + std::memset(tmpbuf + max_len, ' ', N - max_len); + } + return true; +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(westmere::ondemand::json_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/json_iterator-inl.h for westmere */ +/* including simdjson/generic/ondemand/json_type-inl.h for westmere: #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* begin file simdjson/generic/ondemand/json_type-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +inline std::ostream& operator<<(std::ostream& out, json_type type) noexcept { + switch (type) { + case json_type::array: out << "array"; break; + case json_type::object: out << "object"; break; + case json_type::number: out << "number"; break; + case json_type::string: out << "string"; break; + case json_type::boolean: out << "boolean"; break; + case json_type::null: out << "null"; break; + default: SIMDJSON_UNREACHABLE(); + } + return out; +} + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson_result &type) noexcept(false) { + return out << type.value(); +} +#endif + + + +simdjson_inline number_type number::get_number_type() const noexcept { + return type; +} + +simdjson_inline bool number::is_uint64() const noexcept { + return get_number_type() == number_type::unsigned_integer; +} + +simdjson_inline uint64_t number::get_uint64() const noexcept { + return payload.unsigned_integer; +} + +simdjson_inline number::operator uint64_t() const noexcept { + return get_uint64(); +} + + +simdjson_inline bool number::is_int64() const noexcept { + return get_number_type() == number_type::signed_integer; +} + +simdjson_inline int64_t number::get_int64() const noexcept { + return payload.signed_integer; +} + +simdjson_inline number::operator int64_t() const noexcept { + return get_int64(); +} + +simdjson_inline bool number::is_double() const noexcept { + return get_number_type() == number_type::floating_point_number; +} + +simdjson_inline double number::get_double() const noexcept { + return payload.floating_point_number; +} + +simdjson_inline number::operator double() const noexcept { + return get_double(); +} + +simdjson_inline double number::as_double() const noexcept { + if(is_double()) { + return payload.floating_point_number; + } + if(is_int64()) { + return double(payload.signed_integer); + } + return double(payload.unsigned_integer); +} + +simdjson_inline void number::append_s64(int64_t value) noexcept { + payload.signed_integer = value; + type = number_type::signed_integer; +} + +simdjson_inline void number::append_u64(uint64_t value) noexcept { + payload.unsigned_integer = value; + type = number_type::unsigned_integer; +} + +simdjson_inline void number::append_double(double value) noexcept { + payload.floating_point_number = value; + type = number_type::floating_point_number; +} + +simdjson_inline void number::skip_double() noexcept { + type = number_type::floating_point_number; +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(westmere::ondemand::json_type &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_JSON_TYPE_INL_H +/* end file simdjson/generic/ondemand/json_type-inl.h for westmere */ +/* including simdjson/generic/ondemand/logger-inl.h for westmere: #include "simdjson/generic/ondemand/logger-inl.h" */ +/* begin file simdjson/generic/ondemand/logger-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/logger.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#include +#include + +namespace simdjson { +namespace westmere { +namespace ondemand { +namespace logger { + +static constexpr const char * DASHES = "----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"; +static constexpr const int LOG_EVENT_LEN = 20; +static constexpr const int LOG_BUFFER_LEN = 30; +static constexpr const int LOG_SMALL_BUFFER_LEN = 10; +static int log_depth = 0; // Not threadsafe. Log only. + +// Helper to turn unprintable or newline characters into spaces +static inline char printable_char(char c) { + if (c >= 0x20) { + return c; + } else { + return ' '; + } +} + +template +static inline std::string string_format(const std::string& format, const Args&... args) +{ + SIMDJSON_PUSH_DISABLE_ALL_WARNINGS + int size_s = std::snprintf(nullptr, 0, format.c_str(), args...) + 1; + auto size = static_cast(size_s); + if (size <= 0) return std::string(); + std::unique_ptr buf(new char[size]); + std::snprintf(buf.get(), size, format.c_str(), args...); + SIMDJSON_POP_DISABLE_WARNINGS + return std::string(buf.get(), buf.get() + size - 1); +} + +static inline log_level get_log_level_from_env() +{ + SIMDJSON_PUSH_DISABLE_WARNINGS + SIMDJSON_DISABLE_DEPRECATED_WARNING // Disable CRT_SECURE warning on MSVC: manually verified this is safe + char *lvl = getenv("SIMDJSON_LOG_LEVEL"); + SIMDJSON_POP_DISABLE_WARNINGS + if (lvl && simdjson_strcasecmp(lvl, "ERROR") == 0) { return log_level::error; } + return log_level::info; +} + +static inline log_level log_threshold() +{ + static log_level threshold = get_log_level_from_env(); + return threshold; +} + +static inline bool should_log(log_level level) +{ + return level >= log_threshold(); +} + +inline void log_event(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "", type, detail, log_level::info); +} +inline void log_value(const json_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_line(iter, "", type, detail, delta, depth_delta, log_level::info); +} + +inline void log_start_value(const json_iterator &iter, token_position index, depth_t depth, const char *type, std::string_view detail) noexcept { + log_line(iter, index, depth, "+", type, detail, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} +inline void log_start_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_line(iter, "+", type, "", delta, depth_delta, log_level::info); + if (LOG_ENABLED) { log_depth++; } +} + +inline void log_end_value(const json_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + if (LOG_ENABLED) { log_depth--; } + log_line(iter, "-", type, "", delta, depth_delta, log_level::info); +} + +inline void log_error(const json_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_line(iter, "ERROR: ", error, detail, delta, depth_delta, log_level::error); +} +inline void log_error(const json_iterator &iter, token_position index, depth_t depth, const char *error, const char *detail) noexcept { + log_line(iter, index, depth, "ERROR: ", error, detail, log_level::error); +} + +inline void log_event(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_event(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_value(const value_iterator &iter, const char *type, std::string_view detail, int delta, int depth_delta) noexcept { + log_value(iter.json_iter(), type, detail, delta, depth_delta); +} + +inline void log_start_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_start_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_end_value(const value_iterator &iter, const char *type, int delta, int depth_delta) noexcept { + log_end_value(iter.json_iter(), type, delta, depth_delta); +} + +inline void log_error(const value_iterator &iter, const char *error, const char *detail, int delta, int depth_delta) noexcept { + log_error(iter.json_iter(), error, detail, delta, depth_delta); +} + +inline void log_headers() noexcept { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(log_level::info))) { + // Technically a static variable is not thread-safe, but if you are using threads and logging... well... + static bool displayed_hint{false}; + log_depth = 0; + printf("\n"); + if (!displayed_hint) { + // We only print this helpful header once. + printf("# Logging provides the depth and position of the iterator user-visible steps:\n"); + printf("# +array says 'this is where we were when we discovered the start array'\n"); + printf( + "# -array says 'this is where we were when we ended the array'\n"); + printf("# skip says 'this is a structural or value I am skipping'\n"); + printf("# +/-skip says 'this is a start/end array or object I am skipping'\n"); + printf("#\n"); + printf("# The indentation of the terms (array, string,...) indicates the depth,\n"); + printf("# in addition to the depth being displayed.\n"); + printf("#\n"); + printf("# Every token in the document has a single depth determined by the tokens before it,\n"); + printf("# and is not affected by what the token actually is.\n"); + printf("#\n"); + printf("# Not all structural elements are presented as tokens in the logs.\n"); + printf("#\n"); + printf("# We never give control to the user within an empty array or an empty object.\n"); + printf("#\n"); + printf("# Inside an array, having a depth greater than the array's depth means that\n"); + printf("# we are pointing inside a value.\n"); + printf("# Having a depth equal to the array means that we are pointing right before a value.\n"); + printf("# Having a depth smaller than the array means that we have moved beyond the array.\n"); + displayed_hint = true; + } + printf("\n"); + printf("| %-*s ", LOG_EVENT_LEN, "Event"); + printf("| %-*s ", LOG_BUFFER_LEN, "Buffer"); + printf("| %-*s ", LOG_SMALL_BUFFER_LEN, "Next"); + // printf("| %-*s ", 5, "Next#"); + printf("| %-*s ", 5, "Depth"); + printf("| Detail "); + printf("|\n"); + + printf("|%.*s", LOG_EVENT_LEN + 2, DASHES); + printf("|%.*s", LOG_BUFFER_LEN + 2, DASHES); + printf("|%.*s", LOG_SMALL_BUFFER_LEN + 2, DASHES); + // printf("|%.*s", 5+2, DASHES); + printf("|%.*s", 5 + 2, DASHES); + printf("|--------"); + printf("|\n"); + fflush(stdout); + } + } +} + +template +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 { + log_line(iter, iter.position()+delta, depth_t(iter.depth()+depth_delta), title_prefix, title, detail, level, std::forward(args)...); +} + +template +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 { + if (LOG_ENABLED) { + if (simdjson_unlikely(should_log(level))) { + const int indent = depth * 2; + const auto buf = iter.token.buf; + auto msg = string_format(title, std::forward(args)...); + printf("| %*s%s%-*s ", indent, "", title_prefix, + LOG_EVENT_LEN - indent - int(strlen(title_prefix)), msg.c_str()); + { + // Print the current structural. + printf("| "); + // Before we begin, the index might point right before the document. + // This could be unsafe, see https://github.com/simdjson/simdjson/discussions/1938 + if (index < iter._root) { + printf("%*s", LOG_BUFFER_LEN, ""); + } else { + auto current_structural = &buf[*index]; + for (int i = 0; i < LOG_BUFFER_LEN; i++) { + printf("%c", printable_char(current_structural[i])); + } + } + printf(" "); + } + { + // Print the next structural. + printf("| "); + auto next_structural = &buf[*(index + 1)]; + for (int i = 0; i < LOG_SMALL_BUFFER_LEN; i++) { + printf("%c", printable_char(next_structural[i])); + } + printf(" "); + } + // printf("| %5u ", *(index+1)); + printf("| %5i ", depth); + printf("| %6.*s ", int(detail.size()), detail.data()); + printf("|\n"); + fflush(stdout); + } + } +} + +} // namespace logger +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_LOGGER_INL_H +/* end file simdjson/generic/ondemand/logger-inl.h for westmere */ +/* including simdjson/generic/ondemand/object-inl.h for westmere: #include "simdjson/generic/ondemand/object-inl.h" */ +/* begin file simdjson/generic/ondemand/object-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field_unordered(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_unordered_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) & noexcept { + return find_field_unordered(key); +} +simdjson_inline simdjson_result object::operator[](const std::string_view key) && noexcept { + return std::forward(*this).find_field_unordered(key); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) & noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} +simdjson_inline simdjson_result object::find_field(const std::string_view key) && noexcept { + bool has_value; + SIMDJSON_TRY( iter.find_field_raw(key).get(has_value) ); + if (!has_value) { + logger::log_line(iter.json_iter(), "ERROR: ", "Cannot find key %.*s", "", -1, 0, logger::log_level::error, static_cast(key.size()), key.data()); + return NO_SUCH_FIELD; + } + return value(iter.child()); +} + +simdjson_inline simdjson_result object::start(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_object().error() ); + return object(iter); +} +simdjson_inline simdjson_result object::start_root(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.start_root_object().error() ); + return object(iter); +} +simdjson_inline error_code object::consume() noexcept { + if(iter.is_at_key()) { + /** + * 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. + */ + simdjson_unused raw_json_string actual_key; + auto error = iter.field_key().get(actual_key); + if (error) { iter.abandon(); return error; }; + // Let us move to the value while we are at it. + if ((error = iter.field_value())) { iter.abandon(); return error; } + } + auto error_skip = iter.json_iter().skip_child(iter.depth()-1); + if(error_skip) { iter.abandon(); } + return error_skip; +} + +simdjson_inline simdjson_result object::raw_json() noexcept { + const uint8_t * starting_point{iter.peek_start()}; + auto error = consume(); + if(error) { return error; } + const uint8_t * final_point{iter._json_iter->peek()}; + return std::string_view(reinterpret_cast(starting_point), size_t(final_point - starting_point)); +} + +simdjson_inline simdjson_result object::started(value_iterator &iter) noexcept { + SIMDJSON_TRY( iter.started_object().error() ); + return object(iter); +} + +simdjson_inline object object::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline object::object(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} + +simdjson_inline simdjson_result object::begin() noexcept { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!iter.is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + return object_iterator(iter); +} +simdjson_inline simdjson_result object::end() noexcept { + return object_iterator(iter); +} + +inline simdjson_result object::at_pointer(std::string_view json_pointer) noexcept { + if (json_pointer[0] != '/') { return INVALID_JSON_POINTER; } + json_pointer = json_pointer.substr(1); + size_t slash = json_pointer.find('/'); + std::string_view key = json_pointer.substr(0, slash); + // Grab the child with the given key + simdjson_result child; + + // If there is an escape character in the key, unescape it and then get the child. + size_t escape = key.find('~'); + if (escape != std::string_view::npos) { + // Unescape the key + std::string unescaped(key); + do { + switch (unescaped[escape+1]) { + case '0': + unescaped.replace(escape, 2, "~"); + break; + case '1': + unescaped.replace(escape, 2, "/"); + break; + default: + return INVALID_JSON_POINTER; // "Unexpected ~ escape character in JSON pointer"); + } + escape = unescaped.find('~', escape+1); + } while (escape != std::string::npos); + child = find_field(unescaped); // Take note find_field does not unescape keys when matching + } else { + child = find_field(key); + } + if(child.error()) { + return child; // we do not continue if there was an error + } + // If there is a /, we have to recurse and look up more of the path + if (slash != std::string_view::npos) { + child = child.at_pointer(json_pointer.substr(slash)); + } + return child; +} + +simdjson_inline simdjson_result object::count_fields() & noexcept { + size_t count{0}; + // Important: we do not consume any of the values. + for(simdjson_unused auto v : *this) { count++; } + // The above loop will always succeed, but we want to report errors. + if(iter.error()) { return iter.error(); } + // We need to move back at the start because we expect users to iterate through + // the object after counting the number of elements. + iter.reset_object(); + return count; +} + +simdjson_inline simdjson_result object::is_empty() & noexcept { + bool is_not_empty; + auto error = iter.reset_object().get(is_not_empty); + if(error) { return error; } + return !is_not_empty; +} + +simdjson_inline simdjson_result object::reset() & noexcept { + return iter.reset_object(); +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(westmere::ondemand::object &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::begin() noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() noexcept { + if (error()) { return error(); } + return first.end(); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) & noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first)[key]; +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) & noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) && noexcept { + if (error()) { return error(); } + return std::forward(first).find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +inline simdjson_result simdjson_result::reset() noexcept { + if (error()) { return error(); } + return first.reset(); +} + +inline simdjson_result simdjson_result::is_empty() noexcept { + if (error()) { return error(); } + return first.is_empty(); +} + +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_INL_H +/* end file simdjson/generic/ondemand/object-inl.h for westmere */ +/* including simdjson/generic/ondemand/object_iterator-inl.h for westmere: #include "simdjson/generic/ondemand/object_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/object_iterator-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/field-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +// +// object_iterator +// + +simdjson_inline object_iterator::object_iterator(const value_iterator &_iter) noexcept + : iter{_iter} +{} + +simdjson_inline simdjson_result object_iterator::operator*() noexcept { + error_code error = iter.error(); + if (error) { iter.abandon(); return error; } + auto result = field::start(iter); + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (result.error()) { iter.abandon(); } + return result; +} +simdjson_inline bool object_iterator::operator==(const object_iterator &other) const noexcept { + return !(*this != other); +} +simdjson_inline bool object_iterator::operator!=(const object_iterator &) const noexcept { + return iter.is_open(); +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline object_iterator &object_iterator::operator++() noexcept { + // TODO this is a safety rail ... users should exit loops as soon as they receive an error. + // Nonetheless, let's see if performance is OK with this if statement--the compiler may give it to us for free. + if (!iter.is_open()) { return *this; } // Iterator will be released if there is an error + + simdjson_unused error_code error; + if ((error = iter.skip_child() )) { return *this; } + + simdjson_unused bool has_value; + if ((error = iter.has_next_field().get(has_value) )) { return *this; }; + return *this; +} +SIMDJSON_POP_DISABLE_WARNINGS + +// +// ### Live States +// +// While iterating or looking up values, depth >= iter.depth. at_start may vary. Error is +// always SUCCESS: +// +// - Start: This is the state when the object is first found and the iterator is just past the {. +// In this state, at_start == true. +// - Next: After we hand a scalar value to the user, or an array/object which they then fully +// iterate over, the iterator is at the , or } before the next value. In this state, +// depth == iter.depth, at_start == false, and error == SUCCESS. +// - Unfinished Business: When we hand an array/object to the user which they do not fully +// iterate over, we need to finish that iteration by skipping child values until we reach the +// Next state. In this state, depth > iter.depth, at_start == false, and error == SUCCESS. +// +// ## Error States +// +// In error states, we will yield exactly one more value before stopping. iter.depth == depth +// and at_start is always false. We decrement after yielding the error, moving to the Finished +// state. +// +// - Chained Error: When the object iterator is part of an error chain--for example, in +// `for (auto tweet : doc["tweets"])`, where the tweet field may be missing or not be an +// object--we yield that error in the loop, exactly once. In this state, error != SUCCESS and +// iter.depth == depth, and at_start == false. We decrement depth when we yield the error. +// - Missing Comma Error: When the iterator ++ method discovers there is no comma between fields, +// we flag that as an error and treat it exactly the same as a Chained Error. In this state, +// error == TAPE_ERROR, iter.depth == depth, and at_start == false. +// +// Errors that occur while reading a field to give to the user (such as when the key is not a +// string or the field is missing a colon) are yielded immediately. Depth is then decremented, +// moving to the Finished state without transitioning through an Error state at all. +// +// ## Terminal State +// +// The terminal state has iter.depth < depth. at_start is always false. +// +// - Finished: When we have reached a }, we are finished. We signal this by decrementing depth. +// In this state, iter.depth < depth, at_start == false, and error == SUCCESS. +// + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + westmere::ondemand::object_iterator &&value +) noexcept + : implementation_simdjson_result_base(std::forward(value)) +{ + first.iter.assert_is_valid(); +} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base({}, error) +{ +} + +simdjson_inline simdjson_result simdjson_result::operator*() noexcept { + if (error()) { return error(); } + return *first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator==(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return !error(); } + return first == other.first; +} +// If we're iterating and there is an error, return the error once. +simdjson_inline bool simdjson_result::operator!=(const simdjson_result &other) const noexcept { + if (!first.iter.is_valid()) { return error(); } + return first != other.first; +} +// Checks for ']' and ',' +simdjson_inline simdjson_result &simdjson_result::operator++() noexcept { + // Clear the error if there is one, so we don't yield it twice + if (error()) { second = SUCCESS; return *this; } + ++first; + return *this; +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_OBJECT_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/object_iterator-inl.h for westmere */ +/* including simdjson/generic/ondemand/parser-inl.h for westmere: #include "simdjson/generic/ondemand/parser-inl.h" */ +/* begin file simdjson/generic/ondemand/parser-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/padded_string_view.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/internal/dom_parser_implementation.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/dom/base.h" // for MINIMAL_DOCUMENT_CAPACITY */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document_stream.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/parser.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +simdjson_inline parser::parser(size_t max_capacity) noexcept + : _max_capacity{max_capacity} { +} + +simdjson_warn_unused simdjson_inline error_code parser::allocate(size_t new_capacity, size_t new_max_depth) noexcept { + if (new_capacity > max_capacity()) { return CAPACITY; } + if (string_buf && new_capacity == capacity() && new_max_depth == max_depth()) { return SUCCESS; } + + // string_capacity copied from document::allocate + _capacity = 0; + size_t string_capacity = SIMDJSON_ROUNDUP_N(5 * new_capacity / 3 + SIMDJSON_PADDING, 64); + string_buf.reset(new (std::nothrow) uint8_t[string_capacity]); +#if SIMDJSON_DEVELOPMENT_CHECKS + start_positions.reset(new (std::nothrow) token_position[new_max_depth]); +#endif + if (implementation) { + SIMDJSON_TRY( implementation->set_capacity(new_capacity) ); + SIMDJSON_TRY( implementation->set_max_depth(new_max_depth) ); + } else { + SIMDJSON_TRY( simdjson::get_active_implementation()->create_dom_parser_implementation(new_capacity, new_max_depth, implementation) ); + } + _capacity = new_capacity; + _max_depth = new_max_depth; + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length() || !string_buf) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return document::start({ reinterpret_cast(json.data()), this }); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const char *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const uint8_t *json, size_t len, size_t allocated) & noexcept { + return iterate(padded_string_view(json, len, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string_view json, size_t allocated) & noexcept { + return iterate(padded_string_view(json, allocated)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(std::string &json) & noexcept { + if(json.capacity() - json.size() < SIMDJSON_PADDING) { + json.reserve(json.size() + SIMDJSON_PADDING); + } + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const std::string &json) & noexcept { + return iterate(padded_string_view(json)); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + padded_string_view json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate(const simdjson_result &result) & noexcept { + // We don't presently have a way to temporarily get a const T& from a simdjson_result without throwing an exception + SIMDJSON_TRY( result.error() ); + const padded_string &json = result.value_unsafe(); + return iterate(json); +} + +simdjson_warn_unused simdjson_inline simdjson_result parser::iterate_raw(padded_string_view json) & noexcept { + if (json.padding() < SIMDJSON_PADDING) { return INSUFFICIENT_PADDING; } + + json.remove_utf8_bom(); + + // Allocate if needed + if (capacity() < json.length()) { + SIMDJSON_TRY( allocate(json.length(), max_depth()) ); + } + + // Run stage 1. + SIMDJSON_TRY( implementation->stage1(reinterpret_cast(json.data()), json.length(), stage1_mode::regular) ); + return json_iterator(reinterpret_cast(json.data()), this); +} + +inline simdjson_result parser::iterate_many(const uint8_t *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + if(batch_size < MINIMAL_BATCH_SIZE) { batch_size = MINIMAL_BATCH_SIZE; } + if((len >= 3) && (std::memcmp(buf, "\xEF\xBB\xBF", 3) == 0)) { + buf += 3; + len -= 3; + } + if(allow_comma_separated && batch_size < len) { batch_size = len; } + return document_stream(*this, buf, len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const char *buf, size_t len, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(reinterpret_cast(buf), len, batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const std::string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} +inline simdjson_result parser::iterate_many(const padded_string &s, size_t batch_size, bool allow_comma_separated) noexcept { + return iterate_many(s.data(), s.length(), batch_size, allow_comma_separated); +} + +simdjson_inline size_t parser::capacity() const noexcept { + return _capacity; +} +simdjson_inline size_t parser::max_capacity() const noexcept { + return _max_capacity; +} +simdjson_inline size_t parser::max_depth() const noexcept { + return _max_depth; +} + +simdjson_inline void parser::set_max_capacity(size_t max_capacity) noexcept { + if(max_capacity < dom::MINIMAL_DOCUMENT_CAPACITY) { + _max_capacity = max_capacity; + } else { + _max_capacity = dom::MINIMAL_DOCUMENT_CAPACITY; + } +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape(raw_json_string in, uint8_t *&dst, bool allow_replacement) const noexcept { + uint8_t *end = implementation->parse_string(in.buf, dst, allow_replacement); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +simdjson_inline simdjson_warn_unused simdjson_result parser::unescape_wobbly(raw_json_string in, uint8_t *&dst) const noexcept { + uint8_t *end = implementation->parse_wobbly_string(in.buf, dst); + if (!end) { return STRING_ERROR; } + std::string_view result(reinterpret_cast(dst), end-dst); + dst = end; + return result; +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(westmere::ondemand::parser &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_PARSER_INL_H +/* end file simdjson/generic/ondemand/parser-inl.h for westmere */ +/* including simdjson/generic/ondemand/raw_json_string-inl.h for westmere: #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* begin file simdjson/generic/ondemand/raw_json_string-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +namespace westmere { +namespace ondemand { + +simdjson_inline raw_json_string::raw_json_string(const uint8_t * _buf) noexcept : buf{_buf} {} + +simdjson_inline const char * raw_json_string::raw() const noexcept { return reinterpret_cast(buf); } + + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(std::string_view target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;pos < target.size() && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;pos < target.size();pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + +simdjson_inline bool raw_json_string::is_free_from_unescaped_quote(const char* target) noexcept { + size_t pos{0}; + // if the content has no escape character, just scan through it quickly! + for(;target[pos] && target[pos] != '\\';pos++) {} + // slow path may begin. + bool escaping{false}; + for(;target[pos];pos++) { + if((target[pos] == '"') && !escaping) { + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(size_t length, std::string_view target) const noexcept { + // If we are going to call memcmp, then we must know something about the length of the raw_json_string. + return (length >= target.size()) && (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); +} + +simdjson_inline bool raw_json_string::unsafe_is_equal(std::string_view target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + if(target.size() <= SIMDJSON_PADDING) { + return (raw()[target.size()] == '"') && !memcmp(raw(), target.data(), target.size()); + } + const char * r{raw()}; + size_t pos{0}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(std::string_view target) const noexcept { + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;pos < target.size();pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + + +simdjson_inline bool raw_json_string::unsafe_is_equal(const char * target) const noexcept { + // Assumptions: 'target' does not contain unescaped quote characters, is null terminated and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_inline bool raw_json_string::is_equal(const char* target) const noexcept { + // Assumptions: does not contain unescaped quote characters, and + // the raw content is quote terminated within a valid JSON string. + const char * r{raw()}; + size_t pos{0}; + bool escaping{false}; + for(;target[pos];pos++) { + if(r[pos] != target[pos]) { return false; } + // if target is a compile-time constant and it is free from + // quotes, then the next part could get optimized away through + // inlining. + if((target[pos] == '"') && !escaping) { + // We have reached the end of the raw_json_string but + // the target is not done. + return false; + } else if(target[pos] == '\\') { + escaping = !escaping; + } else { + escaping = false; + } + } + if(r[pos] != '"') { return false; } + return true; +} + +simdjson_unused simdjson_inline bool operator==(const raw_json_string &a, std::string_view c) noexcept { + return a.unsafe_is_equal(c); +} + +simdjson_unused simdjson_inline bool operator==(std::string_view c, const raw_json_string &a) noexcept { + return a == c; +} + +simdjson_unused simdjson_inline bool operator!=(const raw_json_string &a, std::string_view c) noexcept { + return !(a == c); +} + +simdjson_unused simdjson_inline bool operator!=(std::string_view c, const raw_json_string &a) noexcept { + return !(a == c); +} + + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape(json_iterator &iter, bool allow_replacement) const noexcept { + return iter.unescape(*this, allow_replacement); +} + +simdjson_inline simdjson_warn_unused simdjson_result raw_json_string::unescape_wobbly(json_iterator &iter) const noexcept { + return iter.unescape_wobbly(*this); +} + +simdjson_unused simdjson_inline std::ostream &operator<<(std::ostream &out, const raw_json_string &str) noexcept { + bool in_escape = false; + const char *s = str.raw(); + while (true) { + switch (*s) { + case '\\': in_escape = !in_escape; break; + case '"': if (in_escape) { in_escape = false; } else { return out; } break; + default: if (in_escape) { in_escape = false; } + } + out << *s; + s++; + } +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(westmere::ondemand::raw_json_string &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +simdjson_inline simdjson_result simdjson_result::raw() const noexcept { + if (error()) { return error(); } + return first.raw(); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape(westmere::ondemand::json_iterator &iter, bool allow_replacement) const noexcept { + if (error()) { return error(); } + return first.unescape(iter, allow_replacement); +} +simdjson_inline simdjson_warn_unused simdjson_result simdjson_result::unescape_wobbly(westmere::ondemand::json_iterator &iter) const noexcept { + if (error()) { return error(); } + return first.unescape_wobbly(iter); +} +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_RAW_JSON_STRING_INL_H +/* end file simdjson/generic/ondemand/raw_json_string-inl.h for westmere */ +/* including simdjson/generic/ondemand/serialization-inl.h for westmere: #include "simdjson/generic/ondemand/serialization-inl.h" */ +/* begin file simdjson/generic/ondemand/serialization-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/document-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/serialization.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { + +inline std::string_view trim(const std::string_view str) noexcept { + // We can almost surely do better by rolling our own find_first_not_of function. + size_t first = str.find_first_not_of(" \t\n\r"); + // If we have the empty string (just white space), then no trimming is possible, and + // we return the empty string_view. + if (std::string_view::npos == first) { return std::string_view(); } + size_t last = str.find_last_not_of(" \t\n\r"); + return str.substr(first, (last - first + 1)); +} + + +inline simdjson_result to_json_string(westmere::ondemand::document& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(westmere::ondemand::document_reference& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(westmere::ondemand::value& x) noexcept { + /** + * 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. + */ + using namespace westmere::ondemand; + westmere::ondemand::json_type t; + auto error = x.type().get(t); + if(error != SUCCESS) { return error; } + switch (t) + { + case json_type::array: + { + westmere::ondemand::array array; + error = x.get_array().get(array); + if(error) { return error; } + return to_json_string(array); + } + case json_type::object: + { + westmere::ondemand::object object; + error = x.get_object().get(object); + if(error) { return error; } + return to_json_string(object); + } + default: + return trim(x.raw_json_token()); + } +} + +inline simdjson_result to_json_string(westmere::ondemand::object& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(westmere::ondemand::array& x) noexcept { + std::string_view v; + auto error = x.raw_json().get(v); + if(error) {return error; } + return trim(v); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} + +inline simdjson_result to_json_string(simdjson_result x) { + if (x.error()) { return x.error(); } + return to_json_string(x.value_unsafe()); +} +} // namespace simdjson + +namespace simdjson { namespace westmere { namespace ondemand { + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::value x) { + std::string_view v; + auto error = simdjson::to_json_string(x).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::array value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::document_reference& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result&& x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::document& value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif + +#if SIMDJSON_EXCEPTIONS +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + throw simdjson::simdjson_error(error); + } +} +inline std::ostream& operator<<(std::ostream& out, simdjson::simdjson_result x) { + if (x.error()) { throw simdjson::simdjson_error(x.error()); } + return (out << x.value()); +} +#else +inline std::ostream& operator<<(std::ostream& out, simdjson::westmere::ondemand::object value) { + std::string_view v; + auto error = simdjson::to_json_string(value).get(v); + if(error == simdjson::SUCCESS) { + return (out << v); + } else { + return (out << error); + } +} +#endif +}}} // namespace simdjson::westmere::ondemand + +#endif // SIMDJSON_GENERIC_ONDEMAND_SERIALIZATION_INL_H +/* end file simdjson/generic/ondemand/serialization-inl.h for westmere */ +/* including simdjson/generic/ondemand/token_iterator-inl.h for westmere: #include "simdjson/generic/ondemand/token_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/token_iterator-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/token_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/implementation_simdjson_result_base-inl.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +simdjson_inline token_iterator::token_iterator( + const uint8_t *_buf, + token_position position +) noexcept : buf{_buf}, _position{position} +{ +} + +simdjson_inline uint32_t token_iterator::current_offset() const noexcept { + return *(_position); +} + + +simdjson_inline const uint8_t *token_iterator::return_current_and_advance() noexcept { + return &buf[*(_position++)]; +} + +simdjson_inline const uint8_t *token_iterator::peek(token_position position) const noexcept { + return &buf[*position]; +} +simdjson_inline uint32_t token_iterator::peek_index(token_position position) const noexcept { + return *position; +} +simdjson_inline uint32_t token_iterator::peek_length(token_position position) const noexcept { + return *(position+1) - *position; +} + +simdjson_inline const uint8_t *token_iterator::peek(int32_t delta) const noexcept { + return &buf[*(_position+delta)]; +} +simdjson_inline uint32_t token_iterator::peek_index(int32_t delta) const noexcept { + return *(_position+delta); +} +simdjson_inline uint32_t token_iterator::peek_length(int32_t delta) const noexcept { + return *(_position+delta+1) - *(_position+delta); +} + +simdjson_inline token_position token_iterator::position() const noexcept { + return _position; +} +simdjson_inline void token_iterator::set_position(token_position target_position) noexcept { + _position = target_position; +} + +simdjson_inline bool token_iterator::operator==(const token_iterator &other) const noexcept { + return _position == other._position; +} +simdjson_inline bool token_iterator::operator!=(const token_iterator &other) const noexcept { + return _position != other._position; +} +simdjson_inline bool token_iterator::operator>(const token_iterator &other) const noexcept { + return _position > other._position; +} +simdjson_inline bool token_iterator::operator>=(const token_iterator &other) const noexcept { + return _position >= other._position; +} +simdjson_inline bool token_iterator::operator<(const token_iterator &other) const noexcept { + return _position < other._position; +} +simdjson_inline bool token_iterator::operator<=(const token_iterator &other) const noexcept { + return _position <= other._position; +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(westmere::ondemand::token_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_TOKEN_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/token_iterator-inl.h for westmere */ +/* including simdjson/generic/ondemand/value-inl.h for westmere: #include "simdjson/generic/ondemand/value-inl.h" */ +/* begin file simdjson/generic/ondemand/value-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/array_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/object.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +simdjson_inline value::value(const value_iterator &_iter) noexcept + : iter{_iter} +{ +} +simdjson_inline value value::start(const value_iterator &iter) noexcept { + return iter; +} +simdjson_inline value value::resume(const value_iterator &iter) noexcept { + return iter; +} + +simdjson_inline simdjson_result value::get_array() noexcept { + return array::start(iter); +} +simdjson_inline simdjson_result value::get_object() noexcept { + return object::start(iter); +} +simdjson_inline simdjson_result value::start_or_resume_object() noexcept { + if (iter.at_start()) { + return get_object(); + } else { + return object::resume(iter); + } +} + +simdjson_inline simdjson_result value::get_raw_json_string() noexcept { + return iter.get_raw_json_string(); +} +simdjson_inline simdjson_result value::get_string(bool allow_replacement) noexcept { + return iter.get_string(allow_replacement); +} +template +simdjson_inline error_code value::get_string(string_type& receiver, bool allow_replacement) noexcept { + return iter.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result value::get_wobbly_string() noexcept { + return iter.get_wobbly_string(); +} +simdjson_inline simdjson_result value::get_double() noexcept { + return iter.get_double(); +} +simdjson_inline simdjson_result value::get_double_in_string() noexcept { + return iter.get_double_in_string(); +} +simdjson_inline simdjson_result value::get_uint64() noexcept { + return iter.get_uint64(); +} +simdjson_inline simdjson_result value::get_uint64_in_string() noexcept { + return iter.get_uint64_in_string(); +} +simdjson_inline simdjson_result value::get_int64() noexcept { + return iter.get_int64(); +} +simdjson_inline simdjson_result value::get_int64_in_string() noexcept { + return iter.get_int64_in_string(); +} +simdjson_inline simdjson_result value::get_bool() noexcept { + return iter.get_bool(); +} +simdjson_inline simdjson_result value::is_null() noexcept { + return iter.is_null(); +} +template<> simdjson_inline simdjson_result value::get() noexcept { return get_array(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_object(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_raw_json_string(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_string(false); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_number(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_double(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_uint64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_int64(); } +template<> simdjson_inline simdjson_result value::get() noexcept { return get_bool(); } + +template simdjson_inline error_code value::get(T &out) noexcept { + return get().get(out); +} + +#if SIMDJSON_EXCEPTIONS +simdjson_inline value::operator array() noexcept(false) { + return get_array(); +} +simdjson_inline value::operator object() noexcept(false) { + return get_object(); +} +simdjson_inline value::operator uint64_t() noexcept(false) { + return get_uint64(); +} +simdjson_inline value::operator int64_t() noexcept(false) { + return get_int64(); +} +simdjson_inline value::operator double() noexcept(false) { + return get_double(); +} +simdjson_inline value::operator std::string_view() noexcept(false) { + return get_string(false); +} +simdjson_inline value::operator raw_json_string() noexcept(false) { + return get_raw_json_string(); +} +simdjson_inline value::operator bool() noexcept(false) { + return get_bool(); +} +#endif + +simdjson_inline simdjson_result value::begin() & noexcept { + return get_array().begin(); +} +simdjson_inline simdjson_result value::end() & noexcept { + return {}; +} +simdjson_inline simdjson_result value::count_elements() & noexcept { + simdjson_result answer; + auto a = get_array(); + answer = a.count_elements(); + // count_elements leaves you pointing inside the array, at the first element. + // We need to move back so that the user can create a new array (which requires that + // we point at '['). + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::count_fields() & noexcept { + simdjson_result answer; + auto a = get_object(); + answer = a.count_fields(); + iter.move_at_start(); + return answer; +} +simdjson_inline simdjson_result value::at(size_t index) noexcept { + auto a = get_array(); + return a.at(index); +} + +simdjson_inline simdjson_result value::find_field(std::string_view key) noexcept { + return start_or_resume_object().find_field(key); +} +simdjson_inline simdjson_result value::find_field(const char *key) noexcept { + return start_or_resume_object().find_field(key); +} + +simdjson_inline simdjson_result value::find_field_unordered(std::string_view key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} +simdjson_inline simdjson_result value::find_field_unordered(const char *key) noexcept { + return start_or_resume_object().find_field_unordered(key); +} + +simdjson_inline simdjson_result value::operator[](std::string_view key) noexcept { + return start_or_resume_object()[key]; +} +simdjson_inline simdjson_result value::operator[](const char *key) noexcept { + return start_or_resume_object()[key]; +} + +simdjson_inline simdjson_result value::type() noexcept { + return iter.type(); +} + +simdjson_inline simdjson_result value::is_scalar() noexcept { + json_type this_type; + auto error = type().get(this_type); + if(error) { return error; } + return ! ((this_type == json_type::array) || (this_type == json_type::object)); +} + +simdjson_inline bool value::is_negative() noexcept { + return iter.is_negative(); +} + +simdjson_inline simdjson_result value::is_integer() noexcept { + return iter.is_integer(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number_type() noexcept { + return iter.get_number_type(); +} +simdjson_warn_unused simdjson_inline simdjson_result value::get_number() noexcept { + return iter.get_number(); +} + +simdjson_inline std::string_view value::raw_json_token() noexcept { + return std::string_view(reinterpret_cast(iter.peek_start()), iter.peek_start_length()); +} + +simdjson_inline simdjson_result value::raw_json() noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: { + ondemand::array array; + SIMDJSON_TRY(get_array().get(array)); + return array.raw_json(); + } + case json_type::object: { + ondemand::object object; + SIMDJSON_TRY(get_object().get(object)); + return object.raw_json(); + } + default: + return raw_json_token(); + } +} + +simdjson_inline simdjson_result value::current_location() noexcept { + return iter.json_iter().current_location(); +} + +simdjson_inline int32_t value::current_depth() const noexcept{ + return iter.json_iter().depth(); +} + +simdjson_inline simdjson_result value::at_pointer(std::string_view json_pointer) noexcept { + json_type t; + SIMDJSON_TRY(type().get(t)); + switch (t) + { + case json_type::array: + return (*this).get_array().at_pointer(json_pointer); + case json_type::object: + return (*this).get_object().at_pointer(json_pointer); + default: + return INVALID_JSON_POINTER; + } +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result( + westmere::ondemand::value &&value +) noexcept : + implementation_simdjson_result_base( + std::forward(value) + ) +{ +} +simdjson_inline simdjson_result::simdjson_result( + error_code error +) noexcept : + implementation_simdjson_result_base(error) +{ +} +simdjson_inline simdjson_result simdjson_result::count_elements() & noexcept { + if (error()) { return error(); } + return first.count_elements(); +} +simdjson_inline simdjson_result simdjson_result::count_fields() & noexcept { + if (error()) { return error(); } + return first.count_fields(); +} +simdjson_inline simdjson_result simdjson_result::at(size_t index) noexcept { + if (error()) { return error(); } + return first.at(index); +} +simdjson_inline simdjson_result simdjson_result::begin() & noexcept { + if (error()) { return error(); } + return first.begin(); +} +simdjson_inline simdjson_result simdjson_result::end() & noexcept { + if (error()) { return error(); } + return {}; +} + +simdjson_inline simdjson_result simdjson_result::find_field(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} +simdjson_inline simdjson_result simdjson_result::find_field(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field(key); +} + +simdjson_inline simdjson_result simdjson_result::find_field_unordered(std::string_view key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} +simdjson_inline simdjson_result simdjson_result::find_field_unordered(const char *key) noexcept { + if (error()) { return error(); } + return first.find_field_unordered(key); +} + +simdjson_inline simdjson_result simdjson_result::operator[](std::string_view key) noexcept { + if (error()) { return error(); } + return first[key]; +} +simdjson_inline simdjson_result simdjson_result::operator[](const char *key) noexcept { + if (error()) { return error(); } + return first[key]; +} + +simdjson_inline simdjson_result simdjson_result::get_array() noexcept { + if (error()) { return error(); } + return first.get_array(); +} +simdjson_inline simdjson_result simdjson_result::get_object() noexcept { + if (error()) { return error(); } + return first.get_object(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64() noexcept { + if (error()) { return error(); } + return first.get_uint64(); +} +simdjson_inline simdjson_result simdjson_result::get_uint64_in_string() noexcept { + if (error()) { return error(); } + return first.get_uint64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_int64() noexcept { + if (error()) { return error(); } + return first.get_int64(); +} +simdjson_inline simdjson_result simdjson_result::get_int64_in_string() noexcept { + if (error()) { return error(); } + return first.get_int64_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_double() noexcept { + if (error()) { return error(); } + return first.get_double(); +} +simdjson_inline simdjson_result simdjson_result::get_double_in_string() noexcept { + if (error()) { return error(); } + return first.get_double_in_string(); +} +simdjson_inline simdjson_result simdjson_result::get_string(bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(allow_replacement); +} +template +simdjson_inline error_code simdjson_result::get_string(string_type& receiver, bool allow_replacement) noexcept { + if (error()) { return error(); } + return first.get_string(receiver, allow_replacement); +} +simdjson_inline simdjson_result simdjson_result::get_wobbly_string() noexcept { + if (error()) { return error(); } + return first.get_wobbly_string(); +} +simdjson_inline simdjson_result simdjson_result::get_raw_json_string() noexcept { + if (error()) { return error(); } + return first.get_raw_json_string(); +} +simdjson_inline simdjson_result simdjson_result::get_bool() noexcept { + if (error()) { return error(); } + return first.get_bool(); +} +simdjson_inline simdjson_result simdjson_result::is_null() noexcept { + if (error()) { return error(); } + return first.is_null(); +} + +template simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return first.get(); +} +template simdjson_inline error_code simdjson_result::get(T &out) noexcept { + if (error()) { return error(); } + return first.get(out); +} + +template<> simdjson_inline simdjson_result simdjson_result::get() noexcept { + if (error()) { return error(); } + return std::move(first); +} +template<> simdjson_inline error_code simdjson_result::get(westmere::ondemand::value &out) noexcept { + if (error()) { return error(); } + out = first; + return SUCCESS; +} + +simdjson_inline simdjson_result simdjson_result::type() noexcept { + if (error()) { return error(); } + return first.type(); +} +simdjson_inline simdjson_result simdjson_result::is_scalar() noexcept { + if (error()) { return error(); } + return first.is_scalar(); +} +simdjson_inline simdjson_result simdjson_result::is_negative() noexcept { + if (error()) { return error(); } + return first.is_negative(); +} +simdjson_inline simdjson_result simdjson_result::is_integer() noexcept { + if (error()) { return error(); } + return first.is_integer(); +} +simdjson_inline simdjson_result simdjson_result::get_number_type() noexcept { + if (error()) { return error(); } + return first.get_number_type(); +} +simdjson_inline simdjson_result simdjson_result::get_number() noexcept { + if (error()) { return error(); } + return first.get_number(); +} +#if SIMDJSON_EXCEPTIONS +simdjson_inline simdjson_result::operator westmere::ondemand::array() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator westmere::ondemand::object() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator uint64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator int64_t() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator double() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator std::string_view() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator westmere::ondemand::raw_json_string() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +simdjson_inline simdjson_result::operator bool() noexcept(false) { + if (error()) { throw simdjson_error(error()); } + return first; +} +#endif + +simdjson_inline simdjson_result simdjson_result::raw_json_token() noexcept { + if (error()) { return error(); } + return first.raw_json_token(); +} + +simdjson_inline simdjson_result simdjson_result::raw_json() noexcept { + if (error()) { return error(); } + return first.raw_json(); +} + +simdjson_inline simdjson_result simdjson_result::current_location() noexcept { + if (error()) { return error(); } + return first.current_location(); +} + +simdjson_inline simdjson_result simdjson_result::current_depth() const noexcept { + if (error()) { return error(); } + return first.current_depth(); +} + +simdjson_inline simdjson_result simdjson_result::at_pointer(std::string_view json_pointer) noexcept { + if (error()) { return error(); } + return first.at_pointer(json_pointer); +} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_INL_H +/* end file simdjson/generic/ondemand/value-inl.h for westmere */ +/* including simdjson/generic/ondemand/value_iterator-inl.h for westmere: #include "simdjson/generic/ondemand/value_iterator-inl.h" */ +/* begin file simdjson/generic/ondemand/value_iterator-inl.h for westmere */ +#ifndef SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H + +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #define SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/base.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/atomparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/numberparsing.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_iterator.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/json_type-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/raw_json_string-inl.h" */ +/* amalgamation skipped (editor-only): #include "simdjson/generic/ondemand/value_iterator.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +namespace simdjson { +namespace westmere { +namespace ondemand { + +simdjson_inline value_iterator::value_iterator( + json_iterator *json_iter, + depth_t depth, + token_position start_position +) noexcept : _json_iter{json_iter}, _depth{depth}, _start_position{start_position} +{ +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_object() noexcept { + SIMDJSON_TRY( start_container('{', "Not an object", "object") ); + return started_root_object(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_object() noexcept { + assert_at_container_start(); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + if (*_json_iter->peek() == '}') { + logger::log_value(*_json_iter, "empty object"); + _json_iter->return_current_and_advance(); + end_container(); + return false; + } + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_object() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // object: e.g., `{"a":2} foo }`. Users concerned with garbage content should + // call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != '}') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing } at end"); + } + // If the last character is } *and* the first gibberish character is also '}' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == '}') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed object. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_object() noexcept { + auto error = check_root_object(); + if(error) { return error; } + return started_object(); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::end_container() noexcept { +#if SIMDJSON_CHECK_EOF + if (depth() > 1 && at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing parent ] or }"); } + // if (depth() <= 1 && !at_end()) { return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing [ or { at start"); } +#endif // SIMDJSON_CHECK_EOF + _json_iter->ascend_to(depth()-1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_field() noexcept { + assert_at_next(); + + // It's illegal to call this unless there are more tokens: anything that ends in } or ] is + // obligated to verify there are more tokens if they are not the top level. + switch (*_json_iter->return_current_and_advance()) { + case '}': + logger::log_end_value(*_json_iter, "object"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between object fields"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_raw(const std::string_view key) noexcept { + error_code error; + bool has_value; + // + // Initially, the object can be in one of a few different places: + // + // 1. The start of the object, at the first field: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + if (at_first_field()) { + has_value = true; + + // + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + return false; + + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + if ((error = skip_child() )) { abandon(); return error; } + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + while (has_value) { + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + //if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); // Skip the value entirely + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + + // If the loop ended, we're out of fields to look at. + return false; +} + +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::find_field_unordered_raw(const std::string_view key) noexcept { + /** + * When find_field_unordered_raw is called, we can either be pointing at the + * first key, pointing outside (at the closing brace) or if a key was matched + * we can be either pointing right afterthe ':' right before the value (that we need skip), + * or we may have consumed the value and we might be at a comma or at the + * final brace (ready for a call to has_next_field()). + */ + error_code error; + bool has_value; + + // First, we scan from that point to the end. + // If we don't find a match, we may loop back around, and scan from the beginning to that point. + token_position search_start = _json_iter->position(); + + // We want to know whether we need to go back to the beginning. + bool at_first = at_first_field(); + /////////////// + // Initially, the object can be in one of a few different places: + // + // 1. At the first key: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2, index 1) + // ``` + // + if (at_first) { + has_value = true; + + // 2. When a previous search did not yield a value or the object is empty: + // + // ``` + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // { } + // ^ (depth 0, index 2) + // ``` + // + } else if (!is_open()) { + +#if SIMDJSON_DEVELOPMENT_CHECKS + // If we're past the end of the object, we're being iterated out of order. + // Note: this isn't perfect detection. It's possible the user is inside some other object; if so, + // this object iterator will blithely scan that object for fields. + if (_json_iter->depth() < depth() - 1) { return OUT_OF_ORDER_ITERATION; } +#endif + SIMDJSON_TRY(reset_object().get(has_value)); + at_first = true; + // 3. When a previous search found a field or an iterator yielded a value: + // + // ``` + // // When a field was not fully consumed (or not even touched at all) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 2) + // // When a field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // When the last field was fully consumed + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // ``` + // + } else { + // If someone queried a key but they not did access the value, then we are left pointing + // at the ':' and we need to move forward through the value... If the value was + // processed then skip_child() does not move the iterator (but may adjust the depth). + if ((error = skip_child() )) { abandon(); return error; } + search_start = _json_iter->position(); + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } +#if SIMDJSON_DEVELOPMENT_CHECKS + if (_json_iter->start_position(_depth) != start_position()) { return OUT_OF_ORDER_ITERATION; } +#endif + } + + // After initial processing, we will be in one of two states: + // + // ``` + // // At the beginning of a field + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 1) + // // At the end of the object + // { "a": [ 1, 2 ], "b": [ 3, 4 ] } + // ^ (depth 0) + // ``` + // + // Next, we find a match starting from the current position. + while (has_value) { + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + if ((error = field_key().get(actual_key) )) { abandon(); return error; }; + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + if ((error = field_value() )) { abandon(); return error; } + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + if ((error = has_next_field().get(has_value) )) { abandon(); return error; } + } + // Performance note: it maybe wasteful to rewind to the beginning when there might be + // no other query following. Indeed, it would require reskipping the whole object. + // Instead, you can just stay where you are. If there is a new query, there is always time + // to rewind. + if(at_first) { return false; } + + // If we reach the end without finding a match, search the rest of the fields starting at the + // beginning of the object. + // (We have already run through the object before, so we've already validated its structure. We + // don't check errors in this bit.) + SIMDJSON_TRY(reset_object().get(has_value)); + while (true) { + SIMDJSON_ASSUME(has_value); // we should reach search_start before ever reaching the end of the object + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); // We must be at the start of a field + + // Get the key and colon, stopping at the value. + raw_json_string actual_key; + // size_t max_key_length = _json_iter->peek_length() - 2; // -2 for the two quotes + // Note: _json_iter->peek_length() - 2 might overflow if _json_iter->peek_length() < 2. + // field_key() advances the pointer and checks that '"' is found (corresponding to a key). + // The depth is left unchanged by field_key(). + error = field_key().get(actual_key); SIMDJSON_ASSUME(!error); + // field_value() will advance and check that we find a ':' separating the + // key and the value. It will also increment the depth by one. + error = field_value(); SIMDJSON_ASSUME(!error); + + // If it matches, stop and return + // We could do it this way if we wanted to allow arbitrary + // key content (including escaped quotes). + // if (actual_key.unsafe_is_equal(max_key_length, key)) { + // Instead we do the following which may trigger buffer overruns if the + // user provides an adversarial key (containing a well placed unescaped quote + // character and being longer than the number of bytes remaining in the JSON + // input). + if (actual_key.unsafe_is_equal(key)) { + logger::log_event(*this, "match", key, -2); + // If we return here, then we return while pointing at the ':' that we just checked. + return true; + } + + // No match: skip the value and see if , or } is next + logger::log_event(*this, "no match", key, -2); + // The call to skip_child is meant to skip over the value corresponding to the key. + // After skip_child(), we are right before the next comma (',') or the final brace ('}'). + SIMDJSON_TRY( skip_child() ); + // If we reached the end of the key-value pair we started from, then we know + // that the key is not there so we return false. We are either right before + // the next comma or the final brace. + if(_json_iter->position() == search_start) { return false; } + // The has_next_field() advances the pointer and check that either ',' or '}' is found. + // It returns true if ',' is found, false otherwise. If anything other than ',' or '}' is found, + // then we are in error and we abort. + error = has_next_field().get(has_value); SIMDJSON_ASSUME(!error); + // If we make the mistake of exiting here, then we could be left pointing at a key + // in the middle of an object. That's not an allowable state. + } + // If the loop ended, we're out of fields to look at. The program should + // never reach this point. + return false; +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::field_key() noexcept { + assert_at_next(); + + const uint8_t *key = _json_iter->return_current_and_advance(); + if (*(key++) != '"') { return report_error(TAPE_ERROR, "Object key is not a string"); } + return raw_json_string(key); +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::field_value() noexcept { + assert_at_next(); + + if (*_json_iter->return_current_and_advance() != ':') { return report_error(TAPE_ERROR, "Missing colon in object field"); } + _json_iter->descend_to(depth()+1); + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::start_root_array() noexcept { + SIMDJSON_TRY( start_container('[', "Not an array", "array") ); + return started_root_array(); +} + +inline std::string value_iterator::to_string() const noexcept { + auto answer = std::string("value_iterator [ depth : ") + std::to_string(_depth) + std::string(", "); + if(_json_iter != nullptr) { answer += _json_iter->to_string(); } + answer += std::string(" ]"); + return answer; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_array() noexcept { + assert_at_container_start(); + if (*_json_iter->peek() == ']') { + logger::log_value(*_json_iter, "empty array"); + _json_iter->return_current_and_advance(); + SIMDJSON_TRY( end_container() ); + return false; + } + _json_iter->descend_to(depth()+1); +#if SIMDJSON_DEVELOPMENT_CHECKS + _json_iter->set_start_position(_depth, start_position()); +#endif + return true; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::check_root_array() noexcept { + // When in streaming mode, we cannot expect peek_last() to be the last structural element of the + // current document. It only works in the normal mode where we have indexed a single document. + // Note that adding a check for 'streaming' is not expensive since we only have at most + // one root element. + if ( ! _json_iter->streaming() ) { + // The following lines do not fully protect against garbage content within the + // array: e.g., `[1, 2] foo]`. Users concerned with garbage content should + // also call `at_end()` on the document instance at the end of the processing to + // ensure that the processing has finished at the end. + // + if (*_json_iter->peek_last() != ']') { + _json_iter->abandon(); + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "missing ] at end"); + } + // If the last character is ] *and* the first gibberish character is also ']' + // then on-demand could accidentally go over. So we need additional checks. + // https://github.com/simdjson/simdjson/issues/1834 + // Checking that the document is balanced requires a full scan which is potentially + // expensive, but it only happens in edge cases where the first padding character is + // a closing bracket. + if ((*_json_iter->peek(_json_iter->end_position()) == ']') && (!_json_iter->balanced())) { + _json_iter->abandon(); + // The exact error would require more work. It will typically be an unclosed array. + return report_error(INCOMPLETE_ARRAY_OR_OBJECT, "the document is unbalanced"); + } + } + return SUCCESS; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::started_root_array() noexcept { + auto error = check_root_array(); + if (error) { return error; } + return started_array(); +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::has_next_element() noexcept { + assert_at_next(); + + logger::log_event(*this, "has_next_element"); + switch (*_json_iter->return_current_and_advance()) { + case ']': + logger::log_end_value(*_json_iter, "array"); + SIMDJSON_TRY( end_container() ); + return false; + case ',': + _json_iter->descend_to(depth()+1); + return true; + default: + return report_error(TAPE_ERROR, "Missing comma between array elements"); + } +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_bool(const uint8_t *json) const noexcept { + auto not_true = atomparsing::str4ncmp(json, "true"); + auto not_false = atomparsing::str4ncmp(json, "fals") | (json[4] ^ 'e'); + bool error = (not_true && not_false) || jsoncharutils::is_not_structural_or_whitespace(json[not_true ? 5 : 4]); + if (error) { return incorrect_type_error("Not a boolean"); } + return simdjson_result(!not_true); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::parse_null(const uint8_t *json) const noexcept { + bool is_null_string = !atomparsing::str4ncmp(json, "null") && jsoncharutils::is_structural_or_whitespace(json[4]); + // if we start with 'n', we must be a null + if(!is_null_string && json[0]=='n') { return incorrect_type_error("Not a null but starts with n"); } + return is_null_string; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_string(bool allow_replacement) noexcept { + return get_raw_json_string().unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_string(string_type& receiver, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_string(allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_wobbly_string() noexcept { + return get_raw_json_string().unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_raw_json_string() noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64() noexcept { + auto result = numberparsing::parse_unsigned(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_uint64_in_string() noexcept { + auto result = numberparsing::parse_unsigned_in_string(peek_non_root_scalar("uint64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("uint64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64() noexcept { + auto result = numberparsing::parse_integer(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_int64_in_string() noexcept { + auto result = numberparsing::parse_integer_in_string(peek_non_root_scalar("int64")); + if(result.error() == SUCCESS) { advance_non_root_scalar("int64"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double() noexcept { + auto result = numberparsing::parse_double(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_double_in_string() noexcept { + auto result = numberparsing::parse_double_in_string(peek_non_root_scalar("double")); + if(result.error() == SUCCESS) { advance_non_root_scalar("double"); } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_bool() noexcept { + auto result = parse_bool(peek_non_root_scalar("bool")); + if(result.error() == SUCCESS) { advance_non_root_scalar("bool"); } + return result; +} +simdjson_inline simdjson_result value_iterator::is_null() noexcept { + bool is_null_value; + SIMDJSON_TRY(parse_null(peek_non_root_scalar("null")).get(is_null_value)); + if(is_null_value) { advance_non_root_scalar("null"); } + return is_null_value; +} +simdjson_inline bool value_iterator::is_negative() noexcept { + return numberparsing::is_negative(peek_non_root_scalar("numbersign")); +} +simdjson_inline bool value_iterator::is_root_negative() noexcept { + return numberparsing::is_negative(peek_root_scalar("numbersign")); +} +simdjson_inline simdjson_result value_iterator::is_integer() noexcept { + return numberparsing::is_integer(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number_type() noexcept { + return numberparsing::get_number_type(peek_non_root_scalar("integer")); +} +simdjson_inline simdjson_result value_iterator::get_number() noexcept { + number num; + error_code error = numberparsing::parse_number(peek_non_root_scalar("number"), num); + if(error) { return error; } + return num; +} + +simdjson_inline simdjson_result value_iterator::is_root_integer(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("is_root_integer"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + return false; // if there are more than 20 characters, it cannot be represented as an integer. + } + auto answer = numberparsing::is_integer(tmpbuf); + // If the parsing was a success, we must still check that it is + // a single scalar. Note that we parse first because of cases like '[]' where + // getting TRAILING_CONTENT is wrong. + if(check_trailing && (answer.error() == SUCCESS) && (!_json_iter->is_single_token())) { return TRAILING_CONTENT; } + return answer; +} + +simdjson_inline simdjson_result value_iterator::get_root_number_type(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto answer = numberparsing::get_number_type(tmpbuf); + if (check_trailing && (answer.error() == SUCCESS) && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + return answer; +} +simdjson_inline simdjson_result value_iterator::get_root_number(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("number"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + number num; + error_code error = numberparsing::parse_number(tmpbuf, num); + if(error) { return error; } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("number"); + return num; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_string(bool check_trailing, bool allow_replacement) noexcept { + return get_root_raw_json_string(check_trailing).unescape(json_iter(), allow_replacement); +} +template +simdjson_warn_unused simdjson_inline error_code value_iterator::get_root_string(string_type& receiver, bool check_trailing, bool allow_replacement) noexcept { + std::string_view content; + auto err = get_root_string(check_trailing, allow_replacement).get(content); + if (err) { return err; } + receiver = content; + return SUCCESS; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_wobbly_string(bool check_trailing) noexcept { + return get_root_raw_json_string(check_trailing).unescape_wobbly(json_iter()); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_raw_json_string(bool check_trailing) noexcept { + auto json = peek_scalar("string"); + if (*json != '"') { return incorrect_type_error("Not a string"); } + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_scalar("string"); + return raw_json_string(json+1); +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_uint64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("uint64"); + uint8_t tmpbuf[20+1+1]{}; // <20 digits> is the longest possible unsigned integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_unsigned_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("uint64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_int64_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("int64"); + uint8_t tmpbuf[20+1+1]; // -<19 digits> is the longest possible integer + tmpbuf[20+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 20+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 20 characters"); + return NUMBER_ERROR; + } + + auto result = numberparsing::parse_integer_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("int64"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} + +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_double_in_string(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("double"); + // Per https://www.exploringbinary.com/maximum-number-of-decimal-digits-in-binary-floating-point-numbers/, + // 1074 is the maximum number of significant fractional digits. Add 8 more digits for the biggest + // number: -0.e-308. + uint8_t tmpbuf[1074+8+1+1]; // +1 for null termination. + tmpbuf[1074+8+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 1074+8+1)) { + logger::log_error(*_json_iter, start_position(), depth(), "Root number more than 1082 characters"); + return NUMBER_ERROR; + } + auto result = numberparsing::parse_double_in_string(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("double"); + } + return result; +} +simdjson_warn_unused simdjson_inline simdjson_result value_iterator::get_root_bool(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("bool"); + uint8_t tmpbuf[5+1+1]; // +1 for null termination + tmpbuf[5+1] = '\0'; // make sure that buffer is always null terminated. + if (!_json_iter->copy_to_buffer(json, max_len, tmpbuf, 5+1)) { return incorrect_type_error("Not a boolean"); } + auto result = parse_bool(tmpbuf); + if(result.error() == SUCCESS) { + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("bool"); + } + return result; +} +simdjson_inline simdjson_result value_iterator::is_root_null(bool check_trailing) noexcept { + auto max_len = peek_start_length(); + auto json = peek_root_scalar("null"); + bool result = (max_len >= 4 && !atomparsing::str4ncmp(json, "null") && + (max_len == 4 || jsoncharutils::is_structural_or_whitespace(json[4]))); + if(result) { // we have something that looks like a null. + if (check_trailing && !_json_iter->is_single_token()) { return TRAILING_CONTENT; } + advance_root_scalar("null"); + } + return result; +} + +simdjson_warn_unused simdjson_inline error_code value_iterator::skip_child() noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth >= _depth ); + + return _json_iter->skip_child(depth()); +} + +simdjson_inline value_iterator value_iterator::child() const noexcept { + assert_at_child(); + return { _json_iter, depth()+1, _json_iter->token.position() }; +} + +// GCC 7 warns when the first line of this function is inlined away into oblivion due to the caller +// relating depth and iterator depth, which is a desired effect. It does not happen if is_open is +// marked non-inline. +SIMDJSON_PUSH_DISABLE_WARNINGS +SIMDJSON_DISABLE_STRICT_OVERFLOW_WARNING +simdjson_inline bool value_iterator::is_open() const noexcept { + return _json_iter->depth() >= depth(); +} +SIMDJSON_POP_DISABLE_WARNINGS + +simdjson_inline bool value_iterator::at_end() const noexcept { + return _json_iter->at_end(); +} + +simdjson_inline bool value_iterator::at_start() const noexcept { + return _json_iter->token.position() == start_position(); +} + +simdjson_inline bool value_iterator::at_first_field() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + return _json_iter->token.position() == start_position() + 1; +} + +simdjson_inline void value_iterator::abandon() noexcept { + _json_iter->abandon(); +} + +simdjson_warn_unused simdjson_inline depth_t value_iterator::depth() const noexcept { + return _depth; +} +simdjson_warn_unused simdjson_inline error_code value_iterator::error() const noexcept { + return _json_iter->error; +} +simdjson_warn_unused simdjson_inline uint8_t *&value_iterator::string_buf_loc() noexcept { + return _json_iter->string_buf_loc(); +} +simdjson_warn_unused simdjson_inline const json_iterator &value_iterator::json_iter() const noexcept { + return *_json_iter; +} +simdjson_warn_unused simdjson_inline json_iterator &value_iterator::json_iter() noexcept { + return *_json_iter; +} + +simdjson_inline const uint8_t *value_iterator::peek_start() const noexcept { + return _json_iter->peek(start_position()); +} +simdjson_inline uint32_t value_iterator::peek_start_length() const noexcept { + return _json_iter->peek_length(start_position()); +} + +simdjson_inline const uint8_t *value_iterator::peek_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return peek_start(); } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + if (!is_at_start()) { return; } + + // Get the JSON and advance the cursor, decreasing depth to signify that we have retrieved the value. + assert_at_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::start_container(uint8_t start_char, const char *incorrect_type_message, const char *type) noexcept { + logger::log_start_value(*_json_iter, start_position(), depth(), type); + // If we're not at the position anymore, we don't want to advance the cursor. + const uint8_t *json; + if (!is_at_start()) { +#if SIMDJSON_DEVELOPMENT_CHECKS + if (!is_at_iterator_start()) { return OUT_OF_ORDER_ITERATION; } +#endif + json = peek_start(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + } else { + assert_at_start(); + /** + * We should be prudent. Let us peek. If it is not the right type, we + * return an error. Only once we have determined that we have the right + * type are we allowed to advance! + */ + json = _json_iter->peek(); + if (*json != start_char) { return incorrect_type_error(incorrect_type_message); } + _json_iter->return_current_and_advance(); + } + + + return SUCCESS; +} + + +simdjson_inline const uint8_t *value_iterator::peek_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_root(); + return _json_iter->peek(); +} +simdjson_inline const uint8_t *value_iterator::peek_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return peek_start(); } + + assert_at_non_root_start(); + return _json_iter->peek(); +} + +simdjson_inline void value_iterator::advance_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_root(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} +simdjson_inline void value_iterator::advance_non_root_scalar(const char *type) noexcept { + logger::log_value(*_json_iter, start_position(), depth(), type); + if (!is_at_start()) { return; } + + assert_at_non_root_start(); + _json_iter->return_current_and_advance(); + _json_iter->ascend_to(depth()-1); +} + +simdjson_inline error_code value_iterator::incorrect_type_error(const char *message) const noexcept { + logger::log_error(*_json_iter, start_position(), depth(), message); + return INCORRECT_TYPE; +} + +simdjson_inline bool value_iterator::is_at_start() const noexcept { + return position() == start_position(); +} + +simdjson_inline bool value_iterator::is_at_key() const noexcept { + // Keys are at the same depth as the object. + // Note here that we could be safer and check that we are within an object, + // but we do not. + return _depth == _json_iter->_depth && *_json_iter->peek() == '"'; +} + +simdjson_inline bool value_iterator::is_at_iterator_start() const noexcept { + // We can legitimately be either at the first value ([1]), or after the array if it's empty ([]). + auto delta = position() - start_position(); + return delta == 1 || delta == 2; +} + +inline void value_iterator::assert_at_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_container_start() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position == _start_position + 1 ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_next() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +simdjson_inline void value_iterator::move_at_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position); +} + +simdjson_inline void value_iterator::move_at_container_start() noexcept { + _json_iter->_depth = _depth; + _json_iter->token.set_position(_start_position + 1); +} + +simdjson_inline simdjson_result value_iterator::reset_array() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_array(); +} + +simdjson_inline simdjson_result value_iterator::reset_object() noexcept { + if(error()) { return error(); } + move_at_container_start(); + return started_object(); +} + +inline void value_iterator::assert_at_child() const noexcept { + SIMDJSON_ASSUME( _json_iter->token._position > _start_position ); + SIMDJSON_ASSUME( _json_iter->_depth == _depth + 1 ); + SIMDJSON_ASSUME( _depth > 0 ); +} + +inline void value_iterator::assert_at_root() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth == 1 ); +} + +inline void value_iterator::assert_at_non_root_start() const noexcept { + assert_at_start(); + SIMDJSON_ASSUME( _depth > 1 ); +} + +inline void value_iterator::assert_is_valid() const noexcept { + SIMDJSON_ASSUME( _json_iter != nullptr ); +} + +simdjson_inline bool value_iterator::is_valid() const noexcept { + return _json_iter != nullptr; +} + +simdjson_inline simdjson_result value_iterator::type() const noexcept { + switch (*peek_start()) { + case '{': + return json_type::object; + case '[': + return json_type::array; + case '"': + return json_type::string; + case 'n': + return json_type::null; + case 't': case 'f': + return json_type::boolean; + case '-': + case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + return json_type::number; + default: + return TAPE_ERROR; + } +} + +simdjson_inline token_position value_iterator::start_position() const noexcept { + return _start_position; +} + +simdjson_inline token_position value_iterator::position() const noexcept { + return _json_iter->position(); +} + +simdjson_inline token_position value_iterator::end_position() const noexcept { + return _json_iter->end_position(); +} + +simdjson_inline token_position value_iterator::last_position() const noexcept { + return _json_iter->last_position(); +} + +simdjson_inline error_code value_iterator::report_error(error_code error, const char *message) noexcept { + return _json_iter->report_error(error, message); +} + +} // namespace ondemand +} // namespace westmere +} // namespace simdjson + +namespace simdjson { + +simdjson_inline simdjson_result::simdjson_result(westmere::ondemand::value_iterator &&value) noexcept + : implementation_simdjson_result_base(std::forward(value)) {} +simdjson_inline simdjson_result::simdjson_result(error_code error) noexcept + : implementation_simdjson_result_base(error) {} + +} // namespace simdjson + +#endif // SIMDJSON_GENERIC_ONDEMAND_VALUE_ITERATOR_INL_H +/* end file simdjson/generic/ondemand/value_iterator-inl.h for westmere */ +/* end file simdjson/generic/ondemand/amalgamated.h for westmere */ +/* including simdjson/westmere/end.h: #include "simdjson/westmere/end.h" */ +/* begin file simdjson/westmere/end.h */ +/* amalgamation skipped (editor-only): #ifndef SIMDJSON_CONDITIONAL_INCLUDE */ +/* amalgamation skipped (editor-only): #include "simdjson/westmere/base.h" */ +/* amalgamation skipped (editor-only): #endif // SIMDJSON_CONDITIONAL_INCLUDE */ + +#if !SIMDJSON_CAN_ALWAYS_RUN_WESTMERE +SIMDJSON_UNTARGET_REGION +#endif + +/* undefining SIMDJSON_IMPLEMENTATION from "westmere" */ +#undef SIMDJSON_IMPLEMENTATION +/* end file simdjson/westmere/end.h */ + +#endif // SIMDJSON_WESTMERE_IMPLEMENTATION_H +/* end file simdjson/westmere/ondemand.h */ +#else +#error Unknown SIMDJSON_BUILTIN_IMPLEMENTATION +#endif + +/* undefining SIMDJSON_CONDITIONAL_INCLUDE */ +#undef SIMDJSON_CONDITIONAL_INCLUDE + +namespace simdjson { + /** + * @copydoc simdjson::SIMDJSON_BUILTIN_IMPLEMENTATION::ondemand + */ + namespace ondemand = SIMDJSON_BUILTIN_IMPLEMENTATION::ondemand; +} // namespace simdjson + +#endif // SIMDJSON_BUILTIN_ONDEMAND_H +/* end file simdjson/builtin/ondemand.h */ + +namespace simdjson { + /** + * @copydoc simdjson::builtin::ondemand + */ + namespace ondemand = builtin::ondemand; +} // namespace simdjson + +#endif // SIMDJSON_ONDEMAND_H +/* end file simdjson/ondemand.h */ + +#endif // SIMDJSON_H +/* end file simdjson.h */ diff --git a/deps/simdjson/unofficial.gni b/deps/simdjson/unofficial.gni new file mode 100644 index 00000000000000..d6909b95886f4d --- /dev/null +++ b/deps/simdjson/unofficial.gni @@ -0,0 +1,22 @@ +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("simdjson_gn_build") { + config("simdjson_config") { + include_dirs = [ "." ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("simdjson.gyp") ], + "scope", + [ "simdjson.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":simdjson_config" ] + sources = gypi_values.simdjson_sources + } +} diff --git a/deps/simdutf/BUILD.gn b/deps/simdutf/BUILD.gn new file mode 100644 index 00000000000000..119d49456911e9 --- /dev/null +++ b/deps/simdutf/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +simdutf_gn_build("simdutf") { +} diff --git a/deps/simdutf/simdutf.cpp b/deps/simdutf/simdutf.cpp index 70b461ab550b46..7a6e9a0efd190b 100644 --- a/deps/simdutf/simdutf.cpp +++ b/deps/simdutf/simdutf.cpp @@ -1,8 +1,6 @@ -/* auto-generated on 2023-10-08 13:48:09 -0400. Do not edit! */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf.cpp +/* auto-generated on 2023-11-15 17:34:03 -0500. Do not edit! */ /* begin file src/simdutf.cpp */ #include "simdutf.h" -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=implementation.cpp /* begin file src/implementation.cpp */ #include #include @@ -26,7 +24,6 @@ std::string toBinaryString(T b) { // Implementations // The best choice should always come first! -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/arm64.h /* begin file src/simdutf/arm64.h */ #ifndef SIMDUTF_ARM64_H #define SIMDUTF_ARM64_H @@ -53,7 +50,6 @@ namespace arm64 { } // namespace arm64 } // namespace simdutf -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/arm64/implementation.h /* begin file src/simdutf/arm64/implementation.h */ #ifndef SIMDUTF_ARM64_IMPLEMENTATION_H #define SIMDUTF_ARM64_IMPLEMENTATION_H @@ -80,6 +76,13 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused result validate_utf16be_with_errors(const char16_t *buf, size_t len) const noexcept final; simdutf_warn_unused bool validate_utf32(const char32_t *buf, size_t len) const noexcept final; simdutf_warn_unused result validate_utf32_with_errors(const char32_t *buf, size_t len) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf16le(const char * buf, size_t len, char16_t* utf16_buffer) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf16be(const char * buf, size_t len, char16_t* utf16_buffer) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf32(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; + simdutf_warn_unused size_t convert_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused result convert_utf8_to_latin1_with_errors(const char * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final; simdutf_warn_unused size_t convert_utf8_to_utf16le(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; simdutf_warn_unused size_t convert_utf8_to_utf16be(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; simdutf_warn_unused result convert_utf8_to_utf16le_with_errors(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; @@ -89,12 +92,21 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t convert_utf8_to_utf32(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; simdutf_warn_unused result convert_utf8_to_utf32_with_errors(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; simdutf_warn_unused size_t convert_valid_utf8_to_utf32(const char * buf, size_t len, char32_t* utf32_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused result convert_utf16le_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused result convert_utf16be_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf16be_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused result convert_utf16le_to_utf8_with_errors(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused result convert_utf16be_to_utf8_with_errors(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_valid_utf16le_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_valid_utf16be_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused result convert_utf32_to_latin1_with_errors(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; simdutf_warn_unused size_t convert_utf32_to_utf8(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused result convert_utf32_to_utf8_with_errors(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_valid_utf32_to_utf8(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; @@ -122,6 +134,13 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t utf8_length_from_utf32(const char32_t * input, size_t length) const noexcept; simdutf_warn_unused size_t utf16_length_from_utf32(const char32_t * input, size_t length) const noexcept; simdutf_warn_unused size_t utf32_length_from_utf8(const char * input, size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf8(const char * input, size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf16(size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf32(size_t length) const noexcept; + simdutf_warn_unused size_t utf32_length_from_latin1(size_t length) const noexcept; + simdutf_warn_unused size_t utf16_length_from_latin1(size_t length) const noexcept; + simdutf_warn_unused size_t utf8_length_from_latin1(const char * input, size_t length) const noexcept; + }; } // namespace arm64 @@ -130,14 +149,12 @@ class implementation final : public simdutf::implementation { #endif // SIMDUTF_ARM64_IMPLEMENTATION_H /* end file src/simdutf/arm64/implementation.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/arm64/begin.h /* begin file src/simdutf/arm64/begin.h */ // redefining SIMDUTF_IMPLEMENTATION to "arm64" // #define SIMDUTF_IMPLEMENTATION arm64 /* end file src/simdutf/arm64/begin.h */ // Declarations -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/arm64/intrinsics.h /* begin file src/simdutf/arm64/intrinsics.h */ #ifndef SIMDUTF_ARM64_INTRINSICS_H #define SIMDUTF_ARM64_INTRINSICS_H @@ -149,7 +166,6 @@ class implementation final : public simdutf::implementation { #endif // SIMDUTF_ARM64_INTRINSICS_H /* end file src/simdutf/arm64/intrinsics.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/arm64/bitmanipulation.h /* begin file src/simdutf/arm64/bitmanipulation.h */ #ifndef SIMDUTF_ARM64_BITMANIPULATION_H #define SIMDUTF_ARM64_BITMANIPULATION_H @@ -169,7 +185,6 @@ simdutf_really_inline int count_ones(uint64_t input_num) { #endif // SIMDUTF_ARM64_BITMANIPULATION_H /* end file src/simdutf/arm64/bitmanipulation.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/arm64/simd.h /* begin file src/simdutf/arm64/simd.h */ #ifndef SIMDUTF_ARM64_SIMD_H #define SIMDUTF_ARM64_SIMD_H @@ -505,32 +520,68 @@ simdutf_really_inline int16x8_t make_int16x8_t(int16_t x1, int16_t x2, int16_t static simdutf_really_inline simd8 splat(int8_t _value) { return vmovq_n_s8(_value); } static simdutf_really_inline simd8 zero() { return vdupq_n_s8(0); } static simdutf_really_inline simd8 load(const int8_t values[16]) { return vld1q_s8(values); } + + // Use ST2 instead of UXTL+UXTL2 to interleave zeroes. UXTL is actually a USHLL #0, + // and shifting in NEON is actually quite slow. + // + // While this needs the registers to be in a specific order, bigger cores can interleave + // these with no overhead, and it still performs decently on little cores. + // movi v1.3d, #0 + // mov v0.16b, value[0] + // st2 {v0.16b, v1.16b}, [ptr], #32 + // mov v0.16b, value[1] + // st2 {v0.16b, v1.16b}, [ptr], #32 + // ... template simdutf_really_inline void store_ascii_as_utf16(char16_t * p) const { - uint16x8_t first = vmovl_u8(vget_low_u8 (vreinterpretq_u8_s8(this->value))); - uint16x8_t second = vmovl_high_u8(vreinterpretq_u8_s8(this->value)); - if (!match_system(big_endian)) { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t swap = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - #else - const uint8x16_t swap = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - #endif - first = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(first), swap)); - second = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(second), swap)); - } - vst1q_u16(reinterpret_cast(p), first); - vst1q_u16(reinterpret_cast(p + 8), second); - } + int8x16x2_t pair = match_system(big_endian) + ? int8x16x2_t{{this->value, vmovq_n_s8(0)}} + : int8x16x2_t{{vmovq_n_s8(0), this->value}}; + vst2q_s8(reinterpret_cast(p), pair); + } + + // currently unused + // Technically this could be done with ST4 like in store_ascii_as_utf16, but it is + // very much not worth it, as explicitly mentioned in the ARM Cortex-X1 Core Software + // Optimization Guide: + // 4.18 Complex ASIMD instructions + // The bandwidth of [ST4 with element size less than 64b] is limited by decode + // constraints and it is advisable to avoid them when high performing code is desired. + // Instead, it is better to use ZIP1+ZIP2 and two ST2. simdutf_really_inline void store_ascii_as_utf32(char32_t * p) const { - vst1q_u32(reinterpret_cast(p), vmovl_u16(vget_low_u16(vmovl_u8(vget_low_u8 (vreinterpretq_u8_s8(this->value)))))); - vst1q_u32(reinterpret_cast(p + 4), vmovl_high_u16(vmovl_u8(vget_low_u8 (vreinterpretq_u8_s8(this->value))))); - vst1q_u32(reinterpret_cast(p + 8), vmovl_u16(vget_low_u16(vmovl_high_u8(vreinterpretq_u8_s8(this->value))))); - vst1q_u32(reinterpret_cast(p + 12), vmovl_high_u16(vmovl_high_u8(vreinterpretq_u8_s8(this->value)))); + const uint16x8_t low = vreinterpretq_u16_s8(vzip1q_s8(this->value, vmovq_n_s8(0))); + const uint16x8_t high = vreinterpretq_u16_s8(vzip2q_s8(this->value, vmovq_n_s8(0))); + const uint16x8x2_t low_pair{{ low, vmovq_n_u16(0) }}; + vst2q_u16(reinterpret_cast(p), low_pair); + const uint16x8x2_t high_pair{{ high, vmovq_n_u16(0) }}; + vst2q_u16(reinterpret_cast(p + 8), high_pair); + } + + // In places where the table can be reused, which is most uses in simdutf, it is worth it to do + // 4 table lookups, as there is no direct zero extension from u8 to u32. + simdutf_really_inline void store_ascii_as_utf32_tbl(char32_t * p) const { + const simd8 tb1{ 0,255,255,255, 1,255,255,255, 2,255,255,255, 3,255,255,255 }; + const simd8 tb2{ 4,255,255,255, 5,255,255,255, 6,255,255,255, 7,255,255,255 }; + const simd8 tb3{ 8,255,255,255, 9,255,255,255, 10,255,255,255, 11,255,255,255 }; + const simd8 tb4{ 12,255,255,255, 13,255,255,255, 14,255,255,255, 15,255,255,255 }; + + // encourage store pairing and interleaving + const auto shuf1 = this->apply_lookup_16_to(tb1); + const auto shuf2 = this->apply_lookup_16_to(tb2); + shuf1.store(reinterpret_cast(p)); + shuf2.store(reinterpret_cast(p + 4)); + + const auto shuf3 = this->apply_lookup_16_to(tb3); + const auto shuf4 = this->apply_lookup_16_to(tb4); + shuf3.store(reinterpret_cast(p + 8)); + shuf4.store(reinterpret_cast(p + 12)); } // Conversion from/to SIMD register simdutf_really_inline simd8(const int8x16_t _value) : value{_value} {} simdutf_really_inline operator const int8x16_t&() const { return this->value; } +#ifndef SIMDUTF_REGULAR_VISUAL_STUDIO simdutf_really_inline operator const uint8x16_t() const { return vreinterpretq_u8_s8(this->value); } +#endif simdutf_really_inline operator int8x16_t&() { return this->value; } // Zero constructor @@ -627,7 +678,7 @@ simdutf_really_inline int16x8_t make_int16x8_t(int16_t x1, int16_t x2, int16_t } template - simdutf_really_inline simd8 apply_lookup_16_to(const simd8 original) { + simdutf_really_inline simd8 apply_lookup_16_to(const simd8 original) const { return vqtbl1q_s8(*this, simd8(original)); } }; @@ -678,10 +729,10 @@ simdutf_really_inline int16x8_t make_int16x8_t(int16_t x1, int16_t x2, int16_t } simdutf_really_inline void store_ascii_as_utf32(char32_t * ptr) const { - this->chunks[0].store_ascii_as_utf32(ptr+sizeof(simd8)*0); - this->chunks[1].store_ascii_as_utf32(ptr+sizeof(simd8)*1); - this->chunks[2].store_ascii_as_utf32(ptr+sizeof(simd8)*2); - this->chunks[3].store_ascii_as_utf32(ptr+sizeof(simd8)*3); + this->chunks[0].store_ascii_as_utf32_tbl(ptr+sizeof(simd8)*0); + this->chunks[1].store_ascii_as_utf32_tbl(ptr+sizeof(simd8)*1); + this->chunks[2].store_ascii_as_utf32_tbl(ptr+sizeof(simd8)*2); + this->chunks[3].store_ascii_as_utf32_tbl(ptr+sizeof(simd8)*3); } simdutf_really_inline uint64_t to_bitmask() const { @@ -782,7 +833,6 @@ simdutf_really_inline int16x8_t make_int16x8_t(int16_t x1, int16_t x2, int16_t ).to_bitmask(); } }; // struct simd8x64 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/arm64/simd16-inl.h /* begin file src/simdutf/arm64/simd16-inl.h */ template struct simd16; @@ -869,7 +919,7 @@ struct base16_numeric: base16 { simdutf_really_inline simd16& operator-=(const simd16 other) { *this = *this - other; return *static_cast*>(this); } }; -// Signed words +// Signed code units template<> struct simd16 : base16_numeric { simdutf_really_inline simd16() : base16_numeric() {} @@ -899,7 +949,7 @@ struct simd16 : base16_numeric { -// Unsigned words +// Unsigned code units template<> struct simd16: base16_numeric { simdutf_really_inline simd16() : base16_numeric() {} @@ -942,19 +992,14 @@ struct simd16: base16_numeric { simdutf_really_inline simd16 operator&(const simd16 other) const { return vandq_u16(*this, other); } simdutf_really_inline simd16 operator^(const simd16 other) const { return veorq_u16(*this, other); } - // Pack with the unsigned saturation two uint16_t words into single uint8_t vector + // Pack with the unsigned saturation two uint16_t code units into single uint8_t vector static simdutf_really_inline simd8 pack(const simd16& v0, const simd16& v1) { return vqmovn_high_u16(vqmovn_u16(v0), v1); } // Change the endianness simdutf_really_inline simd16 swap_bytes() const { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t swap = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - #else - const uint8x16_t swap = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - #endif - return vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(*this), swap)); + return vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(*this))); } }; simdutf_really_inline simd16::operator simd16() const { return this->value; } @@ -1095,7 +1140,6 @@ simdutf_really_inline simd16::operator simd16() const { retur #endif // SIMDUTF_ARM64_SIMD_H /* end file src/simdutf/arm64/simd.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/arm64/end.h /* begin file src/simdutf/arm64/end.h */ /* end file src/simdutf/arm64/end.h */ @@ -1103,7 +1147,6 @@ simdutf_really_inline simd16::operator simd16() const { retur #endif // SIMDUTF_ARM64_H /* end file src/simdutf/arm64.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/icelake.h /* begin file src/simdutf/icelake.h */ #ifndef SIMDUTF_ICELAKE_H #define SIMDUTF_ICELAKE_H @@ -1145,7 +1188,7 @@ simdutf_really_inline simd16::operator simd16() const { retur #if SIMDUTF_CAN_ALWAYS_RUN_ICELAKE #define SIMDUTF_TARGET_ICELAKE #else -#define SIMDUTF_TARGET_ICELAKE SIMDUTF_TARGET_REGION("avx512f,avx512dq,avx512cd,avx512bw,avx512vbmi,avx512vbmi2,avx512vl,avx2,bmi,bmi2,pclmul,lzcnt,popcnt") +#define SIMDUTF_TARGET_ICELAKE SIMDUTF_TARGET_REGION("avx512f,avx512dq,avx512cd,avx512bw,avx512vbmi,avx512vbmi2,avx512vl,avx2,bmi,bmi2,pclmul,lzcnt,popcnt,avx512vpopcntdq") #endif namespace simdutf { @@ -1158,7 +1201,6 @@ namespace icelake { // // These two need to be included outside SIMDUTF_TARGET_REGION // -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/icelake/intrinsics.h /* begin file src/simdutf/icelake/intrinsics.h */ #ifndef SIMDUTF_ICELAKE_INTRINSICS_H #define SIMDUTF_ICELAKE_INTRINSICS_H @@ -1227,6 +1269,8 @@ SIMDUTF_POP_DISABLE_WARNINGS #include #include #include +#include +#include // unfortunately, we may not get _blsr_u64, but, thankfully, clang // has it as a macro. #ifndef _blsr_u64 @@ -1268,7 +1312,6 @@ inline __m512i _mm512_set_epi8(uint8_t a0, uint8_t a1, uint8_t a2, uint8_t a3, u #endif // SIMDUTF_HASWELL_INTRINSICS_H /* end file src/simdutf/icelake/intrinsics.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/icelake/implementation.h /* begin file src/simdutf/icelake/implementation.h */ #ifndef SIMDUTF_ICELAKE_IMPLEMENTATION_H #define SIMDUTF_ICELAKE_IMPLEMENTATION_H @@ -1286,7 +1329,7 @@ class implementation final : public simdutf::implementation { simdutf_really_inline implementation() : simdutf::implementation( "icelake", "Intel AVX512 (AVX-512BW, AVX-512CD, AVX-512VL, AVX-512VBMI2 extensions)", - internal::instruction_set::AVX2 | internal::instruction_set::BMI1 | internal::instruction_set::BMI2 | internal::instruction_set::AVX512BW | internal::instruction_set::AVX512CD | internal::instruction_set::AVX512VL | internal::instruction_set::AVX512VBMI2 ) {} + internal::instruction_set::AVX2 | internal::instruction_set::BMI1 | internal::instruction_set::BMI2 | internal::instruction_set::AVX512BW | internal::instruction_set::AVX512CD | internal::instruction_set::AVX512VL | internal::instruction_set::AVX512VBMI2 | internal::instruction_set::AVX512VPOPCNTDQ ) {} simdutf_warn_unused int detect_encodings(const char * input, size_t length) const noexcept final; simdutf_warn_unused bool validate_utf8(const char *buf, size_t len) const noexcept final; simdutf_warn_unused result validate_utf8_with_errors(const char *buf, size_t len) const noexcept final; @@ -1298,6 +1341,13 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused result validate_utf16be_with_errors(const char16_t *buf, size_t len) const noexcept final; simdutf_warn_unused bool validate_utf32(const char32_t *buf, size_t len) const noexcept final; simdutf_warn_unused result validate_utf32_with_errors(const char32_t *buf, size_t len) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf16le(const char * buf, size_t len, char16_t* utf16_buffer) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf16be(const char * buf, size_t len, char16_t* utf16_buffer) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf32(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; + simdutf_warn_unused size_t convert_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused result convert_utf8_to_latin1_with_errors(const char * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final; simdutf_warn_unused size_t convert_utf8_to_utf16le(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; simdutf_warn_unused size_t convert_utf8_to_utf16be(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; simdutf_warn_unused result convert_utf8_to_utf16le_with_errors(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; @@ -1307,6 +1357,12 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t convert_utf8_to_utf32(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; simdutf_warn_unused result convert_utf8_to_utf32_with_errors(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; simdutf_warn_unused size_t convert_valid_utf8_to_utf32(const char * buf, size_t len, char32_t* utf32_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused result convert_utf16le_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused result convert_utf16be_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf16be_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused result convert_utf16le_to_utf8_with_errors(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; @@ -1316,6 +1372,9 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t convert_utf32_to_utf8(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused result convert_utf32_to_utf8_with_errors(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_valid_utf32_to_utf8(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused result convert_utf32_to_latin1_with_errors(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; simdutf_warn_unused size_t convert_utf32_to_utf16le(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf32_to_utf16be(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; simdutf_warn_unused result convert_utf32_to_utf16le_with_errors(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; @@ -1340,6 +1399,12 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t utf8_length_from_utf32(const char32_t * input, size_t length) const noexcept; simdutf_warn_unused size_t utf16_length_from_utf32(const char32_t * input, size_t length) const noexcept; simdutf_warn_unused size_t utf32_length_from_utf8(const char * input, size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf8(const char * input, size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf16(size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf32(size_t length) const noexcept; + simdutf_warn_unused size_t utf32_length_from_latin1(size_t length) const noexcept; + simdutf_warn_unused size_t utf16_length_from_latin1(size_t length) const noexcept; + simdutf_warn_unused size_t utf8_length_from_latin1(const char * input, size_t length) const noexcept; }; } // namespace icelake @@ -1351,7 +1416,6 @@ class implementation final : public simdutf::implementation { // // The rest need to be inside the region // -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/icelake/begin.h /* begin file src/simdutf/icelake/begin.h */ // redefining SIMDUTF_IMPLEMENTATION to "icelake" // #define SIMDUTF_IMPLEMENTATION icelake @@ -1367,7 +1431,6 @@ SIMDUTF_DISABLE_GCC_WARNING(-Wmaybe-uninitialized) #endif // end of workaround /* end file src/simdutf/icelake/begin.h */ // Declarations -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/icelake/bitmanipulation.h /* begin file src/simdutf/icelake/bitmanipulation.h */ #ifndef SIMDUTF_ICELAKE_BITMANIPULATION_H #define SIMDUTF_ICELAKE_BITMANIPULATION_H @@ -1393,7 +1456,6 @@ simdutf_really_inline long long int count_ones(uint64_t input_num) { #endif // SIMDUTF_ICELAKE_BITMANIPULATION_H /* end file src/simdutf/icelake/bitmanipulation.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/icelake/end.h /* begin file src/simdutf/icelake/end.h */ #if SIMDUTF_CAN_ALWAYS_RUN_ICELAKE // nothing needed. @@ -1412,7 +1474,6 @@ SIMDUTF_POP_DISABLE_WARNINGS #endif // SIMDUTF_IMPLEMENTATION_ICELAKE #endif // SIMDUTF_ICELAKE_H /* end file src/simdutf/icelake.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/haswell.h /* begin file src/simdutf/haswell.h */ #ifndef SIMDUTF_HASWELL_H #define SIMDUTF_HASWELL_H @@ -1458,7 +1519,6 @@ namespace haswell { // // These two need to be included outside SIMDUTF_TARGET_REGION // -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/haswell/implementation.h /* begin file src/simdutf/haswell/implementation.h */ #ifndef SIMDUTF_HASWELL_IMPLEMENTATION_H #define SIMDUTF_HASWELL_IMPLEMENTATION_H @@ -1488,6 +1548,13 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused result validate_utf16be_with_errors(const char16_t *buf, size_t len) const noexcept final; simdutf_warn_unused bool validate_utf32(const char32_t *buf, size_t len) const noexcept final; simdutf_warn_unused result validate_utf32_with_errors(const char32_t *buf, size_t len) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf16le(const char * buf, size_t len, char16_t* utf16_buffer) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf16be(const char * buf, size_t len, char16_t* utf16_buffer) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf32(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; + simdutf_warn_unused size_t convert_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused result convert_utf8_to_latin1_with_errors(const char * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final; simdutf_warn_unused size_t convert_utf8_to_utf16le(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; simdutf_warn_unused size_t convert_utf8_to_utf16be(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; simdutf_warn_unused result convert_utf8_to_utf16le_with_errors(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; @@ -1497,6 +1564,12 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t convert_utf8_to_utf32(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; simdutf_warn_unused result convert_utf8_to_utf32_with_errors(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; simdutf_warn_unused size_t convert_valid_utf8_to_utf32(const char * buf, size_t len, char32_t* utf32_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused result convert_utf16le_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused result convert_utf16be_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf16be_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused result convert_utf16le_to_utf8_with_errors(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; @@ -1506,6 +1579,9 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t convert_utf32_to_utf8(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused result convert_utf32_to_utf8_with_errors(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_valid_utf32_to_utf8(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused result convert_utf32_to_latin1_with_errors(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; simdutf_warn_unused size_t convert_utf32_to_utf16le(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf32_to_utf16be(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; simdutf_warn_unused result convert_utf32_to_utf16le_with_errors(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; @@ -1530,6 +1606,12 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t utf8_length_from_utf32(const char32_t * input, size_t length) const noexcept; simdutf_warn_unused size_t utf16_length_from_utf32(const char32_t * input, size_t length) const noexcept; simdutf_warn_unused size_t utf32_length_from_utf8(const char * input, size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf8(const char * input, size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf16(size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf32(size_t length) const noexcept; + simdutf_warn_unused size_t utf32_length_from_latin1(size_t length) const noexcept; + simdutf_warn_unused size_t utf16_length_from_latin1(size_t length) const noexcept; + simdutf_warn_unused size_t utf8_length_from_latin1(const char * input, size_t length) const noexcept; }; } // namespace haswell @@ -1537,7 +1619,6 @@ class implementation final : public simdutf::implementation { #endif // SIMDUTF_HASWELL_IMPLEMENTATION_H /* end file src/simdutf/haswell/implementation.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/haswell/intrinsics.h /* begin file src/simdutf/haswell/intrinsics.h */ #ifndef SIMDUTF_HASWELL_INTRINSICS_H #define SIMDUTF_HASWELL_INTRINSICS_H @@ -1606,7 +1687,6 @@ SIMDUTF_POP_DISABLE_WARNINGS // // The rest need to be inside the region // -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/haswell/begin.h /* begin file src/simdutf/haswell/begin.h */ // redefining SIMDUTF_IMPLEMENTATION to "haswell" // #define SIMDUTF_IMPLEMENTATION haswell @@ -1622,7 +1702,6 @@ SIMDUTF_DISABLE_GCC_WARNING(-Wmaybe-uninitialized) #endif // end of workaround /* end file src/simdutf/haswell/begin.h */ // Declarations -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/haswell/bitmanipulation.h /* begin file src/simdutf/haswell/bitmanipulation.h */ #ifndef SIMDUTF_HASWELL_BITMANIPULATION_H #define SIMDUTF_HASWELL_BITMANIPULATION_H @@ -1648,7 +1727,6 @@ simdutf_really_inline long long int count_ones(uint64_t input_num) { #endif // SIMDUTF_HASWELL_BITMANIPULATION_H /* end file src/simdutf/haswell/bitmanipulation.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/haswell/simd.h /* begin file src/simdutf/haswell/simd.h */ #ifndef SIMDUTF_HASWELL_SIMD_H #define SIMDUTF_HASWELL_SIMD_H @@ -2000,9 +2078,7 @@ namespace simd { return simd8x64( (this->chunks[0] <= mask_high) & (this->chunks[0] >= mask_low), - (this->chunks[1] <= mask_high) & (this->chunks[1] >= mask_low), - (this->chunks[2] <= mask_high) & (this->chunks[2] >= mask_low), - (this->chunks[3] <= mask_high) & (this->chunks[3] >= mask_low) + (this->chunks[1] <= mask_high) & (this->chunks[1] >= mask_low) ).to_bitmask(); } simdutf_really_inline uint64_t not_in_range(const T low, const T high) const { @@ -2044,7 +2120,6 @@ namespace simd { } }; // struct simd8x64 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/haswell/simd16-inl.h /* begin file src/simdutf/haswell/simd16-inl.h */ #ifdef __GNUC__ #if __GNUC__ < 8 @@ -2117,7 +2192,7 @@ struct base16_numeric: base16 { simdutf_really_inline simd16& operator-=(const simd16 other) { *this = *this - other; return *static_cast*>(this); } }; -// Signed words +// Signed code units template<> struct simd16 : base16_numeric { simdutf_really_inline simd16() : base16_numeric() {} @@ -2134,7 +2209,7 @@ struct simd16 : base16_numeric { simdutf_really_inline simd16 operator<(const simd16 other) const { return _mm256_cmpgt_epi16(other, *this); } }; -// Unsigned words +// Unsigned code units template<> struct simd16: base16_numeric { simdutf_really_inline simd16() : base16_numeric() {} @@ -2188,7 +2263,7 @@ struct simd16: base16_numeric { return _mm256_shuffle_epi8(*this, swap); } - // Pack with the unsigned saturation two uint16_t words into single uint8_t vector + // Pack with the unsigned saturation two uint16_t code units into single uint8_t vector static simdutf_really_inline simd8 pack(const simd16& v0, const simd16& v1) { // Note: the AVX2 variant of pack operates on 128-bit lanes, thus // we have to shuffle lanes in order to produce bytes in the @@ -2206,7 +2281,7 @@ struct simd16: base16_numeric { const __m256i t0 = _mm256_set_m128i(lo_1, lo_0); const __m256i t1 = _mm256_set_m128i(hi_1, hi_0); - // pack words in linear order from v0 and v1 + // pack code units in linear order from v0 and v1 return _mm256_packus_epi16(t0, t1); } }; @@ -2291,9 +2366,7 @@ struct simd16: base16_numeric { return simd16x32( (this->chunks[0] <= mask_high) & (this->chunks[0] >= mask_low), - (this->chunks[1] <= mask_high) & (this->chunks[1] >= mask_low), - (this->chunks[2] <= mask_high) & (this->chunks[2] >= mask_low), - (this->chunks[3] <= mask_high) & (this->chunks[3] >= mask_low) + (this->chunks[1] <= mask_high) & (this->chunks[1] >= mask_low) ).to_bitmask(); } simdutf_really_inline uint64_t not_in_range(const T low, const T high) const { @@ -2323,7 +2396,6 @@ struct simd16: base16_numeric { #endif // SIMDUTF_HASWELL_SIMD_H /* end file src/simdutf/haswell/simd.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/haswell/end.h /* begin file src/simdutf/haswell/end.h */ #if SIMDUTF_CAN_ALWAYS_RUN_HASWELL // nothing needed. @@ -2340,7 +2412,6 @@ SIMDUTF_POP_DISABLE_WARNINGS #endif // SIMDUTF_IMPLEMENTATION_HASWELL #endif // SIMDUTF_HASWELL_COMMON_H /* end file src/simdutf/haswell.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/westmere.h /* begin file src/simdutf/westmere.h */ #ifndef SIMDUTF_WESTMERE_H #define SIMDUTF_WESTMERE_H @@ -2381,7 +2452,6 @@ namespace westmere { // // These two need to be included outside SIMDUTF_TARGET_REGION // -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/westmere/implementation.h /* begin file src/simdutf/westmere/implementation.h */ #ifndef SIMDUTF_WESTMERE_IMPLEMENTATION_H #define SIMDUTF_WESTMERE_IMPLEMENTATION_H @@ -2409,6 +2479,13 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused result validate_utf16be_with_errors(const char16_t *buf, size_t len) const noexcept final; simdutf_warn_unused bool validate_utf32(const char32_t *buf, size_t len) const noexcept final; simdutf_warn_unused result validate_utf32_with_errors(const char32_t *buf, size_t len) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf16le(const char * buf, size_t len, char16_t* utf16_buffer) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf16be(const char * buf, size_t len, char16_t* utf16_buffer) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf32(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; + simdutf_warn_unused size_t convert_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused result convert_utf8_to_latin1_with_errors(const char * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final; simdutf_warn_unused size_t convert_utf8_to_utf16le(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; simdutf_warn_unused size_t convert_utf8_to_utf16be(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; simdutf_warn_unused result convert_utf8_to_utf16le_with_errors(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; @@ -2418,6 +2495,12 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t convert_utf8_to_utf32(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; simdutf_warn_unused result convert_utf8_to_utf32_with_errors(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; simdutf_warn_unused size_t convert_valid_utf8_to_utf32(const char * buf, size_t len, char32_t* utf32_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused result convert_utf16le_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused result convert_utf16be_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf16be_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused result convert_utf16le_to_utf8_with_errors(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; @@ -2427,6 +2510,9 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t convert_utf32_to_utf8(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused result convert_utf32_to_utf8_with_errors(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_valid_utf32_to_utf8(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused result convert_utf32_to_latin1_with_errors(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; simdutf_warn_unused size_t convert_utf32_to_utf16le(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf32_to_utf16be(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; simdutf_warn_unused result convert_utf32_to_utf16le_with_errors(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; @@ -2451,6 +2537,12 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t utf8_length_from_utf32(const char32_t * input, size_t length) const noexcept; simdutf_warn_unused size_t utf16_length_from_utf32(const char32_t * input, size_t length) const noexcept; simdutf_warn_unused size_t utf32_length_from_utf8(const char * input, size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf8(const char * input, size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf16(size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf32(size_t length) const noexcept; + simdutf_warn_unused size_t utf32_length_from_latin1(size_t length) const noexcept; + simdutf_warn_unused size_t utf16_length_from_latin1(size_t length) const noexcept; + simdutf_warn_unused size_t utf8_length_from_latin1(const char * input, size_t length) const noexcept; }; } // namespace westmere @@ -2458,7 +2550,6 @@ class implementation final : public simdutf::implementation { #endif // SIMDUTF_WESTMERE_IMPLEMENTATION_H /* end file src/simdutf/westmere/implementation.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/westmere/intrinsics.h /* begin file src/simdutf/westmere/intrinsics.h */ #ifndef SIMDUTF_WESTMERE_INTRINSICS_H #define SIMDUTF_WESTMERE_INTRINSICS_H @@ -2507,7 +2598,6 @@ SIMDUTF_POP_DISABLE_WARNINGS // // The rest need to be inside the region // -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/westmere/begin.h /* begin file src/simdutf/westmere/begin.h */ // redefining SIMDUTF_IMPLEMENTATION to "westmere" // #define SIMDUTF_IMPLEMENTATION westmere @@ -2520,7 +2610,6 @@ SIMDUTF_TARGET_WESTMERE /* end file src/simdutf/westmere/begin.h */ // Declarations -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/westmere/bitmanipulation.h /* begin file src/simdutf/westmere/bitmanipulation.h */ #ifndef SIMDUTF_WESTMERE_BITMANIPULATION_H #define SIMDUTF_WESTMERE_BITMANIPULATION_H @@ -2546,7 +2635,6 @@ simdutf_really_inline long long int count_ones(uint64_t input_num) { #endif // SIMDUTF_WESTMERE_BITMANIPULATION_H /* end file src/simdutf/westmere/bitmanipulation.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/westmere/simd.h /* begin file src/simdutf/westmere/simd.h */ #ifndef SIMDUTF_WESTMERE_SIMD_H #define SIMDUTF_WESTMERE_SIMD_H @@ -2894,10 +2982,10 @@ namespace simd { } simdutf_really_inline uint64_t to_bitmask() const { - uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() ); - uint64_t r1 = this->chunks[1].to_bitmask() ; - uint64_t r2 = this->chunks[2].to_bitmask() ; - uint64_t r3 = this->chunks[3].to_bitmask() ; + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask()); + uint64_t r1 = this->chunks[1].to_bitmask(); + uint64_t r2 = this->chunks[2].to_bitmask(); + uint64_t r3 = this->chunks[3].to_bitmask(); return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); } @@ -2990,7 +3078,6 @@ namespace simd { } }; // struct simd8x64 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/westmere/simd16-inl.h /* begin file src/simdutf/westmere/simd16-inl.h */ template struct simd16; @@ -3054,7 +3141,7 @@ struct base16_numeric: base16 { simdutf_really_inline simd16& operator-=(const simd16 other) { *this = *this - other; return *static_cast*>(this); } }; -// Signed words +// Signed code units template<> struct simd16 : base16_numeric { simdutf_really_inline simd16() : base16_numeric() {} @@ -3077,7 +3164,7 @@ struct simd16 : base16_numeric { simdutf_really_inline simd16 operator<(const simd16 other) const { return _mm_cmpgt_epi16(other, *this); } }; -// Unsigned words +// Unsigned code units template<> struct simd16: base16_numeric { simdutf_really_inline simd16() : base16_numeric() {} @@ -3140,7 +3227,7 @@ struct simd16: base16_numeric { return _mm_shuffle_epi8(*this, swap); } - // Pack with the unsigned saturation two uint16_t words into single uint8_t vector + // Pack with the unsigned saturation two uint16_t code units into single uint8_t vector static simdutf_really_inline simd8 pack(const simd16& v0, const simd16& v1) { return _mm_packus_epi16(v0, v1); } @@ -3183,10 +3270,10 @@ template } simdutf_really_inline uint64_t to_bitmask() const { - uint64_t r0 = uint32_t(this->chunks[0].to_bitmask() ); - uint64_t r1 = this->chunks[1].to_bitmask() ; - uint64_t r2 = this->chunks[2].to_bitmask() ; - uint64_t r3 = this->chunks[3].to_bitmask() ; + uint64_t r0 = uint32_t(this->chunks[0].to_bitmask()); + uint64_t r1 = this->chunks[1].to_bitmask(); + uint64_t r2 = this->chunks[2].to_bitmask(); + uint64_t r3 = this->chunks[3].to_bitmask(); return r0 | (r1 << 16) | (r2 << 32) | (r3 << 48); } @@ -3267,7 +3354,6 @@ template #endif // SIMDUTF_WESTMERE_SIMD_INPUT_H /* end file src/simdutf/westmere/simd.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/westmere/end.h /* begin file src/simdutf/westmere/end.h */ #if SIMDUTF_CAN_ALWAYS_RUN_WESTMERE // nothing needed. @@ -3280,7 +3366,6 @@ SIMDUTF_UNTARGET_REGION #endif // SIMDUTF_IMPLEMENTATION_WESTMERE #endif // SIMDUTF_WESTMERE_COMMON_H /* end file src/simdutf/westmere.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/ppc64.h /* begin file src/simdutf/ppc64.h */ #ifndef SIMDUTF_PPC64_H #define SIMDUTF_PPC64_H @@ -3307,7 +3392,6 @@ namespace ppc64 { } // namespace ppc64 } // namespace simdutf -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/ppc64/implementation.h /* begin file src/simdutf/ppc64/implementation.h */ #ifndef SIMDUTF_PPC64_IMPLEMENTATION_H #define SIMDUTF_PPC64_IMPLEMENTATION_H @@ -3386,14 +3470,12 @@ class implementation final : public simdutf::implementation { #endif // SIMDUTF_PPC64_IMPLEMENTATION_H /* end file src/simdutf/ppc64/implementation.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/ppc64/begin.h /* begin file src/simdutf/ppc64/begin.h */ // redefining SIMDUTF_IMPLEMENTATION to "ppc64" // #define SIMDUTF_IMPLEMENTATION ppc64 /* end file src/simdutf/ppc64/begin.h */ // Declarations -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/ppc64/intrinsics.h /* begin file src/simdutf/ppc64/intrinsics.h */ #ifndef SIMDUTF_PPC64_INTRINSICS_H #define SIMDUTF_PPC64_INTRINSICS_H @@ -3414,7 +3496,6 @@ class implementation final : public simdutf::implementation { #endif // SIMDUTF_PPC64_INTRINSICS_H /* end file src/simdutf/ppc64/intrinsics.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/ppc64/bitmanipulation.h /* begin file src/simdutf/ppc64/bitmanipulation.h */ #ifndef SIMDUTF_PPC64_BITMANIPULATION_H #define SIMDUTF_PPC64_BITMANIPULATION_H @@ -3440,7 +3521,6 @@ simdutf_really_inline int count_ones(uint64_t input_num) { #endif // SIMDUTF_PPC64_BITMANIPULATION_H /* end file src/simdutf/ppc64/bitmanipulation.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/ppc64/simd.h /* begin file src/simdutf/ppc64/simd.h */ #ifndef SIMDUTF_PPC64_SIMD_H #define SIMDUTF_PPC64_SIMD_H @@ -3932,7 +4012,6 @@ template struct simd8x64 { #endif // SIMDUTF_PPC64_SIMD_INPUT_H /* end file src/simdutf/ppc64/simd.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/ppc64/end.h /* begin file src/simdutf/ppc64/end.h */ /* end file src/simdutf/ppc64/end.h */ @@ -3940,7 +4019,6 @@ template struct simd8x64 { #endif // SIMDUTF_PPC64_H /* end file src/simdutf/ppc64.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/fallback.h /* begin file src/simdutf/fallback.h */ #ifndef SIMDUTF_FALLBACK_H #define SIMDUTF_FALLBACK_H @@ -3969,7 +4047,6 @@ namespace fallback { } // namespace fallback } // namespace simdutf -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/fallback/implementation.h /* begin file src/simdutf/fallback/implementation.h */ #ifndef SIMDUTF_FALLBACK_IMPLEMENTATION_H #define SIMDUTF_FALLBACK_IMPLEMENTATION_H @@ -4000,6 +4077,13 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused result validate_utf16be_with_errors(const char16_t *buf, size_t len) const noexcept final; simdutf_warn_unused bool validate_utf32(const char32_t *buf, size_t len) const noexcept final; simdutf_warn_unused result validate_utf32_with_errors(const char32_t *buf, size_t len) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf16le(const char * buf, size_t len, char16_t* utf16_buffer) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf16be(const char * buf, size_t len, char16_t* utf16_buffer) const noexcept final; + simdutf_warn_unused size_t convert_latin1_to_utf32(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; + simdutf_warn_unused size_t convert_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused result convert_utf8_to_latin1_with_errors(const char * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final; simdutf_warn_unused size_t convert_utf8_to_utf16le(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; simdutf_warn_unused size_t convert_utf8_to_utf16be(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; simdutf_warn_unused result convert_utf8_to_utf16le_with_errors(const char * buf, size_t len, char16_t* utf16_output) const noexcept final; @@ -4009,6 +4093,12 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t convert_utf8_to_utf32(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; simdutf_warn_unused result convert_utf8_to_utf32_with_errors(const char * buf, size_t len, char32_t* utf32_output) const noexcept final; simdutf_warn_unused size_t convert_valid_utf8_to_utf32(const char * buf, size_t len, char32_t* utf32_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused result convert_utf16le_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused result convert_utf16be_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf16be_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused result convert_utf16le_to_utf8_with_errors(const char16_t * buf, size_t len, char* utf8_buffer) const noexcept final; @@ -4018,6 +4108,9 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t convert_utf32_to_utf8(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused result convert_utf32_to_utf8_with_errors(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; simdutf_warn_unused size_t convert_valid_utf32_to_utf8(const char32_t * buf, size_t len, char* utf8_buffer) const noexcept final; + simdutf_warn_unused size_t convert_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused result convert_utf32_to_latin1_with_errors(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; + simdutf_warn_unused size_t convert_valid_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final; simdutf_warn_unused size_t convert_utf32_to_utf16le(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; simdutf_warn_unused size_t convert_utf32_to_utf16be(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; simdutf_warn_unused result convert_utf32_to_utf16le_with_errors(const char32_t * buf, size_t len, char16_t* utf16_buffer) const noexcept final; @@ -4042,7 +4135,12 @@ class implementation final : public simdutf::implementation { simdutf_warn_unused size_t utf8_length_from_utf32(const char32_t * input, size_t length) const noexcept; simdutf_warn_unused size_t utf16_length_from_utf32(const char32_t * input, size_t length) const noexcept; simdutf_warn_unused size_t utf32_length_from_utf8(const char * input, size_t length) const noexcept; -}; + simdutf_warn_unused size_t latin1_length_from_utf8(const char * input, size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf16(size_t length) const noexcept; + simdutf_warn_unused size_t latin1_length_from_utf32(size_t length) const noexcept; + simdutf_warn_unused size_t utf32_length_from_latin1(size_t length) const noexcept; + simdutf_warn_unused size_t utf16_length_from_latin1(size_t length) const noexcept; + simdutf_warn_unused size_t utf8_length_from_latin1(const char * input, size_t length) const noexcept;}; } // namespace fallback } // namespace simdutf @@ -4050,14 +4148,12 @@ class implementation final : public simdutf::implementation { #endif // SIMDUTF_FALLBACK_IMPLEMENTATION_H /* end file src/simdutf/fallback/implementation.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/fallback/begin.h /* begin file src/simdutf/fallback/begin.h */ // redefining SIMDUTF_IMPLEMENTATION to "fallback" // #define SIMDUTF_IMPLEMENTATION fallback /* end file src/simdutf/fallback/begin.h */ // Declarations -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/fallback/bitmanipulation.h /* begin file src/simdutf/fallback/bitmanipulation.h */ #ifndef SIMDUTF_FALLBACK_BITMANIPULATION_H #define SIMDUTF_FALLBACK_BITMANIPULATION_H @@ -4068,23 +4164,6 @@ namespace simdutf { namespace fallback { namespace { -#if defined(_MSC_VER) && !defined(_M_ARM64) && !defined(_M_X64) -static inline unsigned char _BitScanForward64(unsigned long* ret, uint64_t x) { - unsigned long x0 = (unsigned long)x, top, bottom; - _BitScanForward(&top, (unsigned long)(x >> 32)); - _BitScanForward(&bottom, x0); - *ret = x0 ? bottom : 32 + top; - return x != 0; -} -static unsigned char _BitScanReverse64(unsigned long* ret, uint64_t x) { - unsigned long x1 = (unsigned long)(x >> 32), top, bottom; - _BitScanReverse(&top, x1); - _BitScanReverse(&bottom, (unsigned long)x); - *ret = x1 ? top + 32 : bottom; - return x != 0; -} -#endif - } // unnamed namespace } // namespace fallback } // namespace simdutf @@ -4092,7 +4171,6 @@ static unsigned char _BitScanReverse64(unsigned long* ret, uint64_t x) { #endif // SIMDUTF_FALLBACK_BITMANIPULATION_H /* end file src/simdutf/fallback/bitmanipulation.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/fallback/end.h /* begin file src/simdutf/fallback/end.h */ /* end file src/simdutf/fallback/end.h */ @@ -4100,100 +4178,469 @@ static unsigned char _BitScanReverse64(unsigned long* ret, uint64_t x) { #endif // SIMDUTF_FALLBACK_H /* end file src/simdutf/fallback.h */ +/* begin file src/scalar/utf8.h */ +#ifndef SIMDUTF_UTF8_H +#define SIMDUTF_UTF8_H + namespace simdutf { -bool implementation::supported_by_runtime_system() const { - uint32_t required_instruction_sets = this->required_instruction_sets(); - uint32_t supported_instruction_sets = internal::detect_supported_architectures(); - return ((supported_instruction_sets & required_instruction_sets) == required_instruction_sets); -} +namespace scalar { +namespace { +namespace utf8 { +#if SIMDUTF_IMPLEMENTATION_FALLBACK +// only used by the fallback kernel. +// credit: based on code from Google Fuchsia (Apache Licensed) +inline simdutf_warn_unused bool validate(const char *buf, size_t len) noexcept { + const uint8_t *data = reinterpret_cast(buf); + uint64_t pos = 0; + uint32_t code_point = 0; + while (pos < len) { + // check of the next 16 bytes are ascii. + uint64_t next_pos = pos + 16; + if (next_pos <= len) { // if it is safe to read 16 more bytes, check that they are ascii + uint64_t v1; + std::memcpy(&v1, data + pos, sizeof(uint64_t)); + uint64_t v2; + std::memcpy(&v2, data + pos + sizeof(uint64_t), sizeof(uint64_t)); + uint64_t v{v1 | v2}; + if ((v & 0x8080808080808080) == 0) { + pos = next_pos; + continue; + } + } + unsigned char byte = data[pos]; -simdutf_warn_unused encoding_type implementation::autodetect_encoding(const char * input, size_t length) const noexcept { - // If there is a BOM, then we trust it. - auto bom_encoding = simdutf::BOM::check_bom(input, length); - if(bom_encoding != encoding_type::unspecified) { return bom_encoding; } - // UTF8 is common, it includes ASCII, and is commonly represented - // without a BOM, so if it fits, go with that. Note that it is still - // possible to get it wrong, we are only 'guessing'. If some has UTF-16 - // data without a BOM, it could pass as UTF-8. - // - // An interesting twist might be to check for UTF-16 ASCII first (every - // other byte is zero). - if(validate_utf8(input, length)) { return encoding_type::UTF8; } - // The next most common encoding that might appear without BOM is probably - // UTF-16LE, so try that next. - if((length % 2) == 0) { - // important: we need to divide by two - if(validate_utf16le(reinterpret_cast(input), length/2)) { return encoding_type::UTF16_LE; } + while (byte < 0b10000000) { + if (++pos == len) { return true; } + byte = data[pos]; } - if((length % 4) == 0) { - if(validate_utf32(reinterpret_cast(input), length/4)) { return encoding_type::UTF32_LE; } + + if ((byte & 0b11100000) == 0b11000000) { + next_pos = pos + 2; + if (next_pos > len) { return false; } + if ((data[pos + 1] & 0b11000000) != 0b10000000) { return false; } + // range check + code_point = (byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); + if ((code_point < 0x80) || (0x7ff < code_point)) { return false; } + } else if ((byte & 0b11110000) == 0b11100000) { + next_pos = pos + 3; + if (next_pos > len) { return false; } + if ((data[pos + 1] & 0b11000000) != 0b10000000) { return false; } + if ((data[pos + 2] & 0b11000000) != 0b10000000) { return false; } + // range check + code_point = (byte & 0b00001111) << 12 | + (data[pos + 1] & 0b00111111) << 6 | + (data[pos + 2] & 0b00111111); + if ((code_point < 0x800) || (0xffff < code_point) || + (0xd7ff < code_point && code_point < 0xe000)) { + return false; + } + } else if ((byte & 0b11111000) == 0b11110000) { // 0b11110000 + next_pos = pos + 4; + if (next_pos > len) { return false; } + if ((data[pos + 1] & 0b11000000) != 0b10000000) { return false; } + if ((data[pos + 2] & 0b11000000) != 0b10000000) { return false; } + if ((data[pos + 3] & 0b11000000) != 0b10000000) { return false; } + // range check + code_point = + (byte & 0b00000111) << 18 | (data[pos + 1] & 0b00111111) << 12 | + (data[pos + 2] & 0b00111111) << 6 | (data[pos + 3] & 0b00111111); + if (code_point <= 0xffff || 0x10ffff < code_point) { return false; } + } else { + // we may have a continuation + return false; } - return encoding_type::unspecified; + pos = next_pos; + } + return true; } - -namespace internal { - -// Static array of known implementations. We're hoping these get baked into the executable -// without requiring a static initializer. - - -#if SIMDUTF_IMPLEMENTATION_ICELAKE -const icelake::implementation icelake_singleton{}; -#endif -#if SIMDUTF_IMPLEMENTATION_HASWELL -const haswell::implementation haswell_singleton{}; -#endif -#if SIMDUTF_IMPLEMENTATION_WESTMERE -const westmere::implementation westmere_singleton{}; -#endif -#if SIMDUTF_IMPLEMENTATION_ARM64 -const arm64::implementation arm64_singleton{}; -#endif -#if SIMDUTF_IMPLEMENTATION_PPC64 -const ppc64::implementation ppc64_singleton{}; -#endif -#if SIMDUTF_IMPLEMENTATION_FALLBACK -const fallback::implementation fallback_singleton{}; #endif -/** - * @private Detects best supported implementation on first use, and sets it - */ -class detect_best_supported_implementation_on_first_use final : public implementation { -public: - const std::string &name() const noexcept final { return set_best()->name(); } - const std::string &description() const noexcept final { return set_best()->description(); } - uint32_t required_instruction_sets() const noexcept final { return set_best()->required_instruction_sets(); } +inline simdutf_warn_unused result validate_with_errors(const char *buf, size_t len) noexcept { + const uint8_t *data = reinterpret_cast(buf); + size_t pos = 0; + uint32_t code_point = 0; + while (pos < len) { + // check of the next 16 bytes are ascii. + size_t next_pos = pos + 16; + if (next_pos <= len) { // if it is safe to read 16 more bytes, check that they are ascii + uint64_t v1; + std::memcpy(&v1, data + pos, sizeof(uint64_t)); + uint64_t v2; + std::memcpy(&v2, data + pos + sizeof(uint64_t), sizeof(uint64_t)); + uint64_t v{v1 | v2}; + if ((v & 0x8080808080808080) == 0) { + pos = next_pos; + continue; + } + } + unsigned char byte = data[pos]; - simdutf_warn_unused int detect_encodings(const char * input, size_t length) const noexcept override { - return set_best()->detect_encodings(input, length); - } + while (byte < 0b10000000) { + if (++pos == len) { return result(error_code::SUCCESS, len); } + byte = data[pos]; + } - simdutf_warn_unused bool validate_utf8(const char * buf, size_t len) const noexcept final override { - return set_best()->validate_utf8(buf, len); + if ((byte & 0b11100000) == 0b11000000) { + next_pos = pos + 2; + if (next_pos > len) { return result(error_code::TOO_SHORT, pos); } + if ((data[pos + 1] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } + // range check + code_point = (byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); + if ((code_point < 0x80) || (0x7ff < code_point)) { return result(error_code::OVERLONG, pos); } + } else if ((byte & 0b11110000) == 0b11100000) { + next_pos = pos + 3; + if (next_pos > len) { return result(error_code::TOO_SHORT, pos); } + if ((data[pos + 1] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } + if ((data[pos + 2] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } + // range check + code_point = (byte & 0b00001111) << 12 | + (data[pos + 1] & 0b00111111) << 6 | + (data[pos + 2] & 0b00111111); + if ((code_point < 0x800) || (0xffff < code_point)) { return result(error_code::OVERLONG, pos);} + if (0xd7ff < code_point && code_point < 0xe000) { return result(error_code::SURROGATE, pos); } + } else if ((byte & 0b11111000) == 0b11110000) { // 0b11110000 + next_pos = pos + 4; + if (next_pos > len) { return result(error_code::TOO_SHORT, pos); } + if ((data[pos + 1] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } + if ((data[pos + 2] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } + if ((data[pos + 3] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } + // range check + code_point = + (byte & 0b00000111) << 18 | (data[pos + 1] & 0b00111111) << 12 | + (data[pos + 2] & 0b00111111) << 6 | (data[pos + 3] & 0b00111111); + if (code_point <= 0xffff) { return result(error_code::OVERLONG, pos); } + if (0x10ffff < code_point) { return result(error_code::TOO_LARGE, pos); } + } else { + // we either have too many continuation bytes or an invalid leading byte + if ((byte & 0b11000000) == 0b10000000) { return result(error_code::TOO_LONG, pos); } + else { return result(error_code::HEADER_BITS, pos); } + } + pos = next_pos; } + return result(error_code::SUCCESS, len); +} - simdutf_warn_unused result validate_utf8_with_errors(const char * buf, size_t len) const noexcept final override { - return set_best()->validate_utf8_with_errors(buf, len); +// Finds the previous leading byte starting backward from buf and validates with errors from there +// Used to pinpoint the location of an error when an invalid chunk is detected +// We assume that the stream starts with a leading byte, and to check that it is the case, we +// ask that you pass a pointer to the start of the stream (start). +inline simdutf_warn_unused result rewind_and_validate_with_errors(const char *start, const char *buf, size_t len) noexcept { + // First check that we start with a leading byte + if ((*start & 0b11000000) == 0b10000000) { + return result(error_code::TOO_LONG, 0); } - - simdutf_warn_unused bool validate_ascii(const char * buf, size_t len) const noexcept final override { - return set_best()->validate_ascii(buf, len); + size_t extra_len{0}; + // A leading byte cannot be further than 4 bytes away + for(int i = 0; i < 5; i++) { + unsigned char byte = *buf; + if ((byte & 0b11000000) != 0b10000000) { + break; + } else { + buf--; + extra_len++; + } } - simdutf_warn_unused result validate_ascii_with_errors(const char * buf, size_t len) const noexcept final override { - return set_best()->validate_ascii_with_errors(buf, len); - } + result res = validate_with_errors(buf, len + extra_len); + res.count -= extra_len; + return res; +} - simdutf_warn_unused bool validate_utf16le(const char16_t * buf, size_t len) const noexcept final override { - return set_best()->validate_utf16le(buf, len); - } +inline size_t count_code_points(const char* buf, size_t len) { + const int8_t * p = reinterpret_cast(buf); + size_t counter{0}; + for(size_t i = 0; i < len; i++) { + // -65 is 0b10111111, anything larger in two-complement's should start a new code point. + if(p[i] > -65) { counter++; } + } + return counter; +} - simdutf_warn_unused bool validate_utf16be(const char16_t * buf, size_t len) const noexcept final override { - return set_best()->validate_utf16be(buf, len); - } +inline size_t utf16_length_from_utf8(const char* buf, size_t len) { + const int8_t * p = reinterpret_cast(buf); + size_t counter{0}; + for(size_t i = 0; i < len; i++) { + if(p[i] > -65) { counter++; } + if(uint8_t(p[i]) >= 240) { counter++; } + } + return counter; +} - simdutf_warn_unused result validate_utf16le_with_errors(const char16_t * buf, size_t len) const noexcept final override { +inline size_t latin1_length_from_utf8(const char *buf, size_t len) { + const uint8_t * c = reinterpret_cast(buf); + + size_t answer = len; + for(size_t i = 0; i < len; i++) { + if((c[i] & 0b11100000) == 0b11000000) { answer--; } // if we have a two-byte UTF8 character + } + return answer; +} + +simdutf_warn_unused inline size_t trim_partial_utf8(const char *input, size_t length) { + if (length < 3) { + switch (length) { + case 2: + if (uint8_t(input[length-1]) >= 0xc0) { return length-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (uint8_t(input[length-2]) >= 0xe0) { return length-2; } // 3- and 4-byte characters with only 2 bytes left + return length; + case 1: + if (uint8_t(input[length-1]) >= 0xc0) { return length-1; } // 2-, 3- and 4-byte characters with only 1 byte left + return length; + case 0: + return length; + } + } + if (uint8_t(input[length-1]) >= 0xc0) { return length-1; } // 2-, 3- and 4-byte characters with only 1 byte left + if (uint8_t(input[length-2]) >= 0xe0) { return length-2; } // 3- and 4-byte characters with only 1 byte left + if (uint8_t(input[length-3]) >= 0xf0) { return length-3; } // 4-byte characters with only 3 bytes left + return length; +} + +} // utf8 namespace +} // unnamed namespace +} // namespace scalar +} // namespace simdutf + +#endif +/* end file src/scalar/utf8.h */ +/* begin file src/scalar/utf16.h */ +#ifndef SIMDUTF_UTF16_H +#define SIMDUTF_UTF16_H + +namespace simdutf { +namespace scalar { +namespace { +namespace utf16 { + +inline simdutf_warn_unused uint16_t swap_bytes(const uint16_t word) { + return uint16_t((word >> 8) | (word << 8)); +} + +template +inline simdutf_warn_unused bool validate(const char16_t *buf, size_t len) noexcept { + const uint16_t *data = reinterpret_cast(buf); + uint64_t pos = 0; + while (pos < len) { + uint16_t word = !match_system(big_endian) ? swap_bytes(data[pos]) : data[pos]; + if((word &0xF800) == 0xD800) { + if(pos + 1 >= len) { return false; } + uint16_t diff = uint16_t(word - 0xD800); + if(diff > 0x3FF) { return false; } + uint16_t next_word = !match_system(big_endian) ? swap_bytes(data[pos + 1]) : data[pos + 1]; + uint16_t diff2 = uint16_t(next_word - 0xDC00); + if(diff2 > 0x3FF) { return false; } + pos += 2; + } else { + pos++; + } + } + return true; +} + +template +inline simdutf_warn_unused result validate_with_errors(const char16_t *buf, size_t len) noexcept { + const uint16_t *data = reinterpret_cast(buf); + size_t pos = 0; + while (pos < len) { + uint16_t word = !match_system(big_endian) ? swap_bytes(data[pos]) : data[pos]; + if((word & 0xF800) == 0xD800) { + if(pos + 1 >= len) { return result(error_code::SURROGATE, pos); } + uint16_t diff = uint16_t(word - 0xD800); + if(diff > 0x3FF) { return result(error_code::SURROGATE, pos); } + uint16_t next_word = !match_system(big_endian) ? swap_bytes(data[pos + 1]) : data[pos + 1]; + uint16_t diff2 = uint16_t(next_word - 0xDC00); + if(diff2 > 0x3FF) { return result(error_code::SURROGATE, pos); } + pos += 2; + } else { + pos++; + } + } + return result(error_code::SUCCESS, pos); +} + +template +inline size_t count_code_points(const char16_t* buf, size_t len) { + // We are not BOM aware. + const uint16_t * p = reinterpret_cast(buf); + size_t counter{0}; + for(size_t i = 0; i < len; i++) { + uint16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; + counter += ((word & 0xFC00) != 0xDC00); + } + return counter; +} + +template +inline size_t utf8_length_from_utf16(const char16_t* buf, size_t len) { + // We are not BOM aware. + const uint16_t * p = reinterpret_cast(buf); + size_t counter{0}; + for(size_t i = 0; i < len; i++) { + uint16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; + counter++; // ASCII + counter += static_cast(word > 0x7F); // non-ASCII is at least 2 bytes, surrogates are 2*2 == 4 bytes + counter += static_cast((word > 0x7FF && word <= 0xD7FF) || (word >= 0xE000)); // three-byte + } + return counter; +} + +template +inline size_t utf32_length_from_utf16(const char16_t* buf, size_t len) { + // We are not BOM aware. + const uint16_t * p = reinterpret_cast(buf); + size_t counter{0}; + for(size_t i = 0; i < len; i++) { + uint16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; + counter += ((word & 0xFC00) != 0xDC00); + } + return counter; +} + + +inline size_t latin1_length_from_utf16(size_t len) { + return len; +} + +simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* out) { + const uint16_t * input = reinterpret_cast(in); + uint16_t * output = reinterpret_cast(out); + for (size_t i = 0; i < size; i++) { + *output++ = uint16_t(input[i] >> 8 | input[i] << 8); + } +} + + +template +simdutf_warn_unused inline size_t trim_partial_utf16(const char16_t* input, size_t length) { + if (length <= 1) { + return length; + } + uint16_t last_word = uint16_t(input[length-1]); + last_word = !match_system(big_endian) ? swap_bytes(last_word) : last_word; + length -= ((last_word & 0xFC00) == 0xD800); + return length; +} + +} // utf16 namespace +} // unnamed namespace +} // namespace scalar +} // namespace simdutf + +#endif +/* end file src/scalar/utf16.h */ + +namespace simdutf { +bool implementation::supported_by_runtime_system() const { + uint32_t required_instruction_sets = this->required_instruction_sets(); + uint32_t supported_instruction_sets = internal::detect_supported_architectures(); + return ((supported_instruction_sets & required_instruction_sets) == required_instruction_sets); +} + +simdutf_warn_unused encoding_type implementation::autodetect_encoding(const char * input, size_t length) const noexcept { + // If there is a BOM, then we trust it. + auto bom_encoding = simdutf::BOM::check_bom(input, length); + if(bom_encoding != encoding_type::unspecified) { return bom_encoding; } + // UTF8 is common, it includes ASCII, and is commonly represented + // without a BOM, so if it fits, go with that. Note that it is still + // possible to get it wrong, we are only 'guessing'. If some has UTF-16 + // data without a BOM, it could pass as UTF-8. + // + // An interesting twist might be to check for UTF-16 ASCII first (every + // other byte is zero). + if(validate_utf8(input, length)) { return encoding_type::UTF8; } + // The next most common encoding that might appear without BOM is probably + // UTF-16LE, so try that next. + if((length % 2) == 0) { + // important: we need to divide by two + if(validate_utf16le(reinterpret_cast(input), length/2)) { return encoding_type::UTF16_LE; } + } + if((length % 4) == 0) { + if(validate_utf32(reinterpret_cast(input), length/4)) { return encoding_type::UTF32_LE; } + } + return encoding_type::unspecified; +} + +namespace internal { + +// Static array of known implementations. We're hoping these get baked into the executable +// without requiring a static initializer. + + +#if SIMDUTF_IMPLEMENTATION_ICELAKE +static const icelake::implementation* get_icelake_singleton() { + static const icelake::implementation icelake_singleton{}; + return &icelake_singleton; +} +#endif +#if SIMDUTF_IMPLEMENTATION_HASWELL +static const haswell::implementation* get_haswell_singleton() { + static const haswell::implementation haswell_singleton{}; + return &haswell_singleton; +} +#endif +#if SIMDUTF_IMPLEMENTATION_WESTMERE +static const westmere::implementation* get_westmere_singleton() { + static const westmere::implementation westmere_singleton{}; + return &westmere_singleton; +} +#endif +#if SIMDUTF_IMPLEMENTATION_ARM64 +static const arm64::implementation* get_arm64_singleton() { + static const arm64::implementation arm64_singleton{}; + return &arm64_singleton; +} +#endif +#if SIMDUTF_IMPLEMENTATION_PPC64 +static const ppc64::implementation* get_ppc64_singleton() { + static const ppc64::implementation ppc64_singleton{}; + return &ppc64_singleton; +} +#endif +#if SIMDUTF_IMPLEMENTATION_FALLBACK +static const fallback::implementation* get_fallback_singleton() { + static const fallback::implementation fallback_singleton{}; + return &fallback_singleton; +} +#endif + +/** + * @private Detects best supported implementation on first use, and sets it + */ +class detect_best_supported_implementation_on_first_use final : public implementation { +public: + const std::string &name() const noexcept final { return set_best()->name(); } + const std::string &description() const noexcept final { return set_best()->description(); } + uint32_t required_instruction_sets() const noexcept final { return set_best()->required_instruction_sets(); } + + simdutf_warn_unused int detect_encodings(const char * input, size_t length) const noexcept override { + return set_best()->detect_encodings(input, length); + } + + simdutf_warn_unused bool validate_utf8(const char * buf, size_t len) const noexcept final override { + return set_best()->validate_utf8(buf, len); + } + + simdutf_warn_unused result validate_utf8_with_errors(const char * buf, size_t len) const noexcept final override { + return set_best()->validate_utf8_with_errors(buf, len); + } + + simdutf_warn_unused bool validate_ascii(const char * buf, size_t len) const noexcept final override { + return set_best()->validate_ascii(buf, len); + } + + simdutf_warn_unused result validate_ascii_with_errors(const char * buf, size_t len) const noexcept final override { + return set_best()->validate_ascii_with_errors(buf, len); + } + + simdutf_warn_unused bool validate_utf16le(const char16_t * buf, size_t len) const noexcept final override { + return set_best()->validate_utf16le(buf, len); + } + + simdutf_warn_unused bool validate_utf16be(const char16_t * buf, size_t len) const noexcept final override { + return set_best()->validate_utf16be(buf, len); + } + + simdutf_warn_unused result validate_utf16le_with_errors(const char16_t * buf, size_t len) const noexcept final override { return set_best()->validate_utf16le_with_errors(buf, len); } @@ -4209,6 +4656,34 @@ class detect_best_supported_implementation_on_first_use final : public implement return set_best()->validate_utf32_with_errors(buf, len); } + simdutf_warn_unused size_t convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) const noexcept final override { + return set_best()->convert_latin1_to_utf8(buf, len,utf8_output); + } + + simdutf_warn_unused size_t convert_latin1_to_utf16le(const char * buf, size_t len, char16_t* utf16_output) const noexcept final override { + return set_best()->convert_latin1_to_utf16le(buf, len, utf16_output); + } + + simdutf_warn_unused size_t convert_latin1_to_utf16be(const char * buf, size_t len, char16_t* utf16_output) const noexcept final override { + return set_best()->convert_latin1_to_utf16be(buf, len, utf16_output); + } + + simdutf_warn_unused size_t convert_latin1_to_utf32(const char * buf, size_t len, char32_t * latin1_output) const noexcept final override { + return set_best()->convert_latin1_to_utf32(buf, len,latin1_output); + } + + simdutf_warn_unused size_t convert_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_utf8_to_latin1(buf, len,latin1_output); + } + + simdutf_warn_unused result convert_utf8_to_latin1_with_errors(const char* buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_utf8_to_latin1_with_errors(buf, len, latin1_output); + } + + simdutf_warn_unused size_t convert_valid_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_valid_utf8_to_latin1(buf, len,latin1_output); + } + simdutf_warn_unused size_t convert_utf8_to_utf16le(const char * buf, size_t len, char16_t* utf16_output) const noexcept final override { return set_best()->convert_utf8_to_utf16le(buf, len, utf16_output); } @@ -4245,6 +4720,30 @@ class detect_best_supported_implementation_on_first_use final : public implement return set_best()->convert_valid_utf8_to_utf32(buf, len, utf32_output); } + simdutf_warn_unused size_t convert_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_utf16le_to_latin1(buf, len, latin1_output); + } + + simdutf_warn_unused size_t convert_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_utf16be_to_latin1(buf, len, latin1_output); + } + + simdutf_warn_unused result convert_utf16le_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_utf16le_to_latin1_with_errors(buf, len, latin1_output); + } + + simdutf_warn_unused result convert_utf16be_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_utf16be_to_latin1_with_errors(buf, len, latin1_output); + } + + simdutf_warn_unused size_t convert_valid_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_valid_utf16le_to_latin1(buf, len, latin1_output); + } + + simdutf_warn_unused size_t convert_valid_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_valid_utf16be_to_latin1(buf, len, latin1_output); + } + simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t * buf, size_t len, char* utf8_output) const noexcept final override { return set_best()->convert_utf16le_to_utf8(buf, len, utf8_output); } @@ -4269,6 +4768,18 @@ class detect_best_supported_implementation_on_first_use final : public implement return set_best()->convert_valid_utf16be_to_utf8(buf, len, utf8_output); } + simdutf_warn_unused size_t convert_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_utf32_to_latin1(buf, len,latin1_output); + } + + simdutf_warn_unused result convert_utf32_to_latin1_with_errors(const char32_t * buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_utf32_to_latin1_with_errors(buf, len,latin1_output); + } + + simdutf_warn_unused size_t convert_valid_utf32_to_latin1(const char32_t * buf, size_t len, char* latin1_output) const noexcept final override { + return set_best()->convert_utf32_to_latin1(buf, len,latin1_output); + } + simdutf_warn_unused size_t convert_utf32_to_utf8(const char32_t * buf, size_t len, char* utf8_output) const noexcept final override { return set_best()->convert_utf32_to_utf8(buf, len, utf8_output); } @@ -4345,6 +4856,22 @@ class detect_best_supported_implementation_on_first_use final : public implement return set_best()->count_utf8(buf, len); } + simdutf_warn_unused size_t latin1_length_from_utf8(const char * buf, size_t len) const noexcept override { + return set_best()->latin1_length_from_utf8(buf, len); + } + + simdutf_warn_unused size_t latin1_length_from_utf16(size_t len) const noexcept override { + return set_best()->latin1_length_from_utf16(len); + } + + simdutf_warn_unused size_t latin1_length_from_utf32(size_t len) const noexcept override { + return set_best()->latin1_length_from_utf32(len); + } + + simdutf_warn_unused size_t utf8_length_from_latin1(const char * buf, size_t len) const noexcept override { + return set_best()->utf8_length_from_latin1(buf, len); + } + simdutf_warn_unused size_t utf8_length_from_utf16le(const char16_t * buf, size_t len) const noexcept override { return set_best()->utf8_length_from_utf16le(buf, len); } @@ -4353,6 +4880,14 @@ class detect_best_supported_implementation_on_first_use final : public implement return set_best()->utf8_length_from_utf16be(buf, len); } + simdutf_warn_unused size_t utf16_length_from_latin1(size_t len) const noexcept override { + return set_best()->utf16_length_from_latin1(len); + } + + simdutf_warn_unused size_t utf32_length_from_latin1(size_t len) const noexcept override { + return set_best()->utf32_length_from_latin1(len); + } + simdutf_warn_unused size_t utf32_length_from_utf16le(const char16_t * buf, size_t len) const noexcept override { return set_best()->utf32_length_from_utf16le(buf, len); } @@ -4383,27 +4918,29 @@ class detect_best_supported_implementation_on_first_use final : public implement const implementation *set_best() const noexcept; }; - -const std::initializer_list available_implementation_pointers { +static const std::initializer_list& get_available_implementation_pointers() { + static const std::initializer_list available_implementation_pointers { #if SIMDUTF_IMPLEMENTATION_ICELAKE - &icelake_singleton, + get_icelake_singleton(), #endif #if SIMDUTF_IMPLEMENTATION_HASWELL - &haswell_singleton, + get_haswell_singleton(), #endif #if SIMDUTF_IMPLEMENTATION_WESTMERE - &westmere_singleton, + get_westmere_singleton(), #endif #if SIMDUTF_IMPLEMENTATION_ARM64 - &arm64_singleton, + get_arm64_singleton(), #endif #if SIMDUTF_IMPLEMENTATION_PPC64 - &ppc64_singleton, + get_ppc64_singleton(), #endif #if SIMDUTF_IMPLEMENTATION_FALLBACK - &fallback_singleton, + get_fallback_singleton(), #endif -}; // available_implementation_pointers + }; // available_implementation_pointers + return available_implementation_pointers; +} // So we can return UNSUPPORTED_ARCHITECTURE from the parser when there is no support class unsupported_implementation final : public implementation { @@ -4459,6 +4996,34 @@ class unsupported_implementation final : public implementation { return result(error_code::OTHER, 0); } + simdutf_warn_unused size_t convert_latin1_to_utf8(const char*, size_t, char*) const noexcept final override { + return 0; + } + + simdutf_warn_unused size_t convert_latin1_to_utf16le(const char*, size_t, char16_t*) const noexcept final override { + return 0; + } + + simdutf_warn_unused size_t convert_latin1_to_utf16be(const char*, size_t, char16_t*) const noexcept final override { + return 0; + } + + simdutf_warn_unused size_t convert_latin1_to_utf32(const char*, size_t, char32_t*) const noexcept final override { + return 0; + } + + simdutf_warn_unused size_t convert_utf8_to_latin1(const char*, size_t, char*) const noexcept final override { + return 0; + } + + simdutf_warn_unused result convert_utf8_to_latin1_with_errors(const char*, size_t, char*) const noexcept final override { + return result(error_code::OTHER, 0); + } + + simdutf_warn_unused size_t convert_valid_utf8_to_latin1(const char*, size_t, char*) const noexcept final override { + return 0; + } + simdutf_warn_unused size_t convert_utf8_to_utf16le(const char*, size_t, char16_t*) const noexcept final override { return 0; } @@ -4495,6 +5060,30 @@ class unsupported_implementation final : public implementation { return 0; } + simdutf_warn_unused size_t convert_utf16le_to_latin1(const char16_t*, size_t, char*) const noexcept final override { + return 0; + } + + simdutf_warn_unused size_t convert_utf16be_to_latin1(const char16_t*, size_t, char*) const noexcept final override { + return 0; + } + + simdutf_warn_unused result convert_utf16le_to_latin1_with_errors(const char16_t*, size_t, char*) const noexcept final override { + return result(error_code::OTHER, 0); + } + + simdutf_warn_unused result convert_utf16be_to_latin1_with_errors(const char16_t*, size_t, char*) const noexcept final override { + return result(error_code::OTHER, 0); + } + + simdutf_warn_unused size_t convert_valid_utf16le_to_latin1(const char16_t*, size_t, char*) const noexcept final override { + return 0; + } + + simdutf_warn_unused size_t convert_valid_utf16be_to_latin1(const char16_t*, size_t, char*) const noexcept final override { + return 0; + } + simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t*, size_t, char*) const noexcept final override { return 0; } @@ -4519,6 +5108,18 @@ class unsupported_implementation final : public implementation { return 0; } + simdutf_warn_unused size_t convert_utf32_to_latin1(const char32_t *, size_t, char* ) const noexcept final override { + return 0; + } + + simdutf_warn_unused result convert_utf32_to_latin1_with_errors(const char32_t *, size_t, char* ) const noexcept final override { + return result(error_code::OTHER, 0); + } + + simdutf_warn_unused size_t convert_valid_utf32_to_latin1(const char32_t *, size_t, char* ) const noexcept final override { + return 0; + } + simdutf_warn_unused size_t convert_utf32_to_utf8(const char32_t*, size_t, char*) const noexcept final override { return 0; } @@ -4595,6 +5196,21 @@ class unsupported_implementation final : public implementation { return 0; } + simdutf_warn_unused size_t latin1_length_from_utf8(const char *, size_t) const noexcept override { + return 0; + } + + simdutf_warn_unused size_t latin1_length_from_utf16(size_t) const noexcept override { + return 0; + } + + simdutf_warn_unused size_t latin1_length_from_utf32(size_t) const noexcept override { + return 0; + } + simdutf_warn_unused size_t utf8_length_from_latin1(const char *, size_t) const noexcept override { + return 0; + } + simdutf_warn_unused size_t utf8_length_from_utf16le(const char16_t *, size_t) const noexcept override { return 0; } @@ -4611,10 +5227,16 @@ class unsupported_implementation final : public implementation { return 0; } - simdutf_warn_unused size_t utf16_length_from_utf8(const char *, size_t) const noexcept override { + simdutf_warn_unused size_t utf32_length_from_latin1(size_t) const noexcept override { return 0; } + simdutf_warn_unused size_t utf16_length_from_utf8(const char *, size_t) const noexcept override { + return 0; + } + simdutf_warn_unused size_t utf16_length_from_latin1(size_t) const noexcept override { + return 0; + } simdutf_warn_unused size_t utf8_length_from_utf32(const char32_t *, size_t) const noexcept override { return 0; } @@ -4633,18 +5255,18 @@ class unsupported_implementation final : public implementation { const unsupported_implementation unsupported_singleton{}; size_t available_implementation_list::size() const noexcept { - return internal::available_implementation_pointers.size(); + return internal::get_available_implementation_pointers().size(); } const implementation * const *available_implementation_list::begin() const noexcept { - return internal::available_implementation_pointers.begin(); + return internal::get_available_implementation_pointers().begin(); } const implementation * const *available_implementation_list::end() const noexcept { - return internal::available_implementation_pointers.end(); + return internal::get_available_implementation_pointers().end(); } const implementation *available_implementation_list::detect_best_supported() const noexcept { // They are prelisted in priority order, so we just go down the list uint32_t supported_instruction_sets = internal::detect_supported_architectures(); - for (const implementation *impl : internal::available_implementation_pointers) { + for (const implementation *impl : internal::get_available_implementation_pointers()) { uint32_t required_instruction_sets = impl->required_instruction_sets(); if ((supported_instruction_sets & required_instruction_sets) == required_instruction_sets) { return impl; } } @@ -4709,6 +5331,27 @@ simdutf_warn_unused size_t convert_utf8_to_utf16(const char * input, size_t leng return convert_utf8_to_utf16le(input, length, utf16_output); #endif } +simdutf_warn_unused size_t convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) noexcept { + return get_active_implementation()->convert_latin1_to_utf8(buf, len,utf8_output); +} +simdutf_warn_unused size_t convert_latin1_to_utf16le(const char * buf, size_t len, char16_t* utf16_output) noexcept { + return get_active_implementation()->convert_latin1_to_utf16le(buf, len, utf16_output); +} +simdutf_warn_unused size_t convert_latin1_to_utf16be(const char * buf, size_t len, char16_t* utf16_output) noexcept{ + return get_active_implementation()->convert_latin1_to_utf16be(buf, len, utf16_output); +} +simdutf_warn_unused size_t convert_latin1_to_utf32(const char * buf, size_t len, char32_t * latin1_output) noexcept { + return get_active_implementation()->convert_latin1_to_utf32(buf, len,latin1_output); +} +simdutf_warn_unused size_t convert_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) noexcept { + return get_active_implementation()->convert_utf8_to_latin1(buf, len,latin1_output); +} +simdutf_warn_unused result convert_utf8_to_latin1_with_errors(const char* buf, size_t len, char* latin1_output) noexcept { + return get_active_implementation()->convert_utf8_to_latin1_with_errors(buf, len, latin1_output); +} +simdutf_warn_unused size_t convert_valid_utf8_to_latin1(const char * buf, size_t len, char* latin1_output) noexcept { + return get_active_implementation()->convert_valid_utf8_to_latin1(buf, len,latin1_output); +} simdutf_warn_unused size_t convert_utf8_to_utf16le(const char * input, size_t length, char16_t* utf16_output) noexcept { return get_active_implementation()->convert_utf8_to_utf16le(input, length, utf16_output); } @@ -4789,6 +5432,38 @@ simdutf_warn_unused size_t convert_utf16_to_utf8(const char16_t * buf, size_t le return convert_utf16le_to_utf8(buf, len, utf8_buffer); #endif } +simdutf_warn_unused size_t convert_utf16_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) noexcept { + #if SIMDUTF_IS_BIG_ENDIAN + return convert_utf16be_to_latin1(buf, len, latin1_buffer); + #else + return convert_utf16le_to_latin1(buf, len, latin1_buffer); + #endif +} +simdutf_warn_unused size_t convert_latin1_to_utf16(const char * buf, size_t len, char16_t* utf16_output) noexcept { + #if SIMDUTF_IS_BIG_ENDIAN + return convert_latin1_to_utf16be(buf, len, utf16_output); + #else + return convert_latin1_to_utf16le(buf, len, utf16_output); + #endif +} +simdutf_warn_unused size_t convert_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) noexcept { + return get_active_implementation()->convert_utf16be_to_latin1(buf, len, latin1_buffer); +} +simdutf_warn_unused size_t convert_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) noexcept { + return get_active_implementation()->convert_utf16le_to_latin1(buf, len, latin1_buffer); +} +simdutf_warn_unused size_t convert_valid_utf16be_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) noexcept { + return get_active_implementation()->convert_valid_utf16be_to_latin1(buf, len, latin1_buffer); +} +simdutf_warn_unused size_t convert_valid_utf16le_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) noexcept { + return get_active_implementation()->convert_valid_utf16le_to_latin1(buf, len, latin1_buffer); +} +simdutf_warn_unused result convert_utf16le_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) noexcept { + return get_active_implementation()->convert_utf16le_to_latin1_with_errors(buf, len, latin1_buffer); +} +simdutf_warn_unused result convert_utf16be_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) noexcept { + return get_active_implementation()->convert_utf16be_to_latin1_with_errors(buf, len, latin1_buffer); +} simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) noexcept { return get_active_implementation()->convert_utf16le_to_utf8(buf, len, utf8_buffer); } @@ -4802,6 +5477,13 @@ simdutf_warn_unused result convert_utf16_to_utf8_with_errors(const char16_t * bu return convert_utf16le_to_utf8_with_errors(buf, len, utf8_buffer); #endif } +simdutf_warn_unused result convert_utf16_to_latin1_with_errors(const char16_t * buf, size_t len, char* latin1_buffer) noexcept { + #if SIMDUTF_IS_BIG_ENDIAN + return convert_utf16be_to_latin1_with_errors(buf, len, latin1_buffer); + #else + return convert_utf16le_to_latin1_with_errors(buf, len, latin1_buffer); + #endif +} simdutf_warn_unused result convert_utf16le_to_utf8_with_errors(const char16_t * buf, size_t len, char* utf8_buffer) noexcept { return get_active_implementation()->convert_utf16le_to_utf8_with_errors(buf, len, utf8_buffer); } @@ -4815,6 +5497,13 @@ simdutf_warn_unused size_t convert_valid_utf16_to_utf8(const char16_t * buf, siz return convert_valid_utf16le_to_utf8(buf, len, utf8_buffer); #endif } +simdutf_warn_unused size_t convert_valid_utf16_to_latin1(const char16_t * buf, size_t len, char* latin1_buffer) noexcept { + #if SIMDUTF_IS_BIG_ENDIAN + return convert_valid_utf16be_to_latin1(buf, len, latin1_buffer); + #else + return convert_valid_utf16le_to_latin1(buf, len, latin1_buffer); + #endif +} simdutf_warn_unused size_t convert_valid_utf16le_to_utf8(const char16_t * buf, size_t len, char* utf8_buffer) noexcept { return get_active_implementation()->convert_valid_utf16le_to_utf8(buf, len, utf8_buffer); } @@ -4837,6 +5526,9 @@ simdutf_warn_unused size_t convert_utf32_to_utf16(const char32_t * buf, size_t l return convert_utf32_to_utf16le(buf, len, utf16_buffer); #endif } +simdutf_warn_unused size_t convert_utf32_to_latin1(const char32_t * input, size_t length, char* latin1_output) noexcept { + return get_active_implementation()->convert_utf32_to_latin1(input, length, latin1_output); +} simdutf_warn_unused size_t convert_utf32_to_utf16le(const char32_t * buf, size_t len, char16_t* utf16_buffer) noexcept { return get_active_implementation()->convert_utf32_to_utf16le(buf, len, utf16_buffer); } @@ -4927,6 +5619,18 @@ simdutf_warn_unused size_t count_utf16be(const char16_t * input, size_t length) simdutf_warn_unused size_t count_utf8(const char * input, size_t length) noexcept { return get_active_implementation()->count_utf8(input, length); } +simdutf_warn_unused size_t latin1_length_from_utf8(const char * buf, size_t len) noexcept { + return get_active_implementation()->latin1_length_from_utf8(buf, len); +} +simdutf_warn_unused size_t latin1_length_from_utf16(size_t len) noexcept { + return get_active_implementation()->latin1_length_from_utf16(len); +} +simdutf_warn_unused size_t latin1_length_from_utf32(size_t len) noexcept { + return get_active_implementation()->latin1_length_from_utf32(len); +} +simdutf_warn_unused size_t utf8_length_from_latin1(const char * buf, size_t len) noexcept { + return get_active_implementation()->utf8_length_from_latin1(buf, len); +} simdutf_warn_unused size_t utf8_length_from_utf16(const char16_t * input, size_t length) noexcept { #if SIMDUTF_IS_BIG_ENDIAN return utf8_length_from_utf16be(input, length); @@ -4956,6 +5660,9 @@ simdutf_warn_unused size_t utf32_length_from_utf16be(const char16_t * input, siz simdutf_warn_unused size_t utf16_length_from_utf8(const char * input, size_t length) noexcept { return get_active_implementation()->utf16_length_from_utf8(input, length); } +simdutf_warn_unused size_t utf16_length_from_latin1(size_t length) noexcept { + return get_active_implementation()->utf16_length_from_latin1(length); +} simdutf_warn_unused size_t utf8_length_from_utf32(const char32_t * input, size_t length) noexcept { return get_active_implementation()->utf8_length_from_utf32(input, length); } @@ -4971,17 +5678,34 @@ simdutf_warn_unused simdutf::encoding_type autodetect_encoding(const char * buf, simdutf_warn_unused int detect_encodings(const char * buf, size_t length) noexcept { return get_active_implementation()->detect_encodings(buf, length); } - const implementation * builtin_implementation() { static const implementation * builtin_impl = get_available_implementations()[SIMDUTF_STRINGIFY(SIMDUTF_BUILTIN_IMPLEMENTATION)]; return builtin_impl; } +simdutf_warn_unused size_t trim_partial_utf8(const char *input, size_t length) { + return scalar::utf8::trim_partial_utf8(input, length); +} + +simdutf_warn_unused size_t trim_partial_utf16be(const char16_t* input, size_t length) { + return scalar::utf16::trim_partial_utf16(input, length); +} + +simdutf_warn_unused size_t trim_partial_utf16le(const char16_t* input, size_t length) { + return scalar::utf16::trim_partial_utf16(input, length); +} + +simdutf_warn_unused size_t trim_partial_utf16(const char16_t* input, size_t length) { + #if SIMDUTF_IS_BIG_ENDIAN + return trim_partial_utf16be(input, length); + #else + return trim_partial_utf16le(input, length); + #endif +} } // namespace simdutf /* end file src/implementation.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=encoding_types.cpp /* begin file src/encoding_types.cpp */ namespace simdutf { @@ -5043,7 +5767,6 @@ encoding_type check_bom(const char* byte, size_t length) { } } /* end file src/encoding_types.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=error.cpp /* begin file src/error.cpp */ namespace simdutf { @@ -5055,7 +5778,6 @@ namespace simdutf { /* end file src/error.cpp */ // The large tables should be included once and they // should not depend on a kernel. -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=tables/utf8_to_utf16_tables.h /* begin file src/tables/utf8_to_utf16_tables.h */ #ifndef SIMDUTF_UTF8_TO_UTF16_TABLES_H #define SIMDUTF_UTF8_TO_UTF16_TABLES_H @@ -9394,7 +10116,6 @@ const uint8_t utf8bigindex[4096][2] = #endif // SIMDUTF_UTF8_TO_UTF16_TABLES_H /* end file src/tables/utf8_to_utf16_tables.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=tables/utf16_to_utf8_tables.h /* begin file src/tables/utf16_to_utf8_tables.h */ // file generated by scripts/sse_convert_utf16_to_utf8.py #ifndef SIMDUTF_UTF16_TO_UTF8_TABLES_H @@ -9935,7 +10656,6 @@ namespace utf16_to_utf8 { // End of tables. // The scalar routines should be included once. -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/ascii.h /* begin file src/scalar/ascii.h */ #ifndef SIMDUTF_ASCII_H #define SIMDUTF_ASCII_H @@ -9950,7 +10670,7 @@ inline simdutf_warn_unused bool validate(const char *buf, size_t len) noexcept { const uint8_t *data = reinterpret_cast(buf); uint64_t pos = 0; // process in blocks of 16 bytes when possible - for (;pos + 16 < len; pos += 16) { + for (;pos + 16 <= len; pos += 16) { uint64_t v1; std::memcpy(&v1, data + pos, sizeof(uint64_t)); uint64_t v2; @@ -9970,7 +10690,7 @@ inline simdutf_warn_unused result validate_with_errors(const char *buf, size_t l const uint8_t *data = reinterpret_cast(buf); size_t pos = 0; // process in blocks of 16 bytes when possible - for (;pos + 16 < len; pos += 16) { + for (;pos + 16 <= len; pos += 16) { uint64_t v1; std::memcpy(&v1, data + pos, sizeof(uint64_t)); uint64_t v2; @@ -9996,379 +10716,106 @@ inline simdutf_warn_unused result validate_with_errors(const char *buf, size_t l #endif /* end file src/scalar/ascii.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf8.h -/* begin file src/scalar/utf8.h */ -#ifndef SIMDUTF_UTF8_H -#define SIMDUTF_UTF8_H +/* begin file src/scalar/utf32.h */ +#ifndef SIMDUTF_UTF32_H +#define SIMDUTF_UTF32_H namespace simdutf { namespace scalar { namespace { -namespace utf8 { -#if SIMDUTF_IMPLEMENTATION_FALLBACK -// only used by the fallback kernel. -// credit: based on code from Google Fuchsia (Apache Licensed) -inline simdutf_warn_unused bool validate(const char *buf, size_t len) noexcept { - const uint8_t *data = reinterpret_cast(buf); - uint64_t pos = 0; - uint32_t code_point = 0; - while (pos < len) { - // check of the next 8 bytes are ascii. - uint64_t next_pos = pos + 16; - if (next_pos <= len) { // if it is safe to read 8 more bytes, check that they are ascii - uint64_t v1; - std::memcpy(&v1, data + pos, sizeof(uint64_t)); - uint64_t v2; - std::memcpy(&v2, data + pos + sizeof(uint64_t), sizeof(uint64_t)); - uint64_t v{v1 | v2}; - if ((v & 0x8080808080808080) == 0) { - pos = next_pos; - continue; - } - } - unsigned char byte = data[pos]; - - while (byte < 0b10000000) { - if (++pos == len) { return true; } - byte = data[pos]; - } +namespace utf32 { - if ((byte & 0b11100000) == 0b11000000) { - next_pos = pos + 2; - if (next_pos > len) { return false; } - if ((data[pos + 1] & 0b11000000) != 0b10000000) { return false; } - // range check - code_point = (byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); - if ((code_point < 0x80) || (0x7ff < code_point)) { return false; } - } else if ((byte & 0b11110000) == 0b11100000) { - next_pos = pos + 3; - if (next_pos > len) { return false; } - if ((data[pos + 1] & 0b11000000) != 0b10000000) { return false; } - if ((data[pos + 2] & 0b11000000) != 0b10000000) { return false; } - // range check - code_point = (byte & 0b00001111) << 12 | - (data[pos + 1] & 0b00111111) << 6 | - (data[pos + 2] & 0b00111111); - if ((code_point < 0x800) || (0xffff < code_point) || - (0xd7ff < code_point && code_point < 0xe000)) { +inline simdutf_warn_unused bool validate(const char32_t *buf, size_t len) noexcept { + const uint32_t *data = reinterpret_cast(buf); + uint64_t pos = 0; + for(;pos < len; pos++) { + uint32_t word = data[pos]; + if(word > 0x10FFFF || (word >= 0xD800 && word <= 0xDFFF)) { return false; - } - } else if ((byte & 0b11111000) == 0b11110000) { // 0b11110000 - next_pos = pos + 4; - if (next_pos > len) { return false; } - if ((data[pos + 1] & 0b11000000) != 0b10000000) { return false; } - if ((data[pos + 2] & 0b11000000) != 0b10000000) { return false; } - if ((data[pos + 3] & 0b11000000) != 0b10000000) { return false; } - // range check - code_point = - (byte & 0b00000111) << 18 | (data[pos + 1] & 0b00111111) << 12 | - (data[pos + 2] & 0b00111111) << 6 | (data[pos + 3] & 0b00111111); - if (code_point <= 0xffff || 0x10ffff < code_point) { return false; } - } else { - // we may have a continuation - return false; } - pos = next_pos; } return true; } -#endif -inline simdutf_warn_unused result validate_with_errors(const char *buf, size_t len) noexcept { - const uint8_t *data = reinterpret_cast(buf); +inline simdutf_warn_unused result validate_with_errors(const char32_t *buf, size_t len) noexcept { + const uint32_t *data = reinterpret_cast(buf); size_t pos = 0; - uint32_t code_point = 0; - while (pos < len) { - // check of the next 8 bytes are ascii. - size_t next_pos = pos + 16; - if (next_pos <= len) { // if it is safe to read 8 more bytes, check that they are ascii - uint64_t v1; - std::memcpy(&v1, data + pos, sizeof(uint64_t)); - uint64_t v2; - std::memcpy(&v2, data + pos + sizeof(uint64_t), sizeof(uint64_t)); - uint64_t v{v1 | v2}; - if ((v & 0x8080808080808080) == 0) { - pos = next_pos; - continue; - } + for(;pos < len; pos++) { + uint32_t word = data[pos]; + if(word > 0x10FFFF) { + return result(error_code::TOO_LARGE, pos); } - unsigned char byte = data[pos]; - - while (byte < 0b10000000) { - if (++pos == len) { return result(error_code::SUCCESS, len); } - byte = data[pos]; + if(word >= 0xD800 && word <= 0xDFFF) { + return result(error_code::SURROGATE, pos); } + } + return result(error_code::SUCCESS, pos); +} - if ((byte & 0b11100000) == 0b11000000) { - next_pos = pos + 2; - if (next_pos > len) { return result(error_code::TOO_SHORT, pos); } - if ((data[pos + 1] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } - // range check - code_point = (byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); - if ((code_point < 0x80) || (0x7ff < code_point)) { return result(error_code::OVERLONG, pos); } - } else if ((byte & 0b11110000) == 0b11100000) { - next_pos = pos + 3; - if (next_pos > len) { return result(error_code::TOO_SHORT, pos); } - if ((data[pos + 1] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } - if ((data[pos + 2] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } - // range check - code_point = (byte & 0b00001111) << 12 | - (data[pos + 1] & 0b00111111) << 6 | - (data[pos + 2] & 0b00111111); - if ((code_point < 0x800) || (0xffff < code_point)) { return result(error_code::OVERLONG, pos);} - if (0xd7ff < code_point && code_point < 0xe000) { return result(error_code::SURROGATE, pos); } - } else if ((byte & 0b11111000) == 0b11110000) { // 0b11110000 - next_pos = pos + 4; - if (next_pos > len) { return result(error_code::TOO_SHORT, pos); } - if ((data[pos + 1] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } - if ((data[pos + 2] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } - if ((data[pos + 3] & 0b11000000) != 0b10000000) { return result(error_code::TOO_SHORT, pos); } - // range check - code_point = - (byte & 0b00000111) << 18 | (data[pos + 1] & 0b00111111) << 12 | - (data[pos + 2] & 0b00111111) << 6 | (data[pos + 3] & 0b00111111); - if (code_point <= 0xffff) { return result(error_code::OVERLONG, pos); } - if (0x10ffff < code_point) { return result(error_code::TOO_LARGE, pos); } - } else { - // we either have too many continuation bytes or an invalid leading byte - if ((byte & 0b11000000) == 0b10000000) { return result(error_code::TOO_LONG, pos); } - else { return result(error_code::HEADER_BITS, pos); } - } - pos = next_pos; - } - return result(error_code::SUCCESS, len); -} - -// Finds the previous leading byte and validates with errors from there -// Used to pinpoint the location of an error when an invalid chunk is detected -inline simdutf_warn_unused result rewind_and_validate_with_errors(const char *start, const char *buf, size_t len) noexcept { - // First check that we start with a leading byte - if ((*start & 0b11000000) == 0b10000000) { - return result(error_code::TOO_LONG, 0); - } - size_t extra_len{0}; - // A leading byte cannot be further than 4 bytes away - for(int i = 0; i < 5; i++) { - unsigned char byte = *buf; - if ((byte & 0b11000000) != 0b10000000) { - break; - } else { - buf--; - extra_len++; - } - } - - result res = validate_with_errors(buf, len + extra_len); - res.count -= extra_len; - return res; -} - -inline size_t count_code_points(const char* buf, size_t len) { - const int8_t * p = reinterpret_cast(buf); - size_t counter{0}; - for(size_t i = 0; i < len; i++) { - // -65 is 0b10111111, anything larger in two-complement's should start a new code point. - if(p[i] > -65) { counter++; } - } - return counter; -} - -inline size_t utf16_length_from_utf8(const char* buf, size_t len) { - const int8_t * p = reinterpret_cast(buf); - size_t counter{0}; - for(size_t i = 0; i < len; i++) { - if(p[i] > -65) { counter++; } - if(uint8_t(p[i]) >= 240) { counter++; } - } - return counter; -} - -} // utf8 namespace -} // unnamed namespace -} // namespace scalar -} // namespace simdutf - -#endif -/* end file src/scalar/utf8.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf16.h -/* begin file src/scalar/utf16.h */ -#ifndef SIMDUTF_UTF16_H -#define SIMDUTF_UTF16_H - -namespace simdutf { -namespace scalar { -namespace { -namespace utf16 { - -inline simdutf_warn_unused uint16_t swap_bytes(const uint16_t word) { - return uint16_t((word >> 8) | (word << 8)); -} - -template -inline simdutf_warn_unused bool validate(const char16_t *buf, size_t len) noexcept { - const uint16_t *data = reinterpret_cast(buf); - uint64_t pos = 0; - while (pos < len) { - uint16_t word = !match_system(big_endian) ? swap_bytes(data[pos]) : data[pos]; - if((word &0xF800) == 0xD800) { - if(pos + 1 >= len) { return false; } - uint16_t diff = uint16_t(word - 0xD800); - if(diff > 0x3FF) { return false; } - uint16_t next_word = !match_system(big_endian) ? swap_bytes(data[pos + 1]) : data[pos + 1]; - uint16_t diff2 = uint16_t(next_word - 0xDC00); - if(diff2 > 0x3FF) { return false; } - pos += 2; - } else { - pos++; - } - } - return true; -} - -template -inline simdutf_warn_unused result validate_with_errors(const char16_t *buf, size_t len) noexcept { - const uint16_t *data = reinterpret_cast(buf); - size_t pos = 0; - while (pos < len) { - uint16_t word = !match_system(big_endian) ? swap_bytes(data[pos]) : data[pos]; - if((word & 0xF800) == 0xD800) { - if(pos + 1 >= len) { return result(error_code::SURROGATE, pos); } - uint16_t diff = uint16_t(word - 0xD800); - if(diff > 0x3FF) { return result(error_code::SURROGATE, pos); } - uint16_t next_word = !match_system(big_endian) ? swap_bytes(data[pos + 1]) : data[pos + 1]; - uint16_t diff2 = uint16_t(next_word - 0xDC00); - if(diff2 > 0x3FF) { return result(error_code::SURROGATE, pos); } - pos += 2; - } else { - pos++; - } - } - return result(error_code::SUCCESS, pos); -} - -template -inline size_t count_code_points(const char16_t* buf, size_t len) { +inline size_t utf8_length_from_utf32(const char32_t* buf, size_t len) { // We are not BOM aware. - const uint16_t * p = reinterpret_cast(buf); + const uint32_t * p = reinterpret_cast(buf); size_t counter{0}; for(size_t i = 0; i < len; i++) { - uint16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; - counter += ((word & 0xFC00) != 0xDC00); + // credit: @ttsugriy for the vectorizable approach + counter++; // ASCII + counter += static_cast(p[i] > 0x7F); // two-byte + counter += static_cast(p[i] > 0x7FF); // three-byte + counter += static_cast(p[i] > 0xFFFF); // four-bytes } return counter; } -template -inline size_t utf8_length_from_utf16(const char16_t* buf, size_t len) { +inline size_t utf16_length_from_utf32(const char32_t* buf, size_t len) { // We are not BOM aware. - const uint16_t * p = reinterpret_cast(buf); + const uint32_t * p = reinterpret_cast(buf); size_t counter{0}; for(size_t i = 0; i < len; i++) { - uint16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; - /** ASCII **/ - if(word <= 0x7F) { counter++; } - /** two-byte **/ - else if (word <= 0x7FF) { counter += 2; } - /** three-byte **/ - else if((word <= 0xD7FF) || (word >= 0xE000)) { counter += 3; } - /** surrogates -- 4 bytes **/ - else { counter += 2; } + counter++; // non-surrogate word + counter += static_cast(p[i] > 0xFFFF); // surrogate pair } return counter; } -template -inline size_t utf32_length_from_utf16(const char16_t* buf, size_t len) { +inline size_t latin1_length_from_utf32(size_t len) { // We are not BOM aware. - const uint16_t * p = reinterpret_cast(buf); - size_t counter{0}; - for(size_t i = 0; i < len; i++) { - uint16_t word = !match_system(big_endian) ? swap_bytes(p[i]) : p[i]; - counter += ((word & 0xFC00) != 0xDC00); - } - return counter; + return len; // a utf32 codepoint will always represent 1 latin1 character } -simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* out) { - const uint16_t * input = reinterpret_cast(in); - uint16_t * output = reinterpret_cast(out); - for (size_t i = 0; i < size; i++) { - *output++ = uint16_t(input[i] >> 8 | input[i] << 8); - } -} -} // utf16 namespace + +} // utf32 namespace } // unnamed namespace } // namespace scalar } // namespace simdutf #endif -/* end file src/scalar/utf16.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf32.h -/* begin file src/scalar/utf32.h */ -#ifndef SIMDUTF_UTF32_H -#define SIMDUTF_UTF32_H +/* end file src/scalar/utf32.h */ +/* begin file src/scalar/latin1.h */ +#ifndef SIMDUTF_LATIN1_H +#define SIMDUTF_LATIN1_H namespace simdutf { namespace scalar { namespace { -namespace utf32 { - -inline simdutf_warn_unused bool validate(const char32_t *buf, size_t len) noexcept { - const uint32_t *data = reinterpret_cast(buf); - uint64_t pos = 0; - for(;pos < len; pos++) { - uint32_t word = data[pos]; - if(word > 0x10FFFF || (word >= 0xD800 && word <= 0xDFFF)) { - return false; - } - } - return true; -} +namespace latin1 { -inline simdutf_warn_unused result validate_with_errors(const char32_t *buf, size_t len) noexcept { - const uint32_t *data = reinterpret_cast(buf); - size_t pos = 0; - for(;pos < len; pos++) { - uint32_t word = data[pos]; - if(word > 0x10FFFF) { - return result(error_code::TOO_LARGE, pos); - } - if(word >= 0xD800 && word <= 0xDFFF) { - return result(error_code::SURROGATE, pos); - } - } - return result(error_code::SUCCESS, pos); +inline size_t utf32_length_from_latin1(size_t len) { + // We are not BOM aware. + return len; // a utf32 unit will always represent 1 latin1 character } -inline size_t utf8_length_from_utf32(const char32_t* buf, size_t len) { - // We are not BOM aware. - const uint32_t * p = reinterpret_cast(buf); - size_t counter{0}; - for(size_t i = 0; i < len; i++) { - /** ASCII **/ - if(p[i] <= 0x7F) { counter++; } - /** two-byte **/ - else if(p[i] <= 0x7FF) { counter += 2; } - /** three-byte **/ - else if(p[i] <= 0xFFFF) { counter += 3; } - /** four-bytes **/ - else { counter += 4; } +inline size_t utf8_length_from_latin1(const char *buf, size_t len) { + const uint8_t * c = reinterpret_cast(buf); + size_t answer = 0; + for(size_t i = 0; i>7)) { answer++; } } - return counter; + return answer + len; } -inline size_t utf16_length_from_utf32(const char32_t* buf, size_t len) { - // We are not BOM aware. - const uint32_t * p = reinterpret_cast(buf); - size_t counter{0}; - for(size_t i = 0; i < len; i++) { - /** non-surrogate word **/ - if(p[i] <= 0xFFFF) { counter++; } - /** surrogate pair **/ - else { counter += 2; } - } - return counter; +inline size_t utf16_length_from_latin1(size_t len) { + return len; } } // utf32 namespace @@ -10377,9 +10824,8 @@ inline size_t utf16_length_from_utf32(const char32_t* buf, size_t len) { } // namespace simdutf #endif -/* end file src/scalar/utf32.h */ +/* end file src/scalar/latin1.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf32_to_utf8/valid_utf32_to_utf8.h /* begin file src/scalar/utf32_to_utf8/valid_utf32_to_utf8.h */ #ifndef SIMDUTF_VALID_UTF32_TO_UTF8_H #define SIMDUTF_VALID_UTF32_TO_UTF8_H @@ -10446,7 +10892,6 @@ inline size_t convert_valid(const char32_t* buf, size_t len, char* utf8_output) #endif /* end file src/scalar/utf32_to_utf8/valid_utf32_to_utf8.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf32_to_utf8/utf32_to_utf8.h /* begin file src/scalar/utf32_to_utf8/utf32_to_utf8.h */ #ifndef SIMDUTF_UTF32_TO_UTF8_H #define SIMDUTF_UTF32_TO_UTF8_H @@ -10562,7 +11007,6 @@ inline result convert_with_errors(const char32_t* buf, size_t len, char* utf8_ou #endif /* end file src/scalar/utf32_to_utf8/utf32_to_utf8.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf32_to_utf16/valid_utf32_to_utf16.h /* begin file src/scalar/utf32_to_utf16/valid_utf32_to_utf16.h */ #ifndef SIMDUTF_VALID_UTF32_TO_UTF16_H #define SIMDUTF_VALID_UTF32_TO_UTF16_H @@ -10607,7 +11051,6 @@ inline size_t convert_valid(const char32_t* buf, size_t len, char16_t* utf16_out #endif /* end file src/scalar/utf32_to_utf16/valid_utf32_to_utf16.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf32_to_utf16/utf32_to_utf16.h /* begin file src/scalar/utf32_to_utf16/utf32_to_utf16.h */ #ifndef SIMDUTF_UTF32_TO_UTF16_H #define SIMDUTF_UTF32_TO_UTF16_H @@ -10683,7 +11126,6 @@ inline result convert_with_errors(const char32_t* buf, size_t len, char16_t* utf #endif /* end file src/scalar/utf32_to_utf16/utf32_to_utf16.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf16_to_utf8/valid_utf16_to_utf8.h /* begin file src/scalar/utf16_to_utf8/valid_utf16_to_utf8.h */ #ifndef SIMDUTF_VALID_UTF16_TO_UTF8_H #define SIMDUTF_VALID_UTF16_TO_UTF8_H @@ -10703,7 +11145,7 @@ inline size_t convert_valid(const char16_t* buf, size_t len, char* utf8_output) if (pos + 4 <= len) { // if it is safe to read 8 more bytes, check that they are ascii uint64_t v; ::memcpy(&v, data + pos, sizeof(uint64_t)); - if (!match_system(big_endian)) v = (v >> 8) | (v << (64 - 8)); + if (!match_system(big_endian)) { v = (v >> 8) | (v << (64 - 8)); } if ((v & 0xFF80FF80FF80FF80) == 0) { size_t final_pos = pos + 4; while(pos < final_pos) { @@ -10758,7 +11200,6 @@ inline size_t convert_valid(const char16_t* buf, size_t len, char* utf8_output) #endif /* end file src/scalar/utf16_to_utf8/valid_utf16_to_utf8.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf16_to_utf8/utf16_to_utf8.h /* begin file src/scalar/utf16_to_utf8/utf16_to_utf8.h */ #ifndef SIMDUTF_UTF16_TO_UTF8_H #define SIMDUTF_UTF16_TO_UTF8_H @@ -10774,11 +11215,11 @@ inline size_t convert(const char16_t* buf, size_t len, char* utf8_output) { size_t pos = 0; char* start{utf8_output}; while (pos < len) { - // try to convert the next block of 8 ASCII characters + // try to convert the next block of 8 bytes if (pos + 4 <= len) { // if it is safe to read 8 more bytes, check that they are ascii uint64_t v; ::memcpy(&v, data + pos, sizeof(uint64_t)); - if (!match_system(big_endian)) v = (v >> 8) | (v << (64 - 8)); + if (!match_system(big_endian)) { v = (v >> 8) | (v << (64 - 8)); } if ((v & 0xFF80FF80FF80FF80) == 0) { size_t final_pos = pos + 4; while(pos < final_pos) { @@ -10833,7 +11274,7 @@ inline result convert_with_errors(const char16_t* buf, size_t len, char* utf8_ou size_t pos = 0; char* start{utf8_output}; while (pos < len) { - // try to convert the next block of 8 ASCII characters + // try to convert the next block of 8 bytes if (pos + 4 <= len) { // if it is safe to read 8 more bytes, check that they are ascii uint64_t v; ::memcpy(&v, data + pos, sizeof(uint64_t)); @@ -10894,7 +11335,6 @@ inline result convert_with_errors(const char16_t* buf, size_t len, char* utf8_ou #endif /* end file src/scalar/utf16_to_utf8/utf16_to_utf8.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf16_to_utf32/valid_utf16_to_utf32.h /* begin file src/scalar/utf16_to_utf32/valid_utf16_to_utf32.h */ #ifndef SIMDUTF_VALID_UTF16_TO_UTF32_H #define SIMDUTF_VALID_UTF16_TO_UTF32_H @@ -10936,7 +11376,6 @@ inline size_t convert_valid(const char16_t* buf, size_t len, char32_t* utf32_out #endif /* end file src/scalar/utf16_to_utf32/valid_utf16_to_utf32.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf16_to_utf32/utf16_to_utf32.h /* begin file src/scalar/utf16_to_utf32/utf16_to_utf32.h */ #ifndef SIMDUTF_UTF16_TO_UTF32_H #define SIMDUTF_UTF16_TO_UTF32_H @@ -11008,7 +11447,6 @@ inline result convert_with_errors(const char16_t* buf, size_t len, char32_t* utf #endif /* end file src/scalar/utf16_to_utf32/utf16_to_utf32.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf8_to_utf16/valid_utf8_to_utf16.h /* begin file src/scalar/utf8_to_utf16/valid_utf8_to_utf16.h */ #ifndef SIMDUTF_VALID_UTF8_TO_UTF16_H #define SIMDUTF_VALID_UTF8_TO_UTF16_H @@ -11093,7 +11531,6 @@ inline size_t convert_valid(const char* buf, size_t len, char16_t* utf16_output) #endif /* end file src/scalar/utf8_to_utf16/valid_utf8_to_utf16.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf8_to_utf16/utf8_to_utf16.h /* begin file src/scalar/utf8_to_utf16/utf8_to_utf16.h */ #ifndef SIMDUTF_UTF8_TO_UTF16_H #define SIMDUTF_UTF8_TO_UTF16_H @@ -11343,7 +11780,6 @@ inline result rewind_and_convert_with_errors(size_t prior_bytes, const char* buf #endif /* end file src/scalar/utf8_to_utf16/utf8_to_utf16.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf8_to_utf32/valid_utf8_to_utf32.h /* begin file src/scalar/utf8_to_utf32/valid_utf8_to_utf32.h */ #ifndef SIMDUTF_VALID_UTF8_TO_UTF32_H #define SIMDUTF_VALID_UTF8_TO_UTF32_H @@ -11409,7 +11845,6 @@ inline size_t convert_valid(const char* buf, size_t len, char32_t* utf32_output) #endif /* end file src/scalar/utf8_to_utf32/valid_utf8_to_utf32.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=scalar/utf8_to_utf32/utf8_to_utf32.h /* begin file src/scalar/utf8_to_utf32/utf8_to_utf32.h */ #ifndef SIMDUTF_UTF8_TO_UTF32_H #define SIMDUTF_UTF8_TO_UTF32_H @@ -11621,4345 +12056,5997 @@ inline result rewind_and_convert_with_errors(size_t prior_bytes, const char* buf #endif /* end file src/scalar/utf8_to_utf32/utf8_to_utf32.h */ -// - - -SIMDUTF_PUSH_DISABLE_WARNINGS -SIMDUTF_DISABLE_UNDESIRED_WARNINGS +/* begin file src/scalar/latin1_to_utf8/latin1_to_utf8.h */ +#ifndef SIMDUTF_LATIN1_TO_UTF8_H +#define SIMDUTF_LATIN1_TO_UTF8_H -#if SIMDUTF_IMPLEMENTATION_ARM64 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=arm64/implementation.cpp -/* begin file src/arm64/implementation.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/arm64/begin.h -/* begin file src/simdutf/arm64/begin.h */ -// redefining SIMDUTF_IMPLEMENTATION to "arm64" -// #define SIMDUTF_IMPLEMENTATION arm64 -/* end file src/simdutf/arm64/begin.h */ namespace simdutf { -namespace arm64 { +namespace scalar { namespace { -#ifndef SIMDUTF_ARM64_H -#error "arm64.h must be included" -#endif -using namespace simd; +namespace latin1_to_utf8 { -simdutf_really_inline bool is_ascii(const simd8x64& input) { - simd8 bits = input.reduce_or(); - return bits.max_val() < 0b10000000u; -} +inline size_t convert(const char* buf, size_t len, char* utf8_output) { + const unsigned char *data = reinterpret_cast(buf); + size_t pos = 0; + char* start{utf8_output}; + while (pos < len) { + // try to convert the next block of 16 ASCII bytes + if (pos + 16 <= len) { // if it is safe to read 16 more bytes, check that they are ascii + uint64_t v1; + ::memcpy(&v1, data + pos, sizeof(uint64_t)); + uint64_t v2; + ::memcpy(&v2, data + pos + sizeof(uint64_t), sizeof(uint64_t)); + uint64_t v{v1 | v2}; // We are only interested in these bits: 1000 1000 1000 1000, so it makes sense to concatenate everything + if ((v & 0x8080808080808080) == 0) { // if NONE of these are set, e.g. all of them are zero, then everything is ASCII + size_t final_pos = pos + 16; + while(pos < final_pos) { + *utf8_output++ = char(buf[pos]); + pos++; + } + continue; + } + } -simdutf_unused simdutf_really_inline simd8 must_be_continuation(const simd8 prev1, const simd8 prev2, const simd8 prev3) { - simd8 is_second_byte = prev1 >= uint8_t(0b11000000u); - simd8 is_third_byte = prev2 >= uint8_t(0b11100000u); - simd8 is_fourth_byte = prev3 >= uint8_t(0b11110000u); - // Use ^ instead of | for is_*_byte, because ^ is commutative, and the caller is using ^ as well. - // This will work fine because we only have to report errors for cases with 0-1 lead bytes. - // Multiple lead bytes implies 2 overlapping multibyte characters, and if that happens, there is - // guaranteed to be at least *one* lead byte that is part of only 1 other multibyte character. - // The error will be detected there. - return is_second_byte ^ is_third_byte ^ is_fourth_byte; + unsigned char byte = data[pos]; + if((byte & 0x80) == 0) { // if ASCII + // will generate one UTF-8 bytes + *utf8_output++ = char(byte); + pos++; + } else { + // will generate two UTF-8 bytes + *utf8_output++ = char((byte>>6) | 0b11000000); + *utf8_output++ = char((byte & 0b111111) | 0b10000000); + pos++; + } + } + return utf8_output - start; } -simdutf_really_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3) { - simd8 is_third_byte = prev2 >= uint8_t(0b11100000u); - simd8 is_fourth_byte = prev3 >= uint8_t(0b11110000u); - return is_third_byte ^ is_fourth_byte; -} +} // latin1_to_utf8 namespace +} // unnamed namespace +} // namespace scalar +} // namespace simdutf -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=arm64/arm_detect_encodings.cpp -/* begin file src/arm64/arm_detect_encodings.cpp */ -template -// len is known to be a multiple of 2 when this is called -int arm_detect_encodings(const char * buf, size_t len) { - const char* start = buf; - const char* end = buf + len; +#endif +/* end file src/scalar/latin1_to_utf8/latin1_to_utf8.h */ +/* begin file src/scalar/latin1_to_utf16/latin1_to_utf16.h */ +#ifndef SIMDUTF_LATIN1_TO_UTF16_H +#define SIMDUTF_LATIN1_TO_UTF16_H - bool is_utf8 = true; - bool is_utf16 = true; - bool is_utf32 = true; +namespace simdutf { +namespace scalar { +namespace { +namespace latin1_to_utf16 { - int out = 0; +template +inline size_t convert(const char* buf, size_t len, char16_t* utf16_output) { + const uint8_t* data = reinterpret_cast(buf); + size_t pos = 0; + char16_t* start{ utf16_output }; - const auto v_d8 = simd8::splat(0xd8); - const auto v_f8 = simd8::splat(0xf8); + while (pos < len) { + uint16_t word = uint16_t(data[pos]); // extend Latin-1 char to 16-bit Unicode code point + *utf16_output++ = char16_t(match_system(big_endian) ? word : utf16::swap_bytes(word)); + pos++; + } - uint32x4_t currentmax = vmovq_n_u32(0x0); + return utf16_output - start; +} - checker check{}; +template +inline result convert_with_errors(const char* buf, size_t len, char16_t* utf16_output) { + const uint8_t* data = reinterpret_cast(buf); + size_t pos = 0; + char16_t* start{ utf16_output }; - while(buf + 64 <= end) { - uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); - uint16x8_t secondin = vld1q_u16(reinterpret_cast(buf) + simd16::SIZE / sizeof(char16_t)); - uint16x8_t thirdin = vld1q_u16(reinterpret_cast(buf) + 2*simd16::SIZE / sizeof(char16_t)); - uint16x8_t fourthin = vld1q_u16(reinterpret_cast(buf) + 3*simd16::SIZE / sizeof(char16_t)); + while (pos < len) { + uint16_t word = uint16_t(data[pos]); // extend Latin-1 char to 16-bit Unicode code point + *utf16_output++ = char16_t(match_system(big_endian) ? word : utf16::swap_bytes(word)); + pos++; + } - const auto u0 = simd16(in); - const auto u1 = simd16(secondin); - const auto u2 = simd16(thirdin); - const auto u3 = simd16(fourthin); + return result(error_code::SUCCESS, utf16_output - start); +} - const auto v0 = u0.shr<8>(); - const auto v1 = u1.shr<8>(); - const auto v2 = u2.shr<8>(); - const auto v3 = u3.shr<8>(); +} // latin1_to_utf16 namespace +} // unnamed namespace +} // namespace scalar +} // namespace simdutf - const auto in16 = simd16::pack(v0, v1); - const auto nextin16 = simd16::pack(v2, v3); +#endif +/* end file src/scalar/latin1_to_utf16/latin1_to_utf16.h */ +/* begin file src/scalar/latin1_to_utf32/latin1_to_utf32.h */ +#ifndef SIMDUTF_LATIN1_TO_UTF32_H +#define SIMDUTF_LATIN1_TO_UTF32_H - const uint64_t surrogates_wordmask0 = ((in16 & v_f8) == v_d8).to_bitmask64(); - const uint64_t surrogates_wordmask1 = ((nextin16 & v_f8) == v_d8).to_bitmask64(); +namespace simdutf { +namespace scalar { +namespace { +namespace latin1_to_utf32 { - // Check for surrogates - if (surrogates_wordmask0 != 0 || surrogates_wordmask1 != 0) { - // Cannot be UTF8 - is_utf8 = false; - // Can still be either UTF-16LE or UTF-32 depending on the positions of the surrogates - // To be valid UTF-32, a surrogate cannot be in the two most significant bytes of any 32-bit word. - // On the other hand, to be valid UTF-16LE, at least one surrogate must be in the two most significant - // bytes of a 32-bit word since they always come in pairs in UTF-16LE. - // Note that we always proceed in multiple of 4 before this point so there is no offset in 32-bit words. - if (((surrogates_wordmask0 | surrogates_wordmask1) & 0xf0f0f0f0f0f0f0f0) != 0) { - is_utf32 = false; - // Code from arm_validate_utf16le.cpp - // Not efficient, we do not process surrogates_wordmask1 - const char16_t * input = reinterpret_cast(buf); - const char16_t* end16 = reinterpret_cast(start) + len/2; +inline size_t convert(const char *buf, size_t len, char32_t *utf32_output) { + const unsigned char *data = reinterpret_cast(buf); + char32_t* start{utf32_output}; + for (size_t i = 0; i < len; i++) { + *utf32_output++ = (char32_t)data[i]; + } + return utf32_output - start; +} - const auto v_fc = simd8::splat(0xfc); - const auto v_dc = simd8::splat(0xdc); +inline result convert_with_errors(const char32_t *buf, size_t len, char32_t *utf32_output) { + const uint32_t *data = reinterpret_cast(buf); + char32_t* start{utf32_output}; + for (size_t i = 0; i < len; i++) { + *utf32_output++ = (char32_t)data[i]; + } + return result(error_code::SUCCESS, utf32_output - start); +} - const uint64_t V0 = ~surrogates_wordmask0; +} // latin1_to_utf32 namespace +} // unnamed namespace +} // namespace scalar +} // namespace simdutf - const auto vH0 = ((in16 & v_fc) == v_dc); - const uint64_t H0 = vH0.to_bitmask64(); +#endif +/* end file src/scalar/latin1_to_utf32/latin1_to_utf32.h */ - const uint64_t L0 = ~H0 & surrogates_wordmask0; +/* begin file src/scalar/utf8_to_latin1/utf8_to_latin1.h */ +#ifndef SIMDUTF_UTF8_TO_LATIN1_H +#define SIMDUTF_UTF8_TO_LATIN1_H +#include - const uint64_t a0 = L0 & (H0 >> 4); +namespace simdutf { +namespace scalar { +namespace { +namespace utf8_to_latin1 { - const uint64_t b0 = a0 << 4; +inline size_t convert(const char* buf, size_t len, char* latin_output) { + const uint8_t *data = reinterpret_cast(buf); + size_t pos = 0; + char* start{latin_output}; - const uint64_t c0 = V0 | a0 | b0; - if (c0 == ~0ull) { - input += 16; - } else if (c0 == 0xfffffffffffffffull) { - input += 15; - } else { - is_utf16 = false; - break; - } + while (pos < len) { + // try to convert the next block of 16 ASCII bytes + if (pos + 16 <= len) { // if it is safe to read 16 more bytes, check that they are ascii + uint64_t v1; + ::memcpy(&v1, data + pos, sizeof(uint64_t)); + uint64_t v2; + ::memcpy(&v2, data + pos + sizeof(uint64_t), sizeof(uint64_t)); + uint64_t v{v1 | v2}; // We are only interested in these bits: 1000 1000 1000 1000 .... etc + if ((v & 0x8080808080808080) == 0) { // if NONE of these are set, e.g. all of them are zero, then everything is ASCII + size_t final_pos = pos + 16; + while(pos < final_pos) { + *latin_output++ = char(buf[pos]); + pos++; + } + continue; + } + } - while (input + 16 < end16) { - const auto in0 = simd16(input); - const auto in1 = simd16(input + simd16::SIZE / sizeof(char16_t)); - const auto t0 = in0.shr<8>(); - const auto t1 = in1.shr<8>(); - const simd8 in_16 = simd16::pack(t0, t1); + // suppose it is not an all ASCII byte sequence + uint8_t leading_byte = data[pos]; // leading byte + if (leading_byte < 0b10000000) { + // converting one ASCII byte !!! + *latin_output++ = char(leading_byte); + pos++; + } else if ((leading_byte & 0b11100000) == 0b11000000) { // the first three bits indicate: + // We have a two-byte UTF-8 + if(pos + 1 >= len) { + return 0; + } // minimal bound checking + if ((data[pos + 1] & 0b11000000) != 0b10000000) { return 0; } // checks if the next byte is a valid continuation byte in UTF-8. A valid continuation byte starts with 10. + // range check - + uint32_t code_point = (leading_byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); // assembles the Unicode code point from the two bytes. It does this by discarding the leading 110 and 10 bits from the two bytes, shifting the remaining bits of the first byte, and then combining the results with a bitwise OR operation. + if (code_point < 0x80 || 0xFF < code_point) { + return 0; // We only care about the range 129-255 which is Non-ASCII latin1 characters. A code_point beneath 0x80 is invalid as it's already covered by bytes whose leading bit is zero. + } + *latin_output++ = char(code_point); + pos += 2; + } else { + return 0; + } + } + return latin_output - start; +} - const uint64_t surrogates_wordmask = ((in_16 & v_f8) == v_d8).to_bitmask64(); - if(surrogates_wordmask == 0) { - input += 16; - } else { - const uint64_t V = ~surrogates_wordmask; +inline result convert_with_errors(const char* buf, size_t len, char* latin_output) { + const uint8_t *data = reinterpret_cast(buf); + size_t pos = 0; + char* start{latin_output}; - const auto vH = ((in_16 & v_fc) == v_dc); - const uint64_t H = vH.to_bitmask64(); + while (pos < len) { + // try to convert the next block of 16 ASCII bytes + if (pos + 16 <= len) { // if it is safe to read 16 more bytes, check that they are ascii + uint64_t v1; + ::memcpy(&v1, data + pos, sizeof(uint64_t)); + uint64_t v2; + ::memcpy(&v2, data + pos + sizeof(uint64_t), sizeof(uint64_t)); + uint64_t v{v1 | v2}; // We are only interested in these bits: 1000 1000 1000 1000...etc + if ((v & 0x8080808080808080) == 0) { // if NONE of these are set, e.g. all of them are zero, then everything is ASCII + size_t final_pos = pos + 16; + while(pos < final_pos) { + *latin_output++ = char(buf[pos]); + pos++; + } + continue; + } + } + // suppose it is not an all ASCII byte sequence + uint8_t leading_byte = data[pos]; // leading byte + if (leading_byte < 0b10000000) { + // converting one ASCII byte !!! + *latin_output++ = char(leading_byte); + pos++; + } else if ((leading_byte & 0b11100000) == 0b11000000) { // the first three bits indicate: + // We have a two-byte UTF-8 + if(pos + 1 >= len) { + return result(error_code::TOO_SHORT, pos); } // minimal bound checking + if ((data[pos + 1] & 0b11000000) != 0b10000000) { + return result(error_code::TOO_SHORT, pos); } // checks if the next byte is a valid continuation byte in UTF-8. A valid continuation byte starts with 10. + // range check - + uint32_t code_point = (leading_byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); // assembles the Unicode code point from the two bytes. It does this by discarding the leading 110 and 10 bits from the two bytes, shifting the remaining bits of the first byte, and then combining the results with a bitwise OR operation. + if (code_point < 0x80) { + return result(error_code::OVERLONG, pos); + } + if (0xFF < code_point) { + return result(error_code::TOO_LARGE, pos); + } // We only care about the range 129-255 which is Non-ASCII latin1 characters + *latin_output++ = char(code_point); + pos += 2; + } else if ((leading_byte & 0b11110000) == 0b11100000) { + // We have a three-byte UTF-8 + return result(error_code::TOO_LARGE, pos); + } else if ((leading_byte & 0b11111000) == 0b11110000) { // 0b11110000 + // we have a 4-byte UTF-8 word. + return result(error_code::TOO_LARGE, pos); + } else { + // we either have too many continuation bytes or an invalid leading byte + if ((leading_byte & 0b11000000) == 0b10000000) { + return result(error_code::TOO_LONG, pos); + } - const uint64_t L = ~H & surrogates_wordmask; + return result(error_code::HEADER_BITS, pos); - const uint64_t a = L & (H >> 4); + } + } + return result(error_code::SUCCESS, latin_output - start); +} - const uint64_t b = a << 4; - const uint64_t c = V | a | b; - if (c == ~0ull) { - input += 16; - } else if (c == 0xfffffffffffffffull) { - input += 15; - } else { - is_utf16 = false; - break; - } - } - } - } else { - is_utf16 = false; - // Check for UTF-32 - if (len % 4 == 0) { - const char32_t * input = reinterpret_cast(buf); - const char32_t* end32 = reinterpret_cast(start) + len/4; +inline result rewind_and_convert_with_errors(size_t prior_bytes, const char* buf, size_t len, char* latin1_output) { + size_t extra_len{0}; + // We potentially need to go back in time and find a leading byte. + // In theory '3' would be sufficient, but sometimes the error can go back quite far. + size_t how_far_back = prior_bytes; + // size_t how_far_back = 3; // 3 bytes in the past + current position + // if(how_far_back >= prior_bytes) { how_far_back = prior_bytes; } + bool found_leading_bytes{false}; + // important: it is i <= how_far_back and not 'i < how_far_back'. + for(size_t i = 0; i <= how_far_back; i++) { + unsigned char byte = buf[0-i]; + found_leading_bytes = ((byte & 0b11000000) != 0b10000000); + if(found_leading_bytes) { + buf -= i; + extra_len = i; + break; + } + } + // + // It is possible for this function to return a negative count in its result. + // C++ Standard Section 18.1 defines size_t is in which is described in C Standard as . + // C Standard Section 4.1.5 defines size_t as an unsigned integral type of the result of the sizeof operator + // + // An unsigned type will simply wrap round arithmetically (well defined). + // + if(!found_leading_bytes) { + // If how_far_back == 3, we may have four consecutive continuation bytes!!! + // [....] [continuation] [continuation] [continuation] | [buf is continuation] + // Or we possibly have a stream that does not start with a leading byte. + return result(error_code::TOO_LONG, 0-how_far_back); + } + result res = convert_with_errors(buf, len + extra_len, latin1_output); + if (res.error) { + res.count -= extra_len; + } + return res; +} - // Must start checking for surrogates - uint32x4_t currentoffsetmax = vmovq_n_u32(0x0); - const uint32x4_t offset = vmovq_n_u32(0xffff2000); - const uint32x4_t standardoffsetmax = vmovq_n_u32(0xfffff7ff); - const uint32x4_t in32 = vreinterpretq_u32_u16(in); - const uint32x4_t secondin32 = vreinterpretq_u32_u16(secondin); - const uint32x4_t thirdin32 = vreinterpretq_u32_u16(thirdin); - const uint32x4_t fourthin32 = vreinterpretq_u32_u16(fourthin); +} // utf8_to_latin1 namespace +} // unnamed namespace +} // namespace scalar +} // namespace simdutf - currentmax = vmaxq_u32(in32,currentmax); - currentmax = vmaxq_u32(secondin32,currentmax); - currentmax = vmaxq_u32(thirdin32,currentmax); - currentmax = vmaxq_u32(fourthin32,currentmax); - - currentoffsetmax = vmaxq_u32(vaddq_u32(in32, offset), currentoffsetmax); - currentoffsetmax = vmaxq_u32(vaddq_u32(secondin32, offset), currentoffsetmax); - currentoffsetmax = vmaxq_u32(vaddq_u32(thirdin32, offset), currentoffsetmax); - currentoffsetmax = vmaxq_u32(vaddq_u32(fourthin32, offset), currentoffsetmax); - - while (input + 4 < end32) { - const uint32x4_t in_32 = vld1q_u32(reinterpret_cast(input)); - currentmax = vmaxq_u32(in_32,currentmax); - currentoffsetmax = vmaxq_u32(vaddq_u32(in_32, offset), currentoffsetmax); - input += 4; - } - - uint32x4_t forbidden_words = veorq_u32(vmaxq_u32(currentoffsetmax, standardoffsetmax), standardoffsetmax); - if(vmaxvq_u32(forbidden_words) != 0) { - is_utf32 = false; - } - } else { - is_utf32 = false; - } - } - break; - } - // If no surrogate, validate under other encodings as well - - // UTF-32 validation - currentmax = vmaxq_u32(vreinterpretq_u32_u16(in),currentmax); - currentmax = vmaxq_u32(vreinterpretq_u32_u16(secondin),currentmax); - currentmax = vmaxq_u32(vreinterpretq_u32_u16(thirdin),currentmax); - currentmax = vmaxq_u32(vreinterpretq_u32_u16(fourthin),currentmax); - - // UTF-8 validation - // Relies on ../generic/utf8_validation/utf8_lookup4_algorithm.h - simd::simd8x64 in8(vreinterpretq_u8_u16(in), vreinterpretq_u8_u16(secondin), vreinterpretq_u8_u16(thirdin), vreinterpretq_u8_u16(fourthin)); - check.check_next_input(in8); - - buf += 64; - } +#endif +/* end file src/scalar/utf8_to_latin1/utf8_to_latin1.h */ +/* begin file src/scalar/utf16_to_latin1/utf16_to_latin1.h */ +#ifndef SIMDUTF_UTF16_TO_LATIN1_H +#define SIMDUTF_UTF16_TO_LATIN1_H - // Check which encodings are possible +namespace simdutf { +namespace scalar { +namespace { +namespace utf16_to_latin1 { - if (is_utf8) { - if (static_cast(buf - start) != len) { - uint8_t block[64]{}; - std::memset(block, 0x20, 64); - std::memcpy(block, buf, len - (buf - start)); - simd::simd8x64 in(block); - check.check_next_input(in); - } - if (!check.errors()) { - out |= simdutf::encoding_type::UTF8; - } - } +#include // for std::memcpy - if (is_utf16 && scalar::utf16::validate(reinterpret_cast(buf), (len - (buf - start))/2)) { - out |= simdutf::encoding_type::UTF16_LE; - } +template +inline size_t convert(const char16_t* buf, size_t len, char* latin_output) { + const uint16_t *data = reinterpret_cast(buf); + size_t pos = 0; + std::vector temp_output(len); + char* current_write = temp_output.data(); + uint16_t word = 0; + uint16_t too_large = 0; - if (is_utf32 && (len % 4 == 0)) { - const uint32x4_t standardmax = vmovq_n_u32(0x10ffff); - uint32x4_t is_zero = veorq_u32(vmaxq_u32(currentmax, standardmax), standardmax); - if (vmaxvq_u32(is_zero) == 0 && scalar::utf32::validate(reinterpret_cast(buf), (len - (buf - start))/4)) { - out |= simdutf::encoding_type::UTF32_LE; - } - } + while (pos < len) { + word = !match_system(big_endian) ? utf16::swap_bytes(data[pos]) : data[pos]; + too_large |= word; + *current_write++ = char(word & 0xFF); + pos++; + } + if((too_large & 0xFF00) != 0) { return 0; } - return out; + // Only copy to latin_output if there were no errors + std::memcpy(latin_output, temp_output.data(), len); + + return current_write - temp_output.data(); } -/* end file src/arm64/arm_detect_encodings.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=arm64/arm_validate_utf16.cpp -/* begin file src/arm64/arm_validate_utf16.cpp */ template -const char16_t* arm_validate_utf16(const char16_t* input, size_t size) { - const char16_t* end = input + size; - const auto v_d8 = simd8::splat(0xd8); - const auto v_f8 = simd8::splat(0xf8); - const auto v_fc = simd8::splat(0xfc); - const auto v_dc = simd8::splat(0xdc); - while (input + 16 < end) { - // 0. Load data: since the validation takes into account only higher - // byte of each word, we compress the two vectors into one which - // consists only the higher bytes. - auto in0 = simd16(input); - auto in1 = simd16(input + simd16::SIZE / sizeof(char16_t)); - if (!match_system(big_endian)) { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t swap = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - #else - const uint8x16_t swap = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - #endif - in0 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in0), swap)); - in1 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in1), swap)); - } - const auto t0 = in0.shr<8>(); - const auto t1 = in1.shr<8>(); - const simd8 in = simd16::pack(t0, t1); - // 1. Check whether we have any 0xD800..DFFF word (0b1101'1xxx'yyyy'yyyy). - const uint64_t surrogates_wordmask = ((in & v_f8) == v_d8).to_bitmask64(); - if(surrogates_wordmask == 0) { - input += 16; - } else { - // 2. We have some surrogates that have to be distinguished: - // - low surrogates: 0b1101'10xx'yyyy'yyyy (0xD800..0xDBFF) - // - high surrogates: 0b1101'11xx'yyyy'yyyy (0xDC00..0xDFFF) - // - // Fact: high surrogate has 11th bit set (3rd bit in the higher word) - - // V - non-surrogate words - // V = not surrogates_wordmask - const uint64_t V = ~surrogates_wordmask; +inline result convert_with_errors(const char16_t* buf, size_t len, char* latin_output) { + const uint16_t *data = reinterpret_cast(buf); + size_t pos = 0; + char* start{latin_output}; + uint16_t word; - // H - word-mask for high surrogates: the six highest bits are 0b1101'11 - const auto vH = ((in & v_fc) == v_dc); - const uint64_t H = vH.to_bitmask64(); + while (pos < len) { + if (pos + 16 <= len) { // if it is safe to read 32 more bytes, check that they are Latin1 + uint64_t v1, v2, v3, v4; + ::memcpy(&v1, data + pos, sizeof(uint64_t)); + ::memcpy(&v2, data + pos + 4, sizeof(uint64_t)); + ::memcpy(&v3, data + pos + 8, sizeof(uint64_t)); + ::memcpy(&v4, data + pos + 12, sizeof(uint64_t)); - // L - word mask for low surrogates - // L = not H and surrogates_wordmask - const uint64_t L = ~H & surrogates_wordmask; + if (!match_system(big_endian)) { v1 = (v1 >> 8) | (v1 << (64 - 8)); } + if (!match_system(big_endian)) { v2 = (v2 >> 8) | (v2 << (64 - 8)); } + if (!match_system(big_endian)) { v3 = (v3 >> 8) | (v3 << (64 - 8)); } + if (!match_system(big_endian)) { v4 = (v1 >> 8) | (v4 << (64 - 8)); } - const uint64_t a = L & (H >> 4); // A low surrogate must be followed by high one. - // (A low surrogate placed in the 7th register's word - // is an exception we handle.) - const uint64_t b = a << 4; // Just mark that the opposite fact is hold, - // thanks to that we have only two masks for valid case. - const uint64_t c = V | a | b; // Combine all the masks into the final one. - if (c == ~0ull) { - // The whole input register contains valid UTF-16, i.e., - // either single words or proper surrogate pairs. - input += 16; - } else if (c == 0xfffffffffffffffull) { - // The 15 lower words of the input register contains valid UTF-16. - // The 15th word may be either a low or high surrogate. It the next - // iteration we 1) check if the low surrogate is followed by a high - // one, 2) reject sole high surrogate. - input += 15; - } else { - return nullptr; - } + if (((v1 | v2 | v3 | v4) & 0xFF00FF00FF00FF00) == 0) { + size_t final_pos = pos + 16; + while(pos < final_pos) { + *latin_output++ = !match_system(big_endian) ? char(utf16::swap_bytes(data[pos])) : char(data[pos]); + pos++; } + continue; + } } - return input; + word = !match_system(big_endian) ? utf16::swap_bytes(data[pos]) : data[pos]; + if((word & 0xFF00 ) == 0) { + *latin_output++ = char(word & 0xFF); + pos++; + } else { return result(error_code::TOO_LARGE, pos); } + } + return result(error_code::SUCCESS,latin_output - start); } -template -const result arm_validate_utf16_with_errors(const char16_t* input, size_t size) { - const char16_t* start = input; - const char16_t* end = input + size; - - const auto v_d8 = simd8::splat(0xd8); - const auto v_f8 = simd8::splat(0xf8); - const auto v_fc = simd8::splat(0xfc); - const auto v_dc = simd8::splat(0xdc); - while (input + 16 < end) { - // 0. Load data: since the validation takes into account only higher - // byte of each word, we compress the two vectors into one which - // consists only the higher bytes. - auto in0 = simd16(input); - auto in1 = simd16(input + simd16::SIZE / sizeof(char16_t)); +} // utf16_to_latin1 namespace +} // unnamed namespace +} // namespace scalar +} // namespace simdutf - if (!match_system(big_endian)) { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t swap = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - #else - const uint8x16_t swap = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - #endif - in0 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in0), swap)); - in1 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in1), swap)); - } - const auto t0 = in0.shr<8>(); - const auto t1 = in1.shr<8>(); - const simd8 in = simd16::pack(t0, t1); - // 1. Check whether we have any 0xD800..DFFF word (0b1101'1xxx'yyyy'yyyy). - const uint64_t surrogates_wordmask = ((in & v_f8) == v_d8).to_bitmask64(); - if(surrogates_wordmask == 0) { - input += 16; - } else { - // 2. We have some surrogates that have to be distinguished: - // - low surrogates: 0b1101'10xx'yyyy'yyyy (0xD800..0xDBFF) - // - high surrogates: 0b1101'11xx'yyyy'yyyy (0xDC00..0xDFFF) - // - // Fact: high surrogate has 11th bit set (3rd bit in the higher word) +#endif +/* end file src/scalar/utf16_to_latin1/utf16_to_latin1.h */ +/* begin file src/scalar/utf32_to_latin1/utf32_to_latin1.h */ +#ifndef SIMDUTF_UTF32_TO_LATIN1_H +#define SIMDUTF_UTF32_TO_LATIN1_H - // V - non-surrogate words - // V = not surrogates_wordmask - const uint64_t V = ~surrogates_wordmask; +namespace simdutf { +namespace scalar { +namespace { +namespace utf32_to_latin1 { - // H - word-mask for high surrogates: the six highest bits are 0b1101'11 - const auto vH = ((in & v_fc) == v_dc); - const uint64_t H = vH.to_bitmask64(); +inline size_t convert(const char32_t *buf, size_t len, char *latin1_output) { + const uint32_t *data = reinterpret_cast(buf); + char* start = latin1_output; + uint32_t utf32_char; + size_t pos = 0; + uint32_t too_large = 0; - // L - word mask for low surrogates - // L = not H and surrogates_wordmask - const uint64_t L = ~H & surrogates_wordmask; + while (pos < len) { + utf32_char = (uint32_t)data[pos]; + too_large |= utf32_char; + *latin1_output++ = (char)(utf32_char & 0xFF); + pos++; + } + if((too_large & 0xFFFFFF00) != 0) { return 0; } + return latin1_output - start; +} - const uint64_t a = L & (H >> 4); // A low surrogate must be followed by high one. - // (A low surrogate placed in the 7th register's word - // is an exception we handle.) - const uint64_t b = a << 4; // Just mark that the opposite fact is hold, - // thanks to that we have only two masks for valid case. - const uint64_t c = V | a | b; // Combine all the masks into the final one. - if (c == ~0ull) { - // The whole input register contains valid UTF-16, i.e., - // either single words or proper surrogate pairs. - input += 16; - } else if (c == 0xfffffffffffffffull) { - // The 15 lower words of the input register contains valid UTF-16. - // The 15th word may be either a low or high surrogate. It the next - // iteration we 1) check if the low surrogate is followed by a high - // one, 2) reject sole high surrogate. - input += 15; - } else { - return result(error_code::SURROGATE, input - start); - } - } +inline result convert_with_errors(const char32_t *buf, size_t len, char *latin1_output) { + const uint32_t *data = reinterpret_cast(buf); + char* start{latin1_output}; + size_t pos = 0; + while (pos < len) { + if (pos + 2 <= len) { // if it is safe to read 8 more bytes, check that they are Latin1 + uint64_t v; + ::memcpy(&v, data + pos, sizeof(uint64_t)); + if ((v & 0xFFFFFF00FFFFFF00) == 0) { + *latin1_output++ = char(buf[pos]); + *latin1_output++ = char(buf[pos+1]); + pos += 2; + continue; + } } - return result(error_code::SUCCESS, input - start); + uint32_t utf32_char = data[pos]; + if ((utf32_char & 0xFFFFFF00) == 0) { // Check if the character can be represented in Latin-1 + *latin1_output++ = (char)(utf32_char & 0xFF); + pos++; + } else { return result(error_code::TOO_LARGE, pos); }; + } + return result(error_code::SUCCESS, latin1_output - start); } -/* end file src/arm64/arm_validate_utf16.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=arm64/arm_validate_utf32le.cpp -/* begin file src/arm64/arm_validate_utf32le.cpp */ - -const char32_t* arm_validate_utf32le(const char32_t* input, size_t size) { - const char32_t* end = input + size; - const uint32x4_t standardmax = vmovq_n_u32(0x10ffff); - const uint32x4_t offset = vmovq_n_u32(0xffff2000); - const uint32x4_t standardoffsetmax = vmovq_n_u32(0xfffff7ff); - uint32x4_t currentmax = vmovq_n_u32(0x0); - uint32x4_t currentoffsetmax = vmovq_n_u32(0x0); +} // utf32_to_latin1 namespace +} // unnamed namespace +} // namespace scalar +} // namespace simdutf - while (input + 4 < end) { - const uint32x4_t in = vld1q_u32(reinterpret_cast(input)); - currentmax = vmaxq_u32(in,currentmax); - currentoffsetmax = vmaxq_u32(vaddq_u32(in, offset), currentoffsetmax); - input += 4; - } +#endif +/* end file src/scalar/utf32_to_latin1/utf32_to_latin1.h */ - uint32x4_t is_zero = veorq_u32(vmaxq_u32(currentmax, standardmax), standardmax); - if(vmaxvq_u32(is_zero) != 0) { - return nullptr; - } +/* begin file src/scalar/utf8_to_latin1/valid_utf8_to_latin1.h */ +#ifndef SIMDUTF_VALID_UTF8_TO_LATIN1_H +#define SIMDUTF_VALID_UTF8_TO_LATIN1_H - is_zero = veorq_u32(vmaxq_u32(currentoffsetmax, standardoffsetmax), standardoffsetmax); - if(vmaxvq_u32(is_zero) != 0) { - return nullptr; - } +namespace simdutf { +namespace scalar { +namespace { +namespace utf8_to_latin1 { - return input; -} +inline size_t convert_valid(const char* buf, size_t len, char* latin_output) { + const uint8_t *data = reinterpret_cast(buf); + size_t pos = 0; + char* start{latin_output}; -const result arm_validate_utf32le_with_errors(const char32_t* input, size_t size) { - const char32_t* start = input; - const char32_t* end = input + size; - - const uint32x4_t standardmax = vmovq_n_u32(0x10ffff); - const uint32x4_t offset = vmovq_n_u32(0xffff2000); - const uint32x4_t standardoffsetmax = vmovq_n_u32(0xfffff7ff); - uint32x4_t currentmax = vmovq_n_u32(0x0); - uint32x4_t currentoffsetmax = vmovq_n_u32(0x0); - - while (input + 4 < end) { - const uint32x4_t in = vld1q_u32(reinterpret_cast(input)); - currentmax = vmaxq_u32(in,currentmax); - currentoffsetmax = vmaxq_u32(vaddq_u32(in, offset), currentoffsetmax); - - uint32x4_t is_zero = veorq_u32(vmaxq_u32(currentmax, standardmax), standardmax); - if(vmaxvq_u32(is_zero) != 0) { - return result(error_code::TOO_LARGE, input - start); - } - - is_zero = veorq_u32(vmaxq_u32(currentoffsetmax, standardoffsetmax), standardoffsetmax); - if(vmaxvq_u32(is_zero) != 0) { - return result(error_code::SURROGATE, input - start); + while (pos < len) { + // try to convert the next block of 16 ASCII bytes + if (pos + 16 <= len) { // if it is safe to read 16 more bytes, check that they are ascii + uint64_t v1; + ::memcpy(&v1, data + pos, sizeof(uint64_t)); + uint64_t v2; + ::memcpy(&v2, data + pos + sizeof(uint64_t), sizeof(uint64_t)); + uint64_t v{v1 | v2}; // We are only interested in these bits: 1000 1000 1000 1000, so it makes sense to concatenate everything + if ((v & 0x8080808080808080) == 0) { // if NONE of these are set, e.g. all of them are zero, then everything is ASCII + size_t final_pos = pos + 16; + while(pos < final_pos) { + *latin_output++ = char(buf[pos]); + pos++; } - - input += 4; + continue; + } } - return result(error_code::SUCCESS, input - start); -} -/* end file src/arm64/arm_validate_utf32le.cpp */ - -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=arm64/arm_convert_utf8_to_utf16.cpp -/* begin file src/arm64/arm_convert_utf8_to_utf16.cpp */ -// Convert up to 12 bytes from utf8 to utf16 using a mask indicating the -// end of the code points. Only the least significant 12 bits of the mask -// are accessed. -// It returns how many bytes were consumed (up to 12). -template -size_t convert_masked_utf8_to_utf16(const char *input, - uint64_t utf8_end_of_code_point_mask, - char16_t *&utf16_output) { - // we use an approach where we try to process up to 12 input bytes. - // Why 12 input bytes and not 16? Because we are concerned with the size of - // the lookup tables. Also 12 is nicely divisible by two and three. - // - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t swap = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - #else - const uint8x16_t swap = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - #endif - uint8x16_t in = vld1q_u8(reinterpret_cast(input)); - const uint16_t input_utf8_end_of_code_point_mask = - utf8_end_of_code_point_mask & 0xfff; - // - // Optimization note: our main path below is load-latency dependent. Thus it is maybe - // beneficial to have fast paths that depend on branch prediction but have less latency. - // This results in more instructions but, potentially, also higher speeds. - // - // We first try a few fast paths. - if((utf8_end_of_code_point_mask & 0xffff) == 0xffff) { - // We process in chunks of 16 bytes - uint16x8_t ascii_first = vmovl_u8(vget_low_u8 (in)); - uint16x8_t ascii_second = vmovl_high_u8(in); - if (!match_system(big_endian)) { - ascii_first = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(ascii_first), swap)); - ascii_second = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(ascii_second), swap)); + // suppose it is not an all ASCII byte sequence + uint8_t leading_byte = data[pos]; // leading byte + if (leading_byte < 0b10000000) { + // converting one ASCII byte !!! + *latin_output++ = char(leading_byte); + pos++; + } else if ((leading_byte & 0b11100000) == 0b11000000) { // the first three bits indicate: + // We have a two-byte UTF-8 + if(pos + 1 >= len) { break; } // minimal bound checking + if ((data[pos + 1] & 0b11000000) != 0b10000000) { return 0; } // checks if the next byte is a valid continuation byte in UTF-8. A valid continuation byte starts with 10. + // range check - + uint32_t code_point = (leading_byte & 0b00011111) << 6 | (data[pos + 1] & 0b00111111); // assembles the Unicode code point from the two bytes. It does this by discarding the leading 110 and 10 bits from the two bytes, shifting the remaining bits of the first byte, and then combining the results with a bitwise OR operation. + *latin_output++ = char(code_point); + pos += 2; + } else { + // we may have a continuation but we do not do error checking + return 0; } - vst1q_u16(reinterpret_cast(utf16_output), ascii_first); - vst1q_u16(reinterpret_cast(utf16_output) + 8, ascii_second); - utf16_output += 16; // We wrote 16 16-bit characters. - return 16; // We consumed 16 bytes. - } - if((utf8_end_of_code_point_mask & 0xffff) == 0xaaaa) { - // We want to take 8 2-byte UTF-8 words and turn them into 8 2-byte UTF-16 words. - // There is probably a more efficient sequence, but the following might do. - uint8x16_t perm = vqtbl1q_u8(in, swap); - uint8x16_t ascii = vandq_u8(perm, vreinterpretq_u8_u16(vmovq_n_u16(0x7f))); - uint8x16_t highbyte = vandq_u8(perm, vreinterpretq_u8_u16(vmovq_n_u16(0x1f00))); - uint8x16_t composed = vorrq_u8(ascii, vreinterpretq_u8_u16(vshrq_n_u16(vreinterpretq_u16_u8(highbyte), 2))); - if (!match_system(big_endian)) composed = vqtbl1q_u8(composed, swap); - vst1q_u8(reinterpret_cast(utf16_output), composed); - utf16_output += 8; // We wrote 16 bytes, 8 code points. - return 16; } - if(input_utf8_end_of_code_point_mask == 0x924) { - // We want to take 4 3-byte UTF-8 words and turn them into 4 2-byte UTF-16 words. - // There is probably a more efficient sequence, but the following might do. -#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t sh = make_uint8x16_t(2, 1, 0, 255, 5, 4, 3, 255, 8, 7, 6, 255, 11, 10, 9, 255); -#else - const uint8x16_t sh = {2, 1, 0, 255, 5, 4, 3, 255, 8, 7, 6, 255, 11, 10, 9, 255}; + return latin_output - start; +} + +} // utf8_to_latin1 namespace +} // unnamed namespace +} // namespace scalar +} // namespace simdutf + #endif - uint8x16_t perm = vqtbl1q_u8(in, sh); - uint8x16_t ascii = - vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x7f))); // 7 or 6 bits - uint8x16_t middlebyte = - vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x3f00))); // 5 or 6 bits - uint8x16_t middlebyte_shifted = vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(middlebyte), 2)); - uint32x4_t highbyte = - vreinterpretq_u32_u8(vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x0f0000)))); // 4 bits - uint32x4_t highbyte_shifted = vshrq_n_u32(highbyte, 4); - uint32x4_t composed = - vorrq_u32(vorrq_u32(vreinterpretq_u32_u8(ascii), vreinterpretq_u32_u8(middlebyte_shifted)), highbyte_shifted); - uint16x8_t composed_repacked = vmovn_high_u32(vmovn_u32(composed), composed); - if (!match_system(big_endian)) composed_repacked = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(composed_repacked), swap)); - vst1q_u16(reinterpret_cast(utf16_output), composed_repacked); - utf16_output += 4; - return 12; - } - /// We do not have a fast path available, so we fallback. +/* end file src/scalar/utf8_to_latin1/valid_utf8_to_latin1.h */ +/* begin file src/scalar/utf16_to_latin1/valid_utf16_to_latin1.h */ +#ifndef SIMDUTF_VALID_UTF16_TO_LATIN1_H +#define SIMDUTF_VALID_UTF16_TO_LATIN1_H - const uint8_t idx = - simdutf::tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][0]; - const uint8_t consumed = - simdutf::tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][1]; +namespace simdutf { +namespace scalar { +namespace { +namespace utf16_to_latin1 { +template +inline size_t convert_valid(const char16_t* buf, size_t len, char* latin_output) { + const uint16_t *data = reinterpret_cast(buf); + size_t pos = 0; + char* start{latin_output}; + uint16_t word = 0; - if (idx < 64) { - // SIX (6) input code-words - // this is a relatively easy scenario - // we process SIX (6) input code-words. The max length in bytes of six code - // words spanning between 1 and 2 bytes each is 12 bytes. - uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[idx])); - uint8x16_t perm = vqtbl1q_u8(in, sh); - uint8x16_t ascii = vandq_u8(perm, vreinterpretq_u8_u16(vmovq_n_u16(0x7f))); - uint8x16_t highbyte = vandq_u8(perm, vreinterpretq_u8_u16(vmovq_n_u16(0x1f00))); - uint8x16_t composed = vorrq_u8(ascii, vreinterpretq_u8_u16(vshrq_n_u16(vreinterpretq_u16_u8(highbyte), 2))); - if (!match_system(big_endian)) composed = vqtbl1q_u8(composed, swap); - vst1q_u8(reinterpret_cast(utf16_output), composed); - utf16_output += 6; // We wrote 12 bytes, 6 code points. - } else if (idx < 145) { - // FOUR (4) input code-words - uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[idx])); - uint8x16_t perm = vqtbl1q_u8(in, sh); - uint8x16_t ascii = - vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x7f))); // 7 or 6 bits - uint8x16_t middlebyte = - vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x3f00))); // 5 or 6 bits - uint8x16_t middlebyte_shifted = vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(middlebyte), 2)); - uint32x4_t highbyte = - vreinterpretq_u32_u8(vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x0f0000)))); // 4 bits - uint32x4_t highbyte_shifted = vshrq_n_u32(highbyte, 4); - uint32x4_t composed = - vorrq_u32(vorrq_u32(vreinterpretq_u32_u8(ascii), vreinterpretq_u32_u8(middlebyte_shifted)), highbyte_shifted); - uint16x8_t composed_repacked = vmovn_high_u32(vmovn_u32(composed), composed); - if (!match_system(big_endian)) composed_repacked = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(composed_repacked), swap)); - vst1q_u16(reinterpret_cast(utf16_output), composed_repacked); - utf16_output += 4; - } else if (idx < 209) { - // TWO (2) input code-words - ////////////// - // There might be garbage inputs where a leading byte mascarades as a four-byte - // leading byte (by being followed by 3 continuation byte), but is not greater than - // 0xf0. This could trigger a buffer overflow if we only counted leading - // bytes of the form 0xf0 as generating surrogate pairs, without further UTF-8 validation. - // Thus we must be careful to ensure that only leading bytes at least as large as 0xf0 generate surrogate pairs. - // We do as at the cost of an extra mask. - ///////////// - uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[idx])); - uint8x16_t perm = vqtbl1q_u8(in, sh); - uint8x16_t ascii = vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x7f))); - uint8x16_t middlebyte = vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x3f00))); - uint8x16_t middlebyte_shifted = vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(middlebyte), 2)); - uint8x16_t middlehighbyte = vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x3f0000))); - // correct for spurious high bit - uint8x16_t correct = - vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x400000)))), 1)); - middlehighbyte = veorq_u8(correct, middlehighbyte); - uint8x16_t middlehighbyte_shifted = vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(middlehighbyte), 4)); - // We deliberately carry the leading four bits if they are present, we remove - // them later when computing hightenbits. - uint8x16_t highbyte = vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0xff000000))); - uint8x16_t highbyte_shifted = vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(highbyte), 6)); - // When we need to generate a surrogate pair (leading byte > 0xF0), then - // the corresponding 32-bit value in 'composed' will be greater than - // > (0xff00000>>6) or > 0x3c00000. This can be used later to identify the - // location of the surrogate pairs. - uint8x16_t composed = - vorrq_u8(vorrq_u8(ascii, middlebyte_shifted), - vorrq_u8(highbyte_shifted, middlehighbyte_shifted)); - uint32x4_t composedminus = - vsubq_u32(vreinterpretq_u32_u8(composed), vmovq_n_u32(0x10000)); - uint32x4_t lowtenbits = - vandq_u32(composedminus, vmovq_n_u32(0x3ff)); - // Notice the 0x3ff mask: - uint32x4_t hightenbits = vandq_u32(vshrq_n_u32(composedminus, 10), vmovq_n_u32(0x3ff)); - uint32x4_t lowtenbitsadd = - vaddq_u32(lowtenbits, vmovq_n_u32(0xDC00)); - uint32x4_t hightenbitsadd = - vaddq_u32(hightenbits, vmovq_n_u32(0xD800)); - uint32x4_t lowtenbitsaddshifted = vshlq_n_u32(lowtenbitsadd, 16); - uint32x4_t surrogates = - vorrq_u32(hightenbitsadd, lowtenbitsaddshifted); - uint32_t basic_buffer[4]; - uint32_t basic_buffer_swap[4]; - if (!match_system(big_endian)) { - vst1q_u32(basic_buffer_swap, vreinterpretq_u32_u8(vqtbl1q_u8(composed, swap))); - surrogates = vreinterpretq_u32_u8(vqtbl1q_u8(vreinterpretq_u8_u32(surrogates), swap)); - } - vst1q_u32(basic_buffer, vreinterpretq_u32_u8(composed)); - uint32_t surrogate_buffer[4]; - vst1q_u32(surrogate_buffer, surrogates); - for (size_t i = 0; i < 3; i++) { - if(basic_buffer[i] > 0x3c00000) { - utf16_output[0] = uint16_t(surrogate_buffer[i] & 0xffff); - utf16_output[1] = uint16_t(surrogate_buffer[i] >> 16); - utf16_output += 2; - } else { - utf16_output[0] = !match_system(big_endian) ? uint16_t(basic_buffer_swap[i]) : uint16_t(basic_buffer[i]); - utf16_output++; - } - } - } else { - // here we know that there is an error but we do not handle errors + while (pos < len) { + word = !match_system(big_endian) ? utf16::swap_bytes(data[pos]) : data[pos]; + *latin_output++ = char(word); + pos++; } - return consumed; + + return latin_output - start; } -/* end file src/arm64/arm_convert_utf8_to_utf16.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=arm64/arm_convert_utf8_to_utf32.cpp -/* begin file src/arm64/arm_convert_utf8_to_utf32.cpp */ -// Convert up to 12 bytes from utf8 to utf32 using a mask indicating the -// end of the code points. Only the least significant 12 bits of the mask -// are accessed. -// It returns how many bytes were consumed (up to 12). -size_t convert_masked_utf8_to_utf32(const char *input, - uint64_t utf8_end_of_code_point_mask, - char32_t *&utf32_out) { - // we use an approach where we try to process up to 12 input bytes. - // Why 12 input bytes and not 16? Because we are concerned with the size of - // the lookup tables. Also 12 is nicely divisible by two and three. - // - uint32_t*& utf32_output = reinterpret_cast(utf32_out); - uint8x16_t in = vld1q_u8(reinterpret_cast(input)); - const uint16_t input_utf8_end_of_code_point_mask = - utf8_end_of_code_point_mask & 0xFFF; - // - // Optimization note: our main path below is load-latency dependent. Thus it is maybe - // beneficial to have fast paths that depend on branch prediction but have less latency. - // This results in more instructions but, potentially, also higher speeds. - // - // We first try a few fast paths. - if((utf8_end_of_code_point_mask & 0xffff) == 0xffff) { - // We process in chunks of 16 bytes - vst1q_u32(utf32_output, vmovl_u16(vget_low_u16(vmovl_u8(vget_low_u8 (in))))); - vst1q_u32(utf32_output + 4, vmovl_high_u16(vmovl_u8(vget_low_u8 (in)))); - vst1q_u32(utf32_output + 8, vmovl_u16(vget_low_u16(vmovl_high_u8(in)))); - vst1q_u32(utf32_output + 12, vmovl_high_u16(vmovl_high_u8(in))); - utf32_output += 16; // We wrote 16 16-bit characters. - return 16; // We consumed 16 bytes. - } - if((utf8_end_of_code_point_mask & 0xffff) == 0xaaaa) { - // We want to take 8 2-byte UTF-8 words and turn them into 8 4-byte UTF-32 words. - // There is probably a more efficient sequence, but the following might do. -#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t sh = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); -#else - //const uint8x16_t sh = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - const uint8x16_t sh = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; -#endif - uint8x16_t perm = vqtbl1q_u8(in, sh); - uint8x16_t ascii = vandq_u8(perm, vreinterpretq_u8_u16(vmovq_n_u16(0x7f))); - uint8x16_t highbyte = vandq_u8(perm, vreinterpretq_u8_u16(vmovq_n_u16(0x1f00))); - uint8x16_t composed = vorrq_u8(ascii, vreinterpretq_u8_u16(vshrq_n_u16(vreinterpretq_u16_u8(highbyte), 2))); - vst1q_u32(utf32_output, vmovl_u16(vget_low_u16(vreinterpretq_u16_u8(composed)))); - vst1q_u32(utf32_output+4, vmovl_high_u16(vreinterpretq_u16_u8(composed))); - utf32_output += 8; // We wrote 32 bytes, 8 code points. - return 16; - } - if(input_utf8_end_of_code_point_mask == 0x924) { - // We want to take 4 3-byte UTF-8 words and turn them into 4 4-byte UTF-32 words. - // There is probably a more efficient sequence, but the following might do. -#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t sh = make_uint8x16_t(2, 1, 0, 255, 5, 4, 3, 255, 8, 7, 6, 255, 11, 10, 9, 255); -#else - const uint8x16_t sh = {2, 1, 0, 255, 5, 4, 3, 255, 8, 7, 6, 255, 11, 10, 9, 255}; + +} // utf16_to_latin1 namespace +} // unnamed namespace +} // namespace scalar +} // namespace simdutf + #endif - uint8x16_t perm = vqtbl1q_u8(in, sh); - uint8x16_t ascii = - vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x7f))); // 7 or 6 bits - uint8x16_t middlebyte = - vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x3f00))); // 5 or 6 bits - uint8x16_t middlebyte_shifted = vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(middlebyte), 2)); - uint32x4_t highbyte = - vreinterpretq_u32_u8(vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x0f0000)))); // 4 bits - uint32x4_t highbyte_shifted = vshrq_n_u32(highbyte, 4); - uint32x4_t composed = - vorrq_u32(vorrq_u32(vreinterpretq_u32_u8(ascii), vreinterpretq_u32_u8(middlebyte_shifted)), highbyte_shifted); - vst1q_u32(utf32_output, composed); - utf32_output += 4; - return 12; - } - /// We do not have a fast path available, so we fallback. +/* end file src/scalar/utf16_to_latin1/valid_utf16_to_latin1.h */ +/* begin file src/scalar/utf32_to_latin1/valid_utf32_to_latin1.h */ +#ifndef SIMDUTF_VALID_UTF32_TO_LATIN1_H +#define SIMDUTF_VALID_UTF32_TO_LATIN1_H - const uint8_t idx = - simdutf::tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][0]; - const uint8_t consumed = - simdutf::tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][1]; +namespace simdutf { +namespace scalar { +namespace { +namespace utf32_to_latin1 { +inline size_t convert_valid(const char32_t *buf, size_t len, char *latin1_output) { + const uint32_t *data = reinterpret_cast(buf); + char* start = latin1_output; + uint32_t utf32_char; + size_t pos = 0; - if (idx < 64) { - // SIX (6) input code-words - // this is a relatively easy scenario - // we process SIX (6) input code-words. The max length in bytes of six code - // words spanning between 1 and 2 bytes each is 12 bytes. - uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[idx])); - uint8x16_t perm = vqtbl1q_u8(in, sh); - uint8x16_t ascii = vandq_u8(perm, vreinterpretq_u8_u16(vmovq_n_u16(0x7f))); - uint8x16_t highbyte = vandq_u8(perm, vreinterpretq_u8_u16(vmovq_n_u16(0x1f00))); - uint8x16_t composed = vorrq_u8(ascii, vreinterpretq_u8_u16(vshrq_n_u16(vreinterpretq_u16_u8(highbyte), 2))); - vst1q_u32(utf32_output, vmovl_u16(vget_low_u16(vreinterpretq_u16_u8(composed)))); - vst1q_u32(utf32_output+4, vmovl_high_u16(vreinterpretq_u16_u8(composed))); - utf32_output += 6; // We wrote 12 bytes, 6 code points. - } else if (idx < 145) { - // FOUR (4) input code-words - uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[idx])); - uint8x16_t perm = vqtbl1q_u8(in, sh); - uint8x16_t ascii = - vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x7f))); // 7 or 6 bits - uint8x16_t middlebyte = - vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x3f00))); // 5 or 6 bits - uint8x16_t middlebyte_shifted = vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(middlebyte), 2)); - uint32x4_t highbyte = - vreinterpretq_u32_u8(vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x0f0000)))); // 4 bits - uint32x4_t highbyte_shifted = vshrq_n_u32(highbyte, 4); - uint32x4_t composed = - vorrq_u32(vorrq_u32(vreinterpretq_u32_u8(ascii), vreinterpretq_u32_u8(middlebyte_shifted)), highbyte_shifted); - vst1q_u32(utf32_output, composed); - utf32_output += 4; - } else if (idx < 209) { - // TWO (2) input code-words - uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[idx])); - uint8x16_t perm = vqtbl1q_u8(in, sh); - uint8x16_t ascii = vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x7f))); - uint8x16_t middlebyte = vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x3f00))); - uint8x16_t middlebyte_shifted = vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(middlebyte), 2)); - uint8x16_t middlehighbyte = vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x3f0000))); - // correct for spurious high bit - uint8x16_t correct = - vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x400000)))), 1)); - middlehighbyte = veorq_u8(correct, middlehighbyte); - uint8x16_t middlehighbyte_shifted = vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(middlehighbyte), 4)); - uint8x16_t highbyte = vandq_u8(perm, vreinterpretq_u8_u32(vmovq_n_u32(0x07000000))); - uint8x16_t highbyte_shifted =vreinterpretq_u8_u32(vshrq_n_u32(vreinterpretq_u32_u8(highbyte), 6)); - uint8x16_t composed = - vorrq_u8(vorrq_u8(ascii, middlebyte_shifted), - vorrq_u8(highbyte_shifted, middlehighbyte_shifted)); - vst1q_u32(utf32_output, vreinterpretq_u32_u8(composed)); - utf32_output += 3; - } else { - // here we know that there is an error but we do not handle errors + while (pos < len) { + utf32_char = (uint32_t)data[pos]; + + if (pos + 2 <= len) { // if it is safe to read 8 more bytes, check that they are Latin1 + uint64_t v; + ::memcpy(&v, data + pos, sizeof(uint64_t)); + if ((v & 0xFFFFFF00FFFFFF00) == 0) { + *latin1_output++ = char(buf[pos]); + *latin1_output++ = char(buf[pos+1]); + pos += 2; + continue; + } } - return consumed; -} -/* end file src/arm64/arm_convert_utf8_to_utf32.cpp */ + *latin1_output++ = (char)(utf32_char & 0xFF); + pos++; -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=arm64/arm_convert_utf16_to_utf8.cpp -/* begin file src/arm64/arm_convert_utf16_to_utf8.cpp */ -/* - The vectorized algorithm works on single SSE register i.e., it - loads eight 16-bit words. + } + return latin1_output - start; +} - We consider three cases: - 1. an input register contains no surrogates and each value - is in range 0x0000 .. 0x07ff. - 2. an input register contains no surrogates and values are - is in range 0x0000 .. 0xffff. - 3. an input register contains surrogates --- i.e. codepoints - can have 16 or 32 bits. - Ad 1. +} // utf32_to_latin1 namespace +} // unnamed namespace +} // namespace scalar +} // namespace simdutf - When values are less than 0x0800, it means that a 16-bit words - can be converted into: 1) single UTF8 byte (when it's an ASCII - char) or 2) two UTF8 bytes. +#endif +/* end file src/scalar/utf32_to_latin1/valid_utf32_to_latin1.h */ - For this case we do only some shuffle to obtain these 2-byte - codes and finally compress the whole SSE register with a single - shuffle. - We need 256-entry lookup table to get a compression pattern - and the number of output bytes in the compressed vector register. - Each entry occupies 17 bytes. - Ad 2. - - When values fit in 16-bit words, but are above 0x07ff, then - a single word may produce one, two or three UTF8 bytes. - - We prepare data for all these three cases in two registers. - The first register contains lower two UTF8 bytes (used in all - cases), while the second one contains just the third byte for - the three-UTF8-bytes case. - - Finally these two registers are interleaved forming eight-element - array of 32-bit values. The array spans two SSE registers. - The bytes from the registers are compressed using two shuffles. - - We need 256-entry lookup table to get a compression pattern - and the number of output bytes in the compressed vector register. - Each entry occupies 17 bytes. +SIMDUTF_PUSH_DISABLE_WARNINGS +SIMDUTF_DISABLE_UNDESIRED_WARNINGS - To summarize: - - We need two 256-entry tables that have 8704 bytes in total. -*/ -/* - Returns a pair: the first unprocessed byte from buf and utf8_output - A scalar routing should carry on the conversion of the tail. -*/ -template -std::pair arm_convert_utf16_to_utf8(const char16_t* buf, size_t len, char* utf8_out) { - uint8_t * utf8_output = reinterpret_cast(utf8_out); - const char16_t* end = buf + len; +#if SIMDUTF_IMPLEMENTATION_ARM64 +/* begin file src/arm64/implementation.cpp */ +/* begin file src/simdutf/arm64/begin.h */ +// redefining SIMDUTF_IMPLEMENTATION to "arm64" +// #define SIMDUTF_IMPLEMENTATION arm64 +/* end file src/simdutf/arm64/begin.h */ +namespace simdutf { +namespace arm64 { +namespace { +#ifndef SIMDUTF_ARM64_H +#error "arm64.h must be included" +#endif +using namespace simd; - const uint16x8_t v_f800 = vmovq_n_u16((uint16_t)0xf800); - const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); - const uint16x8_t v_c080 = vmovq_n_u16((uint16_t)0xc080); +simdutf_really_inline bool is_ascii(const simd8x64& input) { + simd8 bits = input.reduce_or(); + return bits.max_val() < 0b10000000u; +} - while (buf + 16 <= end) { - uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); - if (!match_system(big_endian)) { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t swap = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - #else - const uint8x16_t swap = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - #endif - in = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in), swap)); - } - if(vmaxvq_u16(in) <= 0x7F) { // ASCII fast path!!!! - // It is common enough that we have sequences of 16 consecutive ASCII characters. - uint16x8_t nextin = vld1q_u16(reinterpret_cast(buf) + 8); - if (!match_system(big_endian)) { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t swap = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - #else - const uint8x16_t swap = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - #endif - nextin = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(nextin), swap)); - } - if(vmaxvq_u16(nextin) > 0x7F) { - // 1. pack the bytes - // obviously suboptimal. - uint8x8_t utf8_packed = vmovn_u16(in); - // 2. store (8 bytes) - vst1_u8(utf8_output, utf8_packed); - // 3. adjust pointers - buf += 8; - utf8_output += 8; - in = nextin; - } else { - // 1. pack the bytes - // obviously suboptimal. - uint8x16_t utf8_packed = vmovn_high_u16(vmovn_u16(in), nextin); - // 2. store (16 bytes) - vst1q_u8(utf8_output, utf8_packed); - // 3. adjust pointers - buf += 16; - utf8_output += 16; - continue; // we are done for this round! - } - } +simdutf_unused simdutf_really_inline simd8 must_be_continuation(const simd8 prev1, const simd8 prev2, const simd8 prev3) { + simd8 is_second_byte = prev1 >= uint8_t(0b11000000u); + simd8 is_third_byte = prev2 >= uint8_t(0b11100000u); + simd8 is_fourth_byte = prev3 >= uint8_t(0b11110000u); + // Use ^ instead of | for is_*_byte, because ^ is commutative, and the caller is using ^ as well. + // This will work fine because we only have to report errors for cases with 0-1 lead bytes. + // Multiple lead bytes implies 2 overlapping multibyte characters, and if that happens, there is + // guaranteed to be at least *one* lead byte that is part of only 1 other multibyte character. + // The error will be detected there. + return is_second_byte ^ is_third_byte ^ is_fourth_byte; +} - if (vmaxvq_u16(in) <= 0x7FF) { - // 1. prepare 2-byte values - // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 - // expected output : [110a|aaaa|10bb|bbbb] x 8 - const uint16x8_t v_1f00 = vmovq_n_u16((int16_t)0x1f00); - const uint16x8_t v_003f = vmovq_n_u16((int16_t)0x003f); +simdutf_really_inline simd8 must_be_2_3_continuation(const simd8 prev2, const simd8 prev3) { + simd8 is_third_byte = prev2 >= uint8_t(0b11100000u); + simd8 is_fourth_byte = prev3 >= uint8_t(0b11110000u); + return is_third_byte ^ is_fourth_byte; +} - // t0 = [000a|aaaa|bbbb|bb00] - const uint16x8_t t0 = vshlq_n_u16(in, 2); - // t1 = [000a|aaaa|0000|0000] - const uint16x8_t t1 = vandq_u16(t0, v_1f00); - // t2 = [0000|0000|00bb|bbbb] - const uint16x8_t t2 = vandq_u16(in, v_003f); - // t3 = [000a|aaaa|00bb|bbbb] - const uint16x8_t t3 = vorrq_u16(t1, t2); - // t4 = [110a|aaaa|10bb|bbbb] - const uint16x8_t t4 = vorrq_u16(t3, v_c080); - // 2. merge ASCII and 2-byte codewords - const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); - const uint16x8_t one_byte_bytemask = vcleq_u16(in, v_007f); - const uint8x16_t utf8_unpacked = vreinterpretq_u8_u16(vbslq_u16(one_byte_bytemask, in, t4)); - // 3. prepare bitmask for 8-bit lookup +// common functions for utf8 conversions +simdutf_really_inline uint16x4_t convert_utf8_3_byte_to_utf16(uint8x16_t in) { + // Low half contains 10cccccc|1110aaaa + // High half contains 10bbbbbb|10bbbbbb #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t mask = make_uint16x8_t(0x0001, 0x0004, - 0x0010, 0x0040, - 0x0002, 0x0008, - 0x0020, 0x0080); + const uint8x16_t sh = make_uint8x16_t(0, 2, 3, 5, 6, 8, 9, 11, 1, 1, 4, 4, 7, 7, 10, 10); #else - const uint16x8_t mask = { 0x0001, 0x0004, - 0x0010, 0x0040, - 0x0002, 0x0008, - 0x0020, 0x0080 }; + const uint8x16_t sh = {0, 2, 3, 5, 6, 8, 9, 11, 1, 1, 4, 4, 7, 7, 10, 10}; #endif - uint16_t m2 = vaddvq_u16(vandq_u16(one_byte_bytemask, mask)); - // 4. pack the bytes - const uint8_t* row = &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; - const uint8x16_t shuffle = vld1q_u8(row + 1); - const uint8x16_t utf8_packed = vqtbl1q_u8(utf8_unpacked, shuffle); + uint8x16_t perm = vqtbl1q_u8(in, sh); + // Split into half vectors. + // 10cccccc|1110aaaa + uint8x8_t perm_low = vget_low_u8(perm); // no-op + // 10bbbbbb|10bbbbbb + uint8x8_t perm_high = vget_high_u8(perm); + // xxxxxxxx 10bbbbbb + uint16x4_t mid = vreinterpret_u16_u8(perm_high); // no-op + // xxxxxxxx 1110aaaa + uint16x4_t high = vreinterpret_u16_u8(perm_low); // no-op + // Assemble with shift left insert. + // xxxxxxaa aabbbbbb + uint16x4_t mid_high = vsli_n_u16(mid, high, 6); + // (perm_low << 8) | (perm_low >> 8) + // xxxxxxxx 10cccccc + uint16x4_t low = vreinterpret_u16_u8(vrev16_u8(perm_low)); + // Shift left insert into the low bits + // aaaabbbb bbcccccc + uint16x4_t composed = vsli_n_u16(low, mid_high, 6); + return composed; +} + +simdutf_really_inline uint16x8_t convert_utf8_2_byte_to_utf16(uint8x16_t in) { + // Converts 6 2 byte UTF-8 characters to 6 UTF-16 characters. + // Technically this calculates 8, but 6 does better and happens more often + // (The languages which use these codepoints use ASCII spaces so 8 would need to be + // in the middle of a very long word). + + // 10bbbbbb 110aaaaa + uint16x8_t upper = vreinterpretq_u16_u8(in); + // (in << 8) | (in >> 8) + // 110aaaaa 10bbbbbb + uint16x8_t lower = vreinterpretq_u16_u8(vrev16q_u8(in)); + // 00000000 000aaaaa + uint16x8_t upper_masked = vandq_u16(upper, vmovq_n_u16(0x1F)); + // Assemble with shift left insert. + // 00000aaa aabbbbbb + uint16x8_t composed = vsliq_n_u16(lower, upper_masked, 6); + return composed; +} + +simdutf_really_inline uint16x8_t convert_utf8_1_to_2_byte_to_utf16(uint8x16_t in, size_t shufutf8_idx) { + // Converts 6 1-2 byte UTF-8 characters to 6 UTF-16 characters. + // This is a relatively easy scenario + // we process SIX (6) input code-code units. The max length in bytes of six code + // code units spanning between 1 and 2 bytes each is 12 bytes. + uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[shufutf8_idx])); + // Shuffle + // 1 byte: 00000000 0bbbbbbb + // 2 byte: 110aaaaa 10bbbbbb + uint16x8_t perm = vreinterpretq_u16_u8(vqtbl1q_u8(in, sh)); + // Mask + // 1 byte: 00000000 0bbbbbbb + // 2 byte: 00000000 00bbbbbb + uint16x8_t ascii = vandq_u16(perm, vmovq_n_u16(0x7f)); // 6 or 7 bits + // 1 byte: 00000000 00000000 + // 2 byte: 000aaaaa 00000000 + uint16x8_t highbyte = vandq_u16(perm, vmovq_n_u16(0x1f00)); // 5 bits + // Combine with a shift right accumulate + // 1 byte: 00000000 0bbbbbbb + // 2 byte: 00000aaa aabbbbbb + uint16x8_t composed = vsraq_n_u16(ascii, highbyte, 2); + return composed; +} - // 5. store bytes - vst1q_u8(utf8_output, utf8_packed); +/* begin file src/arm64/arm_detect_encodings.cpp */ +template +// len is known to be a multiple of 2 when this is called +int arm_detect_encodings(const char * buf, size_t len) { + const char* start = buf; + const char* end = buf + len; - // 6. adjust pointers - buf += 8; - utf8_output += row[0]; - continue; + bool is_utf8 = true; + bool is_utf16 = true; + bool is_utf32 = true; - } - const uint16x8_t surrogates_bytemask = vceqq_u16(vandq_u16(in, v_f800), v_d800); - // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, - // it is likely an uncommon occurrence. - if (vmaxvq_u16(surrogates_bytemask) == 0) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes -#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t dup_even = make_uint16x8_t(0x0000, 0x0202, 0x0404, 0x0606, - 0x0808, 0x0a0a, 0x0c0c, 0x0e0e); -#else - const uint16x8_t dup_even = {0x0000, 0x0202, 0x0404, 0x0606, - 0x0808, 0x0a0a, 0x0c0c, 0x0e0e}; -#endif - /* In this branch we handle three cases: - 1. [0000|0000|0ccc|cccc] => [0ccc|cccc] - single UFT-8 byte - 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes - 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes + int out = 0; - We expand the input word (16-bit) into two words (32-bit), thus - we have room for four bytes. However, we need five distinct bit - layouts. Note that the last byte in cases #2 and #3 is the same. + const auto v_d8 = simd8::splat(0xd8); + const auto v_f8 = simd8::splat(0xf8); - We precompute byte 1 for case #1 and the common byte for cases #2 & #3 - in register t2. + uint32x4_t currentmax = vmovq_n_u32(0x0); - We precompute byte 1 for case #3 and -- **conditionally** -- precompute - either byte 1 for case #2 or byte 2 for case #3. Note that they - differ by exactly one bit. + checker check{}; - Finally from these two words we build proper UTF-8 sequence, taking - into account the case (i.e, the number of bytes to write). - */ - /** - * Given [aaaa|bbbb|bbcc|cccc] our goal is to produce: - * t2 => [0ccc|cccc] [10cc|cccc] - * s4 => [1110|aaaa] ([110b|bbbb] OR [10bb|bbbb]) - */ -#define simdutf_vec(x) vmovq_n_u16(static_cast(x)) - // [aaaa|bbbb|bbcc|cccc] => [bbcc|cccc|bbcc|cccc] - const uint16x8_t t0 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in), vreinterpretq_u8_u16(dup_even))); - // [bbcc|cccc|bbcc|cccc] => [00cc|cccc|0bcc|cccc] - const uint16x8_t t1 = vandq_u16(t0, simdutf_vec(0b0011111101111111)); - // [00cc|cccc|0bcc|cccc] => [10cc|cccc|0bcc|cccc] - const uint16x8_t t2 = vorrq_u16 (t1, simdutf_vec(0b1000000000000000)); + while(buf + 64 <= end) { + uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); + uint16x8_t secondin = vld1q_u16(reinterpret_cast(buf) + simd16::SIZE / sizeof(char16_t)); + uint16x8_t thirdin = vld1q_u16(reinterpret_cast(buf) + 2*simd16::SIZE / sizeof(char16_t)); + uint16x8_t fourthin = vld1q_u16(reinterpret_cast(buf) + 3*simd16::SIZE / sizeof(char16_t)); - // s0: [aaaa|bbbb|bbcc|cccc] => [0000|0000|0000|aaaa] - const uint16x8_t s0 = vshrq_n_u16(in, 12); - // s1: [aaaa|bbbb|bbcc|cccc] => [0000|bbbb|bb00|0000] - const uint16x8_t s1 = vandq_u16(in, simdutf_vec(0b0000111111000000)); - // [0000|bbbb|bb00|0000] => [00bb|bbbb|0000|0000] - const uint16x8_t s1s = vshlq_n_u16(s1, 2); - // [00bb|bbbb|0000|aaaa] - const uint16x8_t s2 = vorrq_u16(s0, s1s); - // s3: [00bb|bbbb|0000|aaaa] => [11bb|bbbb|1110|aaaa] - const uint16x8_t s3 = vorrq_u16(s2, simdutf_vec(0b1100000011100000)); - const uint16x8_t v_07ff = vmovq_n_u16((uint16_t)0x07FF); - const uint16x8_t one_or_two_bytes_bytemask = vcleq_u16(in, v_07ff); - const uint16x8_t m0 = vbicq_u16(simdutf_vec(0b0100000000000000), one_or_two_bytes_bytemask); - const uint16x8_t s4 = veorq_u16(s3, m0); -#undef simdutf_vec + const auto u0 = simd16(in); + const auto u1 = simd16(secondin); + const auto u2 = simd16(thirdin); + const auto u3 = simd16(fourthin); - // 4. expand words 16-bit => 32-bit - const uint8x16_t out0 = vreinterpretq_u8_u16(vzip1q_u16(t2, s4)); - const uint8x16_t out1 = vreinterpretq_u8_u16(vzip2q_u16(t2, s4)); + const auto v0 = u0.shr<8>(); + const auto v1 = u1.shr<8>(); + const auto v2 = u2.shr<8>(); + const auto v3 = u3.shr<8>(); - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle - const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); - const uint16x8_t one_byte_bytemask = vcleq_u16(in, v_007f); -#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t onemask = make_uint16x8_t(0x0001, 0x0004, - 0x0010, 0x0040, - 0x0100, 0x0400, - 0x1000, 0x4000 ); - const uint16x8_t twomask = make_uint16x8_t(0x0002, 0x0008, - 0x0020, 0x0080, - 0x0200, 0x0800, - 0x2000, 0x8000 ); -#else - const uint16x8_t onemask = { 0x0001, 0x0004, - 0x0010, 0x0040, - 0x0100, 0x0400, - 0x1000, 0x4000 }; - const uint16x8_t twomask = { 0x0002, 0x0008, - 0x0020, 0x0080, - 0x0200, 0x0800, - 0x2000, 0x8000 }; -#endif - const uint16x8_t combined = vorrq_u16(vandq_u16(one_byte_bytemask, onemask), vandq_u16(one_or_two_bytes_bytemask, twomask)); - const uint16_t mask = vaddvq_u16(combined); - // The following fast path may or may not be beneficial. - /*if(mask == 0) { - // We only have three-byte words. Use fast path. - const uint8x16_t shuffle = {2,3,1,6,7,5,10,11,9,14,15,13,0,0,0,0}; - const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle); - const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle); - vst1q_u8(utf8_output, utf8_0); - utf8_output += 12; - vst1q_u8(utf8_output, utf8_1); - utf8_output += 12; - buf += 8; - continue; - }*/ - const uint8_t mask0 = uint8_t(mask); + const auto in16 = simd16::pack(v0, v1); + const auto nextin16 = simd16::pack(v2, v3); - const uint8_t* row0 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask0][0]; - const uint8x16_t shuffle0 = vld1q_u8(row0 + 1); - const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle0); + const uint64_t surrogates_wordmask0 = ((in16 & v_f8) == v_d8).to_bitmask64(); + const uint64_t surrogates_wordmask1 = ((nextin16 & v_f8) == v_d8).to_bitmask64(); - const uint8_t mask1 = static_cast(mask >> 8); - const uint8_t* row1 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask1][0]; - const uint8x16_t shuffle1 = vld1q_u8(row1 + 1); - const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle1); + // Check for surrogates + if (surrogates_wordmask0 != 0 || surrogates_wordmask1 != 0) { + // Cannot be UTF8 + is_utf8 = false; + // Can still be either UTF-16LE or UTF-32 depending on the positions of the surrogates + // To be valid UTF-32, a surrogate cannot be in the two most significant bytes of any 32-bit word. + // On the other hand, to be valid UTF-16LE, at least one surrogate must be in the two most significant + // bytes of a 32-bit word since they always come in pairs in UTF-16LE. + // Note that we always proceed in multiple of 4 before this point so there is no offset in 32-bit code units. - vst1q_u8(utf8_output, utf8_0); - utf8_output += row0[0]; - vst1q_u8(utf8_output, utf8_1); - utf8_output += row1[0]; + if (((surrogates_wordmask0 | surrogates_wordmask1) & 0xf0f0f0f0f0f0f0f0) != 0) { + is_utf32 = false; + // Code from arm_validate_utf16le.cpp + // Not efficient, we do not process surrogates_wordmask1 + const char16_t * input = reinterpret_cast(buf); + const char16_t* end16 = reinterpret_cast(start) + len/2; - buf += 8; - // surrogate pair(s) in a register - } else { - // Let us do a scalar fallback. - // It may seem wasteful to use scalar code, but being efficient with SIMD - // in the presence of surrogate pairs may require non-trivial tables. - size_t forward = 15; - size_t k = 0; - if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} - for(; k < forward; k++) { - uint16_t word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k]) : buf[k]; - if((word & 0xFF80)==0) { - *utf8_output++ = char(word); - } else if((word & 0xF800)==0) { - *utf8_output++ = char((word>>6) | 0b11000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); - } else if((word &0xF800 ) != 0xD800) { - *utf8_output++ = char((word>>12) | 0b11100000); - *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); - } else { - // must be a surrogate pair - uint16_t diff = uint16_t(word - 0xD800); - uint16_t next_word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k + 1]) : buf[k + 1]; - k++; - uint16_t diff2 = uint16_t(next_word - 0xDC00); - if((diff | diff2) > 0x3FF) { return std::make_pair(nullptr, reinterpret_cast(utf8_output)); } - uint32_t value = (diff << 10) + diff2 + 0x10000; - *utf8_output++ = char((value>>18) | 0b11110000); - *utf8_output++ = char(((value>>12) & 0b111111) | 0b10000000); - *utf8_output++ = char(((value>>6) & 0b111111) | 0b10000000); - *utf8_output++ = char((value & 0b111111) | 0b10000000); - } - } - buf += k; - } - } // while + const auto v_fc = simd8::splat(0xfc); + const auto v_dc = simd8::splat(0xdc); - return std::make_pair(buf, reinterpret_cast(utf8_output)); -} + const uint64_t V0 = ~surrogates_wordmask0; + const auto vH0 = ((in16 & v_fc) == v_dc); + const uint64_t H0 = vH0.to_bitmask64(); -/* - Returns a pair: a result struct and utf8_output. - If there is an error, the count field of the result is the position of the error. - Otherwise, it is the position of the first unprocessed byte in buf (even if finished). - A scalar routing should carry on the conversion of the tail if needed. -*/ -template -std::pair arm_convert_utf16_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_out) { - uint8_t * utf8_output = reinterpret_cast(utf8_out); - const char16_t* start = buf; - const char16_t* end = buf + len; + const uint64_t L0 = ~H0 & surrogates_wordmask0; - const uint16x8_t v_f800 = vmovq_n_u16((uint16_t)0xf800); - const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); - const uint16x8_t v_c080 = vmovq_n_u16((uint16_t)0xc080); + const uint64_t a0 = L0 & (H0 >> 4); - while (buf + 16 <= end) { - uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); - if (!match_system(big_endian)) { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t swap = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - #else - const uint8x16_t swap = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - #endif - in = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in), swap)); - } - if(vmaxvq_u16(in) <= 0x7F) { // ASCII fast path!!!! - // It is common enough that we have sequences of 16 consecutive ASCII characters. - uint16x8_t nextin = vld1q_u16(reinterpret_cast(buf) + 8); - if (!match_system(big_endian)) { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t swap = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - #else - const uint8x16_t swap = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - #endif - nextin = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(nextin), swap)); - } - if(vmaxvq_u16(nextin) > 0x7F) { - // 1. pack the bytes - // obviously suboptimal. - uint8x8_t utf8_packed = vmovn_u16(in); - // 2. store (8 bytes) - vst1_u8(utf8_output, utf8_packed); - // 3. adjust pointers - buf += 8; - utf8_output += 8; - in = nextin; - } else { - // 1. pack the bytes - // obviously suboptimal. - uint8x16_t utf8_packed = vmovn_high_u16(vmovn_u16(in), nextin); - // 2. store (16 bytes) - vst1q_u8(utf8_output, utf8_packed); - // 3. adjust pointers - buf += 16; - utf8_output += 16; - continue; // we are done for this round! - } - } + const uint64_t b0 = a0 << 4; - if (vmaxvq_u16(in) <= 0x7FF) { - // 1. prepare 2-byte values - // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 - // expected output : [110a|aaaa|10bb|bbbb] x 8 - const uint16x8_t v_1f00 = vmovq_n_u16((int16_t)0x1f00); - const uint16x8_t v_003f = vmovq_n_u16((int16_t)0x003f); + const uint64_t c0 = V0 | a0 | b0; + if (c0 == ~0ull) { + input += 16; + } else if (c0 == 0xfffffffffffffffull) { + input += 15; + } else { + is_utf16 = false; + break; + } - // t0 = [000a|aaaa|bbbb|bb00] - const uint16x8_t t0 = vshlq_n_u16(in, 2); - // t1 = [000a|aaaa|0000|0000] - const uint16x8_t t1 = vandq_u16(t0, v_1f00); - // t2 = [0000|0000|00bb|bbbb] - const uint16x8_t t2 = vandq_u16(in, v_003f); - // t3 = [000a|aaaa|00bb|bbbb] - const uint16x8_t t3 = vorrq_u16(t1, t2); - // t4 = [110a|aaaa|10bb|bbbb] - const uint16x8_t t4 = vorrq_u16(t3, v_c080); - // 2. merge ASCII and 2-byte codewords - const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); - const uint16x8_t one_byte_bytemask = vcleq_u16(in, v_007f); - const uint8x16_t utf8_unpacked = vreinterpretq_u8_u16(vbslq_u16(one_byte_bytemask, in, t4)); - // 3. prepare bitmask for 8-bit lookup -#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t mask = make_uint16x8_t(0x0001, 0x0004, - 0x0010, 0x0040, - 0x0002, 0x0008, - 0x0020, 0x0080); -#else - const uint16x8_t mask = { 0x0001, 0x0004, - 0x0010, 0x0040, - 0x0002, 0x0008, - 0x0020, 0x0080 }; -#endif - uint16_t m2 = vaddvq_u16(vandq_u16(one_byte_bytemask, mask)); - // 4. pack the bytes - const uint8_t* row = &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; - const uint8x16_t shuffle = vld1q_u8(row + 1); - const uint8x16_t utf8_packed = vqtbl1q_u8(utf8_unpacked, shuffle); + while (input + 16 < end16) { + const auto in0 = simd16(input); + const auto in1 = simd16(input + simd16::SIZE / sizeof(char16_t)); + const auto t0 = in0.shr<8>(); + const auto t1 = in1.shr<8>(); + const simd8 in_16 = simd16::pack(t0, t1); - // 5. store bytes - vst1q_u8(utf8_output, utf8_packed); + const uint64_t surrogates_wordmask = ((in_16 & v_f8) == v_d8).to_bitmask64(); + if(surrogates_wordmask == 0) { + input += 16; + } else { + const uint64_t V = ~surrogates_wordmask; - // 6. adjust pointers - buf += 8; - utf8_output += row[0]; - continue; + const auto vH = ((in_16 & v_fc) == v_dc); + const uint64_t H = vH.to_bitmask64(); - } - const uint16x8_t surrogates_bytemask = vceqq_u16(vandq_u16(in, v_f800), v_d800); - // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, - // it is likely an uncommon occurrence. - if (vmaxvq_u16(surrogates_bytemask) == 0) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes -#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t dup_even = make_uint16x8_t(0x0000, 0x0202, 0x0404, 0x0606, - 0x0808, 0x0a0a, 0x0c0c, 0x0e0e); -#else - const uint16x8_t dup_even = {0x0000, 0x0202, 0x0404, 0x0606, - 0x0808, 0x0a0a, 0x0c0c, 0x0e0e}; -#endif - /* In this branch we handle three cases: - 1. [0000|0000|0ccc|cccc] => [0ccc|cccc] - single UFT-8 byte - 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes - 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes + const uint64_t L = ~H & surrogates_wordmask; - We expand the input word (16-bit) into two words (32-bit), thus - we have room for four bytes. However, we need five distinct bit - layouts. Note that the last byte in cases #2 and #3 is the same. + const uint64_t a = L & (H >> 4); - We precompute byte 1 for case #1 and the common byte for cases #2 & #3 - in register t2. + const uint64_t b = a << 4; - We precompute byte 1 for case #3 and -- **conditionally** -- precompute - either byte 1 for case #2 or byte 2 for case #3. Note that they - differ by exactly one bit. + const uint64_t c = V | a | b; + if (c == ~0ull) { + input += 16; + } else if (c == 0xfffffffffffffffull) { + input += 15; + } else { + is_utf16 = false; + break; + } + } + } + } else { + is_utf16 = false; + // Check for UTF-32 + if (len % 4 == 0) { + const char32_t * input = reinterpret_cast(buf); + const char32_t* end32 = reinterpret_cast(start) + len/4; - Finally from these two words we build proper UTF-8 sequence, taking - into account the case (i.e, the number of bytes to write). - */ - /** - * Given [aaaa|bbbb|bbcc|cccc] our goal is to produce: - * t2 => [0ccc|cccc] [10cc|cccc] - * s4 => [1110|aaaa] ([110b|bbbb] OR [10bb|bbbb]) - */ -#define simdutf_vec(x) vmovq_n_u16(static_cast(x)) - // [aaaa|bbbb|bbcc|cccc] => [bbcc|cccc|bbcc|cccc] - const uint16x8_t t0 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in), vreinterpretq_u8_u16(dup_even))); - // [bbcc|cccc|bbcc|cccc] => [00cc|cccc|0bcc|cccc] - const uint16x8_t t1 = vandq_u16(t0, simdutf_vec(0b0011111101111111)); - // [00cc|cccc|0bcc|cccc] => [10cc|cccc|0bcc|cccc] - const uint16x8_t t2 = vorrq_u16 (t1, simdutf_vec(0b1000000000000000)); + // Must start checking for surrogates + uint32x4_t currentoffsetmax = vmovq_n_u32(0x0); + const uint32x4_t offset = vmovq_n_u32(0xffff2000); + const uint32x4_t standardoffsetmax = vmovq_n_u32(0xfffff7ff); - // s0: [aaaa|bbbb|bbcc|cccc] => [0000|0000|0000|aaaa] - const uint16x8_t s0 = vshrq_n_u16(in, 12); - // s1: [aaaa|bbbb|bbcc|cccc] => [0000|bbbb|bb00|0000] - const uint16x8_t s1 = vandq_u16(in, simdutf_vec(0b0000111111000000)); - // [0000|bbbb|bb00|0000] => [00bb|bbbb|0000|0000] - const uint16x8_t s1s = vshlq_n_u16(s1, 2); - // [00bb|bbbb|0000|aaaa] - const uint16x8_t s2 = vorrq_u16(s0, s1s); - // s3: [00bb|bbbb|0000|aaaa] => [11bb|bbbb|1110|aaaa] - const uint16x8_t s3 = vorrq_u16(s2, simdutf_vec(0b1100000011100000)); - const uint16x8_t v_07ff = vmovq_n_u16((uint16_t)0x07FF); - const uint16x8_t one_or_two_bytes_bytemask = vcleq_u16(in, v_07ff); - const uint16x8_t m0 = vbicq_u16(simdutf_vec(0b0100000000000000), one_or_two_bytes_bytemask); - const uint16x8_t s4 = veorq_u16(s3, m0); -#undef simdutf_vec + const uint32x4_t in32 = vreinterpretq_u32_u16(in); + const uint32x4_t secondin32 = vreinterpretq_u32_u16(secondin); + const uint32x4_t thirdin32 = vreinterpretq_u32_u16(thirdin); + const uint32x4_t fourthin32 = vreinterpretq_u32_u16(fourthin); - // 4. expand words 16-bit => 32-bit - const uint8x16_t out0 = vreinterpretq_u8_u16(vzip1q_u16(t2, s4)); - const uint8x16_t out1 = vreinterpretq_u8_u16(vzip2q_u16(t2, s4)); + currentmax = vmaxq_u32(in32,currentmax); + currentmax = vmaxq_u32(secondin32,currentmax); + currentmax = vmaxq_u32(thirdin32,currentmax); + currentmax = vmaxq_u32(fourthin32,currentmax); - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle - const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); - const uint16x8_t one_byte_bytemask = vcleq_u16(in, v_007f); -#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t onemask = make_uint16x8_t(0x0001, 0x0004, - 0x0010, 0x0040, - 0x0100, 0x0400, - 0x1000, 0x4000 ); - const uint16x8_t twomask = make_uint16x8_t(0x0002, 0x0008, - 0x0020, 0x0080, - 0x0200, 0x0800, - 0x2000, 0x8000 ); -#else - const uint16x8_t onemask = { 0x0001, 0x0004, - 0x0010, 0x0040, - 0x0100, 0x0400, - 0x1000, 0x4000 }; - const uint16x8_t twomask = { 0x0002, 0x0008, - 0x0020, 0x0080, - 0x0200, 0x0800, - 0x2000, 0x8000 }; -#endif - const uint16x8_t combined = vorrq_u16(vandq_u16(one_byte_bytemask, onemask), vandq_u16(one_or_two_bytes_bytemask, twomask)); - const uint16_t mask = vaddvq_u16(combined); - // The following fast path may or may not be beneficial. - /*if(mask == 0) { - // We only have three-byte words. Use fast path. - const uint8x16_t shuffle = {2,3,1,6,7,5,10,11,9,14,15,13,0,0,0,0}; - const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle); - const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle); - vst1q_u8(utf8_output, utf8_0); - utf8_output += 12; - vst1q_u8(utf8_output, utf8_1); - utf8_output += 12; - buf += 8; - continue; - }*/ - const uint8_t mask0 = uint8_t(mask); + currentoffsetmax = vmaxq_u32(vaddq_u32(in32, offset), currentoffsetmax); + currentoffsetmax = vmaxq_u32(vaddq_u32(secondin32, offset), currentoffsetmax); + currentoffsetmax = vmaxq_u32(vaddq_u32(thirdin32, offset), currentoffsetmax); + currentoffsetmax = vmaxq_u32(vaddq_u32(fourthin32, offset), currentoffsetmax); - const uint8_t* row0 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask0][0]; - const uint8x16_t shuffle0 = vld1q_u8(row0 + 1); - const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle0); + while (input + 4 < end32) { + const uint32x4_t in_32 = vld1q_u32(reinterpret_cast(input)); + currentmax = vmaxq_u32(in_32,currentmax); + currentoffsetmax = vmaxq_u32(vaddq_u32(in_32, offset), currentoffsetmax); + input += 4; + } - const uint8_t mask1 = static_cast(mask >> 8); - const uint8_t* row1 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask1][0]; - const uint8x16_t shuffle1 = vld1q_u8(row1 + 1); - const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle1); + uint32x4_t forbidden_words = veorq_u32(vmaxq_u32(currentoffsetmax, standardoffsetmax), standardoffsetmax); + if(vmaxvq_u32(forbidden_words) != 0) { + is_utf32 = false; + } + } else { + is_utf32 = false; + } + } + break; + } + // If no surrogate, validate under other encodings as well - vst1q_u8(utf8_output, utf8_0); - utf8_output += row0[0]; - vst1q_u8(utf8_output, utf8_1); - utf8_output += row1[0]; + // UTF-32 validation + currentmax = vmaxq_u32(vreinterpretq_u32_u16(in),currentmax); + currentmax = vmaxq_u32(vreinterpretq_u32_u16(secondin),currentmax); + currentmax = vmaxq_u32(vreinterpretq_u32_u16(thirdin),currentmax); + currentmax = vmaxq_u32(vreinterpretq_u32_u16(fourthin),currentmax); - buf += 8; - // surrogate pair(s) in a register - } else { - // Let us do a scalar fallback. - // It may seem wasteful to use scalar code, but being efficient with SIMD - // in the presence of surrogate pairs may require non-trivial tables. - size_t forward = 15; - size_t k = 0; - if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} - for(; k < forward; k++) { - uint16_t word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k]) : buf[k]; - if((word & 0xFF80)==0) { - *utf8_output++ = char(word); - } else if((word & 0xF800)==0) { - *utf8_output++ = char((word>>6) | 0b11000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); - } else if((word &0xF800 ) != 0xD800) { - *utf8_output++ = char((word>>12) | 0b11100000); - *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); - } else { - // must be a surrogate pair - uint16_t diff = uint16_t(word - 0xD800); - uint16_t next_word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k + 1]) : buf[k + 1]; - k++; - uint16_t diff2 = uint16_t(next_word - 0xDC00); - if((diff | diff2) > 0x3FF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k - 1), reinterpret_cast(utf8_output)); } - uint32_t value = (diff << 10) + diff2 + 0x10000; - *utf8_output++ = char((value>>18) | 0b11110000); - *utf8_output++ = char(((value>>12) & 0b111111) | 0b10000000); - *utf8_output++ = char(((value>>6) & 0b111111) | 0b10000000); - *utf8_output++ = char((value & 0b111111) | 0b10000000); - } - } - buf += k; - } - } // while + // UTF-8 validation + // Relies on ../generic/utf8_validation/utf8_lookup4_algorithm.h + simd::simd8x64 in8(vreinterpretq_u8_u16(in), vreinterpretq_u8_u16(secondin), vreinterpretq_u8_u16(thirdin), vreinterpretq_u8_u16(fourthin)); + check.check_next_input(in8); - return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast(utf8_output)); -} -/* end file src/arm64/arm_convert_utf16_to_utf8.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=arm64/arm_convert_utf16_to_utf32.cpp -/* begin file src/arm64/arm_convert_utf16_to_utf32.cpp */ -/* - The vectorized algorithm works on single SSE register i.e., it - loads eight 16-bit words. + buf += 64; + } - We consider three cases: - 1. an input register contains no surrogates and each value - is in range 0x0000 .. 0x07ff. - 2. an input register contains no surrogates and values are - is in range 0x0000 .. 0xffff. - 3. an input register contains surrogates --- i.e. codepoints - can have 16 or 32 bits. + // Check which encodings are possible - Ad 1. + if (is_utf8) { + if (static_cast(buf - start) != len) { + uint8_t block[64]{}; + std::memset(block, 0x20, 64); + std::memcpy(block, buf, len - (buf - start)); + simd::simd8x64 in(block); + check.check_next_input(in); + } + if (!check.errors()) { + out |= simdutf::encoding_type::UTF8; + } + } - When values are less than 0x0800, it means that a 16-bit words - can be converted into: 1) single UTF8 byte (when it's an ASCII - char) or 2) two UTF8 bytes. + if (is_utf16 && scalar::utf16::validate(reinterpret_cast(buf), (len - (buf - start))/2)) { + out |= simdutf::encoding_type::UTF16_LE; + } - For this case we do only some shuffle to obtain these 2-byte - codes and finally compress the whole SSE register with a single - shuffle. + if (is_utf32 && (len % 4 == 0)) { + const uint32x4_t standardmax = vmovq_n_u32(0x10ffff); + uint32x4_t is_zero = veorq_u32(vmaxq_u32(currentmax, standardmax), standardmax); + if (vmaxvq_u32(is_zero) == 0 && scalar::utf32::validate(reinterpret_cast(buf), (len - (buf - start))/4)) { + out |= simdutf::encoding_type::UTF32_LE; + } + } - We need 256-entry lookup table to get a compression pattern - and the number of output bytes in the compressed vector register. - Each entry occupies 17 bytes. + return out; +} +/* end file src/arm64/arm_detect_encodings.cpp */ - Ad 2. +/* begin file src/arm64/arm_validate_utf16.cpp */ +template +const char16_t* arm_validate_utf16(const char16_t* input, size_t size) { + const char16_t* end = input + size; + const auto v_d8 = simd8::splat(0xd8); + const auto v_f8 = simd8::splat(0xf8); + const auto v_fc = simd8::splat(0xfc); + const auto v_dc = simd8::splat(0xdc); + while (input + 16 < end) { + // 0. Load data: since the validation takes into account only higher + // byte of each word, we compress the two vectors into one which + // consists only the higher bytes. + auto in0 = simd16(input); + auto in1 = simd16(input + simd16::SIZE / sizeof(char16_t)); + if (!match_system(big_endian)) { + in0 = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(in0))); + in1 = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(in1))); + } + const auto t0 = in0.shr<8>(); + const auto t1 = in1.shr<8>(); + const simd8 in = simd16::pack(t0, t1); + // 1. Check whether we have any 0xD800..DFFF word (0b1101'1xxx'yyyy'yyyy). + const uint64_t surrogates_wordmask = ((in & v_f8) == v_d8).to_bitmask64(); + if(surrogates_wordmask == 0) { + input += 16; + } else { + // 2. We have some surrogates that have to be distinguished: + // - low surrogates: 0b1101'10xx'yyyy'yyyy (0xD800..0xDBFF) + // - high surrogates: 0b1101'11xx'yyyy'yyyy (0xDC00..0xDFFF) + // + // Fact: high surrogate has 11th bit set (3rd bit in the higher word) - When values fit in 16-bit words, but are above 0x07ff, then - a single word may produce one, two or three UTF8 bytes. + // V - non-surrogate code units + // V = not surrogates_wordmask + const uint64_t V = ~surrogates_wordmask; - We prepare data for all these three cases in two registers. - The first register contains lower two UTF8 bytes (used in all - cases), while the second one contains just the third byte for - the three-UTF8-bytes case. + // H - word-mask for high surrogates: the six highest bits are 0b1101'11 + const auto vH = ((in & v_fc) == v_dc); + const uint64_t H = vH.to_bitmask64(); - Finally these two registers are interleaved forming eight-element - array of 32-bit values. The array spans two SSE registers. - The bytes from the registers are compressed using two shuffles. + // L - word mask for low surrogates + // L = not H and surrogates_wordmask + const uint64_t L = ~H & surrogates_wordmask; - We need 256-entry lookup table to get a compression pattern - and the number of output bytes in the compressed vector register. - Each entry occupies 17 bytes. + const uint64_t a = L & (H >> 4); // A low surrogate must be followed by high one. + // (A low surrogate placed in the 7th register's word + // is an exception we handle.) + const uint64_t b = a << 4; // Just mark that the opposite fact is hold, + // thanks to that we have only two masks for valid case. + const uint64_t c = V | a | b; // Combine all the masks into the final one. + if (c == ~0ull) { + // The whole input register contains valid UTF-16, i.e., + // either single code units or proper surrogate pairs. + input += 16; + } else if (c == 0xfffffffffffffffull) { + // The 15 lower code units of the input register contains valid UTF-16. + // The 15th word may be either a low or high surrogate. It the next + // iteration we 1) check if the low surrogate is followed by a high + // one, 2) reject sole high surrogate. + input += 15; + } else { + return nullptr; + } + } + } + return input; +} - To summarize: - - We need two 256-entry tables that have 8704 bytes in total. -*/ -/* - Returns a pair: the first unprocessed byte from buf and utf8_output - A scalar routing should carry on the conversion of the tail. -*/ template -std::pair arm_convert_utf16_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_out) { - uint32_t * utf32_output = reinterpret_cast(utf32_out); - const char16_t* end = buf + len; - - const uint16x8_t v_f800 = vmovq_n_u16((uint16_t)0xf800); - const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); +const result arm_validate_utf16_with_errors(const char16_t* input, size_t size) { + const char16_t* start = input; + const char16_t* end = input + size; - while (buf + 16 <= end) { - uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); - if (!match_system(big_endian)) { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t swap = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - #else - const uint8x16_t swap = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - #endif - in = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in), swap)); - } + const auto v_d8 = simd8::splat(0xd8); + const auto v_f8 = simd8::splat(0xf8); + const auto v_fc = simd8::splat(0xfc); + const auto v_dc = simd8::splat(0xdc); + while (input + 16 < end) { + // 0. Load data: since the validation takes into account only higher + // byte of each word, we compress the two vectors into one which + // consists only the higher bytes. + auto in0 = simd16(input); + auto in1 = simd16(input + simd16::SIZE / sizeof(char16_t)); - const uint16x8_t surrogates_bytemask = vceqq_u16(vandq_u16(in, v_f800), v_d800); - // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, - // it is likely an uncommon occurrence. - if (vmaxvq_u16(surrogates_bytemask) == 0) { - // case: no surrogate pairs, extend all 16-bit words to 32-bit words - vst1q_u32(utf32_output, vmovl_u16(vget_low_u16(in))); - vst1q_u32(utf32_output+4, vmovl_high_u16(in)); - utf32_output += 8; - buf += 8; - // surrogate pair(s) in a register - } else { - // Let us do a scalar fallback. - // It may seem wasteful to use scalar code, but being efficient with SIMD - // in the presence of surrogate pairs may require non-trivial tables. - size_t forward = 15; - size_t k = 0; - if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} - for(; k < forward; k++) { - uint16_t word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k]) : buf[k]; - if((word &0xF800 ) != 0xD800) { - *utf32_output++ = char32_t(word); + if (!match_system(big_endian)) { + in0 = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(in0))); + in1 = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(in1))); + } + const auto t0 = in0.shr<8>(); + const auto t1 = in1.shr<8>(); + const simd8 in = simd16::pack(t0, t1); + // 1. Check whether we have any 0xD800..DFFF word (0b1101'1xxx'yyyy'yyyy). + const uint64_t surrogates_wordmask = ((in & v_f8) == v_d8).to_bitmask64(); + if(surrogates_wordmask == 0) { + input += 16; } else { - // must be a surrogate pair - uint16_t diff = uint16_t(word - 0xD800); - uint16_t next_word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k + 1]) : buf[k + 1]; - k++; - uint16_t diff2 = uint16_t(next_word - 0xDC00); - if((diff | diff2) > 0x3FF) { return std::make_pair(nullptr, reinterpret_cast(utf32_output)); } - uint32_t value = (diff << 10) + diff2 + 0x10000; - *utf32_output++ = char32_t(value); + // 2. We have some surrogates that have to be distinguished: + // - low surrogates: 0b1101'10xx'yyyy'yyyy (0xD800..0xDBFF) + // - high surrogates: 0b1101'11xx'yyyy'yyyy (0xDC00..0xDFFF) + // + // Fact: high surrogate has 11th bit set (3rd bit in the higher word) + + // V - non-surrogate code units + // V = not surrogates_wordmask + const uint64_t V = ~surrogates_wordmask; + + // H - word-mask for high surrogates: the six highest bits are 0b1101'11 + const auto vH = ((in & v_fc) == v_dc); + const uint64_t H = vH.to_bitmask64(); + + // L - word mask for low surrogates + // L = not H and surrogates_wordmask + const uint64_t L = ~H & surrogates_wordmask; + + const uint64_t a = L & (H >> 4); // A low surrogate must be followed by high one. + // (A low surrogate placed in the 7th register's word + // is an exception we handle.) + const uint64_t b = a << 4; // Just mark that the opposite fact is hold, + // thanks to that we have only two masks for valid case. + const uint64_t c = V | a | b; // Combine all the masks into the final one. + if (c == ~0ull) { + // The whole input register contains valid UTF-16, i.e., + // either single code units or proper surrogate pairs. + input += 16; + } else if (c == 0xfffffffffffffffull) { + // The 15 lower code units of the input register contains valid UTF-16. + // The 15th word may be either a low or high surrogate. It the next + // iteration we 1) check if the low surrogate is followed by a high + // one, 2) reject sole high surrogate. + input += 15; + } else { + return result(error_code::SURROGATE, input - start); + } } - } - buf += k; } - } // while - return std::make_pair(buf, reinterpret_cast(utf32_output)); + return result(error_code::SUCCESS, input - start); } +/* end file src/arm64/arm_validate_utf16.cpp */ +/* begin file src/arm64/arm_validate_utf32le.cpp */ +const char32_t* arm_validate_utf32le(const char32_t* input, size_t size) { + const char32_t* end = input + size; -/* - Returns a pair: a result struct and utf8_output. - If there is an error, the count field of the result is the position of the error. - Otherwise, it is the position of the first unprocessed byte in buf (even if finished). - A scalar routing should carry on the conversion of the tail if needed. -*/ -template -std::pair arm_convert_utf16_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_out) { - uint32_t * utf32_output = reinterpret_cast(utf32_out); - const char16_t* start = buf; - const char16_t* end = buf + len; + const uint32x4_t standardmax = vmovq_n_u32(0x10ffff); + const uint32x4_t offset = vmovq_n_u32(0xffff2000); + const uint32x4_t standardoffsetmax = vmovq_n_u32(0xfffff7ff); + uint32x4_t currentmax = vmovq_n_u32(0x0); + uint32x4_t currentoffsetmax = vmovq_n_u32(0x0); - const uint16x8_t v_f800 = vmovq_n_u16((uint16_t)0xf800); - const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); + while (input + 4 < end) { + const uint32x4_t in = vld1q_u32(reinterpret_cast(input)); + currentmax = vmaxq_u32(in,currentmax); + currentoffsetmax = vmaxq_u32(vaddq_u32(in, offset), currentoffsetmax); + input += 4; + } - while (buf + 16 <= end) { - uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); - if (!match_system(big_endian)) { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x16_t swap = make_uint8x16_t(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - #else - const uint8x16_t swap = {1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14}; - #endif - in = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in), swap)); + uint32x4_t is_zero = veorq_u32(vmaxq_u32(currentmax, standardmax), standardmax); + if(vmaxvq_u32(is_zero) != 0) { + return nullptr; } - const uint16x8_t surrogates_bytemask = vceqq_u16(vandq_u16(in, v_f800), v_d800); - // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, - // it is likely an uncommon occurrence. - if (vmaxvq_u16(surrogates_bytemask) == 0) { - // case: no surrogate pairs, extend all 16-bit words to 32-bit words - vst1q_u32(utf32_output, vmovl_u16(vget_low_u16(in))); - vst1q_u32(utf32_output+4, vmovl_high_u16(in)); - utf32_output += 8; - buf += 8; - // surrogate pair(s) in a register - } else { - // Let us do a scalar fallback. - // It may seem wasteful to use scalar code, but being efficient with SIMD - // in the presence of surrogate pairs may require non-trivial tables. - size_t forward = 15; - size_t k = 0; - if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} - for(; k < forward; k++) { - uint16_t word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k]) : buf[k]; - if((word &0xF800 ) != 0xD800) { - *utf32_output++ = char32_t(word); - } else { - // must be a surrogate pair - uint16_t diff = uint16_t(word - 0xD800); - uint16_t next_word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k + 1]) : buf[k + 1]; - k++; - uint16_t diff2 = uint16_t(next_word - 0xDC00); - if((diff | diff2) > 0x3FF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k - 1), reinterpret_cast(utf32_output)); } - uint32_t value = (diff << 10) + diff2 + 0x10000; - *utf32_output++ = char32_t(value); - } - } - buf += k; + is_zero = veorq_u32(vmaxq_u32(currentoffsetmax, standardoffsetmax), standardoffsetmax); + if(vmaxvq_u32(is_zero) != 0) { + return nullptr; } - } // while - return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast(utf32_output)); + + return input; } -/* end file src/arm64/arm_convert_utf16_to_utf32.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=arm64/arm_convert_utf32_to_utf8.cpp -/* begin file src/arm64/arm_convert_utf32_to_utf8.cpp */ -std::pair arm_convert_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_out) { - uint8_t * utf8_output = reinterpret_cast(utf8_out); - const char32_t* end = buf + len; - const uint16x8_t v_c080 = vmovq_n_u16((uint16_t)0xc080); +const result arm_validate_utf32le_with_errors(const char32_t* input, size_t size) { + const char32_t* start = input; + const char32_t* end = input + size; - uint16x8_t forbidden_bytemask = vmovq_n_u16(0x0); + const uint32x4_t standardmax = vmovq_n_u32(0x10ffff); + const uint32x4_t offset = vmovq_n_u32(0xffff2000); + const uint32x4_t standardoffsetmax = vmovq_n_u32(0xfffff7ff); + uint32x4_t currentmax = vmovq_n_u32(0x0); + uint32x4_t currentoffsetmax = vmovq_n_u32(0x0); - while (buf + 16 <= end) { - uint32x4_t in = vld1q_u32(reinterpret_cast(buf)); - uint32x4_t nextin = vld1q_u32(reinterpret_cast(buf+4)); + while (input + 4 < end) { + const uint32x4_t in = vld1q_u32(reinterpret_cast(input)); + currentmax = vmaxq_u32(in,currentmax); + currentoffsetmax = vmaxq_u32(vaddq_u32(in, offset), currentoffsetmax); - // Check if no bits set above 16th - if(vmaxvq_u32(vorrq_u32(in, nextin)) <= 0xFFFF) { - // Pack UTF-32 to UTF-16 safely (without surrogate pairs) - // Apply UTF-16 => UTF-8 routine (arm_convert_utf16_to_utf8.cpp) - uint16x8_t utf16_packed = vcombine_u16(vmovn_u32(in), vmovn_u32(nextin)); - if(vmaxvq_u16(utf16_packed) <= 0x7F) { // ASCII fast path!!!! - // 1. pack the bytes - // obviously suboptimal. - uint8x8_t utf8_packed = vmovn_u16(utf16_packed); - // 2. store (8 bytes) - vst1_u8(utf8_output, utf8_packed); - // 3. adjust pointers - buf += 8; - utf8_output += 8; - continue; // we are done for this round! - } + uint32x4_t is_zero = veorq_u32(vmaxq_u32(currentmax, standardmax), standardmax); + if(vmaxvq_u32(is_zero) != 0) { + return result(error_code::TOO_LARGE, input - start); + } - if (vmaxvq_u16(utf16_packed) <= 0x7FF) { - // 1. prepare 2-byte values - // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 - // expected output : [110a|aaaa|10bb|bbbb] x 8 - const uint16x8_t v_1f00 = vmovq_n_u16((int16_t)0x1f00); - const uint16x8_t v_003f = vmovq_n_u16((int16_t)0x003f); - - // t0 = [000a|aaaa|bbbb|bb00] - const uint16x8_t t0 = vshlq_n_u16(utf16_packed, 2); - // t1 = [000a|aaaa|0000|0000] - const uint16x8_t t1 = vandq_u16(t0, v_1f00); - // t2 = [0000|0000|00bb|bbbb] - const uint16x8_t t2 = vandq_u16(utf16_packed, v_003f); - // t3 = [000a|aaaa|00bb|bbbb] - const uint16x8_t t3 = vorrq_u16(t1, t2); - // t4 = [110a|aaaa|10bb|bbbb] - const uint16x8_t t4 = vorrq_u16(t3, v_c080); - // 2. merge ASCII and 2-byte codewords - const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); - const uint16x8_t one_byte_bytemask = vcleq_u16(utf16_packed, v_007f); - const uint8x16_t utf8_unpacked = vreinterpretq_u8_u16(vbslq_u16(one_byte_bytemask, utf16_packed, t4)); - // 3. prepare bitmask for 8-bit lookup - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t mask = make_uint16x8_t(0x0001, 0x0004, - 0x0010, 0x0040, - 0x0002, 0x0008, - 0x0020, 0x0080); - #else - const uint16x8_t mask = { 0x0001, 0x0004, - 0x0010, 0x0040, - 0x0002, 0x0008, - 0x0020, 0x0080 }; - #endif - uint16_t m2 = vaddvq_u16(vandq_u16(one_byte_bytemask, mask)); - // 4. pack the bytes - const uint8_t* row = &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; - const uint8x16_t shuffle = vld1q_u8(row + 1); - const uint8x16_t utf8_packed = vqtbl1q_u8(utf8_unpacked, shuffle); + is_zero = veorq_u32(vmaxq_u32(currentoffsetmax, standardoffsetmax), standardoffsetmax); + if(vmaxvq_u32(is_zero) != 0) { + return result(error_code::SURROGATE, input - start); + } - // 5. store bytes - vst1q_u8(utf8_output, utf8_packed); + input += 4; + } - // 6. adjust pointers - buf += 8; - utf8_output += row[0]; - continue; + return result(error_code::SUCCESS, input - start); +} +/* end file src/arm64/arm_validate_utf32le.cpp */ - } else { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes - const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); - const uint16x8_t v_dfff = vmovq_n_u16((uint16_t)0xdfff); - forbidden_bytemask = vorrq_u16(vandq_u16(vcleq_u16(utf16_packed, v_dfff), vcgeq_u16(utf16_packed, v_d800)), forbidden_bytemask); +/* begin file src/arm64/arm_convert_latin1_to_utf8.cpp */ +/* + Returns a pair: the first unprocessed byte from buf and utf8_output + A scalar routing should carry on the conversion of the tail. +*/ +std::pair +arm_convert_latin1_to_utf8(const char *latin1_input, size_t len, + char *utf8_out) { + uint8_t *utf8_output = reinterpret_cast(utf8_out); + const char *end = latin1_input + len; + const uint16x8_t v_c080 = vmovq_n_u16((uint16_t)0xc080); + while (latin1_input + 16 <= end) { + uint8x16_t in8 = vld1q_u8(reinterpret_cast(latin1_input)); + if (vmaxvq_u8(in8) <= 0x7F) { // ASCII fast path!!!! + vst1q_u8(utf8_output, in8); + utf8_output += 16; + latin1_input += 16; + continue; + } - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t dup_even = make_uint16x8_t(0x0000, 0x0202, 0x0404, 0x0606, - 0x0808, 0x0a0a, 0x0c0c, 0x0e0e); - #else - const uint16x8_t dup_even = {0x0000, 0x0202, 0x0404, 0x0606, - 0x0808, 0x0a0a, 0x0c0c, 0x0e0e}; - #endif - /* In this branch we handle three cases: - 1. [0000|0000|0ccc|cccc] => [0ccc|cccc] - single UFT-8 byte - 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes - 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes + // We just fallback on UTF-16 code. This could be optimized/simplified + // further. + uint16x8_t in16 = vmovl_u8(vget_low_u8(in8)); + // 1. prepare 2-byte values + // input 8-bit word : [aabb|bbbb] x 8 + // expected output : [1100|00aa|10bb|bbbb] x 8 + const uint16x8_t v_1f00 = vmovq_n_u16((int16_t)0x1f00); + const uint16x8_t v_003f = vmovq_n_u16((int16_t)0x003f); + + // t0 = [0000|00aa|bbbb|bb00] + const uint16x8_t t0 = vshlq_n_u16(in16, 2); + // t1 = [0000|00aa|0000|0000] + const uint16x8_t t1 = vandq_u16(t0, v_1f00); + // t2 = [0000|0000|00bb|bbbb] + const uint16x8_t t2 = vandq_u16(in16, v_003f); + // t3 = [0000|00aa|00bb|bbbb] + const uint16x8_t t3 = vorrq_u16(t1, t2); + // t4 = [1100|00aa|10bb|bbbb] + const uint16x8_t t4 = vorrq_u16(t3, v_c080); + // 2. merge ASCII and 2-byte codewords + const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); + const uint16x8_t one_byte_bytemask = vcleq_u16(in16, v_007f); + const uint8x16_t utf8_unpacked = + vreinterpretq_u8_u16(vbslq_u16(one_byte_bytemask, in16, t4)); + // 3. prepare bitmask for 8-bit lookup +#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t mask = make_uint16x8_t(0x0001, 0x0004, 0x0010, 0x0040, + 0x0002, 0x0008, 0x0020, 0x0080); +#else + const uint16x8_t mask = {0x0001, 0x0004, 0x0010, 0x0040, + 0x0002, 0x0008, 0x0020, 0x0080}; +#endif + uint16_t m2 = vaddvq_u16(vandq_u16(one_byte_bytemask, mask)); + // 4. pack the bytes + const uint8_t *row = + &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; + const uint8x16_t shuffle = vld1q_u8(row + 1); + const uint8x16_t utf8_packed = vqtbl1q_u8(utf8_unpacked, shuffle); + + // 5. store bytes + vst1q_u8(utf8_output, utf8_packed); + // 6. adjust pointers + latin1_input += 8; + utf8_output += row[0]; - We expand the input word (16-bit) into two words (32-bit), thus - we have room for four bytes. However, we need five distinct bit - layouts. Note that the last byte in cases #2 and #3 is the same. + } // while - We precompute byte 1 for case #1 and the common byte for cases #2 & #3 - in register t2. + return std::make_pair(latin1_input, reinterpret_cast(utf8_output)); +} +/* end file src/arm64/arm_convert_latin1_to_utf8.cpp */ +/* begin file src/arm64/arm_convert_latin1_to_utf16.cpp */ +template +std::pair arm_convert_latin1_to_utf16(const char* buf, size_t len, char16_t* utf16_output) { + const char* end = buf + len; - We precompute byte 1 for case #3 and -- **conditionally** -- precompute - either byte 1 for case #2 or byte 2 for case #3. Note that they - differ by exactly one bit. + while (buf + 16 <= end) { + uint8x16_t in8 = vld1q_u8(reinterpret_cast(buf)); + uint16x8_t inlow = vmovl_u8(vget_low_u8(in8)); + if (!match_system(big_endian)) { inlow = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(inlow))); } + vst1q_u16(reinterpret_cast(utf16_output), inlow); + uint16x8_t inhigh = vmovl_u8(vget_high_u8(in8)); + if (!match_system(big_endian)) { inhigh = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(inhigh))); } + vst1q_u16(reinterpret_cast(utf16_output+8), inhigh); + utf16_output += 16; + buf += 16; + } - Finally from these two words we build proper UTF-8 sequence, taking - into account the case (i.e, the number of bytes to write). - */ - /** - * Given [aaaa|bbbb|bbcc|cccc] our goal is to produce: - * t2 => [0ccc|cccc] [10cc|cccc] - * s4 => [1110|aaaa] ([110b|bbbb] OR [10bb|bbbb]) - */ - #define simdutf_vec(x) vmovq_n_u16(static_cast(x)) - // [aaaa|bbbb|bbcc|cccc] => [bbcc|cccc|bbcc|cccc] - const uint16x8_t t0 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(utf16_packed), vreinterpretq_u8_u16(dup_even))); - // [bbcc|cccc|bbcc|cccc] => [00cc|cccc|0bcc|cccc] - const uint16x8_t t1 = vandq_u16(t0, simdutf_vec(0b0011111101111111)); - // [00cc|cccc|0bcc|cccc] => [10cc|cccc|0bcc|cccc] - const uint16x8_t t2 = vorrq_u16 (t1, simdutf_vec(0b1000000000000000)); + return std::make_pair(buf, utf16_output); +} +/* end file src/arm64/arm_convert_latin1_to_utf16.cpp */ +/* begin file src/arm64/arm_convert_latin1_to_utf32.cpp */ +std::pair arm_convert_latin1_to_utf32(const char* buf, size_t len, char32_t* utf32_output) { + const char* end = buf + len; - // s0: [aaaa|bbbb|bbcc|cccc] => [0000|0000|0000|aaaa] - const uint16x8_t s0 = vshrq_n_u16(utf16_packed, 12); - // s1: [aaaa|bbbb|bbcc|cccc] => [0000|bbbb|bb00|0000] - const uint16x8_t s1 = vandq_u16(utf16_packed, simdutf_vec(0b0000111111000000)); - // [0000|bbbb|bb00|0000] => [00bb|bbbb|0000|0000] - const uint16x8_t s1s = vshlq_n_u16(s1, 2); - // [00bb|bbbb|0000|aaaa] - const uint16x8_t s2 = vorrq_u16(s0, s1s); - // s3: [00bb|bbbb|0000|aaaa] => [11bb|bbbb|1110|aaaa] - const uint16x8_t s3 = vorrq_u16(s2, simdutf_vec(0b1100000011100000)); - const uint16x8_t v_07ff = vmovq_n_u16((uint16_t)0x07FF); - const uint16x8_t one_or_two_bytes_bytemask = vcleq_u16(utf16_packed, v_07ff); - const uint16x8_t m0 = vbicq_u16(simdutf_vec(0b0100000000000000), one_or_two_bytes_bytemask); - const uint16x8_t s4 = veorq_u16(s3, m0); - #undef simdutf_vec + while (buf + 16 <= end) { + uint8x16_t in8 = vld1q_u8(reinterpret_cast(buf)); + uint16x8_t in8low = vmovl_u8(vget_low_u8(in8)); + uint32x4_t in16lowlow = vmovl_u16(vget_low_u16(in8low)); + uint32x4_t in16lowhigh = vmovl_u16(vget_high_u16(in8low)); + uint16x8_t in8high = vmovl_u8(vget_high_u8(in8)); + uint32x4_t in8highlow = vmovl_u16(vget_low_u16(in8high)); + uint32x4_t in8highhigh = vmovl_u16(vget_high_u16(in8high)); + vst1q_u32(reinterpret_cast(utf32_output), in16lowlow); + vst1q_u32(reinterpret_cast(utf32_output+4), in16lowhigh); + vst1q_u32(reinterpret_cast(utf32_output+8), in8highlow); + vst1q_u32(reinterpret_cast(utf32_output+12), in8highhigh); - // 4. expand words 16-bit => 32-bit - const uint8x16_t out0 = vreinterpretq_u8_u16(vzip1q_u16(t2, s4)); - const uint8x16_t out1 = vreinterpretq_u8_u16(vzip2q_u16(t2, s4)); + utf32_output += 16; + buf += 16; + } - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle - const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); - const uint16x8_t one_byte_bytemask = vcleq_u16(utf16_packed, v_007f); - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t onemask = make_uint16x8_t(0x0001, 0x0004, - 0x0010, 0x0040, - 0x0100, 0x0400, - 0x1000, 0x4000 ); - const uint16x8_t twomask = make_uint16x8_t(0x0002, 0x0008, - 0x0020, 0x0080, - 0x0200, 0x0800, - 0x2000, 0x8000 ); - #else - const uint16x8_t onemask = { 0x0001, 0x0004, - 0x0010, 0x0040, - 0x0100, 0x0400, - 0x1000, 0x4000 }; - const uint16x8_t twomask = { 0x0002, 0x0008, - 0x0020, 0x0080, - 0x0200, 0x0800, - 0x2000, 0x8000 }; - #endif - const uint16x8_t combined = vorrq_u16(vandq_u16(one_byte_bytemask, onemask), vandq_u16(one_or_two_bytes_bytemask, twomask)); - const uint16_t mask = vaddvq_u16(combined); - // The following fast path may or may not be beneficial. - /*if(mask == 0) { - // We only have three-byte words. Use fast path. - const uint8x16_t shuffle = {2,3,1,6,7,5,10,11,9,14,15,13,0,0,0,0}; - const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle); - const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle); - vst1q_u8(utf8_output, utf8_0); - utf8_output += 12; - vst1q_u8(utf8_output, utf8_1); - utf8_output += 12; - buf += 8; - continue; - }*/ - const uint8_t mask0 = uint8_t(mask); - const uint8_t* row0 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask0][0]; - const uint8x16_t shuffle0 = vld1q_u8(row0 + 1); - const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle0); + return std::make_pair(buf, utf32_output); +} +/* end file src/arm64/arm_convert_latin1_to_utf32.cpp */ - const uint8_t mask1 = static_cast(mask >> 8); - const uint8_t* row1 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask1][0]; - const uint8x16_t shuffle1 = vld1q_u8(row1 + 1); - const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle1); +/* begin file src/arm64/arm_convert_utf8_to_utf16.cpp */ +// Convert up to 16 bytes from utf8 to utf16 using a mask indicating the +// end of the code points. Only the least significant 12 bits of the mask +// are accessed. +// It returns how many bytes were consumed (up to 16, usually 12). +template +size_t convert_masked_utf8_to_utf16(const char *input, + uint64_t utf8_end_of_code_point_mask, + char16_t *&utf16_output) { + // we use an approach where we try to process up to 12 input bytes. + // Why 12 input bytes and not 16? Because we are concerned with the size of + // the lookup tables. Also 12 is nicely divisible by two and three. + // + uint8x16_t in = vld1q_u8(reinterpret_cast(input)); + const uint16_t input_utf8_end_of_code_point_mask = + utf8_end_of_code_point_mask & 0xfff; + // + // Optimization note: our main path below is load-latency dependent. Thus it is maybe + // beneficial to have fast paths that depend on branch prediction but have less latency. + // This results in more instructions but, potentially, also higher speeds. - vst1q_u8(utf8_output, utf8_0); - utf8_output += row0[0]; - vst1q_u8(utf8_output, utf8_1); - utf8_output += row1[0]; + // We first try a few fast paths. + // The obvious first test is ASCII, which actually consumes the full 16. + if((utf8_end_of_code_point_mask & 0xFFFF) == 0xffff) { + // We process in chunks of 16 bytes + // The routine in simd.h is reused. + simd8 temp{vreinterpretq_s8_u8(in)}; + temp.store_ascii_as_utf16(utf16_output); + utf16_output += 16; // We wrote 16 16-bit characters. + return 16; // We consumed 16 bytes. + } - buf += 8; - } - // At least one 32-bit word will produce a surrogate pair in UTF-16 <=> will produce four UTF-8 bytes. - } else { - // Let us do a scalar fallback. - // It may seem wasteful to use scalar code, but being efficient with SIMD - // in the presence of surrogate pairs may require non-trivial tables. - size_t forward = 15; - size_t k = 0; - if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} - for(; k < forward; k++) { - uint32_t word = buf[k]; - if((word & 0xFFFFFF80)==0) { - *utf8_output++ = char(word); - } else if((word & 0xFFFFF800)==0) { - *utf8_output++ = char((word>>6) | 0b11000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); - } else if((word & 0xFFFF0000)==0) { - if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(nullptr, reinterpret_cast(utf8_output)); } - *utf8_output++ = char((word>>12) | 0b11100000); - *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); - } else { - if (word > 0x10FFFF) { return std::make_pair(nullptr, reinterpret_cast(utf8_output)); } - *utf8_output++ = char((word>>18) | 0b11110000); - *utf8_output++ = char(((word>>12) & 0b111111) | 0b10000000); - *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); - } - } - buf += k; + // 3 byte sequences are the next most common, as seen in CJK, which has long sequences + // of these. + if (input_utf8_end_of_code_point_mask == 0x924) { + // We want to take 4 3-byte UTF-8 code units and turn them into 4 2-byte UTF-16 code units. + uint16x4_t composed = convert_utf8_3_byte_to_utf16(in); + // Byte swap if necessary + if (!match_system(big_endian)) { + composed = vreinterpret_u16_u8(vrev16_u8(vreinterpret_u8_u16(composed))); } - } // while - - // check for invalid input - if (vmaxvq_u16(forbidden_bytemask) != 0) { - return std::make_pair(nullptr, reinterpret_cast(utf8_output)); + vst1_u16(reinterpret_cast(utf16_output), composed); + utf16_output += 4; // We wrote 4 16-bit characters. + return 12; // We consumed 12 bytes. } - return std::make_pair(buf, reinterpret_cast(utf8_output)); -} + // 2 byte sequences occur in short bursts in languages like Greek and Russian. + if ((utf8_end_of_code_point_mask & 0xFFF) == 0xaaa) { + // We want to take 6 2-byte UTF-8 code units and turn them into 6 2-byte UTF-16 code units. + uint16x8_t composed = convert_utf8_2_byte_to_utf16(in); + // Byte swap if necessary + if (!match_system(big_endian)) { + composed = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(composed))); + } + vst1q_u16(reinterpret_cast(utf16_output), composed); -std::pair arm_convert_utf32_to_utf8_with_errors(const char32_t* buf, size_t len, char* utf8_out) { - uint8_t * utf8_output = reinterpret_cast(utf8_out); - const char32_t* start = buf; - const char32_t* end = buf + len; + utf16_output += 6; // We wrote 6 16-bit characters. + return 12; // We consumed 12 bytes. + } - const uint16x8_t v_c080 = vmovq_n_u16((uint16_t)0xc080); + /// We do not have a fast path available, or the fast path is unimportant, so we fallback. + const uint8_t idx = + simdutf::tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][0]; - while (buf + 16 <= end) { - uint32x4_t in = vld1q_u32(reinterpret_cast(buf)); - uint32x4_t nextin = vld1q_u32(reinterpret_cast(buf+4)); + const uint8_t consumed = + simdutf::tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][1]; - // Check if no bits set above 16th - if(vmaxvq_u32(vorrq_u32(in, nextin)) <= 0xFFFF) { - // Pack UTF-32 to UTF-16 safely (without surrogate pairs) - // Apply UTF-16 => UTF-8 routine (arm_convert_utf16_to_utf8.cpp) - uint16x8_t utf16_packed = vcombine_u16(vmovn_u32(in), vmovn_u32(nextin)); - if(vmaxvq_u16(utf16_packed) <= 0x7F) { // ASCII fast path!!!! - // 1. pack the bytes - // obviously suboptimal. - uint8x8_t utf8_packed = vmovn_u16(utf16_packed); - // 2. store (8 bytes) - vst1_u8(utf8_output, utf8_packed); - // 3. adjust pointers - buf += 8; - utf8_output += 8; - continue; // we are done for this round! + if (idx < 64) { + // SIX (6) input code-code units + // Convert to UTF-16 + uint16x8_t composed = convert_utf8_1_to_2_byte_to_utf16(in, idx); + // Byte swap if necessary + if (!match_system(big_endian)) { + composed = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(composed))); + } + // Store + vst1q_u16(reinterpret_cast(utf16_output), composed); + utf16_output += 6; // We wrote 6 16-bit characters. + return consumed; + } else if (idx < 145) { + // FOUR (4) input code-code units + // UTF-16 and UTF-32 use similar algorithms, but UTF-32 skips the narrowing. + uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[idx])); + // XXX: depending on the system scalar instructions might be faster. + // 1 byte: 00000000 00000000 0ccccccc + // 2 byte: 00000000 110bbbbb 10cccccc + // 3 byte: 1110aaaa 10bbbbbb 10cccccc + uint32x4_t perm = vreinterpretq_u32_u8(vqtbl1q_u8(in, sh)); + // 1 byte: 00000000 0ccccccc + // 2 byte: xx0bbbbb x0cccccc + // 3 byte: xxbbbbbb x0cccccc + uint16x4_t lowperm = vmovn_u32(perm); + // Partially mask with bic (doesn't require a temporary register unlike and) + // The shift left insert below will clear the top bits. + // 1 byte: 00000000 00000000 + // 2 byte: xx0bbbbb 00000000 + // 3 byte: xxbbbbbb 00000000 + uint16x4_t middlebyte = vbic_u16(lowperm, vmov_n_u16(uint16_t(~0xFF00))); + // ASCII + // 1 byte: 00000000 0ccccccc + // 2+byte: 00000000 00cccccc + uint16x4_t ascii = vand_u16(lowperm, vmov_n_u16(0x7F)); + // Split into narrow vectors. + // 2 byte: 00000000 00000000 + // 3 byte: 00000000 xxxxaaaa + uint16x4_t highperm = vshrn_n_u32(perm, 16); + // Shift right accumulate the middle byte + // 1 byte: 00000000 0ccccccc + // 2 byte: 00xx0bbb bbcccccc + // 3 byte: 00xxbbbb bbcccccc + uint16x4_t middlelow = vsra_n_u16(ascii, middlebyte, 2); + // Shift left and insert the top 4 bits, overwriting the garbage + // 1 byte: 00000000 0ccccccc + // 2 byte: 00000bbb bbcccccc + // 3 byte: aaaabbbb bbcccccc + uint16x4_t composed = vsli_n_u16(middlelow, highperm, 12); + // Byte swap if necessary + if (!match_system(big_endian)) { + composed = vreinterpret_u16_u8(vrev16_u8(vreinterpret_u8_u16(composed))); + } + vst1_u16(reinterpret_cast(utf16_output), composed); + + utf16_output += 4; // We wrote 4 16-bit codepoints + return consumed; + } else if (idx < 209) { + // THREE (3) input code-code units + if (input_utf8_end_of_code_point_mask == 0x888) { + // We want to take 3 4-byte UTF-8 code units and turn them into 3 4-byte UTF-16 pairs. + // Generating surrogate pairs is a little tricky though, but it is easier when we + // can assume they are all pairs. + // This version does not use the LUT, but 4 byte sequences are less common and the + // overhead of the extra memory access is less important than the early branch overhead + // in shorter sequences. + + // Swap byte pairs + // 10dddddd 10cccccc|10bbbbbb 11110aaa + // 10cccccc 10dddddd|11110aaa 10bbbbbb + uint8x16_t swap = vrev16q_u8(in); + // Shift left 2 bits + // cccccc00 dddddd00 xxxxxxxx bbbbbb00 + uint32x4_t shift = vreinterpretq_u32_u8(vshlq_n_u8(swap, 2)); + // Create a magic number containing the low 2 bits of the trail surrogate and all the + // corrections needed to create the pair. + // UTF-8 4b prefix = -0x0000|0xF000 + // surrogate offset = -0x0000|0x0040 (0x10000 << 6) + // surrogate high = +0x0000|0xD800 + // surrogate low = +0xDC00|0x0000 + // ------------------------------- + // = +0xDC00|0xE7C0 + uint32x4_t magic = vmovq_n_u32(0xDC00E7C0); + // Generate unadjusted trail surrogate minus lowest 2 bits + // xxxxxxxx xxxxxxxx|11110aaa bbbbbb00 + uint32x4_t trail = vbslq_u32(vmovq_n_u32(0x0000FF00), vreinterpretq_u32_u8(swap), shift); + // Insert low 2 bits of trail surrogate to magic number for later + // 11011100 00000000 11100111 110000cc + uint16x8_t magic_with_low_2 = vreinterpretq_u16_u32(vsraq_n_u32(magic, shift, 30)); + // Generate lead surrogate + // xxxxcccc ccdddddd|xxxxxxxx xxxxxxxx + uint32x4_t lead = vreinterpretq_u32_u16(vsliq_n_u16(vreinterpretq_u16_u8(swap), vreinterpretq_u16_u8(in), 6)); + // Mask out lead + // 000000cc ccdddddd|xxxxxxxx xxxxxxxx + lead = vbicq_u32(lead, vmovq_n_u32(uint32_t(~0x03FFFFFF))); + // Blend pairs + // 000000cc ccdddddd|11110aaa bbbbbb00 + uint16x8_t blend = vreinterpretq_u16_u32(vbslq_u32(vmovq_n_u32(0x0000FFFF), trail, lead)); + // Add magic number to finish the result + // 110111CC CCDDDDDD|110110AA BBBBBBCC + uint16x8_t composed = vaddq_u16(blend, magic_with_low_2); + // Byte swap if necessary + if (!match_system(big_endian)) { + composed = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(composed))); } + vst1q_u16(reinterpret_cast(utf16_output), composed); + utf16_output += 6; // We 3 32-bit surrogate pairs. + return 12; // We consumed 12 bytes. + } + // 3 1-4 byte sequences + uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[idx])); - if (vmaxvq_u16(utf16_packed) <= 0x7FF) { - // 1. prepare 2-byte values - // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 - // expected output : [110a|aaaa|10bb|bbbb] x 8 - const uint16x8_t v_1f00 = vmovq_n_u16((int16_t)0x1f00); - const uint16x8_t v_003f = vmovq_n_u16((int16_t)0x003f); - - // t0 = [000a|aaaa|bbbb|bb00] - const uint16x8_t t0 = vshlq_n_u16(utf16_packed, 2); - // t1 = [000a|aaaa|0000|0000] - const uint16x8_t t1 = vandq_u16(t0, v_1f00); - // t2 = [0000|0000|00bb|bbbb] - const uint16x8_t t2 = vandq_u16(utf16_packed, v_003f); - // t3 = [000a|aaaa|00bb|bbbb] - const uint16x8_t t3 = vorrq_u16(t1, t2); - // t4 = [110a|aaaa|10bb|bbbb] - const uint16x8_t t4 = vorrq_u16(t3, v_c080); - // 2. merge ASCII and 2-byte codewords - const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); - const uint16x8_t one_byte_bytemask = vcleq_u16(utf16_packed, v_007f); - const uint8x16_t utf8_unpacked = vreinterpretq_u8_u16(vbslq_u16(one_byte_bytemask, utf16_packed, t4)); - // 3. prepare bitmask for 8-bit lookup - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t mask = make_uint16x8_t(0x0001, 0x0004, - 0x0010, 0x0040, - 0x0002, 0x0008, - 0x0020, 0x0080); - #else - const uint16x8_t mask = { 0x0001, 0x0004, - 0x0010, 0x0040, - 0x0002, 0x0008, - 0x0020, 0x0080 }; - #endif - uint16_t m2 = vaddvq_u16(vandq_u16(one_byte_bytemask, mask)); - // 4. pack the bytes - const uint8_t* row = &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; - const uint8x16_t shuffle = vld1q_u8(row + 1); - const uint8x16_t utf8_packed = vqtbl1q_u8(utf8_unpacked, shuffle); + // 1 byte: 00000000 00000000 00000000 0ddddddd + // 3 byte: 00000000 00000000 110ccccc 10dddddd + // 3 byte: 00000000 1110bbbb 10cccccc 10dddddd + // 4 byte: 11110aaa 10bbbbbb 10cccccc 10dddddd + uint32x4_t perm = vreinterpretq_u32_u8(vqtbl1q_u8(in, sh)); + // Mask the low and middle bytes + // 00000000 00000000 00000000 0ddddddd + uint32x4_t ascii = vandq_u32(perm, vmovq_n_u32(0x7f)); + // Because the surrogates need more work, the high surrogate is computed first. + uint32x4_t middlehigh = vshlq_n_u32(perm, 2); + // 00000000 00000000 00cccccc 00000000 + uint32x4_t middlebyte = vandq_u32(perm, vmovq_n_u32(0x3F00)); + // Start assembling the sequence. Since the 4th byte is in the same position as it + // would be in a surrogate and there is no dependency, shift left instead of right. + // 3 byte: 00000000 10bbbbxx xxxxxxxx xxxxxxxx + // 4 byte: 11110aaa bbbbbbxx xxxxxxxx xxxxxxxx + uint32x4_t ab = vbslq_u32(vmovq_n_u32(0xFF000000), perm, middlehigh); + // Top 16 bits contains the high ten bits of the surrogate pair before correction + // 3 byte: 00000000 10bbbbcc|cccc0000 00000000 + // 4 byte: 11110aaa bbbbbbcc|cccc0000 00000000 - high 10 bits correct w/o correction + uint32x4_t abc = vbslq_u32(vmovq_n_u32(0xFFFC0000), ab, vshlq_n_u32(middlebyte, 4)); + // Combine the low 6 or 7 bits by a shift right accumulate + // 3 byte: 00000000 00000010|bbbbcccc ccdddddd - low 16 bits correct + // 4 byte: 00000011 110aaabb|bbbbcccc ccdddddd - low 10 bits correct w/o correction + uint32x4_t composed = vsraq_n_u32(ascii, abc, 6); + // After this is for surrogates + // Blend the low and high surrogates + // 4 byte: 11110aaa bbbbbbcc|bbbbcccc ccdddddd + uint32x4_t mixed = vbslq_u32(vmovq_n_u32(0xFFFF0000), abc, composed); + // Clear the upper 6 bits of the low surrogate. Don't clear the upper bits yet as + // 0x10000 was not subtracted from the codepoint yet. + // 4 byte: 11110aaa bbbbbbcc|000000cc ccdddddd + uint16x8_t masked_pair = + vreinterpretq_u16_u32(vbicq_u32(mixed, vmovq_n_u32(uint32_t(~0xFFFF03FF)))); + // Correct the remaining UTF-8 prefix, surrogate offset, and add the surrogate prefixes + // in one magic 16-bit addition. + // similar magic number but without the continue byte adjust and halfword swapped + // UTF-8 4b prefix = -0xF000|0x0000 + // surrogate offset = -0x0040|0x0000 (0x10000 << 6) + // surrogate high = +0xD800|0x0000 + // surrogate low = +0x0000|0xDC00 + // ----------------------------------- + // = +0xE7C0|0xDC00 + uint16x8_t magic = vreinterpretq_u16_u32(vmovq_n_u32(0xE7C0DC00)); + // 4 byte: 110110AA BBBBBBCC|110111CC CCDDDDDD - surrogate pair complete + uint32x4_t surrogates = vreinterpretq_u32_u16(vaddq_u16(masked_pair, magic)); + // If the high bit is 1 (s32 less than zero), this needs a surrogate pair + uint32x4_t is_pair = vcltzq_s32(vreinterpretq_s32_u32(perm)); + + // Select either the 4 byte surrogate pair or the 2 byte solo codepoint + // 3 byte: 0xxxxxxx xxxxxxxx|bbbbcccc ccdddddd + // 4 byte: 110110AA BBBBBBCC|110111CC CCDDDDDD + uint32x4_t selected = vbslq_u32(is_pair, surrogates, composed); + // Byte swap if necessary + if (!match_system(big_endian)) { + selected = vreinterpretq_u32_u8(vrev16q_u8(vreinterpretq_u8_u32(selected))); + } + // Attempting to shuffle and store would be complex, just scalarize. + uint32_t buffer[4]; + vst1q_u32(buffer, selected); + // Test for the top bit of the surrogate mask. + const uint32_t SURROGATE_MASK = match_system(big_endian) ? 0x80000000 : 0x00800000; + for (size_t i = 0; i < 3; i++) { + // Surrogate + if (buffer[i] & SURROGATE_MASK) { + utf16_output[0] = uint16_t(buffer[i] >> 16); + utf16_output[1] = uint16_t(buffer[i] & 0xFFFF); + utf16_output += 2; + } else { + utf16_output[0] = uint16_t(buffer[i] & 0xFFFF); + utf16_output++; + } + } + return consumed; + } else { + // here we know that there is an error but we do not handle errors + return 12; + } +} - // 5. store bytes - vst1q_u8(utf8_output, utf8_packed); +/* end file src/arm64/arm_convert_utf8_to_utf16.cpp */ +/* begin file src/arm64/arm_convert_utf8_to_utf32.cpp */ +// Convert up to 12 bytes from utf8 to utf32 using a mask indicating the +// end of the code points. Only the least significant 12 bits of the mask +// are accessed. +// It returns how many bytes were consumed (up to 12). +size_t convert_masked_utf8_to_utf32(const char *input, + uint64_t utf8_end_of_code_point_mask, + char32_t *&utf32_out) { + // we use an approach where we try to process up to 12 input bytes. + // Why 12 input bytes and not 16? Because we are concerned with the size of + // the lookup tables. Also 12 is nicely divisible by two and three. + // + uint32_t*& utf32_output = reinterpret_cast(utf32_out); + uint8x16_t in = vld1q_u8(reinterpret_cast(input)); + const uint16_t input_utf8_end_of_code_point_mask = + utf8_end_of_code_point_mask & 0xFFF; + // + // Optimization note: our main path below is load-latency dependent. Thus it is maybe + // beneficial to have fast paths that depend on branch prediction but have less latency. + // This results in more instructions but, potentially, also higher speeds. + // + // We first try a few fast paths. + if((utf8_end_of_code_point_mask & 0xffff) == 0xffff) { + // We process in chunks of 16 bytes. + // use fast implementation in src/simdutf/arm64/simd.h + // Ideally the compiler can keep the tables in registers. + simd8 temp{vreinterpretq_s8_u8(in)}; + temp.store_ascii_as_utf32_tbl(utf32_out); + utf32_output += 16; // We wrote 16 32-bit characters. + return 16; // We consumed 16 bytes. + } + if(input_utf8_end_of_code_point_mask == 0x924) { + // We want to take 4 3-byte UTF-8 code units and turn them into 4 4-byte UTF-32 code units. + // Convert to UTF-16 + uint16x4_t composed_utf16 = convert_utf8_3_byte_to_utf16(in); + // Zero extend and store via ST2 with a zero. + uint16x4x2_t interleaver = {{ composed_utf16, vmov_n_u16(0) }}; + vst2_u16(reinterpret_cast(utf32_output), interleaver); + utf32_output += 4; // We wrote 4 32-bit characters. + return 12; // We consumed 12 bytes. + } + + // 2 byte sequences occur in short bursts in languages like Greek and Russian. + if(input_utf8_end_of_code_point_mask == 0xaaa) { + // We want to take 6 2-byte UTF-8 code units and turn them into 6 4-byte UTF-32 code units. + // Convert to UTF-16 + uint16x8_t composed_utf16 = convert_utf8_2_byte_to_utf16(in); + // Zero extend and store via ST2 with a zero. + uint16x8x2_t interleaver = {{ composed_utf16, vmovq_n_u16(0) }}; + vst2q_u16(reinterpret_cast(utf32_output), interleaver); + utf32_output += 6; // We wrote 6 32-bit characters. + return 12; // We consumed 12 bytes. + } + /// Either no fast path or an unimportant fast path. - // 6. adjust pointers - buf += 8; - utf8_output += row[0]; - continue; + const uint8_t idx = + simdutf::tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][0]; + const uint8_t consumed = + simdutf::tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][1]; - } else { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes - // check for invalid input - const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); - const uint16x8_t v_dfff = vmovq_n_u16((uint16_t)0xdfff); - const uint16x8_t forbidden_bytemask = vandq_u16(vcleq_u16(utf16_packed, v_dfff), vcgeq_u16(utf16_packed, v_d800)); - if (vmaxvq_u16(forbidden_bytemask) != 0) { - return std::make_pair(result(error_code::SURROGATE, buf - start), reinterpret_cast(utf8_output)); - } - - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t dup_even = make_uint16x8_t(0x0000, 0x0202, 0x0404, 0x0606, - 0x0808, 0x0a0a, 0x0c0c, 0x0e0e); - #else - const uint16x8_t dup_even = {0x0000, 0x0202, 0x0404, 0x0606, - 0x0808, 0x0a0a, 0x0c0c, 0x0e0e}; - #endif - /* In this branch we handle three cases: - 1. [0000|0000|0ccc|cccc] => [0ccc|cccc] - single UFT-8 byte - 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes - 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - - We expand the input word (16-bit) into two words (32-bit), thus - we have room for four bytes. However, we need five distinct bit - layouts. Note that the last byte in cases #2 and #3 is the same. - - We precompute byte 1 for case #1 and the common byte for cases #2 & #3 - in register t2. - - We precompute byte 1 for case #3 and -- **conditionally** -- precompute - either byte 1 for case #2 or byte 2 for case #3. Note that they - differ by exactly one bit. - - Finally from these two words we build proper UTF-8 sequence, taking - into account the case (i.e, the number of bytes to write). - */ - /** - * Given [aaaa|bbbb|bbcc|cccc] our goal is to produce: - * t2 => [0ccc|cccc] [10cc|cccc] - * s4 => [1110|aaaa] ([110b|bbbb] OR [10bb|bbbb]) - */ - #define simdutf_vec(x) vmovq_n_u16(static_cast(x)) - // [aaaa|bbbb|bbcc|cccc] => [bbcc|cccc|bbcc|cccc] - const uint16x8_t t0 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(utf16_packed), vreinterpretq_u8_u16(dup_even))); - // [bbcc|cccc|bbcc|cccc] => [00cc|cccc|0bcc|cccc] - const uint16x8_t t1 = vandq_u16(t0, simdutf_vec(0b0011111101111111)); - // [00cc|cccc|0bcc|cccc] => [10cc|cccc|0bcc|cccc] - const uint16x8_t t2 = vorrq_u16 (t1, simdutf_vec(0b1000000000000000)); - - // s0: [aaaa|bbbb|bbcc|cccc] => [0000|0000|0000|aaaa] - const uint16x8_t s0 = vshrq_n_u16(utf16_packed, 12); - // s1: [aaaa|bbbb|bbcc|cccc] => [0000|bbbb|bb00|0000] - const uint16x8_t s1 = vandq_u16(utf16_packed, simdutf_vec(0b0000111111000000)); - // [0000|bbbb|bb00|0000] => [00bb|bbbb|0000|0000] - const uint16x8_t s1s = vshlq_n_u16(s1, 2); - // [00bb|bbbb|0000|aaaa] - const uint16x8_t s2 = vorrq_u16(s0, s1s); - // s3: [00bb|bbbb|0000|aaaa] => [11bb|bbbb|1110|aaaa] - const uint16x8_t s3 = vorrq_u16(s2, simdutf_vec(0b1100000011100000)); - const uint16x8_t v_07ff = vmovq_n_u16((uint16_t)0x07FF); - const uint16x8_t one_or_two_bytes_bytemask = vcleq_u16(utf16_packed, v_07ff); - const uint16x8_t m0 = vbicq_u16(simdutf_vec(0b0100000000000000), one_or_two_bytes_bytemask); - const uint16x8_t s4 = veorq_u16(s3, m0); - #undef simdutf_vec + if (idx < 64) { + // SIX (6) input code-code units + // Convert to UTF-16 + uint16x8_t composed_utf16 = convert_utf8_1_to_2_byte_to_utf16(in, idx); + // Zero extend and store with ST2 and zero + uint16x8x2_t interleaver = {{ composed_utf16, vmovq_n_u16(0) }}; + vst2q_u16(reinterpret_cast(utf32_output), interleaver); + utf32_output += 6; // We wrote 6 32-bit characters. + return consumed; + } else if (idx < 145) { + // FOUR (4) input code-code units + // UTF-16 and UTF-32 use similar algorithms, but UTF-32 skips the narrowing. + uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[idx])); + // Shuffle + // 1 byte: 00000000 00000000 0ccccccc + // 2 byte: 00000000 110bbbbb 10cccccc + // 3 byte: 1110aaaa 10bbbbbb 10cccccc + uint32x4_t perm = vreinterpretq_u32_u8(vqtbl1q_u8(in, sh)); + // Split + // 00000000 00000000 0ccccccc + uint32x4_t ascii = vandq_u32(perm, vmovq_n_u32(0x7F)); // 6 or 7 bits + // Note: unmasked + // xxxxxxxx aaaaxxxx xxxxxxxx + uint32x4_t high = vshrq_n_u32(perm, 4); // 4 bits + // Use 16 bit bic instead of and. + // The top bits will be corrected later in the bsl + // 00000000 10bbbbbb 00000000 + uint32x4_t middle = + vreinterpretq_u32_u16(vbicq_u16(vreinterpretq_u16_u32(perm), vmovq_n_u16(uint16_t(~0xff00)))); // 5 or 6 bits + // Combine low and middle with shift right accumulate + // 00000000 00xxbbbb bbcccccc + uint32x4_t lowmid = vsraq_n_u32(ascii, middle, 2); + // Insert top 4 bits from high byte with bitwise select + // 00000000 aaaabbbb bbcccccc + uint32x4_t composed = vbslq_u32(vmovq_n_u32(0x0000F000), high, lowmid); + vst1q_u32(utf32_output, composed); + utf32_output += 4; // We wrote 4 32-bit characters. + return consumed; + } else if (idx < 209) { + // THREE (3) input code-code units + if (input_utf8_end_of_code_point_mask == 0x888) { + // We want to take 3 4-byte UTF-8 code units and turn them into 3 4-byte UTF-32 code units. + // This uses the same method as the fixed 3 byte version, reversing and shift left insert. + // However, there is no need for a shuffle mask now, just rev16 and rev32. + // + // This version does not use the LUT, but 4 byte sequences are less common and the + // overhead of the extra memory access is less important than the early branch overhead + // in shorter sequences, so it comes last. + + // Swap pairs of bytes + // 10dddddd|10cccccc|10bbbbbb|11110aaa + // 10cccccc 10dddddd|11110aaa 10bbbbbb + uint16x8_t swap1 = vreinterpretq_u16_u8(vrev16q_u8(in)); + // Shift left and insert + // xxxxcccc ccdddddd|xxxxxxxa aabbbbbb + uint16x8_t merge1 = vsliq_n_u16(swap1, vreinterpretq_u16_u8(in), 6); + // Swap 16-bit lanes + // xxxxcccc ccdddddd xxxxxxxa aabbbbbb + // xxxxxxxa aabbbbbb xxxxcccc ccdddddd + uint32x4_t swap2 = vreinterpretq_u32_u16(vrev32q_u16(merge1)); + // Shift insert again + // xxxxxxxx xxxaaabb bbbbcccc ccdddddd + uint32x4_t merge2 = vsliq_n_u32(swap2, vreinterpretq_u32_u16(merge1), 12); + // Clear the garbage + // 00000000 000aaabb bbbbcccc ccdddddd + uint32x4_t composed = vandq_u32(merge2, vmovq_n_u32(0x1FFFFF)); + // Store + vst1q_u32(utf32_output, composed); + + utf32_output += 3; // We wrote 3 32-bit characters. + return 12; // We consumed 12 bytes. + } + // Unlike UTF-16, doing a fast codepath doesn't have nearly as much benefit due to + // surrogates no longer being involved. + uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[idx])); + // 1 byte: 00000000 00000000 00000000 0ddddddd + // 2 byte: 00000000 00000000 110ccccc 10dddddd + // 3 byte: 00000000 1110bbbb 10cccccc 10dddddd + // 4 byte: 11110aaa 10bbbbbb 10cccccc 10dddddd + uint32x4_t perm = vreinterpretq_u32_u8(vqtbl1q_u8(in, sh)); + // Ascii + uint32x4_t ascii = vandq_u32(perm, vmovq_n_u32(0x7F)); + uint32x4_t middle = vandq_u32(perm, vmovq_n_u32(0x3f00)); + // When converting the way we do, the 3 byte prefix will be interpreted as the + // 18th bit being set, since the code would interpret the lead byte (0b1110bbbb) + // as a continuation byte (0b10bbbbbb). To fix this, we can either xor or do an + // 8 bit add of the 6th bit shifted right by 1. Since NEON has shift right accumulate, + // we use that. + // 4 byte 3 byte + // 10bbbbbb 1110bbbb + // 00000000 01000000 6th bit + // 00000000 00100000 shift right + // 10bbbbbb 0000bbbb add + // 00bbbbbb 0000bbbb mask + uint8x16_t correction = + vreinterpretq_u8_u32(vandq_u32(perm, vmovq_n_u32(0x00400000))); + uint32x4_t corrected = + vreinterpretq_u32_u8(vsraq_n_u8(vreinterpretq_u8_u32(perm), correction, 1)); + // 00000000 00000000 0000cccc ccdddddd + uint32x4_t cd = vsraq_n_u32(ascii, middle, 2); + // Insert twice + // xxxxxxxx xxxaaabb bbbbxxxx xxxxxxxx + uint32x4_t ab = vbslq_u32(vmovq_n_u32(0x01C0000), vshrq_n_u32(corrected, 6), vshrq_n_u32(corrected, 4)); + // 00000000 000aaabb bbbbcccc ccdddddd + uint32x4_t composed = vbslq_u32(vmovq_n_u32(0xFFE00FFF), cd, ab); + // Store + vst1q_u32(utf32_output, composed); + utf32_output += 3; // We wrote 3 32-bit characters. + return consumed; + } else { + // here we know that there is an error but we do not handle errors + return 12; + } +} +/* end file src/arm64/arm_convert_utf8_to_utf32.cpp */ +/* begin file src/arm64/arm_convert_utf8_to_latin1.cpp */ +// Convert up to 16 bytes from utf8 to utf16 using a mask indicating the +// end of the code points. Only the least significant 12 bits of the mask +// are accessed. +// It returns how many bytes were consumed (up to 16, usually 12). +size_t convert_masked_utf8_to_latin1(const char *input, + uint64_t utf8_end_of_code_point_mask, + char *&latin1_output) { + // we use an approach where we try to process up to 12 input bytes. + // Why 12 input bytes and not 16? Because we are concerned with the size of + // the lookup tables. Also 12 is nicely divisible by two and three. + // + uint8x16_t in = vld1q_u8(reinterpret_cast(input)); + const uint16_t input_utf8_end_of_code_point_mask = + utf8_end_of_code_point_mask & 0xfff; + // + // Optimization note: our main path below is load-latency dependent. Thus it is maybe + // beneficial to have fast paths that depend on branch prediction but have less latency. + // This results in more instructions but, potentially, also higher speeds. - // 4. expand words 16-bit => 32-bit - const uint8x16_t out0 = vreinterpretq_u8_u16(vzip1q_u16(t2, s4)); - const uint8x16_t out1 = vreinterpretq_u8_u16(vzip2q_u16(t2, s4)); + // We first try a few fast paths. + // The obvious first test is ASCII, which actually consumes the full 16. + if((utf8_end_of_code_point_mask & 0xFFFF) == 0xffff) { + // We process in chunks of 16 bytes + vst1q_u8(reinterpret_cast(latin1_output), in); + latin1_output += 16; // We wrote 16 18-bit characters. + return 16; // We consumed 16 bytes. + } + /// We do not have a fast path available, or the fast path is unimportant, so we fallback. + const uint8_t idx = + simdutf::tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][0]; - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle - const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); - const uint16x8_t one_byte_bytemask = vcleq_u16(utf16_packed, v_007f); - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint16x8_t onemask = make_uint16x8_t(0x0001, 0x0004, - 0x0010, 0x0040, - 0x0100, 0x0400, - 0x1000, 0x4000 ); - const uint16x8_t twomask = make_uint16x8_t(0x0002, 0x0008, - 0x0020, 0x0080, - 0x0200, 0x0800, - 0x2000, 0x8000 ); - #else - const uint16x8_t onemask = { 0x0001, 0x0004, - 0x0010, 0x0040, - 0x0100, 0x0400, - 0x1000, 0x4000 }; - const uint16x8_t twomask = { 0x0002, 0x0008, - 0x0020, 0x0080, - 0x0200, 0x0800, - 0x2000, 0x8000 }; - #endif - const uint16x8_t combined = vorrq_u16(vandq_u16(one_byte_bytemask, onemask), vandq_u16(one_or_two_bytes_bytemask, twomask)); - const uint16_t mask = vaddvq_u16(combined); - // The following fast path may or may not be beneficial. - /*if(mask == 0) { - // We only have three-byte words. Use fast path. - const uint8x16_t shuffle = {2,3,1,6,7,5,10,11,9,14,15,13,0,0,0,0}; - const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle); - const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle); - vst1q_u8(utf8_output, utf8_0); - utf8_output += 12; - vst1q_u8(utf8_output, utf8_1); - utf8_output += 12; - buf += 8; - continue; - }*/ - const uint8_t mask0 = uint8_t(mask); + const uint8_t consumed = + simdutf::tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][1]; + // this indicates an invalid input: + if(idx >= 64) { return consumed; } + // Here we should have (idx < 64), if not, there is a bug in the validation or elsewhere. + // SIX (6) input code-code units + // this is a relatively easy scenario + // we process SIX (6) input code-code units. The max length in bytes of six code + // code units spanning between 1 and 2 bytes each is 12 bytes. + // Converts 6 1-2 byte UTF-8 characters to 6 UTF-16 characters. + // This is a relatively easy scenario + // we process SIX (6) input code-code units. The max length in bytes of six code + // code units spanning between 1 and 2 bytes each is 12 bytes. + uint8x16_t sh = vld1q_u8(reinterpret_cast(simdutf::tables::utf8_to_utf16::shufutf8[idx])); + // Shuffle + // 1 byte: 00000000 0bbbbbbb + // 2 byte: 110aaaaa 10bbbbbb + uint16x8_t perm = vreinterpretq_u16_u8(vqtbl1q_u8(in, sh)); + // Mask + // 1 byte: 00000000 0bbbbbbb + // 2 byte: 00000000 00bbbbbb + uint16x8_t ascii = vandq_u16(perm, vmovq_n_u16(0x7f)); // 6 or 7 bits + // 1 byte: 00000000 00000000 + // 2 byte: 000aaaaa 00000000 + uint16x8_t highbyte = vandq_u16(perm, vmovq_n_u16(0x1f00)); // 5 bits + // Combine with a shift right accumulate + // 1 byte: 00000000 0bbbbbbb + // 2 byte: 00000aaa aabbbbbb + uint16x8_t composed = vsraq_n_u16(ascii, highbyte, 2); + // writing 8 bytes even though we only care about the first 6 bytes. + uint8x8_t latin1_packed = vmovn_u16(composed); + vst1_u8(reinterpret_cast(latin1_output), latin1_packed); + latin1_output += 6; // We wrote 6 bytes. + return consumed; +} - const uint8_t* row0 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask0][0]; - const uint8x16_t shuffle0 = vld1q_u8(row0 + 1); - const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle0); +/* end file src/arm64/arm_convert_utf8_to_latin1.cpp */ - const uint8_t mask1 = static_cast(mask >> 8); - const uint8_t* row1 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask1][0]; - const uint8x16_t shuffle1 = vld1q_u8(row1 + 1); - const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle1); +/* begin file src/arm64/arm_convert_utf16_to_latin1.cpp */ - vst1q_u8(utf8_output, utf8_0); - utf8_output += row0[0]; - vst1q_u8(utf8_output, utf8_1); - utf8_output += row1[0]; +template +std::pair arm_convert_utf16_to_latin1(const char16_t* buf, size_t len, char* latin1_output) { + const char16_t* end = buf + len; + while (buf + 8 <= end) { + uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); + if (!match_system(big_endian)) { in = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(in))); } + if (vmaxvq_u16(in) <= 0xff) { + // 1. pack the bytes + uint8x8_t latin1_packed = vmovn_u16(in); + // 2. store (8 bytes) + vst1_u8(reinterpret_cast(latin1_output), latin1_packed); + // 3. adjust pointers + buf += 8; + latin1_output += 8; + } else { + return std::make_pair(nullptr, reinterpret_cast(latin1_output)); + } + } // while + return std::make_pair(buf, latin1_output); +} - buf += 8; - } - // At least one 32-bit word will produce a surrogate pair in UTF-16 <=> will produce four UTF-8 bytes. +template +std::pair arm_convert_utf16_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) { + const char16_t* start = buf; + const char16_t* end = buf + len; + while (buf + 8 <= end) { + uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); + if (!match_system(big_endian)) { in = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(in))); } + if (vmaxvq_u16(in) <= 0xff) { + // 1. pack the bytes + uint8x8_t latin1_packed = vmovn_u16(in); + // 2. store (8 bytes) + vst1_u8(reinterpret_cast(latin1_output), latin1_packed); + // 3. adjust pointers + buf += 8; + latin1_output += 8; } else { // Let us do a scalar fallback. - // It may seem wasteful to use scalar code, but being efficient with SIMD - // in the presence of surrogate pairs may require non-trivial tables. - size_t forward = 15; - size_t k = 0; - if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} - for(; k < forward; k++) { - uint32_t word = buf[k]; - if((word & 0xFFFFFF80)==0) { - *utf8_output++ = char(word); - } else if((word & 0xFFFFF800)==0) { - *utf8_output++ = char((word>>6) | 0b11000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); - } else if((word & 0xFFFF0000)==0) { - if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), reinterpret_cast(utf8_output)); } - *utf8_output++ = char((word>>12) | 0b11100000); - *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); + for(int k = 0; k < 8; k++) { + uint16_t word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k]) : buf[k]; + if(word <= 0xff) { + *latin1_output++ = char(word); } else { - if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), reinterpret_cast(utf8_output)); } - *utf8_output++ = char((word>>18) | 0b11110000); - *utf8_output++ = char(((word>>12) & 0b111111) | 0b10000000); - *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); + return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), latin1_output); } } - buf += k; } } // while - - return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast(utf8_output)); + return std::make_pair(result(error_code::SUCCESS, buf - start), latin1_output); } -/* end file src/arm64/arm_convert_utf32_to_utf8.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=arm64/arm_convert_utf32_to_utf16.cpp -/* begin file src/arm64/arm_convert_utf32_to_utf16.cpp */ -template -std::pair arm_convert_utf32_to_utf16(const char32_t* buf, size_t len, char16_t* utf16_out) { - uint16_t * utf16_output = reinterpret_cast(utf16_out); - const char32_t* end = buf + len; +/* end file src/arm64/arm_convert_utf16_to_latin1.cpp */ +/* begin file src/arm64/arm_convert_utf16_to_utf8.cpp */ +/* + The vectorized algorithm works on single SSE register i.e., it + loads eight 16-bit code units. - uint16x4_t forbidden_bytemask = vmov_n_u16(0x0); + We consider three cases: + 1. an input register contains no surrogates and each value + is in range 0x0000 .. 0x07ff. + 2. an input register contains no surrogates and values are + is in range 0x0000 .. 0xffff. + 3. an input register contains surrogates --- i.e. codepoints + can have 16 or 32 bits. - while(buf + 4 <= end) { - uint32x4_t in = vld1q_u32(reinterpret_cast(buf)); + Ad 1. - // Check if no bits set above 16th - if(vmaxvq_u32(in) <= 0xFFFF) { - uint16x4_t utf16_packed = vmovn_u32(in); + When values are less than 0x0800, it means that a 16-bit code unit + can be converted into: 1) single UTF8 byte (when it's an ASCII + char) or 2) two UTF8 bytes. - const uint16x4_t v_d800 = vmov_n_u16((uint16_t)0xd800); - const uint16x4_t v_dfff = vmov_n_u16((uint16_t)0xdfff); - forbidden_bytemask = vorr_u16(vand_u16(vcle_u16(utf16_packed, v_dfff), vcge_u16(utf16_packed, v_d800)), forbidden_bytemask); + For this case we do only some shuffle to obtain these 2-byte + codes and finally compress the whole SSE register with a single + shuffle. - if (!match_system(big_endian)) { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x8_t swap = make_uint8x8_t(1, 0, 3, 2, 5, 4, 7, 6); - #else - const uint8x8_t swap = {1, 0, 3, 2, 5, 4, 7, 6}; - #endif - utf16_packed = vreinterpret_u16_u8(vtbl1_u8(vreinterpret_u8_u16(utf16_packed), swap)); - } - vst1_u16(utf16_output, utf16_packed); - utf16_output += 4; - buf += 4; - } else { - size_t forward = 3; - size_t k = 0; - if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} - for(; k < forward; k++) { - uint32_t word = buf[k]; - if((word & 0xFFFF0000)==0) { - // will not generate a surrogate pair - if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(nullptr, reinterpret_cast(utf16_output)); } - *utf16_output++ = !match_system(big_endian) ? char16_t(word >> 8 | word << 8) : char16_t(word); - } else { - // will generate a surrogate pair - if (word > 0x10FFFF) { return std::make_pair(nullptr, reinterpret_cast(utf16_output)); } - word -= 0x10000; - uint16_t high_surrogate = uint16_t(0xD800 + (word >> 10)); - uint16_t low_surrogate = uint16_t(0xDC00 + (word & 0x3FF)); - if (!match_system(big_endian)) { - high_surrogate = uint16_t(high_surrogate >> 8 | high_surrogate << 8); - low_surrogate = uint16_t(low_surrogate << 8 | low_surrogate >> 8); - } - *utf16_output++ = char16_t(high_surrogate); - *utf16_output++ = char16_t(low_surrogate); - } - } - buf += k; - } - } + We need 256-entry lookup table to get a compression pattern + and the number of output bytes in the compressed vector register. + Each entry occupies 17 bytes. - // check for invalid input - if (vmaxv_u16(forbidden_bytemask) != 0) { - return std::make_pair(nullptr, reinterpret_cast(utf16_output)); - } + Ad 2. - return std::make_pair(buf, reinterpret_cast(utf16_output)); -} + When values fit in 16-bit code units, but are above 0x07ff, then + a single word may produce one, two or three UTF8 bytes. + We prepare data for all these three cases in two registers. + The first register contains lower two UTF8 bytes (used in all + cases), while the second one contains just the third byte for + the three-UTF8-bytes case. -template -std::pair arm_convert_utf32_to_utf16_with_errors(const char32_t* buf, size_t len, char16_t* utf16_out) { - uint16_t * utf16_output = reinterpret_cast(utf16_out); - const char32_t* start = buf; - const char32_t* end = buf + len; + Finally these two registers are interleaved forming eight-element + array of 32-bit values. The array spans two SSE registers. + The bytes from the registers are compressed using two shuffles. - while(buf + 4 <= end) { - uint32x4_t in = vld1q_u32(reinterpret_cast(buf)); + We need 256-entry lookup table to get a compression pattern + and the number of output bytes in the compressed vector register. + Each entry occupies 17 bytes. - // Check if no bits set above 16th - if(vmaxvq_u32(in) <= 0xFFFF) { - uint16x4_t utf16_packed = vmovn_u32(in); - const uint16x4_t v_d800 = vmov_n_u16((uint16_t)0xd800); - const uint16x4_t v_dfff = vmov_n_u16((uint16_t)0xdfff); - const uint16x4_t forbidden_bytemask = vand_u16(vcle_u16(utf16_packed, v_dfff), vcge_u16(utf16_packed, v_d800)); - if (vmaxv_u16(forbidden_bytemask) != 0) { - return std::make_pair(result(error_code::SURROGATE, buf - start), reinterpret_cast(utf16_output)); - } + To summarize: + - We need two 256-entry tables that have 8704 bytes in total. +*/ +/* + Returns a pair: the first unprocessed byte from buf and utf8_output + A scalar routing should carry on the conversion of the tail. +*/ +template +std::pair arm_convert_utf16_to_utf8(const char16_t* buf, size_t len, char* utf8_out) { + uint8_t * utf8_output = reinterpret_cast(utf8_out); + const char16_t* end = buf + len; - if (!match_system(big_endian)) { - #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO - const uint8x8_t swap = make_uint8x8_t(1, 0, 3, 2, 5, 4, 7, 6); - #else - const uint8x8_t swap = {1, 0, 3, 2, 5, 4, 7, 6}; - #endif - utf16_packed = vreinterpret_u16_u8(vtbl1_u8(vreinterpret_u8_u16(utf16_packed), swap)); - } - vst1_u16(utf16_output, utf16_packed); - utf16_output += 4; - buf += 4; - } else { - size_t forward = 3; - size_t k = 0; - if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} - for(; k < forward; k++) { - uint32_t word = buf[k]; - if((word & 0xFFFF0000)==0) { - // will not generate a surrogate pair - if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), reinterpret_cast(utf16_output)); } - *utf16_output++ = !match_system(big_endian) ? char16_t(word >> 8 | word << 8) : char16_t(word); + const uint16x8_t v_f800 = vmovq_n_u16((uint16_t)0xf800); + const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); + const uint16x8_t v_c080 = vmovq_n_u16((uint16_t)0xc080); + + while (buf + 16 <= end) { + uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); + if (!match_system(big_endian)) { in = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(in))); } + if(vmaxvq_u16(in) <= 0x7F) { // ASCII fast path!!!! + // It is common enough that we have sequences of 16 consecutive ASCII characters. + uint16x8_t nextin = vld1q_u16(reinterpret_cast(buf) + 8); + if (!match_system(big_endian)) { nextin = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(nextin))); } + if(vmaxvq_u16(nextin) > 0x7F) { + // 1. pack the bytes + // obviously suboptimal. + uint8x8_t utf8_packed = vmovn_u16(in); + // 2. store (8 bytes) + vst1_u8(utf8_output, utf8_packed); + // 3. adjust pointers + buf += 8; + utf8_output += 8; + in = nextin; } else { - // will generate a surrogate pair - if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), reinterpret_cast(utf16_output)); } - word -= 0x10000; - uint16_t high_surrogate = uint16_t(0xD800 + (word >> 10)); - uint16_t low_surrogate = uint16_t(0xDC00 + (word & 0x3FF)); - if (!match_system(big_endian)) { - high_surrogate = uint16_t(high_surrogate >> 8 | high_surrogate << 8); - low_surrogate = uint16_t(low_surrogate << 8 | low_surrogate >> 8); - } - *utf16_output++ = char16_t(high_surrogate); - *utf16_output++ = char16_t(low_surrogate); + // 1. pack the bytes + // obviously suboptimal. + uint8x16_t utf8_packed = vmovn_high_u16(vmovn_u16(in), nextin); + // 2. store (16 bytes) + vst1q_u8(utf8_output, utf8_packed); + // 3. adjust pointers + buf += 16; + utf8_output += 16; + continue; // we are done for this round! } - } - buf += k; } - } - return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast(utf16_output)); -} -/* end file src/arm64/arm_convert_utf32_to_utf16.cpp */ -} // unnamed namespace -} // namespace arm64 -} // namespace simdutf -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/buf_block_reader.h -/* begin file src/generic/buf_block_reader.h */ -namespace simdutf { -namespace arm64 { -namespace { + if (vmaxvq_u16(in) <= 0x7FF) { + // 1. prepare 2-byte values + // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 + // expected output : [110a|aaaa|10bb|bbbb] x 8 + const uint16x8_t v_1f00 = vmovq_n_u16((int16_t)0x1f00); + const uint16x8_t v_003f = vmovq_n_u16((int16_t)0x003f); -// Walks through a buffer in block-sized increments, loading the last part with spaces -template -struct buf_block_reader { -public: - simdutf_really_inline buf_block_reader(const uint8_t *_buf, size_t _len); - simdutf_really_inline size_t block_index(); - simdutf_really_inline bool has_full_block() const; - simdutf_really_inline const uint8_t *full_block() const; - /** - * Get the last block, padded with spaces. - * - * There will always be a last block, with at least 1 byte, unless len == 0 (in which case this - * function fills the buffer with spaces and returns 0. In particular, if len == STEP_SIZE there - * will be 0 full_blocks and 1 remainder block with STEP_SIZE bytes and no spaces for padding. - * - * @return the number of effective characters in the last block. - */ - simdutf_really_inline size_t get_remainder(uint8_t *dst) const; - simdutf_really_inline void advance(); -private: - const uint8_t *buf; - const size_t len; - const size_t lenminusstep; - size_t idx; -}; + // t0 = [000a|aaaa|bbbb|bb00] + const uint16x8_t t0 = vshlq_n_u16(in, 2); + // t1 = [000a|aaaa|0000|0000] + const uint16x8_t t1 = vandq_u16(t0, v_1f00); + // t2 = [0000|0000|00bb|bbbb] + const uint16x8_t t2 = vandq_u16(in, v_003f); + // t3 = [000a|aaaa|00bb|bbbb] + const uint16x8_t t3 = vorrq_u16(t1, t2); + // t4 = [110a|aaaa|10bb|bbbb] + const uint16x8_t t4 = vorrq_u16(t3, v_c080); + // 2. merge ASCII and 2-byte codewords + const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); + const uint16x8_t one_byte_bytemask = vcleq_u16(in, v_007f); + const uint8x16_t utf8_unpacked = vreinterpretq_u8_u16(vbslq_u16(one_byte_bytemask, in, t4)); + // 3. prepare bitmask for 8-bit lookup +#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t mask = make_uint16x8_t(0x0001, 0x0004, + 0x0010, 0x0040, + 0x0002, 0x0008, + 0x0020, 0x0080); +#else + const uint16x8_t mask = { 0x0001, 0x0004, + 0x0010, 0x0040, + 0x0002, 0x0008, + 0x0020, 0x0080 }; +#endif + uint16_t m2 = vaddvq_u16(vandq_u16(one_byte_bytemask, mask)); + // 4. pack the bytes + const uint8_t* row = &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; + const uint8x16_t shuffle = vld1q_u8(row + 1); + const uint8x16_t utf8_packed = vqtbl1q_u8(utf8_unpacked, shuffle); -// Routines to print masks and text for debugging bitmask operations -simdutf_unused static char * format_input_text_64(const uint8_t *text) { - static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); - for (size_t i=0; i); i++) { - buf[i] = int8_t(text[i]) < ' ' ? '_' : int8_t(text[i]); - } - buf[sizeof(simd8x64)] = '\0'; - return buf; -} + // 5. store bytes + vst1q_u8(utf8_output, utf8_packed); -// Routines to print masks and text for debugging bitmask operations -simdutf_unused static char * format_input_text(const simd8x64& in) { - static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); - in.store(reinterpret_cast(buf)); - for (size_t i=0; i); i++) { - if (buf[i] < ' ') { buf[i] = '_'; } - } - buf[sizeof(simd8x64)] = '\0'; - return buf; -} + // 6. adjust pointers + buf += 8; + utf8_output += row[0]; + continue; -simdutf_unused static char * format_mask(uint64_t mask) { - static char *buf = reinterpret_cast(malloc(64 + 1)); - for (size_t i=0; i<64; i++) { - buf[i] = (mask & (size_t(1) << i)) ? 'X' : ' '; - } - buf[64] = '\0'; - return buf; -} + } + const uint16x8_t surrogates_bytemask = vceqq_u16(vandq_u16(in, v_f800), v_d800); + // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, + // it is likely an uncommon occurrence. + if (vmaxvq_u16(surrogates_bytemask) == 0) { + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes +#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t dup_even = make_uint16x8_t(0x0000, 0x0202, 0x0404, 0x0606, + 0x0808, 0x0a0a, 0x0c0c, 0x0e0e); +#else + const uint16x8_t dup_even = {0x0000, 0x0202, 0x0404, 0x0606, + 0x0808, 0x0a0a, 0x0c0c, 0x0e0e}; +#endif + /* In this branch we handle three cases: + 1. [0000|0000|0ccc|cccc] => [0ccc|cccc] - single UFT-8 byte + 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes + 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes -template -simdutf_really_inline buf_block_reader::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {} + We expand the input word (16-bit) into two code units (32-bit), thus + we have room for four bytes. However, we need five distinct bit + layouts. Note that the last byte in cases #2 and #3 is the same. -template -simdutf_really_inline size_t buf_block_reader::block_index() { return idx; } + We precompute byte 1 for case #1 and the common byte for cases #2 & #3 + in register t2. -template -simdutf_really_inline bool buf_block_reader::has_full_block() const { - return idx < lenminusstep; -} + We precompute byte 1 for case #3 and -- **conditionally** -- precompute + either byte 1 for case #2 or byte 2 for case #3. Note that they + differ by exactly one bit. -template -simdutf_really_inline const uint8_t *buf_block_reader::full_block() const { - return &buf[idx]; -} + Finally from these two code units we build proper UTF-8 sequence, taking + into account the case (i.e, the number of bytes to write). + */ + /** + * Given [aaaa|bbbb|bbcc|cccc] our goal is to produce: + * t2 => [0ccc|cccc] [10cc|cccc] + * s4 => [1110|aaaa] ([110b|bbbb] OR [10bb|bbbb]) + */ +#define simdutf_vec(x) vmovq_n_u16(static_cast(x)) + // [aaaa|bbbb|bbcc|cccc] => [bbcc|cccc|bbcc|cccc] + const uint16x8_t t0 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in), vreinterpretq_u8_u16(dup_even))); + // [bbcc|cccc|bbcc|cccc] => [00cc|cccc|0bcc|cccc] + const uint16x8_t t1 = vandq_u16(t0, simdutf_vec(0b0011111101111111)); + // [00cc|cccc|0bcc|cccc] => [10cc|cccc|0bcc|cccc] + const uint16x8_t t2 = vorrq_u16 (t1, simdutf_vec(0b1000000000000000)); -template -simdutf_really_inline size_t buf_block_reader::get_remainder(uint8_t *dst) const { - if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers - std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once. - std::memcpy(dst, buf + idx, len - idx); - return len - idx; -} - -template -simdutf_really_inline void buf_block_reader::advance() { - idx += STEP_SIZE; -} + // s0: [aaaa|bbbb|bbcc|cccc] => [0000|0000|0000|aaaa] + const uint16x8_t s0 = vshrq_n_u16(in, 12); + // s1: [aaaa|bbbb|bbcc|cccc] => [0000|bbbb|bb00|0000] + const uint16x8_t s1 = vandq_u16(in, simdutf_vec(0b0000111111000000)); + // [0000|bbbb|bb00|0000] => [00bb|bbbb|0000|0000] + const uint16x8_t s1s = vshlq_n_u16(s1, 2); + // [00bb|bbbb|0000|aaaa] + const uint16x8_t s2 = vorrq_u16(s0, s1s); + // s3: [00bb|bbbb|0000|aaaa] => [11bb|bbbb|1110|aaaa] + const uint16x8_t s3 = vorrq_u16(s2, simdutf_vec(0b1100000011100000)); + const uint16x8_t v_07ff = vmovq_n_u16((uint16_t)0x07FF); + const uint16x8_t one_or_two_bytes_bytemask = vcleq_u16(in, v_07ff); + const uint16x8_t m0 = vbicq_u16(simdutf_vec(0b0100000000000000), one_or_two_bytes_bytemask); + const uint16x8_t s4 = veorq_u16(s3, m0); +#undef simdutf_vec -} // unnamed namespace -} // namespace arm64 -} // namespace simdutf -/* end file src/generic/buf_block_reader.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_validation/utf8_lookup4_algorithm.h -/* begin file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ -namespace simdutf { -namespace arm64 { -namespace { -namespace utf8_validation { + // 4. expand code units 16-bit => 32-bit + const uint8x16_t out0 = vreinterpretq_u8_u16(vzip1q_u16(t2, s4)); + const uint8x16_t out1 = vreinterpretq_u8_u16(vzip2q_u16(t2, s4)); -using namespace simd; + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle + const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); + const uint16x8_t one_byte_bytemask = vcleq_u16(in, v_007f); +#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t onemask = make_uint16x8_t(0x0001, 0x0004, + 0x0010, 0x0040, + 0x0100, 0x0400, + 0x1000, 0x4000 ); + const uint16x8_t twomask = make_uint16x8_t(0x0002, 0x0008, + 0x0020, 0x0080, + 0x0200, 0x0800, + 0x2000, 0x8000 ); +#else + const uint16x8_t onemask = { 0x0001, 0x0004, + 0x0010, 0x0040, + 0x0100, 0x0400, + 0x1000, 0x4000 }; + const uint16x8_t twomask = { 0x0002, 0x0008, + 0x0020, 0x0080, + 0x0200, 0x0800, + 0x2000, 0x8000 }; +#endif + const uint16x8_t combined = vorrq_u16(vandq_u16(one_byte_bytemask, onemask), vandq_u16(one_or_two_bytes_bytemask, twomask)); + const uint16_t mask = vaddvq_u16(combined); + // The following fast path may or may not be beneficial. + /*if(mask == 0) { + // We only have three-byte code units. Use fast path. + const uint8x16_t shuffle = {2,3,1,6,7,5,10,11,9,14,15,13,0,0,0,0}; + const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle); + const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle); + vst1q_u8(utf8_output, utf8_0); + utf8_output += 12; + vst1q_u8(utf8_output, utf8_1); + utf8_output += 12; + buf += 8; + continue; + }*/ + const uint8_t mask0 = uint8_t(mask); - simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { -// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) -// Bit 1 = Too Long (ASCII followed by continuation) -// Bit 2 = Overlong 3-byte -// Bit 4 = Surrogate -// Bit 5 = Overlong 2-byte -// Bit 7 = Two Continuations - constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ - // 11______ 11______ - constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ - constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ - constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ - constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ - constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ - constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ - // 11110100 101_____ - // 11110101 1001____ - // 11110101 101_____ - // 1111011_ 1001____ - // 1111011_ 101_____ - // 11111___ 1001____ - // 11111___ 101_____ - constexpr const uint8_t TOO_LARGE_1000 = 1<<6; - // 11110101 1000____ - // 1111011_ 1000____ - // 11111___ 1000____ - constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + const uint8_t* row0 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask0][0]; + const uint8x16_t shuffle0 = vld1q_u8(row0 + 1); + const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle0); - const simd8 byte_1_high = prev1.shr<4>().lookup_16( - // 0_______ ________ - TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, - TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, - // 10______ ________ - TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, - // 1100____ ________ - TOO_SHORT | OVERLONG_2, - // 1101____ ________ - TOO_SHORT, - // 1110____ ________ - TOO_SHORT | OVERLONG_3 | SURROGATE, - // 1111____ ________ - TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 - ); - constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . - const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( - // ____0000 ________ - CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, - // ____0001 ________ - CARRY | OVERLONG_2, - // ____001_ ________ - CARRY, - CARRY, + const uint8_t mask1 = static_cast(mask >> 8); + const uint8_t* row1 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask1][0]; + const uint8x16_t shuffle1 = vld1q_u8(row1 + 1); + const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle1); - // ____0100 ________ - CARRY | TOO_LARGE, - // ____0101 ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - // ____011_ ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, + vst1q_u8(utf8_output, utf8_0); + utf8_output += row0[0]; + vst1q_u8(utf8_output, utf8_1); + utf8_output += row1[0]; - // ____1___ ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - // ____1101 ________ - CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000 - ); - const simd8 byte_2_high = input.shr<4>().lookup_16( - // ________ 0_______ - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + buf += 8; + // surrogate pair(s) in a register + } else { + // Let us do a scalar fallback. + // It may seem wasteful to use scalar code, but being efficient with SIMD + // in the presence of surrogate pairs may require non-trivial tables. + size_t forward = 15; + size_t k = 0; + if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} + for(; k < forward; k++) { + uint16_t word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k]) : buf[k]; + if((word & 0xFF80)==0) { + *utf8_output++ = char(word); + } else if((word & 0xF800)==0) { + *utf8_output++ = char((word>>6) | 0b11000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); + } else if((word &0xF800 ) != 0xD800) { + *utf8_output++ = char((word>>12) | 0b11100000); + *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); + } else { + // must be a surrogate pair + uint16_t diff = uint16_t(word - 0xD800); + uint16_t next_word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k + 1]) : buf[k + 1]; + k++; + uint16_t diff2 = uint16_t(next_word - 0xDC00); + if((diff | diff2) > 0x3FF) { return std::make_pair(nullptr, reinterpret_cast(utf8_output)); } + uint32_t value = (diff << 10) + diff2 + 0x10000; + *utf8_output++ = char((value>>18) | 0b11110000); + *utf8_output++ = char(((value>>12) & 0b111111) | 0b10000000); + *utf8_output++ = char(((value>>6) & 0b111111) | 0b10000000); + *utf8_output++ = char((value & 0b111111) | 0b10000000); + } + } + buf += k; + } + } // while - // ________ 1000____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, - // ________ 1001____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, - // ________ 101_____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, - TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + return std::make_pair(buf, reinterpret_cast(utf8_output)); +} - // ________ 11______ - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT - ); - return (byte_1_high & byte_1_low & byte_2_high); - } - simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, - const simd8 prev_input, const simd8 sc) { - simd8 prev2 = input.prev<2>(prev_input); - simd8 prev3 = input.prev<3>(prev_input); - simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); - simd8 must23_80 = must23 & uint8_t(0x80); - return must23_80 ^ sc; - } - // - // Return nonzero if there are incomplete multibyte characters at the end of the block: - // e.g. if there is a 4-byte character, but it's 3 bytes from the end. - // - simdutf_really_inline simd8 is_incomplete(const simd8 input) { - // If the previous input's last 3 bytes match this, they're too short (they ended at EOF): - // ... 1111____ 111_____ 11______ - static const uint8_t max_array[32] = { - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 0b11110000u-1, 0b11100000u-1, 0b11000000u-1 - }; - const simd8 max_value(&max_array[sizeof(max_array)-sizeof(simd8)]); - return input.gt_bits(max_value); - } +/* + Returns a pair: a result struct and utf8_output. + If there is an error, the count field of the result is the position of the error. + Otherwise, it is the position of the first unprocessed byte in buf (even if finished). + A scalar routing should carry on the conversion of the tail if needed. +*/ +template +std::pair arm_convert_utf16_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_out) { + uint8_t * utf8_output = reinterpret_cast(utf8_out); + const char16_t* start = buf; + const char16_t* end = buf + len; - struct utf8_checker { - // If this is nonzero, there has been a UTF-8 error. - simd8 error; - // The last input we received - simd8 prev_input_block; - // Whether the last input we received was incomplete (used for ASCII fast path) - simd8 prev_incomplete; + const uint16x8_t v_f800 = vmovq_n_u16((uint16_t)0xf800); + const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); + const uint16x8_t v_c080 = vmovq_n_u16((uint16_t)0xc080); - // - // Check whether the current bytes are valid UTF-8. - // - simdutf_really_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { - // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes - // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) - simd8 prev1 = input.prev<1>(prev_input); - simd8 sc = check_special_cases(input, prev1); - this->error |= check_multibyte_lengths(input, prev_input, sc); - } - - // The only problem that can happen at EOF is that a multibyte character is too short - // or a byte value too large in the last bytes: check_special_cases only checks for bytes - // too large in the first of two bytes. - simdutf_really_inline void check_eof() { - // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't - // possibly finish them. - this->error |= this->prev_incomplete; - } - - simdutf_really_inline void check_next_input(const simd8x64& input) { - if(simdutf_likely(is_ascii(input))) { - this->error |= this->prev_incomplete; - } else { - // you might think that a for-loop would work, but under Visual Studio, it is not good enough. - static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), - "We support either two or four chunks per 64-byte block."); - if(simd8x64::NUM_CHUNKS == 2) { - this->check_utf8_bytes(input.chunks[0], this->prev_input_block); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - } else if(simd8x64::NUM_CHUNKS == 4) { - this->check_utf8_bytes(input.chunks[0], this->prev_input_block); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - this->check_utf8_bytes(input.chunks[2], input.chunks[1]); - this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + while (buf + 16 <= end) { + uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); + if (!match_system(big_endian)) { in = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(in))); } + if(vmaxvq_u16(in) <= 0x7F) { // ASCII fast path!!!! + // It is common enough that we have sequences of 16 consecutive ASCII characters. + uint16x8_t nextin = vld1q_u16(reinterpret_cast(buf) + 8); + if (!match_system(big_endian)) { nextin = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(nextin))); } + if(vmaxvq_u16(nextin) > 0x7F) { + // 1. pack the bytes + // obviously suboptimal. + uint8x8_t utf8_packed = vmovn_u16(in); + // 2. store (8 bytes) + vst1_u8(utf8_output, utf8_packed); + // 3. adjust pointers + buf += 8; + utf8_output += 8; + in = nextin; + } else { + // 1. pack the bytes + // obviously suboptimal. + uint8x16_t utf8_packed = vmovn_high_u16(vmovn_u16(in), nextin); + // 2. store (16 bytes) + vst1q_u8(utf8_output, utf8_packed); + // 3. adjust pointers + buf += 16; + utf8_output += 16; + continue; // we are done for this round! } - this->prev_incomplete = is_incomplete(input.chunks[simd8x64::NUM_CHUNKS-1]); - this->prev_input_block = input.chunks[simd8x64::NUM_CHUNKS-1]; - - } } - // do not forget to call check_eof! - simdutf_really_inline bool errors() const { - return this->error.any_bits_set_anywhere(); - } + if (vmaxvq_u16(in) <= 0x7FF) { + // 1. prepare 2-byte values + // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 + // expected output : [110a|aaaa|10bb|bbbb] x 8 + const uint16x8_t v_1f00 = vmovq_n_u16((int16_t)0x1f00); + const uint16x8_t v_003f = vmovq_n_u16((int16_t)0x003f); - }; // struct utf8_checker -} // namespace utf8_validation + // t0 = [000a|aaaa|bbbb|bb00] + const uint16x8_t t0 = vshlq_n_u16(in, 2); + // t1 = [000a|aaaa|0000|0000] + const uint16x8_t t1 = vandq_u16(t0, v_1f00); + // t2 = [0000|0000|00bb|bbbb] + const uint16x8_t t2 = vandq_u16(in, v_003f); + // t3 = [000a|aaaa|00bb|bbbb] + const uint16x8_t t3 = vorrq_u16(t1, t2); + // t4 = [110a|aaaa|10bb|bbbb] + const uint16x8_t t4 = vorrq_u16(t3, v_c080); + // 2. merge ASCII and 2-byte codewords + const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); + const uint16x8_t one_byte_bytemask = vcleq_u16(in, v_007f); + const uint8x16_t utf8_unpacked = vreinterpretq_u8_u16(vbslq_u16(one_byte_bytemask, in, t4)); + // 3. prepare bitmask for 8-bit lookup +#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t mask = make_uint16x8_t(0x0001, 0x0004, + 0x0010, 0x0040, + 0x0002, 0x0008, + 0x0020, 0x0080); +#else + const uint16x8_t mask = { 0x0001, 0x0004, + 0x0010, 0x0040, + 0x0002, 0x0008, + 0x0020, 0x0080 }; +#endif + uint16_t m2 = vaddvq_u16(vandq_u16(one_byte_bytemask, mask)); + // 4. pack the bytes + const uint8_t* row = &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; + const uint8x16_t shuffle = vld1q_u8(row + 1); + const uint8x16_t utf8_packed = vqtbl1q_u8(utf8_unpacked, shuffle); -using utf8_validation::utf8_checker; + // 5. store bytes + vst1q_u8(utf8_output, utf8_packed); -} // unnamed namespace -} // namespace arm64 -} // namespace simdutf -/* end file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_validation/utf8_validator.h -/* begin file src/generic/utf8_validation/utf8_validator.h */ -namespace simdutf { -namespace arm64 { -namespace { -namespace utf8_validation { + // 6. adjust pointers + buf += 8; + utf8_output += row[0]; + continue; -/** - * Validates that the string is actual UTF-8. - */ -template -bool generic_validate_utf8(const uint8_t * input, size_t length) { - checker c{}; - buf_block_reader<64> reader(input, length); - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - c.check_next_input(in); - reader.advance(); } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - c.check_next_input(in); - reader.advance(); - c.check_eof(); - return !c.errors(); -} + const uint16x8_t surrogates_bytemask = vceqq_u16(vandq_u16(in, v_f800), v_d800); + // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, + // it is likely an uncommon occurrence. + if (vmaxvq_u16(surrogates_bytemask) == 0) { + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes +#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t dup_even = make_uint16x8_t(0x0000, 0x0202, 0x0404, 0x0606, + 0x0808, 0x0a0a, 0x0c0c, 0x0e0e); +#else + const uint16x8_t dup_even = {0x0000, 0x0202, 0x0404, 0x0606, + 0x0808, 0x0a0a, 0x0c0c, 0x0e0e}; +#endif + /* In this branch we handle three cases: + 1. [0000|0000|0ccc|cccc] => [0ccc|cccc] - single UFT-8 byte + 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes + 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes -bool generic_validate_utf8(const char * input, size_t length) { - return generic_validate_utf8(reinterpret_cast(input),length); -} + We expand the input word (16-bit) into two code units (32-bit), thus + we have room for four bytes. However, we need five distinct bit + layouts. Note that the last byte in cases #2 and #3 is the same. -/** - * Validates that the string is actual UTF-8 and stops on errors. - */ -template -result generic_validate_utf8_with_errors(const uint8_t * input, size_t length) { - checker c{}; - buf_block_reader<64> reader(input, length); - size_t count{0}; - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - c.check_next_input(in); - if(c.errors()) { - if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk - result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input + count), length - count); - res.count += count; - return res; - } - reader.advance(); - count += 64; - } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - c.check_next_input(in); - reader.advance(); - c.check_eof(); - if (c.errors()) { - if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk - result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input) + count, length - count); - res.count += count; - return res; - } else { - return result(error_code::SUCCESS, length); - } -} + We precompute byte 1 for case #1 and the common byte for cases #2 & #3 + in register t2. -result generic_validate_utf8_with_errors(const char * input, size_t length) { - return generic_validate_utf8_with_errors(reinterpret_cast(input),length); -} + We precompute byte 1 for case #3 and -- **conditionally** -- precompute + either byte 1 for case #2 or byte 2 for case #3. Note that they + differ by exactly one bit. -template -bool generic_validate_ascii(const uint8_t * input, size_t length) { - buf_block_reader<64> reader(input, length); - uint8_t blocks[64]{}; - simd::simd8x64 running_or(blocks); - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - running_or |= in; - reader.advance(); - } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - running_or |= in; - return running_or.is_ascii(); -} + Finally from these two code units we build proper UTF-8 sequence, taking + into account the case (i.e, the number of bytes to write). + */ + /** + * Given [aaaa|bbbb|bbcc|cccc] our goal is to produce: + * t2 => [0ccc|cccc] [10cc|cccc] + * s4 => [1110|aaaa] ([110b|bbbb] OR [10bb|bbbb]) + */ +#define simdutf_vec(x) vmovq_n_u16(static_cast(x)) + // [aaaa|bbbb|bbcc|cccc] => [bbcc|cccc|bbcc|cccc] + const uint16x8_t t0 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(in), vreinterpretq_u8_u16(dup_even))); + // [bbcc|cccc|bbcc|cccc] => [00cc|cccc|0bcc|cccc] + const uint16x8_t t1 = vandq_u16(t0, simdutf_vec(0b0011111101111111)); + // [00cc|cccc|0bcc|cccc] => [10cc|cccc|0bcc|cccc] + const uint16x8_t t2 = vorrq_u16 (t1, simdutf_vec(0b1000000000000000)); -bool generic_validate_ascii(const char * input, size_t length) { - return generic_validate_ascii(reinterpret_cast(input),length); -} + // s0: [aaaa|bbbb|bbcc|cccc] => [0000|0000|0000|aaaa] + const uint16x8_t s0 = vshrq_n_u16(in, 12); + // s1: [aaaa|bbbb|bbcc|cccc] => [0000|bbbb|bb00|0000] + const uint16x8_t s1 = vandq_u16(in, simdutf_vec(0b0000111111000000)); + // [0000|bbbb|bb00|0000] => [00bb|bbbb|0000|0000] + const uint16x8_t s1s = vshlq_n_u16(s1, 2); + // [00bb|bbbb|0000|aaaa] + const uint16x8_t s2 = vorrq_u16(s0, s1s); + // s3: [00bb|bbbb|0000|aaaa] => [11bb|bbbb|1110|aaaa] + const uint16x8_t s3 = vorrq_u16(s2, simdutf_vec(0b1100000011100000)); + const uint16x8_t v_07ff = vmovq_n_u16((uint16_t)0x07FF); + const uint16x8_t one_or_two_bytes_bytemask = vcleq_u16(in, v_07ff); + const uint16x8_t m0 = vbicq_u16(simdutf_vec(0b0100000000000000), one_or_two_bytes_bytemask); + const uint16x8_t s4 = veorq_u16(s3, m0); +#undef simdutf_vec -template -result generic_validate_ascii_with_errors(const uint8_t * input, size_t length) { - buf_block_reader<64> reader(input, length); - size_t count{0}; - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - if (!in.is_ascii()) { - result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); - return result(res.error, count + res.count); - } - reader.advance(); - - count += 64; - } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - if (!in.is_ascii()) { - result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); - return result(res.error, count + res.count); - } else { - return result(error_code::SUCCESS, length); - } -} - -result generic_validate_ascii_with_errors(const char * input, size_t length) { - return generic_validate_ascii_with_errors(reinterpret_cast(input),length); -} + // 4. expand code units 16-bit => 32-bit + const uint8x16_t out0 = vreinterpretq_u8_u16(vzip1q_u16(t2, s4)); + const uint8x16_t out1 = vreinterpretq_u8_u16(vzip2q_u16(t2, s4)); -} // namespace utf8_validation -} // unnamed namespace -} // namespace arm64 -} // namespace simdutf -/* end file src/generic/utf8_validation/utf8_validator.h */ -// transcoding from UTF-8 to UTF-16 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf16/valid_utf8_to_utf16.h -/* begin file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle + const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); + const uint16x8_t one_byte_bytemask = vcleq_u16(in, v_007f); +#ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t onemask = make_uint16x8_t(0x0001, 0x0004, + 0x0010, 0x0040, + 0x0100, 0x0400, + 0x1000, 0x4000 ); + const uint16x8_t twomask = make_uint16x8_t(0x0002, 0x0008, + 0x0020, 0x0080, + 0x0200, 0x0800, + 0x2000, 0x8000 ); +#else + const uint16x8_t onemask = { 0x0001, 0x0004, + 0x0010, 0x0040, + 0x0100, 0x0400, + 0x1000, 0x4000 }; + const uint16x8_t twomask = { 0x0002, 0x0008, + 0x0020, 0x0080, + 0x0200, 0x0800, + 0x2000, 0x8000 }; +#endif + const uint16x8_t combined = vorrq_u16(vandq_u16(one_byte_bytemask, onemask), vandq_u16(one_or_two_bytes_bytemask, twomask)); + const uint16_t mask = vaddvq_u16(combined); + // The following fast path may or may not be beneficial. + /*if(mask == 0) { + // We only have three-byte code units. Use fast path. + const uint8x16_t shuffle = {2,3,1,6,7,5,10,11,9,14,15,13,0,0,0,0}; + const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle); + const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle); + vst1q_u8(utf8_output, utf8_0); + utf8_output += 12; + vst1q_u8(utf8_output, utf8_1); + utf8_output += 12; + buf += 8; + continue; + }*/ + const uint8_t mask0 = uint8_t(mask); + const uint8_t* row0 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask0][0]; + const uint8x16_t shuffle0 = vld1q_u8(row0 + 1); + const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle0); -namespace simdutf { -namespace arm64 { -namespace { -namespace utf8_to_utf16 { + const uint8_t mask1 = static_cast(mask >> 8); + const uint8_t* row1 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask1][0]; + const uint8x16_t shuffle1 = vld1q_u8(row1 + 1); + const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle1); -using namespace simd; + vst1q_u8(utf8_output, utf8_0); + utf8_output += row0[0]; + vst1q_u8(utf8_output, utf8_1); + utf8_output += row1[0]; -template -simdutf_warn_unused size_t convert_valid(const char* input, size_t size, - char16_t* utf16_output) noexcept { - // The implementation is not specific to haswell and should be moved to the generic directory. - size_t pos = 0; - char16_t* start{utf16_output}; - const size_t safety_margin = 16; // to avoid overruns! - while(pos + 64 + safety_margin <= size) { - // this loop could be unrolled further. For example, we could process the mask - // far more than 64 bytes. - simd8x64 in(reinterpret_cast(input + pos)); - if(in.is_ascii()) { - in.store_ascii_as_utf16(utf16_output); - utf16_output += 64; - pos += 64; + buf += 8; + // surrogate pair(s) in a register } else { - // Slow path. We hope that the compiler will recognize that this is a slow path. - // Anything that is not a continuation mask is a 'leading byte', that is, the - // start of a new code point. - uint64_t utf8_continuation_mask = in.lt(-65 + 1); - // -65 is 0b10111111 in two-complement's, so largest possible continuation byte - uint64_t utf8_leading_mask = ~utf8_continuation_mask; - // The *start* of code points is not so useful, rather, we want the *end* of code points. - uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; - // We process in blocks of up to 12 bytes except possibly - // for fast paths which may process up to 16 bytes. For the - // slow path to work, we should have at least 12 input bytes left. - size_t max_starting_point = (pos + 64) - 12; - // Next loop is going to run at least five times when using solely - // the slow/regular path, and at least four times if there are fast paths. - while(pos < max_starting_point) { - // Performance note: our ability to compute 'consumed' and - // then shift and recompute is critical. If there is a - // latency of, say, 4 cycles on getting 'consumed', then - // the inner loop might have a total latency of about 6 cycles. - // Yet we process between 6 to 12 inputs bytes, thus we get - // a speed limit between 1 cycle/byte and 0.5 cycle/byte - // for this section of the code. Hence, there is a limit - // to how much we can further increase this latency before - // it seriously harms performance. - // - // Thus we may allow convert_masked_utf8_to_utf16 to process - // more bytes at a time under a fast-path mode where 16 bytes - // are consumed at once (e.g., when encountering ASCII). - size_t consumed = convert_masked_utf8_to_utf16(input + pos, - utf8_end_of_code_point_mask, utf16_output); - pos += consumed; - utf8_end_of_code_point_mask >>= consumed; + // Let us do a scalar fallback. + // It may seem wasteful to use scalar code, but being efficient with SIMD + // in the presence of surrogate pairs may require non-trivial tables. + size_t forward = 15; + size_t k = 0; + if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} + for(; k < forward; k++) { + uint16_t word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k]) : buf[k]; + if((word & 0xFF80)==0) { + *utf8_output++ = char(word); + } else if((word & 0xF800)==0) { + *utf8_output++ = char((word>>6) | 0b11000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); + } else if((word &0xF800 ) != 0xD800) { + *utf8_output++ = char((word>>12) | 0b11100000); + *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); + } else { + // must be a surrogate pair + uint16_t diff = uint16_t(word - 0xD800); + uint16_t next_word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k + 1]) : buf[k + 1]; + k++; + uint16_t diff2 = uint16_t(next_word - 0xDC00); + if((diff | diff2) > 0x3FF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k - 1), reinterpret_cast(utf8_output)); } + uint32_t value = (diff << 10) + diff2 + 0x10000; + *utf8_output++ = char((value>>18) | 0b11110000); + *utf8_output++ = char(((value>>12) & 0b111111) | 0b10000000); + *utf8_output++ = char(((value>>6) & 0b111111) | 0b10000000); + *utf8_output++ = char((value & 0b111111) | 0b10000000); + } } - // At this point there may remain between 0 and 12 bytes in the - // 64-byte block. These bytes will be processed again. So we have an - // 80% efficiency (in the worst case). In practice we expect an - // 85% to 90% efficiency. + buf += k; } - } - utf16_output += scalar::utf8_to_utf16::convert_valid(input + pos, size - pos, utf16_output); - return utf16_output - start; + } // while + + return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast(utf8_output)); } +/* end file src/arm64/arm_convert_utf16_to_utf8.cpp */ +/* begin file src/arm64/arm_convert_utf16_to_utf32.cpp */ +/* + The vectorized algorithm works on single SSE register i.e., it + loads eight 16-bit code units. -} // namespace utf8_to_utf16 -} // unnamed namespace -} // namespace arm64 -} // namespace simdutf -/* end file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf16/utf8_to_utf16.h -/* begin file src/generic/utf8_to_utf16/utf8_to_utf16.h */ + We consider three cases: + 1. an input register contains no surrogates and each value + is in range 0x0000 .. 0x07ff. + 2. an input register contains no surrogates and values are + is in range 0x0000 .. 0xffff. + 3. an input register contains surrogates --- i.e. codepoints + can have 16 or 32 bits. + Ad 1. -namespace simdutf { -namespace arm64 { -namespace { -namespace utf8_to_utf16 { -using namespace simd; + When values are less than 0x0800, it means that a 16-bit code unit + can be converted into: 1) single UTF8 byte (when it's an ASCII + char) or 2) two UTF8 bytes. + For this case we do only some shuffle to obtain these 2-byte + codes and finally compress the whole SSE register with a single + shuffle. - simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { -// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) -// Bit 1 = Too Long (ASCII followed by continuation) -// Bit 2 = Overlong 3-byte -// Bit 4 = Surrogate -// Bit 5 = Overlong 2-byte -// Bit 7 = Two Continuations - constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ - // 11______ 11______ - constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ - constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ - constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ - constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ - constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ - constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ - // 11110100 101_____ - // 11110101 1001____ - // 11110101 101_____ - // 1111011_ 1001____ - // 1111011_ 101_____ - // 11111___ 1001____ - // 11111___ 101_____ - constexpr const uint8_t TOO_LARGE_1000 = 1<<6; - // 11110101 1000____ - // 1111011_ 1000____ - // 11111___ 1000____ - constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + We need 256-entry lookup table to get a compression pattern + and the number of output bytes in the compressed vector register. + Each entry occupies 17 bytes. - const simd8 byte_1_high = prev1.shr<4>().lookup_16( - // 0_______ ________ - TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, - TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, - // 10______ ________ - TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, - // 1100____ ________ - TOO_SHORT | OVERLONG_2, - // 1101____ ________ - TOO_SHORT, - // 1110____ ________ - TOO_SHORT | OVERLONG_3 | SURROGATE, - // 1111____ ________ - TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 - ); - constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . - const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( - // ____0000 ________ - CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, - // ____0001 ________ - CARRY | OVERLONG_2, - // ____001_ ________ - CARRY, - CARRY, + Ad 2. - // ____0100 ________ - CARRY | TOO_LARGE, - // ____0101 ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - // ____011_ ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, + When values fit in 16-bit code units, but are above 0x07ff, then + a single word may produce one, two or three UTF8 bytes. - // ____1___ ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - // ____1101 ________ - CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000 - ); - const simd8 byte_2_high = input.shr<4>().lookup_16( - // ________ 0_______ - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + We prepare data for all these three cases in two registers. + The first register contains lower two UTF8 bytes (used in all + cases), while the second one contains just the third byte for + the three-UTF8-bytes case. - // ________ 1000____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, - // ________ 1001____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, - // ________ 101_____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, - TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + Finally these two registers are interleaved forming eight-element + array of 32-bit values. The array spans two SSE registers. + The bytes from the registers are compressed using two shuffles. - // ________ 11______ - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT - ); - return (byte_1_high & byte_1_low & byte_2_high); - } - simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, - const simd8 prev_input, const simd8 sc) { - simd8 prev2 = input.prev<2>(prev_input); - simd8 prev3 = input.prev<3>(prev_input); - simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); - simd8 must23_80 = must23 & uint8_t(0x80); - return must23_80 ^ sc; - } + We need 256-entry lookup table to get a compression pattern + and the number of output bytes in the compressed vector register. + Each entry occupies 17 bytes. - struct validating_transcoder { - // If this is nonzero, there has been a UTF-8 error. - simd8 error; + To summarize: + - We need two 256-entry tables that have 8704 bytes in total. +*/ +/* + Returns a pair: the first unprocessed byte from buf and utf8_output + A scalar routing should carry on the conversion of the tail. +*/ +template +std::pair arm_convert_utf16_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_out) { + uint32_t * utf32_output = reinterpret_cast(utf32_out); + const char16_t* end = buf + len; - validating_transcoder() : error(uint8_t(0)) {} - // - // Check whether the current bytes are valid UTF-8. - // - simdutf_really_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { - // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes - // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) - simd8 prev1 = input.prev<1>(prev_input); - simd8 sc = check_special_cases(input, prev1); - this->error |= check_multibyte_lengths(input, prev_input, sc); - } + const uint16x8_t v_f800 = vmovq_n_u16((uint16_t)0xf800); + const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); + while (buf + 8 <= end) { + uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); + if (!match_system(big_endian)) { in = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(in))); } - template - simdutf_really_inline size_t convert(const char* in, size_t size, char16_t* utf16_output) { - size_t pos = 0; - char16_t* start{utf16_output}; - // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, - // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate - // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, - // to give us a good margin. - size_t leading_byte = 0; - size_t margin = size; - for(; margin > 0 && leading_byte < 8; margin--) { - leading_byte += (int8_t(in[margin-1]) > -65); - } - // If the input is long enough, then we have that margin-1 is the eight last leading byte. - const size_t safety_margin = size - margin + 1; // to avoid overruns! - while(pos + 64 + safety_margin <= size) { - simd8x64 input(reinterpret_cast(in + pos)); - if(input.is_ascii()) { - input.store_ascii_as_utf16(utf16_output); - utf16_output += 64; - pos += 64; + const uint16x8_t surrogates_bytemask = vceqq_u16(vandq_u16(in, v_f800), v_d800); + // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, + // it is likely an uncommon occurrence. + if (vmaxvq_u16(surrogates_bytemask) == 0) { + // case: no surrogate pairs, extend all 16-bit code units to 32-bit code units + vst1q_u32(utf32_output, vmovl_u16(vget_low_u16(in))); + vst1q_u32(utf32_output+4, vmovl_high_u16(in)); + utf32_output += 8; + buf += 8; + // surrogate pair(s) in a register + } else { + // Let us do a scalar fallback. + // It may seem wasteful to use scalar code, but being efficient with SIMD + // in the presence of surrogate pairs may require non-trivial tables. + size_t forward = 15; + size_t k = 0; + if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} + for(; k < forward; k++) { + uint16_t word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k]) : buf[k]; + if((word &0xF800 ) != 0xD800) { + *utf32_output++ = char32_t(word); } else { - // you might think that a for-loop would work, but under Visual Studio, it is not good enough. - static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), - "We support either two or four chunks per 64-byte block."); - auto zero = simd8{uint8_t(0)}; - if(simd8x64::NUM_CHUNKS == 2) { - this->check_utf8_bytes(input.chunks[0], zero); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - } else if(simd8x64::NUM_CHUNKS == 4) { - this->check_utf8_bytes(input.chunks[0], zero); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - this->check_utf8_bytes(input.chunks[2], input.chunks[1]); - this->check_utf8_bytes(input.chunks[3], input.chunks[2]); - } - uint64_t utf8_continuation_mask = input.lt(-65 + 1); - uint64_t utf8_leading_mask = ~utf8_continuation_mask; - uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; - // We process in blocks of up to 12 bytes except possibly - // for fast paths which may process up to 16 bytes. For the - // slow path to work, we should have at least 12 input bytes left. - size_t max_starting_point = (pos + 64) - 12; - // Next loop is going to run at least five times. - while(pos < max_starting_point) { - // Performance note: our ability to compute 'consumed' and - // then shift and recompute is critical. If there is a - // latency of, say, 4 cycles on getting 'consumed', then - // the inner loop might have a total latency of about 6 cycles. - // Yet we process between 6 to 12 inputs bytes, thus we get - // a speed limit between 1 cycle/byte and 0.5 cycle/byte - // for this section of the code. Hence, there is a limit - // to how much we can further increase this latency before - // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf16(in + pos, - utf8_end_of_code_point_mask, utf16_output); - pos += consumed; - utf8_end_of_code_point_mask >>= consumed; - } - // At this point there may remain between 0 and 12 bytes in the - // 64-byte block. These bytes will be processed again. So we have an - // 80% efficiency (in the worst case). In practice we expect an - // 85% to 90% efficiency. + // must be a surrogate pair + uint16_t diff = uint16_t(word - 0xD800); + uint16_t next_word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k + 1]) : buf[k + 1]; + k++; + uint16_t diff2 = uint16_t(next_word - 0xDC00); + if((diff | diff2) > 0x3FF) { return std::make_pair(nullptr, reinterpret_cast(utf32_output)); } + uint32_t value = (diff << 10) + diff2 + 0x10000; + *utf32_output++ = char32_t(value); } } - if(errors()) { return 0; } - if(pos < size) { - size_t howmany = scalar::utf8_to_utf16::convert(in + pos, size - pos, utf16_output); - if(howmany == 0) { return 0; } - utf16_output += howmany; - } - return utf16_output - start; + buf += k; } + } // while + return std::make_pair(buf, reinterpret_cast(utf32_output)); +} - template - simdutf_really_inline result convert_with_errors(const char* in, size_t size, char16_t* utf16_output) { - size_t pos = 0; - char16_t* start{utf16_output}; - // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, - // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate - // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, - // to give us a good margin. - size_t leading_byte = 0; - size_t margin = size; - for(; margin > 0 && leading_byte < 8; margin--) { - leading_byte += (int8_t(in[margin-1]) > -65); - } - // If the input is long enough, then we have that margin-1 is the eight last leading byte. - const size_t safety_margin = size - margin + 1; // to avoid overruns! - while(pos + 64 + safety_margin <= size) { - simd8x64 input(reinterpret_cast(in + pos)); - if(input.is_ascii()) { - input.store_ascii_as_utf16(utf16_output); - utf16_output += 64; - pos += 64; + +/* + Returns a pair: a result struct and utf8_output. + If there is an error, the count field of the result is the position of the error. + Otherwise, it is the position of the first unprocessed byte in buf (even if finished). + A scalar routing should carry on the conversion of the tail if needed. +*/ +template +std::pair arm_convert_utf16_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_out) { + uint32_t * utf32_output = reinterpret_cast(utf32_out); + const char16_t* start = buf; + const char16_t* end = buf + len; + + const uint16x8_t v_f800 = vmovq_n_u16((uint16_t)0xf800); + const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); + + while (buf + 8 <= end) { + uint16x8_t in = vld1q_u16(reinterpret_cast(buf)); + if (!match_system(big_endian)) { in = vreinterpretq_u16_u8(vrev16q_u8(vreinterpretq_u8_u16(in))); } + + const uint16x8_t surrogates_bytemask = vceqq_u16(vandq_u16(in, v_f800), v_d800); + // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, + // it is likely an uncommon occurrence. + if (vmaxvq_u16(surrogates_bytemask) == 0) { + // case: no surrogate pairs, extend all 16-bit code units to 32-bit code units + vst1q_u32(utf32_output, vmovl_u16(vget_low_u16(in))); + vst1q_u32(utf32_output+4, vmovl_high_u16(in)); + utf32_output += 8; + buf += 8; + // surrogate pair(s) in a register + } else { + // Let us do a scalar fallback. + // It may seem wasteful to use scalar code, but being efficient with SIMD + // in the presence of surrogate pairs may require non-trivial tables. + size_t forward = 15; + size_t k = 0; + if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} + for(; k < forward; k++) { + uint16_t word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k]) : buf[k]; + if((word &0xF800 ) != 0xD800) { + *utf32_output++ = char32_t(word); } else { - // you might think that a for-loop would work, but under Visual Studio, it is not good enough. - static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), - "We support either two or four chunks per 64-byte block."); - auto zero = simd8{uint8_t(0)}; - if(simd8x64::NUM_CHUNKS == 2) { - this->check_utf8_bytes(input.chunks[0], zero); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - } else if(simd8x64::NUM_CHUNKS == 4) { - this->check_utf8_bytes(input.chunks[0], zero); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - this->check_utf8_bytes(input.chunks[2], input.chunks[1]); - this->check_utf8_bytes(input.chunks[3], input.chunks[2]); - } - if (errors()) { - // rewind_and_convert_with_errors will seek a potential error from in+pos onward, - // with the ability to go back up to pos bytes, and read size-pos bytes forward. - result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); - res.count += pos; - return res; - } - uint64_t utf8_continuation_mask = input.lt(-65 + 1); - uint64_t utf8_leading_mask = ~utf8_continuation_mask; - uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; - // We process in blocks of up to 12 bytes except possibly - // for fast paths which may process up to 16 bytes. For the - // slow path to work, we should have at least 12 input bytes left. - size_t max_starting_point = (pos + 64) - 12; - // Next loop is going to run at least five times. - while(pos < max_starting_point) { - // Performance note: our ability to compute 'consumed' and - // then shift and recompute is critical. If there is a - // latency of, say, 4 cycles on getting 'consumed', then - // the inner loop might have a total latency of about 6 cycles. - // Yet we process between 6 to 12 inputs bytes, thus we get - // a speed limit between 1 cycle/byte and 0.5 cycle/byte - // for this section of the code. Hence, there is a limit - // to how much we can further increase this latency before - // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf16(in + pos, - utf8_end_of_code_point_mask, utf16_output); - pos += consumed; - utf8_end_of_code_point_mask >>= consumed; - } - // At this point there may remain between 0 and 12 bytes in the - // 64-byte block. These bytes will be processed again. So we have an - // 80% efficiency (in the worst case). In practice we expect an - // 85% to 90% efficiency. - } - } - if(errors()) { - // rewind_and_convert_with_errors will seek a potential error from in+pos onward, - // with the ability to go back up to pos bytes, and read size-pos bytes forward. - result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); - res.count += pos; - return res; - } - if(pos < size) { - // rewind_and_convert_with_errors will seek a potential error from in+pos onward, - // with the ability to go back up to pos bytes, and read size-pos bytes forward. - result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); - if (res.error) { // In case of error, we want the error position - res.count += pos; - return res; - } else { // In case of success, we want the number of word written - utf16_output += res.count; + // must be a surrogate pair + uint16_t diff = uint16_t(word - 0xD800); + uint16_t next_word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k + 1]) : buf[k + 1]; + k++; + uint16_t diff2 = uint16_t(next_word - 0xDC00); + if((diff | diff2) > 0x3FF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k - 1), reinterpret_cast(utf32_output)); } + uint32_t value = (diff << 10) + diff2 + 0x10000; + *utf32_output++ = char32_t(value); } } - return result(error_code::SUCCESS, utf16_output - start); + buf += k; } + } // while + return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast(utf32_output)); +} +/* end file src/arm64/arm_convert_utf16_to_utf32.cpp */ - simdutf_really_inline bool errors() const { - return this->error.any_bits_set_anywhere(); +/* begin file src/arm64/arm_convert_utf32_to_latin1.cpp */ +std::pair arm_convert_utf32_to_latin1(const char32_t* buf, size_t len, char* latin1_output) { + const char32_t* end = buf + len; + while (buf + 8 <= end) { + uint32x4_t in1 = vld1q_u32(reinterpret_cast(buf)); + uint32x4_t in2 = vld1q_u32(reinterpret_cast(buf+4)); + + uint16x8_t utf16_packed = vcombine_u16(vqmovn_u32(in1), vqmovn_u32(in2)); + if (vmaxvq_u16(utf16_packed) <= 0xff) { + // 1. pack the bytes + uint8x8_t latin1_packed = vmovn_u16(utf16_packed); + // 2. store (8 bytes) + vst1_u8(reinterpret_cast(latin1_output), latin1_packed); + // 3. adjust pointers + buf += 8; + latin1_output += 8; + } else { + return std::make_pair(nullptr, reinterpret_cast(latin1_output)); } + } // while + return std::make_pair(buf, latin1_output); +} - }; // struct utf8_checker -} // utf8_to_utf16 namespace -} // unnamed namespace -} // namespace arm64 -} // namespace simdutf -/* end file src/generic/utf8_to_utf16/utf8_to_utf16.h */ -// transcoding from UTF-8 to UTF-32 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf32/valid_utf8_to_utf32.h -/* begin file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ -namespace simdutf { -namespace arm64 { -namespace { -namespace utf8_to_utf32 { +std::pair arm_convert_utf32_to_latin1_with_errors(const char32_t* buf, size_t len, char* latin1_output) { + const char32_t* start = buf; + const char32_t* end = buf + len; -using namespace simd; + while (buf + 8 <= end) { + uint32x4_t in1 = vld1q_u32(reinterpret_cast(buf)); + uint32x4_t in2 = vld1q_u32(reinterpret_cast(buf+4)); + uint16x8_t utf16_packed = vcombine_u16(vqmovn_u32(in1), vqmovn_u32(in2)); -simdutf_warn_unused size_t convert_valid(const char* input, size_t size, - char32_t* utf32_output) noexcept { - size_t pos = 0; - char32_t* start{utf32_output}; - const size_t safety_margin = 16; // to avoid overruns! - while(pos + 64 + safety_margin <= size) { - simd8x64 in(reinterpret_cast(input + pos)); - if(in.is_ascii()) { - in.store_ascii_as_utf32(utf32_output); - utf32_output += 64; - pos += 64; + if (vmaxvq_u16(utf16_packed) <= 0xff) { + // 1. pack the bytes + uint8x8_t latin1_packed = vmovn_u16(utf16_packed); + // 2. store (8 bytes) + vst1_u8(reinterpret_cast(latin1_output), latin1_packed); + // 3. adjust pointers + buf += 8; + latin1_output += 8; } else { - // -65 is 0b10111111 in two-complement's, so largest possible continuation byte - uint64_t utf8_continuation_mask = in.lt(-65 + 1); - uint64_t utf8_leading_mask = ~utf8_continuation_mask; - uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; - size_t max_starting_point = (pos + 64) - 12; - while(pos < max_starting_point) { - size_t consumed = convert_masked_utf8_to_utf32(input + pos, - utf8_end_of_code_point_mask, utf32_output); - pos += consumed; - utf8_end_of_code_point_mask >>= consumed; + // Let us do a scalar fallback. + for(int k = 0; k < 8; k++) { + uint32_t word = buf[k]; + if(word <= 0xff) { + *latin1_output++ = char(word); + } else { + return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), latin1_output); + } } } - } - utf32_output += scalar::utf8_to_utf32::convert_valid(input + pos, size - pos, utf32_output); - return utf32_output - start; + } // while + return std::make_pair(result(error_code::SUCCESS, buf - start), latin1_output); } +/* end file src/arm64/arm_convert_utf32_to_latin1.cpp */ +/* begin file src/arm64/arm_convert_utf32_to_utf8.cpp */ +std::pair arm_convert_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_out) { + uint8_t * utf8_output = reinterpret_cast(utf8_out); + const char32_t* end = buf + len; + const uint16x8_t v_c080 = vmovq_n_u16((uint16_t)0xc080); -} // namespace utf8_to_utf32 -} // unnamed namespace -} // namespace arm64 -} // namespace simdutf -/* end file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf32/utf8_to_utf32.h -/* begin file src/generic/utf8_to_utf32/utf8_to_utf32.h */ + uint16x8_t forbidden_bytemask = vmovq_n_u16(0x0); + while (buf + 8 < end) { + uint32x4_t in = vld1q_u32(reinterpret_cast(buf)); + uint32x4_t nextin = vld1q_u32(reinterpret_cast(buf+4)); -namespace simdutf { -namespace arm64 { -namespace { -namespace utf8_to_utf32 { -using namespace simd; + // Check if no bits set above 16th + if(vmaxvq_u32(vorrq_u32(in, nextin)) <= 0xFFFF) { + // Pack UTF-32 to UTF-16 safely (without surrogate pairs) + // Apply UTF-16 => UTF-8 routine (arm_convert_utf16_to_utf8.cpp) + uint16x8_t utf16_packed = vcombine_u16(vmovn_u32(in), vmovn_u32(nextin)); + if(vmaxvq_u16(utf16_packed) <= 0x7F) { // ASCII fast path!!!! + // 1. pack the bytes + // obviously suboptimal. + uint8x8_t utf8_packed = vmovn_u16(utf16_packed); + // 2. store (8 bytes) + vst1_u8(utf8_output, utf8_packed); + // 3. adjust pointers + buf += 8; + utf8_output += 8; + continue; // we are done for this round! + } + if (vmaxvq_u16(utf16_packed) <= 0x7FF) { + // 1. prepare 2-byte values + // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 + // expected output : [110a|aaaa|10bb|bbbb] x 8 + const uint16x8_t v_1f00 = vmovq_n_u16((int16_t)0x1f00); + const uint16x8_t v_003f = vmovq_n_u16((int16_t)0x003f); + + // t0 = [000a|aaaa|bbbb|bb00] + const uint16x8_t t0 = vshlq_n_u16(utf16_packed, 2); + // t1 = [000a|aaaa|0000|0000] + const uint16x8_t t1 = vandq_u16(t0, v_1f00); + // t2 = [0000|0000|00bb|bbbb] + const uint16x8_t t2 = vandq_u16(utf16_packed, v_003f); + // t3 = [000a|aaaa|00bb|bbbb] + const uint16x8_t t3 = vorrq_u16(t1, t2); + // t4 = [110a|aaaa|10bb|bbbb] + const uint16x8_t t4 = vorrq_u16(t3, v_c080); + // 2. merge ASCII and 2-byte codewords + const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); + const uint16x8_t one_byte_bytemask = vcleq_u16(utf16_packed, v_007f); + const uint8x16_t utf8_unpacked = vreinterpretq_u8_u16(vbslq_u16(one_byte_bytemask, utf16_packed, t4)); + // 3. prepare bitmask for 8-bit lookup + #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t mask = make_uint16x8_t(0x0001, 0x0004, + 0x0010, 0x0040, + 0x0002, 0x0008, + 0x0020, 0x0080); + #else + const uint16x8_t mask = { 0x0001, 0x0004, + 0x0010, 0x0040, + 0x0002, 0x0008, + 0x0020, 0x0080 }; + #endif + uint16_t m2 = vaddvq_u16(vandq_u16(one_byte_bytemask, mask)); + // 4. pack the bytes + const uint8_t* row = &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; + const uint8x16_t shuffle = vld1q_u8(row + 1); + const uint8x16_t utf8_packed = vqtbl1q_u8(utf8_unpacked, shuffle); - simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { -// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) -// Bit 1 = Too Long (ASCII followed by continuation) -// Bit 2 = Overlong 3-byte -// Bit 4 = Surrogate -// Bit 5 = Overlong 2-byte -// Bit 7 = Two Continuations - constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ - // 11______ 11______ - constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ - constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ - constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ - constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ - constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ - constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ - // 11110100 101_____ - // 11110101 1001____ - // 11110101 101_____ - // 1111011_ 1001____ - // 1111011_ 101_____ - // 11111___ 1001____ - // 11111___ 101_____ - constexpr const uint8_t TOO_LARGE_1000 = 1<<6; - // 11110101 1000____ - // 1111011_ 1000____ - // 11111___ 1000____ - constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + // 5. store bytes + vst1q_u8(utf8_output, utf8_packed); - const simd8 byte_1_high = prev1.shr<4>().lookup_16( - // 0_______ ________ - TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, - TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, - // 10______ ________ - TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, - // 1100____ ________ - TOO_SHORT | OVERLONG_2, - // 1101____ ________ - TOO_SHORT, - // 1110____ ________ - TOO_SHORT | OVERLONG_3 | SURROGATE, - // 1111____ ________ - TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 - ); - constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . - const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( - // ____0000 ________ - CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, - // ____0001 ________ - CARRY | OVERLONG_2, - // ____001_ ________ - CARRY, - CARRY, + // 6. adjust pointers + buf += 8; + utf8_output += row[0]; + continue; + } else { + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes + const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); + const uint16x8_t v_dfff = vmovq_n_u16((uint16_t)0xdfff); + forbidden_bytemask = vorrq_u16(vandq_u16(vcleq_u16(utf16_packed, v_dfff), vcgeq_u16(utf16_packed, v_d800)), forbidden_bytemask); - // ____0100 ________ - CARRY | TOO_LARGE, - // ____0101 ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - // ____011_ ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, + #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t dup_even = make_uint16x8_t(0x0000, 0x0202, 0x0404, 0x0606, + 0x0808, 0x0a0a, 0x0c0c, 0x0e0e); + #else + const uint16x8_t dup_even = {0x0000, 0x0202, 0x0404, 0x0606, + 0x0808, 0x0a0a, 0x0c0c, 0x0e0e}; + #endif + /* In this branch we handle three cases: + 1. [0000|0000|0ccc|cccc] => [0ccc|cccc] - single UFT-8 byte + 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes + 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - // ____1___ ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - // ____1101 ________ - CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000 - ); - const simd8 byte_2_high = input.shr<4>().lookup_16( - // ________ 0_______ - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + We expand the input word (16-bit) into two code units (32-bit), thus + we have room for four bytes. However, we need five distinct bit + layouts. Note that the last byte in cases #2 and #3 is the same. - // ________ 1000____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, - // ________ 1001____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, - // ________ 101_____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, - TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + We precompute byte 1 for case #1 and the common byte for cases #2 & #3 + in register t2. - // ________ 11______ - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT - ); - return (byte_1_high & byte_1_low & byte_2_high); - } - simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, - const simd8 prev_input, const simd8 sc) { - simd8 prev2 = input.prev<2>(prev_input); - simd8 prev3 = input.prev<3>(prev_input); - simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); - simd8 must23_80 = must23 & uint8_t(0x80); - return must23_80 ^ sc; - } + We precompute byte 1 for case #3 and -- **conditionally** -- precompute + either byte 1 for case #2 or byte 2 for case #3. Note that they + differ by exactly one bit. + Finally from these two code units we build proper UTF-8 sequence, taking + into account the case (i.e, the number of bytes to write). + */ + /** + * Given [aaaa|bbbb|bbcc|cccc] our goal is to produce: + * t2 => [0ccc|cccc] [10cc|cccc] + * s4 => [1110|aaaa] ([110b|bbbb] OR [10bb|bbbb]) + */ + #define simdutf_vec(x) vmovq_n_u16(static_cast(x)) + // [aaaa|bbbb|bbcc|cccc] => [bbcc|cccc|bbcc|cccc] + const uint16x8_t t0 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(utf16_packed), vreinterpretq_u8_u16(dup_even))); + // [bbcc|cccc|bbcc|cccc] => [00cc|cccc|0bcc|cccc] + const uint16x8_t t1 = vandq_u16(t0, simdutf_vec(0b0011111101111111)); + // [00cc|cccc|0bcc|cccc] => [10cc|cccc|0bcc|cccc] + const uint16x8_t t2 = vorrq_u16 (t1, simdutf_vec(0b1000000000000000)); - struct validating_transcoder { - // If this is nonzero, there has been a UTF-8 error. - simd8 error; + // s0: [aaaa|bbbb|bbcc|cccc] => [0000|0000|0000|aaaa] + const uint16x8_t s0 = vshrq_n_u16(utf16_packed, 12); + // s1: [aaaa|bbbb|bbcc|cccc] => [0000|bbbb|bb00|0000] + const uint16x8_t s1 = vandq_u16(utf16_packed, simdutf_vec(0b0000111111000000)); + // [0000|bbbb|bb00|0000] => [00bb|bbbb|0000|0000] + const uint16x8_t s1s = vshlq_n_u16(s1, 2); + // [00bb|bbbb|0000|aaaa] + const uint16x8_t s2 = vorrq_u16(s0, s1s); + // s3: [00bb|bbbb|0000|aaaa] => [11bb|bbbb|1110|aaaa] + const uint16x8_t s3 = vorrq_u16(s2, simdutf_vec(0b1100000011100000)); + const uint16x8_t v_07ff = vmovq_n_u16((uint16_t)0x07FF); + const uint16x8_t one_or_two_bytes_bytemask = vcleq_u16(utf16_packed, v_07ff); + const uint16x8_t m0 = vbicq_u16(simdutf_vec(0b0100000000000000), one_or_two_bytes_bytemask); + const uint16x8_t s4 = veorq_u16(s3, m0); + #undef simdutf_vec - validating_transcoder() : error(uint8_t(0)) {} - // - // Check whether the current bytes are valid UTF-8. - // - simdutf_really_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { - // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes - // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) - simd8 prev1 = input.prev<1>(prev_input); - simd8 sc = check_special_cases(input, prev1); - this->error |= check_multibyte_lengths(input, prev_input, sc); - } + // 4. expand code units 16-bit => 32-bit + const uint8x16_t out0 = vreinterpretq_u8_u16(vzip1q_u16(t2, s4)); + const uint8x16_t out1 = vreinterpretq_u8_u16(vzip2q_u16(t2, s4)); + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle + const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); + const uint16x8_t one_byte_bytemask = vcleq_u16(utf16_packed, v_007f); + #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t onemask = make_uint16x8_t(0x0001, 0x0004, + 0x0010, 0x0040, + 0x0100, 0x0400, + 0x1000, 0x4000 ); + const uint16x8_t twomask = make_uint16x8_t(0x0002, 0x0008, + 0x0020, 0x0080, + 0x0200, 0x0800, + 0x2000, 0x8000 ); + #else + const uint16x8_t onemask = { 0x0001, 0x0004, + 0x0010, 0x0040, + 0x0100, 0x0400, + 0x1000, 0x4000 }; + const uint16x8_t twomask = { 0x0002, 0x0008, + 0x0020, 0x0080, + 0x0200, 0x0800, + 0x2000, 0x8000 }; + #endif + const uint16x8_t combined = vorrq_u16(vandq_u16(one_byte_bytemask, onemask), vandq_u16(one_or_two_bytes_bytemask, twomask)); + const uint16_t mask = vaddvq_u16(combined); + // The following fast path may or may not be beneficial. + /*if(mask == 0) { + // We only have three-byte code units. Use fast path. + const uint8x16_t shuffle = {2,3,1,6,7,5,10,11,9,14,15,13,0,0,0,0}; + const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle); + const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle); + vst1q_u8(utf8_output, utf8_0); + utf8_output += 12; + vst1q_u8(utf8_output, utf8_1); + utf8_output += 12; + buf += 8; + continue; + }*/ + const uint8_t mask0 = uint8_t(mask); + const uint8_t* row0 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask0][0]; + const uint8x16_t shuffle0 = vld1q_u8(row0 + 1); + const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle0); + const uint8_t mask1 = static_cast(mask >> 8); + const uint8_t* row1 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask1][0]; + const uint8x16_t shuffle1 = vld1q_u8(row1 + 1); + const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle1); - simdutf_really_inline size_t convert(const char* in, size_t size, char32_t* utf32_output) { - size_t pos = 0; - char32_t* start{utf32_output}; - // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, - // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate - // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, - // to give us a good margin. - size_t leading_byte = 0; - size_t margin = size; - for(; margin > 0 && leading_byte < 4; margin--) { - leading_byte += (int8_t(in[margin-1]) > -65); + vst1q_u8(utf8_output, utf8_0); + utf8_output += row0[0]; + vst1q_u8(utf8_output, utf8_1); + utf8_output += row1[0]; + + buf += 8; } - // If the input is long enough, then we have that margin-1 is the fourth last leading byte. - const size_t safety_margin = size - margin + 1; // to avoid overruns! - while(pos + 64 + safety_margin <= size) { - simd8x64 input(reinterpret_cast(in + pos)); - if(input.is_ascii()) { - input.store_ascii_as_utf32(utf32_output); - utf32_output += 64; - pos += 64; + // At least one 32-bit word will produce a surrogate pair in UTF-16 <=> will produce four UTF-8 bytes. + } else { + // Let us do a scalar fallback. + // It may seem wasteful to use scalar code, but being efficient with SIMD + // in the presence of surrogate pairs may require non-trivial tables. + size_t forward = 15; + size_t k = 0; + if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} + for(; k < forward; k++) { + uint32_t word = buf[k]; + if((word & 0xFFFFFF80)==0) { + *utf8_output++ = char(word); + } else if((word & 0xFFFFF800)==0) { + *utf8_output++ = char((word>>6) | 0b11000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); + } else if((word & 0xFFFF0000)==0) { + if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(nullptr, reinterpret_cast(utf8_output)); } + *utf8_output++ = char((word>>12) | 0b11100000); + *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); } else { - // you might think that a for-loop would work, but under Visual Studio, it is not good enough. - static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), - "We support either two or four chunks per 64-byte block."); - auto zero = simd8{uint8_t(0)}; - if(simd8x64::NUM_CHUNKS == 2) { - this->check_utf8_bytes(input.chunks[0], zero); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - } else if(simd8x64::NUM_CHUNKS == 4) { - this->check_utf8_bytes(input.chunks[0], zero); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - this->check_utf8_bytes(input.chunks[2], input.chunks[1]); - this->check_utf8_bytes(input.chunks[3], input.chunks[2]); - } - uint64_t utf8_continuation_mask = input.lt(-65 + 1); - uint64_t utf8_leading_mask = ~utf8_continuation_mask; - uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; - // We process in blocks of up to 12 bytes except possibly - // for fast paths which may process up to 16 bytes. For the - // slow path to work, we should have at least 12 input bytes left. - size_t max_starting_point = (pos + 64) - 12; - // Next loop is going to run at least five times. - while(pos < max_starting_point) { - // Performance note: our ability to compute 'consumed' and - // then shift and recompute is critical. If there is a - // latency of, say, 4 cycles on getting 'consumed', then - // the inner loop might have a total latency of about 6 cycles. - // Yet we process between 6 to 12 inputs bytes, thus we get - // a speed limit between 1 cycle/byte and 0.5 cycle/byte - // for this section of the code. Hence, there is a limit - // to how much we can further increase this latency before - // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf32(in + pos, - utf8_end_of_code_point_mask, utf32_output); - pos += consumed; - utf8_end_of_code_point_mask >>= consumed; - } - // At this point there may remain between 0 and 12 bytes in the - // 64-byte block. These bytes will be processed again. So we have an - // 80% efficiency (in the worst case). In practice we expect an - // 85% to 90% efficiency. + if (word > 0x10FFFF) { return std::make_pair(nullptr, reinterpret_cast(utf8_output)); } + *utf8_output++ = char((word>>18) | 0b11110000); + *utf8_output++ = char(((word>>12) & 0b111111) | 0b10000000); + *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); } } - if(errors()) { return 0; } - if(pos < size) { - size_t howmany = scalar::utf8_to_utf32::convert(in + pos, size - pos, utf32_output); - if(howmany == 0) { return 0; } - utf32_output += howmany; - } - return utf32_output - start; + buf += k; } + } // while - simdutf_really_inline result convert_with_errors(const char* in, size_t size, char32_t* utf32_output) { - size_t pos = 0; - char32_t* start{utf32_output}; - // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, - // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate - // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, - // to give us a good margin. - size_t leading_byte = 0; - size_t margin = size; - for(; margin > 0 && leading_byte < 4; margin--) { - leading_byte += (int8_t(in[margin-1]) > -65); - } - // If the input is long enough, then we have that margin-1 is the fourth last leading byte. - const size_t safety_margin = size - margin + 1; // to avoid overruns! - while(pos + 64 + safety_margin <= size) { - simd8x64 input(reinterpret_cast(in + pos)); - if(input.is_ascii()) { - input.store_ascii_as_utf32(utf32_output); - utf32_output += 64; - pos += 64; - } else { - // you might think that a for-loop would work, but under Visual Studio, it is not good enough. - static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), - "We support either two or four chunks per 64-byte block."); - auto zero = simd8{uint8_t(0)}; - if(simd8x64::NUM_CHUNKS == 2) { - this->check_utf8_bytes(input.chunks[0], zero); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - } else if(simd8x64::NUM_CHUNKS == 4) { - this->check_utf8_bytes(input.chunks[0], zero); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - this->check_utf8_bytes(input.chunks[2], input.chunks[1]); - this->check_utf8_bytes(input.chunks[3], input.chunks[2]); - } - if (errors()) { - result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); - res.count += pos; - return res; - } - uint64_t utf8_continuation_mask = input.lt(-65 + 1); - uint64_t utf8_leading_mask = ~utf8_continuation_mask; - uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; - // We process in blocks of up to 12 bytes except possibly - // for fast paths which may process up to 16 bytes. For the - // slow path to work, we should have at least 12 input bytes left. - size_t max_starting_point = (pos + 64) - 12; - // Next loop is going to run at least five times. - while(pos < max_starting_point) { - // Performance note: our ability to compute 'consumed' and - // then shift and recompute is critical. If there is a - // latency of, say, 4 cycles on getting 'consumed', then - // the inner loop might have a total latency of about 6 cycles. - // Yet we process between 6 to 12 inputs bytes, thus we get - // a speed limit between 1 cycle/byte and 0.5 cycle/byte - // for this section of the code. Hence, there is a limit - // to how much we can further increase this latency before - // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf32(in + pos, - utf8_end_of_code_point_mask, utf32_output); - pos += consumed; - utf8_end_of_code_point_mask >>= consumed; - } - // At this point there may remain between 0 and 12 bytes in the - // 64-byte block. These bytes will be processed again. So we have an - // 80% efficiency (in the worst case). In practice we expect an - // 85% to 90% efficiency. - } - } - if(errors()) { - result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); - res.count += pos; - return res; - } - if(pos < size) { - result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); - if (res.error) { // In case of error, we want the error position - res.count += pos; - return res; - } else { // In case of success, we want the number of word written - utf32_output += res.count; - } - } - return result(error_code::SUCCESS, utf32_output - start); - } - - simdutf_really_inline bool errors() const { - return this->error.any_bits_set_anywhere(); - } - - }; // struct utf8_checker -} // utf8_to_utf32 namespace -} // unnamed namespace -} // namespace arm64 -} // namespace simdutf -/* end file src/generic/utf8_to_utf32/utf8_to_utf32.h */ -// other functions -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8.h -/* begin file src/generic/utf8.h */ + // check for invalid input + if (vmaxvq_u16(forbidden_bytemask) != 0) { + return std::make_pair(nullptr, reinterpret_cast(utf8_output)); + } + return std::make_pair(buf, reinterpret_cast(utf8_output)); +} -namespace simdutf { -namespace arm64 { -namespace { -namespace utf8 { -using namespace simd; +std::pair arm_convert_utf32_to_utf8_with_errors(const char32_t* buf, size_t len, char* utf8_out) { + uint8_t * utf8_output = reinterpret_cast(utf8_out); + const char32_t* start = buf; + const char32_t* end = buf + len; -simdutf_really_inline size_t count_code_points(const char* in, size_t size) { - size_t pos = 0; - size_t count = 0; - for(;pos + 64 <= size; pos += 64) { - simd8x64 input(reinterpret_cast(in + pos)); - uint64_t utf8_continuation_mask = input.lt(-65 + 1); - count += 64 - count_ones(utf8_continuation_mask); - } - return count + scalar::utf8::count_code_points(in + pos, size - pos); -} + const uint16x8_t v_c080 = vmovq_n_u16((uint16_t)0xc080); + while (buf + 8 < end) { + uint32x4_t in = vld1q_u32(reinterpret_cast(buf)); + uint32x4_t nextin = vld1q_u32(reinterpret_cast(buf+4)); -simdutf_really_inline size_t utf16_length_from_utf8(const char* in, size_t size) { - size_t pos = 0; - size_t count = 0; - // This algorithm could no doubt be improved! - for(;pos + 64 <= size; pos += 64) { - simd8x64 input(reinterpret_cast(in + pos)); - uint64_t utf8_continuation_mask = input.lt(-65 + 1); - // We count one word for anything that is not a continuation (so - // leading bytes). - count += 64 - count_ones(utf8_continuation_mask); - int64_t utf8_4byte = input.gteq_unsigned(240); - count += count_ones(utf8_4byte); - } - return count + scalar::utf8::utf16_length_from_utf8(in + pos, size - pos); -} + // Check if no bits set above 16th + if(vmaxvq_u32(vorrq_u32(in, nextin)) <= 0xFFFF) { + // Pack UTF-32 to UTF-16 safely (without surrogate pairs) + // Apply UTF-16 => UTF-8 routine (arm_convert_utf16_to_utf8.cpp) + uint16x8_t utf16_packed = vcombine_u16(vmovn_u32(in), vmovn_u32(nextin)); + if(vmaxvq_u16(utf16_packed) <= 0x7F) { // ASCII fast path!!!! + // 1. pack the bytes + // obviously suboptimal. + uint8x8_t utf8_packed = vmovn_u16(utf16_packed); + // 2. store (8 bytes) + vst1_u8(utf8_output, utf8_packed); + // 3. adjust pointers + buf += 8; + utf8_output += 8; + continue; // we are done for this round! + } + if (vmaxvq_u16(utf16_packed) <= 0x7FF) { + // 1. prepare 2-byte values + // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 + // expected output : [110a|aaaa|10bb|bbbb] x 8 + const uint16x8_t v_1f00 = vmovq_n_u16((int16_t)0x1f00); + const uint16x8_t v_003f = vmovq_n_u16((int16_t)0x003f); + + // t0 = [000a|aaaa|bbbb|bb00] + const uint16x8_t t0 = vshlq_n_u16(utf16_packed, 2); + // t1 = [000a|aaaa|0000|0000] + const uint16x8_t t1 = vandq_u16(t0, v_1f00); + // t2 = [0000|0000|00bb|bbbb] + const uint16x8_t t2 = vandq_u16(utf16_packed, v_003f); + // t3 = [000a|aaaa|00bb|bbbb] + const uint16x8_t t3 = vorrq_u16(t1, t2); + // t4 = [110a|aaaa|10bb|bbbb] + const uint16x8_t t4 = vorrq_u16(t3, v_c080); + // 2. merge ASCII and 2-byte codewords + const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); + const uint16x8_t one_byte_bytemask = vcleq_u16(utf16_packed, v_007f); + const uint8x16_t utf8_unpacked = vreinterpretq_u8_u16(vbslq_u16(one_byte_bytemask, utf16_packed, t4)); + // 3. prepare bitmask for 8-bit lookup + #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t mask = make_uint16x8_t(0x0001, 0x0004, + 0x0010, 0x0040, + 0x0002, 0x0008, + 0x0020, 0x0080); + #else + const uint16x8_t mask = { 0x0001, 0x0004, + 0x0010, 0x0040, + 0x0002, 0x0008, + 0x0020, 0x0080 }; + #endif + uint16_t m2 = vaddvq_u16(vandq_u16(one_byte_bytemask, mask)); + // 4. pack the bytes + const uint8_t* row = &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; + const uint8x16_t shuffle = vld1q_u8(row + 1); + const uint8x16_t utf8_packed = vqtbl1q_u8(utf8_unpacked, shuffle); -simdutf_really_inline size_t utf32_length_from_utf8(const char* in, size_t size) { - return count_code_points(in, size); -} -} // utf8 namespace -} // unnamed namespace -} // namespace arm64 -} // namespace simdutf -/* end file src/generic/utf8.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf16.h -/* begin file src/generic/utf16.h */ -namespace simdutf { -namespace arm64 { -namespace { -namespace utf16 { + // 5. store bytes + vst1q_u8(utf8_output, utf8_packed); -template -simdutf_really_inline size_t count_code_points(const char16_t* in, size_t size) { - size_t pos = 0; - size_t count = 0; - for(;pos + 32 <= size; pos += 32) { - simd16x32 input(reinterpret_cast(in + pos)); - if (!match_system(big_endian)) input.swap_bytes(); - uint64_t not_pair = input.not_in_range(0xDC00, 0xDFFF); - count += count_ones(not_pair) / 2; - } - return count + scalar::utf16::count_code_points(in + pos, size - pos); -} + // 6. adjust pointers + buf += 8; + utf8_output += row[0]; + continue; + } else { + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes -template -simdutf_really_inline size_t utf8_length_from_utf16(const char16_t* in, size_t size) { - size_t pos = 0; - size_t count = 0; - // This algorithm could no doubt be improved! - for(;pos + 32 <= size; pos += 32) { - simd16x32 input(reinterpret_cast(in + pos)); - if (!match_system(big_endian)) input.swap_bytes(); - uint64_t ascii_mask = input.lteq(0x7F); - uint64_t twobyte_mask = input.lteq(0x7FF); - uint64_t not_pair_mask = input.not_in_range(0xD800, 0xDFFF); + // check for invalid input + const uint16x8_t v_d800 = vmovq_n_u16((uint16_t)0xd800); + const uint16x8_t v_dfff = vmovq_n_u16((uint16_t)0xdfff); + const uint16x8_t forbidden_bytemask = vandq_u16(vcleq_u16(utf16_packed, v_dfff), vcgeq_u16(utf16_packed, v_d800)); + if (vmaxvq_u16(forbidden_bytemask) != 0) { + return std::make_pair(result(error_code::SURROGATE, buf - start), reinterpret_cast(utf8_output)); + } - size_t ascii_count = count_ones(ascii_mask) / 2; - size_t twobyte_count = count_ones(twobyte_mask & ~ ascii_mask) / 2; - size_t threebyte_count = count_ones(not_pair_mask & ~ twobyte_mask) / 2; - size_t fourbyte_count = 32 - count_ones(not_pair_mask) / 2; - count += 2 * fourbyte_count + 3 * threebyte_count + 2 * twobyte_count + ascii_count; - } - return count + scalar::utf16::utf8_length_from_utf16(in + pos, size - pos); -} + #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t dup_even = make_uint16x8_t(0x0000, 0x0202, 0x0404, 0x0606, + 0x0808, 0x0a0a, 0x0c0c, 0x0e0e); + #else + const uint16x8_t dup_even = {0x0000, 0x0202, 0x0404, 0x0606, + 0x0808, 0x0a0a, 0x0c0c, 0x0e0e}; + #endif + /* In this branch we handle three cases: + 1. [0000|0000|0ccc|cccc] => [0ccc|cccc] - single UFT-8 byte + 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes + 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes -template -simdutf_really_inline size_t utf32_length_from_utf16(const char16_t* in, size_t size) { - return count_code_points(in, size); -} + We expand the input word (16-bit) into two code units (32-bit), thus + we have room for four bytes. However, we need five distinct bit + layouts. Note that the last byte in cases #2 and #3 is the same. -simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* output) { - size_t pos = 0; + We precompute byte 1 for case #1 and the common byte for cases #2 & #3 + in register t2. - while (pos + 32 <= size) { - simd16x32 input(reinterpret_cast(in + pos)); - input.swap_bytes(); - input.store(reinterpret_cast(output)); - pos += 32; - output += 32; - } + We precompute byte 1 for case #3 and -- **conditionally** -- precompute + either byte 1 for case #2 or byte 2 for case #3. Note that they + differ by exactly one bit. - scalar::utf16::change_endianness_utf16(in + pos, size - pos, output); -} + Finally from these two code units we build proper UTF-8 sequence, taking + into account the case (i.e, the number of bytes to write). + */ + /** + * Given [aaaa|bbbb|bbcc|cccc] our goal is to produce: + * t2 => [0ccc|cccc] [10cc|cccc] + * s4 => [1110|aaaa] ([110b|bbbb] OR [10bb|bbbb]) + */ + #define simdutf_vec(x) vmovq_n_u16(static_cast(x)) + // [aaaa|bbbb|bbcc|cccc] => [bbcc|cccc|bbcc|cccc] + const uint16x8_t t0 = vreinterpretq_u16_u8(vqtbl1q_u8(vreinterpretq_u8_u16(utf16_packed), vreinterpretq_u8_u16(dup_even))); + // [bbcc|cccc|bbcc|cccc] => [00cc|cccc|0bcc|cccc] + const uint16x8_t t1 = vandq_u16(t0, simdutf_vec(0b0011111101111111)); + // [00cc|cccc|0bcc|cccc] => [10cc|cccc|0bcc|cccc] + const uint16x8_t t2 = vorrq_u16 (t1, simdutf_vec(0b1000000000000000)); -} // utf16 -} // unnamed namespace -} // namespace arm64 -} // namespace simdutf -/* end file src/generic/utf16.h */ -// -// Implementation-specific overrides -// -namespace simdutf { -namespace arm64 { + // s0: [aaaa|bbbb|bbcc|cccc] => [0000|0000|0000|aaaa] + const uint16x8_t s0 = vshrq_n_u16(utf16_packed, 12); + // s1: [aaaa|bbbb|bbcc|cccc] => [0000|bbbb|bb00|0000] + const uint16x8_t s1 = vandq_u16(utf16_packed, simdutf_vec(0b0000111111000000)); + // [0000|bbbb|bb00|0000] => [00bb|bbbb|0000|0000] + const uint16x8_t s1s = vshlq_n_u16(s1, 2); + // [00bb|bbbb|0000|aaaa] + const uint16x8_t s2 = vorrq_u16(s0, s1s); + // s3: [00bb|bbbb|0000|aaaa] => [11bb|bbbb|1110|aaaa] + const uint16x8_t s3 = vorrq_u16(s2, simdutf_vec(0b1100000011100000)); + const uint16x8_t v_07ff = vmovq_n_u16((uint16_t)0x07FF); + const uint16x8_t one_or_two_bytes_bytemask = vcleq_u16(utf16_packed, v_07ff); + const uint16x8_t m0 = vbicq_u16(simdutf_vec(0b0100000000000000), one_or_two_bytes_bytemask); + const uint16x8_t s4 = veorq_u16(s3, m0); + #undef simdutf_vec -simdutf_warn_unused int implementation::detect_encodings(const char * input, size_t length) const noexcept { - // If there is a BOM, then we trust it. - auto bom_encoding = simdutf::BOM::check_bom(input, length); - if(bom_encoding != encoding_type::unspecified) { return bom_encoding; } - if (length % 2 == 0) { - return arm_detect_encodings(input, length); - } else { - if (implementation::validate_utf8(input, length)) { - return simdutf::encoding_type::UTF8; - } else { - return simdutf::encoding_type::unspecified; - } - } -} + // 4. expand code units 16-bit => 32-bit + const uint8x16_t out0 = vreinterpretq_u8_u16(vzip1q_u16(t2, s4)); + const uint8x16_t out1 = vreinterpretq_u8_u16(vzip2q_u16(t2, s4)); -simdutf_warn_unused bool implementation::validate_utf8(const char *buf, size_t len) const noexcept { - return arm64::utf8_validation::generic_validate_utf8(buf,len); -} - -simdutf_warn_unused result implementation::validate_utf8_with_errors(const char *buf, size_t len) const noexcept { - return arm64::utf8_validation::generic_validate_utf8_with_errors(buf,len); -} + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle + const uint16x8_t v_007f = vmovq_n_u16((uint16_t)0x007F); + const uint16x8_t one_byte_bytemask = vcleq_u16(utf16_packed, v_007f); + #ifdef SIMDUTF_REGULAR_VISUAL_STUDIO + const uint16x8_t onemask = make_uint16x8_t(0x0001, 0x0004, + 0x0010, 0x0040, + 0x0100, 0x0400, + 0x1000, 0x4000 ); + const uint16x8_t twomask = make_uint16x8_t(0x0002, 0x0008, + 0x0020, 0x0080, + 0x0200, 0x0800, + 0x2000, 0x8000 ); + #else + const uint16x8_t onemask = { 0x0001, 0x0004, + 0x0010, 0x0040, + 0x0100, 0x0400, + 0x1000, 0x4000 }; + const uint16x8_t twomask = { 0x0002, 0x0008, + 0x0020, 0x0080, + 0x0200, 0x0800, + 0x2000, 0x8000 }; + #endif + const uint16x8_t combined = vorrq_u16(vandq_u16(one_byte_bytemask, onemask), vandq_u16(one_or_two_bytes_bytemask, twomask)); + const uint16_t mask = vaddvq_u16(combined); + // The following fast path may or may not be beneficial. + /*if(mask == 0) { + // We only have three-byte code units. Use fast path. + const uint8x16_t shuffle = {2,3,1,6,7,5,10,11,9,14,15,13,0,0,0,0}; + const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle); + const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle); + vst1q_u8(utf8_output, utf8_0); + utf8_output += 12; + vst1q_u8(utf8_output, utf8_1); + utf8_output += 12; + buf += 8; + continue; + }*/ + const uint8_t mask0 = uint8_t(mask); -simdutf_warn_unused bool implementation::validate_ascii(const char *buf, size_t len) const noexcept { - return arm64::utf8_validation::generic_validate_ascii(buf,len); -} + const uint8_t* row0 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask0][0]; + const uint8x16_t shuffle0 = vld1q_u8(row0 + 1); + const uint8x16_t utf8_0 = vqtbl1q_u8(out0, shuffle0); -simdutf_warn_unused result implementation::validate_ascii_with_errors(const char *buf, size_t len) const noexcept { - return arm64::utf8_validation::generic_validate_ascii_with_errors(buf,len); -} + const uint8_t mask1 = static_cast(mask >> 8); + const uint8_t* row1 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask1][0]; + const uint8x16_t shuffle1 = vld1q_u8(row1 + 1); + const uint8x16_t utf8_1 = vqtbl1q_u8(out1, shuffle1); -simdutf_warn_unused bool implementation::validate_utf16le(const char16_t *buf, size_t len) const noexcept { - const char16_t* tail = arm_validate_utf16(buf, len); - if (tail) { - return scalar::utf16::validate(tail, len - (tail - buf)); - } else { - return false; - } -} + vst1q_u8(utf8_output, utf8_0); + utf8_output += row0[0]; + vst1q_u8(utf8_output, utf8_1); + utf8_output += row1[0]; -simdutf_warn_unused bool implementation::validate_utf16be(const char16_t *buf, size_t len) const noexcept { - const char16_t* tail = arm_validate_utf16(buf, len); - if (tail) { - return scalar::utf16::validate(tail, len - (tail - buf)); - } else { - return false; - } -} + buf += 8; + } + // At least one 32-bit word will produce a surrogate pair in UTF-16 <=> will produce four UTF-8 bytes. + } else { + // Let us do a scalar fallback. + // It may seem wasteful to use scalar code, but being efficient with SIMD + // in the presence of surrogate pairs may require non-trivial tables. + size_t forward = 15; + size_t k = 0; + if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} + for(; k < forward; k++) { + uint32_t word = buf[k]; + if((word & 0xFFFFFF80)==0) { + *utf8_output++ = char(word); + } else if((word & 0xFFFFF800)==0) { + *utf8_output++ = char((word>>6) | 0b11000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); + } else if((word & 0xFFFF0000)==0) { + if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), reinterpret_cast(utf8_output)); } + *utf8_output++ = char((word>>12) | 0b11100000); + *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); + } else { + if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), reinterpret_cast(utf8_output)); } + *utf8_output++ = char((word>>18) | 0b11110000); + *utf8_output++ = char(((word>>12) & 0b111111) | 0b10000000); + *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); + } + } + buf += k; + } + } // while -simdutf_warn_unused result implementation::validate_utf16le_with_errors(const char16_t *buf, size_t len) const noexcept { - result res = arm_validate_utf16_with_errors(buf, len); - if (res.count != len) { - result scalar_res = scalar::utf16::validate_with_errors(buf + res.count, len - res.count); - return result(scalar_res.error, res.count + scalar_res.count); - } else { - return res; - } + return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast(utf8_output)); } +/* end file src/arm64/arm_convert_utf32_to_utf8.cpp */ +/* begin file src/arm64/arm_convert_utf32_to_utf16.cpp */ +template +std::pair arm_convert_utf32_to_utf16(const char32_t* buf, size_t len, char16_t* utf16_out) { + uint16_t * utf16_output = reinterpret_cast(utf16_out); + const char32_t* end = buf + len; -simdutf_warn_unused result implementation::validate_utf16be_with_errors(const char16_t *buf, size_t len) const noexcept { - result res = arm_validate_utf16_with_errors(buf, len); - if (res.count != len) { - result scalar_res = scalar::utf16::validate_with_errors(buf + res.count, len - res.count); - return result(scalar_res.error, res.count + scalar_res.count); - } else { - return res; - } -} + uint16x4_t forbidden_bytemask = vmov_n_u16(0x0); -simdutf_warn_unused bool implementation::validate_utf32(const char32_t *buf, size_t len) const noexcept { - const char32_t* tail = arm_validate_utf32le(buf, len); - if (tail) { - return scalar::utf32::validate(tail, len - (tail - buf)); - } else { - return false; - } -} + while(buf + 4 <= end) { + uint32x4_t in = vld1q_u32(reinterpret_cast(buf)); -simdutf_warn_unused result implementation::validate_utf32_with_errors(const char32_t *buf, size_t len) const noexcept { - result res = arm_validate_utf32le_with_errors(buf, len); - if (res.count != len) { - result scalar_res = scalar::utf32::validate_with_errors(buf + res.count, len - res.count); - return result(scalar_res.error, res.count + scalar_res.count); - } else { - return res; - } -} + // Check if no bits set above 16th + if(vmaxvq_u32(in) <= 0xFFFF) { + uint16x4_t utf16_packed = vmovn_u32(in); -simdutf_warn_unused size_t implementation::convert_utf8_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { - utf8_to_utf16::validating_transcoder converter; - return converter.convert(buf, len, utf16_output); -} + const uint16x4_t v_d800 = vmov_n_u16((uint16_t)0xd800); + const uint16x4_t v_dfff = vmov_n_u16((uint16_t)0xdfff); + forbidden_bytemask = vorr_u16(vand_u16(vcle_u16(utf16_packed, v_dfff), vcge_u16(utf16_packed, v_d800)), forbidden_bytemask); -simdutf_warn_unused size_t implementation::convert_utf8_to_utf16be(const char* buf, size_t len, char16_t* utf16_output) const noexcept { - utf8_to_utf16::validating_transcoder converter; - return converter.convert(buf, len, utf16_output); -} + if (!match_system(big_endian)) { utf16_packed = vreinterpret_u16_u8(vrev16_u8(vreinterpret_u8_u16(utf16_packed))); } + vst1_u16(utf16_output, utf16_packed); + utf16_output += 4; + buf += 4; + } else { + size_t forward = 3; + size_t k = 0; + if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} + for(; k < forward; k++) { + uint32_t word = buf[k]; + if((word & 0xFFFF0000)==0) { + // will not generate a surrogate pair + if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(nullptr, reinterpret_cast(utf16_output)); } + *utf16_output++ = !match_system(big_endian) ? char16_t(word >> 8 | word << 8) : char16_t(word); + } else { + // will generate a surrogate pair + if (word > 0x10FFFF) { return std::make_pair(nullptr, reinterpret_cast(utf16_output)); } + word -= 0x10000; + uint16_t high_surrogate = uint16_t(0xD800 + (word >> 10)); + uint16_t low_surrogate = uint16_t(0xDC00 + (word & 0x3FF)); + if (!match_system(big_endian)) { + high_surrogate = uint16_t(high_surrogate >> 8 | high_surrogate << 8); + low_surrogate = uint16_t(low_surrogate << 8 | low_surrogate >> 8); + } + *utf16_output++ = char16_t(high_surrogate); + *utf16_output++ = char16_t(low_surrogate); + } + } + buf += k; + } + } -simdutf_warn_unused result implementation::convert_utf8_to_utf16le_with_errors(const char* buf, size_t len, char16_t* utf16_output) const noexcept { - utf8_to_utf16::validating_transcoder converter; - return converter.convert_with_errors(buf, len, utf16_output); -} + // check for invalid input + if (vmaxv_u16(forbidden_bytemask) != 0) { + return std::make_pair(nullptr, reinterpret_cast(utf16_output)); + } -simdutf_warn_unused result implementation::convert_utf8_to_utf16be_with_errors(const char* buf, size_t len, char16_t* utf16_output) const noexcept { - utf8_to_utf16::validating_transcoder converter; - return converter.convert_with_errors(buf, len, utf16_output); + return std::make_pair(buf, reinterpret_cast(utf16_output)); } -simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16le(const char* input, size_t size, - char16_t* utf16_output) const noexcept { - return utf8_to_utf16::convert_valid(input, size, utf16_output); -} -simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16be(const char* input, size_t size, - char16_t* utf16_output) const noexcept { - return utf8_to_utf16::convert_valid(input, size, utf16_output); -} +template +std::pair arm_convert_utf32_to_utf16_with_errors(const char32_t* buf, size_t len, char16_t* utf16_out) { + uint16_t * utf16_output = reinterpret_cast(utf16_out); + const char32_t* start = buf; + const char32_t* end = buf + len; -simdutf_warn_unused size_t implementation::convert_utf8_to_utf32(const char* buf, size_t len, char32_t* utf32_output) const noexcept { - utf8_to_utf32::validating_transcoder converter; - return converter.convert(buf, len, utf32_output); -} + while(buf + 4 <= end) { + uint32x4_t in = vld1q_u32(reinterpret_cast(buf)); -simdutf_warn_unused result implementation::convert_utf8_to_utf32_with_errors(const char* buf, size_t len, char32_t* utf32_output) const noexcept { - utf8_to_utf32::validating_transcoder converter; - return converter.convert_with_errors(buf, len, utf32_output); -} + // Check if no bits set above 16th + if(vmaxvq_u32(in) <= 0xFFFF) { + uint16x4_t utf16_packed = vmovn_u32(in); -simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf32(const char* input, size_t size, - char32_t* utf32_output) const noexcept { - return utf8_to_utf32::convert_valid(input, size, utf32_output); -} + const uint16x4_t v_d800 = vmov_n_u16((uint16_t)0xd800); + const uint16x4_t v_dfff = vmov_n_u16((uint16_t)0xdfff); + const uint16x4_t forbidden_bytemask = vand_u16(vcle_u16(utf16_packed, v_dfff), vcge_u16(utf16_packed, v_d800)); + if (vmaxv_u16(forbidden_bytemask) != 0) { + return std::make_pair(result(error_code::SURROGATE, buf - start), reinterpret_cast(utf16_output)); + } -simdutf_warn_unused size_t implementation::convert_utf16le_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - std::pair ret = arm_convert_utf16_to_utf8(buf, len, utf8_output); - if (ret.first == nullptr) { return 0; } - size_t saved_bytes = ret.second - utf8_output; - if (ret.first != buf + len) { - const size_t scalar_saved_bytes = scalar::utf16_to_utf8::convert( - ret.first, len - (ret.first - buf), ret.second); - if (scalar_saved_bytes == 0) { return 0; } - saved_bytes += scalar_saved_bytes; - } - return saved_bytes; -} - -simdutf_warn_unused size_t implementation::convert_utf16be_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - std::pair ret = arm_convert_utf16_to_utf8(buf, len, utf8_output); - if (ret.first == nullptr) { return 0; } - size_t saved_bytes = ret.second - utf8_output; - if (ret.first != buf + len) { - const size_t scalar_saved_bytes = scalar::utf16_to_utf8::convert( - ret.first, len - (ret.first - buf), ret.second); - if (scalar_saved_bytes == 0) { return 0; } - saved_bytes += scalar_saved_bytes; - } - return saved_bytes; -} - -simdutf_warn_unused result implementation::convert_utf16le_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished - std::pair ret = arm_convert_utf16_to_utf8_with_errors(buf, len, utf8_output); - if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count - if (ret.first.count != len) { // All good so far, but not finished - result scalar_res = scalar::utf16_to_utf8::convert_with_errors( - buf + ret.first.count, len - ret.first.count, ret.second); - if (scalar_res.error) { - scalar_res.count += ret.first.count; - return scalar_res; - } else { - ret.second += scalar_res.count; - } - } - ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit words written - return ret.first; -} - -simdutf_warn_unused result implementation::convert_utf16be_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished - std::pair ret = arm_convert_utf16_to_utf8_with_errors(buf, len, utf8_output); - if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count - if (ret.first.count != len) { // All good so far, but not finished - result scalar_res = scalar::utf16_to_utf8::convert_with_errors( - buf + ret.first.count, len - ret.first.count, ret.second); - if (scalar_res.error) { - scalar_res.count += ret.first.count; - return scalar_res; + if (!match_system(big_endian)) { utf16_packed = vreinterpret_u16_u8(vrev16_u8(vreinterpret_u8_u16(utf16_packed))); } + vst1_u16(utf16_output, utf16_packed); + utf16_output += 4; + buf += 4; } else { - ret.second += scalar_res.count; + size_t forward = 3; + size_t k = 0; + if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} + for(; k < forward; k++) { + uint32_t word = buf[k]; + if((word & 0xFFFF0000)==0) { + // will not generate a surrogate pair + if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), reinterpret_cast(utf16_output)); } + *utf16_output++ = !match_system(big_endian) ? char16_t(word >> 8 | word << 8) : char16_t(word); + } else { + // will generate a surrogate pair + if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), reinterpret_cast(utf16_output)); } + word -= 0x10000; + uint16_t high_surrogate = uint16_t(0xD800 + (word >> 10)); + uint16_t low_surrogate = uint16_t(0xDC00 + (word & 0x3FF)); + if (!match_system(big_endian)) { + high_surrogate = uint16_t(high_surrogate >> 8 | high_surrogate << 8); + low_surrogate = uint16_t(low_surrogate << 8 | low_surrogate >> 8); + } + *utf16_output++ = char16_t(high_surrogate); + *utf16_output++ = char16_t(low_surrogate); + } + } + buf += k; } } - ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit words written - return ret.first; -} -simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - return convert_utf16le_to_utf8(buf, len, utf8_output); + return std::make_pair(result(error_code::SUCCESS, buf - start), reinterpret_cast(utf16_output)); } +/* end file src/arm64/arm_convert_utf32_to_utf16.cpp */ +} // unnamed namespace +} // namespace arm64 +} // namespace simdutf +/* begin file src/generic/buf_block_reader.h */ +namespace simdutf { +namespace arm64 { +namespace { -simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - return convert_utf16be_to_utf8(buf, len, utf8_output); -} +// Walks through a buffer in block-sized increments, loading the last part with spaces +template +struct buf_block_reader { +public: + simdutf_really_inline buf_block_reader(const uint8_t *_buf, size_t _len); + simdutf_really_inline size_t block_index(); + simdutf_really_inline bool has_full_block() const; + simdutf_really_inline const uint8_t *full_block() const; + /** + * Get the last block, padded with spaces. + * + * There will always be a last block, with at least 1 byte, unless len == 0 (in which case this + * function fills the buffer with spaces and returns 0. In particular, if len == STEP_SIZE there + * will be 0 full_blocks and 1 remainder block with STEP_SIZE bytes and no spaces for padding. + * + * @return the number of effective characters in the last block. + */ + simdutf_really_inline size_t get_remainder(uint8_t *dst) const; + simdutf_really_inline void advance(); +private: + const uint8_t *buf; + const size_t len; + const size_t lenminusstep; + size_t idx; +}; -simdutf_warn_unused size_t implementation::convert_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) const noexcept { - std::pair ret = arm_convert_utf32_to_utf8(buf, len, utf8_output); - if (ret.first == nullptr) { return 0; } - size_t saved_bytes = ret.second - utf8_output; - if (ret.first != buf + len) { - const size_t scalar_saved_bytes = scalar::utf32_to_utf8::convert( - ret.first, len - (ret.first - buf), ret.second); - if (scalar_saved_bytes == 0) { return 0; } - saved_bytes += scalar_saved_bytes; +// Routines to print masks and text for debugging bitmask operations +simdutf_unused static char * format_input_text_64(const uint8_t *text) { + static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); + for (size_t i=0; i); i++) { + buf[i] = int8_t(text[i]) < ' ' ? '_' : int8_t(text[i]); } - return saved_bytes; + buf[sizeof(simd8x64)] = '\0'; + return buf; } -simdutf_warn_unused result implementation::convert_utf32_to_utf8_with_errors(const char32_t* buf, size_t len, char* utf8_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished - std::pair ret = arm_convert_utf32_to_utf8_with_errors(buf, len, utf8_output); - if (ret.first.count != len) { - result scalar_res = scalar::utf32_to_utf8::convert_with_errors( - buf + ret.first.count, len - ret.first.count, ret.second); - if (scalar_res.error) { - scalar_res.count += ret.first.count; - return scalar_res; - } else { - ret.second += scalar_res.count; - } +// Routines to print masks and text for debugging bitmask operations +simdutf_unused static char * format_input_text(const simd8x64& in) { + static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] < ' ') { buf[i] = '_'; } } - ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit words written - return ret.first; + buf[sizeof(simd8x64)] = '\0'; + return buf; } -simdutf_warn_unused size_t implementation::convert_utf16le_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - std::pair ret = arm_convert_utf16_to_utf32(buf, len, utf32_output); - if (ret.first == nullptr) { return 0; } - size_t saved_bytes = ret.second - utf32_output; - if (ret.first != buf + len) { - const size_t scalar_saved_bytes = scalar::utf16_to_utf32::convert( - ret.first, len - (ret.first - buf), ret.second); - if (scalar_saved_bytes == 0) { return 0; } - saved_bytes += scalar_saved_bytes; +simdutf_unused static char * format_mask(uint64_t mask) { + static char *buf = reinterpret_cast(malloc(64 + 1)); + for (size_t i=0; i<64; i++) { + buf[i] = (mask & (size_t(1) << i)) ? 'X' : ' '; } - return saved_bytes; + buf[64] = '\0'; + return buf; } -simdutf_warn_unused size_t implementation::convert_utf16be_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - std::pair ret = arm_convert_utf16_to_utf32(buf, len, utf32_output); - if (ret.first == nullptr) { return 0; } - size_t saved_bytes = ret.second - utf32_output; - if (ret.first != buf + len) { - const size_t scalar_saved_bytes = scalar::utf16_to_utf32::convert( - ret.first, len - (ret.first - buf), ret.second); - if (scalar_saved_bytes == 0) { return 0; } - saved_bytes += scalar_saved_bytes; - } - return saved_bytes; -} +template +simdutf_really_inline buf_block_reader::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {} -simdutf_warn_unused result implementation::convert_utf16le_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished - std::pair ret = arm_convert_utf16_to_utf32_with_errors(buf, len, utf32_output); - if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count - if (ret.first.count != len) { // All good so far, but not finished - result scalar_res = scalar::utf16_to_utf32::convert_with_errors( - buf + ret.first.count, len - ret.first.count, ret.second); - if (scalar_res.error) { - scalar_res.count += ret.first.count; - return scalar_res; - } else { - ret.second += scalar_res.count; - } - } - ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit words written - return ret.first; -} +template +simdutf_really_inline size_t buf_block_reader::block_index() { return idx; } -simdutf_warn_unused result implementation::convert_utf16be_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished - std::pair ret = arm_convert_utf16_to_utf32_with_errors(buf, len, utf32_output); - if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count - if (ret.first.count != len) { // All good so far, but not finished - result scalar_res = scalar::utf16_to_utf32::convert_with_errors( - buf + ret.first.count, len - ret.first.count, ret.second); - if (scalar_res.error) { - scalar_res.count += ret.first.count; - return scalar_res; - } else { - ret.second += scalar_res.count; - } - } - ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit words written - return ret.first; +template +simdutf_really_inline bool buf_block_reader::has_full_block() const { + return idx < lenminusstep; } -simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) const noexcept { - return convert_utf32_to_utf8(buf, len, utf8_output); +template +simdutf_really_inline const uint8_t *buf_block_reader::full_block() const { + return &buf[idx]; } -simdutf_warn_unused size_t implementation::convert_utf32_to_utf16le(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - std::pair ret = arm_convert_utf32_to_utf16(buf, len, utf16_output); - if (ret.first == nullptr) { return 0; } - size_t saved_bytes = ret.second - utf16_output; - if (ret.first != buf + len) { - const size_t scalar_saved_bytes = scalar::utf32_to_utf16::convert( - ret.first, len - (ret.first - buf), ret.second); - if (scalar_saved_bytes == 0) { return 0; } - saved_bytes += scalar_saved_bytes; - } - return saved_bytes; +template +simdutf_really_inline size_t buf_block_reader::get_remainder(uint8_t *dst) const { + if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers + std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once. + std::memcpy(dst, buf + idx, len - idx); + return len - idx; } -simdutf_warn_unused size_t implementation::convert_utf32_to_utf16be(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - std::pair ret = arm_convert_utf32_to_utf16(buf, len, utf16_output); - if (ret.first == nullptr) { return 0; } - size_t saved_bytes = ret.second - utf16_output; - if (ret.first != buf + len) { - const size_t scalar_saved_bytes = scalar::utf32_to_utf16::convert( - ret.first, len - (ret.first - buf), ret.second); - if (scalar_saved_bytes == 0) { return 0; } - saved_bytes += scalar_saved_bytes; - } - return saved_bytes; +template +simdutf_really_inline void buf_block_reader::advance() { + idx += STEP_SIZE; } -simdutf_warn_unused result implementation::convert_utf32_to_utf16le_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished - std::pair ret = arm_convert_utf32_to_utf16_with_errors(buf, len, utf16_output); - if (ret.first.count != len) { - result scalar_res = scalar::utf32_to_utf16::convert_with_errors( - buf + ret.first.count, len - ret.first.count, ret.second); - if (scalar_res.error) { - scalar_res.count += ret.first.count; - return scalar_res; - } else { - ret.second += scalar_res.count; - } - } - ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit words written - return ret.first; -} +} // unnamed namespace +} // namespace arm64 +} // namespace simdutf +/* end file src/generic/buf_block_reader.h */ +/* begin file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ +namespace simdutf { +namespace arm64 { +namespace { +namespace utf8_validation { -simdutf_warn_unused result implementation::convert_utf32_to_utf16be_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished - std::pair ret = arm_convert_utf32_to_utf16_with_errors(buf, len, utf16_output); - if (ret.first.count != len) { - result scalar_res = scalar::utf32_to_utf16::convert_with_errors( - buf + ret.first.count, len - ret.first.count, ret.second); - if (scalar_res.error) { - scalar_res.count += ret.first.count; - return scalar_res; - } else { - ret.second += scalar_res.count; - } - } - ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit words written - return ret.first; -} +using namespace simd; -simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf16le(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - return convert_utf32_to_utf16le(buf, len, utf16_output); -} + simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) +// Bit 1 = Too Long (ASCII followed by continuation) +// Bit 2 = Overlong 3-byte +// Bit 4 = Surrogate +// Bit 5 = Overlong 2-byte +// Bit 7 = Two Continuations + constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ + // 11______ 11______ + constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ + constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ + constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ + constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ + constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ + constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ + // 11110100 101_____ + // 11110101 1001____ + // 11110101 101_____ + // 1111011_ 1001____ + // 1111011_ 101_____ + // 11111___ 1001____ + // 11111___ 101_____ + constexpr const uint8_t TOO_LARGE_1000 = 1<<6; + // 11110101 1000____ + // 1111011_ 1000____ + // 11111___ 1000____ + constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ -simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf16be(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - return convert_utf32_to_utf16be(buf, len, utf16_output); -} + const simd8 byte_1_high = prev1.shr<4>().lookup_16( + // 0_______ ________ + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + // 10______ ________ + TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, + // 1100____ ________ + TOO_SHORT | OVERLONG_2, + // 1101____ ________ + TOO_SHORT, + // 1110____ ________ + TOO_SHORT | OVERLONG_3 | SURROGATE, + // 1111____ ________ + TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + ); + constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . + const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( + // ____0000 ________ + CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, + // ____0001 ________ + CARRY | OVERLONG_2, + // ____001_ ________ + CARRY, + CARRY, -simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - return convert_utf16le_to_utf32(buf, len, utf32_output); -} + // ____0100 ________ + CARRY | TOO_LARGE, + // ____0101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____011_ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, -simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - return convert_utf16be_to_utf32(buf, len, utf32_output); -} + // ____1___ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____1101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000 + ); + const simd8 byte_2_high = input.shr<4>().lookup_16( + // ________ 0_______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, -void implementation::change_endianness_utf16(const char16_t * input, size_t length, char16_t * output) const noexcept { - utf16::change_endianness_utf16(input, length, output); -} + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, -simdutf_warn_unused size_t implementation::count_utf16le(const char16_t * input, size_t length) const noexcept { - return utf16::count_code_points(input, length); -} + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, + const simd8 prev_input, const simd8 sc) { + simd8 prev2 = input.prev<2>(prev_input); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; + } -simdutf_warn_unused size_t implementation::count_utf16be(const char16_t * input, size_t length) const noexcept { - return utf16::count_code_points(input, length); -} + // + // Return nonzero if there are incomplete multibyte characters at the end of the block: + // e.g. if there is a 4-byte character, but it's 3 bytes from the end. + // + simdutf_really_inline simd8 is_incomplete(const simd8 input) { + // If the previous input's last 3 bytes match this, they're too short (they ended at EOF): + // ... 1111____ 111_____ 11______ + static const uint8_t max_array[32] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0b11110000u-1, 0b11100000u-1, 0b11000000u-1 + }; + const simd8 max_value(&max_array[sizeof(max_array)-sizeof(simd8)]); + return input.gt_bits(max_value); + } -simdutf_warn_unused size_t implementation::count_utf8(const char * input, size_t length) const noexcept { - return utf8::count_code_points(input, length); -} + struct utf8_checker { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; + // The last input we received + simd8 prev_input_block; + // Whether the last input we received was incomplete (used for ASCII fast path) + simd8 prev_incomplete; -simdutf_warn_unused size_t implementation::utf8_length_from_utf16le(const char16_t * input, size_t length) const noexcept { - return utf16::utf8_length_from_utf16(input, length); -} + // + // Check whether the current bytes are valid UTF-8. + // + simdutf_really_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + simd8 sc = check_special_cases(input, prev1); + this->error |= check_multibyte_lengths(input, prev_input, sc); + } -simdutf_warn_unused size_t implementation::utf8_length_from_utf16be(const char16_t * input, size_t length) const noexcept { - return utf16::utf8_length_from_utf16(input, length); -} + // The only problem that can happen at EOF is that a multibyte character is too short + // or a byte value too large in the last bytes: check_special_cases only checks for bytes + // too large in the first of two bytes. + simdutf_really_inline void check_eof() { + // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't + // possibly finish them. + this->error |= this->prev_incomplete; + } -simdutf_warn_unused size_t implementation::utf32_length_from_utf16le(const char16_t * input, size_t length) const noexcept { - return utf16::utf32_length_from_utf16(input, length); -} + simdutf_really_inline void check_next_input(const simd8x64& input) { + if(simdutf_likely(is_ascii(input))) { + this->error |= this->prev_incomplete; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + this->prev_incomplete = is_incomplete(input.chunks[simd8x64::NUM_CHUNKS-1]); + this->prev_input_block = input.chunks[simd8x64::NUM_CHUNKS-1]; -simdutf_warn_unused size_t implementation::utf32_length_from_utf16be(const char16_t * input, size_t length) const noexcept { - return utf16::utf32_length_from_utf16(input, length); -} + } + } -simdutf_warn_unused size_t implementation::utf16_length_from_utf8(const char * input, size_t length) const noexcept { - return utf8::utf16_length_from_utf8(input, length); -} + // do not forget to call check_eof! + simdutf_really_inline bool errors() const { + return this->error.any_bits_set_anywhere(); + } -simdutf_warn_unused size_t implementation::utf8_length_from_utf32(const char32_t * input, size_t length) const noexcept { - const uint32x4_t v_7f = vmovq_n_u32((uint32_t)0x7f); - const uint32x4_t v_7ff = vmovq_n_u32((uint32_t)0x7ff); - const uint32x4_t v_ffff = vmovq_n_u32((uint32_t)0xffff); - const uint32x4_t v_1 = vmovq_n_u32((uint32_t)0x1); - size_t pos = 0; - size_t count = 0; - for(;pos + 4 <= length; pos += 4) { - uint32x4_t in = vld1q_u32(reinterpret_cast(input + pos)); - const uint32x4_t ascii_bytes_bytemask = vcleq_u32(in, v_7f); - const uint32x4_t one_two_bytes_bytemask = vcleq_u32(in, v_7ff); - const uint32x4_t two_bytes_bytemask = veorq_u32(one_two_bytes_bytemask, ascii_bytes_bytemask); - const uint32x4_t three_bytes_bytemask = veorq_u32(vcleq_u32(in, v_ffff), one_two_bytes_bytemask); + }; // struct utf8_checker +} // namespace utf8_validation - const uint16x8_t reduced_ascii_bytes_bytemask = vreinterpretq_u16_u32(vandq_u32(ascii_bytes_bytemask, v_1)); - const uint16x8_t reduced_two_bytes_bytemask = vreinterpretq_u16_u32(vandq_u32(two_bytes_bytemask, v_1)); - const uint16x8_t reduced_three_bytes_bytemask = vreinterpretq_u16_u32(vandq_u32(three_bytes_bytemask, v_1)); +using utf8_validation::utf8_checker; - const uint16x8_t compressed_bytemask0 = vpaddq_u16(reduced_ascii_bytes_bytemask, reduced_two_bytes_bytemask); - const uint16x8_t compressed_bytemask1 = vpaddq_u16(reduced_three_bytes_bytemask, reduced_three_bytes_bytemask); +} // unnamed namespace +} // namespace arm64 +} // namespace simdutf +/* end file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ +/* begin file src/generic/utf8_validation/utf8_validator.h */ +namespace simdutf { +namespace arm64 { +namespace { +namespace utf8_validation { - size_t ascii_count = count_ones(vgetq_lane_u64(vreinterpretq_u64_u16(compressed_bytemask0), 0)); - size_t two_bytes_count = count_ones(vgetq_lane_u64(vreinterpretq_u64_u16(compressed_bytemask0), 1)); - size_t three_bytes_count = count_ones(vgetq_lane_u64(vreinterpretq_u64_u16(compressed_bytemask1), 0)); - - count += 16 - 3*ascii_count - 2*two_bytes_count - three_bytes_count; - } - return count + scalar::utf32::utf8_length_from_utf32(input + pos, length - pos); +/** + * Validates that the string is actual UTF-8. + */ +template +bool generic_validate_utf8(const uint8_t * input, size_t length) { + checker c{}; + buf_block_reader<64> reader(input, length); + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + c.check_next_input(in); + reader.advance(); + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + c.check_next_input(in); + reader.advance(); + c.check_eof(); + return !c.errors(); } -simdutf_warn_unused size_t implementation::utf16_length_from_utf32(const char32_t * input, size_t length) const noexcept { - const uint32x4_t v_ffff = vmovq_n_u32((uint32_t)0xffff); - const uint32x4_t v_1 = vmovq_n_u32((uint32_t)0x1); - size_t pos = 0; - size_t count = 0; - for(;pos + 4 <= length; pos += 4) { - uint32x4_t in = vld1q_u32(reinterpret_cast(input + pos)); - const uint32x4_t surrogate_bytemask = vcgtq_u32(in, v_ffff); - const uint16x8_t reduced_bytemask = vreinterpretq_u16_u32(vandq_u32(surrogate_bytemask, v_1)); - const uint16x8_t compressed_bytemask = vpaddq_u16(reduced_bytemask, reduced_bytemask); - size_t surrogate_count = count_ones(vgetq_lane_u64(vreinterpretq_u64_u16(compressed_bytemask), 0)); - count += 4 + surrogate_count; - } - return count + scalar::utf32::utf16_length_from_utf32(input + pos, length - pos); +bool generic_validate_utf8(const char * input, size_t length) { + return generic_validate_utf8(reinterpret_cast(input),length); } -simdutf_warn_unused size_t implementation::utf32_length_from_utf8(const char * input, size_t length) const noexcept { - return utf8::utf32_length_from_utf8(input, length); +/** + * Validates that the string is actual UTF-8 and stops on errors. + */ +template +result generic_validate_utf8_with_errors(const uint8_t * input, size_t length) { + checker c{}; + buf_block_reader<64> reader(input, length); + size_t count{0}; + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + c.check_next_input(in); + if(c.errors()) { + if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk + result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input + count), length - count); + res.count += count; + return res; + } + reader.advance(); + count += 64; + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + c.check_next_input(in); + reader.advance(); + c.check_eof(); + if (c.errors()) { + if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk + result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input) + count, length - count); + res.count += count; + return res; + } else { + return result(error_code::SUCCESS, length); + } } -} // namespace arm64 -} // namespace simdutf - -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/arm64/end.h -/* begin file src/simdutf/arm64/end.h */ -/* end file src/simdutf/arm64/end.h */ -/* end file src/arm64/implementation.cpp */ -#endif -#if SIMDUTF_IMPLEMENTATION_FALLBACK -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=fallback/implementation.cpp -/* begin file src/fallback/implementation.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/fallback/begin.h -/* begin file src/simdutf/fallback/begin.h */ -// redefining SIMDUTF_IMPLEMENTATION to "fallback" -// #define SIMDUTF_IMPLEMENTATION fallback -/* end file src/simdutf/fallback/begin.h */ - - - - - +result generic_validate_utf8_with_errors(const char * input, size_t length) { + return generic_validate_utf8_with_errors(reinterpret_cast(input),length); +} +template +bool generic_validate_ascii(const uint8_t * input, size_t length) { + buf_block_reader<64> reader(input, length); + uint8_t blocks[64]{}; + simd::simd8x64 running_or(blocks); + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + running_or |= in; + reader.advance(); + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + running_or |= in; + return running_or.is_ascii(); +} +bool generic_validate_ascii(const char * input, size_t length) { + return generic_validate_ascii(reinterpret_cast(input),length); +} -namespace simdutf { -namespace fallback { +template +result generic_validate_ascii_with_errors(const uint8_t * input, size_t length) { + buf_block_reader<64> reader(input, length); + size_t count{0}; + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + if (!in.is_ascii()) { + result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); + return result(res.error, count + res.count); + } + reader.advance(); -simdutf_warn_unused int implementation::detect_encodings(const char * input, size_t length) const noexcept { - // If there is a BOM, then we trust it. - auto bom_encoding = simdutf::BOM::check_bom(input, length); - if(bom_encoding != encoding_type::unspecified) { return bom_encoding; } - int out = 0; - if(validate_utf8(input, length)) { out |= encoding_type::UTF8; } - if((length % 2) == 0) { - if(validate_utf16le(reinterpret_cast(input), length/2)) { out |= encoding_type::UTF16_LE; } + count += 64; } - if((length % 4) == 0) { - if(validate_utf32(reinterpret_cast(input), length/4)) { out |= encoding_type::UTF32_LE; } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + if (!in.is_ascii()) { + result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); + return result(res.error, count + res.count); + } else { + return result(error_code::SUCCESS, length); } - - return out; -} - -simdutf_warn_unused bool implementation::validate_utf8(const char *buf, size_t len) const noexcept { - return scalar::utf8::validate(buf, len); } -simdutf_warn_unused result implementation::validate_utf8_with_errors(const char *buf, size_t len) const noexcept { - return scalar::utf8::validate_with_errors(buf, len); +result generic_validate_ascii_with_errors(const char * input, size_t length) { + return generic_validate_ascii_with_errors(reinterpret_cast(input),length); } -simdutf_warn_unused bool implementation::validate_ascii(const char *buf, size_t len) const noexcept { - return scalar::ascii::validate(buf, len); -} +} // namespace utf8_validation +} // unnamed namespace +} // namespace arm64 +} // namespace simdutf +/* end file src/generic/utf8_validation/utf8_validator.h */ +// transcoding from UTF-8 to UTF-16 +/* begin file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ -simdutf_warn_unused result implementation::validate_ascii_with_errors(const char *buf, size_t len) const noexcept { - return scalar::ascii::validate_with_errors(buf, len); -} -simdutf_warn_unused bool implementation::validate_utf16le(const char16_t *buf, size_t len) const noexcept { - return scalar::utf16::validate(buf, len); -} +namespace simdutf { +namespace arm64 { +namespace { +namespace utf8_to_utf16 { -simdutf_warn_unused bool implementation::validate_utf16be(const char16_t *buf, size_t len) const noexcept { - return scalar::utf16::validate(buf, len); -} +using namespace simd; -simdutf_warn_unused result implementation::validate_utf16le_with_errors(const char16_t *buf, size_t len) const noexcept { - return scalar::utf16::validate_with_errors(buf, len); +template +simdutf_warn_unused size_t convert_valid(const char* input, size_t size, + char16_t* utf16_output) noexcept { + // The implementation is not specific to haswell and should be moved to the generic directory. + size_t pos = 0; + char16_t* start{utf16_output}; + const size_t safety_margin = 16; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + // this loop could be unrolled further. For example, we could process the mask + // far more than 64 bytes. + simd8x64 in(reinterpret_cast(input + pos)); + if(in.is_ascii()) { + in.store_ascii_as_utf16(utf16_output); + utf16_output += 64; + pos += 64; + } else { + // Slow path. We hope that the compiler will recognize that this is a slow path. + // Anything that is not a continuation mask is a 'leading byte', that is, the + // start of a new code point. + uint64_t utf8_continuation_mask = in.lt(-65 + 1); + // -65 is 0b10111111 in two-complement's, so largest possible continuation byte + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + // The *start* of code points is not so useful, rather, we want the *end* of code points. + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times when using solely + // the slow/regular path, and at least four times if there are fast paths. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + // + // Thus we may allow convert_masked_utf8_to_utf16 to process + // more bytes at a time under a fast-path mode where 16 bytes + // are consumed at once (e.g., when encountering ASCII). + size_t consumed = convert_masked_utf8_to_utf16(input + pos, + utf8_end_of_code_point_mask, utf16_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + utf16_output += scalar::utf8_to_utf16::convert_valid(input + pos, size - pos, utf16_output); + return utf16_output - start; } -simdutf_warn_unused result implementation::validate_utf16be_with_errors(const char16_t *buf, size_t len) const noexcept { - return scalar::utf16::validate_with_errors(buf, len); -} +} // namespace utf8_to_utf16 +} // unnamed namespace +} // namespace arm64 +} // namespace simdutf +/* end file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ +/* begin file src/generic/utf8_to_utf16/utf8_to_utf16.h */ -simdutf_warn_unused bool implementation::validate_utf32(const char32_t *buf, size_t len) const noexcept { - return scalar::utf32::validate(buf, len); -} -simdutf_warn_unused result implementation::validate_utf32_with_errors(const char32_t *buf, size_t len) const noexcept { - return scalar::utf32::validate_with_errors(buf, len); -} +namespace simdutf { +namespace arm64 { +namespace { +namespace utf8_to_utf16 { +using namespace simd; -simdutf_warn_unused size_t implementation::convert_utf8_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf8_to_utf16::convert(buf, len, utf16_output); -} -simdutf_warn_unused size_t implementation::convert_utf8_to_utf16be(const char* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf8_to_utf16::convert(buf, len, utf16_output); -} - -simdutf_warn_unused result implementation::convert_utf8_to_utf16le_with_errors(const char* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf8_to_utf16::convert_with_errors(buf, len, utf16_output); -} - -simdutf_warn_unused result implementation::convert_utf8_to_utf16be_with_errors(const char* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf8_to_utf16::convert_with_errors(buf, len, utf16_output); -} - -simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf8_to_utf16::convert_valid(buf, len, utf16_output); -} - -simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16be(const char* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf8_to_utf16::convert_valid(buf, len, utf16_output); -} - -simdutf_warn_unused size_t implementation::convert_utf8_to_utf32(const char* buf, size_t len, char32_t* utf32_output) const noexcept { - return scalar::utf8_to_utf32::convert(buf, len, utf32_output); -} - -simdutf_warn_unused result implementation::convert_utf8_to_utf32_with_errors(const char* buf, size_t len, char32_t* utf32_output) const noexcept { - return scalar::utf8_to_utf32::convert_with_errors(buf, len, utf32_output); -} - -simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf32(const char* input, size_t size, - char32_t* utf32_output) const noexcept { - return scalar::utf8_to_utf32::convert_valid(input, size, utf32_output); -} - -simdutf_warn_unused size_t implementation::convert_utf16le_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - return scalar::utf16_to_utf8::convert(buf, len, utf8_output); -} - -simdutf_warn_unused size_t implementation::convert_utf16be_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - return scalar::utf16_to_utf8::convert(buf, len, utf8_output); -} - -simdutf_warn_unused result implementation::convert_utf16le_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - return scalar::utf16_to_utf8::convert_with_errors(buf, len, utf8_output); -} - -simdutf_warn_unused result implementation::convert_utf16be_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - return scalar::utf16_to_utf8::convert_with_errors(buf, len, utf8_output); -} - -simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - return scalar::utf16_to_utf8::convert_valid(buf, len, utf8_output); -} + simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) +// Bit 1 = Too Long (ASCII followed by continuation) +// Bit 2 = Overlong 3-byte +// Bit 4 = Surrogate +// Bit 5 = Overlong 2-byte +// Bit 7 = Two Continuations + constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ + // 11______ 11______ + constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ + constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ + constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ + constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ + constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ + constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ + // 11110100 101_____ + // 11110101 1001____ + // 11110101 101_____ + // 1111011_ 1001____ + // 1111011_ 101_____ + // 11111___ 1001____ + // 11111___ 101_____ + constexpr const uint8_t TOO_LARGE_1000 = 1<<6; + // 11110101 1000____ + // 1111011_ 1000____ + // 11111___ 1000____ + constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ -simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - return scalar::utf16_to_utf8::convert_valid(buf, len, utf8_output); -} + const simd8 byte_1_high = prev1.shr<4>().lookup_16( + // 0_______ ________ + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + // 10______ ________ + TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, + // 1100____ ________ + TOO_SHORT | OVERLONG_2, + // 1101____ ________ + TOO_SHORT, + // 1110____ ________ + TOO_SHORT | OVERLONG_3 | SURROGATE, + // 1111____ ________ + TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + ); + constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . + const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( + // ____0000 ________ + CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, + // ____0001 ________ + CARRY | OVERLONG_2, + // ____001_ ________ + CARRY, + CARRY, -simdutf_warn_unused size_t implementation::convert_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) const noexcept { - return scalar::utf32_to_utf8::convert(buf, len, utf8_output); -} + // ____0100 ________ + CARRY | TOO_LARGE, + // ____0101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____011_ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, -simdutf_warn_unused result implementation::convert_utf32_to_utf8_with_errors(const char32_t* buf, size_t len, char* utf8_output) const noexcept { - return scalar::utf32_to_utf8::convert_with_errors(buf, len, utf8_output); -} + // ____1___ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____1101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000 + ); + const simd8 byte_2_high = input.shr<4>().lookup_16( + // ________ 0_______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, -simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) const noexcept { - return scalar::utf32_to_utf8::convert_valid(buf, len, utf8_output); -} + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, -simdutf_warn_unused size_t implementation::convert_utf32_to_utf16le(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf32_to_utf16::convert(buf, len, utf16_output); -} + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, + const simd8 prev_input, const simd8 sc) { + simd8 prev2 = input.prev<2>(prev_input); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; + } -simdutf_warn_unused size_t implementation::convert_utf32_to_utf16be(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf32_to_utf16::convert(buf, len, utf16_output); -} -simdutf_warn_unused result implementation::convert_utf32_to_utf16le_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf32_to_utf16::convert_with_errors(buf, len, utf16_output); -} + struct validating_transcoder { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; -simdutf_warn_unused result implementation::convert_utf32_to_utf16be_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf32_to_utf16::convert_with_errors(buf, len, utf16_output); -} + validating_transcoder() : error(uint8_t(0)) {} + // + // Check whether the current bytes are valid UTF-8. + // + simdutf_really_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + simd8 sc = check_special_cases(input, prev1); + this->error |= check_multibyte_lengths(input, prev_input, sc); + } -simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf16le(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf32_to_utf16::convert_valid(buf, len, utf16_output); -} -simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf16be(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - return scalar::utf32_to_utf16::convert_valid(buf, len, utf16_output); -} + template + simdutf_really_inline size_t convert(const char* in, size_t size, char16_t* utf16_output) { + size_t pos = 0; + char16_t* start{utf16_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); + } + // If the input is long enough, then we have that margin-1 is the eight last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store_ascii_as_utf16(utf16_output); + utf16_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + auto zero = simd8{uint8_t(0)}; + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_utf16(in + pos, + utf8_end_of_code_point_mask, utf16_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(errors()) { return 0; } + if(pos < size) { + size_t howmany = scalar::utf8_to_utf16::convert(in + pos, size - pos, utf16_output); + if(howmany == 0) { return 0; } + utf16_output += howmany; + } + return utf16_output - start; + } -simdutf_warn_unused size_t implementation::convert_utf16le_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - return scalar::utf16_to_utf32::convert(buf, len, utf32_output); -} - -simdutf_warn_unused size_t implementation::convert_utf16be_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - return scalar::utf16_to_utf32::convert(buf, len, utf32_output); -} - -simdutf_warn_unused result implementation::convert_utf16le_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - return scalar::utf16_to_utf32::convert_with_errors(buf, len, utf32_output); -} - -simdutf_warn_unused result implementation::convert_utf16be_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - return scalar::utf16_to_utf32::convert_with_errors(buf, len, utf32_output); -} - -simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - return scalar::utf16_to_utf32::convert_valid(buf, len, utf32_output); -} - -simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - return scalar::utf16_to_utf32::convert_valid(buf, len, utf32_output); -} - -void implementation::change_endianness_utf16(const char16_t * input, size_t length, char16_t * output) const noexcept { - scalar::utf16::change_endianness_utf16(input, length, output); -} - -simdutf_warn_unused size_t implementation::count_utf16le(const char16_t * input, size_t length) const noexcept { - return scalar::utf16::count_code_points(input, length); -} - -simdutf_warn_unused size_t implementation::count_utf16be(const char16_t * input, size_t length) const noexcept { - return scalar::utf16::count_code_points(input, length); -} - -simdutf_warn_unused size_t implementation::count_utf8(const char * input, size_t length) const noexcept { - return scalar::utf8::count_code_points(input, length); -} - -simdutf_warn_unused size_t implementation::utf8_length_from_utf16le(const char16_t * input, size_t length) const noexcept { - return scalar::utf16::utf8_length_from_utf16(input, length); -} + template + simdutf_really_inline result convert_with_errors(const char* in, size_t size, char16_t* utf16_output) { + size_t pos = 0; + char16_t* start{utf16_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); + } + // If the input is long enough, then we have that margin-1 is the eight last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store_ascii_as_utf16(utf16_output); + utf16_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + auto zero = simd8{uint8_t(0)}; + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + if (errors()) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + res.count += pos; + return res; + } + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_utf16(in + pos, + utf8_end_of_code_point_mask, utf16_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(errors()) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + res.count += pos; + return res; + } + if(pos < size) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + if (res.error) { // In case of error, we want the error position + res.count += pos; + return res; + } else { // In case of success, we want the number of word written + utf16_output += res.count; + } + } + return result(error_code::SUCCESS, utf16_output - start); + } -simdutf_warn_unused size_t implementation::utf8_length_from_utf16be(const char16_t * input, size_t length) const noexcept { - return scalar::utf16::utf8_length_from_utf16(input, length); -} + simdutf_really_inline bool errors() const { + return this->error.any_bits_set_anywhere(); + } -simdutf_warn_unused size_t implementation::utf32_length_from_utf16le(const char16_t * input, size_t length) const noexcept { - return scalar::utf16::utf32_length_from_utf16(input, length); -} + }; // struct utf8_checker +} // utf8_to_utf16 namespace +} // unnamed namespace +} // namespace arm64 +} // namespace simdutf +/* end file src/generic/utf8_to_utf16/utf8_to_utf16.h */ +// transcoding from UTF-8 to UTF-32 +/* begin file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ -simdutf_warn_unused size_t implementation::utf32_length_from_utf16be(const char16_t * input, size_t length) const noexcept { - return scalar::utf16::utf32_length_from_utf16(input, length); -} +namespace simdutf { +namespace arm64 { +namespace { +namespace utf8_to_utf32 { -simdutf_warn_unused size_t implementation::utf16_length_from_utf8(const char * input, size_t length) const noexcept { - return scalar::utf8::utf16_length_from_utf8(input, length); -} +using namespace simd; -simdutf_warn_unused size_t implementation::utf8_length_from_utf32(const char32_t * input, size_t length) const noexcept { - return scalar::utf32::utf8_length_from_utf32(input, length); -} -simdutf_warn_unused size_t implementation::utf16_length_from_utf32(const char32_t * input, size_t length) const noexcept { - return scalar::utf32::utf16_length_from_utf32(input, length); +simdutf_warn_unused size_t convert_valid(const char* input, size_t size, + char32_t* utf32_output) noexcept { + size_t pos = 0; + char32_t* start{utf32_output}; + const size_t safety_margin = 16; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 in(reinterpret_cast(input + pos)); + if(in.is_ascii()) { + in.store_ascii_as_utf32(utf32_output); + utf32_output += 64; + pos += 64; + } else { + // -65 is 0b10111111 in two-complement's, so largest possible continuation byte + uint64_t utf8_continuation_mask = in.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + size_t max_starting_point = (pos + 64) - 12; + while(pos < max_starting_point) { + size_t consumed = convert_masked_utf8_to_utf32(input + pos, + utf8_end_of_code_point_mask, utf32_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + } + } + utf32_output += scalar::utf8_to_utf32::convert_valid(input + pos, size - pos, utf32_output); + return utf32_output - start; } -simdutf_warn_unused size_t implementation::utf32_length_from_utf8(const char * input, size_t length) const noexcept { - return scalar::utf8::count_code_points(input, length); -} -} // namespace fallback +} // namespace utf8_to_utf32 +} // unnamed namespace +} // namespace arm64 } // namespace simdutf +/* end file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ +/* begin file src/generic/utf8_to_utf32/utf8_to_utf32.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/fallback/end.h -/* begin file src/simdutf/fallback/end.h */ -/* end file src/simdutf/fallback/end.h */ -/* end file src/fallback/implementation.cpp */ -#endif -#if SIMDUTF_IMPLEMENTATION_ICELAKE -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/implementation.cpp -/* begin file src/icelake/implementation.cpp */ - - -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/icelake/begin.h -/* begin file src/simdutf/icelake/begin.h */ -// redefining SIMDUTF_IMPLEMENTATION to "icelake" -// #define SIMDUTF_IMPLEMENTATION icelake - -#if SIMDUTF_CAN_ALWAYS_RUN_ICELAKE -// nothing needed. -#else -SIMDUTF_TARGET_ICELAKE -#endif -#if SIMDUTF_GCC11ORMORE // workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105593 -SIMDUTF_DISABLE_GCC_WARNING(-Wmaybe-uninitialized) -#endif // end of workaround -/* end file src/simdutf/icelake/begin.h */ namespace simdutf { -namespace icelake { +namespace arm64 { namespace { -#ifndef SIMDUTF_ICELAKE_H -#error "icelake.h must be included" -#endif -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/icelake_utf8_common.inl.cpp -/* begin file src/icelake/icelake_utf8_common.inl.cpp */ -// Common procedures for both validating and non-validating conversions from UTF-8. -enum block_processing_mode { SIMDUTF_FULL, SIMDUTF_TAIL}; - -using utf8_to_utf16_result = std::pair; -using utf8_to_utf32_result = std::pair; - -/* - process_block_utf8_to_utf16 converts up to 64 bytes from 'in' from UTF-8 - to UTF-16. When tail = SIMDUTF_FULL, then the full input buffer (64 bytes) - might be used. When tail = SIMDUTF_TAIL, we take into account 'gap' which - indicates how many input bytes are relevant. +namespace utf8_to_utf32 { +using namespace simd; - Returns true when the result is correct, otherwise it returns false. - The provided in and out pointers are advanced according to how many input - bytes have been processed, upon success. -*/ -template -simdutf_really_inline bool process_block_utf8_to_utf16(const char *&in, char16_t *&out, size_t gap) { - // constants - __m512i mask_identity = _mm512_set_epi8(63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); - __m512i mask_c0c0c0c0 = _mm512_set1_epi32(0xc0c0c0c0); - __m512i mask_80808080 = _mm512_set1_epi32(0x80808080); - __m512i mask_f0f0f0f0 = _mm512_set1_epi32(0xf0f0f0f0); - __m512i mask_dfdfdfdf_tail = _mm512_set_epi64(0xffffdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf); - __m512i mask_c2c2c2c2 = _mm512_set1_epi32(0xc2c2c2c2); - __m512i mask_ffffffff = _mm512_set1_epi32(0xffffffff); - __m512i mask_d7c0d7c0 = _mm512_set1_epi32(0xd7c0d7c0); - __m512i mask_dc00dc00 = _mm512_set1_epi32(0xdc00dc00); - __m512i byteflip = _mm512_setr_epi64( - 0x0607040502030001, - 0x0e0f0c0d0a0b0809, - 0x0607040502030001, - 0x0e0f0c0d0a0b0809, - 0x0607040502030001, - 0x0e0f0c0d0a0b0809, - 0x0607040502030001, - 0x0e0f0c0d0a0b0809 - ); - // Note that 'tail' is a compile-time constant ! - __mmask64 b = (tail == SIMDUTF_FULL) ? 0xFFFFFFFFFFFFFFFF : (uint64_t(1) << gap) - 1; - __m512i input = (tail == SIMDUTF_FULL) ? _mm512_loadu_si512(in) : _mm512_maskz_loadu_epi8(b, in); - __mmask64 m1 = (tail == SIMDUTF_FULL) ? _mm512_cmplt_epu8_mask(input, mask_80808080) : _mm512_mask_cmplt_epu8_mask(b, input, mask_80808080); - if(_ktestc_mask64_u8(m1, b)) {// NOT(m1) AND b -- if all zeroes, then all ASCII - // alternatively, we could do 'if (m1 == b) { ' - if (tail == SIMDUTF_FULL) { - in += 64; // consumed 64 bytes - // we convert a full 64-byte block, writing 128 bytes. - __m512i input1 = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(input)); - if(big_endian) { input1 = _mm512_shuffle_epi8(input1, byteflip); } - _mm512_storeu_si512(out, input1); - out += 32; - __m512i input2 = _mm512_cvtepu8_epi16(_mm512_extracti64x4_epi64(input, 1)); - if(big_endian) { input2 = _mm512_shuffle_epi8(input2, byteflip); } - _mm512_storeu_si512(out, input2); - out += 32; - return true; // we are done - } else { - in += gap; - if (gap <= 32) { - __m512i input1 = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(input)); - if(big_endian) { input1 = _mm512_shuffle_epi8(input1, byteflip); } - _mm512_mask_storeu_epi16(out, __mmask32((uint64_t(1) << (gap)) - 1), input1); - out += gap; - } else { - __m512i input1 = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(input)); - if(big_endian) { input1 = _mm512_shuffle_epi8(input1, byteflip); } - _mm512_storeu_si512(out, input1); - out += 32; - __m512i input2 = _mm512_cvtepu8_epi16(_mm512_extracti64x4_epi64(input, 1)); - if(big_endian) { input2 = _mm512_shuffle_epi8(input2, byteflip); } - _mm512_mask_storeu_epi16(out, __mmask32((uint32_t(1) << (gap - 32)) - 1), input2); - out += gap - 32; - } - return true; // we are done - } - } - // classify characters further - __mmask64 m234 = _mm512_cmp_epu8_mask(mask_c0c0c0c0, input, - _MM_CMPINT_LE); // 0xc0 <= input, 2, 3, or 4 leading byte - __mmask64 m34 = _mm512_cmp_epu8_mask(mask_dfdfdfdf_tail, input, - _MM_CMPINT_LT); // 0xdf < input, 3 or 4 leading byte + simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) +// Bit 1 = Too Long (ASCII followed by continuation) +// Bit 2 = Overlong 3-byte +// Bit 4 = Surrogate +// Bit 5 = Overlong 2-byte +// Bit 7 = Two Continuations + constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ + // 11______ 11______ + constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ + constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ + constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ + constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ + constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ + constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ + // 11110100 101_____ + // 11110101 1001____ + // 11110101 101_____ + // 1111011_ 1001____ + // 1111011_ 101_____ + // 11111___ 1001____ + // 11111___ 101_____ + constexpr const uint8_t TOO_LARGE_1000 = 1<<6; + // 11110101 1000____ + // 1111011_ 1000____ + // 11111___ 1000____ + constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ - __mmask64 milltwobytes = _mm512_mask_cmp_epu8_mask(m234, input, mask_c2c2c2c2, - _MM_CMPINT_LT); // 0xc0 <= input < 0xc2 (illegal two byte sequence) - // Overlong 2-byte sequence - if (_ktestz_mask64_u8(milltwobytes, milltwobytes) == 0) { - // Overlong 2-byte sequence - return false; - } - if (_ktestz_mask64_u8(m34, m34) == 0) { - // We have a 3-byte sequence and/or a 2-byte sequence, or possibly even a 4-byte sequence! - __mmask64 m4 = _mm512_cmp_epu8_mask(input, mask_f0f0f0f0, - _MM_CMPINT_NLT); // 0xf0 <= zmm0 (4 byte start bytes) + const simd8 byte_1_high = prev1.shr<4>().lookup_16( + // 0_______ ________ + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + // 10______ ________ + TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, + // 1100____ ________ + TOO_SHORT | OVERLONG_2, + // 1101____ ________ + TOO_SHORT, + // 1110____ ________ + TOO_SHORT | OVERLONG_3 | SURROGATE, + // 1111____ ________ + TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + ); + constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . + const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( + // ____0000 ________ + CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, + // ____0001 ________ + CARRY | OVERLONG_2, + // ____001_ ________ + CARRY, + CARRY, - __mmask64 mask_not_ascii = (tail == SIMDUTF_FULL) ? _knot_mask64(m1) : _kand_mask64(_knot_mask64(m1), b); + // ____0100 ________ + CARRY | TOO_LARGE, + // ____0101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____011_ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, - __mmask64 mp1 = _kshiftli_mask64(m234, 1); - __mmask64 mp2 = _kshiftli_mask64(m34, 2); - // We could do it as follows... - // if (_kortestz_mask64_u8(m4,m4)) { // compute the bitwise OR of the 64-bit masks a and b and return 1 if all zeroes - // but GCC generates better code when we do: - if (m4 == 0) { // compute the bitwise OR of the 64-bit masks a and b and return 1 if all zeroes - // Fast path with 1,2,3 bytes - __mmask64 mc = _kor_mask64(mp1, mp2); // expected continuation bytes - __mmask64 m1234 = _kor_mask64(m1, m234); - // mismatched continuation bytes: - if (tail == SIMDUTF_FULL) { - __mmask64 xnormcm1234 = _kxnor_mask64(mc, m1234); // XNOR of mc and m1234 should be all zero if they differ - // the presence of a 1 bit indicates that they overlap. - // _kortestz_mask64_u8: compute the bitwise OR of 64-bit masksand return 1 if all zeroes. - if (!_kortestz_mask64_u8(xnormcm1234, xnormcm1234)) { return false; } - } else { - __mmask64 bxorm1234 = _kxor_mask64(b, m1234); - if (mc != bxorm1234) { return false; } - } - // mend: identifying the last bytes of each sequence to be decoded - __mmask64 mend = _kshiftri_mask64(m1234, 1); - if (tail != SIMDUTF_FULL) { - mend = _kor_mask64(mend, (uint64_t(1) << (gap - 1))); - } + // ____1___ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____1101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000 + ); + const simd8 byte_2_high = input.shr<4>().lookup_16( + // ________ 0_______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, - __m512i last_and_third = _mm512_maskz_compress_epi8(mend, mask_identity); - __m512i last_and_thirdu16 = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(last_and_third)); + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, + const simd8 prev_input, const simd8 sc) { + simd8 prev2 = input.prev<2>(prev_input); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; + } - __m512i nonasciitags = _mm512_maskz_mov_epi8(mask_not_ascii, mask_c0c0c0c0); // ASCII: 00000000 other: 11000000 - __m512i clearedbytes = _mm512_andnot_si512(nonasciitags, input); // high two bits cleared where not ASCII - __m512i lastbytes = _mm512_maskz_permutexvar_epi8(0x5555555555555555, last_and_thirdu16, - clearedbytes); // the last byte of each character - __mmask64 mask_before_non_ascii = _kshiftri_mask64(mask_not_ascii, 1); // bytes that precede non-ASCII bytes - __m512i indexofsecondlastbytes = _mm512_add_epi16(mask_ffffffff, last_and_thirdu16); // indices of the second last bytes - __m512i beforeasciibytes = _mm512_maskz_mov_epi8(mask_before_non_ascii, clearedbytes); - __m512i secondlastbytes = _mm512_maskz_permutexvar_epi8(0x5555555555555555, indexofsecondlastbytes, - beforeasciibytes); // the second last bytes (of two, three byte seq, - // surrogates) - secondlastbytes = _mm512_slli_epi16(secondlastbytes, 6); // shifted into position + struct validating_transcoder { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; - __m512i indexofthirdlastbytes = _mm512_add_epi16(mask_ffffffff, - indexofsecondlastbytes); // indices of the second last bytes - __m512i thirdlastbyte = _mm512_maskz_mov_epi8(m34, - clearedbytes); // only those that are the third last byte of a sequece - __m512i thirdlastbytes = _mm512_maskz_permutexvar_epi8(0x5555555555555555, indexofthirdlastbytes, - thirdlastbyte); // the third last bytes (of three byte sequences, hi - // surrogate) - thirdlastbytes = _mm512_slli_epi16(thirdlastbytes, 12); // shifted into position - __m512i Wout = _mm512_ternarylogic_epi32(lastbytes, secondlastbytes, thirdlastbytes, 254); - // the elements of Wout excluding the last element if it happens to be a high surrogate: + validating_transcoder() : error(uint8_t(0)) {} + // + // Check whether the current bytes are valid UTF-8. + // + simdutf_really_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + simd8 sc = check_special_cases(input, prev1); + this->error |= check_multibyte_lengths(input, prev_input, sc); + } - __mmask64 mprocessed = (tail == SIMDUTF_FULL) ? _pdep_u64(0xFFFFFFFF, mend) : _pdep_u64(0xFFFFFFFF, _kand_mask64(mend, b)); // we adjust mend at the end of the output. - // Encodings out of range... - { - // the location of 3-byte sequence start bytes in the input - __mmask64 m3 = m34 & (b ^ m4); - // words in Wout corresponding to 3-byte sequences. - __mmask32 M3 = __mmask32(_pext_u64(m3 << 2, mend)); - __m512i mask_08000800 = _mm512_set1_epi32(0x08000800); - __mmask32 Msmall800 = _mm512_mask_cmplt_epu16_mask(M3, Wout, mask_08000800); - __m512i mask_d800d800 = _mm512_set1_epi32(0xd800d800); - __m512i Moutminusd800 = _mm512_sub_epi16(Wout, mask_d800d800); - __mmask32 M3s = _mm512_mask_cmplt_epu16_mask(M3, Moutminusd800, mask_08000800); - if (_kor_mask32(Msmall800, M3s)) { return false; } + simdutf_really_inline size_t convert(const char* in, size_t size, char32_t* utf32_output) { + size_t pos = 0; + char32_t* start{utf32_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 4; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); } - int64_t nout = _mm_popcnt_u64(mprocessed); - in += 64 - _lzcnt_u64(mprocessed); - if(big_endian) { Wout = _mm512_shuffle_epi8(Wout, byteflip); } - _mm512_mask_storeu_epi16(out, __mmask32((uint64_t(1) << nout) - 1), Wout); - out += nout; - return true; // ok - } - // - // We have a 4-byte sequence, this is the general case. + // If the input is long enough, then we have that margin-1 is the fourth last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store_ascii_as_utf32(utf32_output); + utf32_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + auto zero = simd8{uint8_t(0)}; + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_utf32(in + pos, + utf8_end_of_code_point_mask, utf32_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(errors()) { return 0; } + if(pos < size) { + size_t howmany = scalar::utf8_to_utf32::convert(in + pos, size - pos, utf32_output); + if(howmany == 0) { return 0; } + utf32_output += howmany; + } + return utf32_output - start; + } + + simdutf_really_inline result convert_with_errors(const char* in, size_t size, char32_t* utf32_output) { + size_t pos = 0; + char32_t* start{utf32_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 4; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); + } + // If the input is long enough, then we have that margin-1 is the fourth last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store_ascii_as_utf32(utf32_output); + utf32_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + auto zero = simd8{uint8_t(0)}; + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + if (errors()) { + result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); + res.count += pos; + return res; + } + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_utf32(in + pos, + utf8_end_of_code_point_mask, utf32_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(errors()) { + result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); + res.count += pos; + return res; + } + if(pos < size) { + result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); + if (res.error) { // In case of error, we want the error position + res.count += pos; + return res; + } else { // In case of success, we want the number of word written + utf32_output += res.count; + } + } + return result(error_code::SUCCESS, utf32_output - start); + } + + simdutf_really_inline bool errors() const { + return this->error.any_bits_set_anywhere(); + } + + }; // struct utf8_checker +} // utf8_to_utf32 namespace +} // unnamed namespace +} // namespace arm64 +} // namespace simdutf +/* end file src/generic/utf8_to_utf32/utf8_to_utf32.h */ +// other functions +/* begin file src/generic/utf8.h */ + +namespace simdutf { +namespace arm64 { +namespace { +namespace utf8 { + +using namespace simd; + +simdutf_really_inline size_t count_code_points(const char* in, size_t size) { + size_t pos = 0; + size_t count = 0; + for(;pos + 64 <= size; pos += 64) { + simd8x64 input(reinterpret_cast(in + pos)); + uint64_t utf8_continuation_mask = input.gt(-65); + count += count_ones(utf8_continuation_mask); + } + return count + scalar::utf8::count_code_points(in + pos, size - pos); +} + +simdutf_really_inline size_t utf16_length_from_utf8(const char* in, size_t size) { + size_t pos = 0; + size_t count = 0; + // This algorithm could no doubt be improved! + for(;pos + 64 <= size; pos += 64) { + simd8x64 input(reinterpret_cast(in + pos)); + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + // We count one word for anything that is not a continuation (so + // leading bytes). + count += 64 - count_ones(utf8_continuation_mask); + int64_t utf8_4byte = input.gteq_unsigned(240); + count += count_ones(utf8_4byte); + } + return count + scalar::utf8::utf16_length_from_utf8(in + pos, size - pos); +} + + +simdutf_really_inline size_t utf32_length_from_utf8(const char* in, size_t size) { + return count_code_points(in, size); +} +} // utf8 namespace +} // unnamed namespace +} // namespace arm64 +} // namespace simdutf +/* end file src/generic/utf8.h */ +/* begin file src/generic/utf16.h */ +namespace simdutf { +namespace arm64 { +namespace { +namespace utf16 { + +template +simdutf_really_inline size_t count_code_points(const char16_t* in, size_t size) { + size_t pos = 0; + size_t count = 0; + for(;pos < size/32*32; pos += 32) { + simd16x32 input(reinterpret_cast(in + pos)); + if (!match_system(big_endian)) { input.swap_bytes(); } + uint64_t not_pair = input.not_in_range(0xDC00, 0xDFFF); + count += count_ones(not_pair) / 2; + } + return count + scalar::utf16::count_code_points(in + pos, size - pos); +} + +template +simdutf_really_inline size_t utf8_length_from_utf16(const char16_t* in, size_t size) { + size_t pos = 0; + size_t count = 0; + // This algorithm could no doubt be improved! + for(;pos < size/32*32; pos += 32) { + simd16x32 input(reinterpret_cast(in + pos)); + if (!match_system(big_endian)) { input.swap_bytes(); } + uint64_t ascii_mask = input.lteq(0x7F); + uint64_t twobyte_mask = input.lteq(0x7FF); + uint64_t not_pair_mask = input.not_in_range(0xD800, 0xDFFF); + + size_t ascii_count = count_ones(ascii_mask) / 2; + size_t twobyte_count = count_ones(twobyte_mask & ~ ascii_mask) / 2; + size_t threebyte_count = count_ones(not_pair_mask & ~ twobyte_mask) / 2; + size_t fourbyte_count = 32 - count_ones(not_pair_mask) / 2; + count += 2 * fourbyte_count + 3 * threebyte_count + 2 * twobyte_count + ascii_count; + } + return count + scalar::utf16::utf8_length_from_utf16(in + pos, size - pos); +} + +template +simdutf_really_inline size_t utf32_length_from_utf16(const char16_t* in, size_t size) { + return count_code_points(in, size); +} + +simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* output) { + size_t pos = 0; + + while (pos < size/32*32) { + simd16x32 input(reinterpret_cast(in + pos)); + input.swap_bytes(); + input.store(reinterpret_cast(output)); + pos += 32; + output += 32; + } + + scalar::utf16::change_endianness_utf16(in + pos, size - pos, output); +} + +} // utf16 +} // unnamed namespace +} // namespace arm64 +} // namespace simdutf +/* end file src/generic/utf16.h */ +// transcoding from UTF-8 to Latin 1 +/* begin file src/generic/utf8_to_latin1/utf8_to_latin1.h */ + + +namespace simdutf { +namespace arm64 { +namespace { +namespace utf8_to_latin1 { +using namespace simd; + + + simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// For UTF-8 to Latin 1, we can allow any ASCII character, and any continuation byte, +// but the non-ASCII leading bytes must be 0b11000011 or 0b11000010 and nothing else. +// +// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) +// Bit 1 = Too Long (ASCII followed by continuation) +// Bit 2 = Overlong 3-byte +// Bit 4 = Surrogate +// Bit 5 = Overlong 2-byte +// Bit 7 = Two Continuations + constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ + // 11______ 11______ + constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ + constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ + constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ + constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ + constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ + constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ + // 11110100 101_____ + // 11110101 1001____ + // 11110101 101_____ + // 1111011_ 1001____ + // 1111011_ 101_____ + // 11111___ 1001____ + // 11111___ 101_____ + constexpr const uint8_t TOO_LARGE_1000 = 1<<6; + // 11110101 1000____ + // 1111011_ 1000____ + // 11111___ 1000____ + constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + constexpr const uint8_t FORBIDDEN = 0xff; + + const simd8 byte_1_high = prev1.shr<4>().lookup_16( + // 0_______ ________ + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + // 10______ ________ + TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, + // 1100____ ________ + TOO_SHORT | OVERLONG_2, + // 1101____ ________ + FORBIDDEN, + // 1110____ ________ + FORBIDDEN, + // 1111____ ________ + FORBIDDEN + ); + constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . + const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( + // ____0000 ________ + CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, + // ____0001 ________ + CARRY | OVERLONG_2, + // ____001_ ________ + CARRY, + CARRY, + + // ____0100 ________ + FORBIDDEN, + // ____0101 ________ + FORBIDDEN, + // ____011_ ________ + FORBIDDEN, + FORBIDDEN, + + // ____1___ ________ + FORBIDDEN, + FORBIDDEN, + FORBIDDEN, + FORBIDDEN, + FORBIDDEN, + // ____1101 ________ + FORBIDDEN, + FORBIDDEN, + FORBIDDEN + ); + const simd8 byte_2_high = input.shr<4>().lookup_16( + // ________ 0_______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + + struct validating_transcoder { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; + + validating_transcoder() : error(uint8_t(0)) {} + // + // Check whether the current bytes are valid UTF-8. + // + simdutf_really_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + this->error |= check_special_cases(input, prev1); + } + + + simdutf_really_inline size_t convert(const char* in, size_t size, char* latin1_output) { + size_t pos = 0; + char* start{latin1_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_latin1. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); //twos complement of -65 is 1011 1111 ... + } + // If the input is long enough, then we have that margin-1 is the eight last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store((int8_t*)latin1_output); + latin1_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + auto zero = simd8{uint8_t(0)}; + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + uint64_t utf8_continuation_mask = input.lt(-65 + 1); // -64 is 1100 0000 in twos complement. Note: in this case, we also have ASCII to account for. + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_latin1(in + pos, + utf8_end_of_code_point_mask, latin1_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(errors()) { return 0; } + if(pos < size) { + size_t howmany = scalar::utf8_to_latin1::convert(in + pos, size - pos, latin1_output); + if(howmany == 0) { return 0; } + latin1_output += howmany; + } + return latin1_output - start; + } + + simdutf_really_inline result convert_with_errors(const char* in, size_t size, char* latin1_output) { + size_t pos = 0; + char* start{latin1_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_latin1. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); + } + // If the input is long enough, then we have that margin-1 is the eight last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store((int8_t*)latin1_output); + latin1_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + auto zero = simd8{uint8_t(0)}; + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + if (errors()) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output); + res.count += pos; + return res; + } + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_latin1(in + pos, + utf8_end_of_code_point_mask, latin1_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(errors()) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output); + res.count += pos; + return res; + } + if(pos < size) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output); + if (res.error) { // In case of error, we want the error position + res.count += pos; + return res; + } else { // In case of success, we want the number of word written + latin1_output += res.count; + } + } + return result(error_code::SUCCESS, latin1_output - start); + } + + simdutf_really_inline bool errors() const { + return this->error.any_bits_set_anywhere(); + } + + }; // struct utf8_checker +} // utf8_to_latin1 namespace +} // unnamed namespace +} // namespace arm64 +} // namespace simdutf +/* end file src/generic/utf8_to_latin1/utf8_to_latin1.h */ +/* begin file src/generic/utf8_to_latin1/valid_utf8_to_latin1.h */ + + +namespace simdutf { +namespace arm64 { +namespace { +namespace utf8_to_latin1 { +using namespace simd; + + + simdutf_really_inline size_t convert_valid(const char* in, size_t size, char* latin1_output) { + size_t pos = 0; + char* start{latin1_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_latin1. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); //twos complement of -65 is 1011 1111 ... + } + // If the input is long enough, then we have that margin-1 is the eight last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store((int8_t*)latin1_output); + latin1_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + uint64_t utf8_continuation_mask = input.lt(-65 + 1); // -64 is 1100 0000 in twos complement. Note: in this case, we also have ASCII to account for. + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_latin1(in + pos, + utf8_end_of_code_point_mask, latin1_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(pos < size) { + size_t howmany = scalar::utf8_to_latin1::convert(in + pos, size - pos, latin1_output); + if(howmany == 0) { return 0; } + latin1_output += howmany; + } + return latin1_output - start; + } + + }; +} // utf8_to_latin1 namespace +} // unnamed namespace +} // namespace arm64 + // namespace simdutf +/* end file src/generic/utf8_to_latin1/valid_utf8_to_latin1.h */ + +// placeholder scalars + +// +// Implementation-specific overrides +// +namespace simdutf { +namespace arm64 { + +simdutf_warn_unused int implementation::detect_encodings(const char * input, size_t length) const noexcept { + // If there is a BOM, then we trust it. + auto bom_encoding = simdutf::BOM::check_bom(input, length); + if(bom_encoding != encoding_type::unspecified) { return bom_encoding; } + if (length % 2 == 0) { + return arm_detect_encodings(input, length); + } else { + if (implementation::validate_utf8(input, length)) { + return simdutf::encoding_type::UTF8; + } else { + return simdutf::encoding_type::unspecified; + } + } +} + +simdutf_warn_unused bool implementation::validate_utf8(const char *buf, size_t len) const noexcept { + return arm64::utf8_validation::generic_validate_utf8(buf,len); +} + +simdutf_warn_unused result implementation::validate_utf8_with_errors(const char *buf, size_t len) const noexcept { + return arm64::utf8_validation::generic_validate_utf8_with_errors(buf,len); +} + +simdutf_warn_unused bool implementation::validate_ascii(const char *buf, size_t len) const noexcept { + return arm64::utf8_validation::generic_validate_ascii(buf,len); +} + +simdutf_warn_unused result implementation::validate_ascii_with_errors(const char *buf, size_t len) const noexcept { + return arm64::utf8_validation::generic_validate_ascii_with_errors(buf,len); +} + +simdutf_warn_unused bool implementation::validate_utf16le(const char16_t *buf, size_t len) const noexcept { + const char16_t* tail = arm_validate_utf16(buf, len); + if (tail) { + return scalar::utf16::validate(tail, len - (tail - buf)); + } else { + return false; + } +} + +simdutf_warn_unused bool implementation::validate_utf16be(const char16_t *buf, size_t len) const noexcept { + const char16_t* tail = arm_validate_utf16(buf, len); + if (tail) { + return scalar::utf16::validate(tail, len - (tail - buf)); + } else { + return false; + } +} + +simdutf_warn_unused result implementation::validate_utf16le_with_errors(const char16_t *buf, size_t len) const noexcept { + result res = arm_validate_utf16_with_errors(buf, len); + if (res.count != len) { + result scalar_res = scalar::utf16::validate_with_errors(buf + res.count, len - res.count); + return result(scalar_res.error, res.count + scalar_res.count); + } else { + return res; + } +} + +simdutf_warn_unused result implementation::validate_utf16be_with_errors(const char16_t *buf, size_t len) const noexcept { + result res = arm_validate_utf16_with_errors(buf, len); + if (res.count != len) { + result scalar_res = scalar::utf16::validate_with_errors(buf + res.count, len - res.count); + return result(scalar_res.error, res.count + scalar_res.count); + } else { + return res; + } +} + +simdutf_warn_unused bool implementation::validate_utf32(const char32_t *buf, size_t len) const noexcept { + const char32_t* tail = arm_validate_utf32le(buf, len); + if (tail) { + return scalar::utf32::validate(tail, len - (tail - buf)); + } else { + return false; + } +} + +simdutf_warn_unused result implementation::validate_utf32_with_errors(const char32_t *buf, size_t len) const noexcept { + result res = arm_validate_utf32le_with_errors(buf, len); + if (res.count != len) { + result scalar_res = scalar::utf32::validate_with_errors(buf + res.count, len - res.count); + return result(scalar_res.error, res.count + scalar_res.count); + } else { + return res; + } +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) const noexcept { + std::pair ret = arm_convert_latin1_to_utf8(buf, len, utf8_output); + size_t converted_chars = ret.second - utf8_output; + + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf8::convert( + ret.first, len - (ret.first - buf), ret.second); + converted_chars += scalar_converted_chars; + } + + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + std::pair ret = arm_convert_latin1_to_utf16(buf, len, utf16_output); + size_t converted_chars = ret.second - utf16_output; + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf16::convert( + ret.first, len - (ret.first - buf), ret.second); + converted_chars += scalar_converted_chars; + } + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf16be(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + std::pair ret = arm_convert_latin1_to_utf16(buf, len, utf16_output); + size_t converted_chars = ret.second - utf16_output; + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf16::convert( + ret.first, len - (ret.first - buf), ret.second); + converted_chars += scalar_converted_chars; + } + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf32(const char* buf, size_t len, char32_t* utf32_output) const noexcept { + std::pair ret = arm_convert_latin1_to_utf32(buf, len, utf32_output); + size_t converted_chars = ret.second - utf32_output; + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf32::convert( + ret.first, len - (ret.first - buf), ret.second); + converted_chars += scalar_converted_chars; + } + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_utf8_to_latin1(const char* buf, size_t len, char* latin1_output) const noexcept { + utf8_to_latin1::validating_transcoder converter; + return converter.convert(buf, len, latin1_output); +} + +simdutf_warn_unused result implementation::convert_utf8_to_latin1_with_errors(const char* buf, size_t len, char* latin1_output) const noexcept { + utf8_to_latin1::validating_transcoder converter; + return converter.convert_with_errors(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf8_to_latin1(const char* buf, size_t len, char* latin1_output) const noexcept { + return arm64::utf8_to_latin1::convert_valid(buf,len,latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_utf8_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + utf8_to_utf16::validating_transcoder converter; + return converter.convert(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_utf8_to_utf16be(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + utf8_to_utf16::validating_transcoder converter; + return converter.convert(buf, len, utf16_output); +} + +simdutf_warn_unused result implementation::convert_utf8_to_utf16le_with_errors(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + utf8_to_utf16::validating_transcoder converter; + return converter.convert_with_errors(buf, len, utf16_output); +} + +simdutf_warn_unused result implementation::convert_utf8_to_utf16be_with_errors(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + utf8_to_utf16::validating_transcoder converter; + return converter.convert_with_errors(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16le(const char* input, size_t size, + char16_t* utf16_output) const noexcept { + return utf8_to_utf16::convert_valid(input, size, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16be(const char* input, size_t size, + char16_t* utf16_output) const noexcept { + return utf8_to_utf16::convert_valid(input, size, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_utf8_to_utf32(const char* buf, size_t len, char32_t* utf32_output) const noexcept { + utf8_to_utf32::validating_transcoder converter; + return converter.convert(buf, len, utf32_output); +} + +simdutf_warn_unused result implementation::convert_utf8_to_utf32_with_errors(const char* buf, size_t len, char32_t* utf32_output) const noexcept { + utf8_to_utf32::validating_transcoder converter; + return converter.convert_with_errors(buf, len, utf32_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf32(const char* input, size_t size, + char32_t* utf32_output) const noexcept { + return utf8_to_utf32::convert_valid(input, size, utf32_output); +} + +simdutf_warn_unused size_t implementation::convert_utf16le_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = arm_convert_utf16_to_latin1(buf, len, latin1_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - latin1_output; + + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf16_to_latin1::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused size_t implementation::convert_utf16be_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = arm_convert_utf16_to_latin1(buf, len, latin1_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - latin1_output; + + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf16_to_latin1::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused result implementation::convert_utf16le_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = arm_convert_utf16_to_latin1_with_errors(buf, len, latin1_output); + if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count + if (ret.first.count != len) { // All good so far, but not finished + result scalar_res = scalar::utf16_to_latin1::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused result implementation::convert_utf16be_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = arm_convert_utf16_to_latin1_with_errors(buf, len, latin1_output); + if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count + if (ret.first.count != len) { // All good so far, but not finished + result scalar_res = scalar::utf16_to_latin1::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + // optimization opportunity: implement a custom function. + return convert_utf16be_to_latin1(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + // optimization opportunity: implement a custom function. + return convert_utf16le_to_latin1(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_utf16le_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + std::pair ret = arm_convert_utf16_to_utf8(buf, len, utf8_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - utf8_output; + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf16_to_utf8::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused size_t implementation::convert_utf16be_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + std::pair ret = arm_convert_utf16_to_utf8(buf, len, utf8_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - utf8_output; + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf16_to_utf8::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused result implementation::convert_utf16le_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + // ret.first.count is always the position in the buffer, not the number of code units written even if finished + std::pair ret = arm_convert_utf16_to_utf8_with_errors(buf, len, utf8_output); + if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count + if (ret.first.count != len) { // All good so far, but not finished + result scalar_res = scalar::utf16_to_utf8::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused result implementation::convert_utf16be_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + // ret.first.count is always the position in the buffer, not the number of code units written even if finished + std::pair ret = arm_convert_utf16_to_utf8_with_errors(buf, len, utf8_output); + if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count + if (ret.first.count != len) { // All good so far, but not finished + result scalar_res = scalar::utf16_to_utf8::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + return convert_utf16le_to_utf8(buf, len, utf8_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + return convert_utf16be_to_utf8(buf, len, utf8_output); +} + +simdutf_warn_unused size_t implementation::convert_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) const noexcept { + std::pair ret = arm_convert_utf32_to_utf8(buf, len, utf8_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - utf8_output; + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf32_to_utf8::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused result implementation::convert_utf32_to_utf8_with_errors(const char32_t* buf, size_t len, char* utf8_output) const noexcept { + // ret.first.count is always the position in the buffer, not the number of code units written even if finished + std::pair ret = arm_convert_utf32_to_utf8_with_errors(buf, len, utf8_output); + if (ret.first.count != len) { + result scalar_res = scalar::utf32_to_utf8::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused size_t implementation::convert_utf16le_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + std::pair ret = arm_convert_utf16_to_utf32(buf, len, utf32_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - utf32_output; + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf16_to_utf32::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused size_t implementation::convert_utf16be_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + std::pair ret = arm_convert_utf16_to_utf32(buf, len, utf32_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - utf32_output; + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf16_to_utf32::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused result implementation::convert_utf16le_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + // ret.first.count is always the position in the buffer, not the number of code units written even if finished + std::pair ret = arm_convert_utf16_to_utf32_with_errors(buf, len, utf32_output); + if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count + if (ret.first.count != len) { // All good so far, but not finished + result scalar_res = scalar::utf16_to_utf32::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused result implementation::convert_utf16be_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + // ret.first.count is always the position in the buffer, not the number of code units written even if finished + std::pair ret = arm_convert_utf16_to_utf32_with_errors(buf, len, utf32_output); + if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count + if (ret.first.count != len) { // All good so far, but not finished + result scalar_res = scalar::utf16_to_utf32::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused size_t implementation::convert_utf32_to_latin1(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = arm_convert_utf32_to_latin1(buf, len, latin1_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - latin1_output; + + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf32_to_latin1::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused result implementation::convert_utf32_to_latin1_with_errors(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = arm_convert_utf32_to_latin1_with_errors(buf, len, latin1_output); + if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count + if (ret.first.count != len) { // All good so far, but not finished + result scalar_res = scalar::utf32_to_latin1::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused size_t implementation::convert_valid_utf32_to_latin1(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + // optimization opportunity: implement a custom function. + return convert_utf32_to_latin1(buf,len,latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) const noexcept { + // optimization opportunity: implement a custom function. + return convert_utf32_to_utf8(buf, len, utf8_output); +} + +simdutf_warn_unused size_t implementation::convert_utf32_to_utf16le(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + std::pair ret = arm_convert_utf32_to_utf16(buf, len, utf16_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - utf16_output; + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf32_to_utf16::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused size_t implementation::convert_utf32_to_utf16be(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + std::pair ret = arm_convert_utf32_to_utf16(buf, len, utf16_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - utf16_output; + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf32_to_utf16::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused result implementation::convert_utf32_to_utf16le_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + // ret.first.count is always the position in the buffer, not the number of code units written even if finished + std::pair ret = arm_convert_utf32_to_utf16_with_errors(buf, len, utf16_output); + if (ret.first.count != len) { + result scalar_res = scalar::utf32_to_utf16::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused result implementation::convert_utf32_to_utf16be_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + // ret.first.count is always the position in the buffer, not the number of code units written even if finished + std::pair ret = arm_convert_utf32_to_utf16_with_errors(buf, len, utf16_output); + if (ret.first.count != len) { + result scalar_res = scalar::utf32_to_utf16::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf16le(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + return convert_utf32_to_utf16le(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf16be(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + return convert_utf32_to_utf16be(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + return convert_utf16le_to_utf32(buf, len, utf32_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + return convert_utf16be_to_utf32(buf, len, utf32_output); +} + +void implementation::change_endianness_utf16(const char16_t * input, size_t length, char16_t * output) const noexcept { + utf16::change_endianness_utf16(input, length, output); +} + +simdutf_warn_unused size_t implementation::count_utf16le(const char16_t * input, size_t length) const noexcept { + return utf16::count_code_points(input, length); +} + +simdutf_warn_unused size_t implementation::count_utf16be(const char16_t * input, size_t length) const noexcept { + return utf16::count_code_points(input, length); +} + +simdutf_warn_unused size_t implementation::count_utf8(const char * input, size_t length) const noexcept { + return utf8::count_code_points(input, length); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf8(const char* buf, size_t len) const noexcept { + return count_utf8(buf,len); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf16(size_t length) const noexcept { + return scalar::utf16::latin1_length_from_utf16(length); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf32(size_t length) const noexcept { + return scalar::utf32::latin1_length_from_utf32(length); +} + +simdutf_warn_unused size_t implementation::utf8_length_from_latin1(const char * input, size_t length) const noexcept { + // See https://lemire.me/blog/2023/05/15/computing-the-utf-8-size-of-a-latin-1-string-quickly-arm-neon-edition/ + // credit to Pete Cawley + const uint8_t *data = reinterpret_cast(input); + uint64_t result = 0; + const int lanes = sizeof(uint8x16_t); + uint8_t rem = length % lanes; + const uint8_t *simd_end = data + (length / lanes) * lanes; + const uint8x16_t threshold = vdupq_n_u8(0x80); + for (; data < simd_end; data += lanes) { + // load 16 bytes + uint8x16_t input_vec = vld1q_u8(data); + // compare to threshold (0x80) + uint8x16_t withhighbit = vcgeq_u8(input_vec, threshold); + // vertical addition + result -= vaddvq_s8(vreinterpretq_s8_u8(withhighbit)); + } + // scalar tail + for (uint8_t j = 0; j < rem; j++) { + result += (simd_end[j] >> 7); + } + return result + length; +} + +simdutf_warn_unused size_t implementation::utf8_length_from_utf16le(const char16_t * input, size_t length) const noexcept { + return utf16::utf8_length_from_utf16(input, length); +} + +simdutf_warn_unused size_t implementation::utf8_length_from_utf16be(const char16_t * input, size_t length) const noexcept { + return utf16::utf8_length_from_utf16(input, length); +} + + +simdutf_warn_unused size_t implementation::utf16_length_from_latin1(size_t length) const noexcept { + return scalar::latin1::utf16_length_from_latin1(length); +} + + +simdutf_warn_unused size_t implementation::utf32_length_from_latin1(size_t length) const noexcept { + return scalar::latin1::utf32_length_from_latin1(length); +} + + + +simdutf_warn_unused size_t implementation::utf32_length_from_utf16le(const char16_t * input, size_t length) const noexcept { + return utf16::utf32_length_from_utf16(input, length); +} + +simdutf_warn_unused size_t implementation::utf32_length_from_utf16be(const char16_t * input, size_t length) const noexcept { + return utf16::utf32_length_from_utf16(input, length); +} + +simdutf_warn_unused size_t implementation::utf16_length_from_utf8(const char * input, size_t length) const noexcept { + return utf8::utf16_length_from_utf8(input, length); +} + +simdutf_warn_unused size_t implementation::utf8_length_from_utf32(const char32_t * input, size_t length) const noexcept { + const uint32x4_t v_7f = vmovq_n_u32((uint32_t)0x7f); + const uint32x4_t v_7ff = vmovq_n_u32((uint32_t)0x7ff); + const uint32x4_t v_ffff = vmovq_n_u32((uint32_t)0xffff); + const uint32x4_t v_1 = vmovq_n_u32((uint32_t)0x1); + size_t pos = 0; + size_t count = 0; + for(;pos + 4 <= length; pos += 4) { + uint32x4_t in = vld1q_u32(reinterpret_cast(input + pos)); + const uint32x4_t ascii_bytes_bytemask = vcleq_u32(in, v_7f); + const uint32x4_t one_two_bytes_bytemask = vcleq_u32(in, v_7ff); + const uint32x4_t two_bytes_bytemask = veorq_u32(one_two_bytes_bytemask, ascii_bytes_bytemask); + const uint32x4_t three_bytes_bytemask = veorq_u32(vcleq_u32(in, v_ffff), one_two_bytes_bytemask); + + const uint16x8_t reduced_ascii_bytes_bytemask = vreinterpretq_u16_u32(vandq_u32(ascii_bytes_bytemask, v_1)); + const uint16x8_t reduced_two_bytes_bytemask = vreinterpretq_u16_u32(vandq_u32(two_bytes_bytemask, v_1)); + const uint16x8_t reduced_three_bytes_bytemask = vreinterpretq_u16_u32(vandq_u32(three_bytes_bytemask, v_1)); + + const uint16x8_t compressed_bytemask0 = vpaddq_u16(reduced_ascii_bytes_bytemask, reduced_two_bytes_bytemask); + const uint16x8_t compressed_bytemask1 = vpaddq_u16(reduced_three_bytes_bytemask, reduced_three_bytes_bytemask); + + size_t ascii_count = count_ones(vgetq_lane_u64(vreinterpretq_u64_u16(compressed_bytemask0), 0)); + size_t two_bytes_count = count_ones(vgetq_lane_u64(vreinterpretq_u64_u16(compressed_bytemask0), 1)); + size_t three_bytes_count = count_ones(vgetq_lane_u64(vreinterpretq_u64_u16(compressed_bytemask1), 0)); + + count += 16 - 3*ascii_count - 2*two_bytes_count - three_bytes_count; + } + return count + scalar::utf32::utf8_length_from_utf32(input + pos, length - pos); +} + +simdutf_warn_unused size_t implementation::utf16_length_from_utf32(const char32_t * input, size_t length) const noexcept { + const uint32x4_t v_ffff = vmovq_n_u32((uint32_t)0xffff); + const uint32x4_t v_1 = vmovq_n_u32((uint32_t)0x1); + size_t pos = 0; + size_t count = 0; + for(;pos + 4 <= length; pos += 4) { + uint32x4_t in = vld1q_u32(reinterpret_cast(input + pos)); + const uint32x4_t surrogate_bytemask = vcgtq_u32(in, v_ffff); + const uint16x8_t reduced_bytemask = vreinterpretq_u16_u32(vandq_u32(surrogate_bytemask, v_1)); + const uint16x8_t compressed_bytemask = vpaddq_u16(reduced_bytemask, reduced_bytemask); + size_t surrogate_count = count_ones(vgetq_lane_u64(vreinterpretq_u64_u16(compressed_bytemask), 0)); + count += 4 + surrogate_count; + } + return count + scalar::utf32::utf16_length_from_utf32(input + pos, length - pos); +} + +simdutf_warn_unused size_t implementation::utf32_length_from_utf8(const char * input, size_t length) const noexcept { + return utf8::utf32_length_from_utf8(input, length); +} + +} // namespace arm64 +} // namespace simdutf + +/* begin file src/simdutf/arm64/end.h */ +/* end file src/simdutf/arm64/end.h */ +/* end file src/arm64/implementation.cpp */ +#endif +#if SIMDUTF_IMPLEMENTATION_FALLBACK +/* begin file src/fallback/implementation.cpp */ +/* begin file src/simdutf/fallback/begin.h */ +// redefining SIMDUTF_IMPLEMENTATION to "fallback" +// #define SIMDUTF_IMPLEMENTATION fallback +/* end file src/simdutf/fallback/begin.h */ + + + + + + + + + +namespace simdutf { +namespace fallback { + +simdutf_warn_unused int implementation::detect_encodings(const char * input, size_t length) const noexcept { + // If there is a BOM, then we trust it. + auto bom_encoding = simdutf::BOM::check_bom(input, length); + if(bom_encoding != encoding_type::unspecified) { return bom_encoding; } + int out = 0; + if(validate_utf8(input, length)) { out |= encoding_type::UTF8; } + if((length % 2) == 0) { + if(validate_utf16le(reinterpret_cast(input), length/2)) { out |= encoding_type::UTF16_LE; } + } + if((length % 4) == 0) { + if(validate_utf32(reinterpret_cast(input), length/4)) { out |= encoding_type::UTF32_LE; } + } + + return out; +} + +simdutf_warn_unused bool implementation::validate_utf8(const char *buf, size_t len) const noexcept { + return scalar::utf8::validate(buf, len); +} + +simdutf_warn_unused result implementation::validate_utf8_with_errors(const char *buf, size_t len) const noexcept { + return scalar::utf8::validate_with_errors(buf, len); +} + +simdutf_warn_unused bool implementation::validate_ascii(const char *buf, size_t len) const noexcept { + return scalar::ascii::validate(buf, len); +} + +simdutf_warn_unused result implementation::validate_ascii_with_errors(const char *buf, size_t len) const noexcept { + return scalar::ascii::validate_with_errors(buf, len); +} + +simdutf_warn_unused bool implementation::validate_utf16le(const char16_t *buf, size_t len) const noexcept { + return scalar::utf16::validate(buf, len); +} + +simdutf_warn_unused bool implementation::validate_utf16be(const char16_t *buf, size_t len) const noexcept { + return scalar::utf16::validate(buf, len); +} + +simdutf_warn_unused result implementation::validate_utf16le_with_errors(const char16_t *buf, size_t len) const noexcept { + return scalar::utf16::validate_with_errors(buf, len); +} + +simdutf_warn_unused result implementation::validate_utf16be_with_errors(const char16_t *buf, size_t len) const noexcept { + return scalar::utf16::validate_with_errors(buf, len); +} + +simdutf_warn_unused bool implementation::validate_utf32(const char32_t *buf, size_t len) const noexcept { + return scalar::utf32::validate(buf, len); +} + +simdutf_warn_unused result implementation::validate_utf32_with_errors(const char32_t *buf, size_t len) const noexcept { + return scalar::utf32::validate_with_errors(buf, len); +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) const noexcept { + return scalar::latin1_to_utf8::convert(buf,len,utf8_output); +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::latin1_to_utf16::convert(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf16be(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::latin1_to_utf16::convert(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf32(const char * buf, size_t len, char32_t* utf32_output) const noexcept { + return scalar::latin1_to_utf32::convert(buf,len,utf32_output); +} + +simdutf_warn_unused size_t implementation::convert_utf8_to_latin1(const char* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf8_to_latin1::convert(buf, len, latin1_output); +} + +simdutf_warn_unused result implementation::convert_utf8_to_latin1_with_errors(const char* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf8_to_latin1::convert_with_errors(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf8_to_latin1(const char* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf8_to_latin1::convert_valid(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_utf8_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf8_to_utf16::convert(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_utf8_to_utf16be(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf8_to_utf16::convert(buf, len, utf16_output); +} + +simdutf_warn_unused result implementation::convert_utf8_to_utf16le_with_errors(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf8_to_utf16::convert_with_errors(buf, len, utf16_output); +} + +simdutf_warn_unused result implementation::convert_utf8_to_utf16be_with_errors(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf8_to_utf16::convert_with_errors(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf8_to_utf16::convert_valid(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf16be(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf8_to_utf16::convert_valid(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_utf8_to_utf32(const char* buf, size_t len, char32_t* utf32_output) const noexcept { + return scalar::utf8_to_utf32::convert(buf, len, utf32_output); +} + +simdutf_warn_unused result implementation::convert_utf8_to_utf32_with_errors(const char* buf, size_t len, char32_t* utf32_output) const noexcept { + return scalar::utf8_to_utf32::convert_with_errors(buf, len, utf32_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf32(const char* input, size_t size, + char32_t* utf32_output) const noexcept { + return scalar::utf8_to_utf32::convert_valid(input, size, utf32_output); +} + +simdutf_warn_unused size_t implementation::convert_utf16le_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf16_to_latin1::convert(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_utf16be_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf16_to_latin1::convert(buf, len, latin1_output); +} + +simdutf_warn_unused result implementation::convert_utf16le_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf16_to_latin1::convert_with_errors(buf, len, latin1_output); +} + +simdutf_warn_unused result implementation::convert_utf16be_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf16_to_latin1::convert_with_errors(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf16_to_latin1::convert_valid(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf16_to_latin1::convert_valid(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_utf16le_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + return scalar::utf16_to_utf8::convert(buf, len, utf8_output); +} + +simdutf_warn_unused size_t implementation::convert_utf16be_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + return scalar::utf16_to_utf8::convert(buf, len, utf8_output); +} + +simdutf_warn_unused result implementation::convert_utf16le_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + return scalar::utf16_to_utf8::convert_with_errors(buf, len, utf8_output); +} + +simdutf_warn_unused result implementation::convert_utf16be_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + return scalar::utf16_to_utf8::convert_with_errors(buf, len, utf8_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + return scalar::utf16_to_utf8::convert_valid(buf, len, utf8_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { + return scalar::utf16_to_utf8::convert_valid(buf, len, utf8_output); +} + +simdutf_warn_unused size_t implementation::convert_utf32_to_latin1(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf32_to_latin1::convert(buf, len, latin1_output); +} + +simdutf_warn_unused result implementation::convert_utf32_to_latin1_with_errors(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf32_to_latin1::convert_with_errors(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf32_to_latin1(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf32_to_latin1::convert_valid(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) const noexcept { + return scalar::utf32_to_utf8::convert(buf, len, utf8_output); +} + +simdutf_warn_unused result implementation::convert_utf32_to_utf8_with_errors(const char32_t* buf, size_t len, char* utf8_output) const noexcept { + return scalar::utf32_to_utf8::convert_with_errors(buf, len, utf8_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) const noexcept { + return scalar::utf32_to_utf8::convert_valid(buf, len, utf8_output); +} + +simdutf_warn_unused size_t implementation::convert_utf32_to_utf16le(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf32_to_utf16::convert(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_utf32_to_utf16be(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf32_to_utf16::convert(buf, len, utf16_output); +} + +simdutf_warn_unused result implementation::convert_utf32_to_utf16le_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf32_to_utf16::convert_with_errors(buf, len, utf16_output); +} + +simdutf_warn_unused result implementation::convert_utf32_to_utf16be_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf32_to_utf16::convert_with_errors(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf16le(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf32_to_utf16::convert_valid(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf32_to_utf16be(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { + return scalar::utf32_to_utf16::convert_valid(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_utf16le_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + return scalar::utf16_to_utf32::convert(buf, len, utf32_output); +} + +simdutf_warn_unused size_t implementation::convert_utf16be_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + return scalar::utf16_to_utf32::convert(buf, len, utf32_output); +} + +simdutf_warn_unused result implementation::convert_utf16le_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + return scalar::utf16_to_utf32::convert_with_errors(buf, len, utf32_output); +} + +simdutf_warn_unused result implementation::convert_utf16be_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + return scalar::utf16_to_utf32::convert_with_errors(buf, len, utf32_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + return scalar::utf16_to_utf32::convert_valid(buf, len, utf32_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_utf32(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { + return scalar::utf16_to_utf32::convert_valid(buf, len, utf32_output); +} + +void implementation::change_endianness_utf16(const char16_t * input, size_t length, char16_t * output) const noexcept { + scalar::utf16::change_endianness_utf16(input, length, output); +} + +simdutf_warn_unused size_t implementation::count_utf16le(const char16_t * input, size_t length) const noexcept { + return scalar::utf16::count_code_points(input, length); +} + +simdutf_warn_unused size_t implementation::count_utf16be(const char16_t * input, size_t length) const noexcept { + return scalar::utf16::count_code_points(input, length); +} + +simdutf_warn_unused size_t implementation::count_utf8(const char * input, size_t length) const noexcept { + return scalar::utf8::count_code_points(input, length); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf8(const char* buf, size_t len) const noexcept { + return scalar::utf8::latin1_length_from_utf8(buf,len); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf16(size_t length) const noexcept { + return scalar::utf16::latin1_length_from_utf16(length); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf32(size_t length) const noexcept { + return length; +} + +simdutf_warn_unused size_t implementation::utf8_length_from_latin1(const char * input, size_t length) const noexcept { + return scalar::latin1::utf8_length_from_latin1(input,length); +} + +simdutf_warn_unused size_t implementation::utf8_length_from_utf16le(const char16_t * input, size_t length) const noexcept { + return scalar::utf16::utf8_length_from_utf16(input, length); +} + +simdutf_warn_unused size_t implementation::utf8_length_from_utf16be(const char16_t * input, size_t length) const noexcept { + return scalar::utf16::utf8_length_from_utf16(input, length); +} + +simdutf_warn_unused size_t implementation::utf32_length_from_utf16le(const char16_t * input, size_t length) const noexcept { + return scalar::utf16::utf32_length_from_utf16(input, length); +} + +simdutf_warn_unused size_t implementation::utf32_length_from_utf16be(const char16_t * input, size_t length) const noexcept { + return scalar::utf16::utf32_length_from_utf16(input, length); +} + +simdutf_warn_unused size_t implementation::utf16_length_from_latin1(size_t length) const noexcept { + return scalar::latin1::utf16_length_from_latin1(length); +} + +simdutf_warn_unused size_t implementation::utf16_length_from_utf8(const char * input, size_t length) const noexcept { + return scalar::utf8::utf16_length_from_utf8(input, length); +} + +simdutf_warn_unused size_t implementation::utf8_length_from_utf32(const char32_t * input, size_t length) const noexcept { + return scalar::utf32::utf8_length_from_utf32(input, length); +} + +simdutf_warn_unused size_t implementation::utf16_length_from_utf32(const char32_t * input, size_t length) const noexcept { + return scalar::utf32::utf16_length_from_utf32(input, length); +} + +simdutf_warn_unused size_t implementation::utf32_length_from_latin1(size_t length) const noexcept { + return scalar::latin1::utf32_length_from_latin1(length); +} + +simdutf_warn_unused size_t implementation::utf32_length_from_utf8(const char * input, size_t length) const noexcept { + return scalar::utf8::count_code_points(input, length); +} + +} // namespace fallback +} // namespace simdutf + +/* begin file src/simdutf/fallback/end.h */ +/* end file src/simdutf/fallback/end.h */ +/* end file src/fallback/implementation.cpp */ +#endif +#if SIMDUTF_IMPLEMENTATION_ICELAKE +/* begin file src/icelake/implementation.cpp */ + + +/* begin file src/simdutf/icelake/begin.h */ +// redefining SIMDUTF_IMPLEMENTATION to "icelake" +// #define SIMDUTF_IMPLEMENTATION icelake + +#if SIMDUTF_CAN_ALWAYS_RUN_ICELAKE +// nothing needed. +#else +SIMDUTF_TARGET_ICELAKE +#endif + +#if SIMDUTF_GCC11ORMORE // workaround for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105593 +SIMDUTF_DISABLE_GCC_WARNING(-Wmaybe-uninitialized) +#endif // end of workaround +/* end file src/simdutf/icelake/begin.h */ +namespace simdutf { +namespace icelake { +namespace { +#ifndef SIMDUTF_ICELAKE_H +#error "icelake.h must be included" +#endif +/* begin file src/icelake/icelake_utf8_common.inl.cpp */ +// Common procedures for both validating and non-validating conversions from UTF-8. +enum block_processing_mode { SIMDUTF_FULL, SIMDUTF_TAIL}; + +using utf8_to_utf16_result = std::pair; +using utf8_to_utf32_result = std::pair; + +/* + process_block_utf8_to_utf16 converts up to 64 bytes from 'in' from UTF-8 + to UTF-16. When tail = SIMDUTF_FULL, then the full input buffer (64 bytes) + might be used. When tail = SIMDUTF_TAIL, we take into account 'gap' which + indicates how many input bytes are relevant. + + Returns true when the result is correct, otherwise it returns false. + + The provided in and out pointers are advanced according to how many input + bytes have been processed, upon success. +*/ +template +simdutf_really_inline bool process_block_utf8_to_utf16(const char *&in, char16_t *&out, size_t gap) { + // constants + __m512i mask_identity = _mm512_set_epi8(63, 62, 61, 60, 59, 58, 57, 56, 55, 54, 53, 52, 51, 50, 49, 48, 47, 46, 45, 44, 43, 42, 41, 40, 39, 38, 37, 36, 35, 34, 33, 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0); + __m512i mask_c0c0c0c0 = _mm512_set1_epi32(0xc0c0c0c0); + __m512i mask_80808080 = _mm512_set1_epi32(0x80808080); + __m512i mask_f0f0f0f0 = _mm512_set1_epi32(0xf0f0f0f0); + __m512i mask_dfdfdfdf_tail = _mm512_set_epi64(0xffffdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf, 0xdfdfdfdfdfdfdfdf); + __m512i mask_c2c2c2c2 = _mm512_set1_epi32(0xc2c2c2c2); + __m512i mask_ffffffff = _mm512_set1_epi32(0xffffffff); + __m512i mask_d7c0d7c0 = _mm512_set1_epi32(0xd7c0d7c0); + __m512i mask_dc00dc00 = _mm512_set1_epi32(0xdc00dc00); + __m512i byteflip = _mm512_setr_epi64( + 0x0607040502030001, + 0x0e0f0c0d0a0b0809, + 0x0607040502030001, + 0x0e0f0c0d0a0b0809, + 0x0607040502030001, + 0x0e0f0c0d0a0b0809, + 0x0607040502030001, + 0x0e0f0c0d0a0b0809 + ); + // Note that 'tail' is a compile-time constant ! + __mmask64 b = (tail == SIMDUTF_FULL) ? 0xFFFFFFFFFFFFFFFF : (uint64_t(1) << gap) - 1; + __m512i input = (tail == SIMDUTF_FULL) ? _mm512_loadu_si512(in) : _mm512_maskz_loadu_epi8(b, in); + __mmask64 m1 = (tail == SIMDUTF_FULL) ? _mm512_cmplt_epu8_mask(input, mask_80808080) : _mm512_mask_cmplt_epu8_mask(b, input, mask_80808080); + if(_ktestc_mask64_u8(m1, b)) {// NOT(m1) AND b -- if all zeroes, then all ASCII + // alternatively, we could do 'if (m1 == b) { ' + if (tail == SIMDUTF_FULL) { + in += 64; // consumed 64 bytes + // we convert a full 64-byte block, writing 128 bytes. + __m512i input1 = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(input)); + if(big_endian) { input1 = _mm512_shuffle_epi8(input1, byteflip); } + _mm512_storeu_si512(out, input1); + out += 32; + __m512i input2 = _mm512_cvtepu8_epi16(_mm512_extracti64x4_epi64(input, 1)); + if(big_endian) { input2 = _mm512_shuffle_epi8(input2, byteflip); } + _mm512_storeu_si512(out, input2); + out += 32; + return true; // we are done + } else { + in += gap; + if (gap <= 32) { + __m512i input1 = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(input)); + if(big_endian) { input1 = _mm512_shuffle_epi8(input1, byteflip); } + _mm512_mask_storeu_epi16(out, __mmask32((uint64_t(1) << (gap)) - 1), input1); + out += gap; + } else { + __m512i input1 = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(input)); + if(big_endian) { input1 = _mm512_shuffle_epi8(input1, byteflip); } + _mm512_storeu_si512(out, input1); + out += 32; + __m512i input2 = _mm512_cvtepu8_epi16(_mm512_extracti64x4_epi64(input, 1)); + if(big_endian) { input2 = _mm512_shuffle_epi8(input2, byteflip); } + _mm512_mask_storeu_epi16(out, __mmask32((uint32_t(1) << (gap - 32)) - 1), input2); + out += gap - 32; + } + return true; // we are done + } + } + // classify characters further + __mmask64 m234 = _mm512_cmp_epu8_mask(mask_c0c0c0c0, input, + _MM_CMPINT_LE); // 0xc0 <= input, 2, 3, or 4 leading byte + __mmask64 m34 = _mm512_cmp_epu8_mask(mask_dfdfdfdf_tail, input, + _MM_CMPINT_LT); // 0xdf < input, 3 or 4 leading byte + + __mmask64 milltwobytes = _mm512_mask_cmp_epu8_mask(m234, input, mask_c2c2c2c2, + _MM_CMPINT_LT); // 0xc0 <= input < 0xc2 (illegal two byte sequence) + // Overlong 2-byte sequence + if (_ktestz_mask64_u8(milltwobytes, milltwobytes) == 0) { + // Overlong 2-byte sequence + return false; + } + if (_ktestz_mask64_u8(m34, m34) == 0) { + // We have a 3-byte sequence and/or a 2-byte sequence, or possibly even a 4-byte sequence! + __mmask64 m4 = _mm512_cmp_epu8_mask(input, mask_f0f0f0f0, + _MM_CMPINT_NLT); // 0xf0 <= zmm0 (4 byte start bytes) + + __mmask64 mask_not_ascii = (tail == SIMDUTF_FULL) ? _knot_mask64(m1) : _kand_mask64(_knot_mask64(m1), b); + + __mmask64 mp1 = _kshiftli_mask64(m234, 1); + __mmask64 mp2 = _kshiftli_mask64(m34, 2); + // We could do it as follows... + // if (_kortestz_mask64_u8(m4,m4)) { // compute the bitwise OR of the 64-bit masks a and b and return 1 if all zeroes + // but GCC generates better code when we do: + if (m4 == 0) { // compute the bitwise OR of the 64-bit masks a and b and return 1 if all zeroes + // Fast path with 1,2,3 bytes + __mmask64 mc = _kor_mask64(mp1, mp2); // expected continuation bytes + __mmask64 m1234 = _kor_mask64(m1, m234); + // mismatched continuation bytes: + if (tail == SIMDUTF_FULL) { + __mmask64 xnormcm1234 = _kxnor_mask64(mc, m1234); // XNOR of mc and m1234 should be all zero if they differ + // the presence of a 1 bit indicates that they overlap. + // _kortestz_mask64_u8: compute the bitwise OR of 64-bit masksand return 1 if all zeroes. + if (!_kortestz_mask64_u8(xnormcm1234, xnormcm1234)) { return false; } + } else { + __mmask64 bxorm1234 = _kxor_mask64(b, m1234); + if (mc != bxorm1234) { return false; } + } + // mend: identifying the last bytes of each sequence to be decoded + __mmask64 mend = _kshiftri_mask64(m1234, 1); + if (tail != SIMDUTF_FULL) { + mend = _kor_mask64(mend, (uint64_t(1) << (gap - 1))); + } + + + __m512i last_and_third = _mm512_maskz_compress_epi8(mend, mask_identity); + __m512i last_and_thirdu16 = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(last_and_third)); + + __m512i nonasciitags = _mm512_maskz_mov_epi8(mask_not_ascii, mask_c0c0c0c0); // ASCII: 00000000 other: 11000000 + __m512i clearedbytes = _mm512_andnot_si512(nonasciitags, input); // high two bits cleared where not ASCII + __m512i lastbytes = _mm512_maskz_permutexvar_epi8(0x5555555555555555, last_and_thirdu16, + clearedbytes); // the last byte of each character + + __mmask64 mask_before_non_ascii = _kshiftri_mask64(mask_not_ascii, 1); // bytes that precede non-ASCII bytes + __m512i indexofsecondlastbytes = _mm512_add_epi16(mask_ffffffff, last_and_thirdu16); // indices of the second last bytes + __m512i beforeasciibytes = _mm512_maskz_mov_epi8(mask_before_non_ascii, clearedbytes); + __m512i secondlastbytes = _mm512_maskz_permutexvar_epi8(0x5555555555555555, indexofsecondlastbytes, + beforeasciibytes); // the second last bytes (of two, three byte seq, + // surrogates) + secondlastbytes = _mm512_slli_epi16(secondlastbytes, 6); // shifted into position + + __m512i indexofthirdlastbytes = _mm512_add_epi16(mask_ffffffff, + indexofsecondlastbytes); // indices of the second last bytes + __m512i thirdlastbyte = _mm512_maskz_mov_epi8(m34, + clearedbytes); // only those that are the third last byte of a sequece + __m512i thirdlastbytes = _mm512_maskz_permutexvar_epi8(0x5555555555555555, indexofthirdlastbytes, + thirdlastbyte); // the third last bytes (of three byte sequences, hi + // surrogate) + thirdlastbytes = _mm512_slli_epi16(thirdlastbytes, 12); // shifted into position + __m512i Wout = _mm512_ternarylogic_epi32(lastbytes, secondlastbytes, thirdlastbytes, 254); + // the elements of Wout excluding the last element if it happens to be a high surrogate: + + __mmask64 mprocessed = (tail == SIMDUTF_FULL) ? _pdep_u64(0xFFFFFFFF, mend) : _pdep_u64(0xFFFFFFFF, _kand_mask64(mend, b)); // we adjust mend at the end of the output. + + + // Encodings out of range... + { + // the location of 3-byte sequence start bytes in the input + __mmask64 m3 = m34 & (b ^ m4); + // code units in Wout corresponding to 3-byte sequences. + __mmask32 M3 = __mmask32(_pext_u64(m3 << 2, mend)); + __m512i mask_08000800 = _mm512_set1_epi32(0x08000800); + __mmask32 Msmall800 = _mm512_mask_cmplt_epu16_mask(M3, Wout, mask_08000800); + __m512i mask_d800d800 = _mm512_set1_epi32(0xd800d800); + __m512i Moutminusd800 = _mm512_sub_epi16(Wout, mask_d800d800); + __mmask32 M3s = _mm512_mask_cmplt_epu16_mask(M3, Moutminusd800, mask_08000800); + if (_kor_mask32(Msmall800, M3s)) { return false; } + } + int64_t nout = _mm_popcnt_u64(mprocessed); + in += 64 - _lzcnt_u64(mprocessed); + if(big_endian) { Wout = _mm512_shuffle_epi8(Wout, byteflip); } + _mm512_mask_storeu_epi16(out, __mmask32((uint64_t(1) << nout) - 1), Wout); + out += nout; + return true; // ok + } + // + // We have a 4-byte sequence, this is the general case. // Slow! __mmask64 mp3 = _kshiftli_mask64(m4, 3); __mmask64 mc = _kor_mask64(_kor_mask64(mp1, mp2), mp3); // expected continuation bytes @@ -16025,7 +18112,7 @@ simdutf_really_inline bool process_block_utf8_to_utf16(const char *&in, char16_t { // the location of 3-byte sequence start bytes in the input __mmask64 m3 = m34 & (b ^ m4); - // words in Wout corresponding to 3-byte sequences. + // code units in Wout corresponding to 3-byte sequences. __mmask32 M3 = __mmask32(_pext_u64(m3 << 2, mend)); __m512i mask_08000800 = _mm512_set1_epi32(0x08000800); __mmask32 Msmall800 = _mm512_mask_cmplt_epu16_mask(M3, Wout, mask_08000800); @@ -16075,9 +18162,9 @@ simdutf_really_inline bool process_block_utf8_to_utf16(const char *&in, char16_t in += 64 - _lzcnt_u64(_pdep_u64(0xFFFFFFFF, continuation_or_ascii)); } __m512i lead = _mm512_maskz_compress_epi8(leading, leading2byte); // will contain zero for ascii, and the data - lead = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(lead)); // ... zero extended into words + lead = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(lead)); // ... zero extended into code units __m512i follow = _mm512_maskz_compress_epi8(continuation_or_ascii, input); // the last bytes of each sequence - follow = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(follow)); // ... zero extended into words + follow = _mm512_cvtepu8_epi16(_mm512_castsi512_si256(follow)); // ... zero extended into code units lead = _mm512_slli_epi16(lead, 6); // shifted into position __m512i final = _mm512_add_epi16(follow, lead); // combining lead and follow @@ -16100,13 +18187,13 @@ simdutf_really_inline bool process_block_utf8_to_utf16(const char *&in, char16_t /* - utf32_to_utf16_masked converts `count` lower UTF-32 words + utf32_to_utf16_masked converts `count` lower UTF-32 code units from input `utf32` into UTF-16. It differs from utf32_to_utf16 in that it 'masks' the writes. - Returns how many 16-bit words were stored. + Returns how many 16-bit code units were stored. - byteflip is used for flipping 16-bit words, and it should be + byteflip is used for flipping 16-bit code units, and it should be __m512i byteflip = _mm512_setr_epi64( 0x0607040502030001, 0x0e0f0c0d0a0b0809, @@ -16139,7 +18226,7 @@ simdutf_really_inline size_t utf32_to_utf16_masked(const __m512i byteflip, __m51 } { - // build surrogate pair words in 32-bit lanes + // build surrogate pair code units in 32-bit lanes // t0 = 8 x [000000000000aaaa|aaaaaabbbbbbbbbb] const __m512i v_0001_0000 = _mm512_set1_epi32(0x00010000); @@ -16160,7 +18247,7 @@ simdutf_really_inline size_t utf32_to_utf16_masked(const __m512i byteflip, __m51 const __m512i t3 = _mm512_ternarylogic_epi32(t2, v_fc00_fc00, v_d800_dc00, 0xba); const __m512i t4 = _mm512_mask_blend_epi32(sp_mask, utf32, t3); __m512i t5 = _mm512_ror_epi32(t4, 16); - // Here we want to trim all of the upper 16-bit words from the 2-byte + // Here we want to trim all of the upper 16-bit code units from the 2-byte // characters represented as 4-byte values. We can compute it from // sp_mask or the following... It can be more optimized! const __mmask32 nonzero = _kor_mask32(0xaaaaaaaa,_mm512_cmpneq_epi16_mask(t5, _mm512_setzero_si512())); @@ -16176,12 +18263,12 @@ simdutf_really_inline size_t utf32_to_utf16_masked(const __m512i byteflip, __m51 } /* - utf32_to_utf16 converts `count` lower UTF-32 words + utf32_to_utf16 converts `count` lower UTF-32 code units from input `utf32` into UTF-16. It may overflow. - Returns how many 16-bit words were stored. + Returns how many 16-bit code units were stored. - byteflip is used for flipping 16-bit words, and it should be + byteflip is used for flipping 16-bit code units, and it should be __m512i byteflip = _mm512_setr_epi64( 0x0607040502030001, 0x0e0f0c0d0a0b0809, @@ -16212,7 +18299,7 @@ simdutf_really_inline size_t utf32_to_utf16(const __m512i byteflip, __m512i utf3 } { - // build surrogate pair words in 32-bit lanes + // build surrogate pair code units in 32-bit lanes // t0 = 8 x [000000000000aaaa|aaaaaabbbbbbbbbb] const __m512i v_0001_0000 = _mm512_set1_epi32(0x00010000); @@ -16299,8 +18386,8 @@ __m512i rotate_by_N_epi8(const __m512i input) { simdutf_really_inline __m512i expanded_utf8_to_utf32(__m512i char_class, __m512i utf8) { /* Input: - - utf8: bytes stored at separate 32-bit words - - valid: which words have valid UTF-8 characters + - utf8: bytes stored at separate 32-bit code units + - valid: which code units have valid UTF-8 characters Bit layout of single word. We show 4 cases for each possible UTF-8 character encoding. The `?` denotes bits we must not @@ -16448,7 +18535,6 @@ simdutf_really_inline __m512i expand_utf8_to_utf32(__m512i input) { return expanded_utf8_to_utf32(char_class, input); } /* end file src/icelake/icelake_utf8_common.inl.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/icelake_macros.inl.cpp /* begin file src/icelake/icelake_macros.inl.cpp */ /* @@ -16584,7 +18670,6 @@ simdutf_really_inline __m512i expand_utf8_to_utf32(__m512i input) { } \ } /* end file src/icelake/icelake_macros.inl.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/icelake_from_valid_utf8.inl.cpp /* begin file src/icelake/icelake_from_valid_utf8.inl.cpp */ // file included directly @@ -16723,7 +18808,6 @@ std::pair valid_utf8_to_fixed_length(const char* str, size using utf8_to_utf16_result = std::pair; /* end file src/icelake/icelake_from_valid_utf8.inl.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/icelake_utf8_validation.inl.cpp /* begin file src/icelake/icelake_utf8_validation.inl.cpp */ // file included directly @@ -16853,14 +18937,13 @@ simdutf_really_inline __m512i check_special_cases(__m512i input, const __m512i p }; // struct avx512_utf8_checker /* end file src/icelake/icelake_utf8_validation.inl.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/icelake_from_utf8.inl.cpp /* begin file src/icelake/icelake_from_utf8.inl.cpp */ // file included directly // File contains conversion procedure from possibly invalid UTF-8 strings. /** - * Attempts to convert up to len 1-byte words from in (in UTF-8 format) to + * Attempts to convert up to len 1-byte code units from in (in UTF-8 format) to * out. * Returns the position of the input and output after the processing is * completed. Upon error, the output is set to null. @@ -17138,25 +19221,496 @@ std::tuple validating_utf8_to_fixed_length_with_cons SIMDUTF_ICELAKE_WRITE_UTF16_OR_UTF32(vec1, valid_count1, true) } - const __m512i lane3 = broadcast_epi128<3>(utf8); - SIMDUTF_ICELAKE_TRANSCODE16(lane2, lane3, true) + const __m512i lane3 = broadcast_epi128<3>(utf8); + SIMDUTF_ICELAKE_TRANSCODE16(lane2, lane3, true) + + ptr += 3*16; + } + validatedptr += 4*16; + } + { + const __m512i utf8 = _mm512_maskz_loadu_epi8((1ULL<<(end - validatedptr))-1, (const __m512i*)validatedptr); + checker.check_next_input(utf8); + } + checker.check_eof(); + if(checker.errors()) { + return {ptr, output, false}; // We found an error. + } + return {ptr, output, true}; +} +/* end file src/icelake/icelake_from_utf8.inl.cpp */ +/* begin file src/icelake/icelake_convert_utf8_to_latin1.inl.cpp */ +// file included directly + +// File contains conversion procedure from possibly invalid UTF-8 strings. + +// template +template +simdutf_really_inline size_t process_block_from_utf8_to_latin1(const char *buf, size_t len, + char *latin_output, __m512i minus64, + __m512i one, + __mmask64 *next_leading_ptr, + __mmask64 *next_bit6_ptr) { + __mmask64 load_mask = + is_remaining ? _bzhi_u64(~0ULL, (unsigned int)len) : ~0ULL; + __m512i input = _mm512_maskz_loadu_epi8(load_mask, (__m512i *)buf); + __mmask64 nonascii = _mm512_movepi8_mask(input); + + if (nonascii == 0) { + is_remaining + ? _mm512_mask_storeu_epi8((__m512i *)latin_output, load_mask, input) + : _mm512_storeu_si512((__m512i *)latin_output, input); + return len; + } + + __mmask64 leading = _mm512_cmpge_epu8_mask(input, minus64); + + __m512i highbits = _mm512_xor_si512(input, _mm512_set1_epi8(-62)); + __mmask64 invalid_leading_bytes = + _mm512_mask_cmpgt_epu8_mask(leading, highbits, one); + + if (invalid_leading_bytes) { + return 0; // Indicates error + } + + __mmask64 leading_shift = (leading << 1) | *next_leading_ptr; + *next_leading_ptr = leading >> 63; + + if ((nonascii ^ leading) != leading_shift) { + return 0; // Indicates error + } + + __mmask64 bit6 = _mm512_cmpeq_epi8_mask(highbits, one); + input = + _mm512_mask_sub_epi8(input, (bit6 << 1) | *next_bit6_ptr, input, minus64); + *next_bit6_ptr = bit6 >> 63; + + __mmask64 retain = ~leading & load_mask; + __m512i output = _mm512_maskz_compress_epi8(retain, input); + int64_t written_out = count_ones(retain); + __mmask64 store_mask = (1ULL << written_out) - 1; + + // *************************** + // Possible optimization? (Nick Nuon) + // This commented out line is 5% faster but sadly it'll also write past + // memory bounds for latin1_output: is_remaining ? + // _mm512_mask_storeu_epi8((__m512i *)latin_output, store_mask, output) : + // _mm512_storeu_si512((__m512i *)latin_output, output); I tried using + // _mm512_storeu_si512 and have the next process_block start from the + // "written_out" point but the compiler shuffles memory in such a way that it + // is signifcantly slower... + // **************************** + _mm512_mask_storeu_epi8((__m512i *)latin_output, store_mask, output); + + return written_out; +} + +size_t utf8_to_latin1_avx512(const char *buf, size_t len, char *latin_output) { + char *start = latin_output; + size_t pos = 0; + __m512i minus64 = _mm512_set1_epi8(-64); // 11111111111 ... 1100 0000 + __m512i one = _mm512_set1_epi8(1); + __mmask64 next_leading = 0; + __mmask64 next_bit6 = 0; + + while (pos + 64 <= len) { + size_t written = process_block_from_utf8_to_latin1(buf + pos, 64, latin_output, minus64, + one, &next_leading, &next_bit6); + if (written == 0) { + return 0; // Indicates error + } + latin_output += written; + pos += 64; + } + + if (pos < len) { + size_t remaining = len - pos; + size_t written = + process_block_from_utf8_to_latin1(buf + pos, remaining, latin_output, minus64, one, + &next_leading, &next_bit6); + if (written == 0) { + return 0; // Indicates error + } + latin_output += written; + } + + return (size_t)(latin_output - start); +} +/* end file src/icelake/icelake_convert_utf8_to_latin1.inl.cpp */ +/* begin file src/icelake/icelake_convert_valid_utf8_to_latin1.inl.cpp */ +// file included directly + +// File contains conversion procedure from valid UTF-8 strings. + +template +simdutf_really_inline size_t process_valid_block_from_utf8_to_latin1(const char *buf, size_t len, + char *latin_output, + __m512i minus64, __m512i one, + __mmask64 *next_leading_ptr, + __mmask64 *next_bit6_ptr) { + __mmask64 load_mask = + is_remaining ? _bzhi_u64(~0ULL, (unsigned int)len) : ~0ULL; + __m512i input = _mm512_maskz_loadu_epi8(load_mask, (__m512i *)buf); + __mmask64 nonascii = _mm512_movepi8_mask(input); + + if (nonascii == 0) { + is_remaining + ? _mm512_mask_storeu_epi8((__m512i *)latin_output, load_mask, input) + : _mm512_storeu_si512((__m512i *)latin_output, input); + return len; + } + + __mmask64 leading = _mm512_cmpge_epu8_mask(input, minus64); + + __m512i highbits = _mm512_xor_si512(input, _mm512_set1_epi8(-62)); + + *next_leading_ptr = leading >> 63; + + __mmask64 bit6 = _mm512_cmpeq_epi8_mask(highbits, one); + input = + _mm512_mask_sub_epi8(input, (bit6 << 1) | *next_bit6_ptr, input, minus64); + *next_bit6_ptr = bit6 >> 63; + + __mmask64 retain = ~leading & load_mask; + __m512i output = _mm512_maskz_compress_epi8(retain, input); + int64_t written_out = count_ones(retain); + __mmask64 store_mask = (1ULL << written_out) - 1; + // Optimization opportunity: sometimes, masked writes are not needed. + _mm512_mask_storeu_epi8((__m512i *)latin_output, store_mask, output); + return written_out; +} + +size_t valid_utf8_to_latin1_avx512(const char *buf, size_t len, + char *latin_output) { + char *start = latin_output; + size_t pos = 0; + __m512i minus64 = _mm512_set1_epi8(-64); // 11111111111 ... 1100 0000 + __m512i one = _mm512_set1_epi8(1); + __mmask64 next_leading = 0; + __mmask64 next_bit6 = 0; + + while (pos + 64 <= len) { + size_t written = process_valid_block_from_utf8_to_latin1( + buf + pos, 64, latin_output, minus64, one, &next_leading, &next_bit6); + latin_output += written; + pos += 64; + } + + if (pos < len) { + size_t remaining = len - pos; + size_t written = + process_valid_block_from_utf8_to_latin1(buf + pos, remaining, latin_output, minus64, + one, &next_leading, &next_bit6); + latin_output += written; + } + + return (size_t)(latin_output - start); +} +/* end file src/icelake/icelake_convert_valid_utf8_to_latin1.inl.cpp */ +/* begin file src/icelake/icelake_convert_utf16_to_latin1.inl.cpp */ +// file included directly +template +size_t icelake_convert_utf16_to_latin1(const char16_t *buf, size_t len, + char *latin1_output) { + const char16_t *end = buf + len; + __m512i v_0xFF = _mm512_set1_epi16(0xff); + __m512i byteflip = _mm512_setr_epi64(0x0607040502030001, 0x0e0f0c0d0a0b0809, + 0x0607040502030001, 0x0e0f0c0d0a0b0809, + 0x0607040502030001, 0x0e0f0c0d0a0b0809, + 0x0607040502030001, 0x0e0f0c0d0a0b0809); + __m512i shufmask = _mm512_set_epi8( + 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, 0, 0, 0, 0, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 42, 40, 38, + 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0); + while (buf + 32 <= end) { + __m512i in = _mm512_loadu_si512((__m512i *)buf); + if (big_endian) { + in = _mm512_shuffle_epi8(in, byteflip); + } + if (_mm512_cmpgt_epu16_mask(in, v_0xFF)) { + return 0; + } + _mm256_storeu_si256( + (__m256i *)latin1_output, + _mm512_castsi512_si256(_mm512_permutexvar_epi8(shufmask, in))); + latin1_output += 32; + buf += 32; + } + if (buf < end) { + uint32_t mask(uint32_t(1 << (end - buf)) - 1); + __m512i in = _mm512_maskz_loadu_epi16(mask, buf); + if (big_endian) { + in = _mm512_shuffle_epi8(in, byteflip); + } + if (_mm512_cmpgt_epu16_mask(in, v_0xFF)) { + return 0; + } + _mm256_mask_storeu_epi8( + latin1_output, mask, + _mm512_castsi512_si256(_mm512_permutexvar_epi8(shufmask, in))); + } + return len; +} + +template +std::pair +icelake_convert_utf16_to_latin1_with_errors(const char16_t *buf, size_t len, + char *latin1_output) { + const char16_t *end = buf + len; + const char16_t *start = buf; + __m512i byteflip = _mm512_setr_epi64(0x0607040502030001, 0x0e0f0c0d0a0b0809, + 0x0607040502030001, 0x0e0f0c0d0a0b0809, + 0x0607040502030001, 0x0e0f0c0d0a0b0809, + 0x0607040502030001, 0x0e0f0c0d0a0b0809); + __m512i v_0xFF = _mm512_set1_epi16(0xff); + __m512i shufmask = _mm512_set_epi8( + 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, 0, 0, 0, 0, 62, 60, 58, 56, 54, 52, 50, 48, 46, 44, 42, 40, 38, + 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0); + while (buf + 32 <= end) { + __m512i in = _mm512_loadu_si512((__m512i *)buf); + if (big_endian) { + in = _mm512_shuffle_epi8(in, byteflip); + } + if (_mm512_cmpgt_epu16_mask(in, v_0xFF)) { + uint16_t word; + while ((word = (big_endian ? scalar::utf16::swap_bytes(uint16_t(*buf)) + : uint16_t(*buf))) <= 0xff) { + *latin1_output++ = uint8_t(word); + buf++; + } + return std::make_pair(result(error_code::TOO_LARGE, buf - start), + latin1_output); + } + _mm256_storeu_si256( + (__m256i *)latin1_output, + _mm512_castsi512_si256(_mm512_permutexvar_epi8(shufmask, in))); + latin1_output += 32; + buf += 32; + } + if (buf < end) { + uint32_t mask(uint32_t(1 << (end - buf)) - 1); + __m512i in = _mm512_maskz_loadu_epi16(mask, buf); + if (big_endian) { + in = _mm512_shuffle_epi8(in, byteflip); + } + if (_mm512_cmpgt_epu16_mask(in, v_0xFF)) { + + uint16_t word; + while ((word = (big_endian ? scalar::utf16::swap_bytes(uint16_t(*buf)) + : uint16_t(*buf))) <= 0xff) { + *latin1_output++ = uint8_t(word); + buf++; + } + return std::make_pair(result(error_code::TOO_LARGE, buf - start), + latin1_output); + } + _mm256_mask_storeu_epi8( + latin1_output, mask, + _mm512_castsi512_si256(_mm512_permutexvar_epi8(shufmask, in))); + } + return std::make_pair(result(error_code::SUCCESS, len), latin1_output); +} +/* end file src/icelake/icelake_convert_utf16_to_latin1.inl.cpp */ +/* begin file src/icelake/icelake_convert_utf16_to_utf8.inl.cpp */ +// file included directly + +/** + * This function converts the input (inbuf, inlen), assumed to be valid + * UTF16 (little endian) into UTF-8 (to outbuf). The number of code units written + * is written to 'outlen' and the function reports the number of input word + * consumed. + */ +template +size_t utf16_to_utf8_avx512i(const char16_t *inbuf, size_t inlen, + unsigned char *outbuf, size_t *outlen) { + __m512i in; + __mmask32 inmask = _cvtu32_mask32(0x7fffffff); + __m512i byteflip = _mm512_setr_epi64( + 0x0607040502030001, + 0x0e0f0c0d0a0b0809, + 0x0607040502030001, + 0x0e0f0c0d0a0b0809, + 0x0607040502030001, + 0x0e0f0c0d0a0b0809, + 0x0607040502030001, + 0x0e0f0c0d0a0b0809 + ); + const char16_t * const inbuf_orig = inbuf; + const unsigned char * const outbuf_orig = outbuf; + size_t adjust = 0; + int carry = 0; + + while (inlen >= 32) { + in = _mm512_loadu_si512(inbuf); + if(big_endian) { in = _mm512_shuffle_epi8(in, byteflip); } + inlen -= 31; + lastiteration: + inbuf += 31; + + failiteration: + const __mmask32 is234byte = _mm512_mask_cmp_epu16_mask( + inmask, in, _mm512_set1_epi16(0x0080), _MM_CMPINT_NLT); + + if (_ktestz_mask32_u8(inmask, is234byte)) { + // fast path for ASCII only + _mm512_mask_cvtepi16_storeu_epi8(outbuf, inmask, in); + outbuf += 31; + carry = 0; + + if (inlen < 32) { + goto tail; + } else { + continue; + } + } + + const __mmask32 is12byte = + _mm512_cmp_epu16_mask(in, _mm512_set1_epi16(0x0800), _MM_CMPINT_LT); + + if (_ktestc_mask32_u8(is12byte, inmask)) { + // fast path for 1 and 2 byte only + + const __m512i twobytes = _mm512_ternarylogic_epi32( + _mm512_slli_epi16(in, 8), _mm512_srli_epi16(in, 6), + _mm512_set1_epi16(0x3f3f), 0xa8); // (A|B)&C + in = _mm512_mask_add_epi16(in, is234byte, twobytes, + _mm512_set1_epi16(int16_t(0x80c0))); + const __m512i cmpmask = + _mm512_mask_blend_epi16(inmask, _mm512_set1_epi16(int16_t(0xffff)), + _mm512_set1_epi16(0x0800)); + const __mmask64 smoosh = _mm512_cmp_epu8_mask(in, cmpmask, _MM_CMPINT_NLT); + const __m512i out = _mm512_maskz_compress_epi8(smoosh, in); + _mm512_mask_storeu_epi8(outbuf, _cvtu64_mask64(_pext_u64(_cvtmask64_u64(smoosh), _cvtmask64_u64(smoosh))), + out); + outbuf += 31 + _mm_popcnt_u32(_cvtmask32_u32(is234byte)); + carry = 0; + + if (inlen < 32) { + goto tail; + } else { + continue; + } + } + __m512i lo = _mm512_cvtepu16_epi32(_mm512_castsi512_si256(in)); + __m512i hi = _mm512_cvtepu16_epi32(_mm512_extracti32x8_epi32(in, 1)); + + + __m512i taglo = _mm512_set1_epi32(0x8080e000); + __m512i taghi = taglo; + + const __m512i fc00masked = _mm512_and_epi32(in, _mm512_set1_epi16(int16_t(0xfc00))); + const __mmask32 hisurr = _mm512_mask_cmp_epu16_mask( + inmask, fc00masked, _mm512_set1_epi16(int16_t(0xd800)), _MM_CMPINT_EQ); + const __mmask32 losurr = _mm512_cmp_epu16_mask( + fc00masked, _mm512_set1_epi16(int16_t(0xdc00)), _MM_CMPINT_EQ); + + int carryout = 0; + if (!_kortestz_mask32_u8(hisurr, losurr)) { + // handle surrogates + + __m512i los = _mm512_alignr_epi32(hi, lo, 1); + __m512i his = _mm512_alignr_epi32(lo, hi, 1); + + const __mmask32 hisurrhi = _kshiftri_mask32(hisurr, 16); + taglo = + _mm512_mask_mov_epi32(taglo,__mmask16(hisurr), _mm512_set1_epi32(0x808080f0)); + taghi = + _mm512_mask_mov_epi32(taghi, __mmask16(hisurrhi), _mm512_set1_epi32(0x808080f0)); + + lo = _mm512_mask_slli_epi32(lo, __mmask16(hisurr), lo, 10); + hi = _mm512_mask_slli_epi32(hi, __mmask16(hisurrhi), hi, 10); + los = _mm512_add_epi32(los, _mm512_set1_epi32(0xfca02400)); + his = _mm512_add_epi32(his, _mm512_set1_epi32(0xfca02400)); + lo = _mm512_mask_add_epi32(lo, __mmask16(hisurr), lo, los); + hi = _mm512_mask_add_epi32(hi, __mmask16(hisurrhi), hi, his); + + carryout = _cvtu32_mask32(_kshiftri_mask32(hisurr, 30)); + + const uint32_t h = _cvtmask32_u32(hisurr); + const uint32_t l = _cvtmask32_u32(losurr); + // check for mismatched surrogates + if ((h + h + carry) ^ l) { + const uint32_t lonohi = l & ~(h + h + carry); + const uint32_t hinolo = h & ~(l >> 1); + inlen = _tzcnt_u32(hinolo | lonohi); + inmask = __mmask32(0x7fffffff & ((1 << inlen) - 1)); + in = _mm512_maskz_mov_epi16(inmask, in); + adjust = (int)inlen - 31; + inlen = 0; + goto failiteration; + } + } + + hi = _mm512_maskz_mov_epi32(_cvtu32_mask16(0x7fff),hi); + carry = carryout; + + __m512i mslo = + _mm512_multishift_epi64_epi8(_mm512_set1_epi64(0x20262c3200060c12), lo); + + __m512i mshi = + _mm512_multishift_epi64_epi8(_mm512_set1_epi64(0x20262c3200060c12), hi); + + const __mmask32 outmask = __mmask32(_kandn_mask64(losurr, inmask)); + const __mmask64 outmhi = _kshiftri_mask64(outmask, 16); + + const __mmask32 is1byte = __mmask32(_knot_mask64(is234byte)); + const __mmask64 is1bhi = _kshiftri_mask64(is1byte, 16); + const __mmask64 is12bhi = _kshiftri_mask64(is12byte, 16); + + taglo = + _mm512_mask_mov_epi32(taglo, __mmask16(is12byte), _mm512_set1_epi32(0x80c00000)); + taghi = + _mm512_mask_mov_epi32(taghi, __mmask16(is12bhi), _mm512_set1_epi32(0x80c00000)); + __m512i magiclo = _mm512_mask_blend_epi32(__mmask16(outmask), _mm512_set1_epi32(0xffffffff), + _mm512_set1_epi32(0x00010101)); + __m512i magichi = _mm512_mask_blend_epi32(__mmask16(outmhi), _mm512_set1_epi32(0xffffffff), + _mm512_set1_epi32(0x00010101)); + - ptr += 3*16; - } - validatedptr += 4*16; - } - { - const __m512i utf8 = _mm512_maskz_loadu_epi8((1ULL<<(end - validatedptr))-1, (const __m512i*)validatedptr); - checker.check_next_input(utf8); - } - checker.check_eof(); - if(checker.errors()) { - return {ptr, output, false}; // We found an error. - } - return {ptr, output, true}; + magiclo = _mm512_mask_blend_epi32(__mmask16(outmask), _mm512_set1_epi32(0xffffffff), + _mm512_set1_epi32(0x00010101)); + magichi = _mm512_mask_blend_epi32(__mmask16(outmhi), _mm512_set1_epi32(0xffffffff), + _mm512_set1_epi32(0x00010101)); + + mslo = _mm512_ternarylogic_epi32(mslo, _mm512_set1_epi32(0x3f3f3f3f), taglo, + 0xea); // A&B|C + mshi = _mm512_ternarylogic_epi32(mshi, _mm512_set1_epi32(0x3f3f3f3f), taghi, + 0xea); + mslo = _mm512_mask_slli_epi32(mslo, __mmask16(is1byte), lo, 24); + + mshi = _mm512_mask_slli_epi32(mshi, __mmask16(is1bhi), hi, 24); + + const __mmask64 wantlo = _mm512_cmp_epu8_mask(mslo, magiclo, _MM_CMPINT_NLT); + const __mmask64 wanthi = _mm512_cmp_epu8_mask(mshi, magichi, _MM_CMPINT_NLT); + const __m512i outlo = _mm512_maskz_compress_epi8(wantlo, mslo); + const __m512i outhi = _mm512_maskz_compress_epi8(wanthi, mshi); + const uint64_t wantlo_uint64 = _cvtmask64_u64(wantlo); + const uint64_t wanthi_uint64 = _cvtmask64_u64(wanthi); + + uint64_t advlo = _mm_popcnt_u64(wantlo_uint64); + uint64_t advhi = _mm_popcnt_u64(wanthi_uint64); + + _mm512_mask_storeu_epi8(outbuf, _cvtu64_mask64(_pext_u64(wantlo_uint64, wantlo_uint64)), outlo); + _mm512_mask_storeu_epi8(outbuf + advlo, _cvtu64_mask64(_pext_u64(wanthi_uint64, wanthi_uint64)), outhi); + outbuf += advlo + advhi; + } + outbuf -= adjust; + +tail: + if (inlen != 0) { + // We must have inlen < 31. + inmask = _cvtu32_mask32((1 << inlen) - 1); + in = _mm512_maskz_loadu_epi16(inmask, inbuf); + if(big_endian) { in = _mm512_shuffle_epi8(in, byteflip); } + adjust = inlen - 31; + inlen = 0; + goto lastiteration; + } + *outlen = (outbuf - outbuf_orig) + adjust; + return ((inbuf - inbuf_orig) + adjust); } -/* end file src/icelake/icelake_from_utf8.inl.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/icelake_convert_utf16_to_utf32.inl.cpp +/* end file src/icelake/icelake_convert_utf16_to_utf8.inl.cpp */ /* begin file src/icelake/icelake_convert_utf16_to_utf32.inl.cpp */ // file included directly @@ -17181,7 +19735,7 @@ std::tuple convert_utf16_to_utf32(const char16 0x0607040502030001, 0x0e0f0c0d0a0b0809 ); - while (buf + 32 <= end) { + while (std::distance(buf,end) >= 32) { // Always safe because buf + 32 <= end so that end - buf >= 32 bytes: __m512i in = _mm512_loadu_si512((__m512i*)buf); if(big_endian) { in = _mm512_shuffle_epi8(in, byteflip); } @@ -17203,7 +19757,7 @@ std::tuple convert_utf16_to_utf32(const char16 |1101.11aa.aaaa.aaaa|1101.10bb.bbbb.bbbb| low surrogate high surrogate */ - /* 1. Expand all words to 32-bit words + /* 1. Expand all code units to 32-bit code units in |0000.0000.0000.0000.1101.11aa.aaaa.aaaa|0000.0000.0000.0000.1101.10bb.bbbb.bbbb| */ const __m512i first = _mm512_cvtepu16_epi32(_mm512_castsi512_si256(in)); @@ -17234,7 +19788,7 @@ std::tuple convert_utf16_to_utf32(const char16 const __m512i added_second = _mm512_mask_add_epi32(aligned_second, (__mmask16)(H>>16), aligned_second, shifted_second); const __m512i utf32_second = _mm512_mask_add_epi32(added_second, (__mmask16)(H>>16), added_second, constant); - // 5. Store all valid UTF-32 words (low surrogate positions and 32nd word are invalid) + // 5. Store all valid UTF-32 code units (low surrogate positions and 32nd word are invalid) const __mmask32 valid = ~L & 0x7fffffff; // We deliberately do a _mm512_maskz_compress_epi32 followed by storeu_epi32 // to ease performance portability to Zen 4. @@ -17248,7 +19802,7 @@ std::tuple convert_utf16_to_utf32(const char16 //_mm512_storeu_epi32((__m512i *) utf32_output, compressed_second); _mm512_mask_storeu_epi32((__m512i *) utf32_output, __mmask16((1<> 30) & 0x1; } else { @@ -17257,7 +19811,7 @@ std::tuple convert_utf16_to_utf32(const char16 } } else { // no surrogates - // extend all thirty-two 16-bit words to thirty-two 32-bit words + // extend all thirty-two 16-bit code units to thirty-two 32-bit code units _mm512_storeu_si512((__m512i *)(utf32_output), _mm512_cvtepu16_epi32(_mm512_castsi512_si256(in))); _mm512_storeu_si512((__m512i *)(utf32_output) + 1, _mm512_cvtepu16_epi32(_mm512_extracti32x8_epi32(in,1))); utf32_output += 32; @@ -17268,7 +19822,80 @@ std::tuple convert_utf16_to_utf32(const char16 return std::make_tuple(buf+carry, utf32_output, true); } /* end file src/icelake/icelake_convert_utf16_to_utf32.inl.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/icelake_convert_utf32_to_utf8.inl.cpp +/* begin file src/icelake/icelake_convert_utf32_to_latin1.inl.cpp */ +// file included directly +size_t icelake_convert_utf32_to_latin1(const char32_t *buf, size_t len, + char *latin1_output) { + const char32_t *end = buf + len; + __m512i v_0xFF = _mm512_set1_epi32(0xff); + __m512i shufmask = _mm512_set_epi8( + 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, + 56, 52, 48, 44, 40, 36, 32, 28, 24, 20, 16, 12, 8, 4, 0); + while (buf + 16 <= end) { + __m512i in = _mm512_loadu_si512((__m512i *)buf); + if (_mm512_cmpgt_epu32_mask(in, v_0xFF)) { + return 0; + } + _mm_storeu_si128((__m128i *)latin1_output, + _mm512_castsi512_si128(_mm512_permutexvar_epi8(shufmask, in))); + latin1_output += 16; + buf += 16; + } + if (buf < end) { + uint16_t mask = uint16_t((1 << (end - buf)) - 1); + __m512i in = _mm512_maskz_loadu_epi32(mask, buf); + if (_mm512_cmpgt_epu32_mask(in, v_0xFF)) { + return 0; + } + _mm_mask_storeu_epi8( + latin1_output, mask, + _mm512_castsi512_si128(_mm512_permutexvar_epi8(shufmask, in))); + } + return len; +} + +std::pair +icelake_convert_utf32_to_latin1_with_errors(const char32_t *buf, size_t len, + char *latin1_output) { + const char32_t *end = buf + len; + const char32_t *start = buf; + __m512i v_0xFF = _mm512_set1_epi32(0xff); + __m512i shufmask = _mm512_set_epi8( + 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 60, + 56, 52, 48, 44, 40, 36, 32, 28, 24, 20, 16, 12, 8, 4, 0); + while (buf + 16 <= end) { + __m512i in = _mm512_loadu_si512((__m512i *)buf); + if (_mm512_cmpgt_epu32_mask(in, v_0xFF)) { + while (uint32_t(*buf) <= 0xff) { + *latin1_output++ = uint8_t(*buf++); + } + return std::make_pair(result(error_code::TOO_LARGE, buf - start), + latin1_output); + } + _mm_storeu_si128((__m128i *)latin1_output, + _mm512_castsi512_si128(_mm512_permutexvar_epi8(shufmask, in))); + latin1_output += 16; + buf += 16; + } + if (buf < end) { + uint16_t mask = uint16_t((1 << (end - buf)) - 1); + __m512i in = _mm512_maskz_loadu_epi32(mask, buf); + if (_mm512_cmpgt_epu32_mask(in, v_0xFF)) { + while (uint32_t(*buf) <= 0xff) { + *latin1_output++ = uint8_t(*buf++); + } + return std::make_pair(result(error_code::TOO_LARGE, buf - start), + latin1_output); + } + _mm_mask_storeu_epi8( + latin1_output, mask, + _mm512_castsi512_si128(_mm512_permutexvar_epi8(shufmask, in))); + } + return std::make_pair(result(error_code::SUCCESS, len), latin1_output); +} +/* end file src/icelake/icelake_convert_utf32_to_latin1.inl.cpp */ /* begin file src/icelake/icelake_convert_utf32_to_utf8.inl.cpp */ // file included directly @@ -17291,7 +19918,7 @@ std::pair avx512_convert_utf32_to_utf8(const char32_t* b __m256i nextin = _mm256_loadu_si256((__m256i*)buf+1); running_max = _mm256_max_epu32(_mm256_max_epu32(in, running_max), nextin); - // Pack 32-bit UTF-32 words to 16-bit UTF-16 words with unsigned saturation + // Pack 32-bit UTF-32 code units to 16-bit UTF-16 code units with unsigned saturation __m256i in_16 = _mm256_packus_epi32(_mm256_and_si256(in, v_7fffffff), _mm256_and_si256(nextin, v_7fffffff)); in_16 = _mm256_permute4x64_epi64(in_16, 0b11011000); @@ -17362,7 +19989,7 @@ std::pair avx512_convert_utf32_to_utf8(const char32_t* b const __m256i saturation_bytemask = _mm256_cmpeq_epi32(_mm256_and_si256(_mm256_or_si256(in, nextin), v_ffff0000), v_0000); const uint32_t saturation_bitmask = static_cast(_mm256_movemask_epi8(saturation_bytemask)); if (saturation_bitmask == 0xffffffff) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes const __m256i v_d800 = _mm256_set1_epi16((uint16_t)0xd800); forbidden_bytemask = _mm256_or_si256(forbidden_bytemask, _mm256_cmpeq_epi16(_mm256_and_si256(in_16, v_f800), v_d800)); @@ -17376,7 +20003,7 @@ std::pair avx512_convert_utf32_to_utf8(const char32_t* b 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - We expand the input word (16-bit) into two words (32-bit), thus + We expand the input word (16-bit) into two code units (32-bit), thus we have room for four bytes. However, we need five distinct bit layouts. Note that the last byte in cases #2 and #3 is the same. @@ -17387,7 +20014,7 @@ std::pair avx512_convert_utf32_to_utf8(const char32_t* b either byte 1 for case #2 or byte 2 for case #3. Note that they differ by exactly one bit. - Finally from these two words we build proper UTF-8 sequence, taking + Finally from these two code units we build proper UTF-8 sequence, taking into account the case (i.e, the number of bytes to write). */ /** @@ -17415,16 +20042,16 @@ std::pair avx512_convert_utf32_to_utf8(const char32_t* b const __m256i s4 = _mm256_xor_si256(s3, m0); #undef simdutf_vec - // 4. expand words 16-bit => 32-bit + // 4. expand code units 16-bit => 32-bit const __m256i out0 = _mm256_unpacklo_epi16(t2, s4); const __m256i out1 = _mm256_unpackhi_epi16(t2, s4); - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle const uint32_t mask = (one_byte_bitmask & 0x55555555) | (one_or_two_bytes_bitmask & 0xaaaaaaaa); // Due to the wider registers, the following path is less likely to be useful. /*if(mask == 0) { - // We only have three-byte words. Use fast path. + // We only have three-byte code units. Use fast path. const __m256i shuffle = _mm256_setr_epi8(2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1, 2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1); const __m256i utf8_0 = _mm256_shuffle_epi8(out0, shuffle); const __m256i utf8_1 = _mm256_shuffle_epi8(out1, shuffle); @@ -17536,7 +20163,7 @@ std::pair avx512_convert_utf32_to_utf8_with_errors(const char32_t return std::make_pair(result(error_code::TOO_LARGE, buf - start), utf8_output); } - // Pack 32-bit UTF-32 words to 16-bit UTF-16 words with unsigned saturation + // Pack 32-bit UTF-32 code units to 16-bit UTF-16 code units with unsigned saturation __m256i in_16 = _mm256_packus_epi32(_mm256_and_si256(in, v_7fffffff), _mm256_and_si256(nextin, v_7fffffff)); in_16 = _mm256_permute4x64_epi64(in_16, 0b11011000); @@ -17607,9 +20234,9 @@ std::pair avx512_convert_utf32_to_utf8_with_errors(const char32_t const __m256i saturation_bytemask = _mm256_cmpeq_epi32(_mm256_and_si256(_mm256_or_si256(in, nextin), v_ffff0000), v_0000); const uint32_t saturation_bitmask = static_cast(_mm256_movemask_epi8(saturation_bytemask)); if (saturation_bitmask == 0xffffffff) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes - // Check for illegal surrogate words + // Check for illegal surrogate code units const __m256i v_d800 = _mm256_set1_epi16((uint16_t)0xd800); const __m256i forbidden_bytemask = _mm256_cmpeq_epi16(_mm256_and_si256(in_16, v_f800), v_d800); if (static_cast(_mm256_movemask_epi8(forbidden_bytemask)) != 0x0) { @@ -17626,7 +20253,7 @@ std::pair avx512_convert_utf32_to_utf8_with_errors(const char32_t 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - We expand the input word (16-bit) into two words (32-bit), thus + We expand the input word (16-bit) into two code units (32-bit), thus we have room for four bytes. However, we need five distinct bit layouts. Note that the last byte in cases #2 and #3 is the same. @@ -17637,7 +20264,7 @@ std::pair avx512_convert_utf32_to_utf8_with_errors(const char32_t either byte 1 for case #2 or byte 2 for case #3. Note that they differ by exactly one bit. - Finally from these two words we build proper UTF-8 sequence, taking + Finally from these two code units we build proper UTF-8 sequence, taking into account the case (i.e, the number of bytes to write). */ /** @@ -17665,16 +20292,16 @@ std::pair avx512_convert_utf32_to_utf8_with_errors(const char32_t const __m256i s4 = _mm256_xor_si256(s3, m0); #undef simdutf_vec - // 4. expand words 16-bit => 32-bit + // 4. expand code units 16-bit => 32-bit const __m256i out0 = _mm256_unpacklo_epi16(t2, s4); const __m256i out1 = _mm256_unpackhi_epi16(t2, s4); - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle const uint32_t mask = (one_byte_bitmask & 0x55555555) | (one_or_two_bytes_bitmask & 0xaaaaaaaa); // Due to the wider registers, the following path is less likely to be useful. /*if(mask == 0) { - // We only have three-byte words. Use fast path. + // We only have three-byte code units. Use fast path. const __m256i shuffle = _mm256_setr_epi8(2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1, 2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1); const __m256i utf8_0 = _mm256_shuffle_epi8(out0, shuffle); const __m256i utf8_1 = _mm256_shuffle_epi8(out1, shuffle); @@ -17754,7 +20381,6 @@ std::pair avx512_convert_utf32_to_utf8_with_errors(const char32_t return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output); } /* end file src/icelake/icelake_convert_utf32_to_utf8.inl.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/icelake_convert_utf32_to_utf16.inl.cpp /* begin file src/icelake/icelake_convert_utf32_to_utf16.inl.cpp */ // file included directly @@ -17889,7 +20515,6 @@ std::pair avx512_convert_utf32_to_utf16_with_errors(const cha return std::make_pair(result(error_code::SUCCESS, buf - start), utf16_output); } /* end file src/icelake/icelake_convert_utf32_to_utf16.inl.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/icelake_ascii_validation.inl.cpp /* begin file src/icelake/icelake_ascii_validation.inl.cpp */ // file included directly @@ -17908,7 +20533,6 @@ bool validate_ascii(const char* buf, size_t len) { return (_mm512_test_epi8_mask(running_or, running_or) == 0); } /* end file src/icelake/icelake_ascii_validation.inl.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/icelake_utf32_validation.inl.cpp /* begin file src/icelake/icelake_utf32_validation.inl.cpp */ // file included directly @@ -17935,211 +20559,178 @@ const char32_t* validate_utf32(const char32_t* buf, size_t len) { is_zero = _mm512_xor_si512(_mm512_max_epu32(currentoffsetmax, standardoffsetmax), standardoffsetmax); if (_mm512_test_epi8_mask(is_zero, is_zero) != 0) { return nullptr; - } - - return buf; -} -/* end file src/icelake/icelake_utf32_validation.inl.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=icelake/icelake_convert_utf16_to_utf8.inl.cpp -/* begin file src/icelake/icelake_convert_utf16_to_utf8.inl.cpp */ -// file included directly - -/** - * This function converts the input (inbuf, inlen), assumed to be valid - * UTF16 (little endian) into UTF-8 (to outbuf). The number of words written - * is written to 'outlen' and the function reports the number of input word - * consumed. - */ -template -size_t utf16_to_utf8_avx512i(const char16_t *inbuf, size_t inlen, - unsigned char *outbuf, size_t *outlen) { - __m512i in; - __mmask32 inmask = _cvtu32_mask32(0x7fffffff); - __m512i byteflip = _mm512_setr_epi64( - 0x0607040502030001, - 0x0e0f0c0d0a0b0809, - 0x0607040502030001, - 0x0e0f0c0d0a0b0809, - 0x0607040502030001, - 0x0e0f0c0d0a0b0809, - 0x0607040502030001, - 0x0e0f0c0d0a0b0809 - ); - const char16_t * const inbuf_orig = inbuf; - const unsigned char * const outbuf_orig = outbuf; - size_t adjust = 0; - int carry = 0; - - while (inlen >= 32) { - in = _mm512_loadu_si512(inbuf); - if(big_endian) { in = _mm512_shuffle_epi8(in, byteflip); } - inlen -= 31; - lastiteration: - inbuf += 31; - - failiteration: - const __mmask32 is234byte = _mm512_mask_cmp_epu16_mask( - inmask, in, _mm512_set1_epi16(0x0080), _MM_CMPINT_NLT); - - if (_ktestz_mask32_u8(inmask, is234byte)) { - // fast path for ASCII only - _mm512_mask_cvtepi16_storeu_epi8(outbuf, inmask, in); - outbuf += 31; - carry = 0; - - if (inlen < 32) { - goto tail; - } else { - continue; - } - } - - const __mmask32 is12byte = - _mm512_cmp_epu16_mask(in, _mm512_set1_epi16(0x0800), _MM_CMPINT_LT); - - if (_ktestc_mask32_u8(is12byte, inmask)) { - // fast path for 1 and 2 byte only - - const __m512i twobytes = _mm512_ternarylogic_epi32( - _mm512_slli_epi16(in, 8), _mm512_srli_epi16(in, 6), - _mm512_set1_epi16(0x3f3f), 0xa8); // (A|B)&C - in = _mm512_mask_add_epi16(in, is234byte, twobytes, - _mm512_set1_epi16(int16_t(0x80c0))); - const __m512i cmpmask = - _mm512_mask_blend_epi16(inmask, _mm512_set1_epi16(int16_t(0xffff)), - _mm512_set1_epi16(0x0800)); - const __mmask64 smoosh = _mm512_cmp_epu8_mask(in, cmpmask, _MM_CMPINT_NLT); - const __m512i out = _mm512_maskz_compress_epi8(smoosh, in); - _mm512_mask_storeu_epi8(outbuf, _cvtu64_mask64(_pext_u64(_cvtmask64_u64(smoosh), _cvtmask64_u64(smoosh))), - out); - outbuf += 31 + _mm_popcnt_u32(_cvtmask32_u32(is234byte)); - carry = 0; - - if (inlen < 32) { - goto tail; - } else { - continue; - } - } - __m512i lo = _mm512_cvtepu16_epi32(_mm512_castsi512_si256(in)); - __m512i hi = _mm512_cvtepu16_epi32(_mm512_extracti32x8_epi32(in, 1)); - - - __m512i taglo = _mm512_set1_epi32(0x8080e000); - __m512i taghi = taglo; - - const __m512i fc00masked = _mm512_and_epi32(in, _mm512_set1_epi16(int16_t(0xfc00))); - const __mmask32 hisurr = _mm512_mask_cmp_epu16_mask( - inmask, fc00masked, _mm512_set1_epi16(int16_t(0xd800)), _MM_CMPINT_EQ); - const __mmask32 losurr = _mm512_cmp_epu16_mask( - fc00masked, _mm512_set1_epi16(int16_t(0xdc00)), _MM_CMPINT_EQ); - - int carryout = 0; - if (!_kortestz_mask32_u8(hisurr, losurr)) { - // handle surrogates - - __m512i los = _mm512_alignr_epi32(hi, lo, 1); - __m512i his = _mm512_alignr_epi32(lo, hi, 1); - - const __mmask32 hisurrhi = _kshiftri_mask32(hisurr, 16); - taglo = - _mm512_mask_mov_epi32(taglo,__mmask16(hisurr), _mm512_set1_epi32(0x808080f0)); - taghi = - _mm512_mask_mov_epi32(taghi, __mmask16(hisurrhi), _mm512_set1_epi32(0x808080f0)); - - lo = _mm512_mask_slli_epi32(lo, __mmask16(hisurr), lo, 10); - hi = _mm512_mask_slli_epi32(hi, __mmask16(hisurrhi), hi, 10); - los = _mm512_add_epi32(los, _mm512_set1_epi32(0xfca02400)); - his = _mm512_add_epi32(his, _mm512_set1_epi32(0xfca02400)); - lo = _mm512_mask_add_epi32(lo, __mmask16(hisurr), lo, los); - hi = _mm512_mask_add_epi32(hi, __mmask16(hisurrhi), hi, his); - - carryout = _cvtu32_mask32(_kshiftri_mask32(hisurr, 30)); - - const uint32_t h = _cvtmask32_u32(hisurr); - const uint32_t l = _cvtmask32_u32(losurr); - // check for mismatched surrogates - if ((h + h + carry) ^ l) { - const uint32_t lonohi = l & ~(h + h + carry); - const uint32_t hinolo = h & ~(l >> 1); - inlen = _tzcnt_u32(hinolo | lonohi); - inmask = __mmask32(0x7fffffff & ((1 << inlen) - 1)); - in = _mm512_maskz_mov_epi16(inmask, in); - adjust = (int)inlen - 31; - inlen = 0; - goto failiteration; - } - } - - hi = _mm512_maskz_mov_epi32(_cvtu32_mask16(0x7fff),hi); - carry = carryout; - - __m512i mslo = - _mm512_multishift_epi64_epi8(_mm512_set1_epi64(0x20262c3200060c12), lo); - - __m512i mshi = - _mm512_multishift_epi64_epi8(_mm512_set1_epi64(0x20262c3200060c12), hi); - - const __mmask32 outmask = __mmask32(_kandn_mask64(losurr, inmask)); - const __mmask64 outmhi = _kshiftri_mask64(outmask, 16); - - const __mmask32 is1byte = __mmask32(_knot_mask64(is234byte)); - const __mmask64 is1bhi = _kshiftri_mask64(is1byte, 16); - const __mmask64 is12bhi = _kshiftri_mask64(is12byte, 16); - - taglo = - _mm512_mask_mov_epi32(taglo, __mmask16(is12byte), _mm512_set1_epi32(0x80c00000)); - taghi = - _mm512_mask_mov_epi32(taghi, __mmask16(is12bhi), _mm512_set1_epi32(0x80c00000)); - __m512i magiclo = _mm512_mask_blend_epi32(__mmask16(outmask), _mm512_set1_epi32(0xffffffff), - _mm512_set1_epi32(0x00010101)); - __m512i magichi = _mm512_mask_blend_epi32(__mmask16(outmhi), _mm512_set1_epi32(0xffffffff), - _mm512_set1_epi32(0x00010101)); - - - magiclo = _mm512_mask_blend_epi32(__mmask16(outmask), _mm512_set1_epi32(0xffffffff), - _mm512_set1_epi32(0x00010101)); - magichi = _mm512_mask_blend_epi32(__mmask16(outmhi), _mm512_set1_epi32(0xffffffff), - _mm512_set1_epi32(0x00010101)); - - mslo = _mm512_ternarylogic_epi32(mslo, _mm512_set1_epi32(0x3f3f3f3f), taglo, - 0xea); // A&B|C - mshi = _mm512_ternarylogic_epi32(mshi, _mm512_set1_epi32(0x3f3f3f3f), taghi, - 0xea); - mslo = _mm512_mask_slli_epi32(mslo, __mmask16(is1byte), lo, 24); - - mshi = _mm512_mask_slli_epi32(mshi, __mmask16(is1bhi), hi, 24); - - const __mmask64 wantlo = _mm512_cmp_epu8_mask(mslo, magiclo, _MM_CMPINT_NLT); - const __mmask64 wanthi = _mm512_cmp_epu8_mask(mshi, magichi, _MM_CMPINT_NLT); - const __m512i outlo = _mm512_maskz_compress_epi8(wantlo, mslo); - const __m512i outhi = _mm512_maskz_compress_epi8(wanthi, mshi); - const uint64_t wantlo_uint64 = _cvtmask64_u64(wantlo); - const uint64_t wanthi_uint64 = _cvtmask64_u64(wanthi); + } - uint64_t advlo = _mm_popcnt_u64(wantlo_uint64); - uint64_t advhi = _mm_popcnt_u64(wanthi_uint64); + return buf; +} +/* end file src/icelake/icelake_utf32_validation.inl.cpp */ +/* begin file src/icelake/icelake_convert_latin1_to_utf8.inl.cpp */ +// file included directly - _mm512_mask_storeu_epi8(outbuf, _cvtu64_mask64(_pext_u64(wantlo_uint64, wantlo_uint64)), outlo); - _mm512_mask_storeu_epi8(outbuf + advlo, _cvtu64_mask64(_pext_u64(wanthi_uint64, wanthi_uint64)), outhi); - outbuf += advlo + advhi; +static inline size_t latin1_to_utf8_avx512_vec(__m512i input, size_t input_len, char *utf8_output, int mask_output) { + __mmask64 nonascii = _mm512_movepi8_mask(input); + size_t output_size = input_len + (size_t)count_ones(nonascii); + + // Mask to denote whether the byte is a leading byte that is not ascii + __mmask64 sixth = + _mm512_cmpge_epu8_mask(input, _mm512_set1_epi8(-64)); //binary representation of -64: 1100 0000 + + const uint64_t alternate_bits = UINT64_C(0x5555555555555555); + uint64_t ascii = ~nonascii; + // the bits in ascii are inverted and zeros are interspersed in between them + uint64_t maskA = ~_pdep_u64(ascii, alternate_bits); + uint64_t maskB = ~_pdep_u64(ascii>>32, alternate_bits); + + // interleave bytes from top and bottom halves (abcd...ABCD -> aAbBcCdD) + __m512i input_interleaved = _mm512_permutexvar_epi8(_mm512_set_epi32( + 0x3f1f3e1e, 0x3d1d3c1c, 0x3b1b3a1a, 0x39193818, + 0x37173616, 0x35153414, 0x33133212, 0x31113010, + 0x2f0f2e0e, 0x2d0d2c0c, 0x2b0b2a0a, 0x29092808, + 0x27072606, 0x25052404, 0x23032202, 0x21012000 + ), input); + + // double size of each byte, and insert the leading byte 1100 0010 + +/* +upscale the bytes to 16-bit value, adding the 0b11000000 leading byte in the process. +We adjust for the bytes that have their two most significant bits. This takes care of the first 32 bytes, assuming we interleaved the bytes. */ + __m512i outputA = _mm512_shldi_epi16(input_interleaved, _mm512_set1_epi8(-62), 8); + outputA = _mm512_mask_add_epi16( + outputA, + (__mmask32)sixth, + outputA, + _mm512_set1_epi16(1 - 0x4000)); // 1- 0x4000 = 1100 0000 0000 0001???? + + // in the second 32-bit half, set first or second option based on whether original input is leading byte (second case) or not (first case) + __m512i leadingB = _mm512_mask_blend_epi16( + (__mmask32)(sixth>>32), + _mm512_set1_epi16(0x00c2), // 0000 0000 1101 0010 + _mm512_set1_epi16(0x40c3));// 0100 0000 1100 0011 + __m512i outputB = _mm512_ternarylogic_epi32( + input_interleaved, + leadingB, + _mm512_set1_epi16((short)0xff00), + (240 & 170) ^ 204); // (input_interleaved & 0xff00) ^ leadingB + + // prune redundant bytes + outputA = _mm512_maskz_compress_epi8(maskA, outputA); + outputB = _mm512_maskz_compress_epi8(maskB, outputB); + + + size_t output_sizeA = (size_t)count_ones((uint32_t)nonascii) + 32; + + if(mask_output) { + if(input_len > 32) { // is the second half of the input vector used? + __mmask64 write_mask = _bzhi_u64(~0ULL, (unsigned int)output_sizeA); + _mm512_mask_storeu_epi8(utf8_output, write_mask, outputA); + utf8_output += output_sizeA; + write_mask = _bzhi_u64(~0ULL, (unsigned int)(output_size - output_sizeA)); + _mm512_mask_storeu_epi8(utf8_output, write_mask, outputB); + } else { + __mmask64 write_mask = _bzhi_u64(~0ULL, (unsigned int)output_size); + _mm512_mask_storeu_epi8(utf8_output, write_mask, outputA); + } + } else { + _mm512_storeu_si512(utf8_output, outputA); + utf8_output += output_sizeA; + _mm512_storeu_si512(utf8_output, outputB); } - outbuf -= adjust; + return output_size; +} + +static inline size_t latin1_to_utf8_avx512_branch(__m512i input, char *utf8_output) { + __mmask64 nonascii = _mm512_movepi8_mask(input); + if(nonascii) { + return latin1_to_utf8_avx512_vec(input, 64, utf8_output, 0); + } else { + _mm512_storeu_si512(utf8_output, input); + return 64; + } +} + +size_t latin1_to_utf8_avx512_start(const char *buf, size_t len, char *utf8_output) { + char *start = utf8_output; + size_t pos = 0; + // if there's at least 128 bytes remaining, we don't need to mask the output + for (; pos + 128 <= len; pos += 64) { + __m512i input = _mm512_loadu_si512((__m512i *)(buf + pos)); + utf8_output += latin1_to_utf8_avx512_branch(input, utf8_output); + } + // in the last 128 bytes, the first 64 may require masking the output + if (pos + 64 <= len) { + __m512i input = _mm512_loadu_si512((__m512i *)(buf + pos)); + utf8_output += latin1_to_utf8_avx512_vec(input, 64, utf8_output, 1); + pos += 64; + } + // with the last 64 bytes, the input also needs to be masked + if (pos < len) { + __mmask64 load_mask = _bzhi_u64(~0ULL, (unsigned int)(len - pos)); + __m512i input = _mm512_maskz_loadu_epi8(load_mask, (__m512i *)(buf + pos)); + utf8_output += latin1_to_utf8_avx512_vec(input, len - pos, utf8_output, 1); + } + return (size_t)(utf8_output - start); +} +/* end file src/icelake/icelake_convert_latin1_to_utf8.inl.cpp */ +/* begin file src/icelake/icelake_convert_latin1_to_utf16.inl.cpp */ +// file included directly +template +size_t icelake_convert_latin1_to_utf16(const char *latin1_input, size_t len, + char16_t *utf16_output) { + size_t rounded_len = len & ~0x1F; // Round down to nearest multiple of 32 + + __m512i byteflip = _mm512_setr_epi64(0x0607040502030001, 0x0e0f0c0d0a0b0809, + 0x0607040502030001, 0x0e0f0c0d0a0b0809, + 0x0607040502030001, 0x0e0f0c0d0a0b0809, + 0x0607040502030001, 0x0e0f0c0d0a0b0809); + for (size_t i = 0; i < rounded_len; i += 32) { + // Load 32 Latin1 characters into a 256-bit register + __m256i in = _mm256_loadu_si256((__m256i *)&latin1_input[i]); + // Zero extend each set of 8 Latin1 characters to 32 16-bit integers + __m512i out = _mm512_cvtepu8_epi16(in); + if (big_endian) { + out = _mm512_shuffle_epi8(out, byteflip); + } + // Store the results back to memory + _mm512_storeu_si512((__m512i *)&utf16_output[i], out); + } + if (rounded_len != len) { + uint32_t mask = uint32_t(1 << (len - rounded_len)) - 1; + __m256i in = _mm256_maskz_loadu_epi8(mask, latin1_input + rounded_len); -tail: - if (inlen != 0) { - // We must have inlen < 31. - inmask = _cvtu32_mask32((1 << inlen) - 1); - in = _mm512_maskz_loadu_epi16(inmask, inbuf); - if(big_endian) { in = _mm512_shuffle_epi8(in, byteflip); } - adjust = inlen - 31; - inlen = 0; - goto lastiteration; + // Zero extend each set of 8 Latin1 characters to 32 16-bit integers + __m512i out = _mm512_cvtepu8_epi16(in); + if (big_endian) { + out = _mm512_shuffle_epi8(out, byteflip); + } + // Store the results back to memory + _mm512_mask_storeu_epi16(utf16_output + rounded_len, mask, out); } - *outlen = (outbuf - outbuf_orig) + adjust; - return ((inbuf - inbuf_orig) + adjust); + + return len; } -/* end file src/icelake/icelake_convert_utf16_to_utf8.inl.cpp */ +/* end file src/icelake/icelake_convert_latin1_to_utf16.inl.cpp */ +/* begin file src/icelake/icelake_convert_latin1_to_utf32.inl.cpp */ +std::pair avx512_convert_latin1_to_utf32(const char* buf, size_t len, char32_t* utf32_output) { + size_t rounded_len = len & ~0xF; // Round down to nearest multiple of 16 + + for (size_t i = 0; i < rounded_len; i += 16) { + // Load 16 Latin1 characters into a 128-bit register + __m128i in = _mm_loadu_si128((__m128i*)&buf[i]); + + // Zero extend each set of 8 Latin1 characters to 16 32-bit integers using vpmovzxbd + __m512i out = _mm512_cvtepu8_epi32(in); + + // Store the results back to memory + _mm512_storeu_si512((__m512i*)&utf32_output[i], out); + } + + // Return pointers pointing to where we left off + return std::make_pair(buf + rounded_len, utf32_output + rounded_len); +} +/* end file src/icelake/icelake_convert_latin1_to_utf32.inl.cpp */ + + +#include } // namespace } // namespace icelake @@ -18148,7 +20739,6 @@ size_t utf16_to_utf8_avx512i(const char16_t *inbuf, size_t inlen, namespace simdutf { namespace icelake { - simdutf_warn_unused int implementation::detect_encodings(const char *input, size_t length) const noexcept { @@ -18183,7 +20773,7 @@ implementation::detect_encodings(const char *input, // be valid UTF-16LE, at least one surrogate must be in the two most // significant bytes of a 32-bit word since they always come in pairs in // UTF-16LE. Note that we always proceed in multiple of 4 before this - // point so there is no offset in 32-bit words. + // point so there is no offset in 32-bit code units. if ((surrogates & 0xaaaaaaaa) != 0) { is_utf32 = false; @@ -18199,7 +20789,7 @@ implementation::detect_encodings(const char *input, if (ends_with_high) { buf += 31 * - sizeof(char16_t); // advance only by 31 words so that we start + sizeof(char16_t); // advance only by 31 code units so that we start // with the high surrogate on the next round. } else { buf += 32 * sizeof(char16_t); @@ -18368,7 +20958,7 @@ simdutf_warn_unused bool implementation::validate_utf16le(const char16_t *buf, s } bool ends_with_high = ((highsurrogates & 0x80000000) != 0); if(ends_with_high) { - buf += 31; // advance only by 31 words so that we start with the high surrogate on the next round. + buf += 31; // advance only by 31 code units so that we start with the high surrogate on the next round. } else { buf += 32; } @@ -18417,7 +21007,7 @@ simdutf_warn_unused bool implementation::validate_utf16be(const char16_t *buf, s } bool ends_with_high = ((highsurrogates & 0x80000000) != 0); if(ends_with_high) { - buf += 31; // advance only by 31 words so that we start with the high surrogate on the next round. + buf += 31; // advance only by 31 code units so that we start with the high surrogate on the next round. } else { buf += 32; } @@ -18459,7 +21049,7 @@ simdutf_warn_unused result implementation::validate_utf16le_with_errors(const ch } bool ends_with_high = ((highsurrogates & 0x80000000) != 0); if(ends_with_high) { - buf += 31; // advance only by 31 words so that we start with the high surrogate on the next round. + buf += 31; // advance only by 31 code units so that we start with the high surrogate on the next round. } else { buf += 32; } @@ -18513,7 +21103,7 @@ simdutf_warn_unused result implementation::validate_utf16be_with_errors(const ch } bool ends_with_high = ((highsurrogates & 0x80000000) != 0); if(ends_with_high) { - buf += 31; // advance only by 31 words so that we start with the high surrogate on the next round. + buf += 31; // advance only by 31 code units so that we start with the high surrogate on the next round. } else { buf += 32; } @@ -18588,6 +21178,63 @@ simdutf_warn_unused result implementation::validate_utf32_with_errors(const char return result(error_code::SUCCESS, len); } +simdutf_warn_unused size_t implementation::convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) const noexcept { + return icelake::latin1_to_utf8_avx512_start(buf, len, utf8_output); +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + return icelake_convert_latin1_to_utf16(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf16be(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + return icelake_convert_latin1_to_utf16(buf, len, utf16_output); +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf32(const char* buf, size_t len, char32_t* utf32_output) const noexcept { + std::pair ret = avx512_convert_latin1_to_utf32(buf, len, utf32_output); + if (ret.first == nullptr) { return 0; } + size_t converted_chars = ret.second - utf32_output; + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf32::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_converted_chars == 0) { return 0; } + converted_chars += scalar_converted_chars; + } + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_utf8_to_latin1(const char* buf, size_t len, char* latin1_output) const noexcept { + return icelake::utf8_to_latin1_avx512(buf, len, latin1_output); +} + + +simdutf_warn_unused result implementation::convert_utf8_to_latin1_with_errors(const char* buf, size_t len, char* latin1_output) const noexcept { + // Initialize output length and input length counters + size_t inlen = 0; + + // First, try to convert as much as possible using the SIMD implementation. + inlen = icelake::utf8_to_latin1_avx512(buf, len, latin1_output); + + // If we have completely converted the string + if(inlen == len) { + return {simdutf::SUCCESS, len}; + } + + // Else if there are remaining bytes, use the scalar function to process them. + // Note: This is assuming scalar::utf8_to_latin1::convert_with_errors is a function that takes + // the input buffer, length, and output buffer, and returns a result object with an error code + // and the number of characters processed. + result res = scalar::utf8_to_latin1::convert_with_errors(buf + inlen, len - inlen, latin1_output + inlen); + res.count += inlen; // Add the number of characters processed by the SIMD implementation + + return res; +} + + +simdutf_warn_unused size_t implementation::convert_valid_utf8_to_latin1(const char* buf, size_t len, char* latin1_output) const noexcept { + return icelake::valid_utf8_to_latin1_avx512(buf, len, latin1_output); +} + simdutf_warn_unused size_t implementation::convert_utf8_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { utf8_to_utf16_result ret = fast_avx512_convert_utf8_to_utf16(buf, len, utf16_output); if (ret.second == nullptr) { @@ -18767,6 +21414,33 @@ simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf32(const cha return saved_bytes; } + +simdutf_warn_unused size_t implementation::convert_utf16le_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + return icelake_convert_utf16_to_latin1(buf,len,latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_utf16be_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + return icelake_convert_utf16_to_latin1(buf,len,latin1_output); +} + +simdutf_warn_unused result implementation::convert_utf16le_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + return icelake_convert_utf16_to_latin1_with_errors(buf,len,latin1_output).first; +} + +simdutf_warn_unused result implementation::convert_utf16be_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + return icelake_convert_utf16_to_latin1_with_errors(buf,len,latin1_output).first; +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + // optimization opportunity: implement custom function + return convert_utf16be_to_latin1(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + // optimization opportunity: implement custom function + return convert_utf16le_to_latin1(buf, len, latin1_output); +} + simdutf_warn_unused size_t implementation::convert_utf16le_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { size_t outlen; size_t inlen = utf16_to_utf8_avx512i(buf, len, (unsigned char*)utf8_output, &outlen); @@ -18811,6 +21485,18 @@ simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_utf8(const c return convert_utf16be_to_utf8(buf, len, utf8_output); } +simdutf_warn_unused size_t implementation::convert_utf32_to_latin1(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + return icelake_convert_utf32_to_latin1(buf,len,latin1_output); +} + +simdutf_warn_unused result implementation::convert_utf32_to_latin1_with_errors(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + return icelake_convert_utf32_to_latin1_with_errors(buf,len,latin1_output).first; +} + +simdutf_warn_unused size_t implementation::convert_valid_utf32_to_latin1(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + return icelake_convert_utf32_to_latin1(buf,len,latin1_output); +} + simdutf_warn_unused size_t implementation::convert_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) const noexcept { std::pair ret = avx512_convert_utf32_to_utf8(buf, len, utf8_output); @@ -18826,7 +21512,7 @@ simdutf_warn_unused size_t implementation::convert_utf32_to_utf8(const char32_t* } simdutf_warn_unused result implementation::convert_utf32_to_utf8_with_errors(const char32_t* buf, size_t len, char* utf8_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = icelake::avx512_convert_utf32_to_utf8_with_errors(buf, len, utf8_output); if (ret.first.count != len) { result scalar_res = scalar::utf32_to_utf8::convert_with_errors( @@ -18838,7 +21524,7 @@ simdutf_warn_unused result implementation::convert_utf32_to_utf8_with_errors(con ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written return ret.first; } @@ -18873,7 +21559,7 @@ simdutf_warn_unused size_t implementation::convert_utf32_to_utf16be(const char32 } simdutf_warn_unused result implementation::convert_utf32_to_utf16le_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = avx512_convert_utf32_to_utf16_with_errors(buf, len, utf16_output); if (ret.first.count != len) { result scalar_res = scalar::utf32_to_utf16::convert_with_errors( @@ -18885,12 +21571,12 @@ simdutf_warn_unused result implementation::convert_utf32_to_utf16le_with_errors( ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written return ret.first; } simdutf_warn_unused result implementation::convert_utf32_to_utf16be_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = avx512_convert_utf32_to_utf16_with_errors(buf, len, utf16_output); if (ret.first.count != len) { result scalar_res = scalar::utf32_to_utf16::convert_with_errors( @@ -18902,7 +21588,7 @@ simdutf_warn_unused result implementation::convert_utf32_to_utf16be_with_errors( ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written return ret.first; } @@ -19088,23 +21774,75 @@ simdutf_warn_unused size_t implementation::count_utf16be(const char16_t * input, simdutf_warn_unused size_t implementation::count_utf8(const char * input, size_t length) const noexcept { - const char* end = length >= 64 ? input + length - 64 : nullptr; - const char* ptr = input; + const uint8_t *str = reinterpret_cast(input); + size_t answer = length / sizeof(__m512i) * sizeof(__m512i); // Number of 512-bit chunks that fits into the length. + size_t i = 0; + __m512i unrolled_popcount{0}; const __m512i continuation = _mm512_set1_epi8(char(0b10111111)); - size_t count{0}; + while (i + sizeof(__m512i) <= length) { + size_t iterations = (length - i) / sizeof(__m512i); - while (ptr <= end) { - __m512i utf8 = _mm512_loadu_si512((const __m512i*)ptr); - ptr += 64; - uint64_t continuation_bitmask = static_cast(_mm512_cmple_epi8_mask(utf8, continuation)); - count += 64 - count_ones(continuation_bitmask); + size_t max_i = i + iterations * sizeof(__m512i) - sizeof(__m512i); + for (; i + 8*sizeof(__m512i) <= max_i; i += 8*sizeof(__m512i)) { + __m512i input1 = _mm512_loadu_si512((const __m512i *)(str + i)); + __m512i input2 = _mm512_loadu_si512((const __m512i *)(str + i + sizeof(__m512i))); + __m512i input3 = _mm512_loadu_si512((const __m512i *)(str + i + 2*sizeof(__m512i))); + __m512i input4 = _mm512_loadu_si512((const __m512i *)(str + i + 3*sizeof(__m512i))); + __m512i input5 = _mm512_loadu_si512((const __m512i *)(str + i + 4*sizeof(__m512i))); + __m512i input6 = _mm512_loadu_si512((const __m512i *)(str + i + 5*sizeof(__m512i))); + __m512i input7 = _mm512_loadu_si512((const __m512i *)(str + i + 6*sizeof(__m512i))); + __m512i input8 = _mm512_loadu_si512((const __m512i *)(str + i + 7*sizeof(__m512i))); + + + __mmask64 mask1 = _mm512_cmple_epi8_mask(input1, continuation); + __mmask64 mask2 = _mm512_cmple_epi8_mask(input2, continuation); + __mmask64 mask3 = _mm512_cmple_epi8_mask(input3, continuation); + __mmask64 mask4 = _mm512_cmple_epi8_mask(input4, continuation); + __mmask64 mask5 = _mm512_cmple_epi8_mask(input5, continuation); + __mmask64 mask6 = _mm512_cmple_epi8_mask(input6, continuation); + __mmask64 mask7 = _mm512_cmple_epi8_mask(input7, continuation); + __mmask64 mask8 = _mm512_cmple_epi8_mask(input8, continuation); + + __m512i mask_register = _mm512_set_epi64(mask8, mask7, mask6, mask5, mask4, mask3, mask2, mask1); + + + unrolled_popcount = _mm512_add_epi64(unrolled_popcount, _mm512_popcnt_epi64(mask_register)); + } + + for (; i <= max_i; i += sizeof(__m512i)) { + __m512i more_input = _mm512_loadu_si512((const __m512i *)(str + i)); + uint64_t continuation_bitmask = static_cast(_mm512_cmple_epi8_mask(more_input, continuation)); + answer -= count_ones(continuation_bitmask); + } } - return count + scalar::utf8::count_code_points(ptr, length - (ptr - input)); + __m256i first_half = _mm512_extracti64x4_epi64(unrolled_popcount, 0); + __m256i second_half = _mm512_extracti64x4_epi64(unrolled_popcount, 1); + answer -= (size_t)_mm256_extract_epi64(first_half, 0) + + (size_t)_mm256_extract_epi64(first_half, 1) + + (size_t)_mm256_extract_epi64(first_half, 2) + + (size_t)_mm256_extract_epi64(first_half, 3) + + (size_t)_mm256_extract_epi64(second_half, 0) + + (size_t)_mm256_extract_epi64(second_half, 1) + + (size_t)_mm256_extract_epi64(second_half, 2) + + (size_t)_mm256_extract_epi64(second_half, 3); + + return answer + scalar::utf8::count_code_points(reinterpret_cast(str + i), length - i); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf8(const char* buf, size_t len) const noexcept { + return count_utf8(buf,len); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf16(size_t length) const noexcept { + return scalar::utf16::latin1_length_from_utf16(length); } +simdutf_warn_unused size_t implementation::latin1_length_from_utf32(size_t length) const noexcept { + return scalar::utf32::latin1_length_from_utf32(length); +} simdutf_warn_unused size_t implementation::utf8_length_from_utf16le(const char16_t * input, size_t length) const noexcept { const char16_t* end = length >= 32 ? input + length - 32 : nullptr; @@ -19183,6 +21921,76 @@ simdutf_warn_unused size_t implementation::utf32_length_from_utf16be(const char1 return implementation::count_utf16be(input, length); } +simdutf_warn_unused size_t implementation::utf16_length_from_latin1(size_t length) const noexcept { + return scalar::latin1::utf16_length_from_latin1(length); +} + + +simdutf_warn_unused size_t implementation::utf32_length_from_latin1(size_t length) const noexcept { + return scalar::latin1::utf32_length_from_latin1(length); +} + +simdutf_warn_unused size_t implementation::utf8_length_from_latin1(const char * input, size_t length) const noexcept { + const uint8_t *str = reinterpret_cast(input); + size_t answer = length / sizeof(__m512i) * sizeof(__m512i); + size_t i = 0; + unsigned char v_0xFF = 0xff; + __m512i eight_64bits = _mm512_setzero_si512(); + while (i + sizeof(__m512i) <= length) { + __m512i runner = _mm512_setzero_si512(); + size_t iterations = (length - i) / sizeof(__m512i); + if (iterations > 255) { + iterations = 255; + } + size_t max_i = i + iterations * sizeof(__m512i) - sizeof(__m512i); + for (; i + 4*sizeof(__m512i) <= max_i; i += 4*sizeof(__m512i)) { + // Load four __m512i vectors + __m512i input1 = _mm512_loadu_si512((const __m512i *)(str + i)); + __m512i input2 = _mm512_loadu_si512((const __m512i *)(str + i + sizeof(__m512i))); + __m512i input3 = _mm512_loadu_si512((const __m512i *)(str + i + 2*sizeof(__m512i))); + __m512i input4 = _mm512_loadu_si512((const __m512i *)(str + i + 3*sizeof(__m512i))); + + // Generate four masks + __mmask64 mask1 = _mm512_cmpgt_epi8_mask(_mm512_setzero_si512(), input1); + __mmask64 mask2 = _mm512_cmpgt_epi8_mask(_mm512_setzero_si512(), input2); + __mmask64 mask3 = _mm512_cmpgt_epi8_mask(_mm512_setzero_si512(), input3); + __mmask64 mask4 = _mm512_cmpgt_epi8_mask(_mm512_setzero_si512(), input4); + // Apply the masks and subtract from the runner + __m512i not_ascii1 = _mm512_mask_set1_epi8(_mm512_setzero_si512(), mask1, v_0xFF); + __m512i not_ascii2 = _mm512_mask_set1_epi8(_mm512_setzero_si512(), mask2, v_0xFF); + __m512i not_ascii3 = _mm512_mask_set1_epi8(_mm512_setzero_si512(), mask3, v_0xFF); + __m512i not_ascii4 = _mm512_mask_set1_epi8(_mm512_setzero_si512(), mask4, v_0xFF); + + runner = _mm512_sub_epi8(runner, not_ascii1); + runner = _mm512_sub_epi8(runner, not_ascii2); + runner = _mm512_sub_epi8(runner, not_ascii3); + runner = _mm512_sub_epi8(runner, not_ascii4); + } + + for (; i <= max_i; i += sizeof(__m512i)) { + __m512i more_input = _mm512_loadu_si512((const __m512i *)(str + i)); + + __mmask64 mask = _mm512_cmpgt_epi8_mask(_mm512_setzero_si512(), more_input); + __m512i not_ascii = _mm512_mask_set1_epi8(_mm512_setzero_si512(), mask, v_0xFF); + runner = _mm512_sub_epi8(runner, not_ascii); + } + + eight_64bits = _mm512_add_epi64(eight_64bits, _mm512_sad_epu8(runner, _mm512_setzero_si512())); + } + + __m256i first_half = _mm512_extracti64x4_epi64(eight_64bits, 0); + __m256i second_half = _mm512_extracti64x4_epi64(eight_64bits, 1); + answer += (size_t)_mm256_extract_epi64(first_half, 0) + + (size_t)_mm256_extract_epi64(first_half, 1) + + (size_t)_mm256_extract_epi64(first_half, 2) + + (size_t)_mm256_extract_epi64(first_half, 3) + + (size_t)_mm256_extract_epi64(second_half, 0) + + (size_t)_mm256_extract_epi64(second_half, 1) + + (size_t)_mm256_extract_epi64(second_half, 2) + + (size_t)_mm256_extract_epi64(second_half, 3); + return answer + scalar::latin1::utf8_length_from_latin1(reinterpret_cast(str + i), length - i); +} + simdutf_warn_unused size_t implementation::utf16_length_from_utf8(const char * input, size_t length) const noexcept { size_t pos = 0; size_t count = 0; @@ -19252,7 +22060,6 @@ simdutf_warn_unused size_t implementation::utf32_length_from_utf8(const char * i } // namespace icelake } // namespace simdutf -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/icelake/end.h /* begin file src/simdutf/icelake/end.h */ #if SIMDUTF_CAN_ALWAYS_RUN_ICELAKE // nothing needed. @@ -19268,10 +22075,8 @@ SIMDUTF_POP_DISABLE_WARNINGS /* end file src/icelake/implementation.cpp */ #endif #if SIMDUTF_IMPLEMENTATION_HASWELL -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=haswell/implementation.cpp /* begin file src/haswell/implementation.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/haswell/begin.h /* begin file src/simdutf/haswell/begin.h */ // redefining SIMDUTF_IMPLEMENTATION to "haswell" // #define SIMDUTF_IMPLEMENTATION haswell @@ -19314,7 +22119,6 @@ simdutf_really_inline simd8 must_be_2_3_continuation(const simd8 return simd8(is_third_byte | is_fourth_byte) > int8_t(0); } -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=haswell/avx2_detect_encodings.cpp /* begin file src/haswell/avx2_detect_encodings.cpp */ template // len is known to be a multiple of 2 when this is called @@ -19358,7 +22162,7 @@ int avx2_detect_encodings(const char * buf, size_t len) { // To be valid UTF-32, a surrogate cannot be in the two most significant bytes of any 32-bit word. // On the other hand, to be valid UTF-16LE, at least one surrogate must be in the two most significant // bytes of a 32-bit word since they always come in pairs in UTF-16LE. - // Note that we always proceed in multiple of 4 before this point so there is no offset in 32-bit words. + // Note that we always proceed in multiple of 4 before this point so there is no offset in 32-bit code units. if ((surrogates_bitmask0 & 0xaaaaaaaa) != 0) { is_utf32 = false; @@ -19504,10 +22308,9 @@ int avx2_detect_encodings(const char * buf, size_t len) { } /* end file src/haswell/avx2_detect_encodings.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=haswell/avx2_validate_utf16.cpp /* begin file src/haswell/avx2_validate_utf16.cpp */ /* - In UTF-16 words in range 0xD800 to 0xDFFF have special meaning. + In UTF-16 code units in range 0xD800 to 0xDFFF have special meaning. In a vectorized algorithm we want to examine the most significant nibble in order to select a fast path. If none of highest nibbles @@ -19543,7 +22346,7 @@ int avx2_detect_encodings(const char * buf, size_t len) { 0 0 1 0 1 0 0 0 b = a << 1 1 1 1 1 1 1 1 0 c = V | a | b ^ - the last bit can be zero, we just consume 7 words + the last bit can be zero, we just consume 7 code units and recheck this word in the next iteration */ @@ -19589,7 +22392,7 @@ const char16_t* avx2_validate_utf16(const char16_t* input, size_t size) { // // Fact: high surrogate has 11th bit set (3rd bit in the higher word) - // V - non-surrogate words + // V - non-surrogate code units // V = not surrogates_wordmask const uint32_t V = ~surrogates_bitmask; @@ -19610,10 +22413,10 @@ const char16_t* avx2_validate_utf16(const char16_t* input, size_t size) { if (c == 0xffffffff) { // The whole input register contains valid UTF-16, i.e., - // either single words or proper surrogate pairs. + // either single code units or proper surrogate pairs. input += simd16::ELEMENTS * 2; } else if (c == 0x7fffffff) { - // The 31 lower words of the input register contains valid UTF-16. + // The 31 lower code units of the input register contains valid UTF-16. // The 31 word may be either a low or high surrogate. It the next // iteration we 1) check if the low surrogate is followed by a high // one, 2) reject sole high surrogate. @@ -19667,7 +22470,7 @@ const result avx2_validate_utf16_with_errors(const char16_t* input, size_t size) // // Fact: high surrogate has 11th bit set (3rd bit in the higher word) - // V - non-surrogate words + // V - non-surrogate code units // V = not surrogates_wordmask const uint32_t V = ~surrogates_bitmask; @@ -19688,10 +22491,10 @@ const result avx2_validate_utf16_with_errors(const char16_t* input, size_t size) if (c == 0xffffffff) { // The whole input register contains valid UTF-16, i.e., - // either single words or proper surrogate pairs. + // either single code units or proper surrogate pairs. input += simd16::ELEMENTS * 2; } else if (c == 0x7fffffff) { - // The 31 lower words of the input register contains valid UTF-16. + // The 31 lower code units of the input register contains valid UTF-16. // The 31 word may be either a low or high surrogate. It the next // iteration we 1) check if the low surrogate is followed by a high // one, 2) reject sole high surrogate. @@ -19705,7 +22508,6 @@ const result avx2_validate_utf16_with_errors(const char16_t* input, size_t size) return result(error_code::SUCCESS, input - start); } /* end file src/haswell/avx2_validate_utf16.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=haswell/avx2_validate_utf32le.cpp /* begin file src/haswell/avx2_validate_utf32le.cpp */ /* Returns: - pointer to the last unprocessed character (a scalar fallback should check the rest); @@ -19771,7 +22573,145 @@ const result avx2_validate_utf32le_with_errors(const char32_t* input, size_t siz } /* end file src/haswell/avx2_validate_utf32le.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=haswell/avx2_convert_utf8_to_utf16.cpp +/* begin file src/haswell/avx2_convert_latin1_to_utf8.cpp */ +std::pair avx2_convert_latin1_to_utf8(const char *latin1_input, size_t len, + char *utf8_output) { + const char *end = latin1_input + len; + const __m256i v_0000 = _mm256_setzero_si256(); + const __m256i v_c080 = _mm256_set1_epi16((int16_t)0xc080); + const __m256i v_ff80 = _mm256_set1_epi16((int16_t)0xff80); + const size_t safety_margin = 12; + + while (latin1_input + 16 + safety_margin <= end) { + __m128i in8 = _mm_loadu_si128((__m128i *)latin1_input); + // a single 16-bit UTF-16 word can yield 1, 2 or 3 UTF-8 bytes + const __m128i v_80 = _mm_set1_epi8((char)0x80); + if (_mm_testz_si128(in8, v_80)) { // ASCII fast path!!!! + // 1. store (16 bytes) + _mm_storeu_si128((__m128i *)utf8_output, in8); + // 2. adjust pointers + latin1_input += 16; + utf8_output += 16; + continue; // we are done for this round! + } + // We proceed only with the first 16 bytes. + const __m256i in = _mm256_cvtepu8_epi16((in8)); + + // 1. prepare 2-byte values + // input 16-bit word : [0000|0000|aabb|bbbb] x 8 + // expected output : [1100|00aa|10bb|bbbb] x 8 + const __m256i v_1f00 = _mm256_set1_epi16((int16_t)0x1f00); + const __m256i v_003f = _mm256_set1_epi16((int16_t)0x003f); + + // t0 = [0000|00aa|bbbb|bb00] + const __m256i t0 = _mm256_slli_epi16(in, 2); + // t1 = [0000|00aa|0000|0000] + const __m256i t1 = _mm256_and_si256(t0, v_1f00); + // t2 = [0000|0000|00bb|bbbb] + const __m256i t2 = _mm256_and_si256(in, v_003f); + // t3 = [000a|aaaa|00bb|bbbb] + const __m256i t3 = _mm256_or_si256(t1, t2); + // t4 = [1100|00aa|10bb|bbbb] + const __m256i t4 = _mm256_or_si256(t3, v_c080); + + // 2. merge ASCII and 2-byte codewords + + // no bits set above 7th bit + const __m256i one_byte_bytemask = _mm256_cmpeq_epi16(_mm256_and_si256(in, v_ff80), v_0000); + const uint32_t one_byte_bitmask = static_cast(_mm256_movemask_epi8(one_byte_bytemask)); + + const __m256i utf8_unpacked = _mm256_blendv_epi8(t4, in, one_byte_bytemask); + + // 3. prepare bitmask for 8-bit lookup + const uint32_t M0 = one_byte_bitmask & 0x55555555; + const uint32_t M1 = M0 >> 7; + const uint32_t M2 = (M1 | M0) & 0x00ff00ff; + // 4. pack the bytes + + const uint8_t *row = + &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[uint8_t(M2)][0]; + const uint8_t *row_2 = + &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[uint8_t(M2 >> 16)] + [0]; + + const __m128i shuffle = _mm_loadu_si128((__m128i *)(row + 1)); + const __m128i shuffle_2 = _mm_loadu_si128((__m128i *)(row_2 + 1)); + + const __m256i utf8_packed = _mm256_shuffle_epi8( + utf8_unpacked, _mm256_setr_m128i(shuffle, shuffle_2)); + // 5. store bytes + _mm_storeu_si128((__m128i *)utf8_output, + _mm256_castsi256_si128(utf8_packed)); + utf8_output += row[0]; + _mm_storeu_si128((__m128i *)utf8_output, + _mm256_extractf128_si256(utf8_packed, 1)); + utf8_output += row_2[0]; + + // 6. adjust pointers + latin1_input += 16; + continue; + + } // while + return std::make_pair(latin1_input, utf8_output); +} +/* end file src/haswell/avx2_convert_latin1_to_utf8.cpp */ +/* begin file src/haswell/avx2_convert_latin1_to_utf16.cpp */ +template +std::pair avx2_convert_latin1_to_utf16(const char* latin1_input, size_t len, char16_t* utf16_output) { + size_t rounded_len = len & ~0xF; // Round down to nearest multiple of 32 + + size_t i = 0; + for (; i < rounded_len; i += 16) { + // Load 16 bytes from the address (input + i) into a xmm register + __m128i xmm0 = _mm_loadu_si128(reinterpret_cast(latin1_input + i)); + + // Zero extend each byte in xmm0 to word and put it in another xmm register + __m128i xmm1 = _mm_cvtepu8_epi16(xmm0); + + // Shift xmm0 to the right by 8 bytes + xmm0 = _mm_srli_si128(xmm0, 8); + + // Zero extend each byte in the shifted xmm0 to word in xmm0 + xmm0 = _mm_cvtepu8_epi16(xmm0); + + if (big_endian) { + const __m128i swap = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); + xmm0 = _mm_shuffle_epi8(xmm0, swap); + xmm1 = _mm_shuffle_epi8(xmm1, swap); + } + + // Store the contents of xmm1 into the address pointed by (output + i) + _mm_storeu_si128(reinterpret_cast<__m128i*>(utf16_output + i), xmm1); + + // Store the contents of xmm0 into the address pointed by (output + i + 8) + _mm_storeu_si128(reinterpret_cast<__m128i*>(utf16_output + i + 8), xmm0); + } + + return std::make_pair(latin1_input + rounded_len, utf16_output + rounded_len); + +} +/* end file src/haswell/avx2_convert_latin1_to_utf16.cpp */ +/* begin file src/haswell/avx2_convert_latin1_to_utf32.cpp */ +std::pair avx2_convert_latin1_to_utf32(const char* buf, size_t len, char32_t* utf32_output) { + size_t rounded_len = ((len | 7) ^ 7); // Round down to nearest multiple of 8 + + for (size_t i = 0; i < rounded_len; i += 8) { + // Load 8 Latin1 characters into a 64-bit register + __m128i in = _mm_loadl_epi64((__m128i*)&buf[i]); + + // Zero extend each set of 8 Latin1 characters to 8 32-bit integers using vpmovzxbd + __m256i out = _mm256_cvtepu8_epi32(in); + + // Store the results back to memory + _mm256_storeu_si256((__m256i*)&utf32_output[i], out); + } + + // return pointers pointing to where we left off + return std::make_pair(buf + rounded_len, utf32_output + rounded_len); +} + +/* end file src/haswell/avx2_convert_latin1_to_utf32.cpp */ + /* begin file src/haswell/avx2_convert_utf8_to_utf16.cpp */ // depends on "tables/utf8_to_utf16_tables.h" @@ -19811,7 +22751,7 @@ size_t convert_masked_utf8_to_utf16(const char *input, return 16; // We consumed 16 bytes. } if(((utf8_end_of_code_point_mask & 0xffff) == 0xaaaa)) { - // We want to take 8 2-byte UTF-8 words and turn them into 8 2-byte UTF-16 words. + // We want to take 8 2-byte UTF-8 code units and turn them into 8 2-byte UTF-16 code units. // There is probably a more efficient sequence, but the following might do. const __m128i sh = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -19824,7 +22764,7 @@ size_t convert_masked_utf8_to_utf16(const char *input, return 16; } if(input_utf8_end_of_code_point_mask == 0x924) { - // We want to take 4 3-byte UTF-8 words and turn them into 4 2-byte UTF-16 words. + // We want to take 4 3-byte UTF-8 code units and turn them into 4 2-byte UTF-16 code units. // There is probably a more efficient sequence, but the following might do. const __m128i sh = _mm_setr_epi8(2, 1, 0, -1, 5, 4, 3, -1, 8, 7, 6, -1, 11, 10, 9, -1); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -19850,10 +22790,10 @@ size_t convert_masked_utf8_to_utf16(const char *input, const uint8_t consumed = simdutf::tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][1]; if (idx < 64) { - // SIX (6) input code-words + // SIX (6) input code-code units // this is a relatively easy scenario - // we process SIX (6) input code-words. The max length in bytes of six code - // words spanning between 1 and 2 bytes each is 12 bytes. On processors + // we process SIX (6) input code-code units. The max length in bytes of six code + // code units spanning between 1 and 2 bytes each is 12 bytes. On processors // where pdep/pext is fast, we might be able to use a small lookup table. const __m128i sh = _mm_loadu_si128((const __m128i *)simdutf::tables::utf8_to_utf16::shufutf8[idx]); @@ -19865,7 +22805,7 @@ size_t convert_masked_utf8_to_utf16(const char *input, _mm_storeu_si128((__m128i *)utf16_output, composed); utf16_output += 6; // We wrote 12 bytes, 6 code points. There is a potential overflow of 4 bytes. } else if (idx < 145) { - // FOUR (4) input code-words + // FOUR (4) input code-code units const __m128i sh = _mm_loadu_si128((const __m128i *)simdutf::tables::utf8_to_utf16::shufutf8[idx]); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -19884,7 +22824,7 @@ size_t convert_masked_utf8_to_utf16(const char *input, _mm_storeu_si128((__m128i *)utf16_output, composed_repacked); utf16_output += 4; // Here we overflow by 8 bytes. } else if (idx < 209) { - // TWO (2) input code-words + // TWO (2) input code-code units ////////////// // There might be garbage inputs where a leading byte mascarades as a four-byte // leading byte (by being followed by 3 continuation byte), but is not greater than @@ -19954,7 +22894,6 @@ size_t convert_masked_utf8_to_utf16(const char *input, return consumed; } /* end file src/haswell/avx2_convert_utf8_to_utf16.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=haswell/avx2_convert_utf8_to_utf32.cpp /* begin file src/haswell/avx2_convert_utf8_to_utf32.cpp */ // depends on "tables/utf8_to_utf16_tables.h" @@ -19987,7 +22926,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, return 16; // We consumed 16 bytes. } if(((utf8_end_of_code_point_mask & 0xffff) == 0xaaaa)) { - // We want to take 8 2-byte UTF-8 words and turn them into 8 4-byte UTF-32 words. + // We want to take 8 2-byte UTF-8 code units and turn them into 8 4-byte UTF-32 code units. // There is probably a more efficient sequence, but the following might do. const __m128i sh = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -19999,7 +22938,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, return 16; } if(input_utf8_end_of_code_point_mask == 0x924) { - // We want to take 4 3-byte UTF-8 words and turn them into 4 4-byte UTF-32 words. + // We want to take 4 3-byte UTF-8 code units and turn them into 4 4-byte UTF-32 code units. // There is probably a more efficient sequence, but the following might do. const __m128i sh = _mm_setr_epi8(2, 1, 0, -1, 5, 4, 3, -1, 8, 7, 6, -1, 11, 10, 9, -1); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -20024,10 +22963,10 @@ size_t convert_masked_utf8_to_utf32(const char *input, const uint8_t consumed = tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][1]; if (idx < 64) { - // SIX (6) input code-words + // SIX (6) input code-code units // this is a relatively easy scenario - // we process SIX (6) input code-words. The max length in bytes of six code - // words spanning between 1 and 2 bytes each is 12 bytes. On processors + // we process SIX (6) input code-code units. The max length in bytes of six code + // code units spanning between 1 and 2 bytes each is 12 bytes. On processors // where pdep/pext is fast, we might be able to use a small lookup table. const __m128i sh = _mm_loadu_si128((const __m128i *)tables::utf8_to_utf16::shufutf8[idx]); @@ -20039,7 +22978,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, utf32_output += 6; // We wrote 24 bytes, 6 code points. There is a potential // overflow of 32 - 24 = 8 bytes. } else if (idx < 145) { - // FOUR (4) input code-words + // FOUR (4) input code-code units const __m128i sh = _mm_loadu_si128((const __m128i *)tables::utf8_to_utf16::shufutf8[idx]); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -20056,7 +22995,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, _mm_storeu_si128((__m128i *)utf32_output, composed); utf32_output += 4; } else if (idx < 209) { - // TWO (2) input code-words + // TWO (2) input code-code units const __m128i sh = _mm_loadu_si128((const __m128i *)tables::utf8_to_utf16::shufutf8[idx]); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -20083,11 +23022,97 @@ size_t convert_masked_utf8_to_utf32(const char *input, } /* end file src/haswell/avx2_convert_utf8_to_utf32.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=haswell/avx2_convert_utf16_to_utf8.cpp +/* begin file src/haswell/avx2_convert_utf16_to_latin1.cpp */ +template +std::pair +avx2_convert_utf16_to_latin1(const char16_t *buf, size_t len, + char *latin1_output) { + const char16_t *end = buf + len; + while (buf + 16 <= end) { + // Load 16 UTF-16 characters into 256-bit AVX2 register + __m256i in = _mm256_loadu_si256(reinterpret_cast(buf)); + + if (!match_system(big_endian)) { + const __m256i swap = _mm256_setr_epi8( + 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, + 21, 20, 23, 22, 25, 24, 27, 26, 29, 28, 31, 30); + in = _mm256_shuffle_epi8(in, swap); + } + + __m256i high_byte_mask = _mm256_set1_epi16((int16_t)0xFF00); + if (_mm256_testz_si256(in, high_byte_mask)) { + // Pack 16-bit characters into 8-bit and store in latin1_output + __m128i lo = _mm256_extractf128_si256(in, 0); + __m128i hi = _mm256_extractf128_si256(in, 1); + __m128i latin1_packed_lo = _mm_packus_epi16(lo, lo); + __m128i latin1_packed_hi = _mm_packus_epi16(hi, hi); + _mm_storel_epi64(reinterpret_cast<__m128i *>(latin1_output), + latin1_packed_lo); + _mm_storel_epi64(reinterpret_cast<__m128i *>(latin1_output + 8), + latin1_packed_hi); + // Adjust pointers for next iteration + buf += 16; + latin1_output += 16; + } else { + return std::make_pair(nullptr, reinterpret_cast(latin1_output)); + } + } // while + return std::make_pair(buf, latin1_output); +} + +template +std::pair +avx2_convert_utf16_to_latin1_with_errors(const char16_t *buf, size_t len, + char *latin1_output) { + const char16_t *start = buf; + const char16_t *end = buf + len; + while (buf + 16 <= end) { + __m256i in = _mm256_loadu_si256(reinterpret_cast(buf)); + + if (!big_endian) { + const __m256i swap = _mm256_setr_epi8( + 1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14, 17, 16, 19, 18, + 21, 20, 23, 22, 25, 24, 27, 26, 29, 28, 31, 30); + in = _mm256_shuffle_epi8(in, swap); + } + + __m256i high_byte_mask = _mm256_set1_epi16((int16_t)0xFF00); + if (_mm256_testz_si256(in, high_byte_mask)) { + __m128i lo = _mm256_extractf128_si256(in, 0); + __m128i hi = _mm256_extractf128_si256(in, 1); + __m128i latin1_packed_lo = _mm_packus_epi16(lo, lo); + __m128i latin1_packed_hi = _mm_packus_epi16(hi, hi); + _mm_storel_epi64(reinterpret_cast<__m128i *>(latin1_output), + latin1_packed_lo); + _mm_storel_epi64(reinterpret_cast<__m128i *>(latin1_output + 8), + latin1_packed_hi); + buf += 16; + latin1_output += 16; + } else { + // Fallback to scalar code for handling errors + for (int k = 0; k < 16; k++) { + uint16_t word = !match_system(big_endian) + ? scalar::utf16::swap_bytes(buf[k]) + : buf[k]; + if (word <= 0xff) { + *latin1_output++ = char(word); + } else { + return std::make_pair( + result{error_code::TOO_LARGE, (size_t)(buf - start + k)}, + latin1_output); + } + } + buf += 16; + } + } // while + return std::make_pair(result{error_code::SUCCESS, (size_t)(buf - start)}, + latin1_output); +} +/* end file src/haswell/avx2_convert_utf16_to_latin1.cpp */ /* begin file src/haswell/avx2_convert_utf16_to_utf8.cpp */ /* The vectorized algorithm works on single SSE register i.e., it - loads eight 16-bit words. + loads eight 16-bit code units. We consider three cases: 1. an input register contains no surrogates and each value @@ -20099,7 +23124,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, Ad 1. - When values are less than 0x0800, it means that a 16-bit words + When values are less than 0x0800, it means that a 16-bit code unit can be converted into: 1) single UTF8 byte (when it's an ASCII char) or 2) two UTF8 bytes. @@ -20113,7 +23138,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, Ad 2. - When values fit in 16-bit words, but are above 0x07ff, then + When values fit in 16-bit code units, but are above 0x07ff, then a single word may produce one, two or three UTF8 bytes. We prepare data for all these three cases in two registers. @@ -20230,7 +23255,7 @@ std::pair avx2_convert_utf16_to_utf8(const char16_t* buf // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, // it is likely an uncommon occurrence. if (surrogates_bitmask == 0x00000000) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes const __m256i dup_even = _mm256_setr_epi16(0x0000, 0x0202, 0x0404, 0x0606, 0x0808, 0x0a0a, 0x0c0c, 0x0e0e, 0x0000, 0x0202, 0x0404, 0x0606, @@ -20241,7 +23266,7 @@ std::pair avx2_convert_utf16_to_utf8(const char16_t* buf 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - We expand the input word (16-bit) into two words (32-bit), thus + We expand the input word (16-bit) into two code units (32-bit), thus we have room for four bytes. However, we need five distinct bit layouts. Note that the last byte in cases #2 and #3 is the same. @@ -20252,7 +23277,7 @@ std::pair avx2_convert_utf16_to_utf8(const char16_t* buf either byte 1 for case #2 or byte 2 for case #3. Note that they differ by exactly one bit. - Finally from these two words we build proper UTF-8 sequence, taking + Finally from these two code units we build proper UTF-8 sequence, taking into account the case (i.e, the number of bytes to write). */ /** @@ -20280,16 +23305,16 @@ std::pair avx2_convert_utf16_to_utf8(const char16_t* buf const __m256i s4 = _mm256_xor_si256(s3, m0); #undef simdutf_vec - // 4. expand words 16-bit => 32-bit + // 4. expand code units 16-bit => 32-bit const __m256i out0 = _mm256_unpacklo_epi16(t2, s4); const __m256i out1 = _mm256_unpackhi_epi16(t2, s4); - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle const uint32_t mask = (one_byte_bitmask & 0x55555555) | (one_or_two_bytes_bitmask & 0xaaaaaaaa); // Due to the wider registers, the following path is less likely to be useful. /*if(mask == 0) { - // We only have three-byte words. Use fast path. + // We only have three-byte code units. Use fast path. const __m256i shuffle = _mm256_setr_epi8(2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1, 2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1); const __m256i utf8_0 = _mm256_shuffle_epi8(out0, shuffle); const __m256i utf8_1 = _mm256_shuffle_epi8(out1, shuffle); @@ -20473,7 +23498,7 @@ std::pair avx2_convert_utf16_to_utf8_with_errors(const char16_t* // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, // it is likely an uncommon occurrence. if (surrogates_bitmask == 0x00000000) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes const __m256i dup_even = _mm256_setr_epi16(0x0000, 0x0202, 0x0404, 0x0606, 0x0808, 0x0a0a, 0x0c0c, 0x0e0e, 0x0000, 0x0202, 0x0404, 0x0606, @@ -20484,7 +23509,7 @@ std::pair avx2_convert_utf16_to_utf8_with_errors(const char16_t* 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - We expand the input word (16-bit) into two words (32-bit), thus + We expand the input word (16-bit) into two code units (32-bit), thus we have room for four bytes. However, we need five distinct bit layouts. Note that the last byte in cases #2 and #3 is the same. @@ -20495,7 +23520,7 @@ std::pair avx2_convert_utf16_to_utf8_with_errors(const char16_t* either byte 1 for case #2 or byte 2 for case #3. Note that they differ by exactly one bit. - Finally from these two words we build proper UTF-8 sequence, taking + Finally from these two code units we build proper UTF-8 sequence, taking into account the case (i.e, the number of bytes to write). */ /** @@ -20523,16 +23548,16 @@ std::pair avx2_convert_utf16_to_utf8_with_errors(const char16_t* const __m256i s4 = _mm256_xor_si256(s3, m0); #undef simdutf_vec - // 4. expand words 16-bit => 32-bit + // 4. expand code units 16-bit => 32-bit const __m256i out0 = _mm256_unpacklo_epi16(t2, s4); const __m256i out1 = _mm256_unpackhi_epi16(t2, s4); - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle const uint32_t mask = (one_byte_bitmask & 0x55555555) | (one_or_two_bytes_bitmask & 0xaaaaaaaa); // Due to the wider registers, the following path is less likely to be useful. /*if(mask == 0) { - // We only have three-byte words. Use fast path. + // We only have three-byte code units. Use fast path. const __m256i shuffle = _mm256_setr_epi8(2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1, 2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1); const __m256i utf8_0 = _mm256_shuffle_epi8(out0, shuffle); const __m256i utf8_1 = _mm256_shuffle_epi8(out1, shuffle); @@ -20616,11 +23641,10 @@ std::pair avx2_convert_utf16_to_utf8_with_errors(const char16_t* return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output); } /* end file src/haswell/avx2_convert_utf16_to_utf8.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=haswell/avx2_convert_utf16_to_utf32.cpp /* begin file src/haswell/avx2_convert_utf16_to_utf32.cpp */ /* The vectorized algorithm works on single SSE register i.e., it - loads eight 16-bit words. + loads eight 16-bit code units. We consider three cases: 1. an input register contains no surrogates and each value @@ -20632,7 +23656,7 @@ std::pair avx2_convert_utf16_to_utf8_with_errors(const char16_t* Ad 1. - When values are less than 0x0800, it means that a 16-bit words + When values are less than 0x0800, it means that a 16-bit code unit can be converted into: 1) single UTF8 byte (when it's an ASCII char) or 2) two UTF8 bytes. @@ -20646,7 +23670,7 @@ std::pair avx2_convert_utf16_to_utf8_with_errors(const char16_t* Ad 2. - When values fit in 16-bit words, but are above 0x07ff, then + When values fit in 16-bit code units, but are above 0x07ff, then a single word may produce one, two or three UTF8 bytes. We prepare data for all these three cases in two registers. @@ -20697,7 +23721,7 @@ std::pair avx2_convert_utf16_to_utf32(const char16_t // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, // it is likely an uncommon occurrence. if (surrogates_bitmask == 0x00000000) { - // case: we extend all sixteen 16-bit words to sixteen 32-bit words + // case: we extend all sixteen 16-bit code units to sixteen 32-bit code units _mm256_storeu_si256(reinterpret_cast<__m256i *>(utf32_output), _mm256_cvtepu16_epi32(_mm256_castsi256_si128(in))); _mm256_storeu_si256(reinterpret_cast<__m256i *>(utf32_output + 8), _mm256_cvtepu16_epi32(_mm256_extractf128_si256(in,1))); utf32_output += 16; @@ -20765,7 +23789,7 @@ std::pair avx2_convert_utf16_to_utf32_with_errors(const char1 // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, // it is likely an uncommon occurrence. if (surrogates_bitmask == 0x00000000) { - // case: we extend all sixteen 16-bit words to sixteen 32-bit words + // case: we extend all sixteen 16-bit code units to sixteen 32-bit code units _mm256_storeu_si256(reinterpret_cast<__m256i *>(utf32_output), _mm256_cvtepu16_epi32(_mm256_castsi256_si128(in))); _mm256_storeu_si256(reinterpret_cast<__m256i *>(utf32_output + 8), _mm256_cvtepu16_epi32(_mm256_extractf128_si256(in,1))); utf32_output += 16; @@ -20801,7 +23825,100 @@ std::pair avx2_convert_utf16_to_utf32_with_errors(const char1 } /* end file src/haswell/avx2_convert_utf16_to_utf32.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=haswell/avx2_convert_utf32_to_utf8.cpp +/* begin file src/haswell/avx2_convert_utf32_to_latin1.cpp */ +std::pair +avx2_convert_utf32_to_latin1(const char32_t *buf, size_t len, + char *latin1_output) { + const size_t rounded_len = + len & ~0x1F; // Round down to nearest multiple of 32 + + __m256i high_bytes_mask = _mm256_set1_epi32(0xFFFFFF00); + + __m256i shufmask = _mm256_set_epi8(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 12, 8, 4, 0, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 12, 8, 4, 0); + + for (size_t i = 0; i < rounded_len; i += 16) { + __m256i in1 = _mm256_loadu_si256((__m256i *)buf); + __m256i in2 = _mm256_loadu_si256((__m256i *)(buf + 8)); + + __m256i check_combined = _mm256_or_si256(in1, in2); + + if (!_mm256_testz_si256(check_combined, high_bytes_mask)) { + return std::make_pair(nullptr, latin1_output); + } + + //Turn UTF32 bytes into latin 1 bytes + __m256i shuffled1 = _mm256_shuffle_epi8(in1, shufmask); + __m256i shuffled2 = _mm256_shuffle_epi8(in2, shufmask); + + //move Latin1 bytes to their correct spot + __m256i idx1 = _mm256_set_epi32(-1, -1,-1,-1,-1,-1,4,0); + __m256i idx2 = _mm256_set_epi32(-1, -1,-1,-1,4,0,-1,-1); + __m256i reshuffled1 = _mm256_permutevar8x32_epi32(shuffled1, idx1); + __m256i reshuffled2 = _mm256_permutevar8x32_epi32(shuffled2, idx2); + + __m256i result = _mm256_or_si256(reshuffled1, reshuffled2); + _mm_storeu_si128((__m128i *)latin1_output, + _mm256_castsi256_si128(result)); + + latin1_output += 16; + buf += 16; + } + + return std::make_pair(buf, latin1_output); +} +std::pair +avx2_convert_utf32_to_latin1_with_errors(const char32_t *buf, size_t len, + char *latin1_output) { + const size_t rounded_len = + len & ~0x1F; // Round down to nearest multiple of 32 + + __m256i high_bytes_mask = _mm256_set1_epi32(0xFFFFFF00); + __m256i shufmask = _mm256_set_epi8(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, + -1, 12, 8, 4, 0, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 12, 8, 4, 0); + + const char32_t *start = buf; + + for (size_t i = 0; i < rounded_len; i += 16) { + __m256i in1 = _mm256_loadu_si256((__m256i *)buf); + __m256i in2 = _mm256_loadu_si256((__m256i *)(buf + 8)); + + __m256i check_combined = _mm256_or_si256(in1, in2); + + if (!_mm256_testz_si256(check_combined, high_bytes_mask)) { + // Fallback to scalar code for handling errors + for (int k = 0; k < 8; k++) { + char32_t codepoint = buf[k]; + if (codepoint <= 0xFF) { + *latin1_output++ = static_cast(codepoint); + } else { + return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), + latin1_output); + } + } + buf += 8; + } else { + __m256i shuffled1 = _mm256_shuffle_epi8(in1, shufmask); + __m256i shuffled2 = _mm256_shuffle_epi8(in2, shufmask); + + __m256i idx1 = _mm256_set_epi32(-1, -1, -1, -1, -1, -1, 4, 0); + __m256i idx2 = _mm256_set_epi32(-1, -1, -1, -1, 4, 0, -1, -1); + __m256i reshuffled1 = _mm256_permutevar8x32_epi32(shuffled1, idx1); + __m256i reshuffled2 = _mm256_permutevar8x32_epi32(shuffled2, idx2); + + __m256i result = _mm256_or_si256(reshuffled1, reshuffled2); + _mm_storeu_si128((__m128i *)latin1_output, _mm256_castsi256_si128(result)); + + latin1_output += 16; + buf += 16; + } + } + + return std::make_pair(result(error_code::SUCCESS, buf - start), latin1_output); +} +/* end file src/haswell/avx2_convert_utf32_to_latin1.cpp */ /* begin file src/haswell/avx2_convert_utf32_to_utf8.cpp */ std::pair avx2_convert_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) { const char32_t* end = buf + len; @@ -20821,7 +23938,7 @@ std::pair avx2_convert_utf32_to_utf8(const char32_t* buf __m256i nextin = _mm256_loadu_si256((__m256i*)buf+1); running_max = _mm256_max_epu32(_mm256_max_epu32(in, running_max), nextin); - // Pack 32-bit UTF-32 words to 16-bit UTF-16 words with unsigned saturation + // Pack 32-bit UTF-32 code units to 16-bit UTF-16 code units with unsigned saturation __m256i in_16 = _mm256_packus_epi32(_mm256_and_si256(in, v_7fffffff), _mm256_and_si256(nextin, v_7fffffff)); in_16 = _mm256_permute4x64_epi64(in_16, 0b11011000); @@ -20892,7 +24009,7 @@ std::pair avx2_convert_utf32_to_utf8(const char32_t* buf const __m256i saturation_bytemask = _mm256_cmpeq_epi32(_mm256_and_si256(_mm256_or_si256(in, nextin), v_ffff0000), v_0000); const uint32_t saturation_bitmask = static_cast(_mm256_movemask_epi8(saturation_bytemask)); if (saturation_bitmask == 0xffffffff) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes const __m256i v_d800 = _mm256_set1_epi16((uint16_t)0xd800); forbidden_bytemask = _mm256_or_si256(forbidden_bytemask, _mm256_cmpeq_epi16(_mm256_and_si256(in_16, v_f800), v_d800)); @@ -20906,7 +24023,7 @@ std::pair avx2_convert_utf32_to_utf8(const char32_t* buf 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - We expand the input word (16-bit) into two words (32-bit), thus + We expand the input word (16-bit) into two code units (32-bit), thus we have room for four bytes. However, we need five distinct bit layouts. Note that the last byte in cases #2 and #3 is the same. @@ -20917,7 +24034,7 @@ std::pair avx2_convert_utf32_to_utf8(const char32_t* buf either byte 1 for case #2 or byte 2 for case #3. Note that they differ by exactly one bit. - Finally from these two words we build proper UTF-8 sequence, taking + Finally from these two code units we build proper UTF-8 sequence, taking into account the case (i.e, the number of bytes to write). */ /** @@ -20945,16 +24062,16 @@ std::pair avx2_convert_utf32_to_utf8(const char32_t* buf const __m256i s4 = _mm256_xor_si256(s3, m0); #undef simdutf_vec - // 4. expand words 16-bit => 32-bit + // 4. expand code units 16-bit => 32-bit const __m256i out0 = _mm256_unpacklo_epi16(t2, s4); const __m256i out1 = _mm256_unpackhi_epi16(t2, s4); - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle const uint32_t mask = (one_byte_bitmask & 0x55555555) | (one_or_two_bytes_bitmask & 0xaaaaaaaa); // Due to the wider registers, the following path is less likely to be useful. /*if(mask == 0) { - // We only have three-byte words. Use fast path. + // We only have three-byte code units. Use fast path. const __m256i shuffle = _mm256_setr_epi8(2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1, 2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1); const __m256i utf8_0 = _mm256_shuffle_epi8(out0, shuffle); const __m256i utf8_1 = _mm256_shuffle_epi8(out1, shuffle); @@ -21066,7 +24183,7 @@ std::pair avx2_convert_utf32_to_utf8_with_errors(const char32_t* return std::make_pair(result(error_code::TOO_LARGE, buf - start), utf8_output); } - // Pack 32-bit UTF-32 words to 16-bit UTF-16 words with unsigned saturation + // Pack 32-bit UTF-32 code units to 16-bit UTF-16 code units with unsigned saturation __m256i in_16 = _mm256_packus_epi32(_mm256_and_si256(in, v_7fffffff), _mm256_and_si256(nextin, v_7fffffff)); in_16 = _mm256_permute4x64_epi64(in_16, 0b11011000); @@ -21137,9 +24254,9 @@ std::pair avx2_convert_utf32_to_utf8_with_errors(const char32_t* const __m256i saturation_bytemask = _mm256_cmpeq_epi32(_mm256_and_si256(_mm256_or_si256(in, nextin), v_ffff0000), v_0000); const uint32_t saturation_bitmask = static_cast(_mm256_movemask_epi8(saturation_bytemask)); if (saturation_bitmask == 0xffffffff) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes - // Check for illegal surrogate words + // Check for illegal surrogate code units const __m256i v_d800 = _mm256_set1_epi16((uint16_t)0xd800); const __m256i forbidden_bytemask = _mm256_cmpeq_epi16(_mm256_and_si256(in_16, v_f800), v_d800); if (static_cast(_mm256_movemask_epi8(forbidden_bytemask)) != 0x0) { @@ -21156,7 +24273,7 @@ std::pair avx2_convert_utf32_to_utf8_with_errors(const char32_t* 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - We expand the input word (16-bit) into two words (32-bit), thus + We expand the input word (16-bit) into two code units (32-bit), thus we have room for four bytes. However, we need five distinct bit layouts. Note that the last byte in cases #2 and #3 is the same. @@ -21167,7 +24284,7 @@ std::pair avx2_convert_utf32_to_utf8_with_errors(const char32_t* either byte 1 for case #2 or byte 2 for case #3. Note that they differ by exactly one bit. - Finally from these two words we build proper UTF-8 sequence, taking + Finally from these two code units we build proper UTF-8 sequence, taking into account the case (i.e, the number of bytes to write). */ /** @@ -21195,16 +24312,16 @@ std::pair avx2_convert_utf32_to_utf8_with_errors(const char32_t* const __m256i s4 = _mm256_xor_si256(s3, m0); #undef simdutf_vec - // 4. expand words 16-bit => 32-bit + // 4. expand code units 16-bit => 32-bit const __m256i out0 = _mm256_unpacklo_epi16(t2, s4); const __m256i out1 = _mm256_unpackhi_epi16(t2, s4); - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle const uint32_t mask = (one_byte_bitmask & 0x55555555) | (one_or_two_bytes_bitmask & 0xaaaaaaaa); // Due to the wider registers, the following path is less likely to be useful. /*if(mask == 0) { - // We only have three-byte words. Use fast path. + // We only have three-byte code units. Use fast path. const __m256i shuffle = _mm256_setr_epi8(2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1, 2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1); const __m256i utf8_0 = _mm256_shuffle_epi8(out0, shuffle); const __m256i utf8_1 = _mm256_shuffle_epi8(out1, shuffle); @@ -21279,20 +24396,84 @@ std::pair avx2_convert_utf32_to_utf8_with_errors(const char32_t* } buf += k; } - } // while + } // while + + return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output); +} +/* end file src/haswell/avx2_convert_utf32_to_utf8.cpp */ +/* begin file src/haswell/avx2_convert_utf32_to_utf16.cpp */ +template +std::pair avx2_convert_utf32_to_utf16(const char32_t* buf, size_t len, char16_t* utf16_output) { + const char32_t* end = buf + len; + + const size_t safety_margin = 12; // to avoid overruns, see issue https://github.com/simdutf/simdutf/issues/92 + __m256i forbidden_bytemask = _mm256_setzero_si256(); + + + while (buf + 8 + safety_margin <= end) { + __m256i in = _mm256_loadu_si256((__m256i*)buf); + + const __m256i v_00000000 = _mm256_setzero_si256(); + const __m256i v_ffff0000 = _mm256_set1_epi32((int32_t)0xffff0000); + + // no bits set above 16th bit <=> can pack to UTF16 without surrogate pairs + const __m256i saturation_bytemask = _mm256_cmpeq_epi32(_mm256_and_si256(in, v_ffff0000), v_00000000); + const uint32_t saturation_bitmask = static_cast(_mm256_movemask_epi8(saturation_bytemask)); + + if (saturation_bitmask == 0xffffffff) { + const __m256i v_f800 = _mm256_set1_epi32((uint32_t)0xf800); + const __m256i v_d800 = _mm256_set1_epi32((uint32_t)0xd800); + forbidden_bytemask = _mm256_or_si256(forbidden_bytemask, _mm256_cmpeq_epi32(_mm256_and_si256(in, v_f800), v_d800)); + + __m128i utf16_packed = _mm_packus_epi32(_mm256_castsi256_si128(in),_mm256_extractf128_si256(in,1)); + if (big_endian) { + const __m128i swap = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); + utf16_packed = _mm_shuffle_epi8(utf16_packed, swap); + } + _mm_storeu_si128((__m128i*)utf16_output, utf16_packed); + utf16_output += 8; + buf += 8; + } else { + size_t forward = 7; + size_t k = 0; + if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} + for(; k < forward; k++) { + uint32_t word = buf[k]; + if((word & 0xFFFF0000)==0) { + // will not generate a surrogate pair + if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(nullptr, utf16_output); } + *utf16_output++ = big_endian ? char16_t((uint16_t(word) >> 8) | (uint16_t(word) << 8)) : char16_t(word); + } else { + // will generate a surrogate pair + if (word > 0x10FFFF) { return std::make_pair(nullptr, utf16_output); } + word -= 0x10000; + uint16_t high_surrogate = uint16_t(0xD800 + (word >> 10)); + uint16_t low_surrogate = uint16_t(0xDC00 + (word & 0x3FF)); + if (big_endian) { + high_surrogate = uint16_t((high_surrogate >> 8) | (high_surrogate << 8)); + low_surrogate = uint16_t((low_surrogate >> 8) | (low_surrogate << 8)); + } + *utf16_output++ = char16_t(high_surrogate); + *utf16_output++ = char16_t(low_surrogate); + } + } + buf += k; + } + } - return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output); + // check for invalid input + if (static_cast(_mm256_movemask_epi8(forbidden_bytemask)) != 0) { return std::make_pair(nullptr, utf16_output); } + + return std::make_pair(buf, utf16_output); } -/* end file src/haswell/avx2_convert_utf32_to_utf8.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=haswell/avx2_convert_utf32_to_utf16.cpp -/* begin file src/haswell/avx2_convert_utf32_to_utf16.cpp */ + + template -std::pair avx2_convert_utf32_to_utf16(const char32_t* buf, size_t len, char16_t* utf16_output) { +std::pair avx2_convert_utf32_to_utf16_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) { + const char32_t* start = buf; const char32_t* end = buf + len; const size_t safety_margin = 12; // to avoid overruns, see issue https://github.com/simdutf/simdutf/issues/92 - __m256i forbidden_bytemask = _mm256_setzero_si256(); - while (buf + 8 + safety_margin <= end) { __m256i in = _mm256_loadu_si256((__m256i*)buf); @@ -21307,7 +24488,10 @@ std::pair avx2_convert_utf32_to_utf16(const char32_t if (saturation_bitmask == 0xffffffff) { const __m256i v_f800 = _mm256_set1_epi32((uint32_t)0xf800); const __m256i v_d800 = _mm256_set1_epi32((uint32_t)0xd800); - forbidden_bytemask = _mm256_or_si256(forbidden_bytemask, _mm256_cmpeq_epi32(_mm256_and_si256(in, v_f800), v_d800)); + const __m256i forbidden_bytemask = _mm256_cmpeq_epi32(_mm256_and_si256(in, v_f800), v_d800); + if (static_cast(_mm256_movemask_epi8(forbidden_bytemask)) != 0x0) { + return std::make_pair(result(error_code::SURROGATE, buf - start), utf16_output); + } __m128i utf16_packed = _mm_packus_epi32(_mm256_castsi256_si128(in),_mm256_extractf128_si256(in,1)); if (big_endian) { @@ -21325,11 +24509,11 @@ std::pair avx2_convert_utf32_to_utf16(const char32_t uint32_t word = buf[k]; if((word & 0xFFFF0000)==0) { // will not generate a surrogate pair - if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(nullptr, utf16_output); } + if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf16_output); } *utf16_output++ = big_endian ? char16_t((uint16_t(word) >> 8) | (uint16_t(word) << 8)) : char16_t(word); } else { // will generate a surrogate pair - if (word > 0x10FFFF) { return std::make_pair(nullptr, utf16_output); } + if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), utf16_output); } word -= 0x10000; uint16_t high_surrogate = uint16_t(0xD800 + (word >> 10)); uint16_t low_surrogate = uint16_t(0xDC00 + (word & 0x3FF)); @@ -21345,185 +24529,580 @@ std::pair avx2_convert_utf32_to_utf16(const char32_t } } - // check for invalid input - if (static_cast(_mm256_movemask_epi8(forbidden_bytemask)) != 0) { return std::make_pair(nullptr, utf16_output); } + return std::make_pair(result(error_code::SUCCESS, buf - start), utf16_output); +} +/* end file src/haswell/avx2_convert_utf32_to_utf16.cpp */ + +/* begin file src/haswell/avx2_convert_utf8_to_latin1.cpp */ +// depends on "tables/utf8_to_utf16_tables.h" + +// Convert up to 12 bytes from utf8 to latin1 using a mask indicating the +// end of the code points. Only the least significant 12 bits of the mask +// are accessed. +// It returns how many bytes were consumed (up to 12). +size_t convert_masked_utf8_to_latin1(const char *input, + uint64_t utf8_end_of_code_point_mask, + char *&latin1_output) { + // we use an approach where we try to process up to 12 input bytes. + // Why 12 input bytes and not 16? Because we are concerned with the size of + // the lookup tables. Also 12 is nicely divisible by two and three. + // + // + // Optimization note: our main path below is load-latency dependent. Thus it is maybe + // beneficial to have fast paths that depend on branch prediction but have less latency. + // This results in more instructions but, potentially, also higher speeds. + // + const __m128i in = _mm_loadu_si128((__m128i *)input); + const __m128i in_second_half = _mm_loadu_si128((__m128i *)(input + 16)); + + const uint16_t input_utf8_end_of_code_point_mask = + utf8_end_of_code_point_mask & 0xfff; //we're only processing 12 bytes in case it`s not all ASCII + + if((input_utf8_end_of_code_point_mask & 0xffffffff) == 0xffffffff) { + // Load the next 128 bits. + + // Combine the two 128-bit registers into a single 256-bit register. + __m256i in_combined = _mm256_set_m128i(in_second_half, in); + + // We process the data in chunks of 32 bytes. + _mm256_storeu_si256(reinterpret_cast<__m256i *>(latin1_output), in_combined); + + latin1_output += 32; // We wrote 32 characters. + return 32; // We consumed 32 bytes. + } + + + if(((utf8_end_of_code_point_mask & 0xffff) == 0xffff)) { + // We process the data in chunks of 16 bytes. + _mm_storeu_si128(reinterpret_cast<__m128i *>(latin1_output), in); + latin1_output += 16; // We wrote 16 characters. + return 16; // We consumed 16 bytes. + } + /// We do not have a fast path available, so we fallback. + const uint8_t idx = + tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][0]; + const uint8_t consumed = + tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][1]; + // this indicates an invalid input: + if(idx >= 64) { return consumed; } + // Here we should have (idx < 64), if not, there is a bug in the validation or elsewhere. + // SIX (6) input code-code units + // this is a relatively easy scenario + // we process SIX (6) input code-code units. The max length in bytes of six code + // code units spanning between 1 and 2 bytes each is 12 bytes. On processors + // where pdep/pext is fast, we might be able to use a small lookup table. + const __m128i sh = + _mm_loadu_si128((const __m128i *)tables::utf8_to_utf16::shufutf8[idx]); + const __m128i perm = _mm_shuffle_epi8(in, sh); + const __m128i ascii = _mm_and_si128(perm, _mm_set1_epi16(0x7f)); + const __m128i highbyte = _mm_and_si128(perm, _mm_set1_epi16(0x1f00)); + __m128i composed = _mm_or_si128(ascii, _mm_srli_epi16(highbyte, 2)); + const __m128i latin1_packed = _mm_packus_epi16(composed,composed); + // writing 8 bytes even though we only care about the first 6 bytes. + // performance note: it would be faster to use _mm_storeu_si128, we should investigate. + _mm_storel_epi64((__m128i *)latin1_output, latin1_packed); + latin1_output += 6; // We wrote 6 bytes. + return consumed; +} +/* end file src/haswell/avx2_convert_utf8_to_latin1.cpp */ + +} // unnamed namespace +} // namespace haswell +} // namespace simdutf + +/* begin file src/generic/buf_block_reader.h */ +namespace simdutf { +namespace haswell { +namespace { + +// Walks through a buffer in block-sized increments, loading the last part with spaces +template +struct buf_block_reader { +public: + simdutf_really_inline buf_block_reader(const uint8_t *_buf, size_t _len); + simdutf_really_inline size_t block_index(); + simdutf_really_inline bool has_full_block() const; + simdutf_really_inline const uint8_t *full_block() const; + /** + * Get the last block, padded with spaces. + * + * There will always be a last block, with at least 1 byte, unless len == 0 (in which case this + * function fills the buffer with spaces and returns 0. In particular, if len == STEP_SIZE there + * will be 0 full_blocks and 1 remainder block with STEP_SIZE bytes and no spaces for padding. + * + * @return the number of effective characters in the last block. + */ + simdutf_really_inline size_t get_remainder(uint8_t *dst) const; + simdutf_really_inline void advance(); +private: + const uint8_t *buf; + const size_t len; + const size_t lenminusstep; + size_t idx; +}; + +// Routines to print masks and text for debugging bitmask operations +simdutf_unused static char * format_input_text_64(const uint8_t *text) { + static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); + for (size_t i=0; i); i++) { + buf[i] = int8_t(text[i]) < ' ' ? '_' : int8_t(text[i]); + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +// Routines to print masks and text for debugging bitmask operations +simdutf_unused static char * format_input_text(const simd8x64& in) { + static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] < ' ') { buf[i] = '_'; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdutf_unused static char * format_mask(uint64_t mask) { + static char *buf = reinterpret_cast(malloc(64 + 1)); + for (size_t i=0; i<64; i++) { + buf[i] = (mask & (size_t(1) << i)) ? 'X' : ' '; + } + buf[64] = '\0'; + return buf; +} + +template +simdutf_really_inline buf_block_reader::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {} + +template +simdutf_really_inline size_t buf_block_reader::block_index() { return idx; } + +template +simdutf_really_inline bool buf_block_reader::has_full_block() const { + return idx < lenminusstep; +} + +template +simdutf_really_inline const uint8_t *buf_block_reader::full_block() const { + return &buf[idx]; +} + +template +simdutf_really_inline size_t buf_block_reader::get_remainder(uint8_t *dst) const { + if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers + std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once. + std::memcpy(dst, buf + idx, len - idx); + return len - idx; +} + +template +simdutf_really_inline void buf_block_reader::advance() { + idx += STEP_SIZE; +} + +} // unnamed namespace +} // namespace haswell +} // namespace simdutf +/* end file src/generic/buf_block_reader.h */ +/* begin file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ +namespace simdutf { +namespace haswell { +namespace { +namespace utf8_validation { + +using namespace simd; + + simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) +// Bit 1 = Too Long (ASCII followed by continuation) +// Bit 2 = Overlong 3-byte +// Bit 4 = Surrogate +// Bit 5 = Overlong 2-byte +// Bit 7 = Two Continuations + constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ + // 11______ 11______ + constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ + constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ + constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ + constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ + constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ + constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ + // 11110100 101_____ + // 11110101 1001____ + // 11110101 101_____ + // 1111011_ 1001____ + // 1111011_ 101_____ + // 11111___ 1001____ + // 11111___ 101_____ + constexpr const uint8_t TOO_LARGE_1000 = 1<<6; + // 11110101 1000____ + // 1111011_ 1000____ + // 11111___ 1000____ + constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + + const simd8 byte_1_high = prev1.shr<4>().lookup_16( + // 0_______ ________ + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + // 10______ ________ + TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, + // 1100____ ________ + TOO_SHORT | OVERLONG_2, + // 1101____ ________ + TOO_SHORT, + // 1110____ ________ + TOO_SHORT | OVERLONG_3 | SURROGATE, + // 1111____ ________ + TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + ); + constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . + const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( + // ____0000 ________ + CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, + // ____0001 ________ + CARRY | OVERLONG_2, + // ____001_ ________ + CARRY, + CARRY, + + // ____0100 ________ + CARRY | TOO_LARGE, + // ____0101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____011_ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + + // ____1___ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____1101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000 + ); + const simd8 byte_2_high = input.shr<4>().lookup_16( + // ________ 0_______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, - return std::make_pair(buf, utf16_output); -} + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, + const simd8 prev_input, const simd8 sc) { + simd8 prev2 = input.prev<2>(prev_input); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; + } -template -std::pair avx2_convert_utf32_to_utf16_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) { - const char32_t* start = buf; - const char32_t* end = buf + len; + // + // Return nonzero if there are incomplete multibyte characters at the end of the block: + // e.g. if there is a 4-byte character, but it's 3 bytes from the end. + // + simdutf_really_inline simd8 is_incomplete(const simd8 input) { + // If the previous input's last 3 bytes match this, they're too short (they ended at EOF): + // ... 1111____ 111_____ 11______ + static const uint8_t max_array[32] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0b11110000u-1, 0b11100000u-1, 0b11000000u-1 + }; + const simd8 max_value(&max_array[sizeof(max_array)-sizeof(simd8)]); + return input.gt_bits(max_value); + } - const size_t safety_margin = 12; // to avoid overruns, see issue https://github.com/simdutf/simdutf/issues/92 + struct utf8_checker { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; + // The last input we received + simd8 prev_input_block; + // Whether the last input we received was incomplete (used for ASCII fast path) + simd8 prev_incomplete; - while (buf + 8 + safety_margin <= end) { - __m256i in = _mm256_loadu_si256((__m256i*)buf); + // + // Check whether the current bytes are valid UTF-8. + // + simdutf_really_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + simd8 sc = check_special_cases(input, prev1); + this->error |= check_multibyte_lengths(input, prev_input, sc); + } - const __m256i v_00000000 = _mm256_setzero_si256(); - const __m256i v_ffff0000 = _mm256_set1_epi32((int32_t)0xffff0000); + // The only problem that can happen at EOF is that a multibyte character is too short + // or a byte value too large in the last bytes: check_special_cases only checks for bytes + // too large in the first of two bytes. + simdutf_really_inline void check_eof() { + // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't + // possibly finish them. + this->error |= this->prev_incomplete; + } - // no bits set above 16th bit <=> can pack to UTF16 without surrogate pairs - const __m256i saturation_bytemask = _mm256_cmpeq_epi32(_mm256_and_si256(in, v_ffff0000), v_00000000); - const uint32_t saturation_bitmask = static_cast(_mm256_movemask_epi8(saturation_bytemask)); + simdutf_really_inline void check_next_input(const simd8x64& input) { + if(simdutf_likely(is_ascii(input))) { + this->error |= this->prev_incomplete; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + this->prev_incomplete = is_incomplete(input.chunks[simd8x64::NUM_CHUNKS-1]); + this->prev_input_block = input.chunks[simd8x64::NUM_CHUNKS-1]; - if (saturation_bitmask == 0xffffffff) { - const __m256i v_f800 = _mm256_set1_epi32((uint32_t)0xf800); - const __m256i v_d800 = _mm256_set1_epi32((uint32_t)0xd800); - const __m256i forbidden_bytemask = _mm256_cmpeq_epi32(_mm256_and_si256(in, v_f800), v_d800); - if (static_cast(_mm256_movemask_epi8(forbidden_bytemask)) != 0x0) { - return std::make_pair(result(error_code::SURROGATE, buf - start), utf16_output); } + } - __m128i utf16_packed = _mm_packus_epi32(_mm256_castsi256_si128(in),_mm256_extractf128_si256(in,1)); - if (big_endian) { - const __m128i swap = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - utf16_packed = _mm_shuffle_epi8(utf16_packed, swap); - } - _mm_storeu_si128((__m128i*)utf16_output, utf16_packed); - utf16_output += 8; - buf += 8; - } else { - size_t forward = 7; - size_t k = 0; - if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} - for(; k < forward; k++) { - uint32_t word = buf[k]; - if((word & 0xFFFF0000)==0) { - // will not generate a surrogate pair - if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf16_output); } - *utf16_output++ = big_endian ? char16_t((uint16_t(word) >> 8) | (uint16_t(word) << 8)) : char16_t(word); - } else { - // will generate a surrogate pair - if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), utf16_output); } - word -= 0x10000; - uint16_t high_surrogate = uint16_t(0xD800 + (word >> 10)); - uint16_t low_surrogate = uint16_t(0xDC00 + (word & 0x3FF)); - if (big_endian) { - high_surrogate = uint16_t((high_surrogate >> 8) | (high_surrogate << 8)); - low_surrogate = uint16_t((low_surrogate >> 8) | (low_surrogate << 8)); - } - *utf16_output++ = char16_t(high_surrogate); - *utf16_output++ = char16_t(low_surrogate); - } - } - buf += k; + // do not forget to call check_eof! + simdutf_really_inline bool errors() const { + return this->error.any_bits_set_anywhere(); } - } - return std::make_pair(result(error_code::SUCCESS, buf - start), utf16_output); -} -/* end file src/haswell/avx2_convert_utf32_to_utf16.cpp */ + }; // struct utf8_checker +} // namespace utf8_validation + +using utf8_validation::utf8_checker; + } // unnamed namespace } // namespace haswell } // namespace simdutf - -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/buf_block_reader.h -/* begin file src/generic/buf_block_reader.h */ +/* end file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ +/* begin file src/generic/utf8_validation/utf8_validator.h */ namespace simdutf { namespace haswell { namespace { +namespace utf8_validation { -// Walks through a buffer in block-sized increments, loading the last part with spaces -template -struct buf_block_reader { -public: - simdutf_really_inline buf_block_reader(const uint8_t *_buf, size_t _len); - simdutf_really_inline size_t block_index(); - simdutf_really_inline bool has_full_block() const; - simdutf_really_inline const uint8_t *full_block() const; - /** - * Get the last block, padded with spaces. - * - * There will always be a last block, with at least 1 byte, unless len == 0 (in which case this - * function fills the buffer with spaces and returns 0. In particular, if len == STEP_SIZE there - * will be 0 full_blocks and 1 remainder block with STEP_SIZE bytes and no spaces for padding. - * - * @return the number of effective characters in the last block. - */ - simdutf_really_inline size_t get_remainder(uint8_t *dst) const; - simdutf_really_inline void advance(); -private: - const uint8_t *buf; - const size_t len; - const size_t lenminusstep; - size_t idx; -}; +/** + * Validates that the string is actual UTF-8. + */ +template +bool generic_validate_utf8(const uint8_t * input, size_t length) { + checker c{}; + buf_block_reader<64> reader(input, length); + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + c.check_next_input(in); + reader.advance(); + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + c.check_next_input(in); + reader.advance(); + c.check_eof(); + return !c.errors(); +} -// Routines to print masks and text for debugging bitmask operations -simdutf_unused static char * format_input_text_64(const uint8_t *text) { - static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); - for (size_t i=0; i); i++) { - buf[i] = int8_t(text[i]) < ' ' ? '_' : int8_t(text[i]); - } - buf[sizeof(simd8x64)] = '\0'; - return buf; +bool generic_validate_utf8(const char * input, size_t length) { + return generic_validate_utf8(reinterpret_cast(input),length); +} + +/** + * Validates that the string is actual UTF-8 and stops on errors. + */ +template +result generic_validate_utf8_with_errors(const uint8_t * input, size_t length) { + checker c{}; + buf_block_reader<64> reader(input, length); + size_t count{0}; + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + c.check_next_input(in); + if(c.errors()) { + if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk + result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input + count), length - count); + res.count += count; + return res; + } + reader.advance(); + count += 64; + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + c.check_next_input(in); + reader.advance(); + c.check_eof(); + if (c.errors()) { + if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk + result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input) + count, length - count); + res.count += count; + return res; + } else { + return result(error_code::SUCCESS, length); + } +} + +result generic_validate_utf8_with_errors(const char * input, size_t length) { + return generic_validate_utf8_with_errors(reinterpret_cast(input),length); +} + +template +bool generic_validate_ascii(const uint8_t * input, size_t length) { + buf_block_reader<64> reader(input, length); + uint8_t blocks[64]{}; + simd::simd8x64 running_or(blocks); + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + running_or |= in; + reader.advance(); + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + running_or |= in; + return running_or.is_ascii(); } -// Routines to print masks and text for debugging bitmask operations -simdutf_unused static char * format_input_text(const simd8x64& in) { - static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); - in.store(reinterpret_cast(buf)); - for (size_t i=0; i); i++) { - if (buf[i] < ' ') { buf[i] = '_'; } - } - buf[sizeof(simd8x64)] = '\0'; - return buf; +bool generic_validate_ascii(const char * input, size_t length) { + return generic_validate_ascii(reinterpret_cast(input),length); } -simdutf_unused static char * format_mask(uint64_t mask) { - static char *buf = reinterpret_cast(malloc(64 + 1)); - for (size_t i=0; i<64; i++) { - buf[i] = (mask & (size_t(1) << i)) ? 'X' : ' '; +template +result generic_validate_ascii_with_errors(const uint8_t * input, size_t length) { + buf_block_reader<64> reader(input, length); + size_t count{0}; + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + if (!in.is_ascii()) { + result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); + return result(res.error, count + res.count); + } + reader.advance(); + + count += 64; + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + if (!in.is_ascii()) { + result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); + return result(res.error, count + res.count); + } else { + return result(error_code::SUCCESS, length); } - buf[64] = '\0'; - return buf; } -template -simdutf_really_inline buf_block_reader::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {} +result generic_validate_ascii_with_errors(const char * input, size_t length) { + return generic_validate_ascii_with_errors(reinterpret_cast(input),length); +} -template -simdutf_really_inline size_t buf_block_reader::block_index() { return idx; } +} // namespace utf8_validation +} // unnamed namespace +} // namespace haswell +} // namespace simdutf +/* end file src/generic/utf8_validation/utf8_validator.h */ +// transcoding from UTF-8 to UTF-16 +/* begin file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ -template -simdutf_really_inline bool buf_block_reader::has_full_block() const { - return idx < lenminusstep; -} -template -simdutf_really_inline const uint8_t *buf_block_reader::full_block() const { - return &buf[idx]; -} +namespace simdutf { +namespace haswell { +namespace { +namespace utf8_to_utf16 { -template -simdutf_really_inline size_t buf_block_reader::get_remainder(uint8_t *dst) const { - if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers - std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once. - std::memcpy(dst, buf + idx, len - idx); - return len - idx; -} +using namespace simd; -template -simdutf_really_inline void buf_block_reader::advance() { - idx += STEP_SIZE; +template +simdutf_warn_unused size_t convert_valid(const char* input, size_t size, + char16_t* utf16_output) noexcept { + // The implementation is not specific to haswell and should be moved to the generic directory. + size_t pos = 0; + char16_t* start{utf16_output}; + const size_t safety_margin = 16; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + // this loop could be unrolled further. For example, we could process the mask + // far more than 64 bytes. + simd8x64 in(reinterpret_cast(input + pos)); + if(in.is_ascii()) { + in.store_ascii_as_utf16(utf16_output); + utf16_output += 64; + pos += 64; + } else { + // Slow path. We hope that the compiler will recognize that this is a slow path. + // Anything that is not a continuation mask is a 'leading byte', that is, the + // start of a new code point. + uint64_t utf8_continuation_mask = in.lt(-65 + 1); + // -65 is 0b10111111 in two-complement's, so largest possible continuation byte + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + // The *start* of code points is not so useful, rather, we want the *end* of code points. + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times when using solely + // the slow/regular path, and at least four times if there are fast paths. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + // + // Thus we may allow convert_masked_utf8_to_utf16 to process + // more bytes at a time under a fast-path mode where 16 bytes + // are consumed at once (e.g., when encountering ASCII). + size_t consumed = convert_masked_utf8_to_utf16(input + pos, + utf8_end_of_code_point_mask, utf16_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + utf16_output += scalar::utf8_to_utf16::convert_valid(input + pos, size - pos, utf16_output); + return utf16_output - start; } +} // namespace utf8_to_utf16 } // unnamed namespace } // namespace haswell } // namespace simdutf -/* end file src/generic/buf_block_reader.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_validation/utf8_lookup4_algorithm.h -/* begin file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ +/* end file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ +/* begin file src/generic/utf8_to_utf16/utf8_to_utf16.h */ + + namespace simdutf { namespace haswell { namespace { -namespace utf8_validation { - +namespace utf8_to_utf16 { using namespace simd; + simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { // Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) // Bit 1 = Too Long (ASCII followed by continuation) @@ -21598,323 +25177,281 @@ using namespace simd; ); const simd8 byte_2_high = input.shr<4>().lookup_16( // ________ 0_______ - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, - - // ________ 1000____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, - // ________ 1001____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, - // ________ 101_____ - TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, - TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, - - // ________ 11______ - TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT - ); - return (byte_1_high & byte_1_low & byte_2_high); - } - simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, - const simd8 prev_input, const simd8 sc) { - simd8 prev2 = input.prev<2>(prev_input); - simd8 prev3 = input.prev<3>(prev_input); - simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); - simd8 must23_80 = must23 & uint8_t(0x80); - return must23_80 ^ sc; - } - - // - // Return nonzero if there are incomplete multibyte characters at the end of the block: - // e.g. if there is a 4-byte character, but it's 3 bytes from the end. - // - simdutf_really_inline simd8 is_incomplete(const simd8 input) { - // If the previous input's last 3 bytes match this, they're too short (they ended at EOF): - // ... 1111____ 111_____ 11______ - static const uint8_t max_array[32] = { - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 0b11110000u-1, 0b11100000u-1, 0b11000000u-1 - }; - const simd8 max_value(&max_array[sizeof(max_array)-sizeof(simd8)]); - return input.gt_bits(max_value); - } - - struct utf8_checker { - // If this is nonzero, there has been a UTF-8 error. - simd8 error; - // The last input we received - simd8 prev_input_block; - // Whether the last input we received was incomplete (used for ASCII fast path) - simd8 prev_incomplete; - - // - // Check whether the current bytes are valid UTF-8. - // - simdutf_really_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { - // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes - // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) - simd8 prev1 = input.prev<1>(prev_input); - simd8 sc = check_special_cases(input, prev1); - this->error |= check_multibyte_lengths(input, prev_input, sc); - } - - // The only problem that can happen at EOF is that a multibyte character is too short - // or a byte value too large in the last bytes: check_special_cases only checks for bytes - // too large in the first of two bytes. - simdutf_really_inline void check_eof() { - // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't - // possibly finish them. - this->error |= this->prev_incomplete; - } - - simdutf_really_inline void check_next_input(const simd8x64& input) { - if(simdutf_likely(is_ascii(input))) { - this->error |= this->prev_incomplete; - } else { - // you might think that a for-loop would work, but under Visual Studio, it is not good enough. - static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), - "We support either two or four chunks per 64-byte block."); - if(simd8x64::NUM_CHUNKS == 2) { - this->check_utf8_bytes(input.chunks[0], this->prev_input_block); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - } else if(simd8x64::NUM_CHUNKS == 4) { - this->check_utf8_bytes(input.chunks[0], this->prev_input_block); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - this->check_utf8_bytes(input.chunks[2], input.chunks[1]); - this->check_utf8_bytes(input.chunks[3], input.chunks[2]); - } - this->prev_incomplete = is_incomplete(input.chunks[simd8x64::NUM_CHUNKS-1]); - this->prev_input_block = input.chunks[simd8x64::NUM_CHUNKS-1]; - - } - } - - // do not forget to call check_eof! - simdutf_really_inline bool errors() const { - return this->error.any_bits_set_anywhere(); - } + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, - }; // struct utf8_checker -} // namespace utf8_validation + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, -using utf8_validation::utf8_checker; + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, + const simd8 prev_input, const simd8 sc) { + simd8 prev2 = input.prev<2>(prev_input); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; + } -} // unnamed namespace -} // namespace haswell -} // namespace simdutf -/* end file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_validation/utf8_validator.h -/* begin file src/generic/utf8_validation/utf8_validator.h */ -namespace simdutf { -namespace haswell { -namespace { -namespace utf8_validation { -/** - * Validates that the string is actual UTF-8. - */ -template -bool generic_validate_utf8(const uint8_t * input, size_t length) { - checker c{}; - buf_block_reader<64> reader(input, length); - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - c.check_next_input(in); - reader.advance(); + struct validating_transcoder { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; + + validating_transcoder() : error(uint8_t(0)) {} + // + // Check whether the current bytes are valid UTF-8. + // + simdutf_really_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + simd8 sc = check_special_cases(input, prev1); + this->error |= check_multibyte_lengths(input, prev_input, sc); } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - c.check_next_input(in); - reader.advance(); - c.check_eof(); - return !c.errors(); -} -bool generic_validate_utf8(const char * input, size_t length) { - return generic_validate_utf8(reinterpret_cast(input),length); -} -/** - * Validates that the string is actual UTF-8 and stops on errors. - */ -template -result generic_validate_utf8_with_errors(const uint8_t * input, size_t length) { - checker c{}; - buf_block_reader<64> reader(input, length); - size_t count{0}; - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - c.check_next_input(in); - if(c.errors()) { - if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk - result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input + count), length - count); - res.count += count; - return res; + template + simdutf_really_inline size_t convert(const char* in, size_t size, char16_t* utf16_output) { + size_t pos = 0; + char16_t* start{utf16_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); } - reader.advance(); - count += 64; - } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - c.check_next_input(in); - reader.advance(); - c.check_eof(); - if (c.errors()) { - if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk - result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input) + count, length - count); - res.count += count; - return res; - } else { - return result(error_code::SUCCESS, length); + // If the input is long enough, then we have that margin-1 is the eight last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store_ascii_as_utf16(utf16_output); + utf16_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + auto zero = simd8{uint8_t(0)}; + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_utf16(in + pos, + utf8_end_of_code_point_mask, utf16_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(errors()) { return 0; } + if(pos < size) { + size_t howmany = scalar::utf8_to_utf16::convert(in + pos, size - pos, utf16_output); + if(howmany == 0) { return 0; } + utf16_output += howmany; + } + return utf16_output - start; } -} - -result generic_validate_utf8_with_errors(const char * input, size_t length) { - return generic_validate_utf8_with_errors(reinterpret_cast(input),length); -} -template -bool generic_validate_ascii(const uint8_t * input, size_t length) { - buf_block_reader<64> reader(input, length); - uint8_t blocks[64]{}; - simd::simd8x64 running_or(blocks); - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - running_or |= in; - reader.advance(); + template + simdutf_really_inline result convert_with_errors(const char* in, size_t size, char16_t* utf16_output) { + size_t pos = 0; + char16_t* start{utf16_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); + } + // If the input is long enough, then we have that margin-1 is the eight last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store_ascii_as_utf16(utf16_output); + utf16_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + auto zero = simd8{uint8_t(0)}; + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + if (errors()) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + res.count += pos; + return res; + } + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_utf16(in + pos, + utf8_end_of_code_point_mask, utf16_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(errors()) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + res.count += pos; + return res; + } + if(pos < size) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + if (res.error) { // In case of error, we want the error position + res.count += pos; + return res; + } else { // In case of success, we want the number of word written + utf16_output += res.count; + } + } + return result(error_code::SUCCESS, utf16_output - start); } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - running_or |= in; - return running_or.is_ascii(); -} - -bool generic_validate_ascii(const char * input, size_t length) { - return generic_validate_ascii(reinterpret_cast(input),length); -} -template -result generic_validate_ascii_with_errors(const uint8_t * input, size_t length) { - buf_block_reader<64> reader(input, length); - size_t count{0}; - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - if (!in.is_ascii()) { - result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); - return result(res.error, count + res.count); + simdutf_really_inline bool errors() const { + return this->error.any_bits_set_anywhere(); } - reader.advance(); - - count += 64; - } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - if (!in.is_ascii()) { - result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); - return result(res.error, count + res.count); - } else { - return result(error_code::SUCCESS, length); - } -} - -result generic_validate_ascii_with_errors(const char * input, size_t length) { - return generic_validate_ascii_with_errors(reinterpret_cast(input),length); -} -} // namespace utf8_validation + }; // struct utf8_checker +} // utf8_to_utf16 namespace } // unnamed namespace } // namespace haswell } // namespace simdutf -/* end file src/generic/utf8_validation/utf8_validator.h */ -// transcoding from UTF-8 to UTF-16 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf16/valid_utf8_to_utf16.h -/* begin file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ - +/* end file src/generic/utf8_to_utf16/utf8_to_utf16.h */ +// transcoding from UTF-8 to UTF-32 +/* begin file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ namespace simdutf { namespace haswell { namespace { -namespace utf8_to_utf16 { +namespace utf8_to_utf32 { using namespace simd; -template + simdutf_warn_unused size_t convert_valid(const char* input, size_t size, - char16_t* utf16_output) noexcept { - // The implementation is not specific to haswell and should be moved to the generic directory. + char32_t* utf32_output) noexcept { size_t pos = 0; - char16_t* start{utf16_output}; + char32_t* start{utf32_output}; const size_t safety_margin = 16; // to avoid overruns! while(pos + 64 + safety_margin <= size) { - // this loop could be unrolled further. For example, we could process the mask - // far more than 64 bytes. simd8x64 in(reinterpret_cast(input + pos)); if(in.is_ascii()) { - in.store_ascii_as_utf16(utf16_output); - utf16_output += 64; + in.store_ascii_as_utf32(utf32_output); + utf32_output += 64; pos += 64; } else { - // Slow path. We hope that the compiler will recognize that this is a slow path. - // Anything that is not a continuation mask is a 'leading byte', that is, the - // start of a new code point. - uint64_t utf8_continuation_mask = in.lt(-65 + 1); - // -65 is 0b10111111 in two-complement's, so largest possible continuation byte - uint64_t utf8_leading_mask = ~utf8_continuation_mask; - // The *start* of code points is not so useful, rather, we want the *end* of code points. - uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; - // We process in blocks of up to 12 bytes except possibly - // for fast paths which may process up to 16 bytes. For the - // slow path to work, we should have at least 12 input bytes left. - size_t max_starting_point = (pos + 64) - 12; - // Next loop is going to run at least five times when using solely - // the slow/regular path, and at least four times if there are fast paths. - while(pos < max_starting_point) { - // Performance note: our ability to compute 'consumed' and - // then shift and recompute is critical. If there is a - // latency of, say, 4 cycles on getting 'consumed', then - // the inner loop might have a total latency of about 6 cycles. - // Yet we process between 6 to 12 inputs bytes, thus we get - // a speed limit between 1 cycle/byte and 0.5 cycle/byte - // for this section of the code. Hence, there is a limit - // to how much we can further increase this latency before - // it seriously harms performance. - // - // Thus we may allow convert_masked_utf8_to_utf16 to process - // more bytes at a time under a fast-path mode where 16 bytes - // are consumed at once (e.g., when encountering ASCII). - size_t consumed = convert_masked_utf8_to_utf16(input + pos, - utf8_end_of_code_point_mask, utf16_output); - pos += consumed; - utf8_end_of_code_point_mask >>= consumed; + // -65 is 0b10111111 in two-complement's, so largest possible continuation byte + uint64_t utf8_continuation_mask = in.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + size_t max_starting_point = (pos + 64) - 12; + while(pos < max_starting_point) { + size_t consumed = convert_masked_utf8_to_utf32(input + pos, + utf8_end_of_code_point_mask, utf32_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; } - // At this point there may remain between 0 and 12 bytes in the - // 64-byte block. These bytes will be processed again. So we have an - // 80% efficiency (in the worst case). In practice we expect an - // 85% to 90% efficiency. } } - utf16_output += scalar::utf8_to_utf16::convert_valid(input + pos, size - pos, utf16_output); - return utf16_output - start; + utf32_output += scalar::utf8_to_utf32::convert_valid(input + pos, size - pos, utf32_output); + return utf32_output - start; } -} // namespace utf8_to_utf16 + +} // namespace utf8_to_utf32 } // unnamed namespace } // namespace haswell } // namespace simdutf -/* end file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf16/utf8_to_utf16.h -/* begin file src/generic/utf8_to_utf16/utf8_to_utf16.h */ +/* end file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ +/* begin file src/generic/utf8_to_utf32/utf8_to_utf32.h */ namespace simdutf { namespace haswell { namespace { -namespace utf8_to_utf16 { +namespace utf8_to_utf32 { using namespace simd; @@ -22035,28 +25572,28 @@ using namespace simd; } - template - simdutf_really_inline size_t convert(const char* in, size_t size, char16_t* utf16_output) { + + simdutf_really_inline size_t convert(const char* in, size_t size, char32_t* utf32_output) { size_t pos = 0; - char16_t* start{utf16_output}; + char32_t* start{utf32_output}; // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, + // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, // to give us a good margin. size_t leading_byte = 0; size_t margin = size; - for(; margin > 0 && leading_byte < 8; margin--) { + for(; margin > 0 && leading_byte < 4; margin--) { leading_byte += (int8_t(in[margin-1]) > -65); } - // If the input is long enough, then we have that margin-1 is the eight last leading byte. + // If the input is long enough, then we have that margin-1 is the fourth last leading byte. const size_t safety_margin = size - margin + 1; // to avoid overruns! while(pos + 64 + safety_margin <= size) { simd8x64 input(reinterpret_cast(in + pos)); if(input.is_ascii()) { - input.store_ascii_as_utf16(utf16_output); - utf16_output += 64; + input.store_ascii_as_utf32(utf32_output); + utf32_output += 64; pos += 64; } else { // you might think that a for-loop would work, but under Visual Studio, it is not good enough. @@ -22090,8 +25627,8 @@ using namespace simd; // for this section of the code. Hence, there is a limit // to how much we can further increase this latency before // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf16(in + pos, - utf8_end_of_code_point_mask, utf16_output); + size_t consumed = convert_masked_utf8_to_utf32(in + pos, + utf8_end_of_code_point_mask, utf32_output); pos += consumed; utf8_end_of_code_point_mask >>= consumed; } @@ -22103,35 +25640,34 @@ using namespace simd; } if(errors()) { return 0; } if(pos < size) { - size_t howmany = scalar::utf8_to_utf16::convert(in + pos, size - pos, utf16_output); + size_t howmany = scalar::utf8_to_utf32::convert(in + pos, size - pos, utf32_output); if(howmany == 0) { return 0; } - utf16_output += howmany; + utf32_output += howmany; } - return utf16_output - start; + return utf32_output - start; } - template - simdutf_really_inline result convert_with_errors(const char* in, size_t size, char16_t* utf16_output) { + simdutf_really_inline result convert_with_errors(const char* in, size_t size, char32_t* utf32_output) { size_t pos = 0; - char16_t* start{utf16_output}; + char32_t* start{utf32_output}; // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, + // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, // to give us a good margin. size_t leading_byte = 0; size_t margin = size; - for(; margin > 0 && leading_byte < 8; margin--) { + for(; margin > 0 && leading_byte < 4; margin--) { leading_byte += (int8_t(in[margin-1]) > -65); } - // If the input is long enough, then we have that margin-1 is the eight last leading byte. + // If the input is long enough, then we have that margin-1 is the fourth last leading byte. const size_t safety_margin = size - margin + 1; // to avoid overruns! while(pos + 64 + safety_margin <= size) { simd8x64 input(reinterpret_cast(in + pos)); if(input.is_ascii()) { - input.store_ascii_as_utf16(utf16_output); - utf16_output += 64; + input.store_ascii_as_utf32(utf32_output); + utf32_output += 64; pos += 64; } else { // you might think that a for-loop would work, but under Visual Studio, it is not good enough. @@ -22148,9 +25684,7 @@ using namespace simd; this->check_utf8_bytes(input.chunks[3], input.chunks[2]); } if (errors()) { - // rewind_and_convert_with_errors will seek a potential error from in+pos onward, - // with the ability to go back up to pos bytes, and read size-pos bytes forward. - result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); res.count += pos; return res; } @@ -22172,8 +25706,8 @@ using namespace simd; // for this section of the code. Hence, there is a limit // to how much we can further increase this latency before // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf16(in + pos, - utf8_end_of_code_point_mask, utf16_output); + size_t consumed = convert_masked_utf8_to_utf32(in + pos, + utf8_end_of_code_point_mask, utf32_output); pos += consumed; utf8_end_of_code_point_mask >>= consumed; } @@ -22184,24 +25718,20 @@ using namespace simd; } } if(errors()) { - // rewind_and_convert_with_errors will seek a potential error from in+pos onward, - // with the ability to go back up to pos bytes, and read size-pos bytes forward. - result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); res.count += pos; return res; } if(pos < size) { - // rewind_and_convert_with_errors will seek a potential error from in+pos onward, - // with the ability to go back up to pos bytes, and read size-pos bytes forward. - result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); if (res.error) { // In case of error, we want the error position res.count += pos; return res; } else { // In case of success, we want the number of word written - utf16_output += res.count; + utf32_output += res.count; } } - return result(error_code::SUCCESS, utf16_output - start); + return result(error_code::SUCCESS, utf32_output - start); } simdutf_really_inline bool errors() const { @@ -22209,70 +25739,138 @@ using namespace simd; } }; // struct utf8_checker -} // utf8_to_utf16 namespace +} // utf8_to_utf32 namespace +} // unnamed namespace +} // namespace haswell +} // namespace simdutf +/* end file src/generic/utf8_to_utf32/utf8_to_utf32.h */ +// other functions +/* begin file src/generic/utf8.h */ + +namespace simdutf { +namespace haswell { +namespace { +namespace utf8 { + +using namespace simd; + +simdutf_really_inline size_t count_code_points(const char* in, size_t size) { + size_t pos = 0; + size_t count = 0; + for(;pos + 64 <= size; pos += 64) { + simd8x64 input(reinterpret_cast(in + pos)); + uint64_t utf8_continuation_mask = input.gt(-65); + count += count_ones(utf8_continuation_mask); + } + return count + scalar::utf8::count_code_points(in + pos, size - pos); +} + +simdutf_really_inline size_t utf16_length_from_utf8(const char* in, size_t size) { + size_t pos = 0; + size_t count = 0; + // This algorithm could no doubt be improved! + for(;pos + 64 <= size; pos += 64) { + simd8x64 input(reinterpret_cast(in + pos)); + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + // We count one word for anything that is not a continuation (so + // leading bytes). + count += 64 - count_ones(utf8_continuation_mask); + int64_t utf8_4byte = input.gteq_unsigned(240); + count += count_ones(utf8_4byte); + } + return count + scalar::utf8::utf16_length_from_utf8(in + pos, size - pos); +} + + +simdutf_really_inline size_t utf32_length_from_utf8(const char* in, size_t size) { + return count_code_points(in, size); +} +} // utf8 namespace } // unnamed namespace } // namespace haswell } // namespace simdutf -/* end file src/generic/utf8_to_utf16/utf8_to_utf16.h */ -// transcoding from UTF-8 to UTF-32 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf32/valid_utf8_to_utf32.h -/* begin file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ - +/* end file src/generic/utf8.h */ +/* begin file src/generic/utf16.h */ namespace simdutf { namespace haswell { namespace { -namespace utf8_to_utf32 { +namespace utf16 { -using namespace simd; +template +simdutf_really_inline size_t count_code_points(const char16_t* in, size_t size) { + size_t pos = 0; + size_t count = 0; + for(;pos < size/32*32; pos += 32) { + simd16x32 input(reinterpret_cast(in + pos)); + if (!match_system(big_endian)) { input.swap_bytes(); } + uint64_t not_pair = input.not_in_range(0xDC00, 0xDFFF); + count += count_ones(not_pair) / 2; + } + return count + scalar::utf16::count_code_points(in + pos, size - pos); +} +template +simdutf_really_inline size_t utf8_length_from_utf16(const char16_t* in, size_t size) { + size_t pos = 0; + size_t count = 0; + // This algorithm could no doubt be improved! + for(;pos < size/32*32; pos += 32) { + simd16x32 input(reinterpret_cast(in + pos)); + if (!match_system(big_endian)) { input.swap_bytes(); } + uint64_t ascii_mask = input.lteq(0x7F); + uint64_t twobyte_mask = input.lteq(0x7FF); + uint64_t not_pair_mask = input.not_in_range(0xD800, 0xDFFF); -simdutf_warn_unused size_t convert_valid(const char* input, size_t size, - char32_t* utf32_output) noexcept { - size_t pos = 0; - char32_t* start{utf32_output}; - const size_t safety_margin = 16; // to avoid overruns! - while(pos + 64 + safety_margin <= size) { - simd8x64 in(reinterpret_cast(input + pos)); - if(in.is_ascii()) { - in.store_ascii_as_utf32(utf32_output); - utf32_output += 64; - pos += 64; - } else { - // -65 is 0b10111111 in two-complement's, so largest possible continuation byte - uint64_t utf8_continuation_mask = in.lt(-65 + 1); - uint64_t utf8_leading_mask = ~utf8_continuation_mask; - uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; - size_t max_starting_point = (pos + 64) - 12; - while(pos < max_starting_point) { - size_t consumed = convert_masked_utf8_to_utf32(input + pos, - utf8_end_of_code_point_mask, utf32_output); - pos += consumed; - utf8_end_of_code_point_mask >>= consumed; - } + size_t ascii_count = count_ones(ascii_mask) / 2; + size_t twobyte_count = count_ones(twobyte_mask & ~ ascii_mask) / 2; + size_t threebyte_count = count_ones(not_pair_mask & ~ twobyte_mask) / 2; + size_t fourbyte_count = 32 - count_ones(not_pair_mask) / 2; + count += 2 * fourbyte_count + 3 * threebyte_count + 2 * twobyte_count + ascii_count; } - } - utf32_output += scalar::utf8_to_utf32::convert_valid(input + pos, size - pos, utf32_output); - return utf32_output - start; + return count + scalar::utf16::utf8_length_from_utf16(in + pos, size - pos); +} + +template +simdutf_really_inline size_t utf32_length_from_utf16(const char16_t* in, size_t size) { + return count_code_points(in, size); } +simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* output) { + size_t pos = 0; -} // namespace utf8_to_utf32 + while (pos < size/32*32) { + simd16x32 input(reinterpret_cast(in + pos)); + input.swap_bytes(); + input.store(reinterpret_cast(output)); + pos += 32; + output += 32; + } + + scalar::utf16::change_endianness_utf16(in + pos, size - pos, output); +} + +} // utf16 } // unnamed namespace } // namespace haswell } // namespace simdutf -/* end file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf32/utf8_to_utf32.h -/* begin file src/generic/utf8_to_utf32/utf8_to_utf32.h */ +/* end file src/generic/utf16.h */ + + +// transcoding from UTF-8 to Latin 1 +/* begin file src/generic/utf8_to_latin1/utf8_to_latin1.h */ namespace simdutf { namespace haswell { namespace { -namespace utf8_to_utf32 { +namespace utf8_to_latin1 { using namespace simd; simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// For UTF-8 to Latin 1, we can allow any ASCII character, and any continuation byte, +// but the non-ASCII leading bytes must be 0b11000011 or 0b11000010 and nothing else. +// // Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) // Bit 1 = Too Long (ASCII followed by continuation) // Bit 2 = Overlong 3-byte @@ -22299,6 +25897,7 @@ using namespace simd; // 1111011_ 1000____ // 11111___ 1000____ constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + constexpr const uint8_t FORBIDDEN = 0xff; const simd8 byte_1_high = prev1.shr<4>().lookup_16( // 0_______ ________ @@ -22309,11 +25908,11 @@ using namespace simd; // 1100____ ________ TOO_SHORT | OVERLONG_2, // 1101____ ________ - TOO_SHORT, + FORBIDDEN, // 1110____ ________ - TOO_SHORT | OVERLONG_3 | SURROGATE, + FORBIDDEN, // 1111____ ________ - TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + FORBIDDEN ); constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( @@ -22326,23 +25925,23 @@ using namespace simd; CARRY, // ____0100 ________ - CARRY | TOO_LARGE, + FORBIDDEN, // ____0101 ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, + FORBIDDEN, // ____011_ ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, + FORBIDDEN, + FORBIDDEN, // ____1___ ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, + FORBIDDEN, + FORBIDDEN, + FORBIDDEN, + FORBIDDEN, + FORBIDDEN, // ____1101 ________ - CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000 + FORBIDDEN, + FORBIDDEN, + FORBIDDEN ); const simd8 byte_2_high = input.shr<4>().lookup_16( // ________ 0_______ @@ -22362,15 +25961,6 @@ using namespace simd; ); return (byte_1_high & byte_1_low & byte_2_high); } - simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, - const simd8 prev_input, const simd8 sc) { - simd8 prev2 = input.prev<2>(prev_input); - simd8 prev3 = input.prev<3>(prev_input); - simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); - simd8 must23_80 = must23 & uint8_t(0x80); - return must23_80 ^ sc; - } - struct validating_transcoder { // If this is nonzero, there has been a UTF-8 error. @@ -22384,33 +25974,31 @@ using namespace simd; // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) simd8 prev1 = input.prev<1>(prev_input); - simd8 sc = check_special_cases(input, prev1); - this->error |= check_multibyte_lengths(input, prev_input, sc); + this->error |= check_special_cases(input, prev1); } - - simdutf_really_inline size_t convert(const char* in, size_t size, char32_t* utf32_output) { + simdutf_really_inline size_t convert(const char* in, size_t size, char* latin1_output) { size_t pos = 0; - char32_t* start{utf32_output}; + char* start{latin1_output}; // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, + // 8 bytes when calling convert_masked_utf8_to_latin1. If you skip the last 16 bytes, // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, // to give us a good margin. size_t leading_byte = 0; size_t margin = size; - for(; margin > 0 && leading_byte < 4; margin--) { - leading_byte += (int8_t(in[margin-1]) > -65); + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); //twos complement of -65 is 1011 1111 ... } - // If the input is long enough, then we have that margin-1 is the fourth last leading byte. + // If the input is long enough, then we have that margin-1 is the eight last leading byte. const size_t safety_margin = size - margin + 1; // to avoid overruns! while(pos + 64 + safety_margin <= size) { simd8x64 input(reinterpret_cast(in + pos)); if(input.is_ascii()) { - input.store_ascii_as_utf32(utf32_output); - utf32_output += 64; + input.store((int8_t*)latin1_output); + latin1_output += 64; pos += 64; } else { // you might think that a for-loop would work, but under Visual Studio, it is not good enough. @@ -22426,7 +26014,7 @@ using namespace simd; this->check_utf8_bytes(input.chunks[2], input.chunks[1]); this->check_utf8_bytes(input.chunks[3], input.chunks[2]); } - uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_continuation_mask = input.lt(-65 + 1); // -64 is 1100 0000 in twos complement. Note: in this case, we also have ASCII to account for. uint64_t utf8_leading_mask = ~utf8_continuation_mask; uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; // We process in blocks of up to 12 bytes except possibly @@ -22444,8 +26032,8 @@ using namespace simd; // for this section of the code. Hence, there is a limit // to how much we can further increase this latency before // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf32(in + pos, - utf8_end_of_code_point_mask, utf32_output); + size_t consumed = convert_masked_utf8_to_latin1(in + pos, + utf8_end_of_code_point_mask, latin1_output); pos += consumed; utf8_end_of_code_point_mask >>= consumed; } @@ -22457,34 +26045,34 @@ using namespace simd; } if(errors()) { return 0; } if(pos < size) { - size_t howmany = scalar::utf8_to_utf32::convert(in + pos, size - pos, utf32_output); + size_t howmany = scalar::utf8_to_latin1::convert(in + pos, size - pos, latin1_output); if(howmany == 0) { return 0; } - utf32_output += howmany; + latin1_output += howmany; } - return utf32_output - start; + return latin1_output - start; } - simdutf_really_inline result convert_with_errors(const char* in, size_t size, char32_t* utf32_output) { + simdutf_really_inline result convert_with_errors(const char* in, size_t size, char* latin1_output) { size_t pos = 0; - char32_t* start{utf32_output}; + char* start{latin1_output}; // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, + // 8 bytes when calling convert_masked_utf8_to_latin1. If you skip the last 16 bytes, // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, // to give us a good margin. size_t leading_byte = 0; size_t margin = size; - for(; margin > 0 && leading_byte < 4; margin--) { + for(; margin > 0 && leading_byte < 8; margin--) { leading_byte += (int8_t(in[margin-1]) > -65); } - // If the input is long enough, then we have that margin-1 is the fourth last leading byte. + // If the input is long enough, then we have that margin-1 is the eight last leading byte. const size_t safety_margin = size - margin + 1; // to avoid overruns! while(pos + 64 + safety_margin <= size) { simd8x64 input(reinterpret_cast(in + pos)); if(input.is_ascii()) { - input.store_ascii_as_utf32(utf32_output); - utf32_output += 64; + input.store((int8_t*)latin1_output); + latin1_output += 64; pos += 64; } else { // you might think that a for-loop would work, but under Visual Studio, it is not good enough. @@ -22501,7 +26089,9 @@ using namespace simd; this->check_utf8_bytes(input.chunks[3], input.chunks[2]); } if (errors()) { - result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output); res.count += pos; return res; } @@ -22523,8 +26113,8 @@ using namespace simd; // for this section of the code. Hence, there is a limit // to how much we can further increase this latency before // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf32(in + pos, - utf8_end_of_code_point_mask, utf32_output); + size_t consumed = convert_masked_utf8_to_latin1(in + pos, + utf8_end_of_code_point_mask, latin1_output); pos += consumed; utf8_end_of_code_point_mask >>= consumed; } @@ -22535,20 +26125,24 @@ using namespace simd; } } if(errors()) { - result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output); res.count += pos; return res; } if(pos < size) { - result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output); if (res.error) { // In case of error, we want the error position res.count += pos; return res; } else { // In case of success, we want the number of word written - utf32_output += res.count; + latin1_output += res.count; } } - return result(error_code::SUCCESS, utf32_output - start); + return result(error_code::SUCCESS, latin1_output - start); } simdutf_really_inline bool errors() const { @@ -22556,124 +26150,88 @@ using namespace simd; } }; // struct utf8_checker -} // utf8_to_utf32 namespace +} // utf8_to_latin1 namespace } // unnamed namespace } // namespace haswell } // namespace simdutf -/* end file src/generic/utf8_to_utf32/utf8_to_utf32.h */ -// other functions -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8.h -/* begin file src/generic/utf8.h */ - -namespace simdutf { -namespace haswell { -namespace { -namespace utf8 { - -using namespace simd; - -simdutf_really_inline size_t count_code_points(const char* in, size_t size) { - size_t pos = 0; - size_t count = 0; - for(;pos + 64 <= size; pos += 64) { - simd8x64 input(reinterpret_cast(in + pos)); - uint64_t utf8_continuation_mask = input.lt(-65 + 1); - count += 64 - count_ones(utf8_continuation_mask); - } - return count + scalar::utf8::count_code_points(in + pos, size - pos); -} - - -simdutf_really_inline size_t utf16_length_from_utf8(const char* in, size_t size) { - size_t pos = 0; - size_t count = 0; - // This algorithm could no doubt be improved! - for(;pos + 64 <= size; pos += 64) { - simd8x64 input(reinterpret_cast(in + pos)); - uint64_t utf8_continuation_mask = input.lt(-65 + 1); - // We count one word for anything that is not a continuation (so - // leading bytes). - count += 64 - count_ones(utf8_continuation_mask); - int64_t utf8_4byte = input.gteq_unsigned(240); - count += count_ones(utf8_4byte); - } - return count + scalar::utf8::utf16_length_from_utf8(in + pos, size - pos); -} +/* end file src/generic/utf8_to_latin1/utf8_to_latin1.h */ +/* begin file src/generic/utf8_to_latin1/valid_utf8_to_latin1.h */ -simdutf_really_inline size_t utf32_length_from_utf8(const char* in, size_t size) { - return count_code_points(in, size); -} -} // utf8 namespace -} // unnamed namespace -} // namespace haswell -} // namespace simdutf -/* end file src/generic/utf8.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf16.h -/* begin file src/generic/utf16.h */ namespace simdutf { namespace haswell { namespace { -namespace utf16 { - -template -simdutf_really_inline size_t count_code_points(const char16_t* in, size_t size) { - size_t pos = 0; - size_t count = 0; - for(;pos + 32 <= size; pos += 32) { - simd16x32 input(reinterpret_cast(in + pos)); - if (!match_system(big_endian)) input.swap_bytes(); - uint64_t not_pair = input.not_in_range(0xDC00, 0xDFFF); - count += count_ones(not_pair) / 2; - } - return count + scalar::utf16::count_code_points(in + pos, size - pos); -} +namespace utf8_to_latin1 { +using namespace simd; -template -simdutf_really_inline size_t utf8_length_from_utf16(const char16_t* in, size_t size) { - size_t pos = 0; - size_t count = 0; - // This algorithm could no doubt be improved! - for(;pos + 32 <= size; pos += 32) { - simd16x32 input(reinterpret_cast(in + pos)); - if (!match_system(big_endian)) input.swap_bytes(); - uint64_t ascii_mask = input.lteq(0x7F); - uint64_t twobyte_mask = input.lteq(0x7FF); - uint64_t not_pair_mask = input.not_in_range(0xD800, 0xDFFF); - size_t ascii_count = count_ones(ascii_mask) / 2; - size_t twobyte_count = count_ones(twobyte_mask & ~ ascii_mask) / 2; - size_t threebyte_count = count_ones(not_pair_mask & ~ twobyte_mask) / 2; - size_t fourbyte_count = 32 - count_ones(not_pair_mask) / 2; - count += 2 * fourbyte_count + 3 * threebyte_count + 2 * twobyte_count + ascii_count; + simdutf_really_inline size_t convert_valid(const char* in, size_t size, char* latin1_output) { + size_t pos = 0; + char* start{latin1_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_latin1. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); //twos complement of -65 is 1011 1111 ... + } + // If the input is long enough, then we have that margin-1 is the eight last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store((int8_t*)latin1_output); + latin1_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + uint64_t utf8_continuation_mask = input.lt(-65 + 1); // -64 is 1100 0000 in twos complement. Note: in this case, we also have ASCII to account for. + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_latin1(in + pos, + utf8_end_of_code_point_mask, latin1_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(pos < size) { + size_t howmany = scalar::utf8_to_latin1::convert(in + pos, size - pos, latin1_output); + if(howmany == 0) { return 0; } + latin1_output += howmany; + } + return latin1_output - start; } - return count + scalar::utf16::utf8_length_from_utf16(in + pos, size - pos); -} - -template -simdutf_really_inline size_t utf32_length_from_utf16(const char16_t* in, size_t size) { - return count_code_points(in, size); -} - -simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* output) { - size_t pos = 0; - - while (pos + 32 <= size) { - simd16x32 input(reinterpret_cast(in + pos)); - input.swap_bytes(); - input.store(reinterpret_cast(output)); - pos += 32; - output += 32; - } - scalar::utf16::change_endianness_utf16(in + pos, size - pos, output); -} - -} // utf16 -} // unnamed namespace -} // namespace haswell -} // namespace simdutf -/* end file src/generic/utf16.h */ + }; +} // utf8_to_latin1 namespace +} // unnamed namespace +} // namespace haswell + // namespace simdutf +/* end file src/generic/utf8_to_latin1/valid_utf8_to_latin1.h */ namespace simdutf { namespace haswell { @@ -22766,6 +26324,73 @@ simdutf_warn_unused result implementation::validate_utf32_with_errors(const char } } +simdutf_warn_unused size_t implementation::convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) const noexcept { + std::pair ret = avx2_convert_latin1_to_utf8(buf, len, utf8_output); + size_t converted_chars = ret.second - utf8_output; + + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf8::convert( + ret.first, len - (ret.first - buf), ret.second); + converted_chars += scalar_converted_chars; + } + + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + std::pair ret = avx2_convert_latin1_to_utf16(buf, len, utf16_output); + if (ret.first == nullptr) { return 0; } + size_t converted_chars = ret.second - utf16_output; + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf16::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_converted_chars == 0) { return 0; } + converted_chars += scalar_converted_chars; + } + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf16be(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + std::pair ret = avx2_convert_latin1_to_utf16(buf, len, utf16_output); + if (ret.first == nullptr) { return 0; } + size_t converted_chars = ret.second - utf16_output; + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf16::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_converted_chars == 0) { return 0; } + converted_chars += scalar_converted_chars; + } + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf32(const char* buf, size_t len, char32_t* utf32_output) const noexcept { + std::pair ret = avx2_convert_latin1_to_utf32(buf, len, utf32_output); + if (ret.first == nullptr) { return 0; } + size_t converted_chars = ret.second - utf32_output; + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf32::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_converted_chars == 0) { return 0; } + converted_chars += scalar_converted_chars; + } + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_utf8_to_latin1(const char* buf, size_t len, char* latin1_output) const noexcept { + utf8_to_latin1::validating_transcoder converter; + return converter.convert(buf, len, latin1_output); +} + +simdutf_warn_unused result implementation::convert_utf8_to_latin1_with_errors(const char* buf, size_t len, char* latin1_output) const noexcept { + utf8_to_latin1::validating_transcoder converter; + return converter.convert_with_errors(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf8_to_latin1(const char* input, size_t size, + char* latin1_output) const noexcept { + return utf8_to_latin1::convert_valid(input, size, latin1_output); +} + simdutf_warn_unused size_t implementation::convert_utf8_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { utf8_to_utf16::validating_transcoder converter; return converter.convert(buf, len, utf16_output); @@ -22811,6 +26436,77 @@ simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf32(const cha return utf8_to_utf32::convert_valid(input, size, utf32_output); } + +simdutf_warn_unused size_t implementation::convert_utf16le_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = haswell::avx2_convert_utf16_to_latin1(buf, len, latin1_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - latin1_output; + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf16_to_latin1::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused size_t implementation::convert_utf16be_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = haswell::avx2_convert_utf16_to_latin1(buf, len, latin1_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - latin1_output; + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf16_to_latin1::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused result implementation::convert_utf16le_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = avx2_convert_utf16_to_latin1_with_errors(buf, len, latin1_output); + if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count + if (ret.first.count != len) { // All good so far, but not finished + result scalar_res = scalar::utf16_to_latin1::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused result implementation::convert_utf16be_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = avx2_convert_utf16_to_latin1_with_errors(buf, len, latin1_output); + if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count + if (ret.first.count != len) { // All good so far, but not finished + result scalar_res = scalar::utf16_to_latin1::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + // optimization opportunity: implement a custom function + return convert_utf16be_to_latin1(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + // optimization opportunity: implement a custom function + return convert_utf16le_to_latin1(buf, len, latin1_output); +} + simdutf_warn_unused size_t implementation::convert_utf16le_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { std::pair ret = haswell::avx2_convert_utf16_to_utf8(buf, len, utf8_output); if (ret.first == nullptr) { return 0; } @@ -22838,7 +26534,7 @@ simdutf_warn_unused size_t implementation::convert_utf16be_to_utf8(const char16_ } simdutf_warn_unused result implementation::convert_utf16le_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = haswell::avx2_convert_utf16_to_utf8_with_errors(buf, len, utf8_output); if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count if (ret.first.count != len) { // All good so far, but not finished @@ -22851,12 +26547,12 @@ simdutf_warn_unused result implementation::convert_utf16le_to_utf8_with_errors(c ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written return ret.first; } simdutf_warn_unused result implementation::convert_utf16be_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = haswell::avx2_convert_utf16_to_utf8_with_errors(buf, len, utf8_output); if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count if (ret.first.count != len) { // All good so far, but not finished @@ -22869,7 +26565,7 @@ simdutf_warn_unused result implementation::convert_utf16be_to_utf8_with_errors(c ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written return ret.first; } @@ -22894,8 +26590,43 @@ simdutf_warn_unused size_t implementation::convert_utf32_to_utf8(const char32_t* return saved_bytes; } +simdutf_warn_unused size_t implementation::convert_utf32_to_latin1(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = avx2_convert_utf32_to_latin1(buf, len, latin1_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - latin1_output; + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf32_to_latin1::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused result implementation::convert_utf32_to_latin1_with_errors(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + return scalar::utf32_to_latin1::convert_with_errors(buf,len,latin1_output); + // ret.first.count is always the position in the buffer, not the number of code units written even if finished + std::pair ret = avx2_convert_utf32_to_latin1_with_errors(buf, len, latin1_output); + if (ret.first.count != len) { + result scalar_res = scalar::utf32_to_latin1::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused size_t implementation::convert_valid_utf32_to_latin1(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + return convert_utf32_to_latin1(buf,len,latin1_output); +} + simdutf_warn_unused result implementation::convert_utf32_to_utf8_with_errors(const char32_t* buf, size_t len, char* utf8_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = haswell::avx2_convert_utf32_to_utf8_with_errors(buf, len, utf8_output); if (ret.first.count != len) { result scalar_res = scalar::utf32_to_utf8::convert_with_errors( @@ -22907,7 +26638,7 @@ simdutf_warn_unused result implementation::convert_utf32_to_utf8_with_errors(con ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written return ret.first; } @@ -22938,7 +26669,7 @@ simdutf_warn_unused size_t implementation::convert_utf16be_to_utf32(const char16 } simdutf_warn_unused result implementation::convert_utf16le_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = haswell::avx2_convert_utf16_to_utf32_with_errors(buf, len, utf32_output); if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count if (ret.first.count != len) { // All good so far, but not finished @@ -22951,12 +26682,12 @@ simdutf_warn_unused result implementation::convert_utf16le_to_utf32_with_errors( ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written return ret.first; } simdutf_warn_unused result implementation::convert_utf16be_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = haswell::avx2_convert_utf16_to_utf32_with_errors(buf, len, utf32_output); if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count if (ret.first.count != len) { // All good so far, but not finished @@ -22969,7 +26700,7 @@ simdutf_warn_unused result implementation::convert_utf16be_to_utf32_with_errors( ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written return ret.first; } @@ -23004,7 +26735,7 @@ simdutf_warn_unused size_t implementation::convert_utf32_to_utf16be(const char32 } simdutf_warn_unused result implementation::convert_utf32_to_utf16le_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = haswell::avx2_convert_utf32_to_utf16_with_errors(buf, len, utf16_output); if (ret.first.count != len) { result scalar_res = scalar::utf32_to_utf16::convert_with_errors( @@ -23016,12 +26747,12 @@ simdutf_warn_unused result implementation::convert_utf32_to_utf16le_with_errors( ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written return ret.first; } simdutf_warn_unused result implementation::convert_utf32_to_utf16be_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = haswell::avx2_convert_utf32_to_utf16_with_errors(buf, len, utf16_output); if (ret.first.count != len) { result scalar_res = scalar::utf32_to_utf16::convert_with_errors( @@ -23033,7 +26764,7 @@ simdutf_warn_unused result implementation::convert_utf32_to_utf16be_with_errors( ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written return ret.first; } @@ -23069,6 +26800,18 @@ simdutf_warn_unused size_t implementation::count_utf8(const char * input, size_t return utf8::count_code_points(input, length); } +simdutf_warn_unused size_t implementation::latin1_length_from_utf8(const char* buf, size_t len) const noexcept { + return count_utf8(buf,len); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf16(size_t length) const noexcept { + return scalar::utf16::latin1_length_from_utf16(length); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf32(size_t length) const noexcept { + return scalar::utf32::latin1_length_from_utf32(length); +} + simdutf_warn_unused size_t implementation::utf8_length_from_utf16le(const char16_t * input, size_t length) const noexcept { return utf16::utf8_length_from_utf16(input, length); } @@ -23085,10 +26828,61 @@ simdutf_warn_unused size_t implementation::utf32_length_from_utf16be(const char1 return utf16::utf32_length_from_utf16(input, length); } + +simdutf_warn_unused size_t implementation::utf16_length_from_latin1(size_t length) const noexcept { + return scalar::latin1::utf16_length_from_latin1(length); +} + simdutf_warn_unused size_t implementation::utf16_length_from_utf8(const char * input, size_t length) const noexcept { return utf8::utf16_length_from_utf8(input, length); } + +simdutf_warn_unused size_t implementation::utf32_length_from_latin1(size_t length) const noexcept { + return scalar::latin1::utf32_length_from_latin1(length); +} + +simdutf_warn_unused size_t implementation::utf8_length_from_latin1(const char *input, size_t len) const noexcept { + const uint8_t *data = reinterpret_cast(input); + size_t answer = len / sizeof(__m256i) * sizeof(__m256i); + size_t i = 0; + __m256i four_64bits = _mm256_setzero_si256(); + while (i + sizeof(__m256i) <= len) { + __m256i runner = _mm256_setzero_si256(); + // We can do up to 255 loops without overflow. + size_t iterations = (len - i) / sizeof(__m256i); + if (iterations > 255) { + iterations = 255; + } + size_t max_i = i + iterations * sizeof(__m256i) - sizeof(__m256i); + for (; i + 4*sizeof(__m256i) <= max_i; i += 4*sizeof(__m256i)) { + __m256i input1 = _mm256_loadu_si256((const __m256i *)(data + i)); + __m256i input2 = _mm256_loadu_si256((const __m256i *)(data + i + sizeof(__m256i))); + __m256i input3 = _mm256_loadu_si256((const __m256i *)(data + i + 2*sizeof(__m256i))); + __m256i input4 = _mm256_loadu_si256((const __m256i *)(data + i + 3*sizeof(__m256i))); + __m256i input12 = _mm256_add_epi8(_mm256_cmpgt_epi8(_mm256_setzero_si256(), input1), + _mm256_cmpgt_epi8(_mm256_setzero_si256(), input2)); + __m256i input23 = _mm256_add_epi8(_mm256_cmpgt_epi8(_mm256_setzero_si256(), input3), + _mm256_cmpgt_epi8(_mm256_setzero_si256(), input4)); + __m256i input1234 = _mm256_add_epi8(input12, input23); + runner = _mm256_sub_epi8( + runner, input1234); + } + for (; i <= max_i; i += sizeof(__m256i)) { + __m256i input_256_chunk = _mm256_loadu_si256((const __m256i *)(data + i)); + runner = _mm256_sub_epi8( + runner, _mm256_cmpgt_epi8(_mm256_setzero_si256(), input_256_chunk)); + } + four_64bits = _mm256_add_epi64( + four_64bits, _mm256_sad_epu8(runner, _mm256_setzero_si256())); + } + answer += _mm256_extract_epi64(four_64bits, 0) + + _mm256_extract_epi64(four_64bits, 1) + + _mm256_extract_epi64(four_64bits, 2) + + _mm256_extract_epi64(four_64bits, 3); + return answer + scalar::latin1::utf8_length_from_latin1(reinterpret_cast(data + i), len - i); +} + simdutf_warn_unused size_t implementation::utf8_length_from_utf32(const char32_t * input, size_t length) const noexcept { const __m256i v_00000000 = _mm256_setzero_si256(); const __m256i v_ffffff80 = _mm256_set1_epi32((uint32_t)0xffffff80); @@ -23131,13 +26925,12 @@ simdutf_warn_unused size_t implementation::utf16_length_from_utf32(const char32_ } simdutf_warn_unused size_t implementation::utf32_length_from_utf8(const char * input, size_t length) const noexcept { - return scalar::utf8::count_code_points(input, length); + return utf8::count_code_points(input, length); } } // namespace haswell } // namespace simdutf -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/haswell/end.h /* begin file src/simdutf/haswell/end.h */ #if SIMDUTF_CAN_ALWAYS_RUN_HASWELL // nothing needed. @@ -23153,14 +26946,12 @@ SIMDUTF_POP_DISABLE_WARNINGS /* end file src/haswell/implementation.cpp */ #endif #if SIMDUTF_IMPLEMENTATION_PPC64 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=ppc64/implementation.cpp /* begin file src/ppc64/implementation.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/ppc64/begin.h /* begin file src/simdutf/ppc64/begin.h */ // redefining SIMDUTF_IMPLEMENTATION to "ppc64" // #define SIMDUTF_IMPLEMENTATION ppc64 @@ -23198,7 +26989,6 @@ simdutf_really_inline simd8 must_be_2_3_continuation(const simd8 } // namespace ppc64 } // namespace simdutf -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/buf_block_reader.h /* begin file src/generic/buf_block_reader.h */ namespace simdutf { namespace ppc64 { @@ -23293,7 +27083,6 @@ simdutf_really_inline void buf_block_reader::advance() { } // namespace ppc64 } // namespace simdutf /* end file src/generic/buf_block_reader.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_validation/utf8_lookup4_algorithm.h /* begin file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ namespace simdutf { namespace ppc64 { @@ -23482,7 +27271,6 @@ using utf8_validation::utf8_checker; } // namespace ppc64 } // namespace simdutf /* end file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_validation/utf8_validator.h /* begin file src/generic/utf8_validation/utf8_validator.h */ namespace simdutf { namespace ppc64 { @@ -23610,7 +27398,6 @@ result generic_validate_ascii_with_errors(const char * input, size_t length) { } // namespace simdutf /* end file src/generic/utf8_validation/utf8_validator.h */ // transcoding from UTF-8 to UTF-16 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf16/valid_utf8_to_utf16.h /* begin file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ @@ -23685,7 +27472,6 @@ simdutf_warn_unused size_t convert_valid(const char* input, size_t size, } // namespace ppc64 } // namespace simdutf /* end file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf16/utf8_to_utf16.h /* begin file src/generic/utf8_to_utf16/utf8_to_utf16.h */ @@ -23993,7 +27779,6 @@ using namespace simd; } // namespace simdutf /* end file src/generic/utf8_to_utf16/utf8_to_utf16.h */ // transcoding from UTF-8 to UTF-32 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf32/valid_utf8_to_utf32.h /* begin file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ namespace simdutf { @@ -24039,7 +27824,6 @@ simdutf_warn_unused size_t convert_valid(const char* input, size_t size, } // namespace ppc64 } // namespace simdutf /* end file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf32/utf8_to_utf32.h /* begin file src/generic/utf8_to_utf32/utf8_to_utf32.h */ @@ -24340,7 +28124,6 @@ using namespace simd; } // namespace simdutf /* end file src/generic/utf8_to_utf32/utf8_to_utf32.h */ // other functions -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8.h /* begin file src/generic/utf8.h */ namespace simdutf { @@ -24355,13 +28138,12 @@ simdutf_really_inline size_t count_code_points(const char* in, size_t size) { size_t count = 0; for(;pos + 64 <= size; pos += 64) { simd8x64 input(reinterpret_cast(in + pos)); - uint64_t utf8_continuation_mask = input.lt(-65 + 1); - count += 64 - count_ones(utf8_continuation_mask); + uint64_t utf8_continuation_mask = input.gt(-65); + count += count_ones(utf8_continuation_mask); } return count + scalar::utf8::count_code_points(in + pos, size - pos); } - simdutf_really_inline size_t utf16_length_from_utf8(const char* in, size_t size) { size_t pos = 0; size_t count = 0; @@ -24387,7 +28169,6 @@ simdutf_really_inline size_t utf32_length_from_utf8(const char* in, size_t size) } // namespace ppc64 } // namespace simdutf /* end file src/generic/utf8.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf16.h /* begin file src/generic/utf16.h */ namespace simdutf { namespace ppc64 { @@ -24398,9 +28179,9 @@ template simdutf_really_inline size_t count_code_points(const char16_t* in, size_t size) { size_t pos = 0; size_t count = 0; - for(;pos + 32 <= size; pos += 32) { + for(;pos < size/32*32; pos += 32) { simd16x32 input(reinterpret_cast(in + pos)); - if (!match_system(big_endian)) input.swap_bytes(); + if (!match_system(big_endian)) { input.swap_bytes(); } uint64_t not_pair = input.not_in_range(0xDC00, 0xDFFF); count += count_ones(not_pair) / 2; } @@ -24412,9 +28193,9 @@ simdutf_really_inline size_t utf8_length_from_utf16(const char16_t* in, size_t s size_t pos = 0; size_t count = 0; // This algorithm could no doubt be improved! - for(;pos + 32 <= size; pos += 32) { + for(;pos < size/32*32; pos += 32) { simd16x32 input(reinterpret_cast(in + pos)); - if (!match_system(big_endian)) input.swap_bytes(); + if (!match_system(big_endian)) { input.swap_bytes(); } uint64_t ascii_mask = input.lteq(0x7F); uint64_t twobyte_mask = input.lteq(0x7FF); uint64_t not_pair_mask = input.not_in_range(0xD800, 0xDFFF); @@ -24436,7 +28217,7 @@ simdutf_really_inline size_t utf32_length_from_utf16(const char16_t* in, size_t simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* output) { size_t pos = 0; - while (pos + 32 <= size) { + while (pos < size/32*32) { simd16x32 input(reinterpret_cast(in + pos)); input.swap_bytes(); input.store(reinterpret_cast(output)); @@ -24686,15 +28467,12 @@ simdutf_warn_unused size_t implementation::utf32_length_from_utf8(const char * i } // namespace ppc64 } // namespace simdutf -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/ppc64/end.h /* begin file src/simdutf/ppc64/end.h */ /* end file src/simdutf/ppc64/end.h */ /* end file src/ppc64/implementation.cpp */ #endif #if SIMDUTF_IMPLEMENTATION_WESTMERE -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=westmere/implementation.cpp /* begin file src/westmere/implementation.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/westmere/begin.h /* begin file src/simdutf/westmere/begin.h */ // redefining SIMDUTF_IMPLEMENTATION to "westmere" // #define SIMDUTF_IMPLEMENTATION westmere @@ -24732,7 +28510,84 @@ simdutf_really_inline simd8 must_be_2_3_continuation(const simd8 return simd8(is_third_byte | is_fourth_byte) > int8_t(0); } -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=westmere/sse_detect_encodings.cpp +/* begin file src/westmere/internal/loader.cpp */ +namespace internal { +namespace westmere { + +/* begin file src/westmere/internal/write_v_u16_11bits_to_utf8.cpp */ +/* +* reads a vector of uint16 values +* bits after 11th are ignored +* first 11 bits are encoded into utf8 +* !important! utf8_output must have at least 16 writable bytes +*/ + +inline void write_v_u16_11bits_to_utf8( + const __m128i v_u16, + char*& utf8_output, + const __m128i one_byte_bytemask, + const uint16_t one_byte_bitmask +) { + // 0b1100_0000_1000_0000 + const __m128i v_c080 = _mm_set1_epi16((int16_t)0xc080); + // 0b0001_1111_0000_0000 + const __m128i v_1f00 = _mm_set1_epi16((int16_t)0x1f00); + // 0b0000_0000_0011_1111 + const __m128i v_003f = _mm_set1_epi16((int16_t)0x003f); + + // 1. prepare 2-byte values + // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 + // expected output : [110a|aaaa|10bb|bbbb] x 8 + + // t0 = [000a|aaaa|bbbb|bb00] + const __m128i t0 = _mm_slli_epi16(v_u16, 2); + // t1 = [000a|aaaa|0000|0000] + const __m128i t1 = _mm_and_si128(t0, v_1f00); + // t2 = [0000|0000|00bb|bbbb] + const __m128i t2 = _mm_and_si128(v_u16, v_003f); + // t3 = [000a|aaaa|00bb|bbbb] + const __m128i t3 = _mm_or_si128(t1, t2); + // t4 = [110a|aaaa|10bb|bbbb] + const __m128i t4 = _mm_or_si128(t3, v_c080); + + // 2. merge ASCII and 2-byte codewords + const __m128i utf8_unpacked = _mm_blendv_epi8(t4, v_u16, one_byte_bytemask); + + // 3. prepare bitmask for 8-bit lookup + // one_byte_bitmask = hhggffeeddccbbaa -- the bits are doubled (h - MSB, a - LSB) + const uint16_t m0 = one_byte_bitmask & 0x5555; // m0 = 0h0g0f0e0d0c0b0a + const uint16_t m1 = static_cast(m0 >> 7); // m1 = 00000000h0g0f0e0 + const uint8_t m2 = static_cast((m0 | m1) & 0xff); // m2 = hdgcfbea + // 4. pack the bytes + const uint8_t* row = &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; + const __m128i shuffle = _mm_loadu_si128((__m128i*)(row + 1)); + const __m128i utf8_packed = _mm_shuffle_epi8(utf8_unpacked, shuffle); + + // 5. store bytes + _mm_storeu_si128((__m128i*)utf8_output, utf8_packed); + + // 6. adjust pointers + utf8_output += row[0]; +}; + +inline void write_v_u16_11bits_to_utf8( + const __m128i v_u16, + char*& utf8_output, + const __m128i v_0000, + const __m128i v_ff80 +) { + // no bits set above 7th bit + const __m128i one_byte_bytemask = _mm_cmpeq_epi16(_mm_and_si128(v_u16, v_ff80), v_0000); + const uint16_t one_byte_bitmask = static_cast(_mm_movemask_epi8(one_byte_bytemask)); + + write_v_u16_11bits_to_utf8( + v_u16, utf8_output, one_byte_bytemask, one_byte_bitmask); +}; +/* end file src/westmere/internal/write_v_u16_11bits_to_utf8.cpp */ + +} // namespace westmere +} // namespace internal +/* end file src/westmere/internal/loader.cpp */ /* begin file src/westmere/sse_detect_encodings.cpp */ template // len is known to be a multiple of 2 when this is called @@ -24785,7 +28640,7 @@ int sse_detect_encodings(const char * buf, size_t len) { // To be valid UTF-32, a surrogate cannot be in the two most significant bytes of any 32-bit word. // On the other hand, to be valid UTF-16LE, at least one surrogate must be in the two most significant // bytes of a 32-bit word since they always come in pairs in UTF-16LE. - // Note that we always proceed in multiple of 4 before this point so there is no offset in 32-bit words. + // Note that we always proceed in multiple of 4 before this point so there is no offset in 32-bit code units. if (((surrogates_bitmask0 | surrogates_bitmask1) & 0xaaaa) != 0) { is_utf32 = false; @@ -24942,10 +28797,9 @@ int sse_detect_encodings(const char * buf, size_t len) { } /* end file src/westmere/sse_detect_encodings.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=westmere/sse_validate_utf16.cpp /* begin file src/westmere/sse_validate_utf16.cpp */ /* - In UTF-16 words in range 0xD800 to 0xDFFF have special meaning. + In UTF-16 code units in range 0xD800 to 0xDFFF have special meaning. In a vectorized algorithm we want to examine the most significant nibble in order to select a fast path. If none of highest nibbles @@ -24981,7 +28835,7 @@ int sse_detect_encodings(const char * buf, size_t len) { 0 0 1 0 1 0 0 0 b = a << 1 1 1 1 1 1 1 1 0 c = V | a | b ^ - the last bit can be zero, we just consume 7 words + the last bit can be zero, we just consume 7 code units and recheck this word in the next iteration */ @@ -25026,7 +28880,7 @@ const char16_t* sse_validate_utf16(const char16_t* input, size_t size) { // // Fact: high surrogate has 11th bit set (3rd bit in the higher word) - // V - non-surrogate words + // V - non-surrogate code units // V = not surrogates_wordmask const uint16_t V = static_cast(~surrogates_bitmask); @@ -25047,10 +28901,10 @@ const char16_t* sse_validate_utf16(const char16_t* input, size_t size) { if (c == 0xffff) { // The whole input register contains valid UTF-16, i.e., - // either single words or proper surrogate pairs. + // either single code units or proper surrogate pairs. input += 16; } else if (c == 0x7fff) { - // The 15 lower words of the input register contains valid UTF-16. + // The 15 lower code units of the input register contains valid UTF-16. // The 15th word may be either a low or high surrogate. It the next // iteration we 1) check if the low surrogate is followed by a high // one, 2) reject sole high surrogate. @@ -25104,7 +28958,7 @@ const result sse_validate_utf16_with_errors(const char16_t* input, size_t size) // // Fact: high surrogate has 11th bit set (3rd bit in the higher word) - // V - non-surrogate words + // V - non-surrogate code units // V = not surrogates_wordmask const uint16_t V = static_cast(~surrogates_bitmask); @@ -25125,10 +28979,10 @@ const result sse_validate_utf16_with_errors(const char16_t* input, size_t size) if (c == 0xffff) { // The whole input register contains valid UTF-16, i.e., - // either single words or proper surrogate pairs. + // either single code units or proper surrogate pairs. input += 16; } else if (c == 0x7fff) { - // The 15 lower words of the input register contains valid UTF-16. + // The 15 lower code units of the input register contains valid UTF-16. // The 15th word may be either a low or high surrogate. It the next // iteration we 1) check if the low surrogate is followed by a high // one, 2) reject sole high surrogate. @@ -25142,7 +28996,6 @@ const result sse_validate_utf16_with_errors(const char16_t* input, size_t size) return result(error_code::SUCCESS, input - start); } /* end file src/westmere/sse_validate_utf16.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=westmere/sse_validate_utf32le.cpp /* begin file src/westmere/sse_validate_utf32le.cpp */ /* Returns: - pointer to the last unprocessed character (a scalar fallback should check the rest); @@ -25208,7 +29061,144 @@ const result sse_validate_utf32le_with_errors(const char32_t* input, size_t size } /* end file src/westmere/sse_validate_utf32le.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=westmere/sse_convert_utf8_to_utf16.cpp +/* begin file src/westmere/sse_convert_latin1_to_utf8.cpp */ +std::pair sse_convert_latin1_to_utf8( + const char* latin_input, + const size_t latin_input_length, + char* utf8_output) { + const char* end = latin_input + latin_input_length; + + const __m128i v_0000 = _mm_setzero_si128(); + // 0b1000_0000 + const __m128i v_80 = _mm_set1_epi8((uint8_t)0x80); + // 0b1111_1111_1000_0000 + const __m128i v_ff80 = _mm_set1_epi16((uint16_t)0xff80); + + const __m128i latin_1_half_into_u16_byte_mask = _mm_setr_epi8( + 0, '\x80', + 1, '\x80', + 2, '\x80', + 3, '\x80', + 4, '\x80', + 5, '\x80', + 6, '\x80', + 7, '\x80' + ); + + const __m128i latin_2_half_into_u16_byte_mask = _mm_setr_epi8( + 8, '\x80', + 9, '\x80', + 10, '\x80', + 11, '\x80', + 12, '\x80', + 13, '\x80', + 14, '\x80', + 15, '\x80' + ); + + // each latin1 takes 1-2 utf8 bytes + // slow path writes useful 8-15 bytes twice (eagerly writes 16 bytes and then adjust the pointer) + // so the last write can exceed the utf8_output size by 8-1 bytes + // by reserving 8 extra input bytes, we expect the output to have 8-16 bytes free + while (latin_input + 16 + 8 <= end) { + // Load 16 Latin1 characters (16 bytes) into a 128-bit register + __m128i v_latin = _mm_loadu_si128((__m128i*)latin_input); + + + if (_mm_testz_si128(v_latin, v_80)) {// ASCII fast path!!!! + _mm_storeu_si128((__m128i*)utf8_output, v_latin); + latin_input += 16; + utf8_output += 16; + continue; + } + + + // assuming a/b are bytes and A/B are uint16 of the same value + // aaaa_aaaa_bbbb_bbbb -> AAAA_AAAA + __m128i v_u16_latin_1_half = _mm_shuffle_epi8(v_latin, latin_1_half_into_u16_byte_mask); + // aaaa_aaaa_bbbb_bbbb -> BBBB_BBBB + __m128i v_u16_latin_2_half = _mm_shuffle_epi8(v_latin, latin_2_half_into_u16_byte_mask); + + + internal::westmere::write_v_u16_11bits_to_utf8(v_u16_latin_1_half, utf8_output, v_0000, v_ff80); + internal::westmere::write_v_u16_11bits_to_utf8(v_u16_latin_2_half, utf8_output, v_0000, v_ff80); + latin_input += 16; + } + + if (latin_input + 16 <= end) { + // Load 16 Latin1 characters (16 bytes) into a 128-bit register + __m128i v_latin = _mm_loadu_si128((__m128i*)latin_input); + + if (_mm_testz_si128(v_latin, v_80)) {// ASCII fast path!!!! + _mm_storeu_si128((__m128i*)utf8_output, v_latin); + latin_input += 16; + utf8_output += 16; + } else { + // assuming a/b are bytes and A/B are uint16 of the same value + // aaaa_aaaa_bbbb_bbbb -> AAAA_AAAA + __m128i v_u16_latin_1_half = _mm_shuffle_epi8(v_latin, latin_1_half_into_u16_byte_mask); + internal::westmere::write_v_u16_11bits_to_utf8(v_u16_latin_1_half, utf8_output, v_0000, v_ff80); + latin_input += 8; + } + } + + return std::make_pair(latin_input, utf8_output); +}; +/* end file src/westmere/sse_convert_latin1_to_utf8.cpp */ +/* begin file src/westmere/sse_convert_latin1_to_utf16.cpp */ +template +std::pair sse_convert_latin1_to_utf16(const char *latin1_input, size_t len, + char16_t *utf16_output) { + size_t rounded_len = len & ~0xF; // Round down to nearest multiple of 16 + for (size_t i = 0; i < rounded_len; i += 16) { + // Load 16 Latin1 characters into a 128-bit register + __m128i in = _mm_loadu_si128(reinterpret_cast(&latin1_input[i])); + __m128i out1 = big_endian ? _mm_unpacklo_epi8(_mm_setzero_si128(), in) + : _mm_unpacklo_epi8(in, _mm_setzero_si128()); + __m128i out2 = big_endian ? _mm_unpackhi_epi8(_mm_setzero_si128(), in) + : _mm_unpackhi_epi8(in, _mm_setzero_si128()); + // Zero extend each Latin1 character to 16-bit integers and store the results back to memory + _mm_storeu_si128(reinterpret_cast<__m128i*>(&utf16_output[i]), out1); + _mm_storeu_si128(reinterpret_cast<__m128i*>(&utf16_output[i + 8]), out2); + } + // return pointers pointing to where we left off + return std::make_pair(latin1_input + rounded_len, utf16_output + rounded_len); +} +/* end file src/westmere/sse_convert_latin1_to_utf16.cpp */ +/* begin file src/westmere/sse_convert_latin1_to_utf32.cpp */ +std::pair sse_convert_latin1_to_utf32(const char* buf, size_t len, char32_t* utf32_output) { + const char* end = buf + len; + + while (buf + 16 <= end) { + // Load 16 Latin1 characters (16 bytes) into a 128-bit register + __m128i in = _mm_loadu_si128((__m128i*)buf); + + // Shift input to process next 4 bytes + __m128i in_shifted1 = _mm_srli_si128(in, 4); + __m128i in_shifted2 = _mm_srli_si128(in, 8); + __m128i in_shifted3 = _mm_srli_si128(in, 12); + + // expand 8-bit to 32-bit unit + __m128i out1 = _mm_cvtepu8_epi32(in); + __m128i out2 = _mm_cvtepu8_epi32(in_shifted1); + __m128i out3 = _mm_cvtepu8_epi32(in_shifted2); + __m128i out4 = _mm_cvtepu8_epi32(in_shifted3); + + _mm_storeu_si128((__m128i*)utf32_output, out1); + _mm_storeu_si128((__m128i*)(utf32_output + 4), out2); + _mm_storeu_si128((__m128i*)(utf32_output + 8), out3); + _mm_storeu_si128((__m128i*)(utf32_output + 12), out4); + + utf32_output += 16; + buf += 16; + } + + return std::make_pair(buf, utf32_output); +} + +/* end file src/westmere/sse_convert_latin1_to_utf32.cpp */ + + /* begin file src/westmere/sse_convert_utf8_to_utf16.cpp */ // depends on "tables/utf8_to_utf16_tables.h" @@ -25249,7 +29239,7 @@ size_t convert_masked_utf8_to_utf16(const char *input, return 16; // We consumed 16 bytes. } if(((utf8_end_of_code_point_mask & 0xFFFF) == 0xaaaa)) { - // We want to take 8 2-byte UTF-8 words and turn them into 8 2-byte UTF-16 words. + // We want to take 8 2-byte UTF-8 code units and turn them into 8 2-byte UTF-16 code units. // There is probably a more efficient sequence, but the following might do. const __m128i sh = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -25262,7 +29252,7 @@ size_t convert_masked_utf8_to_utf16(const char *input, return 16; } if(input_utf8_end_of_code_point_mask == 0x924) { - // We want to take 4 3-byte UTF-8 words and turn them into 4 2-byte UTF-16 words. + // We want to take 4 3-byte UTF-8 code units and turn them into 4 2-byte UTF-16 code units. // There is probably a more efficient sequence, but the following might do. const __m128i sh = _mm_setr_epi8(2, 1, 0, -1, 5, 4, 3, -1, 8, 7, 6, -1, 11, 10, 9, -1); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -25289,10 +29279,10 @@ size_t convert_masked_utf8_to_utf16(const char *input, const uint8_t consumed = tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][1]; if (idx < 64) { - // SIX (6) input code-words + // SIX (6) input code-code units // this is a relatively easy scenario - // we process SIX (6) input code-words. The max length in bytes of six code - // words spanning between 1 and 2 bytes each is 12 bytes. On processors + // we process SIX (6) input code-code units. The max length in bytes of six code + // code units spanning between 1 and 2 bytes each is 12 bytes. On processors // where pdep/pext is fast, we might be able to use a small lookup table. const __m128i sh = _mm_loadu_si128((const __m128i *)tables::utf8_to_utf16::shufutf8[idx]); @@ -25304,7 +29294,7 @@ size_t convert_masked_utf8_to_utf16(const char *input, _mm_storeu_si128((__m128i *)utf16_output, composed); utf16_output += 6; // We wrote 12 bytes, 6 code points. } else if (idx < 145) { - // FOUR (4) input code-words + // FOUR (4) input code-code units const __m128i sh = _mm_loadu_si128((const __m128i *)tables::utf8_to_utf16::shufutf8[idx]); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -25323,7 +29313,7 @@ size_t convert_masked_utf8_to_utf16(const char *input, _mm_storeu_si128((__m128i *)utf16_output, composed_repacked); utf16_output += 4; } else if (idx < 209) { - // TWO (2) input code-words + // TWO (2) input code-code units ////////////// // There might be garbage inputs where a leading byte mascarades as a four-byte // leading byte (by being followed by 3 continuation byte), but is not greater than @@ -25393,7 +29383,6 @@ size_t convert_masked_utf8_to_utf16(const char *input, return consumed; } /* end file src/westmere/sse_convert_utf8_to_utf16.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=westmere/sse_convert_utf8_to_utf32.cpp /* begin file src/westmere/sse_convert_utf8_to_utf32.cpp */ // depends on "tables/utf8_to_utf16_tables.h" @@ -25428,7 +29417,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, return 16; // We consumed 16 bytes. } if(((utf8_end_of_code_point_mask & 0xffff) == 0xaaaa)) { - // We want to take 8 2-byte UTF-8 words and turn them into 8 4-byte UTF-32 words. + // We want to take 8 2-byte UTF-8 code units and turn them into 8 4-byte UTF-32 code units. // There is probably a more efficient sequence, but the following might do. const __m128i sh = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -25441,7 +29430,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, return 16; } if(input_utf8_end_of_code_point_mask == 0x924) { - // We want to take 4 3-byte UTF-8 words and turn them into 4 4-byte UTF-32 words. + // We want to take 4 3-byte UTF-8 code units and turn them into 4 4-byte UTF-32 code units. // There is probably a more efficient sequence, but the following might do. const __m128i sh = _mm_setr_epi8(2, 1, 0, -1, 5, 4, 3, -1, 8, 7, 6, -1, 11, 10, 9, -1); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -25466,10 +29455,10 @@ size_t convert_masked_utf8_to_utf32(const char *input, const uint8_t consumed = tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][1]; if (idx < 64) { - // SIX (6) input code-words + // SIX (6) input code-code units // this is a relatively easy scenario - // we process SIX (6) input code-words. The max length in bytes of six code - // words spanning between 1 and 2 bytes each is 12 bytes. On processors + // we process SIX (6) input code-code units. The max length in bytes of six code + // code units spanning between 1 and 2 bytes each is 12 bytes. On processors // where pdep/pext is fast, we might be able to use a small lookup table. const __m128i sh = _mm_loadu_si128((const __m128i *)tables::utf8_to_utf16::shufutf8[idx]); @@ -25481,7 +29470,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, _mm_storeu_si128(reinterpret_cast<__m128i *>(utf32_output+4), _mm_cvtepu16_epi32(_mm_srli_si128(composed,8))); utf32_output += 6; // We wrote 12 bytes, 6 code points. } else if (idx < 145) { - // FOUR (4) input code-words + // FOUR (4) input code-code units const __m128i sh = _mm_loadu_si128((const __m128i *)tables::utf8_to_utf16::shufutf8[idx]); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -25498,7 +29487,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, _mm_storeu_si128((__m128i *)utf32_output, composed); utf32_output += 4; } else if (idx < 209) { - // TWO (2) input code-words + // TWO (2) input code-code units const __m128i sh = _mm_loadu_si128((const __m128i *)tables::utf8_to_utf16::shufutf8[idx]); const __m128i perm = _mm_shuffle_epi8(in, sh); @@ -25523,13 +29512,130 @@ size_t convert_masked_utf8_to_utf32(const char *input, } return consumed; } -/* end file src/westmere/sse_convert_utf8_to_utf32.cpp */ +/* end file src/westmere/sse_convert_utf8_to_utf32.cpp */ +/* begin file src/westmere/sse_convert_utf8_to_latin1.cpp */ +// depends on "tables/utf8_to_utf16_tables.h" + + +// Convert up to 12 bytes from utf8 to latin1 using a mask indicating the +// end of the code points. Only the least significant 12 bits of the mask +// are accessed. +// It returns how many bytes were consumed (up to 12). +size_t convert_masked_utf8_to_latin1(const char *input, + uint64_t utf8_end_of_code_point_mask, + char *&latin1_output) { + // we use an approach where we try to process up to 12 input bytes. + // Why 12 input bytes and not 16? Because we are concerned with the size of + // the lookup tables. Also 12 is nicely divisible by two and three. + // + // + // Optimization note: our main path below is load-latency dependent. Thus it is maybe + // beneficial to have fast paths that depend on branch prediction but have less latency. + // This results in more instructions but, potentially, also higher speeds. + // + const __m128i in = _mm_loadu_si128((__m128i *)input); + const uint16_t input_utf8_end_of_code_point_mask = + utf8_end_of_code_point_mask & 0xfff; //we're only processing 12 bytes in case it`s not all ASCII + if(((utf8_end_of_code_point_mask & 0xffff) == 0xffff)) { + // We process the data in chunks of 16 bytes. + _mm_storeu_si128(reinterpret_cast<__m128i *>(latin1_output), in); + latin1_output += 16; // We wrote 16 characters. + return 16; // We consumed 16 bytes. + } + /// We do not have a fast path available, so we fallback. + const uint8_t idx = + tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][0]; + const uint8_t consumed = + tables::utf8_to_utf16::utf8bigindex[input_utf8_end_of_code_point_mask][1]; + // this indicates an invalid input: + if(idx >= 64) { return consumed; } + // Here we should have (idx < 64), if not, there is a bug in the validation or elsewhere. + // SIX (6) input code-code units + // this is a relatively easy scenario + // we process SIX (6) input code-code units. The max length in bytes of six code + // code units spanning between 1 and 2 bytes each is 12 bytes. On processors + // where pdep/pext is fast, we might be able to use a small lookup table. + const __m128i sh = + _mm_loadu_si128((const __m128i *)tables::utf8_to_utf16::shufutf8[idx]); + const __m128i perm = _mm_shuffle_epi8(in, sh); + const __m128i ascii = _mm_and_si128(perm, _mm_set1_epi16(0x7f)); + const __m128i highbyte = _mm_and_si128(perm, _mm_set1_epi16(0x1f00)); + __m128i composed = _mm_or_si128(ascii, _mm_srli_epi16(highbyte, 2)); + const __m128i latin1_packed = _mm_packus_epi16(composed,composed); + // writing 8 bytes even though we only care about the first 6 bytes. + // performance note: it would be faster to use _mm_storeu_si128, we should investigate. + _mm_storel_epi64((__m128i *)latin1_output, latin1_packed); + latin1_output += 6; // We wrote 6 bytes. + return consumed; +} +/* end file src/westmere/sse_convert_utf8_to_latin1.cpp */ + +/* begin file src/westmere/sse_convert_utf16_to_latin1.cpp */ +template +std::pair sse_convert_utf16_to_latin1(const char16_t* buf, size_t len, char* latin1_output) { + const char16_t* end = buf + len; + while (buf + 8 <= end) { + // Load 8 UTF-16 characters into 128-bit SSE register + __m128i in = _mm_loadu_si128(reinterpret_cast(buf)); + + if (!match_system(big_endian)) { + const __m128i swap = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); + in = _mm_shuffle_epi8(in, swap); + } + + __m128i high_byte_mask = _mm_set1_epi16((int16_t)0xFF00); + if (_mm_testz_si128(in, high_byte_mask)) { + // Pack 16-bit characters into 8-bit and store in latin1_output + __m128i latin1_packed = _mm_packus_epi16(in, in); + _mm_storel_epi64(reinterpret_cast<__m128i*>(latin1_output), latin1_packed); + // Adjust pointers for next iteration + buf += 8; + latin1_output += 8; + } else { + return std::make_pair(nullptr, reinterpret_cast(latin1_output)); + } + } // while + return std::make_pair(buf, latin1_output); +} + +template +std::pair sse_convert_utf16_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) { + const char16_t* start = buf; + const char16_t* end = buf + len; + while (buf + 8 <= end) { + __m128i in = _mm_loadu_si128(reinterpret_cast(buf)); + + if (!big_endian) { + const __m128i swap = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); + in = _mm_shuffle_epi8(in, swap); + } -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=westmere/sse_convert_utf16_to_utf8.cpp + __m128i high_byte_mask = _mm_set1_epi16((int16_t)0xFF00); + if (_mm_testz_si128(in, high_byte_mask)) { + __m128i latin1_packed = _mm_packus_epi16(in, in); + _mm_storel_epi64(reinterpret_cast<__m128i*>(latin1_output), latin1_packed); + buf += 8; + latin1_output += 8; + } else { + // Fallback to scalar code for handling errors + for(int k = 0; k < 8; k++) { + uint16_t word = !match_system(big_endian) ? scalar::utf16::swap_bytes(buf[k]) : buf[k]; + if(word <= 0xff) { + *latin1_output++ = char(word); + } else { + return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), latin1_output); + } + } + buf += 8; + } + } // while + return std::make_pair(result(error_code::SUCCESS, buf - start), latin1_output); +} +/* end file src/westmere/sse_convert_utf16_to_latin1.cpp */ /* begin file src/westmere/sse_convert_utf16_to_utf8.cpp */ /* The vectorized algorithm works on single SSE register i.e., it - loads eight 16-bit words. + loads eight 16-bit code units. We consider three cases: 1. an input register contains no surrogates and each value @@ -25541,7 +29647,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, Ad 1. - When values are less than 0x0800, it means that a 16-bit words + When values are less than 0x0800, it means that a 16-bit code unit can be converted into: 1) single UTF8 byte (when it's an ASCII char) or 2) two UTF8 bytes. @@ -25555,7 +29661,7 @@ size_t convert_masked_utf8_to_utf32(const char *input, Ad 2. - When values fit in 16-bit words, but are above 0x07ff, then + When values fit in 16-bit code units, but are above 0x07ff, then a single word may produce one, two or three UTF8 bytes. We prepare data for all these three cases in two registers. @@ -25588,7 +29694,6 @@ std::pair sse_convert_utf16_to_utf8(const char16_t* buf, const __m128i v_0000 = _mm_setzero_si128(); const __m128i v_f800 = _mm_set1_epi16((int16_t)0xf800); const __m128i v_d800 = _mm_set1_epi16((int16_t)0xd800); - const __m128i v_c080 = _mm_set1_epi16((int16_t)0xc080); const size_t safety_margin = 12; // to avoid overruns, see issue https://github.com/simdutf/simdutf/issues/92 while (buf + 16 + safety_margin <= end) { @@ -25637,44 +29742,9 @@ std::pair sse_convert_utf16_to_utf8(const char16_t* buf, const uint16_t one_or_two_bytes_bitmask = static_cast(_mm_movemask_epi8(one_or_two_bytes_bytemask)); if (one_or_two_bytes_bitmask == 0xffff) { - // 1. prepare 2-byte values - // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 - // expected output : [110a|aaaa|10bb|bbbb] x 8 - const __m128i v_1f00 = _mm_set1_epi16((int16_t)0x1f00); - const __m128i v_003f = _mm_set1_epi16((int16_t)0x003f); - - // t0 = [000a|aaaa|bbbb|bb00] - const __m128i t0 = _mm_slli_epi16(in, 2); - // t1 = [000a|aaaa|0000|0000] - const __m128i t1 = _mm_and_si128(t0, v_1f00); - // t2 = [0000|0000|00bb|bbbb] - const __m128i t2 = _mm_and_si128(in, v_003f); - // t3 = [000a|aaaa|00bb|bbbb] - const __m128i t3 = _mm_or_si128(t1, t2); - // t4 = [110a|aaaa|10bb|bbbb] - const __m128i t4 = _mm_or_si128(t3, v_c080); - - // 2. merge ASCII and 2-byte codewords - const __m128i utf8_unpacked = _mm_blendv_epi8(t4, in, one_byte_bytemask); - - // 3. prepare bitmask for 8-bit lookup - // one_byte_bitmask = hhggffeeddccbbaa -- the bits are doubled (h - MSB, a - LSB) - const uint16_t m0 = one_byte_bitmask & 0x5555; // m0 = 0h0g0f0e0d0c0b0a - const uint16_t m1 = static_cast(m0 >> 7); // m1 = 00000000h0g0f0e0 - const uint8_t m2 = static_cast((m0 | m1) & 0xff); // m2 = hdgcfbea - // 4. pack the bytes - const uint8_t* row = &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; - const __m128i shuffle = _mm_loadu_si128((__m128i*)(row + 1)); - const __m128i utf8_packed = _mm_shuffle_epi8(utf8_unpacked, shuffle); - - // 5. store bytes - _mm_storeu_si128((__m128i*)utf8_output, utf8_packed); - - // 6. adjust pointers - buf += 8; - utf8_output += row[0]; - continue; - + internal::westmere::write_v_u16_11bits_to_utf8(in, utf8_output, one_byte_bytemask, one_byte_bitmask); + buf += 8; + continue; } // 1. Check if there are any surrogate word in the input chunk. @@ -25688,7 +29758,7 @@ std::pair sse_convert_utf16_to_utf8(const char16_t* buf, // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, // it is likely an uncommon occurrence. if (surrogates_bitmask == 0x0000) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes const __m128i dup_even = _mm_setr_epi16(0x0000, 0x0202, 0x0404, 0x0606, 0x0808, 0x0a0a, 0x0c0c, 0x0e0e); @@ -25697,7 +29767,7 @@ std::pair sse_convert_utf16_to_utf8(const char16_t* buf, 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - We expand the input word (16-bit) into two words (32-bit), thus + We expand the input word (16-bit) into two code units (32-bit), thus we have room for four bytes. However, we need five distinct bit layouts. Note that the last byte in cases #2 and #3 is the same. @@ -25708,7 +29778,7 @@ std::pair sse_convert_utf16_to_utf8(const char16_t* buf, either byte 1 for case #2 or byte 2 for case #3. Note that they differ by exactly one bit. - Finally from these two words we build proper UTF-8 sequence, taking + Finally from these two code units we build proper UTF-8 sequence, taking into account the case (i.e, the number of bytes to write). */ /** @@ -25736,15 +29806,15 @@ std::pair sse_convert_utf16_to_utf8(const char16_t* buf, const __m128i s4 = _mm_xor_si128(s3, m0); #undef simdutf_vec - // 4. expand words 16-bit => 32-bit + // 4. expand code units 16-bit => 32-bit const __m128i out0 = _mm_unpacklo_epi16(t2, s4); const __m128i out1 = _mm_unpackhi_epi16(t2, s4); - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle const uint16_t mask = (one_byte_bitmask & 0x5555) | (one_or_two_bytes_bitmask & 0xaaaa); if(mask == 0) { - // We only have three-byte words. Use fast path. + // We only have three-byte code units. Use fast path. const __m128i shuffle = _mm_setr_epi8(2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1); const __m128i utf8_0 = _mm_shuffle_epi8(out0, shuffle); const __m128i utf8_1 = _mm_shuffle_epi8(out1, shuffle); @@ -25828,7 +29898,6 @@ std::pair sse_convert_utf16_to_utf8_with_errors(const char16_t* b const __m128i v_0000 = _mm_setzero_si128(); const __m128i v_f800 = _mm_set1_epi16((int16_t)0xf800); const __m128i v_d800 = _mm_set1_epi16((int16_t)0xd800); - const __m128i v_c080 = _mm_set1_epi16((int16_t)0xc080); const size_t safety_margin = 12; // to avoid overruns, see issue https://github.com/simdutf/simdutf/issues/92 while (buf + 16 + safety_margin <= end) { @@ -25877,44 +29946,9 @@ std::pair sse_convert_utf16_to_utf8_with_errors(const char16_t* b const uint16_t one_or_two_bytes_bitmask = static_cast(_mm_movemask_epi8(one_or_two_bytes_bytemask)); if (one_or_two_bytes_bitmask == 0xffff) { - // 1. prepare 2-byte values - // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 - // expected output : [110a|aaaa|10bb|bbbb] x 8 - const __m128i v_1f00 = _mm_set1_epi16((int16_t)0x1f00); - const __m128i v_003f = _mm_set1_epi16((int16_t)0x003f); - - // t0 = [000a|aaaa|bbbb|bb00] - const __m128i t0 = _mm_slli_epi16(in, 2); - // t1 = [000a|aaaa|0000|0000] - const __m128i t1 = _mm_and_si128(t0, v_1f00); - // t2 = [0000|0000|00bb|bbbb] - const __m128i t2 = _mm_and_si128(in, v_003f); - // t3 = [000a|aaaa|00bb|bbbb] - const __m128i t3 = _mm_or_si128(t1, t2); - // t4 = [110a|aaaa|10bb|bbbb] - const __m128i t4 = _mm_or_si128(t3, v_c080); - - // 2. merge ASCII and 2-byte codewords - const __m128i utf8_unpacked = _mm_blendv_epi8(t4, in, one_byte_bytemask); - - // 3. prepare bitmask for 8-bit lookup - // one_byte_bitmask = hhggffeeddccbbaa -- the bits are doubled (h - MSB, a - LSB) - const uint16_t m0 = one_byte_bitmask & 0x5555; // m0 = 0h0g0f0e0d0c0b0a - const uint16_t m1 = static_cast(m0 >> 7); // m1 = 00000000h0g0f0e0 - const uint8_t m2 = static_cast((m0 | m1) & 0xff); // m2 = hdgcfbea - // 4. pack the bytes - const uint8_t* row = &simdutf::tables::utf16_to_utf8::pack_1_2_utf8_bytes[m2][0]; - const __m128i shuffle = _mm_loadu_si128((__m128i*)(row + 1)); - const __m128i utf8_packed = _mm_shuffle_epi8(utf8_unpacked, shuffle); - - // 5. store bytes - _mm_storeu_si128((__m128i*)utf8_output, utf8_packed); - - // 6. adjust pointers - buf += 8; - utf8_output += row[0]; - continue; - + internal::westmere::write_v_u16_11bits_to_utf8(in, utf8_output, one_byte_bytemask, one_byte_bitmask); + buf += 8; + continue; } // 1. Check if there are any surrogate word in the input chunk. @@ -25928,7 +29962,7 @@ std::pair sse_convert_utf16_to_utf8_with_errors(const char16_t* b // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, // it is likely an uncommon occurrence. if (surrogates_bitmask == 0x0000) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes const __m128i dup_even = _mm_setr_epi16(0x0000, 0x0202, 0x0404, 0x0606, 0x0808, 0x0a0a, 0x0c0c, 0x0e0e); @@ -25937,7 +29971,7 @@ std::pair sse_convert_utf16_to_utf8_with_errors(const char16_t* b 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - We expand the input word (16-bit) into two words (32-bit), thus + We expand the input word (16-bit) into two code units (32-bit), thus we have room for four bytes. However, we need five distinct bit layouts. Note that the last byte in cases #2 and #3 is the same. @@ -25948,7 +29982,7 @@ std::pair sse_convert_utf16_to_utf8_with_errors(const char16_t* b either byte 1 for case #2 or byte 2 for case #3. Note that they differ by exactly one bit. - Finally from these two words we build proper UTF-8 sequence, taking + Finally from these two code units we build proper UTF-8 sequence, taking into account the case (i.e, the number of bytes to write). */ /** @@ -25976,15 +30010,15 @@ std::pair sse_convert_utf16_to_utf8_with_errors(const char16_t* b const __m128i s4 = _mm_xor_si128(s3, m0); #undef simdutf_vec - // 4. expand words 16-bit => 32-bit + // 4. expand code units 16-bit => 32-bit const __m128i out0 = _mm_unpacklo_epi16(t2, s4); const __m128i out1 = _mm_unpackhi_epi16(t2, s4); - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle const uint16_t mask = (one_byte_bitmask & 0x5555) | (one_or_two_bytes_bitmask & 0xaaaa); if(mask == 0) { - // We only have three-byte words. Use fast path. + // We only have three-byte code units. Use fast path. const __m128i shuffle = _mm_setr_epi8(2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1); const __m128i utf8_0 = _mm_shuffle_epi8(out0, shuffle); const __m128i utf8_1 = _mm_shuffle_epi8(out1, shuffle); @@ -26053,11 +30087,10 @@ std::pair sse_convert_utf16_to_utf8_with_errors(const char16_t* b return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output); } /* end file src/westmere/sse_convert_utf16_to_utf8.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=westmere/sse_convert_utf16_to_utf32.cpp /* begin file src/westmere/sse_convert_utf16_to_utf32.cpp */ /* The vectorized algorithm works on single SSE register i.e., it - loads eight 16-bit words. + loads eight 16-bit code units. We consider three cases: 1. an input register contains no surrogates and each value @@ -26069,7 +30102,7 @@ std::pair sse_convert_utf16_to_utf8_with_errors(const char16_t* b Ad 1. - When values are less than 0x0800, it means that a 16-bit words + When values are less than 0x0800, it means that a 16-bit code unit can be converted into: 1) single UTF8 byte (when it's an ASCII char) or 2) two UTF8 bytes. @@ -26083,7 +30116,7 @@ std::pair sse_convert_utf16_to_utf8_with_errors(const char16_t* b Ad 2. - When values fit in 16-bit words, but are above 0x07ff, then + When values fit in 16-bit code units, but are above 0x07ff, then a single word may produce one, two or three UTF8 bytes. We prepare data for all these three cases in two registers. @@ -26115,7 +30148,7 @@ std::pair sse_convert_utf16_to_utf32(const char16_t* const __m128i v_f800 = _mm_set1_epi16((int16_t)0xf800); const __m128i v_d800 = _mm_set1_epi16((int16_t)0xd800); - while (buf + 16 <= end) { + while (buf + 8 <= end) { __m128i in = _mm_loadu_si128((__m128i*)buf); if (big_endian) { @@ -26134,7 +30167,7 @@ std::pair sse_convert_utf16_to_utf32(const char16_t* // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, // it is likely an uncommon occurrence. if (surrogates_bitmask == 0x0000) { - // case: no surrogate pair, extend 16-bit words to 32-bit words + // case: no surrogate pair, extend 16-bit code units to 32-bit code units _mm_storeu_si128(reinterpret_cast<__m128i *>(utf32_output), _mm_cvtepu16_epi32(in)); _mm_storeu_si128(reinterpret_cast<__m128i *>(utf32_output+4), _mm_cvtepu16_epi32(_mm_srli_si128(in,8))); utf32_output += 8; @@ -26183,7 +30216,7 @@ std::pair sse_convert_utf16_to_utf32_with_errors(const char16 const __m128i v_f800 = _mm_set1_epi16((int16_t)0xf800); const __m128i v_d800 = _mm_set1_epi16((int16_t)0xd800); - while (buf + 16 <= end) { + while (buf + 8 <= end) { __m128i in = _mm_loadu_si128((__m128i*)buf); if (big_endian) { @@ -26202,7 +30235,7 @@ std::pair sse_convert_utf16_to_utf32_with_errors(const char16 // It might seem like checking for surrogates_bitmask == 0xc000 could help. However, // it is likely an uncommon occurrence. if (surrogates_bitmask == 0x0000) { - // case: no surrogate pair, extend 16-bit words to 32-bit words + // case: no surrogate pair, extend 16-bit code units to 32-bit code units _mm_storeu_si128(reinterpret_cast<__m128i *>(utf32_output), _mm_cvtepu16_epi32(in)); _mm_storeu_si128(reinterpret_cast<__m128i *>(utf32_output+4), _mm_cvtepu16_epi32(_mm_srli_si128(in,8))); utf32_output += 8; @@ -26237,51 +30270,139 @@ std::pair sse_convert_utf16_to_utf32_with_errors(const char16 } /* end file src/westmere/sse_convert_utf16_to_utf32.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=westmere/sse_convert_utf32_to_utf8.cpp +/* begin file src/westmere/sse_convert_utf32_to_latin1.cpp */ +std::pair +sse_convert_utf32_to_latin1(const char32_t *buf, size_t len, + char *latin1_output) { + const size_t rounded_len = len & ~0xF; // Round down to nearest multiple of 16 + + __m128i high_bytes_mask = _mm_set1_epi32(0xFFFFFF00); + __m128i shufmask = + _mm_set_epi8(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 8, 4, 0); + + for (size_t i = 0; i < rounded_len; i += 16) { + __m128i in1 = _mm_loadu_si128((__m128i *)buf); + __m128i in2 = _mm_loadu_si128((__m128i *)(buf + 4)); + __m128i in3 = _mm_loadu_si128((__m128i *)(buf + 8)); + __m128i in4 = _mm_loadu_si128((__m128i *)(buf + 12)); + + __m128i check_combined = _mm_or_si128(in1, in2); + check_combined = _mm_or_si128(check_combined, in3); + check_combined = _mm_or_si128(check_combined, in4); + + if (!_mm_testz_si128(check_combined, high_bytes_mask)) { + return std::make_pair(nullptr, latin1_output); + } + __m128i pack1 = _mm_unpacklo_epi32(_mm_shuffle_epi8(in1, shufmask), _mm_shuffle_epi8(in2, shufmask)); + __m128i pack2 = _mm_unpacklo_epi32(_mm_shuffle_epi8(in3, shufmask), _mm_shuffle_epi8(in4, shufmask)); + __m128i pack = _mm_unpacklo_epi64(pack1, pack2); + _mm_storeu_si128((__m128i *)latin1_output, pack); + latin1_output += 16; + buf += 16; + } + + return std::make_pair(buf, latin1_output); +} + +std::pair +sse_convert_utf32_to_latin1_with_errors(const char32_t *buf, size_t len, + char *latin1_output) { + const char32_t *start = buf; + const size_t rounded_len = len & ~0xF; // Round down to nearest multiple of 16 + + __m128i high_bytes_mask = _mm_set1_epi32(0xFFFFFF00); + __m128i shufmask = + _mm_set_epi8(-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 12, 8, 4, 0); + + for (size_t i = 0; i < rounded_len; i += 16) { + __m128i in1 = _mm_loadu_si128((__m128i *)buf); + __m128i in2 = _mm_loadu_si128((__m128i *)(buf + 4)); + __m128i in3 = _mm_loadu_si128((__m128i *)(buf + 8)); + __m128i in4 = _mm_loadu_si128((__m128i *)(buf + 12)); + + __m128i check_combined = _mm_or_si128(in1, in2); + check_combined = _mm_or_si128(check_combined, in3); + check_combined = _mm_or_si128(check_combined, in4); + + if (!_mm_testz_si128(check_combined, high_bytes_mask)) { + // Fallback to scalar code for handling errors + for (int k = 0; k < 16; k++) { + char32_t codepoint = buf[k]; + if (codepoint <= 0xff) { + *latin1_output++ = char(codepoint); + } else { + return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), + latin1_output); + } + } + buf += 16; + continue; + } + __m128i pack1 = _mm_unpacklo_epi32(_mm_shuffle_epi8(in1, shufmask), _mm_shuffle_epi8(in2, shufmask)); + __m128i pack2 = _mm_unpacklo_epi32(_mm_shuffle_epi8(in3, shufmask), _mm_shuffle_epi8(in4, shufmask)); + __m128i pack = _mm_unpacklo_epi64(pack1, pack2); + _mm_storeu_si128((__m128i *)latin1_output, pack); + latin1_output += 16; + buf += 16; + } + + return std::make_pair(result(error_code::SUCCESS, buf - start), + latin1_output); +} +/* end file src/westmere/sse_convert_utf32_to_latin1.cpp */ /* begin file src/westmere/sse_convert_utf32_to_utf8.cpp */ std::pair sse_convert_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) { const char32_t* end = buf + len; - const __m128i v_0000 = _mm_setzero_si128(); - const __m128i v_f800 = _mm_set1_epi16((uint16_t)0xf800); - const __m128i v_c080 = _mm_set1_epi16((uint16_t)0xc080); - const __m128i v_ff80 = _mm_set1_epi16((uint16_t)0xff80); - const __m128i v_ffff0000 = _mm_set1_epi32((uint32_t)0xffff0000); - const __m128i v_7fffffff = _mm_set1_epi32((uint32_t)0x7fffffff); + const __m128i v_0000 = _mm_setzero_si128();//__m128 = 128 bits + const __m128i v_f800 = _mm_set1_epi16((uint16_t)0xf800); //1111 1000 0000 0000 + const __m128i v_c080 = _mm_set1_epi16((uint16_t)0xc080); //1100 0000 1000 0000 + const __m128i v_ff80 = _mm_set1_epi16((uint16_t)0xff80); //1111 1111 1000 0000 + const __m128i v_ffff0000 = _mm_set1_epi32((uint32_t)0xffff0000); //1111 1111 1111 1111 0000 0000 0000 0000 + const __m128i v_7fffffff = _mm_set1_epi32((uint32_t)0x7fffffff); //0111 1111 1111 1111 1111 1111 1111 1111 __m128i running_max = _mm_setzero_si128(); __m128i forbidden_bytemask = _mm_setzero_si128(); const size_t safety_margin = 12; // to avoid overruns, see issue https://github.com/simdutf/simdutf/issues/92 - while (buf + 16 + safety_margin <= end) { + while (buf + 16 + safety_margin <= end) { //buf is a char32_t pointer, each char32_t has 4 bytes or 32 bits, thus buf + 16 * char_32t = 512 bits = 64 bytes // We load two 16 bytes registers for a total of 32 bytes or 16 characters. __m128i in = _mm_loadu_si128((__m128i*)buf); - __m128i nextin = _mm_loadu_si128((__m128i*)buf+1); - running_max = _mm_max_epu32(_mm_max_epu32(in, running_max), nextin); - - // Pack 32-bit UTF-32 words to 16-bit UTF-16 words with unsigned saturation - __m128i in_16 = _mm_packus_epi32(_mm_and_si128(in, v_7fffffff), _mm_and_si128(nextin, v_7fffffff)); + __m128i nextin = _mm_loadu_si128((__m128i*)buf+1);//These two values can hold only 8 UTF32 chars + running_max = _mm_max_epu32( + _mm_max_epu32(in, running_max), //take element-wise max char32_t from in and running_max vector + nextin); //and take element-wise max element from nextin and running_max vector + + // Pack 32-bit UTF-32 code units to 16-bit UTF-16 code units with unsigned saturation + __m128i in_16 = _mm_packus_epi32( + _mm_and_si128(in, v_7fffffff), + _mm_and_si128(nextin, v_7fffffff) + );//in this context pack the two __m128 into a single + //By ensuring the highest bit is set to 0(&v_7fffffff), we're making sure all values are interpreted as non-negative, or specifically, the values are within the range of valid Unicode code points. + //remember : having leading byte 0 means a positive number by the two complements system. Unicode is well beneath the range where you'll start getting issues so that's OK. // Try to apply UTF-16 => UTF-8 from ./sse_convert_utf16_to_utf8.cpp - // Check for ASCII fast path - if(_mm_testz_si128(in_16, v_ff80)) { // ASCII fast path!!!! + // Check for ASCII fast path + + // ASCII fast path!!!! // We eagerly load another 32 bytes, hoping that they will be ASCII too. // The intuition is that we try to collect 16 ASCII characters which requires // a total of 64 bytes of input. If we fail, we just pass thirdin and fourthin // as our new inputs. + if(_mm_testz_si128(in_16, v_ff80)) { //if the first two blocks are ASCII __m128i thirdin = _mm_loadu_si128((__m128i*)buf+2); __m128i fourthin = _mm_loadu_si128((__m128i*)buf+3); - running_max = _mm_max_epu32(_mm_max_epu32(thirdin, running_max), fourthin); - __m128i nextin_16 = _mm_packus_epi32(_mm_and_si128(thirdin, v_7fffffff), _mm_and_si128(fourthin, v_7fffffff)); - if(!_mm_testz_si128(nextin_16, v_ff80)) { + running_max = _mm_max_epu32(_mm_max_epu32(thirdin, running_max), fourthin);//take the running max of all 4 vectors thus far + __m128i nextin_16 = _mm_packus_epi32(_mm_and_si128(thirdin, v_7fffffff), _mm_and_si128(fourthin, v_7fffffff));//pack into 1 vector, now you have two + if(!_mm_testz_si128(nextin_16, v_ff80)) { //checks if the second packed vector is ASCII, if not: // 1. pack the bytes // obviously suboptimal. - const __m128i utf8_packed = _mm_packus_epi16(in_16,in_16); + const __m128i utf8_packed = _mm_packus_epi16(in_16,in_16); //creates two copy of in_16 in 1 vector // 2. store (16 bytes) - _mm_storeu_si128((__m128i*)utf8_output, utf8_packed); + _mm_storeu_si128((__m128i*)utf8_output, utf8_packed); //put them into the output // 3. adjust pointers - buf += 8; - utf8_output += 8; + buf += 8; //the char32_t buffer pointer goes up 8 char32_t chars* 32 bits = 256 bits + utf8_output += 8; //same with output, e.g. lift the first two blocks alone. // Proceed with next input in_16 = nextin_16; // We need to update in and nextin because they are used later. @@ -26299,32 +30420,36 @@ std::pair sse_convert_utf32_to_utf8(const char32_t* buf, } } - // no bits set above 7th bit - const __m128i one_byte_bytemask = _mm_cmpeq_epi16(_mm_and_si128(in_16, v_ff80), v_0000); - const uint16_t one_byte_bitmask = static_cast(_mm_movemask_epi8(one_byte_bytemask)); + // no bits set above 7th bit -- find out all the ASCII characters + const __m128i one_byte_bytemask = _mm_cmpeq_epi16( // this takes four bytes at a time and compares: + _mm_and_si128(in_16, v_ff80), // the vector that get only the first 9 bits of each 16-bit/2-byte units + v_0000 // + ); // they should be all zero if they are ASCII. E.g. ASCII in UTF32 is of format 0000 0000 0000 0XXX XXXX + // _mm_cmpeq_epi16 should now return a 1111 1111 1111 1111 for equals, and 0000 0000 0000 0000 if not for each 16-bit/2-byte units + const uint16_t one_byte_bitmask = static_cast(_mm_movemask_epi8(one_byte_bytemask)); // collect the MSB from previous vector and put them into uint16_t mas // no bits set above 11th bit const __m128i one_or_two_bytes_bytemask = _mm_cmpeq_epi16(_mm_and_si128(in_16, v_f800), v_0000); const uint16_t one_or_two_bytes_bitmask = static_cast(_mm_movemask_epi8(one_or_two_bytes_bytemask)); if (one_or_two_bytes_bitmask == 0xffff) { - // case: all words either produce 1 or 2 UTF-8 bytes (at least one produces 2 bytes) + // case: all code units either produce 1 or 2 UTF-8 bytes (at least one produces 2 bytes) // 1. prepare 2-byte values // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 // expected output : [110a|aaaa|10bb|bbbb] x 8 - const __m128i v_1f00 = _mm_set1_epi16((int16_t)0x1f00); - const __m128i v_003f = _mm_set1_epi16((int16_t)0x003f); + const __m128i v_1f00 = _mm_set1_epi16((int16_t)0x1f00); // 0001 1111 0000 0000 + const __m128i v_003f = _mm_set1_epi16((int16_t)0x003f); // 0000 0000 0011 1111 // t0 = [000a|aaaa|bbbb|bb00] - const __m128i t0 = _mm_slli_epi16(in_16, 2); + const __m128i t0 = _mm_slli_epi16(in_16, 2); // shift packed vector by two // t1 = [000a|aaaa|0000|0000] - const __m128i t1 = _mm_and_si128(t0, v_1f00); + const __m128i t1 = _mm_and_si128(t0, v_1f00); // potentital first utf8 byte // t2 = [0000|0000|00bb|bbbb] - const __m128i t2 = _mm_and_si128(in_16, v_003f); + const __m128i t2 = _mm_and_si128(in_16, v_003f);// potential second utf8 byte // t3 = [000a|aaaa|00bb|bbbb] - const __m128i t3 = _mm_or_si128(t1, t2); + const __m128i t3 = _mm_or_si128(t1, t2); // first and second potential utf8 byte together // t4 = [110a|aaaa|10bb|bbbb] - const __m128i t4 = _mm_or_si128(t3, v_c080); + const __m128i t4 = _mm_or_si128(t3, v_c080); // t3 | 1100 0000 1000 0000 = full potential 2-byte utf8 unit // 2. merge ASCII and 2-byte codewords const __m128i utf8_unpacked = _mm_blendv_epi8(t4, in_16, one_byte_bytemask); @@ -26353,7 +30478,7 @@ std::pair sse_convert_utf32_to_utf8(const char32_t* buf, const __m128i saturation_bytemask = _mm_cmpeq_epi32(_mm_and_si128(_mm_or_si128(in, nextin), v_ffff0000), v_0000); const uint32_t saturation_bitmask = static_cast(_mm_movemask_epi8(saturation_bytemask)); if (saturation_bitmask == 0xffff) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes const __m128i v_d800 = _mm_set1_epi16((uint16_t)0xd800); forbidden_bytemask = _mm_or_si128(forbidden_bytemask, _mm_cmpeq_epi16(_mm_and_si128(in_16, v_f800), v_d800)); @@ -26365,7 +30490,7 @@ std::pair sse_convert_utf32_to_utf8(const char32_t* buf, 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - We expand the input word (16-bit) into two words (32-bit), thus + We expand the input word (16-bit) into two code units (32-bit), thus we have room for four bytes. However, we need five distinct bit layouts. Note that the last byte in cases #2 and #3 is the same. @@ -26376,7 +30501,7 @@ std::pair sse_convert_utf32_to_utf8(const char32_t* buf, either byte 1 for case #2 or byte 2 for case #3. Note that they differ by exactly one bit. - Finally from these two words we build proper UTF-8 sequence, taking + Finally from these two code units we build proper UTF-8 sequence, taking into account the case (i.e, the number of bytes to write). */ /** @@ -26404,15 +30529,15 @@ std::pair sse_convert_utf32_to_utf8(const char32_t* buf, const __m128i s4 = _mm_xor_si128(s3, m0); #undef simdutf_vec - // 4. expand words 16-bit => 32-bit + // 4. expand code units 16-bit => 32-bit const __m128i out0 = _mm_unpacklo_epi16(t2, s4); const __m128i out1 = _mm_unpackhi_epi16(t2, s4); - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle const uint16_t mask = (one_byte_bitmask & 0x5555) | (one_or_two_bytes_bitmask & 0xaaaa); if(mask == 0) { - // We only have three-byte words. Use fast path. + // We only have three-byte code units. Use fast path. const __m128i shuffle = _mm_setr_epi8(2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1); const __m128i utf8_0 = _mm_shuffle_epi8(out0, shuffle); const __m128i utf8_1 = _mm_shuffle_epi8(out1, shuffle); @@ -26511,7 +30636,7 @@ std::pair sse_convert_utf32_to_utf8_with_errors(const char32_t* b return std::make_pair(result(error_code::TOO_LARGE, buf - start), utf8_output); } - // Pack 32-bit UTF-32 words to 16-bit UTF-16 words with unsigned saturation + // Pack 32-bit UTF-32 code units to 16-bit UTF-16 code units with unsigned saturation __m128i in_16 = _mm_packus_epi32(_mm_and_si128(in, v_7fffffff), _mm_and_si128(nextin, v_7fffffff)); // Try to apply UTF-16 => UTF-8 from ./sse_convert_utf16_to_utf8.cpp @@ -26564,7 +30689,7 @@ std::pair sse_convert_utf32_to_utf8_with_errors(const char32_t* b const uint16_t one_or_two_bytes_bitmask = static_cast(_mm_movemask_epi8(one_or_two_bytes_bytemask)); if (one_or_two_bytes_bitmask == 0xffff) { - // case: all words either produce 1 or 2 UTF-8 bytes (at least one produces 2 bytes) + // case: all code units either produce 1 or 2 UTF-8 bytes (at least one produces 2 bytes) // 1. prepare 2-byte values // input 16-bit word : [0000|0aaa|aabb|bbbb] x 8 // expected output : [110a|aaaa|10bb|bbbb] x 8 @@ -26610,9 +30735,9 @@ std::pair sse_convert_utf32_to_utf8_with_errors(const char32_t* b const uint32_t saturation_bitmask = static_cast(_mm_movemask_epi8(saturation_bytemask)); if (saturation_bitmask == 0xffff) { - // case: words from register produce either 1, 2 or 3 UTF-8 bytes + // case: code units from register produce either 1, 2 or 3 UTF-8 bytes - // Check for illegal surrogate words + // Check for illegal surrogate code units const __m128i v_d800 = _mm_set1_epi16((uint16_t)0xd800); const __m128i forbidden_bytemask = _mm_cmpeq_epi16(_mm_and_si128(in_16, v_f800), v_d800); if (static_cast(_mm_movemask_epi8(forbidden_bytemask)) != 0) { @@ -26627,7 +30752,7 @@ std::pair sse_convert_utf32_to_utf8_with_errors(const char32_t* b 2. [0000|0bbb|bbcc|cccc] => [110b|bbbb], [10cc|cccc] - two UTF-8 bytes 3. [aaaa|bbbb|bbcc|cccc] => [1110|aaaa], [10bb|bbbb], [10cc|cccc] - three UTF-8 bytes - We expand the input word (16-bit) into two words (32-bit), thus + We expand the input word (16-bit) into two code units (32-bit), thus we have room for four bytes. However, we need five distinct bit layouts. Note that the last byte in cases #2 and #3 is the same. @@ -26638,7 +30763,7 @@ std::pair sse_convert_utf32_to_utf8_with_errors(const char32_t* b either byte 1 for case #2 or byte 2 for case #3. Note that they differ by exactly one bit. - Finally from these two words we build proper UTF-8 sequence, taking + Finally from these two code units we build proper UTF-8 sequence, taking into account the case (i.e, the number of bytes to write). */ /** @@ -26666,321 +30791,709 @@ std::pair sse_convert_utf32_to_utf8_with_errors(const char32_t* b const __m128i s4 = _mm_xor_si128(s3, m0); #undef simdutf_vec - // 4. expand words 16-bit => 32-bit - const __m128i out0 = _mm_unpacklo_epi16(t2, s4); - const __m128i out1 = _mm_unpackhi_epi16(t2, s4); + // 4. expand code units 16-bit => 32-bit + const __m128i out0 = _mm_unpacklo_epi16(t2, s4); + const __m128i out1 = _mm_unpackhi_epi16(t2, s4); + + // 5. compress 32-bit code units into 1, 2 or 3 bytes -- 2 x shuffle + const uint16_t mask = (one_byte_bitmask & 0x5555) | + (one_or_two_bytes_bitmask & 0xaaaa); + if(mask == 0) { + // We only have three-byte code units. Use fast path. + const __m128i shuffle = _mm_setr_epi8(2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1); + const __m128i utf8_0 = _mm_shuffle_epi8(out0, shuffle); + const __m128i utf8_1 = _mm_shuffle_epi8(out1, shuffle); + _mm_storeu_si128((__m128i*)utf8_output, utf8_0); + utf8_output += 12; + _mm_storeu_si128((__m128i*)utf8_output, utf8_1); + utf8_output += 12; + buf += 8; + continue; + } + const uint8_t mask0 = uint8_t(mask); + + const uint8_t* row0 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask0][0]; + const __m128i shuffle0 = _mm_loadu_si128((__m128i*)(row0 + 1)); + const __m128i utf8_0 = _mm_shuffle_epi8(out0, shuffle0); + + const uint8_t mask1 = static_cast(mask >> 8); + + const uint8_t* row1 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask1][0]; + const __m128i shuffle1 = _mm_loadu_si128((__m128i*)(row1 + 1)); + const __m128i utf8_1 = _mm_shuffle_epi8(out1, shuffle1); + + _mm_storeu_si128((__m128i*)utf8_output, utf8_0); + utf8_output += row0[0]; + _mm_storeu_si128((__m128i*)utf8_output, utf8_1); + utf8_output += row1[0]; + + buf += 8; + } else { + // case: at least one 32-bit word produce a surrogate pair in UTF-16 <=> will produce four UTF-8 bytes + // Let us do a scalar fallback. + // It may seem wasteful to use scalar code, but being efficient with SIMD + // in the presence of surrogate pairs may require non-trivial tables. + size_t forward = 15; + size_t k = 0; + if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} + for(; k < forward; k++) { + uint32_t word = buf[k]; + if((word & 0xFFFFFF80)==0) { + *utf8_output++ = char(word); + } else if((word & 0xFFFFF800)==0) { + *utf8_output++ = char((word>>6) | 0b11000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); + } else if((word &0xFFFF0000 )==0) { + if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf8_output); } + *utf8_output++ = char((word>>12) | 0b11100000); + *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); + } else { + if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf- start + k), utf8_output); } + *utf8_output++ = char((word>>18) | 0b11110000); + *utf8_output++ = char(((word>>12) & 0b111111) | 0b10000000); + *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); + *utf8_output++ = char((word & 0b111111) | 0b10000000); + } + } + buf += k; + } + } // while + + return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output); +} +/* end file src/westmere/sse_convert_utf32_to_utf8.cpp */ +/* begin file src/westmere/sse_convert_utf32_to_utf16.cpp */ +template +std::pair sse_convert_utf32_to_utf16(const char32_t* buf, size_t len, char16_t* utf16_output) { + + const char32_t* end = buf + len; + + const __m128i v_0000 = _mm_setzero_si128(); + const __m128i v_ffff0000 = _mm_set1_epi32((int32_t)0xffff0000); + __m128i forbidden_bytemask = _mm_setzero_si128(); + + while (buf + 8 <= end) { + __m128i in = _mm_loadu_si128((__m128i*)buf); + __m128i nextin = _mm_loadu_si128((__m128i*)buf+1); + const __m128i saturation_bytemask = _mm_cmpeq_epi32(_mm_and_si128(_mm_or_si128(in, nextin), v_ffff0000), v_0000); + const uint32_t saturation_bitmask = static_cast(_mm_movemask_epi8(saturation_bytemask)); + + // Check if no bits set above 16th + if (saturation_bitmask == 0xffff) { + // Pack UTF-32 to UTF-16 + __m128i utf16_packed = _mm_packus_epi32(in, nextin); + + const __m128i v_f800 = _mm_set1_epi16((uint16_t)0xf800); + const __m128i v_d800 = _mm_set1_epi16((uint16_t)0xd800); + forbidden_bytemask = _mm_or_si128(forbidden_bytemask, _mm_cmpeq_epi16(_mm_and_si128(utf16_packed, v_f800), v_d800)); + + if (big_endian) { + const __m128i swap = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); + utf16_packed = _mm_shuffle_epi8(utf16_packed, swap); + } + + _mm_storeu_si128((__m128i*)utf16_output, utf16_packed); + utf16_output += 8; + buf += 8; + } else { + size_t forward = 7; + size_t k = 0; + if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} + for(; k < forward; k++) { + uint32_t word = buf[k]; + if((word & 0xFFFF0000)==0) { + // will not generate a surrogate pair + if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(nullptr, utf16_output); } + *utf16_output++ = big_endian ? char16_t((uint16_t(word) >> 8) | (uint16_t(word) << 8)) : char16_t(word); + } else { + // will generate a surrogate pair + if (word > 0x10FFFF) { return std::make_pair(nullptr, utf16_output); } + word -= 0x10000; + uint16_t high_surrogate = uint16_t(0xD800 + (word >> 10)); + uint16_t low_surrogate = uint16_t(0xDC00 + (word & 0x3FF)); + if (big_endian) { + high_surrogate = uint16_t((high_surrogate >> 8) | (high_surrogate << 8)); + low_surrogate = uint16_t((low_surrogate >> 8) | (low_surrogate << 8)); + } + *utf16_output++ = char16_t(high_surrogate); + *utf16_output++ = char16_t(low_surrogate); + } + } + buf += k; + } + } + + // check for invalid input + if (static_cast(_mm_movemask_epi8(forbidden_bytemask)) != 0) { return std::make_pair(nullptr, utf16_output); } + + return std::make_pair(buf, utf16_output); +} - // 5. compress 32-bit words into 1, 2 or 3 bytes -- 2 x shuffle - const uint16_t mask = (one_byte_bitmask & 0x5555) | - (one_or_two_bytes_bitmask & 0xaaaa); - if(mask == 0) { - // We only have three-byte words. Use fast path. - const __m128i shuffle = _mm_setr_epi8(2,3,1,6,7,5,10,11,9,14,15,13,-1,-1,-1,-1); - const __m128i utf8_0 = _mm_shuffle_epi8(out0, shuffle); - const __m128i utf8_1 = _mm_shuffle_epi8(out1, shuffle); - _mm_storeu_si128((__m128i*)utf8_output, utf8_0); - utf8_output += 12; - _mm_storeu_si128((__m128i*)utf8_output, utf8_1); - utf8_output += 12; - buf += 8; - continue; - } - const uint8_t mask0 = uint8_t(mask); - const uint8_t* row0 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask0][0]; - const __m128i shuffle0 = _mm_loadu_si128((__m128i*)(row0 + 1)); - const __m128i utf8_0 = _mm_shuffle_epi8(out0, shuffle0); +template +std::pair sse_convert_utf32_to_utf16_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) { + const char32_t* start = buf; + const char32_t* end = buf + len; - const uint8_t mask1 = static_cast(mask >> 8); + const __m128i v_0000 = _mm_setzero_si128(); + const __m128i v_ffff0000 = _mm_set1_epi32((int32_t)0xffff0000); - const uint8_t* row1 = &simdutf::tables::utf16_to_utf8::pack_1_2_3_utf8_bytes[mask1][0]; - const __m128i shuffle1 = _mm_loadu_si128((__m128i*)(row1 + 1)); - const __m128i utf8_1 = _mm_shuffle_epi8(out1, shuffle1); + while (buf + 8 <= end) { + __m128i in = _mm_loadu_si128((__m128i*)buf); + __m128i nextin = _mm_loadu_si128((__m128i*)buf+1); + const __m128i saturation_bytemask = _mm_cmpeq_epi32(_mm_and_si128(_mm_or_si128(in, nextin), v_ffff0000), v_0000); + const uint32_t saturation_bitmask = static_cast(_mm_movemask_epi8(saturation_bytemask)); - _mm_storeu_si128((__m128i*)utf8_output, utf8_0); - utf8_output += row0[0]; - _mm_storeu_si128((__m128i*)utf8_output, utf8_1); - utf8_output += row1[0]; + // Check if no bits set above 16th + if (saturation_bitmask == 0xffff) { + // Pack UTF-32 to UTF-16 + __m128i utf16_packed = _mm_packus_epi32(in, nextin); + + const __m128i v_f800 = _mm_set1_epi16((uint16_t)0xf800); + const __m128i v_d800 = _mm_set1_epi16((uint16_t)0xd800); + const __m128i forbidden_bytemask = _mm_cmpeq_epi16(_mm_and_si128(utf16_packed, v_f800), v_d800); + if (static_cast(_mm_movemask_epi8(forbidden_bytemask)) != 0) { + return std::make_pair(result(error_code::SURROGATE, buf - start), utf16_output); + } + + if (big_endian) { + const __m128i swap = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); + utf16_packed = _mm_shuffle_epi8(utf16_packed, swap); + } + _mm_storeu_si128((__m128i*)utf16_output, utf16_packed); + utf16_output += 8; buf += 8; } else { - // case: at least one 32-bit word produce a surrogate pair in UTF-16 <=> will produce four UTF-8 bytes - // Let us do a scalar fallback. - // It may seem wasteful to use scalar code, but being efficient with SIMD - // in the presence of surrogate pairs may require non-trivial tables. - size_t forward = 15; + size_t forward = 7; size_t k = 0; if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} for(; k < forward; k++) { uint32_t word = buf[k]; - if((word & 0xFFFFFF80)==0) { - *utf8_output++ = char(word); - } else if((word & 0xFFFFF800)==0) { - *utf8_output++ = char((word>>6) | 0b11000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); - } else if((word &0xFFFF0000 )==0) { - if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf8_output); } - *utf8_output++ = char((word>>12) | 0b11100000); - *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); + if((word & 0xFFFF0000)==0) { + // will not generate a surrogate pair + if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf16_output); } + *utf16_output++ = big_endian ? char16_t((uint16_t(word) >> 8) | (uint16_t(word) << 8)) : char16_t(word); } else { - if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf- start + k), utf8_output); } - *utf8_output++ = char((word>>18) | 0b11110000); - *utf8_output++ = char(((word>>12) & 0b111111) | 0b10000000); - *utf8_output++ = char(((word>>6) & 0b111111) | 0b10000000); - *utf8_output++ = char((word & 0b111111) | 0b10000000); + // will generate a surrogate pair + if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), utf16_output); } + word -= 0x10000; + uint16_t high_surrogate = uint16_t(0xD800 + (word >> 10)); + uint16_t low_surrogate = uint16_t(0xDC00 + (word & 0x3FF)); + if (big_endian) { + high_surrogate = uint16_t((high_surrogate >> 8) | (high_surrogate << 8)); + low_surrogate = uint16_t((low_surrogate >> 8) | (low_surrogate << 8)); + } + *utf16_output++ = char16_t(high_surrogate); + *utf16_output++ = char16_t(low_surrogate); } } buf += k; } - } // while + } - return std::make_pair(result(error_code::SUCCESS, buf - start), utf8_output); + return std::make_pair(result(error_code::SUCCESS, buf - start), utf16_output); } -/* end file src/westmere/sse_convert_utf32_to_utf8.cpp */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=westmere/sse_convert_utf32_to_utf16.cpp -/* begin file src/westmere/sse_convert_utf32_to_utf16.cpp */ -template -std::pair sse_convert_utf32_to_utf16(const char32_t* buf, size_t len, char16_t* utf16_output) { +/* end file src/westmere/sse_convert_utf32_to_utf16.cpp */ + +} // unnamed namespace +} // namespace westmere +} // namespace simdutf + +/* begin file src/generic/buf_block_reader.h */ +namespace simdutf { +namespace westmere { +namespace { + +// Walks through a buffer in block-sized increments, loading the last part with spaces +template +struct buf_block_reader { +public: + simdutf_really_inline buf_block_reader(const uint8_t *_buf, size_t _len); + simdutf_really_inline size_t block_index(); + simdutf_really_inline bool has_full_block() const; + simdutf_really_inline const uint8_t *full_block() const; + /** + * Get the last block, padded with spaces. + * + * There will always be a last block, with at least 1 byte, unless len == 0 (in which case this + * function fills the buffer with spaces and returns 0. In particular, if len == STEP_SIZE there + * will be 0 full_blocks and 1 remainder block with STEP_SIZE bytes and no spaces for padding. + * + * @return the number of effective characters in the last block. + */ + simdutf_really_inline size_t get_remainder(uint8_t *dst) const; + simdutf_really_inline void advance(); +private: + const uint8_t *buf; + const size_t len; + const size_t lenminusstep; + size_t idx; +}; + +// Routines to print masks and text for debugging bitmask operations +simdutf_unused static char * format_input_text_64(const uint8_t *text) { + static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); + for (size_t i=0; i); i++) { + buf[i] = int8_t(text[i]) < ' ' ? '_' : int8_t(text[i]); + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +// Routines to print masks and text for debugging bitmask operations +simdutf_unused static char * format_input_text(const simd8x64& in) { + static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); + in.store(reinterpret_cast(buf)); + for (size_t i=0; i); i++) { + if (buf[i] < ' ') { buf[i] = '_'; } + } + buf[sizeof(simd8x64)] = '\0'; + return buf; +} + +simdutf_unused static char * format_mask(uint64_t mask) { + static char *buf = reinterpret_cast(malloc(64 + 1)); + for (size_t i=0; i<64; i++) { + buf[i] = (mask & (size_t(1) << i)) ? 'X' : ' '; + } + buf[64] = '\0'; + return buf; +} + +template +simdutf_really_inline buf_block_reader::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {} + +template +simdutf_really_inline size_t buf_block_reader::block_index() { return idx; } + +template +simdutf_really_inline bool buf_block_reader::has_full_block() const { + return idx < lenminusstep; +} + +template +simdutf_really_inline const uint8_t *buf_block_reader::full_block() const { + return &buf[idx]; +} + +template +simdutf_really_inline size_t buf_block_reader::get_remainder(uint8_t *dst) const { + if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers + std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once. + std::memcpy(dst, buf + idx, len - idx); + return len - idx; +} + +template +simdutf_really_inline void buf_block_reader::advance() { + idx += STEP_SIZE; +} + +} // unnamed namespace +} // namespace westmere +} // namespace simdutf +/* end file src/generic/buf_block_reader.h */ +/* begin file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ +namespace simdutf { +namespace westmere { +namespace { +namespace utf8_validation { + +using namespace simd; + + simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) +// Bit 1 = Too Long (ASCII followed by continuation) +// Bit 2 = Overlong 3-byte +// Bit 4 = Surrogate +// Bit 5 = Overlong 2-byte +// Bit 7 = Two Continuations + constexpr const uint8_t TOO_SHORT = 1<<0; // 11______ 0_______ + // 11______ 11______ + constexpr const uint8_t TOO_LONG = 1<<1; // 0_______ 10______ + constexpr const uint8_t OVERLONG_3 = 1<<2; // 11100000 100_____ + constexpr const uint8_t SURROGATE = 1<<4; // 11101101 101_____ + constexpr const uint8_t OVERLONG_2 = 1<<5; // 1100000_ 10______ + constexpr const uint8_t TWO_CONTS = 1<<7; // 10______ 10______ + constexpr const uint8_t TOO_LARGE = 1<<3; // 11110100 1001____ + // 11110100 101_____ + // 11110101 1001____ + // 11110101 101_____ + // 1111011_ 1001____ + // 1111011_ 101_____ + // 11111___ 1001____ + // 11111___ 101_____ + constexpr const uint8_t TOO_LARGE_1000 = 1<<6; + // 11110101 1000____ + // 1111011_ 1000____ + // 11111___ 1000____ + constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + + const simd8 byte_1_high = prev1.shr<4>().lookup_16( + // 0_______ ________ + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + TOO_LONG, TOO_LONG, TOO_LONG, TOO_LONG, + // 10______ ________ + TWO_CONTS, TWO_CONTS, TWO_CONTS, TWO_CONTS, + // 1100____ ________ + TOO_SHORT | OVERLONG_2, + // 1101____ ________ + TOO_SHORT, + // 1110____ ________ + TOO_SHORT | OVERLONG_3 | SURROGATE, + // 1111____ ________ + TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + ); + constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . + const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( + // ____0000 ________ + CARRY | OVERLONG_3 | OVERLONG_2 | OVERLONG_4, + // ____0001 ________ + CARRY | OVERLONG_2, + // ____001_ ________ + CARRY, + CARRY, - const char32_t* end = buf + len; + // ____0100 ________ + CARRY | TOO_LARGE, + // ____0101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____011_ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, - const __m128i v_0000 = _mm_setzero_si128(); - const __m128i v_ffff0000 = _mm_set1_epi32((int32_t)0xffff0000); - __m128i forbidden_bytemask = _mm_setzero_si128(); + // ____1___ ________ + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000, + // ____1101 ________ + CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, + CARRY | TOO_LARGE | TOO_LARGE_1000, + CARRY | TOO_LARGE | TOO_LARGE_1000 + ); + const simd8 byte_2_high = input.shr<4>().lookup_16( + // ________ 0_______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT, - while (buf + 8 <= end) { - __m128i in = _mm_loadu_si128((__m128i*)buf); - __m128i nextin = _mm_loadu_si128((__m128i*)buf+1); - const __m128i saturation_bytemask = _mm_cmpeq_epi32(_mm_and_si128(_mm_or_si128(in, nextin), v_ffff0000), v_0000); - const uint32_t saturation_bitmask = static_cast(_mm_movemask_epi8(saturation_bytemask)); + // ________ 1000____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE_1000 | OVERLONG_4, + // ________ 1001____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | OVERLONG_3 | TOO_LARGE, + // ________ 101_____ + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, + TOO_LONG | OVERLONG_2 | TWO_CONTS | SURROGATE | TOO_LARGE, - // Check if no bits set above 16th - if (saturation_bitmask == 0xffff) { - // Pack UTF-32 to UTF-16 - __m128i utf16_packed = _mm_packus_epi32(in, nextin); + // ________ 11______ + TOO_SHORT, TOO_SHORT, TOO_SHORT, TOO_SHORT + ); + return (byte_1_high & byte_1_low & byte_2_high); + } + simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, + const simd8 prev_input, const simd8 sc) { + simd8 prev2 = input.prev<2>(prev_input); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; + } - const __m128i v_f800 = _mm_set1_epi16((uint16_t)0xf800); - const __m128i v_d800 = _mm_set1_epi16((uint16_t)0xd800); - forbidden_bytemask = _mm_or_si128(forbidden_bytemask, _mm_cmpeq_epi16(_mm_and_si128(utf16_packed, v_f800), v_d800)); + // + // Return nonzero if there are incomplete multibyte characters at the end of the block: + // e.g. if there is a 4-byte character, but it's 3 bytes from the end. + // + simdutf_really_inline simd8 is_incomplete(const simd8 input) { + // If the previous input's last 3 bytes match this, they're too short (they ended at EOF): + // ... 1111____ 111_____ 11______ + static const uint8_t max_array[32] = { + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 255, 255, 255, + 255, 255, 255, 255, 255, 0b11110000u-1, 0b11100000u-1, 0b11000000u-1 + }; + const simd8 max_value(&max_array[sizeof(max_array)-sizeof(simd8)]); + return input.gt_bits(max_value); + } - if (big_endian) { - const __m128i swap = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - utf16_packed = _mm_shuffle_epi8(utf16_packed, swap); - } + struct utf8_checker { + // If this is nonzero, there has been a UTF-8 error. + simd8 error; + // The last input we received + simd8 prev_input_block; + // Whether the last input we received was incomplete (used for ASCII fast path) + simd8 prev_incomplete; - _mm_storeu_si128((__m128i*)utf16_output, utf16_packed); - utf16_output += 8; - buf += 8; - } else { - size_t forward = 7; - size_t k = 0; - if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} - for(; k < forward; k++) { - uint32_t word = buf[k]; - if((word & 0xFFFF0000)==0) { - // will not generate a surrogate pair - if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(nullptr, utf16_output); } - *utf16_output++ = big_endian ? char16_t((uint16_t(word) >> 8) | (uint16_t(word) << 8)) : char16_t(word); - } else { - // will generate a surrogate pair - if (word > 0x10FFFF) { return std::make_pair(nullptr, utf16_output); } - word -= 0x10000; - uint16_t high_surrogate = uint16_t(0xD800 + (word >> 10)); - uint16_t low_surrogate = uint16_t(0xDC00 + (word & 0x3FF)); - if (big_endian) { - high_surrogate = uint16_t((high_surrogate >> 8) | (high_surrogate << 8)); - low_surrogate = uint16_t((low_surrogate >> 8) | (low_surrogate << 8)); - } - *utf16_output++ = char16_t(high_surrogate); - *utf16_output++ = char16_t(low_surrogate); - } - } - buf += k; + // + // Check whether the current bytes are valid UTF-8. + // + simdutf_really_inline void check_utf8_bytes(const simd8 input, const simd8 prev_input) { + // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes + // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) + simd8 prev1 = input.prev<1>(prev_input); + simd8 sc = check_special_cases(input, prev1); + this->error |= check_multibyte_lengths(input, prev_input, sc); } - } - // check for invalid input - if (static_cast(_mm_movemask_epi8(forbidden_bytemask)) != 0) { return std::make_pair(nullptr, utf16_output); } + // The only problem that can happen at EOF is that a multibyte character is too short + // or a byte value too large in the last bytes: check_special_cases only checks for bytes + // too large in the first of two bytes. + simdutf_really_inline void check_eof() { + // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't + // possibly finish them. + this->error |= this->prev_incomplete; + } - return std::make_pair(buf, utf16_output); -} + simdutf_really_inline void check_next_input(const simd8x64& input) { + if(simdutf_likely(is_ascii(input))) { + this->error |= this->prev_incomplete; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], this->prev_input_block); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + this->prev_incomplete = is_incomplete(input.chunks[simd8x64::NUM_CHUNKS-1]); + this->prev_input_block = input.chunks[simd8x64::NUM_CHUNKS-1]; + } + } -template -std::pair sse_convert_utf32_to_utf16_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) { - const char32_t* start = buf; - const char32_t* end = buf + len; + // do not forget to call check_eof! + simdutf_really_inline bool errors() const { + return this->error.any_bits_set_anywhere(); + } - const __m128i v_0000 = _mm_setzero_si128(); - const __m128i v_ffff0000 = _mm_set1_epi32((int32_t)0xffff0000); + }; // struct utf8_checker +} // namespace utf8_validation - while (buf + 8 <= end) { - __m128i in = _mm_loadu_si128((__m128i*)buf); - __m128i nextin = _mm_loadu_si128((__m128i*)buf+1); - const __m128i saturation_bytemask = _mm_cmpeq_epi32(_mm_and_si128(_mm_or_si128(in, nextin), v_ffff0000), v_0000); - const uint32_t saturation_bitmask = static_cast(_mm_movemask_epi8(saturation_bytemask)); +using utf8_validation::utf8_checker; - // Check if no bits set above 16th - if (saturation_bitmask == 0xffff) { - // Pack UTF-32 to UTF-16 - __m128i utf16_packed = _mm_packus_epi32(in, nextin); +} // unnamed namespace +} // namespace westmere +} // namespace simdutf +/* end file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ +/* begin file src/generic/utf8_validation/utf8_validator.h */ +namespace simdutf { +namespace westmere { +namespace { +namespace utf8_validation { - const __m128i v_f800 = _mm_set1_epi16((uint16_t)0xf800); - const __m128i v_d800 = _mm_set1_epi16((uint16_t)0xd800); - const __m128i forbidden_bytemask = _mm_cmpeq_epi16(_mm_and_si128(utf16_packed, v_f800), v_d800); - if (static_cast(_mm_movemask_epi8(forbidden_bytemask)) != 0) { - return std::make_pair(result(error_code::SURROGATE, buf - start), utf16_output); - } +/** + * Validates that the string is actual UTF-8. + */ +template +bool generic_validate_utf8(const uint8_t * input, size_t length) { + checker c{}; + buf_block_reader<64> reader(input, length); + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + c.check_next_input(in); + reader.advance(); + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + c.check_next_input(in); + reader.advance(); + c.check_eof(); + return !c.errors(); +} - if (big_endian) { - const __m128i swap = _mm_setr_epi8(1, 0, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 13, 12, 15, 14); - utf16_packed = _mm_shuffle_epi8(utf16_packed, swap); - } +bool generic_validate_utf8(const char * input, size_t length) { + return generic_validate_utf8(reinterpret_cast(input),length); +} - _mm_storeu_si128((__m128i*)utf16_output, utf16_packed); - utf16_output += 8; - buf += 8; - } else { - size_t forward = 7; - size_t k = 0; - if(size_t(end - buf) < forward + 1) { forward = size_t(end - buf - 1);} - for(; k < forward; k++) { - uint32_t word = buf[k]; - if((word & 0xFFFF0000)==0) { - // will not generate a surrogate pair - if (word >= 0xD800 && word <= 0xDFFF) { return std::make_pair(result(error_code::SURROGATE, buf - start + k), utf16_output); } - *utf16_output++ = big_endian ? char16_t((uint16_t(word) >> 8) | (uint16_t(word) << 8)) : char16_t(word); - } else { - // will generate a surrogate pair - if (word > 0x10FFFF) { return std::make_pair(result(error_code::TOO_LARGE, buf - start + k), utf16_output); } - word -= 0x10000; - uint16_t high_surrogate = uint16_t(0xD800 + (word >> 10)); - uint16_t low_surrogate = uint16_t(0xDC00 + (word & 0x3FF)); - if (big_endian) { - high_surrogate = uint16_t((high_surrogate >> 8) | (high_surrogate << 8)); - low_surrogate = uint16_t((low_surrogate >> 8) | (low_surrogate << 8)); - } - *utf16_output++ = char16_t(high_surrogate); - *utf16_output++ = char16_t(low_surrogate); - } +/** + * Validates that the string is actual UTF-8 and stops on errors. + */ +template +result generic_validate_utf8_with_errors(const uint8_t * input, size_t length) { + checker c{}; + buf_block_reader<64> reader(input, length); + size_t count{0}; + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + c.check_next_input(in); + if(c.errors()) { + if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk + result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input + count), length - count); + res.count += count; + return res; } - buf += k; + reader.advance(); + count += 64; } - } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + c.check_next_input(in); + reader.advance(); + c.check_eof(); + if (c.errors()) { + if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk + result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input) + count, length - count); + res.count += count; + return res; + } else { + return result(error_code::SUCCESS, length); + } +} - return std::make_pair(result(error_code::SUCCESS, buf - start), utf16_output); +result generic_validate_utf8_with_errors(const char * input, size_t length) { + return generic_validate_utf8_with_errors(reinterpret_cast(input),length); } -/* end file src/westmere/sse_convert_utf32_to_utf16.cpp */ -} // unnamed namespace -} // namespace westmere -} // namespace simdutf +template +bool generic_validate_ascii(const uint8_t * input, size_t length) { + buf_block_reader<64> reader(input, length); + uint8_t blocks[64]{}; + simd::simd8x64 running_or(blocks); + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + running_or |= in; + reader.advance(); + } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + running_or |= in; + return running_or.is_ascii(); +} -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/buf_block_reader.h -/* begin file src/generic/buf_block_reader.h */ -namespace simdutf { -namespace westmere { -namespace { +bool generic_validate_ascii(const char * input, size_t length) { + return generic_validate_ascii(reinterpret_cast(input),length); +} -// Walks through a buffer in block-sized increments, loading the last part with spaces -template -struct buf_block_reader { -public: - simdutf_really_inline buf_block_reader(const uint8_t *_buf, size_t _len); - simdutf_really_inline size_t block_index(); - simdutf_really_inline bool has_full_block() const; - simdutf_really_inline const uint8_t *full_block() const; - /** - * Get the last block, padded with spaces. - * - * There will always be a last block, with at least 1 byte, unless len == 0 (in which case this - * function fills the buffer with spaces and returns 0. In particular, if len == STEP_SIZE there - * will be 0 full_blocks and 1 remainder block with STEP_SIZE bytes and no spaces for padding. - * - * @return the number of effective characters in the last block. - */ - simdutf_really_inline size_t get_remainder(uint8_t *dst) const; - simdutf_really_inline void advance(); -private: - const uint8_t *buf; - const size_t len; - const size_t lenminusstep; - size_t idx; -}; +template +result generic_validate_ascii_with_errors(const uint8_t * input, size_t length) { + buf_block_reader<64> reader(input, length); + size_t count{0}; + while (reader.has_full_block()) { + simd::simd8x64 in(reader.full_block()); + if (!in.is_ascii()) { + result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); + return result(res.error, count + res.count); + } + reader.advance(); -// Routines to print masks and text for debugging bitmask operations -simdutf_unused static char * format_input_text_64(const uint8_t *text) { - static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); - for (size_t i=0; i); i++) { - buf[i] = int8_t(text[i]) < ' ' ? '_' : int8_t(text[i]); + count += 64; } - buf[sizeof(simd8x64)] = '\0'; - return buf; -} - -// Routines to print masks and text for debugging bitmask operations -simdutf_unused static char * format_input_text(const simd8x64& in) { - static char *buf = reinterpret_cast(malloc(sizeof(simd8x64) + 1)); - in.store(reinterpret_cast(buf)); - for (size_t i=0; i); i++) { - if (buf[i] < ' ') { buf[i] = '_'; } + uint8_t block[64]{}; + reader.get_remainder(block); + simd::simd8x64 in(block); + if (!in.is_ascii()) { + result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); + return result(res.error, count + res.count); + } else { + return result(error_code::SUCCESS, length); } - buf[sizeof(simd8x64)] = '\0'; - return buf; } -simdutf_unused static char * format_mask(uint64_t mask) { - static char *buf = reinterpret_cast(malloc(64 + 1)); - for (size_t i=0; i<64; i++) { - buf[i] = (mask & (size_t(1) << i)) ? 'X' : ' '; - } - buf[64] = '\0'; - return buf; +result generic_validate_ascii_with_errors(const char * input, size_t length) { + return generic_validate_ascii_with_errors(reinterpret_cast(input),length); } -template -simdutf_really_inline buf_block_reader::buf_block_reader(const uint8_t *_buf, size_t _len) : buf{_buf}, len{_len}, lenminusstep{len < STEP_SIZE ? 0 : len - STEP_SIZE}, idx{0} {} - -template -simdutf_really_inline size_t buf_block_reader::block_index() { return idx; } +} // namespace utf8_validation +} // unnamed namespace +} // namespace westmere +} // namespace simdutf +/* end file src/generic/utf8_validation/utf8_validator.h */ +// transcoding from UTF-8 to UTF-16 +/* begin file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ -template -simdutf_really_inline bool buf_block_reader::has_full_block() const { - return idx < lenminusstep; -} -template -simdutf_really_inline const uint8_t *buf_block_reader::full_block() const { - return &buf[idx]; -} +namespace simdutf { +namespace westmere { +namespace { +namespace utf8_to_utf16 { -template -simdutf_really_inline size_t buf_block_reader::get_remainder(uint8_t *dst) const { - if(len == idx) { return 0; } // memcpy(dst, null, 0) will trigger an error with some sanitizers - std::memset(dst, 0x20, STEP_SIZE); // std::memset STEP_SIZE because it's more efficient to write out 8 or 16 bytes at once. - std::memcpy(dst, buf + idx, len - idx); - return len - idx; -} +using namespace simd; -template -simdutf_really_inline void buf_block_reader::advance() { - idx += STEP_SIZE; +template +simdutf_warn_unused size_t convert_valid(const char* input, size_t size, + char16_t* utf16_output) noexcept { + // The implementation is not specific to haswell and should be moved to the generic directory. + size_t pos = 0; + char16_t* start{utf16_output}; + const size_t safety_margin = 16; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + // this loop could be unrolled further. For example, we could process the mask + // far more than 64 bytes. + simd8x64 in(reinterpret_cast(input + pos)); + if(in.is_ascii()) { + in.store_ascii_as_utf16(utf16_output); + utf16_output += 64; + pos += 64; + } else { + // Slow path. We hope that the compiler will recognize that this is a slow path. + // Anything that is not a continuation mask is a 'leading byte', that is, the + // start of a new code point. + uint64_t utf8_continuation_mask = in.lt(-65 + 1); + // -65 is 0b10111111 in two-complement's, so largest possible continuation byte + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + // The *start* of code points is not so useful, rather, we want the *end* of code points. + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times when using solely + // the slow/regular path, and at least four times if there are fast paths. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + // + // Thus we may allow convert_masked_utf8_to_utf16 to process + // more bytes at a time under a fast-path mode where 16 bytes + // are consumed at once (e.g., when encountering ASCII). + size_t consumed = convert_masked_utf8_to_utf16(input + pos, + utf8_end_of_code_point_mask, utf16_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + utf16_output += scalar::utf8_to_utf16::convert_valid(input + pos, size - pos, utf16_output); + return utf16_output - start; } +} // namespace utf8_to_utf16 } // unnamed namespace } // namespace westmere } // namespace simdutf -/* end file src/generic/buf_block_reader.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_validation/utf8_lookup4_algorithm.h -/* begin file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ +/* end file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ +/* begin file src/generic/utf8_to_utf16/utf8_to_utf16.h */ + + namespace simdutf { namespace westmere { namespace { -namespace utf8_validation { - +namespace utf8_to_utf16 { using namespace simd; + simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { // Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) // Bit 1 = Too Long (ASCII followed by continuation) @@ -27074,37 +31587,18 @@ using namespace simd; simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, const simd8 prev_input, const simd8 sc) { simd8 prev2 = input.prev<2>(prev_input); - simd8 prev3 = input.prev<3>(prev_input); - simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); - simd8 must23_80 = must23 & uint8_t(0x80); - return must23_80 ^ sc; - } - - // - // Return nonzero if there are incomplete multibyte characters at the end of the block: - // e.g. if there is a 4-byte character, but it's 3 bytes from the end. - // - simdutf_really_inline simd8 is_incomplete(const simd8 input) { - // If the previous input's last 3 bytes match this, they're too short (they ended at EOF): - // ... 1111____ 111_____ 11______ - static const uint8_t max_array[32] = { - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 255, 255, 255, - 255, 255, 255, 255, 255, 0b11110000u-1, 0b11100000u-1, 0b11000000u-1 - }; - const simd8 max_value(&max_array[sizeof(max_array)-sizeof(simd8)]); - return input.gt_bits(max_value); + simd8 prev3 = input.prev<3>(prev_input); + simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); + simd8 must23_80 = must23 & uint8_t(0x80); + return must23_80 ^ sc; } - struct utf8_checker { + + struct validating_transcoder { // If this is nonzero, there has been a UTF-8 error. simd8 error; - // The last input we received - simd8 prev_input_block; - // Whether the last input we received was incomplete (used for ASCII fast path) - simd8 prev_incomplete; + validating_transcoder() : error(uint8_t(0)) {} // // Check whether the current bytes are valid UTF-8. // @@ -27116,262 +31610,239 @@ using namespace simd; this->error |= check_multibyte_lengths(input, prev_input, sc); } - // The only problem that can happen at EOF is that a multibyte character is too short - // or a byte value too large in the last bytes: check_special_cases only checks for bytes - // too large in the first of two bytes. - simdutf_really_inline void check_eof() { - // If the previous block had incomplete UTF-8 characters at the end, an ASCII block can't - // possibly finish them. - this->error |= this->prev_incomplete; - } - simdutf_really_inline void check_next_input(const simd8x64& input) { - if(simdutf_likely(is_ascii(input))) { - this->error |= this->prev_incomplete; - } else { - // you might think that a for-loop would work, but under Visual Studio, it is not good enough. - static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), - "We support either two or four chunks per 64-byte block."); - if(simd8x64::NUM_CHUNKS == 2) { - this->check_utf8_bytes(input.chunks[0], this->prev_input_block); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - } else if(simd8x64::NUM_CHUNKS == 4) { - this->check_utf8_bytes(input.chunks[0], this->prev_input_block); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - this->check_utf8_bytes(input.chunks[2], input.chunks[1]); - this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + template + simdutf_really_inline size_t convert(const char* in, size_t size, char16_t* utf16_output) { + size_t pos = 0; + char16_t* start{utf16_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); + } + // If the input is long enough, then we have that margin-1 is the eight last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store_ascii_as_utf16(utf16_output); + utf16_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + auto zero = simd8{uint8_t(0)}; + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_utf16(in + pos, + utf8_end_of_code_point_mask, utf16_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. } - this->prev_incomplete = is_incomplete(input.chunks[simd8x64::NUM_CHUNKS-1]); - this->prev_input_block = input.chunks[simd8x64::NUM_CHUNKS-1]; - } + if(errors()) { return 0; } + if(pos < size) { + size_t howmany = scalar::utf8_to_utf16::convert(in + pos, size - pos, utf16_output); + if(howmany == 0) { return 0; } + utf16_output += howmany; + } + return utf16_output - start; } - // do not forget to call check_eof! - simdutf_really_inline bool errors() const { - return this->error.any_bits_set_anywhere(); - } - - }; // struct utf8_checker -} // namespace utf8_validation - -using utf8_validation::utf8_checker; - -} // unnamed namespace -} // namespace westmere -} // namespace simdutf -/* end file src/generic/utf8_validation/utf8_lookup4_algorithm.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_validation/utf8_validator.h -/* begin file src/generic/utf8_validation/utf8_validator.h */ -namespace simdutf { -namespace westmere { -namespace { -namespace utf8_validation { - -/** - * Validates that the string is actual UTF-8. - */ -template -bool generic_validate_utf8(const uint8_t * input, size_t length) { - checker c{}; - buf_block_reader<64> reader(input, length); - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - c.check_next_input(in); - reader.advance(); - } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - c.check_next_input(in); - reader.advance(); - c.check_eof(); - return !c.errors(); -} - -bool generic_validate_utf8(const char * input, size_t length) { - return generic_validate_utf8(reinterpret_cast(input),length); -} - -/** - * Validates that the string is actual UTF-8 and stops on errors. - */ -template -result generic_validate_utf8_with_errors(const uint8_t * input, size_t length) { - checker c{}; - buf_block_reader<64> reader(input, length); - size_t count{0}; - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - c.check_next_input(in); - if(c.errors()) { - if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk - result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input + count), length - count); - res.count += count; + template + simdutf_really_inline result convert_with_errors(const char* in, size_t size, char16_t* utf16_output) { + size_t pos = 0; + char16_t* start{utf16_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); + } + // If the input is long enough, then we have that margin-1 is the eight last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store_ascii_as_utf16(utf16_output); + utf16_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + auto zero = simd8{uint8_t(0)}; + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + if (errors()) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + res.count += pos; + return res; + } + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_utf16(in + pos, + utf8_end_of_code_point_mask, utf16_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(errors()) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + res.count += pos; return res; } - reader.advance(); - count += 64; - } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - c.check_next_input(in); - reader.advance(); - c.check_eof(); - if (c.errors()) { - if (count != 0) { count--; } // Sometimes the error is only detected in the next chunk - result res = scalar::utf8::rewind_and_validate_with_errors(reinterpret_cast(input), reinterpret_cast(input) + count, length - count); - res.count += count; - return res; - } else { - return result(error_code::SUCCESS, length); - } -} - -result generic_validate_utf8_with_errors(const char * input, size_t length) { - return generic_validate_utf8_with_errors(reinterpret_cast(input),length); -} - -template -bool generic_validate_ascii(const uint8_t * input, size_t length) { - buf_block_reader<64> reader(input, length); - uint8_t blocks[64]{}; - simd::simd8x64 running_or(blocks); - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - running_or |= in; - reader.advance(); + if(pos < size) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + if (res.error) { // In case of error, we want the error position + res.count += pos; + return res; + } else { // In case of success, we want the number of word written + utf16_output += res.count; + } + } + return result(error_code::SUCCESS, utf16_output - start); } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - running_or |= in; - return running_or.is_ascii(); -} - -bool generic_validate_ascii(const char * input, size_t length) { - return generic_validate_ascii(reinterpret_cast(input),length); -} -template -result generic_validate_ascii_with_errors(const uint8_t * input, size_t length) { - buf_block_reader<64> reader(input, length); - size_t count{0}; - while (reader.has_full_block()) { - simd::simd8x64 in(reader.full_block()); - if (!in.is_ascii()) { - result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); - return result(res.error, count + res.count); + simdutf_really_inline bool errors() const { + return this->error.any_bits_set_anywhere(); } - reader.advance(); - - count += 64; - } - uint8_t block[64]{}; - reader.get_remainder(block); - simd::simd8x64 in(block); - if (!in.is_ascii()) { - result res = scalar::ascii::validate_with_errors(reinterpret_cast(input + count), length - count); - return result(res.error, count + res.count); - } else { - return result(error_code::SUCCESS, length); - } -} - -result generic_validate_ascii_with_errors(const char * input, size_t length) { - return generic_validate_ascii_with_errors(reinterpret_cast(input),length); -} -} // namespace utf8_validation + }; // struct utf8_checker +} // utf8_to_utf16 namespace } // unnamed namespace } // namespace westmere } // namespace simdutf -/* end file src/generic/utf8_validation/utf8_validator.h */ -// transcoding from UTF-8 to UTF-16 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf16/valid_utf8_to_utf16.h -/* begin file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ - +/* end file src/generic/utf8_to_utf16/utf8_to_utf16.h */ +// transcoding from UTF-8 to UTF-32 +/* begin file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ namespace simdutf { namespace westmere { namespace { -namespace utf8_to_utf16 { +namespace utf8_to_utf32 { using namespace simd; -template + simdutf_warn_unused size_t convert_valid(const char* input, size_t size, - char16_t* utf16_output) noexcept { - // The implementation is not specific to haswell and should be moved to the generic directory. + char32_t* utf32_output) noexcept { size_t pos = 0; - char16_t* start{utf16_output}; + char32_t* start{utf32_output}; const size_t safety_margin = 16; // to avoid overruns! while(pos + 64 + safety_margin <= size) { - // this loop could be unrolled further. For example, we could process the mask - // far more than 64 bytes. simd8x64 in(reinterpret_cast(input + pos)); if(in.is_ascii()) { - in.store_ascii_as_utf16(utf16_output); - utf16_output += 64; + in.store_ascii_as_utf32(utf32_output); + utf32_output += 64; pos += 64; } else { - // Slow path. We hope that the compiler will recognize that this is a slow path. - // Anything that is not a continuation mask is a 'leading byte', that is, the - // start of a new code point. - uint64_t utf8_continuation_mask = in.lt(-65 + 1); - // -65 is 0b10111111 in two-complement's, so largest possible continuation byte - uint64_t utf8_leading_mask = ~utf8_continuation_mask; - // The *start* of code points is not so useful, rather, we want the *end* of code points. - uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; - // We process in blocks of up to 12 bytes except possibly - // for fast paths which may process up to 16 bytes. For the - // slow path to work, we should have at least 12 input bytes left. - size_t max_starting_point = (pos + 64) - 12; - // Next loop is going to run at least five times when using solely - // the slow/regular path, and at least four times if there are fast paths. - while(pos < max_starting_point) { - // Performance note: our ability to compute 'consumed' and - // then shift and recompute is critical. If there is a - // latency of, say, 4 cycles on getting 'consumed', then - // the inner loop might have a total latency of about 6 cycles. - // Yet we process between 6 to 12 inputs bytes, thus we get - // a speed limit between 1 cycle/byte and 0.5 cycle/byte - // for this section of the code. Hence, there is a limit - // to how much we can further increase this latency before - // it seriously harms performance. - // - // Thus we may allow convert_masked_utf8_to_utf16 to process - // more bytes at a time under a fast-path mode where 16 bytes - // are consumed at once (e.g., when encountering ASCII). - size_t consumed = convert_masked_utf8_to_utf16(input + pos, - utf8_end_of_code_point_mask, utf16_output); - pos += consumed; - utf8_end_of_code_point_mask >>= consumed; + // -65 is 0b10111111 in two-complement's, so largest possible continuation byte + uint64_t utf8_continuation_mask = in.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + size_t max_starting_point = (pos + 64) - 12; + while(pos < max_starting_point) { + size_t consumed = convert_masked_utf8_to_utf32(input + pos, + utf8_end_of_code_point_mask, utf32_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; } - // At this point there may remain between 0 and 12 bytes in the - // 64-byte block. These bytes will be processed again. So we have an - // 80% efficiency (in the worst case). In practice we expect an - // 85% to 90% efficiency. } } - utf16_output += scalar::utf8_to_utf16::convert_valid(input + pos, size - pos, utf16_output); - return utf16_output - start; + utf32_output += scalar::utf8_to_utf32::convert_valid(input + pos, size - pos, utf32_output); + return utf32_output - start; } -} // namespace utf8_to_utf16 + +} // namespace utf8_to_utf32 } // unnamed namespace } // namespace westmere } // namespace simdutf -/* end file src/generic/utf8_to_utf16/valid_utf8_to_utf16.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf16/utf8_to_utf16.h -/* begin file src/generic/utf8_to_utf16/utf8_to_utf16.h */ +/* end file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ +/* begin file src/generic/utf8_to_utf32/utf8_to_utf32.h */ namespace simdutf { namespace westmere { namespace { -namespace utf8_to_utf16 { +namespace utf8_to_utf32 { using namespace simd; @@ -27492,28 +31963,28 @@ using namespace simd; } - template - simdutf_really_inline size_t convert(const char* in, size_t size, char16_t* utf16_output) { + + simdutf_really_inline size_t convert(const char* in, size_t size, char32_t* utf32_output) { size_t pos = 0; - char16_t* start{utf16_output}; + char32_t* start{utf32_output}; // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, + // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, // to give us a good margin. size_t leading_byte = 0; size_t margin = size; - for(; margin > 0 && leading_byte < 8; margin--) { + for(; margin > 0 && leading_byte < 4; margin--) { leading_byte += (int8_t(in[margin-1]) > -65); } - // If the input is long enough, then we have that margin-1 is the eight last leading byte. + // If the input is long enough, then we have that margin-1 is the fourth last leading byte. const size_t safety_margin = size - margin + 1; // to avoid overruns! while(pos + 64 + safety_margin <= size) { simd8x64 input(reinterpret_cast(in + pos)); if(input.is_ascii()) { - input.store_ascii_as_utf16(utf16_output); - utf16_output += 64; + input.store_ascii_as_utf32(utf32_output); + utf32_output += 64; pos += 64; } else { // you might think that a for-loop would work, but under Visual Studio, it is not good enough. @@ -27547,8 +32018,8 @@ using namespace simd; // for this section of the code. Hence, there is a limit // to how much we can further increase this latency before // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf16(in + pos, - utf8_end_of_code_point_mask, utf16_output); + size_t consumed = convert_masked_utf8_to_utf32(in + pos, + utf8_end_of_code_point_mask, utf32_output); pos += consumed; utf8_end_of_code_point_mask >>= consumed; } @@ -27560,35 +32031,34 @@ using namespace simd; } if(errors()) { return 0; } if(pos < size) { - size_t howmany = scalar::utf8_to_utf16::convert(in + pos, size - pos, utf16_output); + size_t howmany = scalar::utf8_to_utf32::convert(in + pos, size - pos, utf32_output); if(howmany == 0) { return 0; } - utf16_output += howmany; + utf32_output += howmany; } - return utf16_output - start; + return utf32_output - start; } - template - simdutf_really_inline result convert_with_errors(const char* in, size_t size, char16_t* utf16_output) { + simdutf_really_inline result convert_with_errors(const char* in, size_t size, char32_t* utf32_output) { size_t pos = 0; - char16_t* start{utf16_output}; + char32_t* start{utf32_output}; // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf16. If you skip the last 16 bytes, + // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, // to give us a good margin. size_t leading_byte = 0; size_t margin = size; - for(; margin > 0 && leading_byte < 8; margin--) { + for(; margin > 0 && leading_byte < 4; margin--) { leading_byte += (int8_t(in[margin-1]) > -65); } - // If the input is long enough, then we have that margin-1 is the eight last leading byte. + // If the input is long enough, then we have that margin-1 is the fourth last leading byte. const size_t safety_margin = size - margin + 1; // to avoid overruns! while(pos + 64 + safety_margin <= size) { simd8x64 input(reinterpret_cast(in + pos)); if(input.is_ascii()) { - input.store_ascii_as_utf16(utf16_output); - utf16_output += 64; + input.store_ascii_as_utf32(utf32_output); + utf32_output += 64; pos += 64; } else { // you might think that a for-loop would work, but under Visual Studio, it is not good enough. @@ -27605,9 +32075,7 @@ using namespace simd; this->check_utf8_bytes(input.chunks[3], input.chunks[2]); } if (errors()) { - // rewind_and_convert_with_errors will seek a potential error from in+pos onward, - // with the ability to go back up to pos bytes, and read size-pos bytes forward. - result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); res.count += pos; return res; } @@ -27629,8 +32097,8 @@ using namespace simd; // for this section of the code. Hence, there is a limit // to how much we can further increase this latency before // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf16(in + pos, - utf8_end_of_code_point_mask, utf16_output); + size_t consumed = convert_masked_utf8_to_utf32(in + pos, + utf8_end_of_code_point_mask, utf32_output); pos += consumed; utf8_end_of_code_point_mask >>= consumed; } @@ -27641,95 +32109,157 @@ using namespace simd; } } if(errors()) { - // rewind_and_convert_with_errors will seek a potential error from in+pos onward, - // with the ability to go back up to pos bytes, and read size-pos bytes forward. - result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); res.count += pos; return res; } if(pos < size) { - // rewind_and_convert_with_errors will seek a potential error from in+pos onward, - // with the ability to go back up to pos bytes, and read size-pos bytes forward. - result res = scalar::utf8_to_utf16::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf16_output); + result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); if (res.error) { // In case of error, we want the error position res.count += pos; return res; } else { // In case of success, we want the number of word written - utf16_output += res.count; + utf32_output += res.count; } } - return result(error_code::SUCCESS, utf16_output - start); + return result(error_code::SUCCESS, utf32_output - start); + } + + simdutf_really_inline bool errors() const { + return this->error.any_bits_set_anywhere(); + } + + }; // struct utf8_checker +} // utf8_to_utf32 namespace +} // unnamed namespace +} // namespace westmere +} // namespace simdutf +/* end file src/generic/utf8_to_utf32/utf8_to_utf32.h */ +// other functions +/* begin file src/generic/utf8.h */ + +namespace simdutf { +namespace westmere { +namespace { +namespace utf8 { + +using namespace simd; + +simdutf_really_inline size_t count_code_points(const char* in, size_t size) { + size_t pos = 0; + size_t count = 0; + for(;pos + 64 <= size; pos += 64) { + simd8x64 input(reinterpret_cast(in + pos)); + uint64_t utf8_continuation_mask = input.gt(-65); + count += count_ones(utf8_continuation_mask); + } + return count + scalar::utf8::count_code_points(in + pos, size - pos); +} + +simdutf_really_inline size_t utf16_length_from_utf8(const char* in, size_t size) { + size_t pos = 0; + size_t count = 0; + // This algorithm could no doubt be improved! + for(;pos + 64 <= size; pos += 64) { + simd8x64 input(reinterpret_cast(in + pos)); + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + // We count one word for anything that is not a continuation (so + // leading bytes). + count += 64 - count_ones(utf8_continuation_mask); + int64_t utf8_4byte = input.gteq_unsigned(240); + count += count_ones(utf8_4byte); } + return count + scalar::utf8::utf16_length_from_utf8(in + pos, size - pos); +} - simdutf_really_inline bool errors() const { - return this->error.any_bits_set_anywhere(); - } - }; // struct utf8_checker -} // utf8_to_utf16 namespace +simdutf_really_inline size_t utf32_length_from_utf8(const char* in, size_t size) { + return count_code_points(in, size); +} +} // utf8 namespace } // unnamed namespace } // namespace westmere } // namespace simdutf -/* end file src/generic/utf8_to_utf16/utf8_to_utf16.h */ -// transcoding from UTF-8 to UTF-32 -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf32/valid_utf8_to_utf32.h -/* begin file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ - +/* end file src/generic/utf8.h */ +/* begin file src/generic/utf16.h */ namespace simdutf { namespace westmere { namespace { -namespace utf8_to_utf32 { +namespace utf16 { -using namespace simd; +template +simdutf_really_inline size_t count_code_points(const char16_t* in, size_t size) { + size_t pos = 0; + size_t count = 0; + for(;pos < size/32*32; pos += 32) { + simd16x32 input(reinterpret_cast(in + pos)); + if (!match_system(big_endian)) { input.swap_bytes(); } + uint64_t not_pair = input.not_in_range(0xDC00, 0xDFFF); + count += count_ones(not_pair) / 2; + } + return count + scalar::utf16::count_code_points(in + pos, size - pos); +} +template +simdutf_really_inline size_t utf8_length_from_utf16(const char16_t* in, size_t size) { + size_t pos = 0; + size_t count = 0; + // This algorithm could no doubt be improved! + for(;pos < size/32*32; pos += 32) { + simd16x32 input(reinterpret_cast(in + pos)); + if (!match_system(big_endian)) { input.swap_bytes(); } + uint64_t ascii_mask = input.lteq(0x7F); + uint64_t twobyte_mask = input.lteq(0x7FF); + uint64_t not_pair_mask = input.not_in_range(0xD800, 0xDFFF); -simdutf_warn_unused size_t convert_valid(const char* input, size_t size, - char32_t* utf32_output) noexcept { - size_t pos = 0; - char32_t* start{utf32_output}; - const size_t safety_margin = 16; // to avoid overruns! - while(pos + 64 + safety_margin <= size) { - simd8x64 in(reinterpret_cast(input + pos)); - if(in.is_ascii()) { - in.store_ascii_as_utf32(utf32_output); - utf32_output += 64; - pos += 64; - } else { - // -65 is 0b10111111 in two-complement's, so largest possible continuation byte - uint64_t utf8_continuation_mask = in.lt(-65 + 1); - uint64_t utf8_leading_mask = ~utf8_continuation_mask; - uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; - size_t max_starting_point = (pos + 64) - 12; - while(pos < max_starting_point) { - size_t consumed = convert_masked_utf8_to_utf32(input + pos, - utf8_end_of_code_point_mask, utf32_output); - pos += consumed; - utf8_end_of_code_point_mask >>= consumed; - } + size_t ascii_count = count_ones(ascii_mask) / 2; + size_t twobyte_count = count_ones(twobyte_mask & ~ ascii_mask) / 2; + size_t threebyte_count = count_ones(not_pair_mask & ~ twobyte_mask) / 2; + size_t fourbyte_count = 32 - count_ones(not_pair_mask) / 2; + count += 2 * fourbyte_count + 3 * threebyte_count + 2 * twobyte_count + ascii_count; } - } - utf32_output += scalar::utf8_to_utf32::convert_valid(input + pos, size - pos, utf32_output); - return utf32_output - start; + return count + scalar::utf16::utf8_length_from_utf16(in + pos, size - pos); } +template +simdutf_really_inline size_t utf32_length_from_utf16(const char16_t* in, size_t size) { + return count_code_points(in, size); +} -} // namespace utf8_to_utf32 +simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* output) { + size_t pos = 0; + + while (pos < size/32*32) { + simd16x32 input(reinterpret_cast(in + pos)); + input.swap_bytes(); + input.store(reinterpret_cast(output)); + pos += 32; + output += 32; + } + + scalar::utf16::change_endianness_utf16(in + pos, size - pos, output); +} + +} // utf16 } // unnamed namespace } // namespace westmere } // namespace simdutf -/* end file src/generic/utf8_to_utf32/valid_utf8_to_utf32.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8_to_utf32/utf8_to_utf32.h -/* begin file src/generic/utf8_to_utf32/utf8_to_utf32.h */ +/* end file src/generic/utf16.h */ +// transcoding from UTF-8 to Latin 1 +/* begin file src/generic/utf8_to_latin1/utf8_to_latin1.h */ namespace simdutf { namespace westmere { namespace { -namespace utf8_to_utf32 { +namespace utf8_to_latin1 { using namespace simd; simdutf_really_inline simd8 check_special_cases(const simd8 input, const simd8 prev1) { +// For UTF-8 to Latin 1, we can allow any ASCII character, and any continuation byte, +// but the non-ASCII leading bytes must be 0b11000011 or 0b11000010 and nothing else. +// // Bit 0 = Too Short (lead byte/ASCII followed by lead byte/ASCII) // Bit 1 = Too Long (ASCII followed by continuation) // Bit 2 = Overlong 3-byte @@ -27756,6 +32286,7 @@ using namespace simd; // 1111011_ 1000____ // 11111___ 1000____ constexpr const uint8_t OVERLONG_4 = 1<<6; // 11110000 1000____ + constexpr const uint8_t FORBIDDEN = 0xff; const simd8 byte_1_high = prev1.shr<4>().lookup_16( // 0_______ ________ @@ -27766,11 +32297,11 @@ using namespace simd; // 1100____ ________ TOO_SHORT | OVERLONG_2, // 1101____ ________ - TOO_SHORT, + FORBIDDEN, // 1110____ ________ - TOO_SHORT | OVERLONG_3 | SURROGATE, + FORBIDDEN, // 1111____ ________ - TOO_SHORT | TOO_LARGE | TOO_LARGE_1000 | OVERLONG_4 + FORBIDDEN ); constexpr const uint8_t CARRY = TOO_SHORT | TOO_LONG | TWO_CONTS; // These all have ____ in byte 1 . const simd8 byte_1_low = (prev1 & 0x0F).lookup_16( @@ -27783,23 +32314,23 @@ using namespace simd; CARRY, // ____0100 ________ - CARRY | TOO_LARGE, + FORBIDDEN, // ____0101 ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, + FORBIDDEN, // ____011_ ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, + FORBIDDEN, + FORBIDDEN, // ____1___ ________ - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000, + FORBIDDEN, + FORBIDDEN, + FORBIDDEN, + FORBIDDEN, + FORBIDDEN, // ____1101 ________ - CARRY | TOO_LARGE | TOO_LARGE_1000 | SURROGATE, - CARRY | TOO_LARGE | TOO_LARGE_1000, - CARRY | TOO_LARGE | TOO_LARGE_1000 + FORBIDDEN, + FORBIDDEN, + FORBIDDEN ); const simd8 byte_2_high = input.shr<4>().lookup_16( // ________ 0_______ @@ -27819,15 +32350,6 @@ using namespace simd; ); return (byte_1_high & byte_1_low & byte_2_high); } - simdutf_really_inline simd8 check_multibyte_lengths(const simd8 input, - const simd8 prev_input, const simd8 sc) { - simd8 prev2 = input.prev<2>(prev_input); - simd8 prev3 = input.prev<3>(prev_input); - simd8 must23 = simd8(must_be_2_3_continuation(prev2, prev3)); - simd8 must23_80 = must23 & uint8_t(0x80); - return must23_80 ^ sc; - } - struct validating_transcoder { // If this is nonzero, there has been a UTF-8 error. @@ -27841,33 +32363,31 @@ using namespace simd; // Flip prev1...prev3 so we can easily determine if they are 2+, 3+ or 4+ lead bytes // (2, 3, 4-byte leads become large positive numbers instead of small negative numbers) simd8 prev1 = input.prev<1>(prev_input); - simd8 sc = check_special_cases(input, prev1); - this->error |= check_multibyte_lengths(input, prev_input, sc); + this->error |= check_special_cases(input, prev1); } - - simdutf_really_inline size_t convert(const char* in, size_t size, char32_t* utf32_output) { + simdutf_really_inline size_t convert(const char* in, size_t size, char* latin1_output) { size_t pos = 0; - char32_t* start{utf32_output}; + char* start{latin1_output}; // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, + // 8 bytes when calling convert_masked_utf8_to_latin1. If you skip the last 16 bytes, // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, // to give us a good margin. size_t leading_byte = 0; size_t margin = size; - for(; margin > 0 && leading_byte < 4; margin--) { - leading_byte += (int8_t(in[margin-1]) > -65); + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); //twos complement of -65 is 1011 1111 ... } - // If the input is long enough, then we have that margin-1 is the fourth last leading byte. + // If the input is long enough, then we have that margin-1 is the eight last leading byte. const size_t safety_margin = size - margin + 1; // to avoid overruns! while(pos + 64 + safety_margin <= size) { simd8x64 input(reinterpret_cast(in + pos)); if(input.is_ascii()) { - input.store_ascii_as_utf32(utf32_output); - utf32_output += 64; + input.store((int8_t*)latin1_output); + latin1_output += 64; pos += 64; } else { // you might think that a for-loop would work, but under Visual Studio, it is not good enough. @@ -27883,7 +32403,7 @@ using namespace simd; this->check_utf8_bytes(input.chunks[2], input.chunks[1]); this->check_utf8_bytes(input.chunks[3], input.chunks[2]); } - uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_continuation_mask = input.lt(-65 + 1); // -64 is 1100 0000 in twos complement. Note: in this case, we also have ASCII to account for. uint64_t utf8_leading_mask = ~utf8_continuation_mask; uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; // We process in blocks of up to 12 bytes except possibly @@ -27901,8 +32421,8 @@ using namespace simd; // for this section of the code. Hence, there is a limit // to how much we can further increase this latency before // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf32(in + pos, - utf8_end_of_code_point_mask, utf32_output); + size_t consumed = convert_masked_utf8_to_latin1(in + pos, + utf8_end_of_code_point_mask, latin1_output); pos += consumed; utf8_end_of_code_point_mask >>= consumed; } @@ -27914,55 +32434,151 @@ using namespace simd; } if(errors()) { return 0; } if(pos < size) { - size_t howmany = scalar::utf8_to_utf32::convert(in + pos, size - pos, utf32_output); + size_t howmany = scalar::utf8_to_latin1::convert(in + pos, size - pos, latin1_output); if(howmany == 0) { return 0; } - utf32_output += howmany; + latin1_output += howmany; } - return utf32_output - start; + return latin1_output - start; } - simdutf_really_inline result convert_with_errors(const char* in, size_t size, char32_t* utf32_output) { + simdutf_really_inline result convert_with_errors(const char* in, size_t size, char* latin1_output) { size_t pos = 0; - char32_t* start{utf32_output}; + char* start{latin1_output}; // In the worst case, we have the haswell kernel which can cause an overflow of - // 8 bytes when calling convert_masked_utf8_to_utf32. If you skip the last 16 bytes, + // 8 bytes when calling convert_masked_utf8_to_latin1. If you skip the last 16 bytes, // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate // much more than 8 bytes. However, you cannot generally assume that you have valid - // UTF-8 input, so we are going to go back from the end counting 4 leading bytes, + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, // to give us a good margin. size_t leading_byte = 0; size_t margin = size; - for(; margin > 0 && leading_byte < 4; margin--) { + for(; margin > 0 && leading_byte < 8; margin--) { leading_byte += (int8_t(in[margin-1]) > -65); } - // If the input is long enough, then we have that margin-1 is the fourth last leading byte. + // If the input is long enough, then we have that margin-1 is the eight last leading byte. const size_t safety_margin = size - margin + 1; // to avoid overruns! while(pos + 64 + safety_margin <= size) { simd8x64 input(reinterpret_cast(in + pos)); if(input.is_ascii()) { - input.store_ascii_as_utf32(utf32_output); - utf32_output += 64; + input.store((int8_t*)latin1_output); + latin1_output += 64; + pos += 64; + } else { + // you might think that a for-loop would work, but under Visual Studio, it is not good enough. + static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), + "We support either two or four chunks per 64-byte block."); + auto zero = simd8{uint8_t(0)}; + if(simd8x64::NUM_CHUNKS == 2) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + } else if(simd8x64::NUM_CHUNKS == 4) { + this->check_utf8_bytes(input.chunks[0], zero); + this->check_utf8_bytes(input.chunks[1], input.chunks[0]); + this->check_utf8_bytes(input.chunks[2], input.chunks[1]); + this->check_utf8_bytes(input.chunks[3], input.chunks[2]); + } + if (errors()) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output); + res.count += pos; + return res; + } + uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_leading_mask = ~utf8_continuation_mask; + uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; + // We process in blocks of up to 12 bytes except possibly + // for fast paths which may process up to 16 bytes. For the + // slow path to work, we should have at least 12 input bytes left. + size_t max_starting_point = (pos + 64) - 12; + // Next loop is going to run at least five times. + while(pos < max_starting_point) { + // Performance note: our ability to compute 'consumed' and + // then shift and recompute is critical. If there is a + // latency of, say, 4 cycles on getting 'consumed', then + // the inner loop might have a total latency of about 6 cycles. + // Yet we process between 6 to 12 inputs bytes, thus we get + // a speed limit between 1 cycle/byte and 0.5 cycle/byte + // for this section of the code. Hence, there is a limit + // to how much we can further increase this latency before + // it seriously harms performance. + size_t consumed = convert_masked_utf8_to_latin1(in + pos, + utf8_end_of_code_point_mask, latin1_output); + pos += consumed; + utf8_end_of_code_point_mask >>= consumed; + } + // At this point there may remain between 0 and 12 bytes in the + // 64-byte block. These bytes will be processed again. So we have an + // 80% efficiency (in the worst case). In practice we expect an + // 85% to 90% efficiency. + } + } + if(errors()) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output); + res.count += pos; + return res; + } + if(pos < size) { + // rewind_and_convert_with_errors will seek a potential error from in+pos onward, + // with the ability to go back up to pos bytes, and read size-pos bytes forward. + result res = scalar::utf8_to_latin1::rewind_and_convert_with_errors(pos, in + pos, size - pos, latin1_output); + if (res.error) { // In case of error, we want the error position + res.count += pos; + return res; + } else { // In case of success, we want the number of word written + latin1_output += res.count; + } + } + return result(error_code::SUCCESS, latin1_output - start); + } + + simdutf_really_inline bool errors() const { + return this->error.any_bits_set_anywhere(); + } + + }; // struct utf8_checker +} // utf8_to_latin1 namespace +} // unnamed namespace +} // namespace westmere +} // namespace simdutf +/* end file src/generic/utf8_to_latin1/utf8_to_latin1.h */ +/* begin file src/generic/utf8_to_latin1/valid_utf8_to_latin1.h */ + + +namespace simdutf { +namespace westmere { +namespace { +namespace utf8_to_latin1 { +using namespace simd; + + + simdutf_really_inline size_t convert_valid(const char* in, size_t size, char* latin1_output) { + size_t pos = 0; + char* start{latin1_output}; + // In the worst case, we have the haswell kernel which can cause an overflow of + // 8 bytes when calling convert_masked_utf8_to_latin1. If you skip the last 16 bytes, + // and if the data is valid, then it is entirely safe because 16 UTF-8 bytes generate + // much more than 8 bytes. However, you cannot generally assume that you have valid + // UTF-8 input, so we are going to go back from the end counting 8 leading bytes, + // to give us a good margin. + size_t leading_byte = 0; + size_t margin = size; + for(; margin > 0 && leading_byte < 8; margin--) { + leading_byte += (int8_t(in[margin-1]) > -65); //twos complement of -65 is 1011 1111 ... + } + // If the input is long enough, then we have that margin-1 is the eight last leading byte. + const size_t safety_margin = size - margin + 1; // to avoid overruns! + while(pos + 64 + safety_margin <= size) { + simd8x64 input(reinterpret_cast(in + pos)); + if(input.is_ascii()) { + input.store((int8_t*)latin1_output); + latin1_output += 64; pos += 64; } else { // you might think that a for-loop would work, but under Visual Studio, it is not good enough. - static_assert((simd8x64::NUM_CHUNKS == 2) || (simd8x64::NUM_CHUNKS == 4), - "We support either two or four chunks per 64-byte block."); - auto zero = simd8{uint8_t(0)}; - if(simd8x64::NUM_CHUNKS == 2) { - this->check_utf8_bytes(input.chunks[0], zero); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - } else if(simd8x64::NUM_CHUNKS == 4) { - this->check_utf8_bytes(input.chunks[0], zero); - this->check_utf8_bytes(input.chunks[1], input.chunks[0]); - this->check_utf8_bytes(input.chunks[2], input.chunks[1]); - this->check_utf8_bytes(input.chunks[3], input.chunks[2]); - } - if (errors()) { - result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); - res.count += pos; - return res; - } - uint64_t utf8_continuation_mask = input.lt(-65 + 1); + uint64_t utf8_continuation_mask = input.lt(-65 + 1); // -64 is 1100 0000 in twos complement. Note: in this case, we also have ASCII to account for. uint64_t utf8_leading_mask = ~utf8_continuation_mask; uint64_t utf8_end_of_code_point_mask = utf8_leading_mask>>1; // We process in blocks of up to 12 bytes except possibly @@ -27980,8 +32596,8 @@ using namespace simd; // for this section of the code. Hence, there is a limit // to how much we can further increase this latency before // it seriously harms performance. - size_t consumed = convert_masked_utf8_to_utf32(in + pos, - utf8_end_of_code_point_mask, utf32_output); + size_t consumed = convert_masked_utf8_to_latin1(in + pos, + utf8_end_of_code_point_mask, latin1_output); pos += consumed; utf8_end_of_code_point_mask >>= consumed; } @@ -27991,146 +32607,22 @@ using namespace simd; // 85% to 90% efficiency. } } - if(errors()) { - result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); - res.count += pos; - return res; - } if(pos < size) { - result res = scalar::utf8_to_utf32::rewind_and_convert_with_errors(pos, in + pos, size - pos, utf32_output); - if (res.error) { // In case of error, we want the error position - res.count += pos; - return res; - } else { // In case of success, we want the number of word written - utf32_output += res.count; - } + size_t howmany = scalar::utf8_to_latin1::convert(in + pos, size - pos, latin1_output); + if(howmany == 0) { return 0; } + latin1_output += howmany; } - return result(error_code::SUCCESS, utf32_output - start); - } - - simdutf_really_inline bool errors() const { - return this->error.any_bits_set_anywhere(); - } - - }; // struct utf8_checker -} // utf8_to_utf32 namespace -} // unnamed namespace -} // namespace westmere -} // namespace simdutf -/* end file src/generic/utf8_to_utf32/utf8_to_utf32.h */ -// other functions -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf8.h -/* begin file src/generic/utf8.h */ - -namespace simdutf { -namespace westmere { -namespace { -namespace utf8 { - -using namespace simd; - -simdutf_really_inline size_t count_code_points(const char* in, size_t size) { - size_t pos = 0; - size_t count = 0; - for(;pos + 64 <= size; pos += 64) { - simd8x64 input(reinterpret_cast(in + pos)); - uint64_t utf8_continuation_mask = input.lt(-65 + 1); - count += 64 - count_ones(utf8_continuation_mask); + return latin1_output - start; } - return count + scalar::utf8::count_code_points(in + pos, size - pos); -} - - -simdutf_really_inline size_t utf16_length_from_utf8(const char* in, size_t size) { - size_t pos = 0; - size_t count = 0; - // This algorithm could no doubt be improved! - for(;pos + 64 <= size; pos += 64) { - simd8x64 input(reinterpret_cast(in + pos)); - uint64_t utf8_continuation_mask = input.lt(-65 + 1); - // We count one word for anything that is not a continuation (so - // leading bytes). - count += 64 - count_ones(utf8_continuation_mask); - int64_t utf8_4byte = input.gteq_unsigned(240); - count += count_ones(utf8_4byte); - } - return count + scalar::utf8::utf16_length_from_utf8(in + pos, size - pos); -} - - -simdutf_really_inline size_t utf32_length_from_utf8(const char* in, size_t size) { - return count_code_points(in, size); -} -} // utf8 namespace -} // unnamed namespace -} // namespace westmere -} // namespace simdutf -/* end file src/generic/utf8.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=generic/utf16.h -/* begin file src/generic/utf16.h */ -namespace simdutf { -namespace westmere { -namespace { -namespace utf16 { - -template -simdutf_really_inline size_t count_code_points(const char16_t* in, size_t size) { - size_t pos = 0; - size_t count = 0; - for(;pos + 32 <= size; pos += 32) { - simd16x32 input(reinterpret_cast(in + pos)); - if (!match_system(big_endian)) input.swap_bytes(); - uint64_t not_pair = input.not_in_range(0xDC00, 0xDFFF); - count += count_ones(not_pair) / 2; - } - return count + scalar::utf16::count_code_points(in + pos, size - pos); -} - -template -simdutf_really_inline size_t utf8_length_from_utf16(const char16_t* in, size_t size) { - size_t pos = 0; - size_t count = 0; - // This algorithm could no doubt be improved! - for(;pos + 32 <= size; pos += 32) { - simd16x32 input(reinterpret_cast(in + pos)); - if (!match_system(big_endian)) input.swap_bytes(); - uint64_t ascii_mask = input.lteq(0x7F); - uint64_t twobyte_mask = input.lteq(0x7FF); - uint64_t not_pair_mask = input.not_in_range(0xD800, 0xDFFF); - - size_t ascii_count = count_ones(ascii_mask) / 2; - size_t twobyte_count = count_ones(twobyte_mask & ~ ascii_mask) / 2; - size_t threebyte_count = count_ones(not_pair_mask & ~ twobyte_mask) / 2; - size_t fourbyte_count = 32 - count_ones(not_pair_mask) / 2; - count += 2 * fourbyte_count + 3 * threebyte_count + 2 * twobyte_count + ascii_count; - } - return count + scalar::utf16::utf8_length_from_utf16(in + pos, size - pos); -} -template -simdutf_really_inline size_t utf32_length_from_utf16(const char16_t* in, size_t size) { - return count_code_points(in, size); -} - -simdutf_really_inline void change_endianness_utf16(const char16_t* in, size_t size, char16_t* output) { - size_t pos = 0; - - while (pos + 32 <= size) { - simd16x32 input(reinterpret_cast(in + pos)); - input.swap_bytes(); - input.store(reinterpret_cast(output)); - pos += 32; - output += 32; - } + }; +} // utf8_to_latin1 namespace +} // unnamed namespace +} // namespace westmere + // namespace simdutf +/* end file src/generic/utf8_to_latin1/valid_utf8_to_latin1.h */ - scalar::utf16::change_endianness_utf16(in + pos, size - pos, output); -} -} // utf16 -} // unnamed namespace -} // namespace westmere -} // namespace simdutf -/* end file src/generic/utf16.h */ // // Implementation-specific overrides // @@ -28226,6 +32718,74 @@ simdutf_warn_unused result implementation::validate_utf32_with_errors(const char } } +simdutf_warn_unused size_t implementation::convert_latin1_to_utf8(const char * buf, size_t len, char* utf8_output) const noexcept { + + std::pair ret = sse_convert_latin1_to_utf8(buf, len, utf8_output); + size_t converted_chars = ret.second - utf8_output; + + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf8::convert( + ret.first, len - (ret.first - buf), ret.second); + converted_chars += scalar_converted_chars; + } + + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + std::pair ret = sse_convert_latin1_to_utf16(buf, len, utf16_output); + if (ret.first == nullptr) { return 0; } + size_t converted_chars = ret.second - utf16_output; + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf16::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_converted_chars == 0) { return 0; } + converted_chars += scalar_converted_chars; + } + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf16be(const char* buf, size_t len, char16_t* utf16_output) const noexcept { + std::pair ret = sse_convert_latin1_to_utf16(buf, len, utf16_output); + if (ret.first == nullptr) { return 0; } + size_t converted_chars = ret.second - utf16_output; + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf16::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_converted_chars == 0) { return 0; } + converted_chars += scalar_converted_chars; + } + return converted_chars; +} + +simdutf_warn_unused size_t implementation::convert_latin1_to_utf32(const char* buf, size_t len, char32_t* utf32_output) const noexcept { + std::pair ret = sse_convert_latin1_to_utf32(buf, len, utf32_output); + if (ret.first == nullptr) { return 0; } + size_t converted_chars = ret.second - utf32_output; + if (ret.first != buf + len) { + const size_t scalar_converted_chars = scalar::latin1_to_utf32::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_converted_chars == 0) { return 0; } + converted_chars += scalar_converted_chars; + } + return converted_chars; +} + + +simdutf_warn_unused size_t implementation::convert_utf8_to_latin1(const char* buf, size_t len, char* latin1_output) const noexcept { + utf8_to_latin1::validating_transcoder converter; + return converter.convert(buf, len, latin1_output); +} + +simdutf_warn_unused result implementation::convert_utf8_to_latin1_with_errors(const char* buf, size_t len, char* latin1_output) const noexcept { + utf8_to_latin1::validating_transcoder converter; + return converter.convert_with_errors(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf8_to_latin1(const char* buf, size_t len, char* latin1_output) const noexcept { + return westmere::utf8_to_latin1::convert_valid(buf,len,latin1_output); +} + simdutf_warn_unused size_t implementation::convert_utf8_to_utf16le(const char* buf, size_t len, char16_t* utf16_output) const noexcept { utf8_to_utf16::validating_transcoder converter; return converter.convert(buf, len, utf16_output); @@ -28272,6 +32832,79 @@ simdutf_warn_unused size_t implementation::convert_valid_utf8_to_utf32(const cha return utf8_to_utf32::convert_valid(input, size, utf32_output); } +simdutf_warn_unused size_t implementation::convert_utf16le_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = sse_convert_utf16_to_latin1(buf, len, latin1_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - latin1_output; + + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf16_to_latin1::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused size_t implementation::convert_utf16be_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = sse_convert_utf16_to_latin1(buf, len, latin1_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - latin1_output; + + if (ret.first != buf + len) { + const size_t scalar_saved_bytes = scalar::utf16_to_latin1::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + +simdutf_warn_unused result implementation::convert_utf16le_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = sse_convert_utf16_to_latin1_with_errors(buf, len, latin1_output); + if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count + if (ret.first.count != len) { // All good so far, but not finished + result scalar_res = scalar::utf16_to_latin1::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused result implementation::convert_utf16be_to_latin1_with_errors(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = sse_convert_utf16_to_latin1_with_errors(buf, len, latin1_output); + if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count + if (ret.first.count != len) { // All good so far, but not finished + result scalar_res = scalar::utf16_to_latin1::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written + return ret.first; +} + + +simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + // optimization opportunity: we could provide an optimized function. + return convert_utf16be_to_latin1(buf, len, latin1_output); +} + +simdutf_warn_unused size_t implementation::convert_valid_utf16le_to_latin1(const char16_t* buf, size_t len, char* latin1_output) const noexcept { + // optimization opportunity: we could provide an optimized function. + return convert_utf16le_to_latin1(buf, len, latin1_output); +} + simdutf_warn_unused size_t implementation::convert_utf16le_to_utf8(const char16_t* buf, size_t len, char* utf8_output) const noexcept { std::pair ret = sse_convert_utf16_to_utf8(buf, len, utf8_output); if (ret.first == nullptr) { return 0; } @@ -28299,7 +32932,7 @@ simdutf_warn_unused size_t implementation::convert_utf16be_to_utf8(const char16_ } simdutf_warn_unused result implementation::convert_utf16le_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = westmere::sse_convert_utf16_to_utf8_with_errors(buf, len, utf8_output); if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count if (ret.first.count != len) { // All good so far, but not finished @@ -28312,12 +32945,12 @@ simdutf_warn_unused result implementation::convert_utf16le_to_utf8_with_errors(c ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written return ret.first; } simdutf_warn_unused result implementation::convert_utf16be_to_utf8_with_errors(const char16_t* buf, size_t len, char* utf8_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = westmere::sse_convert_utf16_to_utf8_with_errors(buf, len, utf8_output); if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count if (ret.first.count != len) { // All good so far, but not finished @@ -28330,7 +32963,7 @@ simdutf_warn_unused result implementation::convert_utf16be_to_utf8_with_errors(c ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written return ret.first; } @@ -28342,6 +32975,43 @@ simdutf_warn_unused size_t implementation::convert_valid_utf16be_to_utf8(const c return convert_utf16be_to_utf8(buf, len, utf8_output); } +simdutf_warn_unused size_t implementation::convert_utf32_to_latin1(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + std::pair ret = sse_convert_utf32_to_latin1(buf, len, latin1_output); + if (ret.first == nullptr) { return 0; } + size_t saved_bytes = ret.second - latin1_output; + // if (ret.first != buf + len) { + if (ret.first < buf + len) { + const size_t scalar_saved_bytes = scalar::utf32_to_latin1::convert( + ret.first, len - (ret.first - buf), ret.second); + if (scalar_saved_bytes == 0) { return 0; } + saved_bytes += scalar_saved_bytes; + } + return saved_bytes; +} + + +simdutf_warn_unused result implementation::convert_utf32_to_latin1_with_errors(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + // ret.first.count is always the position in the buffer, not the number of code units written even if finished + std::pair ret = westmere::sse_convert_utf32_to_latin1_with_errors(buf, len, latin1_output); + if (ret.first.count != len) { + result scalar_res = scalar::utf32_to_latin1::convert_with_errors( + buf + ret.first.count, len - ret.first.count, ret.second); + if (scalar_res.error) { + scalar_res.count += ret.first.count; + return scalar_res; + } else { + ret.second += scalar_res.count; + } + } + ret.first.count = ret.second - latin1_output; // Set count to the number of 8-bit code units written + return ret.first; +} + +simdutf_warn_unused size_t implementation::convert_valid_utf32_to_latin1(const char32_t* buf, size_t len, char* latin1_output) const noexcept { + // optimization opportunity: we could provide an optimized function. + return convert_utf32_to_latin1(buf,len,latin1_output); +} + simdutf_warn_unused size_t implementation::convert_utf32_to_utf8(const char32_t* buf, size_t len, char* utf8_output) const noexcept { std::pair ret = sse_convert_utf32_to_utf8(buf, len, utf8_output); if (ret.first == nullptr) { return 0; } @@ -28356,7 +33026,7 @@ simdutf_warn_unused size_t implementation::convert_utf32_to_utf8(const char32_t* } simdutf_warn_unused result implementation::convert_utf32_to_utf8_with_errors(const char32_t* buf, size_t len, char* utf8_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = westmere::sse_convert_utf32_to_utf8_with_errors(buf, len, utf8_output); if (ret.first.count != len) { result scalar_res = scalar::utf32_to_utf8::convert_with_errors( @@ -28368,7 +33038,7 @@ simdutf_warn_unused result implementation::convert_utf32_to_utf8_with_errors(con ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf8_output; // Set count to the number of 8-bit code units written return ret.first; } @@ -28399,7 +33069,7 @@ simdutf_warn_unused size_t implementation::convert_utf16be_to_utf32(const char16 } simdutf_warn_unused result implementation::convert_utf16le_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = westmere::sse_convert_utf16_to_utf32_with_errors(buf, len, utf32_output); if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count if (ret.first.count != len) { // All good so far, but not finished @@ -28412,12 +33082,12 @@ simdutf_warn_unused result implementation::convert_utf16le_to_utf32_with_errors( ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written return ret.first; } simdutf_warn_unused result implementation::convert_utf16be_to_utf32_with_errors(const char16_t* buf, size_t len, char32_t* utf32_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = westmere::sse_convert_utf16_to_utf32_with_errors(buf, len, utf32_output); if (ret.first.error) { return ret.first; } // Can return directly since scalar fallback already found correct ret.first.count if (ret.first.count != len) { // All good so far, but not finished @@ -28430,7 +33100,7 @@ simdutf_warn_unused result implementation::convert_utf16be_to_utf32_with_errors( ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf32_output; // Set count to the number of 8-bit code units written return ret.first; } @@ -28465,7 +33135,7 @@ simdutf_warn_unused size_t implementation::convert_utf32_to_utf16be(const char32 } simdutf_warn_unused result implementation::convert_utf32_to_utf16le_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = westmere::sse_convert_utf32_to_utf16_with_errors(buf, len, utf16_output); if (ret.first.count != len) { result scalar_res = scalar::utf32_to_utf16::convert_with_errors( @@ -28477,12 +33147,12 @@ simdutf_warn_unused result implementation::convert_utf32_to_utf16le_with_errors( ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written return ret.first; } simdutf_warn_unused result implementation::convert_utf32_to_utf16be_with_errors(const char32_t* buf, size_t len, char16_t* utf16_output) const noexcept { - // ret.first.count is always the position in the buffer, not the number of words written even if finished + // ret.first.count is always the position in the buffer, not the number of code units written even if finished std::pair ret = westmere::sse_convert_utf32_to_utf16_with_errors(buf, len, utf16_output); if (ret.first.count != len) { result scalar_res = scalar::utf32_to_utf16::convert_with_errors( @@ -28494,7 +33164,7 @@ simdutf_warn_unused result implementation::convert_utf32_to_utf16be_with_errors( ret.second += scalar_res.count; } } - ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit words written + ret.first.count = ret.second - utf16_output; // Set count to the number of 8-bit code units written return ret.first; } @@ -28530,6 +33200,18 @@ simdutf_warn_unused size_t implementation::count_utf8(const char * input, size_t return utf8::count_code_points(input, length); } +simdutf_warn_unused size_t implementation::latin1_length_from_utf8(const char* buf, size_t len) const noexcept { + return count_utf8(buf,len); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf16(size_t length) const noexcept { + return scalar::utf16::latin1_length_from_utf16(length); +} + +simdutf_warn_unused size_t implementation::latin1_length_from_utf32(size_t length) const noexcept { + return scalar::utf32::latin1_length_from_utf32(length); +} + simdutf_warn_unused size_t implementation::utf8_length_from_utf16le(const char16_t * input, size_t length) const noexcept { return utf16::utf8_length_from_utf16(input, length); } @@ -28538,6 +33220,61 @@ simdutf_warn_unused size_t implementation::utf8_length_from_utf16be(const char16 return utf16::utf8_length_from_utf16(input, length); } +simdutf_warn_unused size_t implementation::utf16_length_from_latin1(size_t length) const noexcept { + return scalar::latin1::utf16_length_from_latin1(length); +} + +simdutf_warn_unused size_t implementation::utf32_length_from_latin1(size_t length) const noexcept { + return scalar::latin1::utf32_length_from_latin1(length); +} + +simdutf_warn_unused size_t implementation::utf8_length_from_latin1(const char * input, size_t len) const noexcept { + const uint8_t *str = reinterpret_cast(input); + size_t answer = len / sizeof(__m128i) * sizeof(__m128i); + size_t i = 0; + __m128i two_64bits = _mm_setzero_si128(); + while (i + sizeof(__m128i) <= len) { + __m128i runner = _mm_setzero_si128(); + size_t iterations = (len - i) / sizeof(__m128i); + if (iterations > 255) { + iterations = 255; + } + size_t max_i = i + iterations * sizeof(__m128i) - sizeof(__m128i); + for (; i + 4*sizeof(__m128i) <= max_i; i += 4*sizeof(__m128i)) { + __m128i input1 = _mm_loadu_si128((const __m128i *)(str + i)); + __m128i input2 = _mm_loadu_si128((const __m128i *)(str + i + sizeof(__m128i))); + __m128i input3 = _mm_loadu_si128((const __m128i *)(str + i + 2*sizeof(__m128i))); + __m128i input4 = _mm_loadu_si128((const __m128i *)(str + i + 3*sizeof(__m128i))); + __m128i input12 = _mm_add_epi8( + _mm_cmpgt_epi8( + _mm_setzero_si128(), + input1), + _mm_cmpgt_epi8( + _mm_setzero_si128(), + input2)); + __m128i input34 = _mm_add_epi8( + _mm_cmpgt_epi8( + _mm_setzero_si128(), + input3), + _mm_cmpgt_epi8( + _mm_setzero_si128(), + input4)); + __m128i input1234 = _mm_add_epi8(input12, input34); + runner = _mm_sub_epi8(runner, input1234); + } + for (; i <= max_i; i += sizeof(__m128i)) { + __m128i more_input = _mm_loadu_si128((const __m128i *)(str + i)); + runner = _mm_sub_epi8( + runner, _mm_cmpgt_epi8(_mm_setzero_si128(), more_input)); + } + two_64bits = _mm_add_epi64( + two_64bits, _mm_sad_epu8(runner, _mm_setzero_si128())); + } + answer += _mm_extract_epi64(two_64bits, 0) + + _mm_extract_epi64(two_64bits, 1); + return answer + scalar::latin1::utf8_length_from_latin1(reinterpret_cast(str + i), len - i); +} + simdutf_warn_unused size_t implementation::utf32_length_from_utf16le(const char16_t * input, size_t length) const noexcept { return utf16::utf32_length_from_utf16(input, length); } @@ -28592,13 +33329,12 @@ simdutf_warn_unused size_t implementation::utf16_length_from_utf32(const char32_ } simdutf_warn_unused size_t implementation::utf32_length_from_utf8(const char * input, size_t length) const noexcept { - return scalar::utf8::count_code_points(input, length); + return utf8::count_code_points(input, length); } } // namespace westmere } // namespace simdutf -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/src, filename=simdutf/westmere/end.h /* begin file src/simdutf/westmere/end.h */ #if SIMDUTF_CAN_ALWAYS_RUN_WESTMERE // nothing needed. diff --git a/deps/simdutf/simdutf.h b/deps/simdutf/simdutf.h index 6ab1c34d7b30a7..6b40666f0170f8 100644 --- a/deps/simdutf/simdutf.h +++ b/deps/simdutf/simdutf.h @@ -1,11 +1,9 @@ -/* auto-generated on 2023-10-08 13:48:09 -0400. Do not edit! */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/include, filename=simdutf.h +/* auto-generated on 2023-11-15 17:34:03 -0500. Do not edit! */ /* begin file include/simdutf.h */ #ifndef SIMDUTF_H #define SIMDUTF_H #include -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/include, filename=simdutf/compiler_check.h /* begin file include/simdutf/compiler_check.h */ #ifndef SIMDUTF_COMPILER_CHECK_H #define SIMDUTF_COMPILER_CHECK_H @@ -43,13 +41,11 @@ #endif // SIMDUTF_COMPILER_CHECK_H /* end file include/simdutf/compiler_check.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/include, filename=simdutf/common_defs.h /* begin file include/simdutf/common_defs.h */ #ifndef SIMDUTF_COMMON_DEFS_H #define SIMDUTF_COMMON_DEFS_H #include -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/include, filename=simdutf/portability.h /* begin file include/simdutf/portability.h */ #ifndef SIMDUTF_PORTABILITY_H #define SIMDUTF_PORTABILITY_H @@ -167,11 +163,8 @@ #ifdef SIMDUTF_IS_32BITS #ifndef SIMDUTF_NO_PORTABILITY_WARNING -#pragma message("The simdutf library is designed \ -for 64-bit processors and it seems that you are not \ -compiling for a known 64-bit platform. All fast kernels \ -will be disabled and performance may be poor. Please \ -use a 64-bit target such as x64, 64-bit ARM or 64-bit PPC.") +// In the future, we may want to warn users of 32-bit systems that +// the simdutf does not support accelerated kernels for such systems. #endif // SIMDUTF_NO_PORTABILITY_WARNING #endif // SIMDUTF_IS_32BITS @@ -280,7 +273,6 @@ use a 64-bit target such as x64, 64-bit ARM or 64-bit PPC.") #endif // SIMDUTF_PORTABILITY_H /* end file include/simdutf/portability.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/include, filename=simdutf/avx512.h /* begin file include/simdutf/avx512.h */ #ifndef SIMDUTF_AVX512_H_ #define SIMDUTF_AVX512_H_ @@ -483,7 +475,6 @@ use a 64-bit target such as x64, 64-bit ARM or 64-bit PPC.") #endif // SIMDUTF_COMMON_DEFS_H /* end file include/simdutf/common_defs.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/include, filename=simdutf/encoding_types.h /* begin file include/simdutf/encoding_types.h */ #include @@ -495,13 +486,14 @@ enum encoding_type { UTF16_BE = 4, // BOM 0xfe 0xff UTF32_LE = 8, // BOM 0xff 0xfe 0x00 0x00 UTF32_BE = 16, // BOM 0x00 0x00 0xfe 0xff + Latin1 = 32, unspecified = 0 }; enum endianness { - LITTLE, - BIG + LITTLE = 0, + BIG = 1 }; bool match_system(endianness e); @@ -514,7 +506,7 @@ namespace BOM { /** * Checks for a BOM. If not, returns unspecified * @param input the string to process - * @param length the length of the string in words + * @param length the length of the string in code units * @return the corresponding encoding */ @@ -531,7 +523,6 @@ size_t bom_byte_size(encoding_type bom); } // BOM namespace } // simdutf namespace /* end file include/simdutf/encoding_types.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/include, filename=simdutf/error.h /* begin file include/simdutf/error.h */ #ifndef ERROR_H #define ERROR_H @@ -545,15 +536,16 @@ enum error_code { TOO_LONG, // We either have too many consecutive continuation bytes or the string starts with a continuation byte. OVERLONG, // The decoded character must be above U+7F for two-byte characters, U+7FF for three-byte characters, // and U+FFFF for four-byte characters. - TOO_LARGE, // The decoded character must be less than or equal to U+10FFFF OR less than or equal than U+7F for ASCII. + TOO_LARGE, // The decoded character must be less than or equal to U+10FFFF,less than or equal than U+7F for ASCII OR less than equal than U+FF for Latin1 SURROGATE, // The decoded character must be not be in U+D800...DFFF (UTF-8 or UTF-32) OR - // a high surrogate must be followed by a low surrogate and a low surrogate must be preceded by a high surrogate (UTF-16) + // a high surrogate must be followed by a low surrogate and a low surrogate must be preceded by a high surrogate (UTF-16) OR + // there must be no surrogate at all (Latin1) OTHER // Not related to validation/transcoding. }; struct result { error_code error; - size_t count; // In case of error, indicates the position of the error. In case of success, indicates the number of words validated/written. + size_t count; // In case of error, indicates the position of the error. In case of success, indicates the number of code units validated/written. simdutf_really_inline result(); @@ -568,7 +560,6 @@ SIMDUTF_PUSH_DISABLE_WARNINGS SIMDUTF_DISABLE_UNDESIRED_WARNINGS // Public API -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/include, filename=simdutf/simdutf_version.h /* begin file include/simdutf/simdutf_version.h */ // /include/simdutf/simdutf_version.h automatically generated by release.py, // do not change by hand @@ -576,28 +567,27 @@ SIMDUTF_DISABLE_UNDESIRED_WARNINGS #define SIMDUTF_SIMDUTF_VERSION_H /** The version of simdutf being used (major.minor.revision) */ -#define SIMDUTF_VERSION "3.2.18" +#define SIMDUTF_VERSION "4.0.4" namespace simdutf { enum { /** * The major version (MAJOR.minor.revision) of simdutf being used. */ - SIMDUTF_VERSION_MAJOR = 3, + SIMDUTF_VERSION_MAJOR = 4, /** * The minor version (major.MINOR.revision) of simdutf being used. */ - SIMDUTF_VERSION_MINOR = 2, + SIMDUTF_VERSION_MINOR = 0, /** * The revision (major.minor.REVISION) of simdutf being used. */ - SIMDUTF_VERSION_REVISION = 18 + SIMDUTF_VERSION_REVISION = 4 }; } // namespace simdutf #endif // SIMDUTF_SIMDUTF_VERSION_H /* end file include/simdutf/simdutf_version.h */ -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/include, filename=simdutf/implementation.h /* begin file include/simdutf/implementation.h */ #ifndef SIMDUTF_IMPLEMENTATION_H #define SIMDUTF_IMPLEMENTATION_H @@ -607,7 +597,6 @@ enum { #endif #include #include -// dofile: invoked with prepath=/Users/dlemire/CVS/github/simdutf/include, filename=simdutf/internal/isadetection.h /* begin file include/simdutf/internal/isadetection.h */ /* From https://github.com/endorno/pytorch/blob/master/torch/lib/TH/generic/simd/simd.h @@ -685,7 +674,8 @@ enum instruction_set { AVX512CD = 0x2000, AVX512BW = 0x4000, AVX512VL = 0x8000, - AVX512VBMI2 = 0x10000 + AVX512VBMI2 = 0x10000, + AVX512VPOPCNTDQ = 0x2000 }; #if defined(__PPC64__) @@ -840,6 +830,9 @@ static inline uint32_t detect_supported_architectures() { if (ecx & cpuid_bit::ecx::avx512vbmi2) { host_isa |= instruction_set::AVX512VBMI2; } + if (ecx & cpuid_bit::ecx::avx512vpopcnt) { + host_isa |= instruction_set::AVX512VPOPCNTDQ; + } return host_isa; } #else // fallback @@ -892,7 +885,6 @@ simdutf_really_inline simdutf_warn_unused int detect_encodings(const uint8_t * i return detect_encodings(reinterpret_cast(input), length); } - /** * Validate the UTF-8 string. This function may be best when you expect * the input to be almost always valid. Otherwise, consider using @@ -913,7 +905,7 @@ simdutf_warn_unused bool validate_utf8(const char *buf, size_t len) noexcept; * * @param buf the UTF-8 string to validate. * @param len the length of the string in bytes. - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused result validate_utf8_with_errors(const char *buf, size_t len) noexcept; @@ -936,7 +928,7 @@ simdutf_warn_unused bool validate_ascii(const char *buf, size_t len) noexcept; * * @param buf the ASCII string to validate. * @param len the length of the string in bytes. - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused result validate_ascii_with_errors(const char *buf, size_t len) noexcept; @@ -950,7 +942,7 @@ simdutf_warn_unused result validate_ascii_with_errors(const char *buf, size_t le * This function is not BOM-aware. * * @param buf the UTF-16 string to validate. - * @param len the length of the string in number of 2-byte words (char16_t). + * @param len the length of the string in number of 2-byte code units (char16_t). * @return true if and only if the string is valid UTF-16. */ simdutf_warn_unused bool validate_utf16(const char16_t *buf, size_t len) noexcept; @@ -965,7 +957,7 @@ simdutf_warn_unused bool validate_utf16(const char16_t *buf, size_t len) noexcep * This function is not BOM-aware. * * @param buf the UTF-16LE string to validate. - * @param len the length of the string in number of 2-byte words (char16_t). + * @param len the length of the string in number of 2-byte code units (char16_t). * @return true if and only if the string is valid UTF-16LE. */ simdutf_warn_unused bool validate_utf16le(const char16_t *buf, size_t len) noexcept; @@ -980,7 +972,7 @@ simdutf_warn_unused bool validate_utf16le(const char16_t *buf, size_t len) noexc * This function is not BOM-aware. * * @param buf the UTF-16BE string to validate. - * @param len the length of the string in number of 2-byte words (char16_t). + * @param len the length of the string in number of 2-byte code units (char16_t). * @return true if and only if the string is valid UTF-16BE. */ simdutf_warn_unused bool validate_utf16be(const char16_t *buf, size_t len) noexcept; @@ -994,8 +986,8 @@ simdutf_warn_unused bool validate_utf16be(const char16_t *buf, size_t len) noexc * This function is not BOM-aware. * * @param buf the UTF-16 string to validate. - * @param len the length of the string in number of 2-byte words (char16_t). - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @param len the length of the string in number of 2-byte code units (char16_t). + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused result validate_utf16_with_errors(const char16_t *buf, size_t len) noexcept; @@ -1008,8 +1000,8 @@ simdutf_warn_unused result validate_utf16_with_errors(const char16_t *buf, size_ * This function is not BOM-aware. * * @param buf the UTF-16LE string to validate. - * @param len the length of the string in number of 2-byte words (char16_t). - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @param len the length of the string in number of 2-byte code units (char16_t). + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused result validate_utf16le_with_errors(const char16_t *buf, size_t len) noexcept; @@ -1022,8 +1014,8 @@ simdutf_warn_unused result validate_utf16le_with_errors(const char16_t *buf, siz * This function is not BOM-aware. * * @param buf the UTF-16BE string to validate. - * @param len the length of the string in number of 2-byte words (char16_t). - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @param len the length of the string in number of 2-byte code units (char16_t). + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused result validate_utf16be_with_errors(const char16_t *buf, size_t len) noexcept; @@ -1037,7 +1029,7 @@ simdutf_warn_unused result validate_utf16be_with_errors(const char16_t *buf, siz * This function is not BOM-aware. * * @param buf the UTF-32 string to validate. - * @param len the length of the string in number of 4-byte words (char32_t). + * @param len the length of the string in number of 4-byte code units (char32_t). * @return true if and only if the string is valid UTF-32. */ simdutf_warn_unused bool validate_utf32(const char32_t *buf, size_t len) noexcept; @@ -1051,13 +1043,75 @@ simdutf_warn_unused bool validate_utf32(const char32_t *buf, size_t len) noexcep * This function is not BOM-aware. * * @param buf the UTF-32 string to validate. - * @param len the length of the string in number of 4-byte words (char32_t). - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @param len the length of the string in number of 4-byte code units (char32_t). + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused result validate_utf32_with_errors(const char32_t *buf, size_t len) noexcept; + /** + * Convert Latin1 string into UTF8 string. + * + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the Latin1 string to convert + * @param length the length of the string in bytes + * @param latin1_output the pointer to buffer that can hold conversion result + * @return the number of written char; 0 if conversion is not possible + */ + simdutf_warn_unused size_t convert_latin1_to_utf8(const char * input, size_t length, char* utf8_output) noexcept; + + + /** + * Convert possibly Latin1 string into UTF-16LE string. + * + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the Latin1 string to convert + * @param length the length of the string in bytes + * @param utf16_buffer the pointer to buffer that can hold conversion result + * @return the number of written char16_t; 0 if conversion is not possible + */ + simdutf_warn_unused size_t convert_latin1_to_utf16le(const char * input, size_t length, char16_t* utf16_output) noexcept; + + /** + * Convert Latin1 string into UTF-16BE string. + * + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the Latin1 string to convert + * @param length the length of the string in bytes + * @param utf16_buffer the pointer to buffer that can hold conversion result + * @return the number of written char16_t; 0 if conversion is not possible + */ + simdutf_warn_unused size_t convert_latin1_to_utf16be(const char * input, size_t length, char16_t* utf16_output) noexcept; + + /** + * Convert Latin1 string into UTF-32 string. + * + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the Latin1 string to convert + * @param length the length of the string in bytes + * @param utf32_buffer the pointer to buffer that can hold conversion result + * @return the number of written char32_t; 0 if conversion is not possible + */ + simdutf_warn_unused size_t convert_latin1_to_utf32(const char * input, size_t length, char32_t* utf32_buffer) noexcept; + + /** + * Convert possibly broken UTF-8 string into latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the UTF-8 string to convert + * @param length the length of the string in bytes + * @param latin1_output the pointer to buffer that can hold conversion result + * @return the number of written char; 0 if the input was not valid UTF-8 string + */ + simdutf_warn_unused size_t convert_utf8_to_latin1(const char * input, size_t length, char* latin1_output) noexcept; + /** - * Using native endianness; Convert possibly broken UTF-8 string into UTF-16 string. + * Using native endianness, convert possibly broken UTF-8 string into a UTF-16 string. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -1069,6 +1123,17 @@ simdutf_warn_unused result validate_utf32_with_errors(const char32_t *buf, size_ */ simdutf_warn_unused size_t convert_utf8_to_utf16(const char * input, size_t length, char16_t* utf16_output) noexcept; + +/** + * Using native endianness, convert a Latin1 string into a UTF-16 string. + * + * @param input the UTF-8 string to convert + * @param length the length of the string in bytes + * @param utf16_buffer the pointer to buffer that can hold conversion result + * @return the number of written char16_t. + */ +simdutf_warn_unused size_t convert_latin1_to_utf16(const char * input, size_t length, char16_t* utf16_output) noexcept; + /** * Convert possibly broken UTF-8 string into UTF-16LE string. * @@ -1095,8 +1160,22 @@ simdutf_warn_unused size_t convert_utf8_to_utf16le(const char * input, size_t le */ simdutf_warn_unused size_t convert_utf8_to_utf16be(const char * input, size_t length, char16_t* utf16_output) noexcept; + + /** + * Convert possibly broken UTF-8 string into latin1 string with errors. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the UTF-8 string to convert + * @param length the length of the string in bytes + * @param latin1_output the pointer to buffer that can hold conversion result + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. + */ + simdutf_warn_unused result convert_utf8_to_latin1_with_errors(const char * input, size_t length, char* latin1_output) noexcept; + /** - * Using native endianness; Convert possibly broken UTF-8 string into UTF-16 + * Using native endianness, convert possibly broken UTF-8 string into UTF-16 * string and stop on error. * * During the conversion also validation of the input string is done. @@ -1105,7 +1184,7 @@ simdutf_warn_unused size_t convert_utf8_to_utf16be(const char * input, size_t le * @param input the UTF-8 string to convert * @param length the length of the string in bytes * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char16_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char16_t written if successful. */ simdutf_warn_unused result convert_utf8_to_utf16_with_errors(const char * input, size_t length, char16_t* utf16_output) noexcept; @@ -1118,7 +1197,7 @@ simdutf_warn_unused result convert_utf8_to_utf16_with_errors(const char * input, * @param input the UTF-8 string to convert * @param length the length of the string in bytes * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char16_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char16_t written if successful. */ simdutf_warn_unused result convert_utf8_to_utf16le_with_errors(const char * input, size_t length, char16_t* utf16_output) noexcept; @@ -1131,7 +1210,7 @@ simdutf_warn_unused result convert_utf8_to_utf16le_with_errors(const char * inpu * @param input the UTF-8 string to convert * @param length the length of the string in bytes * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char16_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char16_t written if successful. */ simdutf_warn_unused result convert_utf8_to_utf16be_with_errors(const char * input, size_t length, char16_t* utf16_output) noexcept; @@ -1157,12 +1236,27 @@ simdutf_warn_unused size_t convert_utf8_to_utf32(const char * input, size_t leng * @param input the UTF-8 string to convert * @param length the length of the string in bytes * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char32_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char32_t written if successful. */ simdutf_warn_unused result convert_utf8_to_utf32_with_errors(const char * input, size_t length, char32_t* utf32_output) noexcept; + /** + * Convert valid UTF-8 string into latin1 string. + * + * This function assumes that the input string is valid UTF-8. + * + * This function is not BOM-aware. + * + * @param input the UTF-8 string to convert + * @param length the length of the string in bytes + * @param latin1_output the pointer to buffer that can hold conversion result + * @return the number of written char; 0 if the input was not valid UTF-8 string + */ + simdutf_warn_unused size_t convert_valid_utf8_to_latin1(const char * input, size_t length, char* latin1_output) noexcept; + + /** - * Using native endianness; Convert valid UTF-8 string into UTF-16 string. + * Using native endianness, convert valid UTF-8 string into a UTF-16 string. * * This function assumes that the input string is valid UTF-8. * @@ -1209,8 +1303,31 @@ simdutf_warn_unused size_t convert_valid_utf8_to_utf16be(const char * input, siz */ simdutf_warn_unused size_t convert_valid_utf8_to_utf32(const char * input, size_t length, char32_t* utf32_buffer) noexcept; + +/** + * Return the number of bytes that this Latin1 string would require in UTF-8 format. + * + * @param input the Latin1 string to convert + * @param length the length of the string bytes + * @return the number of bytes required to encode the Latin1 string as UTF-8 + */ +simdutf_warn_unused size_t utf8_length_from_latin1(const char * input, size_t length) noexcept; + /** - * Compute the number of 2-byte words that this UTF-8 string would require in UTF-16LE format. + * Compute the number of bytes that this UTF-8 string would require in Latin1 format. + * + * This function does not validate the input. + * + * This function is not BOM-aware. + * + * @param input the UTF-8 string to convert + * @param length the length of the string in byte + * @return the number of bytes required to encode the UTF-8 string as Latin1 + */ +simdutf_warn_unused size_t latin1_length_from_utf8(const char * input, size_t length) noexcept; + +/** + * Compute the number of 2-byte code units that this UTF-8 string would require in UTF-16LE format. * * This function does not validate the input. * @@ -1218,12 +1335,12 @@ simdutf_warn_unused size_t convert_valid_utf8_to_utf32(const char * input, size_ * * @param input the UTF-8 string to process * @param length the length of the string in bytes - * @return the number of char16_t words required to encode the UTF-8 string as UTF-16LE + * @return the number of char16_t code units required to encode the UTF-8 string as UTF-16LE */ simdutf_warn_unused size_t utf16_length_from_utf8(const char * input, size_t length) noexcept; /** - * Compute the number of 4-byte words that this UTF-8 string would require in UTF-32 format. + * Compute the number of 4-byte code units that this UTF-8 string would require in UTF-32 format. * * This function is equivalent to count_utf8 * @@ -1233,12 +1350,12 @@ simdutf_warn_unused size_t utf16_length_from_utf8(const char * input, size_t len * * @param input the UTF-8 string to process * @param length the length of the string in bytes - * @return the number of char32_t words required to encode the UTF-8 string as UTF-32 + * @return the number of char32_t code units required to encode the UTF-8 string as UTF-32 */ simdutf_warn_unused size_t utf32_length_from_utf8(const char * input, size_t length) noexcept; /** - * Using native endianness; Convert possibly broken UTF-16 string into UTF-8 string. + * Using native endianness, convert possibly broken UTF-16 string into UTF-8 string. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -1246,12 +1363,60 @@ simdutf_warn_unused size_t utf32_length_from_utf8(const char * input, size_t len * This function is not BOM-aware. * * @param input the UTF-16 string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-16LE string + * @return number of written code units; 0 if input is not a valid UTF-16LE string */ simdutf_warn_unused size_t convert_utf16_to_utf8(const char16_t * input, size_t length, char* utf8_buffer) noexcept; + + +/** + * Using native endianness, convert possibly broken UTF-16 string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * This function is not BOM-aware. + * + * @param input the UTF-16 string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return number of written code units; 0 if input is not a valid UTF-16LE string + */ +simdutf_warn_unused size_t convert_utf16_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) noexcept; + +/** + * Convert possibly broken UTF-16LE string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * This function is not BOM-aware. + * + * @param input the UTF-16LE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return number of written code units; 0 if input is not a valid UTF-16LE string + */ +simdutf_warn_unused size_t convert_utf16le_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) noexcept; + +/** + * Convert possibly broken UTF-16BE string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * This function is not BOM-aware. + * + * @param input the UTF-16BE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. + */ +simdutf_warn_unused size_t convert_utf16be_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) noexcept; + + /** * Convert possibly broken UTF-16LE string into UTF-8 string. * @@ -1261,9 +1426,9 @@ simdutf_warn_unused size_t convert_utf16_to_utf8(const char16_t * input, size_t * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-16LE string + * @return number of written code units; 0 if input is not a valid UTF-16LE string */ simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t * input, size_t length, char* utf8_buffer) noexcept; @@ -1276,14 +1441,57 @@ simdutf_warn_unused size_t convert_utf16le_to_utf8(const char16_t * input, size_ * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-16LE string + * @return number of written code units; 0 if input is not a valid UTF-16LE string */ simdutf_warn_unused size_t convert_utf16be_to_utf8(const char16_t * input, size_t length, char* utf8_buffer) noexcept; /** - * Using native endianness; Convert possibly broken UTF-16 string into UTF-8 string and stop on error. + * Using native endianness, convert possibly broken UTF-16 string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * This function is not BOM-aware. + * + * @param input the UTF-16 string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. + */ +simdutf_warn_unused result convert_utf16_to_latin1_with_errors(const char16_t * input, size_t length, char* latin1_buffer) noexcept; + +/** + * Convert possibly broken UTF-16LE string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * This function is not BOM-aware. + * + * @param input the UTF-16LE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. + */ +simdutf_warn_unused result convert_utf16le_to_latin1_with_errors(const char16_t * input, size_t length, char* latin1_buffer) noexcept; + +/** + * Convert possibly broken UTF-16BE string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * This function is not BOM-aware. + * + * @param input the UTF-16BE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. + */ +simdutf_warn_unused result convert_utf16be_to_latin1_with_errors(const char16_t * input, size_t length, char* latin1_buffer) noexcept; + + +/** + * Using native endianness, convert possibly broken UTF-16 string into UTF-8 string and stop on error. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -1291,9 +1499,9 @@ simdutf_warn_unused size_t convert_utf16be_to_utf8(const char16_t * input, size_ * This function is not BOM-aware. * * @param input the UTF-16 string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. */ simdutf_warn_unused result convert_utf16_to_utf8_with_errors(const char16_t * input, size_t length, char* utf8_buffer) noexcept; @@ -1306,9 +1514,9 @@ simdutf_warn_unused result convert_utf16_to_utf8_with_errors(const char16_t * in * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. */ simdutf_warn_unused result convert_utf16le_to_utf8_with_errors(const char16_t * input, size_t length, char* utf8_buffer) noexcept; @@ -1321,26 +1529,70 @@ simdutf_warn_unused result convert_utf16le_to_utf8_with_errors(const char16_t * * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. */ simdutf_warn_unused result convert_utf16be_to_utf8_with_errors(const char16_t * input, size_t length, char* utf8_buffer) noexcept; /** - * Using native endianness; Convert valid UTF-16 string into UTF-8 string. + * Using native endianness, convert valid UTF-16 string into UTF-8 string. * * This function assumes that the input string is valid UTF-16LE. * * This function is not BOM-aware. * * @param input the UTF-16 string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused size_t convert_valid_utf16_to_utf8(const char16_t * input, size_t length, char* utf8_buffer) noexcept; + +/** + * Using native endianness, convert UTF-16 string into Latin1 string. + * + * This function assumes that the input string is valid UTF-8. + * + * This function is not BOM-aware. + * + * @param input the UTF-16 string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return number of written code units; 0 if conversion is not possible + */ +simdutf_warn_unused size_t convert_valid_utf16_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) noexcept; + +/** + * Convert valid UTF-16LE string into Latin1 string. + * + * This function assumes that the input string is valid UTF-16LE. + * + * This function is not BOM-aware. + * + * @param input the UTF-16LE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return number of written code units; 0 if conversion is not possible + */ +simdutf_warn_unused size_t convert_valid_utf16le_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) noexcept; + +/** + * Convert valid UTF-16BE string into Latin1 string. + * + * This function assumes that the input string is valid UTF-16BE. + * + * This function is not BOM-aware. + * + * @param input the UTF-16BE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return number of written code units; 0 if conversion is not possible + */ +simdutf_warn_unused size_t convert_valid_utf16be_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) noexcept; + + /** * Convert valid UTF-16LE string into UTF-8 string. * @@ -1349,9 +1601,9 @@ simdutf_warn_unused size_t convert_valid_utf16_to_utf8(const char16_t * input, s * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused size_t convert_valid_utf16le_to_utf8(const char16_t * input, size_t length, char* utf8_buffer) noexcept; @@ -1363,14 +1615,14 @@ simdutf_warn_unused size_t convert_valid_utf16le_to_utf8(const char16_t * input, * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused size_t convert_valid_utf16be_to_utf8(const char16_t * input, size_t length, char* utf8_buffer) noexcept; /** - * Using native endianness; Convert possibly broken UTF-16 string into UTF-32 string. + * Using native endianness, convert possibly broken UTF-16 string into UTF-32 string. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -1378,9 +1630,9 @@ simdutf_warn_unused size_t convert_valid_utf16be_to_utf8(const char16_t * input, * This function is not BOM-aware. * * @param input the UTF-16 string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-16LE string + * @return number of written code units; 0 if input is not a valid UTF-16LE string */ simdutf_warn_unused size_t convert_utf16_to_utf32(const char16_t * input, size_t length, char32_t* utf32_buffer) noexcept; @@ -1393,9 +1645,9 @@ simdutf_warn_unused size_t convert_utf16_to_utf32(const char16_t * input, size_t * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-16LE string + * @return number of written code units; 0 if input is not a valid UTF-16LE string */ simdutf_warn_unused size_t convert_utf16le_to_utf32(const char16_t * input, size_t length, char32_t* utf32_buffer) noexcept; @@ -1408,14 +1660,14 @@ simdutf_warn_unused size_t convert_utf16le_to_utf32(const char16_t * input, size * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-16LE string + * @return number of written code units; 0 if input is not a valid UTF-16LE string */ simdutf_warn_unused size_t convert_utf16be_to_utf32(const char16_t * input, size_t length, char32_t* utf32_buffer) noexcept; /** - * Using native endianness; Convert possibly broken UTF-16 string into + * Using native endianness, convert possibly broken UTF-16 string into * UTF-32 string and stop on error. * * During the conversion also validation of the input string is done. @@ -1424,9 +1676,9 @@ simdutf_warn_unused size_t convert_utf16be_to_utf32(const char16_t * input, size * This function is not BOM-aware. * * @param input the UTF-16 string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char32_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char32_t written if successful. */ simdutf_warn_unused result convert_utf16_to_utf32_with_errors(const char16_t * input, size_t length, char32_t* utf32_buffer) noexcept; @@ -1439,9 +1691,9 @@ simdutf_warn_unused result convert_utf16_to_utf32_with_errors(const char16_t * i * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char32_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char32_t written if successful. */ simdutf_warn_unused result convert_utf16le_to_utf32_with_errors(const char16_t * input, size_t length, char32_t* utf32_buffer) noexcept; @@ -1454,23 +1706,23 @@ simdutf_warn_unused result convert_utf16le_to_utf32_with_errors(const char16_t * * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char32_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char32_t written if successful. */ simdutf_warn_unused result convert_utf16be_to_utf32_with_errors(const char16_t * input, size_t length, char32_t* utf32_buffer) noexcept; /** - * Using native endianness; Convert valid UTF-16 string into UTF-32 string. + * Using native endianness, convert valid UTF-16 string into UTF-32 string. * * This function assumes that the input string is valid UTF-16 (native endianness). * * This function is not BOM-aware. * * @param input the UTF-16 string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused size_t convert_valid_utf16_to_utf32(const char16_t * input, size_t length, char32_t* utf32_buffer) noexcept; @@ -1482,9 +1734,9 @@ simdutf_warn_unused size_t convert_valid_utf16_to_utf32(const char16_t * input, * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused size_t convert_valid_utf16le_to_utf32(const char16_t * input, size_t length, char32_t* utf32_buffer) noexcept; @@ -1496,12 +1748,26 @@ simdutf_warn_unused size_t convert_valid_utf16le_to_utf32(const char16_t * input * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused size_t convert_valid_utf16be_to_utf32(const char16_t * input, size_t length, char32_t* utf32_buffer) noexcept; + +/* + * Compute the number of bytes that this UTF-16LE/BE string would require in Latin1 format. + * + * This function does not validate the input. + * + * This function is not BOM-aware. + * + * @param length the length of the string in 2-byte code units (char16_t) + * @return the number of bytes required to encode the UTF-16LE string as Latin1 + */ +simdutf_warn_unused size_t latin1_length_from_utf16(size_t length) noexcept; + + /** * Using native endianness; Compute the number of bytes that this UTF-16 * string would require in UTF-8 format. @@ -1509,7 +1775,7 @@ simdutf_warn_unused size_t convert_valid_utf16be_to_utf32(const char16_t * input * This function does not validate the input. * * @param input the UTF-16 string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return the number of bytes required to encode the UTF-16LE string as UTF-8 */ simdutf_warn_unused size_t utf8_length_from_utf16(const char16_t * input, size_t length) noexcept; @@ -1520,7 +1786,7 @@ simdutf_warn_unused size_t utf8_length_from_utf16(const char16_t * input, size_t * This function does not validate the input. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return the number of bytes required to encode the UTF-16LE string as UTF-8 */ simdutf_warn_unused size_t utf8_length_from_utf16le(const char16_t * input, size_t length) noexcept; @@ -1531,7 +1797,7 @@ simdutf_warn_unused size_t utf8_length_from_utf16le(const char16_t * input, size * This function does not validate the input. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return the number of bytes required to encode the UTF-16BE string as UTF-8 */ simdutf_warn_unused size_t utf8_length_from_utf16be(const char16_t * input, size_t length) noexcept; @@ -1545,9 +1811,9 @@ simdutf_warn_unused size_t utf8_length_from_utf16be(const char16_t * input, size * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-32 string + * @return number of written code units; 0 if input is not a valid UTF-32 string */ simdutf_warn_unused size_t convert_utf32_to_utf8(const char32_t * input, size_t length, char* utf8_buffer) noexcept; @@ -1560,9 +1826,9 @@ simdutf_warn_unused size_t convert_utf32_to_utf8(const char32_t * input, size_t * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. */ simdutf_warn_unused result convert_utf32_to_utf8_with_errors(const char32_t * input, size_t length, char* utf8_buffer) noexcept; @@ -1574,14 +1840,14 @@ simdutf_warn_unused result convert_utf32_to_utf8_with_errors(const char32_t * in * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf8_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused size_t convert_valid_utf32_to_utf8(const char32_t * input, size_t length, char* utf8_buffer) noexcept; /** - * Using native endianness; Convert possibly broken UTF-32 string into UTF-16 string. + * Using native endianness, convert possibly broken UTF-32 string into a UTF-16 string. * * During the conversion also validation of the input string is done. * This function is suitable to work with inputs from untrusted sources. @@ -1589,9 +1855,9 @@ simdutf_warn_unused size_t convert_valid_utf32_to_utf8(const char32_t * input, s * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-32 string + * @return number of written code units; 0 if input is not a valid UTF-32 string */ simdutf_warn_unused size_t convert_utf32_to_utf16(const char32_t * input, size_t length, char16_t* utf16_buffer) noexcept; @@ -1604,12 +1870,57 @@ simdutf_warn_unused size_t convert_utf32_to_utf16(const char32_t * input, size_t * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-32 string + * @return number of written code units; 0 if input is not a valid UTF-32 string */ simdutf_warn_unused size_t convert_utf32_to_utf16le(const char32_t * input, size_t length, char16_t* utf16_buffer) noexcept; +/** + * Convert possibly broken UTF-32 string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * This function is not BOM-aware. + * + * @param input the UTF-32 string to convert + * @param length the length of the string in 4-byte code units (char32_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return number of written code units; 0 if input is not a valid UTF-32 string + */ +simdutf_warn_unused size_t convert_utf32_to_latin1(const char32_t * input, size_t length, char* latin1_buffer) noexcept; + + +/** + * Convert possibly broken UTF-32 string into Latin1 string and stop on error. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * This function is not BOM-aware. + * + * @param input the UTF-32 string to convert + * @param length the length of the string in 4-byte code units (char32_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. + */ +simdutf_warn_unused result convert_utf32_to_latin1_with_errors(const char32_t * input, size_t length, char* latin1_buffer) noexcept; + +/** + * Convert valid UTF-32 string into Latin1 string. + * + * This function assumes that the input string is valid UTF-32. + * + * This function is not BOM-aware. + * + * @param input the UTF-32 string to convert + * @param length the length of the string in 4-byte code units (char32_t) + * @param latin1_buffer the pointer to buffer that can hold the conversion result + * @return number of written code units; 0 if conversion is not possible + */ +simdutf_warn_unused size_t convert_valid_utf32_to_latin1(const char32_t * input, size_t length, char* latin1_buffer) noexcept; + /** * Convert possibly broken UTF-32 string into UTF-16BE string. * @@ -1619,14 +1930,14 @@ simdutf_warn_unused size_t convert_utf32_to_utf16le(const char32_t * input, size * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-32 string + * @return number of written code units; 0 if input is not a valid UTF-32 string */ simdutf_warn_unused size_t convert_utf32_to_utf16be(const char32_t * input, size_t length, char16_t* utf16_buffer) noexcept; /** - * Using native endianness; Convert possibly broken UTF-32 string into UTF-16 + * Using native endianness, convert possibly broken UTF-32 string into UTF-16 * string and stop on error. * * During the conversion also validation of the input string is done. @@ -1635,9 +1946,9 @@ simdutf_warn_unused size_t convert_utf32_to_utf16be(const char32_t * input, size * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char16_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char16_t written if successful. */ simdutf_warn_unused result convert_utf32_to_utf16_with_errors(const char32_t * input, size_t length, char16_t* utf16_buffer) noexcept; @@ -1650,9 +1961,9 @@ simdutf_warn_unused result convert_utf32_to_utf16_with_errors(const char32_t * i * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char16_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char16_t written if successful. */ simdutf_warn_unused result convert_utf32_to_utf16le_with_errors(const char32_t * input, size_t length, char16_t* utf16_buffer) noexcept; @@ -1665,23 +1976,23 @@ simdutf_warn_unused result convert_utf32_to_utf16le_with_errors(const char32_t * * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char16_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char16_t written if successful. */ simdutf_warn_unused result convert_utf32_to_utf16be_with_errors(const char32_t * input, size_t length, char16_t* utf16_buffer) noexcept; /** - * Using native endianness; Convert valid UTF-32 string into UTF-16 string. + * Using native endianness, convert valid UTF-32 string into a UTF-16 string. * * This function assumes that the input string is valid UTF-32. * * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused size_t convert_valid_utf32_to_utf16(const char32_t * input, size_t length, char16_t* utf16_buffer) noexcept; @@ -1693,9 +2004,9 @@ simdutf_warn_unused size_t convert_valid_utf32_to_utf16(const char32_t * input, * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused size_t convert_valid_utf32_to_utf16le(const char32_t * input, size_t length, char16_t* utf16_buffer) noexcept; @@ -1707,9 +2018,9 @@ simdutf_warn_unused size_t convert_valid_utf32_to_utf16le(const char32_t * input * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused size_t convert_valid_utf32_to_utf16be(const char32_t * input, size_t length, char16_t* utf16_buffer) noexcept; @@ -1722,7 +2033,7 @@ simdutf_warn_unused size_t convert_valid_utf32_to_utf16be(const char32_t * input * This function is not BOM-aware. * * @param input the UTF-16 string to process - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param output the pointer to buffer that can hold the conversion result */ void change_endianness_utf16(const char16_t * input, size_t length, char16_t * output) noexcept; @@ -1733,18 +2044,18 @@ void change_endianness_utf16(const char16_t * input, size_t length, char16_t * o * This function does not validate the input. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @return the number of bytes required to encode the UTF-32 string as UTF-8 */ simdutf_warn_unused size_t utf8_length_from_utf32(const char32_t * input, size_t length) noexcept; /** - * Compute the number of two-byte words that this UTF-32 string would require in UTF-16 format. + * Compute the number of two-byte code units that this UTF-32 string would require in UTF-16 format. * * This function does not validate the input. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @return the number of bytes required to encode the UTF-32 string as UTF-16 */ simdutf_warn_unused size_t utf16_length_from_utf32(const char32_t * input, size_t length) noexcept; @@ -1760,7 +2071,7 @@ simdutf_warn_unused size_t utf16_length_from_utf32(const char32_t * input, size_ * This function is not BOM-aware. * * @param input the UTF-16 string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return the number of bytes required to encode the UTF-16LE string as UTF-32 */ simdutf_warn_unused size_t utf32_length_from_utf16(const char16_t * input, size_t length) noexcept; @@ -1775,7 +2086,7 @@ simdutf_warn_unused size_t utf32_length_from_utf16(const char16_t * input, size_ * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return the number of bytes required to encode the UTF-16LE string as UTF-32 */ simdutf_warn_unused size_t utf32_length_from_utf16le(const char16_t * input, size_t length) noexcept; @@ -1790,7 +2101,7 @@ simdutf_warn_unused size_t utf32_length_from_utf16le(const char16_t * input, siz * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return the number of bytes required to encode the UTF-16BE string as UTF-32 */ simdutf_warn_unused size_t utf32_length_from_utf16be(const char16_t * input, size_t length) noexcept; @@ -1804,7 +2115,7 @@ simdutf_warn_unused size_t utf32_length_from_utf16be(const char16_t * input, siz * This function is not BOM-aware. * * @param input the UTF-16 string to process - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return number of code points */ simdutf_warn_unused size_t count_utf16(const char16_t * input, size_t length) noexcept; @@ -1818,7 +2129,7 @@ simdutf_warn_unused size_t count_utf16(const char16_t * input, size_t length) no * This function is not BOM-aware. * * @param input the UTF-16LE string to process - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return number of code points */ simdutf_warn_unused size_t count_utf16le(const char16_t * input, size_t length) noexcept; @@ -1832,7 +2143,7 @@ simdutf_warn_unused size_t count_utf16le(const char16_t * input, size_t length) * This function is not BOM-aware. * * @param input the UTF-16BE string to process - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return number of code points */ simdutf_warn_unused size_t count_utf16be(const char16_t * input, size_t length) noexcept; @@ -1849,6 +2160,68 @@ simdutf_warn_unused size_t count_utf16be(const char16_t * input, size_t length) */ simdutf_warn_unused size_t count_utf8(const char * input, size_t length) noexcept; +/** + * Given a valid UTF-8 string having a possibly truncated last character, + * this function checks the end of string. If the last character is truncated (or partial), + * then it returns a shorter length (shorter by 1 to 3 bytes) so that the short UTF-8 + * strings only contain complete characters. If there is no truncated character, + * the original length is returned. + * + * This function assumes that the input string is valid UTF-8, but possibly truncated. + * + * @param input the UTF-8 string to process + * @param length the length of the string in bytes + * @return the length of the string in bytes, possibly shorter by 1 to 3 bytes + */ +simdutf_warn_unused size_t trim_partial_utf8(const char *input, size_t length); + +/** + * Given a valid UTF-16BE string having a possibly truncated last character, + * this function checks the end of string. If the last character is truncated (or partial), + * then it returns a shorter length (shorter by 1 unit) so that the short UTF-16BE + * strings only contain complete characters. If there is no truncated character, + * the original length is returned. + * + * This function assumes that the input string is valid UTF-16BE, but possibly truncated. + * + * @param input the UTF-16BE string to process + * @param length the length of the string in bytes + * @return the length of the string in bytes, possibly shorter by 1 unit + */ +simdutf_warn_unused size_t trim_partial_utf16be(const char16_t* input, size_t length); + +/** + * Given a valid UTF-16LE string having a possibly truncated last character, + * this function checks the end of string. If the last character is truncated (or partial), + * then it returns a shorter length (shorter by 1 unit) so that the short UTF-16LE + * strings only contain complete characters. If there is no truncated character, + * the original length is returned. + * + * This function assumes that the input string is valid UTF-16LE, but possibly truncated. + * + * @param input the UTF-16LE string to process + * @param length the length of the string in bytes + * @return the length of the string in unit, possibly shorter by 1 unit + */ +simdutf_warn_unused size_t trim_partial_utf16le(const char16_t* input, size_t length); + + +/** + * Given a valid UTF-16 string having a possibly truncated last character, + * this function checks the end of string. If the last character is truncated (or partial), + * then it returns a shorter length (shorter by 1 unit) so that the short UTF-16 + * strings only contain complete characters. If there is no truncated character, + * the original length is returned. + * + * This function assumes that the input string is valid UTF-16, but possibly truncated. + * We use the native endianness. + * + * @param input the UTF-16 string to process + * @param length the length of the string in bytes + * @return the length of the string in unit, possibly shorter by 1 unit + */ +simdutf_warn_unused size_t trim_partial_utf16(const char16_t* input, size_t length); + /** * An implementation of simdutf for a particular CPU architecture. * @@ -1932,7 +2305,7 @@ class implementation { * * @param buf the UTF-8 string to validate. * @param len the length of the string in bytes. - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused virtual result validate_utf8_with_errors(const char *buf, size_t len) const noexcept = 0; @@ -1954,7 +2327,7 @@ class implementation { * * @param buf the ASCII string to validate. * @param len the length of the string in bytes. - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused virtual result validate_ascii_with_errors(const char *buf, size_t len) const noexcept = 0; @@ -1968,7 +2341,7 @@ class implementation { * This function is not BOM-aware. * * @param buf the UTF-16LE string to validate. - * @param len the length of the string in number of 2-byte words (char16_t). + * @param len the length of the string in number of 2-byte code units (char16_t). * @return true if and only if the string is valid UTF-16LE. */ simdutf_warn_unused virtual bool validate_utf16le(const char16_t *buf, size_t len) const noexcept = 0; @@ -1983,7 +2356,7 @@ class implementation { * This function is not BOM-aware. * * @param buf the UTF-16BE string to validate. - * @param len the length of the string in number of 2-byte words (char16_t). + * @param len the length of the string in number of 2-byte code units (char16_t). * @return true if and only if the string is valid UTF-16BE. */ simdutf_warn_unused virtual bool validate_utf16be(const char16_t *buf, size_t len) const noexcept = 0; @@ -1997,8 +2370,8 @@ class implementation { * This function is not BOM-aware. * * @param buf the UTF-16LE string to validate. - * @param len the length of the string in number of 2-byte words (char16_t). - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @param len the length of the string in number of 2-byte code units (char16_t). + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused virtual result validate_utf16le_with_errors(const char16_t *buf, size_t len) const noexcept = 0; @@ -2011,8 +2384,8 @@ class implementation { * This function is not BOM-aware. * * @param buf the UTF-16BE string to validate. - * @param len the length of the string in number of 2-byte words (char16_t). - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @param len the length of the string in number of 2-byte code units (char16_t). + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused virtual result validate_utf16be_with_errors(const char16_t *buf, size_t len) const noexcept = 0; @@ -2024,7 +2397,7 @@ class implementation { * This function is not BOM-aware. * * @param buf the UTF-32 string to validate. - * @param len the length of the string in number of 4-byte words (char32_t). + * @param len the length of the string in number of 4-byte code units (char32_t). * @return true if and only if the string is valid UTF-32. */ simdutf_warn_unused virtual bool validate_utf32(const char32_t *buf, size_t len) const noexcept = 0; @@ -2037,11 +2410,101 @@ class implementation { * This function is not BOM-aware. * * @param buf the UTF-32 string to validate. - * @param len the length of the string in number of 4-byte words (char32_t). - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @param len the length of the string in number of 4-byte code units (char32_t). + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused virtual result validate_utf32_with_errors(const char32_t *buf, size_t len) const noexcept = 0; + /** + * Convert Latin1 string into UTF8 string. + * + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the Latin1 string to convert + * @param length the length of the string in bytes + * @param latin1_output the pointer to buffer that can hold conversion result + * @return the number of written char; 0 if conversion is not possible + */ + simdutf_warn_unused virtual size_t convert_latin1_to_utf8(const char * input, size_t length, char* utf8_output) const noexcept = 0; + + + /** + * Convert possibly Latin1 string into UTF-16LE string. + * + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the Latin1 string to convert + * @param length the length of the string in bytes + * @param utf16_buffer the pointer to buffer that can hold conversion result + * @return the number of written char16_t; 0 if conversion is not possible + */ + simdutf_warn_unused virtual size_t convert_latin1_to_utf16le(const char * input, size_t length, char16_t* utf16_output) const noexcept = 0; + + /** + * Convert Latin1 string into UTF-16BE string. + * + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the Latin1 string to convert + * @param length the length of the string in bytes + * @param utf16_buffer the pointer to buffer that can hold conversion result + * @return the number of written char16_t; 0 if conversion is not possible + */ + simdutf_warn_unused virtual size_t convert_latin1_to_utf16be(const char * input, size_t length, char16_t* utf16_output) const noexcept = 0; + + /** + * Convert Latin1 string into UTF-32 string. + * + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the Latin1 string to convert + * @param length the length of the string in bytes + * @param utf32_buffer the pointer to buffer that can hold conversion result + * @return the number of written char32_t; 0 if conversion is not possible + */ + simdutf_warn_unused virtual size_t convert_latin1_to_utf32(const char * input, size_t length, char32_t* utf32_buffer) const noexcept = 0; + + /** + * Convert possibly broken UTF-8 string into latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the UTF-8 string to convert + * @param length the length of the string in bytes + * @param latin1_output the pointer to buffer that can hold conversion result + * @return the number of written char; 0 if the input was not valid UTF-8 string + */ + simdutf_warn_unused virtual size_t convert_utf8_to_latin1(const char * input, size_t length, char* latin1_output) const noexcept = 0; + + /** + * Convert possibly broken UTF-8 string into latin1 string with errors + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * @param input the UTF-8 string to convert + * @param length the length of the string in bytes + * @param latin1_output the pointer to buffer that can hold conversion result + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. + */ + simdutf_warn_unused virtual result convert_utf8_to_latin1_with_errors(const char * input, size_t length, char* latin1_output) const noexcept = 0; + + /** + * Convert valid UTF-8 string into latin1 string. + * + * This function assumes that the input string is valid UTF-8. + * + * This function is not BOM-aware. + * + * @param input the UTF-8 string to convert + * @param length the length of the string in bytes + * @param latin1_output the pointer to buffer that can hold conversion result + * @return the number of written char; 0 if the input was not valid UTF-8 string + */ + simdutf_warn_unused virtual size_t convert_valid_utf8_to_latin1(const char * input, size_t length, char* latin1_output) const noexcept = 0; + + /** * Convert possibly broken UTF-8 string into UTF-16LE string. * @@ -2077,7 +2540,7 @@ class implementation { * @param input the UTF-8 string to convert * @param length the length of the string in bytes * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused virtual result convert_utf8_to_utf16le_with_errors(const char * input, size_t length, char16_t* utf16_output) const noexcept = 0; @@ -2090,7 +2553,7 @@ class implementation { * @param input the UTF-8 string to convert * @param length the length of the string in bytes * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of words validated if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of code units validated if successful. */ simdutf_warn_unused virtual result convert_utf8_to_utf16be_with_errors(const char * input, size_t length, char16_t* utf16_output) const noexcept = 0; @@ -2116,7 +2579,7 @@ class implementation { * @param input the UTF-8 string to convert * @param length the length of the string in bytes * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char32_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char32_t written if successful. */ simdutf_warn_unused virtual result convert_utf8_to_utf32_with_errors(const char * input, size_t length, char32_t* utf32_output) const noexcept = 0; @@ -2157,18 +2620,18 @@ class implementation { simdutf_warn_unused virtual size_t convert_valid_utf8_to_utf32(const char * input, size_t length, char32_t* utf32_buffer) const noexcept = 0; /** - * Compute the number of 2-byte words that this UTF-8 string would require in UTF-16LE format. + * Compute the number of 2-byte code units that this UTF-8 string would require in UTF-16LE format. * * This function does not validate the input. * * @param input the UTF-8 string to process * @param length the length of the string in bytes - * @return the number of char16_t words required to encode the UTF-8 string as UTF-16LE + * @return the number of char16_t code units required to encode the UTF-8 string as UTF-16LE */ simdutf_warn_unused virtual size_t utf16_length_from_utf8(const char * input, size_t length) const noexcept = 0; /** - * Compute the number of 4-byte words that this UTF-8 string would require in UTF-32 format. + * Compute the number of 4-byte code units that this UTF-8 string would require in UTF-32 format. * * This function is equivalent to count_utf8. * @@ -2176,10 +2639,96 @@ class implementation { * * @param input the UTF-8 string to process * @param length the length of the string in bytes - * @return the number of char32_t words required to encode the UTF-8 string as UTF-32 + * @return the number of char32_t code units required to encode the UTF-8 string as UTF-32 */ simdutf_warn_unused virtual size_t utf32_length_from_utf8(const char * input, size_t length) const noexcept = 0; + /** + * Convert possibly broken UTF-16LE string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * This function is not BOM-aware. + * + * @param input the UTF-16LE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return number of written code units; 0 if input is not a valid UTF-16LE string + */ + simdutf_warn_unused virtual size_t convert_utf16le_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) const noexcept = 0; + + /** + * Convert possibly broken UTF-16BE string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * This function is not BOM-aware. + * + * @param input the UTF-16BE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. + */ + simdutf_warn_unused virtual size_t convert_utf16be_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) const noexcept = 0; + + /** + * Convert possibly broken UTF-16LE string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * This function is not BOM-aware. + * + * @param input the UTF-16LE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. + */ + simdutf_warn_unused virtual result convert_utf16le_to_latin1_with_errors(const char16_t * input, size_t length, char* latin1_buffer) const noexcept = 0; + + /** + * Convert possibly broken UTF-16BE string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * This function is not BOM-aware. + * + * @param input the UTF-16BE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. + */ + simdutf_warn_unused virtual result convert_utf16be_to_latin1_with_errors(const char16_t * input, size_t length, char* latin1_buffer) const noexcept = 0; + + /** + * Convert valid UTF-16LE string into Latin1 string. + * + * This function assumes that the input string is valid UTF-8. + + * This function is not BOM-aware. + * + * @param input the UTF-16LE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return number of written code units; 0 if conversion is not possible + */ + simdutf_warn_unused virtual size_t convert_valid_utf16le_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) const noexcept = 0; + + /** + * Convert valid UTF-16BE string into Latin1 string. + * + * This function assumes that the input string is valid UTF-8. + * + * This function is not BOM-aware. + * + * @param input the UTF-16BE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return number of written code units; 0 if conversion is not possible + */ + simdutf_warn_unused virtual size_t convert_valid_utf16be_to_latin1(const char16_t * input, size_t length, char* latin1_buffer) const noexcept = 0; + /** * Convert possibly broken UTF-16LE string into UTF-8 string. * @@ -2189,9 +2738,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-16LE string + * @return number of written code units; 0 if input is not a valid UTF-16LE string */ simdutf_warn_unused virtual size_t convert_utf16le_to_utf8(const char16_t * input, size_t length, char* utf8_buffer) const noexcept = 0; @@ -2204,9 +2753,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-16BE string + * @return number of written code units; 0 if input is not a valid UTF-16BE string */ simdutf_warn_unused virtual size_t convert_utf16be_to_utf8(const char16_t * input, size_t length, char* utf8_buffer) const noexcept = 0; @@ -2219,9 +2768,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. */ simdutf_warn_unused virtual result convert_utf16le_to_utf8_with_errors(const char16_t * input, size_t length, char* utf8_buffer) const noexcept = 0; @@ -2234,9 +2783,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. */ simdutf_warn_unused virtual result convert_utf16be_to_utf8_with_errors(const char16_t * input, size_t length, char* utf8_buffer) const noexcept = 0; @@ -2248,9 +2797,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused virtual size_t convert_valid_utf16le_to_utf8(const char16_t * input, size_t length, char* utf8_buffer) const noexcept = 0; @@ -2262,9 +2811,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf8_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused virtual size_t convert_valid_utf16be_to_utf8(const char16_t * input, size_t length, char* utf8_buffer) const noexcept = 0; @@ -2277,9 +2826,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-16LE string + * @return number of written code units; 0 if input is not a valid UTF-16LE string */ simdutf_warn_unused virtual size_t convert_utf16le_to_utf32(const char16_t * input, size_t length, char32_t* utf32_buffer) const noexcept = 0; @@ -2292,9 +2841,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-16BE string + * @return number of written code units; 0 if input is not a valid UTF-16BE string */ simdutf_warn_unused virtual size_t convert_utf16be_to_utf32(const char16_t * input, size_t length, char32_t* utf32_buffer) const noexcept = 0; @@ -2307,9 +2856,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char32_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char32_t written if successful. */ simdutf_warn_unused virtual result convert_utf16le_to_utf32_with_errors(const char16_t * input, size_t length, char32_t* utf32_buffer) const noexcept = 0; @@ -2322,9 +2871,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char32_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char32_t written if successful. */ simdutf_warn_unused virtual result convert_utf16be_to_utf32_with_errors(const char16_t * input, size_t length, char32_t* utf32_buffer) const noexcept = 0; @@ -2336,9 +2885,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused virtual size_t convert_valid_utf16le_to_utf32(const char16_t * input, size_t length, char32_t* utf32_buffer) const noexcept = 0; @@ -2350,9 +2899,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param utf32_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused virtual size_t convert_valid_utf16be_to_utf32(const char16_t * input, size_t length, char32_t* utf32_buffer) const noexcept = 0; @@ -2364,7 +2913,7 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return the number of bytes required to encode the UTF-16LE string as UTF-8 */ simdutf_warn_unused virtual size_t utf8_length_from_utf16le(const char16_t * input, size_t length) const noexcept = 0; @@ -2377,11 +2926,57 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return the number of bytes required to encode the UTF-16BE string as UTF-8 */ simdutf_warn_unused virtual size_t utf8_length_from_utf16be(const char16_t * input, size_t length) const noexcept = 0; + /** + * Convert possibly broken UTF-32 string into Latin1 string. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * This function is not BOM-aware. + * + * @param input the UTF-32 string to convert + * @param length the length of the string in 4-byte code units (char32_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return number of written code units; 0 if input is not a valid UTF-32 string + */ + + simdutf_warn_unused virtual size_t convert_utf32_to_latin1(const char32_t * input, size_t length, char* latin1_buffer) const noexcept = 0; + + /** + * Convert possibly broken UTF-32 string into Latin1 string and stop on error. + * + * During the conversion also validation of the input string is done. + * This function is suitable to work with inputs from untrusted sources. + * + * This function is not BOM-aware. + * + * @param input the UTF-32 string to convert + * @param length the length of the string in 4-byte code units (char32_t) + * @param latin1_buffer the pointer to buffer that can hold conversion result + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. + */ + + simdutf_warn_unused virtual result convert_utf32_to_latin1_with_errors(const char32_t * input, size_t length, char* latin1_buffer) const noexcept = 0; + + /** + * Convert valid UTF-32 string into Latin1 string. + * + * This function assumes that the input string is valid UTF-32. + * + * This function is not BOM-aware. + * + * @param input the UTF-32 string to convert + * @param length the length of the string in 4-byte code units (char32_t) + * @param latin1_buffer the pointer to buffer that can hold the conversion result + * @return number of written code units; 0 if conversion is not possible + */ + simdutf_warn_unused virtual size_t convert_valid_utf32_to_latin1(const char32_t * input, size_t length, char* latin1_buffer) const noexcept = 0; + /** * Convert possibly broken UTF-32 string into UTF-8 string. * @@ -2391,9 +2986,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-32 string + * @return number of written code units; 0 if input is not a valid UTF-32 string */ simdutf_warn_unused virtual size_t convert_utf32_to_utf8(const char32_t * input, size_t length, char* utf8_buffer) const noexcept = 0; @@ -2406,9 +3001,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf8_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char written if successful. */ simdutf_warn_unused virtual result convert_utf32_to_utf8_with_errors(const char32_t * input, size_t length, char* utf8_buffer) const noexcept = 0; @@ -2420,12 +3015,23 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf8_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused virtual size_t convert_valid_utf32_to_utf8(const char32_t * input, size_t length, char* utf8_buffer) const noexcept = 0; + + /** + * Return the number of bytes that this UTF-16 string would require in Latin1 format. + * + * + * @param input the UTF-16 string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @return the number of bytes required to encode the UTF-16 string as Latin1 + */ + simdutf_warn_unused virtual size_t utf16_length_from_latin1(size_t length) const noexcept = 0; + /** * Convert possibly broken UTF-32 string into UTF-16LE string. * @@ -2435,9 +3041,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-32 string + * @return number of written code units; 0 if input is not a valid UTF-32 string */ simdutf_warn_unused virtual size_t convert_utf32_to_utf16le(const char32_t * input, size_t length, char16_t* utf16_buffer) const noexcept = 0; @@ -2450,9 +3056,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return number of written words; 0 if input is not a valid UTF-32 string + * @return number of written code units; 0 if input is not a valid UTF-32 string */ simdutf_warn_unused virtual size_t convert_utf32_to_utf16be(const char32_t * input, size_t length, char16_t* utf16_buffer) const noexcept = 0; @@ -2465,9 +3071,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char16_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char16_t written if successful. */ simdutf_warn_unused virtual result convert_utf32_to_utf16le_with_errors(const char32_t * input, size_t length, char16_t* utf16_buffer) const noexcept = 0; @@ -2480,9 +3086,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold conversion result - * @return a result pair struct with an error code and either the position of the error if any or the number of char16_t written if successful. + * @return a result pair struct (of type simdutf::error containing the two fields error and count) with an error code and either position of the error (in the input in code units) if any, or the number of char16_t written if successful. */ simdutf_warn_unused virtual result convert_utf32_to_utf16be_with_errors(const char32_t * input, size_t length, char16_t* utf16_buffer) const noexcept = 0; @@ -2494,9 +3100,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused virtual size_t convert_valid_utf32_to_utf16le(const char32_t * input, size_t length, char16_t* utf16_buffer) const noexcept = 0; @@ -2508,9 +3114,9 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @param utf16_buffer the pointer to buffer that can hold the conversion result - * @return number of written words; 0 if conversion is not possible + * @return number of written code units; 0 if conversion is not possible */ simdutf_warn_unused virtual size_t convert_valid_utf32_to_utf16be(const char32_t * input, size_t length, char16_t* utf16_buffer) const noexcept = 0; @@ -2523,33 +3129,88 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16 string to process - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @param output the pointer to buffer that can hold the conversion result */ virtual void change_endianness_utf16(const char16_t * input, size_t length, char16_t * output) const noexcept = 0; + /** + * Return the number of bytes that this Latin1 string would require in UTF-8 format. + * + * @param input the Latin1 string to convert + * @param length the length of the string bytes + * @return the number of bytes required to encode the Latin1 string as UTF-8 + */ + simdutf_warn_unused virtual size_t utf8_length_from_latin1(const char * input, size_t length) const noexcept = 0; + /** * Compute the number of bytes that this UTF-32 string would require in UTF-8 format. * * This function does not validate the input. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @return the number of bytes required to encode the UTF-32 string as UTF-8 */ simdutf_warn_unused virtual size_t utf8_length_from_utf32(const char32_t * input, size_t length) const noexcept = 0; /** - * Compute the number of two-byte words that this UTF-32 string would require in UTF-16 format. + * Compute the number of bytes that this UTF-32 string would require in Latin1 format. + * + * This function does not validate the input. + * + * @param length the length of the string in 4-byte code units (char32_t) + * @return the number of bytes required to encode the UTF-32 string as Latin1 + */ + simdutf_warn_unused virtual size_t latin1_length_from_utf32(size_t length) const noexcept = 0; + + /** + * Compute the number of bytes that this UTF-8 string would require in Latin1 format. + * + * This function does not validate the input. + * + * @param input the UTF-8 string to convert + * @param length the length of the string in byte + * @return the number of bytes required to encode the UTF-8 string as Latin1 + */ + simdutf_warn_unused virtual size_t latin1_length_from_utf8(const char * input, size_t length) const noexcept = 0; + + /* + * Compute the number of bytes that this UTF-16LE/BE string would require in Latin1 format. + * + * This function does not validate the input. + * + * This function is not BOM-aware. + * + * @param input the UTF-16LE string to convert + * @param length the length of the string in 2-byte code units (char16_t) + * @return the number of bytes required to encode the UTF-16LE string as Latin1 + */ + simdutf_warn_unused virtual size_t latin1_length_from_utf16(size_t length) const noexcept = 0; + + /** + * Compute the number of two-byte code units that this UTF-32 string would require in UTF-16 format. * * This function does not validate the input. * * @param input the UTF-32 string to convert - * @param length the length of the string in 4-byte words (char32_t) + * @param length the length of the string in 4-byte code units (char32_t) * @return the number of bytes required to encode the UTF-32 string as UTF-16 */ simdutf_warn_unused virtual size_t utf16_length_from_utf32(const char32_t * input, size_t length) const noexcept = 0; + + /** + * Return the number of bytes that this UTF-32 string would require in Latin1 format. + * + * This function does not validate the input. + * + * @param input the UTF-32 string to convert + * @param length the length of the string in 4-byte code units (char32_t) + * @return the number of bytes required to encode the UTF-32 string as Latin1 + */ + simdutf_warn_unused virtual size_t utf32_length_from_latin1(size_t length) const noexcept = 0; + /* * Compute the number of bytes that this UTF-16LE string would require in UTF-32 format. * @@ -2560,7 +3221,7 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16LE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return the number of bytes required to encode the UTF-16LE string as UTF-32 */ simdutf_warn_unused virtual size_t utf32_length_from_utf16le(const char16_t * input, size_t length) const noexcept = 0; @@ -2575,7 +3236,7 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16BE string to convert - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return the number of bytes required to encode the UTF-16BE string as UTF-32 */ simdutf_warn_unused virtual size_t utf32_length_from_utf16be(const char16_t * input, size_t length) const noexcept = 0; @@ -2589,7 +3250,7 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16LE string to process - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return number of code points */ simdutf_warn_unused virtual size_t count_utf16le(const char16_t * input, size_t length) const noexcept = 0; @@ -2603,7 +3264,7 @@ class implementation { * This function is not BOM-aware. * * @param input the UTF-16BE string to process - * @param length the length of the string in 2-byte words (char16_t) + * @param length the length of the string in 2-byte code units (char16_t) * @return number of code points */ simdutf_warn_unused virtual size_t count_utf16be(const char16_t * input, size_t length) const noexcept = 0; diff --git a/deps/simdutf/unofficial.gni b/deps/simdutf/unofficial.gni new file mode 100644 index 00000000000000..d623de36312e3e --- /dev/null +++ b/deps/simdutf/unofficial.gni @@ -0,0 +1,37 @@ +# Copyright (c) 2013-2019 GitHub Inc. +# Copyright 2019 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("simdutf_gn_build") { + config("simdutf_config") { + include_dirs = [ "." ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("simdutf.gyp") ], + "scope", + [ "simdutf.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + public_configs = [ ":simdutf_config" ] + sources = gypi_values.simdutf_sources + if (is_clang || !is_win) { + cflags_cc = [ + "-Wno-#pragma-messages", + "-Wno-ambiguous-reversed-operator", + "-Wno-unreachable-code-break", + "-Wno-unused-const-variable", + "-Wno-unused-function", + "-Wno-c++98-compat-extra-semi", + ] + } + } +} diff --git a/deps/undici/src/docs/api/Client.md b/deps/undici/src/docs/api/Client.md index 42668389a94225..b9e26f09752bd5 100644 --- a/deps/undici/src/docs/api/Client.md +++ b/deps/undici/src/docs/api/Client.md @@ -33,7 +33,7 @@ Returns: `Client` * **autoSelectFamily**: `boolean` (optional) - Default: depends on local Node version, on Node 18.13.0 and above is `false`. Enables a family autodetection algorithm that loosely implements section 5 of [RFC 8305](https://tools.ietf.org/html/rfc8305#section-5). See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details. This option is ignored if not supported by the current Node version. * **autoSelectFamilyAttemptTimeout**: `number` - Default: depends on local Node version, on Node 18.13.0 and above is `250`. The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. See [here](https://nodejs.org/api/net.html#socketconnectoptions-connectlistener) for more details. * **allowH2**: `boolean` - Default: `false`. Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation. -* **maxConcurrentStreams**: `number` - Default: `100`. Dictates the maximum number of concurrent streams for a single H2 session. It can be overriden by a SETTINGS remote frame. +* **maxConcurrentStreams**: `number` - Default: `100`. Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. #### Parameter: `ConnectOptions` diff --git a/deps/undici/src/docs/api/MockPool.md b/deps/undici/src/docs/api/MockPool.md index de53914002eca3..96a986f57bb389 100644 --- a/deps/undici/src/docs/api/MockPool.md +++ b/deps/undici/src/docs/api/MockPool.md @@ -35,8 +35,7 @@ const mockPool = mockAgent.get('http://localhost:3000') ### `MockPool.intercept(options)` -This method defines the interception rules for matching against requests for a MockPool or MockPool. We can intercept multiple times on a single instance, but each intercept is only used once. -For example if you expect to make 2 requests inside a test, you need to call `intercept()` twice. Assuming you use `disableNetConnect()` you will get `MockNotMatchedError` on the second request when you only call `intercept()` once. +This method defines the interception rules for matching against requests for a MockPool or MockPool. We can intercept multiple times on a single instance, but each intercept is only used once. For example if you expect to make 2 requests inside a test, you need to call `intercept()` twice. Assuming you use `disableNetConnect()` you will get `MockNotMatchedError` on the second request when you only call `intercept()` once. When defining interception rules, all the rules must pass for a request to be intercepted. If a request is not intercepted, a real request will be attempted. @@ -54,11 +53,11 @@ Returns: `MockInterceptor` corresponding to the input options. ### Parameter: `MockPoolInterceptOptions` -* **path** `string | RegExp | (path: string) => boolean` - a matcher for the HTTP request path. +* **path** `string | RegExp | (path: string) => boolean` - a matcher for the HTTP request path. When a `RegExp` or callback is used, it will match against the request path including all query parameters in alphabetical order. When a `string` is provided, the query parameters can be conveniently specified through the `MockPoolInterceptOptions.query` setting. * **method** `string | RegExp | (method: string) => boolean` - (optional) - a matcher for the HTTP request method. Defaults to `GET`. * **body** `string | RegExp | (body: string) => boolean` - (optional) - a matcher for the HTTP request body. * **headers** `Record boolean`> - (optional) - a matcher for the HTTP request headers. To be intercepted, a request must match all defined headers. Extra headers not defined here may (or may not) be included in the request and do not affect the interception in any way. -* **query** `Record | null` - (optional) - a matcher for the HTTP request query string params. +* **query** `Record | null` - (optional) - a matcher for the HTTP request query string params. Only applies when a `string` was provided for `MockPoolInterceptOptions.path`. ### Return: `MockInterceptor` @@ -458,6 +457,41 @@ const result3 = await request('http://localhost:3000/foo') // Will not match and make attempt a real request ``` +#### Example - Mocked request with path callback + +```js +import { MockAgent, setGlobalDispatcher, request } from 'undici' +import querystring from 'querystring' + +const mockAgent = new MockAgent() +setGlobalDispatcher(mockAgent) + +const mockPool = mockAgent.get('http://localhost:3000') + +const matchPath = requestPath => { + const [pathname, search] = requestPath.split('?') + const requestQuery = querystring.parse(search) + + if (!pathname.startsWith('/foo')) { + return false + } + + if (!Object.keys(requestQuery).includes('foo') || requestQuery.foo !== 'bar') { + return false + } + + return true +} + +mockPool.intercept({ + path: matchPath, + method: 'GET' +}).reply(200, 'foo') + +const result = await request('http://localhost:3000/foo?foo=bar') +// Will match and return mocked data +``` + ### `MockPool.close()` Closes the mock pool and de-registers from associated MockAgent. diff --git a/deps/undici/src/docs/api/RetryHandler.md b/deps/undici/src/docs/api/RetryHandler.md new file mode 100644 index 00000000000000..2323ce47911e79 --- /dev/null +++ b/deps/undici/src/docs/api/RetryHandler.md @@ -0,0 +1,108 @@ +# Class: RetryHandler + +Extends: `undici.DispatcherHandlers` + +A handler class that implements the retry logic for a request. + +## `new RetryHandler(dispatchOptions, retryHandlers, [retryOptions])` + +Arguments: + +- **options** `Dispatch.DispatchOptions & RetryOptions` (required) - It is an intersection of `Dispatcher.DispatchOptions` and `RetryOptions`. +- **retryHandlers** `RetryHandlers` (required) - Object containing the `dispatch` to be used on every retry, and `handler` for handling the `dispatch` lifecycle. + +Returns: `retryHandler` + +### Parameter: `Dispatch.DispatchOptions & RetryOptions` + +Extends: [`Dispatch.DispatchOptions`](Dispatcher.md#parameter-dispatchoptions). + +#### `RetryOptions` + +- **retry** `(err: Error, context: RetryContext, callback: (err?: Error | null) => void) => void` (optional) - Function to be called after every retry. It should pass error if no more retries should be performed. +- **maxRetries** `number` (optional) - Maximum number of retries. Default: `5` +- **maxTimeout** `number` (optional) - Maximum number of milliseconds to wait before retrying. Default: `30000` (30 seconds) +- **minTimeout** `number` (optional) - Minimum number of milliseconds to wait before retrying. Default: `500` (half a second) +- **timeoutFactor** `number` (optional) - Factor to multiply the timeout by for each retry attempt. Default: `2` +- **retryAfter** `boolean` (optional) - It enables automatic retry after the `Retry-After` header is received. Default: `true` +- +- **methods** `string[]` (optional) - Array of HTTP methods to retry. Default: `['GET', 'PUT', 'HEAD', 'OPTIONS', 'DELETE']` +- **statusCodes** `number[]` (optional) - Array of HTTP status codes to retry. Default: `[429, 500, 502, 503, 504]` +- **errorCodes** `string[]` (optional) - Array of Error codes to retry. Default: `['ECONNRESET', 'ECONNREFUSED', 'ENOTFOUND', 'ENETDOWN','ENETUNREACH', 'EHOSTDOWN', + +**`RetryContext`** + +- `state`: `RetryState` - Current retry state. It can be mutated. +- `opts`: `Dispatch.DispatchOptions & RetryOptions` - Options passed to the retry handler. + +### Parameter `RetryHandlers` + +- **dispatch** `(options: Dispatch.DispatchOptions, handlers: Dispatch.DispatchHandlers) => Promise` (required) - Dispatch function to be called after every retry. +- **handler** Extends [`Dispatch.DispatchHandlers`](Dispatcher.md#dispatcherdispatchoptions-handler) (required) - Handler function to be called after the request is successful or the retries are exhausted. + +Examples: + +```js +const client = new Client(`http://localhost:${server.address().port}`); +const chunks = []; +const handler = new RetryHandler( + { + ...dispatchOptions, + retryOptions: { + // custom retry function + retry: function (err, state, callback) { + counter++; + + if (err.code && err.code === "UND_ERR_DESTROYED") { + callback(err); + return; + } + + if (err.statusCode === 206) { + callback(err); + return; + } + + setTimeout(() => callback(null), 1000); + }, + }, + }, + { + dispatch: (...args) => { + return client.dispatch(...args); + }, + handler: { + onConnect() {}, + onBodySent() {}, + onHeaders(status, _rawHeaders, resume, _statusMessage) { + // do something with headers + }, + onData(chunk) { + chunks.push(chunk); + return true; + }, + onComplete() {}, + onError() { + // handle error properly + }, + }, + } +); +``` + +#### Example - Basic RetryHandler with defaults + +```js +const client = new Client(`http://localhost:${server.address().port}`); +const handler = new RetryHandler(dispatchOptions, { + dispatch: client.dispatch.bind(client), + handler: { + onConnect() {}, + onBodySent() {}, + onHeaders(status, _rawHeaders, resume, _statusMessage) {}, + onData(chunk) {}, + onComplete() {}, + onError(err) {}, + }, +}); +``` diff --git a/deps/undici/src/index.js b/deps/undici/src/index.js index 7c0c8adcd6c809..26302cc8efa62b 100644 --- a/deps/undici/src/index.js +++ b/deps/undici/src/index.js @@ -15,6 +15,7 @@ const MockAgent = require('./lib/mock/mock-agent') const MockPool = require('./lib/mock/mock-pool') const mockErrors = require('./lib/mock/mock-errors') const ProxyAgent = require('./lib/proxy-agent') +const RetryHandler = require('./lib/handler/RetryHandler') const { getGlobalDispatcher, setGlobalDispatcher } = require('./lib/global') const DecoratorHandler = require('./lib/handler/DecoratorHandler') const RedirectHandler = require('./lib/handler/RedirectHandler') @@ -36,6 +37,7 @@ module.exports.Pool = Pool module.exports.BalancedPool = BalancedPool module.exports.Agent = Agent module.exports.ProxyAgent = ProxyAgent +module.exports.RetryHandler = RetryHandler module.exports.DecoratorHandler = DecoratorHandler module.exports.RedirectHandler = RedirectHandler diff --git a/deps/undici/src/lib/api/api-request.js b/deps/undici/src/lib/api/api-request.js index f130ecc9867a88..d4281ce2449f16 100644 --- a/deps/undici/src/lib/api/api-request.js +++ b/deps/undici/src/lib/api/api-request.js @@ -177,3 +177,4 @@ function request (opts, callback) { } module.exports = request +module.exports.RequestHandler = RequestHandler diff --git a/deps/undici/src/lib/api/readable.js b/deps/undici/src/lib/api/readable.js index d106568cd4bad1..5269dfae50cbad 100644 --- a/deps/undici/src/lib/api/readable.js +++ b/deps/undici/src/lib/api/readable.js @@ -16,6 +16,8 @@ const kBody = Symbol('kBody') const kAbort = Symbol('abort') const kContentType = Symbol('kContentType') +const noop = () => {} + module.exports = class BodyReadable extends Readable { constructor ({ resume, @@ -149,37 +151,50 @@ module.exports = class BodyReadable extends Readable { return this[kBody] } - async dump (opts) { + dump (opts) { let limit = opts && Number.isFinite(opts.limit) ? opts.limit : 262144 const signal = opts && opts.signal - const abortFn = () => { - this.destroy() - } - let signalListenerCleanup + if (signal) { - if (typeof signal !== 'object' || !('aborted' in signal)) { - throw new InvalidArgumentError('signal must be an AbortSignal') - } - util.throwIfAborted(signal) - signalListenerCleanup = util.addAbortListener(signal, abortFn) - } - try { - for await (const chunk of this) { - util.throwIfAborted(signal) - limit -= Buffer.byteLength(chunk) - if (limit < 0) { - return + try { + if (typeof signal !== 'object' || !('aborted' in signal)) { + throw new InvalidArgumentError('signal must be an AbortSignal') } + util.throwIfAborted(signal) + } catch (err) { + return Promise.reject(err) } - } catch { - util.throwIfAborted(signal) - } finally { - if (typeof signalListenerCleanup === 'function') { - signalListenerCleanup() - } else if (signalListenerCleanup) { - signalListenerCleanup[Symbol.dispose]() - } } + + if (this.closed) { + return Promise.resolve(null) + } + + return new Promise((resolve, reject) => { + const signalListenerCleanup = signal + ? util.addAbortListener(signal, () => { + this.destroy() + }) + : noop + + this + .on('close', function () { + signalListenerCleanup() + if (signal && signal.aborted) { + reject(signal.reason || Object.assign(new Error('The operation was aborted'), { name: 'AbortError' })) + } else { + resolve(null) + } + }) + .on('error', noop) + .on('data', function (chunk) { + limit -= chunk.length + if (limit <= 0) { + this.destroy() + } + }) + .resume() + }) } } diff --git a/deps/undici/src/lib/cache/symbols.js b/deps/undici/src/lib/cache/symbols.js index f9b19740af8281..40448d6001e0f6 100644 --- a/deps/undici/src/lib/cache/symbols.js +++ b/deps/undici/src/lib/cache/symbols.js @@ -1,5 +1,5 @@ 'use strict' module.exports = { - kConstruct: Symbol('constructable') + kConstruct: require('../core/symbols').kConstruct } diff --git a/deps/undici/src/lib/client.js b/deps/undici/src/lib/client.js index 00f4467cc8b718..22cb39039da7fb 100644 --- a/deps/undici/src/lib/client.js +++ b/deps/undici/src/lib/client.js @@ -917,11 +917,9 @@ class Parser { socket[kReset] = true } - let pause - try { - pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false - } catch (err) { - util.destroy(socket, err) + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false + + if (request.aborted) { return -1 } @@ -968,13 +966,8 @@ class Parser { this.bytesRead += buf.length - try { - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED - } - } catch (err) { - util.destroy(socket, err) - return -1 + if (request.onData(buf) === false) { + return constants.ERROR.PAUSED } } @@ -1015,11 +1008,7 @@ class Parser { return -1 } - try { - request.onComplete(headers) - } catch (err) { - errorRequest(client, request, err) - } + request.onComplete(headers) client[kQueue][client[kRunningIdx]++] = null @@ -1183,7 +1172,7 @@ async function connect (client) { const idx = hostname.indexOf(']') assert(idx !== -1) - const ip = hostname.substr(1, idx - 1) + const ip = hostname.substring(1, idx) assert(net.isIP(ip)) hostname = ip @@ -1462,23 +1451,7 @@ function _resume (client, sync) { return } - if (util.isStream(request.body) && util.bodyLength(request.body) === 0) { - request.body - .on('data', /* istanbul ignore next */ function () { - /* istanbul ignore next */ - assert(false) - }) - .on('error', function (err) { - errorRequest(client, request, err) - }) - .on('end', function () { - util.destroy(this) - }) - - request.body = null - } - - if (client[kRunning] > 0 && + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body))) { // Request with stream or iterator body can error while other requests // are inflight and indirectly error those as well. @@ -1499,6 +1472,11 @@ function _resume (client, sync) { } } +// https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2 +function shouldSendContentLength (method) { + return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT' +} + function write (client, request) { if (client[kHTTPConnVersion] === 'h2') { writeH2(client, client[kHTTP2Session], request) @@ -1527,7 +1505,9 @@ function write (client, request) { body.read(0) } - let contentLength = util.bodyLength(body) + const bodyLength = util.bodyLength(body) + + let contentLength = bodyLength if (contentLength === null) { contentLength = request.contentLength @@ -1542,7 +1522,9 @@ function write (client, request) { contentLength = null } - if (request.contentLength !== null && request.contentLength !== contentLength) { + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { errorRequest(client, request, new RequestContentLengthMismatchError()) return false @@ -1623,7 +1605,7 @@ function write (client, request) { } /* istanbul ignore else: assertion */ - if (!body) { + if (!body || bodyLength === 0) { if (contentLength === 0) { socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1') } else { @@ -1689,6 +1671,7 @@ function writeH2 (client, session, request) { return false } + /** @type {import('node:http2').ClientHttp2Stream} */ let stream const h2State = client[kHTTP2SessionState] @@ -1763,7 +1746,9 @@ function writeH2 (client, session, request) { contentLength = null } - if (request.contentLength != null && request.contentLength !== contentLength) { + // https://github.com/nodejs/undici/issues/2046 + // A user agent may send a Content-Length header with 0 value, this should be allowed. + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { errorRequest(client, request, new RequestContentLengthMismatchError()) return false @@ -1782,14 +1767,10 @@ function writeH2 (client, session, request) { const shouldEndStream = method === 'GET' || method === 'HEAD' if (expectContinue) { headers[HTTP2_HEADER_EXPECT] = '100-continue' - /** - * @type {import('node:http2').ClientHttp2Stream} - */ stream = session.request(headers, { endStream: shouldEndStream, signal }) stream.once('continue', writeBodyH2) } else { - /** @type {import('node:http2').ClientHttp2Stream} */ stream = session.request(headers, { endStream: shouldEndStream, signal @@ -1801,7 +1782,9 @@ function writeH2 (client, session, request) { ++h2State.openStreams stream.once('response', headers => { - if (request.onHeaders(Number(headers[HTTP2_HEADER_STATUS]), headers, stream.resume.bind(stream), '') === false) { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers + + if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), '') === false) { stream.pause() } }) @@ -1811,13 +1794,17 @@ function writeH2 (client, session, request) { }) stream.on('data', (chunk) => { - if (request.onData(chunk) === false) stream.pause() + if (request.onData(chunk) === false) { + stream.pause() + } }) stream.once('close', () => { h2State.openStreams -= 1 // TODO(HTTP/2): unref only if current streams count is 0 - if (h2State.openStreams === 0) session.unref() + if (h2State.openStreams === 0) { + session.unref() + } }) stream.once('error', function (err) { @@ -1977,7 +1964,11 @@ function writeStream ({ h2stream, body, client, request, socket, contentLength, } } const onAbort = function () { - onFinished(new RequestAbortedError()) + if (finished) { + return + } + const err = new RequestAbortedError() + queueMicrotask(() => onFinished(err)) } const onFinished = function (err) { if (finished) { diff --git a/deps/undici/src/lib/core/errors.js b/deps/undici/src/lib/core/errors.js index 653782d9b5e0e6..7af704b462a41e 100644 --- a/deps/undici/src/lib/core/errors.js +++ b/deps/undici/src/lib/core/errors.js @@ -193,6 +193,19 @@ class ResponseExceededMaxSizeError extends UndiciError { } } +class RequestRetryError extends UndiciError { + constructor (message, code, { headers, data }) { + super(message) + Error.captureStackTrace(this, RequestRetryError) + this.name = 'RequestRetryError' + this.message = message || 'Request retry error' + this.code = 'UND_ERR_REQ_RETRY' + this.statusCode = code + this.data = data + this.headers = headers + } +} + module.exports = { HTTPParserError, UndiciError, @@ -212,5 +225,6 @@ module.exports = { NotSupportedError, ResponseContentLengthMismatchError, BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError + ResponseExceededMaxSizeError, + RequestRetryError } diff --git a/deps/undici/src/lib/core/request.js b/deps/undici/src/lib/core/request.js index 43973884f1a3c8..3697e6a3acccd5 100644 --- a/deps/undici/src/lib/core/request.js +++ b/deps/undici/src/lib/core/request.js @@ -112,10 +112,29 @@ class Request { this.method = method + this.abort = null + if (body == null) { this.body = null } else if (util.isStream(body)) { this.body = body + + const rState = this.body._readableState + if (!rState || !rState.autoDestroy) { + this.endHandler = function autoDestroy () { + util.destroy(this) + } + this.body.on('end', this.endHandler) + } + + this.errorHandler = err => { + if (this.abort) { + this.abort(err) + } else { + this.error = err + } + } + this.body.on('error', this.errorHandler) } else if (util.isBuffer(body)) { this.body = body.byteLength ? body : null } else if (ArrayBuffer.isView(body)) { @@ -211,9 +230,9 @@ class Request { onBodySent (chunk) { if (this[kHandler].onBodySent) { try { - this[kHandler].onBodySent(chunk) + return this[kHandler].onBodySent(chunk) } catch (err) { - this.onError(err) + this.abort(err) } } } @@ -225,9 +244,9 @@ class Request { if (this[kHandler].onRequestSent) { try { - this[kHandler].onRequestSent() + return this[kHandler].onRequestSent() } catch (err) { - this.onError(err) + this.abort(err) } } } @@ -236,7 +255,12 @@ class Request { assert(!this.aborted) assert(!this.completed) - return this[kHandler].onConnect(abort) + if (this.error) { + abort(this.error) + } else { + this.abort = abort + return this[kHandler].onConnect(abort) + } } onHeaders (statusCode, headers, resume, statusText) { @@ -247,14 +271,23 @@ class Request { channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }) } - return this[kHandler].onHeaders(statusCode, headers, resume, statusText) + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText) + } catch (err) { + this.abort(err) + } } onData (chunk) { assert(!this.aborted) assert(!this.completed) - return this[kHandler].onData(chunk) + try { + return this[kHandler].onData(chunk) + } catch (err) { + this.abort(err) + return false + } } onUpgrade (statusCode, headers, socket) { @@ -265,16 +298,26 @@ class Request { } onComplete (trailers) { + this.onFinally() + assert(!this.aborted) this.completed = true if (channels.trailers.hasSubscribers) { channels.trailers.publish({ request: this, trailers }) } - return this[kHandler].onComplete(trailers) + + try { + return this[kHandler].onComplete(trailers) + } catch (err) { + // TODO (fix): This might be a bad idea? + this.onError(err) + } } onError (error) { + this.onFinally() + if (channels.error.hasSubscribers) { channels.error.publish({ request: this, error }) } @@ -283,9 +326,22 @@ class Request { return } this.aborted = true + return this[kHandler].onError(error) } + onFinally () { + if (this.errorHandler) { + this.body.off('error', this.errorHandler) + this.errorHandler = null + } + + if (this.endHandler) { + this.body.off('end', this.endHandler) + this.endHandler = null + } + } + // TODO: adjust to support H2 addHeader (key, value) { processHeader(this, key, value) diff --git a/deps/undici/src/lib/core/symbols.js b/deps/undici/src/lib/core/symbols.js index c2492f4355fd2a..68d8566fac03de 100644 --- a/deps/undici/src/lib/core/symbols.js +++ b/deps/undici/src/lib/core/symbols.js @@ -57,5 +57,7 @@ module.exports = { kHTTP2BuildRequest: Symbol('http2 build request'), kHTTP1BuildRequest: Symbol('http1 build request'), kHTTP2CopyHeaders: Symbol('http2 copy headers'), - kHTTPConnVersion: Symbol('http connection version') + kHTTPConnVersion: Symbol('http connection version'), + kRetryHandlerDefaultRetry: Symbol('retry agent default retry'), + kConstruct: Symbol('constructable') } diff --git a/deps/undici/src/lib/core/util.js b/deps/undici/src/lib/core/util.js index 769811f57f7b8c..8d5450ba0c0c0c 100644 --- a/deps/undici/src/lib/core/util.js +++ b/deps/undici/src/lib/core/util.js @@ -125,13 +125,13 @@ function getHostname (host) { const idx = host.indexOf(']') assert(idx !== -1) - return host.substr(1, idx - 1) + return host.substring(1, idx) } const idx = host.indexOf(':') if (idx === -1) return host - return host.substr(0, idx) + return host.substring(0, idx) } // IP addresses are not valid server names per RFC6066 @@ -190,7 +190,7 @@ function isReadableAborted (stream) { } function destroy (stream, err) { - if (!isStream(stream) || isDestroyed(stream)) { + if (stream == null || !isStream(stream) || isDestroyed(stream)) { return } @@ -228,7 +228,7 @@ function parseHeaders (headers, obj = {}) { if (!val) { if (Array.isArray(headers[i + 1])) { - obj[key] = headers[i + 1] + obj[key] = headers[i + 1].map(x => x.toString('utf8')) } else { obj[key] = headers[i + 1].toString('utf8') } @@ -431,16 +431,7 @@ function throwIfAborted (signal) { } } -let events function addAbortListener (signal, listener) { - if (typeof Symbol.dispose === 'symbol') { - if (!events) { - events = require('events') - } - if (typeof events.addAbortListener === 'function' && 'aborted' in signal) { - return events.addAbortListener(signal, listener) - } - } if ('addEventListener' in signal) { signal.addEventListener('abort', listener, { once: true }) return () => signal.removeEventListener('abort', listener) @@ -464,6 +455,21 @@ function toUSVString (val) { return `${val}` } +// Parsed accordingly to RFC 9110 +// https://www.rfc-editor.org/rfc/rfc9110#field.content-range +function parseRangeHeader (range) { + if (range == null || range === '') return { start: 0, end: null, size: null } + + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null + return m + ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } + : null +} + const kEnumerableProperty = Object.create(null) kEnumerableProperty.enumerable = true @@ -497,7 +503,9 @@ module.exports = { buildURL, throwIfAborted, addAbortListener, + parseRangeHeader, nodeMajor, nodeMinor, - nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13) + nodeHasAutoSelectFamily: nodeMajor > 18 || (nodeMajor === 18 && nodeMinor >= 13), + safeHTTPMethods: ['GET', 'HEAD', 'OPTIONS', 'TRACE'] } diff --git a/deps/undici/src/lib/fetch/dataURL.js b/deps/undici/src/lib/fetch/dataURL.js index 6df4fcc8cc6375..7b6a606106dd69 100644 --- a/deps/undici/src/lib/fetch/dataURL.js +++ b/deps/undici/src/lib/fetch/dataURL.js @@ -119,17 +119,14 @@ function dataURLProcessor (dataURL) { * @param {boolean} excludeFragment */ function URLSerializer (url, excludeFragment = false) { - const href = url.href - if (!excludeFragment) { - return href + return url.href } - const hash = href.lastIndexOf('#') - if (hash === -1) { - return href - } - return href.slice(0, hash) + const href = url.href + const hashLength = url.hash.length + + return hashLength === 0 ? href : href.substring(0, href.length - hashLength) } // https://infra.spec.whatwg.org/#collect-a-sequence-of-code-points diff --git a/deps/undici/src/lib/fetch/headers.js b/deps/undici/src/lib/fetch/headers.js index aa5e73e5d27542..2f1c0be5a47309 100644 --- a/deps/undici/src/lib/fetch/headers.js +++ b/deps/undici/src/lib/fetch/headers.js @@ -2,7 +2,7 @@ 'use strict' -const { kHeadersList } = require('../core/symbols') +const { kHeadersList, kConstruct } = require('../core/symbols') const { kGuard } = require('./symbols') const { kEnumerableProperty } = require('../core/util') const { @@ -16,6 +16,13 @@ const assert = require('assert') const kHeadersMap = Symbol('headers map') const kHeadersSortedMap = Symbol('headers map sorted') +/** + * @param {number} code + */ +function isHTTPWhiteSpaceCharCode (code) { + return code === 0x00a || code === 0x00d || code === 0x009 || code === 0x020 +} + /** * @see https://fetch.spec.whatwg.org/#concept-header-value-normalize * @param {string} potentialValue @@ -24,12 +31,12 @@ function headerValueNormalize (potentialValue) { // To normalize a byte sequence potentialValue, remove // any leading and trailing HTTP whitespace bytes from // potentialValue. + let i = 0; let j = potentialValue.length - // Trimming the end with `.replace()` and a RegExp is typically subject to - // ReDoS. This is safer and faster. - let i = potentialValue.length - while (/[\r\n\t ]/.test(potentialValue.charAt(--i))); - return potentialValue.slice(0, i + 1).replace(/^[\r\n\t ]+/, '') + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) --j + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) ++i + + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j) } function fill (headers, object) { @@ -38,7 +45,8 @@ function fill (headers, object) { // 1. If object is a sequence, then for each header in object: // Note: webidl conversion to array has already been done. if (Array.isArray(object)) { - for (const header of object) { + for (let i = 0; i < object.length; ++i) { + const header = object[i] // 1. If header does not contain exactly two items, then throw a TypeError. if (header.length !== 2) { throw webidl.errors.exception({ @@ -48,15 +56,16 @@ function fill (headers, object) { } // 2. Append (header’s first item, header’s second item) to headers. - headers.append(header[0], header[1]) + appendHeader(headers, header[0], header[1]) } } else if (typeof object === 'object' && object !== null) { // Note: null should throw // 2. Otherwise, object is a record, then for each key → value in object, // append (key, value) to headers - for (const [key, value] of Object.entries(object)) { - headers.append(key, value) + const keys = Object.keys(object) + for (let i = 0; i < keys.length; ++i) { + appendHeader(headers, keys[i], object[keys[i]]) } } else { throw webidl.errors.conversionFailed({ @@ -67,6 +76,50 @@ function fill (headers, object) { } } +/** + * @see https://fetch.spec.whatwg.org/#concept-headers-append + */ +function appendHeader (headers, name, value) { + // 1. Normalize value. + value = headerValueNormalize(value) + + // 2. If name is not a header name or value is not a + // header value, then throw a TypeError. + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value: name, + type: 'header name' + }) + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: 'Headers.append', + value, + type: 'header value' + }) + } + + // 3. If headers’s guard is "immutable", then throw a TypeError. + // 4. Otherwise, if headers’s guard is "request" and name is a + // forbidden header name, return. + // Note: undici does not implement forbidden header names + if (headers[kGuard] === 'immutable') { + throw new TypeError('immutable') + } else if (headers[kGuard] === 'request-no-cors') { + // 5. Otherwise, if headers’s guard is "request-no-cors": + // TODO + } + + // 6. Otherwise, if headers’s guard is "response" and name is a + // forbidden response-header name, return. + + // 7. Append (name, value) to headers’s header list. + return headers[kHeadersList].append(name, value) + + // 8. If headers’s guard is "request-no-cors", then remove + // privileged no-CORS request headers from headers +} + class HeadersList { /** @type {[string, string][]|null} */ cookies = null @@ -75,7 +128,7 @@ class HeadersList { if (init instanceof HeadersList) { this[kHeadersMap] = new Map(init[kHeadersMap]) this[kHeadersSortedMap] = init[kHeadersSortedMap] - this.cookies = init.cookies + this.cookies = init.cookies === null ? null : [...init.cookies] } else { this[kHeadersMap] = new Map(init) this[kHeadersSortedMap] = null @@ -137,7 +190,7 @@ class HeadersList { // the first such header to value and remove the // others. // 2. Otherwise, append header (name, value) to list. - return this[kHeadersMap].set(lowercaseName, { name, value }) + this[kHeadersMap].set(lowercaseName, { name, value }) } // https://fetch.spec.whatwg.org/#concept-header-list-delete @@ -150,20 +203,18 @@ class HeadersList { this.cookies = null } - return this[kHeadersMap].delete(name) + this[kHeadersMap].delete(name) } // https://fetch.spec.whatwg.org/#concept-header-list-get get (name) { - // 1. If list does not contain name, then return null. - if (!this.contains(name)) { - return null - } + const value = this[kHeadersMap].get(name.toLowerCase()) + // 1. If list does not contain name, then return null. // 2. Return the values of all headers in list whose name // is a byte-case-insensitive match for name, // separated from each other by 0x2C 0x20, in order. - return this[kHeadersMap].get(name.toLowerCase())?.value ?? null + return value === undefined ? null : value.value } * [Symbol.iterator] () { @@ -189,6 +240,9 @@ class HeadersList { // https://fetch.spec.whatwg.org/#headers-class class Headers { constructor (init = undefined) { + if (init === kConstruct) { + return + } this[kHeadersList] = new HeadersList() // The new Headers(init) constructor steps are: @@ -212,43 +266,7 @@ class Headers { name = webidl.converters.ByteString(name) value = webidl.converters.ByteString(value) - // 1. Normalize value. - value = headerValueNormalize(value) - - // 2. If name is not a header name or value is not a - // header value, then throw a TypeError. - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value: name, - type: 'header name' - }) - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: 'Headers.append', - value, - type: 'header value' - }) - } - - // 3. If headers’s guard is "immutable", then throw a TypeError. - // 4. Otherwise, if headers’s guard is "request" and name is a - // forbidden header name, return. - // Note: undici does not implement forbidden header names - if (this[kGuard] === 'immutable') { - throw new TypeError('immutable') - } else if (this[kGuard] === 'request-no-cors') { - // 5. Otherwise, if headers’s guard is "request-no-cors": - // TODO - } - - // 6. Otherwise, if headers’s guard is "response" and name is a - // forbidden response-header name, return. - - // 7. Append (name, value) to headers’s header list. - // 8. If headers’s guard is "request-no-cors", then remove - // privileged no-CORS request headers from headers - return this[kHeadersList].append(name, value) + return appendHeader(this, name, value) } // https://fetch.spec.whatwg.org/#dom-headers-delete @@ -293,7 +311,7 @@ class Headers { // 7. Delete name from this’s header list. // 8. If this’s guard is "request-no-cors", then remove // privileged no-CORS request headers from this. - return this[kHeadersList].delete(name) + this[kHeadersList].delete(name) } // https://fetch.spec.whatwg.org/#dom-headers-get @@ -386,7 +404,7 @@ class Headers { // 7. Set (name, value) in this’s header list. // 8. If this’s guard is "request-no-cors", then remove // privileged no-CORS request headers from this - return this[kHeadersList].set(name, value) + this[kHeadersList].set(name, value) } // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie @@ -422,7 +440,8 @@ class Headers { const cookies = this[kHeadersList].cookies // 3. For each name of names: - for (const [name, value] of names) { + for (let i = 0; i < names.length; ++i) { + const [name, value] = names[i] // 1. If name is `set-cookie`, then: if (name === 'set-cookie') { // 1. Let values be a list of all values of headers in list whose name @@ -430,8 +449,8 @@ class Headers { // 2. For each value of values: // 1. Append (name, value) to headers. - for (const value of cookies) { - headers.push([name, value]) + for (let j = 0; j < cookies.length; ++j) { + headers.push([name, cookies[j]]) } } else { // 2. Otherwise: @@ -455,6 +474,12 @@ class Headers { keys () { webidl.brandCheck(this, Headers) + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'key') + } + return makeIterator( () => [...this[kHeadersSortedMap].values()], 'Headers', @@ -465,6 +490,12 @@ class Headers { values () { webidl.brandCheck(this, Headers) + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'value') + } + return makeIterator( () => [...this[kHeadersSortedMap].values()], 'Headers', @@ -475,6 +506,12 @@ class Headers { entries () { webidl.brandCheck(this, Headers) + if (this[kGuard] === 'immutable') { + const value = this[kHeadersSortedMap] + return makeIterator(() => value, 'Headers', + 'key+value') + } + return makeIterator( () => [...this[kHeadersSortedMap].values()], 'Headers', diff --git a/deps/undici/src/lib/fetch/index.js b/deps/undici/src/lib/fetch/index.js index 298b3ddb27c04c..17c3d87ea62727 100644 --- a/deps/undici/src/lib/fetch/index.js +++ b/deps/undici/src/lib/fetch/index.js @@ -286,7 +286,7 @@ function finalizeAndReportTiming (response, initiatorType = 'other') { } // 8. If response’s timing allow passed flag is not set, then: - if (!timingInfo.timingAllowPassed) { + if (!response.timingAllowPassed) { // 1. Set timingInfo to a the result of creating an opaque timing info for timingInfo. timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime @@ -1957,7 +1957,7 @@ async function httpNetworkFetch ( path: url.pathname + url.search, origin: url.origin, method: request.method, - body: fetchParams.controller.dispatcher.isMockActive ? request.body && request.body.source : body, + body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, maxRedirections: 0, upgrade: request.mode === 'websocket' ? 'websocket' : undefined @@ -2002,7 +2002,7 @@ async function httpNetworkFetch ( location = val } - headers.append(key, val) + headers[kHeadersList].append(key, val) } } else { const keys = Object.keys(headersList) @@ -2016,7 +2016,7 @@ async function httpNetworkFetch ( location = val } - headers.append(key, val) + headers[kHeadersList].append(key, val) } } @@ -2120,7 +2120,7 @@ async function httpNetworkFetch ( const key = headersList[n + 0].toString('latin1') const val = headersList[n + 1].toString('latin1') - headers.append(key, val) + headers[kHeadersList].append(key, val) } resolve({ diff --git a/deps/undici/src/lib/fetch/request.js b/deps/undici/src/lib/fetch/request.js index 60e654eca112cd..6fe4dff64c4472 100644 --- a/deps/undici/src/lib/fetch/request.js +++ b/deps/undici/src/lib/fetch/request.js @@ -10,7 +10,8 @@ const { isValidHTTPToken, sameOrigin, normalizeMethod, - makePolicyContainer + makePolicyContainer, + normalizeMethodRecord } = require('./util') const { forbiddenMethodsSet, @@ -27,13 +28,12 @@ const { kHeaders, kSignal, kState, kGuard, kRealm } = require('./symbols') const { webidl } = require('./webidl') const { getGlobalOrigin } = require('./global') const { URLSerializer } = require('./dataURL') -const { kHeadersList } = require('../core/symbols') +const { kHeadersList, kConstruct } = require('../core/symbols') const assert = require('assert') const { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require('events') let TransformStream = globalThis.TransformStream -const kInit = Symbol('init') const kAbortController = Symbol('abortController') const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { @@ -44,7 +44,7 @@ const requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { class Request { // https://fetch.spec.whatwg.org/#dom-request constructor (input, init = {}) { - if (input === kInit) { + if (input === kConstruct) { return } @@ -183,8 +183,10 @@ class Request { urlList: [...request.urlList] }) + const initHasKey = Object.keys(init).length !== 0 + // 13. If init is not empty, then: - if (Object.keys(init).length > 0) { + if (initHasKey) { // 1. If request’s mode is "navigate", then set it to "same-origin". if (request.mode === 'navigate') { request.mode = 'same-origin' @@ -299,7 +301,7 @@ class Request { } // 23. If init["integrity"] exists, then set request’s integrity metadata to it. - if (init.integrity !== undefined && init.integrity != null) { + if (init.integrity != null) { request.integrity = String(init.integrity) } @@ -315,16 +317,16 @@ class Request { // 2. If method is not a method or method is a forbidden method, then // throw a TypeError. - if (!isValidHTTPToken(init.method)) { - throw TypeError(`'${init.method}' is not a valid HTTP method.`) + if (!isValidHTTPToken(method)) { + throw new TypeError(`'${method}' is not a valid HTTP method.`) } if (forbiddenMethodsSet.has(method.toUpperCase())) { - throw TypeError(`'${init.method}' HTTP method is unsupported.`) + throw new TypeError(`'${method}' HTTP method is unsupported.`) } // 3. Normalize method. - method = normalizeMethod(init.method) + method = normalizeMethodRecord[method] ?? normalizeMethod(method) // 4. Set request’s method to method. request.method = method @@ -395,7 +397,7 @@ class Request { // 30. Set this’s headers to a new Headers object with this’s relevant // Realm, whose header list is request’s header list and guard is // "request". - this[kHeaders] = new Headers() + this[kHeaders] = new Headers(kConstruct) this[kHeaders][kHeadersList] = request.headersList this[kHeaders][kGuard] = 'request' this[kHeaders][kRealm] = this[kRealm] @@ -415,25 +417,25 @@ class Request { } // 32. If init is not empty, then: - if (Object.keys(init).length !== 0) { + if (initHasKey) { + /** @type {HeadersList} */ + const headersList = this[kHeaders][kHeadersList] // 1. Let headers be a copy of this’s headers and its associated header // list. - let headers = new Headers(this[kHeaders]) - // 2. If init["headers"] exists, then set headers to init["headers"]. - if (init.headers !== undefined) { - headers = init.headers - } + const headers = init.headers !== undefined ? init.headers : new HeadersList(headersList) // 3. Empty this’s headers’s header list. - this[kHeaders][kHeadersList].clear() + headersList.clear() // 4. If headers is a Headers object, then for each header in its header // list, append header’s name/header’s value to this’s headers. - if (headers.constructor.name === 'Headers') { + if (headers instanceof HeadersList) { for (const [key, val] of headers) { - this[kHeaders].append(key, val) + headersList.append(key, val) } + // Note: Copy the `set-cookie` meta-data. + headersList.cookies = headers.cookies } else { // 5. Otherwise, fill this’s headers with headers. fillHeaders(this[kHeaders], headers) @@ -722,10 +724,10 @@ class Request { // 3. Let clonedRequestObject be the result of creating a Request object, // given clonedRequest, this’s headers’s guard, and this’s relevant Realm. - const clonedRequestObject = new Request(kInit) + const clonedRequestObject = new Request(kConstruct) clonedRequestObject[kState] = clonedRequest clonedRequestObject[kRealm] = this[kRealm] - clonedRequestObject[kHeaders] = new Headers() + clonedRequestObject[kHeaders] = new Headers(kConstruct) clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard] clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm] diff --git a/deps/undici/src/lib/fetch/response.js b/deps/undici/src/lib/fetch/response.js index 23cf55c51dc1c5..73386123e33c8d 100644 --- a/deps/undici/src/lib/fetch/response.js +++ b/deps/undici/src/lib/fetch/response.js @@ -23,7 +23,7 @@ const { webidl } = require('./webidl') const { FormData } = require('./formdata') const { getGlobalOrigin } = require('./global') const { URLSerializer } = require('./dataURL') -const { kHeadersList } = require('../core/symbols') +const { kHeadersList, kConstruct } = require('../core/symbols') const assert = require('assert') const { types } = require('util') @@ -144,7 +144,7 @@ class Response { // 2. Set this’s headers to a new Headers object with this’s relevant // Realm, whose header list is this’s response’s header list and guard // is "response". - this[kHeaders] = new Headers() + this[kHeaders] = new Headers(kConstruct) this[kHeaders][kGuard] = 'response' this[kHeaders][kHeadersList] = this[kState].headersList this[kHeaders][kRealm] = this[kRealm] @@ -514,11 +514,7 @@ webidl.converters.XMLHttpRequestBodyInit = function (V) { return webidl.converters.Blob(V, { strict: false }) } - if ( - types.isAnyArrayBuffer(V) || - types.isTypedArray(V) || - types.isDataView(V) - ) { + if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { return webidl.converters.BufferSource(V) } diff --git a/deps/undici/src/lib/fetch/util.js b/deps/undici/src/lib/fetch/util.js index 033fa206aedc3e..b12142c7f42505 100644 --- a/deps/undici/src/lib/fetch/util.js +++ b/deps/undici/src/lib/fetch/util.js @@ -103,52 +103,57 @@ function isValidReasonPhrase (statusText) { return true } -function isTokenChar (c) { - return !( - c >= 0x7f || - c <= 0x20 || - c === '(' || - c === ')' || - c === '<' || - c === '>' || - c === '@' || - c === ',' || - c === ';' || - c === ':' || - c === '\\' || - c === '"' || - c === '/' || - c === '[' || - c === ']' || - c === '?' || - c === '=' || - c === '{' || - c === '}' - ) +/** + * @see https://tools.ietf.org/html/rfc7230#section-3.2.6 + * @param {number} c + */ +function isTokenCharCode (c) { + switch (c) { + case 0x22: + case 0x28: + case 0x29: + case 0x2c: + case 0x2f: + case 0x3a: + case 0x3b: + case 0x3c: + case 0x3d: + case 0x3e: + case 0x3f: + case 0x40: + case 0x5b: + case 0x5c: + case 0x5d: + case 0x7b: + case 0x7d: + // DQUOTE and "(),/:;<=>?@[\]{}" + return false + default: + // VCHAR %x21-7E + return c >= 0x21 && c <= 0x7e + } } -// See RFC 7230, Section 3.2.6. -// https://github.com/chromium/chromium/blob/d7da0240cae77824d1eda25745c4022757499131/third_party/blink/renderer/platform/network/http_parsers.cc#L321 +/** + * @param {string} characters + */ function isValidHTTPToken (characters) { - if (!characters || typeof characters !== 'string') { + if (characters.length === 0) { return false } for (let i = 0; i < characters.length; ++i) { - const c = characters.charCodeAt(i) - if (c > 0x7f || !isTokenChar(c)) { + if (!isTokenCharCode(characters.charCodeAt(i))) { return false } } return true } -// https://fetch.spec.whatwg.org/#header-name -// https://github.com/chromium/chromium/blob/b3d37e6f94f87d59e44662d6078f6a12de845d17/net/http/http_util.cc#L342 +/** + * @see https://fetch.spec.whatwg.org/#header-name + * @param {string} potentialValue + */ function isValidHeaderName (potentialValue) { - if (potentialValue.length === 0) { - return false - } - return isValidHTTPToken(potentialValue) } @@ -693,11 +698,30 @@ function isCancelled (fetchParams) { fetchParams.controller.state === 'terminated' } -// https://fetch.spec.whatwg.org/#concept-method-normalize +const normalizeMethodRecord = { + delete: 'DELETE', + DELETE: 'DELETE', + get: 'GET', + GET: 'GET', + head: 'HEAD', + HEAD: 'HEAD', + options: 'OPTIONS', + OPTIONS: 'OPTIONS', + post: 'POST', + POST: 'POST', + put: 'PUT', + PUT: 'PUT' +} + +// Note: object prototypes should not be able to be referenced. e.g. `Object#hasOwnProperty`. +Object.setPrototypeOf(normalizeMethodRecord, null) + +/** + * @see https://fetch.spec.whatwg.org/#concept-method-normalize + * @param {string} method + */ function normalizeMethod (method) { - return /^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(method) - ? method.toUpperCase() - : method + return normalizeMethodRecord[method.toLowerCase()] ?? method } // https://infra.spec.whatwg.org/#serialize-a-javascript-value-to-a-json-string @@ -1042,5 +1066,6 @@ module.exports = { urlIsLocal, urlHasHttpsScheme, urlIsHttpHttpsScheme, - readAllBytes + readAllBytes, + normalizeMethodRecord } diff --git a/deps/undici/src/lib/fetch/webidl.js b/deps/undici/src/lib/fetch/webidl.js index 38a05e657594aa..6fcf2ab6ad4c49 100644 --- a/deps/undici/src/lib/fetch/webidl.js +++ b/deps/undici/src/lib/fetch/webidl.js @@ -427,12 +427,10 @@ webidl.converters.ByteString = function (V) { // 2. If the value of any element of x is greater than // 255, then throw a TypeError. for (let index = 0; index < x.length; index++) { - const charCode = x.charCodeAt(index) - - if (charCode > 255) { + if (x.charCodeAt(index) > 255) { throw new TypeError( 'Cannot convert argument to a ByteString because the character at ' + - `index ${index} has a value of ${charCode} which is greater than 255.` + `index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` ) } } diff --git a/deps/undici/src/lib/handler/RetryHandler.js b/deps/undici/src/lib/handler/RetryHandler.js new file mode 100644 index 00000000000000..371044719fd33d --- /dev/null +++ b/deps/undici/src/lib/handler/RetryHandler.js @@ -0,0 +1,336 @@ +const assert = require('assert') + +const { kRetryHandlerDefaultRetry } = require('../core/symbols') +const { RequestRetryError } = require('../core/errors') +const { isDisturbed, parseHeaders, parseRangeHeader } = require('../core/util') + +function calculateRetryAfterHeader (retryAfter) { + const current = Date.now() + const diff = new Date(retryAfter).getTime() - current + + return diff +} + +class RetryHandler { + constructor (opts, handlers) { + const { retryOptions, ...dispatchOpts } = opts + const { + // Retry scoped + retry: retryFn, + maxRetries, + maxTimeout, + minTimeout, + timeoutFactor, + // Response scoped + methods, + errorCodes, + retryAfter, + statusCodes + } = retryOptions ?? {} + + this.dispatch = handlers.dispatch + this.handler = handlers.handler + this.opts = dispatchOpts + this.abort = null + this.aborted = false + this.retryOpts = { + retry: retryFn ?? RetryHandler[kRetryHandlerDefaultRetry], + retryAfter: retryAfter ?? true, + maxTimeout: maxTimeout ?? 30 * 1000, // 30s, + timeout: minTimeout ?? 500, // .5s + timeoutFactor: timeoutFactor ?? 2, + maxRetries: maxRetries ?? 5, + // What errors we should retry + methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], + // Indicates which errors to retry + statusCodes: statusCodes ?? [500, 502, 503, 504, 429], + // List of errors to retry + errorCodes: errorCodes ?? [ + 'ECONNRESET', + 'ECONNREFUSED', + 'ENOTFOUND', + 'ENETDOWN', + 'ENETUNREACH', + 'EHOSTDOWN', + 'EHOSTUNREACH', + 'EPIPE' + ] + } + + this.retryCount = 0 + this.start = 0 + this.end = null + this.etag = null + this.resume = null + + // Handle possible onConnect duplication + this.handler.onConnect(reason => { + this.aborted = true + if (this.abort) { + this.abort(reason) + } else { + this.reason = reason + } + }) + } + + onRequestSent () { + if (this.handler.onRequestSent) { + this.handler.onRequestSent() + } + } + + onUpgrade (statusCode, headers, socket) { + if (this.handler.onUpgrade) { + this.handler.onUpgrade(statusCode, headers, socket) + } + } + + onConnect (abort) { + if (this.aborted) { + abort(this.reason) + } else { + this.abort = abort + } + } + + onBodySent (chunk) { + if (this.handler.onBodySent) return this.handler.onBodySent(chunk) + } + + static [kRetryHandlerDefaultRetry] (err, { state, opts }, cb) { + const { statusCode, code, headers } = err + const { method, retryOptions } = opts + const { + maxRetries, + timeout, + maxTimeout, + timeoutFactor, + statusCodes, + errorCodes, + methods + } = retryOptions + let { counter, currentTimeout } = state + + currentTimeout = + currentTimeout != null && currentTimeout > 0 ? currentTimeout : timeout + + // Any code that is not a Undici's originated and allowed to retry + if ( + code && + code !== 'UND_ERR_REQ_RETRY' && + code !== 'UND_ERR_SOCKET' && + !errorCodes.includes(code) + ) { + cb(err) + return + } + + // If a set of method are provided and the current method is not in the list + if (Array.isArray(methods) && !methods.includes(method)) { + cb(err) + return + } + + // If a set of status code are provided and the current status code is not in the list + if ( + statusCode != null && + Array.isArray(statusCodes) && + !statusCodes.includes(statusCode) + ) { + cb(err) + return + } + + // If we reached the max number of retries + if (counter > maxRetries) { + cb(err) + return + } + + let retryAfterHeader = headers != null && headers['retry-after'] + if (retryAfterHeader) { + retryAfterHeader = Number(retryAfterHeader) + retryAfterHeader = isNaN(retryAfterHeader) + ? calculateRetryAfterHeader(retryAfterHeader) + : retryAfterHeader * 1e3 // Retry-After is in seconds + } + + const retryTimeout = + retryAfterHeader > 0 + ? Math.min(retryAfterHeader, maxTimeout) + : Math.min(currentTimeout * timeoutFactor ** counter, maxTimeout) + + state.currentTimeout = retryTimeout + + setTimeout(() => cb(null), retryTimeout) + } + + onHeaders (statusCode, rawHeaders, resume, statusMessage) { + const headers = parseHeaders(rawHeaders) + + this.retryCount += 1 + + if (statusCode >= 300) { + this.abort( + new RequestRetryError('Request failed', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + + // Checkpoint for resume from where we left it + if (this.resume != null) { + this.resume = null + + if (statusCode !== 206) { + return true + } + + const contentRange = parseRangeHeader(headers['content-range']) + // If no content range + if (!contentRange) { + this.abort( + new RequestRetryError('Content-Range mismatch', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + + // Let's start with a weak etag check + if (this.etag != null && this.etag !== headers.etag) { + this.abort( + new RequestRetryError('ETag mismatch', statusCode, { + headers, + count: this.retryCount + }) + ) + return false + } + + const { start, size, end = size } = contentRange + + assert(this.start === start, 'content-range mismatch') + assert(this.end == null || this.end === end, 'content-range mismatch') + + this.resume = resume + return true + } + + if (this.end == null) { + if (statusCode === 206) { + // First time we receive 206 + const range = parseRangeHeader(headers['content-range']) + + if (range == null) { + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ) + } + + const { start, size, end = size } = range + + assert( + start != null && Number.isFinite(start) && this.start !== start, + 'content-range mismatch' + ) + assert(Number.isFinite(start)) + assert( + end != null && Number.isFinite(end) && this.end !== end, + 'invalid content-length' + ) + + this.start = start + this.end = end + } + + // We make our best to checkpoint the body for further range headers + if (this.end == null) { + const contentLength = headers['content-length'] + this.end = contentLength != null ? Number(contentLength) : null + } + + assert(Number.isFinite(this.start)) + assert( + this.end == null || Number.isFinite(this.end), + 'invalid content-length' + ) + + this.resume = resume + this.etag = headers.etag != null ? headers.etag : null + + return this.handler.onHeaders( + statusCode, + rawHeaders, + resume, + statusMessage + ) + } + + const err = new RequestRetryError('Request failed', statusCode, { + headers, + count: this.retryCount + }) + + this.abort(err) + + return false + } + + onData (chunk) { + this.start += chunk.length + + return this.handler.onData(chunk) + } + + onComplete (rawTrailers) { + this.retryCount = 0 + return this.handler.onComplete(rawTrailers) + } + + onError (err) { + if (this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err) + } + + this.retryOpts.retry( + err, + { + state: { counter: this.retryCount++, currentTimeout: this.retryAfter }, + opts: { retryOptions: this.retryOpts, ...this.opts } + }, + onRetry.bind(this) + ) + + function onRetry (err) { + if (err != null || this.aborted || isDisturbed(this.opts.body)) { + return this.handler.onError(err) + } + + if (this.start !== 0) { + this.opts = { + ...this.opts, + headers: { + ...this.opts.headers, + range: `bytes=${this.start}-${this.end ?? ''}` + } + } + } + + try { + this.dispatch(this.opts, this) + } catch (err) { + this.handler.onError(err) + } + } + } +} + +module.exports = RetryHandler diff --git a/deps/undici/src/lib/pool.js b/deps/undici/src/lib/pool.js index 08509958069a4f..e3cd3399e6b544 100644 --- a/deps/undici/src/lib/pool.js +++ b/deps/undici/src/lib/pool.js @@ -57,7 +57,7 @@ class Pool extends PoolBase { maxCachedSessions, allowH2, socketPath, - timeout: connectTimeout == null ? 10e3 : connectTimeout, + timeout: connectTimeout, ...(util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : undefined), ...connect }) diff --git a/deps/undici/src/lib/proxy-agent.js b/deps/undici/src/lib/proxy-agent.js index c710948cc5bbca..e3c0f6f3d46d90 100644 --- a/deps/undici/src/lib/proxy-agent.js +++ b/deps/undici/src/lib/proxy-agent.js @@ -65,6 +65,9 @@ class ProxyAgent extends DispatcherBase { this[kProxyTls] = opts.proxyTls this[kProxyHeaders] = opts.headers || {} + const resolvedUrl = new URL(opts.uri) + const { origin, port, host, username, password } = resolvedUrl + if (opts.auth && opts.token) { throw new InvalidArgumentError('opts.auth cannot be used in combination with opts.token') } else if (opts.auth) { @@ -72,11 +75,10 @@ class ProxyAgent extends DispatcherBase { this[kProxyHeaders]['proxy-authorization'] = `Basic ${opts.auth}` } else if (opts.token) { this[kProxyHeaders]['proxy-authorization'] = opts.token + } else if (username && password) { + this[kProxyHeaders]['proxy-authorization'] = `Basic ${Buffer.from(`${decodeURIComponent(username)}:${decodeURIComponent(password)}`).toString('base64')}` } - const resolvedUrl = new URL(opts.uri) - const { origin, port, host } = resolvedUrl - const connect = buildConnector({ ...opts.proxyTls }) this[kConnectEndpoint] = buildConnector({ ...opts.requestTls }) this[kClient] = clientFactory(resolvedUrl, { connect }) @@ -100,7 +102,7 @@ class ProxyAgent extends DispatcherBase { }) if (statusCode !== 200) { socket.on('error', () => {}).destroy() - callback(new RequestAbortedError('Proxy response !== 200 when HTTP Tunneling')) + callback(new RequestAbortedError(`Proxy response (${statusCode}) !== 200 when HTTP Tunneling`)) } if (opts.protocol !== 'https:') { callback(null, socket) diff --git a/deps/undici/src/node_modules/@fastify/busboy/lib/utils/decodeText.js b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/decodeText.js index ee376062c1843f..be35d6b1052b0b 100644 --- a/deps/undici/src/node_modules/@fastify/busboy/lib/utils/decodeText.js +++ b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/decodeText.js @@ -7,18 +7,106 @@ const textDecoders = new Map([ ['utf8', utf8Decoder] ]) -function decodeText (text, textEncoding, destEncoding) { - if (text) { - if (textDecoders.has(destEncoding)) { - try { - return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding)) - } catch (e) { } - } else { +function getDecoder (charset) { + let lc + while (true) { + switch (charset) { + case 'utf-8': + case 'utf8': + return decoders.utf8 + case 'latin1': + case 'ascii': // TODO: Make these a separate, strict decoder? + case 'us-ascii': + case 'iso-8859-1': + case 'iso8859-1': + case 'iso88591': + case 'iso_8859-1': + case 'windows-1252': + case 'iso_8859-1:1987': + case 'cp1252': + case 'x-cp1252': + return decoders.latin1 + case 'utf16le': + case 'utf-16le': + case 'ucs2': + case 'ucs-2': + return decoders.utf16le + case 'base64': + return decoders.base64 + default: + if (lc === undefined) { + lc = true + charset = charset.toLowerCase() + continue + } + return decoders.other.bind(charset) + } + } +} + +const decoders = { + utf8: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.utf8Slice(0, data.length) + }, + + latin1: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + return data + } + return data.latin1Slice(0, data.length) + }, + + utf16le: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.ucs2Slice(0, data.length) + }, + + base64: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + return data.base64Slice(0, data.length) + }, + + other: (data, sourceEncoding) => { + if (data.length === 0) { + return '' + } + if (typeof data === 'string') { + data = Buffer.from(data, sourceEncoding) + } + + if (textDecoders.has(this.toString())) { try { - textDecoders.set(destEncoding, new TextDecoder(destEncoding)) - return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding)) + return textDecoders.get(this).decode(data) } catch (e) { } } + return typeof data === 'string' + ? data + : data.toString() + } +} + +function decodeText (text, sourceEncoding, destEncoding) { + if (text) { + return getDecoder(destEncoding)(text, sourceEncoding) } return text } diff --git a/deps/undici/src/node_modules/@fastify/busboy/lib/utils/parseParams.js b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/parseParams.js index f9214180fa79d5..1698e62e68ab82 100644 --- a/deps/undici/src/node_modules/@fastify/busboy/lib/utils/parseParams.js +++ b/deps/undici/src/node_modules/@fastify/busboy/lib/utils/parseParams.js @@ -1,23 +1,130 @@ +/* eslint-disable object-property-newline */ 'use strict' const decodeText = require('./decodeText') -const RE_ENCODED = /%([a-fA-F0-9]{2})/g +const RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g -function encodedReplacer (match, byte) { - return String.fromCharCode(parseInt(byte, 16)) +const EncodedLookup = { + '%00': '\x00', '%01': '\x01', '%02': '\x02', '%03': '\x03', '%04': '\x04', + '%05': '\x05', '%06': '\x06', '%07': '\x07', '%08': '\x08', '%09': '\x09', + '%0a': '\x0a', '%0A': '\x0a', '%0b': '\x0b', '%0B': '\x0b', '%0c': '\x0c', + '%0C': '\x0c', '%0d': '\x0d', '%0D': '\x0d', '%0e': '\x0e', '%0E': '\x0e', + '%0f': '\x0f', '%0F': '\x0f', '%10': '\x10', '%11': '\x11', '%12': '\x12', + '%13': '\x13', '%14': '\x14', '%15': '\x15', '%16': '\x16', '%17': '\x17', + '%18': '\x18', '%19': '\x19', '%1a': '\x1a', '%1A': '\x1a', '%1b': '\x1b', + '%1B': '\x1b', '%1c': '\x1c', '%1C': '\x1c', '%1d': '\x1d', '%1D': '\x1d', + '%1e': '\x1e', '%1E': '\x1e', '%1f': '\x1f', '%1F': '\x1f', '%20': '\x20', + '%21': '\x21', '%22': '\x22', '%23': '\x23', '%24': '\x24', '%25': '\x25', + '%26': '\x26', '%27': '\x27', '%28': '\x28', '%29': '\x29', '%2a': '\x2a', + '%2A': '\x2a', '%2b': '\x2b', '%2B': '\x2b', '%2c': '\x2c', '%2C': '\x2c', + '%2d': '\x2d', '%2D': '\x2d', '%2e': '\x2e', '%2E': '\x2e', '%2f': '\x2f', + '%2F': '\x2f', '%30': '\x30', '%31': '\x31', '%32': '\x32', '%33': '\x33', + '%34': '\x34', '%35': '\x35', '%36': '\x36', '%37': '\x37', '%38': '\x38', + '%39': '\x39', '%3a': '\x3a', '%3A': '\x3a', '%3b': '\x3b', '%3B': '\x3b', + '%3c': '\x3c', '%3C': '\x3c', '%3d': '\x3d', '%3D': '\x3d', '%3e': '\x3e', + '%3E': '\x3e', '%3f': '\x3f', '%3F': '\x3f', '%40': '\x40', '%41': '\x41', + '%42': '\x42', '%43': '\x43', '%44': '\x44', '%45': '\x45', '%46': '\x46', + '%47': '\x47', '%48': '\x48', '%49': '\x49', '%4a': '\x4a', '%4A': '\x4a', + '%4b': '\x4b', '%4B': '\x4b', '%4c': '\x4c', '%4C': '\x4c', '%4d': '\x4d', + '%4D': '\x4d', '%4e': '\x4e', '%4E': '\x4e', '%4f': '\x4f', '%4F': '\x4f', + '%50': '\x50', '%51': '\x51', '%52': '\x52', '%53': '\x53', '%54': '\x54', + '%55': '\x55', '%56': '\x56', '%57': '\x57', '%58': '\x58', '%59': '\x59', + '%5a': '\x5a', '%5A': '\x5a', '%5b': '\x5b', '%5B': '\x5b', '%5c': '\x5c', + '%5C': '\x5c', '%5d': '\x5d', '%5D': '\x5d', '%5e': '\x5e', '%5E': '\x5e', + '%5f': '\x5f', '%5F': '\x5f', '%60': '\x60', '%61': '\x61', '%62': '\x62', + '%63': '\x63', '%64': '\x64', '%65': '\x65', '%66': '\x66', '%67': '\x67', + '%68': '\x68', '%69': '\x69', '%6a': '\x6a', '%6A': '\x6a', '%6b': '\x6b', + '%6B': '\x6b', '%6c': '\x6c', '%6C': '\x6c', '%6d': '\x6d', '%6D': '\x6d', + '%6e': '\x6e', '%6E': '\x6e', '%6f': '\x6f', '%6F': '\x6f', '%70': '\x70', + '%71': '\x71', '%72': '\x72', '%73': '\x73', '%74': '\x74', '%75': '\x75', + '%76': '\x76', '%77': '\x77', '%78': '\x78', '%79': '\x79', '%7a': '\x7a', + '%7A': '\x7a', '%7b': '\x7b', '%7B': '\x7b', '%7c': '\x7c', '%7C': '\x7c', + '%7d': '\x7d', '%7D': '\x7d', '%7e': '\x7e', '%7E': '\x7e', '%7f': '\x7f', + '%7F': '\x7f', '%80': '\x80', '%81': '\x81', '%82': '\x82', '%83': '\x83', + '%84': '\x84', '%85': '\x85', '%86': '\x86', '%87': '\x87', '%88': '\x88', + '%89': '\x89', '%8a': '\x8a', '%8A': '\x8a', '%8b': '\x8b', '%8B': '\x8b', + '%8c': '\x8c', '%8C': '\x8c', '%8d': '\x8d', '%8D': '\x8d', '%8e': '\x8e', + '%8E': '\x8e', '%8f': '\x8f', '%8F': '\x8f', '%90': '\x90', '%91': '\x91', + '%92': '\x92', '%93': '\x93', '%94': '\x94', '%95': '\x95', '%96': '\x96', + '%97': '\x97', '%98': '\x98', '%99': '\x99', '%9a': '\x9a', '%9A': '\x9a', + '%9b': '\x9b', '%9B': '\x9b', '%9c': '\x9c', '%9C': '\x9c', '%9d': '\x9d', + '%9D': '\x9d', '%9e': '\x9e', '%9E': '\x9e', '%9f': '\x9f', '%9F': '\x9f', + '%a0': '\xa0', '%A0': '\xa0', '%a1': '\xa1', '%A1': '\xa1', '%a2': '\xa2', + '%A2': '\xa2', '%a3': '\xa3', '%A3': '\xa3', '%a4': '\xa4', '%A4': '\xa4', + '%a5': '\xa5', '%A5': '\xa5', '%a6': '\xa6', '%A6': '\xa6', '%a7': '\xa7', + '%A7': '\xa7', '%a8': '\xa8', '%A8': '\xa8', '%a9': '\xa9', '%A9': '\xa9', + '%aa': '\xaa', '%Aa': '\xaa', '%aA': '\xaa', '%AA': '\xaa', '%ab': '\xab', + '%Ab': '\xab', '%aB': '\xab', '%AB': '\xab', '%ac': '\xac', '%Ac': '\xac', + '%aC': '\xac', '%AC': '\xac', '%ad': '\xad', '%Ad': '\xad', '%aD': '\xad', + '%AD': '\xad', '%ae': '\xae', '%Ae': '\xae', '%aE': '\xae', '%AE': '\xae', + '%af': '\xaf', '%Af': '\xaf', '%aF': '\xaf', '%AF': '\xaf', '%b0': '\xb0', + '%B0': '\xb0', '%b1': '\xb1', '%B1': '\xb1', '%b2': '\xb2', '%B2': '\xb2', + '%b3': '\xb3', '%B3': '\xb3', '%b4': '\xb4', '%B4': '\xb4', '%b5': '\xb5', + '%B5': '\xb5', '%b6': '\xb6', '%B6': '\xb6', '%b7': '\xb7', '%B7': '\xb7', + '%b8': '\xb8', '%B8': '\xb8', '%b9': '\xb9', '%B9': '\xb9', '%ba': '\xba', + '%Ba': '\xba', '%bA': '\xba', '%BA': '\xba', '%bb': '\xbb', '%Bb': '\xbb', + '%bB': '\xbb', '%BB': '\xbb', '%bc': '\xbc', '%Bc': '\xbc', '%bC': '\xbc', + '%BC': '\xbc', '%bd': '\xbd', '%Bd': '\xbd', '%bD': '\xbd', '%BD': '\xbd', + '%be': '\xbe', '%Be': '\xbe', '%bE': '\xbe', '%BE': '\xbe', '%bf': '\xbf', + '%Bf': '\xbf', '%bF': '\xbf', '%BF': '\xbf', '%c0': '\xc0', '%C0': '\xc0', + '%c1': '\xc1', '%C1': '\xc1', '%c2': '\xc2', '%C2': '\xc2', '%c3': '\xc3', + '%C3': '\xc3', '%c4': '\xc4', '%C4': '\xc4', '%c5': '\xc5', '%C5': '\xc5', + '%c6': '\xc6', '%C6': '\xc6', '%c7': '\xc7', '%C7': '\xc7', '%c8': '\xc8', + '%C8': '\xc8', '%c9': '\xc9', '%C9': '\xc9', '%ca': '\xca', '%Ca': '\xca', + '%cA': '\xca', '%CA': '\xca', '%cb': '\xcb', '%Cb': '\xcb', '%cB': '\xcb', + '%CB': '\xcb', '%cc': '\xcc', '%Cc': '\xcc', '%cC': '\xcc', '%CC': '\xcc', + '%cd': '\xcd', '%Cd': '\xcd', '%cD': '\xcd', '%CD': '\xcd', '%ce': '\xce', + '%Ce': '\xce', '%cE': '\xce', '%CE': '\xce', '%cf': '\xcf', '%Cf': '\xcf', + '%cF': '\xcf', '%CF': '\xcf', '%d0': '\xd0', '%D0': '\xd0', '%d1': '\xd1', + '%D1': '\xd1', '%d2': '\xd2', '%D2': '\xd2', '%d3': '\xd3', '%D3': '\xd3', + '%d4': '\xd4', '%D4': '\xd4', '%d5': '\xd5', '%D5': '\xd5', '%d6': '\xd6', + '%D6': '\xd6', '%d7': '\xd7', '%D7': '\xd7', '%d8': '\xd8', '%D8': '\xd8', + '%d9': '\xd9', '%D9': '\xd9', '%da': '\xda', '%Da': '\xda', '%dA': '\xda', + '%DA': '\xda', '%db': '\xdb', '%Db': '\xdb', '%dB': '\xdb', '%DB': '\xdb', + '%dc': '\xdc', '%Dc': '\xdc', '%dC': '\xdc', '%DC': '\xdc', '%dd': '\xdd', + '%Dd': '\xdd', '%dD': '\xdd', '%DD': '\xdd', '%de': '\xde', '%De': '\xde', + '%dE': '\xde', '%DE': '\xde', '%df': '\xdf', '%Df': '\xdf', '%dF': '\xdf', + '%DF': '\xdf', '%e0': '\xe0', '%E0': '\xe0', '%e1': '\xe1', '%E1': '\xe1', + '%e2': '\xe2', '%E2': '\xe2', '%e3': '\xe3', '%E3': '\xe3', '%e4': '\xe4', + '%E4': '\xe4', '%e5': '\xe5', '%E5': '\xe5', '%e6': '\xe6', '%E6': '\xe6', + '%e7': '\xe7', '%E7': '\xe7', '%e8': '\xe8', '%E8': '\xe8', '%e9': '\xe9', + '%E9': '\xe9', '%ea': '\xea', '%Ea': '\xea', '%eA': '\xea', '%EA': '\xea', + '%eb': '\xeb', '%Eb': '\xeb', '%eB': '\xeb', '%EB': '\xeb', '%ec': '\xec', + '%Ec': '\xec', '%eC': '\xec', '%EC': '\xec', '%ed': '\xed', '%Ed': '\xed', + '%eD': '\xed', '%ED': '\xed', '%ee': '\xee', '%Ee': '\xee', '%eE': '\xee', + '%EE': '\xee', '%ef': '\xef', '%Ef': '\xef', '%eF': '\xef', '%EF': '\xef', + '%f0': '\xf0', '%F0': '\xf0', '%f1': '\xf1', '%F1': '\xf1', '%f2': '\xf2', + '%F2': '\xf2', '%f3': '\xf3', '%F3': '\xf3', '%f4': '\xf4', '%F4': '\xf4', + '%f5': '\xf5', '%F5': '\xf5', '%f6': '\xf6', '%F6': '\xf6', '%f7': '\xf7', + '%F7': '\xf7', '%f8': '\xf8', '%F8': '\xf8', '%f9': '\xf9', '%F9': '\xf9', + '%fa': '\xfa', '%Fa': '\xfa', '%fA': '\xfa', '%FA': '\xfa', '%fb': '\xfb', + '%Fb': '\xfb', '%fB': '\xfb', '%FB': '\xfb', '%fc': '\xfc', '%Fc': '\xfc', + '%fC': '\xfc', '%FC': '\xfc', '%fd': '\xfd', '%Fd': '\xfd', '%fD': '\xfd', + '%FD': '\xfd', '%fe': '\xfe', '%Fe': '\xfe', '%fE': '\xfe', '%FE': '\xfe', + '%ff': '\xff', '%Ff': '\xff', '%fF': '\xff', '%FF': '\xff' } +function encodedReplacer (match) { + return EncodedLookup[match] +} + +const STATE_KEY = 0 +const STATE_VALUE = 1 +const STATE_CHARSET = 2 +const STATE_LANG = 3 + function parseParams (str) { const res = [] - let state = 'key' + let state = STATE_KEY let charset = '' let inquote = false let escaping = false let p = 0 let tmp = '' + const len = str.length - for (var i = 0, len = str.length; i < len; ++i) { // eslint-disable-line no-var + for (var i = 0; i < len; ++i) { // eslint-disable-line no-var const char = str[i] if (char === '\\' && inquote) { if (escaping) { escaping = false } else { @@ -28,29 +135,31 @@ function parseParams (str) { if (!escaping) { if (inquote) { inquote = false - state = 'key' + state = STATE_KEY } else { inquote = true } continue } else { escaping = false } } else { if (escaping && inquote) { tmp += '\\' } escaping = false - if ((state === 'charset' || state === 'lang') && char === "'") { - if (state === 'charset') { - state = 'lang' + if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { + if (state === STATE_CHARSET) { + state = STATE_LANG charset = tmp.substring(1) - } else { state = 'value' } + } else { state = STATE_VALUE } tmp = '' continue - } else if (state === 'key' && + } else if (state === STATE_KEY && (char === '*' || char === '=') && res.length) { - if (char === '*') { state = 'charset' } else { state = 'value' } + state = char === '*' + ? STATE_CHARSET + : STATE_VALUE res[p] = [tmp, undefined] tmp = '' continue } else if (!inquote && char === ';') { - state = 'key' + state = STATE_KEY if (charset) { if (tmp.length) { tmp = decodeText(tmp.replace(RE_ENCODED, encodedReplacer), diff --git a/deps/undici/src/node_modules/@fastify/busboy/package.json b/deps/undici/src/node_modules/@fastify/busboy/package.json index 3288ee06872612..4be895c108c837 100644 --- a/deps/undici/src/node_modules/@fastify/busboy/package.json +++ b/deps/undici/src/node_modules/@fastify/busboy/package.json @@ -1,6 +1,6 @@ { "name": "@fastify/busboy", - "version": "2.0.0", + "version": "2.1.0", "private": false, "author": "Brian White ", "contributors": [ @@ -17,6 +17,7 @@ ], "description": "A streaming parser for HTML form data for node.js", "main": "lib/main", + "type": "commonjs", "types": "lib/main.d.ts", "scripts": { "bench:busboy": "cd benchmarks && npm install && npm run benchmark-fastify", @@ -26,7 +27,7 @@ "lint:everything": "npm run lint && npm run test:types", "lint:fix": "standard --fix", "lint:standard": "standard --verbose | snazzy", - "test:mocha": "mocha test", + "test:mocha": "tap", "test:types": "tsd", "test:coverage": "nyc npm run test", "test": "npm run test:mocha" @@ -37,15 +38,11 @@ "devDependencies": { "@types/node": "^20.1.0", "busboy": "^1.0.0", - "chai": "^4.3.6", - "eslint": "^8.23.0", - "eslint-config-standard": "^17.0.0", - "eslint-plugin-n": "^16.0.0", - "mocha": "^10.0.0", - "nyc": "^15.1.0", "photofinish": "^1.8.0", "snazzy": "^9.0.0", "standard": "^17.0.0", + "tap": "^16.3.8", + "tinybench": "^2.5.1", "tsd": "^0.29.0", "typescript": "^5.0.2" }, diff --git a/deps/undici/src/package-lock.json b/deps/undici/src/package-lock.json index d6f048345a665b..a9f655fb0bf7ab 100644 --- a/deps/undici/src/package-lock.json +++ b/deps/undici/src/package-lock.json @@ -1,12 +1,12 @@ { "name": "undici", - "version": "5.27.0", + "version": "5.28.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "undici", - "version": "5.27.0", + "version": "5.28.2", "license": "MIT", "dependencies": { "@fastify/busboy": "^2.0.0" @@ -26,20 +26,21 @@ "dns-packet": "^5.4.0", "docsify-cli": "^4.4.3", "form-data": "^4.0.0", - "formdata-node": "^4.3.1", + "formdata-node": "^6.0.3", "https-pem": "^3.0.0", "husky": "^8.0.1", "import-fresh": "^3.3.0", "jest": "^29.0.2", - "jsdom": "^22.1.0", + "jsdom": "^23.0.0", "jsfuzz": "^1.0.15", "mocha": "^10.0.0", + "mockttp": "^3.9.2", "p-timeout": "^3.2.0", "pre-commit": "^1.2.2", "proxy": "^1.0.2", "proxyquire": "^2.1.3", "semver": "^7.5.4", - "sinon": "^16.1.0", + "sinon": "^17.0.1", "snazzy": "^9.0.0", "standard": "^17.0.0", "table": "^6.8.0", @@ -82,12 +83,12 @@ "dev": true }, "node_modules/@babel/code-frame": { - "version": "7.22.13", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz", - "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz", + "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==", "dev": true, "dependencies": { - "@babel/highlight": "^7.22.13", + "@babel/highlight": "^7.23.4", "chalk": "^2.4.2" }, "engines": { @@ -166,30 +167,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz", - "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz", + "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz", - "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.5.tgz", + "integrity": "sha512-Cwc2XjUrG4ilcfOw4wBAK+enbdgwAcAJCfGUItPBKR7Mjw4aEfAFYrLxeRp4jWgtNIKn3n2AlBOfwwafl+42/g==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-module-transforms": "^7.23.0", - "@babel/helpers": "^7.23.2", - "@babel/parser": "^7.23.0", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.23.5", + "@babel/parser": "^7.23.5", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0", + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -237,12 +238,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz", - "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.5.tgz", + "integrity": "sha512-BPssCHrBD+0YrxviOa3QzpqwhNIXKEtOa2jQrm4FlmkC2apYgRnQcmPWiGZDlGxiNtltnUFolMe8497Esry+jA==", "dev": true, "dependencies": { - "@babel/types": "^7.23.0", + "@babel/types": "^7.23.5", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" @@ -323,9 +324,9 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz", - "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz", + "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==", "dev": true, "dependencies": { "@babel/helper-environment-visitor": "^7.22.20", @@ -375,9 +376,9 @@ } }, "node_modules/@babel/helper-string-parser": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz", - "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz", + "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -393,32 +394,32 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.22.15", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz", - "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz", + "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz", - "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.5.tgz", + "integrity": "sha512-oO7us8FzTEsG3U6ag9MfdF1iA/7Z6dz+MtFhifZk8C8o453rGJFFWUP1t+ULM9TUIAzC9uxXEiXjOiVMyd7QPg==", "dev": true, "dependencies": { "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0" + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/highlight": { - "version": "7.22.20", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz", - "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==", + "version": "7.23.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz", + "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", @@ -501,9 +502,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.5.tgz", + "integrity": "sha512-hOOqoiNXrmGdFbhgCzu6GiURxUgM27Xwd/aPuu8RfHEZPBzL1Z54okAHAQjXfcQNwvrlkAmAp4SlRTZ45vlthQ==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -573,9 +574,9 @@ } }, "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz", - "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz", + "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" @@ -675,9 +676,9 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz", - "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==", + "version": "7.23.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz", + "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==", "dev": true, "dependencies": { "@babel/helper-plugin-utils": "^7.22.5" @@ -690,9 +691,9 @@ } }, "node_modules/@babel/runtime": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.2.tgz", - "integrity": "sha512-mM8eg4yl5D6i3lu2QKPuPH4FArvJ8KhTofbE7jwMUv9KX5mBvwPAqnV3MlyBNqdp9RyRKP6Yck8TrfYrPvX3bg==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.5.tgz", + "integrity": "sha512-NdUTHcPe4C99WxPub+K9l9tK5/lV4UXIoaHSYgzco9BCyjKAAwzdBI+wWtYqHt7LJdbo74ZjRPJgzVweq1sz0w==", "dev": true, "dependencies": { "regenerator-runtime": "^0.14.0" @@ -716,19 +717,19 @@ } }, "node_modules/@babel/traverse": { - "version": "7.23.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz", - "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.5.tgz", + "integrity": "sha512-czx7Xy5a6sapWWRx61m1Ke1Ra4vczu1mCTtJam5zRTBOonfdJ+S/B6HYmGYu3fJtr8GGET3si6IhgWVBhJ/m8w==", "dev": true, "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", + "@babel/parser": "^7.23.5", + "@babel/types": "^7.23.5", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -760,12 +761,12 @@ "dev": true }, "node_modules/@babel/types": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz", - "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==", + "version": "7.23.5", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.5.tgz", + "integrity": "sha512-ON5kSOJwVO6xXVRTvOI0eOnWe7VdUcIpsovGo9U/Br4Ie4UVFQTboO2cYnDhAGU6Fp+UxSiT+pMft0SMHfuq6w==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, @@ -804,9 +805,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", - "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz", + "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -895,21 +896,85 @@ } }, "node_modules/@eslint/js": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.52.0.tgz", - "integrity": "sha512-mjZVbpaeMZludF2fsWLD0Z9gCref1Tk4i9+wddjRvpUNqqcndPkBD09N/Mapey0b3jaXbLm2kICwFv2E64QinA==", + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", + "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@fastify/busboy": { - "version": "2.0.0", + "version": "2.1.0", "license": "MIT", "engines": { "node": ">=14" } }, + "node_modules/@graphql-tools/merge": { + "version": "8.3.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/merge/-/merge-8.3.1.tgz", + "integrity": "sha512-BMm99mqdNZbEYeTPK3it9r9S6rsZsQKtlqJsSBknAclXq2pGEfOxjcIZi+kBSkHZKPKCRrYDd5vY0+rUmIHVLg==", + "dev": true, + "dependencies": { + "@graphql-tools/utils": "8.9.0", + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/merge/node_modules/@graphql-tools/utils": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.9.0.tgz", + "integrity": "sha512-pjJIWH0XOVnYGXCqej8g/u/tsfV4LvLlj0eATKQu5zwnxd/TiTHq7Cg313qUPTFFHZ3PP5wJ15chYVtLDwaymg==", + "dev": true, + "dependencies": { + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/schema": { + "version": "8.5.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/schema/-/schema-8.5.1.tgz", + "integrity": "sha512-0Esilsh0P/qYcB5DKQpiKeQs/jevzIadNTaT0jeWklPMwNbT7yMX4EqZany7mbeRRlSRwMzNzL5olyFdffHBZg==", + "dev": true, + "dependencies": { + "@graphql-tools/merge": "8.3.1", + "@graphql-tools/utils": "8.9.0", + "tslib": "^2.4.0", + "value-or-promise": "1.0.11" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/schema/node_modules/@graphql-tools/utils": { + "version": "8.9.0", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.9.0.tgz", + "integrity": "sha512-pjJIWH0XOVnYGXCqej8g/u/tsfV4LvLlj0eATKQu5zwnxd/TiTHq7Cg313qUPTFFHZ3PP5wJ15chYVtLDwaymg==", + "dev": true, + "dependencies": { + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, + "node_modules/@graphql-tools/utils": { + "version": "8.13.1", + "resolved": "https://registry.npmjs.org/@graphql-tools/utils/-/utils-8.13.1.tgz", + "integrity": "sha512-qIh9yYpdUFmctVqovwMdheVNJqFh+DQNWIhX87FJStfXYnmweBUDATok9fWPleKeFwxnW8IapKmY8m8toJEkAw==", + "dev": true, + "dependencies": { + "tslib": "^2.4.0" + }, + "peerDependencies": { + "graphql": "^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0" + } + }, "node_modules/@hapi/hoek": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.3.0.tgz", @@ -925,6 +990,56 @@ "@hapi/hoek": "^9.0.0" } }, + "node_modules/@httptoolkit/httpolyglot": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/@httptoolkit/httpolyglot/-/httpolyglot-2.1.1.tgz", + "integrity": "sha512-TvJOb/9dYmOD1U8sErFKCy5BxQc7kbLuvvRLfsTr+NN9kQGNGRNyenC00mJxUn2ld/WtxPMNup3JICHPUOPXDg==", + "dev": true, + "dependencies": { + "@types/node": "^16.7.10" + }, + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/@httptoolkit/httpolyglot/node_modules/@types/node": { + "version": "16.18.66", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.18.66.tgz", + "integrity": "sha512-sePmD/imfKvC4re/Wwos1NEcXYm6O96CAG5gQVY53nmDb8ePQ4qPku6uruN7n6TJ0t5FhcoUc2+yvE2/UZVDZw==", + "dev": true + }, + "node_modules/@httptoolkit/subscriptions-transport-ws": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/@httptoolkit/subscriptions-transport-ws/-/subscriptions-transport-ws-0.11.2.tgz", + "integrity": "sha512-YB+gYYVjgYUeJrGkfS91ABeNWCFU7EVcn9Cflf2UXjsIiPJEI6yPxujPcjKv9wIJpM+33KQW/qVEmc+BdIDK2w==", + "dev": true, + "dependencies": { + "backo2": "^1.0.2", + "eventemitter3": "^3.1.0", + "iterall": "^1.2.1", + "symbol-observable": "^1.0.4", + "ws": "^8.8.0" + }, + "peerDependencies": { + "graphql": "^15.7.2 || ^16.0.0" + } + }, + "node_modules/@httptoolkit/websocket-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/@httptoolkit/websocket-stream/-/websocket-stream-6.0.1.tgz", + "integrity": "sha512-A0NOZI+Glp3Xgcz6Na7i7o09+/+xm2m0UCU8gdtM2nIv6/cjLmhMZMqehSpTlgbx9omtLmV8LVqOskPEyWnmZQ==", + "dev": true, + "dependencies": { + "@types/ws": "*", + "duplexify": "^3.5.1", + "inherits": "^2.0.1", + "isomorphic-ws": "^4.0.1", + "readable-stream": "^2.3.3", + "safe-buffer": "^5.1.2", + "ws": "*", + "xtend": "^4.0.0" + } + }, "node_modules/@humanwhocodes/config-array": { "version": "0.11.13", "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz", @@ -1483,14 +1598,11 @@ "node": ">=6" } }, - "node_modules/@tootallnate/once": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@tootallnate/once/-/once-2.0.0.tgz", - "integrity": "sha512-XCuKFP5PS55gnMVu3dty8KPatLqUoy/ZYzDzAGCQ8JNFCkLXzmI7vNHCR+XpbZaMWQK/vQubr7PkYq8g470J/A==", - "dev": true, - "engines": { - "node": ">= 10" - } + "node_modules/@tootallnate/quickjs-emscripten": { + "version": "0.23.0", + "resolved": "https://registry.npmjs.org/@tootallnate/quickjs-emscripten/-/quickjs-emscripten-0.23.0.tgz", + "integrity": "sha512-C5Mc6rdnsaJDjO3UpGW/CQTHtCKaYlScZTly4JIu97Jxo/odCiH0ITnDXSJPTOrEKk/ycSZ0AOgTmkDtkOsvIA==", + "dev": true }, "node_modules/@tsd/typescript": { "version": "5.2.2", @@ -1502,9 +1614,9 @@ } }, "node_modules/@types/babel__core": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.3.tgz", - "integrity": "sha512-54fjTSeSHwfan8AyHWrKbfBWiEUrNTZsUwPTDSNaaP1QDQIZbeNUg3a59E9D+375MzUw/x1vx2/0F5LBz+AeYA==", + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", "dev": true, "dependencies": { "@babel/parser": "^7.20.7", @@ -1515,18 +1627,18 @@ } }, "node_modules/@types/babel__generator": { - "version": "7.6.6", - "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.6.tgz", - "integrity": "sha512-66BXMKb/sUWbMdBNdMvajU7i/44RkrA3z/Yt1c7R5xejt8qh84iU54yUWCtm0QwGJlDcf/gg4zd/x4mpLAlb/w==", + "version": "7.6.7", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.7.tgz", + "integrity": "sha512-6Sfsq+EaaLrw4RmdFWE9Onp63TOUue71AWb4Gpa6JxzgTYtimbM086WnYTy2U67AofR++QKCo08ZP6pwx8YFHQ==", "dev": true, "dependencies": { "@babel/types": "^7.0.0" } }, "node_modules/@types/babel__template": { - "version": "7.4.3", - "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.3.tgz", - "integrity": "sha512-ciwyCLeuRfxboZ4isgdNZi/tkt06m8Tw6uGbBSBgWrnnZGNXiEyM27xc/PjXGQLqlZ6ylbgHMnm7ccF9tCkOeQ==", + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", "dev": true, "dependencies": { "@babel/parser": "^7.1.0", @@ -1534,14 +1646,23 @@ } }, "node_modules/@types/babel__traverse": { - "version": "7.20.3", - "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.3.tgz", - "integrity": "sha512-Lsh766rGEFbaxMIDH7Qa+Yha8cMVI3qAK6CHt3OR0YfxOIn5Z54iHiyDRycHrBqeIiqGa20Kpsv1cavfBKkRSw==", + "version": "7.20.4", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.4.tgz", + "integrity": "sha512-mSM/iKUk5fDDrEV/e83qY+Cr3I1+Q3qqTuEn++HAWYjEa1+NxZr6CNrcJGf2ZTnq4HoFGC3zaTPZTobCzCFukA==", "dev": true, "dependencies": { "@babel/types": "^7.20.7" } }, + "node_modules/@types/cors": { + "version": "2.8.17", + "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.17.tgz", + "integrity": "sha512-8CGDvrBj1zgo2qE+oS3pOCyYNqCPryMWY2bGfwA0dcfopWGgxs+78df0Rs3rc9THP4JkOhLsAa+15VdpAqkcUA==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/escodegen": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/@types/escodegen/-/escodegen-0.0.6.tgz", @@ -1559,9 +1680,9 @@ } }, "node_modules/@types/esprima": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@types/esprima/-/esprima-4.0.5.tgz", - "integrity": "sha512-i1/wCCoHMGLSfEn68SZvao+ICYR7clqRfUAiCkxzqB7DuOMLVAgiiAcxSixtY7NukBnbQNDt5C1zmaLqCX8jDw==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@types/esprima/-/esprima-4.0.6.tgz", + "integrity": "sha512-lIk+kSt9lGv5hxK6aZNjiUEGZqKmOTpmg0tKiJQI+Ow98fLillxsiZNik5+RcP7mXL929KiTH/D9jGtpDlMbVw==", "dev": true, "dependencies": { "@types/estree": "*" @@ -1583,42 +1704,42 @@ "dev": true }, "node_modules/@types/graceful-fs": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.8.tgz", - "integrity": "sha512-NhRH7YzWq8WiNKVavKPBmtLYZHxNY19Hh+az28O/phfp68CF45pMFud+ZzJ8ewnxnC5smIdF3dqFeiSUQ5I+pw==", + "version": "4.1.9", + "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz", + "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/istanbul-lib-coverage": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.5.tgz", - "integrity": "sha512-zONci81DZYCZjiLe0r6equvZut0b+dBRPBN5kBDjsONnutYNtJMoWQ9uR2RkL1gLG9NMTzvf+29e5RFfPbeKhQ==", + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz", + "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==", "dev": true }, "node_modules/@types/istanbul-lib-report": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.2.tgz", - "integrity": "sha512-8toY6FgdltSdONav1XtUHl4LN1yTmLza+EuDazb/fEmRNCwjyqNVIQWs2IfC74IqjHkREs/nQ2FWq5kZU9IC0w==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz", + "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==", "dev": true, "dependencies": { "@types/istanbul-lib-coverage": "*" } }, "node_modules/@types/istanbul-reports": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.3.tgz", - "integrity": "sha512-1nESsePMBlf0RPRffLZi5ujYh7IH1BWL4y9pr+Bn3cJBdxz+RTP8bUFljLz9HvzhhOSWKdyBZ4DIivdL6rvgZg==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz", + "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==", "dev": true, "dependencies": { "@types/istanbul-lib-report": "*" } }, "node_modules/@types/json-schema": { - "version": "7.0.14", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.14.tgz", - "integrity": "sha512-U3PUjAudAdJBeC2pgN8uTIKgxrb4nlDF3SF0++EldXQvQBGkpFZMSnwQiIoDU77tv45VgNkl/L4ouD+rEomujw==", + "version": "7.0.15", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", + "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true }, "node_modules/@types/json5": { @@ -1628,54 +1749,63 @@ "dev": true }, "node_modules/@types/minimist": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.4.tgz", - "integrity": "sha512-Kfe/D3hxHTusnPNRbycJE1N77WHDsdS4AjUYIzlDzhDrS47NrwuL3YW4VITxwR7KCVpzwgy4Rbj829KSSQmwXQ==", + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==", "dev": true }, "node_modules/@types/node": { - "version": "18.18.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-18.18.7.tgz", - "integrity": "sha512-bw+lEsxis6eqJYW8Ql6+yTqkE6RuFtsQPSe5JxXbqYRFQEER5aJA9a5UH9igqDWm3X4iLHIKOHlnAXLM4mi7uQ==", + "version": "18.19.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.1.tgz", + "integrity": "sha512-mZJ9V11gG5Vp0Ox2oERpeFDl+JvCwK24PGy76vVY/UgBtjwJWc5rYBThFxmbnYOm9UPZNm6wEl/sxHt2SU7x9A==", "dev": true, "dependencies": { "undici-types": "~5.26.4" } }, "node_modules/@types/node-forge": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.8.tgz", - "integrity": "sha512-vGXshY9vim9CJjrpcS5raqSjEfKlJcWy2HNdgUasR66fAnVEYarrf1ULV4nfvpC1nZq/moA9qyqBcu83x+Jlrg==", + "version": "1.3.10", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.10.tgz", + "integrity": "sha512-y6PJDYN4xYBxwd22l+OVH35N+1fCYWiuC3aiP2SlXVE6Lo7SS+rSx9r89hLxrP4pn6n1lBGhHJ12pj3F3Mpttw==", "dev": true, "dependencies": { "@types/node": "*" } }, "node_modules/@types/normalize-package-data": { - "version": "2.4.3", - "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.3.tgz", - "integrity": "sha512-ehPtgRgaULsFG8x0NeYJvmyH1hmlfsNLujHe9dQEia/7MAJYdzMSi19JtchUHjmBA6XC/75dK55mzZH+RyieSg==", + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", "dev": true }, "node_modules/@types/stack-utils": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.2.tgz", - "integrity": "sha512-g7CK9nHdwjK2n0ymT2CW698FuWJRIx+RP6embAzZ2Qi8/ilIrA1Imt2LVSeHUzKvpoi7BhmmQcXz95eS0f2JXw==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz", + "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==", "dev": true }, + "node_modules/@types/ws": { + "version": "8.5.10", + "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", + "integrity": "sha512-vmQSUcfalpIq0R9q7uTo2lXs6eGIpt9wtnLdMv9LVpIjCA/+ufZRozlVoVelIYixx1ugCBKDhn89vnsEGOCx9A==", + "dev": true, + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/yargs": { - "version": "17.0.29", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.29.tgz", - "integrity": "sha512-nacjqA3ee9zRF/++a3FUY1suHTFKZeHba2n8WeDw9cCVdmzmHpIxyzOJBcpHvvEmS8E9KqWlSnWHUkOrkhWcvA==", + "version": "17.0.32", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", + "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", "dev": true, "dependencies": { "@types/yargs-parser": "*" } }, "node_modules/@types/yargs-parser": { - "version": "21.0.2", - "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.2.tgz", - "integrity": "sha512-5qcvofLPbfjmBfKaLfj/+f+Sbd6pN4zl7w7VSVI5uz7m9QZTuB2aZAa2uo1wHFBNN2x6g/SoTkXmd8mQnQF2Cw==", + "version": "21.0.3", + "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz", + "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==", "dev": true }, "node_modules/@ungap/structured-clone": { @@ -1684,12 +1814,6 @@ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==", "dev": true }, - "node_modules/abab": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz", - "integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA==", - "dev": true - }, "node_modules/abort-controller": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz", @@ -1702,6 +1826,19 @@ "node": ">=6.5" } }, + "node_modules/accepts": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", + "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", + "dev": true, + "dependencies": { + "mime-types": "~2.1.34", + "negotiator": "0.6.3" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/acorn": { "version": "8.11.2", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz", @@ -1733,15 +1870,15 @@ } }, "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-7.1.0.tgz", + "integrity": "sha512-o/zjMZRhJxny7OyEF+Op8X+efiELC7k7yOjMzgfzVqOzXqkBkWI79YoTdOtsuWd5BWhAGAuOY/Xa6xpiaWXiNg==", "dev": true, "dependencies": { - "debug": "4" + "debug": "^4.3.4" }, "engines": { - "node": ">= 6.0.0" + "node": ">= 14" } }, "node_modules/agent-base/node_modules/debug": { @@ -2010,6 +2147,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==", + "dev": true + }, "node_modules/array-includes": { "version": "3.1.7", "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz", @@ -2145,6 +2288,18 @@ "node": "*" } }, + "node_modules/ast-types": { + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.4.tgz", + "integrity": "sha512-x1FCFnFifvYDDzTaLII71vG5uvDwgtmDTEVWAxrgeiR8VjMONcCXJx7E+USjDtHlwFmt9MysbqgF9b9Vjr6w+w==", + "dev": true, + "dependencies": { + "tslib": "^2.0.1" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/astral-regex": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", @@ -2154,6 +2309,15 @@ "node": ">=8" } }, + "node_modules/async": { + "version": "2.6.4", + "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", + "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", + "dev": true, + "dependencies": { + "lodash": "^4.17.14" + } + }, "node_modules/async-hook-domain": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/async-hook-domain/-/async-hook-domain-2.0.4.tgz", @@ -2200,13 +2364,14 @@ } }, "node_modules/axios": { - "version": "0.27.2", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", - "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.2.tgz", + "integrity": "sha512-7i24Ri4pmDRfJTR7LDBhsOTtcm+9kjX5WiY1X3wIisx6G9So3pfMkEiU7emUBe46oceVImccTEM3k6C5dbVW8A==", "dev": true, "dependencies": { - "follow-redirects": "^1.14.9", - "form-data": "^4.0.0" + "follow-redirects": "^1.15.0", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" } }, "node_modules/babel-jest": { @@ -2325,12 +2490,27 @@ "@babel/core": "^7.0.0" } }, + "node_modules/backo2": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/backo2/-/backo2-1.0.2.tgz", + "integrity": "sha512-zj6Z6M7Eq+PBZ7PQxl5NT665MvJdAkzp0f60nAJ+sLaSCBPMwVak5ZegFbgVCzFcCJTKFoMizvM5Ld7+JrRJHA==", + "dev": true + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, + "node_modules/base64-arraybuffer": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/base64-arraybuffer/-/base64-arraybuffer-0.1.5.tgz", + "integrity": "sha512-437oANT9tP582zZMwSvZGy2nmSeAb8DW2me3y+Uv1Wp2Rulr8Mqlyrv3E7MLxmsiaPSMMDmiDVzgE+e8zlMx9g==", + "dev": true, + "engines": { + "node": ">= 0.6.0" + } + }, "node_modules/base64-js": { "version": "1.5.1", "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", @@ -2357,6 +2537,15 @@ "integrity": "sha512-Y7OBvWn+JnW45JWHLY6ybYub2k9cXCMrtCyO1Hds2s6eqClqWhPnOQpgXUPjAiMHj+A8TEPIQQ1dYENnJoBOHQ==", "dev": true }, + "node_modules/basic-ftp": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/basic-ftp/-/basic-ftp-5.0.3.tgz", + "integrity": "sha512-QHX8HLlncOLpy54mh+k/sWIFd0ThmRqwe9ZjELybGZK+tZ8rUb9VO0saKJUROTbE+KhzDUT7xziGpGrW8Kmd+g==", + "dev": true, + "engines": { + "node": ">=10.0.0" + } + }, "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", @@ -2375,6 +2564,42 @@ "node": ">=10" } }, + "node_modules/body-parser": { + "version": "1.20.2", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.2.tgz", + "integrity": "sha512-ml9pReCu3M61kGlqoTm2umSXTlRTuGTx0bfYj+uIUKKYycG5NtSbeetV3faSU6R7ajOPw0g/J1PvK4qNy7s5bA==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.5", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.2", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/body-parser/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/boxen": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/boxen/-/boxen-4.2.0.tgz", @@ -2453,6 +2678,12 @@ "node": ">=8" } }, + "node_modules/brotli-wasm": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/brotli-wasm/-/brotli-wasm-1.3.1.tgz", + "integrity": "sha512-Vp+v3QXddvy39Ycbmvd3/Y1kUvKhwtnprzeABcKWN4jmyg6W3W5MhGPCfXBMHeSQnizgpV59iWmkSRp7ykOnDQ==", + "dev": true + }, "node_modules/browser-stdout": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", @@ -2515,6 +2746,24 @@ "semver": "^7.0.0" } }, + "node_modules/bytes": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", + "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/cacheable-lookup": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/cacheable-lookup/-/cacheable-lookup-6.1.0.tgz", + "integrity": "sha512-KJ/Dmo1lDDhmW2XDPMo+9oiy/CeqosPguPCrgcVzKyZrL6pM1gU2GmPY/xo6OQPTUaA/c0kwHuywB4E6nmT9ww==", + "dev": true, + "engines": { + "node": ">=10.6.0" + } + }, "node_modules/cacheable-request": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/cacheable-request/-/cacheable-request-6.1.0.tgz", @@ -2600,6 +2849,15 @@ "node": ">=6" } }, + "node_modules/caching-transform/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/caching-transform/node_modules/semver": { "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", @@ -2669,10 +2927,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/camelcase-keys/node_modules/quick-lru": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", + "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/caniuse-lite": { - "version": "1.0.30001557", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001557.tgz", - "integrity": "sha512-91oR7hLNUP3gG6MLU+n96em322a8Xzes8wWdBKhLgUoiJsAF5irZnxSUCbc+qUZXNnPCfUwLOi9ZCZpkvjQajw==", + "version": "1.0.30001565", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001565.tgz", + "integrity": "sha512-xrE//a3O7TP0vaJ8ikzkD2c2NgcVUvsEe2IvFTntV4Yd1Z9FVzh+gW+enX96L0psrbaFMcVcH2l90xNuGDWc8w==", "dev": true, "funding": [ { @@ -2936,6 +3203,15 @@ "node": ">= 0.8" } }, + "node_modules/common-tags": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/common-tags/-/common-tags-1.8.2.tgz", + "integrity": "sha512-gk/Z852D2Wtb//0I+kRFNKKE9dIIVirjoqPoA1wJU+XePVXZfGeBpk45+A1rKO4Q43prqWBNY/MiIeRLbPWUaA==", + "dev": true, + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -2963,42 +3239,6 @@ "typedarray": "^0.0.6" } }, - "node_modules/concat-stream/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/concat-stream/node_modules/readable-stream": { - "version": "2.3.8", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", - "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/concat-stream/node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/concat-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, "node_modules/concurrently": { "version": "8.2.2", "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-8.2.2.tgz", @@ -3088,19 +3328,74 @@ "node": "*" } }, + "node_modules/content-disposition": { + "version": "0.5.4", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", + "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", + "dev": true, + "dependencies": { + "safe-buffer": "5.2.1" + }, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/content-type": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.5.tgz", + "integrity": "sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, + "node_modules/cookie": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", + "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, + "node_modules/cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", + "dev": true + }, "node_modules/core-util-is": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", "dev": true }, - "node_modules/cp-file": { + "node_modules/cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "dev": true, + "dependencies": { + "object-assign": "^4", + "vary": "^1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/cors-gate": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cors-gate/-/cors-gate-1.1.3.tgz", + "integrity": "sha512-RFqvbbpj02lqKDhqasBEkgzmT3RseCH3DKy5sT2W9S1mhctABKQP3ktKcnKN0h8t4pJ2SneI3hPl3TGNi/VmZA==", + "dev": true + }, + "node_modules/cp-file": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/cp-file/-/cp-file-7.0.0.tgz", "integrity": "sha512-0Cbj7gyvFVApzpK/uhCtQ/9kE9UnYpxMzaq5nQQC/Dh4iaj5fxp7iEFIullrYwzj8nf0qnsI1Qsx34hAeAebvw==", @@ -3150,6 +3445,15 @@ "node": ">= 18.18.0" } }, + "node_modules/cross-fetch": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.8.tgz", + "integrity": "sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==", + "dev": true, + "dependencies": { + "node-fetch": "^2.6.12" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3185,18 +3489,26 @@ "node": ">=14" } }, + "node_modules/data-uri-to-buffer": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-6.0.1.tgz", + "integrity": "sha512-MZd3VlchQkp8rdend6vrx7MmVDJzSNTBvghvKjirLkD+WTChA3KUf0jkE68Q4UyctNqI11zZO9/x2Yx+ub5Cvg==", + "dev": true, + "engines": { + "node": ">= 14" + } + }, "node_modules/data-urls": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-4.0.0.tgz", - "integrity": "sha512-/mMTei/JXPqvFqQtfyTowxmJVwr2PVAeCcDxyFf6LhoOu/09TX2OX3kb2wzi4DMXcfj4OItwDOnhl5oziPnT6g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-5.0.0.tgz", + "integrity": "sha512-ZYP5VBHshaDAiVZxjbRVcFJpc+4xGgT0bK3vzy1HLN8jTO975HEbuYzZJcHoQEY5K1a0z8YayJkyVETa08eNTg==", "dev": true, "dependencies": { - "abab": "^2.0.6", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.0" + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/date-fns": { @@ -3303,17 +3615,20 @@ } }, "node_modules/deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.2.tgz", + "integrity": "sha512-5tdhKF6DbU7iIzrIOa1AOUt39ZRm13cmL1cGEh//aqR8x9+tNfbywRf0n5FD/18OKMdo7DNEtrX2t22ZAkI+eg==", "dev": true, "dependencies": { - "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", + "is-arguments": "^1.1.1", + "is-date-object": "^1.0.5", + "is-regex": "^1.1.4", + "object-is": "^1.1.5", "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" + "regexp.prototype.flags": "^1.5.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -3401,6 +3716,50 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/degenerator": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/degenerator/-/degenerator-5.0.1.tgz", + "integrity": "sha512-TllpMR/t0M5sqCXfj85i4XaAzxmS5tVA16dqvdkMwGmzI+dXLXnw3J+3Vdv7VKw+ThlTMboK6i9rnZ6Nntj5CQ==", + "dev": true, + "dependencies": { + "ast-types": "^0.13.4", + "escodegen": "^2.1.0", + "esprima": "^4.0.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/degenerator/node_modules/escodegen": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-2.1.0.tgz", + "integrity": "sha512-2NlIDTwUWJN0mRPQOdtQBzbUHvdGY2P1VXSyU83Q3xKxM7WHX2Ql8dKq782Q9TgQUNOLEzEYu9bzLNj1q88I5w==", + "dev": true, + "dependencies": { + "esprima": "^4.0.1", + "estraverse": "^5.2.0", + "esutils": "^2.0.2" + }, + "bin": { + "escodegen": "bin/escodegen.js", + "esgenerate": "bin/esgenerate.js" + }, + "engines": { + "node": ">=6.0" + }, + "optionalDependencies": { + "source-map": "~0.6.1" + } + }, + "node_modules/degenerator/node_modules/estraverse": { + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", + "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", + "dev": true, + "engines": { + "node": ">=4.0" + } + }, "node_modules/delay": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/delay/-/delay-5.0.0.tgz", @@ -3441,6 +3800,18 @@ "npm": "1.2.8000 || >= 1.4.16" } }, + "node_modules/destroyable-server": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/destroyable-server/-/destroyable-server-1.0.0.tgz", + "integrity": "sha512-78rUr9j0b4bRWO0eBtqKqmb43htBwNbofRRukpo+R7PZqHD6llb7aQoNVt81U9NQGhINRKBHz7lkrxZJj9vyog==", + "dev": true, + "dependencies": { + "@types/node": "*" + }, + "engines": { + "node": ">=12.0.0" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -3757,18 +4128,6 @@ "node": ">=6.0.0" } }, - "node_modules/domexception": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/domexception/-/domexception-4.0.0.tgz", - "integrity": "sha512-A2is4PLG+eeSfoTMA95/s4pvAoSo2mKtiM5jlHkAVewmiO8ISFTFKZjH7UAM1Atli/OT/7JHOrJRJiMKUZKYBw==", - "dev": true, - "dependencies": { - "webidl-conversions": "^7.0.0" - }, - "engines": { - "node": ">=12" - } - }, "node_modules/dot-prop": { "version": "5.3.0", "resolved": "https://registry.npmjs.org/dot-prop/-/dot-prop-5.3.0.tgz", @@ -3787,6 +4146,18 @@ "integrity": "sha512-1A8za6ws41LQgv9HrE/66jyC5yuSjQ3L/KOpFtoBilsAK2iA2wuS5rTt1OCzIvtS2V7nVmedsUU+DGRcjBmOYA==", "dev": true }, + "node_modules/duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "dependencies": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, "node_modules/ee-first": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", @@ -3794,9 +4165,9 @@ "dev": true }, "node_modules/electron-to-chromium": { - "version": "1.4.569", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.569.tgz", - "integrity": "sha512-LsrJjZ0IbVy12ApW3gpYpcmHS3iRxH4bkKOW98y1/D+3cvDUWGcbzbsFinfUS8knpcZk/PG/2p/RnkMCYN7PVg==", + "version": "1.4.601", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.601.tgz", + "integrity": "sha512-SpwUMDWe9tQu8JX5QCO1+p/hChAi9AE9UpoC3rcHVc+gdCGlbT3SGb5I1klgb952HRIyvt9wZhSz9bNBYz9swA==", "dev": true }, "node_modules/emittery": { @@ -4049,15 +4420,15 @@ } }, "node_modules/eslint": { - "version": "8.52.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.52.0.tgz", - "integrity": "sha512-zh/JHnaixqHZsolRB/w9/02akBk9EPrOs9JwcTP2ek7yL5bVvXuRariiaAjjoJ5DvuwQ1WAE/HsMz+w17YgBCg==", + "version": "8.55.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", + "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.2", - "@eslint/js": "8.52.0", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.55.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -4815,6 +5186,12 @@ "node": ">=6" } }, + "node_modules/eventemitter3": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-3.1.2.tgz", + "integrity": "sha512-tvtQIeLVHjDkJYnzf2dgVMxfuSGJeM/7UCG17TT4EumTfNtF+0nebF/4zWOIkCreAbtNqhGEboB6BWrwqNaw4Q==", + "dev": true + }, "node_modules/events-to-array": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/events-to-array/-/events-to-array-1.1.2.tgz", @@ -4869,6 +5246,126 @@ "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, + "node_modules/express": { + "version": "4.18.2", + "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", + "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", + "dev": true, + "dependencies": { + "accepts": "~1.3.8", + "array-flatten": "1.1.1", + "body-parser": "1.20.1", + "content-disposition": "0.5.4", + "content-type": "~1.0.4", + "cookie": "0.5.0", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "2.0.0", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.2.0", + "fresh": "0.5.2", + "http-errors": "2.0.0", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.7", + "qs": "6.11.0", + "range-parser": "~1.2.1", + "safe-buffer": "5.2.1", + "send": "0.18.0", + "serve-static": "1.15.0", + "setprototypeof": "1.2.0", + "statuses": "2.0.1", + "type-is": "~1.6.18", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "engines": { + "node": ">= 0.10.0" + } + }, + "node_modules/express/node_modules/body-parser": { + "version": "1.20.1", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", + "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "2.0.0", + "destroy": "1.2.0", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "on-finished": "2.4.1", + "qs": "6.11.0", + "raw-body": "2.5.1", + "type-is": "~1.6.18", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8", + "npm": "1.2.8000 || >= 1.4.16" + } + }, + "node_modules/express/node_modules/finalhandler": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", + "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", + "dev": true, + "dependencies": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "2.4.1", + "parseurl": "~1.3.3", + "statuses": "2.0.1", + "unpipe": "~1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/on-finished": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", + "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", + "dev": true, + "dependencies": { + "ee-first": "1.1.1" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/raw-body": { + "version": "2.5.1", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", + "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/express/node_modules/statuses": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", + "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -4876,9 +5373,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz", - "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==", + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz", + "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -5076,6 +5573,15 @@ "node": ">=4" } }, + "node_modules/find-cache-dir/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/find-cache-dir/node_modules/pkg-dir": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-3.0.0.tgz", @@ -5126,9 +5632,9 @@ } }, "node_modules/flat-cache": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz", - "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz", + "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==", "dev": true, "dependencies": { "flatted": "^3.2.9", @@ -5136,7 +5642,7 @@ "rimraf": "^3.0.2" }, "engines": { - "node": ">=12.0.0" + "node": "^10.12.0 || >=12.0.0" } }, "node_modules/flat-cache/node_modules/rimraf": { @@ -5252,16 +5758,21 @@ } }, "node_modules/formdata-node": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-4.4.1.tgz", - "integrity": "sha512-0iirZp3uVDjVGt9p49aTaqjk84TrglENEDuqfdlZQ1roC9CWlPk6Avf8EEnZNcAqPonwkG35x4n3ww/1THYAeQ==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/formdata-node/-/formdata-node-6.0.3.tgz", + "integrity": "sha512-8e1++BCiTzUno9v5IZ2J6bv4RU+3UKDmqWUQD0MIMVCd9AdhWkO1gw57oo1mNEX1dMq2EGI+FbWz4B92pscSQg==", + "dev": true, + "engines": { + "node": ">= 18" + } + }, + "node_modules/forwarded": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", + "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", "dev": true, - "dependencies": { - "node-domexception": "1.0.0", - "web-streams-polyfill": "4.0.0-beta.3" - }, "engines": { - "node": ">= 12.20" + "node": ">= 0.6" } }, "node_modules/fresh": { @@ -5478,6 +5989,44 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-uri": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/get-uri/-/get-uri-6.0.2.tgz", + "integrity": "sha512-5KLucCJobh8vBY1K07EFV4+cPZH3mrV9YeAruUseCQKHB58SGjjT2l9/eA9LD082IiuMjSlFJEcdJ27TXvbZNw==", + "dev": true, + "dependencies": { + "basic-ftp": "^5.0.2", + "data-uri-to-buffer": "^6.0.0", + "debug": "^4.3.4", + "fs-extra": "^8.1.0" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/get-uri/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/get-uri/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/glob": { "version": "7.2.3", "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", @@ -5627,6 +6176,54 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, + "node_modules/graphql": { + "version": "15.8.0", + "resolved": "https://registry.npmjs.org/graphql/-/graphql-15.8.0.tgz", + "integrity": "sha512-5gghUc24tP9HRznNpV2+FIoq3xKkj5dTQqf4v0CpdPbFVwFkWoxOM+o+2OC9ZSvjEMTjfmG9QT+gcvggTwW1zw==", + "dev": true, + "engines": { + "node": ">= 10.x" + } + }, + "node_modules/graphql-http": { + "version": "1.22.0", + "resolved": "https://registry.npmjs.org/graphql-http/-/graphql-http-1.22.0.tgz", + "integrity": "sha512-9RBUlGJWBFqz9LwfpmAbjJL/8j/HCNkZwPBU5+Bfmwez+1Ay43DocMNQYpIWsWqH0Ftv6PTNAh2aRnnMCBJgLw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "peerDependencies": { + "graphql": ">=0.11 <=16" + } + }, + "node_modules/graphql-subscriptions": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/graphql-subscriptions/-/graphql-subscriptions-1.2.1.tgz", + "integrity": "sha512-95yD/tKi24q8xYa7Q9rhQN16AYj5wPbrb8tmHGM3WRc9EBmWrG/0kkMl+tQG8wcEuE9ibR4zyOM31p5Sdr2v4g==", + "dev": true, + "dependencies": { + "iterall": "^1.3.0" + }, + "peerDependencies": { + "graphql": "^0.10.5 || ^0.11.3 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0" + } + }, + "node_modules/graphql-tag": { + "version": "2.12.6", + "resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz", + "integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==", + "dev": true, + "dependencies": { + "tslib": "^2.1.0" + }, + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0" + } + }, "node_modules/hard-rejection": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/hard-rejection/-/hard-rejection-2.1.0.tgz", @@ -5822,15 +6419,15 @@ "dev": true }, "node_modules/html-encoding-sniffer": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", - "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-4.0.0.tgz", + "integrity": "sha512-Y22oTqIU4uuPgEemfz7NDJz6OeKf12Lsu+QC+s3BVpda64lTiMYCyGwg5ki4vFxkMwQdeZDl2adZoqUgdFuTgQ==", "dev": true, "dependencies": { - "whatwg-encoding": "^2.0.0" + "whatwg-encoding": "^3.1.1" }, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/html-escaper": { @@ -5845,6 +6442,17 @@ "integrity": "sha512-er295DKPVsV82j5kw1Gjt+ADA/XYHsajl82cGNQG2eyoPkvgUhX+nDIyelzhIWbbsXP39EHcI6l5tYs2FYqYXQ==", "dev": true }, + "node_modules/http-encoding": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/http-encoding/-/http-encoding-1.5.1.tgz", + "integrity": "sha512-2m4JnG1Z5RX5pRMdccyp6rX1jVo4LO+ussQzWdwR4AmrWhtX0KP1NyslVAFAspQwMxt2P00CCWXIBKj7ILZLpQ==", + "dev": true, + "dependencies": { + "brotli-wasm": "^1.1.0", + "pify": "^5.0.0", + "zstd-codec": "^0.1.4" + } + }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -5871,17 +6479,16 @@ } }, "node_modules/http-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-5.0.0.tgz", - "integrity": "sha512-n2hY8YdoRE1i7r6M0w9DIw5GgZN0G25P8zLCRQ8rjXtTU3vsNFBI/vWK/UIeE6g5MUUz6avwAPXmL6Fy9D/90w==", + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/http-proxy-agent/-/http-proxy-agent-7.0.0.tgz", + "integrity": "sha512-+ZT+iBxVUQ1asugqnD6oWoRiS25AkjNfG085dKJGtGxkdwLQrMKU5wJr2bOOFAXzKcTuqq+7fZlTMgG3SRfIYQ==", "dev": true, "dependencies": { - "@tootallnate/once": "2", - "agent-base": "6", - "debug": "4" + "agent-base": "^7.1.0", + "debug": "^4.3.4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/http-proxy-agent/node_modules/debug": { @@ -5907,6 +6514,19 @@ "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, + "node_modules/http2-wrapper": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/http2-wrapper/-/http2-wrapper-2.2.1.tgz", + "integrity": "sha512-V5nVw1PAOgfI3Lmeaj2Exmeg7fenjhRUgz1lPSezy1CuhPYbgQtbQj4jZfEAEMlaL+vupsvhjqCyjzob0yxsmQ==", + "dev": true, + "dependencies": { + "quick-lru": "^5.1.1", + "resolve-alpn": "^1.2.0" + }, + "engines": { + "node": ">=10.19.0" + } + }, "node_modules/https-pem": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/https-pem/-/https-pem-3.0.0.tgz", @@ -5918,16 +6538,16 @@ } }, "node_modules/https-proxy-agent": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", - "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "version": "7.0.2", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-7.0.2.tgz", + "integrity": "sha512-NmLNjm6ucYwtcUmL7JQC1ZQ57LmHP4lT15FQ8D61nak1rO6DH+fz5qNK2Ap5UN4ZapYICE3/0KodcLYSPsPbaA==", "dev": true, "dependencies": { - "agent-base": "6", + "agent-base": "^7.0.2", "debug": "4" }, "engines": { - "node": ">= 6" + "node": ">= 14" } }, "node_modules/https-proxy-agent/node_modules/debug": { @@ -5978,21 +6598,21 @@ } }, "node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", "dev": true, "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" + "safer-buffer": ">= 2.1.2 < 3" }, "engines": { "node": ">=0.10.0" } }, "node_modules/ignore": { - "version": "5.2.4", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz", - "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz", + "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==", "dev": true, "engines": { "node": ">= 4" @@ -6102,6 +6722,21 @@ "integrity": "sha512-j8grHGDzv1v+8T1sAQ+3boTCntFPfvxLCkNcxB1J8qA0lUN+fAlSyYd+RXKvaPRL4AGyPxViutBEJHNXOyUdFQ==", "dev": true }, + "node_modules/ip": { + "version": "1.1.8", + "resolved": "https://registry.npmjs.org/ip/-/ip-1.1.8.tgz", + "integrity": "sha512-PuExPYUiu6qMBQb4l06ecm6T6ujzhmh+MeJcW9wa89PoAz5pvd4zPgN5WJV104mb6S2T1AwNIAaB70JNrLQWhg==", + "dev": true + }, + "node_modules/ipaddr.js": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", + "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", + "dev": true, + "engines": { + "node": ">= 0.10" + } + }, "node_modules/irregular-plurals": { "version": "3.5.0", "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-3.5.0.tgz", @@ -6608,9 +7243,9 @@ "dev": true }, "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", "dev": true }, "node_modules/isexe": { @@ -6619,10 +7254,19 @@ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", "dev": true }, + "node_modules/isomorphic-ws": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/isomorphic-ws/-/isomorphic-ws-4.0.1.tgz", + "integrity": "sha512-BhBvN2MBpWTaSHdWRb/bwdZJ1WaehQ2L1KngkCkfLUGF0mAWAT1sQUQacEmQ0jXkFw/czDXPNQSL5u2/Krsz1w==", + "dev": true, + "peerDependencies": { + "ws": "*" + } + }, "node_modules/istanbul-lib-coverage": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz", - "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==", + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz", + "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==", "dev": true, "engines": { "node": ">=8" @@ -6688,15 +7332,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/istanbul-lib-processinfo/node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/istanbul-lib-report": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz", @@ -6788,6 +7423,12 @@ "node": ">=8" } }, + "node_modules/iterall": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/iterall/-/iterall-1.3.0.tgz", + "integrity": "sha512-QZ9qOMdF+QLHxy1QIpUHUU1D5pS2CG2P69LF6L6CPjPYA/XMOmKV3PZpawHoAjHNyB0swdVTRxdYT4tbBbxqwg==", + "dev": true + }, "node_modules/iterator.prototype": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/iterator.prototype/-/iterator.prototype-1.1.2.tgz", @@ -7386,40 +8027,38 @@ } }, "node_modules/jsdom": { - "version": "22.1.0", - "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-22.1.0.tgz", - "integrity": "sha512-/9AVW7xNbsBv6GfWho4TTNjEo9fe6Zhf9O7s0Fhhr3u+awPwAJMKwAMXnkk5vBxflqLW9hTHX/0cs+P3gW+cQw==", + "version": "23.0.1", + "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-23.0.1.tgz", + "integrity": "sha512-2i27vgvlUsGEBO9+/kJQRbtqtm+191b5zAZrU/UezVmnC2dlDAFLgDYJvAEi94T4kjsRKkezEtLQTgsNEsW2lQ==", "dev": true, "dependencies": { - "abab": "^2.0.6", "cssstyle": "^3.0.0", - "data-urls": "^4.0.0", + "data-urls": "^5.0.0", "decimal.js": "^10.4.3", - "domexception": "^4.0.0", "form-data": "^4.0.0", - "html-encoding-sniffer": "^3.0.0", - "http-proxy-agent": "^5.0.0", - "https-proxy-agent": "^5.0.1", + "html-encoding-sniffer": "^4.0.0", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", "is-potential-custom-element-name": "^1.0.1", - "nwsapi": "^2.2.4", + "nwsapi": "^2.2.7", "parse5": "^7.1.2", "rrweb-cssom": "^0.6.0", "saxes": "^6.0.0", "symbol-tree": "^3.2.4", - "tough-cookie": "^4.1.2", - "w3c-xmlserializer": "^4.0.0", + "tough-cookie": "^4.1.3", + "w3c-xmlserializer": "^5.0.0", "webidl-conversions": "^7.0.0", - "whatwg-encoding": "^2.0.0", - "whatwg-mimetype": "^3.0.0", - "whatwg-url": "^12.0.1", - "ws": "^8.13.0", - "xml-name-validator": "^4.0.0" + "whatwg-encoding": "^3.1.1", + "whatwg-mimetype": "^4.0.0", + "whatwg-url": "^14.0.0", + "ws": "^8.14.2", + "xml-name-validator": "^5.0.0" }, "engines": { - "node": ">=16" + "node": ">=18" }, "peerDependencies": { - "canvas": "^2.5.0" + "canvas": "^2.11.2" }, "peerDependenciesMeta": { "canvas": { @@ -7910,6 +8549,15 @@ "node": ">=4" } }, + "node_modules/load-json-file/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/load-json-file/node_modules/strip-bom": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", @@ -8082,10 +8730,19 @@ "node": ">= 8.16.2" } }, + "node_modules/media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/medium-zoom": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/medium-zoom/-/medium-zoom-1.0.8.tgz", - "integrity": "sha512-CjFVuFq/IfrdqesAXfg+hzlDKu6A2n80ZIq0Kl9kWjoHh9j1N9Uvk5X0/MmN0hOfm5F9YBswlClhcwnmtwz7gA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/medium-zoom/-/medium-zoom-1.1.0.tgz", + "integrity": "sha512-ewyDsp7k4InCUp3jRmwHBRFGyjBimKps/AJLjRSox+2q/2H4p/PNpQf+pwONWlJiOudkBXtbdmVbFjqyybfTmQ==", "dev": true }, "node_modules/meow": { @@ -8156,6 +8813,15 @@ "node": ">= 8" } }, + "node_modules/methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -8507,6 +9173,116 @@ "node": ">=10" } }, + "node_modules/mockttp": { + "version": "3.9.4", + "resolved": "https://registry.npmjs.org/mockttp/-/mockttp-3.9.4.tgz", + "integrity": "sha512-EagdyT83RqAKWB2c+g3NdL1hEBcXl4Oeg6zIWDk9mq6JCAqsaIHySE78lvgGja2QjWOgosQaS1YtCaWkKaCFkw==", + "dev": true, + "dependencies": { + "@graphql-tools/schema": "^8.5.0", + "@graphql-tools/utils": "^8.8.0", + "@httptoolkit/httpolyglot": "^2.1.1", + "@httptoolkit/subscriptions-transport-ws": "^0.11.2", + "@httptoolkit/websocket-stream": "^6.0.1", + "@types/cors": "^2.8.6", + "@types/node": "*", + "base64-arraybuffer": "^0.1.5", + "body-parser": "^1.15.2", + "cacheable-lookup": "^6.0.0", + "common-tags": "^1.8.0", + "connect": "^3.7.0", + "cors": "^2.8.4", + "cors-gate": "^1.1.3", + "cross-fetch": "^3.1.5", + "destroyable-server": "^1.0.0", + "express": "^4.14.0", + "graphql": "^14.0.2 || ^15.5", + "graphql-http": "^1.22.0", + "graphql-subscriptions": "^1.1.0", + "graphql-tag": "^2.12.6", + "http-encoding": "^1.5.1", + "http2-wrapper": "^2.2.0", + "https-proxy-agent": "^5.0.1", + "isomorphic-ws": "^4.0.1", + "lodash": "^4.16.4", + "lru-cache": "^7.14.0", + "native-duplexpair": "^1.0.0", + "node-forge": "^1.2.1", + "pac-proxy-agent": "^7.0.0", + "parse-multipart-data": "^1.4.0", + "performance-now": "^2.1.0", + "portfinder": "1.0.28", + "read-tls-client-hello": "^1.0.0", + "semver": "^7.5.3", + "socks-proxy-agent": "^7.0.0", + "typed-error": "^3.0.2", + "uuid": "^8.3.2", + "ws": "^8.8.0" + }, + "bin": { + "mockttp": "dist/admin/admin-bin.js" + }, + "engines": { + "node": ">=14.14.0" + } + }, + "node_modules/mockttp/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/mockttp/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/mockttp/node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/mockttp/node_modules/lru-cache": { + "version": "7.18.3", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", + "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/mockttp/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, "node_modules/module-not-found-error": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/module-not-found-error/-/module-not-found-error-1.0.1.tgz", @@ -8540,18 +9316,42 @@ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" } }, + "node_modules/native-duplexpair": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/native-duplexpair/-/native-duplexpair-1.0.0.tgz", + "integrity": "sha512-E7QQoM+3jvNtlmyfqRZ0/U75VFgCls+fSkbml2MpgWkWyz3ox8Y58gNhfuziuQYGNNQAbFZJQck55LHCnCK6CA==", + "dev": true + }, "node_modules/natural-compare": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", "dev": true }, + "node_modules/negotiator": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", + "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", + "dev": true, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/nested-error-stacks": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.1.1.tgz", "integrity": "sha512-9iN1ka/9zmX1ZvLV9ewJYEk9h7RyRRtqdK0woXcqohu8EWIerfPUjYJPg0ULy0UqP7cslmdGc8xKDJcojlKiaw==", "dev": true }, + "node_modules/netmask": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/netmask/-/netmask-2.0.2.tgz", + "integrity": "sha512-dBpDMdxv9Irdq66304OLfEmQ9tbNRFnFTuZiLo+bD+r332bBmMJ8GBLXklIXXgxd3+v9+KUnZaUR5PJMa75Gsg==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/nise": { "version": "5.1.5", "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.5.tgz", @@ -8592,23 +9392,19 @@ "type-detect": "4.0.8" } }, - "node_modules/node-domexception": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", - "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "node_modules/nise/node_modules/isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", + "dev": true + }, + "node_modules/nise/node_modules/path-to-regexp": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", + "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/jimmywarting" - }, - { - "type": "github", - "url": "https://paypal.me/jimmywarting" - } - ], - "engines": { - "node": ">=10.5.0" + "dependencies": { + "isarray": "0.0.1" } }, "node_modules/node-fetch": { @@ -8681,9 +9477,9 @@ } }, "node_modules/node-releases": { - "version": "2.0.13", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz", - "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==", + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", "dev": true }, "node_modules/normalize-package-data": { @@ -9129,6 +9925,15 @@ "node": ">=4" } }, + "node_modules/nyc/node_modules/pify": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", + "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/nyc/node_modules/read-pkg": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz", @@ -9227,6 +10032,16 @@ "node": ">=6" } }, + "node_modules/nyc/node_modules/uuid": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", + "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", + "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "dev": true, + "bin": { + "uuid": "bin/uuid" + } + }, "node_modules/nyc/node_modules/wrap-ansi": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", @@ -9319,13 +10134,13 @@ } }, "node_modules/object.assign": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz", - "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==", + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz", + "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==", "dev": true, "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.4", + "call-bind": "^1.0.5", + "define-properties": "^1.2.1", "has-symbols": "^1.0.3", "object-keys": "^1.1.1" }, @@ -9639,6 +10454,76 @@ "node": ">=6" } }, + "node_modules/pac-proxy-agent": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/pac-proxy-agent/-/pac-proxy-agent-7.0.1.tgz", + "integrity": "sha512-ASV8yU4LLKBAjqIPMbrgtaKIvxQri/yh2OpI+S6hVa9JRkUI3Y3NPFbfngDtY7oFtSMD3w31Xns89mDa3Feo5A==", + "dev": true, + "dependencies": { + "@tootallnate/quickjs-emscripten": "^0.23.0", + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "get-uri": "^6.0.1", + "http-proxy-agent": "^7.0.0", + "https-proxy-agent": "^7.0.2", + "pac-resolver": "^7.0.0", + "socks-proxy-agent": "^8.0.2" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/pac-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/pac-proxy-agent/node_modules/socks-proxy-agent": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-8.0.2.tgz", + "integrity": "sha512-8zuqoLv1aP/66PHF5TqwJ7Czm3Yv32urJQHrVyhD7mmA6d61Zv8cIXQYPTWwmg6qlupnPvs/QKDmfa4P/qct2g==", + "dev": true, + "dependencies": { + "agent-base": "^7.0.2", + "debug": "^4.3.4", + "socks": "^2.7.1" + }, + "engines": { + "node": ">= 14" + } + }, + "node_modules/pac-resolver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/pac-resolver/-/pac-resolver-7.0.0.tgz", + "integrity": "sha512-Fd9lT9vJbHYRACT8OhCbZBbxr6KRSawSovFpy8nDGshaK99S/EBhVIHp9+crhxrsZOuvLpgL1n23iyPg6Rl2hg==", + "dev": true, + "dependencies": { + "degenerator": "^5.0.0", + "ip": "^1.1.8", + "netmask": "^2.0.2" + }, + "engines": { + "node": ">= 14" + } + }, "node_modules/package-hash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/package-hash/-/package-hash-3.0.0.tgz", @@ -9723,6 +10608,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/parse-multipart-data": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/parse-multipart-data/-/parse-multipart-data-1.5.0.tgz", + "integrity": "sha512-ck5zaMF0ydjGfejNMnlo5YU2oJ+pT+80Jb1y4ybanT27j+zbVP/jkYmCrUGsEln0Ox/hZmuvgy8Ra7AxbXP2Mw==", + "dev": true + }, "node_modules/parse5": { "version": "7.1.2", "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", @@ -9778,13 +10669,10 @@ "dev": true }, "node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "dependencies": { - "isarray": "0.0.1" - } + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==", + "dev": true }, "node_modules/path-type": { "version": "4.0.0", @@ -9804,6 +10692,12 @@ "node": "*" } }, + "node_modules/performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", + "dev": true + }, "node_modules/picocolors": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", @@ -9835,12 +10729,15 @@ } }, "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-5.0.0.tgz", + "integrity": "sha512-eW/gHNMlxdSP6dmG6uJip6FXN0EQBwm2clYYd8Wul42Cwu/DK8HEftzsapcNdYe2MfLiIwZqsDk2RDEsTE79hA==", "dev": true, "engines": { - "node": ">=6" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/pirates": { @@ -9953,6 +10850,35 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/portfinder": { + "version": "1.0.28", + "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", + "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", + "dev": true, + "dependencies": { + "async": "^2.6.2", + "debug": "^3.1.1", + "mkdirp": "^0.5.5" + }, + "engines": { + "node": ">= 0.12.0" + } + }, + "node_modules/portfinder/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/portfinder/node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true + }, "node_modules/pre-commit": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/pre-commit/-/pre-commit-1.2.2.tgz", @@ -10140,6 +11066,25 @@ "proxy": "bin/proxy.js" } }, + "node_modules/proxy-addr": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", + "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", + "dev": true, + "dependencies": { + "forwarded": "0.2.0", + "ipaddr.js": "1.9.1" + }, + "engines": { + "node": ">= 0.10" + } + }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==", + "dev": true + }, "node_modules/proxy/node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -10197,9 +11142,9 @@ } }, "node_modules/punycode": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", - "integrity": "sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", + "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "engines": { "node": ">=6" @@ -10233,6 +11178,21 @@ } ] }, + "node_modules/qs": { + "version": "6.11.0", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", + "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", + "dev": true, + "dependencies": { + "side-channel": "^1.0.4" + }, + "engines": { + "node": ">=0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -10260,12 +11220,15 @@ ] }, "node_modules/quick-lru": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-4.0.1.tgz", - "integrity": "sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/quick-lru/-/quick-lru-5.1.1.tgz", + "integrity": "sha512-WuyALRjWPDGtt/wzJiadO5AXY+8hZ80hVpe6MyivgraREW751X3SbhRvG3eLKOYN+8VEvqLcf3wdnt44Z4S4SA==", "dev": true, "engines": { - "node": ">=8" + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/randombytes": { @@ -10286,6 +11249,21 @@ "node": ">= 0.6" } }, + "node_modules/raw-body": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.2.tgz", + "integrity": "sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==", + "dev": true, + "dependencies": { + "bytes": "3.1.2", + "http-errors": "2.0.0", + "iconv-lite": "0.4.24", + "unpipe": "1.0.0" + }, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/rc": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", @@ -10393,20 +11371,39 @@ "node": ">=8" } }, - "node_modules/readable-stream": { - "version": "3.6.2", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", - "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "node_modules/read-tls-client-hello": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-tls-client-hello/-/read-tls-client-hello-1.0.1.tgz", + "integrity": "sha512-OvSzfVv6Y656ekUxB7aDhWkLW7y1ck16ChfLFNJhKNADFNweH2fvyiEZkGmmdtXbOtlNuH2zVXZoFCW349M+GA==", "dev": true, "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" + "@types/node": "*" }, "engines": { - "node": ">= 6" + "node": ">=12.0.0" + } + }, + "node_modules/readable-stream": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", + "dev": true, + "dependencies": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" } }, + "node_modules/readable-stream/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -10576,6 +11573,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/resolve-alpn": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/resolve-alpn/-/resolve-alpn-1.2.1.tgz", + "integrity": "sha512-0a1F4l73/ZFZOakJnQ3FvkJ2+gSTQWz/r2KE5OdDY0TxPm5h4GkqkWWfM47T7HsbnOtcJVEF4epCVy6u7Q3K+g==", + "dev": true + }, "node_modules/resolve-cwd": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", @@ -11000,16 +12003,16 @@ "dev": true }, "node_modules/sinon": { - "version": "16.1.3", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-16.1.3.tgz", - "integrity": "sha512-mjnWWeyxcAf9nC0bXcPmiDut+oE8HYridTNzBbF98AYVLmWwGRp2ISEpyhYflG1ifILT+eNn3BmKUJPxjXUPlA==", + "version": "17.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-17.0.1.tgz", + "integrity": "sha512-wmwE19Lie0MLT+ZYNpDymasPHUKTaZHUH/pKEubRXIzySv9Atnlw+BUMGCzWgV7b7wO+Hw6f1TEOr0IUnmU8/g==", "dev": true, "dependencies": { "@sinonjs/commons": "^3.0.0", - "@sinonjs/fake-timers": "^10.3.0", + "@sinonjs/fake-timers": "^11.2.2", "@sinonjs/samsam": "^8.0.0", "diff": "^5.1.0", - "nise": "^5.1.4", + "nise": "^5.1.5", "supports-color": "^7.2.0" }, "funding": { @@ -11017,15 +12020,6 @@ "url": "https://opencollective.com/sinon" } }, - "node_modules/sinon/node_modules/@sinonjs/fake-timers": { - "version": "10.3.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz", - "integrity": "sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^3.0.0" - } - }, "node_modules/sinon/node_modules/diff": { "version": "5.1.0", "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", @@ -11079,6 +12073,16 @@ "url": "https://github.com/chalk/slice-ansi?sponsor=1" } }, + "node_modules/smart-buffer": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/smart-buffer/-/smart-buffer-4.2.0.tgz", + "integrity": "sha512-94hK0Hh8rPqQl2xXc3HsaBoOXKV20MToPkcXvwbISWLEs+64sBq5kFgn2kJDHb1Pry9yrP0dxrCI9RRci7RXKg==", + "dev": true, + "engines": { + "node": ">= 6.0.0", + "npm": ">= 3.0.0" + } + }, "node_modules/snazzy": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/snazzy/-/snazzy-9.0.0.tgz", @@ -11111,6 +12115,89 @@ "snazzy": "bin/cmd.js" } }, + "node_modules/snazzy/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/socks": { + "version": "2.7.1", + "resolved": "https://registry.npmjs.org/socks/-/socks-2.7.1.tgz", + "integrity": "sha512-7maUZy1N7uo6+WVEX6psASxtNlKaNVMlGQKkG/63nEDdLOWNbiUMoLK7X4uYoLhQstau72mLgfEWcXcwsaHbYQ==", + "dev": true, + "dependencies": { + "ip": "^2.0.0", + "smart-buffer": "^4.2.0" + }, + "engines": { + "node": ">= 10.13.0", + "npm": ">= 3.0.0" + } + }, + "node_modules/socks-proxy-agent": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/socks-proxy-agent/-/socks-proxy-agent-7.0.0.tgz", + "integrity": "sha512-Fgl0YPZ902wEsAyiQ+idGd1A7rSFx/ayC1CQVMw5P+EQx2V0SgpGtf6OKFhVjPflPUl9YMmEOnmfjCdMUsygww==", + "dev": true, + "dependencies": { + "agent-base": "^6.0.2", + "debug": "^4.3.3", + "socks": "^2.6.2" + }, + "engines": { + "node": ">= 10" + } + }, + "node_modules/socks-proxy-agent/node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, + "node_modules/socks-proxy-agent/node_modules/debug": { + "version": "4.3.4", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", + "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", + "dev": true, + "dependencies": { + "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/socks-proxy-agent/node_modules/ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "node_modules/socks/node_modules/ip": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ip/-/ip-2.0.0.tgz", + "integrity": "sha512-WKa+XuLG1A1R0UWhl2+1XQSi+fZWMsYKffMZTTYsiZaUD8k2yDAj5atimTUD2TZkyCkNEeYE5NhFZmupOGtjYQ==", + "dev": true + }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -11325,6 +12412,20 @@ "typedarray": "^0.0.6" } }, + "node_modules/standard-json/node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/statuses": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", @@ -11334,15 +12435,27 @@ "node": ">= 0.6" } }, + "node_modules/stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "dev": true + }, "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", "dev": true, "dependencies": { - "safe-buffer": "~5.2.0" + "safe-buffer": "~5.1.0" } }, + "node_modules/string_decoder/node_modules/safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -11541,6 +12654,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/symbol-observable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/symbol-observable/-/symbol-observable-1.2.0.tgz", + "integrity": "sha512-e900nM8RRtGhlV36KGEU9k65K3mPb1WV70OdjfxlG2EAuM1noi/E/BaW/uMhL7bPEssK8QV57vN3esixjUvcXQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/symbol-tree": { "version": "3.2.4", "resolved": "https://registry.npmjs.org/symbol-tree/-/symbol-tree-3.2.4.tgz", @@ -14059,15 +15181,15 @@ } }, "node_modules/tr46": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-4.1.1.tgz", - "integrity": "sha512-2lv/66T7e5yNyhAAC4NaKe5nVavzuGJQVVtRYLyQ2OI8tsJ61PMLlelehb0wi2Hx6+hT/OJUWZcw8MjlSRnxvw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-5.0.0.tgz", + "integrity": "sha512-tk2G5R2KRwBd+ZN0zaEXpmzdKyOYksXwywulIX95MBODjSzMIuQnQ3m8JxgbhnL1LeVo7lqQKsYa1O3Htl7K5g==", "dev": true, "dependencies": { - "punycode": "^2.3.0" + "punycode": "^2.3.1" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/tree-kill": { @@ -14196,6 +15318,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/type-is": { + "version": "1.6.18", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", + "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", + "dev": true, + "dependencies": { + "media-typer": "0.3.0", + "mime-types": "~2.1.24" + }, + "engines": { + "node": ">= 0.6" + } + }, "node_modules/typed-array-buffer": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz", @@ -14261,6 +15396,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/typed-error": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/typed-error/-/typed-error-3.2.2.tgz", + "integrity": "sha512-Z48LU67/qJ+vyA7lh3ozELqpTp3pvQoY5RtLi5wQ/UGSrEidBhlVSqhjr8B3iqbGpjqAoJYrtSYXWMDtidWGkA==", + "dev": true, + "engines": { + "node": ">=6.0.0", + "npm": ">=3.0.0" + } + }, "node_modules/typedarray": { "version": "0.0.6", "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", @@ -14277,9 +15422,9 @@ } }, "node_modules/typescript": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.2.2.tgz", - "integrity": "sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.3.2.tgz", + "integrity": "sha512-6l+RyNy7oAHDfxC4FzSJcz9vnjTKxrLpDG5M2Vu4SHRVNg6xzqZp6LYSR9zjqQTu8DU/f5xwxUdADOkbrIX2gQ==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -14478,19 +15623,18 @@ } }, "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", + "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", "dev": true, "bin": { - "uuid": "bin/uuid" + "uuid": "dist/bin/uuid" } }, "node_modules/v8-to-istanbul": { - "version": "9.1.3", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz", - "integrity": "sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==", + "version": "9.2.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", + "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -14511,6 +15655,24 @@ "spdx-expression-parse": "^3.0.0" } }, + "node_modules/value-or-promise": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/value-or-promise/-/value-or-promise-1.0.11.tgz", + "integrity": "sha512-41BrgH+dIbCFXClcSapVs5M6GkENd3gQOJpEfPDNa71LsUGMXDL0jMWpI/Rh7WhX+Aalfz2TTS3Zt5pUsbnhLg==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/version-guard": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/version-guard/-/version-guard-1.1.1.tgz", @@ -14521,28 +15683,28 @@ } }, "node_modules/w3c-xmlserializer": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-4.0.0.tgz", - "integrity": "sha512-d+BFHzbiCx6zGfz0HyQ6Rg69w9k19nviJspaj4yNscGjrHu94sVP+aRm75yEbCh+r2/yR+7q6hux9LVtbuTGBw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/w3c-xmlserializer/-/w3c-xmlserializer-5.0.0.tgz", + "integrity": "sha512-o8qghlI8NZHU1lLPrpi2+Uq7abh4GGPpYANlalzWxyWteJOCsr/P+oPBA49TOLu5FTZO4d3F9MnWJfiMo4BkmA==", "dev": true, "dependencies": { - "xml-name-validator": "^4.0.0" + "xml-name-validator": "^5.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/wait-on": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-7.0.1.tgz", - "integrity": "sha512-9AnJE9qTjRQOlTZIldAaf/da2eW0eSRSgcqq85mXQja/DW3MriHxkpODDSUEg+Gri/rKEcXUZHe+cevvYItaog==", + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/wait-on/-/wait-on-7.2.0.tgz", + "integrity": "sha512-wCQcHkRazgjG5XoAq9jbTMLpNIjoSlZslrJ2+N9MxDsGEv1HnFoVjOCexL0ESva7Y9cu350j+DWADdk54s4AFQ==", "dev": true, "dependencies": { - "axios": "^0.27.2", - "joi": "^17.7.0", + "axios": "^1.6.1", + "joi": "^17.11.0", "lodash": "^4.17.21", - "minimist": "^1.2.7", - "rxjs": "^7.8.0" + "minimist": "^1.2.8", + "rxjs": "^7.8.1" }, "bin": { "wait-on": "bin/wait-on" @@ -14560,15 +15722,6 @@ "makeerror": "1.0.12" } }, - "node_modules/web-streams-polyfill": { - "version": "4.0.0-beta.3", - "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz", - "integrity": "sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug==", - "dev": true, - "engines": { - "node": ">= 14" - } - }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", @@ -14579,37 +15732,49 @@ } }, "node_modules/whatwg-encoding": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", - "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-3.1.1.tgz", + "integrity": "sha512-6qN4hJdMwfYBtE3YBTTHhoeuUrDBPZmbQaxWAqSALV/MeEnR5z1xd8UKud2RAkFoPkmB+hli1TZSnyi84xz1vQ==", "dev": true, "dependencies": { "iconv-lite": "0.6.3" }, "engines": { - "node": ">=12" + "node": ">=18" + } + }, + "node_modules/whatwg-encoding/node_modules/iconv-lite": { + "version": "0.6.3", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", + "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "dev": true, + "dependencies": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + }, + "engines": { + "node": ">=0.10.0" } }, "node_modules/whatwg-mimetype": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-3.0.0.tgz", - "integrity": "sha512-nt+N2dzIutVRxARx1nghPKGv1xHikU7HKdfafKkLNLindmPU/ch3U31NOCGGA/dmPcmb1VlofO0vnKAcsm0o/Q==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/whatwg-mimetype/-/whatwg-mimetype-4.0.0.tgz", + "integrity": "sha512-QaKxh0eNIi2mE9p2vEdzfagOKHCcj1pJ56EEHGQOVxp8r9/iszLUUV7v89x9O1p/T+NlTM5W7jW6+cz4Fq1YVg==", "dev": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/whatwg-url": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-12.0.1.tgz", - "integrity": "sha512-Ed/LrqB8EPlGxjS+TrsXcpUond1mhccS3pchLhzSgPCnTimUCKj3IZE75pAs5m6heB2U2TMerKFUXheyHY+VDQ==", + "version": "14.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-14.0.0.tgz", + "integrity": "sha512-1lfMEm2IEr7RIV+f4lUNPOqfFL+pO+Xw3fJSqmjX9AbXcXcYOkCe1P6+9VBZB6n94af16NfZf+sSk0JCBZC9aw==", "dev": true, "dependencies": { - "tr46": "^4.1.1", + "tr46": "^5.0.0", "webidl-conversions": "^7.0.0" }, "engines": { - "node": ">=14" + "node": ">=18" } }, "node_modules/which": { @@ -14809,12 +15974,12 @@ } }, "node_modules/xml-name-validator": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-4.0.0.tgz", - "integrity": "sha512-ICP2e+jsHvAj2E2lIHxa5tjXRlKDJo4IdvPvCXbXQGdzSfmSpNVyIKMvoZHjDY9DP0zV17iI85o90vRFXNccRw==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/xml-name-validator/-/xml-name-validator-5.0.0.tgz", + "integrity": "sha512-EvGK8EJ3DhaHfbRlETOWAS5pO9MZITeauHKJyb8wyajUfQUenkIg2MvLDTZ4T/TgIcm3HU0TFBgWWboAZ30UHg==", "dev": true, "engines": { - "node": ">=12" + "node": ">=18" } }, "node_modules/xmlchars": { @@ -14823,6 +15988,15 @@ "integrity": "sha512-JZnDKK8B0RCDw84FNdDAIpZK+JuJw+s7Lz8nksI7SIuU3UXJJslUthsi+uWBUYOwPFwW7W7PRLRfUKpxjtjFCw==", "dev": true }, + "node_modules/xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true, + "engines": { + "node": ">=0.4" + } + }, "node_modules/y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", @@ -15031,6 +16205,12 @@ "funding": { "url": "https://github.com/sponsors/sindresorhus" } + }, + "node_modules/zstd-codec": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/zstd-codec/-/zstd-codec-0.1.4.tgz", + "integrity": "sha512-KYnWoFWgGtWyQEKNnUcb3u8ZtKO8dn5d8u+oGpxPlopqsPyv60U8suDyfk7Z7UtAO6Sk5i1aVcAs9RbaB1n36A==", + "dev": true } } } diff --git a/deps/undici/src/package.json b/deps/undici/src/package.json index 454271d7b466f4..2b64daf41e2822 100644 --- a/deps/undici/src/package.json +++ b/deps/undici/src/package.json @@ -1,6 +1,6 @@ { "name": "undici", - "version": "5.27.0", + "version": "5.28.2", "description": "An HTTP/1.1 client, written from scratch for Node.js", "homepage": "https://undici.nodejs.org", "bugs": { @@ -110,20 +110,21 @@ "dns-packet": "^5.4.0", "docsify-cli": "^4.4.3", "form-data": "^4.0.0", - "formdata-node": "^4.3.1", + "formdata-node": "^6.0.3", "https-pem": "^3.0.0", "husky": "^8.0.1", "import-fresh": "^3.3.0", "jest": "^29.0.2", - "jsdom": "^22.1.0", + "jsdom": "^23.0.0", "jsfuzz": "^1.0.15", "mocha": "^10.0.0", + "mockttp": "^3.9.2", "p-timeout": "^3.2.0", "pre-commit": "^1.2.2", "proxy": "^1.0.2", "proxyquire": "^2.1.3", "semver": "^7.5.4", - "sinon": "^16.1.0", + "sinon": "^17.0.1", "snazzy": "^9.0.0", "standard": "^17.0.0", "table": "^6.8.0", diff --git a/deps/undici/src/types/client.d.ts b/deps/undici/src/types/client.d.ts index 74948b15f3841f..56e78cc9765bf2 100644 --- a/deps/undici/src/types/client.d.ts +++ b/deps/undici/src/types/client.d.ts @@ -77,7 +77,7 @@ export declare namespace Client { */ allowH2?: boolean; /** - * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overriden by a SETTINGS remote frame. + * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame. * @default 100 */ maxConcurrentStreams?: number diff --git a/deps/undici/src/types/dispatcher.d.ts b/deps/undici/src/types/dispatcher.d.ts index 816db19d20d878..efc53eea79114e 100644 --- a/deps/undici/src/types/dispatcher.d.ts +++ b/deps/undici/src/types/dispatcher.d.ts @@ -211,7 +211,7 @@ declare namespace Dispatcher { /** Invoked when request is upgraded either due to a `Upgrade` header or `CONNECT` method. */ onUpgrade?(statusCode: number, headers: Buffer[] | string[] | null, socket: Duplex): void; /** Invoked when statusCode and headers have been received. May be invoked multiple times due to 1xx informational headers. */ - onHeaders?(statusCode: number, headers: Buffer[] | string[] | null, resume: () => void): boolean; + onHeaders?(statusCode: number, headers: Buffer[] | string[] | null, resume: () => void, statusText: string): boolean; /** Invoked when response payload data is received. */ onData?(chunk: Buffer): boolean; /** Invoked when response payload and trailers have been received and the request has completed. */ diff --git a/deps/undici/src/types/fetch.d.ts b/deps/undici/src/types/fetch.d.ts index fa4619c9182739..440f2b003978fe 100644 --- a/deps/undici/src/types/fetch.d.ts +++ b/deps/undici/src/types/fetch.d.ts @@ -108,7 +108,7 @@ export interface RequestInit { body?: BodyInit redirect?: RequestRedirect integrity?: string - signal?: AbortSignal + signal?: AbortSignal | null credentials?: RequestCredentials mode?: RequestMode referrer?: string diff --git a/deps/undici/src/types/index.d.ts b/deps/undici/src/types/index.d.ts index 4589845b4a9bd2..0ea8bdc217dbc5 100644 --- a/deps/undici/src/types/index.d.ts +++ b/deps/undici/src/types/index.d.ts @@ -14,6 +14,7 @@ import MockPool from'./mock-pool' import MockAgent from'./mock-agent' import mockErrors from'./mock-errors' import ProxyAgent from'./proxy-agent' +import RetryHandler from'./retry-handler' import { request, pipeline, stream, connect, upgrade } from './api' export * from './cookies' @@ -27,7 +28,7 @@ export * from './content-type' export * from './cache' export { Interceptable } from './mock-interceptor' -export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, RedirectHandler, DecoratorHandler } +export { Dispatcher, BalancedPool, Pool, Client, buildConnector, errors, Agent, request, stream, pipeline, connect, upgrade, setGlobalDispatcher, getGlobalDispatcher, setGlobalOrigin, getGlobalOrigin, MockClient, MockPool, MockAgent, mockErrors, ProxyAgent, RedirectHandler, DecoratorHandler, RetryHandler } export default Undici declare namespace Undici { @@ -35,6 +36,7 @@ declare namespace Undici { var Pool: typeof import('./pool').default; var RedirectHandler: typeof import ('./handlers').RedirectHandler var DecoratorHandler: typeof import ('./handlers').DecoratorHandler + var RetryHandler: typeof import ('./retry-handler').default var createRedirectInterceptor: typeof import ('./interceptors').createRedirectInterceptor var BalancedPool: typeof import('./balanced-pool').default; var Client: typeof import('./client').default; diff --git a/deps/undici/src/types/retry-handler.d.ts b/deps/undici/src/types/retry-handler.d.ts new file mode 100644 index 00000000000000..0528eb442799cc --- /dev/null +++ b/deps/undici/src/types/retry-handler.d.ts @@ -0,0 +1,116 @@ +import Dispatcher from "./dispatcher"; + +export default RetryHandler; + +declare class RetryHandler implements Dispatcher.DispatchHandlers { + constructor( + options: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }, + retryHandlers: RetryHandler.RetryHandlers + ); +} + +declare namespace RetryHandler { + export type RetryState = { counter: number; currentTimeout: number }; + + export type RetryContext = { + state: RetryState; + opts: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }; + } + + export type OnRetryCallback = (result?: Error | null) => void; + + export type RetryCallback = ( + err: Error, + context: { + state: RetryState; + opts: Dispatcher.DispatchOptions & { + retryOptions?: RetryHandler.RetryOptions; + }; + }, + callback: OnRetryCallback + ) => number | null; + + export interface RetryOptions { + /** + * Callback to be invoked on every retry iteration. + * It receives the error, current state of the retry object and the options object + * passed when instantiating the retry handler. + * + * @type {RetryCallback} + * @memberof RetryOptions + */ + retry?: RetryCallback; + /** + * Maximum number of retries to allow. + * + * @type {number} + * @memberof RetryOptions + * @default 5 + */ + maxRetries?: number; + /** + * Max number of milliseconds allow between retries + * + * @type {number} + * @memberof RetryOptions + * @default 30000 + */ + maxTimeout?: number; + /** + * Initial number of milliseconds to wait before retrying for the first time. + * + * @type {number} + * @memberof RetryOptions + * @default 500 + */ + minTimeout?: number; + /** + * Factior to multiply the timeout factor between retries. + * + * @type {number} + * @memberof RetryOptions + * @default 2 + */ + timeoutFactor?: number; + /** + * It enables to automatically infer timeout between retries based on the `Retry-After` header. + * + * @type {boolean} + * @memberof RetryOptions + * @default true + */ + retryAfter?: boolean; + /** + * HTTP methods to retry. + * + * @type {Dispatcher.HttpMethod[]} + * @memberof RetryOptions + * @default ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'], + */ + methods?: Dispatcher.HttpMethod[]; + /** + * Error codes to be retried. e.g. `ECONNRESET`, `ENOTFOUND`, `ETIMEDOUT`, `ECONNREFUSED`, etc. + * + * @type {string[]} + * @default ['ECONNRESET','ECONNREFUSED','ENOTFOUND','ENETDOWN','ENETUNREACH','EHOSTDOWN','EHOSTUNREACH','EPIPE'] + */ + errorCodes?: string[]; + /** + * HTTP status codes to be retried. + * + * @type {number[]} + * @memberof RetryOptions + * @default [500, 502, 503, 504, 429], + */ + statusCodes?: number[]; + } + + export interface RetryHandlers { + dispatch: Dispatcher["dispatch"]; + handler: Dispatcher.DispatchHandlers; + } +} diff --git a/deps/undici/undici.js b/deps/undici/undici.js index a5da33fa3b0075..847a8814336f5a 100644 --- a/deps/undici/undici.js +++ b/deps/undici/undici.js @@ -68,7 +68,9 @@ var require_symbols = __commonJS({ kHTTP2BuildRequest: Symbol("http2 build request"), kHTTP1BuildRequest: Symbol("http1 build request"), kHTTP2CopyHeaders: Symbol("http2 copy headers"), - kHTTPConnVersion: Symbol("http connection version") + kHTTPConnVersion: Symbol("http connection version"), + kRetryHandlerDefaultRetry: Symbol("retry agent default retry"), + kConstruct: Symbol("constructable") }; } }); @@ -323,6 +325,21 @@ var require_errors = __commonJS({ this.code = "UND_ERR_RES_EXCEEDED_MAX_SIZE"; } }; + var RequestRetryError = class _RequestRetryError extends UndiciError { + static { + __name(this, "RequestRetryError"); + } + constructor(message, code, { headers, data }) { + super(message); + Error.captureStackTrace(this, _RequestRetryError); + this.name = "RequestRetryError"; + this.message = message || "Request retry error"; + this.code = "UND_ERR_REQ_RETRY"; + this.statusCode = code; + this.data = data; + this.headers = headers; + } + }; module2.exports = { HTTPParserError, UndiciError, @@ -342,7 +359,8 @@ var require_errors = __commonJS({ NotSupportedError, ResponseContentLengthMismatchError, BalancedPoolMissingUpstreamError, - ResponseExceededMaxSizeError + ResponseExceededMaxSizeError, + RequestRetryError }; } }); @@ -439,12 +457,12 @@ var require_util = __commonJS({ if (host[0] === "[") { const idx2 = host.indexOf("]"); assert(idx2 !== -1); - return host.substr(1, idx2 - 1); + return host.substring(1, idx2); } const idx = host.indexOf(":"); if (idx === -1) return host; - return host.substr(0, idx); + return host.substring(0, idx); } __name(getHostname, "getHostname"); function getServerName(host) { @@ -495,7 +513,7 @@ var require_util = __commonJS({ } __name(isReadableAborted, "isReadableAborted"); function destroy(stream2, err) { - if (!isStream(stream2) || isDestroyed(stream2)) { + if (stream2 == null || !isStream(stream2) || isDestroyed(stream2)) { return; } if (typeof stream2.destroy === "function") { @@ -527,7 +545,7 @@ var require_util = __commonJS({ let val = obj[key]; if (!val) { if (Array.isArray(headers[i + 1])) { - obj[key] = headers[i + 1]; + obj[key] = headers[i + 1].map((x) => x.toString("utf8")); } else { obj[key] = headers[i + 1].toString("utf8"); } @@ -689,16 +707,7 @@ var require_util = __commonJS({ } } __name(throwIfAborted, "throwIfAborted"); - var events; function addAbortListener(signal, listener) { - if (typeof Symbol.dispose === "symbol") { - if (!events) { - events = require("events"); - } - if (typeof events.addAbortListener === "function" && "aborted" in signal) { - return events.addAbortListener(signal, listener); - } - } if ("addEventListener" in signal) { signal.addEventListener("abort", listener, { once: true }); return () => signal.removeEventListener("abort", listener); @@ -717,6 +726,17 @@ var require_util = __commonJS({ return `${val}`; } __name(toUSVString, "toUSVString"); + function parseRangeHeader(range) { + if (range == null || range === "") + return { start: 0, end: null, size: null }; + const m = range ? range.match(/^bytes (\d+)-(\d+)\/(\d+)?$/) : null; + return m ? { + start: parseInt(m[1]), + end: m[2] ? parseInt(m[2]) : null, + size: m[3] ? parseInt(m[3]) : null + } : null; + } + __name(parseRangeHeader, "parseRangeHeader"); var kEnumerableProperty = /* @__PURE__ */ Object.create(null); kEnumerableProperty.enumerable = true; module2.exports = { @@ -749,9 +769,11 @@ var require_util = __commonJS({ buildURL, throwIfAborted, addAbortListener, + parseRangeHeader, nodeMajor, nodeMinor, - nodeHasAutoSelectFamily: nodeMajor > 18 || nodeMajor === 18 && nodeMinor >= 13 + nodeHasAutoSelectFamily: nodeMajor > 18 || nodeMajor === 18 && nodeMinor >= 13, + safeHTTPMethods: ["GET", "HEAD", "OPTIONS", "TRACE"] }; } }); @@ -1056,17 +1078,37 @@ var require_util2 = __commonJS({ return true; } __name(isValidReasonPhrase, "isValidReasonPhrase"); - function isTokenChar(c) { - return !(c >= 127 || c <= 32 || c === "(" || c === ")" || c === "<" || c === ">" || c === "@" || c === "," || c === ";" || c === ":" || c === "\\" || c === '"' || c === "/" || c === "[" || c === "]" || c === "?" || c === "=" || c === "{" || c === "}"); + function isTokenCharCode(c) { + switch (c) { + case 34: + case 40: + case 41: + case 44: + case 47: + case 58: + case 59: + case 60: + case 61: + case 62: + case 63: + case 64: + case 91: + case 92: + case 93: + case 123: + case 125: + return false; + default: + return c >= 33 && c <= 126; + } } - __name(isTokenChar, "isTokenChar"); + __name(isTokenCharCode, "isTokenCharCode"); function isValidHTTPToken(characters) { - if (!characters || typeof characters !== "string") { + if (characters.length === 0) { return false; } for (let i = 0; i < characters.length; ++i) { - const c = characters.charCodeAt(i); - if (c > 127 || !isTokenChar(c)) { + if (!isTokenCharCode(characters.charCodeAt(i))) { return false; } } @@ -1074,9 +1116,6 @@ var require_util2 = __commonJS({ } __name(isValidHTTPToken, "isValidHTTPToken"); function isValidHeaderName(potentialValue) { - if (potentialValue.length === 0) { - return false; - } return isValidHTTPToken(potentialValue); } __name(isValidHeaderName, "isValidHeaderName"); @@ -1368,8 +1407,23 @@ var require_util2 = __commonJS({ return fetchParams.controller.state === "aborted" || fetchParams.controller.state === "terminated"; } __name(isCancelled, "isCancelled"); + var normalizeMethodRecord = { + delete: "DELETE", + DELETE: "DELETE", + get: "GET", + GET: "GET", + head: "HEAD", + HEAD: "HEAD", + options: "OPTIONS", + OPTIONS: "OPTIONS", + post: "POST", + POST: "POST", + put: "PUT", + PUT: "PUT" + }; + Object.setPrototypeOf(normalizeMethodRecord, null); function normalizeMethod(method) { - return /^(DELETE|GET|HEAD|OPTIONS|POST|PUT)$/i.test(method) ? method.toUpperCase() : method; + return normalizeMethodRecord[method.toLowerCase()] ?? method; } __name(normalizeMethod, "normalizeMethod"); function serializeJavascriptValueToJSONString(value) { @@ -1562,7 +1616,8 @@ var require_util2 = __commonJS({ urlIsLocal, urlHasHttpsScheme, urlIsHttpHttpsScheme, - readAllBytes + readAllBytes, + normalizeMethodRecord }; } }); @@ -1829,10 +1884,9 @@ var require_webidl = __commonJS({ webidl.converters.ByteString = function(V) { const x = webidl.converters.DOMString(V); for (let index = 0; index < x.length; index++) { - const charCode = x.charCodeAt(index); - if (charCode > 255) { + if (x.charCodeAt(index) > 255) { throw new TypeError( - `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${charCode} which is greater than 255.` + `Cannot convert argument to a ByteString because the character at index ${index} has a value of ${x.charCodeAt(index)} which is greater than 255.` ); } } @@ -1941,7 +1995,7 @@ var require_webidl = __commonJS({ var require_headers = __commonJS({ "lib/fetch/headers.js"(exports2, module2) { "use strict"; - var { kHeadersList } = require_symbols(); + var { kHeadersList, kConstruct } = require_symbols(); var { kGuard } = require_symbols2(); var { kEnumerableProperty } = require_util(); var { @@ -1953,27 +2007,36 @@ var require_headers = __commonJS({ var assert = require("assert"); var kHeadersMap = Symbol("headers map"); var kHeadersSortedMap = Symbol("headers map sorted"); + function isHTTPWhiteSpaceCharCode(code) { + return code === 10 || code === 13 || code === 9 || code === 32; + } + __name(isHTTPWhiteSpaceCharCode, "isHTTPWhiteSpaceCharCode"); function headerValueNormalize(potentialValue) { - let i = potentialValue.length; - while (/[\r\n\t ]/.test(potentialValue.charAt(--i))) - ; - return potentialValue.slice(0, i + 1).replace(/^[\r\n\t ]+/, ""); + let i = 0; + let j = potentialValue.length; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(j - 1))) + --j; + while (j > i && isHTTPWhiteSpaceCharCode(potentialValue.charCodeAt(i))) + ++i; + return i === 0 && j === potentialValue.length ? potentialValue : potentialValue.substring(i, j); } __name(headerValueNormalize, "headerValueNormalize"); function fill(headers, object) { if (Array.isArray(object)) { - for (const header of object) { + for (let i = 0; i < object.length; ++i) { + const header = object[i]; if (header.length !== 2) { throw webidl.errors.exception({ header: "Headers constructor", message: `expected name/value pair to be length 2, found ${header.length}.` }); } - headers.append(header[0], header[1]); + appendHeader(headers, header[0], header[1]); } } else if (typeof object === "object" && object !== null) { - for (const [key, value] of Object.entries(object)) { - headers.append(key, value); + const keys = Object.keys(object); + for (let i = 0; i < keys.length; ++i) { + appendHeader(headers, keys[i], object[keys[i]]); } } else { throw webidl.errors.conversionFailed({ @@ -1984,6 +2047,28 @@ var require_headers = __commonJS({ } } __name(fill, "fill"); + function appendHeader(headers, name, value) { + value = headerValueNormalize(value); + if (!isValidHeaderName(name)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value: name, + type: "header name" + }); + } else if (!isValidHeaderValue(value)) { + throw webidl.errors.invalidArgument({ + prefix: "Headers.append", + value, + type: "header value" + }); + } + if (headers[kGuard] === "immutable") { + throw new TypeError("immutable"); + } else if (headers[kGuard] === "request-no-cors") { + } + return headers[kHeadersList].append(name, value); + } + __name(appendHeader, "appendHeader"); var HeadersList = class _HeadersList { static { __name(this, "HeadersList"); @@ -1994,7 +2079,7 @@ var require_headers = __commonJS({ if (init instanceof _HeadersList) { this[kHeadersMap] = new Map(init[kHeadersMap]); this[kHeadersSortedMap] = init[kHeadersSortedMap]; - this.cookies = init.cookies; + this.cookies = init.cookies === null ? null : [...init.cookies]; } else { this[kHeadersMap] = new Map(init); this[kHeadersSortedMap] = null; @@ -2036,7 +2121,7 @@ var require_headers = __commonJS({ if (lowercaseName === "set-cookie") { this.cookies = [value]; } - return this[kHeadersMap].set(lowercaseName, { name, value }); + this[kHeadersMap].set(lowercaseName, { name, value }); } // https://fetch.spec.whatwg.org/#concept-header-list-delete delete(name) { @@ -2045,14 +2130,12 @@ var require_headers = __commonJS({ if (name === "set-cookie") { this.cookies = null; } - return this[kHeadersMap].delete(name); + this[kHeadersMap].delete(name); } // https://fetch.spec.whatwg.org/#concept-header-list-get get(name) { - if (!this.contains(name)) { - return null; - } - return this[kHeadersMap].get(name.toLowerCase())?.value ?? null; + const value = this[kHeadersMap].get(name.toLowerCase()); + return value === void 0 ? null : value.value; } *[Symbol.iterator]() { for (const [name, { value }] of this[kHeadersMap]) { @@ -2074,6 +2157,9 @@ var require_headers = __commonJS({ __name(this, "Headers"); } constructor(init = void 0) { + if (init === kConstruct) { + return; + } this[kHeadersList] = new HeadersList(); this[kGuard] = "none"; if (init !== void 0) { @@ -2087,25 +2173,7 @@ var require_headers = __commonJS({ webidl.argumentLengthCheck(arguments, 2, { header: "Headers.append" }); name = webidl.converters.ByteString(name); value = webidl.converters.ByteString(value); - value = headerValueNormalize(value); - if (!isValidHeaderName(name)) { - throw webidl.errors.invalidArgument({ - prefix: "Headers.append", - value: name, - type: "header name" - }); - } else if (!isValidHeaderValue(value)) { - throw webidl.errors.invalidArgument({ - prefix: "Headers.append", - value, - type: "header value" - }); - } - if (this[kGuard] === "immutable") { - throw new TypeError("immutable"); - } else if (this[kGuard] === "request-no-cors") { - } - return this[kHeadersList].append(name, value); + return appendHeader(this, name, value); } // https://fetch.spec.whatwg.org/#dom-headers-delete delete(name) { @@ -2126,7 +2194,7 @@ var require_headers = __commonJS({ if (!this[kHeadersList].contains(name)) { return; } - return this[kHeadersList].delete(name); + this[kHeadersList].delete(name); } // https://fetch.spec.whatwg.org/#dom-headers-get get(name) { @@ -2180,7 +2248,7 @@ var require_headers = __commonJS({ throw new TypeError("immutable"); } else if (this[kGuard] === "request-no-cors") { } - return this[kHeadersList].set(name, value); + this[kHeadersList].set(name, value); } // https://fetch.spec.whatwg.org/#dom-headers-getsetcookie getSetCookie() { @@ -2199,10 +2267,11 @@ var require_headers = __commonJS({ const headers = []; const names = [...this[kHeadersList]].sort((a, b) => a[0] < b[0] ? -1 : 1); const cookies = this[kHeadersList].cookies; - for (const [name, value] of names) { + for (let i = 0; i < names.length; ++i) { + const [name, value] = names[i]; if (name === "set-cookie") { - for (const value2 of cookies) { - headers.push([name, value2]); + for (let j = 0; j < cookies.length; ++j) { + headers.push([name, cookies[j]]); } } else { assert(value !== null); @@ -2214,6 +2283,14 @@ var require_headers = __commonJS({ } keys() { webidl.brandCheck(this, _Headers); + if (this[kGuard] === "immutable") { + const value = this[kHeadersSortedMap]; + return makeIterator( + () => value, + "Headers", + "key" + ); + } return makeIterator( () => [...this[kHeadersSortedMap].values()], "Headers", @@ -2222,6 +2299,14 @@ var require_headers = __commonJS({ } values() { webidl.brandCheck(this, _Headers); + if (this[kGuard] === "immutable") { + const value = this[kHeadersSortedMap]; + return makeIterator( + () => value, + "Headers", + "value" + ); + } return makeIterator( () => [...this[kHeadersSortedMap].values()], "Headers", @@ -2230,6 +2315,14 @@ var require_headers = __commonJS({ } entries() { webidl.brandCheck(this, _Headers); + if (this[kGuard] === "immutable") { + const value = this[kHeadersSortedMap]; + return makeIterator( + () => value, + "Headers", + "key+value" + ); + } return makeIterator( () => [...this[kHeadersSortedMap].values()], "Headers", @@ -2818,20 +2911,99 @@ var require_decodeText = __commonJS({ ["utf-8", utf8Decoder], ["utf8", utf8Decoder] ]); - function decodeText(text, textEncoding, destEncoding) { - if (text) { - if (textDecoders.has(destEncoding)) { - try { - return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding)); - } catch (e) { - } - } else { + function getDecoder(charset) { + let lc; + while (true) { + switch (charset) { + case "utf-8": + case "utf8": + return decoders.utf8; + case "latin1": + case "ascii": + case "us-ascii": + case "iso-8859-1": + case "iso8859-1": + case "iso88591": + case "iso_8859-1": + case "windows-1252": + case "iso_8859-1:1987": + case "cp1252": + case "x-cp1252": + return decoders.latin1; + case "utf16le": + case "utf-16le": + case "ucs2": + case "ucs-2": + return decoders.utf16le; + case "base64": + return decoders.base64; + default: + if (lc === void 0) { + lc = true; + charset = charset.toLowerCase(); + continue; + } + return decoders.other.bind(charset); + } + } + } + __name(getDecoder, "getDecoder"); + var decoders = { + utf8: (data, sourceEncoding) => { + if (data.length === 0) { + return ""; + } + if (typeof data === "string") { + data = Buffer.from(data, sourceEncoding); + } + return data.utf8Slice(0, data.length); + }, + latin1: (data, sourceEncoding) => { + if (data.length === 0) { + return ""; + } + if (typeof data === "string") { + return data; + } + return data.latin1Slice(0, data.length); + }, + utf16le: (data, sourceEncoding) => { + if (data.length === 0) { + return ""; + } + if (typeof data === "string") { + data = Buffer.from(data, sourceEncoding); + } + return data.ucs2Slice(0, data.length); + }, + base64: (data, sourceEncoding) => { + if (data.length === 0) { + return ""; + } + if (typeof data === "string") { + data = Buffer.from(data, sourceEncoding); + } + return data.base64Slice(0, data.length); + }, + other: (data, sourceEncoding) => { + if (data.length === 0) { + return ""; + } + if (typeof data === "string") { + data = Buffer.from(data, sourceEncoding); + } + if (textDecoders.has(exports2.toString())) { try { - textDecoders.set(destEncoding, new TextDecoder(destEncoding)); - return textDecoders.get(destEncoding).decode(Buffer.from(text, textEncoding)); + return textDecoders.get(exports2).decode(data); } catch (e) { } } + return typeof data === "string" ? data : data.toString(); + } + }; + function decodeText(text, sourceEncoding, destEncoding) { + if (text) { + return getDecoder(destEncoding)(text, sourceEncoding); } return text; } @@ -2845,20 +3017,511 @@ var require_parseParams = __commonJS({ "node_modules/@fastify/busboy/lib/utils/parseParams.js"(exports2, module2) { "use strict"; var decodeText = require_decodeText(); - var RE_ENCODED = /%([a-fA-F0-9]{2})/g; - function encodedReplacer(match, byte) { - return String.fromCharCode(parseInt(byte, 16)); + var RE_ENCODED = /%[a-fA-F0-9][a-fA-F0-9]/g; + var EncodedLookup = { + "%00": "\0", + "%01": "", + "%02": "", + "%03": "", + "%04": "", + "%05": "", + "%06": "", + "%07": "\x07", + "%08": "\b", + "%09": " ", + "%0a": "\n", + "%0A": "\n", + "%0b": "\v", + "%0B": "\v", + "%0c": "\f", + "%0C": "\f", + "%0d": "\r", + "%0D": "\r", + "%0e": "", + "%0E": "", + "%0f": "", + "%0F": "", + "%10": "", + "%11": "", + "%12": "", + "%13": "", + "%14": "", + "%15": "", + "%16": "", + "%17": "", + "%18": "", + "%19": "", + "%1a": "", + "%1A": "", + "%1b": "\x1B", + "%1B": "\x1B", + "%1c": "", + "%1C": "", + "%1d": "", + "%1D": "", + "%1e": "", + "%1E": "", + "%1f": "", + "%1F": "", + "%20": " ", + "%21": "!", + "%22": '"', + "%23": "#", + "%24": "$", + "%25": "%", + "%26": "&", + "%27": "'", + "%28": "(", + "%29": ")", + "%2a": "*", + "%2A": "*", + "%2b": "+", + "%2B": "+", + "%2c": ",", + "%2C": ",", + "%2d": "-", + "%2D": "-", + "%2e": ".", + "%2E": ".", + "%2f": "/", + "%2F": "/", + "%30": "0", + "%31": "1", + "%32": "2", + "%33": "3", + "%34": "4", + "%35": "5", + "%36": "6", + "%37": "7", + "%38": "8", + "%39": "9", + "%3a": ":", + "%3A": ":", + "%3b": ";", + "%3B": ";", + "%3c": "<", + "%3C": "<", + "%3d": "=", + "%3D": "=", + "%3e": ">", + "%3E": ">", + "%3f": "?", + "%3F": "?", + "%40": "@", + "%41": "A", + "%42": "B", + "%43": "C", + "%44": "D", + "%45": "E", + "%46": "F", + "%47": "G", + "%48": "H", + "%49": "I", + "%4a": "J", + "%4A": "J", + "%4b": "K", + "%4B": "K", + "%4c": "L", + "%4C": "L", + "%4d": "M", + "%4D": "M", + "%4e": "N", + "%4E": "N", + "%4f": "O", + "%4F": "O", + "%50": "P", + "%51": "Q", + "%52": "R", + "%53": "S", + "%54": "T", + "%55": "U", + "%56": "V", + "%57": "W", + "%58": "X", + "%59": "Y", + "%5a": "Z", + "%5A": "Z", + "%5b": "[", + "%5B": "[", + "%5c": "\\", + "%5C": "\\", + "%5d": "]", + "%5D": "]", + "%5e": "^", + "%5E": "^", + "%5f": "_", + "%5F": "_", + "%60": "`", + "%61": "a", + "%62": "b", + "%63": "c", + "%64": "d", + "%65": "e", + "%66": "f", + "%67": "g", + "%68": "h", + "%69": "i", + "%6a": "j", + "%6A": "j", + "%6b": "k", + "%6B": "k", + "%6c": "l", + "%6C": "l", + "%6d": "m", + "%6D": "m", + "%6e": "n", + "%6E": "n", + "%6f": "o", + "%6F": "o", + "%70": "p", + "%71": "q", + "%72": "r", + "%73": "s", + "%74": "t", + "%75": "u", + "%76": "v", + "%77": "w", + "%78": "x", + "%79": "y", + "%7a": "z", + "%7A": "z", + "%7b": "{", + "%7B": "{", + "%7c": "|", + "%7C": "|", + "%7d": "}", + "%7D": "}", + "%7e": "~", + "%7E": "~", + "%7f": "\x7F", + "%7F": "\x7F", + "%80": "\x80", + "%81": "\x81", + "%82": "\x82", + "%83": "\x83", + "%84": "\x84", + "%85": "\x85", + "%86": "\x86", + "%87": "\x87", + "%88": "\x88", + "%89": "\x89", + "%8a": "\x8A", + "%8A": "\x8A", + "%8b": "\x8B", + "%8B": "\x8B", + "%8c": "\x8C", + "%8C": "\x8C", + "%8d": "\x8D", + "%8D": "\x8D", + "%8e": "\x8E", + "%8E": "\x8E", + "%8f": "\x8F", + "%8F": "\x8F", + "%90": "\x90", + "%91": "\x91", + "%92": "\x92", + "%93": "\x93", + "%94": "\x94", + "%95": "\x95", + "%96": "\x96", + "%97": "\x97", + "%98": "\x98", + "%99": "\x99", + "%9a": "\x9A", + "%9A": "\x9A", + "%9b": "\x9B", + "%9B": "\x9B", + "%9c": "\x9C", + "%9C": "\x9C", + "%9d": "\x9D", + "%9D": "\x9D", + "%9e": "\x9E", + "%9E": "\x9E", + "%9f": "\x9F", + "%9F": "\x9F", + "%a0": "\xA0", + "%A0": "\xA0", + "%a1": "\xA1", + "%A1": "\xA1", + "%a2": "\xA2", + "%A2": "\xA2", + "%a3": "\xA3", + "%A3": "\xA3", + "%a4": "\xA4", + "%A4": "\xA4", + "%a5": "\xA5", + "%A5": "\xA5", + "%a6": "\xA6", + "%A6": "\xA6", + "%a7": "\xA7", + "%A7": "\xA7", + "%a8": "\xA8", + "%A8": "\xA8", + "%a9": "\xA9", + "%A9": "\xA9", + "%aa": "\xAA", + "%Aa": "\xAA", + "%aA": "\xAA", + "%AA": "\xAA", + "%ab": "\xAB", + "%Ab": "\xAB", + "%aB": "\xAB", + "%AB": "\xAB", + "%ac": "\xAC", + "%Ac": "\xAC", + "%aC": "\xAC", + "%AC": "\xAC", + "%ad": "\xAD", + "%Ad": "\xAD", + "%aD": "\xAD", + "%AD": "\xAD", + "%ae": "\xAE", + "%Ae": "\xAE", + "%aE": "\xAE", + "%AE": "\xAE", + "%af": "\xAF", + "%Af": "\xAF", + "%aF": "\xAF", + "%AF": "\xAF", + "%b0": "\xB0", + "%B0": "\xB0", + "%b1": "\xB1", + "%B1": "\xB1", + "%b2": "\xB2", + "%B2": "\xB2", + "%b3": "\xB3", + "%B3": "\xB3", + "%b4": "\xB4", + "%B4": "\xB4", + "%b5": "\xB5", + "%B5": "\xB5", + "%b6": "\xB6", + "%B6": "\xB6", + "%b7": "\xB7", + "%B7": "\xB7", + "%b8": "\xB8", + "%B8": "\xB8", + "%b9": "\xB9", + "%B9": "\xB9", + "%ba": "\xBA", + "%Ba": "\xBA", + "%bA": "\xBA", + "%BA": "\xBA", + "%bb": "\xBB", + "%Bb": "\xBB", + "%bB": "\xBB", + "%BB": "\xBB", + "%bc": "\xBC", + "%Bc": "\xBC", + "%bC": "\xBC", + "%BC": "\xBC", + "%bd": "\xBD", + "%Bd": "\xBD", + "%bD": "\xBD", + "%BD": "\xBD", + "%be": "\xBE", + "%Be": "\xBE", + "%bE": "\xBE", + "%BE": "\xBE", + "%bf": "\xBF", + "%Bf": "\xBF", + "%bF": "\xBF", + "%BF": "\xBF", + "%c0": "\xC0", + "%C0": "\xC0", + "%c1": "\xC1", + "%C1": "\xC1", + "%c2": "\xC2", + "%C2": "\xC2", + "%c3": "\xC3", + "%C3": "\xC3", + "%c4": "\xC4", + "%C4": "\xC4", + "%c5": "\xC5", + "%C5": "\xC5", + "%c6": "\xC6", + "%C6": "\xC6", + "%c7": "\xC7", + "%C7": "\xC7", + "%c8": "\xC8", + "%C8": "\xC8", + "%c9": "\xC9", + "%C9": "\xC9", + "%ca": "\xCA", + "%Ca": "\xCA", + "%cA": "\xCA", + "%CA": "\xCA", + "%cb": "\xCB", + "%Cb": "\xCB", + "%cB": "\xCB", + "%CB": "\xCB", + "%cc": "\xCC", + "%Cc": "\xCC", + "%cC": "\xCC", + "%CC": "\xCC", + "%cd": "\xCD", + "%Cd": "\xCD", + "%cD": "\xCD", + "%CD": "\xCD", + "%ce": "\xCE", + "%Ce": "\xCE", + "%cE": "\xCE", + "%CE": "\xCE", + "%cf": "\xCF", + "%Cf": "\xCF", + "%cF": "\xCF", + "%CF": "\xCF", + "%d0": "\xD0", + "%D0": "\xD0", + "%d1": "\xD1", + "%D1": "\xD1", + "%d2": "\xD2", + "%D2": "\xD2", + "%d3": "\xD3", + "%D3": "\xD3", + "%d4": "\xD4", + "%D4": "\xD4", + "%d5": "\xD5", + "%D5": "\xD5", + "%d6": "\xD6", + "%D6": "\xD6", + "%d7": "\xD7", + "%D7": "\xD7", + "%d8": "\xD8", + "%D8": "\xD8", + "%d9": "\xD9", + "%D9": "\xD9", + "%da": "\xDA", + "%Da": "\xDA", + "%dA": "\xDA", + "%DA": "\xDA", + "%db": "\xDB", + "%Db": "\xDB", + "%dB": "\xDB", + "%DB": "\xDB", + "%dc": "\xDC", + "%Dc": "\xDC", + "%dC": "\xDC", + "%DC": "\xDC", + "%dd": "\xDD", + "%Dd": "\xDD", + "%dD": "\xDD", + "%DD": "\xDD", + "%de": "\xDE", + "%De": "\xDE", + "%dE": "\xDE", + "%DE": "\xDE", + "%df": "\xDF", + "%Df": "\xDF", + "%dF": "\xDF", + "%DF": "\xDF", + "%e0": "\xE0", + "%E0": "\xE0", + "%e1": "\xE1", + "%E1": "\xE1", + "%e2": "\xE2", + "%E2": "\xE2", + "%e3": "\xE3", + "%E3": "\xE3", + "%e4": "\xE4", + "%E4": "\xE4", + "%e5": "\xE5", + "%E5": "\xE5", + "%e6": "\xE6", + "%E6": "\xE6", + "%e7": "\xE7", + "%E7": "\xE7", + "%e8": "\xE8", + "%E8": "\xE8", + "%e9": "\xE9", + "%E9": "\xE9", + "%ea": "\xEA", + "%Ea": "\xEA", + "%eA": "\xEA", + "%EA": "\xEA", + "%eb": "\xEB", + "%Eb": "\xEB", + "%eB": "\xEB", + "%EB": "\xEB", + "%ec": "\xEC", + "%Ec": "\xEC", + "%eC": "\xEC", + "%EC": "\xEC", + "%ed": "\xED", + "%Ed": "\xED", + "%eD": "\xED", + "%ED": "\xED", + "%ee": "\xEE", + "%Ee": "\xEE", + "%eE": "\xEE", + "%EE": "\xEE", + "%ef": "\xEF", + "%Ef": "\xEF", + "%eF": "\xEF", + "%EF": "\xEF", + "%f0": "\xF0", + "%F0": "\xF0", + "%f1": "\xF1", + "%F1": "\xF1", + "%f2": "\xF2", + "%F2": "\xF2", + "%f3": "\xF3", + "%F3": "\xF3", + "%f4": "\xF4", + "%F4": "\xF4", + "%f5": "\xF5", + "%F5": "\xF5", + "%f6": "\xF6", + "%F6": "\xF6", + "%f7": "\xF7", + "%F7": "\xF7", + "%f8": "\xF8", + "%F8": "\xF8", + "%f9": "\xF9", + "%F9": "\xF9", + "%fa": "\xFA", + "%Fa": "\xFA", + "%fA": "\xFA", + "%FA": "\xFA", + "%fb": "\xFB", + "%Fb": "\xFB", + "%fB": "\xFB", + "%FB": "\xFB", + "%fc": "\xFC", + "%Fc": "\xFC", + "%fC": "\xFC", + "%FC": "\xFC", + "%fd": "\xFD", + "%Fd": "\xFD", + "%fD": "\xFD", + "%FD": "\xFD", + "%fe": "\xFE", + "%Fe": "\xFE", + "%fE": "\xFE", + "%FE": "\xFE", + "%ff": "\xFF", + "%Ff": "\xFF", + "%fF": "\xFF", + "%FF": "\xFF" + }; + function encodedReplacer(match) { + return EncodedLookup[match]; } __name(encodedReplacer, "encodedReplacer"); + var STATE_KEY = 0; + var STATE_VALUE = 1; + var STATE_CHARSET = 2; + var STATE_LANG = 3; function parseParams(str) { const res = []; - let state = "key"; + let state = STATE_KEY; let charset = ""; let inquote = false; let escaping = false; let p = 0; let tmp = ""; - for (var i = 0, len = str.length; i < len; ++i) { + const len = str.length; + for (var i = 0; i < len; ++i) { const char = str[i]; if (char === "\\" && inquote) { if (escaping) { @@ -2871,7 +3534,7 @@ var require_parseParams = __commonJS({ if (!escaping) { if (inquote) { inquote = false; - state = "key"; + state = STATE_KEY; } else { inquote = true; } @@ -2884,26 +3547,22 @@ var require_parseParams = __commonJS({ tmp += "\\"; } escaping = false; - if ((state === "charset" || state === "lang") && char === "'") { - if (state === "charset") { - state = "lang"; + if ((state === STATE_CHARSET || state === STATE_LANG) && char === "'") { + if (state === STATE_CHARSET) { + state = STATE_LANG; charset = tmp.substring(1); } else { - state = "value"; + state = STATE_VALUE; } tmp = ""; continue; - } else if (state === "key" && (char === "*" || char === "=") && res.length) { - if (char === "*") { - state = "charset"; - } else { - state = "value"; - } + } else if (state === STATE_KEY && (char === "*" || char === "=") && res.length) { + state = char === "*" ? STATE_CHARSET : STATE_VALUE; res[p] = [tmp, void 0]; tmp = ""; continue; } else if (!inquote && char === ";") { - state = "key"; + state = STATE_KEY; if (charset) { if (tmp.length) { tmp = decodeText( @@ -3783,15 +4442,12 @@ var require_dataURL = __commonJS({ } __name(dataURLProcessor, "dataURLProcessor"); function URLSerializer(url, excludeFragment = false) { - const href = url.href; if (!excludeFragment) { - return href; + return url.href; } - const hash = href.lastIndexOf("#"); - if (hash === -1) { - return href; - } - return href.slice(0, hash); + const href = url.href; + const hashLength = url.hash.length; + return hashLength === 0 ? href : href.substring(0, href.length - hashLength); } __name(URLSerializer, "URLSerializer"); function collectASequenceOfCodePoints(condition, input, position) { @@ -4808,7 +5464,7 @@ var require_response = __commonJS({ var { FormData } = require_formdata(); var { getGlobalOrigin } = require_global(); var { URLSerializer } = require_dataURL(); - var { kHeadersList } = require_symbols(); + var { kHeadersList, kConstruct } = require_symbols(); var assert = require("assert"); var { types } = require("util"); var ReadableStream = globalThis.ReadableStream || require("stream/web").ReadableStream; @@ -4880,7 +5536,7 @@ var require_response = __commonJS({ init = webidl.converters.ResponseInit(init); this[kRealm] = { settingsObject: {} }; this[kState] = makeResponse({}); - this[kHeaders] = new Headers(); + this[kHeaders] = new Headers(kConstruct); this[kHeaders][kGuard] = "response"; this[kHeaders][kHeadersList] = this[kState].headersList; this[kHeaders][kRealm] = this[kRealm]; @@ -5123,7 +5779,7 @@ var require_response = __commonJS({ if (isBlobLike(V)) { return webidl.converters.Blob(V, { strict: false }); } - if (types.isAnyArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { + if (types.isArrayBuffer(V) || types.isTypedArray(V) || types.isDataView(V)) { return webidl.converters.BufferSource(V); } if (util.isFormDataLike(V)) { @@ -5230,7 +5886,8 @@ var require_request = __commonJS({ isValidHTTPToken, sameOrigin, normalizeMethod, - makePolicyContainer + makePolicyContainer, + normalizeMethodRecord } = require_util2(); var { forbiddenMethodsSet, @@ -5247,11 +5904,10 @@ var require_request = __commonJS({ var { webidl } = require_webidl(); var { getGlobalOrigin } = require_global(); var { URLSerializer } = require_dataURL(); - var { kHeadersList } = require_symbols(); + var { kHeadersList, kConstruct } = require_symbols(); var assert = require("assert"); var { getMaxListeners, setMaxListeners, getEventListeners, defaultMaxListeners } = require("events"); var TransformStream = globalThis.TransformStream; - var kInit = Symbol("init"); var kAbortController = Symbol("abortController"); var requestFinalizer = new FinalizationRegistry(({ signal, abort }) => { signal.removeEventListener("abort", abort); @@ -5262,7 +5918,7 @@ var require_request = __commonJS({ } // https://fetch.spec.whatwg.org/#dom-request constructor(input, init = {}) { - if (input === kInit) { + if (input === kConstruct) { return; } webidl.argumentLengthCheck(arguments, 1, { header: "Request constructor" }); @@ -5354,7 +6010,8 @@ var require_request = __commonJS({ // URL list A clone of request’s URL list. urlList: [...request.urlList] }); - if (Object.keys(init).length > 0) { + const initHasKey = Object.keys(init).length !== 0; + if (initHasKey) { if (request.mode === "navigate") { request.mode = "same-origin"; } @@ -5416,7 +6073,7 @@ var require_request = __commonJS({ if (init.redirect !== void 0) { request.redirect = init.redirect; } - if (init.integrity !== void 0 && init.integrity != null) { + if (init.integrity != null) { request.integrity = String(init.integrity); } if (init.keepalive !== void 0) { @@ -5424,13 +6081,13 @@ var require_request = __commonJS({ } if (init.method !== void 0) { let method = init.method; - if (!isValidHTTPToken(init.method)) { - throw TypeError(`'${init.method}' is not a valid HTTP method.`); + if (!isValidHTTPToken(method)) { + throw new TypeError(`'${method}' is not a valid HTTP method.`); } if (forbiddenMethodsSet.has(method.toUpperCase())) { - throw TypeError(`'${init.method}' HTTP method is unsupported.`); + throw new TypeError(`'${method}' HTTP method is unsupported.`); } - method = normalizeMethod(init.method); + method = normalizeMethodRecord[method] ?? normalizeMethod(method); request.method = method; } if (init.signal !== void 0) { @@ -5469,7 +6126,7 @@ var require_request = __commonJS({ requestFinalizer.register(ac, { signal, abort }); } } - this[kHeaders] = new Headers(); + this[kHeaders] = new Headers(kConstruct); this[kHeaders][kHeadersList] = request.headersList; this[kHeaders][kGuard] = "request"; this[kHeaders][kRealm] = this[kRealm]; @@ -5481,16 +6138,15 @@ var require_request = __commonJS({ } this[kHeaders][kGuard] = "request-no-cors"; } - if (Object.keys(init).length !== 0) { - let headers = new Headers(this[kHeaders]); - if (init.headers !== void 0) { - headers = init.headers; - } - this[kHeaders][kHeadersList].clear(); - if (headers.constructor.name === "Headers") { + if (initHasKey) { + const headersList = this[kHeaders][kHeadersList]; + const headers = init.headers !== void 0 ? init.headers : new HeadersList(headersList); + headersList.clear(); + if (headers instanceof HeadersList) { for (const [key, val] of headers) { - this[kHeaders].append(key, val); + headersList.append(key, val); } + headersList.cookies = headers.cookies; } else { fillHeaders(this[kHeaders], headers); } @@ -5666,10 +6322,10 @@ var require_request = __commonJS({ throw new TypeError("unusable"); } const clonedRequest = cloneRequest(this[kState]); - const clonedRequestObject = new _Request(kInit); + const clonedRequestObject = new _Request(kConstruct); clonedRequestObject[kState] = clonedRequest; clonedRequestObject[kRealm] = this[kRealm]; - clonedRequestObject[kHeaders] = new Headers(); + clonedRequestObject[kHeaders] = new Headers(kConstruct); clonedRequestObject[kHeaders][kHeadersList] = clonedRequest.headersList; clonedRequestObject[kHeaders][kGuard] = this[kHeaders][kGuard]; clonedRequestObject[kHeaders][kRealm] = this[kHeaders][kRealm]; @@ -6475,10 +7131,26 @@ var require_request2 = __commonJS({ this.bodyTimeout = bodyTimeout; this.throwOnError = throwOnError === true; this.method = method; + this.abort = null; if (body == null) { this.body = null; } else if (util.isStream(body)) { this.body = body; + const rState = this.body._readableState; + if (!rState || !rState.autoDestroy) { + this.endHandler = /* @__PURE__ */ __name(function autoDestroy() { + util.destroy(this); + }, "autoDestroy"); + this.body.on("end", this.endHandler); + } + this.errorHandler = (err) => { + if (this.abort) { + this.abort(err); + } else { + this.error = err; + } + }; + this.body.on("error", this.errorHandler); } else if (util.isBuffer(body)) { this.body = body.byteLength ? body : null; } else if (ArrayBuffer.isView(body)) { @@ -6551,9 +7223,9 @@ var require_request2 = __commonJS({ onBodySent(chunk) { if (this[kHandler].onBodySent) { try { - this[kHandler].onBodySent(chunk); + return this[kHandler].onBodySent(chunk); } catch (err) { - this.onError(err); + this.abort(err); } } } @@ -6563,16 +7235,21 @@ var require_request2 = __commonJS({ } if (this[kHandler].onRequestSent) { try { - this[kHandler].onRequestSent(); + return this[kHandler].onRequestSent(); } catch (err) { - this.onError(err); + this.abort(err); } } } onConnect(abort) { assert(!this.aborted); assert(!this.completed); - return this[kHandler].onConnect(abort); + if (this.error) { + abort(this.error); + } else { + this.abort = abort; + return this[kHandler].onConnect(abort); + } } onHeaders(statusCode, headers, resume, statusText) { assert(!this.aborted); @@ -6580,12 +7257,21 @@ var require_request2 = __commonJS({ if (channels.headers.hasSubscribers) { channels.headers.publish({ request: this, response: { statusCode, headers, statusText } }); } - return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + try { + return this[kHandler].onHeaders(statusCode, headers, resume, statusText); + } catch (err) { + this.abort(err); + } } onData(chunk) { assert(!this.aborted); assert(!this.completed); - return this[kHandler].onData(chunk); + try { + return this[kHandler].onData(chunk); + } catch (err) { + this.abort(err); + return false; + } } onUpgrade(statusCode, headers, socket) { assert(!this.aborted); @@ -6593,14 +7279,20 @@ var require_request2 = __commonJS({ return this[kHandler].onUpgrade(statusCode, headers, socket); } onComplete(trailers) { + this.onFinally(); assert(!this.aborted); this.completed = true; if (channels.trailers.hasSubscribers) { channels.trailers.publish({ request: this, trailers }); } - return this[kHandler].onComplete(trailers); + try { + return this[kHandler].onComplete(trailers); + } catch (err) { + this.onError(err); + } } onError(error) { + this.onFinally(); if (channels.error.hasSubscribers) { channels.error.publish({ request: this, error }); } @@ -6610,6 +7302,16 @@ var require_request2 = __commonJS({ this.aborted = true; return this[kHandler].onError(error); } + onFinally() { + if (this.errorHandler) { + this.body.off("error", this.errorHandler); + this.errorHandler = null; + } + if (this.endHandler) { + this.body.off("end", this.endHandler); + this.endHandler = null; + } + } // TODO: adjust to support H2 addHeader(key, value) { processHeader(this, key, value); @@ -8147,11 +8849,8 @@ var require_client = __commonJS({ } else { socket[kReset] = true; } - let pause; - try { - pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; - } catch (err) { - util.destroy(socket, err); + const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false; + if (request.aborted) { return -1; } if (request.method === "HEAD") { @@ -8185,13 +8884,8 @@ var require_client = __commonJS({ return -1; } this.bytesRead += buf.length; - try { - if (request.onData(buf) === false) { - return constants.ERROR.PAUSED; - } - } catch (err) { - util.destroy(socket, err); - return -1; + if (request.onData(buf) === false) { + return constants.ERROR.PAUSED; } } onMessageComplete() { @@ -8221,11 +8915,7 @@ var require_client = __commonJS({ util.destroy(socket, new ResponseContentLengthMismatchError()); return -1; } - try { - request.onComplete(headers); - } catch (err) { - errorRequest(client, request, err); - } + request.onComplete(headers); client[kQueue][client[kRunningIdx]++] = null; if (socket[kWriting]) { assert.strictEqual(client[kRunning], 0); @@ -8340,7 +9030,7 @@ var require_client = __commonJS({ if (hostname[0] === "[") { const idx = hostname.indexOf("]"); assert(idx !== -1); - const ip = hostname.substr(1, idx - 1); + const ip = hostname.substring(1, idx); assert(net.isIP(ip)); hostname = ip; } @@ -8567,21 +9257,7 @@ var require_client = __commonJS({ if (client[kRunning] > 0 && (request.upgrade || request.method === "CONNECT")) { return; } - if (util.isStream(request.body) && util.bodyLength(request.body) === 0) { - request.body.on( - "data", - /* istanbul ignore next */ - function() { - assert(false); - } - ).on("error", function(err) { - errorRequest(client, request, err); - }).on("end", function() { - util.destroy(this); - }); - request.body = null; - } - if (client[kRunning] > 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body))) { + if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 && (util.isStream(request.body) || util.isAsyncIterable(request.body))) { return; } if (!request.aborted && write(client, request)) { @@ -8592,6 +9268,10 @@ var require_client = __commonJS({ } } __name(_resume, "_resume"); + function shouldSendContentLength(method) { + return method !== "GET" && method !== "HEAD" && method !== "OPTIONS" && method !== "TRACE" && method !== "CONNECT"; + } + __name(shouldSendContentLength, "shouldSendContentLength"); function write(client, request) { if (client[kHTTPConnVersion] === "h2") { writeH2(client, client[kHTTP2Session], request); @@ -8602,14 +9282,15 @@ var require_client = __commonJS({ if (body && typeof body.read === "function") { body.read(0); } - let contentLength = util.bodyLength(body); + const bodyLength = util.bodyLength(body); + let contentLength = bodyLength; if (contentLength === null) { contentLength = request.contentLength; } if (contentLength === 0 && !expectsPayload) { contentLength = null; } - if (request.contentLength !== null && request.contentLength !== contentLength) { + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { errorRequest(client, request, new RequestContentLengthMismatchError()); return false; @@ -8669,7 +9350,7 @@ upgrade: ${upgrade}\r if (channels.sendHeaders.hasSubscribers) { channels.sendHeaders.publish({ request, headers: header, socket }); } - if (!body) { + if (!body || bodyLength === 0) { if (contentLength === 0) { socket.write(`${header}content-length: 0\r \r @@ -8769,7 +9450,7 @@ upgrade: ${upgrade}\r if (contentLength === 0 || !expectsPayload) { contentLength = null; } - if (request.contentLength != null && request.contentLength !== contentLength) { + if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength != null && request.contentLength !== contentLength) { if (client[kStrictContentLength]) { errorRequest(client, request, new RequestContentLengthMismatchError()); return false; @@ -8795,7 +9476,8 @@ upgrade: ${upgrade}\r } ++h2State.openStreams; stream.once("response", (headers2) => { - if (request.onHeaders(Number(headers2[HTTP2_HEADER_STATUS]), headers2, stream.resume.bind(stream), "") === false) { + const { [HTTP2_HEADER_STATUS]: statusCode, ...realHeaders } = headers2; + if (request.onHeaders(Number(statusCode), realHeaders, stream.resume.bind(stream), "") === false) { stream.pause(); } }); @@ -8803,13 +9485,15 @@ upgrade: ${upgrade}\r request.onComplete([]); }); stream.on("data", (chunk) => { - if (request.onData(chunk) === false) + if (request.onData(chunk) === false) { stream.pause(); + } }); stream.once("close", () => { h2State.openStreams -= 1; - if (h2State.openStreams === 0) + if (h2State.openStreams === 0) { session.unref(); + } }); stream.once("error", function(err) { if (client[kHTTP2Session] && !client[kHTTP2Session].destroyed && !this.closed && !this.destroyed) { @@ -8939,7 +9623,11 @@ upgrade: ${upgrade}\r } }, "onDrain"); const onAbort = /* @__PURE__ */ __name(function() { - onFinished(new RequestAbortedError()); + if (finished) { + return; + } + const err = new RequestAbortedError(); + queueMicrotask(() => onFinished(err)); }, "onAbort"); const onFinished = /* @__PURE__ */ __name(function(err) { if (finished) { @@ -9241,7 +9929,7 @@ var require_pool = __commonJS({ maxCachedSessions, allowH2, socketPath, - timeout: connectTimeout == null ? 1e4 : connectTimeout, + timeout: connectTimeout, ...util.nodeHasAutoSelectFamily && autoSelectFamily ? { autoSelectFamily, autoSelectFamilyAttemptTimeout } : void 0, ...connect }); @@ -9606,7 +10294,7 @@ var require_fetch = __commonJS({ if (timingInfo === null) { return; } - if (!timingInfo.timingAllowPassed) { + if (!response.timingAllowPassed) { timingInfo = createOpaqueTimingInfo({ startTime: timingInfo.startTime }); @@ -10340,7 +11028,7 @@ var require_fetch = __commonJS({ path: url.pathname + url.search, origin: url.origin, method: request.method, - body: fetchParams.controller.dispatcher.isMockActive ? request.body && request.body.source : body, + body: fetchParams.controller.dispatcher.isMockActive ? request.body && (request.body.source || request.body.stream) : body, headers: request.headersList.entries, maxRedirections: 0, upgrade: request.mode === "websocket" ? "websocket" : void 0 @@ -10373,7 +11061,7 @@ var require_fetch = __commonJS({ } else if (key.toLowerCase() === "location") { location = val; } - headers.append(key, val); + headers[kHeadersList].append(key, val); } } else { const keys = Object.keys(headersList); @@ -10384,7 +11072,7 @@ var require_fetch = __commonJS({ } else if (key.toLowerCase() === "location") { location = val; } - headers.append(key, val); + headers[kHeadersList].append(key, val); } } this.body = new Readable({ read: resume }); @@ -10452,7 +11140,7 @@ var require_fetch = __commonJS({ for (let n = 0; n < headersList.length; n += 2) { const key = headersList[n + 0].toString("latin1"); const val = headersList[n + 1].toString("latin1"); - headers.append(key, val); + headers[kHeadersList].append(key, val); } resolve({ status, diff --git a/deps/uv/AUTHORS b/deps/uv/AUTHORS index 9b89421c42877e..6bf1a9fa2f96fa 100644 --- a/deps/uv/AUTHORS +++ b/deps/uv/AUTHORS @@ -548,3 +548,15 @@ liuxiang88 <94350585+liuxiang88@users.noreply.github.com> Jeffrey H. Johnson Abdirahim Musse <33973272+abmusse@users.noreply.github.com> 小明 <7737673+caobug@users.noreply.github.com> +Shuduo Sang +Keith Winstein +michalbiesek +Alois Klink +SmorkalovG +Pleuvens +jolai <58589285+laijonathan@users.noreply.github.com> +Julien Roncaglia +prubel +Per Allansson <65364157+per-allansson@users.noreply.github.com> +Matheus Izvekov +Christian Heimlich diff --git a/deps/uv/BUILD.gn b/deps/uv/BUILD.gn new file mode 100644 index 00000000000000..8e6ac27048b596 --- /dev/null +++ b/deps/uv/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +uv_gn_build("uv") { +} diff --git a/deps/uv/CMakeLists.txt b/deps/uv/CMakeLists.txt index 93733dd0478343..72377851b69f74 100644 --- a/deps/uv/CMakeLists.txt +++ b/deps/uv/CMakeLists.txt @@ -1,4 +1,4 @@ -cmake_minimum_required(VERSION 3.4) +cmake_minimum_required(VERSION 3.9) if(POLICY CMP0091) cmake_policy(SET CMP0091 NEW) # Enable MSVC_RUNTIME_LIBRARY setting @@ -186,7 +186,8 @@ if(WIN32) ws2_32 dbghelp ole32 - uuid) + uuid + shell32) list(APPEND uv_sources src/win/async.c src/win/core.c @@ -477,7 +478,7 @@ if(CMAKE_SYSTEM_NAME STREQUAL "OS390") endif() target_link_libraries(uv_a ${uv_libraries}) set_target_properties(uv_a PROPERTIES OUTPUT_NAME "uv") -if(MSVC) +if(WIN32) set_target_properties(uv_a PROPERTIES PREFIX "lib") endif() diff --git a/deps/uv/ChangeLog b/deps/uv/ChangeLog index e2cd8825222e31..f40fcc600bbc34 100644 --- a/deps/uv/ChangeLog +++ b/deps/uv/ChangeLog @@ -1,4 +1,113 @@ -2023.06.30, Version 1.46.0 (Stable) +2023.11.06, Version 1.47.0 (Stable) + +Changes since version 1.46.0: + +* test: fix license blurb (Ben Noordhuis) + +* linux: fix harmless warn_unused_result warning (Shuduo Sang) + +* darwin: fix build warnings (小明) + +* linux: don't use io_uring on pre-5.10.186 kernels (Ben Noordhuis) + +* fs: fix WTF-8 decoding issue (Jameson Nash) + +* test: enable disabled tcp_connect6_error_fault (Ben Noordhuis) + +* test: enable disabled fs_link (Ben Noordhuis) + +* test: enable disabled spawn_same_stdout_stderr (Ben Noordhuis) + +* linux: handle UNAME26 personality (Ben Noordhuis) + +* build: move cmake_minimum_required version to 3.9 (Keith Winstein) + +* unix: set ipv6 scope id for link-local addresses (Ben Noordhuis) + +* unix: match kqueue and epoll code (Trevor Norris) + +* win,spawn: allow `%PATH%` to be unset (Kyle Edwards) + +* doc: switch to Furo, a more modern Sphinx theme (Saúl Ibarra Corretgé) + +* darwin: make TCP_KEEPINTVL and TCP_KEEPCNT available (小明) + +* win,fs: avoid winapi macro redefinition (Brad King) + +* linux: add missing riscv syscall numbers (michalbiesek) + +* doc: fix broken "Shared library" Wikipedia link (Alois Klink) + +* unix: get mainline kernel version in Ubuntu (Santiago Gimeno) + +* unix: get mainline kernel version in Debian (Ben Noordhuis) + +* build: fix qemu install in CI-unix workflow (Santiago Gimeno) + +* unix: disable io_uring close on selected kernels (Santiago Gimeno) + +* test: skip tests when ipv6 is not available (Santiago Gimeno) + +* ibmi: implement ifaddrs, getifaddrs, freeifaddrs (Abdirahim Musse) + +* unix: reset signal counters after fork (SmorkalovG) + +* win,process: avoid assert after spawning Store app (Jameson Nash) + +* unix: remove pread/preadv conditionals (Ben Noordhuis) + +* unix: remove pwrite/pwritev conditionals (Ben Noordhuis) + +* darwin: remove workaround for data corruption bug (Ben Noordhuis) + +* src: default to stream=stderr in handle printer (Ben Noordhuis) + +* test: switch to new-style ASSERT_EQ macros (Pleuvens) + +* zos: correctly get cpu model in uv_cpu_info() (jolai) + +* test: fix get_passwd2 on IBM i (Abdirahim Musse) + +* unix: don't malloc on sync uv_fs_read (Ben Noordhuis) + +* freebsd: get fs event path with fcntl(F_KINFO) (David Carlier) + +* test: switch from ASSERT_* to ASSERT_PTR_* (Pleuvens) + +* darwin: workaround apple pthread_cond_wait bug (Julien Roncaglia) + +* doc: uv_close should be called after exit callback (Pleuvens) + +* test: 192.0.2.0/24 is the actual -TEST-NET-1 (prubel) + +* unix: add back preadv/pwritev fallback (Ben Noordhuis) + +* unix: rename variable for consistency (Ben Noordhuis) + +* unix: merge read/write code into single functions (Ben Noordhuis) + +* doc: filename arg to uv_fs_event_cb can be NULL (Ben Noordhuis) + +* build,win: we need to link against shell32.lib (Per Allansson) + +* unix: no preadv/pwritev workaround if not needed (Jeffrey H. Johnson) + +* build: add CI for Windows ARM64 (build only) (Per Allansson) + +* linux: disable io_uring on 32 bits arm systems (Ben Noordhuis) + +* build: run sanitizers on macos ci (Ben Noordhuis) + +* misc: export WTF8 conversion utilities (Jameson Nash) + +* build: fix libuv.a file name for cmake (Jameson Nash) + +* build: add windows ubsan and clang ci (Matheus Izvekov) + +* win: improve accuracy of ProductName between arch (Christian Heimlich) + + +2023.06.30, Version 1.46.0 (Stable), f0bb7e40f0508bedf6fad33769b3f87bb8aedfa6 Changes since version 1.45.0: diff --git a/deps/uv/configure.ac b/deps/uv/configure.ac index deb083605de639..0a1042ce3d384f 100644 --- a/deps/uv/configure.ac +++ b/deps/uv/configure.ac @@ -13,7 +13,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. AC_PREREQ(2.57) -AC_INIT([libuv], [1.46.0], [https://github.com/libuv/libuv/issues]) +AC_INIT([libuv], [1.47.0], [https://github.com/libuv/libuv/issues]) AC_CONFIG_MACRO_DIR([m4]) m4_include([m4/libuv-extra-automake-flags.m4]) m4_include([m4/as_case.m4]) @@ -74,7 +74,7 @@ AM_CONDITIONAL([OS400], [AS_CASE([$host_os],[os400], [true], [false]) AM_CONDITIONAL([SUNOS], [AS_CASE([$host_os],[solaris*], [true], [false])]) AM_CONDITIONAL([WINNT], [AS_CASE([$host_os],[mingw*], [true], [false])]) AS_CASE([$host_os],[mingw*], [ - LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv -luser32 -ldbghelp -lole32 -luuid" + LIBS="$LIBS -lws2_32 -lpsapi -liphlpapi -lshell32 -luserenv -luser32 -ldbghelp -lole32 -luuid -lshell32" ]) AS_CASE([$host_os], [solaris2.10], [ CFLAGS="$CFLAGS -DSUNOS_NO_IFADDRS" diff --git a/deps/uv/docs/requirements.txt b/deps/uv/docs/requirements.txt index b037de46595389..2e310ebe7283af 100644 --- a/deps/uv/docs/requirements.txt +++ b/deps/uv/docs/requirements.txt @@ -1,27 +1,36 @@ # primary -sphinx==6.1.3 +furo==2023.5.20 +Sphinx==6.1.3 # dependencies alabaster==0.7.13 Babel==2.11.0 +beautifulsoup4==4.12.2 certifi==2022.12.7 charset-normalizer==3.0.1 +colorama==0.4.6 docutils==0.19 idna==3.4 imagesize==1.4.1 importlib-metadata==6.0.0 Jinja2==3.1.2 +livereload==2.6.3 MarkupSafe==2.1.2 packaging==23.0 Pygments==2.14.0 pytz==2022.7.1 requests==2.28.2 +six==1.16.0 snowballstemmer==2.2.0 -sphinxcontrib-applehelp==1.0.3 +soupsieve==2.4.1 +sphinx-autobuild==2021.3.14 +sphinx-basic-ng==1.0.0b2 sphinxcontrib-devhelp==1.0.2 sphinxcontrib-htmlhelp==2.0.0 sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.5 +sphinxcontrib.applehelp==1.0.3 +tornado==6.3.2 urllib3==1.26.14 zipp==3.11.0 diff --git a/deps/uv/docs/src/conf.py b/deps/uv/docs/src/conf.py index f6f43253d364c5..354759a23c507a 100644 --- a/deps/uv/docs/src/conf.py +++ b/deps/uv/docs/src/conf.py @@ -118,7 +118,7 @@ def get_libuv_version(): # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -html_theme = 'nature' +html_theme = 'furo' # Theme options are theme-specific and customize the look and feel of a theme # further. For a list of options available for each theme, see the diff --git a/deps/uv/docs/src/fs_event.rst b/deps/uv/docs/src/fs_event.rst index e28ec625ed6b56..54a776ae6f1453 100644 --- a/deps/uv/docs/src/fs_event.rst +++ b/deps/uv/docs/src/fs_event.rst @@ -39,8 +39,12 @@ Data types .. c:type:: void (*uv_fs_event_cb)(uv_fs_event_t* handle, const char* filename, int events, int status) Callback passed to :c:func:`uv_fs_event_start` which will be called repeatedly - after the handle is started. If the handle was started with a directory the - `filename` parameter will be a relative path to a file contained in the directory. + after the handle is started. + + If the handle was started with a directory the `filename` parameter will + be a relative path to a file contained in the directory, or `NULL` if the + file name cannot be determined. + The `events` parameter is an ORed mask of :c:type:`uv_fs_event` elements. .. c:type:: uv_fs_event diff --git a/deps/uv/docs/src/misc.rst b/deps/uv/docs/src/misc.rst index 8c3a00e934c97e..989618304d16e5 100644 --- a/deps/uv/docs/src/misc.rst +++ b/deps/uv/docs/src/misc.rst @@ -839,3 +839,50 @@ API Causes the calling thread to sleep for `msec` milliseconds. .. versionadded:: 1.34.0 + +String manipulation functions +----------------------------- + +These string utilities are needed internally for dealing with Windows, and are +exported to allow clients to work uniformly with this data when the libuv API +is not complete. + +.. c:function:: size_t uv_utf16_length_as_wtf8(const uint16_t* utf16, ssize_t utf16_len) + + Get the length of a UTF-16 (or UCS-2) `utf16` value after converting it to + WTF-8. If `utf16` is NUL terminated, `utf16_len` can be set to -1, + otherwise it must be specified. + + .. versionadded:: 1.47.0 + +.. c:function:: int uv_utf16_to_wtf8(const uint16_t* utf16, ssize_t utf16_len, char** wtf8_ptr, size_t* wtf8_len_ptr) + + Convert UTF-16 (or UCS-2) data in `utf16` to WTF-8 data in `*wtf8_ptr`. The + `utf16_len` count (in characters) gives the length of `utf16`. If `utf16` + is NUL terminated, `utf16_len` can be set to -1, otherwise it must be + specified. If `wtf8_ptr` is `NULL`, no result will be computed, but the + length (equal to `uv_utf16_length_as_wtf8`) will be stored in `wtf8_ptr`. + If `*wtf8_ptr` is `NULL`, space for the conversion will be allocated and + returned in `wtf8_ptr` and the length will be returned in `wtf8_len_ptr`. + Otherwise, the length of `*wtf8_ptr` must be passed in `wtf8_len_ptr`. The + `wtf8_ptr` must contain an extra space for an extra NUL after the result. + If the result is truncated, `UV_ENOBUFS` will be returned and + `wtf8_len_ptr` will be the length of the required `wtf8_ptr` to contain the + whole result. + + .. versionadded:: 1.47.0 + +.. c:function:: ssize_t uv_wtf8_length_as_utf16(const char* wtf8) + + Get the length in characters of a NUL-terminated WTF-8 `wtf8` value + after converting it to UTF-16 (or UCS-2), including NUL terminator. + + .. versionadded:: 1.47.0 + +.. c:function:: void uv_wtf8_to_utf16(const char* utf8, uint16_t* utf16, size_t utf16_len) + + Convert NUL-terminated WTF-8 data in `wtf8` to UTF-16 (or UCS-2) data + in `utf16`. The `utf16_len` count (in characters) must include space + for the NUL terminator. + + .. versionadded:: 1.47.0 diff --git a/deps/uv/include/uv.h b/deps/uv/include/uv.h index 02397dd0fdd43d..5642101c10c351 100644 --- a/deps/uv/include/uv.h +++ b/deps/uv/include/uv.h @@ -1885,6 +1885,18 @@ struct uv_loop_s { UV_EXTERN void* uv_loop_get_data(const uv_loop_t*); UV_EXTERN void uv_loop_set_data(uv_loop_t*, void* data); +/* String utilities needed internally for dealing with Windows. */ +size_t uv_utf16_length_as_wtf8(const uint16_t* utf16, + ssize_t utf16_len); +int uv_utf16_to_wtf8(const uint16_t* utf16, + ssize_t utf16_len, + char** wtf8_ptr, + size_t* wtf8_len_ptr); +ssize_t uv_wtf8_length_as_utf16(const char* wtf8); +void uv_wtf8_to_utf16(const char* wtf8, + uint16_t* utf16, + size_t utf16_len); + /* Don't export the private CPP symbols. */ #undef UV_HANDLE_TYPE_PRIVATE #undef UV_REQ_TYPE_PRIVATE diff --git a/deps/uv/include/uv/version.h b/deps/uv/include/uv/version.h index 24fac8d8aa76f7..b17220fcf9090e 100644 --- a/deps/uv/include/uv/version.h +++ b/deps/uv/include/uv/version.h @@ -31,7 +31,7 @@ */ #define UV_VERSION_MAJOR 1 -#define UV_VERSION_MINOR 46 +#define UV_VERSION_MINOR 47 #define UV_VERSION_PATCH 0 #define UV_VERSION_IS_RELEASE 1 #define UV_VERSION_SUFFIX "" diff --git a/deps/uv/src/idna.c b/deps/uv/src/idna.c index 93d982ca018f2d..1c0a60cf3e3bec 100644 --- a/deps/uv/src/idna.c +++ b/deps/uv/src/idna.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2018 Ben Noordhuis +/* Copyright libuv contributors. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -18,11 +18,56 @@ */ #include "uv.h" +#include "uv-common.h" #include "idna.h" #include #include #include /* UINT_MAX */ + +static int32_t uv__wtf8_decode1(const char** input) { + uint32_t code_point; + uint8_t b1; + uint8_t b2; + uint8_t b3; + uint8_t b4; + + b1 = **input; + if (b1 <= 0x7F) + return b1; /* ASCII code point */ + if (b1 < 0xC2) + return -1; /* invalid: continuation byte */ + code_point = b1; + + b2 = *++*input; + if ((b2 & 0xC0) != 0x80) + return -1; /* invalid: not a continuation byte */ + code_point = (code_point << 6) | (b2 & 0x3F); + if (b1 <= 0xDF) + return 0x7FF & code_point; /* two-byte character */ + + b3 = *++*input; + if ((b3 & 0xC0) != 0x80) + return -1; /* invalid: not a continuation byte */ + code_point = (code_point << 6) | (b3 & 0x3F); + if (b1 <= 0xEF) + return 0xFFFF & code_point; /* three-byte character */ + + b4 = *++*input; + if ((b4 & 0xC0) != 0x80) + return -1; /* invalid: not a continuation byte */ + code_point = (code_point << 6) | (b4 & 0x3F); + if (b1 <= 0xF4) { + code_point &= 0x1FFFFF; + if (code_point <= 0x10FFFF) + return code_point; /* four-byte character */ + } + + /* code point too large */ + return -1; +} + + static unsigned uv__utf8_decode1_slow(const char** p, const char* pe, unsigned a) { @@ -89,6 +134,7 @@ static unsigned uv__utf8_decode1_slow(const char** p, return a; } + unsigned uv__utf8_decode1(const char** p, const char* pe) { unsigned a; @@ -102,6 +148,7 @@ unsigned uv__utf8_decode1(const char** p, const char* pe) { return uv__utf8_decode1_slow(p, pe, a); } + static int uv__idna_toascii_label(const char* s, const char* se, char** d, char* de) { static const char alphabet[] = "abcdefghijklmnopqrstuvwxyz0123456789"; @@ -267,7 +314,8 @@ static int uv__idna_toascii_label(const char* s, const char* se, return 0; } -long uv__idna_toascii(const char* s, const char* se, char* d, char* de) { + +ssize_t uv__idna_toascii(const char* s, const char* se, char* d, char* de) { const char* si; const char* st; unsigned c; @@ -313,3 +361,195 @@ long uv__idna_toascii(const char* s, const char* se, char* d, char* de) { return d - ds; /* Number of bytes written. */ } + + +ssize_t uv_wtf8_length_as_utf16(const char* source_ptr) { + size_t w_target_len = 0; + int32_t code_point; + + do { + code_point = uv__wtf8_decode1(&source_ptr); + if (code_point < 0) + return -1; + if (code_point > 0xFFFF) + w_target_len++; + w_target_len++; + } while (*source_ptr++); + + return w_target_len; +} + + +void uv_wtf8_to_utf16(const char* source_ptr, + uint16_t* w_target, + size_t w_target_len) { + int32_t code_point; + + do { + code_point = uv__wtf8_decode1(&source_ptr); + /* uv_wtf8_length_as_utf16 should have been called and checked first. */ + assert(code_point >= 0); + if (code_point > 0x10000) { + assert(code_point < 0x10FFFF); + *w_target++ = (((code_point - 0x10000) >> 10) + 0xD800); + *w_target++ = ((code_point - 0x10000) & 0x3FF) + 0xDC00; + w_target_len -= 2; + } else { + *w_target++ = code_point; + w_target_len -= 1; + } + } while (*source_ptr++); + + assert(w_target_len == 0); +} + + +static int32_t uv__get_surrogate_value(const uint16_t* w_source_ptr, + ssize_t w_source_len) { + uint16_t u; + uint16_t next; + + u = w_source_ptr[0]; + if (u >= 0xD800 && u <= 0xDBFF && w_source_len != 1) { + next = w_source_ptr[1]; + if (next >= 0xDC00 && next <= 0xDFFF) + return 0x10000 + ((u - 0xD800) << 10) + (next - 0xDC00); + } + return u; +} + + +size_t uv_utf16_length_as_wtf8(const uint16_t* w_source_ptr, + ssize_t w_source_len) { + size_t target_len; + int32_t code_point; + + target_len = 0; + while (w_source_len) { + code_point = uv__get_surrogate_value(w_source_ptr, w_source_len); + /* Can be invalid UTF-8 but must be valid WTF-8. */ + assert(code_point >= 0); + if (w_source_len < 0 && code_point == 0) + break; + if (code_point < 0x80) + target_len += 1; + else if (code_point < 0x800) + target_len += 2; + else if (code_point < 0x10000) + target_len += 3; + else { + target_len += 4; + w_source_ptr++; + if (w_source_len > 0) + w_source_len--; + } + w_source_ptr++; + if (w_source_len > 0) + w_source_len--; + } + + return target_len; +} + + +int uv_utf16_to_wtf8(const uint16_t* w_source_ptr, + ssize_t w_source_len, + char** target_ptr, + size_t* target_len_ptr) { + size_t target_len; + char* target; + char* target_end; + int32_t code_point; + + /* If *target_ptr is provided, then *target_len_ptr must be its length + * (excluding space for NUL), otherwise we will compute the target_len_ptr + * length and may return a new allocation in *target_ptr if target_ptr is + * provided. */ + if (target_ptr == NULL || *target_ptr == NULL) { + target_len = uv_utf16_length_as_wtf8(w_source_ptr, w_source_len); + if (target_len_ptr != NULL) + *target_len_ptr = target_len; + } else { + target_len = *target_len_ptr; + } + + if (target_ptr == NULL) + return 0; + + if (*target_ptr == NULL) { + target = uv__malloc(target_len + 1); + if (target == NULL) { + return UV_ENOMEM; + } + *target_ptr = target; + } else { + target = *target_ptr; + } + + target_end = target + target_len; + + while (target != target_end && w_source_len) { + code_point = uv__get_surrogate_value(w_source_ptr, w_source_len); + /* Can be invalid UTF-8 but must be valid WTF-8. */ + assert(code_point >= 0); + if (w_source_len < 0 && code_point == 0) { + w_source_len = 0; + break; + } + if (code_point < 0x80) { + *target++ = code_point; + } else if (code_point < 0x800) { + *target++ = 0xC0 | (code_point >> 6); + if (target == target_end) + break; + *target++ = 0x80 | (code_point & 0x3F); + } else if (code_point < 0x10000) { + *target++ = 0xE0 | (code_point >> 12); + if (target == target_end) + break; + *target++ = 0x80 | ((code_point >> 6) & 0x3F); + if (target == target_end) + break; + *target++ = 0x80 | (code_point & 0x3F); + } else { + *target++ = 0xF0 | (code_point >> 18); + if (target == target_end) + break; + *target++ = 0x80 | ((code_point >> 12) & 0x3F); + if (target == target_end) + break; + *target++ = 0x80 | ((code_point >> 6) & 0x3F); + if (target == target_end) + break; + *target++ = 0x80 | (code_point & 0x3F); + /* uv__get_surrogate_value consumed 2 input characters */ + w_source_ptr++; + if (w_source_len > 0) + w_source_len--; + } + target_len = target - *target_ptr; + w_source_ptr++; + if (w_source_len > 0) + w_source_len--; + } + + if (target != target_end && target_len_ptr != NULL) + /* Did not fill all of the provided buffer, so update the target_len_ptr + * output with the space used. */ + *target_len_ptr = target - *target_ptr; + + /* Check if input fit into target exactly. */ + if (w_source_len < 0 && target == target_end && w_source_ptr[0] == 0) + w_source_len = 0; + + *target++ = '\0'; + + /* Characters remained after filling the buffer, compute the remaining length now. */ + if (w_source_len) { + if (target_len_ptr != NULL) + *target_len_ptr = target_len + uv_utf16_length_as_wtf8(w_source_ptr, w_source_len); + return UV_ENOBUFS; + } + + return 0; +} diff --git a/deps/uv/src/idna.h b/deps/uv/src/idna.h index 8e0c592fe139e5..ea6b4df9671fcc 100644 --- a/deps/uv/src/idna.h +++ b/deps/uv/src/idna.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2018 Ben Noordhuis +/* Copyright libuv contributors. All rights reserved. * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -26,6 +26,6 @@ unsigned uv__utf8_decode1(const char** p, const char* pe); * is the number of bytes written to |d|, including the trailing nul byte. * A return value < 0 is a libuv error code. |s| and |d| can not overlap. */ -long uv__idna_toascii(const char* s, const char* se, char* d, char* de); +ssize_t uv__idna_toascii(const char* s, const char* se, char* d, char* de); #endif /* UV_SRC_IDNA_H_ */ diff --git a/deps/uv/src/unix/darwin.c b/deps/uv/src/unix/darwin.c index 90790d701c4327..5e764a65ee4c71 100644 --- a/deps/uv/src/unix/darwin.c +++ b/deps/uv/src/unix/darwin.c @@ -209,7 +209,7 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { if (cpuspeed == 0) /* If sysctl hw.cputype == CPU_TYPE_ARM64, the correct value is unavailable * from Apple, but we can hard-code it here to a plausible value. */ - cpuspeed = 2400000000; + cpuspeed = 2400000000U; if (host_processor_info(mach_host_self(), PROCESSOR_CPU_LOAD_INFO, &numcpus, (processor_info_array_t*)&info, @@ -235,7 +235,7 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { cpu_info->cpu_times.irq = 0; cpu_info->model = uv__strdup(model); - cpu_info->speed = cpuspeed/1000000; + cpu_info->speed = (int)(cpuspeed / 1000000); } vm_deallocate(mach_task_self(), (vm_address_t)info, msg_type); diff --git a/deps/uv/src/unix/fs.c b/deps/uv/src/unix/fs.c index 6b051c124f2fd9..891306daedcc6a 100644 --- a/deps/uv/src/unix/fs.c +++ b/deps/uv/src/unix/fs.c @@ -41,25 +41,10 @@ #include #include #include -#include #include #include #include -#if defined(__DragonFly__) || \ - defined(__FreeBSD__) || \ - defined(__OpenBSD__) || \ - defined(__NetBSD__) -# define HAVE_PREADV 1 -#else -# define HAVE_PREADV 0 -#endif - -/* preadv() and pwritev() were added in Android N (level 24) */ -#if defined(__linux__) && !(defined(__ANDROID__) && __ANDROID_API__ < 24) -# define TRY_PREADV 1 -#endif - #if defined(__linux__) # include #endif @@ -97,6 +82,15 @@ # include #endif +#if defined(__CYGWIN__) || \ + (defined(__HAIKU__) && B_HAIKU_VERSION < B_HAIKU_VERSION_1_PRE_BETA_5) || \ + (defined(__sun) && !defined(__illumos__)) +#define preadv(fd, bufs, nbufs, off) \ + pread(fd, (bufs)->iov_base, (bufs)->iov_len, off) +#define pwritev(fd, bufs, nbufs, off) \ + pwrite(fd, (bufs)->iov_base, (bufs)->iov_len, off) +#endif + #if defined(_AIX) && _XOPEN_SOURCE <= 600 extern char *mkdtemp(char *template); /* See issue #740 on AIX < 7 */ #endif @@ -410,123 +404,57 @@ static ssize_t uv__fs_open(uv_fs_t* req) { } -#if !HAVE_PREADV -static ssize_t uv__fs_preadv(uv_file fd, - uv_buf_t* bufs, - unsigned int nbufs, - off_t off) { - uv_buf_t* buf; - uv_buf_t* end; - ssize_t result; - ssize_t rc; - size_t pos; - - assert(nbufs > 0); - - result = 0; - pos = 0; - buf = bufs + 0; - end = bufs + nbufs; - - for (;;) { - do - rc = pread(fd, buf->base + pos, buf->len - pos, off + result); - while (rc == -1 && errno == EINTR); - - if (rc == 0) - break; - - if (rc == -1 && result == 0) - return UV__ERR(errno); - - if (rc == -1) - break; /* We read some data so return that, ignore the error. */ - - pos += rc; - result += rc; - - if (pos < buf->len) - continue; - - pos = 0; - buf += 1; - - if (buf == end) - break; - } - - return result; -} -#endif - - static ssize_t uv__fs_read(uv_fs_t* req) { -#if TRY_PREADV - static _Atomic int no_preadv; -#endif + const struct iovec* bufs; unsigned int iovmax; - ssize_t result; + size_t nbufs; + ssize_t r; + off_t off; + int fd; + + fd = req->file; + off = req->off; + bufs = (const struct iovec*) req->bufs; + nbufs = req->nbufs; iovmax = uv__getiovmax(); - if (req->nbufs > iovmax) - req->nbufs = iovmax; - - if (req->off < 0) { - if (req->nbufs == 1) - result = read(req->file, req->bufs[0].base, req->bufs[0].len); - else - result = readv(req->file, (struct iovec*) req->bufs, req->nbufs); + if (nbufs > iovmax) + nbufs = iovmax; + + r = 0; + if (off < 0) { + if (nbufs == 1) + r = read(fd, bufs->iov_base, bufs->iov_len); + else if (nbufs > 1) + r = readv(fd, bufs, nbufs); } else { - if (req->nbufs == 1) { - result = pread(req->file, req->bufs[0].base, req->bufs[0].len, req->off); - goto done; - } - -#if HAVE_PREADV - result = preadv(req->file, (struct iovec*) req->bufs, req->nbufs, req->off); -#else -# if TRY_PREADV - if (atomic_load_explicit(&no_preadv, memory_order_relaxed)) retry: -# endif - { - result = uv__fs_preadv(req->file, req->bufs, req->nbufs, req->off); - } -# if TRY_PREADV - else { - result = preadv(req->file, - (struct iovec*) req->bufs, - req->nbufs, - req->off); - if (result == -1 && errno == ENOSYS) { - atomic_store_explicit(&no_preadv, 1, memory_order_relaxed); - goto retry; - } - } -# endif -#endif + if (nbufs == 1) + r = pread(fd, bufs->iov_base, bufs->iov_len, off); + else if (nbufs > 1) + r = preadv(fd, bufs, nbufs, off); } -done: - /* Early cleanup of bufs allocation, since we're done with it. */ - if (req->bufs != req->bufsml) - uv__free(req->bufs); - - req->bufs = NULL; - req->nbufs = 0; - #ifdef __PASE__ /* PASE returns EOPNOTSUPP when reading a directory, convert to EISDIR */ - if (result == -1 && errno == EOPNOTSUPP) { + if (r == -1 && errno == EOPNOTSUPP) { struct stat buf; ssize_t rc; - rc = uv__fstat(req->file, &buf); + rc = uv__fstat(fd, &buf); if (rc == 0 && S_ISDIR(buf.st_mode)) { errno = EISDIR; } } #endif - return result; + /* We don't own the buffer list in the synchronous case. */ + if (req->cb != NULL) + if (req->bufs != req->bufsml) + uv__free(req->bufs); + + req->bufs = NULL; + req->nbufs = 0; + + return r; } @@ -1161,65 +1089,34 @@ static ssize_t uv__fs_lutime(uv_fs_t* req) { static ssize_t uv__fs_write(uv_fs_t* req) { -#if TRY_PREADV - static _Atomic int no_pwritev; -#endif + const struct iovec* bufs; + size_t nbufs; ssize_t r; + off_t off; + int fd; - /* Serialize writes on OS X, concurrent write() and pwrite() calls result in - * data loss. We can't use a per-file descriptor lock, the descriptor may be - * a dup(). - */ -#if defined(__APPLE__) - static pthread_mutex_t lock = PTHREAD_MUTEX_INITIALIZER; - - if (pthread_mutex_lock(&lock)) - abort(); -#endif + fd = req->file; + off = req->off; + bufs = (const struct iovec*) req->bufs; + nbufs = req->nbufs; - if (req->off < 0) { - if (req->nbufs == 1) - r = write(req->file, req->bufs[0].base, req->bufs[0].len); - else - r = writev(req->file, (struct iovec*) req->bufs, req->nbufs); + r = 0; + if (off < 0) { + if (nbufs == 1) + r = write(fd, bufs->iov_base, bufs->iov_len); + else if (nbufs > 1) + r = writev(fd, bufs, nbufs); } else { - if (req->nbufs == 1) { - r = pwrite(req->file, req->bufs[0].base, req->bufs[0].len, req->off); - goto done; - } -#if HAVE_PREADV - r = pwritev(req->file, (struct iovec*) req->bufs, req->nbufs, req->off); -#else -# if TRY_PREADV - if (atomic_load_explicit(&no_pwritev, memory_order_relaxed)) retry: -# endif - { - r = pwrite(req->file, req->bufs[0].base, req->bufs[0].len, req->off); - } -# if TRY_PREADV - else { - r = pwritev(req->file, - (struct iovec*) req->bufs, - req->nbufs, - req->off); - if (r == -1 && errno == ENOSYS) { - atomic_store_explicit(&no_pwritev, 1, memory_order_relaxed); - goto retry; - } - } -# endif -#endif + if (nbufs == 1) + r = pwrite(fd, bufs->iov_base, bufs->iov_len, off); + else if (nbufs > 1) + r = pwritev(fd, bufs, nbufs, off); } -done: -#if defined(__APPLE__) - if (pthread_mutex_unlock(&lock)) - abort(); -#endif - return r; } + static ssize_t uv__fs_copyfile(uv_fs_t* req) { uv_fs_t fs_req; uv_file srcfd; @@ -1979,9 +1876,14 @@ int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, if (bufs == NULL || nbufs == 0) return UV_EINVAL; + req->off = off; req->file = file; - + req->bufs = (uv_buf_t*) bufs; /* Safe, doesn't mutate |bufs| */ req->nbufs = nbufs; + + if (cb == NULL) + goto post; + req->bufs = req->bufsml; if (nbufs > ARRAY_SIZE(req->bufsml)) req->bufs = uv__malloc(nbufs * sizeof(*bufs)); @@ -1991,12 +1893,10 @@ int uv_fs_read(uv_loop_t* loop, uv_fs_t* req, memcpy(req->bufs, bufs, nbufs * sizeof(*bufs)); - req->off = off; - - if (cb != NULL) - if (uv__iou_fs_read_or_write(loop, req, /* is_read */ 1)) - return 0; + if (uv__iou_fs_read_or_write(loop, req, /* is_read */ 1)) + return 0; +post: POST; } diff --git a/deps/uv/src/unix/kqueue.c b/deps/uv/src/unix/kqueue.c index b78242d3be4e3c..94ace58680cf39 100644 --- a/deps/uv/src/unix/kqueue.c +++ b/deps/uv/src/unix/kqueue.c @@ -30,6 +30,9 @@ #include #include #include +#if defined(__FreeBSD__) +#include +#endif #include #include #include @@ -262,6 +265,9 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { if (nfds == -1) assert(errno == EINTR); + else if (nfds == 0) + /* Unlimited timeout should only return with events or signal. */ + assert(timeout != -1); if (pset != NULL) pthread_sigmask(SIG_UNBLOCK, pset, NULL); @@ -286,8 +292,6 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { timeout = user_timeout; reset_timeout = 0; } else if (nfds == 0) { - /* Reached the user timeout value. */ - assert(timeout != -1); return; } @@ -479,6 +483,16 @@ static void uv__fs_event(uv_loop_t* loop, uv__io_t* w, unsigned int fflags) { */ if (fcntl(handle->event_watcher.fd, F_GETPATH, pathbuf) == 0) path = uv__basename_r(pathbuf); +#elif defined(F_KINFO) + /* We try to get the file info reference from the file descriptor. + * the struct's kf_structsize must be initialised beforehand + * whether with the KINFO_FILE_SIZE constant or this way. + */ + struct kinfo_file kf; + kf.kf_structsize = sizeof(kf); + + if (fcntl(handle->event_watcher.fd, F_KINFO, &kf) == 0) + path = uv__basename_r(kf.kf_path); #endif handle->cb(handle, path, events, 0); diff --git a/deps/uv/src/unix/linux.c b/deps/uv/src/unix/linux.c index 48b9c2c43e1040..8eeb352e6238a9 100644 --- a/deps/uv/src/unix/linux.c +++ b/deps/uv/src/unix/linux.c @@ -79,6 +79,8 @@ # define __NR_copy_file_range 379 # elif defined(__arc__) # define __NR_copy_file_range 285 +# elif defined(__riscv) +# define __NR_copy_file_range 285 # endif #endif /* __NR_copy_file_range */ @@ -95,6 +97,8 @@ # define __NR_statx 383 # elif defined(__s390__) # define __NR_statx 379 +# elif defined(__riscv) +# define __NR_statx 291 # endif #endif /* __NR_statx */ @@ -111,6 +115,8 @@ # define __NR_getrandom 359 # elif defined(__s390__) # define __NR_getrandom 349 +# elif defined(__riscv) +# define __NR_getrandom 278 # endif #endif /* __NR_getrandom */ @@ -317,17 +323,64 @@ unsigned uv__kernel_version(void) { unsigned major; unsigned minor; unsigned patch; + char v_sig[256]; + char* needle; version = atomic_load_explicit(&cached_version, memory_order_relaxed); if (version != 0) return version; + /* Check /proc/version_signature first as it's the way to get the mainline + * kernel version in Ubuntu. The format is: + * Ubuntu ubuntu_kernel_version mainline_kernel_version + * For example: + * Ubuntu 5.15.0-79.86-generic 5.15.111 + */ + if (0 == uv__slurp("/proc/version_signature", v_sig, sizeof(v_sig))) + if (3 == sscanf(v_sig, "Ubuntu %*s %u.%u.%u", &major, &minor, &patch)) + goto calculate_version; + if (-1 == uname(&u)) return 0; + /* In Debian we need to check `version` instead of `release` to extract the + * mainline kernel version. This is an example of how it looks like: + * #1 SMP Debian 5.10.46-4 (2021-08-03) + */ + needle = strstr(u.version, "Debian "); + if (needle != NULL) + if (3 == sscanf(needle, "Debian %u.%u.%u", &major, &minor, &patch)) + goto calculate_version; + if (3 != sscanf(u.release, "%u.%u.%u", &major, &minor, &patch)) return 0; + /* Handle it when the process runs under the UNAME26 personality: + * + * - kernels >= 3.x identify as 2.6.40+x + * - kernels >= 4.x identify as 2.6.60+x + * + * UNAME26 is a poorly conceived hack that doesn't let us distinguish + * between 4.x kernels and 5.x/6.x kernels so we conservatively assume + * that 2.6.60+x means 4.x. + * + * Fun fact of the day: it's technically possible to observe the actual + * kernel version for a brief moment because uname() first copies out the + * real release string before overwriting it with the backcompat string. + */ + if (major == 2 && minor == 6) { + if (patch >= 60) { + major = 4; + minor = patch - 60; + patch = 0; + } else if (patch >= 40) { + major = 3; + minor = patch - 40; + patch = 0; + } + } + +calculate_version: version = major * 65536 + minor * 256 + patch; atomic_store_explicit(&cached_version, version, memory_order_relaxed); @@ -422,6 +475,9 @@ int uv__io_uring_register(int fd, unsigned opcode, void* arg, unsigned nargs) { static int uv__use_io_uring(void) { #if defined(__ANDROID_API__) return 0; /* Possibly available but blocked by seccomp. */ +#elif defined(__arm__) && __SIZEOF_POINTER__ == 4 + /* See https://github.com/libuv/libuv/issues/4158. */ + return 0; /* All 32 bits kernels appear buggy. */ #else /* Ternary: unknown=0, yes=1, no=-1 */ static _Atomic int use_io_uring; @@ -431,8 +487,14 @@ static int uv__use_io_uring(void) { use = atomic_load_explicit(&use_io_uring, memory_order_relaxed); if (use == 0) { + /* Older kernels have a bug where the sqpoll thread uses 100% CPU. */ + use = uv__kernel_version() >= /* 5.10.186 */ 0x050ABA ? 1 : -1; + + /* But users can still enable it if they so desire. */ val = getenv("UV_USE_IO_URING"); - use = val == NULL || atoi(val) ? 1 : -1; + if (val != NULL) + use = atoi(val) ? 1 : -1; + atomic_store_explicit(&use_io_uring, use, memory_order_relaxed); } @@ -756,7 +818,9 @@ static void uv__iou_submit(struct uv__iou* iou) { int uv__iou_fs_close(uv_loop_t* loop, uv_fs_t* req) { struct uv__io_uring_sqe* sqe; struct uv__iou* iou; + int kv; + kv = uv__kernel_version(); /* Work around a poorly understood bug in older kernels where closing a file * descriptor pointing to /foo/bar results in ETXTBSY errors when trying to * execve("/foo/bar") later on. The bug seems to have been fixed somewhere @@ -764,10 +828,17 @@ int uv__iou_fs_close(uv_loop_t* loop, uv_fs_t* req) { * but good candidates are the several data race fixes. Interestingly, it * seems to manifest only when running under Docker so the possibility of * a Docker bug can't be completely ruled out either. Yay, computers. + * Also, disable on non-longterm versions between 5.16.0 (non-longterm) and + * 6.1.0 (longterm). Starting with longterm 6.1.x, the issue seems to be + * solved. */ - if (uv__kernel_version() < /* 5.15.90 */ 0x050F5A) + if (kv < /* 5.15.90 */ 0x050F5A) + return 0; + + if (kv >= /* 5.16.0 */ 0x050A00 && kv < /* 6.1.0 */ 0x060100) return 0; + iou = &uv__get_internal_fields(loop)->iou; sqe = uv__iou_get_sqe(iou, loop, req); @@ -1364,41 +1435,20 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { */ SAVE_ERRNO(uv__update_time(loop)); - if (nfds == 0) { + if (nfds == -1) + assert(errno == EINTR); + else if (nfds == 0) + /* Unlimited timeout should only return with events or signal. */ assert(timeout != -1); + if (nfds == 0 || nfds == -1) { if (reset_timeout != 0) { timeout = user_timeout; reset_timeout = 0; + } else if (nfds == 0) { + return; } - if (timeout == -1) - continue; - - if (timeout == 0) - break; - - /* We may have been inside the system call for longer than |timeout| - * milliseconds so we need to update the timestamp to avoid drift. - */ - goto update_timeout; - } - - if (nfds == -1) { - if (errno != EINTR) - abort(); - - if (reset_timeout != 0) { - timeout = user_timeout; - reset_timeout = 0; - } - - if (timeout == -1) - continue; - - if (timeout == 0) - break; - /* Interrupted by a signal. Update timeout and poll again. */ goto update_timeout; } @@ -1509,13 +1559,13 @@ void uv__io_poll(uv_loop_t* loop, int timeout) { break; } +update_timeout: if (timeout == 0) break; if (timeout == -1) continue; -update_timeout: assert(timeout > 0); real_timeout -= (loop->time - base); @@ -1718,7 +1768,8 @@ int uv_cpu_info(uv_cpu_info_t** ci, int* count) { return UV__ERR(errno); } - fgets(buf, sizeof(buf), fp); /* Skip first line. */ + if (NULL == fgets(buf, sizeof(buf), fp)) + abort(); for (;;) { memset(&t, 0, sizeof(t)); @@ -1729,7 +1780,8 @@ int uv_cpu_info(uv_cpu_info_t** ci, int* count) { if (n != 7) break; - fgets(buf, sizeof(buf), fp); /* Skip rest of line. */ + if (NULL == fgets(buf, sizeof(buf), fp)) + abort(); if (cpu >= ARRAY_SIZE(*cpus)) continue; @@ -1809,7 +1861,8 @@ int uv_cpu_info(uv_cpu_info_t** ci, int* count) { if (fp == NULL) continue; - fscanf(fp, "%llu", &(*cpus)[cpu].freq); + if (1 != fscanf(fp, "%llu", &(*cpus)[cpu].freq)) + abort(); fclose(fp); fp = NULL; } diff --git a/deps/uv/src/unix/os390.c b/deps/uv/src/unix/os390.c index bbd37692d1d0da..1b277292aebffb 100644 --- a/deps/uv/src/unix/os390.c +++ b/deps/uv/src/unix/os390.c @@ -19,6 +19,7 @@ * IN THE SOFTWARE. */ +#include "uv.h" #include "internal.h" #include #include @@ -30,6 +31,7 @@ #include #include #include "zos-base.h" +#include "zos-sys-info.h" #if defined(__clang__) #include "csrsic.h" #else @@ -66,9 +68,6 @@ /* Total number of frames currently on all available frame queues. */ #define RCEAFC_OFFSET 0x088 -/* CPC model length from the CSRSI Service. */ -#define CPCMODEL_LENGTH 16 - /* Pointer to the home (current) ASCB. */ #define PSAAOLD 0x224 @@ -258,9 +257,12 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { idx = 0; while (idx < *count) { cpu_info->speed = *(int*)(info.siv1v2si22v1.si22v1cpucapability); - cpu_info->model = uv__malloc(CPCMODEL_LENGTH + 1); - memset(cpu_info->model, '\0', CPCMODEL_LENGTH + 1); - memcpy(cpu_info->model, info.siv1v2si11v1.si11v1cpcmodel, CPCMODEL_LENGTH); + cpu_info->model = uv__malloc(ZOSCPU_MODEL_LENGTH + 1); + if (cpu_info->model == NULL) { + uv_free_cpu_info(*cpu_infos, idx); + return UV_ENOMEM; + } + __get_cpu_model(cpu_info->model, ZOSCPU_MODEL_LENGTH + 1); cpu_info->cpu_times.user = cpu_usage_avg; /* TODO: implement the following */ cpu_info->cpu_times.sys = 0; diff --git a/deps/uv/src/unix/signal.c b/deps/uv/src/unix/signal.c index 63aba5a60e06b9..bc4206e6d864c8 100644 --- a/deps/uv/src/unix/signal.c +++ b/deps/uv/src/unix/signal.c @@ -279,6 +279,8 @@ static int uv__signal_loop_once_init(uv_loop_t* loop) { int uv__signal_loop_fork(uv_loop_t* loop) { + struct uv__queue* q; + if (loop->signal_pipefd[0] == -1) return 0; uv__io_stop(loop, &loop->signal_io_watcher, POLLIN); @@ -286,6 +288,19 @@ int uv__signal_loop_fork(uv_loop_t* loop) { uv__close(loop->signal_pipefd[1]); loop->signal_pipefd[0] = -1; loop->signal_pipefd[1] = -1; + + uv__queue_foreach(q, &loop->handle_queue) { + uv_handle_t* handle = uv__queue_data(q, uv_handle_t, handle_queue); + uv_signal_t* sh; + + if (handle->type != UV_SIGNAL) + continue; + + sh = (uv_signal_t*) handle; + sh->caught_signals = 0; + sh->dispatched_signals = 0; + } + return uv__signal_loop_once_init(loop); } diff --git a/deps/uv/src/unix/tcp.c b/deps/uv/src/unix/tcp.c index d6c848f4610132..a02b6bbf88ef3a 100644 --- a/deps/uv/src/unix/tcp.c +++ b/deps/uv/src/unix/tcp.c @@ -27,6 +27,13 @@ #include #include +#include +#include + +/* ifaddrs is not implemented on AIX and IBM i PASE */ +#if !defined(_AIX) +#include +#endif static int maybe_bind_socket(int fd) { union uv__sockaddr s; @@ -198,11 +205,55 @@ int uv__tcp_bind(uv_tcp_t* tcp, } +static int uv__is_ipv6_link_local(const struct sockaddr* addr) { + const struct sockaddr_in6* a6; + uint8_t b[2]; + + if (addr->sa_family != AF_INET6) + return 0; + + a6 = (const struct sockaddr_in6*) addr; + memcpy(b, &a6->sin6_addr, sizeof(b)); + + return b[0] == 0xFE && b[1] == 0x80; +} + + +static int uv__ipv6_link_local_scope_id(void) { +/* disable link local on AIX & PASE for now */ +#if defined(_AIX) + return 0; +#else + struct sockaddr_in6* a6; + struct ifaddrs* ifa; + struct ifaddrs* p; + int rv; + + if (getifaddrs(&ifa)) + return 0; + + for (p = ifa; p != NULL; p = p->ifa_next) + if (uv__is_ipv6_link_local(p->ifa_addr)) + break; + + rv = 0; + if (p != NULL) { + a6 = (struct sockaddr_in6*) p->ifa_addr; + rv = a6->sin6_scope_id; + } + + freeifaddrs(ifa); + return rv; +#endif +} + + int uv__tcp_connect(uv_connect_t* req, uv_tcp_t* handle, const struct sockaddr* addr, unsigned int addrlen, uv_connect_cb cb) { + struct sockaddr_in6 tmp6; int err; int r; @@ -220,6 +271,14 @@ int uv__tcp_connect(uv_connect_t* req, if (err) return err; + if (uv__is_ipv6_link_local(addr)) { + memcpy(&tmp6, addr, sizeof(tmp6)); + if (tmp6.sin6_scope_id == 0) { + tmp6.sin6_scope_id = uv__ipv6_link_local_scope_id(); + addr = (void*) &tmp6; + } + } + do { errno = 0; r = connect(uv__stream_fd(handle), addr, addrlen); @@ -374,28 +433,39 @@ int uv__tcp_nodelay(int fd, int on) { int uv__tcp_keepalive(int fd, int on, unsigned int delay) { + int intvl; + int cnt; + + (void) &intvl; + (void) &cnt; + if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &on, sizeof(on))) return UV__ERR(errno); + if (!on) + return 0; + #ifdef TCP_KEEPIDLE - if (on) { - int intvl = 1; /* 1 second; same as default on Win32 */ - int cnt = 10; /* 10 retries; same as hardcoded on Win32 */ - if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) - return UV__ERR(errno); - if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &intvl, sizeof(intvl))) - return UV__ERR(errno); - if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &cnt, sizeof(cnt))) - return UV__ERR(errno); - } + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPIDLE, &delay, sizeof(delay))) + return UV__ERR(errno); +/* Solaris/SmartOS, if you don't support keep-alive, + * then don't advertise it in your system headers... + */ +/* FIXME(bnoordhuis) That's possibly because sizeof(delay) should be 1. */ +#elif defined(TCP_KEEPALIVE) && !defined(__sun) + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &delay, sizeof(delay))) + return UV__ERR(errno); #endif - /* Solaris/SmartOS, if you don't support keep-alive, - * then don't advertise it in your system headers... - */ - /* FIXME(bnoordhuis) That's possibly because sizeof(delay) should be 1. */ -#if defined(TCP_KEEPALIVE) && !defined(__sun) - if (on && setsockopt(fd, IPPROTO_TCP, TCP_KEEPALIVE, &delay, sizeof(delay))) +#ifdef TCP_KEEPINTVL + intvl = 1; /* 1 second; same as default on Win32 */ + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPINTVL, &intvl, sizeof(intvl))) + return UV__ERR(errno); +#endif + +#ifdef TCP_KEEPCNT + cnt = 10; /* 10 retries; same as hardcoded on Win32 */ + if (setsockopt(fd, IPPROTO_TCP, TCP_KEEPCNT, &cnt, sizeof(cnt))) return UV__ERR(errno); #endif diff --git a/deps/uv/src/unix/thread.c b/deps/uv/src/unix/thread.c index 4d6f4b8232ec6d..f05e6fe0f7dd5a 100644 --- a/deps/uv/src/unix/thread.c +++ b/deps/uv/src/unix/thread.c @@ -789,11 +789,33 @@ void uv_cond_broadcast(uv_cond_t* cond) { abort(); } +#if defined(__APPLE__) && defined(__MACH__) + +void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex) { + int r; + + errno = 0; + r = pthread_cond_wait(cond, mutex); + + /* Workaround for a bug in OS X at least up to 13.6 + * See https://github.com/libuv/libuv/issues/4165 + */ + if (r == EINVAL) + if (errno == EBUSY) + return; + + if (r) + abort(); +} + +#else /* !(defined(__APPLE__) && defined(__MACH__)) */ + void uv_cond_wait(uv_cond_t* cond, uv_mutex_t* mutex) { if (pthread_cond_wait(cond, mutex)) abort(); } +#endif int uv_cond_timedwait(uv_cond_t* cond, uv_mutex_t* mutex, uint64_t timeout) { int r; diff --git a/deps/uv/src/uv-common.c b/deps/uv/src/uv-common.c index 916f3f4e00664a..2200fe3f0a41e2 100644 --- a/deps/uv/src/uv-common.c +++ b/deps/uv/src/uv-common.c @@ -559,6 +559,9 @@ static void uv__print_handles(uv_loop_t* loop, int only_active, FILE* stream) { if (loop == NULL) loop = uv_default_loop(); + if (stream == NULL) + stream = stderr; + uv__queue_foreach(q, &loop->handle_queue) { h = uv__queue_data(q, uv_handle_t, handle_queue); diff --git a/deps/uv/src/win/dl.c b/deps/uv/src/win/dl.c index 676be4dc7b5b8a..7880c9595be1f6 100644 --- a/deps/uv/src/win/dl.c +++ b/deps/uv/src/win/dl.c @@ -27,18 +27,17 @@ static int uv__dlerror(uv_lib_t* lib, const char* filename, DWORD errorno); int uv_dlopen(const char* filename, uv_lib_t* lib) { WCHAR filename_w[32768]; + ssize_t r; lib->handle = NULL; lib->errmsg = NULL; - if (!MultiByteToWideChar(CP_UTF8, - 0, - filename, - -1, - filename_w, - ARRAY_SIZE(filename_w))) { - return uv__dlerror(lib, filename, GetLastError()); - } + r = uv_wtf8_length_as_utf16(filename); + if (r < 0) + return uv__dlerror(lib, filename, ERROR_NO_UNICODE_TRANSLATION); + if ((size_t) r > ARRAY_SIZE(filename_w)) + return uv__dlerror(lib, filename, ERROR_INSUFFICIENT_BUFFER); + uv_wtf8_to_utf16(filename, filename_w, r); lib->handle = LoadLibraryExW(filename_w, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); if (lib->handle == NULL) { diff --git a/deps/uv/src/win/fs-event.c b/deps/uv/src/win/fs-event.c index 6758c7c78bc1d6..4a0ca1f70a22b6 100644 --- a/deps/uv/src/win/fs-event.c +++ b/deps/uv/src/win/fs-event.c @@ -157,7 +157,8 @@ int uv_fs_event_start(uv_fs_event_t* handle, uv_fs_event_cb cb, const char* path, unsigned int flags) { - int name_size, is_path_dir, size; + int is_path_dir; + size_t size; DWORD attr, last_error; WCHAR* dir = NULL, *dir_to_watch, *pathw = NULL; DWORD short_path_buffer_len; @@ -176,23 +177,9 @@ int uv_fs_event_start(uv_fs_event_t* handle, uv__handle_start(handle); - /* Convert name to UTF16. */ - - name_size = MultiByteToWideChar(CP_UTF8, 0, path, -1, NULL, 0) * - sizeof(WCHAR); - pathw = (WCHAR*)uv__malloc(name_size); - if (!pathw) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - if (!MultiByteToWideChar(CP_UTF8, - 0, - path, - -1, - pathw, - name_size / sizeof(WCHAR))) { - return uv_translate_sys_error(GetLastError()); - } + last_error = uv__convert_utf8_to_utf16(path, &pathw); + if (last_error) + goto error_uv; /* Determine whether path is a file or a directory. */ attr = GetFileAttributesW(pathw); @@ -333,6 +320,9 @@ int uv_fs_event_start(uv_fs_event_t* handle, return 0; error: + last_error = uv_translate_sys_error(last_error); + +error_uv: if (handle->path) { uv__free(handle->path); handle->path = NULL; @@ -365,7 +355,7 @@ int uv_fs_event_start(uv_fs_event_t* handle, uv__free(short_path); - return uv_translate_sys_error(last_error); + return last_error; } diff --git a/deps/uv/src/win/fs.c b/deps/uv/src/win/fs.c index fc209c54f470ed..99c8a2bf8bf124 100644 --- a/deps/uv/src/win/fs.c +++ b/deps/uv/src/win/fs.c @@ -31,13 +31,16 @@ #include #include "uv.h" + +/* requires , included via "uv.h" above, but needs to + be included before our "winapi.h", included via "internal.h" below. */ +#include + #include "internal.h" #include "req-inl.h" #include "handle-inl.h" #include "fs-fd-hash-inl.h" -#include - #define UV_FS_FREE_PATHS 0x0002 #define UV_FS_FREE_PTR 0x0008 @@ -144,279 +147,6 @@ void uv__fs_init(void) { } -static int32_t fs__decode_wtf8_char(const char** input) { - uint32_t code_point; - uint8_t b1; - uint8_t b2; - uint8_t b3; - uint8_t b4; - - b1 = **input; - if (b1 <= 0x7F) - return b1; /* ASCII code point */ - if (b1 < 0xC2) - return -1; /* invalid: continuation byte */ - code_point = b1; - - b2 = *++*input; - if ((b2 & 0xC0) != 0x80) - return -1; /* invalid: not a continuation byte */ - code_point = (code_point << 6) | (b2 & 0x3F); - if (b1 <= 0xDF) - return 0x7FF & code_point; /* two-byte character */ - - b3 = *++*input; - if ((b3 & 0xC0) != 0x80) - return -1; /* invalid: not a continuation byte */ - code_point = (code_point << 6) | (b3 & 0x3F); - if (b1 <= 0xEF) - return 0xFFFF & code_point; /* three-byte character */ - - b4 = *++*input; - if ((b4 & 0xC0) != 0x80) - return -1; /* invalid: not a continuation byte */ - code_point = (code_point << 6) | (b4 & 0x3F); - if (b1 <= 0xF4) - if (code_point <= 0x10FFFF) - return code_point; /* four-byte character */ - - /* code point too large */ - return -1; -} - - -static ssize_t fs__get_length_wtf8(const char* source_ptr) { - size_t w_target_len = 0; - int32_t code_point; - - do { - code_point = fs__decode_wtf8_char(&source_ptr); - if (code_point < 0) - return -1; - if (code_point > 0xFFFF) - w_target_len++; - w_target_len++; - } while (*source_ptr++); - return w_target_len; -} - - -static void fs__wtf8_to_wide(const char* source_ptr, WCHAR* w_target) { - int32_t code_point; - - do { - code_point = fs__decode_wtf8_char(&source_ptr); - /* fs__get_length_wtf8 should have been called and checked first. */ - assert(code_point >= 0); - if (code_point > 0x10000) { - assert(code_point < 0x10FFFF); - *w_target++ = (((code_point - 0x10000) >> 10) + 0xD800); - *w_target++ = ((code_point - 0x10000) & 0x3FF) + 0xDC00; - } else { - *w_target++ = code_point; - } - } while (*source_ptr++); -} - - -INLINE static int fs__capture_path(uv_fs_t* req, const char* path, - const char* new_path, const int copy_path) { - WCHAR* buf; - WCHAR* pos; - size_t buf_sz = 0; - size_t path_len = 0; - ssize_t pathw_len = 0; - ssize_t new_pathw_len = 0; - - /* new_path can only be set if path is also set. */ - assert(new_path == NULL || path != NULL); - - if (path != NULL) { - pathw_len = fs__get_length_wtf8(path); - if (pathw_len < 0) - return ERROR_INVALID_NAME; - buf_sz += pathw_len * sizeof(WCHAR); - } - - if (path != NULL && copy_path) { - path_len = 1 + strlen(path); - buf_sz += path_len; - } - - if (new_path != NULL) { - new_pathw_len = fs__get_length_wtf8(new_path); - if (new_pathw_len < 0) - return ERROR_INVALID_NAME; - buf_sz += new_pathw_len * sizeof(WCHAR); - } - - - if (buf_sz == 0) { - req->file.pathw = NULL; - req->fs.info.new_pathw = NULL; - req->path = NULL; - return 0; - } - - buf = uv__malloc(buf_sz); - if (buf == NULL) { - return ERROR_OUTOFMEMORY; - } - - pos = buf; - - if (path != NULL) { - fs__wtf8_to_wide(path, pos); - req->file.pathw = pos; - pos += pathw_len; - } else { - req->file.pathw = NULL; - } - - if (new_path != NULL) { - fs__wtf8_to_wide(new_path, pos); - req->fs.info.new_pathw = pos; - pos += new_pathw_len; - } else { - req->fs.info.new_pathw = NULL; - } - - req->path = path; - if (path != NULL && copy_path) { - memcpy(pos, path, path_len); - assert(path_len == buf_sz - (pos - buf) * sizeof(WCHAR)); - req->path = (char*) pos; - } - - req->flags |= UV_FS_FREE_PATHS; - - return 0; -} - - - -INLINE static void uv__fs_req_init(uv_loop_t* loop, uv_fs_t* req, - uv_fs_type fs_type, const uv_fs_cb cb) { - uv__once_init(); - UV_REQ_INIT(req, UV_FS); - req->loop = loop; - req->flags = 0; - req->fs_type = fs_type; - req->sys_errno_ = 0; - req->result = 0; - req->ptr = NULL; - req->path = NULL; - req->cb = cb; - memset(&req->fs, 0, sizeof(req->fs)); -} - - -static int32_t fs__get_surrogate_value(const WCHAR* w_source_ptr, - size_t w_source_len) { - WCHAR u; - WCHAR next; - - u = w_source_ptr[0]; - if (u >= 0xD800 && u <= 0xDBFF && w_source_len > 1) { - next = w_source_ptr[1]; - if (next >= 0xDC00 && next <= 0xDFFF) - return 0x10000 + ((u - 0xD800) << 10) + (next - 0xDC00); - } - return u; -} - - -static size_t fs__get_length_wide(const WCHAR* w_source_ptr, - size_t w_source_len) { - size_t target_len; - int32_t code_point; - - target_len = 0; - for (; w_source_len; w_source_len--, w_source_ptr++) { - code_point = fs__get_surrogate_value(w_source_ptr, w_source_len); - /* Can be invalid UTF-8 but must be valid WTF-8. */ - assert(code_point >= 0); - if (code_point < 0x80) - target_len += 1; - else if (code_point < 0x800) - target_len += 2; - else if (code_point < 0x10000) - target_len += 3; - else { - target_len += 4; - w_source_ptr++; - w_source_len--; - } - } - return target_len; -} - - -static int fs__wide_to_wtf8(WCHAR* w_source_ptr, - size_t w_source_len, - char** target_ptr, - size_t* target_len_ptr) { - size_t target_len; - char* target; - int32_t code_point; - - /* If *target_ptr is provided, then *target_len_ptr must be its length - * (excluding space for null), otherwise we will compute the target_len_ptr - * length and may return a new allocation in *target_ptr if target_ptr is - * provided. */ - if (target_ptr == NULL || *target_ptr == NULL) { - target_len = fs__get_length_wide(w_source_ptr, w_source_len); - if (target_len_ptr != NULL) - *target_len_ptr = target_len; - } else { - target_len = *target_len_ptr; - } - - if (target_ptr == NULL) - return 0; - - if (*target_ptr == NULL) { - target = uv__malloc(target_len + 1); - if (target == NULL) { - SetLastError(ERROR_OUTOFMEMORY); - return -1; - } - *target_ptr = target; - } else { - target = *target_ptr; - } - - for (; w_source_len; w_source_len--, w_source_ptr++) { - code_point = fs__get_surrogate_value(w_source_ptr, w_source_len); - /* Can be invalid UTF-8 but must be valid WTF-8. */ - assert(code_point >= 0); - - if (code_point < 0x80) { - *target++ = code_point; - } else if (code_point < 0x800) { - *target++ = 0xC0 | (code_point >> 6); - *target++ = 0x80 | (code_point & 0x3F); - } else if (code_point < 0x10000) { - *target++ = 0xE0 | (code_point >> 12); - *target++ = 0x80 | ((code_point >> 6) & 0x3F); - *target++ = 0x80 | (code_point & 0x3F); - } else { - *target++ = 0xF0 | (code_point >> 18); - *target++ = 0x80 | ((code_point >> 12) & 0x3F); - *target++ = 0x80 | ((code_point >> 6) & 0x3F); - *target++ = 0x80 | (code_point & 0x3F); - w_source_ptr++; - w_source_len--; - } - } - assert((size_t) (target - *target_ptr) == target_len); - - *target++ = '\0'; - - return 0; -} - - INLINE static int fs__readlink_handle(HANDLE handle, char** target_ptr, size_t* target_len_ptr) { @@ -550,7 +280,98 @@ INLINE static int fs__readlink_handle(HANDLE handle, } assert(target_ptr == NULL || *target_ptr == NULL); - return fs__wide_to_wtf8(w_target, w_target_len, target_ptr, target_len_ptr); + return uv_utf16_to_wtf8(w_target, w_target_len, target_ptr, target_len_ptr); +} + + +INLINE static int fs__capture_path(uv_fs_t* req, const char* path, + const char* new_path, const int copy_path) { + WCHAR* buf; + WCHAR* pos; + size_t buf_sz = 0; + size_t path_len = 0; + ssize_t pathw_len = 0; + ssize_t new_pathw_len = 0; + + /* new_path can only be set if path is also set. */ + assert(new_path == NULL || path != NULL); + + if (path != NULL) { + pathw_len = uv_wtf8_length_as_utf16(path); + if (pathw_len < 0) + return ERROR_INVALID_NAME; + buf_sz += pathw_len * sizeof(WCHAR); + } + + if (path != NULL && copy_path) { + path_len = 1 + strlen(path); + buf_sz += path_len; + } + + if (new_path != NULL) { + new_pathw_len = uv_wtf8_length_as_utf16(new_path); + if (new_pathw_len < 0) + return ERROR_INVALID_NAME; + buf_sz += new_pathw_len * sizeof(WCHAR); + } + + + if (buf_sz == 0) { + req->file.pathw = NULL; + req->fs.info.new_pathw = NULL; + req->path = NULL; + return 0; + } + + buf = uv__malloc(buf_sz); + if (buf == NULL) { + return ERROR_OUTOFMEMORY; + } + + pos = buf; + + if (path != NULL) { + uv_wtf8_to_utf16(path, pos, pathw_len); + req->file.pathw = pos; + pos += pathw_len; + } else { + req->file.pathw = NULL; + } + + if (new_path != NULL) { + uv_wtf8_to_utf16(new_path, pos, new_pathw_len); + req->fs.info.new_pathw = pos; + pos += new_pathw_len; + } else { + req->fs.info.new_pathw = NULL; + } + + req->path = path; + if (path != NULL && copy_path) { + memcpy(pos, path, path_len); + assert(path_len == buf_sz - (pos - buf) * sizeof(WCHAR)); + req->path = (char*) pos; + } + + req->flags |= UV_FS_FREE_PATHS; + + return 0; +} + + +INLINE static void uv__fs_req_init(uv_loop_t* loop, uv_fs_t* req, + uv_fs_type fs_type, const uv_fs_cb cb) { + uv__once_init(); + UV_REQ_INIT(req, UV_FS); + req->loop = loop; + req->flags = 0; + req->fs_type = fs_type; + req->sys_errno_ = 0; + req->result = 0; + req->ptr = NULL; + req->path = NULL; + req->cb = cb; + memset(&req->fs, 0, sizeof(req->fs)); } @@ -1569,7 +1390,7 @@ void fs__scandir(uv_fs_t* req) { continue; /* Compute the space required to store the filename as WTF-8. */ - wtf8_len = fs__get_length_wide(&info->FileName[0], wchar_len); + wtf8_len = uv_utf16_length_as_wtf8(&info->FileName[0], wchar_len); /* Resize the dirent array if needed. */ if (dirents_used >= dirents_size) { @@ -1597,8 +1418,8 @@ void fs__scandir(uv_fs_t* req) { /* Convert file name to UTF-8. */ wtf8 = &dirent->d_name[0]; - if (fs__wide_to_wtf8(&info->FileName[0], wchar_len, &wtf8, &wtf8_len) == -1) - goto win32_error; + if (uv_utf16_to_wtf8(&info->FileName[0], wchar_len, &wtf8, &wtf8_len) != 0) + goto out_of_memory_error; /* Fill out the type field. */ if (info->FileAttributes & FILE_ATTRIBUTE_DEVICE) @@ -2824,7 +2645,7 @@ static ssize_t fs__realpath_handle(HANDLE handle, char** realpath_ptr) { } assert(*realpath_ptr == NULL); - r = fs__wide_to_wtf8(w_realpath_ptr, w_realpath_len, realpath_ptr, NULL); + r = uv_utf16_to_wtf8(w_realpath_ptr, w_realpath_len, realpath_ptr, NULL); uv__free(w_realpath_buf); return r; } diff --git a/deps/uv/src/win/getaddrinfo.c b/deps/uv/src/win/getaddrinfo.c index dfab860a735e47..8b8406ada8e743 100644 --- a/deps/uv/src/win/getaddrinfo.c +++ b/deps/uv/src/win/getaddrinfo.c @@ -104,13 +104,14 @@ static void uv__getaddrinfo_work(struct uv__work* w) { */ static void uv__getaddrinfo_done(struct uv__work* w, int status) { uv_getaddrinfo_t* req; - int addrinfo_len = 0; - int name_len = 0; + size_t addrinfo_len = 0; + ssize_t name_len = 0; size_t addrinfo_struct_len = ALIGNED_SIZE(sizeof(struct addrinfo)); struct addrinfoW* addrinfow_ptr; struct addrinfo* addrinfo_ptr; char* alloc_ptr = NULL; char* cur_ptr = NULL; + int r; req = container_of(w, uv_getaddrinfo_t, work_req); @@ -131,19 +132,12 @@ static void uv__getaddrinfo_done(struct uv__work* w, int status) { addrinfo_len += addrinfo_struct_len + ALIGNED_SIZE(addrinfow_ptr->ai_addrlen); if (addrinfow_ptr->ai_canonname != NULL) { - name_len = WideCharToMultiByte(CP_UTF8, - 0, - addrinfow_ptr->ai_canonname, - -1, - NULL, - 0, - NULL, - NULL); - if (name_len == 0) { - req->retcode = uv_translate_sys_error(GetLastError()); + name_len = uv_utf16_length_as_wtf8(addrinfow_ptr->ai_canonname, -1); + if (name_len < 0) { + req->retcode = name_len; goto complete; } - addrinfo_len += ALIGNED_SIZE(name_len); + addrinfo_len += ALIGNED_SIZE(name_len + 1); } addrinfow_ptr = addrinfow_ptr->ai_next; } @@ -182,27 +176,14 @@ static void uv__getaddrinfo_done(struct uv__work* w, int status) { /* convert canonical name to UTF-8 */ if (addrinfow_ptr->ai_canonname != NULL) { - name_len = WideCharToMultiByte(CP_UTF8, - 0, - addrinfow_ptr->ai_canonname, - -1, - NULL, - 0, - NULL, - NULL); - assert(name_len > 0); - assert(cur_ptr + name_len <= alloc_ptr + addrinfo_len); - name_len = WideCharToMultiByte(CP_UTF8, - 0, - addrinfow_ptr->ai_canonname, - -1, - cur_ptr, - name_len, - NULL, - NULL); - assert(name_len > 0); + name_len = alloc_ptr + addrinfo_len - cur_ptr; + r = uv__copy_utf16_to_utf8(addrinfow_ptr->ai_canonname, + -1, + cur_ptr, + (size_t*)&name_len); + assert(r == 0); addrinfo_ptr->ai_canonname = cur_ptr; - cur_ptr += ALIGNED_SIZE(name_len); + cur_ptr += ALIGNED_SIZE(name_len + 1); } assert(cur_ptr <= alloc_ptr + addrinfo_len); @@ -261,12 +242,11 @@ int uv_getaddrinfo(uv_loop_t* loop, const char* service, const struct addrinfo* hints) { char hostname_ascii[256]; - int nodesize = 0; - int servicesize = 0; - int hintssize = 0; + size_t nodesize = 0; + size_t servicesize = 0; + size_t hintssize = 0; char* alloc_ptr = NULL; - int err; - long rc; + ssize_t rc; if (req == NULL || (node == NULL && service == NULL)) { return UV_EINVAL; @@ -286,56 +266,36 @@ int uv_getaddrinfo(uv_loop_t* loop, hostname_ascii + sizeof(hostname_ascii)); if (rc < 0) return rc; - nodesize = ALIGNED_SIZE(MultiByteToWideChar(CP_UTF8, 0, hostname_ascii, - -1, NULL, 0) * sizeof(WCHAR)); - if (nodesize == 0) { - err = GetLastError(); - goto error; - } + nodesize = strlen(hostname_ascii) + 1; node = hostname_ascii; } if (service != NULL) { - servicesize = ALIGNED_SIZE(MultiByteToWideChar(CP_UTF8, - 0, - service, - -1, - NULL, - 0) * - sizeof(WCHAR)); - if (servicesize == 0) { - err = GetLastError(); - goto error; - } + rc = uv_wtf8_length_as_utf16(service); + if (rc < 0) + return rc; + servicesize = rc; } if (hints != NULL) { hintssize = ALIGNED_SIZE(sizeof(struct addrinfoW)); } /* allocate memory for inputs, and partition it as needed */ - alloc_ptr = (char*)uv__malloc(nodesize + servicesize + hintssize); - if (!alloc_ptr) { - err = WSAENOBUFS; - goto error; - } + alloc_ptr = uv__malloc(ALIGNED_SIZE(nodesize * sizeof(WCHAR)) + + ALIGNED_SIZE(servicesize * sizeof(WCHAR)) + + hintssize); + if (!alloc_ptr) + return UV_ENOMEM; /* save alloc_ptr now so we can free if error */ - req->alloc = (void*)alloc_ptr; + req->alloc = (void*) alloc_ptr; /* Convert node string to UTF16 into allocated memory and save pointer in the - * request. */ + * request. The node here has been converted to ascii. */ if (node != NULL) { - req->node = (WCHAR*)alloc_ptr; - if (MultiByteToWideChar(CP_UTF8, - 0, - node, - -1, - (WCHAR*) alloc_ptr, - nodesize / sizeof(WCHAR)) == 0) { - err = GetLastError(); - goto error; - } - alloc_ptr += nodesize; + req->node = (WCHAR*) alloc_ptr; + uv_wtf8_to_utf16(node, (WCHAR*) alloc_ptr, nodesize); + alloc_ptr += ALIGNED_SIZE(nodesize * sizeof(WCHAR)); } else { req->node = NULL; } @@ -343,24 +303,16 @@ int uv_getaddrinfo(uv_loop_t* loop, /* Convert service string to UTF16 into allocated memory and save pointer in * the req. */ if (service != NULL) { - req->service = (WCHAR*)alloc_ptr; - if (MultiByteToWideChar(CP_UTF8, - 0, - service, - -1, - (WCHAR*) alloc_ptr, - servicesize / sizeof(WCHAR)) == 0) { - err = GetLastError(); - goto error; - } - alloc_ptr += servicesize; + req->service = (WCHAR*) alloc_ptr; + uv_wtf8_to_utf16(service, (WCHAR*) alloc_ptr, servicesize); + alloc_ptr += ALIGNED_SIZE(servicesize * sizeof(WCHAR)); } else { req->service = NULL; } /* copy hints to allocated memory and save pointer in req */ if (hints != NULL) { - req->addrinfow = (struct addrinfoW*)alloc_ptr; + req->addrinfow = (struct addrinfoW*) alloc_ptr; req->addrinfow->ai_family = hints->ai_family; req->addrinfow->ai_socktype = hints->ai_socktype; req->addrinfow->ai_protocol = hints->ai_protocol; @@ -387,19 +339,11 @@ int uv_getaddrinfo(uv_loop_t* loop, uv__getaddrinfo_done(&req->work_req, 0); return req->retcode; } - -error: - if (req != NULL) { - uv__free(req->alloc); - req->alloc = NULL; - } - return uv_translate_sys_error(err); } int uv_if_indextoname(unsigned int ifindex, char* buffer, size_t* size) { NET_LUID luid; wchar_t wname[NDIS_IF_MAX_STRING_SIZE + 1]; /* Add one for the NUL. */ - DWORD bufsize; int r; if (buffer == NULL || size == NULL || *size == 0) @@ -415,31 +359,7 @@ int uv_if_indextoname(unsigned int ifindex, char* buffer, size_t* size) { if (r != 0) return uv_translate_sys_error(r); - /* Check how much space we need */ - bufsize = WideCharToMultiByte(CP_UTF8, 0, wname, -1, NULL, 0, NULL, NULL); - - if (bufsize == 0) { - return uv_translate_sys_error(GetLastError()); - } else if (bufsize > *size) { - *size = bufsize; - return UV_ENOBUFS; - } - - /* Convert to UTF-8 */ - bufsize = WideCharToMultiByte(CP_UTF8, - 0, - wname, - -1, - buffer, - *size, - NULL, - NULL); - - if (bufsize == 0) - return uv_translate_sys_error(GetLastError()); - - *size = bufsize - 1; - return 0; + return uv__copy_utf16_to_utf8(wname, -1, buffer, size); } int uv_if_indextoiid(unsigned int ifindex, char* buffer, size_t* size) { diff --git a/deps/uv/src/win/getnameinfo.c b/deps/uv/src/win/getnameinfo.c index b3773380c21d70..32863176ef6403 100644 --- a/deps/uv/src/win/getnameinfo.c +++ b/deps/uv/src/win/getnameinfo.c @@ -42,6 +42,7 @@ static void uv__getnameinfo_work(struct uv__work* w) { uv_getnameinfo_t* req; WCHAR host[NI_MAXHOST]; WCHAR service[NI_MAXSERV]; + size_t size; int ret; req = container_of(w, uv_getnameinfo_t, work_req); @@ -57,29 +58,17 @@ static void uv__getnameinfo_work(struct uv__work* w) { return; } - ret = WideCharToMultiByte(CP_UTF8, - 0, - host, - -1, - req->host, - sizeof(req->host), - NULL, - NULL); - if (ret == 0) { - req->retcode = uv_translate_sys_error(GetLastError()); + size = sizeof(req->host); + ret = uv__copy_utf16_to_utf8(host, -1, req->host, &size); + if (ret < 0) { + req->retcode = ret; return; } - ret = WideCharToMultiByte(CP_UTF8, - 0, - service, - -1, - req->service, - sizeof(req->service), - NULL, - NULL); - if (ret == 0) { - req->retcode = uv_translate_sys_error(GetLastError()); + size = sizeof(req->service); + ret = uv__copy_utf16_to_utf8(service, -1, req->service, &size); + if (ret < 0) { + req->retcode = ret; } } diff --git a/deps/uv/src/win/internal.h b/deps/uv/src/win/internal.h index 9672fbc6826397..867dea5e0ed34f 100644 --- a/deps/uv/src/win/internal.h +++ b/deps/uv/src/win/internal.h @@ -257,8 +257,9 @@ void uv__util_init(void); uint64_t uv__hrtime(unsigned int scale); __declspec(noreturn) void uv_fatal_error(const int errorno, const char* syscall); -int uv__convert_utf16_to_utf8(const WCHAR* utf16, int utf16len, char** utf8); -int uv__convert_utf8_to_utf16(const char* utf8, int utf8len, WCHAR** utf16); +int uv__convert_utf16_to_utf8(const WCHAR* utf16, size_t utf16len, char** utf8); +int uv__copy_utf16_to_utf8(const WCHAR* utf16, size_t utf16len, char* utf8, size_t *size); +int uv__convert_utf8_to_utf16(const char* utf8, WCHAR** utf16); typedef int (WINAPI *uv__peersockfunc)(SOCKET, struct sockaddr*, int*); diff --git a/deps/uv/src/win/pipe.c b/deps/uv/src/win/pipe.c index f0cac3822564e1..cec72ff750b5a1 100644 --- a/deps/uv/src/win/pipe.c +++ b/deps/uv/src/win/pipe.c @@ -49,7 +49,7 @@ static const int default_pending_pipe_instances = 4; /* Pipe prefix */ static char pipe_prefix[] = "\\\\?\\pipe"; -static const int pipe_prefix_len = sizeof(pipe_prefix) - 1; +static const size_t pipe_prefix_len = sizeof(pipe_prefix) - 1; /* IPC incoming xfer queue item. */ typedef struct { @@ -703,7 +703,7 @@ int uv_pipe_bind2(uv_pipe_t* handle, size_t namelen, unsigned int flags) { uv_loop_t* loop = handle->loop; - int i, err, nameSize; + int i, err; uv_pipe_accept_t* req; if (flags & ~UV_PIPE_NO_TRUNCATE) { @@ -742,9 +742,8 @@ int uv_pipe_bind2(uv_pipe_t* handle, handle->pipe.serv.accept_reqs = (uv_pipe_accept_t*) uv__malloc(sizeof(uv_pipe_accept_t) * handle->pipe.serv.pending_instances); - if (!handle->pipe.serv.accept_reqs) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } + if (!handle->pipe.serv.accept_reqs) + return UV_ENOMEM; for (i = 0; i < handle->pipe.serv.pending_instances; i++) { req = &handle->pipe.serv.accept_reqs[i]; @@ -754,22 +753,9 @@ int uv_pipe_bind2(uv_pipe_t* handle, req->next_pending = NULL; } - /* Convert name to UTF16. */ - nameSize = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0) * sizeof(WCHAR); - handle->name = uv__malloc(nameSize); - if (!handle->name) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - if (!MultiByteToWideChar(CP_UTF8, - 0, - name, - -1, - handle->name, - nameSize / sizeof(WCHAR))) { - err = GetLastError(); - goto error; - } + err = uv__convert_utf8_to_utf16(name, &handle->name); + if (err) + return err; /* * Attempt to create the first pipe with FILE_FLAG_FIRST_PIPE_INSTANCE. @@ -795,10 +781,8 @@ int uv_pipe_bind2(uv_pipe_t* handle, return 0; error: - if (handle->name) { - uv__free(handle->name); - handle->name = NULL; - } + uv__free(handle->name); + handle->name = NULL; return uv_translate_sys_error(err); } @@ -861,7 +845,8 @@ int uv_pipe_connect2(uv_connect_t* req, unsigned int flags, uv_connect_cb cb) { uv_loop_t* loop = handle->loop; - int err, nameSize; + int err; + size_t nameSize; HANDLE pipeHandle = INVALID_HANDLE_VALUE; DWORD duplex_flags; @@ -904,26 +889,16 @@ int uv_pipe_connect2(uv_connect_t* req, } uv__pipe_connection_init(handle); - /* Convert name to UTF16. */ - nameSize = MultiByteToWideChar(CP_UTF8, 0, name, -1, NULL, 0) * sizeof(WCHAR); - handle->name = uv__malloc(nameSize); - if (!handle->name) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - if (!MultiByteToWideChar(CP_UTF8, - 0, - name, - -1, - handle->name, - nameSize / sizeof(WCHAR))) { - err = GetLastError(); + err = uv__convert_utf8_to_utf16(name, &handle->name); + if (err) { + err = ERROR_NO_UNICODE_TRANSLATION; goto error; } pipeHandle = open_named_pipe(handle->name, &duplex_flags); if (pipeHandle == INVALID_HANDLE_VALUE) { if (GetLastError() == ERROR_PIPE_BUSY) { + nameSize = (wcslen(handle->name) + 1) * sizeof(WCHAR); req->u.connect.name = uv__malloc(nameSize); if (!req->u.connect.name) { uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); @@ -2439,7 +2414,6 @@ static int uv__pipe_getname(const uv_pipe_t* handle, char* buffer, size_t* size) FILE_NAME_INFORMATION tmp_name_info; FILE_NAME_INFORMATION* name_info; WCHAR* name_buf; - unsigned int addrlen; unsigned int name_size; unsigned int name_len; int err; @@ -2450,46 +2424,7 @@ static int uv__pipe_getname(const uv_pipe_t* handle, char* buffer, size_t* size) if (handle->name != NULL) { /* The user might try to query the name before we are connected, * and this is just easier to return the cached value if we have it. */ - name_buf = handle->name; - name_len = wcslen(name_buf); - - /* check how much space we need */ - addrlen = WideCharToMultiByte(CP_UTF8, - 0, - name_buf, - name_len, - NULL, - 0, - NULL, - NULL); - if (!addrlen) { - *size = 0; - err = uv_translate_sys_error(GetLastError()); - return err; - } else if (addrlen >= *size) { - *size = addrlen + 1; - err = UV_ENOBUFS; - goto error; - } - - addrlen = WideCharToMultiByte(CP_UTF8, - 0, - name_buf, - name_len, - buffer, - addrlen, - NULL, - NULL); - if (!addrlen) { - *size = 0; - err = uv_translate_sys_error(GetLastError()); - return err; - } - - *size = addrlen; - buffer[addrlen] = '\0'; - - return 0; + return uv__copy_utf16_to_utf8(handle->name, -1, buffer, size); } if (handle->handle == INVALID_HANDLE_VALUE) { @@ -2517,8 +2452,7 @@ static int uv__pipe_getname(const uv_pipe_t* handle, char* buffer, size_t* size) name_info = uv__malloc(name_size); if (!name_info) { *size = 0; - err = UV_ENOMEM; - goto cleanup; + return UV_ENOMEM; } nt_status = pNtQueryInformationFile(handle->handle, @@ -2551,51 +2485,19 @@ static int uv__pipe_getname(const uv_pipe_t* handle, char* buffer, size_t* size) name_len /= sizeof(WCHAR); - /* check how much space we need */ - addrlen = WideCharToMultiByte(CP_UTF8, - 0, - name_buf, - name_len, - NULL, - 0, - NULL, - NULL); - if (!addrlen) { + /* "\\\\.\\pipe" + name */ + if (*size < pipe_prefix_len) { *size = 0; - err = uv_translate_sys_error(GetLastError()); - goto error; - } else if (pipe_prefix_len + addrlen >= *size) { - /* "\\\\.\\pipe" + name */ - *size = pipe_prefix_len + addrlen + 1; - err = UV_ENOBUFS; - goto error; } - - memcpy(buffer, pipe_prefix, pipe_prefix_len); - addrlen = WideCharToMultiByte(CP_UTF8, - 0, - name_buf, - name_len, - buffer+pipe_prefix_len, - *size-pipe_prefix_len, - NULL, - NULL); - if (!addrlen) { - *size = 0; - err = uv_translate_sys_error(GetLastError()); - goto error; + else { + memcpy(buffer, pipe_prefix, pipe_prefix_len); + *size -= pipe_prefix_len; } - - addrlen += pipe_prefix_len; - *size = addrlen; - buffer[addrlen] = '\0'; - - err = 0; + err = uv__copy_utf16_to_utf8(name_buf, name_len, buffer+pipe_prefix_len, size); + *size += pipe_prefix_len; error: uv__free(name_info); - -cleanup: return err; } diff --git a/deps/uv/src/win/process.c b/deps/uv/src/win/process.c index 3e451e2291d6ed..43059858f3112e 100644 --- a/deps/uv/src/win/process.c +++ b/deps/uv/src/win/process.c @@ -105,38 +105,26 @@ static void uv__init_global_job_handle(void) { &info, sizeof info)) uv_fatal_error(GetLastError(), "SetInformationJobObject"); -} - -static int uv__utf8_to_utf16_alloc(const char* s, WCHAR** ws_ptr) { - int ws_len, r; - WCHAR* ws; - - ws_len = MultiByteToWideChar(CP_UTF8, - 0, - s, - -1, - NULL, - 0); - if (ws_len <= 0) { - return GetLastError(); - } - ws = (WCHAR*) uv__malloc(ws_len * sizeof(WCHAR)); - if (ws == NULL) { - return ERROR_OUTOFMEMORY; + if (!AssignProcessToJobObject(uv_global_job_handle_, GetCurrentProcess())) { + /* Make sure this handle is functional. The Windows kernel has a bug that + * if the first use of AssignProcessToJobObject is for a Windows Store + * program, subsequent attempts to use the handle with fail with + * INVALID_PARAMETER (87). This is possibly because all uses of the handle + * must be for the same Terminal Services session. We can ensure it is tied + * to our current session now by adding ourself to it. We could remove + * ourself afterwards, but there doesn't seem to be a reason to. + */ + DWORD err = GetLastError(); + if (err != ERROR_ACCESS_DENIED) + uv_fatal_error(err, "AssignProcessToJobObject"); } +} - r = MultiByteToWideChar(CP_UTF8, - 0, - s, - -1, - ws, - ws_len); - assert(r == ws_len); - *ws_ptr = ws; - return 0; +static int uv__utf8_to_utf16_alloc(const char* s, WCHAR** ws_ptr) { + return uv__convert_utf8_to_utf16(s, ws_ptr); } @@ -396,7 +384,7 @@ static WCHAR* search_path(const WCHAR *file, name_has_ext); while (result == NULL) { - if (*dir_end == L'\0') { + if (dir_end == NULL || *dir_end == L'\0') { break; } @@ -539,21 +527,15 @@ int make_program_args(char** args, int verbatim_arguments, WCHAR** dst_ptr) { /* Count the required size. */ for (arg = args; *arg; arg++) { - DWORD arg_len; - - arg_len = MultiByteToWideChar(CP_UTF8, - 0, - *arg, - -1, - NULL, - 0); - if (arg_len == 0) { - return GetLastError(); - } + ssize_t arg_len; + + arg_len = uv_wtf8_length_as_utf16(*arg); + if (arg_len < 0) + return arg_len; dst_len += arg_len; - if (arg_len > temp_buffer_len) + if ((size_t) arg_len > temp_buffer_len) temp_buffer_len = arg_len; arg_count++; @@ -564,34 +546,28 @@ int make_program_args(char** args, int verbatim_arguments, WCHAR** dst_ptr) { dst_len = dst_len * 2 + arg_count * 2; /* Allocate buffer for the final command line. */ - dst = (WCHAR*) uv__malloc(dst_len * sizeof(WCHAR)); + dst = uv__malloc(dst_len * sizeof(WCHAR)); if (dst == NULL) { - err = ERROR_OUTOFMEMORY; + err = UV_ENOMEM; goto error; } /* Allocate temporary working buffer. */ - temp_buffer = (WCHAR*) uv__malloc(temp_buffer_len * sizeof(WCHAR)); + temp_buffer = uv__malloc(temp_buffer_len * sizeof(WCHAR)); if (temp_buffer == NULL) { - err = ERROR_OUTOFMEMORY; + err = UV_ENOMEM; goto error; } pos = dst; for (arg = args; *arg; arg++) { - DWORD arg_len; + ssize_t arg_len; /* Convert argument to wide char. */ - arg_len = MultiByteToWideChar(CP_UTF8, - 0, - *arg, - -1, - temp_buffer, - (int) (dst + dst_len - pos)); - if (arg_len == 0) { - err = GetLastError(); - goto error; - } + arg_len = uv_wtf8_length_as_utf16(*arg); + assert(arg_len > 0); + assert(temp_buffer_len >= (size_t) arg_len); + uv_wtf8_to_utf16(*arg, temp_buffer, arg_len); if (verbatim_arguments) { /* Copy verbatim. */ @@ -603,6 +579,7 @@ int make_program_args(char** args, int verbatim_arguments, WCHAR** dst_ptr) { } *pos++ = *(arg + 1) ? L' ' : L'\0'; + assert(pos <= dst + dst_len); } uv__free(temp_buffer); @@ -688,55 +665,43 @@ int make_program_env(char* env_block[], WCHAR** dst_ptr) { WCHAR* ptr; char** env; size_t env_len = 0; - int len; + size_t len; size_t i; - DWORD var_size; + size_t var_size; size_t env_block_count = 1; /* 1 for null-terminator */ WCHAR* dst_copy; WCHAR** ptr_copy; WCHAR** env_copy; - DWORD required_vars_value_len[ARRAY_SIZE(required_vars)]; + size_t required_vars_value_len[ARRAY_SIZE(required_vars)]; /* first pass: determine size in UTF-16 */ for (env = env_block; *env; env++) { - int len; + ssize_t len; if (strchr(*env, '=')) { - len = MultiByteToWideChar(CP_UTF8, - 0, - *env, - -1, - NULL, - 0); - if (len <= 0) { - return GetLastError(); - } + len = uv_wtf8_length_as_utf16(*env); + if (len < 0) + return len; env_len += len; env_block_count++; } } /* second pass: copy to UTF-16 environment block */ - dst_copy = (WCHAR*)uv__malloc(env_len * sizeof(WCHAR)); + dst_copy = uv__malloc(env_len * sizeof(WCHAR)); if (dst_copy == NULL && env_len > 0) { - return ERROR_OUTOFMEMORY; + return UV_ENOMEM; } env_copy = alloca(env_block_count * sizeof(WCHAR*)); ptr = dst_copy; ptr_copy = env_copy; for (env = env_block; *env; env++) { + ssize_t len; if (strchr(*env, '=')) { - len = MultiByteToWideChar(CP_UTF8, - 0, - *env, - -1, - ptr, - (int) (env_len - (ptr - dst_copy))); - if (len <= 0) { - DWORD err = GetLastError(); - uv__free(dst_copy); - return err; - } + len = uv_wtf8_length_as_utf16(*env); + assert(len > 0); + assert((size_t) len <= env_len - (ptr - dst_copy)); + uv_wtf8_to_utf16(*env, ptr, len); *ptr_copy++ = ptr; ptr += len; } @@ -754,7 +719,7 @@ int make_program_env(char* env_block[], WCHAR** dst_ptr) { cmp = -1; } else { cmp = env_strncmp(required_vars[i].wide_eq, - required_vars[i].len, + required_vars[i].len, *ptr_copy); } if (cmp < 0) { @@ -777,7 +742,7 @@ int make_program_env(char* env_block[], WCHAR** dst_ptr) { dst = uv__malloc((1+env_len) * sizeof(WCHAR)); if (!dst) { uv__free(dst_copy); - return ERROR_OUTOFMEMORY; + return UV_ENOMEM; } for (ptr = dst, ptr_copy = env_copy, i = 0; @@ -975,26 +940,26 @@ int uv_spawn(uv_loop_t* loop, err = uv__utf8_to_utf16_alloc(options->file, &application); if (err) - goto done; + goto done_uv; err = make_program_args( options->args, options->flags & UV_PROCESS_WINDOWS_VERBATIM_ARGUMENTS, &arguments); if (err) - goto done; + goto done_uv; if (options->env) { err = make_program_env(options->env, &env); if (err) - goto done; + goto done_uv; } if (options->cwd) { /* Explicit cwd */ err = uv__utf8_to_utf16_alloc(options->cwd, &cwd); if (err) - goto done; + goto done_uv; } else { /* Inherit cwd */ @@ -1025,22 +990,19 @@ int uv_spawn(uv_loop_t* loop, DWORD path_len, r; path_len = GetEnvironmentVariableW(L"PATH", NULL, 0); - if (path_len == 0) { - err = GetLastError(); - goto done; - } - - alloc_path = (WCHAR*) uv__malloc(path_len * sizeof(WCHAR)); - if (alloc_path == NULL) { - err = ERROR_OUTOFMEMORY; - goto done; - } - path = alloc_path; + if (path_len != 0) { + alloc_path = (WCHAR*) uv__malloc(path_len * sizeof(WCHAR)); + if (alloc_path == NULL) { + err = ERROR_OUTOFMEMORY; + goto done; + } + path = alloc_path; - r = GetEnvironmentVariableW(L"PATH", path, path_len); - if (r == 0 || r >= path_len) { - err = GetLastError(); - goto done; + r = GetEnvironmentVariableW(L"PATH", path, path_len); + if (r == 0 || r >= path_len) { + err = GetLastError(); + goto done; + } } } @@ -1102,6 +1064,7 @@ int uv_spawn(uv_loop_t* loop, * breakaway. */ process_flags |= DETACHED_PROCESS | CREATE_NEW_PROCESS_GROUP; + process_flags |= CREATE_SUSPENDED; } if (!CreateProcessW(application_path, @@ -1119,11 +1082,6 @@ int uv_spawn(uv_loop_t* loop, goto done; } - /* Spawn succeeded. Beyond this point, failure is reported asynchronously. */ - - process->process_handle = info.hProcess; - process->pid = info.dwProcessId; - /* If the process isn't spawned as detached, assign to the global job object * so windows will kill it when the parent process dies. */ if (!(options->flags & UV_PROCESS_DETACHED)) { @@ -1146,6 +1104,19 @@ int uv_spawn(uv_loop_t* loop, } } + if (process_flags & CREATE_SUSPENDED) { + if (ResumeThread(info.hThread) == ((DWORD)-1)) { + err = GetLastError(); + TerminateProcess(info.hProcess, 1); + goto done; + } + } + + /* Spawn succeeded. Beyond this point, failure is reported asynchronously. */ + + process->process_handle = info.hProcess; + process->pid = info.dwProcessId; + /* Set IPC pid to all IPC pipes. */ for (i = 0; i < options->stdio_count; i++) { const uv_stdio_container_t* fdopt = &options->stdio[i]; @@ -1173,8 +1144,13 @@ int uv_spawn(uv_loop_t* loop, * made or the handle is closed, whichever happens first. */ uv__handle_start(process); + goto done_uv; + /* Cleanup, whether we succeeded or failed. */ done: + err = uv_translate_sys_error(err); + + done_uv: uv__free(application); uv__free(application_path); uv__free(arguments); @@ -1188,7 +1164,7 @@ int uv_spawn(uv_loop_t* loop, child_stdio_buffer = NULL; } - return uv_translate_sys_error(err); + return err; } diff --git a/deps/uv/src/win/tty.c b/deps/uv/src/win/tty.c index 7e1f15544b1773..ac836930d6f3a1 100644 --- a/deps/uv/src/win/tty.c +++ b/deps/uv/src/win/tty.c @@ -482,9 +482,11 @@ static DWORD CALLBACK uv_tty_line_read_thread(void* data) { uv_loop_t* loop; uv_tty_t* handle; uv_req_t* req; - DWORD bytes, read_bytes; + DWORD bytes; + size_t read_bytes; WCHAR utf16[MAX_INPUT_BUFFER_LENGTH / 3]; - DWORD chars, read_chars; + DWORD chars; + DWORD read_chars; LONG status; COORD pos; BOOL read_console_success; @@ -525,16 +527,13 @@ static DWORD CALLBACK uv_tty_line_read_thread(void* data) { NULL); if (read_console_success) { - read_bytes = WideCharToMultiByte(CP_UTF8, - 0, - utf16, - read_chars, - handle->tty.rd.read_line_buffer.base, - bytes, - NULL, - NULL); + read_bytes = bytes; + uv_utf16_to_wtf8(utf16, + read_chars, + &handle->tty.rd.read_line_buffer.base, + &read_bytes); SET_REQ_SUCCESS(req); - req->u.io.overlapped.InternalHigh = read_bytes; + req->u.io.overlapped.InternalHigh = (DWORD) read_bytes; } else { SET_REQ_ERROR(req, GetLastError()); } @@ -798,7 +797,9 @@ void uv_process_tty_read_raw_req(uv_loop_t* loop, uv_tty_t* handle, } if (KEV.uChar.UnicodeChar != 0) { - int prefix_len, char_len; + int prefix_len; + size_t char_len; + char* last_key_buf; /* Character key pressed */ if (KEV.uChar.UnicodeChar >= 0xD800 && @@ -819,38 +820,31 @@ void uv_process_tty_read_raw_req(uv_loop_t* loop, uv_tty_t* handle, prefix_len = 0; } - if (KEV.uChar.UnicodeChar >= 0xDC00 && - KEV.uChar.UnicodeChar < 0xE000) { + char_len = sizeof handle->tty.rd.last_key; + last_key_buf = &handle->tty.rd.last_key[prefix_len]; + if (handle->tty.rd.last_utf16_high_surrogate) { /* UTF-16 surrogate pair */ WCHAR utf16_buffer[2]; utf16_buffer[0] = handle->tty.rd.last_utf16_high_surrogate; utf16_buffer[1] = KEV.uChar.UnicodeChar; - char_len = WideCharToMultiByte(CP_UTF8, - 0, - utf16_buffer, - 2, - &handle->tty.rd.last_key[prefix_len], - sizeof handle->tty.rd.last_key, - NULL, - NULL); + if (uv_utf16_to_wtf8(utf16_buffer, + 2, + &last_key_buf, + &char_len)) + char_len = 0; + handle->tty.rd.last_utf16_high_surrogate = 0; } else { /* Single UTF-16 character */ - char_len = WideCharToMultiByte(CP_UTF8, - 0, - &KEV.uChar.UnicodeChar, - 1, - &handle->tty.rd.last_key[prefix_len], - sizeof handle->tty.rd.last_key, - NULL, - NULL); + if (uv_utf16_to_wtf8(&KEV.uChar.UnicodeChar, + 1, + &last_key_buf, + &char_len)) + char_len = 0; } - /* Whatever happened, the last character wasn't a high surrogate. */ - handle->tty.rd.last_utf16_high_surrogate = 0; - /* If the utf16 character(s) couldn't be converted something must be * wrong. */ - if (!char_len) { + if (char_len == 0) { handle->flags &= ~UV_HANDLE_READING; DECREASE_ACTIVE_COUNT(loop, handle); handle->read_cb((uv_stream_t*) handle, diff --git a/deps/uv/src/win/util.c b/deps/uv/src/win/util.c index f6ec79cd57b501..91d88a54fb24a6 100644 --- a/deps/uv/src/win/util.c +++ b/deps/uv/src/win/util.c @@ -95,7 +95,7 @@ void uv__util_init(void) { int uv_exepath(char* buffer, size_t* size_ptr) { - int utf8_len, utf16_buffer_len, utf16_len; + size_t utf8_len, utf16_buffer_len, utf16_len; WCHAR* utf16_buffer; int err; @@ -123,25 +123,17 @@ int uv_exepath(char* buffer, size_t* size_ptr) { } /* Convert to UTF-8 */ - utf8_len = WideCharToMultiByte(CP_UTF8, - 0, - utf16_buffer, - -1, - buffer, - (int) *size_ptr, - NULL, - NULL); - if (utf8_len == 0) { - err = GetLastError(); - goto error; + utf8_len = *size_ptr - 1; /* Reserve space for NUL */ + err = uv_utf16_to_wtf8(utf16_buffer, utf16_len, &buffer, &utf8_len); + if (err == UV_ENOBUFS) { + utf8_len = *size_ptr - 1; + err = 0; } + *size_ptr = utf8_len; uv__free(utf16_buffer); - /* utf8_len *does* include the terminating null at this point, but the - * returned size shouldn't. */ - *size_ptr = utf8_len - 1; - return 0; + return err; error: uv__free(utf16_buffer); @@ -204,45 +196,14 @@ int uv_cwd(char* buffer, size_t* size) { } r = uv__cwd(&utf16_buffer, &utf16_len); - if (r < 0) { + if (r < 0) return r; - } - /* Check how much space we need */ - r = WideCharToMultiByte(CP_UTF8, - 0, - utf16_buffer, - -1, - NULL, - 0, - NULL, - NULL); - if (r == 0) { - uv__free(utf16_buffer); - return uv_translate_sys_error(GetLastError()); - } else if (r > (int) *size) { - uv__free(utf16_buffer); - *size = r; - return UV_ENOBUFS; - } + r = uv__copy_utf16_to_utf8(utf16_buffer, utf16_len, buffer, size); - /* Convert to UTF-8 */ - r = WideCharToMultiByte(CP_UTF8, - 0, - utf16_buffer, - -1, - buffer, - *size > INT_MAX ? INT_MAX : (int) *size, - NULL, - NULL); uv__free(utf16_buffer); - if (r == 0) { - return uv_translate_sys_error(GetLastError()); - } - - *size = r - 1; - return 0; + return r; } @@ -252,33 +213,10 @@ int uv_chdir(const char* dir) { WCHAR drive_letter, env_var[4]; int r; - if (dir == NULL) { - return UV_EINVAL; - } - - utf16_len = MultiByteToWideChar(CP_UTF8, - 0, - dir, - -1, - NULL, - 0); - if (utf16_len == 0) { - return uv_translate_sys_error(GetLastError()); - } - utf16_buffer = uv__malloc(utf16_len * sizeof(WCHAR)); - if (utf16_buffer == NULL) { - return UV_ENOMEM; - } - - if (MultiByteToWideChar(CP_UTF8, - 0, - dir, - -1, - utf16_buffer, - utf16_len) == 0) { - uv__free(utf16_buffer); - return uv_translate_sys_error(GetLastError()); - } + /* Convert to UTF-16 */ + r = uv__convert_utf8_to_utf16(dir, &utf16_buffer); + if (r) + return r; if (!SetCurrentDirectoryW(utf16_buffer)) { uv__free(utf16_buffer); @@ -416,29 +354,14 @@ int uv_set_process_title(const char* title) { uv__once_init(); - /* Find out how big the buffer for the wide-char title must be */ - length = MultiByteToWideChar(CP_UTF8, 0, title, -1, NULL, 0); - if (!length) { - err = GetLastError(); - goto done; - } - - /* Convert to wide-char string */ - title_w = (WCHAR*)uv__malloc(sizeof(WCHAR) * length); - if (!title_w) { - uv_fatal_error(ERROR_OUTOFMEMORY, "uv__malloc"); - } - - length = MultiByteToWideChar(CP_UTF8, 0, title, -1, title_w, length); - if (!length) { - err = GetLastError(); - goto done; - } + err = uv__convert_utf8_to_utf16(title, &title_w); + if (err) + return err; /* If the title must be truncated insert a \0 terminator there */ - if (length > MAX_TITLE_LENGTH) { + length = wcslen(title_w); + if (length >= MAX_TITLE_LENGTH) title_w[MAX_TITLE_LENGTH - 1] = L'\0'; - } if (!SetConsoleTitleW(title_w)) { err = GetLastError(); @@ -460,20 +383,19 @@ int uv_set_process_title(const char* title) { static int uv__get_process_title(void) { WCHAR title_w[MAX_TITLE_LENGTH]; + DWORD wlen; - if (!GetConsoleTitleW(title_w, sizeof(title_w) / sizeof(WCHAR))) { - return -1; - } - - if (uv__convert_utf16_to_utf8(title_w, -1, &process_title) != 0) - return -1; + wlen = GetConsoleTitleW(title_w, sizeof(title_w) / sizeof(WCHAR)); + if (wlen == 0) + return uv_translate_sys_error(GetLastError()); - return 0; + return uv__convert_utf16_to_utf8(title_w, wlen, &process_title); } int uv_get_process_title(char* buffer, size_t size) { size_t len; + int r; if (buffer == NULL || size == 0) return UV_EINVAL; @@ -485,9 +407,12 @@ int uv_get_process_title(char* buffer, size_t size) { * If the process_title was never read before nor explicitly set, * we must query it with getConsoleTitleW */ - if (!process_title && uv__get_process_title() == -1) { - LeaveCriticalSection(&process_title_lock); - return uv_translate_sys_error(GetLastError()); + if (process_title == NULL) { + r = uv__get_process_title(); + if (r) { + LeaveCriticalSection(&process_title_lock); + return r; + } } assert(process_title); @@ -833,19 +758,8 @@ int uv_interface_addresses(uv_interface_address_t** addresses_ptr, continue; /* Compute the size of the interface name. */ - name_size = WideCharToMultiByte(CP_UTF8, - 0, - adapter->FriendlyName, - -1, - NULL, - 0, - NULL, - FALSE); - if (name_size <= 0) { - uv__free(win_address_buf); - return uv_translate_sys_error(GetLastError()); - } - uv_address_buf_size += name_size; + name_size = uv_utf16_length_as_wtf8(adapter->FriendlyName, -1); + uv_address_buf_size += name_size + 1; /* Count the number of addresses associated with this interface, and * compute the size. */ @@ -875,30 +789,25 @@ int uv_interface_addresses(uv_interface_address_t** addresses_ptr, adapter != NULL; adapter = adapter->Next) { IP_ADAPTER_UNICAST_ADDRESS* unicast_address; - int name_size; - size_t max_name_size; + size_t name_size; + int r; if (adapter->OperStatus != IfOperStatusUp || adapter->FirstUnicastAddress == NULL) continue; /* Convert the interface name to UTF8. */ - max_name_size = (char*) uv_address_buf + uv_address_buf_size - name_buf; - if (max_name_size > (size_t) INT_MAX) - max_name_size = INT_MAX; - name_size = WideCharToMultiByte(CP_UTF8, - 0, - adapter->FriendlyName, - -1, - name_buf, - (int) max_name_size, - NULL, - FALSE); - if (name_size <= 0) { + name_size = (char*) uv_address_buf + uv_address_buf_size - name_buf; + r = uv__copy_utf16_to_utf8(adapter->FriendlyName, + -1, + name_buf, + &name_size); + if (r) { uv__free(win_address_buf); uv__free(uv_address_buf); - return uv_translate_sys_error(GetLastError()); + return r; } + name_size += 1; /* Add NUL byte. */ /* Add an uv_interface_address_t element for every unicast address. */ for (unicast_address = (IP_ADAPTER_UNICAST_ADDRESS*) @@ -1061,7 +970,6 @@ int uv_os_homedir(char* buffer, size_t* size) { int uv_os_tmpdir(char* buffer, size_t* size) { wchar_t *path; - DWORD bufsize; size_t len; if (buffer == NULL || size == NULL || *size == 0) @@ -1078,7 +986,7 @@ int uv_os_tmpdir(char* buffer, size_t* size) { if (path == NULL) { return UV_ENOMEM; } - len = GetTempPathW(len, path); + len = GetTempPathW(len, path); if (len == 0) { uv__free(path); @@ -1093,34 +1001,7 @@ int uv_os_tmpdir(char* buffer, size_t* size) { path[len] = L'\0'; } - /* Check how much space we need */ - bufsize = WideCharToMultiByte(CP_UTF8, 0, path, -1, NULL, 0, NULL, NULL); - - if (bufsize == 0) { - uv__free(path); - return uv_translate_sys_error(GetLastError()); - } else if (bufsize > *size) { - uv__free(path); - *size = bufsize; - return UV_ENOBUFS; - } - - /* Convert to UTF-8 */ - bufsize = WideCharToMultiByte(CP_UTF8, - 0, - path, - -1, - buffer, - *size, - NULL, - NULL); - uv__free(path); - - if (bufsize == 0) - return uv_translate_sys_error(GetLastError()); - - *size = bufsize - 1; - return 0; + return uv__copy_utf16_to_utf8(path, len, buffer, size); } @@ -1131,95 +1012,71 @@ int uv_os_tmpdir(char* buffer, size_t* size) { * If utf16 is null terminated, utf16len can be set to -1, otherwise it must * be specified. */ -int uv__convert_utf16_to_utf8(const WCHAR* utf16, int utf16len, char** utf8) { - DWORD bufsize; +int uv__convert_utf16_to_utf8(const WCHAR* utf16, size_t utf16len, char** utf8) { + size_t utf8_len = 0; if (utf16 == NULL) return UV_EINVAL; - /* Check how much space we need */ - bufsize = WideCharToMultiByte(CP_UTF8, - 0, - utf16, - utf16len, - NULL, - 0, - NULL, - NULL); - - if (bufsize == 0) - return uv_translate_sys_error(GetLastError()); - - /* Allocate the destination buffer adding an extra byte for the terminating - * NULL. If utf16len is not -1 WideCharToMultiByte will not add it, so - * we do it ourselves always, just in case. */ - *utf8 = uv__malloc(bufsize + 1); - - if (*utf8 == NULL) - return UV_ENOMEM; - - /* Convert to UTF-8 */ - bufsize = WideCharToMultiByte(CP_UTF8, - 0, - utf16, - utf16len, - *utf8, - bufsize, - NULL, - NULL); - - if (bufsize == 0) { - uv__free(*utf8); - *utf8 = NULL; - return uv_translate_sys_error(GetLastError()); - } - - (*utf8)[bufsize] = '\0'; - return 0; + *utf8 = NULL; + return uv_utf16_to_wtf8(utf16, utf16len, utf8, &utf8_len); } /* * Converts a UTF-8 string into a UTF-16 one. The resulting string is * null-terminated. - * - * If utf8 is null terminated, utf8len can be set to -1, otherwise it must - * be specified. */ -int uv__convert_utf8_to_utf16(const char* utf8, int utf8len, WCHAR** utf16) { +int uv__convert_utf8_to_utf16(const char* utf8, WCHAR** utf16) { int bufsize; if (utf8 == NULL) return UV_EINVAL; - /* Check how much space we need */ - bufsize = MultiByteToWideChar(CP_UTF8, 0, utf8, utf8len, NULL, 0); - - if (bufsize == 0) - return uv_translate_sys_error(GetLastError()); + /* Check how much space we need (including NUL). */ + bufsize = uv_wtf8_length_as_utf16(utf8); + if (bufsize < 0) + return UV__EINVAL; - /* Allocate the destination buffer adding an extra byte for the terminating - * NULL. If utf8len is not -1 MultiByteToWideChar will not add it, so - * we do it ourselves always, just in case. */ - *utf16 = uv__malloc(sizeof(WCHAR) * (bufsize + 1)); + /* Allocate the destination buffer. */ + *utf16 = uv__malloc(sizeof(WCHAR) * bufsize); if (*utf16 == NULL) return UV_ENOMEM; /* Convert to UTF-16 */ - bufsize = MultiByteToWideChar(CP_UTF8, 0, utf8, utf8len, *utf16, bufsize); + uv_wtf8_to_utf16(utf8, *utf16, bufsize); - if (bufsize == 0) { - uv__free(*utf16); - *utf16 = NULL; - return uv_translate_sys_error(GetLastError()); - } - - (*utf16)[bufsize] = L'\0'; return 0; } +/* + * Converts a UTF-16 string into a UTF-8 one in an existing buffer. The + * resulting string is null-terminated. + * + * If utf16 is null terminated, utf16len can be set to -1, otherwise it must + * be specified. + */ +int uv__copy_utf16_to_utf8(const WCHAR* utf16buffer, size_t utf16len, char* utf8, size_t *size) { + int r; + + if (utf8 == NULL || size == NULL) + return UV_EINVAL; + + if (*size == 0) { + *size = uv_utf16_length_as_wtf8(utf16buffer, utf16len); + r = UV_ENOBUFS; + } else { + *size -= 1; /* Reserve space for NUL. */ + r = uv_utf16_to_wtf8(utf16buffer, utf16len, &utf8, size); + } + if (r == UV_ENOBUFS) + *size += 1; /* Add space for NUL. */ + return r; +} + + static int uv__getpwuid_r(uv_passwd_t* pwd) { HANDLE token; wchar_t username[UNLEN + 1]; @@ -1384,14 +1241,13 @@ int uv_os_getenv(const char* name, char* buffer, size_t* size) { wchar_t* var; DWORD varlen; wchar_t* name_w; - DWORD bufsize; size_t len; int r; if (name == NULL || buffer == NULL || size == NULL || *size == 0) return UV_EINVAL; - r = uv__convert_utf8_to_utf16(name, -1, &name_w); + r = uv__convert_utf8_to_utf16(name, &name_w); if (r != 0) return r; @@ -1432,35 +1288,7 @@ int uv_os_getenv(const char* name, char* buffer, size_t* size) { } } - /* Check how much space we need */ - bufsize = WideCharToMultiByte(CP_UTF8, 0, var, -1, NULL, 0, NULL, NULL); - - if (bufsize == 0) { - r = uv_translate_sys_error(GetLastError()); - goto fail; - } else if (bufsize > *size) { - *size = bufsize; - r = UV_ENOBUFS; - goto fail; - } - - /* Convert to UTF-8 */ - bufsize = WideCharToMultiByte(CP_UTF8, - 0, - var, - -1, - buffer, - *size, - NULL, - NULL); - - if (bufsize == 0) { - r = uv_translate_sys_error(GetLastError()); - goto fail; - } - - *size = bufsize - 1; - r = 0; + r = uv__copy_utf16_to_utf8(var, len, buffer, size); fail: @@ -1482,12 +1310,12 @@ int uv_os_setenv(const char* name, const char* value) { if (name == NULL || value == NULL) return UV_EINVAL; - r = uv__convert_utf8_to_utf16(name, -1, &name_w); + r = uv__convert_utf8_to_utf16(name, &name_w); if (r != 0) return r; - r = uv__convert_utf8_to_utf16(value, -1, &value_w); + r = uv__convert_utf8_to_utf16(value, &value_w); if (r != 0) { uv__free(name_w); @@ -1512,7 +1340,7 @@ int uv_os_unsetenv(const char* name) { if (name == NULL) return UV_EINVAL; - r = uv__convert_utf8_to_utf16(name, -1, &name_w); + r = uv__convert_utf8_to_utf16(name, &name_w); if (r != 0) return r; @@ -1529,9 +1357,6 @@ int uv_os_unsetenv(const char* name) { int uv_os_gethostname(char* buffer, size_t* size) { WCHAR buf[UV_MAXHOSTNAMESIZE]; - size_t len; - char* utf8_str; - int convert_result; if (buffer == NULL || size == NULL || *size == 0) return UV_EINVAL; @@ -1544,22 +1369,7 @@ int uv_os_gethostname(char* buffer, size_t* size) { if (pGetHostNameW(buf, UV_MAXHOSTNAMESIZE) != 0) return uv_translate_sys_error(WSAGetLastError()); - convert_result = uv__convert_utf16_to_utf8(buf, -1, &utf8_str); - - if (convert_result != 0) - return convert_result; - - len = strlen(utf8_str); - if (len >= *size) { - *size = len + 1; - uv__free(utf8_str); - return UV_ENOBUFS; - } - - memcpy(buffer, utf8_str, len + 1); - uv__free(utf8_str); - *size = len; - return 0; + return uv__copy_utf16_to_utf8(buf, -1, buffer, size); } @@ -1665,7 +1475,7 @@ int uv_os_uname(uv_utsname_t* buffer) { HKEY registry_key; WCHAR product_name_w[256]; DWORD product_name_w_size; - int version_size; + size_t version_size; int processor_level; int r; @@ -1696,7 +1506,7 @@ int uv_os_uname(uv_utsname_t* buffer) { r = RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion", 0, - KEY_QUERY_VALUE, + KEY_QUERY_VALUE | KEY_WOW64_64KEY, ®istry_key); if (r == ERROR_SUCCESS) { @@ -1727,37 +1537,29 @@ int uv_os_uname(uv_utsname_t* buffer) { } } - version_size = WideCharToMultiByte(CP_UTF8, - 0, - product_name_w, - -1, - buffer->version, - sizeof(buffer->version), - NULL, - NULL); - if (version_size == 0) { - r = uv_translate_sys_error(GetLastError()); + version_size = sizeof(buffer->version); + r = uv__copy_utf16_to_utf8(product_name_w, + -1, + buffer->version, + &version_size); + if (r) goto error; - } } } /* Append service pack information to the version if present. */ if (os_info.szCSDVersion[0] != L'\0') { if (version_size > 0) - buffer->version[version_size - 1] = ' '; - - if (WideCharToMultiByte(CP_UTF8, - 0, - os_info.szCSDVersion, - -1, - buffer->version + version_size, - sizeof(buffer->version) - version_size, - NULL, - NULL) == 0) { - r = uv_translate_sys_error(GetLastError()); + buffer->version[version_size++] = ' '; + + version_size = sizeof(buffer->version) - version_size; + r = uv__copy_utf16_to_utf8(os_info.szCSDVersion, + -1, + buffer->version + + sizeof(buffer->version) - version_size, + &version_size); + if (r) goto error; - } } /* Populate the sysname field. */ diff --git a/deps/uv/test/benchmark-async-pummel.c b/deps/uv/test/benchmark-async-pummel.c index bec91850616150..68864c842e5b09 100644 --- a/deps/uv/test/benchmark-async-pummel.c +++ b/deps/uv/test/benchmark-async-pummel.c @@ -71,21 +71,21 @@ static int test_async_pummel(int nthreads) { tids = calloc(nthreads, sizeof(tids[0])); ASSERT_NOT_NULL(tids); - ASSERT(0 == uv_async_init(uv_default_loop(), &handle, async_cb)); + ASSERT_OK(uv_async_init(uv_default_loop(), &handle, async_cb)); ACCESS_ONCE(const char*, handle.data) = running; for (i = 0; i < nthreads; i++) - ASSERT(0 == uv_thread_create(tids + i, pummel, &handle)); + ASSERT_OK(uv_thread_create(tids + i, pummel, &handle)); time = uv_hrtime(); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); time = uv_hrtime() - time; done = 1; for (i = 0; i < nthreads; i++) - ASSERT(0 == uv_thread_join(tids + i)); + ASSERT_OK(uv_thread_join(tids + i)); printf("async_pummel_%d: %s callbacks in %.2f seconds (%s/sec)\n", nthreads, diff --git a/deps/uv/test/benchmark-async.c b/deps/uv/test/benchmark-async.c index d4b7c8bd91482f..5544c46b3b28ff 100644 --- a/deps/uv/test/benchmark-async.c +++ b/deps/uv/test/benchmark-async.c @@ -43,7 +43,7 @@ struct ctx { static void worker_async_cb(uv_async_t* handle) { struct ctx* ctx = container_of(handle, struct ctx, worker_async); - ASSERT(0 == uv_async_send(&ctx->main_async)); + ASSERT_OK(uv_async_send(&ctx->main_async)); ctx->worker_sent++; ctx->worker_seen++; @@ -55,7 +55,7 @@ static void worker_async_cb(uv_async_t* handle) { static void main_async_cb(uv_async_t* handle) { struct ctx* ctx = container_of(handle, struct ctx, main_async); - ASSERT(0 == uv_async_send(&ctx->worker_async)); + ASSERT_OK(uv_async_send(&ctx->worker_async)); ctx->main_sent++; ctx->main_seen++; @@ -66,8 +66,8 @@ static void main_async_cb(uv_async_t* handle) { static void worker(void* arg) { struct ctx* ctx = arg; - ASSERT(0 == uv_async_send(&ctx->main_async)); - ASSERT(0 == uv_run(&ctx->loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_async_send(&ctx->main_async)); + ASSERT_OK(uv_run(&ctx->loop, UV_RUN_DEFAULT)); uv_loop_close(&ctx->loop); } @@ -85,29 +85,29 @@ static int test_async(int nthreads) { for (i = 0; i < nthreads; i++) { ctx = threads + i; ctx->nthreads = nthreads; - ASSERT(0 == uv_loop_init(&ctx->loop)); - ASSERT(0 == uv_async_init(&ctx->loop, &ctx->worker_async, worker_async_cb)); - ASSERT(0 == uv_async_init(uv_default_loop(), - &ctx->main_async, - main_async_cb)); - ASSERT(0 == uv_thread_create(&ctx->thread, worker, ctx)); + ASSERT_OK(uv_loop_init(&ctx->loop)); + ASSERT_OK(uv_async_init(&ctx->loop, &ctx->worker_async, worker_async_cb)); + ASSERT_OK(uv_async_init(uv_default_loop(), + &ctx->main_async, + main_async_cb)); + ASSERT_OK(uv_thread_create(&ctx->thread, worker, ctx)); } time = uv_hrtime(); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); for (i = 0; i < nthreads; i++) - ASSERT(0 == uv_thread_join(&threads[i].thread)); + ASSERT_OK(uv_thread_join(&threads[i].thread)); time = uv_hrtime() - time; for (i = 0; i < nthreads; i++) { ctx = threads + i; - ASSERT(ctx->worker_sent == NUM_PINGS); - ASSERT(ctx->worker_seen == NUM_PINGS); - ASSERT(ctx->main_sent == (unsigned int) NUM_PINGS); - ASSERT(ctx->main_seen == (unsigned int) NUM_PINGS); + ASSERT_EQ(ctx->worker_sent, NUM_PINGS); + ASSERT_EQ(ctx->worker_seen, NUM_PINGS); + ASSERT_EQ(ctx->main_sent, (unsigned int) NUM_PINGS); + ASSERT_EQ(ctx->main_seen, (unsigned int) NUM_PINGS); } printf("async%d: %.2f sec (%s/sec)\n", diff --git a/deps/uv/test/benchmark-getaddrinfo.c b/deps/uv/test/benchmark-getaddrinfo.c index 1ef7b1ef095937..cb4d2bc935a763 100644 --- a/deps/uv/test/benchmark-getaddrinfo.c +++ b/deps/uv/test/benchmark-getaddrinfo.c @@ -43,7 +43,7 @@ static void getaddrinfo_initiate(uv_getaddrinfo_t* handle); static void getaddrinfo_cb(uv_getaddrinfo_t* handle, int status, struct addrinfo* res) { - ASSERT(status == 0); + ASSERT_OK(status); calls_completed++; if (calls_initiated < TOTAL_CALLS) { getaddrinfo_initiate(handle); @@ -59,7 +59,7 @@ static void getaddrinfo_initiate(uv_getaddrinfo_t* handle) { calls_initiated++; r = uv_getaddrinfo(loop, handle, &getaddrinfo_cb, name, NULL, NULL); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -80,8 +80,8 @@ BENCHMARK_IMPL(getaddrinfo) { uv_update_time(loop); end_time = uv_now(loop); - ASSERT(calls_initiated == TOTAL_CALLS); - ASSERT(calls_completed == TOTAL_CALLS); + ASSERT_EQ(calls_initiated, TOTAL_CALLS); + ASSERT_EQ(calls_completed, TOTAL_CALLS); fprintf(stderr, "getaddrinfo: %.0f req/s\n", (double) calls_completed / (double) (end_time - start_time) * 1000.0); diff --git a/deps/uv/test/benchmark-loop-count.c b/deps/uv/test/benchmark-loop-count.c index 72f25b56ba5f31..0db4aa567a90f0 100644 --- a/deps/uv/test/benchmark-loop-count.c +++ b/deps/uv/test/benchmark-loop-count.c @@ -74,7 +74,7 @@ BENCHMARK_IMPL(loop_count) { uv_run(loop, UV_RUN_DEFAULT); ns = uv_hrtime() - ns; - ASSERT(ticks == NUM_TICKS); + ASSERT_UINT64_EQ(ticks, NUM_TICKS); fprintf(stderr, "loop_count: %d ticks in %.2fs (%.0f/s)\n", NUM_TICKS, diff --git a/deps/uv/test/benchmark-million-async.c b/deps/uv/test/benchmark-million-async.c index 30c21c38af15c4..13b52d488d0f5f 100644 --- a/deps/uv/test/benchmark-million-async.c +++ b/deps/uv/test/benchmark-million-async.c @@ -60,7 +60,7 @@ static void timer_cb(uv_timer_t* handle) { unsigned i; done = 1; - ASSERT(0 == uv_thread_join(&thread_id)); + ASSERT_OK(uv_thread_join(&thread_id)); for (i = 0; i < ARRAY_SIZE(container->async_handles); i++) { uv_async_t* handle = container->async_handles + i; @@ -93,14 +93,14 @@ BENCHMARK_IMPL(million_async) { for (i = 0; i < ARRAY_SIZE(container->async_handles); i++) { handle = container->async_handles + i; - ASSERT(0 == uv_async_init(loop, handle, async_cb)); + ASSERT_OK(uv_async_init(loop, handle, async_cb)); handle->data = NULL; } - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, timeout, 0)); - ASSERT(0 == uv_thread_create(&thread_id, thread_cb, NULL)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_timer_init(loop, &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, timeout, 0)); + ASSERT_OK(uv_thread_create(&thread_id, thread_cb, NULL)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); printf("%s async events in %.1f seconds (%s/s, %s unique handles seen)\n", fmt(&fmtbuf[0], container->async_events), timeout / 1000., diff --git a/deps/uv/test/benchmark-million-timers.c b/deps/uv/test/benchmark-million-timers.c index b35fd5e788224d..fd999c469766f2 100644 --- a/deps/uv/test/benchmark-million-timers.c +++ b/deps/uv/test/benchmark-million-timers.c @@ -57,22 +57,22 @@ BENCHMARK_IMPL(million_timers) { before_all = uv_hrtime(); for (i = 0; i < NUM_TIMERS; i++) { if (i % 1000 == 0) timeout++; - ASSERT(0 == uv_timer_init(loop, timers + i)); - ASSERT(0 == uv_timer_start(timers + i, timer_cb, timeout, 0)); + ASSERT_OK(uv_timer_init(loop, timers + i)); + ASSERT_OK(uv_timer_start(timers + i, timer_cb, timeout, 0)); } before_run = uv_hrtime(); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); after_run = uv_hrtime(); for (i = 0; i < NUM_TIMERS; i++) uv_close((uv_handle_t*) (timers + i), close_cb); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); after_all = uv_hrtime(); - ASSERT(timer_cb_called == NUM_TIMERS); - ASSERT(close_cb_called == NUM_TIMERS); + ASSERT_EQ(timer_cb_called, NUM_TIMERS); + ASSERT_EQ(close_cb_called, NUM_TIMERS); free(timers); fprintf(stderr, "%.2f seconds total\n", (after_all - before_all) / 1e9); diff --git a/deps/uv/test/benchmark-multi-accept.c b/deps/uv/test/benchmark-multi-accept.c index e2026276721b4e..1d19e330b2b7c7 100644 --- a/deps/uv/test/benchmark-multi-accept.c +++ b/deps/uv/test/benchmark-multi-accept.c @@ -117,19 +117,19 @@ static void ipc_connection_cb(uv_stream_t* ipc_pipe, int status) { ASSERT_NOT_NULL(pc); if (ipc_pipe->type == UV_TCP) - ASSERT(0 == uv_tcp_init(loop, (uv_tcp_t*) &pc->peer_handle)); + ASSERT_OK(uv_tcp_init(loop, (uv_tcp_t*) &pc->peer_handle)); else if (ipc_pipe->type == UV_NAMED_PIPE) - ASSERT(0 == uv_pipe_init(loop, (uv_pipe_t*) &pc->peer_handle, 1)); + ASSERT_OK(uv_pipe_init(loop, (uv_pipe_t*) &pc->peer_handle, 1)); else ASSERT(0); - ASSERT(0 == uv_accept(ipc_pipe, (uv_stream_t*) &pc->peer_handle)); - ASSERT(0 == uv_write2(&pc->write_req, - (uv_stream_t*) &pc->peer_handle, - &buf, - 1, - (uv_stream_t*) &sc->server_handle, - ipc_write_cb)); + ASSERT_OK(uv_accept(ipc_pipe, (uv_stream_t*) &pc->peer_handle)); + ASSERT_OK(uv_write2(&pc->write_req, + (uv_stream_t*) &pc->peer_handle, + &buf, + 1, + (uv_stream_t*) &sc->server_handle, + ipc_write_cb)); if (--sc->num_connects == 0) uv_close((uv_handle_t*) ipc_pipe, NULL); @@ -153,10 +153,10 @@ static void ipc_close_cb(uv_handle_t* handle) { static void ipc_connect_cb(uv_connect_t* req, int status) { struct ipc_client_ctx* ctx; ctx = container_of(req, struct ipc_client_ctx, connect_req); - ASSERT(0 == status); - ASSERT(0 == uv_read_start((uv_stream_t*) &ctx->ipc_pipe, - ipc_alloc_cb, - ipc_read_cb)); + ASSERT_OK(status); + ASSERT_OK(uv_read_start((uv_stream_t*) &ctx->ipc_pipe, + ipc_alloc_cb, + ipc_read_cb)); } @@ -182,16 +182,16 @@ static void ipc_read_cb(uv_stream_t* handle, ctx = container_of(ipc_pipe, struct ipc_client_ctx, ipc_pipe); loop = ipc_pipe->loop; - ASSERT(1 == uv_pipe_pending_count(ipc_pipe)); + ASSERT_EQ(1, uv_pipe_pending_count(ipc_pipe)); type = uv_pipe_pending_type(ipc_pipe); if (type == UV_TCP) - ASSERT(0 == uv_tcp_init(loop, (uv_tcp_t*) ctx->server_handle)); + ASSERT_OK(uv_tcp_init(loop, (uv_tcp_t*) ctx->server_handle)); else if (type == UV_NAMED_PIPE) - ASSERT(0 == uv_pipe_init(loop, (uv_pipe_t*) ctx->server_handle, 0)); + ASSERT_OK(uv_pipe_init(loop, (uv_pipe_t*) ctx->server_handle, 0)); else ASSERT(0); - ASSERT(0 == uv_accept(handle, ctx->server_handle)); + ASSERT_OK(uv_accept(handle, ctx->server_handle)); uv_close((uv_handle_t*) &ctx->ipc_pipe, NULL); } @@ -211,10 +211,10 @@ static void send_listen_handles(uv_handle_type type, ctx.num_connects = num_servers; if (type == UV_TCP) { - ASSERT(0 == uv_tcp_init(loop, (uv_tcp_t*) &ctx.server_handle)); - ASSERT(0 == uv_tcp_bind((uv_tcp_t*) &ctx.server_handle, - (const struct sockaddr*) &listen_addr, - 0)); + ASSERT_OK(uv_tcp_init(loop, (uv_tcp_t*) &ctx.server_handle)); + ASSERT_OK(uv_tcp_bind((uv_tcp_t*) &ctx.server_handle, + (const struct sockaddr*) &listen_addr, + 0)); } else ASSERT(0); @@ -223,16 +223,16 @@ static void send_listen_handles(uv_handle_type type, * If we accept a connection then the connected pipe must be initialized * with ipc=1. */ - ASSERT(0 == uv_pipe_init(loop, &ctx.ipc_pipe, 0)); - ASSERT(0 == uv_pipe_bind(&ctx.ipc_pipe, IPC_PIPE_NAME)); - ASSERT(0 == uv_listen((uv_stream_t*) &ctx.ipc_pipe, 128, ipc_connection_cb)); + ASSERT_OK(uv_pipe_init(loop, &ctx.ipc_pipe, 0)); + ASSERT_OK(uv_pipe_bind(&ctx.ipc_pipe, IPC_PIPE_NAME)); + ASSERT_OK(uv_listen((uv_stream_t*) &ctx.ipc_pipe, 128, ipc_connection_cb)); for (i = 0; i < num_servers; i++) uv_sem_post(&servers[i].semaphore); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); uv_close((uv_handle_t*) &ctx.server_handle, NULL); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); for (i = 0; i < num_servers; i++) uv_sem_wait(&servers[i].semaphore); @@ -245,12 +245,12 @@ static void get_listen_handle(uv_loop_t* loop, uv_stream_t* server_handle) { ctx.server_handle = server_handle; ctx.server_handle->data = "server handle"; - ASSERT(0 == uv_pipe_init(loop, &ctx.ipc_pipe, 1)); + ASSERT_OK(uv_pipe_init(loop, &ctx.ipc_pipe, 1)); uv_pipe_connect(&ctx.connect_req, &ctx.ipc_pipe, IPC_PIPE_NAME, ipc_connect_cb); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); } @@ -259,9 +259,9 @@ static void server_cb(void *arg) { uv_loop_t loop; ctx = arg; - ASSERT(0 == uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); - ASSERT(0 == uv_async_init(&loop, &ctx->async_handle, sv_async_cb)); + ASSERT_OK(uv_async_init(&loop, &ctx->async_handle, sv_async_cb)); uv_unref((uv_handle_t*) &ctx->async_handle); /* Wait until the main thread is ready. */ @@ -270,10 +270,10 @@ static void server_cb(void *arg) { uv_sem_post(&ctx->semaphore); /* Now start the actual benchmark. */ - ASSERT(0 == uv_listen((uv_stream_t*) &ctx->server_handle, - 128, - sv_connection_cb)); - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_listen((uv_stream_t*) &ctx->server_handle, + 128, + sv_connection_cb)); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); uv_loop_close(&loop); } @@ -292,20 +292,20 @@ static void sv_connection_cb(uv_stream_t* server_handle, int status) { struct server_ctx* ctx; ctx = container_of(server_handle, struct server_ctx, server_handle); - ASSERT(status == 0); + ASSERT_OK(status); storage = malloc(sizeof(*storage)); ASSERT_NOT_NULL(storage); if (server_handle->type == UV_TCP) - ASSERT(0 == uv_tcp_init(server_handle->loop, (uv_tcp_t*) storage)); + ASSERT_OK(uv_tcp_init(server_handle->loop, (uv_tcp_t*) storage)); else if (server_handle->type == UV_NAMED_PIPE) - ASSERT(0 == uv_pipe_init(server_handle->loop, (uv_pipe_t*) storage, 0)); + ASSERT_OK(uv_pipe_init(server_handle->loop, (uv_pipe_t*) storage, 0)); else ASSERT(0); - ASSERT(0 == uv_accept(server_handle, (uv_stream_t*) storage)); - ASSERT(0 == uv_read_start((uv_stream_t*) storage, sv_alloc_cb, sv_read_cb)); + ASSERT_OK(uv_accept(server_handle, (uv_stream_t*) storage)); + ASSERT_OK(uv_read_start((uv_stream_t*) storage, sv_alloc_cb, sv_read_cb)); ctx->num_connects++; } @@ -322,7 +322,7 @@ static void sv_alloc_cb(uv_handle_t* handle, static void sv_read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { - ASSERT(nread == UV_EOF); + ASSERT_EQ(nread, UV_EOF); uv_close((uv_handle_t*) handle, (uv_close_cb) free); } @@ -330,7 +330,7 @@ static void sv_read_cb(uv_stream_t* handle, static void cl_connect_cb(uv_connect_t* req, int status) { struct client_ctx* ctx = container_of(req, struct client_ctx, connect_req); uv_idle_start(&ctx->idle_handle, cl_idle_cb); - ASSERT(0 == status); + ASSERT_OK(status); } @@ -351,11 +351,11 @@ static void cl_close_cb(uv_handle_t* handle) { return; } - ASSERT(0 == uv_tcp_init(handle->loop, (uv_tcp_t*) &ctx->client_handle)); - ASSERT(0 == uv_tcp_connect(&ctx->connect_req, - (uv_tcp_t*) &ctx->client_handle, - (const struct sockaddr*) &listen_addr, - cl_connect_cb)); + ASSERT_OK(uv_tcp_init(handle->loop, (uv_tcp_t*) &ctx->client_handle)); + ASSERT_OK(uv_tcp_connect(&ctx->connect_req, + (uv_tcp_t*) &ctx->client_handle, + (const struct sockaddr*) &listen_addr, + cl_connect_cb)); } @@ -367,7 +367,7 @@ static int test_tcp(unsigned int num_servers, unsigned int num_clients) { unsigned int i; double time; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &listen_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &listen_addr)); loop = uv_default_loop(); servers = calloc(num_servers, sizeof(servers[0])); @@ -381,8 +381,8 @@ static int test_tcp(unsigned int num_servers, unsigned int num_clients) { */ for (i = 0; i < num_servers; i++) { struct server_ctx* ctx = servers + i; - ASSERT(0 == uv_sem_init(&ctx->semaphore, 0)); - ASSERT(0 == uv_thread_create(&ctx->thread_id, server_cb, ctx)); + ASSERT_OK(uv_sem_init(&ctx->semaphore, 0)); + ASSERT_OK(uv_thread_create(&ctx->thread_id, server_cb, ctx)); } send_listen_handles(UV_TCP, num_servers, servers); @@ -392,17 +392,17 @@ static int test_tcp(unsigned int num_servers, unsigned int num_clients) { ctx->num_connects = NUM_CONNECTS / num_clients; handle = (uv_tcp_t*) &ctx->client_handle; handle->data = "client handle"; - ASSERT(0 == uv_tcp_init(loop, handle)); - ASSERT(0 == uv_tcp_connect(&ctx->connect_req, - handle, - (const struct sockaddr*) &listen_addr, - cl_connect_cb)); - ASSERT(0 == uv_idle_init(loop, &ctx->idle_handle)); + ASSERT_OK(uv_tcp_init(loop, handle)); + ASSERT_OK(uv_tcp_connect(&ctx->connect_req, + handle, + (const struct sockaddr*) &listen_addr, + cl_connect_cb)); + ASSERT_OK(uv_idle_init(loop, &ctx->idle_handle)); } { uint64_t t = uv_hrtime(); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); t = uv_hrtime() - t; time = t / 1e9; } @@ -410,7 +410,7 @@ static int test_tcp(unsigned int num_servers, unsigned int num_clients) { for (i = 0; i < num_servers; i++) { struct server_ctx* ctx = servers + i; uv_async_send(&ctx->async_handle); - ASSERT(0 == uv_thread_join(&ctx->thread_id)); + ASSERT_OK(uv_thread_join(&ctx->thread_id)); uv_sem_destroy(&ctx->semaphore); } diff --git a/deps/uv/test/benchmark-ping-pongs.c b/deps/uv/test/benchmark-ping-pongs.c index 0357704e66e3c9..fd5f40b91030d6 100644 --- a/deps/uv/test/benchmark-ping-pongs.c +++ b/deps/uv/test/benchmark-ping-pongs.c @@ -90,7 +90,7 @@ static void pinger_close_cb(uv_handle_t* handle) { static void pinger_write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); free(req); } @@ -110,14 +110,14 @@ static void pinger_write_ping(pinger_t* pinger) { static void pinger_shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); pinger_shutdown_cb_called++; /* * The close callback has not been triggered yet. We must wait for EOF * until we close the connection. */ - ASSERT(completed_pingers == 0); + ASSERT_OK(completed_pingers); } @@ -130,13 +130,13 @@ static void pinger_read_cb(uv_stream_t* tcp, pinger = (pinger_t*)tcp->data; if (nread < 0) { - ASSERT(nread == UV_EOF); + ASSERT_EQ(nread, UV_EOF); if (buf->base) { buf_free(buf); } - ASSERT(pinger_shutdown_cb_called == 1); + ASSERT_EQ(1, pinger_shutdown_cb_called); uv_close((uv_handle_t*)tcp, pinger_close_cb); return; @@ -144,7 +144,7 @@ static void pinger_read_cb(uv_stream_t* tcp, /* Now we count the pings */ for (i = 0; i < nread; i++) { - ASSERT(buf->base[i] == PING[pinger->state]); + ASSERT_EQ(buf->base[i], PING[pinger->state]); pinger->state = (pinger->state + 1) % (sizeof(PING) - 1); if (pinger->state == 0) { pinger->pongs++; @@ -166,7 +166,7 @@ static void pinger_read_cb(uv_stream_t* tcp, static void pinger_connect_cb(uv_connect_t* req, int status) { pinger_t *pinger = (pinger_t*)req->handle->data; - ASSERT(status == 0); + ASSERT_OK(status); pinger_write_ping(pinger); @@ -182,8 +182,8 @@ static void pinger_new(void) { pinger_t *pinger; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &client_addr)); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", 0, &client_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); pinger = malloc(sizeof(*pinger)); pinger->state = 0; pinger->pongs = 0; @@ -194,9 +194,9 @@ static void pinger_new(void) { pinger->tcp.data = pinger; - ASSERT(0 == uv_tcp_bind(&pinger->tcp, - (const struct sockaddr*) &client_addr, - 0)); + ASSERT_OK(uv_tcp_bind(&pinger->tcp, + (const struct sockaddr*) &client_addr, + 0)); r = uv_tcp_connect(&pinger->connect_req, &pinger->tcp, @@ -214,7 +214,7 @@ BENCHMARK_IMPL(ping_pongs) { pinger_new(); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(completed_pingers == 1); + ASSERT_EQ(1, completed_pingers); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/benchmark-ping-udp.c b/deps/uv/test/benchmark-ping-udp.c index 3db8765bf9cf4c..2d2fe9c633926d 100644 --- a/deps/uv/test/benchmark-ping-udp.c +++ b/deps/uv/test/benchmark-ping-udp.c @@ -95,11 +95,11 @@ static void pinger_read_cb(uv_udp_t* udp, pinger = (pinger_t*)udp->data; /* No data here means something went wrong */ - ASSERT(nread > 0); + ASSERT_GT(nread, 0); /* Now we count the pings */ for (i = 0; i < nread; i++) { - ASSERT(buf->base[i] == PING[pinger->state]); + ASSERT_EQ(buf->base[i], PING[pinger->state]); pinger->state = (pinger->state + 1) % (sizeof(PING) - 1); if (pinger->state == 0) { pinger->pongs++; @@ -119,15 +119,15 @@ static void udp_pinger_new(void) { pinger_t* pinger = malloc(sizeof(*pinger)); int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &pinger->server_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &pinger->server_addr)); pinger->state = 0; pinger->pongs = 0; /* Try to do NUM_PINGS ping-pongs (connection-less). */ r = uv_udp_init(loop, &pinger->udp); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&pinger->udp, (const struct sockaddr*) &pinger->server_addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); pinger->udp.data = pinger; @@ -148,7 +148,7 @@ static int ping_udp(unsigned pingers) { udp_pinger_new(); } uv_run(loop, UV_RUN_DEFAULT); - ASSERT(completed_pingers >= 1); + ASSERT_GE(completed_pingers, 1); fprintf(stderr, "ping_pongs: %d pingers, ~ %lu roundtrips/s\n", completed_pingers, completed_pings / (TIME/1000)); diff --git a/deps/uv/test/benchmark-pound.c b/deps/uv/test/benchmark-pound.c index acfe4497a2ed48..83ce522779a28b 100644 --- a/deps/uv/test/benchmark-pound.c +++ b/deps/uv/test/benchmark-pound.c @@ -115,7 +115,7 @@ static void connect_cb(uv_connect_t* req, int status) { } ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); conn = (conn_rec*)req->data; ASSERT_NOT_NULL(conn); @@ -125,13 +125,13 @@ static void connect_cb(uv_connect_t* req, int status) { #endif r = uv_read_start(&conn->stream, alloc_cb, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); buf.base = buffer; buf.len = sizeof(buffer) - 1; r = uv_write(&conn->write_req, &conn->stream, &buf, 1, after_write); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -200,9 +200,9 @@ static void tcp_make_connect(conn_rec* p) { tp = (tcp_conn_rec*) p; r = uv_tcp_init(loop, (uv_tcp_t*)&p->stream); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_connect(&tp->conn_req, (uv_tcp_t*) &p->stream, @@ -227,7 +227,7 @@ static void pipe_make_connect(conn_rec* p) { int r; r = uv_pipe_init(loop, (uv_pipe_t*)&p->stream, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_pipe_connect(&((pipe_conn_rec*) p)->conn_req, (uv_pipe_t*) &p->stream, diff --git a/deps/uv/test/benchmark-pump.c b/deps/uv/test/benchmark-pump.c index 316c680996065e..8797668ee930ef 100644 --- a/deps/uv/test/benchmark-pump.c +++ b/deps/uv/test/benchmark-pump.c @@ -159,9 +159,9 @@ static void start_stats_collection(void) { /* Show-stats timer */ stats_left = STATS_COUNT; r = uv_timer_init(loop, &timer_handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer_handle, show_stats, STATS_INTERVAL, STATS_INTERVAL); - ASSERT(r == 0); + ASSERT_OK(r); uv_update_time(loop); start_time = uv_now(loop); @@ -170,7 +170,7 @@ static void start_stats_collection(void) { static void read_cb(uv_stream_t* stream, ssize_t bytes, const uv_buf_t* buf) { if (nrecv_total == 0) { - ASSERT(start_time == 0); + ASSERT_OK(start_time); uv_update_time(loop); start_time = uv_now(loop); } @@ -188,7 +188,7 @@ static void read_cb(uv_stream_t* stream, ssize_t bytes, const uv_buf_t* buf) { static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); req_free((uv_req_t*) req); @@ -209,7 +209,7 @@ static void do_write(uv_stream_t* stream) { req = (uv_write_t*) req_alloc(); r = uv_write(req, stream, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -220,7 +220,7 @@ static void connect_cb(uv_connect_t* req, int status) { fprintf(stderr, "%s", uv_strerror(status)); fflush(stderr); } - ASSERT(status == 0); + ASSERT_OK(status); write_sockets++; req_free((uv_req_t*) req); @@ -253,19 +253,19 @@ static void maybe_connect_some(void) { tcp = &tcp_write_handles[max_connect_socket++]; r = uv_tcp_init(loop, tcp); - ASSERT(r == 0); + ASSERT_OK(r); req = (uv_connect_t*) req_alloc(); r = uv_tcp_connect(req, tcp, (const struct sockaddr*) &connect_addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); } else { pipe = &pipe_write_handles[max_connect_socket++]; r = uv_pipe_init(loop, pipe, 0); - ASSERT(r == 0); + ASSERT_OK(r); req = (uv_connect_t*) req_alloc(); uv_pipe_connect(req, pipe, TEST_PIPENAME, connect_cb); @@ -278,24 +278,24 @@ static void connection_cb(uv_stream_t* s, int status) { uv_stream_t* stream; int r; - ASSERT(server == s); - ASSERT(status == 0); + ASSERT_PTR_EQ(server, s); + ASSERT_OK(status); if (type == TCP) { stream = (uv_stream_t*)malloc(sizeof(uv_tcp_t)); r = uv_tcp_init(loop, (uv_tcp_t*)stream); - ASSERT(r == 0); + ASSERT_OK(r); } else { stream = (uv_stream_t*)malloc(sizeof(uv_pipe_t)); r = uv_pipe_init(loop, (uv_pipe_t*)stream, 0); - ASSERT(r == 0); + ASSERT_OK(r); } r = uv_accept(s, stream); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start(stream, buf_alloc, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); read_sockets++; max_read_sockets++; @@ -379,16 +379,16 @@ HELPER_IMPL(tcp_pump_server) { type = TCP; loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &listen_addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &listen_addr)); /* Server */ server = (uv_stream_t*)&tcpServer; r = uv_tcp_init(loop, &tcpServer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&tcpServer, (const struct sockaddr*) &listen_addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&tcpServer, MAX_WRITE_HANDLES, connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); notify_parent_process(); uv_run(loop, UV_RUN_DEFAULT); @@ -406,11 +406,11 @@ HELPER_IMPL(pipe_pump_server) { /* Server */ server = (uv_stream_t*)&pipeServer; r = uv_pipe_init(loop, &pipeServer, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_bind(&pipeServer, TEST_PIPENAME); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&pipeServer, MAX_WRITE_HANDLES, connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); notify_parent_process(); uv_run(loop, UV_RUN_DEFAULT); @@ -421,13 +421,13 @@ HELPER_IMPL(pipe_pump_server) { static void tcp_pump(int n) { - ASSERT(n <= MAX_WRITE_HANDLES); + ASSERT_LE(n, MAX_WRITE_HANDLES); TARGET_CONNECTIONS = n; type = TCP; loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &connect_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &connect_addr)); /* Start making connections */ maybe_connect_some(); @@ -439,7 +439,7 @@ static void tcp_pump(int n) { static void pipe_pump(int n) { - ASSERT(n <= MAX_WRITE_HANDLES); + ASSERT_LE(n, MAX_WRITE_HANDLES); TARGET_CONNECTIONS = n; type = PIPE; diff --git a/deps/uv/test/benchmark-queue-work.c b/deps/uv/test/benchmark-queue-work.c index 6e7b74becf63b4..5ae0883101fed8 100644 --- a/deps/uv/test/benchmark-queue-work.c +++ b/deps/uv/test/benchmark-queue-work.c @@ -40,7 +40,7 @@ static void work_cb(uv_work_t* req) { static void after_work_cb(uv_work_t* req, int status) { events++; if (!done) - ASSERT_EQ(0, uv_queue_work(req->loop, req, work_cb, after_work_cb)); + ASSERT_OK(uv_queue_work(req->loop, req, work_cb, after_work_cb)); } static void timer_cb(uv_timer_t* handle) { done = 1; } @@ -55,11 +55,11 @@ BENCHMARK_IMPL(queue_work) { loop = uv_default_loop(); timeout = 5000; - ASSERT_EQ(0, uv_timer_init(loop, &timer_handle)); - ASSERT_EQ(0, uv_timer_start(&timer_handle, timer_cb, timeout, 0)); + ASSERT_OK(uv_timer_init(loop, &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, timeout, 0)); - ASSERT_EQ(0, uv_queue_work(loop, &work, work_cb, after_work_cb)); - ASSERT_EQ(0, uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_queue_work(loop, &work, work_cb, after_work_cb)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); printf("%s async jobs in %.1f seconds (%s/s)\n", fmt(&fmtbuf[0], events), diff --git a/deps/uv/test/benchmark-spawn.c b/deps/uv/test/benchmark-spawn.c index bdaf6c1a254e19..ef27b385e7a04f 100644 --- a/deps/uv/test/benchmark-spawn.c +++ b/deps/uv/test/benchmark-spawn.c @@ -58,7 +58,7 @@ static void maybe_spawn(void) { static void process_close_cb(uv_handle_t* handle) { - ASSERT(process_open == 1); + ASSERT_EQ(1, process_open); process_open = 0; maybe_spawn(); } @@ -67,8 +67,8 @@ static void process_close_cb(uv_handle_t* handle) { static void exit_cb(uv_process_t* process, int64_t exit_status, int term_signal) { - ASSERT(exit_status == 42); - ASSERT(term_signal == 0); + ASSERT_EQ(42, exit_status); + ASSERT_OK(term_signal); uv_close((uv_handle_t*)process, process_close_cb); } @@ -82,7 +82,7 @@ static void on_alloc(uv_handle_t* handle, static void pipe_close_cb(uv_handle_t* pipe) { - ASSERT(pipe_open == 1); + ASSERT_EQ(1, pipe_open); pipe_open = 0; maybe_spawn(); } @@ -90,7 +90,7 @@ static void pipe_close_cb(uv_handle_t* pipe) { static void on_read(uv_stream_t* pipe, ssize_t nread, const uv_buf_t* buf) { if (nread > 0) { - ASSERT(pipe_open == 1); + ASSERT_EQ(1, pipe_open); output_used += nread; } else if (nread < 0) { if (nread == UV_EOF) { @@ -104,8 +104,8 @@ static void spawn(void) { uv_stdio_container_t stdio[2]; int r; - ASSERT(process_open == 0); - ASSERT(pipe_open == 0); + ASSERT_OK(process_open); + ASSERT_OK(pipe_open); args[0] = exepath; args[1] = "spawn_helper"; @@ -123,14 +123,14 @@ static void spawn(void) { options.stdio[1].data.stream = (uv_stream_t*)&out; r = uv_spawn(loop, &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); process_open = 1; pipe_open = 1; output_used = 0; r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -141,7 +141,7 @@ BENCHMARK_IMPL(spawn) { loop = uv_default_loop(); r = uv_exepath(exepath, &exepath_size); - ASSERT(r == 0); + ASSERT_OK(r); exepath[exepath_size] = '\0'; uv_update_time(loop); @@ -150,7 +150,7 @@ BENCHMARK_IMPL(spawn) { spawn(); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); uv_update_time(loop); end_time = uv_now(loop); diff --git a/deps/uv/test/benchmark-tcp-write-batch.c b/deps/uv/test/benchmark-tcp-write-batch.c index aedefb742559c5..9dfcf14eb09e16 100644 --- a/deps/uv/test/benchmark-tcp-write-batch.c +++ b/deps/uv/test/benchmark-tcp-write-batch.c @@ -55,16 +55,16 @@ static void connect_cb(uv_connect_t* req, int status) { int i; int r; - ASSERT(req->handle == (uv_stream_t*)&tcp_client); + ASSERT_PTR_EQ(req->handle, (uv_stream_t*)&tcp_client); for (i = 0; i < NUM_WRITE_REQS; i++) { w = &write_reqs[i]; r = uv_write(&w->req, req->handle, &w->buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } r = uv_shutdown(&shutdown_req, req->handle, shutdown_cb); - ASSERT(r == 0); + ASSERT_OK(r); connect_cb_called++; } @@ -72,14 +72,14 @@ static void connect_cb(uv_connect_t* req, int status) { static void write_cb(uv_write_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); write_cb_called++; } static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(req->handle == (uv_stream_t*)&tcp_client); - ASSERT(req->handle->write_queue_size == 0); + ASSERT_PTR_EQ(req->handle, (uv_stream_t*)&tcp_client); + ASSERT_OK(req->handle->write_queue_size); uv_close((uv_handle_t*)req->handle, close_cb); free(write_reqs); @@ -89,7 +89,7 @@ static void shutdown_cb(uv_shutdown_t* req, int status) { static void close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*)&tcp_client); + ASSERT_PTR_EQ(handle, (uv_handle_t*)&tcp_client); close_cb_called++; } @@ -112,28 +112,28 @@ BENCHMARK_IMPL(tcp_write_batch) { } loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init(loop, &tcp_client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &tcp_client, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); start = uv_hrtime(); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); stop = uv_hrtime(); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == NUM_WRITE_REQS); - ASSERT(shutdown_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(write_cb_called, NUM_WRITE_REQS); + ASSERT_EQ(1, shutdown_cb_called); + ASSERT_EQ(1, close_cb_called); printf("%ld write requests in %.2fs.\n", (long)NUM_WRITE_REQS, diff --git a/deps/uv/test/benchmark-thread.c b/deps/uv/test/benchmark-thread.c index b37a7fd6d01c92..b339e7caad920d 100644 --- a/deps/uv/test/benchmark-thread.c +++ b/deps/uv/test/benchmark-thread.c @@ -31,7 +31,7 @@ static volatile int num_threads; static void thread_entry(void* arg) { - ASSERT(arg == (void *) 42); + ASSERT_PTR_EQ(arg, (void *) 42); num_threads++; /* FIXME write barrier? */ } @@ -47,15 +47,15 @@ BENCHMARK_IMPL(thread_create) { for (i = 0; i < NUM_THREADS; i++) { r = uv_thread_create(&tid, thread_entry, (void *) 42); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_thread_join(&tid); - ASSERT(r == 0); + ASSERT_OK(r); } duration = (uv_hrtime() - start_time) / 1e9; - ASSERT(num_threads == NUM_THREADS); + ASSERT_EQ(num_threads, NUM_THREADS); printf("%d threads created in %.2f seconds (%.0f/s)\n", NUM_THREADS, duration, NUM_THREADS / duration); diff --git a/deps/uv/test/benchmark-udp-pummel.c b/deps/uv/test/benchmark-udp-pummel.c index f89913b6cebad0..7b7e1afad7d491 100644 --- a/deps/uv/test/benchmark-udp-pummel.c +++ b/deps/uv/test/benchmark-udp-pummel.c @@ -63,7 +63,7 @@ static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { static char slab[65536]; - ASSERT(suggested_size <= sizeof(slab)); + ASSERT_LE(suggested_size, sizeof(slab)); buf->base = slab; buf->len = sizeof(slab); } @@ -75,7 +75,7 @@ static void send_cb(uv_udp_send_t* req, int status) { ASSERT_NOT_NULL(req); if (status != 0) { - ASSERT(status == UV_ECANCELED); + ASSERT_EQ(status, UV_ECANCELED); return; } @@ -83,7 +83,7 @@ static void send_cb(uv_udp_send_t* req, int status) { return; s = container_of(req, struct sender_state, send_req); - ASSERT(req->handle == &s->udp_handle); + ASSERT_PTR_EQ(req->handle, &s->udp_handle); if (timed) goto send; @@ -96,12 +96,12 @@ static void send_cb(uv_udp_send_t* req, int status) { packet_counter--; send: - ASSERT(0 == uv_udp_send(&s->send_req, - &s->udp_handle, - bufs, - ARRAY_SIZE(bufs), - (const struct sockaddr*) &s->addr, - send_cb)); + ASSERT_OK(uv_udp_send(&s->send_req, + &s->udp_handle, + bufs, + ARRAY_SIZE(bufs), + (const struct sockaddr*) &s->addr, + send_cb)); send_cb_called++; } @@ -115,11 +115,11 @@ static void recv_cb(uv_udp_t* handle, return; if (nread < 0) { - ASSERT(nread == UV_ECANCELED); + ASSERT_EQ(nread, UV_ECANCELED); return; } - ASSERT(addr->sa_family == AF_INET); + ASSERT_EQ(addr->sa_family, AF_INET); ASSERT(!memcmp(buf->base, EXPECTED, nread)); recv_cb_called++; @@ -153,8 +153,8 @@ static int pummel(unsigned int n_senders, uv_loop_t* loop; unsigned int i; - ASSERT(n_senders <= ARRAY_SIZE(senders)); - ASSERT(n_receivers <= ARRAY_SIZE(receivers)); + ASSERT_LE(n_senders, ARRAY_SIZE(senders)); + ASSERT_LE(n_receivers, ARRAY_SIZE(receivers)); loop = uv_default_loop(); @@ -162,8 +162,8 @@ static int pummel(unsigned int n_senders, n_receivers_ = n_receivers; if (timeout) { - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timeout_cb, timeout, 0)); + ASSERT_OK(uv_timer_init(loop, &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, timeout_cb, timeout, 0)); /* Timer should not keep loop alive. */ uv_unref((uv_handle_t*)&timer_handle); timed = 1; @@ -172,10 +172,10 @@ static int pummel(unsigned int n_senders, for (i = 0; i < n_receivers; i++) { struct receiver_state* s = receivers + i; struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("0.0.0.0", BASE_PORT + i, &addr)); - ASSERT(0 == uv_udp_init(loop, &s->udp_handle)); - ASSERT(0 == uv_udp_bind(&s->udp_handle, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_udp_recv_start(&s->udp_handle, alloc_cb, recv_cb)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", BASE_PORT + i, &addr)); + ASSERT_OK(uv_udp_init(loop, &s->udp_handle)); + ASSERT_OK(uv_udp_bind(&s->udp_handle, (const struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_udp_recv_start(&s->udp_handle, alloc_cb, recv_cb)); uv_unref((uv_handle_t*)&s->udp_handle); } @@ -187,20 +187,20 @@ static int pummel(unsigned int n_senders, for (i = 0; i < n_senders; i++) { struct sender_state* s = senders + i; - ASSERT(0 == uv_ip4_addr("127.0.0.1", - BASE_PORT + (i % n_receivers), - &s->addr)); - ASSERT(0 == uv_udp_init(loop, &s->udp_handle)); - ASSERT(0 == uv_udp_send(&s->send_req, - &s->udp_handle, - bufs, - ARRAY_SIZE(bufs), - (const struct sockaddr*) &s->addr, - send_cb)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", + BASE_PORT + (i % n_receivers), + &s->addr)); + ASSERT_OK(uv_udp_init(loop, &s->udp_handle)); + ASSERT_OK(uv_udp_send(&s->send_req, + &s->udp_handle, + bufs, + ARRAY_SIZE(bufs), + (const struct sockaddr*) &s->addr, + send_cb)); } duration = uv_hrtime(); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); duration = uv_hrtime() - duration; /* convert from nanoseconds to milliseconds */ duration = duration / (uint64_t) 1e6; diff --git a/deps/uv/test/blackhole-server.c b/deps/uv/test/blackhole-server.c index 0a8758e1a1733b..79d6146f47920d 100644 --- a/deps/uv/test/blackhole-server.c +++ b/deps/uv/test/blackhole-server.c @@ -43,20 +43,20 @@ static void connection_cb(uv_stream_t* stream, int status) { conn_rec* conn; int r; - ASSERT(status == 0); - ASSERT(stream == (uv_stream_t*)&tcp_server); + ASSERT_OK(status); + ASSERT_PTR_EQ(stream, (uv_stream_t*)&tcp_server); conn = malloc(sizeof *conn); ASSERT_NOT_NULL(conn); r = uv_tcp_init(stream->loop, &conn->handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_accept(stream, (uv_stream_t*)&conn->handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*)&conn->handle, alloc_cb, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -76,12 +76,12 @@ static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { if (nread >= 0) return; - ASSERT(nread == UV_EOF); + ASSERT_EQ(nread, UV_EOF); conn = container_of(stream, conn_rec, handle); r = uv_shutdown(&conn->shutdown_req, stream, shutdown_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -103,16 +103,16 @@ HELPER_IMPL(tcp4_blackhole_server) { int r; loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init(loop, &tcp_server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&tcp_server, 128, connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); notify_parent_process(); r = uv_run(loop, UV_RUN_DEFAULT); diff --git a/deps/uv/test/echo-server.c b/deps/uv/test/echo-server.c index 058c9925475c94..572f87df51ed7f 100644 --- a/deps/uv/test/echo-server.c +++ b/deps/uv/test/echo-server.c @@ -65,14 +65,14 @@ static void after_write(uv_write_t* req, int status) { static void after_shutdown(uv_shutdown_t* req, int status) { - ASSERT_EQ(status, 0); + ASSERT_OK(status); uv_close((uv_handle_t*) req->handle, on_close); free(req); } static void on_shutdown(uv_shutdown_t* req, int status) { - ASSERT_EQ(status, 0); + ASSERT_OK(status); free(req); } @@ -92,7 +92,7 @@ static void after_read(uv_stream_t* handle, free(buf->base); sreq = malloc(sizeof* sreq); if (uv_is_writable(handle)) { - ASSERT_EQ(0, uv_shutdown(sreq, handle, after_shutdown)); + ASSERT_OK(uv_shutdown(sreq, handle, after_shutdown)); } return; } @@ -118,7 +118,7 @@ static void after_read(uv_stream_t* handle, if (i + 2 < nread && buf->base[i + 2] == 'H') reset = 1; if (reset && handle->type == UV_TCP) - ASSERT_EQ(0, uv_tcp_close_reset((uv_tcp_t*) handle, on_close)); + ASSERT_OK(uv_tcp_close_reset((uv_tcp_t*) handle, on_close)); else if (shutdown) break; else @@ -141,7 +141,7 @@ static void after_read(uv_stream_t* handle, } if (shutdown) - ASSERT_EQ(0, uv_shutdown(malloc(sizeof* sreq), handle, on_shutdown)); + ASSERT_OK(uv_shutdown(malloc(sizeof* sreq), handle, on_shutdown)); } @@ -173,21 +173,21 @@ static void on_connection(uv_stream_t* server, int status) { if (status != 0) { fprintf(stderr, "Connect error %s\n", uv_err_name(status)); } - ASSERT(status == 0); + ASSERT_OK(status); switch (serverType) { case TCP: stream = malloc(sizeof(uv_tcp_t)); ASSERT_NOT_NULL(stream); r = uv_tcp_init(loop, (uv_tcp_t*)stream); - ASSERT(r == 0); + ASSERT_OK(r); break; case PIPE: stream = malloc(sizeof(uv_pipe_t)); ASSERT_NOT_NULL(stream); r = uv_pipe_init(loop, (uv_pipe_t*)stream, 0); - ASSERT(r == 0); + ASSERT_OK(r); break; default: @@ -199,15 +199,15 @@ static void on_connection(uv_stream_t* server, int status) { stream->data = server; r = uv_accept(server, stream); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start(stream, echo_alloc, after_read); - ASSERT(r == 0); + ASSERT_OK(r); } static void on_server_close(uv_handle_t* handle) { - ASSERT(handle == server); + ASSERT_PTR_EQ(handle, server); } static uv_udp_send_t* send_alloc(void) { @@ -221,7 +221,7 @@ static uv_udp_send_t* send_alloc(void) { static void on_send(uv_udp_send_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); req->data = send_freelist; send_freelist = req; } @@ -239,20 +239,20 @@ static void on_recv(uv_udp_t* handle, return; } - ASSERT(nread > 0); - ASSERT(addr->sa_family == AF_INET); + ASSERT_GT(nread, 0); + ASSERT_EQ(addr->sa_family, AF_INET); req = send_alloc(); ASSERT_NOT_NULL(req); sndbuf = uv_buf_init(rcvbuf->base, nread); - ASSERT(0 <= uv_udp_send(req, handle, &sndbuf, 1, addr, on_send)); + ASSERT_LE(0, uv_udp_send(req, handle, &sndbuf, 1, addr, on_send)); } static int tcp4_echo_start(int port) { struct sockaddr_in addr; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", port, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", port, &addr)); server = (uv_handle_t*)&tcpServer; serverType = TCP; @@ -286,7 +286,7 @@ static int tcp6_echo_start(int port) { struct sockaddr_in6 addr6; int r; - ASSERT(0 == uv_ip6_addr("::1", port, &addr6)); + ASSERT_OK(uv_ip6_addr("::1", port, &addr6)); server = (uv_handle_t*)&tcpServer; serverType = TCP; @@ -321,7 +321,7 @@ static int udp4_echo_start(int port) { struct sockaddr_in addr; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", port, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", port, &addr)); server = (uv_handle_t*)&udpServer; serverType = UDP; diff --git a/deps/uv/test/run-tests.c b/deps/uv/test/run-tests.c index d8cfe297c49524..97fec52f1d8b06 100644 --- a/deps/uv/test/run-tests.c +++ b/deps/uv/test/run-tests.c @@ -145,7 +145,7 @@ static int maybe_run_test(int argc, char **argv) { if (strcmp(argv[1], "spawn_helper3") == 0) { char buffer[256]; notify_parent_process(); - ASSERT(buffer == fgets(buffer, sizeof(buffer) - 1, stdin)); + ASSERT_PTR_EQ(buffer, fgets(buffer, sizeof(buffer) - 1, stdin)); buffer[sizeof(buffer) - 1] = '\0'; fputs(buffer, stdout); return 1; @@ -183,10 +183,10 @@ static int maybe_run_test(int argc, char **argv) { notify_parent_process(); r = fprintf(stdout, "hello world\n"); - ASSERT(r > 0); + ASSERT_GT(r, 0); r = fprintf(stderr, "hello errworld\n"); - ASSERT(r > 0); + ASSERT_GT(r, 0); return 1; } @@ -202,7 +202,7 @@ static int maybe_run_test(int argc, char **argv) { ASSERT_NOT_NULL(test); r = fprintf(stdout, "%s", test); - ASSERT(r > 0); + ASSERT_GT(r, 0); return 1; } @@ -216,23 +216,24 @@ static int maybe_run_test(int argc, char **argv) { sCompareObjectHandles pCompareObjectHandles; /* function introduced in Windows 10 */ #endif notify_parent_process(); - ASSERT(sizeof(closed_fd) == read(0, &closed_fd, sizeof(closed_fd))); - ASSERT(sizeof(open_fd) == read(0, &open_fd, sizeof(open_fd))); + ASSERT_EQ(sizeof(closed_fd), read(0, &closed_fd, sizeof(closed_fd))); + ASSERT_EQ(sizeof(open_fd), read(0, &open_fd, sizeof(open_fd))); #ifdef _WIN32 - ASSERT((intptr_t) closed_fd > 0); - ASSERT((intptr_t) open_fd > 0); - ASSERT(0 != GetHandleInformation(open_fd, &flags)); + ASSERT_GT((intptr_t) closed_fd, 0); + ASSERT_GT((intptr_t) open_fd, 0); + ASSERT_NE(0, GetHandleInformation(open_fd, &flags)); kernelbase_module = GetModuleHandleA("kernelbase.dll"); pCompareObjectHandles = (sCompareObjectHandles) GetProcAddress(kernelbase_module, "CompareObjectHandles"); - ASSERT(pCompareObjectHandles == NULL || !pCompareObjectHandles(open_fd, closed_fd)); + ASSERT_NE(pCompareObjectHandles == NULL || \ + !pCompareObjectHandles(open_fd, closed_fd), 0); #else - ASSERT(open_fd > 2); - ASSERT(closed_fd > 2); + ASSERT_GT(open_fd, 2); + ASSERT_GT(closed_fd, 2); # if defined(__PASE__) /* On IBMi PASE, write() returns 1 */ - ASSERT(1 == write(closed_fd, "x", 1)); + ASSERT_EQ(1, write(closed_fd, "x", 1)); # else - ASSERT(-1 == write(closed_fd, "x", 1)); + ASSERT_EQ(-1, write(closed_fd, "x", 1)); # endif /* !__PASE__ */ #endif return 1; @@ -249,8 +250,8 @@ static int maybe_run_test(int argc, char **argv) { uv_uid_t uid = atoi(argv[2]); uv_gid_t gid = atoi(argv[3]); - ASSERT(uid == getuid()); - ASSERT(gid == getgid()); + ASSERT_EQ(uid, getuid()); + ASSERT_EQ(gid, getgid()); notify_parent_process(); return 1; diff --git a/deps/uv/test/runner-win.c b/deps/uv/test/runner-win.c index 8c2a00b8a620c2..61d6f1431be9e3 100644 --- a/deps/uv/test/runner-win.c +++ b/deps/uv/test/runner-win.c @@ -185,7 +185,7 @@ int process_wait(process_info_t *vec, int n, int timeout) { if (n == 0) return 0; - ASSERT(n <= MAXIMUM_WAIT_OBJECTS); + ASSERT_LE(n, MAXIMUM_WAIT_OBJECTS); for (i = 0; i < n; i++) handles[i] = vec[i].process; @@ -245,7 +245,7 @@ int process_read_last_line(process_info_t *p, DWORD start; OVERLAPPED overlapped; - ASSERT(buffer_len > 0); + ASSERT_GT(buffer_len, 0); size = GetFileSize(p->stdio_out, NULL); if (size == INVALID_FILE_SIZE) diff --git a/deps/uv/test/task.h b/deps/uv/test/task.h index fa6cc0ed535a5c..8b8353263da90f 100644 --- a/deps/uv/test/task.h +++ b/deps/uv/test/task.h @@ -244,13 +244,16 @@ typedef enum { #define ASSERT_PTR_NE(a, b) \ ASSERT_BASE(a, !=, b, void*, "p") +#define ASSERT_PTR_LT(a, b) \ + ASSERT_BASE(a, <, b, void*, "p") + /* This macro cleans up the event loop. This is used to avoid valgrind * warnings about memory being "leaked" by the event loop. */ #define MAKE_VALGRIND_HAPPY(loop) \ do { \ close_loop(loop); \ - ASSERT(0 == uv_loop_close(loop)); \ + ASSERT_EQ(0, uv_loop_close(loop)); \ uv_library_shutdown(); \ } while (0) diff --git a/deps/uv/test/test-active.c b/deps/uv/test/test-active.c index aaff97087b190d..fadbd10d228db8 100644 --- a/deps/uv/test/test-active.c +++ b/deps/uv/test/test-active.c @@ -45,39 +45,39 @@ TEST_IMPL(active) { uv_timer_t timer; r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); + ASSERT_OK(r); /* uv_is_active() and uv_is_closing() should always return either 0 or 1. */ - ASSERT(0 == uv_is_active((uv_handle_t*) &timer)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &timer)); + ASSERT_OK(uv_is_active((uv_handle_t*) &timer)); + ASSERT_OK(uv_is_closing((uv_handle_t*) &timer)); r = uv_timer_start(&timer, timer_cb, 1000, 0); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(1 == uv_is_active((uv_handle_t*) &timer)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &timer)); + ASSERT_EQ(1, uv_is_active((uv_handle_t*) &timer)); + ASSERT_OK(uv_is_closing((uv_handle_t*) &timer)); r = uv_timer_stop(&timer); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_is_active((uv_handle_t*) &timer)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &timer)); + ASSERT_OK(uv_is_active((uv_handle_t*) &timer)); + ASSERT_OK(uv_is_closing((uv_handle_t*) &timer)); r = uv_timer_start(&timer, timer_cb, 1000, 0); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(1 == uv_is_active((uv_handle_t*) &timer)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &timer)); + ASSERT_EQ(1, uv_is_active((uv_handle_t*) &timer)); + ASSERT_OK(uv_is_closing((uv_handle_t*) &timer)); uv_close((uv_handle_t*) &timer, close_cb); - ASSERT(0 == uv_is_active((uv_handle_t*) &timer)); - ASSERT(1 == uv_is_closing((uv_handle_t*) &timer)); + ASSERT_OK(uv_is_active((uv_handle_t*) &timer)); + ASSERT_EQ(1, uv_is_closing((uv_handle_t*) &timer)); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-async-null-cb.c b/deps/uv/test/test-async-null-cb.c index 1bdd0e032497a9..ac9fc899c7aa4b 100644 --- a/deps/uv/test/test-async-null-cb.c +++ b/deps/uv/test/test-async-null-cb.c @@ -36,7 +36,7 @@ static void thread_cb(void* dummy) { static void check_cb(uv_check_t* handle) { - ASSERT(check_cb_called == 0); + ASSERT_OK(check_cb_called); uv_close((uv_handle_t*) &async_handle, NULL); uv_close((uv_handle_t*) &check_handle, NULL); check_cb_called++; @@ -52,13 +52,13 @@ TEST_IMPL(async_null_cb) { */ memset(&async_handle, 0xff, sizeof(async_handle)); - ASSERT(0 == uv_async_init(uv_default_loop(), &async_handle, NULL)); - ASSERT(0 == uv_check_init(uv_default_loop(), &check_handle)); - ASSERT(0 == uv_check_start(&check_handle, check_cb)); - ASSERT(0 == uv_thread_create(&thread, thread_cb, NULL)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == uv_thread_join(&thread)); - ASSERT(1 == check_cb_called); + ASSERT_OK(uv_async_init(uv_default_loop(), &async_handle, NULL)); + ASSERT_OK(uv_check_init(uv_default_loop(), &check_handle)); + ASSERT_OK(uv_check_start(&check_handle, check_cb)); + ASSERT_OK(uv_thread_create(&thread, thread_cb, NULL)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_thread_join(&thread)); + ASSERT_EQ(1, check_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; } diff --git a/deps/uv/test/test-async.c b/deps/uv/test/test-async.c index 73664ea5d67efa..935436ec0930b4 100644 --- a/deps/uv/test/test-async.c +++ b/deps/uv/test/test-async.c @@ -49,7 +49,7 @@ static void thread_cb(void *arg) { } r = uv_async_send(&async); - ASSERT(r == 0); + ASSERT_OK(r); /* Work around a bug in Valgrind. * @@ -78,7 +78,7 @@ static void close_cb(uv_handle_t* handle) { static void async_cb(uv_async_t* handle) { int n; - ASSERT(handle == &async); + ASSERT_PTR_EQ(handle, &async); uv_mutex_lock(&mutex); n = ++async_cb_called; @@ -94,13 +94,13 @@ static void async_cb(uv_async_t* handle) { static void prepare_cb(uv_prepare_t* handle) { int r; - ASSERT(handle == &prepare); + ASSERT_PTR_EQ(handle, &prepare); if (prepare_cb_called++) return; r = uv_thread_create(&thread, thread_cb, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_mutex_unlock(&mutex); } @@ -109,25 +109,25 @@ TEST_IMPL(async) { int r; r = uv_mutex_init(&mutex); - ASSERT(r == 0); + ASSERT_OK(r); uv_mutex_lock(&mutex); r = uv_prepare_init(uv_default_loop(), &prepare); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_prepare_start(&prepare, prepare_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_async_init(uv_default_loop(), &async, async_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(prepare_cb_called > 0); - ASSERT(async_cb_called == 3); - ASSERT(close_cb_called == 2); + ASSERT_GT(prepare_cb_called, 0); + ASSERT_EQ(3, async_cb_called); + ASSERT_EQ(2, close_cb_called); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-barrier.c b/deps/uv/test/test-barrier.c index c780f0cf2dd48b..5e904c40bc4f05 100644 --- a/deps/uv/test/test-barrier.c +++ b/deps/uv/test/test-barrier.c @@ -53,13 +53,13 @@ TEST_IMPL(barrier_1) { memset(&wc, 0, sizeof(wc)); wc.niter = 1; - ASSERT_EQ(0, uv_barrier_init(&wc.barrier, 2)); - ASSERT_EQ(0, uv_thread_create(&thread, worker, &wc)); + ASSERT_OK(uv_barrier_init(&wc.barrier, 2)); + ASSERT_OK(uv_thread_create(&thread, worker, &wc)); uv_sleep(100); wc.main_barrier_wait_rval = uv_barrier_wait(&wc.barrier); - ASSERT_EQ(0, uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); uv_barrier_destroy(&wc.barrier); ASSERT_EQ(1, (wc.main_barrier_wait_rval ^ wc.worker_barrier_wait_rval)); @@ -76,12 +76,12 @@ TEST_IMPL(barrier_2) { wc.delay = 100; wc.niter = 1; - ASSERT_EQ(0, uv_barrier_init(&wc.barrier, 2)); - ASSERT_EQ(0, uv_thread_create(&thread, worker, &wc)); + ASSERT_OK(uv_barrier_init(&wc.barrier, 2)); + ASSERT_OK(uv_thread_create(&thread, worker, &wc)); wc.main_barrier_wait_rval = uv_barrier_wait(&wc.barrier); - ASSERT_EQ(0, uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); uv_barrier_destroy(&wc.barrier); ASSERT_EQ(1, (wc.main_barrier_wait_rval ^ wc.worker_barrier_wait_rval)); @@ -98,13 +98,13 @@ TEST_IMPL(barrier_3) { memset(&wc, 0, sizeof(wc)); wc.niter = 5; - ASSERT_EQ(0, uv_barrier_init(&wc.barrier, 2)); - ASSERT_EQ(0, uv_thread_create(&thread, worker, &wc)); + ASSERT_OK(uv_barrier_init(&wc.barrier, 2)); + ASSERT_OK(uv_thread_create(&thread, worker, &wc)); for (i = 0; i < wc.niter; i++) wc.main_barrier_wait_rval += uv_barrier_wait(&wc.barrier); - ASSERT_EQ(0, uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); uv_barrier_destroy(&wc.barrier); ASSERT_EQ(wc.niter, wc.main_barrier_wait_rval + wc.worker_barrier_wait_rval); @@ -133,10 +133,10 @@ TEST_IMPL(barrier_serial_thread) { uv_barrier_t barrier; unsigned i; - ASSERT_EQ(0, uv_barrier_init(&barrier, ARRAY_SIZE(threads) + 1)); + ASSERT_OK(uv_barrier_init(&barrier, ARRAY_SIZE(threads) + 1)); for (i = 0; i < ARRAY_SIZE(threads); ++i) - ASSERT_EQ(0, uv_thread_create(&threads[i], serial_worker, &barrier)); + ASSERT_OK(uv_thread_create(&threads[i], serial_worker, &barrier)); for (i = 0; i < 5; i++) uv_barrier_wait(&barrier); @@ -144,7 +144,7 @@ TEST_IMPL(barrier_serial_thread) { uv_barrier_destroy(&barrier); for (i = 0; i < ARRAY_SIZE(threads); ++i) - ASSERT_EQ(0, uv_thread_join(&threads[i])); + ASSERT_OK(uv_thread_join(&threads[i])); return 0; } @@ -153,7 +153,7 @@ TEST_IMPL(barrier_serial_thread) { TEST_IMPL(barrier_serial_thread_single) { uv_barrier_t barrier; - ASSERT_EQ(0, uv_barrier_init(&barrier, 1)); + ASSERT_OK(uv_barrier_init(&barrier, 1)); ASSERT_LT(0, uv_barrier_wait(&barrier)); uv_barrier_destroy(&barrier); return 0; diff --git a/deps/uv/test/test-callback-stack.c b/deps/uv/test/test-callback-stack.c index 5dad8d75d2aa9a..dfd102c0247cde 100644 --- a/deps/uv/test/test-callback-stack.c +++ b/deps/uv/test/test-callback-stack.c @@ -60,7 +60,7 @@ static void close_cb(uv_handle_t* handle) { static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); ASSERT(nested == 0 && "shutdown_cb must be called from a fresh stack"); shutdown_cb_called++; @@ -77,7 +77,7 @@ static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { return; } else if (nread < 0) { - ASSERT(nread == UV_EOF); + ASSERT_EQ(nread, UV_EOF); nested++; uv_close((uv_handle_t*)tcp, close_cb); @@ -105,7 +105,7 @@ static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer); + ASSERT_PTR_EQ(handle, &timer); ASSERT(nested == 0 && "timer_cb must be called from a fresh stack"); puts("Timeout complete. Now read data..."); @@ -125,7 +125,7 @@ static void timer_cb(uv_timer_t* handle) { static void write_cb(uv_write_t* req, int status) { int r; - ASSERT(status == 0); + ASSERT_OK(status); ASSERT(nested == 0 && "write_cb must be called from a fresh stack"); puts("Data written. 500ms timeout..."); @@ -136,9 +136,9 @@ static void write_cb(uv_write_t* req, int status) { * for the backend to use dirty stack for calling read_cb. */ nested++; r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, timer_cb, 500, 0); - ASSERT(r == 0); + ASSERT_OK(r); nested--; write_cb_called++; @@ -150,7 +150,7 @@ static void connect_cb(uv_connect_t* req, int status) { puts("Connected. Write some data to echo server..."); - ASSERT(status == 0); + ASSERT_OK(status); ASSERT(nested == 0 && "connect_cb must be called from a fresh stack"); nested++; @@ -171,7 +171,7 @@ static void connect_cb(uv_connect_t* req, int status) { TEST_IMPL(callback_stack) { struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); if (uv_tcp_init(uv_default_loop(), &client)) { FATAL("uv_tcp_init failed"); @@ -191,13 +191,18 @@ TEST_IMPL(callback_stack) { uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(nested == 0); - ASSERT(connect_cb_called == 1 && "connect_cb must be called exactly once"); - ASSERT(write_cb_called == 1 && "write_cb must be called exactly once"); - ASSERT(timer_cb_called == 1 && "timer_cb must be called exactly once"); - ASSERT(bytes_received == sizeof MESSAGE); - ASSERT(shutdown_cb_called == 1 && "shutdown_cb must be called exactly once"); - ASSERT(close_cb_called == 2 && "close_cb must be called exactly twice"); + ASSERT_OK(nested); + ASSERT_NE(connect_cb_called == 1 && \ + "connect_cb must be called exactly once", 0); + ASSERT_NE(write_cb_called == 1 && "write_cb must be called exactly once", + 0); + ASSERT_NE(timer_cb_called == 1 && "timer_cb must be called exactly once", + 0); + ASSERT_EQ(bytes_received, sizeof MESSAGE); + ASSERT_NE(shutdown_cb_called == 1 && \ + "shutdown_cb must be called exactly once", 0); + ASSERT_NE(close_cb_called == 2 && "close_cb must be called exactly twice", + 0); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-close-fd.c b/deps/uv/test/test-close-fd.c index d8e12653f77feb..c072fdbb79ac4c 100644 --- a/deps/uv/test/test-close-fd.c +++ b/deps/uv/test/test-close-fd.c @@ -36,11 +36,11 @@ static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { switch (++read_cb_called) { case 1: - ASSERT(nread == 1); + ASSERT_EQ(1, nread); uv_read_stop(handle); break; case 2: - ASSERT(nread == UV_EOF); + ASSERT_EQ(nread, UV_EOF); uv_close((uv_handle_t *) handle, NULL); break; default: @@ -55,29 +55,29 @@ TEST_IMPL(close_fd) { uv_file fd[2]; bufs[0] = uv_buf_init("", 1); - ASSERT(0 == uv_pipe(fd, 0, 0)); - ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0)); - ASSERT(0 == uv_pipe_open(&pipe_handle, fd[0])); + ASSERT_OK(uv_pipe(fd, 0, 0)); + ASSERT_OK(uv_pipe_init(uv_default_loop(), &pipe_handle, 0)); + ASSERT_OK(uv_pipe_open(&pipe_handle, fd[0])); /* uv_pipe_open() takes ownership of the file descriptor. */ fd[0] = -1; - ASSERT(1 == uv_fs_write(NULL, &req, fd[1], bufs, 1, -1, NULL)); - ASSERT(1 == req.result); + ASSERT_EQ(1, uv_fs_write(NULL, &req, fd[1], bufs, 1, -1, NULL)); + ASSERT_EQ(1, req.result); uv_fs_req_cleanup(&req); #ifdef _WIN32 - ASSERT(0 == _close(fd[1])); + ASSERT_OK(_close(fd[1])); #else - ASSERT(0 == close(fd[1])); + ASSERT_OK(close(fd[1])); #endif fd[1] = -1; - ASSERT(0 == uv_read_start((uv_stream_t *) &pipe_handle, alloc_cb, read_cb)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(1 == read_cb_called); - ASSERT(0 == uv_is_active((const uv_handle_t *) &pipe_handle)); - ASSERT(0 == uv_read_start((uv_stream_t *) &pipe_handle, alloc_cb, read_cb)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(2 == read_cb_called); - ASSERT(0 != uv_is_closing((const uv_handle_t *) &pipe_handle)); + ASSERT_OK(uv_read_start((uv_stream_t *) &pipe_handle, alloc_cb, read_cb)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_EQ(1, read_cb_called); + ASSERT_OK(uv_is_active((const uv_handle_t *) &pipe_handle)); + ASSERT_OK(uv_read_start((uv_stream_t *) &pipe_handle, alloc_cb, read_cb)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_EQ(2, read_cb_called); + ASSERT_NE(0, uv_is_closing((const uv_handle_t *) &pipe_handle)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-close-order.c b/deps/uv/test/test-close-order.c index 768e1ceedbe474..e1aae93b7a8fbf 100644 --- a/deps/uv/test/test-close-order.c +++ b/deps/uv/test/test-close-order.c @@ -39,9 +39,9 @@ static void close_cb(uv_handle_t* handle) { /* check_cb should run before any close_cb */ static void check_cb(uv_check_t* handle) { - ASSERT(check_cb_called == 0); - ASSERT(timer_cb_called == 1); - ASSERT(close_cb_called == 0); + ASSERT_OK(check_cb_called); + ASSERT_EQ(1, timer_cb_called); + ASSERT_OK(close_cb_called); uv_close((uv_handle_t*) handle, close_cb); uv_close((uv_handle_t*) &timer_handle2, close_cb); check_cb_called++; @@ -65,15 +65,15 @@ TEST_IMPL(close_order) { uv_timer_init(loop, &timer_handle2); uv_timer_start(&timer_handle2, timer_cb, 100000, 0); - ASSERT(check_cb_called == 0); - ASSERT(close_cb_called == 0); - ASSERT(timer_cb_called == 0); + ASSERT_OK(check_cb_called); + ASSERT_OK(close_cb_called); + ASSERT_OK(timer_cb_called); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(check_cb_called == 1); - ASSERT(close_cb_called == 3); - ASSERT(timer_cb_called == 1); + ASSERT_EQ(1, check_cb_called); + ASSERT_EQ(3, close_cb_called); + ASSERT_EQ(1, timer_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-condvar.c b/deps/uv/test/test-condvar.c index 61592d0e2d159a..2711f8cc1b3678 100644 --- a/deps/uv/test/test-condvar.c +++ b/deps/uv/test/test-condvar.c @@ -55,10 +55,10 @@ void worker_config_init(worker_config* wc, wc->use_broadcast = use_broadcast; /* Init. */ - ASSERT(0 == uv_sem_init(&wc->sem_waiting, 0)); - ASSERT(0 == uv_sem_init(&wc->sem_signaled, 0)); - ASSERT(0 == uv_cond_init(&wc->cond)); - ASSERT(0 == uv_mutex_init(&wc->mutex)); + ASSERT_OK(uv_sem_init(&wc->sem_waiting, 0)); + ASSERT_OK(uv_sem_init(&wc->sem_signaled, 0)); + ASSERT_OK(uv_cond_init(&wc->cond)); + ASSERT_OK(uv_mutex_init(&wc->mutex)); } void worker_config_destroy(worker_config* wc) { @@ -87,7 +87,7 @@ static void condvar_signal(worker_config* c, int* flag) { uv_mutex_lock(&c->mutex); /* Help waiter differentiate between spurious and legitimate wakeup. */ - ASSERT(*flag == 0); + ASSERT_OK(*flag); *flag = 1; if (c->use_broadcast) @@ -113,7 +113,7 @@ static int condvar_wait(worker_config* c, const int* flag) { do { uv_cond_wait(&c->cond, &c->mutex); } while (*flag == 0); - ASSERT(*flag == 1); + ASSERT_EQ(1, *flag); uv_mutex_unlock(&c->mutex); @@ -130,13 +130,13 @@ TEST_IMPL(condvar_1) { /* Helper signal-then-wait. */ worker_config_init(&wc, 0, condvar_signal, condvar_wait); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); + ASSERT_OK(uv_thread_create(&thread, worker, &wc)); /* We wait-then-signal. */ - ASSERT(0 == wc.wait_cond(&wc, &wc.posted_1)); + ASSERT_OK(wc.wait_cond(&wc, &wc.posted_1)); wc.signal_cond(&wc, &wc.posted_2); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); worker_config_destroy(&wc); return 0; @@ -149,13 +149,13 @@ TEST_IMPL(condvar_2) { /* Helper to signal-then-wait. */ worker_config_init(&wc, 1, condvar_signal, condvar_wait); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); + ASSERT_OK(uv_thread_create(&thread, worker, &wc)); /* We wait-then-signal. */ - ASSERT(0 == wc.wait_cond(&wc, &wc.posted_1)); + ASSERT_OK(wc.wait_cond(&wc, &wc.posted_1)); wc.signal_cond(&wc, &wc.posted_2); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); worker_config_destroy(&wc); return 0; @@ -176,9 +176,9 @@ static int condvar_timedwait(worker_config* c, const int* flag) { /* Wait until I get a non-spurious signal. */ do { r = uv_cond_timedwait(&c->cond, &c->mutex, (uint64_t)(1 * 1e9)); /* 1 s */ - ASSERT(r == 0); /* Should not time out. */ + ASSERT_OK(r); /* Should not time out. */ } while (*flag == 0); - ASSERT(*flag == 1); + ASSERT_EQ(1, *flag); uv_mutex_unlock(&c->mutex); @@ -194,13 +194,13 @@ TEST_IMPL(condvar_3) { /* Helper to signal-then-wait. */ worker_config_init(&wc, 0, condvar_signal, condvar_timedwait); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); + ASSERT_OK(uv_thread_create(&thread, worker, &wc)); /* We wait-then-signal. */ wc.wait_cond(&wc, &wc.posted_1); wc.signal_cond(&wc, &wc.posted_2); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); worker_config_destroy(&wc); return 0; @@ -213,13 +213,13 @@ TEST_IMPL(condvar_4) { /* Helper to signal-then-wait. */ worker_config_init(&wc, 1, condvar_signal, condvar_timedwait); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); + ASSERT_OK(uv_thread_create(&thread, worker, &wc)); /* We wait-then-signal. */ wc.wait_cond(&wc, &wc.posted_1); wc.signal_cond(&wc, &wc.posted_2); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); worker_config_destroy(&wc); return 0; diff --git a/deps/uv/test/test-connect-unspecified.c b/deps/uv/test/test-connect-unspecified.c index ecbe98538edc9d..73e59a9972b670 100644 --- a/deps/uv/test/test-connect-unspecified.c +++ b/deps/uv/test/test-connect-unspecified.c @@ -23,11 +23,11 @@ #include "task.h" static void connect_4(uv_connect_t* req, int status) { - ASSERT(status != UV_EADDRNOTAVAIL); + ASSERT_NE(status, UV_EADDRNOTAVAIL); } static void connect_6(uv_connect_t* req, int status) { - ASSERT(status != UV_EADDRNOTAVAIL); + ASSERT_NE(status, UV_EADDRNOTAVAIL); } TEST_IMPL(connect_unspecified) { @@ -41,23 +41,23 @@ TEST_IMPL(connect_unspecified) { loop = uv_default_loop(); - ASSERT(uv_tcp_init(loop, &socket4) == 0); - ASSERT(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr4) == 0); - ASSERT(uv_tcp_connect(&connect4, - &socket4, - (const struct sockaddr*) &addr4, - connect_4) == 0); + ASSERT_OK(uv_tcp_init(loop, &socket4)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr4)); + ASSERT_OK(uv_tcp_connect(&connect4, + &socket4, + (const struct sockaddr*) &addr4, + connect_4)); if (can_ipv6()) { - ASSERT(uv_tcp_init(loop, &socket6) == 0); - ASSERT(uv_ip6_addr("::", TEST_PORT, &addr6) == 0); - ASSERT(uv_tcp_connect(&connect6, - &socket6, - (const struct sockaddr*) &addr6, - connect_6) == 0); + ASSERT_OK(uv_tcp_init(loop, &socket6)); + ASSERT_OK(uv_ip6_addr("::", TEST_PORT, &addr6)); + ASSERT_OK(uv_tcp_connect(&connect6, + &socket6, + (const struct sockaddr*) &addr6, + connect_6)); } - ASSERT(uv_run(loop, UV_RUN_DEFAULT) == 0); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-connection-fail.c b/deps/uv/test/test-connection-fail.c index aa7db30d85a2d1..9efd3ac907a035 100644 --- a/deps/uv/test/test-connection-fail.c +++ b/deps/uv/test/test-connection-fail.c @@ -54,8 +54,8 @@ static void timer_cb(uv_timer_t* handle) { * but libuv hasn't automatically closed the socket. The user must * uv_close the handle manually. */ - ASSERT(close_cb_calls == 0); - ASSERT(connect_cb_calls == 1); + ASSERT_OK(close_cb_calls); + ASSERT_EQ(1, connect_cb_calls); /* Close the tcp handle. */ uv_close((uv_handle_t*)&tcp, on_close); @@ -66,22 +66,22 @@ static void timer_cb(uv_timer_t* handle) { static void on_connect_with_close(uv_connect_t *req, int status) { - ASSERT((uv_stream_t*) &tcp == req->handle); - ASSERT(status == UV_ECONNREFUSED); + ASSERT_PTR_EQ((uv_stream_t*) &tcp, req->handle); + ASSERT_EQ(status, UV_ECONNREFUSED); connect_cb_calls++; - ASSERT(close_cb_calls == 0); + ASSERT_OK(close_cb_calls); uv_close((uv_handle_t*)req->handle, on_close); } static void on_connect_without_close(uv_connect_t *req, int status) { - ASSERT(status == UV_ECONNREFUSED); + ASSERT_EQ(status, UV_ECONNREFUSED); connect_cb_calls++; uv_timer_start(&timer, timer_cb, 100, 0); - ASSERT(close_cb_calls == 0); + ASSERT_OK(close_cb_calls); } @@ -89,10 +89,10 @@ static void connection_fail(uv_connect_cb connect_cb) { struct sockaddr_in client_addr, server_addr; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &client_addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", 0, &client_addr)); /* There should be no servers listening on this port. */ - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); /* Try to connect to the server and do NUM_PINGS ping-pongs. */ r = uv_tcp_init(uv_default_loop(), &tcp); @@ -100,7 +100,7 @@ static void connection_fail(uv_connect_cb connect_cb) { /* We are never doing multiple reads/connects at a time anyway. so these * handles can be pre-initialized. */ - ASSERT(0 == uv_tcp_bind(&tcp, (const struct sockaddr*) &client_addr, 0)); + ASSERT_OK(uv_tcp_bind(&tcp, (const struct sockaddr*) &client_addr, 0)); r = uv_tcp_connect(&req, &tcp, @@ -110,8 +110,8 @@ static void connection_fail(uv_connect_cb connect_cb) { uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_calls == 1); - ASSERT(close_cb_calls == 1); + ASSERT_EQ(1, connect_cb_calls); + ASSERT_EQ(1, close_cb_calls); } @@ -127,8 +127,8 @@ TEST_IMPL(connection_fail) { connection_fail(on_connect_with_close); - ASSERT(timer_close_cb_calls == 0); - ASSERT(timer_cb_calls == 0); + ASSERT_OK(timer_close_cb_calls); + ASSERT_OK(timer_cb_calls); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -149,12 +149,12 @@ TEST_IMPL(connection_fail_doesnt_auto_close) { int r; r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); + ASSERT_OK(r); connection_fail(on_connect_without_close); - ASSERT(timer_close_cb_calls == 1); - ASSERT(timer_cb_calls == 1); + ASSERT_EQ(1, timer_close_cb_calls); + ASSERT_EQ(1, timer_cb_calls); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-cwd-and-chdir.c b/deps/uv/test/test-cwd-and-chdir.c index faeed021030e83..e4a0eef07670cd 100644 --- a/deps/uv/test/test-cwd-and-chdir.c +++ b/deps/uv/test/test-cwd-and-chdir.c @@ -34,24 +34,24 @@ TEST_IMPL(cwd_and_chdir) { size1 = 1; err = uv_cwd(buffer_orig, &size1); - ASSERT(err == UV_ENOBUFS); - ASSERT(size1 > 1); + ASSERT_EQ(err, UV_ENOBUFS); + ASSERT_GT(size1, 1); size1 = sizeof buffer_orig; err = uv_cwd(buffer_orig, &size1); - ASSERT(err == 0); - ASSERT(size1 > 0); - ASSERT(buffer_orig[size1] != '/'); + ASSERT_OK(err); + ASSERT_GT(size1, 0); + ASSERT_NE(buffer_orig[size1], '/'); err = uv_chdir(buffer_orig); - ASSERT(err == 0); + ASSERT_OK(err); size2 = sizeof buffer_new; err = uv_cwd(buffer_new, &size2); - ASSERT(err == 0); + ASSERT_OK(err); - ASSERT(size1 == size2); - ASSERT(strcmp(buffer_orig, buffer_new) == 0); + ASSERT_EQ(size1, size2); + ASSERT_OK(strcmp(buffer_orig, buffer_new)); return 0; } diff --git a/deps/uv/test/test-default-loop-close.c b/deps/uv/test/test-default-loop-close.c index 8d960e1130a7cb..d08a33ea551d34 100644 --- a/deps/uv/test/test-default-loop-close.c +++ b/deps/uv/test/test-default-loop-close.c @@ -39,19 +39,19 @@ TEST_IMPL(default_loop_close) { loop = uv_default_loop(); ASSERT_NOT_NULL(loop); - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 1, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == timer_cb_called); - ASSERT(0 == uv_loop_close(loop)); + ASSERT_OK(uv_timer_init(loop, &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, 1, 0)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, timer_cb_called); + ASSERT_OK(uv_loop_close(loop)); loop = uv_default_loop(); ASSERT_NOT_NULL(loop); - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 1, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(2 == timer_cb_called); + ASSERT_OK(uv_timer_init(loop, &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, 1, 0)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(2, timer_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-delayed-accept.c b/deps/uv/test/test-delayed-accept.c index c1d6ce0b45b203..f7cf80ab7b369c 100644 --- a/deps/uv/test/test-delayed-accept.c +++ b/deps/uv/test/test-delayed-accept.c @@ -54,11 +54,11 @@ static void do_accept(uv_timer_t* timer_handle) { ASSERT_NOT_NULL(accepted_handle); r = uv_tcp_init(uv_default_loop(), accepted_handle); - ASSERT(r == 0); + ASSERT_OK(r); server = (uv_tcp_t*)timer_handle->data; r = uv_accept((uv_stream_t*)server, (uv_stream_t*)accepted_handle); - ASSERT(r == 0); + ASSERT_OK(r); do_accept_called++; @@ -79,19 +79,19 @@ static void connection_cb(uv_stream_t* tcp, int status) { int r; uv_timer_t* timer_handle; - ASSERT(status == 0); + ASSERT_OK(status); timer_handle = (uv_timer_t*)malloc(sizeof *timer_handle); ASSERT_NOT_NULL(timer_handle); /* Accept the client after 1 second */ r = uv_timer_init(uv_default_loop(), timer_handle); - ASSERT(r == 0); + ASSERT_OK(r); timer_handle->data = tcp; r = uv_timer_start(timer_handle, do_accept, 1000, 0); - ASSERT(r == 0); + ASSERT_OK(r); connection_cb_called++; } @@ -102,16 +102,16 @@ static void start_server(void) { uv_tcp_t* server = (uv_tcp_t*)malloc(sizeof *server); int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); ASSERT_NOT_NULL(server); r = uv_tcp_init(uv_default_loop(), server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)server, 128, connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -123,10 +123,10 @@ static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { } if (nread >= 0) { - ASSERT(nread == 0); + ASSERT_OK(nread); } else { ASSERT_NOT_NULL(tcp); - ASSERT(nread == UV_EOF); + ASSERT_EQ(nread, UV_EOF); uv_close((uv_handle_t*)tcp, close_cb); } } @@ -136,12 +136,12 @@ static void connect_cb(uv_connect_t* req, int status) { int r; ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); /* Not that the server will send anything, but otherwise we'll never know * when the server closes the connection. */ r = uv_read_start((uv_stream_t*)(req->handle), alloc_cb, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); connect_cb_called++; @@ -155,18 +155,18 @@ static void client_connect(void) { uv_connect_t* connect_req = malloc(sizeof *connect_req); int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); ASSERT_NOT_NULL(client); ASSERT_NOT_NULL(connect_req); r = uv_tcp_init(uv_default_loop(), client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(connect_req, client, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -179,10 +179,10 @@ TEST_IMPL(delayed_accept) { uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connection_cb_called == 2); - ASSERT(do_accept_called == 2); - ASSERT(connect_cb_called == 2); - ASSERT(close_cb_called == 7); + ASSERT_EQ(2, connection_cb_called); + ASSERT_EQ(2, do_accept_called); + ASSERT_EQ(2, connect_cb_called); + ASSERT_EQ(7, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-dlerror.c b/deps/uv/test/test-dlerror.c index 631e67cc5f3e89..dec0da3afc8533 100644 --- a/deps/uv/test/test-dlerror.c +++ b/deps/uv/test/test-dlerror.c @@ -38,7 +38,7 @@ TEST_IMPL(dlerror) { ASSERT_NOT_NULL(strstr(msg, dlerror_no_error)); r = uv_dlopen(path, &lib); - ASSERT(r == -1); + ASSERT_EQ(r, -1); msg = uv_dlerror(&lib); ASSERT_NOT_NULL(msg); diff --git a/deps/uv/test/test-eintr-handling.c b/deps/uv/test/test-eintr-handling.c index d37aba4aa529ba..1f75e77e251bf1 100644 --- a/deps/uv/test/test-eintr-handling.c +++ b/deps/uv/test/test-eintr-handling.c @@ -48,13 +48,13 @@ struct thread_ctx { static void thread_main(void* arg) { int nwritten; - ASSERT(0 == kill(getpid(), SIGUSR1)); + ASSERT_OK(kill(getpid(), SIGUSR1)); do nwritten = write(pipe_fds[1], test_buf, sizeof(test_buf)); while (nwritten == -1 && errno == EINTR); - ASSERT(nwritten == sizeof(test_buf)); + ASSERT_EQ(nwritten, sizeof(test_buf)); } static void sig_func(uv_signal_t* handle, int signum) { @@ -70,24 +70,24 @@ TEST_IMPL(eintr_handling) { iov = uv_buf_init(buf, sizeof(buf)); loop = uv_default_loop(); - ASSERT(0 == uv_signal_init(loop, &signal)); - ASSERT(0 == uv_signal_start(&signal, sig_func, SIGUSR1)); + ASSERT_OK(uv_signal_init(loop, &signal)); + ASSERT_OK(uv_signal_start(&signal, sig_func, SIGUSR1)); - ASSERT(0 == pipe(pipe_fds)); - ASSERT(0 == uv_thread_create(&thread, thread_main, &ctx)); + ASSERT_OK(pipe(pipe_fds)); + ASSERT_OK(uv_thread_create(&thread, thread_main, &ctx)); nread = uv_fs_read(loop, &read_req, pipe_fds[0], &iov, 1, -1, NULL); - ASSERT(nread == sizeof(test_buf)); - ASSERT(0 == strcmp(buf, test_buf)); + ASSERT_EQ(nread, sizeof(test_buf)); + ASSERT_OK(strcmp(buf, test_buf)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(0 == close(pipe_fds[0])); - ASSERT(0 == close(pipe_fds[1])); + ASSERT_OK(close(pipe_fds[0])); + ASSERT_OK(close(pipe_fds[1])); uv_close((uv_handle_t*) &signal, NULL); - ASSERT_EQ(0, uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-embed.c b/deps/uv/test/test-embed.c index bbe56e176db17a..6e9917239aa562 100644 --- a/deps/uv/test/test-embed.c +++ b/deps/uv/test/test-embed.c @@ -36,7 +36,7 @@ static uv_barrier_t barrier; static void thread_main(void* arg) { ASSERT_LE(0, uv_barrier_wait(&barrier)); uv_sleep(250); - ASSERT_EQ(0, uv_async_send(&async)); + ASSERT_OK(uv_async_send(&async)); } @@ -50,9 +50,9 @@ TEST_IMPL(embed) { uv_loop_t* loop; loop = uv_default_loop(); - ASSERT_EQ(0, uv_async_init(loop, &async, async_cb)); - ASSERT_EQ(0, uv_barrier_init(&barrier, 2)); - ASSERT_EQ(0, uv_thread_create(&thread, thread_main, NULL)); + ASSERT_OK(uv_async_init(loop, &async, async_cb)); + ASSERT_OK(uv_barrier_init(&barrier, 2)); + ASSERT_OK(uv_thread_create(&thread, thread_main, NULL)); ASSERT_LE(0, uv_barrier_wait(&barrier)); while (uv_loop_alive(loop)) { @@ -71,7 +71,7 @@ TEST_IMPL(embed) { #endif } - ASSERT_EQ(0, uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); uv_barrier_destroy(&barrier); MAKE_VALGRIND_HAPPY(loop); diff --git a/deps/uv/test/test-emfile.c b/deps/uv/test/test-emfile.c index 343c9521dc7eba..ef2338cdfbb165 100644 --- a/deps/uv/test/test-emfile.c +++ b/deps/uv/test/test-emfile.c @@ -54,37 +54,37 @@ TEST_IMPL(emfile) { /* Lower the file descriptor limit and use up all fds save one. */ limits.rlim_cur = limits.rlim_max = maxfd + 1; if (setrlimit(RLIMIT_NOFILE, &limits)) { - ASSERT(errno == EPERM); /* Valgrind blocks the setrlimit() call. */ + ASSERT_EQ(errno, EPERM); /* Valgrind blocks the setrlimit() call. */ RETURN_SKIP("setrlimit(RLIMIT_NOFILE) failed, running under valgrind?"); } loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(loop, &server_handle)); - ASSERT(0 == uv_tcp_init(loop, &client_handle)); - ASSERT(0 == uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 8, connection_cb)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_tcp_init(loop, &server_handle)); + ASSERT_OK(uv_tcp_init(loop, &client_handle)); + ASSERT_OK(uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_listen((uv_stream_t*) &server_handle, 8, connection_cb)); /* Remember the first one so we can clean up afterwards. */ do first_fd = dup(0); while (first_fd == -1 && errno == EINTR); - ASSERT(first_fd > 0); + ASSERT_GT(first_fd, 0); while (dup(0) != -1 || errno == EINTR); - ASSERT(errno == EMFILE); + ASSERT_EQ(errno, EMFILE); close(maxfd); /* Now connect and use up the last available file descriptor. The EMFILE * handling logic in src/unix/stream.c should ensure that connect_cb() runs * whereas connection_cb() should *not* run. */ - ASSERT(0 == uv_tcp_connect(&connect_req, - &client_handle, - (const struct sockaddr*) &addr, - connect_cb)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == connect_cb_called); + ASSERT_OK(uv_tcp_connect(&connect_req, + &client_handle, + (const struct sockaddr*) &addr, + connect_cb)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, connect_cb_called); /* Close the dups again. Ignore errors in the unlikely event that the * file descriptors were not contiguous. @@ -108,7 +108,7 @@ static void connect_cb(uv_connect_t* req, int status) { /* |status| should equal 0 because the connection should have been accepted, * it's just that the server immediately closes it again. */ - ASSERT(0 == status); + ASSERT_OK(status); connect_cb_called += 1; uv_close((uv_handle_t*) &server_handle, NULL); uv_close((uv_handle_t*) &client_handle, NULL); diff --git a/deps/uv/test/test-env-vars.c b/deps/uv/test/test-env-vars.c index 8118e3da5d7c59..016f0733c6e424 100644 --- a/deps/uv/test/test-env-vars.c +++ b/deps/uv/test/test-env-vars.c @@ -35,83 +35,83 @@ TEST_IMPL(env_vars) { /* Reject invalid inputs when setting an environment variable */ r = uv_os_setenv(NULL, "foo"); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_os_setenv(name, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_os_setenv(NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); /* Reject invalid inputs when retrieving an environment variable */ size = BUF_SIZE; r = uv_os_getenv(NULL, buf, &size); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_os_getenv(name, NULL, &size); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_os_getenv(name, buf, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); size = 0; r = uv_os_getenv(name, buf, &size); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); /* Reject invalid inputs when deleting an environment variable */ r = uv_os_unsetenv(NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); /* Successfully set an environment variable */ r = uv_os_setenv(name, "123456789"); - ASSERT(r == 0); + ASSERT_OK(r); /* Successfully read an environment variable */ size = BUF_SIZE; buf[0] = '\0'; r = uv_os_getenv(name, buf, &size); - ASSERT(r == 0); - ASSERT(strcmp(buf, "123456789") == 0); - ASSERT(size == BUF_SIZE - 1); + ASSERT_OK(r); + ASSERT_OK(strcmp(buf, "123456789")); + ASSERT_EQ(size, BUF_SIZE - 1); /* Return UV_ENOBUFS if the buffer cannot hold the environment variable */ size = BUF_SIZE - 1; buf[0] = '\0'; r = uv_os_getenv(name, buf, &size); - ASSERT(r == UV_ENOBUFS); - ASSERT(size == BUF_SIZE); + ASSERT_EQ(r, UV_ENOBUFS); + ASSERT_EQ(size, BUF_SIZE); /* Successfully delete an environment variable */ r = uv_os_unsetenv(name); - ASSERT(r == 0); + ASSERT_OK(r); /* Return UV_ENOENT retrieving an environment variable that does not exist */ r = uv_os_getenv(name, buf, &size); - ASSERT(r == UV_ENOENT); + ASSERT_EQ(r, UV_ENOENT); /* Successfully delete an environment variable that does not exist */ r = uv_os_unsetenv(name); - ASSERT(r == 0); + ASSERT_OK(r); /* Setting an environment variable to the empty string does not delete it. */ r = uv_os_setenv(name, ""); - ASSERT(r == 0); + ASSERT_OK(r); size = BUF_SIZE; r = uv_os_getenv(name, buf, &size); - ASSERT(r == 0); - ASSERT(size == 0); - ASSERT(strlen(buf) == 0); + ASSERT_OK(r); + ASSERT_OK(size); + ASSERT_OK(strlen(buf)); /* Check getting all env variables. */ r = uv_os_setenv(name, "123456789"); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_os_setenv(name2, ""); - ASSERT(r == 0); + ASSERT_OK(r); #ifdef _WIN32 /* Create a special environment variable on Windows in case there are no naturally occurring ones. */ r = uv_os_setenv("=Z:", "\\"); - ASSERT(r == 0); + ASSERT_OK(r); #endif r = uv_os_environ(&envitems, &envcount); - ASSERT(r == 0); - ASSERT(envcount > 0); + ASSERT_OK(r); + ASSERT_GT(envcount, 0); found = 0; found_win_special = 0; @@ -120,16 +120,16 @@ TEST_IMPL(env_vars) { /* printf("Env: %s = %s\n", envitems[i].name, envitems[i].value); */ if (strcmp(envitems[i].name, name) == 0) { found++; - ASSERT(strcmp(envitems[i].value, "123456789") == 0); + ASSERT_OK(strcmp(envitems[i].value, "123456789")); } else if (strcmp(envitems[i].name, name2) == 0) { found++; - ASSERT(strlen(envitems[i].value) == 0); + ASSERT_OK(strlen(envitems[i].value)); } else if (envitems[i].name[0] == '=') { found_win_special++; } } - ASSERT(found == 2); + ASSERT_EQ(2, found); #ifdef _WIN32 ASSERT_GT(found_win_special, 0); #else @@ -140,10 +140,10 @@ TEST_IMPL(env_vars) { uv_os_free_environ(envitems, envcount); r = uv_os_unsetenv(name); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_os_unsetenv(name2); - ASSERT(r == 0); + ASSERT_OK(r); for (i = 1; i <= 4; i++) { size_t n; @@ -158,14 +158,14 @@ TEST_IMPL(env_vars) { memset(p, 'x', n); p[n] = '\0'; - ASSERT_EQ(0, uv_os_setenv(name, p)); - ASSERT_EQ(0, uv_os_getenv(name, p, &size)); + ASSERT_OK(uv_os_setenv(name, p)); + ASSERT_OK(uv_os_getenv(name, p, &size)); ASSERT_EQ(n, size); for (n = 0; n < size; n++) ASSERT_EQ('x', p[n]); - ASSERT_EQ(0, uv_os_unsetenv(name)); + ASSERT_OK(uv_os_unsetenv(name)); free(p); } diff --git a/deps/uv/test/test-error.c b/deps/uv/test/test-error.c index f0fb864607f36c..2c6d0ca49790e0 100644 --- a/deps/uv/test/test-error.c +++ b/deps/uv/test/test-error.c @@ -51,8 +51,8 @@ TEST_IMPL(error_message) { } ASSERT_NULL(strstr(uv_strerror(UV_EINVAL), "Success")); - ASSERT(strcmp(uv_strerror(1337), "Unknown error") == 0); - ASSERT(strcmp(uv_strerror(-1337), "Unknown error") == 0); + ASSERT_OK(strcmp(uv_strerror(1337), "Unknown error")); + ASSERT_OK(strcmp(uv_strerror(-1337), "Unknown error")); ASSERT_NULL(strstr(uv_strerror_r(UV_EINVAL, buf, sizeof(buf)), "Success")); ASSERT_NOT_NULL(strstr(uv_strerror_r(1337, buf, sizeof(buf)), "1337")); @@ -64,19 +64,19 @@ TEST_IMPL(error_message) { TEST_IMPL(sys_error) { #if defined(_WIN32) - ASSERT(uv_translate_sys_error(ERROR_NOACCESS) == UV_EACCES); - ASSERT(uv_translate_sys_error(ERROR_ELEVATION_REQUIRED) == UV_EACCES); - ASSERT(uv_translate_sys_error(WSAEADDRINUSE) == UV_EADDRINUSE); - ASSERT(uv_translate_sys_error(ERROR_BAD_PIPE) == UV_EPIPE); + ASSERT_EQ(uv_translate_sys_error(ERROR_NOACCESS), UV_EACCES); + ASSERT_EQ(uv_translate_sys_error(ERROR_ELEVATION_REQUIRED), UV_EACCES); + ASSERT_EQ(uv_translate_sys_error(WSAEADDRINUSE), UV_EADDRINUSE); + ASSERT_EQ(uv_translate_sys_error(ERROR_BAD_PIPE), UV_EPIPE); #else - ASSERT(uv_translate_sys_error(EPERM) == UV_EPERM); - ASSERT(uv_translate_sys_error(EPIPE) == UV_EPIPE); - ASSERT(uv_translate_sys_error(EINVAL) == UV_EINVAL); + ASSERT_EQ(uv_translate_sys_error(EPERM), UV_EPERM); + ASSERT_EQ(uv_translate_sys_error(EPIPE), UV_EPIPE); + ASSERT_EQ(uv_translate_sys_error(EINVAL), UV_EINVAL); #endif - ASSERT(uv_translate_sys_error(UV_EINVAL) == UV_EINVAL); - ASSERT(uv_translate_sys_error(UV_ERANGE) == UV_ERANGE); - ASSERT(uv_translate_sys_error(UV_EACCES) == UV_EACCES); - ASSERT(uv_translate_sys_error(0) == 0); + ASSERT_EQ(uv_translate_sys_error(UV_EINVAL), UV_EINVAL); + ASSERT_EQ(uv_translate_sys_error(UV_ERANGE), UV_ERANGE); + ASSERT_EQ(uv_translate_sys_error(UV_EACCES), UV_EACCES); + ASSERT_OK(uv_translate_sys_error(0)); return 0; } diff --git a/deps/uv/test/test-fork.c b/deps/uv/test/test-fork.c index 29ed132a488f7d..fe42f03daf515d 100644 --- a/deps/uv/test/test-fork.c +++ b/deps/uv/test/test-fork.c @@ -51,12 +51,12 @@ static char socket_cb_read_buf[1024]; static void socket_cb(uv_poll_t* poll, int status, int events) { ssize_t cnt; socket_cb_called++; - ASSERT(0 == status); + ASSERT_OK(status); printf("Socket cb got events %d\n", events); - ASSERT(UV_READABLE == (events & UV_READABLE)); + ASSERT_EQ(UV_READABLE, (events & UV_READABLE)); if (socket_cb_read_fd) { cnt = read(socket_cb_read_fd, socket_cb_read_buf, socket_cb_read_size); - ASSERT(cnt == socket_cb_read_size); + ASSERT_EQ(cnt, socket_cb_read_size); } uv_close((uv_handle_t*) poll, NULL); } @@ -66,15 +66,15 @@ static void run_timer_loop_once(void) { uv_loop_t loop; uv_timer_t timer_handle; - ASSERT_EQ(0, uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); timer_cb_called = 0; /* Reset for the child. */ - ASSERT(0 == uv_timer_init(&loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 1, 0)); - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); - ASSERT(1 == timer_cb_called); - ASSERT_EQ(0, uv_loop_close(&loop)); + ASSERT_OK(uv_timer_init(&loop, &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, 1, 0)); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, timer_cb_called); + ASSERT_OK(uv_loop_close(&loop)); } @@ -87,10 +87,10 @@ static void assert_wait_child(pid_t child_pid) { if (waited_pid == -1) { perror("Failed to wait"); } - ASSERT(child_pid == waited_pid); + ASSERT_EQ(child_pid, waited_pid); ASSERT(WIFEXITED(child_stat)); /* Clean exit, not a signal. */ ASSERT(!WIFSIGNALED(child_stat)); - ASSERT(0 == WEXITSTATUS(child_stat)); + ASSERT_OK(WEXITSTATUS(child_stat)); } @@ -109,14 +109,14 @@ TEST_IMPL(fork_timer) { #else child_pid = fork(); #endif - ASSERT(child_pid != -1); + ASSERT_NE(child_pid, -1); if (child_pid != 0) { /* parent */ assert_wait_child(child_pid); } else { /* child */ - ASSERT(0 == uv_loop_fork(uv_default_loop())); + ASSERT_OK(uv_loop_fork(uv_default_loop())); run_timer_loop_once(); } @@ -135,30 +135,30 @@ TEST_IMPL(fork_socketpair) { /* Prime the loop. */ run_timer_loop_once(); - ASSERT(0 == socketpair(AF_UNIX, SOCK_STREAM, 0, socket_fds)); + ASSERT_OK(socketpair(AF_UNIX, SOCK_STREAM, 0, socket_fds)); /* Create the server watcher in the parent, use it in the child. */ - ASSERT(0 == uv_poll_init(uv_default_loop(), &poll_handle, socket_fds[0])); + ASSERT_OK(uv_poll_init(uv_default_loop(), &poll_handle, socket_fds[0])); #if defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH) child_pid = -1; #else child_pid = fork(); #endif - ASSERT(child_pid != -1); + ASSERT_NE(child_pid, -1); if (child_pid != 0) { /* parent */ - ASSERT(3 == send(socket_fds[1], "hi\n", 3, 0)); + ASSERT_EQ(3, send(socket_fds[1], "hi\n", 3, 0)); assert_wait_child(child_pid); } else { /* child */ - ASSERT(0 == uv_loop_fork(uv_default_loop())); - ASSERT(0 == socket_cb_called); - ASSERT(0 == uv_poll_start(&poll_handle, UV_READABLE, socket_cb)); + ASSERT_OK(uv_loop_fork(uv_default_loop())); + ASSERT_OK(socket_cb_called); + ASSERT_OK(uv_poll_start(&poll_handle, UV_READABLE, socket_cb)); printf("Going to run the loop in the child\n"); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(1 == socket_cb_called); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_EQ(1, socket_cb_called); } MAKE_VALGRIND_HAPPY(uv_default_loop()); @@ -176,57 +176,57 @@ TEST_IMPL(fork_socketpair_started) { char sync_buf[1]; uv_poll_t poll_handle; - ASSERT(0 == pipe(sync_pipe)); + ASSERT_OK(pipe(sync_pipe)); /* Prime the loop. */ run_timer_loop_once(); - ASSERT(0 == socketpair(AF_UNIX, SOCK_STREAM, 0, socket_fds)); + ASSERT_OK(socketpair(AF_UNIX, SOCK_STREAM, 0, socket_fds)); /* Create and start the server watcher in the parent, use it in the child. */ - ASSERT(0 == uv_poll_init(uv_default_loop(), &poll_handle, socket_fds[0])); - ASSERT(0 == uv_poll_start(&poll_handle, UV_READABLE, socket_cb)); + ASSERT_OK(uv_poll_init(uv_default_loop(), &poll_handle, socket_fds[0])); + ASSERT_OK(uv_poll_start(&poll_handle, UV_READABLE, socket_cb)); /* Run the loop AFTER the poll watcher is registered to make sure it gets passed to the kernel. Use NOWAIT and expect a non-zero return to prove the poll watcher is active. */ - ASSERT(1 == uv_run(uv_default_loop(), UV_RUN_NOWAIT)); + ASSERT_EQ(1, uv_run(uv_default_loop(), UV_RUN_NOWAIT)); #if defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH) child_pid = -1; #else child_pid = fork(); #endif - ASSERT(child_pid != -1); + ASSERT_NE(child_pid, -1); if (child_pid != 0) { /* parent */ - ASSERT(0 == uv_poll_stop(&poll_handle)); + ASSERT_OK(uv_poll_stop(&poll_handle)); uv_close((uv_handle_t*)&poll_handle, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == socket_cb_called); - ASSERT(1 == write(sync_pipe[1], "1", 1)); /* alert child */ - ASSERT(3 == send(socket_fds[1], "hi\n", 3, 0)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(socket_cb_called); + ASSERT_EQ(1, write(sync_pipe[1], "1", 1)); /* alert child */ + ASSERT_EQ(3, send(socket_fds[1], "hi\n", 3, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == socket_cb_called); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(socket_cb_called); assert_wait_child(child_pid); } else { /* child */ printf("Child is %d\n", getpid()); - ASSERT(1 == read(sync_pipe[0], sync_buf, 1)); /* wait for parent */ - ASSERT(0 == uv_loop_fork(uv_default_loop())); - ASSERT(0 == socket_cb_called); + ASSERT_EQ(1, read(sync_pipe[0], sync_buf, 1)); /* wait for parent */ + ASSERT_OK(uv_loop_fork(uv_default_loop())); + ASSERT_OK(socket_cb_called); printf("Going to run the loop in the child\n"); socket_cb_read_fd = socket_fds[0]; socket_cb_read_size = 3; - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(1 == socket_cb_called); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_EQ(1, socket_cb_called); printf("Buf %s\n", socket_cb_read_buf); - ASSERT(0 == strcmp("hi\n", socket_cb_read_buf)); + ASSERT_OK(strcmp("hi\n", socket_cb_read_buf)); } MAKE_VALGRIND_HAPPY(uv_default_loop()); @@ -253,41 +253,43 @@ TEST_IMPL(fork_signal_to_child) { fork_signal_cb_called = 0; /* reset */ - ASSERT(0 == pipe(sync_pipe)); + ASSERT_OK(pipe(sync_pipe)); /* Prime the loop. */ run_timer_loop_once(); - ASSERT(0 == uv_signal_init(uv_default_loop(), &signal_handle)); - ASSERT(0 == uv_signal_start(&signal_handle, fork_signal_to_child_cb, SIGUSR1)); + ASSERT_OK(uv_signal_init(uv_default_loop(), &signal_handle)); + ASSERT_OK(uv_signal_start(&signal_handle, + fork_signal_to_child_cb, + SIGUSR1)); #if defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH) child_pid = -1; #else child_pid = fork(); #endif - ASSERT(child_pid != -1); + ASSERT_NE(child_pid, -1); if (child_pid != 0) { /* parent */ - ASSERT(1 == read(sync_pipe[0], sync_buf, 1)); /* wait for child */ - ASSERT(0 == kill(child_pid, SIGUSR1)); + ASSERT_EQ(1, read(sync_pipe[0], sync_buf, 1)); /* wait for child */ + ASSERT_OK(kill(child_pid, SIGUSR1)); /* Run the loop, make sure we don't get the signal. */ printf("Running loop in parent\n"); uv_unref((uv_handle_t*)&signal_handle); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_NOWAIT)); - ASSERT(0 == fork_signal_cb_called); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_NOWAIT)); + ASSERT_OK(fork_signal_cb_called); printf("Waiting for child in parent\n"); assert_wait_child(child_pid); } else { /* child */ - ASSERT(0 == uv_loop_fork(uv_default_loop())); - ASSERT(1 == write(sync_pipe[1], "1", 1)); /* alert parent */ + ASSERT_OK(uv_loop_fork(uv_default_loop())); + ASSERT_EQ(1, write(sync_pipe[1], "1", 1)); /* alert parent */ /* Get the signal. */ - ASSERT(0 != uv_loop_alive(uv_default_loop())); + ASSERT_NE(0, uv_loop_alive(uv_default_loop())); printf("Running loop in child\n"); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); - ASSERT(SIGUSR1 == fork_signal_cb_called); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_ONCE)); + ASSERT_EQ(SIGUSR1, fork_signal_cb_called); } MAKE_VALGRIND_HAPPY(uv_default_loop()); @@ -308,47 +310,49 @@ TEST_IMPL(fork_signal_to_child_closed) { fork_signal_cb_called = 0; /* reset */ - ASSERT(0 == pipe(sync_pipe)); - ASSERT(0 == pipe(sync_pipe2)); + ASSERT_OK(pipe(sync_pipe)); + ASSERT_OK(pipe(sync_pipe2)); /* Prime the loop. */ run_timer_loop_once(); - ASSERT(0 == uv_signal_init(uv_default_loop(), &signal_handle)); - ASSERT(0 == uv_signal_start(&signal_handle, fork_signal_to_child_cb, SIGUSR1)); + ASSERT_OK(uv_signal_init(uv_default_loop(), &signal_handle)); + ASSERT_OK(uv_signal_start(&signal_handle, + fork_signal_to_child_cb, + SIGUSR1)); #if defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH) child_pid = -1; #else child_pid = fork(); #endif - ASSERT(child_pid != -1); + ASSERT_NE(child_pid, -1); if (child_pid != 0) { /* parent */ printf("Wating on child in parent\n"); - ASSERT(1 == read(sync_pipe[0], sync_buf, 1)); /* wait for child */ + ASSERT_EQ(1, read(sync_pipe[0], sync_buf, 1)); /* wait for child */ printf("Parent killing child\n"); - ASSERT(0 == kill(child_pid, SIGUSR1)); + ASSERT_OK(kill(child_pid, SIGUSR1)); /* Run the loop, make sure we don't get the signal. */ printf("Running loop in parent\n"); uv_unref((uv_handle_t*)&signal_handle); /* so the loop can exit; we *shouldn't* get any signals */ run_timer_loop_once(); /* but while we share a pipe, we do, so have something active. */ - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_ONCE)); printf("Signal in parent %d\n", fork_signal_cb_called); - ASSERT(0 == fork_signal_cb_called); - ASSERT(1 == write(sync_pipe2[1], "1", 1)); /* alert child */ + ASSERT_OK(fork_signal_cb_called); + ASSERT_EQ(1, write(sync_pipe2[1], "1", 1)); /* alert child */ printf("Waiting for child in parent\n"); assert_wait_child(child_pid); } else { /* Child. Our signal handler should still be installed. */ - ASSERT(0 == uv_loop_fork(uv_default_loop())); + ASSERT_OK(uv_loop_fork(uv_default_loop())); printf("Checking loop in child\n"); - ASSERT(0 != uv_loop_alive(uv_default_loop())); + ASSERT_NE(0, uv_loop_alive(uv_default_loop())); printf("Alerting parent in child\n"); - ASSERT(1 == write(sync_pipe[1], "1", 1)); /* alert parent */ + ASSERT_EQ(1, write(sync_pipe[1], "1", 1)); /* alert parent */ /* Don't run the loop. Wait for the parent to call us */ printf("Waiting on parent in child\n"); /* Wait for parent. read may fail if the parent tripped an ASSERT @@ -356,7 +360,7 @@ TEST_IMPL(fork_signal_to_child_closed) { */ r = read(sync_pipe2[0], sync_buf, 1); ASSERT(-1 <= r && r <= 1); - ASSERT(0 == fork_signal_cb_called); + ASSERT_OK(fork_signal_cb_called); printf("Exiting child \n"); /* Note that we're deliberately not running the loop * in the child, and also not closing the loop's handles, @@ -371,6 +375,47 @@ TEST_IMPL(fork_signal_to_child_closed) { return 0; } +static void fork_signal_cb(uv_signal_t* h, int s) { + fork_signal_cb_called = s; +} +static void empty_close_cb(uv_handle_t* h){} + +TEST_IMPL(fork_close_signal_in_child) { + uv_loop_t loop; + uv_signal_t signal_handle; + pid_t child_pid; + + ASSERT_OK(uv_loop_init(&loop)); + ASSERT_OK(uv_signal_init(&loop, &signal_handle)); + ASSERT_OK(uv_signal_start(&signal_handle, &fork_signal_cb, SIGHUP)); + + ASSERT_OK(kill(getpid(), SIGHUP)); + child_pid = fork(); + ASSERT_NE(child_pid, -1); + ASSERT_OK(fork_signal_cb_called); + + if (!child_pid) { + uv_loop_fork(&loop); + uv_close((uv_handle_t*)&signal_handle, &empty_close_cb); + uv_run(&loop, UV_RUN_DEFAULT); + /* Child doesn't receive the signal */ + ASSERT_OK(fork_signal_cb_called); + } else { + /* Parent. Runing once to receive the signal */ + uv_run(&loop, UV_RUN_ONCE); + ASSERT_EQ(SIGHUP, fork_signal_cb_called); + + /* loop should stop after closing the only handle */ + uv_close((uv_handle_t*)&signal_handle, &empty_close_cb); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); + + assert_wait_child(child_pid); + } + + MAKE_VALGRIND_HAPPY(&loop); + return 0; +} + static void create_file(const char* name) { int r; @@ -378,11 +423,11 @@ static void create_file(const char* name) { uv_fs_t req; r = uv_fs_open(NULL, &req, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); file = r; uv_fs_req_cleanup(&req); r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); } @@ -394,17 +439,17 @@ static void touch_file(const char* name) { uv_buf_t buf; r = uv_fs_open(NULL, &req, name, O_RDWR, 0, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); file = r; uv_fs_req_cleanup(&req); buf = uv_buf_init("foo", 4); r = uv_fs_write(NULL, &req, file, &buf, 1, -1, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); uv_fs_req_cleanup(&req); r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); } @@ -424,11 +469,11 @@ static void fs_event_cb_file_current_dir(uv_fs_event_t* handle, const char* filename, int events, int status) { - ASSERT(fs_event_cb_called == 0); + ASSERT_OK(fs_event_cb_called); ++fs_event_cb_called; - ASSERT(status == 0); + ASSERT_OK(status); #if defined(__APPLE__) || defined(__linux__) - ASSERT(strcmp(filename, "watch_file") == 0); + ASSERT_OK(strcmp(filename, "watch_file")); #else ASSERT(filename == NULL || strcmp(filename, "watch_file") == 0); #endif @@ -446,28 +491,28 @@ static void assert_watch_file_current_dir(uv_loop_t* const loop, int file_or_dir create_file("watch_file"); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); /* watching a dir is the only way to get fsevents involved on apple platforms */ r = uv_fs_event_start(&fs_event, fs_event_cb_file_current_dir, file_or_dir == 1 ? "." : "watch_file", 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, timer_cb_touch, 100, 0); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(timer_cb_touch_called == 0); - ASSERT(fs_event_cb_called == 0); + ASSERT_OK(timer_cb_touch_called); + ASSERT_OK(fs_event_cb_called); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(timer_cb_touch_called == 1); - ASSERT(fs_event_cb_called == 1); + ASSERT_EQ(1, timer_cb_touch_called); + ASSERT_EQ(1, fs_event_cb_called); /* Cleanup */ remove("watch_file"); @@ -492,7 +537,7 @@ static int _do_fork_fs_events_child(int file_or_dir) { #else child_pid = fork(); #endif - ASSERT(child_pid != -1); + ASSERT_NE(child_pid, -1); if (child_pid != 0) { /* parent */ @@ -508,10 +553,10 @@ static int _do_fork_fs_events_child(int file_or_dir) { uv_loop_init(&loop); printf("Child first watch\n"); assert_watch_file_current_dir(&loop, file_or_dir); - ASSERT(0 == uv_loop_close(&loop)); + ASSERT_OK(uv_loop_close(&loop)); printf("Child second watch default loop\n"); /* Ee can watch in the default loop. */ - ASSERT(0 == uv_loop_fork(uv_default_loop())); + ASSERT_OK(uv_loop_fork(uv_default_loop())); /* On some platforms (OS X), if we don't update the time now, * the timer cb fires before the event loop enters uv__io_poll, * instead of after, meaning we don't see the change! This may be @@ -524,7 +569,7 @@ static int _do_fork_fs_events_child(int file_or_dir) { especially important on Apple platforms where if we're not careful trying to touch the CFRunLoop, even just to shut it down, that we allocated in the FS_TEST_DIR case would crash. */ - ASSERT(0 == uv_loop_close(uv_default_loop())); + ASSERT_OK(uv_loop_close(uv_default_loop())); printf("Exiting child \n"); } @@ -587,40 +632,40 @@ TEST_IMPL(fork_fs_events_file_parent_child) { create_file("watch_file"); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_cb_file_current_dir, "watch_file", 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); #if defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH) child_pid = -1; #else child_pid = fork(); #endif - ASSERT(child_pid != -1); + ASSERT_NE(child_pid, -1); if (child_pid != 0) { /* parent */ assert_wait_child(child_pid); } else { /* child */ printf("Running child\n"); - ASSERT(0 == uv_loop_fork(loop)); + ASSERT_OK(uv_loop_fork(loop)); r = uv_timer_start(&timer, timer_cb_touch, 100, 0); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(timer_cb_touch_called == 0); - ASSERT(fs_event_cb_called == 0); + ASSERT_OK(timer_cb_touch_called); + ASSERT_OK(fs_event_cb_called); printf("Running loop in child \n"); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(timer_cb_touch_called == 1); - ASSERT(fs_event_cb_called == 1); + ASSERT_EQ(1, timer_cb_touch_called); + ASSERT_EQ(1, fs_event_cb_called); /* Cleanup */ remove("watch_file"); @@ -646,7 +691,7 @@ static void work_cb(uv_work_t* req) { static void after_work_cb(uv_work_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); after_work_cb_count++; } @@ -655,16 +700,16 @@ static void assert_run_work(uv_loop_t* const loop) { uv_work_t work_req; int r; - ASSERT(work_cb_count == 0); - ASSERT(after_work_cb_count == 0); + ASSERT_OK(work_cb_count); + ASSERT_OK(after_work_cb_count); printf("Queue in %d\n", getpid()); r = uv_queue_work(loop, &work_req, work_cb, after_work_cb); - ASSERT(r == 0); + ASSERT_OK(r); printf("Running in %d\n", getpid()); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(work_cb_count == 1); - ASSERT(after_work_cb_count == 1); + ASSERT_EQ(1, work_cb_count); + ASSERT_EQ(1, after_work_cb_count); /* cleanup */ work_cb_count = 0; @@ -691,7 +736,7 @@ TEST_IMPL(fork_threadpool_queue_work_simple) { #else child_pid = fork(); #endif - ASSERT(child_pid != -1); + ASSERT_NE(child_pid, -1); if (child_pid != 0) { /* Parent. We can still run work. */ @@ -706,7 +751,7 @@ TEST_IMPL(fork_threadpool_queue_work_simple) { uv_loop_close(&loop); printf("Child second watch default loop\n"); /* We can work in the default loop. */ - ASSERT(0 == uv_loop_fork(uv_default_loop())); + ASSERT_OK(uv_loop_fork(uv_default_loop())); assert_run_work(uv_default_loop()); printf("Exiting child \n"); } diff --git a/deps/uv/test/test-fs-copyfile.c b/deps/uv/test/test-fs-copyfile.c index d7f04cf4cddea8..3f159aeb68fa89 100644 --- a/deps/uv/test/test-fs-copyfile.c +++ b/deps/uv/test/test-fs-copyfile.c @@ -48,19 +48,19 @@ static void handle_result(uv_fs_t* req) { uint64_t mode; int r; - ASSERT(req->fs_type == UV_FS_COPYFILE); - ASSERT(req->result == 0); + ASSERT_EQ(req->fs_type, UV_FS_COPYFILE); + ASSERT_OK(req->result); /* Verify that the file size and mode are the same. */ r = uv_fs_stat(NULL, &stat_req, req->path, NULL); - ASSERT(r == 0); + ASSERT_OK(r); size = stat_req.statbuf.st_size; mode = stat_req.statbuf.st_mode; uv_fs_req_cleanup(&stat_req); r = uv_fs_stat(NULL, &stat_req, dst, NULL); - ASSERT(r == 0); - ASSERT(stat_req.statbuf.st_size == size); - ASSERT(stat_req.statbuf.st_mode == mode); + ASSERT_OK(r); + ASSERT_EQ(stat_req.statbuf.st_size, size); + ASSERT_EQ(stat_req.statbuf.st_mode, mode); uv_fs_req_cleanup(&stat_req); uv_fs_req_cleanup(req); result_check_count++; @@ -77,7 +77,7 @@ static void touch_file(const char* name, unsigned int size) { r = uv_fs_open(NULL, &req, name, O_WRONLY | O_CREAT | O_TRUNC, S_IWUSR | S_IRUSR, NULL); uv_fs_req_cleanup(&req); - ASSERT(r >= 0); + ASSERT_GE(r, 0); file = r; buf = uv_buf_init("a", 1); @@ -86,12 +86,12 @@ static void touch_file(const char* name, unsigned int size) { for (i = 0; i < size; i++) { r = uv_fs_write(NULL, &req, file, &buf, 1, i, NULL); uv_fs_req_cleanup(&req); - ASSERT(r >= 0); + ASSERT_GE(r, 0); } r = uv_fs_close(NULL, &req, file, NULL); uv_fs_req_cleanup(&req); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -105,102 +105,102 @@ TEST_IMPL(fs_copyfile) { /* Fails with EINVAL if bad flags are passed. */ r = uv_fs_copyfile(NULL, &req, src, dst, -1, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_fs_req_cleanup(&req); /* Fails with ENOENT if source does not exist. */ unlink(src); unlink(dst); r = uv_fs_copyfile(NULL, &req, src, dst, 0, NULL); - ASSERT(req.result == UV_ENOENT); - ASSERT(r == UV_ENOENT); + ASSERT_EQ(req.result, UV_ENOENT); + ASSERT_EQ(r, UV_ENOENT); uv_fs_req_cleanup(&req); /* The destination should not exist. */ r = uv_fs_stat(NULL, &req, dst, NULL); - ASSERT(r != 0); + ASSERT(r); uv_fs_req_cleanup(&req); /* Succeeds if src and dst files are identical. */ touch_file(src, 12); r = uv_fs_copyfile(NULL, &req, src, src, 0, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); /* Verify that the src file did not get truncated. */ r = uv_fs_stat(NULL, &req, src, NULL); - ASSERT_EQ(r, 0); - ASSERT_EQ(req.statbuf.st_size, 12); + ASSERT_OK(r); + ASSERT_EQ(12, req.statbuf.st_size); uv_fs_req_cleanup(&req); unlink(src); /* Copies file synchronously. Creates new file. */ unlink(dst); r = uv_fs_copyfile(NULL, &req, fixture, dst, 0, NULL); - ASSERT(r == 0); + ASSERT_OK(r); handle_result(&req); /* Copies a file of size zero. */ unlink(dst); touch_file(src, 0); r = uv_fs_copyfile(NULL, &req, src, dst, 0, NULL); - ASSERT(r == 0); + ASSERT_OK(r); handle_result(&req); /* Copies file synchronously. Overwrites existing file. */ r = uv_fs_copyfile(NULL, &req, fixture, dst, 0, NULL); - ASSERT(r == 0); + ASSERT_OK(r); handle_result(&req); /* Fails to overwrites existing file. */ - ASSERT_EQ(uv_fs_chmod(NULL, &req, dst, 0644, NULL), 0); + ASSERT_OK(uv_fs_chmod(NULL, &req, dst, 0644, NULL)); uv_fs_req_cleanup(&req); r = uv_fs_copyfile(NULL, &req, fixture, dst, UV_FS_COPYFILE_EXCL, NULL); - ASSERT(r == UV_EEXIST); + ASSERT_EQ(r, UV_EEXIST); uv_fs_req_cleanup(&req); /* Truncates when an existing destination is larger than the source file. */ - ASSERT_EQ(uv_fs_chmod(NULL, &req, dst, 0644, NULL), 0); + ASSERT_OK(uv_fs_chmod(NULL, &req, dst, 0644, NULL)); uv_fs_req_cleanup(&req); touch_file(src, 1); r = uv_fs_copyfile(NULL, &req, src, dst, 0, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); handle_result(&req); /* Copies a larger file. */ unlink(dst); touch_file(src, 4096 * 2); r = uv_fs_copyfile(NULL, &req, src, dst, 0, NULL); - ASSERT(r == 0); + ASSERT_OK(r); handle_result(&req); unlink(src); /* Copies file asynchronously */ unlink(dst); r = uv_fs_copyfile(loop, &req, fixture, dst, 0, handle_result); - ASSERT(r == 0); - ASSERT(result_check_count == 5); + ASSERT_OK(r); + ASSERT_EQ(5, result_check_count); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(result_check_count == 6); + ASSERT_EQ(6, result_check_count); /* Ensure file is user-writable (not copied from src). */ - ASSERT_EQ(uv_fs_chmod(NULL, &req, dst, 0644, NULL), 0); + ASSERT_OK(uv_fs_chmod(NULL, &req, dst, 0644, NULL)); uv_fs_req_cleanup(&req); /* If the flags are invalid, the loop should not be kept open */ unlink(dst); r = uv_fs_copyfile(loop, &req, fixture, dst, -1, fail_cb); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_run(loop, UV_RUN_DEFAULT); /* Copies file using UV_FS_COPYFILE_FICLONE. */ unlink(dst); r = uv_fs_copyfile(NULL, &req, fixture, dst, UV_FS_COPYFILE_FICLONE, NULL); - ASSERT(r == 0); + ASSERT_OK(r); handle_result(&req); /* Copies file using UV_FS_COPYFILE_FICLONE_FORCE. */ unlink(dst); r = uv_fs_copyfile(NULL, &req, fixture, dst, UV_FS_COPYFILE_FICLONE_FORCE, NULL); - ASSERT(r <= 0); + ASSERT_LE(r, 0); if (r == 0) handle_result(&req); @@ -213,8 +213,8 @@ TEST_IMPL(fs_copyfile) { r = uv_fs_copyfile(NULL, &req, fixture, dst, 0, NULL); /* On IBMi PASE, qsecofr users can overwrite read-only files */ # ifndef __PASE__ - ASSERT(req.result == UV_EACCES); - ASSERT(r == UV_EACCES); + ASSERT_EQ(req.result, UV_EACCES); + ASSERT_EQ(r, UV_EACCES); # endif uv_fs_req_cleanup(&req); #endif diff --git a/deps/uv/test/test-fs-event.c b/deps/uv/test/test-fs-event.c index 9f231ebfc01e9a..7b5c0d8eb3d967 100644 --- a/deps/uv/test/test-fs-event.c +++ b/deps/uv/test/test-fs-event.c @@ -81,11 +81,11 @@ static void create_file(const char* name) { uv_fs_t req; r = uv_fs_open(NULL, &req, name, O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); file = r; uv_fs_req_cleanup(&req); r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); } @@ -96,17 +96,17 @@ static void touch_file(const char* name) { uv_buf_t buf; r = uv_fs_open(NULL, &req, name, O_RDWR, 0, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); file = r; uv_fs_req_cleanup(&req); buf = uv_buf_init("foo", 4); r = uv_fs_write(NULL, &req, file, &buf, 1, -1, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); uv_fs_req_cleanup(&req); r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); } @@ -125,15 +125,15 @@ static void fail_cb(uv_fs_event_t* handle, static void fs_event_cb_dir(uv_fs_event_t* handle, const char* filename, int events, int status) { ++fs_event_cb_called; - ASSERT(handle == &fs_event); - ASSERT(status == 0); - ASSERT(events == UV_CHANGE); + ASSERT_PTR_EQ(handle, &fs_event); + ASSERT_OK(status); + ASSERT_EQ(events, UV_CHANGE); #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__) - ASSERT(strcmp(filename, "file1") == 0); + ASSERT_OK(strcmp(filename, "file1")); #else ASSERT(filename == NULL || strcmp(filename, "file1") == 0); #endif - ASSERT(0 == uv_fs_event_stop(handle)); + ASSERT_OK(uv_fs_event_stop(handle)); uv_close((uv_handle_t*)handle, close_cb); } @@ -148,7 +148,7 @@ static const char* fs_event_get_filename(int i) { static void fs_event_create_files(uv_timer_t* handle) { /* Make sure we're not attempting to create files we do not intend */ - ASSERT(fs_event_created < fs_event_file_count); + ASSERT_LT(fs_event_created, fs_event_file_count); /* Create the file */ create_file(fs_event_get_filename(fs_event_created)); @@ -156,7 +156,7 @@ static void fs_event_create_files(uv_timer_t* handle) { if (++fs_event_created < fs_event_file_count) { /* Create another file on a different event loop tick. We do it this way * to avoid fs events coalescing into one fs event. */ - ASSERT_EQ(0, uv_timer_start(&timer, fs_event_create_files, 100, 0)); + ASSERT_OK(uv_timer_start(&timer, fs_event_create_files, 100, 0)); } } @@ -170,19 +170,19 @@ static void fs_event_unlink_files(uv_timer_t* handle) { for (i = 0; i < 16; i++) { r = remove(fs_event_get_filename(i)); if (handle != NULL) - ASSERT(r == 0); + ASSERT_OK(r); } } else { /* Make sure we're not attempting to remove files we do not intend */ - ASSERT(fs_event_removed < fs_event_file_count); + ASSERT_LT(fs_event_removed, fs_event_file_count); /* Remove the file */ - ASSERT(0 == remove(fs_event_get_filename(fs_event_removed))); + ASSERT_OK(remove(fs_event_get_filename(fs_event_removed))); if (++fs_event_removed < fs_event_file_count) { /* Remove another file on a different event loop tick. We do it this way * to avoid fs events coalescing into one fs event. */ - ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files, 1, 0)); + ASSERT_OK(uv_timer_start(&timer, fs_event_unlink_files, 1, 0)); } } } @@ -192,19 +192,19 @@ static void fs_event_cb_dir_multi_file(uv_fs_event_t* handle, int events, int status) { fs_event_cb_called++; - ASSERT(handle == &fs_event); - ASSERT(status == 0); + ASSERT_PTR_EQ(handle, &fs_event); + ASSERT_OK(status); ASSERT(events == UV_CHANGE || events == UV_RENAME); #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__) - ASSERT(strncmp(filename, file_prefix, sizeof(file_prefix) - 1) == 0); + ASSERT_OK(strncmp(filename, file_prefix, sizeof(file_prefix) - 1)); #else - ASSERT(filename == NULL || - strncmp(filename, file_prefix, sizeof(file_prefix) - 1) == 0); + ASSERT_NE(filename == NULL || + strncmp(filename, file_prefix, sizeof(file_prefix) - 1) == 0, 0); #endif if (fs_event_created + fs_event_removed == fs_event_file_count) { /* Once we've processed all create events, delete all files */ - ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files, 1, 0)); + ASSERT_OK(uv_timer_start(&timer, fs_event_unlink_files, 1, 0)); } else if (fs_event_cb_called == 2 * fs_event_file_count) { /* Once we've processed all create and delete events, stop watching */ uv_close((uv_handle_t*) &timer, close_cb); @@ -224,7 +224,7 @@ static const char* fs_event_get_filename_in_subdir(int i) { static void fs_event_create_files_in_subdir(uv_timer_t* handle) { /* Make sure we're not attempting to create files we do not intend */ - ASSERT(fs_event_created < fs_event_file_count); + ASSERT_LT(fs_event_created, fs_event_file_count); /* Create the file */ create_file(fs_event_get_filename_in_subdir(fs_event_created)); @@ -232,8 +232,7 @@ static void fs_event_create_files_in_subdir(uv_timer_t* handle) { if (++fs_event_created < fs_event_file_count) { /* Create another file on a different event loop tick. We do it this way * to avoid fs events coalescing into one fs event. */ - ASSERT_EQ(0, - uv_timer_start(&timer, fs_event_create_files_in_subdir, 100, 0)); + ASSERT_OK(uv_timer_start(&timer, fs_event_create_files_in_subdir, 100, 0)); } } @@ -247,19 +246,22 @@ static void fs_event_unlink_files_in_subdir(uv_timer_t* handle) { for (i = 0; i < 16; i++) { r = remove(fs_event_get_filename_in_subdir(i)); if (handle != NULL) - ASSERT(r == 0); + ASSERT_OK(r); } } else { /* Make sure we're not attempting to remove files we do not intend */ - ASSERT(fs_event_removed < fs_event_file_count); + ASSERT_LT(fs_event_removed, fs_event_file_count); /* Remove the file */ - ASSERT(0 == remove(fs_event_get_filename_in_subdir(fs_event_removed))); + ASSERT_OK(remove(fs_event_get_filename_in_subdir(fs_event_removed))); if (++fs_event_removed < fs_event_file_count) { /* Remove another file on a different event loop tick. We do it this way * to avoid fs events coalescing into one fs event. */ - ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files_in_subdir, 1, 0)); + ASSERT_OK(uv_timer_start(&timer, + fs_event_unlink_files_in_subdir, + 1, + 0)); } } } @@ -283,27 +285,30 @@ static void fs_event_cb_dir_multi_file_in_subdir(uv_fs_event_t* handle, return; fs_multievent_cb_called++; - ASSERT(handle == &fs_event); - ASSERT(status == 0); + ASSERT_PTR_EQ(handle, &fs_event); + ASSERT_OK(status); ASSERT(events == UV_CHANGE || events == UV_RENAME); #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__) - ASSERT(strncmp(filename, - file_prefix_in_subdir, - sizeof(file_prefix_in_subdir) - 1) == 0); + ASSERT_OK(strncmp(filename, + file_prefix_in_subdir, + sizeof(file_prefix_in_subdir) - 1)); #else - ASSERT(filename == NULL || - strncmp(filename, - file_prefix_in_subdir, - sizeof(file_prefix_in_subdir) - 1) == 0); + ASSERT_NE(filename == NULL || + strncmp(filename, + file_prefix_in_subdir, + sizeof(file_prefix_in_subdir) - 1) == 0, 0); #endif if (fs_event_created == fs_event_file_count && fs_multievent_cb_called == fs_event_created) { /* Once we've processed all create events, delete all files */ - ASSERT(0 == uv_timer_start(&timer, fs_event_unlink_files_in_subdir, 1, 0)); + ASSERT_OK(uv_timer_start(&timer, + fs_event_unlink_files_in_subdir, + 1, + 0)); } else if (fs_multievent_cb_called == 2 * fs_event_file_count) { /* Once we've processed all create and delete events, stop watching */ - ASSERT(fs_event_removed == fs_event_file_count); + ASSERT_EQ(fs_event_removed, fs_event_file_count); uv_close((uv_handle_t*) &timer, close_cb); uv_close((uv_handle_t*) handle, close_cb); } @@ -313,15 +318,15 @@ static void fs_event_cb_dir_multi_file_in_subdir(uv_fs_event_t* handle, static void fs_event_cb_file(uv_fs_event_t* handle, const char* filename, int events, int status) { ++fs_event_cb_called; - ASSERT(handle == &fs_event); - ASSERT(status == 0); - ASSERT(events == UV_CHANGE); + ASSERT_PTR_EQ(handle, &fs_event); + ASSERT_OK(status); + ASSERT_EQ(events, UV_CHANGE); #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__) - ASSERT(strcmp(filename, "file2") == 0); + ASSERT_OK(strcmp(filename, "file2")); #else ASSERT(filename == NULL || strcmp(filename, "file2") == 0); #endif - ASSERT(0 == uv_fs_event_stop(handle)); + ASSERT_OK(uv_fs_event_stop(handle)); uv_close((uv_handle_t*)handle, close_cb); } @@ -329,11 +334,11 @@ static void fs_event_cb_file_current_dir(uv_fs_event_t* handle, const char* filename, int events, int status) { ++fs_event_cb_called; - ASSERT(handle == &fs_event); - ASSERT(status == 0); - ASSERT(events == UV_CHANGE); + ASSERT_PTR_EQ(handle, &fs_event); + ASSERT_OK(status); + ASSERT_EQ(events, UV_CHANGE); #if defined(__APPLE__) || defined(_WIN32) || defined(__linux__) - ASSERT(strcmp(filename, "watch_file") == 0); + ASSERT_OK(strcmp(filename, "watch_file")); #else ASSERT(filename == NULL || strcmp(filename, "watch_file") == 0); #endif @@ -366,7 +371,7 @@ static void timer_cb_exact(uv_timer_t* handle) { } else { uv_close((uv_handle_t*)handle, NULL); r = uv_fs_event_stop(&fs_event); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &fs_event, NULL); } @@ -384,9 +389,9 @@ static void fs_event_cb_close(uv_fs_event_t* handle, const char* filename, int events, int status) { - ASSERT(status == 0); + ASSERT_OK(status); - ASSERT(fs_event_cb_called < 3); + ASSERT_LT(fs_event_cb_called, 3); ++fs_event_cb_called; if (fs_event_cb_called == 3) { @@ -400,6 +405,8 @@ TEST_IMPL(fs_event_watch_dir) { RETURN_SKIP(NO_FS_EVENTS); #elif defined(__MVS__) RETURN_SKIP("Directory watching not supported on this platform."); +#elif defined(__APPLE__) && defined(__TSAN__) + RETURN_SKIP("Times out under TSAN."); #endif uv_loop_t* loop = uv_default_loop(); @@ -413,18 +420,18 @@ TEST_IMPL(fs_event_watch_dir) { create_dir("watch_dir"); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_cb_dir_multi_file, "watch_dir", 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, fs_event_create_files, 100, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fs_event_cb_called == fs_event_created + fs_event_removed); - ASSERT(close_cb_called == 2); + ASSERT_EQ(fs_event_cb_called, fs_event_created + fs_event_removed); + ASSERT_EQ(2, close_cb_called); /* Cleanup */ fs_event_unlink_files(NULL); @@ -438,7 +445,9 @@ TEST_IMPL(fs_event_watch_dir) { TEST_IMPL(fs_event_watch_dir_recursive) { -#if defined(__APPLE__) || defined(_WIN32) +#if defined(__APPLE__) && defined(__TSAN__) + RETURN_SKIP("Times out under TSAN."); +#elif defined(__APPLE__) || defined(_WIN32) uv_loop_t* loop; int r; uv_fs_event_t fs_event_root; @@ -454,27 +463,27 @@ TEST_IMPL(fs_event_watch_dir_recursive) { create_dir("watch_dir/subdir"); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_cb_dir_multi_file_in_subdir, "watch_dir", UV_FS_EVENT_RECURSIVE); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, fs_event_create_files_in_subdir, 100, 0); - ASSERT(r == 0); + ASSERT_OK(r); #ifndef _WIN32 /* Also try to watch the root directory. * This will be noisier, so we're just checking for any couple events to happen. */ r = uv_fs_event_init(loop, &fs_event_root); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event_root, fs_event_cb_close, "/", UV_FS_EVENT_RECURSIVE); - ASSERT(r == 0); + ASSERT_OK(r); #else fs_event_cb_called += 3; close_cb_called += 1; @@ -483,9 +492,9 @@ TEST_IMPL(fs_event_watch_dir_recursive) { uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fs_multievent_cb_called == fs_event_created + fs_event_removed); - ASSERT(fs_event_cb_called == 3); - ASSERT(close_cb_called == 3); + ASSERT_EQ(fs_multievent_cb_called, fs_event_created + fs_event_removed); + ASSERT_EQ(3, fs_event_cb_called); + ASSERT_EQ(3, close_cb_called); /* Cleanup */ fs_event_unlink_files_in_subdir(NULL); @@ -522,19 +531,19 @@ TEST_IMPL(fs_event_watch_dir_short_path) { has_shortnames = uv_fs_stat(NULL, &req, "watch_~1", NULL) != UV_ENOENT; if (has_shortnames) { r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_cb_dir, "watch_~1", 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, timer_cb_file, 100, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fs_event_cb_called == 1); - ASSERT(timer_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, fs_event_cb_called); + ASSERT_EQ(1, timer_cb_called); + ASSERT_EQ(1, close_cb_called); } /* Cleanup */ @@ -568,19 +577,19 @@ TEST_IMPL(fs_event_watch_file) { create_file("watch_dir/file2"); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_cb_file, "watch_dir/file2", 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, timer_cb_file, 100, 100); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fs_event_cb_called == 1); - ASSERT(timer_cb_called == 2); - ASSERT(close_cb_called == 2); + ASSERT_EQ(1, fs_event_cb_called); + ASSERT_EQ(2, timer_cb_called); + ASSERT_EQ(2, close_cb_called); /* Cleanup */ remove("watch_dir/file2"); @@ -624,16 +633,16 @@ TEST_IMPL(fs_event_watch_file_exact_path) { #endif r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_fail, "watch_dir/file.jsx", 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, timer_cb_exact, 100, 100); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(timer_cb_exact_called == 2); + ASSERT_OK(r); + ASSERT_EQ(2, timer_cb_exact_called); /* Cleanup */ remove("watch_dir/file.js"); @@ -656,13 +665,13 @@ TEST_IMPL(fs_event_watch_file_twice) { loop = uv_default_loop(); timer.data = watchers; - ASSERT(0 == uv_fs_event_init(loop, watchers + 0)); - ASSERT(0 == uv_fs_event_start(watchers + 0, fail_cb, path, 0)); - ASSERT(0 == uv_fs_event_init(loop, watchers + 1)); - ASSERT(0 == uv_fs_event_start(watchers + 1, fail_cb, path, 0)); - ASSERT(0 == uv_timer_init(loop, &timer)); - ASSERT(0 == uv_timer_start(&timer, timer_cb_watch_twice, 10, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_fs_event_init(loop, watchers + 0)); + ASSERT_OK(uv_fs_event_start(watchers + 0, fail_cb, path, 0)); + ASSERT_OK(uv_fs_event_init(loop, watchers + 1)); + ASSERT_OK(uv_fs_event_start(watchers + 1, fail_cb, path, 0)); + ASSERT_OK(uv_timer_init(loop, &timer)); + ASSERT_OK(uv_timer_start(&timer, timer_cb_watch_twice, 10, 0)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -690,31 +699,31 @@ TEST_IMPL(fs_event_watch_file_current_dir) { #endif r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_cb_file_current_dir, "watch_file", 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); timer.data = "watch_file"; r = uv_timer_start(&timer, timer_cb_touch, 1100, 0); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(timer_cb_touch_called == 0); - ASSERT(fs_event_cb_called == 0); - ASSERT(close_cb_called == 0); + ASSERT_OK(timer_cb_touch_called); + ASSERT_OK(fs_event_cb_called); + ASSERT_OK(close_cb_called); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(timer_cb_touch_called == 1); + ASSERT_EQ(1, timer_cb_touch_called); /* FSEvents on macOS sometimes sends one change event, sometimes two. */ ASSERT_NE(0, fs_event_cb_called); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); /* Cleanup */ remove("watch_file"); @@ -737,11 +746,11 @@ TEST_IMPL(fs_event_watch_file_root_dir) { loop = uv_default_loop(); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fail_cb, path, 0); if (r == UV_ENOENT) RETURN_SKIP("bootsect.bak doesn't exist in system root.\n"); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &fs_event, NULL); @@ -765,20 +774,20 @@ TEST_IMPL(fs_event_no_callback_after_close) { create_file("watch_dir/file1"); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_cb_file, "watch_dir/file1", 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*)&fs_event, close_cb); touch_file("watch_dir/file1"); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fs_event_cb_called == 0); - ASSERT(close_cb_called == 1); + ASSERT_OK(fs_event_cb_called); + ASSERT_EQ(1, close_cb_called); /* Cleanup */ remove("watch_dir/file1"); @@ -803,19 +812,19 @@ TEST_IMPL(fs_event_no_callback_on_close) { create_file("watch_dir/file1"); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_cb_file, "watch_dir/file1", 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*)&fs_event, close_cb); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fs_event_cb_called == 0); - ASSERT(close_cb_called == 1); + ASSERT_OK(fs_event_cb_called); + ASSERT_EQ(1, close_cb_called); /* Cleanup */ remove("watch_dir/file1"); @@ -830,9 +839,9 @@ static void timer_cb(uv_timer_t* handle) { int r; r = uv_fs_event_init(handle->loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_fail, ".", 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*)&fs_event, close_cb); uv_close((uv_handle_t*)handle, close_cb); @@ -850,14 +859,14 @@ TEST_IMPL(fs_event_immediate_close) { loop = uv_default_loop(); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, timer_cb, 1, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(close_cb_called == 2); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -877,9 +886,9 @@ TEST_IMPL(fs_event_close_with_pending_event) { create_file("watch_dir/file"); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_fail, "watch_dir", 0); - ASSERT(r == 0); + ASSERT_OK(r); /* Generate an fs event. */ touch_file("watch_dir/file"); @@ -888,7 +897,7 @@ TEST_IMPL(fs_event_close_with_pending_event) { uv_run(loop, UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); /* Clean up */ remove("watch_dir/file"); @@ -911,9 +920,9 @@ TEST_IMPL(fs_event_close_with_pending_delete_event) { create_file("watch_dir/file"); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_fail, "watch_dir/file", 0); - ASSERT(r == 0); + ASSERT_OK(r); /* Generate an fs event. */ remove("watch_dir/file"); @@ -927,7 +936,7 @@ TEST_IMPL(fs_event_close_with_pending_delete_event) { uv_run(loop, UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); /* Clean up */ remove("watch_dir/"); @@ -941,6 +950,8 @@ TEST_IMPL(fs_event_close_in_callback) { RETURN_SKIP(NO_FS_EVENTS); #elif defined(__MVS__) RETURN_SKIP("Directory watching not supported on this platform."); +#elif defined(__APPLE__) && defined(__TSAN__) + RETURN_SKIP("Times out under TSAN."); #endif uv_loop_t* loop; int r; @@ -951,14 +962,14 @@ TEST_IMPL(fs_event_close_in_callback) { create_dir("watch_dir"); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_cb_close, "watch_dir", 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, fs_event_create_files, 100, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); @@ -966,8 +977,8 @@ TEST_IMPL(fs_event_close_in_callback) { uv_run(loop, UV_RUN_ONCE); - ASSERT(close_cb_called == 2); - ASSERT(fs_event_cb_called == 3); + ASSERT_EQ(2, close_cb_called); + ASSERT_EQ(3, fs_event_cb_called); /* Clean up */ fs_event_unlink_files(NULL); @@ -991,21 +1002,21 @@ TEST_IMPL(fs_event_start_and_close) { create_dir("watch_dir"); r = uv_fs_event_init(loop, &fs_event1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event1, fs_event_cb_dir, "watch_dir", 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_init(loop, &fs_event2); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event2, fs_event_cb_dir, "watch_dir", 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &fs_event2, close_cb); uv_close((uv_handle_t*) &fs_event1, close_cb); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(close_cb_called == 2); + ASSERT_EQ(2, close_cb_called); remove("watch_dir/"); MAKE_VALGRIND_HAPPY(loop); @@ -1035,28 +1046,28 @@ TEST_IMPL(fs_event_getpath) { for (i = 0; i < ARRAY_SIZE(watch_dir); i++) { r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); len = sizeof buf; r = uv_fs_event_getpath(&fs_event, buf, &len); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_event_start(&fs_event, fail_cb, watch_dir[i], 0); - ASSERT(r == 0); + ASSERT_OK(r); len = 0; r = uv_fs_event_getpath(&fs_event, buf, &len); - ASSERT(r == UV_ENOBUFS); - ASSERT(len < sizeof buf); /* sanity check */ - ASSERT(len == strlen(watch_dir[i]) + 1); + ASSERT_EQ(r, UV_ENOBUFS); + ASSERT_LT(len, sizeof buf); /* sanity check */ + ASSERT_EQ(len, strlen(watch_dir[i]) + 1); r = uv_fs_event_getpath(&fs_event, buf, &len); - ASSERT(r == 0); - ASSERT(len == strlen(watch_dir[i])); + ASSERT_OK(r); + ASSERT_EQ(len, strlen(watch_dir[i])); ASSERT(strcmp(buf, watch_dir[i]) == 0); r = uv_fs_event_stop(&fs_event); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &fs_event, close_cb); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); close_cb_called = 0; } @@ -1108,43 +1119,43 @@ TEST_IMPL(fs_event_error_reporting) { */ for (i = 0; i < ARRAY_SIZE(loops); i++) { loop = &loops[i]; - ASSERT(0 == uv_loop_init(loop)); + ASSERT_OK(uv_loop_init(loop)); event = &events[i]; timer_cb_called = 0; close_cb_called = 0; - ASSERT(0 == uv_fs_event_init(loop, event)); - ASSERT(0 == uv_fs_event_start(event, - fs_event_error_report_cb, - "watch_dir", - 0)); + ASSERT_OK(uv_fs_event_init(loop, event)); + ASSERT_OK(uv_fs_event_start(event, + fs_event_error_report_cb, + "watch_dir", + 0)); uv_unref((uv_handle_t*) event); /* Let loop run for some time */ - ASSERT(0 == uv_timer_init(loop, &timer)); - ASSERT(0 == uv_timer_start(&timer, timer_cb_nop, 2, 0)); + ASSERT_OK(uv_timer_init(loop, &timer)); + ASSERT_OK(uv_timer_start(&timer, timer_cb_nop, 2, 0)); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(1 == timer_cb_called); - ASSERT(1 == close_cb_called); + ASSERT_EQ(1, timer_cb_called); + ASSERT_EQ(1, close_cb_called); if (fs_event_error_reported != 0) break; } /* At least one loop should fail */ - ASSERT(fs_event_error_reported == UV_EMFILE); + ASSERT_EQ(fs_event_error_reported, UV_EMFILE); /* Stop and close all events, and destroy loops */ do { loop = &loops[i]; event = &events[i]; - ASSERT(0 == uv_fs_event_stop(event)); + ASSERT_OK(uv_fs_event_stop(event)); uv_ref((uv_handle_t*) event); uv_close((uv_handle_t*) event, fs_event_error_report_close_cb); close_cb_called = 0; uv_run(loop, UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); uv_loop_close(loop); } while (i-- != 0); @@ -1175,13 +1186,13 @@ TEST_IMPL(fs_event_watch_invalid_path) { loop = uv_default_loop(); r = uv_fs_event_init(loop, &fs_event); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event, fs_event_cb_file, "<:;", 0); - ASSERT(r != 0); - ASSERT(uv_is_active((uv_handle_t*) &fs_event) == 0); + ASSERT(r); + ASSERT_OK(uv_is_active((uv_handle_t*) &fs_event)); r = uv_fs_event_start(&fs_event, fs_event_cb_file, "", 0); - ASSERT(r != 0); - ASSERT(uv_is_active((uv_handle_t*) &fs_event) == 0); + ASSERT(r); + ASSERT_OK(uv_is_active((uv_handle_t*) &fs_event)); MAKE_VALGRIND_HAPPY(loop); return 0; } @@ -1206,24 +1217,24 @@ TEST_IMPL(fs_event_stop_in_cb) { remove(path); create_file(path); - ASSERT_EQ(0, uv_fs_event_init(uv_default_loop(), &fs)); - ASSERT_EQ(0, uv_fs_event_start(&fs, fs_event_cb_stop, path, 0)); + ASSERT_OK(uv_fs_event_init(uv_default_loop(), &fs)); + ASSERT_OK(uv_fs_event_start(&fs, fs_event_cb_stop, path, 0)); /* Note: timer_cb_touch() closes the handle. */ timer.data = path; - ASSERT_EQ(0, uv_timer_init(uv_default_loop(), &timer)); - ASSERT_EQ(0, uv_timer_start(&timer, timer_cb_touch, 100, 0)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &timer)); + ASSERT_OK(uv_timer_start(&timer, timer_cb_touch, 100, 0)); - ASSERT_EQ(0, fs_event_cb_stop_calls); - ASSERT_EQ(0, timer_cb_touch_called); + ASSERT_OK(fs_event_cb_stop_calls); + ASSERT_OK(timer_cb_touch_called); - ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); ASSERT_EQ(1, fs_event_cb_stop_calls); ASSERT_EQ(1, timer_cb_touch_called); uv_close((uv_handle_t*) &fs, NULL); - ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); ASSERT_EQ(1, fs_event_cb_stop_calls); remove(path); diff --git a/deps/uv/test/test-fs-fd-hash.c b/deps/uv/test/test-fs-fd-hash.c index 8b4bc0351b334e..4ed3d548e62171 100644 --- a/deps/uv/test/test-fs-fd-hash.c +++ b/deps/uv/test/test-fs-fd-hash.c @@ -43,7 +43,7 @@ void assert_nonexistent(int fd) { void assert_existent(int fd) { struct uv__fd_info_s info = { 0 }; ASSERT(uv__fd_hash_get(fd, &info)); - ASSERT(info.flags == fd + FD_DIFF); + ASSERT_EQ(info.flags, fd + FD_DIFF); } void assert_insertion(int fd) { @@ -58,7 +58,7 @@ void assert_removal(int fd) { struct uv__fd_info_s info = { 0 }; assert_existent(fd); uv__fd_hash_remove(fd, &info); - ASSERT(info.flags == fd + FD_DIFF); + ASSERT_EQ(info.flags, fd + FD_DIFF); assert_nonexistent(fd); } @@ -106,7 +106,7 @@ TEST_IMPL(fs_fd_hash) { { struct uv__fd_info_s info = { 0 }; ASSERT(uv__fd_hash_get(0, &info)); - ASSERT(info.flags == FD_DIFF + FD_DIFF); + ASSERT_EQ(info.flags, FD_DIFF + FD_DIFF); } { /* Leave as it was, will be again tested below */ diff --git a/deps/uv/test/test-fs-open-flags.c b/deps/uv/test/test-fs-open-flags.c index ea9be25afc1593..e64ac20d72b5f4 100644 --- a/deps/uv/test/test-fs-open-flags.c +++ b/deps/uv/test/test-fs-open-flags.c @@ -68,8 +68,8 @@ static void setup(void) { uv_fs_req_cleanup(&rmdir_req); r = uv_fs_mkdir(NULL, &mkdir_req, empty_dir, 0755, NULL); - ASSERT(r == 0); - ASSERT(mkdir_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(mkdir_req.result); uv_fs_req_cleanup(&mkdir_req); } @@ -89,13 +89,13 @@ static void refresh(void) { r = uv_fs_open(NULL, &open_req, empty_file, UV_FS_O_TRUNC | UV_FS_O_CREAT | UV_FS_O_WRONLY, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req.result, 0); uv_fs_req_cleanup(&open_req); r = uv_fs_close(NULL, &close_req, open_req.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* dummy_file */ @@ -103,19 +103,19 @@ static void refresh(void) { r = uv_fs_open(NULL, &open_req, dummy_file, UV_FS_O_TRUNC | UV_FS_O_CREAT | UV_FS_O_WRONLY, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req.result, 0); uv_fs_req_cleanup(&open_req); iov = uv_buf_init("a", 1); r = uv_fs_write(NULL, &write_req, open_req.result, &iov, 1, -1, NULL); - ASSERT(r == 1); - ASSERT(write_req.result == 1); + ASSERT_EQ(1, r); + ASSERT_EQ(1, write_req.result); uv_fs_req_cleanup(&write_req); r = uv_fs_close(NULL, &close_req, open_req.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); } @@ -131,14 +131,14 @@ static void openFail(char *file, int error) { refresh(); r = uv_fs_open(NULL, &open_req, file, flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r == error); - ASSERT(open_req.result == error); + ASSERT_EQ(r, error); + ASSERT_EQ(open_req.result, error); uv_fs_req_cleanup(&open_req); /* Ensure the first call does not create the file */ r = uv_fs_open(NULL, &open_req, file, flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r == error); - ASSERT(open_req.result == error); + ASSERT_EQ(r, error); + ASSERT_EQ(open_req.result, error); uv_fs_req_cleanup(&open_req); cleanup(); @@ -150,8 +150,8 @@ static void refreshOpen(char *file) { refresh(); r = uv_fs_open(NULL, &open_req, file, flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req.result, 0); uv_fs_req_cleanup(&open_req); } @@ -162,37 +162,37 @@ static void writeExpect(char *file, char *expected, int size) { iov = uv_buf_init("b", 1); r = uv_fs_write(NULL, &write_req, open_req.result, &iov, 1, -1, NULL); - ASSERT(r == 1); - ASSERT(write_req.result == 1); + ASSERT_EQ(1, r); + ASSERT_EQ(1, write_req.result); uv_fs_req_cleanup(&write_req); iov = uv_buf_init("c", 1); r = uv_fs_write(NULL, &write_req, open_req.result, &iov, 1, -1, NULL); - ASSERT(r == 1); - ASSERT(write_req.result == 1); + ASSERT_EQ(1, r); + ASSERT_EQ(1, write_req.result); uv_fs_req_cleanup(&write_req); r = uv_fs_close(NULL, &close_req, open_req.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* Check contents */ r = uv_fs_open(NULL, &open_req, file, UV_FS_O_RDONLY, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req.result, 0); uv_fs_req_cleanup(&open_req); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req.result, &iov, 1, -1, NULL); - ASSERT(r == size); - ASSERT(read_req.result == size); - ASSERT(strncmp(buf, expected, size) == 0); + ASSERT_EQ(r, size); + ASSERT_EQ(read_req.result, size); + ASSERT_OK(strncmp(buf, expected, size)); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); cleanup(); @@ -205,19 +205,19 @@ static void writeFail(char *file, int error) { iov = uv_buf_init("z", 1); r = uv_fs_write(NULL, &write_req, open_req.result, &iov, 1, -1, NULL); - ASSERT(r == error); - ASSERT(write_req.result == error); + ASSERT_EQ(r, error); + ASSERT_EQ(write_req.result, error); uv_fs_req_cleanup(&write_req); iov = uv_buf_init("z", 1); r = uv_fs_write(NULL, &write_req, open_req.result, &iov, 1, -1, NULL); - ASSERT(r == error); - ASSERT(write_req.result == error); + ASSERT_EQ(r, error); + ASSERT_EQ(write_req.result, error); uv_fs_req_cleanup(&write_req); r = uv_fs_close(NULL, &close_req, open_req.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); cleanup(); @@ -230,14 +230,14 @@ static void readExpect(char *file, char *expected, int size) { iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req.result, &iov, 1, -1, NULL); - ASSERT(r == size); - ASSERT(read_req.result == size); - ASSERT(strncmp(buf, expected, size) == 0); + ASSERT_EQ(r, size); + ASSERT_EQ(read_req.result, size); + ASSERT_OK(strncmp(buf, expected, size)); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); cleanup(); @@ -250,19 +250,19 @@ static void readFail(char *file, int error) { iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req.result, &iov, 1, -1, NULL); - ASSERT(r == error); - ASSERT(read_req.result == error); + ASSERT_EQ(r, error); + ASSERT_EQ(read_req.result, error); uv_fs_req_cleanup(&read_req); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req.result, &iov, 1, -1, NULL); - ASSERT(r == error); - ASSERT(read_req.result == error); + ASSERT_EQ(r, error); + ASSERT_EQ(read_req.result, error); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); cleanup(); diff --git a/deps/uv/test/test-fs-poll.c b/deps/uv/test/test-fs-poll.c index af486023d10c87..5f95baf3d3f464 100644 --- a/deps/uv/test/test-fs-poll.c +++ b/deps/uv/test/test-fs-poll.c @@ -103,44 +103,44 @@ static void poll_cb(uv_fs_poll_t* handle, memset(&zero_statbuf, 0, sizeof(zero_statbuf)); - ASSERT(handle == &poll_handle); - ASSERT(1 == uv_is_active((uv_handle_t*) handle)); + ASSERT_PTR_EQ(handle, &poll_handle); + ASSERT_EQ(1, uv_is_active((uv_handle_t*) handle)); ASSERT_NOT_NULL(prev); ASSERT_NOT_NULL(curr); switch (poll_cb_called++) { case 0: - ASSERT(status == UV_ENOENT); - ASSERT(0 == memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 == memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); + ASSERT_EQ(status, UV_ENOENT); + ASSERT_OK(memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); + ASSERT_OK(memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); touch_file(FIXTURE); break; case 1: - ASSERT(status == 0); - ASSERT(0 == memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 != memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 20, 0)); + ASSERT_OK(status); + ASSERT_OK(memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); + ASSERT_NE(0, memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, 20, 0)); break; case 2: - ASSERT(status == 0); - ASSERT(0 != memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 != memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 200, 0)); + ASSERT_OK(status); + ASSERT_NE(0, memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); + ASSERT_NE(0, memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, 200, 0)); break; case 3: - ASSERT(status == 0); - ASSERT(0 != memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 != memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); + ASSERT_OK(status); + ASSERT_NE(0, memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); + ASSERT_NE(0, memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); remove(FIXTURE); break; case 4: - ASSERT(status == UV_ENOENT); - ASSERT(0 != memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); - ASSERT(0 == memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); + ASSERT_EQ(status, UV_ENOENT); + ASSERT_NE(0, memcmp(prev, &zero_statbuf, sizeof(zero_statbuf))); + ASSERT_OK(memcmp(curr, &zero_statbuf, sizeof(zero_statbuf))); uv_close((uv_handle_t*)handle, close_cb); break; @@ -155,14 +155,14 @@ TEST_IMPL(fs_poll) { remove(FIXTURE); - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_fs_poll_init(loop, &poll_handle)); - ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb, FIXTURE, 100)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_timer_init(loop, &timer_handle)); + ASSERT_OK(uv_fs_poll_init(loop, &poll_handle)); + ASSERT_OK(uv_fs_poll_start(&poll_handle, poll_cb, FIXTURE, 100)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(poll_cb_called == 5); - ASSERT(timer_cb_called == 2); - ASSERT(close_cb_called == 1); + ASSERT_EQ(5, poll_cb_called); + ASSERT_EQ(2, timer_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -176,21 +176,21 @@ TEST_IMPL(fs_poll_getpath) { remove(FIXTURE); - ASSERT(0 == uv_fs_poll_init(loop, &poll_handle)); + ASSERT_OK(uv_fs_poll_init(loop, &poll_handle)); len = sizeof buf; - ASSERT(UV_EINVAL == uv_fs_poll_getpath(&poll_handle, buf, &len)); - ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb_fail, FIXTURE, 100)); + ASSERT_EQ(UV_EINVAL, uv_fs_poll_getpath(&poll_handle, buf, &len)); + ASSERT_OK(uv_fs_poll_start(&poll_handle, poll_cb_fail, FIXTURE, 100)); len = sizeof buf; - ASSERT(0 == uv_fs_poll_getpath(&poll_handle, buf, &len)); - ASSERT(buf[len - 1] != 0); - ASSERT(buf[len] == '\0'); - ASSERT(0 == memcmp(buf, FIXTURE, len)); + ASSERT_OK(uv_fs_poll_getpath(&poll_handle, buf, &len)); + ASSERT_NE(0, buf[len - 1]); + ASSERT_EQ(buf[len], '\0'); + ASSERT_OK(memcmp(buf, FIXTURE, len)); uv_close((uv_handle_t*) &poll_handle, close_cb); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -203,14 +203,14 @@ TEST_IMPL(fs_poll_close_request) { remove(FIXTURE); - ASSERT(0 == uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); - ASSERT(0 == uv_fs_poll_init(&loop, &poll_handle)); - ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb_fail, FIXTURE, 100)); + ASSERT_OK(uv_fs_poll_init(&loop, &poll_handle)); + ASSERT_OK(uv_fs_poll_start(&poll_handle, poll_cb_fail, FIXTURE, 100)); uv_close((uv_handle_t*) &poll_handle, close_cb); while (close_cb_called == 0) uv_run(&loop, UV_RUN_ONCE); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(&loop); return 0; @@ -223,18 +223,18 @@ TEST_IMPL(fs_poll_close_request_multi_start_stop) { remove(FIXTURE); - ASSERT(0 == uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); - ASSERT(0 == uv_fs_poll_init(&loop, &poll_handle)); + ASSERT_OK(uv_fs_poll_init(&loop, &poll_handle)); for (i = 0; i < 10; ++i) { - ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb_fail, FIXTURE, 100)); - ASSERT(0 == uv_fs_poll_stop(&poll_handle)); + ASSERT_OK(uv_fs_poll_start(&poll_handle, poll_cb_fail, FIXTURE, 100)); + ASSERT_OK(uv_fs_poll_stop(&poll_handle)); } uv_close((uv_handle_t*) &poll_handle, close_cb); while (close_cb_called == 0) uv_run(&loop, UV_RUN_ONCE); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(&loop); return 0; @@ -247,18 +247,18 @@ TEST_IMPL(fs_poll_close_request_multi_stop_start) { remove(FIXTURE); - ASSERT(0 == uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); - ASSERT(0 == uv_fs_poll_init(&loop, &poll_handle)); + ASSERT_OK(uv_fs_poll_init(&loop, &poll_handle)); for (i = 0; i < 10; ++i) { - ASSERT(0 == uv_fs_poll_stop(&poll_handle)); - ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb_fail, FIXTURE, 100)); + ASSERT_OK(uv_fs_poll_stop(&poll_handle)); + ASSERT_OK(uv_fs_poll_start(&poll_handle, poll_cb_fail, FIXTURE, 100)); } uv_close((uv_handle_t*) &poll_handle, close_cb); while (close_cb_called == 0) uv_run(&loop, UV_RUN_ONCE); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(&loop); return 0; @@ -271,21 +271,21 @@ TEST_IMPL(fs_poll_close_request_stop_when_active) { remove(FIXTURE); - ASSERT(0 == uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); /* Set up all handles. */ - ASSERT(0 == uv_fs_poll_init(&loop, &poll_handle)); - ASSERT(0 == uv_fs_poll_start(&poll_handle, poll_cb_noop, FIXTURE, 100)); + ASSERT_OK(uv_fs_poll_init(&loop, &poll_handle)); + ASSERT_OK(uv_fs_poll_start(&poll_handle, poll_cb_noop, FIXTURE, 100)); uv_run(&loop, UV_RUN_ONCE); /* Close the timer handle, and do not crash. */ - ASSERT(0 == uv_fs_poll_stop(&poll_handle)); + ASSERT_OK(uv_fs_poll_stop(&poll_handle)); uv_run(&loop, UV_RUN_ONCE); /* Clean up after the test. */ uv_close((uv_handle_t*) &poll_handle, close_cb); uv_run(&loop, UV_RUN_ONCE); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(&loop); return 0; diff --git a/deps/uv/test/test-fs-readdir.c b/deps/uv/test/test-fs-readdir.c index 43c9edf178be98..b6b5b7ff2c1d71 100644 --- a/deps/uv/test/test-fs-readdir.c +++ b/deps/uv/test/test-fs-readdir.c @@ -47,9 +47,9 @@ static void cleanup_test_files(void) { } static void empty_closedir_cb(uv_fs_t* req) { - ASSERT(req == &closedir_req); - ASSERT(req->fs_type == UV_FS_CLOSEDIR); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &closedir_req); + ASSERT_EQ(req->fs_type, UV_FS_CLOSEDIR); + ASSERT_OK(req->result); ++empty_closedir_cb_count; uv_fs_req_cleanup(req); } @@ -58,25 +58,25 @@ static void empty_readdir_cb(uv_fs_t* req) { uv_dir_t* dir; int r; - ASSERT(req == &readdir_req); - ASSERT(req->fs_type == UV_FS_READDIR); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &readdir_req); + ASSERT_EQ(req->fs_type, UV_FS_READDIR); + ASSERT_OK(req->result); dir = req->ptr; uv_fs_req_cleanup(req); r = uv_fs_closedir(uv_default_loop(), &closedir_req, dir, empty_closedir_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void empty_opendir_cb(uv_fs_t* req) { uv_dir_t* dir; int r; - ASSERT(req == &opendir_req); - ASSERT(req->fs_type == UV_FS_OPENDIR); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &opendir_req); + ASSERT_EQ(req->fs_type, UV_FS_OPENDIR); + ASSERT_OK(req->result); ASSERT_NOT_NULL(req->ptr); dir = req->ptr; dir->dirents = dirents; @@ -85,7 +85,7 @@ static void empty_opendir_cb(uv_fs_t* req) { &readdir_req, dir, empty_readdir_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(req); ++empty_opendir_cb_count; } @@ -115,9 +115,9 @@ TEST_IMPL(fs_readdir_empty_dir) { &opendir_req, path, NULL); - ASSERT(r == 0); - ASSERT(opendir_req.fs_type == UV_FS_OPENDIR); - ASSERT(opendir_req.result == 0); + ASSERT_OK(r); + ASSERT_EQ(opendir_req.fs_type, UV_FS_OPENDIR); + ASSERT_OK(opendir_req.result); ASSERT_NOT_NULL(opendir_req.ptr); dir = opendir_req.ptr; uv_fs_req_cleanup(&opendir_req); @@ -130,13 +130,13 @@ TEST_IMPL(fs_readdir_empty_dir) { &readdir_req, dir, NULL); - ASSERT(nb_entries_read == 0); + ASSERT_OK(nb_entries_read); uv_fs_req_cleanup(&readdir_req); /* Fill the req to ensure that required fields are cleaned up. */ memset(&closedir_req, 0xdb, sizeof(closedir_req)); uv_fs_closedir(uv_default_loop(), &closedir_req, dir, NULL); - ASSERT(closedir_req.result == 0); + ASSERT_OK(closedir_req.result); uv_fs_req_cleanup(&closedir_req); /* Testing the asynchronous flavor. */ @@ -147,13 +147,13 @@ TEST_IMPL(fs_readdir_empty_dir) { memset(&closedir_req, 0xdb, sizeof(closedir_req)); r = uv_fs_opendir(uv_default_loop(), &opendir_req, path, empty_opendir_cb); - ASSERT(r == 0); - ASSERT(empty_opendir_cb_count == 0); - ASSERT(empty_closedir_cb_count == 0); + ASSERT_OK(r); + ASSERT_OK(empty_opendir_cb_count); + ASSERT_OK(empty_closedir_cb_count); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(empty_opendir_cb_count == 1); - ASSERT(empty_closedir_cb_count == 1); + ASSERT_OK(r); + ASSERT_EQ(1, empty_opendir_cb_count); + ASSERT_EQ(1, empty_closedir_cb_count); uv_fs_rmdir(uv_default_loop(), &rmdir_req, path, NULL); uv_fs_req_cleanup(&rmdir_req); MAKE_VALGRIND_HAPPY(uv_default_loop()); @@ -168,9 +168,9 @@ TEST_IMPL(fs_readdir_empty_dir) { static int non_existing_opendir_cb_count; static void non_existing_opendir_cb(uv_fs_t* req) { - ASSERT(req == &opendir_req); - ASSERT(req->fs_type == UV_FS_OPENDIR); - ASSERT(req->result == UV_ENOENT); + ASSERT_PTR_EQ(req, &opendir_req); + ASSERT_EQ(req->fs_type, UV_FS_OPENDIR); + ASSERT_EQ(req->result, UV_ENOENT); ASSERT_NULL(req->ptr); uv_fs_req_cleanup(req); @@ -188,9 +188,9 @@ TEST_IMPL(fs_readdir_non_existing_dir) { /* Testing the synchronous flavor. */ r = uv_fs_opendir(uv_default_loop(), &opendir_req, path, NULL); - ASSERT(r == UV_ENOENT); - ASSERT(opendir_req.fs_type == UV_FS_OPENDIR); - ASSERT(opendir_req.result == UV_ENOENT); + ASSERT_EQ(r, UV_ENOENT); + ASSERT_EQ(opendir_req.fs_type, UV_FS_OPENDIR); + ASSERT_EQ(opendir_req.result, UV_ENOENT); ASSERT_NULL(opendir_req.ptr); uv_fs_req_cleanup(&opendir_req); @@ -202,11 +202,11 @@ TEST_IMPL(fs_readdir_non_existing_dir) { &opendir_req, path, non_existing_opendir_cb); - ASSERT(r == 0); - ASSERT(non_existing_opendir_cb_count == 0); + ASSERT_OK(r); + ASSERT_OK(non_existing_opendir_cb_count); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(non_existing_opendir_cb_count == 1); + ASSERT_OK(r); + ASSERT_EQ(1, non_existing_opendir_cb_count); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -220,9 +220,9 @@ TEST_IMPL(fs_readdir_non_existing_dir) { static int file_opendir_cb_count; static void file_opendir_cb(uv_fs_t* req) { - ASSERT(req == &opendir_req); - ASSERT(req->fs_type == UV_FS_OPENDIR); - ASSERT(req->result == UV_ENOTDIR); + ASSERT_PTR_EQ(req, &opendir_req); + ASSERT_EQ(req->fs_type, UV_FS_OPENDIR); + ASSERT_EQ(req->result, UV_ENOTDIR); ASSERT_NULL(req->ptr); uv_fs_req_cleanup(req); @@ -241,9 +241,9 @@ TEST_IMPL(fs_readdir_file) { /* Testing the synchronous flavor. */ r = uv_fs_opendir(uv_default_loop(), &opendir_req, path, NULL); - ASSERT(r == UV_ENOTDIR); - ASSERT(opendir_req.fs_type == UV_FS_OPENDIR); - ASSERT(opendir_req.result == UV_ENOTDIR); + ASSERT_EQ(r, UV_ENOTDIR); + ASSERT_EQ(opendir_req.fs_type, UV_FS_OPENDIR); + ASSERT_EQ(opendir_req.result, UV_ENOTDIR); ASSERT_NULL(opendir_req.ptr); uv_fs_req_cleanup(&opendir_req); @@ -253,11 +253,11 @@ TEST_IMPL(fs_readdir_file) { /* Testing the async flavor. */ r = uv_fs_opendir(uv_default_loop(), &opendir_req, path, file_opendir_cb); - ASSERT(r == 0); - ASSERT(file_opendir_cb_count == 0); + ASSERT_OK(r); + ASSERT_OK(file_opendir_cb_count); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(file_opendir_cb_count == 1); + ASSERT_OK(r); + ASSERT_EQ(1, file_opendir_cb_count); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; } @@ -273,8 +273,8 @@ static int non_empty_readdir_cb_count; static int non_empty_closedir_cb_count; static void non_empty_closedir_cb(uv_fs_t* req) { - ASSERT(req == &closedir_req); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &closedir_req); + ASSERT_OK(req->result); uv_fs_req_cleanup(req); ++non_empty_closedir_cb_count; } @@ -282,30 +282,30 @@ static void non_empty_closedir_cb(uv_fs_t* req) { static void non_empty_readdir_cb(uv_fs_t* req) { uv_dir_t* dir; - ASSERT(req == &readdir_req); - ASSERT(req->fs_type == UV_FS_READDIR); + ASSERT_PTR_EQ(req, &readdir_req); + ASSERT_EQ(req->fs_type, UV_FS_READDIR); dir = req->ptr; if (req->result == 0) { uv_fs_req_cleanup(req); - ASSERT(non_empty_readdir_cb_count == 3); + ASSERT_EQ(3, non_empty_readdir_cb_count); uv_fs_closedir(uv_default_loop(), &closedir_req, dir, non_empty_closedir_cb); } else { - ASSERT(req->result == 1); - ASSERT(dir->dirents == dirents); + ASSERT_EQ(1, req->result); + ASSERT_PTR_EQ(dir->dirents, dirents); ASSERT(strcmp(dirents[0].name, "file1") == 0 || strcmp(dirents[0].name, "file2") == 0 || strcmp(dirents[0].name, "test_subdir") == 0); #ifdef HAVE_DIRENT_TYPES if (!strcmp(dirents[0].name, "test_subdir")) - ASSERT(dirents[0].type == UV_DIRENT_DIR); + ASSERT_EQ(dirents[0].type, UV_DIRENT_DIR); else - ASSERT(dirents[0].type == UV_DIRENT_FILE); + ASSERT_EQ(dirents[0].type, UV_DIRENT_FILE); #else - ASSERT(dirents[0].type == UV_DIRENT_UNKNOWN); + ASSERT_EQ(dirents[0].type, UV_DIRENT_UNKNOWN); #endif /* HAVE_DIRENT_TYPES */ ++non_empty_readdir_cb_count; @@ -323,9 +323,9 @@ static void non_empty_opendir_cb(uv_fs_t* req) { uv_dir_t* dir; int r; - ASSERT(req == &opendir_req); - ASSERT(req->fs_type == UV_FS_OPENDIR); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &opendir_req); + ASSERT_EQ(req->fs_type, UV_FS_OPENDIR); + ASSERT_OK(req->result); ASSERT_NOT_NULL(req->ptr); dir = req->ptr; @@ -336,7 +336,7 @@ static void non_empty_opendir_cb(uv_fs_t* req) { &readdir_req, dir, non_empty_readdir_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(req); ++non_empty_opendir_cb_count; } @@ -353,7 +353,7 @@ TEST_IMPL(fs_readdir_non_empty_dir) { cleanup_test_files(); r = uv_fs_mkdir(uv_default_loop(), &mkdir_req, "test_dir", 0755, NULL); - ASSERT(r == 0); + ASSERT_OK(r); /* Create two files synchronously. */ r = uv_fs_open(uv_default_loop(), @@ -361,13 +361,13 @@ TEST_IMPL(fs_readdir_non_empty_dir) { "test_dir/file1", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); uv_fs_req_cleanup(&create_req); r = uv_fs_close(uv_default_loop(), &close_req, create_req.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); r = uv_fs_open(uv_default_loop(), @@ -375,13 +375,13 @@ TEST_IMPL(fs_readdir_non_empty_dir) { "test_dir/file2", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); uv_fs_req_cleanup(&create_req); r = uv_fs_close(uv_default_loop(), &close_req, create_req.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); r = uv_fs_mkdir(uv_default_loop(), @@ -389,7 +389,7 @@ TEST_IMPL(fs_readdir_non_empty_dir) { "test_dir/test_subdir", 0755, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&mkdir_req); /* Fill the req to ensure that required fields are cleaned up. */ @@ -397,9 +397,9 @@ TEST_IMPL(fs_readdir_non_empty_dir) { /* Testing the synchronous flavor. */ r = uv_fs_opendir(uv_default_loop(), &opendir_req, "test_dir", NULL); - ASSERT(r == 0); - ASSERT(opendir_req.fs_type == UV_FS_OPENDIR); - ASSERT(opendir_req.result == 0); + ASSERT_OK(r); + ASSERT_EQ(opendir_req.fs_type, UV_FS_OPENDIR); + ASSERT_OK(opendir_req.result); ASSERT_NOT_NULL(opendir_req.ptr); entries_count = 0; @@ -417,23 +417,23 @@ TEST_IMPL(fs_readdir_non_empty_dir) { strcmp(dirents[0].name, "test_subdir") == 0); #ifdef HAVE_DIRENT_TYPES if (!strcmp(dirents[0].name, "test_subdir")) - ASSERT(dirents[0].type == UV_DIRENT_DIR); + ASSERT_EQ(dirents[0].type, UV_DIRENT_DIR); else - ASSERT(dirents[0].type == UV_DIRENT_FILE); + ASSERT_EQ(dirents[0].type, UV_DIRENT_FILE); #else - ASSERT(dirents[0].type == UV_DIRENT_UNKNOWN); + ASSERT_EQ(dirents[0].type, UV_DIRENT_UNKNOWN); #endif /* HAVE_DIRENT_TYPES */ uv_fs_req_cleanup(&readdir_req); ++entries_count; } - ASSERT(entries_count == 3); + ASSERT_EQ(3, entries_count); uv_fs_req_cleanup(&readdir_req); /* Fill the req to ensure that required fields are cleaned up. */ memset(&closedir_req, 0xdb, sizeof(closedir_req)); uv_fs_closedir(uv_default_loop(), &closedir_req, dir, NULL); - ASSERT(closedir_req.result == 0); + ASSERT_OK(closedir_req.result); uv_fs_req_cleanup(&closedir_req); /* Testing the asynchronous flavor. */ @@ -445,13 +445,13 @@ TEST_IMPL(fs_readdir_non_empty_dir) { &opendir_req, "test_dir", non_empty_opendir_cb); - ASSERT(r == 0); - ASSERT(non_empty_opendir_cb_count == 0); - ASSERT(non_empty_closedir_cb_count == 0); + ASSERT_OK(r); + ASSERT_OK(non_empty_opendir_cb_count); + ASSERT_OK(non_empty_closedir_cb_count); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(non_empty_opendir_cb_count == 1); - ASSERT(non_empty_closedir_cb_count == 1); + ASSERT_OK(r); + ASSERT_EQ(1, non_empty_opendir_cb_count); + ASSERT_EQ(1, non_empty_closedir_cb_count); uv_fs_rmdir(uv_default_loop(), &rmdir_req, "test_subdir", NULL); uv_fs_req_cleanup(&rmdir_req); diff --git a/deps/uv/test/test-fs.c b/deps/uv/test/test-fs.c index e687dde3e2577f..1acdc5c67082c7 100644 --- a/deps/uv/test/test-fs.c +++ b/deps/uv/test/test-fs.c @@ -170,8 +170,8 @@ static void check_permission(const char* filename, unsigned int mode) { uv_stat_t* s; r = uv_fs_stat(NULL, &req, filename, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); s = &req.statbuf; #if defined(_WIN32) || defined(__CYGWIN__) || defined(__MSYS__) @@ -195,24 +195,24 @@ static void dummy_cb(uv_fs_t* req) { static void link_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_LINK); - ASSERT(req->result == 0); + ASSERT_EQ(req->fs_type, UV_FS_LINK); + ASSERT_OK(req->result); link_cb_count++; uv_fs_req_cleanup(req); } static void symlink_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_SYMLINK); - ASSERT(req->result == 0); + ASSERT_EQ(req->fs_type, UV_FS_SYMLINK); + ASSERT_OK(req->result); symlink_cb_count++; uv_fs_req_cleanup(req); } static void readlink_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_READLINK); - ASSERT(req->result == 0); - ASSERT(strcmp(req->ptr, "test_file_symlink2") == 0); + ASSERT_EQ(req->fs_type, UV_FS_READLINK); + ASSERT_OK(req->result); + ASSERT_OK(strcmp(req->ptr, "test_file_symlink2")); readlink_cb_count++; uv_fs_req_cleanup(req); } @@ -221,16 +221,16 @@ static void readlink_cb(uv_fs_t* req) { static void realpath_cb(uv_fs_t* req) { char test_file_abs_buf[PATHMAX]; size_t test_file_abs_size = sizeof(test_file_abs_buf); - ASSERT(req->fs_type == UV_FS_REALPATH); - ASSERT(req->result == 0); + ASSERT_EQ(req->fs_type, UV_FS_REALPATH); + ASSERT_OK(req->result); uv_cwd(test_file_abs_buf, &test_file_abs_size); #ifdef _WIN32 strcat(test_file_abs_buf, "\\test_file"); - ASSERT(stricmp(req->ptr, test_file_abs_buf) == 0); + ASSERT_OK(stricmp(req->ptr, test_file_abs_buf)); #else strcat(test_file_abs_buf, "/test_file"); - ASSERT(strcmp(req->ptr, test_file_abs_buf) == 0); + ASSERT_OK(strcmp(req->ptr, test_file_abs_buf)); #endif realpath_cb_count++; uv_fs_req_cleanup(req); @@ -238,15 +238,15 @@ static void realpath_cb(uv_fs_t* req) { static void access_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_ACCESS); + ASSERT_EQ(req->fs_type, UV_FS_ACCESS); access_cb_count++; uv_fs_req_cleanup(req); } static void fchmod_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_FCHMOD); - ASSERT(req->result == 0); + ASSERT_EQ(req->fs_type, UV_FS_FCHMOD); + ASSERT_OK(req->result); fchmod_cb_count++; uv_fs_req_cleanup(req); check_permission("test_file", *(int*)req->data); @@ -254,8 +254,8 @@ static void fchmod_cb(uv_fs_t* req) { static void chmod_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_CHMOD); - ASSERT(req->result == 0); + ASSERT_EQ(req->fs_type, UV_FS_CHMOD); + ASSERT_OK(req->result); chmod_cb_count++; uv_fs_req_cleanup(req); check_permission("test_file", *(int*)req->data); @@ -263,42 +263,42 @@ static void chmod_cb(uv_fs_t* req) { static void fchown_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_FCHOWN); - ASSERT(req->result == 0); + ASSERT_EQ(req->fs_type, UV_FS_FCHOWN); + ASSERT_OK(req->result); fchown_cb_count++; uv_fs_req_cleanup(req); } static void chown_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_CHOWN); - ASSERT(req->result == 0); + ASSERT_EQ(req->fs_type, UV_FS_CHOWN); + ASSERT_OK(req->result); chown_cb_count++; uv_fs_req_cleanup(req); } static void lchown_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_LCHOWN); - ASSERT(req->result == 0); + ASSERT_EQ(req->fs_type, UV_FS_LCHOWN); + ASSERT_OK(req->result); lchown_cb_count++; uv_fs_req_cleanup(req); } static void chown_root_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_CHOWN); + ASSERT_EQ(req->fs_type, UV_FS_CHOWN); #if defined(_WIN32) || defined(__MSYS__) /* On windows, chown is a no-op and always succeeds. */ - ASSERT(req->result == 0); + ASSERT_OK(req->result); #else /* On unix, chown'ing the root directory is not allowed - * unless you're root, of course. */ if (geteuid() == 0) - ASSERT(req->result == 0); + ASSERT_OK(req->result); else # if defined(__CYGWIN__) /* On Cygwin, uid 0 is invalid (no root). */ - ASSERT(req->result == UV_EINVAL); + ASSERT_EQ(req->result, UV_EINVAL); # elif defined(__PASE__) /* On IBMi PASE, there is no root user. uid 0 is user qsecofr. * User may grant qsecofr's privileges, including changing @@ -306,7 +306,7 @@ static void chown_root_cb(uv_fs_t* req) { */ ASSERT(req->result == 0 || req->result == UV_EPERM); # else - ASSERT(req->result == UV_EPERM); + ASSERT_EQ(req->result, UV_EPERM); # endif #endif chown_cb_count++; @@ -314,18 +314,18 @@ static void chown_root_cb(uv_fs_t* req) { } static void unlink_cb(uv_fs_t* req) { - ASSERT(req == &unlink_req); - ASSERT(req->fs_type == UV_FS_UNLINK); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &unlink_req); + ASSERT_EQ(req->fs_type, UV_FS_UNLINK); + ASSERT_OK(req->result); unlink_cb_count++; uv_fs_req_cleanup(req); } static void fstat_cb(uv_fs_t* req) { uv_stat_t* s = req->ptr; - ASSERT(req->fs_type == UV_FS_FSTAT); - ASSERT(req->result == 0); - ASSERT(s->st_size == sizeof(test_buf)); + ASSERT_EQ(req->fs_type, UV_FS_FSTAT); + ASSERT_OK(req->result); + ASSERT_EQ(s->st_size, sizeof(test_buf)); uv_fs_req_cleanup(req); fstat_cb_count++; } @@ -334,29 +334,29 @@ static void fstat_cb(uv_fs_t* req) { static void statfs_cb(uv_fs_t* req) { uv_statfs_t* stats; - ASSERT(req->fs_type == UV_FS_STATFS); - ASSERT(req->result == 0); + ASSERT_EQ(req->fs_type, UV_FS_STATFS); + ASSERT_OK(req->result); ASSERT_NOT_NULL(req->ptr); stats = req->ptr; #if defined(_WIN32) || defined(__sun) || defined(_AIX) || defined(__MVS__) || \ defined(__OpenBSD__) || defined(__NetBSD__) - ASSERT(stats->f_type == 0); + ASSERT_OK(stats->f_type); #else - ASSERT(stats->f_type > 0); + ASSERT_GT(stats->f_type, 0); #endif - ASSERT(stats->f_bsize > 0); - ASSERT(stats->f_blocks > 0); - ASSERT(stats->f_bfree <= stats->f_blocks); - ASSERT(stats->f_bavail <= stats->f_bfree); + ASSERT_GT(stats->f_bsize, 0); + ASSERT_GT(stats->f_blocks, 0); + ASSERT_LE(stats->f_bfree, stats->f_blocks); + ASSERT_LE(stats->f_bavail, stats->f_bfree); #ifdef _WIN32 - ASSERT(stats->f_files == 0); - ASSERT(stats->f_ffree == 0); + ASSERT_OK(stats->f_files); + ASSERT_OK(stats->f_ffree); #else /* There is no assertion for stats->f_files that makes sense, so ignore it. */ - ASSERT(stats->f_ffree <= stats->f_files); + ASSERT_LE(stats->f_ffree, stats->f_files); #endif uv_fs_req_cleanup(req); ASSERT_NULL(req->ptr); @@ -366,27 +366,27 @@ static void statfs_cb(uv_fs_t* req) { static void close_cb(uv_fs_t* req) { int r; - ASSERT(req == &close_req); - ASSERT(req->fs_type == UV_FS_CLOSE); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &close_req); + ASSERT_EQ(req->fs_type, UV_FS_CLOSE); + ASSERT_OK(req->result); close_cb_count++; uv_fs_req_cleanup(req); if (close_cb_count == 3) { r = uv_fs_unlink(loop, &unlink_req, "test_file2", unlink_cb); - ASSERT(r == 0); + ASSERT_OK(r); } } static void ftruncate_cb(uv_fs_t* req) { int r; - ASSERT(req == &ftruncate_req); - ASSERT(req->fs_type == UV_FS_FTRUNCATE); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &ftruncate_req); + ASSERT_EQ(req->fs_type, UV_FS_FTRUNCATE); + ASSERT_OK(req->result); ftruncate_cb_count++; uv_fs_req_cleanup(req); r = uv_fs_close(loop, &close_req, open_req1.result, close_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void fail_cb(uv_fs_t* req) { @@ -395,45 +395,45 @@ static void fail_cb(uv_fs_t* req) { static void read_cb(uv_fs_t* req) { int r; - ASSERT(req == &read_req); - ASSERT(req->fs_type == UV_FS_READ); - ASSERT(req->result >= 0); /* FIXME(bnoordhuis) Check if requested size? */ + ASSERT_PTR_EQ(req, &read_req); + ASSERT_EQ(req->fs_type, UV_FS_READ); + ASSERT_GE(req->result, 0); /* FIXME(bnoordhuis) Check if requested size? */ read_cb_count++; uv_fs_req_cleanup(req); if (read_cb_count == 1) { - ASSERT(strcmp(buf, test_buf) == 0); + ASSERT_OK(strcmp(buf, test_buf)); r = uv_fs_ftruncate(loop, &ftruncate_req, open_req1.result, 7, ftruncate_cb); } else { - ASSERT(strcmp(buf, "test-bu") == 0); + ASSERT_OK(strcmp(buf, "test-bu")); r = uv_fs_close(loop, &close_req, open_req1.result, close_cb); } - ASSERT(r == 0); + ASSERT_OK(r); } static void open_cb(uv_fs_t* req) { int r; - ASSERT(req == &open_req1); - ASSERT(req->fs_type == UV_FS_OPEN); + ASSERT_PTR_EQ(req, &open_req1); + ASSERT_EQ(req->fs_type, UV_FS_OPEN); if (req->result < 0) { fprintf(stderr, "async open error: %d\n", (int) req->result); ASSERT(0); } open_cb_count++; ASSERT(req->path); - ASSERT(memcmp(req->path, "test_file2\0", 11) == 0); + ASSERT_OK(memcmp(req->path, "test_file2\0", 11)); uv_fs_req_cleanup(req); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(loop, &read_req, open_req1.result, &iov, 1, -1, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void open_cb_simple(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_OPEN); + ASSERT_EQ(req->fs_type, UV_FS_OPEN); if (req->result < 0) { fprintf(stderr, "async open error: %d\n", (int) req->result); ASSERT(0); @@ -446,69 +446,69 @@ static void open_cb_simple(uv_fs_t* req) { static void fsync_cb(uv_fs_t* req) { int r; - ASSERT(req == &fsync_req); - ASSERT(req->fs_type == UV_FS_FSYNC); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &fsync_req); + ASSERT_EQ(req->fs_type, UV_FS_FSYNC); + ASSERT_OK(req->result); fsync_cb_count++; uv_fs_req_cleanup(req); r = uv_fs_close(loop, &close_req, open_req1.result, close_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void fdatasync_cb(uv_fs_t* req) { int r; - ASSERT(req == &fdatasync_req); - ASSERT(req->fs_type == UV_FS_FDATASYNC); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &fdatasync_req); + ASSERT_EQ(req->fs_type, UV_FS_FDATASYNC); + ASSERT_OK(req->result); fdatasync_cb_count++; uv_fs_req_cleanup(req); r = uv_fs_fsync(loop, &fsync_req, open_req1.result, fsync_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void write_cb(uv_fs_t* req) { int r; - ASSERT(req == &write_req); - ASSERT(req->fs_type == UV_FS_WRITE); - ASSERT(req->result >= 0); /* FIXME(bnoordhuis) Check if requested size? */ + ASSERT_PTR_EQ(req, &write_req); + ASSERT_EQ(req->fs_type, UV_FS_WRITE); + ASSERT_GE(req->result, 0); /* FIXME(bnoordhuis) Check if requested size? */ write_cb_count++; uv_fs_req_cleanup(req); r = uv_fs_fdatasync(loop, &fdatasync_req, open_req1.result, fdatasync_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void create_cb(uv_fs_t* req) { int r; - ASSERT(req == &open_req1); - ASSERT(req->fs_type == UV_FS_OPEN); - ASSERT(req->result >= 0); + ASSERT_PTR_EQ(req, &open_req1); + ASSERT_EQ(req->fs_type, UV_FS_OPEN); + ASSERT_GE(req->result, 0); create_cb_count++; uv_fs_req_cleanup(req); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(loop, &write_req, req->result, &iov, 1, -1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void rename_cb(uv_fs_t* req) { - ASSERT(req == &rename_req); - ASSERT(req->fs_type == UV_FS_RENAME); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &rename_req); + ASSERT_EQ(req->fs_type, UV_FS_RENAME); + ASSERT_OK(req->result); rename_cb_count++; uv_fs_req_cleanup(req); } static void mkdir_cb(uv_fs_t* req) { - ASSERT(req == &mkdir_req); - ASSERT(req->fs_type == UV_FS_MKDIR); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &mkdir_req); + ASSERT_EQ(req->fs_type, UV_FS_MKDIR); + ASSERT_OK(req->result); mkdir_cb_count++; ASSERT(req->path); - ASSERT(memcmp(req->path, "test_dir\0", 9) == 0); + ASSERT_OK(memcmp(req->path, "test_dir\0", 9)); uv_fs_req_cleanup(req); } @@ -516,24 +516,24 @@ static void mkdir_cb(uv_fs_t* req) { static void check_mkdtemp_result(uv_fs_t* req) { int r; - ASSERT(req->fs_type == UV_FS_MKDTEMP); - ASSERT(req->result == 0); + ASSERT_EQ(req->fs_type, UV_FS_MKDTEMP); + ASSERT_OK(req->result); ASSERT(req->path); - ASSERT(strlen(req->path) == 15); - ASSERT(memcmp(req->path, "test_dir_", 9) == 0); - ASSERT(memcmp(req->path + 9, "XXXXXX", 6) != 0); + ASSERT_EQ(15, strlen(req->path)); + ASSERT_OK(memcmp(req->path, "test_dir_", 9)); + ASSERT_NE(0, memcmp(req->path + 9, "XXXXXX", 6)); check_permission(req->path, 0700); /* Check if req->path is actually a directory */ r = uv_fs_stat(NULL, &stat_req, req->path, NULL); - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(((uv_stat_t*)stat_req.ptr)->st_mode & S_IFDIR); uv_fs_req_cleanup(&stat_req); } static void mkdtemp_cb(uv_fs_t* req) { - ASSERT(req == &mkdtemp_req1); + ASSERT_PTR_EQ(req, &mkdtemp_req1); check_mkdtemp_result(req); mkdtemp_cb_count++; } @@ -542,36 +542,36 @@ static void mkdtemp_cb(uv_fs_t* req) { static void check_mkstemp_result(uv_fs_t* req) { int r; - ASSERT(req->fs_type == UV_FS_MKSTEMP); - ASSERT(req->result >= 0); + ASSERT_EQ(req->fs_type, UV_FS_MKSTEMP); + ASSERT_GE(req->result, 0); ASSERT(req->path); - ASSERT(strlen(req->path) == 16); - ASSERT(memcmp(req->path, "test_file_", 10) == 0); - ASSERT(memcmp(req->path + 10, "XXXXXX", 6) != 0); + ASSERT_EQ(16, strlen(req->path)); + ASSERT_OK(memcmp(req->path, "test_file_", 10)); + ASSERT_NE(0, memcmp(req->path + 10, "XXXXXX", 6)); check_permission(req->path, 0600); /* Check if req->path is actually a file */ r = uv_fs_stat(NULL, &stat_req, req->path, NULL); - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(stat_req.statbuf.st_mode & S_IFREG); uv_fs_req_cleanup(&stat_req); } static void mkstemp_cb(uv_fs_t* req) { - ASSERT(req == &mkstemp_req1); + ASSERT_PTR_EQ(req, &mkstemp_req1); check_mkstemp_result(req); mkstemp_cb_count++; } static void rmdir_cb(uv_fs_t* req) { - ASSERT(req == &rmdir_req); - ASSERT(req->fs_type == UV_FS_RMDIR); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &rmdir_req); + ASSERT_EQ(req->fs_type, UV_FS_RMDIR); + ASSERT_OK(req->result); rmdir_cb_count++; ASSERT(req->path); - ASSERT(memcmp(req->path, "test_dir\0", 9) == 0); + ASSERT_OK(memcmp(req->path, "test_dir\0", 9)); uv_fs_req_cleanup(req); } @@ -588,21 +588,21 @@ static void assert_is_file_type(uv_dirent_t dent) { * https://github.com/libuv/libuv/issues/501 */ #if defined(__APPLE__) || defined(_WIN32) - ASSERT(dent.type == UV_DIRENT_FILE); + ASSERT_EQ(dent.type, UV_DIRENT_FILE); #else ASSERT(dent.type == UV_DIRENT_FILE || dent.type == UV_DIRENT_UNKNOWN); #endif #else - ASSERT(dent.type == UV_DIRENT_UNKNOWN); + ASSERT_EQ(dent.type, UV_DIRENT_UNKNOWN); #endif } static void scandir_cb(uv_fs_t* req) { uv_dirent_t dent; - ASSERT(req == &scandir_req); - ASSERT(req->fs_type == UV_FS_SCANDIR); - ASSERT(req->result == 2); + ASSERT_PTR_EQ(req, &scandir_req); + ASSERT_EQ(req->fs_type, UV_FS_SCANDIR); + ASSERT_EQ(2, req->result); ASSERT(req->ptr); while (UV_EOF != uv_fs_scandir_next(req, &dent)) { @@ -611,7 +611,7 @@ static void scandir_cb(uv_fs_t* req) { } scandir_cb_count++; ASSERT(req->path); - ASSERT(memcmp(req->path, "test_dir\0", 9) == 0); + ASSERT_OK(memcmp(req->path, "test_dir\0", 9)); uv_fs_req_cleanup(req); ASSERT(!req->ptr); } @@ -620,11 +620,11 @@ static void scandir_cb(uv_fs_t* req) { static void empty_scandir_cb(uv_fs_t* req) { uv_dirent_t dent; - ASSERT(req == &scandir_req); - ASSERT(req->fs_type == UV_FS_SCANDIR); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &scandir_req); + ASSERT_EQ(req->fs_type, UV_FS_SCANDIR); + ASSERT_OK(req->result); ASSERT_NULL(req->ptr); - ASSERT(UV_EOF == uv_fs_scandir_next(req, &dent)); + ASSERT_EQ(UV_EOF, uv_fs_scandir_next(req, &dent)); uv_fs_req_cleanup(req); scandir_cb_count++; } @@ -632,20 +632,20 @@ static void empty_scandir_cb(uv_fs_t* req) { static void non_existent_scandir_cb(uv_fs_t* req) { uv_dirent_t dent; - ASSERT(req == &scandir_req); - ASSERT(req->fs_type == UV_FS_SCANDIR); - ASSERT(req->result == UV_ENOENT); + ASSERT_PTR_EQ(req, &scandir_req); + ASSERT_EQ(req->fs_type, UV_FS_SCANDIR); + ASSERT_EQ(req->result, UV_ENOENT); ASSERT_NULL(req->ptr); - ASSERT(UV_ENOENT == uv_fs_scandir_next(req, &dent)); + ASSERT_EQ(UV_ENOENT, uv_fs_scandir_next(req, &dent)); uv_fs_req_cleanup(req); scandir_cb_count++; } static void file_scandir_cb(uv_fs_t* req) { - ASSERT(req == &scandir_req); - ASSERT(req->fs_type == UV_FS_SCANDIR); - ASSERT(req->result == UV_ENOTDIR); + ASSERT_PTR_EQ(req, &scandir_req); + ASSERT_EQ(req->fs_type, UV_FS_SCANDIR); + ASSERT_EQ(req->result, UV_ENOTDIR); ASSERT_NULL(req->ptr); uv_fs_req_cleanup(req); scandir_cb_count++; @@ -653,9 +653,9 @@ static void file_scandir_cb(uv_fs_t* req) { static void stat_cb(uv_fs_t* req) { - ASSERT(req == &stat_req); + ASSERT_PTR_EQ(req, &stat_req); ASSERT(req->fs_type == UV_FS_STAT || req->fs_type == UV_FS_LSTAT); - ASSERT(req->result == 0); + ASSERT_OK(req->result); ASSERT(req->ptr); stat_cb_count++; uv_fs_req_cleanup(req); @@ -664,7 +664,7 @@ static void stat_cb(uv_fs_t* req) { static void stat_batch_cb(uv_fs_t* req) { ASSERT(req->fs_type == UV_FS_STAT || req->fs_type == UV_FS_LSTAT); - ASSERT(req->result == 0); + ASSERT_OK(req->result); ASSERT(req->ptr); stat_cb_count++; uv_fs_req_cleanup(req); @@ -673,40 +673,40 @@ static void stat_batch_cb(uv_fs_t* req) { static void sendfile_cb(uv_fs_t* req) { - ASSERT(req == &sendfile_req); - ASSERT(req->fs_type == UV_FS_SENDFILE); - ASSERT(req->result == 65545); + ASSERT_PTR_EQ(req, &sendfile_req); + ASSERT_EQ(req->fs_type, UV_FS_SENDFILE); + ASSERT_EQ(65545, req->result); sendfile_cb_count++; uv_fs_req_cleanup(req); } static void sendfile_nodata_cb(uv_fs_t* req) { - ASSERT(req == &sendfile_req); - ASSERT(req->fs_type == UV_FS_SENDFILE); - ASSERT(req->result == 0); + ASSERT_PTR_EQ(req, &sendfile_req); + ASSERT_EQ(req->fs_type, UV_FS_SENDFILE); + ASSERT_OK(req->result); sendfile_cb_count++; uv_fs_req_cleanup(req); } static void open_noent_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_OPEN); - ASSERT(req->result == UV_ENOENT); + ASSERT_EQ(req->fs_type, UV_FS_OPEN); + ASSERT_EQ(req->result, UV_ENOENT); open_cb_count++; uv_fs_req_cleanup(req); } static void open_nametoolong_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_OPEN); - ASSERT(req->result == UV_ENAMETOOLONG); + ASSERT_EQ(req->fs_type, UV_FS_OPEN); + ASSERT_EQ(req->result, UV_ENAMETOOLONG); open_cb_count++; uv_fs_req_cleanup(req); } static void open_loop_cb(uv_fs_t* req) { - ASSERT(req->fs_type == UV_FS_OPEN); - ASSERT(req->result == UV_ELOOP); + ASSERT_EQ(req->fs_type, UV_FS_OPEN); + ASSERT_EQ(req->result, UV_ELOOP); open_cb_count++; uv_fs_req_cleanup(req); } @@ -719,16 +719,16 @@ TEST_IMPL(fs_file_noent) { loop = uv_default_loop(); r = uv_fs_open(NULL, &req, "does_not_exist", O_RDONLY, 0, NULL); - ASSERT(r == UV_ENOENT); - ASSERT(req.result == UV_ENOENT); + ASSERT_EQ(r, UV_ENOENT); + ASSERT_EQ(req.result, UV_ENOENT); uv_fs_req_cleanup(&req); r = uv_fs_open(loop, &req, "does_not_exist", O_RDONLY, 0, open_noent_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(open_cb_count == 0); + ASSERT_OK(open_cb_count); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 1); + ASSERT_EQ(1, open_cb_count); /* TODO add EACCES test */ @@ -747,16 +747,16 @@ TEST_IMPL(fs_file_nametoolong) { name[TOO_LONG_NAME_LENGTH] = 0; r = uv_fs_open(NULL, &req, name, O_RDONLY, 0, NULL); - ASSERT(r == UV_ENAMETOOLONG); - ASSERT(req.result == UV_ENAMETOOLONG); + ASSERT_EQ(r, UV_ENAMETOOLONG); + ASSERT_EQ(req.result, UV_ENAMETOOLONG); uv_fs_req_cleanup(&req); r = uv_fs_open(loop, &req, name, O_RDONLY, 0, open_nametoolong_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(open_cb_count == 0); + ASSERT_OK(open_cb_count); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 1); + ASSERT_EQ(1, open_cb_count); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -783,20 +783,20 @@ TEST_IMPL(fs_file_loop) { if (r == UV_ENOENT) return 0; #endif - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); r = uv_fs_open(NULL, &req, "test_symlink", O_RDONLY, 0, NULL); - ASSERT(r == UV_ELOOP); - ASSERT(req.result == UV_ELOOP); + ASSERT_EQ(r, UV_ELOOP); + ASSERT_EQ(req.result, UV_ELOOP); uv_fs_req_cleanup(&req); r = uv_fs_open(loop, &req, "test_symlink", O_RDONLY, 0, open_loop_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(open_cb_count == 0); + ASSERT_OK(open_cb_count); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 1); + ASSERT_EQ(1, open_cb_count); unlink("test_symlink"); @@ -817,9 +817,9 @@ static void check_utime(const char* path, else r = uv_fs_stat(loop, &req, path, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); - ASSERT_EQ(req.result, 0); + ASSERT_OK(req.result); s = &req.statbuf; if (s->st_atim.tv_nsec == 0 && s->st_mtim.tv_nsec == 0) { @@ -868,9 +868,9 @@ static void check_utime(const char* path, static void utime_cb(uv_fs_t* req) { utime_check_t* c; - ASSERT(req == &utime_req); - ASSERT(req->result == 0); - ASSERT(req->fs_type == UV_FS_UTIME); + ASSERT_PTR_EQ(req, &utime_req); + ASSERT_OK(req->result); + ASSERT_EQ(req->fs_type, UV_FS_UTIME); c = req->data; check_utime(c->path, c->atime, c->mtime, /* test_lutime */ 0); @@ -883,9 +883,9 @@ static void utime_cb(uv_fs_t* req) { static void futime_cb(uv_fs_t* req) { utime_check_t* c; - ASSERT(req == &futime_req); - ASSERT(req->result == 0); - ASSERT(req->fs_type == UV_FS_FUTIME); + ASSERT_PTR_EQ(req, &futime_req); + ASSERT_OK(req->result); + ASSERT_EQ(req->fs_type, UV_FS_FUTIME); c = req->data; check_utime(c->path, c->atime, c->mtime, /* test_lutime */ 0); @@ -898,8 +898,8 @@ static void futime_cb(uv_fs_t* req) { static void lutime_cb(uv_fs_t* req) { utime_check_t* c; - ASSERT(req->result == 0); - ASSERT(req->fs_type == UV_FS_LUTIME); + ASSERT_OK(req->result); + ASSERT_EQ(req->fs_type, UV_FS_LUTIME); c = req->data; check_utime(c->path, c->atime, c->mtime, /* test_lutime */ 1); @@ -920,48 +920,48 @@ TEST_IMPL(fs_file_async) { r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR, create_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(create_cb_count == 1); - ASSERT(write_cb_count == 1); - ASSERT(fsync_cb_count == 1); - ASSERT(fdatasync_cb_count == 1); - ASSERT(close_cb_count == 1); + ASSERT_EQ(1, create_cb_count); + ASSERT_EQ(1, write_cb_count); + ASSERT_EQ(1, fsync_cb_count); + ASSERT_EQ(1, fdatasync_cb_count); + ASSERT_EQ(1, close_cb_count); r = uv_fs_rename(loop, &rename_req, "test_file", "test_file2", rename_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(create_cb_count == 1); - ASSERT(write_cb_count == 1); - ASSERT(close_cb_count == 1); - ASSERT(rename_cb_count == 1); + ASSERT_EQ(1, create_cb_count); + ASSERT_EQ(1, write_cb_count); + ASSERT_EQ(1, close_cb_count); + ASSERT_EQ(1, rename_cb_count); r = uv_fs_open(loop, &open_req1, "test_file2", O_RDWR, 0, open_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 1); - ASSERT(read_cb_count == 1); - ASSERT(close_cb_count == 2); - ASSERT(rename_cb_count == 1); - ASSERT(create_cb_count == 1); - ASSERT(write_cb_count == 1); - ASSERT(ftruncate_cb_count == 1); + ASSERT_EQ(1, open_cb_count); + ASSERT_EQ(1, read_cb_count); + ASSERT_EQ(2, close_cb_count); + ASSERT_EQ(1, rename_cb_count); + ASSERT_EQ(1, create_cb_count); + ASSERT_EQ(1, write_cb_count); + ASSERT_EQ(1, ftruncate_cb_count); r = uv_fs_open(loop, &open_req1, "test_file2", O_RDONLY, 0, open_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 2); - ASSERT(read_cb_count == 2); - ASSERT(close_cb_count == 3); - ASSERT(rename_cb_count == 1); - ASSERT(unlink_cb_count == 1); - ASSERT(create_cb_count == 1); - ASSERT(write_cb_count == 1); - ASSERT(ftruncate_cb_count == 1); + ASSERT_EQ(2, open_cb_count); + ASSERT_EQ(2, read_cb_count); + ASSERT_EQ(3, close_cb_count); + ASSERT_EQ(1, rename_cb_count); + ASSERT_EQ(1, unlink_cb_count); + ASSERT_EQ(1, create_cb_count); + ASSERT_EQ(1, write_cb_count); + ASSERT_EQ(1, ftruncate_cb_count); /* Cleanup. */ unlink("test_file"); @@ -983,70 +983,70 @@ static void fs_file_sync(int add_flags) { r = uv_fs_open(loop, &open_req1, "test_file", O_WRONLY | O_CREAT | add_flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(write_req.result, 0); uv_fs_req_cleanup(&write_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR | add_flags, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); + ASSERT_GE(r, 0); + ASSERT_GE(read_req.result, 0); + ASSERT_OK(strcmp(buf, test_buf)); uv_fs_req_cleanup(&read_req); r = uv_fs_ftruncate(NULL, &ftruncate_req, open_req1.result, 7, NULL); - ASSERT(r == 0); - ASSERT(ftruncate_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(ftruncate_req.result); uv_fs_req_cleanup(&ftruncate_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); r = uv_fs_rename(NULL, &rename_req, "test_file", "test_file2", NULL); - ASSERT(r == 0); - ASSERT(rename_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(rename_req.result); uv_fs_req_cleanup(&rename_req); r = uv_fs_open(NULL, &open_req1, "test_file2", O_RDONLY | add_flags, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result >= 0); - ASSERT(strcmp(buf, "test-bu") == 0); + ASSERT_GE(r, 0); + ASSERT_GE(read_req.result, 0); + ASSERT_OK(strcmp(buf, "test-bu")); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); r = uv_fs_unlink(NULL, &unlink_req, "test_file2", NULL); - ASSERT(r == 0); - ASSERT(unlink_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(unlink_req.result); uv_fs_req_cleanup(&unlink_req); /* Cleanup */ @@ -1072,19 +1072,19 @@ static void fs_file_write_null_buffer(int add_flags) { r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT | add_flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(NULL, 0); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == 0); - ASSERT(write_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(write_req.result); uv_fs_req_cleanup(&write_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); unlink("test_file"); @@ -1110,38 +1110,38 @@ TEST_IMPL(fs_async_dir) { loop = uv_default_loop(); r = uv_fs_mkdir(loop, &mkdir_req, "test_dir", 0755, mkdir_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(mkdir_cb_count == 1); + ASSERT_EQ(1, mkdir_cb_count); /* Create 2 files synchronously. */ r = uv_fs_open(NULL, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); uv_fs_req_cleanup(&open_req1); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); r = uv_fs_open(NULL, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); uv_fs_req_cleanup(&open_req1); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); r = uv_fs_scandir(loop, &scandir_req, "test_dir", 0, scandir_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(scandir_cb_count == 1); + ASSERT_EQ(1, scandir_cb_count); /* sync uv_fs_scandir */ r = uv_fs_scandir(NULL, &scandir_req, "test_dir", 0, NULL); - ASSERT(r == 2); - ASSERT(scandir_req.result == 2); + ASSERT_EQ(2, r); + ASSERT_EQ(2, scandir_req.result); ASSERT(scandir_req.ptr); while (UV_EOF != uv_fs_scandir_next(&scandir_req, &dent)) { ASSERT(strcmp(dent.name, "file1") == 0 || strcmp(dent.name, "file2") == 0); @@ -1151,37 +1151,37 @@ TEST_IMPL(fs_async_dir) { ASSERT(!scandir_req.ptr); r = uv_fs_stat(loop, &stat_req, "test_dir", stat_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); r = uv_fs_stat(loop, &stat_req, "test_dir/", stat_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); r = uv_fs_lstat(loop, &stat_req, "test_dir", stat_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); r = uv_fs_lstat(loop, &stat_req, "test_dir/", stat_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(stat_cb_count == 4); + ASSERT_EQ(4, stat_cb_count); r = uv_fs_unlink(loop, &unlink_req, "test_dir/file1", unlink_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(unlink_cb_count == 1); + ASSERT_EQ(1, unlink_cb_count); r = uv_fs_unlink(loop, &unlink_req, "test_dir/file2", unlink_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(unlink_cb_count == 2); + ASSERT_EQ(2, unlink_cb_count); r = uv_fs_rmdir(loop, &rmdir_req, "test_dir", rmdir_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(rmdir_cb_count == 1); + ASSERT_EQ(1, rmdir_cb_count); /* Cleanup */ unlink("test_dir/file1"); @@ -1206,58 +1206,58 @@ static int test_sendfile(void (*setup)(int), uv_fs_cb cb, off_t expected_size) { unlink("test_file2"); f = open("test_file", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR); - ASSERT(f != -1); + ASSERT_NE(f, -1); if (setup != NULL) setup(f); r = close(f); - ASSERT(r == 0); + ASSERT_OK(r); /* Test starts here. */ r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); r = uv_fs_open(NULL, &open_req2, "test_file2", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req2.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req2.result, 0); uv_fs_req_cleanup(&open_req2); r = uv_fs_sendfile(loop, &sendfile_req, open_req2.result, open_req1.result, 1, 131072, cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(sendfile_cb_count == 1); + ASSERT_EQ(1, sendfile_cb_count); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); r = uv_fs_close(NULL, &close_req, open_req2.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); memset(&s1, 0, sizeof(s1)); memset(&s2, 0, sizeof(s2)); - ASSERT(0 == stat("test_file", &s1)); - ASSERT(0 == stat("test_file2", &s2)); - ASSERT(s2.st_size == expected_size); + ASSERT_OK(stat("test_file", &s1)); + ASSERT_OK(stat("test_file2", &s2)); + ASSERT_EQ(s2.st_size, expected_size); if (expected_size > 0) { ASSERT_UINT64_EQ(s1.st_size, s2.st_size + 1); r = uv_fs_open(NULL, &open_req1, "test_file2", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); memset(buf1, 0, sizeof(buf1)); iov = uv_buf_init(buf1, sizeof(buf1)); r = uv_fs_read(NULL, &req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); ASSERT_EQ(buf1[0], 'e'); /* 'e' from begin */ uv_fs_req_cleanup(&req); } else { @@ -1274,9 +1274,9 @@ static int test_sendfile(void (*setup)(int), uv_fs_cb cb, off_t expected_size) { static void sendfile_setup(int f) { - ASSERT(6 == write(f, "begin\n", 6)); - ASSERT(65542 == lseek(f, 65536, SEEK_CUR)); - ASSERT(4 == write(f, "end\n", 4)); + ASSERT_EQ(6, write(f, "begin\n", 6)); + ASSERT_EQ(65542, lseek(f, 65536, SEEK_CUR)); + ASSERT_EQ(4, write(f, "end\n", 4)); } @@ -1297,18 +1297,18 @@ TEST_IMPL(fs_mkdtemp) { loop = uv_default_loop(); r = uv_fs_mkdtemp(loop, &mkdtemp_req1, path_template, mkdtemp_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(mkdtemp_cb_count == 1); + ASSERT_EQ(1, mkdtemp_cb_count); /* sync mkdtemp */ r = uv_fs_mkdtemp(NULL, &mkdtemp_req2, path_template, NULL); - ASSERT(r == 0); + ASSERT_OK(r); check_mkdtemp_result(&mkdtemp_req2); /* mkdtemp return different values on subsequent calls */ - ASSERT(strcmp(mkdtemp_req1.path, mkdtemp_req2.path) != 0); + ASSERT_NE(0, strcmp(mkdtemp_req1.path, mkdtemp_req2.path)); /* Cleanup */ rmdir(mkdtemp_req1.path); @@ -1330,32 +1330,32 @@ TEST_IMPL(fs_mkstemp) { loop = uv_default_loop(); r = uv_fs_mkstemp(loop, &mkstemp_req1, path_template, mkstemp_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(mkstemp_cb_count == 1); + ASSERT_EQ(1, mkstemp_cb_count); /* sync mkstemp */ r = uv_fs_mkstemp(NULL, &mkstemp_req2, path_template, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); check_mkstemp_result(&mkstemp_req2); /* mkstemp return different values on subsequent calls */ - ASSERT(strcmp(mkstemp_req1.path, mkstemp_req2.path) != 0); + ASSERT_NE(0, strcmp(mkstemp_req1.path, mkstemp_req2.path)); /* invalid template returns EINVAL */ ASSERT_EQ(UV_EINVAL, uv_fs_mkstemp(NULL, &mkstemp_req3, "test_file", NULL)); /* Make sure that path is empty string */ - ASSERT_EQ(0, strlen(mkstemp_req3.path)); + ASSERT_OK(strlen(mkstemp_req3.path)); uv_fs_req_cleanup(&mkstemp_req3); /* We can write to the opened file */ iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &req, mkstemp_req1.result, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); + ASSERT_EQ(r, sizeof(test_buf)); + ASSERT_EQ(req.result, sizeof(test_buf)); uv_fs_req_cleanup(&req); /* Cleanup */ @@ -1365,15 +1365,15 @@ TEST_IMPL(fs_mkstemp) { uv_fs_req_cleanup(&req); fd = uv_fs_open(NULL, &req, mkstemp_req1.path , O_RDONLY, 0, NULL); - ASSERT(fd >= 0); + ASSERT_GE(fd, 0); uv_fs_req_cleanup(&req); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &req, fd, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); + ASSERT_OK(strcmp(buf, test_buf)); uv_fs_req_cleanup(&req); uv_fs_close(NULL, &req, fd, NULL); @@ -1412,20 +1412,20 @@ TEST_IMPL(fs_fstat) { r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); file = req.result; uv_fs_req_cleanup(&req); #ifndef _WIN32 memset(&t, 0, sizeof(t)); - ASSERT(0 == fstat(file, &t)); - ASSERT(0 == uv_fs_fstat(NULL, &req, file, NULL)); - ASSERT(req.result == 0); + ASSERT_OK(fstat(file, &t)); + ASSERT_OK(uv_fs_fstat(NULL, &req, file, NULL)); + ASSERT_OK(req.result); s = req.ptr; # if defined(__APPLE__) - ASSERT(s->st_birthtim.tv_sec == t.st_birthtimespec.tv_sec); - ASSERT(s->st_birthtim.tv_nsec == t.st_birthtimespec.tv_nsec); + ASSERT_EQ(s->st_birthtim.tv_sec, t.st_birthtimespec.tv_sec); + ASSERT_EQ(s->st_birthtim.tv_nsec, t.st_birthtimespec.tv_nsec); # elif defined(__linux__) /* If statx() is supported, the birth time should be equal to the change time * because we just created the file. On older kernels, it's set to zero. @@ -1439,53 +1439,53 @@ TEST_IMPL(fs_fstat) { iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); + ASSERT_EQ(r, sizeof(test_buf)); + ASSERT_EQ(req.result, sizeof(test_buf)); uv_fs_req_cleanup(&req); memset(&req.statbuf, 0xaa, sizeof(req.statbuf)); r = uv_fs_fstat(NULL, &req, file, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); s = req.ptr; - ASSERT(s->st_size == sizeof(test_buf)); + ASSERT_EQ(s->st_size, sizeof(test_buf)); #ifndef _WIN32 r = fstat(file, &t); - ASSERT(r == 0); - - ASSERT(s->st_dev == (uint64_t) t.st_dev); - ASSERT(s->st_mode == (uint64_t) t.st_mode); - ASSERT(s->st_nlink == (uint64_t) t.st_nlink); - ASSERT(s->st_uid == (uint64_t) t.st_uid); - ASSERT(s->st_gid == (uint64_t) t.st_gid); - ASSERT(s->st_rdev == (uint64_t) t.st_rdev); - ASSERT(s->st_ino == (uint64_t) t.st_ino); - ASSERT(s->st_size == (uint64_t) t.st_size); - ASSERT(s->st_blksize == (uint64_t) t.st_blksize); - ASSERT(s->st_blocks == (uint64_t) t.st_blocks); + ASSERT_OK(r); + + ASSERT_EQ(s->st_dev, (uint64_t) t.st_dev); + ASSERT_EQ(s->st_mode, (uint64_t) t.st_mode); + ASSERT_EQ(s->st_nlink, (uint64_t) t.st_nlink); + ASSERT_EQ(s->st_uid, (uint64_t) t.st_uid); + ASSERT_EQ(s->st_gid, (uint64_t) t.st_gid); + ASSERT_EQ(s->st_rdev, (uint64_t) t.st_rdev); + ASSERT_EQ(s->st_ino, (uint64_t) t.st_ino); + ASSERT_EQ(s->st_size, (uint64_t) t.st_size); + ASSERT_EQ(s->st_blksize, (uint64_t) t.st_blksize); + ASSERT_EQ(s->st_blocks, (uint64_t) t.st_blocks); #if defined(__APPLE__) - ASSERT(s->st_atim.tv_sec == t.st_atimespec.tv_sec); - ASSERT(s->st_atim.tv_nsec == t.st_atimespec.tv_nsec); - ASSERT(s->st_mtim.tv_sec == t.st_mtimespec.tv_sec); - ASSERT(s->st_mtim.tv_nsec == t.st_mtimespec.tv_nsec); - ASSERT(s->st_ctim.tv_sec == t.st_ctimespec.tv_sec); - ASSERT(s->st_ctim.tv_nsec == t.st_ctimespec.tv_nsec); + ASSERT_EQ(s->st_atim.tv_sec, t.st_atimespec.tv_sec); + ASSERT_EQ(s->st_atim.tv_nsec, t.st_atimespec.tv_nsec); + ASSERT_EQ(s->st_mtim.tv_sec, t.st_mtimespec.tv_sec); + ASSERT_EQ(s->st_mtim.tv_nsec, t.st_mtimespec.tv_nsec); + ASSERT_EQ(s->st_ctim.tv_sec, t.st_ctimespec.tv_sec); + ASSERT_EQ(s->st_ctim.tv_nsec, t.st_ctimespec.tv_nsec); #elif defined(_AIX) || \ defined(__MVS__) - ASSERT(s->st_atim.tv_sec == t.st_atime); - ASSERT(s->st_atim.tv_nsec == 0); - ASSERT(s->st_mtim.tv_sec == t.st_mtime); - ASSERT(s->st_mtim.tv_nsec == 0); - ASSERT(s->st_ctim.tv_sec == t.st_ctime); - ASSERT(s->st_ctim.tv_nsec == 0); + ASSERT_EQ(s->st_atim.tv_sec, t.st_atime); + ASSERT_OK(s->st_atim.tv_nsec); + ASSERT_EQ(s->st_mtim.tv_sec, t.st_mtime); + ASSERT_OK(s->st_mtim.tv_nsec); + ASSERT_EQ(s->st_ctim.tv_sec, t.st_ctime); + ASSERT_OK(s->st_ctim.tv_nsec); #elif defined(__ANDROID__) - ASSERT(s->st_atim.tv_sec == t.st_atime); - ASSERT(s->st_atim.tv_nsec == t.st_atimensec); - ASSERT(s->st_mtim.tv_sec == t.st_mtime); - ASSERT(s->st_mtim.tv_nsec == t.st_mtimensec); - ASSERT(s->st_ctim.tv_sec == t.st_ctime); - ASSERT(s->st_ctim.tv_nsec == t.st_ctimensec); + ASSERT_EQ(s->st_atim.tv_sec, t.st_atime); + ASSERT_EQ(s->st_atim.tv_nsec, t.st_atimensec); + ASSERT_EQ(s->st_mtim.tv_sec, t.st_mtime); + ASSERT_EQ(s->st_mtim.tv_nsec, t.st_mtimensec); + ASSERT_EQ(s->st_ctim.tv_sec, t.st_ctime); + ASSERT_EQ(s->st_ctim.tv_nsec, t.st_ctimensec); #elif defined(__sun) || \ defined(__DragonFly__) || \ defined(__FreeBSD__) || \ @@ -1496,47 +1496,47 @@ TEST_IMPL(fs_fstat) { defined(_SVID_SOURCE) || \ defined(_XOPEN_SOURCE) || \ defined(_DEFAULT_SOURCE) - ASSERT(s->st_atim.tv_sec == t.st_atim.tv_sec); - ASSERT(s->st_atim.tv_nsec == t.st_atim.tv_nsec); - ASSERT(s->st_mtim.tv_sec == t.st_mtim.tv_sec); - ASSERT(s->st_mtim.tv_nsec == t.st_mtim.tv_nsec); - ASSERT(s->st_ctim.tv_sec == t.st_ctim.tv_sec); - ASSERT(s->st_ctim.tv_nsec == t.st_ctim.tv_nsec); + ASSERT_EQ(s->st_atim.tv_sec, t.st_atim.tv_sec); + ASSERT_EQ(s->st_atim.tv_nsec, t.st_atim.tv_nsec); + ASSERT_EQ(s->st_mtim.tv_sec, t.st_mtim.tv_sec); + ASSERT_EQ(s->st_mtim.tv_nsec, t.st_mtim.tv_nsec); + ASSERT_EQ(s->st_ctim.tv_sec, t.st_ctim.tv_sec); + ASSERT_EQ(s->st_ctim.tv_nsec, t.st_ctim.tv_nsec); # if defined(__FreeBSD__) || \ defined(__NetBSD__) - ASSERT(s->st_birthtim.tv_sec == t.st_birthtim.tv_sec); - ASSERT(s->st_birthtim.tv_nsec == t.st_birthtim.tv_nsec); + ASSERT_EQ(s->st_birthtim.tv_sec, t.st_birthtim.tv_sec); + ASSERT_EQ(s->st_birthtim.tv_nsec, t.st_birthtim.tv_nsec); # endif #else - ASSERT(s->st_atim.tv_sec == t.st_atime); - ASSERT(s->st_atim.tv_nsec == 0); - ASSERT(s->st_mtim.tv_sec == t.st_mtime); - ASSERT(s->st_mtim.tv_nsec == 0); - ASSERT(s->st_ctim.tv_sec == t.st_ctime); - ASSERT(s->st_ctim.tv_nsec == 0); + ASSERT_EQ(s->st_atim.tv_sec, t.st_atime); + ASSERT_OK(s->st_atim.tv_nsec); + ASSERT_EQ(s->st_mtim.tv_sec, t.st_mtime); + ASSERT_OK(s->st_mtim.tv_nsec); + ASSERT_EQ(s->st_ctim.tv_sec, t.st_ctime); + ASSERT_OK(s->st_ctim.tv_nsec); #endif #endif #if defined(__APPLE__) || defined(__FreeBSD__) || defined(__NetBSD__) - ASSERT(s->st_flags == t.st_flags); - ASSERT(s->st_gen == t.st_gen); + ASSERT_EQ(s->st_flags, t.st_flags); + ASSERT_EQ(s->st_gen, t.st_gen); #else - ASSERT(s->st_flags == 0); - ASSERT(s->st_gen == 0); + ASSERT_OK(s->st_flags); + ASSERT_OK(s->st_gen); #endif uv_fs_req_cleanup(&req); /* Now do the uv_fs_fstat call asynchronously */ r = uv_fs_fstat(loop, &req, file, fstat_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fstat_cb_count == 1); + ASSERT_EQ(1, fstat_cb_count); r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* @@ -1564,8 +1564,8 @@ TEST_IMPL(fs_fstat_stdio) { for (fd = 0; fd <= 2; ++fd) { res = uv_fs_fstat(NULL, &req, fd, NULL); - ASSERT(res == 0); - ASSERT(req.result == 0); + ASSERT_OK(res); + ASSERT_OK(req.result); #ifdef _WIN32 st = req.ptr; @@ -1573,9 +1573,11 @@ TEST_IMPL(fs_fstat_stdio) { switch (ft) { case UV_TTY: case UV_NAMED_PIPE: - ASSERT(st->st_mode == (ft == UV_TTY ? S_IFCHR : S_IFIFO)); - ASSERT(st->st_nlink == 1); - ASSERT(st->st_rdev == (ft == UV_TTY ? FILE_DEVICE_CONSOLE : FILE_DEVICE_NAMED_PIPE) << 16); + ASSERT_EQ(st->st_mode, (ft == UV_TTY ? S_IFCHR : S_IFIFO)); + ASSERT_EQ(1, st->st_nlink); + ASSERT_EQ(st->st_rdev, + (ft == UV_TTY ? FILE_DEVICE_CONSOLE : FILE_DEVICE_NAMED_PIPE) + << 16); break; default: break; @@ -1603,52 +1605,52 @@ TEST_IMPL(fs_access) { /* File should not exist */ r = uv_fs_access(NULL, &req, "test_file", F_OK, NULL); - ASSERT(r < 0); - ASSERT(req.result < 0); + ASSERT_LT(r, 0); + ASSERT_LT(req.result, 0); uv_fs_req_cleanup(&req); /* File should not exist */ r = uv_fs_access(loop, &req, "test_file", F_OK, access_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(access_cb_count == 1); + ASSERT_EQ(1, access_cb_count); access_cb_count = 0; /* reset for the next test */ /* Create file */ r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); file = req.result; uv_fs_req_cleanup(&req); /* File should exist */ r = uv_fs_access(NULL, &req, "test_file", F_OK, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* File should exist */ r = uv_fs_access(loop, &req, "test_file", F_OK, access_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(access_cb_count == 1); + ASSERT_EQ(1, access_cb_count); access_cb_count = 0; /* reset for the next test */ /* Close file */ r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* Directory access */ r = uv_fs_mkdir(NULL, &req, "test_dir", 0777, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); r = uv_fs_access(NULL, &req, "test_dir", W_OK, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* @@ -1678,22 +1680,22 @@ TEST_IMPL(fs_chmod) { r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); file = req.result; uv_fs_req_cleanup(&req); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); + ASSERT_EQ(r, sizeof(test_buf)); + ASSERT_EQ(req.result, sizeof(test_buf)); uv_fs_req_cleanup(&req); #ifndef _WIN32 /* Make the file write-only */ r = uv_fs_chmod(NULL, &req, "test_file", 0200, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); check_permission("test_file", 0200); @@ -1701,16 +1703,16 @@ TEST_IMPL(fs_chmod) { /* Make the file read-only */ r = uv_fs_chmod(NULL, &req, "test_file", 0400, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); check_permission("test_file", 0400); /* Make the file read+write with sync uv_fs_fchmod */ r = uv_fs_fchmod(NULL, &req, file, 0600, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); check_permission("test_file", 0600); @@ -1722,9 +1724,9 @@ TEST_IMPL(fs_chmod) { req.data = &mode; } r = uv_fs_chmod(loop, &req, "test_file", 0200, chmod_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(chmod_cb_count == 1); + ASSERT_EQ(1, chmod_cb_count); chmod_cb_count = 0; /* reset for the next test */ #endif @@ -1734,9 +1736,9 @@ TEST_IMPL(fs_chmod) { req.data = &mode; } r = uv_fs_chmod(loop, &req, "test_file", 0400, chmod_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(chmod_cb_count == 1); + ASSERT_EQ(1, chmod_cb_count); /* async fchmod */ { @@ -1744,9 +1746,9 @@ TEST_IMPL(fs_chmod) { req.data = &mode; } r = uv_fs_fchmod(loop, &req, file, 0600, fchmod_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fchmod_cb_count == 1); + ASSERT_EQ(1, fchmod_cb_count); uv_fs_close(loop, &req, file, NULL); @@ -1780,31 +1782,31 @@ TEST_IMPL(fs_unlink_readonly) { O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); file = req.result; uv_fs_req_cleanup(&req); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); + ASSERT_EQ(r, sizeof(test_buf)); + ASSERT_EQ(req.result, sizeof(test_buf)); uv_fs_req_cleanup(&req); uv_fs_close(loop, &req, file, NULL); /* Make the file read-only */ r = uv_fs_chmod(NULL, &req, "test_file", 0400, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); check_permission("test_file", 0400); /* Try to unlink the file */ r = uv_fs_unlink(NULL, &req, "test_file", NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* @@ -1839,30 +1841,30 @@ TEST_IMPL(fs_unlink_archive_readonly) { O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); file = req.result; uv_fs_req_cleanup(&req); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); + ASSERT_EQ(r, sizeof(test_buf)); + ASSERT_EQ(req.result, sizeof(test_buf)); uv_fs_req_cleanup(&req); uv_fs_close(loop, &req, file, NULL); /* Make the file read-only and clear archive flag */ r = SetFileAttributes("test_file", FILE_ATTRIBUTE_READONLY); - ASSERT(r != 0); + ASSERT(r); uv_fs_req_cleanup(&req); check_permission("test_file", 0400); /* Try to unlink the file */ r = uv_fs_unlink(NULL, &req, "test_file", NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* @@ -1894,69 +1896,69 @@ TEST_IMPL(fs_chown) { r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); file = req.result; uv_fs_req_cleanup(&req); /* sync chown */ r = uv_fs_chown(NULL, &req, "test_file", -1, -1, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* sync fchown */ r = uv_fs_fchown(NULL, &req, file, -1, -1, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* async chown */ r = uv_fs_chown(loop, &req, "test_file", -1, -1, chown_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(chown_cb_count == 1); + ASSERT_EQ(1, chown_cb_count); #ifndef __MVS__ /* chown to root (fail) */ chown_cb_count = 0; r = uv_fs_chown(loop, &req, "test_file", 0, 0, chown_root_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(chown_cb_count == 1); + ASSERT_EQ(1, chown_cb_count); #endif /* async fchown */ r = uv_fs_fchown(loop, &req, file, -1, -1, fchown_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(fchown_cb_count == 1); + ASSERT_EQ(1, fchown_cb_count); #ifndef __HAIKU__ /* Haiku doesn't support hardlink */ /* sync link */ r = uv_fs_link(NULL, &req, "test_file", "test_file_link", NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* sync lchown */ r = uv_fs_lchown(NULL, &req, "test_file_link", -1, -1, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* async lchown */ r = uv_fs_lchown(loop, &req, "test_file_link", -1, -1, lchown_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(lchown_cb_count == 1); + ASSERT_EQ(1, lchown_cb_count); #endif /* Close file */ r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* @@ -1989,58 +1991,58 @@ TEST_IMPL(fs_link) { r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); file = req.result; uv_fs_req_cleanup(&req); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); + ASSERT_EQ(r, sizeof(test_buf)); + ASSERT_EQ(req.result, sizeof(test_buf)); uv_fs_req_cleanup(&req); uv_fs_close(loop, &req, file, NULL); /* sync link */ r = uv_fs_link(NULL, &req, "test_file", "test_file_link", NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); r = uv_fs_open(NULL, &req, "test_file_link", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); link = req.result; uv_fs_req_cleanup(&req); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); + ASSERT_OK(strcmp(buf, test_buf)); close(link); /* async link */ r = uv_fs_link(loop, &req, "test_file", "test_file_link2", link_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(link_cb_count == 1); + ASSERT_EQ(1, link_cb_count); r = uv_fs_open(NULL, &req, "test_file_link2", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); link = req.result; uv_fs_req_cleanup(&req); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); + ASSERT_OK(strcmp(buf, test_buf)); uv_fs_close(loop, &req, link, NULL); @@ -2066,16 +2068,16 @@ TEST_IMPL(fs_readlink) { uv_fs_t req; loop = uv_default_loop(); - ASSERT(0 == uv_fs_readlink(loop, &req, "no_such_file", dummy_cb)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(dummy_cb_count == 1); + ASSERT_OK(uv_fs_readlink(loop, &req, "no_such_file", dummy_cb)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, dummy_cb_count); ASSERT_NULL(req.ptr); - ASSERT(req.result == UV_ENOENT); + ASSERT_EQ(req.result, UV_ENOENT); uv_fs_req_cleanup(&req); - ASSERT(UV_ENOENT == uv_fs_readlink(NULL, &req, "no_such_file", NULL)); + ASSERT_EQ(UV_ENOENT, uv_fs_readlink(NULL, &req, "no_such_file", NULL)); ASSERT_NULL(req.ptr); - ASSERT(req.result == UV_ENOENT); + ASSERT_EQ(req.result, UV_ENOENT); uv_fs_req_cleanup(&req); } @@ -2096,8 +2098,8 @@ TEST_IMPL(fs_readlink) { uv_fs_req_cleanup(&req); r = uv_fs_close(NULL, &req, file, NULL); - ASSERT_EQ(r, 0); - ASSERT_EQ(req.result, 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* Test */ @@ -2118,16 +2120,16 @@ TEST_IMPL(fs_realpath) { uv_fs_t req; loop = uv_default_loop(); - ASSERT(0 == uv_fs_realpath(loop, &req, "no_such_file", dummy_cb)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(dummy_cb_count == 1); + ASSERT_OK(uv_fs_realpath(loop, &req, "no_such_file", dummy_cb)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, dummy_cb_count); ASSERT_NULL(req.ptr); - ASSERT(req.result == UV_ENOENT); + ASSERT_EQ(req.result, UV_ENOENT); uv_fs_req_cleanup(&req); - ASSERT(UV_ENOENT == uv_fs_realpath(NULL, &req, "no_such_file", NULL)); + ASSERT_EQ(UV_ENOENT, uv_fs_realpath(NULL, &req, "no_such_file", NULL)); ASSERT_NULL(req.ptr); - ASSERT(req.result == UV_ENOENT); + ASSERT_EQ(req.result, UV_ENOENT); uv_fs_req_cleanup(&req); MAKE_VALGRIND_HAPPY(loop); @@ -2162,15 +2164,15 @@ TEST_IMPL(fs_symlink) { r = uv_fs_open(NULL, &req, "test_file", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); file = req.result; uv_fs_req_cleanup(&req); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &req, file, &iov, 1, -1, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(req.result == sizeof(test_buf)); + ASSERT_EQ(r, sizeof(test_buf)); + ASSERT_EQ(req.result, sizeof(test_buf)); uv_fs_req_cleanup(&req); uv_fs_close(loop, &req, file, NULL); @@ -2194,22 +2196,22 @@ TEST_IMPL(fs_symlink) { } } #endif - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); r = uv_fs_open(NULL, &req, "test_file_symlink", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); link = req.result; uv_fs_req_cleanup(&req); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); + ASSERT_OK(strcmp(buf, test_buf)); uv_fs_close(loop, &req, link, NULL); @@ -2219,7 +2221,7 @@ TEST_IMPL(fs_symlink) { "test_file_symlink_symlink", 0, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); #if defined(__MSYS__) @@ -2227,16 +2229,16 @@ TEST_IMPL(fs_symlink) { #endif r = uv_fs_readlink(NULL, &req, "test_file_symlink_symlink", NULL); - ASSERT(r == 0); - ASSERT(strcmp(req.ptr, "test_file_symlink") == 0); + ASSERT_OK(r); + ASSERT_OK(strcmp(req.ptr, "test_file_symlink")); uv_fs_req_cleanup(&req); r = uv_fs_realpath(NULL, &req, "test_file_symlink_symlink", NULL); - ASSERT(r == 0); + ASSERT_OK(r); #ifdef _WIN32 - ASSERT(stricmp(req.ptr, test_file_abs_buf) == 0); + ASSERT_OK(stricmp(req.ptr, test_file_abs_buf)); #else - ASSERT(strcmp(req.ptr, test_file_abs_buf) == 0); + ASSERT_OK(strcmp(req.ptr, test_file_abs_buf)); #endif uv_fs_req_cleanup(&req); @@ -2247,22 +2249,22 @@ TEST_IMPL(fs_symlink) { "test_file_symlink2", 0, symlink_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(symlink_cb_count == 1); + ASSERT_EQ(1, symlink_cb_count); r = uv_fs_open(NULL, &req, "test_file_symlink2", O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); link = req.result; uv_fs_req_cleanup(&req); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &req, link, &iov, 1, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); + ASSERT_OK(strcmp(buf, test_buf)); uv_fs_close(loop, &req, link, NULL); @@ -2272,18 +2274,18 @@ TEST_IMPL(fs_symlink) { "test_file_symlink2_symlink", 0, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); r = uv_fs_readlink(loop, &req, "test_file_symlink2_symlink", readlink_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(readlink_cb_count == 1); + ASSERT_EQ(1, readlink_cb_count); r = uv_fs_realpath(loop, &req, "test_file", realpath_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(realpath_cb_count == 1); + ASSERT_EQ(1, realpath_cb_count); /* * Run the loop just to check we don't have make any extraneous uv_ref() @@ -2344,71 +2346,71 @@ int test_symlink_dir_impl(int type) { "creation of directory symlinks"); } fprintf(stderr, "r == %i\n", r); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); r = uv_fs_stat(NULL, &req, "test_dir_symlink", NULL); - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(((uv_stat_t*)req.ptr)->st_mode & S_IFDIR); uv_fs_req_cleanup(&req); r = uv_fs_lstat(NULL, &req, "test_dir_symlink", NULL); - ASSERT(r == 0); + ASSERT_OK(r); #if defined(__MSYS__) RETURN_SKIP("symlink reading is not supported on MSYS2"); #endif ASSERT(((uv_stat_t*)req.ptr)->st_mode & S_IFLNK); #ifdef _WIN32 - ASSERT(((uv_stat_t*)req.ptr)->st_size == strlen(test_dir + 4)); + ASSERT_EQ(((uv_stat_t*)req.ptr)->st_size, strlen(test_dir + 4)); #else # ifdef __PASE__ /* On IBMi PASE, st_size returns the length of the symlink itself. */ - ASSERT(((uv_stat_t*)req.ptr)->st_size == strlen("test_dir_symlink")); + ASSERT_EQ(((uv_stat_t*)req.ptr)->st_size, strlen("test_dir_symlink")); # else - ASSERT(((uv_stat_t*)req.ptr)->st_size == strlen(test_dir)); + ASSERT_EQ(((uv_stat_t*)req.ptr)->st_size, strlen(test_dir)); # endif #endif uv_fs_req_cleanup(&req); r = uv_fs_readlink(NULL, &req, "test_dir_symlink", NULL); - ASSERT(r == 0); + ASSERT_OK(r); #ifdef _WIN32 - ASSERT(strcmp(req.ptr, test_dir + 4) == 0); + ASSERT_OK(strcmp(req.ptr, test_dir + 4)); #else - ASSERT(strcmp(req.ptr, test_dir) == 0); + ASSERT_OK(strcmp(req.ptr, test_dir)); #endif uv_fs_req_cleanup(&req); r = uv_fs_realpath(NULL, &req, "test_dir_symlink", NULL); - ASSERT(r == 0); + ASSERT_OK(r); #ifdef _WIN32 - ASSERT(strlen(req.ptr) == test_dir_abs_size - 5); - ASSERT(strnicmp(req.ptr, test_dir + 4, test_dir_abs_size - 5) == 0); + ASSERT_EQ(strlen(req.ptr), test_dir_abs_size - 5); + ASSERT_OK(strnicmp(req.ptr, test_dir + 4, test_dir_abs_size - 5)); #else - ASSERT(strcmp(req.ptr, test_dir_abs_buf) == 0); + ASSERT_OK(strcmp(req.ptr, test_dir_abs_buf)); #endif uv_fs_req_cleanup(&req); r = uv_fs_open(NULL, &open_req1, "test_dir/file1", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); uv_fs_req_cleanup(&open_req1); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); r = uv_fs_open(NULL, &open_req1, "test_dir/file2", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); uv_fs_req_cleanup(&open_req1); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); r = uv_fs_scandir(NULL, &scandir_req, "test_dir_symlink", 0, NULL); - ASSERT(r == 2); - ASSERT(scandir_req.result == 2); + ASSERT_EQ(2, r); + ASSERT_EQ(2, scandir_req.result); ASSERT(scandir_req.ptr); while (UV_EOF != uv_fs_scandir_next(&scandir_req, &dent)) { ASSERT(strcmp(dent.name, "file1") == 0 || strcmp(dent.name, "file2") == 0); @@ -2419,16 +2421,16 @@ int test_symlink_dir_impl(int type) { /* unlink will remove the directory symlink */ r = uv_fs_unlink(NULL, &req, "test_dir_symlink", NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); r = uv_fs_scandir(NULL, &scandir_req, "test_dir_symlink", 0, NULL); - ASSERT(r == UV_ENOENT); + ASSERT_EQ(r, UV_ENOENT); uv_fs_req_cleanup(&scandir_req); r = uv_fs_scandir(NULL, &scandir_req, "test_dir", 0, NULL); - ASSERT(r == 2); - ASSERT(scandir_req.result == 2); + ASSERT_EQ(2, r); + ASSERT_EQ(2, scandir_req.result); ASSERT(scandir_req.ptr); while (UV_EOF != uv_fs_scandir_next(&scandir_req, &dent)) { ASSERT(strcmp(dent.name, "file1") == 0 || strcmp(dent.name, "file2") == 0); @@ -2481,7 +2483,7 @@ TEST_IMPL(fs_non_symlink_reparse_point) { FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, NULL); - ASSERT(file_handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(file_handle, INVALID_HANDLE_VALUE); memset(&reparse_buffer, 0, REPARSE_GUID_DATA_BUFFER_HEADER_SIZE); reparse_buffer.ReparseTag = REPARSE_TAG; @@ -2496,7 +2498,7 @@ TEST_IMPL(fs_non_symlink_reparse_point) { 0, &bytes_returned, NULL); - ASSERT(r != 0); + ASSERT(r); CloseHandle(file_handle); @@ -2510,11 +2512,11 @@ TEST_IMPL(fs_non_symlink_reparse_point) { shared via SMB as "Macintosh HD". r = uv_fs_stat(NULL, &req, "\\\\\\Macintosh HD\\.DS_Store", NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); r = uv_fs_lstat(NULL, &req, "\\\\\\Macintosh HD\\.DS_Store", NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); */ @@ -2525,25 +2527,25 @@ TEST_IMPL(fs_non_symlink_reparse_point) { the scope of this test. r = uv_fs_stat(NULL, &req, "test_dir/test_file", NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); r = uv_fs_lstat(NULL, &req, "test_dir/test_file", NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); */ r = uv_fs_scandir(NULL, &scandir_req, "test_dir", 0, NULL); - ASSERT(r == 1); - ASSERT(scandir_req.result == 1); + ASSERT_EQ(1, r); + ASSERT_EQ(1, scandir_req.result); ASSERT(scandir_req.ptr); while (UV_EOF != uv_fs_scandir_next(&scandir_req, &dent)) { - ASSERT(strcmp(dent.name, "test_file") == 0); + ASSERT_OK(strcmp(dent.name, "test_file")); /* uv_fs_scandir incorrectly identifies non-symlink reparse points as links because it doesn't open the file and verify the reparse point tag. The PowerShell Get-ChildItem command shares this behavior, so it's reasonable to leave it as is. */ - ASSERT(dent.type == UV_DIRENT_LINK); + ASSERT_EQ(dent.type, UV_DIRENT_LINK); } uv_fs_req_cleanup(&scandir_req); ASSERT(!scandir_req.ptr); @@ -2575,7 +2577,7 @@ TEST_IMPL(fs_lstat_windows_store_apps) { MAKE_VALGRIND_HAPPY(loop); return TEST_SKIP; } - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = snprintf(windowsapps_path, sizeof(localappdata), "%s\\Microsoft\\WindowsApps", @@ -2601,7 +2603,7 @@ TEST_IMPL(fs_lstat_windows_store_apps) { dirent.name) < 0) { continue; } - ASSERT_EQ(uv_fs_lstat(loop, &stat_req, file_path, NULL), 0); + ASSERT_OK(uv_fs_lstat(loop, &stat_req, file_path, NULL)); } MAKE_VALGRIND_HAPPY(loop); return 0; @@ -2621,16 +2623,16 @@ TEST_IMPL(fs_utime) { loop = uv_default_loop(); unlink(path); r = uv_fs_open(NULL, &req, path, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); uv_fs_req_cleanup(&req); uv_fs_close(loop, &req, r, NULL); atime = mtime = 400497753.25; /* 1982-09-10 11:22:33.25 */ r = uv_fs_utime(NULL, &req, path, atime, mtime, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); check_utime(path, atime, mtime, /* test_lutime */ 0); @@ -2643,9 +2645,9 @@ TEST_IMPL(fs_utime) { /* async utime */ utime_req.data = &checkme; r = uv_fs_utime(loop, &utime_req, path, atime, mtime, utime_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(utime_cb_count == 1); + ASSERT_EQ(1, utime_cb_count); /* Cleanup. */ unlink(path); @@ -2668,7 +2670,7 @@ TEST_IMPL(fs_utime_round) { ASSERT_GE(r, 0); ASSERT_GE(req.result, 0); uv_fs_req_cleanup(&req); - ASSERT_EQ(0, uv_fs_close(loop, &req, r, NULL)); + ASSERT_OK(uv_fs_close(loop, &req, r, NULL)); atime = mtime = -14245440.25; /* 1969-07-20T02:56:00.25Z */ @@ -2683,8 +2685,8 @@ TEST_IMPL(fs_utime_round) { RETURN_SKIP("utime on some OS (z/OS, IBM i PASE, AIX) or filesystems may reject pre-epoch timestamps"); } #endif - ASSERT_EQ(0, r); - ASSERT_EQ(0, req.result); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); check_utime(path, atime, mtime, /* test_lutime */ 0); unlink(path); @@ -2699,26 +2701,26 @@ TEST_IMPL(fs_stat_root) { int r; r = uv_fs_stat(NULL, &stat_req, "\\", NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_stat(NULL, &stat_req, "..\\..\\..\\..\\..\\..\\..", NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_stat(NULL, &stat_req, "..", NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_stat(NULL, &stat_req, "..\\", NULL); - ASSERT(r == 0); + ASSERT_OK(r); /* stats the current directory on c: */ r = uv_fs_stat(NULL, &stat_req, "c:", NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_stat(NULL, &stat_req, "c:\\", NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_stat(NULL, &stat_req, "\\\\?\\C:\\", NULL); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -2742,26 +2744,26 @@ TEST_IMPL(fs_futime) { loop = uv_default_loop(); unlink(path); r = uv_fs_open(NULL, &req, path, O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); uv_fs_req_cleanup(&req); uv_fs_close(loop, &req, r, NULL); atime = mtime = 400497753.25; /* 1982-09-10 11:22:33.25 */ r = uv_fs_open(NULL, &req, path, O_RDWR, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); file = req.result; /* FIXME probably not how it's supposed to be used */ uv_fs_req_cleanup(&req); r = uv_fs_futime(NULL, &req, file, atime, mtime, NULL); #if defined(__CYGWIN__) || defined(__MSYS__) - ASSERT(r == UV_ENOSYS); + ASSERT_EQ(r, UV_ENOSYS); RETURN_SKIP("futime not supported on Cygwin"); #else - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); #endif uv_fs_req_cleanup(&req); @@ -2776,9 +2778,9 @@ TEST_IMPL(fs_futime) { /* async futime */ futime_req.data = &checkme; r = uv_fs_futime(loop, &futime_req, file, atime, mtime, futime_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(futime_cb_count == 1); + ASSERT_EQ(1, futime_cb_count); /* Cleanup. */ unlink(path); @@ -2819,8 +2821,8 @@ TEST_IMPL(fs_lutime) { "Symlink creation requires elevated console (with admin rights)"); } #endif - ASSERT_EQ(s, 0); - ASSERT_EQ(req.result, 0); + ASSERT_OK(s); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); /* Test the synchronous version. */ @@ -2837,9 +2839,9 @@ TEST_IMPL(fs_lutime) { ASSERT_EQ(r, UV_ENOSYS); RETURN_SKIP("lutime is not implemented for z/OS and AIX versions below 7.1"); #endif - ASSERT_EQ(r, 0); + ASSERT_OK(r); lutime_cb(&req); - ASSERT_EQ(lutime_cb_count, 1); + ASSERT_EQ(1, lutime_cb_count); /* Test the asynchronous version. */ atime = mtime = 1291404900; /* 2010-12-03 20:35:00 */ @@ -2849,9 +2851,9 @@ TEST_IMPL(fs_lutime) { checkme.path = symlink_path; r = uv_fs_lutime(loop, &req, symlink_path, atime, mtime, lutime_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT_EQ(lutime_cb_count, 2); + ASSERT_EQ(2, lutime_cb_count); /* Cleanup. */ unlink(path); @@ -2869,8 +2871,8 @@ TEST_IMPL(fs_stat_missing_path) { loop = uv_default_loop(); r = uv_fs_stat(NULL, &req, "non_existent_file", NULL); - ASSERT(r == UV_ENOENT); - ASSERT(req.result == UV_ENOENT); + ASSERT_EQ(r, UV_ENOENT); + ASSERT_EQ(req.result, UV_ENOENT); uv_fs_req_cleanup(&req); MAKE_VALGRIND_HAPPY(loop); @@ -2894,18 +2896,18 @@ TEST_IMPL(fs_scandir_empty_dir) { memset(&req, 0xdb, sizeof(req)); r = uv_fs_scandir(NULL, &req, path, 0, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); ASSERT_NULL(req.ptr); - ASSERT(UV_EOF == uv_fs_scandir_next(&req, &dent)); + ASSERT_EQ(UV_EOF, uv_fs_scandir_next(&req, &dent)); uv_fs_req_cleanup(&req); r = uv_fs_scandir(loop, &scandir_req, path, 0, empty_scandir_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(scandir_cb_count == 0); + ASSERT_OK(scandir_cb_count); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(scandir_cb_count == 1); + ASSERT_EQ(1, scandir_cb_count); uv_fs_rmdir(NULL, &req, path, NULL); uv_fs_req_cleanup(&req); @@ -2931,18 +2933,18 @@ TEST_IMPL(fs_scandir_non_existent_dir) { memset(&req, 0xdb, sizeof(req)); r = uv_fs_scandir(NULL, &req, path, 0, NULL); - ASSERT(r == UV_ENOENT); - ASSERT(req.result == UV_ENOENT); + ASSERT_EQ(r, UV_ENOENT); + ASSERT_EQ(req.result, UV_ENOENT); ASSERT_NULL(req.ptr); - ASSERT(UV_ENOENT == uv_fs_scandir_next(&req, &dent)); + ASSERT_EQ(UV_ENOENT, uv_fs_scandir_next(&req, &dent)); uv_fs_req_cleanup(&req); r = uv_fs_scandir(loop, &scandir_req, path, 0, non_existent_scandir_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(scandir_cb_count == 0); + ASSERT_OK(scandir_cb_count); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(scandir_cb_count == 1); + ASSERT_EQ(1, scandir_cb_count); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -2956,15 +2958,15 @@ TEST_IMPL(fs_scandir_file) { loop = uv_default_loop(); r = uv_fs_scandir(NULL, &scandir_req, path, 0, NULL); - ASSERT(r == UV_ENOTDIR); + ASSERT_EQ(r, UV_ENOTDIR); uv_fs_req_cleanup(&scandir_req); r = uv_fs_scandir(loop, &scandir_req, path, 0, file_scandir_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(scandir_cb_count == 0); + ASSERT_OK(scandir_cb_count); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(scandir_cb_count == 1); + ASSERT_EQ(1, scandir_cb_count); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -2998,21 +3000,21 @@ TEST_IMPL(fs_open_dir) { loop = uv_default_loop(); r = uv_fs_open(NULL, &req, path, O_RDONLY, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); ASSERT_NULL(req.ptr); file = r; uv_fs_req_cleanup(&req); r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_open(loop, &req, path, O_RDONLY, 0, open_cb_simple); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(open_cb_count == 0); + ASSERT_OK(open_cb_count); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(open_cb_count == 1); + ASSERT_EQ(1, open_cb_count); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -3029,57 +3031,57 @@ static void fs_file_open_append(int add_flags) { r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT | add_flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(write_req.result, 0); uv_fs_req_cleanup(&write_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); r = uv_fs_open(NULL, &open_req1, "test_file", O_RDWR | O_APPEND | add_flags, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(write_req.result, 0); uv_fs_req_cleanup(&write_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY | add_flags, S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); printf("read = %d\n", r); - ASSERT(r == 26); - ASSERT(read_req.result == 26); - ASSERT(memcmp(buf, - "test-buffer\n\0test-buffer\n\0", - sizeof("test-buffer\n\0test-buffer\n\0") - 1) == 0); + ASSERT_EQ(26, r); + ASSERT_EQ(26, read_req.result); + ASSERT_OK(memcmp(buf, + "test-buffer\n\0test-buffer\n\0", + sizeof("test-buffer\n\0test-buffer\n\0") - 1)); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* Cleanup */ @@ -3105,53 +3107,53 @@ TEST_IMPL(fs_rename_to_existing_file) { r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(write_req.result, 0); uv_fs_req_cleanup(&write_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); r = uv_fs_open(NULL, &open_req1, "test_file2", O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); r = uv_fs_rename(NULL, &rename_req, "test_file", "test_file2", NULL); - ASSERT(r == 0); - ASSERT(rename_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(rename_req.result); uv_fs_req_cleanup(&rename_req); r = uv_fs_open(NULL, &open_req1, "test_file2", O_RDONLY, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); + ASSERT_GE(r, 0); + ASSERT_GE(read_req.result, 0); + ASSERT_OK(strcmp(buf, test_buf)); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* Cleanup */ @@ -3167,49 +3169,49 @@ static void fs_read_bufs(int add_flags) { char scratch[768]; uv_buf_t bufs[4]; - ASSERT(0 <= uv_fs_open(NULL, &open_req1, - "test/fixtures/lorem_ipsum.txt", - O_RDONLY | add_flags, 0, NULL)); - ASSERT(open_req1.result >= 0); + ASSERT_LE(0, uv_fs_open(NULL, &open_req1, + "test/fixtures/lorem_ipsum.txt", + O_RDONLY | add_flags, 0, NULL)); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); - ASSERT(UV_EINVAL == uv_fs_read(NULL, &read_req, open_req1.result, - NULL, 0, 0, NULL)); - ASSERT(UV_EINVAL == uv_fs_read(NULL, &read_req, open_req1.result, - NULL, 1, 0, NULL)); - ASSERT(UV_EINVAL == uv_fs_read(NULL, &read_req, open_req1.result, - bufs, 0, 0, NULL)); + ASSERT_EQ(UV_EINVAL, uv_fs_read(NULL, &read_req, open_req1.result, + NULL, 0, 0, NULL)); + ASSERT_EQ(UV_EINVAL, uv_fs_read(NULL, &read_req, open_req1.result, + NULL, 1, 0, NULL)); + ASSERT_EQ(UV_EINVAL, uv_fs_read(NULL, &read_req, open_req1.result, + bufs, 0, 0, NULL)); bufs[0] = uv_buf_init(scratch + 0, 256); bufs[1] = uv_buf_init(scratch + 256, 256); bufs[2] = uv_buf_init(scratch + 512, 128); bufs[3] = uv_buf_init(scratch + 640, 128); - ASSERT(446 == uv_fs_read(NULL, - &read_req, - open_req1.result, - bufs + 0, - 2, /* 2x 256 bytes. */ - 0, /* Positional read. */ - NULL)); - ASSERT(read_req.result == 446); + ASSERT_EQ(446, uv_fs_read(NULL, + &read_req, + open_req1.result, + bufs + 0, + 2, /* 2x 256 bytes. */ + 0, /* Positional read. */ + NULL)); + ASSERT_EQ(446, read_req.result); uv_fs_req_cleanup(&read_req); - ASSERT(190 == uv_fs_read(NULL, - &read_req, - open_req1.result, - bufs + 2, - 2, /* 2x 128 bytes. */ - 256, /* Positional read. */ - NULL)); - ASSERT(read_req.result == /* 446 - 256 */ 190); + ASSERT_EQ(190, uv_fs_read(NULL, + &read_req, + open_req1.result, + bufs + 2, + 2, /* 2x 128 bytes. */ + 256, /* Positional read. */ + NULL)); + ASSERT_EQ(read_req.result, /* 446 - 256 */ 190); uv_fs_req_cleanup(&read_req); - ASSERT(0 == memcmp(bufs[1].base + 0, bufs[2].base, 128)); - ASSERT(0 == memcmp(bufs[1].base + 128, bufs[3].base, 190 - 128)); + ASSERT_OK(memcmp(bufs[1].base + 0, bufs[2].base, 128)); + ASSERT_OK(memcmp(bufs[1].base + 128, bufs[3].base, 190 - 128)); - ASSERT(0 == uv_fs_close(NULL, &close_req, open_req1.result, NULL)); - ASSERT(close_req.result == 0); + ASSERT_OK(uv_fs_close(NULL, &close_req, open_req1.result, NULL)); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); } TEST_IMPL(fs_read_bufs) { @@ -3234,45 +3236,45 @@ static void fs_read_file_eof(int add_flags) { r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT | add_flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(write_req.result, 0); uv_fs_req_cleanup(&write_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY | add_flags, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); memset(buf, 0, sizeof(buf)); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result >= 0); - ASSERT(strcmp(buf, test_buf) == 0); + ASSERT_GE(r, 0); + ASSERT_GE(read_req.result, 0); + ASSERT_OK(strcmp(buf, test_buf)); uv_fs_req_cleanup(&read_req); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, read_req.result, NULL); - ASSERT(r == 0); - ASSERT(read_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(read_req.result); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* Cleanup */ @@ -3298,26 +3300,26 @@ static void fs_write_multiple_bufs(int add_flags) { r = uv_fs_open(NULL, &open_req1, "test_file", O_WRONLY | O_CREAT | add_flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); iovs[0] = uv_buf_init(test_buf, sizeof(test_buf)); iovs[1] = uv_buf_init(test_buf2, sizeof(test_buf2)); r = uv_fs_write(NULL, &write_req, open_req1.result, iovs, 2, 0, NULL); - ASSERT(r >= 0); - ASSERT(write_req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(write_req.result, 0); uv_fs_req_cleanup(&write_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY | add_flags, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); memset(buf, 0, sizeof(buf)); @@ -3325,48 +3327,48 @@ static void fs_write_multiple_bufs(int add_flags) { /* Read the strings back to separate buffers. */ iovs[0] = uv_buf_init(buf, sizeof(test_buf)); iovs[1] = uv_buf_init(buf2, sizeof(test_buf2)); - ASSERT(lseek(open_req1.result, 0, SEEK_CUR) == 0); + ASSERT_OK(lseek(open_req1.result, 0, SEEK_CUR)); r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, 2, -1, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result == sizeof(test_buf) + sizeof(test_buf2)); - ASSERT(strcmp(buf, test_buf) == 0); - ASSERT(strcmp(buf2, test_buf2) == 0); + ASSERT_GE(r, 0); + ASSERT_EQ(read_req.result, sizeof(test_buf) + sizeof(test_buf2)); + ASSERT_OK(strcmp(buf, test_buf)); + ASSERT_OK(strcmp(buf2, test_buf2)); uv_fs_req_cleanup(&read_req); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == 0); - ASSERT(read_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(read_req.result); uv_fs_req_cleanup(&read_req); /* Read the strings back to separate buffers. */ iovs[0] = uv_buf_init(buf, sizeof(test_buf)); iovs[1] = uv_buf_init(buf2, sizeof(test_buf2)); r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, 2, 0, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); if (read_req.result == sizeof(test_buf)) { /* Infer that preadv is not available. */ uv_fs_req_cleanup(&read_req); r = uv_fs_read(NULL, &read_req, open_req1.result, &iovs[1], 1, read_req.result, NULL); - ASSERT(r >= 0); - ASSERT(read_req.result == sizeof(test_buf2)); + ASSERT_GE(r, 0); + ASSERT_EQ(read_req.result, sizeof(test_buf2)); } else { - ASSERT(read_req.result == sizeof(test_buf) + sizeof(test_buf2)); + ASSERT_EQ(read_req.result, sizeof(test_buf) + sizeof(test_buf2)); } - ASSERT(strcmp(buf, test_buf) == 0); - ASSERT(strcmp(buf2, test_buf2) == 0); + ASSERT_OK(strcmp(buf, test_buf)); + ASSERT_OK(strcmp(buf2, test_buf2)); uv_fs_req_cleanup(&read_req); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, sizeof(test_buf) + sizeof(test_buf2), NULL); - ASSERT(r == 0); - ASSERT(read_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(read_req.result); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* Cleanup */ @@ -3406,8 +3408,8 @@ static void fs_write_alotof_bufs(int add_flags) { O_RDWR | O_CREAT | add_flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); for (index = 0; index < iovcount; ++index) @@ -3420,8 +3422,8 @@ static void fs_write_alotof_bufs(int add_flags) { iovcount, -1, NULL); - ASSERT(r >= 0); - ASSERT((size_t)write_req.result == sizeof(test_buf) * iovcount); + ASSERT_GE(r, 0); + ASSERT_EQ((size_t)write_req.result, sizeof(test_buf) * iovcount); uv_fs_req_cleanup(&write_req); /* Read the strings back to separate buffers. */ @@ -3433,31 +3435,32 @@ static void fs_write_alotof_bufs(int add_flags) { sizeof(test_buf)); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY | add_flags, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, iovcount, -1, NULL); if (iovcount > iovmax) iovcount = iovmax; - ASSERT(r >= 0); - ASSERT((size_t)read_req.result == sizeof(test_buf) * iovcount); + ASSERT_GE(r, 0); + ASSERT_EQ((size_t)read_req.result, sizeof(test_buf) * iovcount); for (index = 0; index < iovcount; ++index) - ASSERT(strncmp(buffer + index * sizeof(test_buf), - test_buf, - sizeof(test_buf)) == 0); + ASSERT_OK(strncmp(buffer + index * sizeof(test_buf), + test_buf, + sizeof(test_buf))); uv_fs_req_cleanup(&read_req); free(buffer); - ASSERT(lseek(open_req1.result, write_req.result, SEEK_SET) == write_req.result); + ASSERT_EQ(lseek(open_req1.result, write_req.result, SEEK_SET), + write_req.result); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, @@ -3466,13 +3469,13 @@ static void fs_write_alotof_bufs(int add_flags) { 1, -1, NULL); - ASSERT(r == 0); - ASSERT(read_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(read_req.result); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* Cleanup */ @@ -3518,14 +3521,14 @@ static void fs_write_alotof_bufs_with_offset(int add_flags) { O_RDWR | O_CREAT | add_flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(filler, filler_len); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == filler_len); - ASSERT(write_req.result == filler_len); + ASSERT_EQ(r, filler_len); + ASSERT_EQ(write_req.result, filler_len); uv_fs_req_cleanup(&write_req); offset = (int64_t)r; @@ -3539,8 +3542,8 @@ static void fs_write_alotof_bufs_with_offset(int add_flags) { iovcount, offset, NULL); - ASSERT(r >= 0); - ASSERT((size_t)write_req.result == sizeof(test_buf) * iovcount); + ASSERT_GE(r, 0); + ASSERT_EQ((size_t)write_req.result, sizeof(test_buf) * iovcount); uv_fs_req_cleanup(&write_req); /* Read the strings back to separate buffers. */ @@ -3553,25 +3556,25 @@ static void fs_write_alotof_bufs_with_offset(int add_flags) { r = uv_fs_read(NULL, &read_req, open_req1.result, iovs, iovcount, offset, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); if (r == sizeof(test_buf)) iovcount = 1; /* Infer that preadv is not available. */ else if (iovcount > iovmax) iovcount = iovmax; - ASSERT((size_t)read_req.result == sizeof(test_buf) * iovcount); + ASSERT_EQ((size_t)read_req.result, sizeof(test_buf) * iovcount); for (index = 0; index < iovcount; ++index) - ASSERT(strncmp(buffer + index * sizeof(test_buf), - test_buf, - sizeof(test_buf)) == 0); + ASSERT_OK(strncmp(buffer + index * sizeof(test_buf), + test_buf, + sizeof(test_buf))); uv_fs_req_cleanup(&read_req); free(buffer); r = uv_fs_stat(NULL, &stat_req, "test_file", NULL); - ASSERT(r == 0); - ASSERT((int64_t)((uv_stat_t*)stat_req.ptr)->st_size == - offset + (int64_t)write_req.result); + ASSERT_OK(r); + ASSERT_EQ((int64_t)((uv_stat_t*)stat_req.ptr)->st_size, + offset + (int64_t)write_req.result); uv_fs_req_cleanup(&stat_req); iov = uv_buf_init(buf, sizeof(buf)); @@ -3582,13 +3585,13 @@ static void fs_write_alotof_bufs_with_offset(int add_flags) { 1, offset + write_req.result, NULL); - ASSERT(r == 0); - ASSERT(read_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(read_req.result); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* Cleanup */ @@ -3611,9 +3614,9 @@ TEST_IMPL(fs_read_dir) { /* Setup */ rmdir("test_dir"); r = uv_fs_mkdir(loop, &mkdir_req, "test_dir", 0755, mkdir_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(mkdir_cb_count == 1); + ASSERT_EQ(1, mkdir_cb_count); /* Setup Done Here */ /* Get a file descriptor for the directory */ @@ -3623,7 +3626,7 @@ TEST_IMPL(fs_read_dir) { UV_FS_O_RDONLY | UV_FS_O_DIRECTORY, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); + ASSERT_GE(r, 0); uv_fs_req_cleanup(&open_req1); /* Try to read data from the directory */ @@ -3643,12 +3646,12 @@ TEST_IMPL(fs_read_dir) { */ ASSERT((r >= 0) || (r == UV_EISDIR)); #else - ASSERT(r == UV_EISDIR); + ASSERT_EQ(r, UV_EISDIR); #endif uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); /* Cleanup */ @@ -3695,7 +3698,7 @@ static void thread_main(void* arg) { if (ctx->doread) { result = write(ctx->fd, data, nbytes); /* Should not see EINTR (or other errors) */ - ASSERT(result == nbytes); + ASSERT_EQ(result, nbytes); } else { result = read(ctx->fd, data, nbytes); /* Should not see EINTR (or other errors), @@ -3757,13 +3760,13 @@ static void test_fs_partial(int doread) { loop = uv_default_loop(); - ASSERT(0 == uv_signal_init(loop, &signal)); - ASSERT(0 == uv_signal_start(&signal, sig_func, SIGUSR1)); + ASSERT_OK(uv_signal_init(loop, &signal)); + ASSERT_OK(uv_signal_start(&signal, sig_func, SIGUSR1)); - ASSERT(0 == pipe(pipe_fds)); + ASSERT_OK(pipe(pipe_fds)); ctx.fd = pipe_fds[doread]; - ASSERT(0 == uv_thread_create(&thread, thread_main, &ctx)); + ASSERT_OK(uv_thread_create(&thread, thread_main, &ctx)); if (doread) { uv_buf_t* read_iovs; @@ -3780,34 +3783,34 @@ static void test_fs_partial(int doread) { iovcount -= read_iovcount; nread += result; } else { - ASSERT(result == UV_EINTR); + ASSERT_EQ(result, UV_EINTR); } uv_fs_req_cleanup(&read_req); } } else { int result; result = uv_fs_write(loop, &write_req, pipe_fds[1], iovs, iovcount, -1, NULL); - ASSERT(write_req.result == result); - ASSERT(result == ctx.size); + ASSERT_EQ(write_req.result, result); + ASSERT_EQ(result, ctx.size); uv_fs_req_cleanup(&write_req); } - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); ASSERT_MEM_EQ(buffer, ctx.data, ctx.size); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(0 == close(pipe_fds[1])); + ASSERT_OK(close(pipe_fds[1])); uv_close((uv_handle_t*) &signal, NULL); { /* Make sure we read everything that we wrote. */ int result; result = uv_fs_read(loop, &read_req, pipe_fds[0], iovs, 1, -1, NULL); - ASSERT(result == 0); + ASSERT_OK(result); uv_fs_req_cleanup(&read_req); } - ASSERT(0 == close(pipe_fds[0])); + ASSERT_OK(close(pipe_fds[0])); free(iovs); free(buffer); @@ -3832,13 +3835,13 @@ TEST_IMPL(fs_read_write_null_arguments) { int r; r = uv_fs_read(NULL, &read_req, 0, NULL, 0, -1, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_fs_req_cleanup(&read_req); r = uv_fs_write(NULL, &write_req, 0, NULL, 0, -1, NULL); /* Validate some memory management on failed input validation before sending fs work to the thread pool. */ - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); ASSERT_NULL(write_req.path); ASSERT_NULL(write_req.ptr); #ifdef _WIN32 @@ -3853,36 +3856,36 @@ TEST_IMPL(fs_read_write_null_arguments) { iov = uv_buf_init(NULL, 0); r = uv_fs_read(NULL, &read_req, 0, &iov, 0, -1, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_fs_req_cleanup(&read_req); iov = uv_buf_init(NULL, 0); r = uv_fs_write(NULL, &write_req, 0, &iov, 0, -1, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_fs_req_cleanup(&write_req); /* If the arguments are invalid, the loop should not be kept open */ loop = uv_default_loop(); r = uv_fs_read(loop, &read_req, 0, NULL, 0, -1, fail_cb); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_run(loop, UV_RUN_DEFAULT); uv_fs_req_cleanup(&read_req); r = uv_fs_write(loop, &write_req, 0, NULL, 0, -1, fail_cb); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_run(loop, UV_RUN_DEFAULT); uv_fs_req_cleanup(&write_req); iov = uv_buf_init(NULL, 0); r = uv_fs_read(loop, &read_req, 0, &iov, 0, -1, fail_cb); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_run(loop, UV_RUN_DEFAULT); uv_fs_req_cleanup(&read_req); iov = uv_buf_init(NULL, 0); r = uv_fs_write(loop, &write_req, 0, &iov, 0, -1, fail_cb); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_run(loop, UV_RUN_DEFAULT); uv_fs_req_cleanup(&write_req); @@ -3906,20 +3909,20 @@ TEST_IMPL(get_osfhandle_valid_handle) { O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); fd = uv_get_osfhandle(open_req1.result); #ifdef _WIN32 - ASSERT(fd != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(fd, INVALID_HANDLE_VALUE); #else - ASSERT(fd >= 0); + ASSERT_GE(fd, 0); #endif r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* Cleanup. */ @@ -3945,27 +3948,27 @@ TEST_IMPL(open_osfhandle_valid_handle) { O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); handle = uv_get_osfhandle(open_req1.result); #ifdef _WIN32 - ASSERT(handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(handle, INVALID_HANDLE_VALUE); #else - ASSERT(handle >= 0); + ASSERT_GE(handle, 0); #endif fd = uv_open_osfhandle(handle); #ifdef _WIN32 - ASSERT(fd > 0); + ASSERT_GT(fd, 0); #else - ASSERT(fd == open_req1.result); + ASSERT_EQ(fd, open_req1.result); #endif r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* Cleanup. */ @@ -3988,24 +3991,24 @@ TEST_IMPL(fs_file_pos_after_op_with_offset) { O_RDWR | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r > 0); + ASSERT_GT(r, 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(test_buf, sizeof(test_buf)); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, 0, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(lseek(open_req1.result, 0, SEEK_CUR) == 0); + ASSERT_EQ(r, sizeof(test_buf)); + ASSERT_OK(lseek(open_req1.result, 0, SEEK_CUR)); uv_fs_req_cleanup(&write_req); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, 0, NULL); - ASSERT(r == sizeof(test_buf)); - ASSERT(strcmp(buf, test_buf) == 0); - ASSERT(lseek(open_req1.result, 0, SEEK_CUR) == 0); + ASSERT_EQ(r, sizeof(test_buf)); + ASSERT_OK(strcmp(buf, test_buf)); + ASSERT_OK(lseek(open_req1.result, 0, SEEK_CUR)); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); /* Cleanup */ @@ -4021,30 +4024,30 @@ static void fs_file_pos_common(void) { iov = uv_buf_init("abc", 3); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == 3); + ASSERT_EQ(3, r); uv_fs_req_cleanup(&write_req); /* Read with offset should not change the position */ iov = uv_buf_init(buf, 1); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, 1, NULL); - ASSERT(r == 1); - ASSERT(buf[0] == 'b'); + ASSERT_EQ(1, r); + ASSERT_EQ(buf[0], 'b'); uv_fs_req_cleanup(&read_req); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&read_req); /* Write without offset should change the position */ iov = uv_buf_init("d", 1); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == 1); + ASSERT_EQ(1, r); uv_fs_req_cleanup(&write_req); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&read_req); } @@ -4053,23 +4056,23 @@ static void fs_file_pos_close_check(const char *contents, int size) { /* Close */ r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); /* Confirm file contents */ r = uv_fs_open(NULL, &open_req1, "test_file", O_RDONLY, 0, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == size); - ASSERT(strncmp(buf, contents, size) == 0); + ASSERT_EQ(r, size); + ASSERT_OK(strncmp(buf, contents, size)); uv_fs_req_cleanup(&read_req); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&close_req); /* Cleanup */ @@ -4088,7 +4091,7 @@ static void fs_file_pos_write(int add_flags) { O_TRUNC | O_CREAT | O_RDWR | add_flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r > 0); + ASSERT_GT(r, 0); uv_fs_req_cleanup(&open_req1); fs_file_pos_common(); @@ -4096,12 +4099,12 @@ static void fs_file_pos_write(int add_flags) { /* Write with offset should not change the position */ iov = uv_buf_init("e", 1); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, 1, NULL); - ASSERT(r == 1); + ASSERT_EQ(1, r); uv_fs_req_cleanup(&write_req); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&read_req); fs_file_pos_close_check("aecd", 4); @@ -4126,7 +4129,7 @@ static void fs_file_pos_append(int add_flags) { O_APPEND | O_CREAT | O_RDWR | add_flags, S_IWUSR | S_IRUSR, NULL); - ASSERT(r > 0); + ASSERT_GT(r, 0); uv_fs_req_cleanup(&open_req1); fs_file_pos_common(); @@ -4135,13 +4138,13 @@ static void fs_file_pos_append(int add_flags) { * but does not change the position */ iov = uv_buf_init("e", 1); r = uv_fs_write(NULL, &write_req, open_req1.result, &iov, 1, 1, NULL); - ASSERT(r == 1); + ASSERT_EQ(1, r); uv_fs_req_cleanup(&write_req); iov = uv_buf_init(buf, sizeof(buf)); r = uv_fs_read(NULL, &read_req, open_req1.result, &iov, 1, -1, NULL); - ASSERT(r == 1); - ASSERT(buf[0] == 'e'); + ASSERT_EQ(1, r); + ASSERT_EQ(buf[0], 'e'); uv_fs_req_cleanup(&read_req); fs_file_pos_close_check("abcde", 5); @@ -4160,97 +4163,97 @@ TEST_IMPL(fs_null_req) { int r; r = uv_fs_open(NULL, NULL, NULL, 0, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_close(NULL, NULL, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_read(NULL, NULL, 0, NULL, 0, -1, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_write(NULL, NULL, 0, NULL, 0, -1, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_unlink(NULL, NULL, NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_mkdir(NULL, NULL, NULL, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_mkdtemp(NULL, NULL, NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_mkstemp(NULL, NULL, NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_rmdir(NULL, NULL, NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_scandir(NULL, NULL, NULL, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_link(NULL, NULL, NULL, NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_symlink(NULL, NULL, NULL, NULL, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_readlink(NULL, NULL, NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_realpath(NULL, NULL, NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_chown(NULL, NULL, NULL, 0, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_fchown(NULL, NULL, 0, 0, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_stat(NULL, NULL, NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_lstat(NULL, NULL, NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_fstat(NULL, NULL, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_rename(NULL, NULL, NULL, NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_fsync(NULL, NULL, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_fdatasync(NULL, NULL, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_ftruncate(NULL, NULL, 0, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_copyfile(NULL, NULL, NULL, NULL, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_sendfile(NULL, NULL, 0, 0, 0, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_access(NULL, NULL, NULL, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_chmod(NULL, NULL, NULL, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_fchmod(NULL, NULL, 0, 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_utime(NULL, NULL, NULL, 0.0, 0.0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_futime(NULL, NULL, 0, 0.0, 0.0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_fs_statfs(NULL, NULL, NULL, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); /* This should be a no-op. */ uv_fs_req_cleanup(NULL); @@ -4265,7 +4268,7 @@ TEST_IMPL(fs_exclusive_sharing_mode) { /* Setup. */ unlink("test_file"); - ASSERT(UV_FS_O_EXLOCK > 0); + ASSERT_GT(UV_FS_O_EXLOCK, 0); r = uv_fs_open(NULL, &open_req1, @@ -4273,8 +4276,8 @@ TEST_IMPL(fs_exclusive_sharing_mode) { O_RDWR | O_CREAT | UV_FS_O_EXLOCK, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); r = uv_fs_open(NULL, @@ -4283,13 +4286,13 @@ TEST_IMPL(fs_exclusive_sharing_mode) { O_RDONLY | UV_FS_O_EXLOCK, S_IWUSR | S_IRUSR, NULL); - ASSERT(r < 0); - ASSERT(open_req2.result < 0); + ASSERT_LT(r, 0); + ASSERT_LT(open_req2.result, 0); uv_fs_req_cleanup(&open_req2); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); r = uv_fs_open(NULL, @@ -4298,13 +4301,13 @@ TEST_IMPL(fs_exclusive_sharing_mode) { O_RDONLY | UV_FS_O_EXLOCK, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req2.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req2.result, 0); uv_fs_req_cleanup(&open_req2); r = uv_fs_close(NULL, &close_req, open_req2.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* Cleanup */ @@ -4322,10 +4325,10 @@ TEST_IMPL(fs_file_flag_no_buffering) { /* Setup. */ unlink("test_file"); - ASSERT(UV_FS_O_APPEND > 0); - ASSERT(UV_FS_O_CREAT > 0); - ASSERT(UV_FS_O_DIRECT > 0); - ASSERT(UV_FS_O_RDWR > 0); + ASSERT_GT(UV_FS_O_APPEND, 0); + ASSERT_GT(UV_FS_O_CREAT, 0); + ASSERT_GT(UV_FS_O_DIRECT, 0); + ASSERT_GT(UV_FS_O_RDWR, 0); /* FILE_APPEND_DATA must be excluded from FILE_GENERIC_WRITE: */ r = uv_fs_open(NULL, @@ -4334,13 +4337,13 @@ TEST_IMPL(fs_file_flag_no_buffering) { UV_FS_O_RDWR | UV_FS_O_CREAT | UV_FS_O_DIRECT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* FILE_APPEND_DATA and FILE_FLAG_NO_BUFFERING are mutually exclusive: */ @@ -4350,8 +4353,8 @@ TEST_IMPL(fs_file_flag_no_buffering) { UV_FS_O_APPEND | UV_FS_O_DIRECT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r == UV_EINVAL); - ASSERT(open_req2.result == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); + ASSERT_EQ(open_req2.result, UV_EINVAL); uv_fs_req_cleanup(&open_req2); /* Cleanup */ @@ -4392,7 +4395,7 @@ TEST_IMPL(fs_open_readonly_acl) { /* Setup - clear the ACL and remove the file */ loop = uv_default_loop(); r = uv_os_get_passwd(&pwd); - ASSERT(r == 0); + ASSERT_OK(r); call_icacls("icacls test_file_icacls /remove \"%s\" /inheritance:e", pwd.username); uv_fs_chmod(loop, &req, "test_file_icacls", S_IWUSR, NULL); @@ -4405,12 +4408,12 @@ TEST_IMPL(fs_open_readonly_acl) { O_RDONLY | O_CREAT, S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(open_req1.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(open_req1.result, 0); uv_fs_req_cleanup(&open_req1); r = uv_fs_close(NULL, &close_req, open_req1.result, NULL); - ASSERT(r == 0); - ASSERT(close_req.result == 0); + ASSERT_OK(r); + ASSERT_OK(close_req.result); uv_fs_req_cleanup(&close_req); /* Set up ACL */ @@ -4442,7 +4445,7 @@ TEST_IMPL(fs_open_readonly_acl) { pwd.username); unlink("test_file_icacls"); uv_os_free_passwd(&pwd); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(loop); return 0; } @@ -4463,35 +4466,35 @@ TEST_IMPL(fs_fchmod_archive_readonly) { O_WRONLY | O_CREAT, S_IWUSR | S_IRUSR, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); file = req.result; uv_fs_req_cleanup(&req); r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); /* Make the file read-only and clear archive flag */ r = SetFileAttributes("test_file", FILE_ATTRIBUTE_READONLY); - ASSERT(r != 0); + ASSERT(r); check_permission("test_file", 0400); /* Try fchmod */ r = uv_fs_open(NULL, &req, "test_file", O_RDONLY, 0, NULL); - ASSERT(r >= 0); - ASSERT(req.result >= 0); + ASSERT_GE(r, 0); + ASSERT_GE(req.result, 0); file = req.result; uv_fs_req_cleanup(&req); r = uv_fs_fchmod(NULL, &req, file, S_IWUSR, NULL); - ASSERT(r == 0); - ASSERT(req.result == 0); + ASSERT_OK(r); + ASSERT_OK(req.result); uv_fs_req_cleanup(&req); r = uv_fs_close(NULL, &req, file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&req); check_permission("test_file", S_IWUSR); /* Restore Archive flag for rest of the tests */ r = SetFileAttributes("test_file", FILE_ATTRIBUTE_ARCHIVE); - ASSERT(r != 0); + ASSERT(r); return 0; } @@ -4503,7 +4506,7 @@ TEST_IMPL(fs_invalid_mkdir_name) { loop = uv_default_loop(); r = uv_fs_mkdir(loop, &req, "invalid>", 0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); ASSERT_EQ(UV_EINVAL, uv_fs_mkdir(loop, &req, "test:lol", 0, NULL)); return 0; @@ -4518,15 +4521,15 @@ TEST_IMPL(fs_statfs) { /* Test the synchronous version. */ r = uv_fs_statfs(NULL, &req, ".", NULL); - ASSERT(r == 0); + ASSERT_OK(r); statfs_cb(&req); - ASSERT(statfs_cb_count == 1); + ASSERT_EQ(1, statfs_cb_count); /* Test the asynchronous version. */ r = uv_fs_statfs(loop, &req, ".", statfs_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(statfs_cb_count == 2); + ASSERT_EQ(2, statfs_cb_count); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -4538,13 +4541,13 @@ TEST_IMPL(fs_get_system_error) { int system_error; r = uv_fs_statfs(NULL, &req, "non_existing_file", NULL); - ASSERT(r != 0); + ASSERT(r); system_error = uv_fs_get_system_error(&req); #ifdef _WIN32 - ASSERT(system_error == ERROR_FILE_NOT_FOUND); + ASSERT_EQ(system_error, ERROR_FILE_NOT_FOUND); #else - ASSERT(system_error == ENOENT); + ASSERT_EQ(system_error, ENOENT); #endif return 0; @@ -4559,13 +4562,13 @@ TEST_IMPL(fs_stat_batch_multiple) { rmdir("test_dir"); r = uv_fs_mkdir(NULL, &mkdir_req, "test_dir", 0755, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); loop = uv_default_loop(); for (i = 0; i < (int) ARRAY_SIZE(req); ++i) { r = uv_fs_stat(loop, &req[i], "test_dir", stat_batch_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } uv_run(loop, UV_RUN_DEFAULT); @@ -4590,7 +4593,7 @@ TEST_IMPL(fs_wtf) { loop = uv_default_loop(); r = uv_fs_mkdir(NULL, &mkdir_req, "test_dir", 0777, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_fs_req_cleanup(&mkdir_req); file_handle = CreateFileW(L"test_dir/hi\xD801\x0037", @@ -4601,19 +4604,19 @@ TEST_IMPL(fs_wtf) { FILE_FLAG_OPEN_REPARSE_POINT | FILE_FLAG_BACKUP_SEMANTICS, NULL); - ASSERT(file_handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(file_handle, INVALID_HANDLE_VALUE); CloseHandle(file_handle); r = uv_fs_scandir(NULL, &scandir_req, "test_dir", 0, NULL); - ASSERT_EQ(r, 1); - ASSERT_EQ(scandir_req.result, 1); + ASSERT_EQ(1, r); + ASSERT_EQ(1, scandir_req.result); ASSERT_NOT_NULL(scandir_req.ptr); while (UV_EOF != uv_fs_scandir_next(&scandir_req, &dent)) { snprintf(test_file_buf, sizeof(test_file_buf), "test_dir\\%s", dent.name); printf("stat %s\n", test_file_buf); r = uv_fs_stat(NULL, &stat_req, test_file_buf, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } uv_fs_req_cleanup(&scandir_req); ASSERT_NULL(scandir_req.ptr); diff --git a/deps/uv/test/test-get-currentexe.c b/deps/uv/test/test-get-currentexe.c index becaf5c1bb8613..c813d3a5c4f883 100644 --- a/deps/uv/test/test-get-currentexe.c +++ b/deps/uv/test/test-get-currentexe.c @@ -60,43 +60,43 @@ TEST_IMPL(get_currentexe) { * executable_path. */ ASSERT(match && !strcmp(match, path)); - ASSERT(size == strlen(buffer)); + ASSERT_EQ(size, strlen(buffer)); /* Negative tests */ size = sizeof(buffer) / sizeof(buffer[0]); r = uv_exepath(NULL, &size); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_exepath(buffer, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); size = 0; r = uv_exepath(buffer, &size); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); memset(buffer, -1, sizeof(buffer)); size = 1; r = uv_exepath(buffer, &size); - ASSERT(r == 0); - ASSERT(size == 0); - ASSERT(buffer[0] == '\0'); + ASSERT_OK(r); + ASSERT_OK(size); + ASSERT_EQ(buffer[0], '\0'); memset(buffer, -1, sizeof(buffer)); size = 2; r = uv_exepath(buffer, &size); - ASSERT(r == 0); - ASSERT(size == 1); - ASSERT(buffer[0] != '\0'); - ASSERT(buffer[1] == '\0'); + ASSERT_OK(r); + ASSERT_EQ(1, size); + ASSERT_NE(buffer[0], '\0'); + ASSERT_EQ(buffer[1], '\0'); /* Verify uv_exepath is not affected by uv_set_process_title(). */ r = uv_set_process_title("foobar"); - ASSERT_EQ(r, 0); + ASSERT_OK(r); size = sizeof(buffer); r = uv_exepath(buffer, &size); - ASSERT_EQ(r, 0); + ASSERT_OK(r); match = strstr(buffer, path); /* Verify that the path returned from uv_exepath is a subdirectory of diff --git a/deps/uv/test/test-get-loadavg.c b/deps/uv/test/test-get-loadavg.c index 4762e47576d064..ef1719c047f8d5 100644 --- a/deps/uv/test/test-get-loadavg.c +++ b/deps/uv/test/test-get-loadavg.c @@ -27,9 +27,9 @@ TEST_IMPL(get_loadavg) { double avg[3] = {-1, -1, -1}; uv_loadavg(avg); - ASSERT(avg[0] >= 0); - ASSERT(avg[1] >= 0); - ASSERT(avg[2] >= 0); + ASSERT_GE(avg[0], 0); + ASSERT_GE(avg[1], 0); + ASSERT_GE(avg[2], 0); return 0; } diff --git a/deps/uv/test/test-get-memory.c b/deps/uv/test/test-get-memory.c index 9ac42c383c918b..2a23f79470f599 100644 --- a/deps/uv/test/test-get-memory.c +++ b/deps/uv/test/test-get-memory.c @@ -35,13 +35,13 @@ TEST_IMPL(get_memory) { (unsigned long long) constrained_mem, (unsigned long long) available_mem); - ASSERT(free_mem > 0); - ASSERT(total_mem > 0); + ASSERT_GT(free_mem, 0); + ASSERT_GT(total_mem, 0); /* On IBMi PASE, the amount of memory in use is always zero. */ #ifdef __PASE__ - ASSERT(total_mem == free_mem); + ASSERT_EQ(total_mem, free_mem); #else - ASSERT(total_mem > free_mem); + ASSERT_GT(total_mem, free_mem); #endif ASSERT_LE(available_mem, total_mem); /* we'd really want to test if available <= free, but that is fragile: diff --git a/deps/uv/test/test-get-passwd.c b/deps/uv/test/test-get-passwd.c index 29a2bd1243d2b8..b1e762009757ab 100644 --- a/deps/uv/test/test-get-passwd.c +++ b/deps/uv/test/test-get-passwd.c @@ -39,7 +39,7 @@ TEST_IMPL(get_passwd) { /* Test the normal case */ r = uv_os_get_passwd(&pwd); - ASSERT_EQ(r, 0); + ASSERT_OK(r); len = strlen(pwd.username); ASSERT_GT(len, 0); @@ -114,7 +114,7 @@ TEST_IMPL(get_passwd2) { /* Test the normal case */ r = uv_os_get_passwd(&pwd); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_os_get_passwd2(&pwd2, pwd.uid); @@ -123,7 +123,7 @@ TEST_IMPL(get_passwd2) { (void) &len; #else - ASSERT_EQ(r, 0); + ASSERT_OK(r); ASSERT_EQ(pwd.uid, pwd2.uid); ASSERT_STR_EQ(pwd.username, pwd2.username); ASSERT_STR_EQ(pwd.shell, pwd2.shell); @@ -131,15 +131,20 @@ TEST_IMPL(get_passwd2) { uv_os_free_passwd(&pwd2); r = uv_os_get_passwd2(&pwd2, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); len = strlen(pwd2.username); ASSERT_GT(len, 0); +#if defined(__PASE__) + // uid 0 is qsecofr on IBM i + ASSERT_STR_EQ(pwd2.username, "qsecofr"); +#else ASSERT_STR_EQ(pwd2.username, "root"); - +#endif len = strlen(pwd2.homedir); +# ifndef __PASE__ ASSERT_GT(len, 0); - +#endif len = strlen(pwd2.shell); # ifndef __PASE__ ASSERT_GT(len, 0); @@ -174,7 +179,7 @@ TEST_IMPL(get_group) { int r; r = uv_os_get_passwd(&pwd); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_os_get_group(&grp, pwd.gid); @@ -183,7 +188,7 @@ TEST_IMPL(get_group) { (void) &len; #else - ASSERT_EQ(r, 0); + ASSERT_OK(r); ASSERT_EQ(pwd.gid, grp.gid); len = strlen(grp.groupname); diff --git a/deps/uv/test/test-getaddrinfo.c b/deps/uv/test/test-getaddrinfo.c index 1032537ad563a0..76137f06ca074c 100644 --- a/deps/uv/test/test-getaddrinfo.c +++ b/deps/uv/test/test-getaddrinfo.c @@ -40,8 +40,8 @@ static void getaddrinfo_fail_cb(uv_getaddrinfo_t* req, int status, struct addrinfo* res) { - ASSERT(fail_cb_called == 0); - ASSERT(status < 0); + ASSERT_OK(fail_cb_called); + ASSERT_LT(status, 0); ASSERT_NULL(res); uv_freeaddrinfo(res); /* Should not crash. */ fail_cb_called++; @@ -51,7 +51,7 @@ static void getaddrinfo_fail_cb(uv_getaddrinfo_t* req, static void getaddrinfo_basic_cb(uv_getaddrinfo_t* handle, int status, struct addrinfo* res) { - ASSERT(handle == getaddrinfo_handle); + ASSERT_PTR_EQ(handle, getaddrinfo_handle); getaddrinfo_cbs++; free(handle); uv_freeaddrinfo(res); @@ -66,7 +66,7 @@ static void getaddrinfo_cuncurrent_cb(uv_getaddrinfo_t* handle, for (i = 0; i < CONCURRENT_COUNT; i++) { if (&getaddrinfo_handles[i] == handle) { - ASSERT(i == *data); + ASSERT_EQ(i, *data); callback_counts[i]++; break; @@ -89,22 +89,22 @@ TEST_IMPL(getaddrinfo_fail) { uv_getaddrinfo_t req; - ASSERT(UV_EINVAL == uv_getaddrinfo(uv_default_loop(), - &req, - (uv_getaddrinfo_cb) abort, - NULL, - NULL, - NULL)); + ASSERT_EQ(UV_EINVAL, uv_getaddrinfo(uv_default_loop(), + &req, + (uv_getaddrinfo_cb) abort, + NULL, + NULL, + NULL)); /* Use a FQDN by ending in a period */ - ASSERT(0 == uv_getaddrinfo(uv_default_loop(), - &req, - getaddrinfo_fail_cb, - "example.invalid.", - NULL, - NULL)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(fail_cb_called == 1); + ASSERT_OK(uv_getaddrinfo(uv_default_loop(), + &req, + getaddrinfo_fail_cb, + "example.invalid.", + NULL, + NULL)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_EQ(1, fail_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -119,12 +119,12 @@ TEST_IMPL(getaddrinfo_fail_sync) { uv_getaddrinfo_t req; /* Use a FQDN by ending in a period */ - ASSERT(0 > uv_getaddrinfo(uv_default_loop(), - &req, - NULL, - "example.invalid.", - NULL, - NULL)); + ASSERT_GT(0, uv_getaddrinfo(uv_default_loop(), + &req, + NULL, + "example.invalid.", + NULL, + NULL)); uv_freeaddrinfo(req.addrinfo); MAKE_VALGRIND_HAPPY(uv_default_loop()); @@ -147,11 +147,11 @@ TEST_IMPL(getaddrinfo_basic) { name, NULL, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(getaddrinfo_cbs == 1); + ASSERT_EQ(1, getaddrinfo_cbs); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -165,12 +165,12 @@ TEST_IMPL(getaddrinfo_basic_sync) { #endif uv_getaddrinfo_t req; - ASSERT(0 == uv_getaddrinfo(uv_default_loop(), - &req, - NULL, - name, - NULL, - NULL)); + ASSERT_OK(uv_getaddrinfo(uv_default_loop(), + &req, + NULL, + name, + NULL, + NULL)); uv_freeaddrinfo(req.addrinfo); MAKE_VALGRIND_HAPPY(uv_default_loop()); @@ -201,13 +201,13 @@ TEST_IMPL(getaddrinfo_concurrent) { name, NULL, NULL); - ASSERT(r == 0); + ASSERT_OK(r); } uv_run(uv_default_loop(), UV_RUN_DEFAULT); for (i = 0; i < CONCURRENT_COUNT; i++) { - ASSERT(callback_counts[i] == 1); + ASSERT_EQ(1, callback_counts[i]); } MAKE_VALGRIND_HAPPY(uv_default_loop()); diff --git a/deps/uv/test/test-gethostname.c b/deps/uv/test/test-gethostname.c index dc29cd69234a13..cc15a8253ebf5a 100644 --- a/deps/uv/test/test-gethostname.c +++ b/deps/uv/test/test-gethostname.c @@ -32,27 +32,27 @@ TEST_IMPL(gethostname) { /* Reject invalid inputs */ size = 1; r = uv_os_gethostname(NULL, &size); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_os_gethostname(buf, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); size = 0; r = uv_os_gethostname(buf, &size); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); /* Return UV_ENOBUFS if the buffer cannot hold the hostname */ enobufs_size = 1; buf[0] = '\0'; r = uv_os_gethostname(buf, &enobufs_size); ASSERT_EQ(r, UV_ENOBUFS); - ASSERT(buf[0] == '\0'); - ASSERT(enobufs_size > 1); + ASSERT_EQ(buf[0], '\0'); + ASSERT_GT(enobufs_size, 1); /* Successfully get the hostname */ size = UV_MAXHOSTNAMESIZE; r = uv_os_gethostname(buf, &size); - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(size > 0 && size == strlen(buf)); - ASSERT(size + 1 == enobufs_size); + ASSERT_EQ(size + 1, enobufs_size); return 0; } diff --git a/deps/uv/test/test-getnameinfo.c b/deps/uv/test/test-getnameinfo.c index cea57b012f1322..415e48a4f961df 100644 --- a/deps/uv/test/test-getnameinfo.c +++ b/deps/uv/test/test-getnameinfo.c @@ -39,7 +39,7 @@ static void getnameinfo_req(uv_getnameinfo_t* handle, const char* hostname, const char* service) { ASSERT_NOT_NULL(handle); - ASSERT(status == 0); + ASSERT_OK(status); ASSERT_NOT_NULL(hostname); ASSERT_NOT_NULL(service); } @@ -54,14 +54,14 @@ TEST_IMPL(getnameinfo_basic_ip4) { int r; r = uv_ip4_addr(address_ip4, port, &addr4); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_getnameinfo(uv_default_loop(), &req, &getnameinfo_req, (const struct sockaddr*)&addr4, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); @@ -76,15 +76,15 @@ TEST_IMPL(getnameinfo_basic_ip4_sync) { RETURN_SKIP("Test does not currently work in QEMU"); #endif - ASSERT(0 == uv_ip4_addr(address_ip4, port, &addr4)); + ASSERT_OK(uv_ip4_addr(address_ip4, port, &addr4)); - ASSERT(0 == uv_getnameinfo(uv_default_loop(), - &req, - NULL, - (const struct sockaddr*)&addr4, - 0)); - ASSERT(req.host[0] != '\0'); - ASSERT(req.service[0] != '\0'); + ASSERT_OK(uv_getnameinfo(uv_default_loop(), + &req, + NULL, + (const struct sockaddr*)&addr4, + 0)); + ASSERT_NE(req.host[0], '\0'); + ASSERT_NE(req.service[0], '\0'); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -100,14 +100,14 @@ TEST_IMPL(getnameinfo_basic_ip6) { int r; r = uv_ip6_addr(address_ip6, port, &addr6); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_getnameinfo(uv_default_loop(), &req, &getnameinfo_req, (const struct sockaddr*)&addr6, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); diff --git a/deps/uv/test/test-getsockname.c b/deps/uv/test/test-getsockname.c index 1d4d9f12bdaab3..7bc0ba2e9f2f68 100644 --- a/deps/uv/test/test-getsockname.c +++ b/deps/uv/test/test-getsockname.c @@ -73,7 +73,7 @@ static void after_read(uv_stream_t* handle, req = (uv_shutdown_t*) malloc(sizeof *req); r = uv_shutdown(req, handle, after_shutdown); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -84,22 +84,22 @@ static void check_sockname(struct sockaddr* addr, const char* compare_ip, char check_ip[17]; int r; - ASSERT(0 == uv_ip4_addr(compare_ip, compare_port, &compare_addr)); + ASSERT_OK(uv_ip4_addr(compare_ip, compare_port, &compare_addr)); /* Both addresses should be ipv4 */ - ASSERT(check_addr.sin_family == AF_INET); - ASSERT(compare_addr.sin_family == AF_INET); + ASSERT_EQ(check_addr.sin_family, AF_INET); + ASSERT_EQ(compare_addr.sin_family, AF_INET); /* Check if the ip matches */ - ASSERT(memcmp(&check_addr.sin_addr, - &compare_addr.sin_addr, - sizeof compare_addr.sin_addr) == 0); + ASSERT_OK(memcmp(&check_addr.sin_addr, + &compare_addr.sin_addr, + sizeof compare_addr.sin_addr)); /* Check if the port matches. If port == 0 anything goes. */ ASSERT(compare_port == 0 || check_addr.sin_port == compare_addr.sin_port); r = uv_ip4_name(&check_addr, (char*) check_ip, sizeof check_ip); - ASSERT(r == 0); + ASSERT_OK(r); printf("%s: %s:%d\n", context, check_ip, ntohs(check_addr.sin_port)); } @@ -114,34 +114,34 @@ static void on_connection(uv_stream_t* server, int status) { if (status != 0) { fprintf(stderr, "Connect error %s\n", uv_err_name(status)); } - ASSERT(status == 0); + ASSERT_OK(status); handle = malloc(sizeof(*handle)); ASSERT_NOT_NULL(handle); r = uv_tcp_init(loop, handle); - ASSERT(r == 0); + ASSERT_OK(r); /* associate server with stream */ handle->data = server; r = uv_accept(server, (uv_stream_t*)handle); - ASSERT(r == 0); + ASSERT_OK(r); namelen = sizeof sockname; r = uv_tcp_getsockname(handle, &sockname, &namelen); - ASSERT(r == 0); + ASSERT_OK(r); check_sockname(&sockname, "127.0.0.1", server_port, "accepted socket"); getsocknamecount_tcp++; namelen = sizeof peername; r = uv_tcp_getpeername(handle, &peername, &namelen); - ASSERT(r == 0); + ASSERT_OK(r); check_sockname(&peername, "127.0.0.1", connect_port, "accepted socket peer"); getpeernamecount++; r = uv_read_start((uv_stream_t*)handle, alloc, after_read); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -149,17 +149,17 @@ static void on_connect(uv_connect_t* req, int status) { struct sockaddr sockname, peername; int r, namelen; - ASSERT(status == 0); + ASSERT_OK(status); namelen = sizeof sockname; r = uv_tcp_getsockname((uv_tcp_t*) req->handle, &sockname, &namelen); - ASSERT(r == 0); + ASSERT_OK(r); check_sockname(&sockname, "127.0.0.1", 0, "connected socket"); getsocknamecount_tcp++; namelen = sizeof peername; r = uv_tcp_getpeername((uv_tcp_t*) req->handle, &peername, &namelen); - ASSERT(r == 0); + ASSERT_OK(r); check_sockname(&peername, "127.0.0.1", server_port, "connected socket peer"); getpeernamecount++; @@ -173,7 +173,7 @@ static int tcp_listener(void) { int namelen; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", server_port, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", server_port, &addr)); r = uv_tcp_init(loop, &tcpServer); if (r) { @@ -196,13 +196,13 @@ static int tcp_listener(void) { memset(&sockname, -1, sizeof sockname); namelen = sizeof sockname; r = uv_tcp_getsockname(&tcpServer, &sockname, &namelen); - ASSERT(r == 0); + ASSERT_OK(r); check_sockname(&sockname, "0.0.0.0", server_port, "server socket"); getsocknamecount_tcp++; namelen = sizeof sockname; r = uv_tcp_getpeername(&tcpServer, &peername, &namelen); - ASSERT(r == UV_ENOTCONN); + ASSERT_EQ(r, UV_ENOTCONN); getpeernamecount++; return 0; @@ -214,7 +214,7 @@ static void tcp_connector(void) { struct sockaddr sockname; int r, namelen; - ASSERT(0 == uv_ip4_addr("127.0.0.1", server_port, &server_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", server_port, &server_addr)); r = uv_tcp_init(loop, &tcp); tcp.data = &connect_req; @@ -230,9 +230,9 @@ static void tcp_connector(void) { namelen = sizeof sockname; r = uv_tcp_getsockname(&tcp, &sockname, &namelen); ASSERT(!r); - ASSERT(sockname.sa_family == AF_INET); + ASSERT_EQ(sockname.sa_family, AF_INET); connect_port = ntohs(((struct sockaddr_in*) &sockname)->sin_port); - ASSERT(connect_port > 0); + ASSERT_GT(connect_port, 0); } @@ -245,7 +245,7 @@ static void udp_recv(uv_udp_t* handle, int namelen; int r; - ASSERT(nread >= 0); + ASSERT_GE(nread, 0); free(buf->base); if (nread == 0) { @@ -255,7 +255,7 @@ static void udp_recv(uv_udp_t* handle, memset(&sockname, -1, sizeof sockname); namelen = sizeof(sockname); r = uv_udp_getsockname(&udp, &sockname, &namelen); - ASSERT(r == 0); + ASSERT_OK(r); check_sockname(&sockname, "0.0.0.0", 0, "udp receiving socket"); getsocknamecount_udp++; @@ -275,7 +275,7 @@ static int udp_listener(void) { int namelen; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", server_port, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", server_port, &addr)); r = uv_udp_init(loop, &udpServer); if (r) { @@ -292,12 +292,12 @@ static int udp_listener(void) { memset(&sockname, -1, sizeof sockname); namelen = sizeof sockname; r = uv_udp_getsockname(&udpServer, &sockname, &namelen); - ASSERT(r == 0); + ASSERT_OK(r); check_sockname(&sockname, "0.0.0.0", server_port, "udp listener socket"); getsocknamecount_udp++; r = uv_udp_recv_start(&udpServer, alloc, udp_recv); - ASSERT(r == 0); + ASSERT_OK(r); return 0; } @@ -312,7 +312,7 @@ static void udp_sender(void) { ASSERT(!r); buf = uv_buf_init("PING", 4); - ASSERT(0 == uv_ip4_addr("127.0.0.1", server_port, &server_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", server_port, &server_addr)); r = uv_udp_send(&send_req, &udp, @@ -334,8 +334,8 @@ TEST_IMPL(getsockname_tcp) { uv_run(loop, UV_RUN_DEFAULT); - ASSERT(getsocknamecount_tcp == 3); - ASSERT(getpeernamecount == 3); + ASSERT_EQ(3, getsocknamecount_tcp); + ASSERT_EQ(3, getpeernamecount); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -352,10 +352,10 @@ TEST_IMPL(getsockname_udp) { uv_run(loop, UV_RUN_DEFAULT); - ASSERT(getsocknamecount_udp == 2); + ASSERT_EQ(2, getsocknamecount_udp); - ASSERT(udp.send_queue_size == 0); - ASSERT(udpServer.send_queue_size == 0); + ASSERT_OK(udp.send_queue_size); + ASSERT_OK(udpServer.send_queue_size); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-getters-setters.c b/deps/uv/test/test-getters-setters.c index 9869f7b9da8b1f..e4c6717d3bca64 100644 --- a/deps/uv/test/test-getters-setters.c +++ b/deps/uv/test/test-getters-setters.c @@ -30,9 +30,9 @@ int cookie3; TEST_IMPL(handle_type_name) { - ASSERT(strcmp(uv_handle_type_name(UV_NAMED_PIPE), "pipe") == 0); - ASSERT(strcmp(uv_handle_type_name(UV_UDP), "udp") == 0); - ASSERT(strcmp(uv_handle_type_name(UV_FILE), "file") == 0); + ASSERT_OK(strcmp(uv_handle_type_name(UV_NAMED_PIPE), "pipe")); + ASSERT_OK(strcmp(uv_handle_type_name(UV_UDP), "udp")); + ASSERT_OK(strcmp(uv_handle_type_name(UV_FILE), "file")); ASSERT_NULL(uv_handle_type_name(UV_HANDLE_TYPE_MAX)); ASSERT_NULL(uv_handle_type_name(UV_HANDLE_TYPE_MAX + 1)); ASSERT_NULL(uv_handle_type_name(UV_UNKNOWN_HANDLE)); @@ -41,9 +41,9 @@ TEST_IMPL(handle_type_name) { TEST_IMPL(req_type_name) { - ASSERT(strcmp(uv_req_type_name(UV_REQ), "req") == 0); - ASSERT(strcmp(uv_req_type_name(UV_UDP_SEND), "udp_send") == 0); - ASSERT(strcmp(uv_req_type_name(UV_WORK), "work") == 0); + ASSERT_OK(strcmp(uv_req_type_name(UV_REQ), "req")); + ASSERT_OK(strcmp(uv_req_type_name(UV_UDP_SEND), "udp_send")); + ASSERT_OK(strcmp(uv_req_type_name(UV_WORK), "work")); ASSERT_NULL(uv_req_type_name(UV_REQ_TYPE_MAX)); ASSERT_NULL(uv_req_type_name(UV_REQ_TYPE_MAX + 1)); ASSERT_NULL(uv_req_type_name(UV_UNKNOWN_REQ)); @@ -60,48 +60,48 @@ TEST_IMPL(getters_setters) { loop = malloc(uv_loop_size()); ASSERT_NOT_NULL(loop); r = uv_loop_init(loop); - ASSERT(r == 0); + ASSERT_OK(r); uv_loop_set_data(loop, &cookie1); - ASSERT(loop->data == &cookie1); - ASSERT(uv_loop_get_data(loop) == &cookie1); + ASSERT_PTR_EQ(loop->data, &cookie1); + ASSERT_PTR_EQ(uv_loop_get_data(loop), &cookie1); pipe = malloc(uv_handle_size(UV_NAMED_PIPE)); r = uv_pipe_init(loop, pipe, 0); - ASSERT(r == 0); - ASSERT(uv_handle_get_type((uv_handle_t*)pipe) == UV_NAMED_PIPE); + ASSERT_OK(r); + ASSERT_EQ(uv_handle_get_type((uv_handle_t*)pipe), UV_NAMED_PIPE); - ASSERT(uv_handle_get_loop((uv_handle_t*)pipe) == loop); + ASSERT_PTR_EQ(uv_handle_get_loop((uv_handle_t*)pipe), loop); pipe->data = &cookie2; - ASSERT(uv_handle_get_data((uv_handle_t*)pipe) == &cookie2); + ASSERT_PTR_EQ(uv_handle_get_data((uv_handle_t*)pipe), &cookie2); uv_handle_set_data((uv_handle_t*)pipe, &cookie1); - ASSERT(uv_handle_get_data((uv_handle_t*)pipe) == &cookie1); - ASSERT(pipe->data == &cookie1); + ASSERT_PTR_EQ(uv_handle_get_data((uv_handle_t*)pipe), &cookie1); + ASSERT_PTR_EQ(pipe->data, &cookie1); - ASSERT(uv_stream_get_write_queue_size((uv_stream_t*)pipe) == 0); + ASSERT_OK(uv_stream_get_write_queue_size((uv_stream_t*)pipe)); pipe->write_queue_size++; - ASSERT(uv_stream_get_write_queue_size((uv_stream_t*)pipe) == 1); + ASSERT_EQ(1, uv_stream_get_write_queue_size((uv_stream_t*)pipe)); pipe->write_queue_size--; uv_close((uv_handle_t*)pipe, NULL); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); fs = malloc(uv_req_size(UV_FS)); uv_fs_stat(loop, fs, ".", NULL); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(uv_fs_get_type(fs) == UV_FS_STAT); - ASSERT(uv_fs_get_result(fs) == 0); - ASSERT(uv_fs_get_ptr(fs) == uv_fs_get_statbuf(fs)); + ASSERT_EQ(uv_fs_get_type(fs), UV_FS_STAT); + ASSERT_OK(uv_fs_get_result(fs)); + ASSERT_PTR_EQ(uv_fs_get_ptr(fs), uv_fs_get_statbuf(fs)); ASSERT(uv_fs_get_statbuf(fs)->st_mode & S_IFDIR); - ASSERT(strcmp(uv_fs_get_path(fs), ".") == 0); + ASSERT_OK(strcmp(uv_fs_get_path(fs), ".")); uv_fs_req_cleanup(fs); r = uv_loop_close(loop); - ASSERT(r == 0); + ASSERT_OK(r); free(pipe); free(fs); diff --git a/deps/uv/test/test-gettimeofday.c b/deps/uv/test/test-gettimeofday.c index 4ebc11f93ed321..7d9012815c4022 100644 --- a/deps/uv/test/test-gettimeofday.c +++ b/deps/uv/test/test-gettimeofday.c @@ -28,12 +28,12 @@ TEST_IMPL(gettimeofday) { tv.tv_sec = 0; r = uv_gettimeofday(&tv); - ASSERT(r == 0); - ASSERT(tv.tv_sec != 0); + ASSERT_OK(r); + ASSERT_NE(0, tv.tv_sec); /* Test invalid input. */ r = uv_gettimeofday(NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); return 0; } diff --git a/deps/uv/test/test-handle-fileno.c b/deps/uv/test/test-handle-fileno.c index 6c4c2b6601d4a3..be53152ce8459c 100644 --- a/deps/uv/test/test-handle-fileno.c +++ b/deps/uv/test/test-handle-fileno.c @@ -56,49 +56,49 @@ TEST_IMPL(handle_fileno) { uv_loop_t* loop; loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_idle_init(loop, &idle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fileno((uv_handle_t*) &idle, &fd); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_close((uv_handle_t*) &idle, NULL); r = uv_tcp_init(loop, &tcp); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fileno((uv_handle_t*) &tcp, &fd); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); r = uv_tcp_bind(&tcp, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fileno((uv_handle_t*) &tcp, &fd); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &tcp, NULL); r = uv_fileno((uv_handle_t*) &tcp, &fd); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); r = uv_udp_init(loop, &udp); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fileno((uv_handle_t*) &udp, &fd); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); r = uv_udp_bind(&udp, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fileno((uv_handle_t*) &udp, &fd); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &udp, NULL); r = uv_fileno((uv_handle_t*) &udp, &fd); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); r = uv_pipe_init(loop, &pipe, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fileno((uv_handle_t*) &pipe, &fd); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); r = uv_pipe_bind(&pipe, TEST_PIPENAME); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fileno((uv_handle_t*) &pipe, &fd); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &pipe, NULL); r = uv_fileno((uv_handle_t*) &pipe, &fd); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); tty_fd = get_tty_fd(); if (tty_fd < 0) { @@ -106,14 +106,14 @@ TEST_IMPL(handle_fileno) { fflush(stderr); } else { r = uv_tty_init(loop, &tty, tty_fd, 0); - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(uv_is_readable((uv_stream_t*) &tty)); ASSERT(!uv_is_writable((uv_stream_t*) &tty)); r = uv_fileno((uv_handle_t*) &tty, &fd); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &tty, NULL); r = uv_fileno((uv_handle_t*) &tty, &fd); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); ASSERT(!uv_is_readable((uv_stream_t*) &tty)); ASSERT(!uv_is_writable((uv_stream_t*) &tty)); } diff --git a/deps/uv/test/test-homedir.c b/deps/uv/test/test-homedir.c index 508351f72c0327..769d5c8179fc77 100644 --- a/deps/uv/test/test-homedir.c +++ b/deps/uv/test/test-homedir.c @@ -34,39 +34,39 @@ TEST_IMPL(homedir) { /* Test the normal case */ len = sizeof homedir; homedir[0] = '\0'; - ASSERT(strlen(homedir) == 0); + ASSERT_OK(strlen(homedir)); r = uv_os_homedir(homedir, &len); - ASSERT(r == 0); - ASSERT(strlen(homedir) == len); - ASSERT(len > 0); - ASSERT(homedir[len] == '\0'); + ASSERT_OK(r); + ASSERT_EQ(strlen(homedir), len); + ASSERT_GT(len, 0); + ASSERT_EQ(homedir[len], '\0'); #ifdef _WIN32 if (len == 3 && homedir[1] == ':') - ASSERT(homedir[2] == '\\'); + ASSERT_EQ(homedir[2], '\\'); else - ASSERT(homedir[len - 1] != '\\'); + ASSERT_NE(homedir[len - 1], '\\'); #else if (len == 1) - ASSERT(homedir[0] == '/'); + ASSERT_EQ(homedir[0], '/'); else - ASSERT(homedir[len - 1] != '/'); + ASSERT_NE(homedir[len - 1], '/'); #endif /* Test the case where the buffer is too small */ len = SMALLPATH; r = uv_os_homedir(homedir, &len); - ASSERT(r == UV_ENOBUFS); - ASSERT(len > SMALLPATH); + ASSERT_EQ(r, UV_ENOBUFS); + ASSERT_GT(len, SMALLPATH); /* Test invalid inputs */ r = uv_os_homedir(NULL, &len); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_os_homedir(homedir, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); len = 0; r = uv_os_homedir(homedir, &len); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); return 0; } diff --git a/deps/uv/test/test-hrtime.c b/deps/uv/test/test-hrtime.c index 854a482f23c189..c0b88c6757def7 100644 --- a/deps/uv/test/test-hrtime.c +++ b/deps/uv/test/test-hrtime.c @@ -45,7 +45,7 @@ TEST_IMPL(hrtime) { * that the difference between the two hrtime values has a reasonable * lower bound. */ - ASSERT(diff > (uint64_t) 25 * NANOSEC / MILLISEC); + ASSERT_UINT64_GT(diff, (uint64_t) 25 * NANOSEC / MILLISEC); --i; } return 0; @@ -57,8 +57,8 @@ TEST_IMPL(clock_gettime) { ASSERT_EQ(UV_EINVAL, uv_clock_gettime(1337, &t)); ASSERT_EQ(UV_EFAULT, uv_clock_gettime(1337, NULL)); - ASSERT_EQ(0, uv_clock_gettime(UV_CLOCK_MONOTONIC, &t)); - ASSERT_EQ(0, uv_clock_gettime(UV_CLOCK_REALTIME, &t)); + ASSERT_OK(uv_clock_gettime(UV_CLOCK_MONOTONIC, &t)); + ASSERT_OK(uv_clock_gettime(UV_CLOCK_REALTIME, &t)); ASSERT_GT(1682500000000ll, t.tv_sec); /* 2023-04-26T09:06:40.000Z */ return 0; diff --git a/deps/uv/test/test-idle.c b/deps/uv/test/test-idle.c index e3f4c2bcb659f9..069e3483580568 100644 --- a/deps/uv/test/test-idle.c +++ b/deps/uv/test/test-idle.c @@ -39,7 +39,7 @@ static void close_cb(uv_handle_t* handle) { static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer_handle); + ASSERT_PTR_EQ(handle, &timer_handle); uv_close((uv_handle_t*) &idle_handle, close_cb); uv_close((uv_handle_t*) &check_handle, close_cb); @@ -52,7 +52,7 @@ static void timer_cb(uv_timer_t* handle) { static void idle_cb(uv_idle_t* handle) { - ASSERT(handle == &idle_handle); + ASSERT_PTR_EQ(handle, &idle_handle); idle_cb_called++; fprintf(stderr, "idle_cb %d\n", idle_cb_called); @@ -61,7 +61,7 @@ static void idle_cb(uv_idle_t* handle) { static void check_cb(uv_check_t* handle) { - ASSERT(handle == &check_handle); + ASSERT_PTR_EQ(handle, &check_handle); check_cb_called++; fprintf(stderr, "check_cb %d\n", check_cb_called); @@ -73,26 +73,26 @@ TEST_IMPL(idle_starvation) { int r; r = uv_idle_init(uv_default_loop(), &idle_handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_idle_start(&idle_handle, idle_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_check_init(uv_default_loop(), &check_handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_check_start(&check_handle, check_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(uv_default_loop(), &timer_handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer_handle, timer_cb, 50, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(idle_cb_called > 0); - ASSERT(timer_cb_called == 1); - ASSERT(close_cb_called == 3); + ASSERT_GT(idle_cb_called, 0); + ASSERT_EQ(1, timer_cb_called); + ASSERT_EQ(3, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -105,19 +105,19 @@ static void idle_stop(uv_idle_t* handle) { TEST_IMPL(idle_check) { - ASSERT_EQ(0, uv_idle_init(uv_default_loop(), &idle_handle)); - ASSERT_EQ(0, uv_idle_start(&idle_handle, idle_stop)); + ASSERT_OK(uv_idle_init(uv_default_loop(), &idle_handle)); + ASSERT_OK(uv_idle_start(&idle_handle, idle_stop)); - ASSERT_EQ(0, uv_check_init(uv_default_loop(), &check_handle)); - ASSERT_EQ(0, uv_check_start(&check_handle, check_cb)); + ASSERT_OK(uv_check_init(uv_default_loop(), &check_handle)); + ASSERT_OK(uv_check_start(&check_handle, check_cb)); ASSERT_EQ(1, uv_run(uv_default_loop(), UV_RUN_ONCE)); ASSERT_EQ(1, check_cb_called); - ASSERT_EQ(0, close_cb_called); + ASSERT_OK(close_cb_called); uv_close((uv_handle_t*) &idle_handle, close_cb); uv_close((uv_handle_t*) &check_handle, close_cb); - ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_ONCE)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_ONCE)); ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); diff --git a/deps/uv/test/test-idna.c b/deps/uv/test/test-idna.c index 9b7002819fa354..bcacfc8a3ad785 100644 --- a/deps/uv/test/test-idna.c +++ b/deps/uv/test/test-idna.c @@ -20,6 +20,7 @@ */ #include "task.h" +#define uv__malloc malloc #include "../src/idna.c" #include @@ -31,66 +32,66 @@ TEST_IMPL(utf8_decode1) { /* ASCII. */ p = b; snprintf(b, sizeof(b), "%c\x7F", 0x00); - ASSERT(0 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 1); - ASSERT(127 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 2); + ASSERT_OK(uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 1); + ASSERT_EQ(127, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 2); /* Two-byte sequences. */ p = b; snprintf(b, sizeof(b), "\xC2\x80\xDF\xBF"); - ASSERT(128 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 2); - ASSERT(0x7FF == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 4); + ASSERT_EQ(128, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 2); + ASSERT_EQ(0x7FF, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 4); /* Three-byte sequences. */ p = b; snprintf(b, sizeof(b), "\xE0\xA0\x80\xEF\xBF\xBF"); - ASSERT(0x800 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 3); - ASSERT(0xFFFF == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 6); + ASSERT_EQ(0x800, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 3); + ASSERT_EQ(0xFFFF, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 6); /* Four-byte sequences. */ p = b; snprintf(b, sizeof(b), "\xF0\x90\x80\x80\xF4\x8F\xBF\xBF"); - ASSERT(0x10000 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 4); - ASSERT(0x10FFFF == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 8); + ASSERT_EQ(0x10000, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 4); + ASSERT_EQ(0x10FFFF, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 8); /* Four-byte sequences > U+10FFFF; disallowed. */ p = b; snprintf(b, sizeof(b), "\xF4\x90\xC0\xC0\xF7\xBF\xBF\xBF"); - ASSERT((unsigned) -1 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 4); - ASSERT((unsigned) -1 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 8); + ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 4); + ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 8); /* Overlong; disallowed. */ p = b; snprintf(b, sizeof(b), "\xC0\x80\xC1\x80"); - ASSERT((unsigned) -1 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 2); - ASSERT((unsigned) -1 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 4); + ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 2); + ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 4); /* Surrogate pairs; disallowed. */ p = b; snprintf(b, sizeof(b), "\xED\xA0\x80\xED\xA3\xBF"); - ASSERT((unsigned) -1 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 3); - ASSERT((unsigned) -1 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + 6); + ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 3); + ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + 6); /* Simply illegal. */ p = b; snprintf(b, sizeof(b), "\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xFF"); for (i = 1; i <= 8; i++) { - ASSERT((unsigned) -1 == uv__utf8_decode1(&p, b + sizeof(b))); - ASSERT(p == b + i); + ASSERT_EQ((unsigned) -1, uv__utf8_decode1(&p, b + sizeof(b))); + ASSERT_PTR_EQ(p, b + i); } return 0; @@ -122,7 +123,7 @@ TEST_IMPL(utf8_decode1_overrun) { do { \ char d[256] = {0}; \ static const char s[] = "" input ""; \ - ASSERT(err == uv__idna_toascii(s, s + sizeof(s) - 1, d, d + sizeof(d))); \ + ASSERT_EQ(err, uv__idna_toascii(s, s + sizeof(s) - 1, d, d + sizeof(d))); \ } while (0) #define T(input, expected) \ @@ -132,13 +133,13 @@ TEST_IMPL(utf8_decode1_overrun) { char d2[256] = {0}; \ static const char s[] = "" input ""; \ n = uv__idna_toascii(s, s + sizeof(s) - 1, d1, d1 + sizeof(d1)); \ - ASSERT(n == sizeof(expected)); \ - ASSERT(0 == memcmp(d1, expected, n)); \ + ASSERT_EQ(n, sizeof(expected)); \ + ASSERT_OK(memcmp(d1, expected, n)); \ /* Sanity check: encoding twice should not change the output. */ \ n = uv__idna_toascii(d1, d1 + strlen(d1), d2, d2 + sizeof(d2)); \ - ASSERT(n == sizeof(expected)); \ - ASSERT(0 == memcmp(d2, expected, n)); \ - ASSERT(0 == memcmp(d1, d2, sizeof(d2))); \ + ASSERT_EQ(n, sizeof(expected)); \ + ASSERT_OK(memcmp(d2, expected, n)); \ + ASSERT_OK(memcmp(d1, d2, sizeof(d2))); \ } while (0) TEST_IMPL(idna_toascii) { diff --git a/deps/uv/test/test-ip-name.c b/deps/uv/test/test-ip-name.c index 006095f5f9731b..cdc0c563427ca8 100644 --- a/deps/uv/test/test-ip-name.c +++ b/deps/uv/test/test-ip-name.c @@ -40,20 +40,20 @@ TEST_IMPL(ip_name) { struct sockaddr_in6* addr6 = &test_addr.addr6; /* test ip4_name */ - ASSERT_EQ(0, uv_ip4_addr("192.168.0.1", TEST_PORT, addr4)); - ASSERT_EQ(0, uv_ip4_name(addr4, dst, INET_ADDRSTRLEN)); - ASSERT_EQ(0, strcmp("192.168.0.1", dst)); + ASSERT_OK(uv_ip4_addr("192.168.0.1", TEST_PORT, addr4)); + ASSERT_OK(uv_ip4_name(addr4, dst, INET_ADDRSTRLEN)); + ASSERT_OK(strcmp("192.168.0.1", dst)); - ASSERT_EQ(0, uv_ip_name(addr, dst, INET_ADDRSTRLEN)); - ASSERT_EQ(0, strcmp("192.168.0.1", dst)); + ASSERT_OK(uv_ip_name(addr, dst, INET_ADDRSTRLEN)); + ASSERT_OK(strcmp("192.168.0.1", dst)); /* test ip6_name */ - ASSERT_EQ(0, uv_ip6_addr("fe80::2acf:daff:fedd:342a", TEST_PORT, addr6)); - ASSERT_EQ(0, uv_ip6_name(addr6, dst, INET6_ADDRSTRLEN)); - ASSERT_EQ(0, strcmp("fe80::2acf:daff:fedd:342a", dst)); + ASSERT_OK(uv_ip6_addr("fe80::2acf:daff:fedd:342a", TEST_PORT, addr6)); + ASSERT_OK(uv_ip6_name(addr6, dst, INET6_ADDRSTRLEN)); + ASSERT_OK(strcmp("fe80::2acf:daff:fedd:342a", dst)); - ASSERT_EQ(0, uv_ip_name(addr, dst, INET6_ADDRSTRLEN)); - ASSERT_EQ(0, strcmp("fe80::2acf:daff:fedd:342a", dst)); + ASSERT_OK(uv_ip_name(addr, dst, INET6_ADDRSTRLEN)); + ASSERT_OK(strcmp("fe80::2acf:daff:fedd:342a", dst)); /* test other sa_family */ addr->sa_family = AF_UNIX; diff --git a/deps/uv/test/test-ip4-addr.c b/deps/uv/test/test-ip4-addr.c index 722ffb390a99e4..4a16c832d33ee7 100644 --- a/deps/uv/test/test-ip4-addr.c +++ b/deps/uv/test/test-ip4-addr.c @@ -30,25 +30,25 @@ TEST_IMPL(ip4_addr) { struct sockaddr_in addr; char dst[16]; - ASSERT(0 == uv_inet_ntop(AF_INET, "\xFF\xFF\xFF\xFF", dst, sizeof(dst))); - ASSERT(0 == strcmp(dst, "255.255.255.255")); - ASSERT(UV_ENOSPC == uv_inet_ntop(AF_INET, "\xFF\xFF\xFF\xFF", - dst, sizeof(dst) - 1)); - - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_ip4_addr("255.255.255.255", TEST_PORT, &addr)); - ASSERT(UV_EINVAL == uv_ip4_addr("255.255.255*000", TEST_PORT, &addr)); - ASSERT(UV_EINVAL == uv_ip4_addr("255.255.255.256", TEST_PORT, &addr)); - ASSERT(UV_EINVAL == uv_ip4_addr("2555.0.0.0", TEST_PORT, &addr)); - ASSERT(UV_EINVAL == uv_ip4_addr("255", TEST_PORT, &addr)); + ASSERT_OK(uv_inet_ntop(AF_INET, "\xFF\xFF\xFF\xFF", dst, sizeof(dst))); + ASSERT_OK(strcmp(dst, "255.255.255.255")); + ASSERT_EQ(UV_ENOSPC, uv_inet_ntop(AF_INET, "\xFF\xFF\xFF\xFF", + dst, sizeof(dst) - 1)); + + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("255.255.255.255", TEST_PORT, &addr)); + ASSERT_EQ(UV_EINVAL, uv_ip4_addr("255.255.255*000", TEST_PORT, &addr)); + ASSERT_EQ(UV_EINVAL, uv_ip4_addr("255.255.255.256", TEST_PORT, &addr)); + ASSERT_EQ(UV_EINVAL, uv_ip4_addr("2555.0.0.0", TEST_PORT, &addr)); + ASSERT_EQ(UV_EINVAL, uv_ip4_addr("255", TEST_PORT, &addr)); #ifdef SIN6_LEN - ASSERT(addr.sin_len == sizeof(addr)); + ASSERT_EQ(addr.sin_len, sizeof(addr)); #endif /* for broken address family */ - ASSERT(UV_EAFNOSUPPORT == uv_inet_pton(42, "127.0.0.1", - &addr.sin_addr.s_addr)); + ASSERT_EQ(UV_EAFNOSUPPORT, uv_inet_pton(42, "127.0.0.1", + &addr.sin_addr.s_addr)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-ip6-addr.c b/deps/uv/test/test-ip6-addr.c index 8f0c18601ba815..632b7928994950 100644 --- a/deps/uv/test/test-ip6-addr.c +++ b/deps/uv/test/test-ip6-addr.c @@ -51,7 +51,7 @@ TEST_IMPL(ip6_addr_link_local) { int ix; int r; - ASSERT(0 == uv_interface_addresses(&addresses, &count)); + ASSERT_OK(uv_interface_addresses(&addresses, &count)); for (ix = 0; ix < count; ix++) { address = addresses + ix; @@ -59,10 +59,10 @@ TEST_IMPL(ip6_addr_link_local) { if (address->address.address6.sin6_family != AF_INET6) continue; - ASSERT(0 == uv_inet_ntop(AF_INET6, - &address->address.address6.sin6_addr, - string_address, - sizeof(string_address))); + ASSERT_OK(uv_inet_ntop(AF_INET6, + &address->address.address6.sin6_addr, + string_address, + sizeof(string_address))); /* Skip addresses that are not link-local. */ if (strncmp(string_address, "fe80::", 6) != 0) @@ -72,21 +72,23 @@ TEST_IMPL(ip6_addr_link_local) { device_name = address->name; scoped_addr_len = sizeof(scoped_addr); - ASSERT(0 == uv_if_indextoname(iface_index, scoped_addr, &scoped_addr_len)); + ASSERT_OK(uv_if_indextoname(iface_index, + scoped_addr, + &scoped_addr_len)); #ifndef _WIN32 /* This assert fails on Windows, as Windows semantics are different. */ - ASSERT(0 == strcmp(device_name, scoped_addr)); + ASSERT_OK(strcmp(device_name, scoped_addr)); #endif interface_id_len = sizeof(interface_id); r = uv_if_indextoiid(iface_index, interface_id, &interface_id_len); - ASSERT(0 == r); + ASSERT_OK(r); #ifdef _WIN32 /* On Windows, the interface identifier is the numeric string of the index. */ - ASSERT(strtoul(interface_id, NULL, 10) == iface_index); + ASSERT_EQ(strtoul(interface_id, NULL, 10), iface_index); #else /* On Unix/Linux, the interface identifier is the interface device name. */ - ASSERT(0 == strcmp(device_name, interface_id)); + ASSERT_OK(strcmp(device_name, interface_id)); #endif snprintf(scoped_addr, @@ -102,16 +104,18 @@ TEST_IMPL(ip6_addr_link_local) { device_name); fflush(stderr); - ASSERT(0 == uv_ip6_addr(scoped_addr, TEST_PORT, &addr)); + ASSERT_OK(uv_ip6_addr(scoped_addr, TEST_PORT, &addr)); fprintf(stderr, "Got scope_id 0x%2x\n", (unsigned)addr.sin6_scope_id); fflush(stderr); - ASSERT(iface_index == addr.sin6_scope_id); + ASSERT_EQ(iface_index, addr.sin6_scope_id); } uv_free_interface_addresses(addresses, count); scoped_addr_len = sizeof(scoped_addr); - ASSERT(0 != uv_if_indextoname((unsigned int)-1, scoped_addr, &scoped_addr_len)); + ASSERT_NE(0, uv_if_indextoname((unsigned int)-1, + scoped_addr, + &scoped_addr_len)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -137,16 +141,16 @@ TEST_IMPL(ip6_addr_link_local) { X("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255.255") \ #define TEST_GOOD(ADDR) \ - ASSERT(0 == uv_inet_pton(AF_INET6, ADDR, &addr)); \ - ASSERT(0 == uv_inet_pton(AF_INET6, ADDR "%en1", &addr)); \ - ASSERT(0 == uv_inet_pton(AF_INET6, ADDR "%%%%", &addr)); \ - ASSERT(0 == uv_inet_pton(AF_INET6, ADDR "%en1:1.2.3.4", &addr)); \ + ASSERT_OK(uv_inet_pton(AF_INET6, ADDR, &addr)); \ + ASSERT_OK(uv_inet_pton(AF_INET6, ADDR "%en1", &addr)); \ + ASSERT_OK(uv_inet_pton(AF_INET6, ADDR "%%%%", &addr)); \ + ASSERT_OK(uv_inet_pton(AF_INET6, ADDR "%en1:1.2.3.4", &addr)); \ #define TEST_BAD(ADDR) \ - ASSERT(0 != uv_inet_pton(AF_INET6, ADDR, &addr)); \ - ASSERT(0 != uv_inet_pton(AF_INET6, ADDR "%en1", &addr)); \ - ASSERT(0 != uv_inet_pton(AF_INET6, ADDR "%%%%", &addr)); \ - ASSERT(0 != uv_inet_pton(AF_INET6, ADDR "%en1:1.2.3.4", &addr)); \ + ASSERT_NE(0, uv_inet_pton(AF_INET6, ADDR, &addr)); \ + ASSERT_NE(0, uv_inet_pton(AF_INET6, ADDR "%en1", &addr)); \ + ASSERT_NE(0, uv_inet_pton(AF_INET6, ADDR "%%%%", &addr)); \ + ASSERT_NE(0, uv_inet_pton(AF_INET6, ADDR "%en1:1.2.3.4", &addr)); \ TEST_IMPL(ip6_pton) { struct in6_addr addr; @@ -163,9 +167,9 @@ TEST_IMPL(ip6_pton) { TEST_IMPL(ip6_sin6_len) { struct sockaddr_in6 s; - ASSERT_EQ(0, uv_ip6_addr("::", 0, &s)); + ASSERT_OK(uv_ip6_addr("::", 0, &s)); #ifdef SIN6_LEN - ASSERT(s.sin6_len == sizeof(s)); + ASSERT_EQ(s.sin6_len, sizeof(s)); #endif return 0; } diff --git a/deps/uv/test/test-ipc-heavy-traffic-deadlock-bug.c b/deps/uv/test/test-ipc-heavy-traffic-deadlock-bug.c index f239d1fc01fb7e..0305500abfbcb3 100644 --- a/deps/uv/test/test-ipc-heavy-traffic-deadlock-bug.c +++ b/deps/uv/test/test-ipc-heavy-traffic-deadlock-bug.c @@ -49,7 +49,7 @@ static size_t bytes_read; static void write_cb(uv_write_t* req, int status) { struct write_info* write_info = container_of(req, struct write_info, write_req); - ASSERT(status == 0); + ASSERT_OK(status); bytes_written += BUFFERS_PER_WRITE * BUFFER_SIZE; free(write_info); } @@ -75,7 +75,7 @@ static void do_write(uv_stream_t* handle) { r = uv_write( &write_info->write_req, handle, bufs, BUFFERS_PER_WRITE, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void alloc_cb(uv_handle_t* handle, @@ -94,18 +94,18 @@ static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { ssize_t i; int r; - ASSERT(nread >= 0); + ASSERT_GE(nread, 0); bytes_read += nread; for (i = 0; i < nread; i++) - ASSERT(buf->base[i] == BUFFER_CONTENT); + ASSERT_EQ(buf->base[i], BUFFER_CONTENT); free(buf->base); if (bytes_read >= XFER_SIZE) { r = uv_read_stop(handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_shutdown(&shutdown_req, handle, shutdown_cb); - ASSERT(r == 0); + ASSERT_OK(r); } } @@ -121,13 +121,13 @@ static void do_writes_and_reads(uv_stream_t* handle) { } r = uv_read_start(handle, alloc_cb, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(handle->loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(bytes_written == XFER_SIZE); - ASSERT(bytes_read == XFER_SIZE); + ASSERT_EQ(bytes_written, XFER_SIZE); + ASSERT_EQ(bytes_read, XFER_SIZE); } TEST_IMPL(ipc_heavy_traffic_deadlock_bug) { @@ -146,9 +146,9 @@ int ipc_helper_heavy_traffic_deadlock_bug(void) { int r; r = uv_pipe_init(uv_default_loop(), &pipe, 1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_open(&pipe, 0); - ASSERT(r == 0); + ASSERT_OK(r); notify_parent_process(); do_writes_and_reads((uv_stream_t*) &pipe); diff --git a/deps/uv/test/test-ipc-send-recv.c b/deps/uv/test/test-ipc-send-recv.c index 48eea7286b87d9..0cdd881be05d87 100644 --- a/deps/uv/test/test-ipc-send-recv.c +++ b/deps/uv/test/test-ipc-send-recv.c @@ -96,7 +96,7 @@ static void recv_cb(uv_stream_t* handle, free(buf->base); pipe = (uv_pipe_t*) handle; - ASSERT(pipe == &ctx.channel); + ASSERT_PTR_EQ(pipe, &ctx.channel); do { if (++recv_cb_count == 1) { @@ -112,13 +112,13 @@ static void recv_cb(uv_stream_t* handle, * acceptable value. */ if (nread == UV_EOF) { /* UV_EOF is only acceptable for the final recv_cb call */ - ASSERT(recv_cb_count == 2); + ASSERT_EQ(2, recv_cb_count); } else { - ASSERT(nread >= 0); - ASSERT(uv_pipe_pending_count(pipe) > 0); + ASSERT_GE(nread, 0); + ASSERT_GT(uv_pipe_pending_count(pipe), 0); pending = uv_pipe_pending_type(pipe); - ASSERT(pending == ctx.expected_type); + ASSERT_EQ(pending, ctx.expected_type); if (pending == UV_NAMED_PIPE) r = uv_pipe_init(ctx.channel.loop, &recv->pipe, 0); @@ -126,10 +126,10 @@ static void recv_cb(uv_stream_t* handle, r = uv_tcp_init(ctx.channel.loop, &recv->tcp); else abort(); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_accept(handle, &recv->stream); - ASSERT(r == 0); + ASSERT_OK(r); } } while (uv_pipe_pending_count(pipe) > 0); @@ -143,8 +143,8 @@ static void connect_cb(uv_connect_t* req, int status) { int r; uv_buf_t buf; - ASSERT(req == &ctx.connect_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &ctx.connect_req); + ASSERT_OK(status); buf = uv_buf_init(".", 1); r = uv_write2(&ctx.write_req, @@ -152,7 +152,7 @@ static void connect_cb(uv_connect_t* req, int status) { &buf, 1, &ctx.send.stream, NULL); - ASSERT(r == 0); + ASSERT_OK(r); /* Perform two writes to the same pipe to make sure that on Windows we are * not running into issue 505: @@ -163,10 +163,10 @@ static void connect_cb(uv_connect_t* req, int status) { &buf, 1, &ctx.send2.stream, NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*)&ctx.channel, alloc_cb, recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static int run_test(int inprocess) { @@ -176,12 +176,12 @@ static int run_test(int inprocess) { if (inprocess) { r = uv_thread_create(&tid, ipc_send_recv_helper_threadproc, (void *) 42); - ASSERT(r == 0); + ASSERT_OK(r); uv_sleep(1000); r = uv_pipe_init(uv_default_loop(), &ctx.channel, 1); - ASSERT(r == 0); + ASSERT_OK(r); uv_pipe_connect(&ctx.connect_req, &ctx.channel, TEST_PIPENAME_3, connect_cb); } else { @@ -191,13 +191,13 @@ static int run_test(int inprocess) { } r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(recv_cb_count == 2); + ASSERT_EQ(2, recv_cb_count); if (inprocess) { r = uv_thread_join(&tid); - ASSERT(r == 0); + ASSERT_OK(r); } return 0; @@ -209,19 +209,19 @@ static int run_ipc_send_recv_pipe(int inprocess) { ctx.expected_type = UV_NAMED_PIPE; r = uv_pipe_init(uv_default_loop(), &ctx.send.pipe, 1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_bind(&ctx.send.pipe, TEST_PIPENAME); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_init(uv_default_loop(), &ctx.send2.pipe, 1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_bind(&ctx.send2.pipe, TEST_PIPENAME_2); - ASSERT(r == 0); + ASSERT_OK(r); r = run_test(inprocess); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -245,24 +245,24 @@ static int run_ipc_send_recv_tcp(int inprocess) { struct sockaddr_in addr; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); ctx.expected_type = UV_TCP; r = uv_tcp_init(uv_default_loop(), &ctx.send.tcp); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_init(uv_default_loop(), &ctx.send2.tcp); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&ctx.send.tcp, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&ctx.send2.tcp, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = run_test(inprocess); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -286,7 +286,7 @@ TEST_IMPL(ipc_send_recv_tcp_inprocess) { /* Everything here runs in a child process or second thread. */ static void write2_cb(uv_write_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); /* After two successful writes in the child process, allow the child * process to be closed. */ @@ -317,7 +317,7 @@ static void read_cb(uv_stream_t* handle, ASSERT_GE(nread, 0); pipe = (uv_pipe_t*) handle; - ASSERT_EQ(pipe, &ctx2.channel); + ASSERT_PTR_EQ(pipe, &ctx2.channel); while (uv_pipe_pending_count(pipe) > 0) { if (++read_cb_count == 2) { @@ -337,10 +337,10 @@ static void read_cb(uv_stream_t* handle, r = uv_tcp_init(ctx2.channel.loop, &recv->tcp); else abort(); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_accept(handle, &recv->stream); - ASSERT(r == 0); + ASSERT_OK(r); wrbuf = uv_buf_init(".", 1); r = uv_write2(write_req, @@ -349,27 +349,27 @@ static void read_cb(uv_stream_t* handle, 1, &recv->stream, write2_cb); - ASSERT(r == 0); + ASSERT_OK(r); } } static void send_recv_start(void) { int r; - ASSERT(1 == uv_is_readable((uv_stream_t*)&ctx2.channel)); - ASSERT(1 == uv_is_writable((uv_stream_t*)&ctx2.channel)); - ASSERT(0 == uv_is_closing((uv_handle_t*)&ctx2.channel)); + ASSERT_EQ(1, uv_is_readable((uv_stream_t*)&ctx2.channel)); + ASSERT_EQ(1, uv_is_writable((uv_stream_t*)&ctx2.channel)); + ASSERT_OK(uv_is_closing((uv_handle_t*)&ctx2.channel)); r = uv_read_start((uv_stream_t*)&ctx2.channel, alloc_cb, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void listen_cb(uv_stream_t* handle, int status) { int r; - ASSERT(handle == (uv_stream_t*)&ctx2.listen); - ASSERT(status == 0); + ASSERT_PTR_EQ(handle, (uv_stream_t*)&ctx2.listen); + ASSERT_OK(status); r = uv_accept((uv_stream_t*)&ctx2.listen, (uv_stream_t*)&ctx2.channel); - ASSERT(r == 0); + ASSERT_OK(r); send_recv_start(); } @@ -382,27 +382,27 @@ int run_ipc_send_recv_helper(uv_loop_t* loop, int inprocess) { memset(&ctx2, 0, sizeof(ctx2)); r = uv_pipe_init(loop, &ctx2.listen, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_init(loop, &ctx2.channel, 1); - ASSERT(r == 0); + ASSERT_OK(r); if (inprocess) { r = uv_pipe_bind(&ctx2.listen, TEST_PIPENAME_3); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&ctx2.listen, SOMAXCONN, listen_cb); - ASSERT(r == 0); + ASSERT_OK(r); } else { r = uv_pipe_open(&ctx2.channel, 0); - ASSERT(r == 0); + ASSERT_OK(r); send_recv_start(); } notify_parent_process(); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); return 0; } @@ -414,7 +414,7 @@ int ipc_send_recv_helper(void) { int r; r = run_ipc_send_recv_helper(uv_default_loop(), 0); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -425,11 +425,11 @@ void ipc_send_recv_helper_threadproc(void* arg) { uv_loop_t loop; r = uv_loop_init(&loop); - ASSERT(r == 0); + ASSERT_OK(r); r = run_ipc_send_recv_helper(&loop, 1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_loop_close(&loop); - ASSERT(r == 0); + ASSERT_OK(r); } diff --git a/deps/uv/test/test-ipc.c b/deps/uv/test/test-ipc.c index 7ec6ec9ce3af5b..49975d9b4d747c 100644 --- a/deps/uv/test/test-ipc.c +++ b/deps/uv/test/test-ipc.c @@ -68,16 +68,16 @@ static void on_connection(uv_stream_t* server, int status) { if (!local_conn_accepted) { /* Accept the connection and close it. Also and close the server. */ - ASSERT_EQ(status, 0); + ASSERT_OK(status); ASSERT_PTR_EQ(&tcp_server, server); conn = malloc(sizeof(*conn)); ASSERT_NOT_NULL(conn); r = uv_tcp_init(server->loop, conn); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_accept(server, (uv_stream_t*)conn); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_close((uv_handle_t*)conn, close_server_conn_cb); uv_close((uv_handle_t*)server, NULL); @@ -91,8 +91,8 @@ static void exit_cb(uv_process_t* process, int term_signal) { printf("exit_cb\n"); exit_cb_called++; - ASSERT_EQ(exit_status, 0); - ASSERT_EQ(term_signal, 0); + ASSERT_OK(exit_status); + ASSERT_OK(term_signal); uv_close((uv_handle_t*)process, NULL); } @@ -126,14 +126,14 @@ static void make_many_connections(void) { ASSERT_NOT_NULL(conn); r = uv_tcp_init(uv_default_loop(), &conn->conn); - ASSERT_EQ(r, 0); - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(r); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_connect(&conn->conn_req, (uv_tcp_t*) &conn->conn, (const struct sockaddr*) &addr, connect_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); conn->conn.data = conn; } @@ -179,13 +179,13 @@ static void on_read(uv_stream_t* handle, /* Accept the pending TCP server, and start listening on it. */ ASSERT_EQ(pending, UV_TCP); r = uv_tcp_init(uv_default_loop(), &tcp_server); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_accept((uv_stream_t*)pipe, (uv_stream_t*)&tcp_server); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, on_connection); - ASSERT_EQ(r, 0); + ASSERT_OK(r); tcp_server_listening = 1; @@ -194,13 +194,13 @@ static void on_read(uv_stream_t* handle, outbuf = uv_buf_init("foobar\n", 7); r = uv_write(&write_req, (uv_stream_t*)pipe, &outbuf, 1, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); /* Create a bunch of connections to get both servers to accept. */ make_many_connections(); } else if (memcmp("accepted_connection\n", buf->base, nread) == 0) { /* Remote server has accepted a connection. Close the channel. */ - ASSERT_EQ(0, uv_pipe_pending_count(pipe)); + ASSERT_OK(uv_pipe_pending_count(pipe)); ASSERT_EQ(pending, UV_UNKNOWN_HANDLE); remote_conn_accepted = 1; uv_close((uv_handle_t*)&channel, NULL); @@ -248,28 +248,28 @@ static void on_read_listen_after_bound_twice(uv_stream_t* handle, /* Accept the first TCP server, and start listening on it. */ ASSERT_EQ(pending, UV_TCP); r = uv_tcp_init(uv_default_loop(), &tcp_server); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_accept((uv_stream_t*)pipe, (uv_stream_t*)&tcp_server); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, on_connection); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } else if (read_cb_called == 2) { /* Accept the second TCP server, and start listening on it. */ ASSERT_EQ(pending, UV_TCP); r = uv_tcp_init(uv_default_loop(), &tcp_server2); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_accept((uv_stream_t*)pipe, (uv_stream_t*)&tcp_server2); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&tcp_server2, BACKLOG, on_connection); ASSERT_EQ(r, UV_EADDRINUSE); uv_close((uv_handle_t*)&tcp_server, NULL); uv_close((uv_handle_t*)&tcp_server2, NULL); - ASSERT_EQ(0, uv_pipe_pending_count(pipe)); + ASSERT_OK(uv_pipe_pending_count(pipe)); uv_close((uv_handle_t*)&channel, NULL); } @@ -288,12 +288,12 @@ void spawn_helper(uv_pipe_t* channel, uv_stdio_container_t stdio[3]; r = uv_pipe_init(uv_default_loop(), channel, 1); - ASSERT_EQ(r, 0); - ASSERT_NE(channel->ipc, 0); + ASSERT_OK(r); + ASSERT_NE(0, channel->ipc); exepath_size = sizeof(exepath); r = uv_exepath(exepath, &exepath_size); - ASSERT_EQ(r, 0); + ASSERT_OK(r); exepath[exepath_size] = '\0'; args[0] = exepath; @@ -315,12 +315,12 @@ void spawn_helper(uv_pipe_t* channel, stdio[2].data.fd = 2; r = uv_spawn(uv_default_loop(), process, &options); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } static void on_tcp_write(uv_write_t* req, int status) { - ASSERT_EQ(status, 0); + ASSERT_OK(status); ASSERT_PTR_EQ(req->handle, &tcp_connection); tcp_write_cb_called++; } @@ -385,10 +385,10 @@ static void on_read_connection(uv_stream_t* handle, /* Accept the pending TCP connection */ ASSERT_EQ(pending, UV_TCP); r = uv_tcp_init(uv_default_loop(), &tcp_connection); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_accept(handle, (uv_stream_t*)&tcp_connection); - ASSERT_EQ(r, 0); + ASSERT_OK(r); /* Make sure that the expected data is correctly multiplexed. */ ASSERT_MEM_EQ("hello\n", buf->base, nread); @@ -397,10 +397,10 @@ static void on_read_connection(uv_stream_t* handle, outbuf = uv_buf_init("world\n", 6); r = uv_write(&write_req, (uv_stream_t*)&tcp_connection, &outbuf, 1, on_tcp_write); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*)&tcp_connection, on_read_alloc, on_tcp_read); - ASSERT_EQ(r, 0); + ASSERT_OK(r); free(buf->base); } @@ -422,7 +422,7 @@ static int run_ipc_test(const char* helper, uv_read_cb read_cb) { uv_read_start((uv_stream_t*)&channel, on_alloc, read_cb); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(r, 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -434,10 +434,10 @@ TEST_IMPL(ipc_listen_before_write) { RETURN_SKIP(NO_SEND_HANDLE_ON_PIPE); #endif int r = run_ipc_test("ipc_helper_listen_before_write", on_read); - ASSERT_EQ(local_conn_accepted, 1); - ASSERT_EQ(remote_conn_accepted, 1); - ASSERT_EQ(read_cb_called, 1); - ASSERT_EQ(exit_cb_called, 1); + ASSERT_EQ(1, local_conn_accepted); + ASSERT_EQ(1, remote_conn_accepted); + ASSERT_EQ(1, read_cb_called); + ASSERT_EQ(1, exit_cb_called); return r; } @@ -447,10 +447,10 @@ TEST_IMPL(ipc_listen_after_write) { RETURN_SKIP(NO_SEND_HANDLE_ON_PIPE); #endif int r = run_ipc_test("ipc_helper_listen_after_write", on_read); - ASSERT_EQ(local_conn_accepted, 1); - ASSERT_EQ(remote_conn_accepted, 1); - ASSERT_EQ(read_cb_called, 1); - ASSERT_EQ(exit_cb_called, 1); + ASSERT_EQ(1, local_conn_accepted); + ASSERT_EQ(1, remote_conn_accepted); + ASSERT_EQ(1, read_cb_called); + ASSERT_EQ(1, exit_cb_called); return r; } @@ -460,10 +460,10 @@ TEST_IMPL(ipc_tcp_connection) { RETURN_SKIP(NO_SEND_HANDLE_ON_PIPE); #endif int r = run_ipc_test("ipc_helper_tcp_connection", on_read_connection); - ASSERT_EQ(read_cb_called, 1); - ASSERT_EQ(tcp_write_cb_called, 1); - ASSERT_EQ(tcp_read_cb_called, 1); - ASSERT_EQ(exit_cb_called, 1); + ASSERT_EQ(1, read_cb_called); + ASSERT_EQ(1, tcp_write_cb_called); + ASSERT_EQ(1, tcp_read_cb_called); + ASSERT_EQ(1, exit_cb_called); return r; } @@ -474,20 +474,20 @@ TEST_IMPL(listen_with_simultaneous_accepts) { int r; struct sockaddr_in addr; - ASSERT_EQ(0, uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_simultaneous_accepts(&server, 1); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server, SOMAXCONN, NULL); - ASSERT_EQ(r, 0); - ASSERT_EQ(server.reqs_pending, 32); + ASSERT_OK(r); + ASSERT_EQ(32, server.reqs_pending); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -499,20 +499,20 @@ TEST_IMPL(listen_no_simultaneous_accepts) { int r; struct sockaddr_in addr; - ASSERT_EQ(0, uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_simultaneous_accepts(&server, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server, SOMAXCONN, NULL); - ASSERT_EQ(r, 0); - ASSERT_EQ(server.reqs_pending, 1); + ASSERT_OK(r); + ASSERT_EQ(1, server.reqs_pending); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -523,8 +523,8 @@ TEST_IMPL(ipc_listen_after_bind_twice) { RETURN_SKIP(NO_SEND_HANDLE_ON_PIPE); #endif int r = run_ipc_test("ipc_helper_bind_twice", on_read_listen_after_bound_twice); - ASSERT_EQ(read_cb_called, 2); - ASSERT_EQ(exit_cb_called, 1); + ASSERT_EQ(2, read_cb_called); + ASSERT_EQ(1, exit_cb_called); return r; } #endif @@ -532,7 +532,7 @@ TEST_IMPL(ipc_listen_after_bind_twice) { TEST_IMPL(ipc_send_zero) { int r; r = run_ipc_test("ipc_helper_send_zero", on_read_send_zero); - ASSERT_EQ(r, 0); + ASSERT_OK(r); return 0; } @@ -563,7 +563,7 @@ static void tcp_connection_write_cb(uv_write_t* req, int status) { static void send_zero_write_cb(uv_write_t* req, int status) { - ASSERT_EQ(status, 0); + ASSERT_OK(status); send_zero_write++; } @@ -591,7 +591,7 @@ static void on_tcp_child_process_read(uv_stream_t* tcp, /* Write to the socket */ outbuf = uv_buf_init("hello again\n", 12); r = uv_write(&conn.tcp_write_req, tcp, &outbuf, 1, tcp_connection_write_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); tcp_conn_read_cb_called++; } @@ -600,9 +600,9 @@ static void on_tcp_child_process_read(uv_stream_t* tcp, static void connect_child_process_cb(uv_connect_t* req, int status) { int r; - ASSERT_EQ(status, 0); + ASSERT_OK(status); r = uv_read_start(req->handle, on_read_alloc, on_tcp_child_process_read); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } @@ -615,21 +615,21 @@ static void ipc_on_connection(uv_stream_t* server, int status) { * Accept the connection and close it. Also let the other * side know. */ - ASSERT_EQ(status, 0); + ASSERT_OK(status); ASSERT_PTR_EQ(&tcp_server, server); r = uv_tcp_init(server->loop, &conn.conn); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_accept(server, (uv_stream_t*)&conn.conn); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_close((uv_handle_t*)&conn.conn, close_cb); buf = uv_buf_init("accepted_connection\n", 20); r = uv_write2(&conn_notify_req, (uv_stream_t*)&channel, &buf, 1, NULL, conn_notify_write_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); connection_accepted = 1; } @@ -646,28 +646,28 @@ static void ipc_on_connection_tcp_conn(uv_stream_t* server, int status) { uv_buf_t buf; uv_tcp_t* conn; - ASSERT_EQ(status, 0); + ASSERT_OK(status); ASSERT_PTR_EQ(&tcp_server, server); conn = malloc(sizeof(*conn)); ASSERT_NOT_NULL(conn); r = uv_tcp_init(server->loop, conn); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_accept(server, (uv_stream_t*)conn); - ASSERT_EQ(r, 0); + ASSERT_OK(r); /* Send the accepted connection to the other process */ buf = uv_buf_init("hello\n", 6); r = uv_write2(&conn_notify_req, (uv_stream_t*)&channel, &buf, 1, (uv_stream_t*)conn, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) conn, on_read_alloc, on_tcp_child_process_read); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_close((uv_handle_t*)conn, close_and_free_cb); } @@ -682,44 +682,44 @@ int ipc_helper(int listen_after_write) { int r; uv_buf_t buf; - ASSERT_EQ(0, uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_pipe_init(uv_default_loop(), &channel, 1); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_pipe_open(&channel, 0); ASSERT_EQ(1, uv_is_readable((uv_stream_t*) &channel)); ASSERT_EQ(1, uv_is_writable((uv_stream_t*) &channel)); - ASSERT_EQ(0, uv_is_closing((uv_handle_t*) &channel)); + ASSERT_OK(uv_is_closing((uv_handle_t*) &channel)); r = uv_tcp_init(uv_default_loop(), &tcp_server); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); if (!listen_after_write) { r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, ipc_on_connection); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } buf = uv_buf_init("hello\n", 6); r = uv_write2(&write_req, (uv_stream_t*)&channel, &buf, 1, (uv_stream_t*)&tcp_server, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); if (listen_after_write) { r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, ipc_on_connection); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } notify_parent_process(); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(r, 0); + ASSERT_OK(r); - ASSERT_EQ(connection_accepted, 1); - ASSERT_EQ(close_cb_called, 3); + ASSERT_EQ(1, connection_accepted); + ASSERT_EQ(3, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -736,43 +736,43 @@ int ipc_helper_tcp_connection(void) { struct sockaddr_in addr; r = uv_pipe_init(uv_default_loop(), &channel, 1); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_pipe_open(&channel, 0); ASSERT_EQ(1, uv_is_readable((uv_stream_t*) &channel)); ASSERT_EQ(1, uv_is_writable((uv_stream_t*) &channel)); - ASSERT_EQ(0, uv_is_closing((uv_handle_t*) &channel)); + ASSERT_OK(uv_is_closing((uv_handle_t*) &channel)); r = uv_tcp_init(uv_default_loop(), &tcp_server); - ASSERT_EQ(r, 0); + ASSERT_OK(r); - ASSERT_EQ(0, uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&tcp_server, BACKLOG, ipc_on_connection_tcp_conn); - ASSERT_EQ(r, 0); + ASSERT_OK(r); /* Make a connection to the server */ r = uv_tcp_init(uv_default_loop(), &conn.conn); - ASSERT_EQ(r, 0); + ASSERT_OK(r); - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_connect(&conn.conn_req, (uv_tcp_t*) &conn.conn, (const struct sockaddr*) &addr, connect_child_process_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(r, 0); + ASSERT_OK(r); - ASSERT_EQ(tcp_conn_read_cb_called, 1); - ASSERT_EQ(tcp_conn_write_cb_called, 1); - ASSERT_EQ(close_cb_called, 4); + ASSERT_EQ(1, tcp_conn_read_cb_called); + ASSERT_EQ(1, tcp_conn_write_cb_called); + ASSERT_EQ(4, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -787,38 +787,38 @@ int ipc_helper_bind_twice(void) { int r; uv_buf_t buf; - ASSERT_EQ(0, uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_pipe_init(uv_default_loop(), &channel, 1); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_pipe_open(&channel, 0); ASSERT_EQ(1, uv_is_readable((uv_stream_t*) &channel)); ASSERT_EQ(1, uv_is_writable((uv_stream_t*) &channel)); - ASSERT_EQ(0, uv_is_closing((uv_handle_t*) &channel)); + ASSERT_OK(uv_is_closing((uv_handle_t*) &channel)); buf = uv_buf_init("hello\n", 6); r = uv_tcp_init(uv_default_loop(), &tcp_server); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_init(uv_default_loop(), &tcp_server2); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_bind(&tcp_server2, (const struct sockaddr*) &addr, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_write2(&write_req, (uv_stream_t*)&channel, &buf, 1, (uv_stream_t*)&tcp_server, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_write2(&write_req2, (uv_stream_t*)&channel, &buf, 1, (uv_stream_t*)&tcp_server2, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(r, 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -831,13 +831,13 @@ int ipc_helper_send_zero(void) { zero_buf = uv_buf_init(0, 0); r = uv_pipe_init(uv_default_loop(), &channel, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_pipe_open(&channel, 0); ASSERT_EQ(1, uv_is_readable((uv_stream_t*) &channel)); ASSERT_EQ(1, uv_is_writable((uv_stream_t*) &channel)); - ASSERT_EQ(0, uv_is_closing((uv_handle_t*) &channel)); + ASSERT_OK(uv_is_closing((uv_handle_t*) &channel)); r = uv_write(&write_req, (uv_stream_t*)&channel, @@ -845,12 +845,12 @@ int ipc_helper_send_zero(void) { 1, send_zero_write_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(r, 0); + ASSERT_OK(r); - ASSERT_EQ(send_zero_write, 1); + ASSERT_EQ(1, send_zero_write); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-list.h b/deps/uv/test/test-list.h index 78ff9c2d162167..d112d07a29a8ec 100644 --- a/deps/uv/test/test-list.h +++ b/deps/uv/test/test-list.h @@ -127,6 +127,8 @@ TEST_DECLARE (tcp_bind_writable_flags) TEST_DECLARE (tcp_bind_or_listen_error_after_close) TEST_DECLARE (tcp_listen_without_bind) TEST_DECLARE (tcp_connect_error_fault) +TEST_DECLARE (tcp_connect6_error_fault) +TEST_DECLARE (tcp_connect6_link_local) TEST_DECLARE (tcp_connect_timeout) TEST_DECLARE (tcp_local_connect_timeout) TEST_DECLARE (tcp6_local_connect_timeout) @@ -321,6 +323,7 @@ TEST_DECLARE (spawn_detached) TEST_DECLARE (spawn_and_kill_with_std) TEST_DECLARE (spawn_and_ping) TEST_DECLARE (spawn_preserve_env) +TEST_DECLARE (spawn_same_stdout_stderr) TEST_DECLARE (spawn_setuid_fails) TEST_DECLARE (spawn_setgid_fails) TEST_DECLARE (spawn_stdout_to_file) @@ -501,6 +504,7 @@ TEST_DECLARE (listen_with_simultaneous_accepts) TEST_DECLARE (listen_no_simultaneous_accepts) TEST_DECLARE (fs_stat_root) TEST_DECLARE (spawn_with_an_odd_path) +TEST_DECLARE (spawn_no_path) TEST_DECLARE (ipc_listen_after_bind_twice) TEST_DECLARE (win32_signum_number) #else @@ -542,6 +546,7 @@ TEST_DECLARE (fork_socketpair) TEST_DECLARE (fork_socketpair_started) TEST_DECLARE (fork_signal_to_child) TEST_DECLARE (fork_signal_to_child_closed) +TEST_DECLARE (fork_close_signal_in_child) #ifndef __APPLE__ /* This is forbidden in a fork child: The process has forked and you cannot use this CoreFoundation functionality safely. You MUST exec(). */ @@ -724,6 +729,8 @@ TASK_LIST_START TEST_ENTRY (tcp_bind_or_listen_error_after_close) TEST_ENTRY (tcp_listen_without_bind) TEST_ENTRY (tcp_connect_error_fault) + TEST_ENTRY (tcp_connect6_error_fault) + TEST_ENTRY (tcp_connect6_link_local) TEST_ENTRY (tcp_connect_timeout) TEST_ENTRY (tcp_local_connect_timeout) TEST_ENTRY (tcp6_local_connect_timeout) @@ -977,6 +984,7 @@ TASK_LIST_START TEST_ENTRY (spawn_and_kill_with_std) TEST_ENTRY (spawn_and_ping) TEST_ENTRY (spawn_preserve_env) + TEST_ENTRY (spawn_same_stdout_stderr) TEST_ENTRY (spawn_setuid_fails) TEST_ENTRY (spawn_setgid_fails) TEST_ENTRY (spawn_stdout_to_file) @@ -1015,6 +1023,7 @@ TASK_LIST_START TEST_ENTRY (listen_no_simultaneous_accepts) TEST_ENTRY (fs_stat_root) TEST_ENTRY (spawn_with_an_odd_path) + TEST_ENTRY (spawn_no_path) TEST_ENTRY (ipc_listen_after_bind_twice) TEST_ENTRY (win32_signum_number) #else @@ -1055,6 +1064,7 @@ TASK_LIST_START TEST_ENTRY (fs_unlink_archive_readonly) #endif TEST_ENTRY (fs_chown) + TEST_ENTRY (fs_link) TEST_ENTRY (fs_utime) TEST_ENTRY (fs_utime_round) TEST_ENTRY (fs_futime) @@ -1175,6 +1185,7 @@ TASK_LIST_START TEST_ENTRY (fork_socketpair_started) TEST_ENTRY (fork_signal_to_child) TEST_ENTRY (fork_signal_to_child_closed) + TEST_ENTRY (fork_close_signal_in_child) #ifndef __APPLE__ TEST_ENTRY (fork_fs_events_child) TEST_ENTRY (fork_fs_events_child_dir) diff --git a/deps/uv/test/test-loop-alive.c b/deps/uv/test/test-loop-alive.c index 76a2b04cc9d1e7..279cfc3227098d 100644 --- a/deps/uv/test/test-loop-alive.c +++ b/deps/uv/test/test-loop-alive.c @@ -37,7 +37,7 @@ static void work_cb(uv_work_t* req) { static void after_work_cb(uv_work_t* req, int status) { ASSERT(req); - ASSERT(status == 0); + ASSERT_OK(status); } @@ -51,16 +51,16 @@ TEST_IMPL(loop_alive) { ASSERT(uv_loop_alive(uv_default_loop())); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(!uv_loop_alive(uv_default_loop())); /* loops with requests are alive */ r = uv_queue_work(uv_default_loop(), &work_req, work_cb, after_work_cb); - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(uv_loop_alive(uv_default_loop())); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(!uv_loop_alive(uv_default_loop())); MAKE_VALGRIND_HAPPY(uv_default_loop()); diff --git a/deps/uv/test/test-loop-close.c b/deps/uv/test/test-loop-close.c index f5814796e8f3f0..cd1b76ce1b0665 100644 --- a/deps/uv/test/test-loop-close.c +++ b/deps/uv/test/test-loop-close.c @@ -35,23 +35,23 @@ TEST_IMPL(loop_close) { uv_loop_t loop; loop.data = &loop; - ASSERT(0 == uv_loop_init(&loop)); - ASSERT(loop.data == (void*) &loop); + ASSERT_OK(uv_loop_init(&loop)); + ASSERT_PTR_EQ(loop.data, (void*) &loop); uv_timer_init(&loop, &timer_handle); uv_timer_start(&timer_handle, timer_cb, 100, 100); - ASSERT(UV_EBUSY == uv_loop_close(&loop)); + ASSERT_EQ(UV_EBUSY, uv_loop_close(&loop)); uv_run(&loop, UV_RUN_DEFAULT); uv_close((uv_handle_t*) &timer_handle, NULL); r = uv_run(&loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(loop.data == (void*) &loop); - ASSERT(0 == uv_loop_close(&loop)); - ASSERT(loop.data == (void*) &loop); + ASSERT_PTR_EQ(loop.data, (void*) &loop); + ASSERT_OK(uv_loop_close(&loop)); + ASSERT_PTR_EQ(loop.data, (void*) &loop); return 0; } @@ -67,11 +67,11 @@ static void loop_instant_close_after_work_cb(uv_work_t* req, int status) { TEST_IMPL(loop_instant_close) { static uv_loop_t loop; static uv_work_t req; - ASSERT(0 == uv_loop_init(&loop)); - ASSERT(0 == uv_queue_work(&loop, - &req, - loop_instant_close_work_cb, - loop_instant_close_after_work_cb)); + ASSERT_OK(uv_loop_init(&loop)); + ASSERT_OK(uv_queue_work(&loop, + &req, + loop_instant_close_work_cb, + loop_instant_close_after_work_cb)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; } diff --git a/deps/uv/test/test-loop-configure.c b/deps/uv/test/test-loop-configure.c index d057c1ed8a7bf8..1bc328431c9f0d 100644 --- a/deps/uv/test/test-loop-configure.c +++ b/deps/uv/test/test-loop-configure.c @@ -24,15 +24,15 @@ static void timer_cb(uv_timer_t* handle) { TEST_IMPL(loop_configure) { uv_timer_t timer_handle; uv_loop_t loop; - ASSERT(0 == uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); #ifdef _WIN32 - ASSERT(UV_ENOSYS == uv_loop_configure(&loop, UV_LOOP_BLOCK_SIGNAL, 0)); + ASSERT_EQ(UV_ENOSYS, uv_loop_configure(&loop, UV_LOOP_BLOCK_SIGNAL, 0)); #else - ASSERT(0 == uv_loop_configure(&loop, UV_LOOP_BLOCK_SIGNAL, SIGPROF)); + ASSERT_OK(uv_loop_configure(&loop, UV_LOOP_BLOCK_SIGNAL, SIGPROF)); #endif - ASSERT(0 == uv_timer_init(&loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 10, 0)); - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); - ASSERT(0 == uv_loop_close(&loop)); + ASSERT_OK(uv_timer_init(&loop, &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, 10, 0)); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_loop_close(&loop)); return 0; } diff --git a/deps/uv/test/test-loop-handles.c b/deps/uv/test/test-loop-handles.c index 5d3df0245aa064..58368bf73ce471 100644 --- a/deps/uv/test/test-loop-handles.c +++ b/deps/uv/test/test-loop-handles.c @@ -108,7 +108,7 @@ static int idle_2_is_active = 0; static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer_handle); + ASSERT_PTR_EQ(handle, &timer_handle); } @@ -116,7 +116,7 @@ static void idle_2_close_cb(uv_handle_t* handle) { fprintf(stderr, "%s", "IDLE_2_CLOSE_CB\n"); fflush(stderr); - ASSERT(handle == (uv_handle_t*)&idle_2_handle); + ASSERT_PTR_EQ(handle, (uv_handle_t*)&idle_2_handle); ASSERT(idle_2_is_active); @@ -129,7 +129,7 @@ static void idle_2_cb(uv_idle_t* handle) { fprintf(stderr, "%s", "IDLE_2_CB\n"); fflush(stderr); - ASSERT(handle == &idle_2_handle); + ASSERT_PTR_EQ(handle, &idle_2_handle); idle_2_cb_called++; @@ -144,14 +144,14 @@ static void idle_1_cb(uv_idle_t* handle) { fflush(stderr); ASSERT_NOT_NULL(handle); - ASSERT(idles_1_active > 0); + ASSERT_GT(idles_1_active, 0); /* Init idle_2 and make it active */ if (!idle_2_is_active && !uv_is_closing((uv_handle_t*)&idle_2_handle)) { r = uv_idle_init(uv_default_loop(), &idle_2_handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_idle_start(&idle_2_handle, idle_2_cb); - ASSERT(r == 0); + ASSERT_OK(r); idle_2_is_active = 1; idle_2_cb_started++; } @@ -160,7 +160,7 @@ static void idle_1_cb(uv_idle_t* handle) { if (idle_1_cb_called % 5 == 0) { r = uv_idle_stop((uv_idle_t*)handle); - ASSERT(r == 0); + ASSERT_OK(r); idles_1_active--; } } @@ -179,7 +179,7 @@ static void idle_1_close_cb(uv_handle_t* handle) { static void prepare_1_close_cb(uv_handle_t* handle) { fprintf(stderr, "%s", "PREPARE_1_CLOSE_CB"); fflush(stderr); - ASSERT(handle == (uv_handle_t*)&prepare_1_handle); + ASSERT_PTR_EQ(handle, (uv_handle_t*)&prepare_1_handle); prepare_1_close_cb_called++; } @@ -188,7 +188,7 @@ static void prepare_1_close_cb(uv_handle_t* handle) { static void check_close_cb(uv_handle_t* handle) { fprintf(stderr, "%s", "CHECK_CLOSE_CB\n"); fflush(stderr); - ASSERT(handle == (uv_handle_t*)&check_handle); + ASSERT_PTR_EQ(handle, (uv_handle_t*)&check_handle); check_close_cb_called++; } @@ -197,7 +197,7 @@ static void check_close_cb(uv_handle_t* handle) { static void prepare_2_close_cb(uv_handle_t* handle) { fprintf(stderr, "%s", "PREPARE_2_CLOSE_CB\n"); fflush(stderr); - ASSERT(handle == (uv_handle_t*)&prepare_2_handle); + ASSERT_PTR_EQ(handle, (uv_handle_t*)&prepare_2_handle); prepare_2_close_cb_called++; } @@ -208,13 +208,13 @@ static void check_cb(uv_check_t* handle) { fprintf(stderr, "%s", "CHECK_CB\n"); fflush(stderr); - ASSERT(handle == &check_handle); + ASSERT_PTR_EQ(handle, &check_handle); if (loop_iteration < ITERATIONS) { /* Make some idle watchers active */ for (i = 0; i < 1 + (loop_iteration % IDLE_COUNT); i++) { r = uv_idle_start(&idle_1_handles[i], idle_1_cb); - ASSERT(r == 0); + ASSERT_OK(r); idles_1_active++; } @@ -244,16 +244,16 @@ static void prepare_2_cb(uv_prepare_t* handle) { fprintf(stderr, "%s", "PREPARE_2_CB\n"); fflush(stderr); - ASSERT(handle == &prepare_2_handle); + ASSERT_PTR_EQ(handle, &prepare_2_handle); /* Prepare_2 gets started by prepare_1 when (loop_iteration % 2 == 0), and it * stops itself immediately. A started watcher is not queued until the next * round, so when this callback is made (loop_iteration % 2 == 0) cannot be * true. */ - ASSERT(loop_iteration % 2 != 0); + ASSERT_NE(0, loop_iteration % 2); r = uv_prepare_stop((uv_prepare_t*)handle); - ASSERT(r == 0); + ASSERT_OK(r); prepare_2_cb_called++; } @@ -264,11 +264,11 @@ static void prepare_1_cb(uv_prepare_t* handle) { fprintf(stderr, "%s", "PREPARE_1_CB\n"); fflush(stderr); - ASSERT(handle == &prepare_1_handle); + ASSERT_PTR_EQ(handle, &prepare_1_handle); if (loop_iteration % 2 == 0) { r = uv_prepare_start(&prepare_2_handle, prepare_2_cb); - ASSERT(r == 0); + ASSERT_OK(r); } prepare_1_cb_called++; @@ -283,23 +283,23 @@ TEST_IMPL(loop_handles) { int r; r = uv_prepare_init(uv_default_loop(), &prepare_1_handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_prepare_start(&prepare_1_handle, prepare_1_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_check_init(uv_default_loop(), &check_handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_check_start(&check_handle, check_cb); - ASSERT(r == 0); + ASSERT_OK(r); /* initialize only, prepare_2 is started by prepare_1_cb */ r = uv_prepare_init(uv_default_loop(), &prepare_2_handle); - ASSERT(r == 0); + ASSERT_OK(r); for (i = 0; i < IDLE_COUNT; i++) { /* initialize only, idle_1 handles are started by check_cb */ r = uv_idle_init(uv_default_loop(), &idle_1_handles[i]); - ASSERT(r == 0); + ASSERT_OK(r); } /* don't init or start idle_2, both is done by idle_1_cb */ @@ -307,30 +307,30 @@ TEST_IMPL(loop_handles) { /* The timer callback is there to keep the event loop polling unref it as it * is not supposed to keep the loop alive */ r = uv_timer_init(uv_default_loop(), &timer_handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer_handle, timer_cb, TIMEOUT, TIMEOUT); - ASSERT(r == 0); + ASSERT_OK(r); uv_unref((uv_handle_t*)&timer_handle); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(loop_iteration == ITERATIONS); + ASSERT_EQ(loop_iteration, ITERATIONS); - ASSERT(prepare_1_cb_called == ITERATIONS); - ASSERT(prepare_1_close_cb_called == 1); + ASSERT_EQ(prepare_1_cb_called, ITERATIONS); + ASSERT_EQ(1, prepare_1_close_cb_called); - ASSERT(prepare_2_cb_called == ITERATIONS / 2); - ASSERT(prepare_2_close_cb_called == 1); + ASSERT_EQ(prepare_2_cb_called, ITERATIONS / 2); + ASSERT_EQ(1, prepare_2_close_cb_called); - ASSERT(check_cb_called == ITERATIONS); - ASSERT(check_close_cb_called == 1); + ASSERT_EQ(check_cb_called, ITERATIONS); + ASSERT_EQ(1, check_close_cb_called); /* idle_1_cb should be called a lot */ - ASSERT(idle_1_close_cb_called == IDLE_COUNT); + ASSERT_EQ(idle_1_close_cb_called, IDLE_COUNT); - ASSERT(idle_2_close_cb_called == idle_2_cb_started); - ASSERT(idle_2_is_active == 0); + ASSERT_EQ(idle_2_close_cb_called, idle_2_cb_started); + ASSERT_OK(idle_2_is_active); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-loop-stop.c b/deps/uv/test/test-loop-stop.c index 981d20d109930d..a00a5b81ade79e 100644 --- a/deps/uv/test/test-loop-stop.c +++ b/deps/uv/test/test-loop-stop.c @@ -30,7 +30,7 @@ static int num_ticks = 10; static void prepare_cb(uv_prepare_t* handle) { - ASSERT(handle == &prepare_handle); + ASSERT_PTR_EQ(handle, &prepare_handle); prepare_called++; if (prepare_called == num_ticks) uv_prepare_stop(handle); @@ -38,7 +38,7 @@ static void prepare_cb(uv_prepare_t* handle) { static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer_handle); + ASSERT_PTR_EQ(handle, &timer_handle); timer_called++; if (timer_called == 1) uv_stop(uv_default_loop()); @@ -55,17 +55,17 @@ TEST_IMPL(loop_stop) { uv_timer_start(&timer_handle, timer_cb, 100, 100); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r != 0); - ASSERT(timer_called == 1); + ASSERT(r); + ASSERT_EQ(1, timer_called); r = uv_run(uv_default_loop(), UV_RUN_NOWAIT); - ASSERT(r != 0); - ASSERT(prepare_called > 1); + ASSERT(r); + ASSERT_GT(prepare_called, 1); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(timer_called == 10); - ASSERT(prepare_called == 10); + ASSERT_OK(r); + ASSERT_EQ(10, timer_called); + ASSERT_EQ(10, prepare_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -76,7 +76,7 @@ TEST_IMPL(loop_stop_before_run) { ASSERT_OK(uv_timer_init(uv_default_loop(), &timer_handle)); ASSERT_OK(uv_timer_start(&timer_handle, (uv_timer_cb) abort, 0, 0)); uv_stop(uv_default_loop()); - ASSERT_NE(uv_run(uv_default_loop(), UV_RUN_DEFAULT), 0); + ASSERT_NE(0, uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-loop-time.c b/deps/uv/test/test-loop-time.c index 5d083064ae3133..01e44ffbdad18c 100644 --- a/deps/uv/test/test-loop-time.c +++ b/deps/uv/test/test-loop-time.c @@ -28,7 +28,7 @@ TEST_IMPL(loop_update_time) { start = uv_now(uv_default_loop()); while (uv_now(uv_default_loop()) - start < 1000) - ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_NOWAIT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_NOWAIT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -46,23 +46,23 @@ TEST_IMPL(loop_backend_timeout) { /* The default loop has some internal watchers to initialize. */ loop->active_handles++; r = uv_run(loop, UV_RUN_NOWAIT); - ASSERT_EQ(r, 1); + ASSERT_EQ(1, r); loop->active_handles--; - ASSERT_EQ(uv_loop_alive(loop), 0); + ASSERT_OK(uv_loop_alive(loop)); r = uv_timer_init(loop, &timer); - ASSERT_EQ(r, 0); + ASSERT_OK(r); - ASSERT_EQ(uv_loop_alive(loop), 0); - ASSERT_EQ(uv_backend_timeout(loop), 0); + ASSERT_OK(uv_loop_alive(loop)); + ASSERT_OK(uv_backend_timeout(loop)); r = uv_timer_start(&timer, cb, 1000, 0); /* 1 sec */ - ASSERT_EQ(r, 0); - ASSERT_EQ(uv_backend_timeout(loop), 1000); + ASSERT_OK(r); + ASSERT_EQ(1000, uv_backend_timeout(loop)); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT_EQ(r, 0); - ASSERT_EQ(uv_backend_timeout(loop), 0); + ASSERT_OK(r); + ASSERT_OK(uv_backend_timeout(loop)); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-metrics.c b/deps/uv/test/test-metrics.c index d532f4eff49ec1..c7c73aa53d79cc 100644 --- a/deps/uv/test/test-metrics.c +++ b/deps/uv/test/test-metrics.c @@ -59,11 +59,11 @@ TEST_IMPL(metrics_idle_time) { cntr = 0; timer.data = &cntr; - ASSERT_EQ(0, uv_loop_configure(uv_default_loop(), UV_METRICS_IDLE_TIME)); - ASSERT_EQ(0, uv_timer_init(uv_default_loop(), &timer)); - ASSERT_EQ(0, uv_timer_start(&timer, timer_spin_cb, timeout, 0)); + ASSERT_OK(uv_loop_configure(uv_default_loop(), UV_METRICS_IDLE_TIME)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &timer)); + ASSERT_OK(uv_timer_start(&timer, timer_spin_cb, timeout, 0)); - ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); ASSERT_GT(cntr, 0); idle_time = uv_metrics_idle_time(uv_default_loop()); @@ -87,12 +87,12 @@ static void metrics_routine_cb(void* arg) { cntr = 0; timer.data = &cntr; - ASSERT_EQ(0, uv_loop_init(&loop)); - ASSERT_EQ(0, uv_loop_configure(&loop, UV_METRICS_IDLE_TIME)); - ASSERT_EQ(0, uv_timer_init(&loop, &timer)); - ASSERT_EQ(0, uv_timer_start(&timer, timer_spin_cb, timeout, 0)); + ASSERT_OK(uv_loop_init(&loop)); + ASSERT_OK(uv_loop_configure(&loop, UV_METRICS_IDLE_TIME)); + ASSERT_OK(uv_timer_init(&loop, &timer)); + ASSERT_OK(uv_timer_start(&timer, timer_spin_cb, timeout, 0)); - ASSERT_EQ(0, uv_run(&loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); ASSERT_GT(cntr, 0); idle_time = uv_metrics_idle_time(&loop); @@ -104,7 +104,7 @@ static void metrics_routine_cb(void* arg) { ASSERT_GE(idle_time, (timeout - 500) * UV_NS_TO_MS); close_loop(&loop); - ASSERT_EQ(0, uv_loop_close(&loop)); + ASSERT_OK(uv_loop_close(&loop)); } @@ -113,7 +113,7 @@ TEST_IMPL(metrics_idle_time_thread) { int i; for (i = 0; i < 5; i++) { - ASSERT_EQ(0, uv_thread_create(&threads[i], metrics_routine_cb, NULL)); + ASSERT_OK(uv_thread_create(&threads[i], metrics_routine_cb, NULL)); } for (i = 0; i < 5; i++) { @@ -136,16 +136,16 @@ TEST_IMPL(metrics_idle_time_zero) { cntr = 0; timer.data = &cntr; - ASSERT_EQ(0, uv_loop_configure(uv_default_loop(), UV_METRICS_IDLE_TIME)); - ASSERT_EQ(0, uv_timer_init(uv_default_loop(), &timer)); - ASSERT_EQ(0, uv_timer_start(&timer, timer_noop_cb, 0, 0)); + ASSERT_OK(uv_loop_configure(uv_default_loop(), UV_METRICS_IDLE_TIME)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &timer)); + ASSERT_OK(uv_timer_start(&timer, timer_noop_cb, 0, 0)); - ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); ASSERT_GT(cntr, 0); - ASSERT_EQ(0, uv_metrics_idle_time(uv_default_loop())); + ASSERT_OK(uv_metrics_idle_time(uv_default_loop())); - ASSERT_EQ(0, uv_metrics_info(uv_default_loop(), &metrics)); + ASSERT_OK(uv_metrics_info(uv_default_loop(), &metrics)); ASSERT_UINT64_EQ(cntr, metrics.loop_count); MAKE_VALGRIND_HAPPY(uv_default_loop()); @@ -156,7 +156,7 @@ TEST_IMPL(metrics_idle_time_zero) { static void close_cb(uv_fs_t* req) { uv_metrics_t metrics; - ASSERT_EQ(0, uv_metrics_info(uv_default_loop(), &metrics)); + ASSERT_OK(uv_metrics_info(uv_default_loop(), &metrics)); ASSERT_UINT64_EQ(3, metrics.loop_count); ASSERT_UINT64_GT(metrics.events, last_events_count); @@ -168,7 +168,7 @@ static void close_cb(uv_fs_t* req) { static void write_cb(uv_fs_t* req) { uv_metrics_t metrics; - ASSERT_EQ(0, uv_metrics_info(uv_default_loop(), &metrics)); + ASSERT_OK(uv_metrics_info(uv_default_loop(), &metrics)); ASSERT_UINT64_EQ(2, metrics.loop_count); ASSERT_UINT64_GT(metrics.events, last_events_count); ASSERT_EQ(req->result, sizeof(test_buf)); @@ -176,17 +176,17 @@ static void write_cb(uv_fs_t* req) { uv_fs_req_cleanup(req); last_events_count = metrics.events; - ASSERT_EQ(0, uv_fs_close(uv_default_loop(), - &fs_reqs.close_req, - fs_reqs.open_req.result, - close_cb)); + ASSERT_OK(uv_fs_close(uv_default_loop(), + &fs_reqs.close_req, + fs_reqs.open_req.result, + close_cb)); } static void create_cb(uv_fs_t* req) { uv_metrics_t metrics; - ASSERT_EQ(0, uv_metrics_info(uv_default_loop(), &metrics)); + ASSERT_OK(uv_metrics_info(uv_default_loop(), &metrics)); /* Event count here is still 0 so not going to check. */ ASSERT_UINT64_EQ(1, metrics.loop_count); ASSERT_GE(req->result, 0); @@ -195,13 +195,13 @@ static void create_cb(uv_fs_t* req) { last_events_count = metrics.events; uv_buf_t iov = uv_buf_init(test_buf, sizeof(test_buf)); - ASSERT_EQ(0, uv_fs_write(uv_default_loop(), - &fs_reqs.write_req, - req->result, - &iov, - 1, - 0, - write_cb)); + ASSERT_OK(uv_fs_write(uv_default_loop(), + &fs_reqs.write_req, + req->result, + &iov, + 1, + 0, + write_cb)); } @@ -210,15 +210,15 @@ static void prepare_cb(uv_prepare_t* handle) { uv_prepare_stop(handle); - ASSERT_EQ(0, uv_metrics_info(uv_default_loop(), &metrics)); + ASSERT_OK(uv_metrics_info(uv_default_loop(), &metrics)); ASSERT_UINT64_EQ(0, metrics.loop_count); ASSERT_UINT64_EQ(0, metrics.events); - ASSERT_EQ(0, uv_fs_open(uv_default_loop(), - &fs_reqs.open_req, - "test_file", - O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR, - create_cb)); + ASSERT_OK(uv_fs_open(uv_default_loop(), + &fs_reqs.open_req, + "test_file", + O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR, + create_cb)); } @@ -229,10 +229,10 @@ TEST_IMPL(metrics_info_check) { uv_fs_unlink(NULL, &unlink_req, "test_file", NULL); uv_fs_req_cleanup(&unlink_req); - ASSERT_EQ(0, uv_prepare_init(uv_default_loop(), &prepare)); - ASSERT_EQ(0, uv_prepare_start(&prepare, prepare_cb)); + ASSERT_OK(uv_prepare_init(uv_default_loop(), &prepare)); + ASSERT_OK(uv_prepare_start(&prepare, prepare_cb)); - ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); uv_fs_unlink(NULL, &unlink_req, "test_file", NULL); uv_fs_req_cleanup(&unlink_req); diff --git a/deps/uv/test/test-multiple-listen.c b/deps/uv/test/test-multiple-listen.c index bbaa9bc1ef1265..47f35f6c05873c 100644 --- a/deps/uv/test/test-multiple-listen.c +++ b/deps/uv/test/test-multiple-listen.c @@ -38,7 +38,7 @@ static void close_cb(uv_handle_t* handle) { static void connection_cb(uv_stream_t* tcp, int status) { - ASSERT(status == 0); + ASSERT_OK(status); uv_close((uv_handle_t*)&server, close_cb); connection_cb_called++; } @@ -48,25 +48,25 @@ static void start_server(void) { struct sockaddr_in addr; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server, 128, connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server, 128, connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void connect_cb(uv_connect_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); free(req); uv_close((uv_handle_t*)&client, close_cb); connect_cb_called++; @@ -78,17 +78,17 @@ static void client_connect(void) { uv_connect_t* connect_req = malloc(sizeof *connect_req); int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); ASSERT_NOT_NULL(connect_req); r = uv_tcp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(connect_req, &client, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -100,9 +100,9 @@ TEST_IMPL(multiple_listen) { uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connection_cb_called == 1); - ASSERT(connect_cb_called == 1); - ASSERT(close_cb_called == 2); + ASSERT_EQ(1, connection_cb_called); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-mutexes.c b/deps/uv/test/test-mutexes.c index 975222ca1229d7..ca3377324b2eab 100644 --- a/deps/uv/test/test-mutexes.c +++ b/deps/uv/test/test-mutexes.c @@ -40,7 +40,7 @@ TEST_IMPL(thread_mutex) { int r; r = uv_mutex_init(&mutex); - ASSERT(r == 0); + ASSERT_OK(r); uv_mutex_lock(&mutex); uv_mutex_unlock(&mutex); @@ -55,11 +55,11 @@ TEST_IMPL(thread_mutex_recursive) { int r; r = uv_mutex_init_recursive(&mutex); - ASSERT(r == 0); + ASSERT_OK(r); uv_mutex_lock(&mutex); uv_mutex_lock(&mutex); - ASSERT(0 == uv_mutex_trylock(&mutex)); + ASSERT_OK(uv_mutex_trylock(&mutex)); uv_mutex_unlock(&mutex); uv_mutex_unlock(&mutex); @@ -75,7 +75,7 @@ TEST_IMPL(thread_rwlock) { int r; r = uv_rwlock_init(&rwlock); - ASSERT(r == 0); + ASSERT_OK(r); uv_rwlock_rdlock(&rwlock); uv_rwlock_rdunlock(&rwlock); @@ -101,7 +101,7 @@ static void synchronize(void) { synchronize_nowait(); /* Wait for the other thread. Guard against spurious wakeups. */ for (current = step; current == step; uv_cond_wait(&condvar, &mutex)); - ASSERT(step == current + 1); + ASSERT_EQ(step, current + 1); } @@ -111,23 +111,23 @@ static void thread_rwlock_trylock_peer(void* unused) { uv_mutex_lock(&mutex); /* Write lock held by other thread. */ - ASSERT(UV_EBUSY == uv_rwlock_tryrdlock(&rwlock)); - ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock)); + ASSERT_EQ(UV_EBUSY, uv_rwlock_tryrdlock(&rwlock)); + ASSERT_EQ(UV_EBUSY, uv_rwlock_trywrlock(&rwlock)); synchronize(); /* Read lock held by other thread. */ - ASSERT(0 == uv_rwlock_tryrdlock(&rwlock)); + ASSERT_OK(uv_rwlock_tryrdlock(&rwlock)); uv_rwlock_rdunlock(&rwlock); - ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock)); + ASSERT_EQ(UV_EBUSY, uv_rwlock_trywrlock(&rwlock)); synchronize(); /* Acquire write lock. */ - ASSERT(0 == uv_rwlock_trywrlock(&rwlock)); + ASSERT_OK(uv_rwlock_trywrlock(&rwlock)); synchronize(); /* Release write lock and acquire read lock. */ uv_rwlock_wrunlock(&rwlock); - ASSERT(0 == uv_rwlock_tryrdlock(&rwlock)); + ASSERT_OK(uv_rwlock_tryrdlock(&rwlock)); synchronize(); uv_rwlock_rdunlock(&rwlock); @@ -139,22 +139,22 @@ static void thread_rwlock_trylock_peer(void* unused) { TEST_IMPL(thread_rwlock_trylock) { uv_thread_t thread; - ASSERT(0 == uv_cond_init(&condvar)); - ASSERT(0 == uv_mutex_init(&mutex)); - ASSERT(0 == uv_rwlock_init(&rwlock)); + ASSERT_OK(uv_cond_init(&condvar)); + ASSERT_OK(uv_mutex_init(&mutex)); + ASSERT_OK(uv_rwlock_init(&rwlock)); uv_mutex_lock(&mutex); - ASSERT(0 == uv_thread_create(&thread, thread_rwlock_trylock_peer, NULL)); + ASSERT_OK(uv_thread_create(&thread, thread_rwlock_trylock_peer, NULL)); /* Hold write lock. */ - ASSERT(0 == uv_rwlock_trywrlock(&rwlock)); + ASSERT_OK(uv_rwlock_trywrlock(&rwlock)); synchronize(); /* Releases the mutex to the other thread. */ /* Release write lock and acquire read lock. Pthreads doesn't support * the notion of upgrading or downgrading rwlocks, so neither do we. */ uv_rwlock_wrunlock(&rwlock); - ASSERT(0 == uv_rwlock_tryrdlock(&rwlock)); + ASSERT_OK(uv_rwlock_tryrdlock(&rwlock)); synchronize(); /* Release read lock. */ @@ -162,17 +162,17 @@ TEST_IMPL(thread_rwlock_trylock) { synchronize(); /* Write lock held by other thread. */ - ASSERT(UV_EBUSY == uv_rwlock_tryrdlock(&rwlock)); - ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock)); + ASSERT_EQ(UV_EBUSY, uv_rwlock_tryrdlock(&rwlock)); + ASSERT_EQ(UV_EBUSY, uv_rwlock_trywrlock(&rwlock)); synchronize(); /* Read lock held by other thread. */ - ASSERT(0 == uv_rwlock_tryrdlock(&rwlock)); + ASSERT_OK(uv_rwlock_tryrdlock(&rwlock)); uv_rwlock_rdunlock(&rwlock); - ASSERT(UV_EBUSY == uv_rwlock_trywrlock(&rwlock)); + ASSERT_EQ(UV_EBUSY, uv_rwlock_trywrlock(&rwlock)); synchronize(); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); uv_rwlock_destroy(&rwlock); uv_mutex_unlock(&mutex); uv_mutex_destroy(&mutex); diff --git a/deps/uv/test/test-not-readable-nor-writable-on-read-error.c b/deps/uv/test/test-not-readable-nor-writable-on-read-error.c index 823a4e91e29096..2c45a2da2e88e3 100644 --- a/deps/uv/test/test-not-readable-nor-writable-on-read-error.c +++ b/deps/uv/test/test-not-readable-nor-writable-on-read-error.c @@ -35,7 +35,7 @@ static int close_cb_called; static void write_cb(uv_write_t* req, int status) { write_cb_called++; - ASSERT(status == 0); + ASSERT_OK(status); } static void alloc_cb(uv_handle_t* handle, @@ -54,8 +54,8 @@ static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { read_cb_called++; ASSERT((nread < 0) && (nread != UV_EOF)); - ASSERT(0 == uv_is_writable(handle)); - ASSERT(0 == uv_is_readable(handle)); + ASSERT_OK(uv_is_writable(handle)); + ASSERT_OK(uv_is_readable(handle)); uv_close((uv_handle_t*) handle, close_cb); } @@ -65,10 +65,10 @@ static void connect_cb(uv_connect_t* req, int status) { uv_buf_t reset_me; connect_cb_called++; - ASSERT(status == 0); + ASSERT_OK(status); r = uv_read_start((uv_stream_t*) &tcp_client, alloc_cb, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); reset_me = uv_buf_init(reset_me_cmd, sizeof(reset_me_cmd)); @@ -78,26 +78,26 @@ static void connect_cb(uv_connect_t* req, int status) { 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } TEST_IMPL(not_readable_nor_writable_on_read_error) { struct sockaddr_in sa; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &sa)); - ASSERT(0 == uv_loop_init(&loop)); - ASSERT(0 == uv_tcp_init(&loop, &tcp_client)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &sa)); + ASSERT_OK(uv_loop_init(&loop)); + ASSERT_OK(uv_tcp_init(&loop, &tcp_client)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &tcp_client, - (const struct sockaddr*) &sa, - connect_cb)); + ASSERT_OK(uv_tcp_connect(&connect_req, + &tcp_client, + (const struct sockaddr*) &sa, + connect_cb)); - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); - ASSERT(connect_cb_called == 1); - ASSERT(read_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, read_cb_called); + ASSERT_EQ(1, write_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(&loop); return 0; diff --git a/deps/uv/test/test-not-writable-after-shutdown.c b/deps/uv/test/test-not-writable-after-shutdown.c index 84e09177bd3651..066f8bbafebebe 100644 --- a/deps/uv/test/test-not-writable-after-shutdown.c +++ b/deps/uv/test/test-not-writable-after-shutdown.c @@ -34,12 +34,12 @@ static void shutdown_cb(uv_shutdown_t* req, int status) { static void connect_cb(uv_connect_t* req, int status) { int r; - ASSERT(status == 0); + ASSERT_OK(status); r = uv_shutdown(&shutdown_req, req->handle, shutdown_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_is_writable(req->handle)); + ASSERT_OK(uv_is_writable(req->handle)); } TEST_IMPL(not_writable_after_shutdown) { @@ -49,20 +49,20 @@ TEST_IMPL(not_writable_after_shutdown) { uv_tcp_t socket; uv_connect_t connect_req; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); loop = uv_default_loop(); r = uv_tcp_init(loop, &socket); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &socket, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-osx-select.c b/deps/uv/test/test-osx-select.c index 00ae540b405a6c..44e2c6d8dd2e30 100644 --- a/deps/uv/test/test-osx-select.c +++ b/deps/uv/test/test-osx-select.c @@ -62,7 +62,7 @@ TEST_IMPL(osx_select) { } r = uv_tty_init(uv_default_loop(), &tty, fd, 1); - ASSERT(r == 0); + ASSERT_OK(r); uv_read_start((uv_stream_t*) &tty, alloc_cb, read_cb); @@ -72,12 +72,12 @@ TEST_IMPL(osx_select) { "feel pretty happy\n"; for (i = 0, len = strlen(str); i < len; i++) { r = ioctl(fd, TIOCSTI, str + i); - ASSERT(r == 0); + ASSERT_OK(r); } uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(read_count == 3); + ASSERT_EQ(3, read_count); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -97,13 +97,13 @@ TEST_IMPL(osx_select_many_fds) { TEST_FILE_LIMIT(ARRAY_SIZE(tcps) + 100); r = uv_ip4_addr("127.0.0.1", 0, &addr); - ASSERT(r == 0); + ASSERT_OK(r); for (i = 0; i < ARRAY_SIZE(tcps); i++) { r = uv_tcp_init(uv_default_loop(), &tcps[i]); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&tcps[i], (const struct sockaddr *) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_unref((uv_handle_t*) &tcps[i]); } @@ -115,10 +115,10 @@ TEST_IMPL(osx_select_many_fds) { } r = uv_tty_init(uv_default_loop(), &tty, fd, 1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &tty, alloc_cb, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); /* Emulate user-input */ str = "got some input\n" @@ -126,12 +126,12 @@ TEST_IMPL(osx_select_many_fds) { "feel pretty happy\n"; for (i = 0, len = strlen(str); i < len; i++) { r = ioctl(fd, TIOCSTI, str + i); - ASSERT(r == 0); + ASSERT_OK(r); } uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(read_count == 3); + ASSERT_EQ(3, read_count); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-ping-pong.c b/deps/uv/test/test-ping-pong.c index f54f2ad22e59d9..cd9fbf62bba4ae 100644 --- a/deps/uv/test/test-ping-pong.c +++ b/deps/uv/test/test-ping-pong.c @@ -83,7 +83,7 @@ static void pinger_on_close(uv_handle_t* handle) { static void pinger_after_write(uv_write_t* req, int status) { - ASSERT_EQ(status, 0); + ASSERT_OK(status); free(req->data); free(req); } @@ -112,7 +112,7 @@ static void pinger_write_ping(pinger_t* pinger) { req = malloc(sizeof(*req)); ASSERT_NOT_NULL(req); req->data = NULL; - ASSERT_EQ(0, uv_write(req, stream, bufs, nbufs, pinger_after_write)); + ASSERT_OK(uv_write(req, stream, bufs, nbufs, pinger_after_write)); puts("PING"); } @@ -188,7 +188,7 @@ static void ponger_read_cb(uv_stream_t* stream, req = malloc(sizeof(*req)); ASSERT_NOT_NULL(req); req->data = buf->base; - ASSERT_EQ(0, uv_write(req, stream, &writebuf, 1, pinger_after_write)); + ASSERT_OK(uv_write(req, stream, &writebuf, 1, pinger_after_write)); } @@ -197,17 +197,17 @@ static void pinger_on_connect(uv_connect_t* req, int status) { pinger_on_connect_count++; - ASSERT_EQ(status, 0); + ASSERT_OK(status); ASSERT_EQ(1, uv_is_readable(req->handle)); ASSERT_EQ(1, uv_is_writable(req->handle)); - ASSERT_EQ(0, uv_is_closing((uv_handle_t *) req->handle)); + ASSERT_OK(uv_is_closing((uv_handle_t *) req->handle)); pinger_write_ping(pinger); - ASSERT_EQ(0, uv_read_start((uv_stream_t*) req->handle, - alloc_cb, - pinger_read_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*) req->handle, + alloc_cb, + pinger_read_cb)); } @@ -218,7 +218,7 @@ static void tcp_pinger_v6_new(int vectored_writes) { pinger_t* pinger; - ASSERT_EQ(0, uv_ip6_addr("::1", TEST_PORT, &server_addr)); + ASSERT_OK(uv_ip6_addr("::1", TEST_PORT, &server_addr)); pinger = malloc(sizeof(*pinger)); ASSERT_NOT_NULL(pinger); pinger->vectored_writes = vectored_writes; @@ -229,7 +229,7 @@ static void tcp_pinger_v6_new(int vectored_writes) { /* Try to connect to the server and do NUM_PINGS ping-pongs. */ r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp); pinger->stream.tcp.data = pinger; - ASSERT_EQ(0, r); + ASSERT_OK(r); /* We are never doing multiple reads/connects at a time anyway, so these * handles can be pre-initialized. */ @@ -237,10 +237,10 @@ static void tcp_pinger_v6_new(int vectored_writes) { &pinger->stream.tcp, (const struct sockaddr*) &server_addr, pinger_on_connect); - ASSERT_EQ(0, r); + ASSERT_OK(r); /* Synchronous connect callbacks are not allowed. */ - ASSERT_EQ(pinger_on_connect_count, 0); + ASSERT_OK(pinger_on_connect_count); } @@ -249,7 +249,7 @@ static void tcp_pinger_new(int vectored_writes) { struct sockaddr_in server_addr; pinger_t* pinger; - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); pinger = malloc(sizeof(*pinger)); ASSERT_NOT_NULL(pinger); pinger->vectored_writes = vectored_writes; @@ -260,7 +260,7 @@ static void tcp_pinger_new(int vectored_writes) { /* Try to connect to the server and do NUM_PINGS ping-pongs. */ r = uv_tcp_init(uv_default_loop(), &pinger->stream.tcp); pinger->stream.tcp.data = pinger; - ASSERT_EQ(0, r); + ASSERT_OK(r); /* We are never doing multiple reads/connects at a time anyway, so these * handles can be pre-initialized. */ @@ -268,10 +268,10 @@ static void tcp_pinger_new(int vectored_writes) { &pinger->stream.tcp, (const struct sockaddr*) &server_addr, pinger_on_connect); - ASSERT_EQ(0, r); + ASSERT_OK(r); /* Synchronous connect callbacks are not allowed. */ - ASSERT_EQ(pinger_on_connect_count, 0); + ASSERT_OK(pinger_on_connect_count); } @@ -289,7 +289,7 @@ static void pipe_pinger_new(int vectored_writes) { /* Try to connect to the server and do NUM_PINGS ping-pongs. */ r = uv_pipe_init(uv_default_loop(), &pinger->stream.pipe, 0); pinger->stream.pipe.data = pinger; - ASSERT_EQ(0, r); + ASSERT_OK(r); /* We are never doing multiple reads/connects at a time anyway, so these * handles can be pre-initialized. */ @@ -297,7 +297,7 @@ static void pipe_pinger_new(int vectored_writes) { pinger_on_connect); /* Synchronous connect callbacks are not allowed. */ - ASSERT_EQ(pinger_on_connect_count, 0); + ASSERT_OK(pinger_on_connect_count); } @@ -315,31 +315,31 @@ static void socketpair_pinger_new(int vectored_writes) { /* Try to make a socketpair and do NUM_PINGS ping-pongs. */ (void)uv_default_loop(); /* ensure WSAStartup has been performed */ - ASSERT_EQ(0, uv_socketpair(SOCK_STREAM, 0, fds, UV_NONBLOCK_PIPE, UV_NONBLOCK_PIPE)); + ASSERT_OK(uv_socketpair(SOCK_STREAM, 0, fds, UV_NONBLOCK_PIPE, UV_NONBLOCK_PIPE)); #ifndef _WIN32 /* On Windows, this is actually a UV_TCP, but libuv doesn't detect that. */ ASSERT_EQ(uv_guess_handle((uv_file) fds[0]), UV_NAMED_PIPE); ASSERT_EQ(uv_guess_handle((uv_file) fds[1]), UV_NAMED_PIPE); #endif - ASSERT_EQ(0, uv_tcp_init(uv_default_loop(), &pinger->stream.tcp)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &pinger->stream.tcp)); pinger->stream.pipe.data = pinger; - ASSERT_EQ(0, uv_tcp_open(&pinger->stream.tcp, fds[1])); + ASSERT_OK(uv_tcp_open(&pinger->stream.tcp, fds[1])); ponger = malloc(sizeof(*ponger)); ASSERT_NOT_NULL(ponger); ponger->data = NULL; - ASSERT_EQ(0, uv_tcp_init(uv_default_loop(), ponger)); - ASSERT_EQ(0, uv_tcp_open(ponger, fds[0])); + ASSERT_OK(uv_tcp_init(uv_default_loop(), ponger)); + ASSERT_OK(uv_tcp_open(ponger, fds[0])); pinger_write_ping(pinger); - ASSERT_EQ(0, uv_read_start((uv_stream_t*) &pinger->stream.tcp, - alloc_cb, - pinger_read_cb)); - ASSERT_EQ(0, uv_read_start((uv_stream_t*) ponger, - alloc_cb, - ponger_read_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*) &pinger->stream.tcp, + alloc_cb, + pinger_read_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*) ponger, + alloc_cb, + ponger_read_cb)); } @@ -349,14 +349,14 @@ static void pipe2_pinger_new(int vectored_writes) { uv_pipe_t* ponger; /* Try to make a pipe and do NUM_PINGS pings. */ - ASSERT_EQ(0, uv_pipe(fds, UV_NONBLOCK_PIPE, UV_NONBLOCK_PIPE)); + ASSERT_OK(uv_pipe(fds, UV_NONBLOCK_PIPE, UV_NONBLOCK_PIPE)); ASSERT_EQ(uv_guess_handle(fds[0]), UV_NAMED_PIPE); ASSERT_EQ(uv_guess_handle(fds[1]), UV_NAMED_PIPE); ponger = malloc(sizeof(*ponger)); ASSERT_NOT_NULL(ponger); - ASSERT_EQ(0, uv_pipe_init(uv_default_loop(), ponger, 0)); - ASSERT_EQ(0, uv_pipe_open(ponger, fds[0])); + ASSERT_OK(uv_pipe_init(uv_default_loop(), ponger, 0)); + ASSERT_OK(uv_pipe_open(ponger, fds[0])); pinger = malloc(sizeof(*pinger)); ASSERT_NOT_NULL(pinger); @@ -364,19 +364,19 @@ static void pipe2_pinger_new(int vectored_writes) { pinger->state = 0; pinger->pongs = 0; pinger->pong = PING; - ASSERT_EQ(0, uv_pipe_init(uv_default_loop(), &pinger->stream.pipe, 0)); - ASSERT_EQ(0, uv_pipe_open(&pinger->stream.pipe, fds[1])); + ASSERT_OK(uv_pipe_init(uv_default_loop(), &pinger->stream.pipe, 0)); + ASSERT_OK(uv_pipe_open(&pinger->stream.pipe, fds[1])); pinger->stream.pipe.data = pinger; /* record for close_cb */ ponger->data = pinger; /* record for read_cb */ pinger_write_ping(pinger); - ASSERT_EQ(0, uv_read_start((uv_stream_t*) ponger, alloc_cb, pinger_read_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*) ponger, alloc_cb, pinger_read_cb)); } static int run_ping_pong_test(void) { uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(completed_pingers, 1); + ASSERT_EQ(1, completed_pingers); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-pipe-bind-error.c b/deps/uv/test/test-pipe-bind-error.c index f8626302a1d899..381a0084dec2cc 100644 --- a/deps/uv/test/test-pipe-bind-error.c +++ b/deps/uv/test/test-pipe-bind-error.c @@ -46,26 +46,26 @@ TEST_IMPL(pipe_bind_error_addrinuse) { int r; r = uv_pipe_init(uv_default_loop(), &server1, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_bind(&server1, TEST_PIPENAME); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_init(uv_default_loop(), &server2, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_bind(&server2, TEST_PIPENAME); - ASSERT(r == UV_EADDRINUSE); + ASSERT_EQ(r, UV_EADDRINUSE); r = uv_listen((uv_stream_t*)&server1, SOMAXCONN, NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server2, SOMAXCONN, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_close((uv_handle_t*)&server1, close_cb); uv_close((uv_handle_t*)&server2, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 2); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -77,16 +77,16 @@ TEST_IMPL(pipe_bind_error_addrnotavail) { int r; r = uv_pipe_init(uv_default_loop(), &server, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_bind(&server, BAD_PIPENAME); - ASSERT(r == UV_EACCES); + ASSERT_EQ(r, UV_EACCES); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -98,17 +98,17 @@ TEST_IMPL(pipe_bind_error_inval) { int r; r = uv_pipe_init(uv_default_loop(), &server, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_bind(&server, TEST_PIPENAME); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_bind(&server, TEST_PIPENAME_2); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -123,16 +123,16 @@ TEST_IMPL(pipe_listen_without_bind) { int r; r = uv_pipe_init(uv_default_loop(), &server, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server, SOMAXCONN, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -141,14 +141,14 @@ TEST_IMPL(pipe_listen_without_bind) { TEST_IMPL(pipe_bind_or_listen_error_after_close) { uv_pipe_t server; - ASSERT_EQ(uv_pipe_init(uv_default_loop(), &server, 0), 0); + ASSERT_OK(uv_pipe_init(uv_default_loop(), &server, 0)); uv_close((uv_handle_t*) &server, NULL); ASSERT_EQ(uv_pipe_bind(&server, TEST_PIPENAME), UV_EINVAL); ASSERT_EQ(uv_listen((uv_stream_t*) &server, SOMAXCONN, NULL), UV_EINVAL); - ASSERT_EQ(uv_run(uv_default_loop(), UV_RUN_DEFAULT), 0); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-pipe-close-stdout-read-stdin.c b/deps/uv/test/test-pipe-close-stdout-read-stdin.c index a9295f0aa59f62..51bbf0f54e23d5 100644 --- a/deps/uv/test/test-pipe-close-stdout-read-stdin.c +++ b/deps/uv/test/test-pipe-close-stdout-read-stdin.c @@ -61,7 +61,7 @@ TEST_IMPL(pipe_close_stdout_read_stdin) { uv_pipe_t stdin_pipe; r = pipe(fd); - ASSERT(r == 0); + ASSERT_OK(r); #if defined(__APPLE__) && (TARGET_OS_TV || TARGET_OS_WATCH) pid = -1; @@ -80,24 +80,24 @@ TEST_IMPL(pipe_close_stdout_read_stdin) { ASSERT(-1 <= r && r <= 1); close(0); r = dup(fd[0]); - ASSERT(r != -1); + ASSERT_NE(r, -1); /* Create a stream that reads from the pipe. */ r = uv_pipe_init(uv_default_loop(), (uv_pipe_t *)&stdin_pipe, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_open((uv_pipe_t *)&stdin_pipe, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t *)&stdin_pipe, alloc_buffer, read_stdin); - ASSERT(r == 0); + ASSERT_OK(r); /* * Because the other end of the pipe was closed, there should * be no event left to process after one run of the event loop. * Otherwise, it means that events were not processed correctly. */ - ASSERT(uv_run(uv_default_loop(), UV_RUN_NOWAIT) == 0); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_NOWAIT)); } else { /* * Close both ends of the pipe so that the child diff --git a/deps/uv/test/test-pipe-connect-error.c b/deps/uv/test/test-pipe-connect-error.c index 140e7d32dafc44..ee6e0776f3371e 100644 --- a/deps/uv/test/test-pipe-connect-error.c +++ b/deps/uv/test/test-pipe-connect-error.c @@ -64,13 +64,13 @@ TEST_IMPL(pipe_connect_bad_name) { int r; r = uv_pipe_init(uv_default_loop(), &client, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_pipe_connect(&req, &client, BAD_PIPENAME, connect_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(close_cb_called, 1); - ASSERT_EQ(connect_cb_called, 1); + ASSERT_EQ(1, close_cb_called); + ASSERT_EQ(1, connect_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -84,13 +84,13 @@ TEST_IMPL(pipe_connect_to_file) { int r; r = uv_pipe_init(uv_default_loop(), &client, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_pipe_connect(&req, &client, path, connect_cb_file); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(close_cb_called, 1); - ASSERT_EQ(connect_cb_called, 1); + ASSERT_EQ(1, close_cb_called); + ASSERT_EQ(1, connect_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-pipe-connect-multiple.c b/deps/uv/test/test-pipe-connect-multiple.c index b8f417e81caff0..69a09ec6cddad9 100644 --- a/deps/uv/test/test-pipe-connect-multiple.c +++ b/deps/uv/test/test-pipe-connect-multiple.c @@ -44,14 +44,14 @@ static uv_pipe_t connections[NUM_CLIENTS]; static void connection_cb(uv_stream_t* server, int status) { int r; uv_pipe_t* conn; - ASSERT(status == 0); + ASSERT_OK(status); conn = &connections[connection_cb_called]; r = uv_pipe_init(server->loop, conn, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_accept(server, (uv_stream_t*)conn); - ASSERT(r == 0); + ASSERT_OK(r); if (++connection_cb_called == NUM_CLIENTS && connect_cb_called == NUM_CLIENTS) { @@ -61,7 +61,7 @@ static void connection_cb(uv_stream_t* server, int status) { static void connect_cb(uv_connect_t* connect_req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); if (++connect_cb_called == NUM_CLIENTS && connection_cb_called == NUM_CLIENTS) { uv_stop(connect_req->handle->loop); @@ -80,17 +80,17 @@ TEST_IMPL(pipe_connect_multiple) { loop = uv_default_loop(); r = uv_pipe_init(loop, &server_handle, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_bind(&server_handle, TEST_PIPENAME); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server_handle, 128, connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); for (i = 0; i < NUM_CLIENTS; i++) { r = uv_pipe_init(loop, &clients[i].pipe_handle, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_pipe_connect(&clients[i].conn_req, &clients[i].pipe_handle, TEST_PIPENAME, @@ -99,8 +99,8 @@ TEST_IMPL(pipe_connect_multiple) { uv_run(loop, UV_RUN_DEFAULT); - ASSERT(connection_cb_called == NUM_CLIENTS); - ASSERT(connect_cb_called == NUM_CLIENTS); + ASSERT_EQ(connection_cb_called, NUM_CLIENTS); + ASSERT_EQ(connect_cb_called, NUM_CLIENTS); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -110,14 +110,14 @@ TEST_IMPL(pipe_connect_multiple) { static void connection_cb2(uv_stream_t* server, int status) { int r; uv_pipe_t* conn; - ASSERT_EQ(status, 0); + ASSERT_OK(status); conn = &connections[connection_cb_called]; r = uv_pipe_init(server->loop, conn, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_accept(server, (uv_stream_t*)conn); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_close((uv_handle_t*)conn, NULL); if (++connection_cb_called == NUM_CLIENTS && @@ -146,17 +146,17 @@ TEST_IMPL(pipe_connect_close_multiple) { loop = uv_default_loop(); r = uv_pipe_init(loop, &server_handle, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_pipe_bind(&server_handle, TEST_PIPENAME); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server_handle, 128, connection_cb2); - ASSERT_EQ(r, 0); + ASSERT_OK(r); for (i = 0; i < NUM_CLIENTS; i++) { r = uv_pipe_init(loop, &clients[i].pipe_handle, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_pipe_connect(&clients[i].conn_req, &clients[i].pipe_handle, TEST_PIPENAME, diff --git a/deps/uv/test/test-pipe-connect-prepare.c b/deps/uv/test/test-pipe-connect-prepare.c index f7a79404048c15..93d15a473f3ff8 100644 --- a/deps/uv/test/test-pipe-connect-prepare.c +++ b/deps/uv/test/test-pipe-connect-prepare.c @@ -48,7 +48,7 @@ static void close_cb(uv_handle_t* handle) { static void connect_cb(uv_connect_t* connect_req, int status) { - ASSERT(status == UV_ENOENT); + ASSERT_EQ(status, UV_ENOENT); connect_cb_called++; uv_close((uv_handle_t*)&prepare_handle, close_cb); uv_close((uv_handle_t*)&pipe_handle, close_cb); @@ -56,7 +56,7 @@ static void connect_cb(uv_connect_t* connect_req, int status) { static void prepare_cb(uv_prepare_t* handle) { - ASSERT(handle == &prepare_handle); + ASSERT_PTR_EQ(handle, &prepare_handle); uv_pipe_connect(&conn_req, &pipe_handle, BAD_PIPENAME, connect_cb); } @@ -65,18 +65,18 @@ TEST_IMPL(pipe_connect_on_prepare) { int r; r = uv_pipe_init(uv_default_loop(), &pipe_handle, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_prepare_init(uv_default_loop(), &prepare_handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_prepare_start(&prepare_handle, prepare_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 2); - ASSERT(connect_cb_called == 1); + ASSERT_EQ(2, close_cb_called); + ASSERT_EQ(1, connect_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-pipe-getsockname.c b/deps/uv/test/test-pipe-getsockname.c index d749933d44f6f0..eb09d88fd2b3a5 100644 --- a/deps/uv/test/test-pipe-getsockname.c +++ b/deps/uv/test/test-pipe-getsockname.c @@ -40,8 +40,8 @@ static int pipe_client_connect_cb_called = 0; static void pipe_close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*) &pipe_client || - handle == (uv_handle_t*) &pipe_server); + ASSERT_NE(handle == (uv_handle_t*) &pipe_client || + handle == (uv_handle_t*) &pipe_server, 0); pipe_close_cb_called++; } @@ -51,12 +51,12 @@ static void pipe_client_connect_cb(uv_connect_t* req, int status) { size_t len; int r; - ASSERT(req == &connect_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &connect_req); + ASSERT_OK(status); len = sizeof buf; r = uv_pipe_getpeername(&pipe_client, buf, &len); - ASSERT(r == 0); + ASSERT_OK(r); if (*buf == '\0') { /* Linux abstract socket. */ const char expected[] = "\0" TEST_PIPENAME; @@ -82,7 +82,7 @@ static void pipe_server_connection_cb(uv_stream_t* handle, int status) { /* This function *may* be called, depending on whether accept or the * connection callback is called first. */ - ASSERT(status == 0); + ASSERT_OK(status); } @@ -99,44 +99,44 @@ TEST_IMPL(pipe_getsockname) { ASSERT_NOT_NULL(loop); r = uv_pipe_init(loop, &pipe_server, 0); - ASSERT(r == 0); + ASSERT_OK(r); len = sizeof buf; r = uv_pipe_getsockname(&pipe_server, buf, &len); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); len = sizeof buf; r = uv_pipe_getpeername(&pipe_server, buf, &len); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); r = uv_pipe_bind(&pipe_server, TEST_PIPENAME); - ASSERT(r == 0); + ASSERT_OK(r); len = sizeof buf; r = uv_pipe_getsockname(&pipe_server, buf, &len); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(buf[len - 1] != 0); - ASSERT(buf[len] == '\0'); - ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0); + ASSERT_NE(0, buf[len - 1]); + ASSERT_EQ(buf[len], '\0'); + ASSERT_OK(memcmp(buf, TEST_PIPENAME, len)); len = sizeof buf; r = uv_pipe_getpeername(&pipe_server, buf, &len); - ASSERT(r == UV_ENOTCONN); + ASSERT_EQ(r, UV_ENOTCONN); r = uv_listen((uv_stream_t*) &pipe_server, 0, pipe_server_connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_init(loop, &pipe_client, 0); - ASSERT(r == 0); + ASSERT_OK(r); len = sizeof buf; r = uv_pipe_getsockname(&pipe_client, buf, &len); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); len = sizeof buf; r = uv_pipe_getpeername(&pipe_client, buf, &len); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); uv_pipe_connect(&connect_req, &pipe_client, TEST_PIPENAME, pipe_client_connect_cb); @@ -146,15 +146,15 @@ TEST_IMPL(pipe_getsockname) { len = sizeof buf; r = uv_pipe_getpeername(&pipe_client, buf, &len); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(buf[len - 1] != 0); - ASSERT(memcmp(buf, TEST_PIPENAME, len) == 0); + ASSERT_NE(0, buf[len - 1]); + ASSERT_OK(memcmp(buf, TEST_PIPENAME, len)); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(pipe_client_connect_cb_called == 1); - ASSERT(pipe_close_cb_called == 2); + ASSERT_OK(r); + ASSERT_EQ(1, pipe_client_connect_cb_called); + ASSERT_EQ(2, pipe_close_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -218,50 +218,50 @@ TEST_IMPL(pipe_getsockname_blocking) { int r; r = CreatePipe(&readh, &writeh, NULL, 65536); - ASSERT(r != 0); + ASSERT(r); r = uv_pipe_init(uv_default_loop(), &pipe_client, 0); - ASSERT(r == 0); + ASSERT_OK(r); readfd = _open_osfhandle((intptr_t)readh, _O_RDONLY); - ASSERT(r != -1); + ASSERT_NE(r, -1); r = uv_pipe_open(&pipe_client, readfd); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &pipe_client, (uv_alloc_cb) abort, (uv_read_cb) abort); - ASSERT(r == 0); + ASSERT_OK(r); Sleep(100); r = uv_read_stop((uv_stream_t*)&pipe_client); - ASSERT(r == 0); + ASSERT_OK(r); len1 = sizeof buf1; r = uv_pipe_getsockname(&pipe_client, buf1, &len1); - ASSERT(r == 0); - ASSERT(len1 == 0); /* It's an annonymous pipe. */ + ASSERT_OK(r); + ASSERT_OK(len1); /* It's an annonymous pipe. */ r = uv_read_start((uv_stream_t*)&pipe_client, (uv_alloc_cb) abort, (uv_read_cb) abort); - ASSERT(r == 0); + ASSERT_OK(r); Sleep(100); len2 = sizeof buf2; r = uv_pipe_getsockname(&pipe_client, buf2, &len2); - ASSERT(r == 0); - ASSERT(len2 == 0); /* It's an annonymous pipe. */ + ASSERT_OK(r); + ASSERT_OK(len2); /* It's an annonymous pipe. */ r = uv_read_stop((uv_stream_t*)&pipe_client); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(len1 == len2); - ASSERT(memcmp(buf1, buf2, len1) == 0); + ASSERT_EQ(len1, len2); + ASSERT_OK(memcmp(buf1, buf2, len1)); pipe_close_cb_called = 0; uv_close((uv_handle_t*)&pipe_client, pipe_close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(pipe_close_cb_called == 1); + ASSERT_EQ(1, pipe_close_cb_called); CloseHandle(writeh); #endif diff --git a/deps/uv/test/test-pipe-pending-instances.c b/deps/uv/test/test-pipe-pending-instances.c index 9b1bfbc9aaccc4..570ecd69b734f7 100644 --- a/deps/uv/test/test-pipe-pending-instances.c +++ b/deps/uv/test/test-pipe-pending-instances.c @@ -37,22 +37,22 @@ TEST_IMPL(pipe_pending_instances) { loop = uv_default_loop(); r = uv_pipe_init(loop, &pipe_handle, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_pipe_pending_instances(&pipe_handle, 8); r = uv_pipe_bind(&pipe_handle, TEST_PIPENAME); - ASSERT(r == 0); + ASSERT_OK(r); uv_pipe_pending_instances(&pipe_handle, 16); r = uv_listen((uv_stream_t*)&pipe_handle, 128, connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*)&pipe_handle, NULL); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-pipe-sendmsg.c b/deps/uv/test/test-pipe-sendmsg.c index 7758b65b05cff9..3958b05378ca2c 100644 --- a/deps/uv/test/test-pipe-sendmsg.c +++ b/deps/uv/test/test-pipe-sendmsg.c @@ -45,12 +45,12 @@ static void set_nonblocking(uv_os_sock_t sock) { #ifdef _WIN32 unsigned long on = 1; r = ioctlsocket(sock, FIONBIO, &on); - ASSERT(r == 0); + ASSERT_OK(r); #else int flags = fcntl(sock, F_GETFL, 0); - ASSERT(flags >= 0); + ASSERT_GE(flags, 0); r = fcntl(sock, F_SETFL, flags | O_NONBLOCK); - ASSERT(r >= 0); + ASSERT_GE(r, 0); #endif } @@ -79,22 +79,22 @@ static void read_cb(uv_stream_t* handle, unsigned int i; p = (uv_pipe_t*) handle; - ASSERT(nread >= 0); + ASSERT_GE(nread, 0); while (uv_pipe_pending_count(p) != 0) { pending = uv_pipe_pending_type(p); - ASSERT(pending == UV_NAMED_PIPE); + ASSERT_EQ(pending, UV_NAMED_PIPE); - ASSERT(incoming_count < ARRAY_SIZE(incoming)); + ASSERT_LT(incoming_count, ARRAY_SIZE(incoming)); inc = &incoming[incoming_count++]; - ASSERT(0 == uv_pipe_init(p->loop, inc, 0)); - ASSERT(0 == uv_accept(handle, (uv_stream_t*) inc)); + ASSERT_OK(uv_pipe_init(p->loop, inc, 0)); + ASSERT_OK(uv_accept(handle, (uv_stream_t*) inc)); } if (incoming_count != ARRAY_SIZE(incoming)) return; - ASSERT(0 == uv_read_stop((uv_stream_t*) p)); + ASSERT_OK(uv_read_stop((uv_stream_t*) p)); uv_close((uv_handle_t*) p, close_cb); for (i = 0; i < ARRAY_SIZE(incoming); i++) uv_close((uv_handle_t*) &incoming[i], close_cb); @@ -115,12 +115,12 @@ TEST_IMPL(pipe_sendmsg) { unsigned int i; uv_buf_t buf; - ASSERT(0 == socketpair(AF_UNIX, SOCK_STREAM, 0, fds)); + ASSERT_OK(socketpair(AF_UNIX, SOCK_STREAM, 0, fds)); for (i = 0; i < ARRAY_SIZE(send_fds); i += 2) - ASSERT(0 == socketpair(AF_UNIX, SOCK_STREAM, 0, send_fds + i)); - ASSERT(i == ARRAY_SIZE(send_fds)); - ASSERT(0 == uv_pipe_init(uv_default_loop(), &p, 1)); - ASSERT(0 == uv_pipe_open(&p, fds[1])); + ASSERT_OK(socketpair(AF_UNIX, SOCK_STREAM, 0, send_fds + i)); + ASSERT_EQ(i, ARRAY_SIZE(send_fds)); + ASSERT_OK(uv_pipe_init(uv_default_loop(), &p, 1)); + ASSERT_OK(uv_pipe_open(&p, fds[1])); buf = uv_buf_init("X", 1); memset(&msg, 0, sizeof(msg)); @@ -130,7 +130,7 @@ TEST_IMPL(pipe_sendmsg) { msg.msg_control = (void*) scratch; msg.msg_controllen = CMSG_LEN(sizeof(send_fds)); - ASSERT(sizeof(scratch) >= msg.msg_controllen); + ASSERT_GE(sizeof(scratch), msg.msg_controllen); cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_level = SOL_SOCKET; @@ -146,16 +146,16 @@ TEST_IMPL(pipe_sendmsg) { } set_nonblocking(fds[1]); - ASSERT(0 == uv_read_start((uv_stream_t*) &p, alloc_cb, read_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*) &p, alloc_cb, read_cb)); do r = sendmsg(fds[0], &msg, 0); while (r == -1 && errno == EINTR); - ASSERT(r == 1); + ASSERT_EQ(1, r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(ARRAY_SIZE(incoming) == incoming_count); - ASSERT(ARRAY_SIZE(incoming) + 1 == close_called); + ASSERT_EQ(ARRAY_SIZE(incoming), incoming_count); + ASSERT_EQ(ARRAY_SIZE(incoming) + 1, close_called); close(fds[0]); MAKE_VALGRIND_HAPPY(uv_default_loop()); diff --git a/deps/uv/test/test-pipe-server-close.c b/deps/uv/test/test-pipe-server-close.c index dc20661916d889..ad7d792acc3865 100644 --- a/deps/uv/test/test-pipe-server-close.c +++ b/deps/uv/test/test-pipe-server-close.c @@ -35,15 +35,15 @@ static int pipe_client_connect_cb_called = 0; static void pipe_close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*) &pipe_client || - handle == (uv_handle_t*) &pipe_server); + ASSERT_NE(handle == (uv_handle_t*) &pipe_client || + handle == (uv_handle_t*) &pipe_server, 0); pipe_close_cb_called++; } static void pipe_client_connect_cb(uv_connect_t* req, int status) { - ASSERT(req == &connect_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &connect_req); + ASSERT_OK(status); pipe_client_connect_cb_called++; @@ -56,7 +56,7 @@ static void pipe_server_connection_cb(uv_stream_t* handle, int status) { /* This function *may* be called, depending on whether accept or the * connection callback is called first. */ - ASSERT(status == 0); + ASSERT_OK(status); } @@ -71,23 +71,23 @@ TEST_IMPL(pipe_server_close) { ASSERT_NOT_NULL(loop); r = uv_pipe_init(loop, &pipe_server, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_bind(&pipe_server, TEST_PIPENAME); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*) &pipe_server, 0, pipe_server_connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_init(loop, &pipe_client, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_pipe_connect(&connect_req, &pipe_client, TEST_PIPENAME, pipe_client_connect_cb); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(pipe_client_connect_cb_called == 1); - ASSERT(pipe_close_cb_called == 2); + ASSERT_OK(r); + ASSERT_EQ(1, pipe_client_connect_cb_called); + ASSERT_EQ(2, pipe_close_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-pipe-set-fchmod.c b/deps/uv/test/test-pipe-set-fchmod.c index 402970e3da9922..9563e4fdd50f54 100644 --- a/deps/uv/test/test-pipe-set-fchmod.c +++ b/deps/uv/test/test-pipe-set-fchmod.c @@ -35,10 +35,10 @@ TEST_IMPL(pipe_set_chmod) { loop = uv_default_loop(); r = uv_pipe_init(loop, &pipe_handle, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_bind(&pipe_handle, TEST_PIPENAME); - ASSERT(r == 0); + ASSERT_OK(r); /* No easy way to test if this works, we will only make sure that the call is * successful. */ @@ -47,17 +47,17 @@ TEST_IMPL(pipe_set_chmod) { MAKE_VALGRIND_HAPPY(loop); RETURN_SKIP("Insufficient privileges to alter pipe fmode"); } - ASSERT(r == 0); + ASSERT_OK(r); #ifndef _WIN32 memset(&stat_buf, 0, sizeof(stat_buf)); - ASSERT_EQ(0, stat(TEST_PIPENAME, &stat_buf)); + ASSERT_OK(stat(TEST_PIPENAME, &stat_buf)); ASSERT(stat_buf.st_mode & S_IRUSR); ASSERT(stat_buf.st_mode & S_IRGRP); ASSERT(stat_buf.st_mode & S_IROTH); #endif r = uv_pipe_chmod(&pipe_handle, UV_WRITABLE); - ASSERT(r == 0); + ASSERT_OK(r); #ifndef _WIN32 stat(TEST_PIPENAME, &stat_buf); ASSERT(stat_buf.st_mode & S_IWUSR); @@ -66,7 +66,7 @@ TEST_IMPL(pipe_set_chmod) { #endif r = uv_pipe_chmod(&pipe_handle, UV_WRITABLE | UV_READABLE); - ASSERT(r == 0); + ASSERT_OK(r); #ifndef _WIN32 stat(TEST_PIPENAME, &stat_buf); ASSERT(stat_buf.st_mode & S_IRUSR); @@ -78,14 +78,14 @@ TEST_IMPL(pipe_set_chmod) { #endif r = uv_pipe_chmod(NULL, UV_WRITABLE | UV_READABLE); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); r = uv_pipe_chmod(&pipe_handle, 12345678); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_close((uv_handle_t*)&pipe_handle, NULL); r = uv_pipe_chmod(&pipe_handle, UV_WRITABLE | UV_READABLE); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-pipe-set-non-blocking.c b/deps/uv/test/test-pipe-set-non-blocking.c index 1b90bca3d2ab90..bf1c284189ffce 100644 --- a/deps/uv/test/test-pipe-set-non-blocking.c +++ b/deps/uv/test/test-pipe-set-non-blocking.c @@ -46,13 +46,13 @@ static void thread_main(void* arg) { uv_fs_req_cleanup(&req); } while (n > 0 || (n == -1 && uv_errno == UV_EINTR)); - ASSERT(n == 0); + ASSERT_OK(n); } #ifdef _WIN32 static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); req->handle = NULL; /* signal completion of write_cb */ } #endif @@ -77,15 +77,15 @@ TEST_IMPL(pipe_set_non_blocking) { uv_write_t write_req; #endif - ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0)); - ASSERT(0 == uv_pipe(fd, 0, 0)); - ASSERT(0 == uv_pipe_open(&pipe_handle, fd[1])); - ASSERT(0 == uv_stream_set_blocking((uv_stream_t*) &pipe_handle, 1)); + ASSERT_OK(uv_pipe_init(uv_default_loop(), &pipe_handle, 0)); + ASSERT_OK(uv_pipe(fd, 0, 0)); + ASSERT_OK(uv_pipe_open(&pipe_handle, fd[1])); + ASSERT_OK(uv_stream_set_blocking((uv_stream_t*) &pipe_handle, 1)); fd[1] = -1; /* fd[1] is owned by pipe_handle now. */ ctx.fd = fd[0]; - ASSERT(0 == uv_barrier_init(&ctx.barrier, 2)); - ASSERT(0 == uv_thread_create(&thread, thread_main, &ctx)); + ASSERT_OK(uv_barrier_init(&ctx.barrier, 2)); + ASSERT_OK(uv_thread_create(&thread, thread_main, &ctx)); uv_barrier_wait(&ctx.barrier); buf.len = sizeof(data); @@ -99,25 +99,29 @@ TEST_IMPL(pipe_set_non_blocking) { */ n = uv_try_write((uv_stream_t*) &pipe_handle, &buf, 1); #ifdef _WIN32 - ASSERT(n == UV_EAGAIN); /* E_NOTIMPL */ - ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &pipe_handle, &buf, 1, write_cb)); + ASSERT_EQ(n, UV_EAGAIN); /* E_NOTIMPL */ + ASSERT_OK(uv_write(&write_req, + (uv_stream_t*) &pipe_handle, + &buf, + 1, + write_cb)); ASSERT_NOT_NULL(write_req.handle); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_ONCE)); ASSERT_NULL(write_req.handle); /* check for signaled completion of write_cb */ n = buf.len; #endif - ASSERT(n == sizeof(data)); + ASSERT_EQ(n, sizeof(data)); nwritten += n; } uv_close((uv_handle_t*) &pipe_handle, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); #ifdef _WIN32 - ASSERT(0 == _close(fd[0])); /* fd[1] is closed by uv_close(). */ + ASSERT_OK(_close(fd[0])); /* fd[1] is closed by uv_close(). */ #else - ASSERT(0 == close(fd[0])); /* fd[1] is closed by uv_close(). */ + ASSERT_OK(close(fd[0])); /* fd[1] is closed by uv_close(). */ #endif fd[0] = -1; uv_barrier_destroy(&ctx.barrier); diff --git a/deps/uv/test/test-platform-output.c b/deps/uv/test/test-platform-output.c index 5839f52dfe5885..f18e097f913607 100644 --- a/deps/uv/test/test-platform-output.c +++ b/deps/uv/test/test-platform-output.c @@ -44,37 +44,37 @@ TEST_IMPL(platform_output) { int err; err = uv_get_process_title(buffer, sizeof(buffer)); - ASSERT(err == 0); + ASSERT_OK(err); printf("uv_get_process_title: %s\n", buffer); size = sizeof(buffer); err = uv_cwd(buffer, &size); - ASSERT(err == 0); + ASSERT_OK(err); printf("uv_cwd: %s\n", buffer); err = uv_resident_set_memory(&rss); #if defined(__MSYS__) - ASSERT(err == UV_ENOSYS); + ASSERT_EQ(err, UV_ENOSYS); #else - ASSERT(err == 0); + ASSERT_OK(err); printf("uv_resident_set_memory: %llu\n", (unsigned long long) rss); #endif err = uv_uptime(&uptime); #if defined(__PASE__) - ASSERT(err == UV_ENOSYS); + ASSERT_EQ(err, UV_ENOSYS); #else - ASSERT(err == 0); - ASSERT(uptime > 0); + ASSERT_OK(err); + ASSERT_GT(uptime, 0); printf("uv_uptime: %f\n", uptime); #endif err = uv_getrusage(&rusage); - ASSERT(err == 0); - ASSERT(rusage.ru_utime.tv_sec >= 0); - ASSERT(rusage.ru_utime.tv_usec >= 0); - ASSERT(rusage.ru_stime.tv_sec >= 0); - ASSERT(rusage.ru_stime.tv_usec >= 0); + ASSERT_OK(err); + ASSERT_GE(rusage.ru_utime.tv_sec, 0); + ASSERT_GE(rusage.ru_utime.tv_usec, 0); + ASSERT_GE(rusage.ru_stime.tv_sec, 0); + ASSERT_GE(rusage.ru_stime.tv_usec, 0); printf("uv_getrusage:\n"); printf(" user: %llu sec %llu microsec\n", (unsigned long long) rusage.ru_utime.tv_sec, @@ -92,9 +92,9 @@ TEST_IMPL(platform_output) { err = uv_cpu_info(&cpus, &count); #if defined(__CYGWIN__) || defined(__MSYS__) - ASSERT(err == UV_ENOSYS); + ASSERT_EQ(err, UV_ENOSYS); #else - ASSERT(err == 0); + ASSERT_OK(err); printf("uv_cpu_info:\n"); for (i = 0; i < count; i++) { @@ -113,7 +113,7 @@ TEST_IMPL(platform_output) { uv_free_cpu_info(cpus, count); err = uv_interface_addresses(&interfaces, &count); - ASSERT(err == 0); + ASSERT_OK(err); printf("uv_interface_addresses:\n"); for (i = 0; i < count; i++) { @@ -149,7 +149,7 @@ TEST_IMPL(platform_output) { uv_free_interface_addresses(interfaces, count); err = uv_os_get_passwd(&pwd); - ASSERT_EQ(err, 0); + ASSERT_OK(err); err = uv_os_get_group(&grp, pwd.gid); #if defined(_WIN32) @@ -159,7 +159,7 @@ TEST_IMPL(platform_output) { (void) member; grp.groupname = "ENOTSUP"; #else - ASSERT_EQ(err, 0); + ASSERT_OK(err); ASSERT_EQ(pwd.gid, grp.gid); #endif @@ -183,14 +183,14 @@ TEST_IMPL(platform_output) { #endif pid = uv_os_getpid(); - ASSERT(pid > 0); + ASSERT_GT(pid, 0); printf("uv_os_getpid: %d\n", (int) pid); ppid = uv_os_getppid(); - ASSERT(ppid > 0); + ASSERT_GT(ppid, 0); printf("uv_os_getppid: %d\n", (int) ppid); err = uv_os_uname(&uname); - ASSERT(err == 0); + ASSERT_OK(err); printf("uv_os_uname:\n"); printf(" sysname: %s\n", uname.sysname); printf(" release: %s\n", uname.release); diff --git a/deps/uv/test/test-poll-close-doesnt-corrupt-stack.c b/deps/uv/test/test-poll-close-doesnt-corrupt-stack.c index a19f42769b5788..0acb452a78bcad 100644 --- a/deps/uv/test/test-poll-close-doesnt-corrupt-stack.c +++ b/deps/uv/test/test-poll-close-doesnt-corrupt-stack.c @@ -59,12 +59,12 @@ static void NO_INLINE close_socket_and_verify_stack(void) { data[i] = MARKER; r = closesocket(sock); - ASSERT(r == 0); + ASSERT_OK(r); uv_sleep(VERIFY_AFTER); for (i = 0; i < ARRAY_SIZE(data); i++) - ASSERT(data[i] == MARKER); + ASSERT_EQ(data[i], MARKER); } #endif @@ -79,34 +79,34 @@ TEST_IMPL(poll_close_doesnt_corrupt_stack) { struct sockaddr_in addr; r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); + ASSERT_OK(r); sock = socket(AF_INET, SOCK_STREAM, 0); - ASSERT(sock != INVALID_SOCKET); + ASSERT_NE(sock, INVALID_SOCKET); on = 1; r = ioctlsocket(sock, FIONBIO, &on); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_ip4_addr("127.0.0.1", TEST_PORT, &addr); - ASSERT(r == 0); + ASSERT_OK(r); r = connect(sock, (const struct sockaddr*) &addr, sizeof addr); - ASSERT(r != 0); - ASSERT(WSAGetLastError() == WSAEWOULDBLOCK); + ASSERT(r); + ASSERT_EQ(WSAGetLastError(), WSAEWOULDBLOCK); r = uv_poll_init_socket(uv_default_loop(), &handle, sock); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_poll_start(&handle, UV_READABLE | UV_WRITABLE, poll_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &handle, close_cb); close_socket_and_verify_stack(); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-poll-close.c b/deps/uv/test/test-poll-close.c index b4ad4c7834674b..5843bf4516d282 100644 --- a/deps/uv/test/test-poll-close.c +++ b/deps/uv/test/test-poll-close.c @@ -50,7 +50,7 @@ TEST_IMPL(poll_close) { { struct WSAData wsa_data; int r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); + ASSERT_OK(r); } #endif @@ -66,7 +66,7 @@ TEST_IMPL(poll_close) { uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == NUM_SOCKETS); + ASSERT_EQ(close_cb_called, NUM_SOCKETS); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-poll-closesocket.c b/deps/uv/test/test-poll-closesocket.c index a81d0b09ff8d0d..01f8f7410189f4 100644 --- a/deps/uv/test/test-poll-closesocket.c +++ b/deps/uv/test/test-poll-closesocket.c @@ -39,11 +39,11 @@ static void close_cb(uv_handle_t* h) { static void poll_cb(uv_poll_t* h, int status, int events) { int r; - ASSERT(status == 0); - ASSERT(h == &handle); + ASSERT_OK(status); + ASSERT_PTR_EQ(h, &handle); r = uv_poll_start(&handle, UV_READABLE, poll_cb); - ASSERT(r == 0); + ASSERT_OK(r); closesocket(sock); uv_close((uv_handle_t*) &handle, close_cb); @@ -62,29 +62,29 @@ TEST_IMPL(poll_closesocket) { struct sockaddr_in addr; r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); + ASSERT_OK(r); sock = socket(AF_INET, SOCK_STREAM, 0); - ASSERT(sock != INVALID_SOCKET); + ASSERT_NE(sock, INVALID_SOCKET); on = 1; r = ioctlsocket(sock, FIONBIO, &on); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_ip4_addr("127.0.0.1", TEST_PORT, &addr); - ASSERT(r == 0); + ASSERT_OK(r); r = connect(sock, (const struct sockaddr*) &addr, sizeof addr); - ASSERT(r != 0); - ASSERT(WSAGetLastError() == WSAEWOULDBLOCK); + ASSERT(r); + ASSERT_EQ(WSAGetLastError(), WSAEWOULDBLOCK); r = uv_poll_init_socket(uv_default_loop(), &handle, sock); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_poll_start(&handle, UV_WRITABLE, poll_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-poll-multiple-handles.c b/deps/uv/test/test-poll-multiple-handles.c index 1aad1ef21065b7..d9c4924dbfe385 100644 --- a/deps/uv/test/test-poll-multiple-handles.c +++ b/deps/uv/test/test-poll-multiple-handles.c @@ -40,7 +40,7 @@ static void close_cb(uv_handle_t* handle) { static void poll_cb(uv_poll_t* handle, int status, int events) { /* Not a bound socket, linux immediately reports UV_READABLE, other OS do not */ - ASSERT(events == UV_READABLE); + ASSERT_EQ(events, UV_READABLE); } TEST_IMPL(poll_multiple_handles) { @@ -51,20 +51,24 @@ TEST_IMPL(poll_multiple_handles) { { struct WSAData wsa_data; int r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); + ASSERT_OK(r); } #endif sock = socket(AF_INET, SOCK_STREAM, 0); #ifdef _WIN32 - ASSERT(sock != INVALID_SOCKET); + ASSERT_NE(sock, INVALID_SOCKET); #else - ASSERT(sock != -1); + ASSERT_NE(sock, -1); #endif - ASSERT(0 == uv_poll_init_socket(uv_default_loop(), &first_poll_handle, sock)); - ASSERT(0 == uv_poll_init_socket(uv_default_loop(), &second_poll_handle, sock)); + ASSERT_OK(uv_poll_init_socket(uv_default_loop(), + &first_poll_handle, + sock)); + ASSERT_OK(uv_poll_init_socket(uv_default_loop(), + &second_poll_handle, + sock)); - ASSERT(0 == uv_poll_start(&first_poll_handle, UV_READABLE, poll_cb)); + ASSERT_OK(uv_poll_start(&first_poll_handle, UV_READABLE, poll_cb)); /* We may not start polling while another polling handle is active * on that fd. @@ -73,26 +77,27 @@ TEST_IMPL(poll_multiple_handles) { /* We do not track handles in an O(1) lookupable way on Windows, * so not checking that here. */ - ASSERT(uv_poll_start(&second_poll_handle, UV_READABLE, poll_cb) == UV_EEXIST); + ASSERT_EQ(uv_poll_start(&second_poll_handle, UV_READABLE, poll_cb), + UV_EEXIST); #endif /* After stopping the other polling handle, we now should be able to poll */ - ASSERT(0 == uv_poll_stop(&first_poll_handle)); - ASSERT(0 == uv_poll_start(&second_poll_handle, UV_READABLE, poll_cb)); + ASSERT_OK(uv_poll_stop(&first_poll_handle)); + ASSERT_OK(uv_poll_start(&second_poll_handle, UV_READABLE, poll_cb)); /* Closing an already stopped polling handle is safe in any case */ uv_close((uv_handle_t*) &first_poll_handle, close_cb); uv_unref((uv_handle_t*) &second_poll_handle); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(close_cb_called == 1); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_EQ(1, close_cb_called); uv_ref((uv_handle_t*) &second_poll_handle); ASSERT(uv_is_active((uv_handle_t*) &second_poll_handle)); uv_close((uv_handle_t*) &second_poll_handle, close_cb); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(close_cb_called == 2); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-poll-oob.c b/deps/uv/test/test-poll-oob.c index b1ff41f5b8ad9f..b40c93c3708776 100644 --- a/deps/uv/test/test-poll-oob.c +++ b/deps/uv/test/test-poll-oob.c @@ -70,7 +70,7 @@ static void poll_cb(uv_poll_t* handle, int status, int events) { int n; int fd; - ASSERT(0 == uv_fileno((uv_handle_t*)handle, &fd)); + ASSERT_OK(uv_fileno((uv_handle_t*)handle, &fd)); memset(buffer, 0, 5); if (events & UV_PRIORITIZED) { @@ -79,10 +79,10 @@ static void poll_cb(uv_poll_t* handle, int status, int events) { while (n == -1 && errno == EINTR); ASSERT(n >= 0 || errno != EINVAL); cli_pr_check = 1; - ASSERT(0 == uv_poll_stop(&poll_req[0])); - ASSERT(0 == uv_poll_start(&poll_req[0], - UV_READABLE | UV_WRITABLE, - poll_cb)); + ASSERT_OK(uv_poll_stop(&poll_req[0])); + ASSERT_OK(uv_poll_start(&poll_req[0], + UV_READABLE | UV_WRITABLE, + poll_cb)); } if (events & UV_READABLE) { if (fd == client_fd) { @@ -91,21 +91,21 @@ static void poll_cb(uv_poll_t* handle, int status, int events) { while (n == -1 && errno == EINTR); ASSERT(n >= 0 || errno != EINVAL); if (cli_rd_check == 1) { - ASSERT(strncmp(buffer, "world", n) == 0); - ASSERT(5 == n); + ASSERT_OK(strncmp(buffer, "world", n)); + ASSERT_EQ(5, n); cli_rd_check = 2; } if (cli_rd_check == 0) { - ASSERT(n == 4); - ASSERT(strncmp(buffer, "hello", n) == 0); + ASSERT_EQ(4, n); + ASSERT_OK(strncmp(buffer, "hello", n)); cli_rd_check = 1; do { do n = recv(server_fd, &buffer, 5, 0); while (n == -1 && errno == EINTR); if (n > 0) { - ASSERT(n == 5); - ASSERT(strncmp(buffer, "world", n) == 0); + ASSERT_EQ(5, n); + ASSERT_OK(strncmp(buffer, "world", n)); cli_rd_check = 2; } } while (n > 0); @@ -118,8 +118,8 @@ static void poll_cb(uv_poll_t* handle, int status, int events) { n = recv(server_fd, &buffer, 3, 0); while (n == -1 && errno == EINTR); ASSERT(n >= 0 || errno != EINVAL); - ASSERT(3 == n); - ASSERT(strncmp(buffer, "foo", n) == 0); + ASSERT_EQ(3, n); + ASSERT_OK(strncmp(buffer, "foo", n)); srv_rd_check = 1; uv_poll_stop(&poll_req[1]); } @@ -128,35 +128,39 @@ static void poll_cb(uv_poll_t* handle, int status, int events) { do { n = send(client_fd, "foo", 3, 0); } while (n < 0 && errno == EINTR); - ASSERT(3 == n); + ASSERT_EQ(3, n); } } static void connection_cb(uv_stream_t* handle, int status) { int r; - ASSERT(0 == status); - ASSERT(0 == uv_accept(handle, (uv_stream_t*) &peer_handle)); - ASSERT(0 == uv_fileno((uv_handle_t*) &peer_handle, &server_fd)); - ASSERT(0 == uv_poll_init_socket(uv_default_loop(), &poll_req[0], client_fd)); - ASSERT(0 == uv_poll_init_socket(uv_default_loop(), &poll_req[1], server_fd)); - ASSERT(0 == uv_poll_start(&poll_req[0], - UV_PRIORITIZED | UV_READABLE | UV_WRITABLE, - poll_cb)); - ASSERT(0 == uv_poll_start(&poll_req[1], - UV_READABLE, - poll_cb)); + ASSERT_OK(status); + ASSERT_OK(uv_accept(handle, (uv_stream_t*) &peer_handle)); + ASSERT_OK(uv_fileno((uv_handle_t*) &peer_handle, &server_fd)); + ASSERT_OK(uv_poll_init_socket(uv_default_loop(), + &poll_req[0], + client_fd)); + ASSERT_OK(uv_poll_init_socket(uv_default_loop(), + &poll_req[1], + server_fd)); + ASSERT_OK(uv_poll_start(&poll_req[0], + UV_PRIORITIZED | UV_READABLE | UV_WRITABLE, + poll_cb)); + ASSERT_OK(uv_poll_start(&poll_req[1], + UV_READABLE, + poll_cb)); do { r = send(server_fd, "hello", 5, MSG_OOB); } while (r < 0 && errno == EINTR); - ASSERT(5 == r); + ASSERT_EQ(5, r); do { r = send(server_fd, "world", 5, 0); } while (r < 0 && errno == EINTR); - ASSERT(5 == r); + ASSERT_EQ(5, r); - ASSERT(0 == uv_idle_start(&idle, idle_cb)); + ASSERT_OK(uv_idle_start(&idle, idle_cb)); } @@ -165,39 +169,39 @@ TEST_IMPL(poll_oob) { int r = 0; uv_loop_t* loop; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); loop = uv_default_loop(); - ASSERT(0 == uv_tcp_init(loop, &server_handle)); - ASSERT(0 == uv_tcp_init(loop, &client_handle)); - ASSERT(0 == uv_tcp_init(loop, &peer_handle)); - ASSERT(0 == uv_idle_init(loop, &idle)); - ASSERT(0 == uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 1, connection_cb)); + ASSERT_OK(uv_tcp_init(loop, &server_handle)); + ASSERT_OK(uv_tcp_init(loop, &client_handle)); + ASSERT_OK(uv_tcp_init(loop, &peer_handle)); + ASSERT_OK(uv_idle_init(loop, &idle)); + ASSERT_OK(uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_listen((uv_stream_t*) &server_handle, 1, connection_cb)); /* Ensure two separate packets */ - ASSERT(0 == uv_tcp_nodelay(&client_handle, 1)); + ASSERT_OK(uv_tcp_nodelay(&client_handle, 1)); client_fd = socket(PF_INET, SOCK_STREAM, 0); - ASSERT(client_fd >= 0); + ASSERT_GE(client_fd, 0); do { errno = 0; r = connect(client_fd, (const struct sockaddr*)&addr, sizeof(addr)); } while (r == -1 && errno == EINTR); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(ticks == kMaxTicks); + ASSERT_EQ(ticks, kMaxTicks); /* Did client receive the POLLPRI message */ - ASSERT(cli_pr_check == 1); + ASSERT_EQ(1, cli_pr_check); /* Did client receive the POLLIN message */ - ASSERT(cli_rd_check == 2); + ASSERT_EQ(2, cli_rd_check); /* Could we write with POLLOUT and did the server receive our POLLOUT message * through POLLIN. */ - ASSERT(srv_rd_check == 1); + ASSERT_EQ(1, srv_rd_check); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-poll.c b/deps/uv/test/test-poll.c index a0f28324e2f2ca..f5a30e9a6b2499 100644 --- a/deps/uv/test/test-poll.c +++ b/deps/uv/test/test-poll.c @@ -106,9 +106,9 @@ static uv_os_sock_t create_bound_socket (struct sockaddr_in bind_addr) { sock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); #ifdef _WIN32 - ASSERT(sock != INVALID_SOCKET); + ASSERT_NE(sock, INVALID_SOCKET); #else - ASSERT(sock >= 0); + ASSERT_GE(sock, 0); #endif #ifndef _WIN32 @@ -116,12 +116,12 @@ static uv_os_sock_t create_bound_socket (struct sockaddr_in bind_addr) { /* Allow reuse of the port. */ int yes = 1; r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes); - ASSERT(r == 0); + ASSERT_OK(r); } #endif r = bind(sock, (const struct sockaddr*) &bind_addr, sizeof bind_addr); - ASSERT(r == 0); + ASSERT_OK(r); return sock; } @@ -163,12 +163,12 @@ static connection_context_t* create_connection_context( r = uv_poll_init_socket(uv_default_loop(), &context->poll_handle, sock); context->open_handles++; context->poll_handle.data = context; - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(uv_default_loop(), &context->timer_handle); context->open_handles++; context->timer_handle.data = context; - ASSERT(r == 0); + ASSERT_OK(r); return context; } @@ -179,15 +179,15 @@ static void connection_close_cb(uv_handle_t* handle) { if (--context->open_handles == 0) { if (test_mode == DUPLEX || context->is_server_connection) { - ASSERT(context->read == TRANSFER_BYTES); + ASSERT_EQ(context->read, TRANSFER_BYTES); } else { - ASSERT(context->read == 0); + ASSERT_OK(context->read); } if (test_mode == DUPLEX || !context->is_server_connection) { - ASSERT(context->sent == TRANSFER_BYTES); + ASSERT_EQ(context->sent, TRANSFER_BYTES); } else { - ASSERT(context->sent == 0); + ASSERT_OK(context->sent); } closed_connections++; @@ -208,7 +208,7 @@ static void connection_poll_cb(uv_poll_t* handle, int status, int events) { unsigned int new_events; int r; - ASSERT(status == 0); + ASSERT_OK(status); ASSERT(events & context->events); ASSERT(!(events & ~context->events)); @@ -226,7 +226,7 @@ static void connection_poll_cb(uv_poll_t* handle, int status, int events) { do r = recv(context->sock, buffer, sizeof buffer, 0); while (r == -1 && errno == EINTR); - ASSERT(r >= 0); + ASSERT_GE(r, 0); if (r > 0) { context->read += r; @@ -306,7 +306,7 @@ static void connection_poll_cb(uv_poll_t* handle, int status, int events) { static char buffer[103]; int send_bytes = MIN(TRANSFER_BYTES - context->sent, sizeof buffer); - ASSERT(send_bytes > 0); + ASSERT_GT(send_bytes, 0); do r = send(context->sock, buffer, send_bytes, 0); @@ -318,7 +318,7 @@ static void connection_poll_cb(uv_poll_t* handle, int status, int events) { break; } - ASSERT(r > 0); + ASSERT_GT(r, 0); context->sent += r; valid_writable_wakeups++; break; @@ -330,7 +330,7 @@ static void connection_poll_cb(uv_poll_t* handle, int status, int events) { static char buffer[1234]; int send_bytes = MIN(TRANSFER_BYTES - context->sent, sizeof buffer); - ASSERT(send_bytes > 0); + ASSERT_GT(send_bytes, 0); do r = send(context->sock, buffer, send_bytes, 0); @@ -342,18 +342,18 @@ static void connection_poll_cb(uv_poll_t* handle, int status, int events) { break; } - ASSERT(r > 0); + ASSERT_GT(r, 0); valid_writable_wakeups++; context->sent += r; while (context->sent < TRANSFER_BYTES) { send_bytes = MIN(TRANSFER_BYTES - context->sent, sizeof buffer); - ASSERT(send_bytes > 0); + ASSERT_GT(send_bytes, 0); do r = send(context->sock, buffer, send_bytes, 0); while (r == -1 && errno == EINTR); - ASSERT(r != 0); + ASSERT(r); if (r < 0) { ASSERT(got_eagain()); @@ -403,7 +403,7 @@ static void connection_poll_cb(uv_poll_t* handle, int status, int events) { #else r = shutdown(context->sock, SHUT_WR); #endif - ASSERT(r == 0); + ASSERT_OK(r); context->sent_fin = 1; new_events &= ~UV_WRITABLE; } @@ -432,9 +432,9 @@ static void connection_poll_cb(uv_poll_t* handle, int status, int events) { /* Assert that uv_is_active works correctly for poll handles. */ if (context->events != 0) { - ASSERT(1 == uv_is_active((uv_handle_t*) handle)); + ASSERT_EQ(1, uv_is_active((uv_handle_t*) handle)); } else { - ASSERT(0 == uv_is_active((uv_handle_t*) handle)); + ASSERT_OK(uv_is_active((uv_handle_t*) handle)); } } @@ -444,7 +444,7 @@ static void delay_timer_cb(uv_timer_t* timer) { int r; /* Timer should auto stop. */ - ASSERT(0 == uv_is_active((uv_handle_t*) timer)); + ASSERT_OK(uv_is_active((uv_handle_t*) timer)); /* Add the requested events to the poll mask. */ ASSERT(context->delayed_events != 0); @@ -454,7 +454,7 @@ static void delay_timer_cb(uv_timer_t* timer) { r = uv_poll_start(&context->poll_handle, context->events, connection_poll_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -471,7 +471,7 @@ static server_context_t* create_server_context( r = uv_poll_init_socket(uv_default_loop(), &context->poll_handle, sock); context->poll_handle.data = context; - ASSERT(r == 0); + ASSERT_OK(r); return context; } @@ -500,9 +500,9 @@ static void server_poll_cb(uv_poll_t* handle, int status, int events) { addr_len = sizeof addr; sock = accept(server_context->sock, (struct sockaddr*) &addr, &addr_len); #ifdef _WIN32 - ASSERT(sock != INVALID_SOCKET); + ASSERT_NE(sock, INVALID_SOCKET); #else - ASSERT(sock >= 0); + ASSERT_GE(sock, 0); #endif connection_context = create_connection_context(sock, 1); @@ -510,7 +510,7 @@ static void server_poll_cb(uv_poll_t* handle, int status, int events) { r = uv_poll_start(&connection_context->poll_handle, UV_READABLE | UV_WRITABLE | UV_DISCONNECT, connection_poll_cb); - ASSERT(r == 0); + ASSERT_OK(r); if (++server_context->connections == NUM_CLIENTS) { close_socket(server_context->sock); @@ -525,15 +525,15 @@ static void start_server(void) { uv_os_sock_t sock; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); sock = create_bound_socket(addr); context = create_server_context(sock); r = listen(sock, 100); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_poll_start(&context->poll_handle, UV_READABLE, server_poll_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -544,8 +544,8 @@ static void start_client(void) { struct sockaddr_in addr; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); - ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", 0, &addr)); sock = create_bound_socket(addr); context = create_connection_context(sock, 0); @@ -554,7 +554,7 @@ static void start_client(void) { r = uv_poll_start(&context->poll_handle, UV_READABLE | UV_WRITABLE | UV_DISCONNECT, connection_poll_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = connect(sock, (struct sockaddr*) &server_addr, sizeof server_addr); ASSERT(r == 0 || got_eagain()); @@ -568,7 +568,7 @@ static void start_poll_test(void) { { struct WSAData wsa_data; int r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); + ASSERT_OK(r); } #endif @@ -578,16 +578,16 @@ static void start_poll_test(void) { start_client(); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); /* Assert that at most five percent of the writable wakeups was spurious. */ - ASSERT(spurious_writable_wakeups == 0 || - (valid_writable_wakeups + spurious_writable_wakeups) / - spurious_writable_wakeups > 20); + ASSERT_NE(spurious_writable_wakeups == 0 || + (valid_writable_wakeups + spurious_writable_wakeups) / + spurious_writable_wakeups > 20, 0); - ASSERT(closed_connections == NUM_CLIENTS * 2); + ASSERT_EQ(closed_connections, NUM_CLIENTS * 2); #if !defined(__sun) && !defined(_AIX) && !defined(__MVS__) - ASSERT(disconnects == NUM_CLIENTS * 2); + ASSERT_EQ(disconnects, NUM_CLIENTS * 2); #endif MAKE_VALGRIND_HAPPY(uv_default_loop()); } @@ -642,9 +642,9 @@ TEST_IMPL(poll_bad_fdtype) { #else fd = open(".", O_RDONLY); #endif - ASSERT(fd != -1); - ASSERT(0 != uv_poll_init(uv_default_loop(), &poll_handle, fd)); - ASSERT(0 == close(fd)); + ASSERT_NE(fd, -1); + ASSERT_NE(0, uv_poll_init(uv_default_loop(), &poll_handle, fd)); + ASSERT_OK(close(fd)); #endif MAKE_VALGRIND_HAPPY(uv_default_loop()); @@ -658,15 +658,15 @@ TEST_IMPL(poll_nested_epoll) { int fd; fd = epoll_create(1); - ASSERT(fd != -1); + ASSERT_NE(fd, -1); - ASSERT(0 == uv_poll_init(uv_default_loop(), &poll_handle, fd)); - ASSERT(0 == uv_poll_start(&poll_handle, UV_READABLE, (uv_poll_cb) abort)); - ASSERT(0 != uv_run(uv_default_loop(), UV_RUN_NOWAIT)); + ASSERT_OK(uv_poll_init(uv_default_loop(), &poll_handle, fd)); + ASSERT_OK(uv_poll_start(&poll_handle, UV_READABLE, (uv_poll_cb) abort)); + ASSERT_NE(0, uv_run(uv_default_loop(), UV_RUN_NOWAIT)); uv_close((uv_handle_t*) &poll_handle, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == close(fd)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(close(fd)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -680,15 +680,15 @@ TEST_IMPL(poll_nested_kqueue) { int fd; fd = kqueue(); - ASSERT(fd != -1); + ASSERT_NE(fd, -1); - ASSERT(0 == uv_poll_init(uv_default_loop(), &poll_handle, fd)); - ASSERT(0 == uv_poll_start(&poll_handle, UV_READABLE, (uv_poll_cb) abort)); - ASSERT(0 != uv_run(uv_default_loop(), UV_RUN_NOWAIT)); + ASSERT_OK(uv_poll_init(uv_default_loop(), &poll_handle, fd)); + ASSERT_OK(uv_poll_start(&poll_handle, UV_READABLE, (uv_poll_cb) abort)); + ASSERT_NE(0, uv_run(uv_default_loop(), UV_RUN_NOWAIT)); uv_close((uv_handle_t*) &poll_handle, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == close(fd)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(close(fd)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-process-priority.c b/deps/uv/test/test-process-priority.c index b3d0a85bdd70ec..941e4b36391032 100644 --- a/deps/uv/test/test-process-priority.c +++ b/deps/uv/test/test-process-priority.c @@ -35,7 +35,7 @@ TEST_IMPL(process_priority) { /* Verify that passing a NULL pointer returns UV_EINVAL. */ r = uv_os_getpriority(0, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); /* Verify that all valid values work. */ for (i = UV_PRIORITY_HIGHEST; i <= UV_PRIORITY_LOW; i++) { @@ -46,38 +46,38 @@ TEST_IMPL(process_priority) { if (r == UV_EACCES) continue; - ASSERT(r == 0); - ASSERT(uv_os_getpriority(0, &priority) == 0); + ASSERT_OK(r); + ASSERT_OK(uv_os_getpriority(0, &priority)); /* Verify that the priority values match on Unix, and are range mapped on Windows. */ #ifndef _WIN32 - ASSERT(priority == i); + ASSERT_EQ(priority, i); #else /* On Windows, only elevated users can set UV_PRIORITY_HIGHEST. Other users will silently be set to UV_PRIORITY_HIGH. */ if (i < UV_PRIORITY_HIGH) ASSERT(priority == UV_PRIORITY_HIGHEST || priority == UV_PRIORITY_HIGH); else if (i < UV_PRIORITY_ABOVE_NORMAL) - ASSERT(priority == UV_PRIORITY_HIGH); + ASSERT_EQ(priority, UV_PRIORITY_HIGH); else if (i < UV_PRIORITY_NORMAL) - ASSERT(priority == UV_PRIORITY_ABOVE_NORMAL); + ASSERT_EQ(priority, UV_PRIORITY_ABOVE_NORMAL); else if (i < UV_PRIORITY_BELOW_NORMAL) - ASSERT(priority == UV_PRIORITY_NORMAL); + ASSERT_EQ(priority, UV_PRIORITY_NORMAL); else if (i < UV_PRIORITY_LOW) - ASSERT(priority == UV_PRIORITY_BELOW_NORMAL); + ASSERT_EQ(priority, UV_PRIORITY_BELOW_NORMAL); else - ASSERT(priority == UV_PRIORITY_LOW); + ASSERT_EQ(priority, UV_PRIORITY_LOW); #endif /* Verify that the current PID and 0 are equivalent. */ - ASSERT(uv_os_getpriority(uv_os_getpid(), &r) == 0); - ASSERT(priority == r); + ASSERT_OK(uv_os_getpriority(uv_os_getpid(), &r)); + ASSERT_EQ(priority, r); } /* Verify that invalid priorities return UV_EINVAL. */ - ASSERT(uv_os_setpriority(0, UV_PRIORITY_HIGHEST - 1) == UV_EINVAL); - ASSERT(uv_os_setpriority(0, UV_PRIORITY_LOW + 1) == UV_EINVAL); + ASSERT_EQ(uv_os_setpriority(0, UV_PRIORITY_HIGHEST - 1), UV_EINVAL); + ASSERT_EQ(uv_os_setpriority(0, UV_PRIORITY_LOW + 1), UV_EINVAL); return 0; } diff --git a/deps/uv/test/test-process-title-threadsafe.c b/deps/uv/test/test-process-title-threadsafe.c index 927643cc8c90c9..05baaf44a453ad 100644 --- a/deps/uv/test/test-process-title-threadsafe.c +++ b/deps/uv/test/test-process-title-threadsafe.c @@ -46,7 +46,7 @@ static void getter_thread_body(void* arg) { getter_sem = arg; while (UV_EAGAIN == uv_sem_trywait(getter_sem)) { - ASSERT(0 == uv_get_process_title(buffer, sizeof(buffer))); + ASSERT_OK(uv_get_process_title(buffer, sizeof(buffer))); /* The maximum size of the process title on some platforms depends on * the total size of the argv vector. It's therefore possible to read @@ -70,10 +70,10 @@ static void setter_thread_body(void* arg) { int i; for (i = 0; i < NUM_ITERATIONS; i++) { - ASSERT(0 == uv_set_process_title(titles[0])); - ASSERT(0 == uv_set_process_title(titles[1])); - ASSERT(0 == uv_set_process_title(titles[2])); - ASSERT(0 == uv_set_process_title(titles[3])); + ASSERT_OK(uv_set_process_title(titles[0])); + ASSERT_OK(uv_set_process_title(titles[1])); + ASSERT_OK(uv_set_process_title(titles[2])); + ASSERT_OK(uv_set_process_title(titles[3])); } } @@ -89,20 +89,19 @@ TEST_IMPL(process_title_threadsafe) { RETURN_SKIP("uv_(get|set)_process_title is not implemented."); #endif - ASSERT(0 == uv_set_process_title(titles[0])); + ASSERT_OK(uv_set_process_title(titles[0])); - ASSERT_EQ(0, uv_sem_init(&getter_sem, 0)); - ASSERT_EQ(0, - uv_thread_create(&getter_thread, getter_thread_body, &getter_sem)); + ASSERT_OK(uv_sem_init(&getter_sem, 0)); + ASSERT_OK(uv_thread_create(&getter_thread, getter_thread_body, &getter_sem)); for (i = 0; i < (int) ARRAY_SIZE(setter_threads); i++) - ASSERT(0 == uv_thread_create(&setter_threads[i], setter_thread_body, NULL)); + ASSERT_OK(uv_thread_create(&setter_threads[i], setter_thread_body, NULL)); for (i = 0; i < (int) ARRAY_SIZE(setter_threads); i++) - ASSERT(0 == uv_thread_join(&setter_threads[i])); + ASSERT_OK(uv_thread_join(&setter_threads[i])); uv_sem_post(&getter_sem); - ASSERT_EQ(0, uv_thread_join(&getter_thread)); + ASSERT_OK(uv_thread_join(&getter_thread)); uv_sem_destroy(&getter_sem); return 0; diff --git a/deps/uv/test/test-process-title.c b/deps/uv/test/test-process-title.c index c5cff9723da4d3..7178cf87da4b52 100644 --- a/deps/uv/test/test-process-title.c +++ b/deps/uv/test/test-process-title.c @@ -29,15 +29,15 @@ static void set_title(const char* title) { int err; err = uv_get_process_title(buffer, sizeof(buffer)); - ASSERT(err == 0); + ASSERT_OK(err); err = uv_set_process_title(title); - ASSERT(err == 0); + ASSERT_OK(err); err = uv_get_process_title(buffer, sizeof(buffer)); - ASSERT(err == 0); + ASSERT_OK(err); - ASSERT(strcmp(buffer, title) == 0); + ASSERT_OK(strcmp(buffer, title)); } @@ -47,15 +47,15 @@ static void uv_get_process_title_edge_cases(void) { /* Test a NULL buffer */ r = uv_get_process_title(NULL, 100); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); /* Test size of zero */ r = uv_get_process_title(buffer, 0); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); /* Test for insufficient buffer size */ r = uv_get_process_title(buffer, 1); - ASSERT(r == UV_ENOBUFS); + ASSERT_EQ(r, UV_ENOBUFS); } @@ -77,8 +77,8 @@ TEST_IMPL(process_title) { static void exit_cb(uv_process_t* process, int64_t status, int signo) { - ASSERT(status == 0); - ASSERT(signo == 0); + ASSERT_OK(status); + ASSERT_OK(signo); uv_close((uv_handle_t*) process, NULL); } @@ -97,7 +97,7 @@ TEST_IMPL(process_title_big_argv) { #endif exepath_size = sizeof(exepath) - 1; - ASSERT(0 == uv_exepath(exepath, &exepath_size)); + ASSERT_OK(uv_exepath(exepath, &exepath_size)); exepath[exepath_size] = '\0'; memset(jumbo, 'x', sizeof(jumbo) - 1); @@ -117,8 +117,8 @@ TEST_IMPL(process_title_big_argv) { options.args = args; options.exit_cb = exit_cb; - ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_spawn(uv_default_loop(), &process, &options)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -131,5 +131,5 @@ void process_title_big_argv(void) { /* Return value deliberately ignored. */ uv_get_process_title(buf, sizeof(buf)); - ASSERT(0 != strcmp(buf, "fail")); + ASSERT_NE(0, strcmp(buf, "fail")); } diff --git a/deps/uv/test/test-queue-foreach-delete.c b/deps/uv/test/test-queue-foreach-delete.c index 4fe8aecee5f781..b3a2d19c4088c9 100644 --- a/deps/uv/test/test-queue-foreach-delete.c +++ b/deps/uv/test/test-queue-foreach-delete.c @@ -71,7 +71,7 @@ static const unsigned first_handle_number_fs_event = 0; static unsigned name##_cb_calls[3]; \ \ static void name##2_cb(__VA_ARGS__) { \ - ASSERT(handle == &(name)[2]); \ + ASSERT_PTR_EQ(handle, &(name)[2]); \ if (first_handle_number_##name == 2) { \ uv_close((uv_handle_t*)&(name)[2], NULL); \ uv_close((uv_handle_t*)&(name)[1], NULL); \ @@ -80,12 +80,12 @@ static const unsigned first_handle_number_fs_event = 0; } \ \ static void name##1_cb(__VA_ARGS__) { \ - ASSERT(handle == &(name)[1]); \ + ASSERT_PTR_EQ(handle, &(name)[1]); \ ASSERT(0 && "Shouldn't be called" && (&name[0])); \ } \ \ static void name##0_cb(__VA_ARGS__) { \ - ASSERT(handle == &(name)[0]); \ + ASSERT_PTR_EQ(handle, &(name)[0]); \ if (first_handle_number_##name == 0) { \ uv_close((uv_handle_t*)&(name)[0], NULL); \ uv_close((uv_handle_t*)&(name)[1], NULL); \ @@ -105,18 +105,18 @@ static const unsigned first_handle_number_fs_event = 0; for (i = 0; i < ARRAY_SIZE(name); i++) { \ int r; \ r = uv_##name##_init((loop), &(name)[i]); \ - ASSERT(r == 0); \ + ASSERT_OK(r); \ \ r = uv_##name##_start(&(name)[i], name##_cbs[i]); \ - ASSERT(r == 0); \ + ASSERT_OK(r); \ } \ } while (0) #define END_ASSERTS(name) \ do { \ - ASSERT(name##_cb_calls[0] == 1); \ - ASSERT(name##_cb_calls[1] == 0); \ - ASSERT(name##_cb_calls[2] == 1); \ + ASSERT_EQ(1, name##_cb_calls[0]); \ + ASSERT_OK(name##_cb_calls[1]); \ + ASSERT_EQ(1, name##_cb_calls[2]); \ } while (0) DEFINE_GLOBALS_AND_CBS(idle, uv_idle_t* handle) @@ -140,13 +140,13 @@ static void init_and_start_fs_events(uv_loop_t* loop) { for (i = 0; i < ARRAY_SIZE(fs_event); i++) { int r; r = uv_fs_event_init(loop, &fs_event[i]); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fs_event_start(&fs_event[i], (uv_fs_event_cb)fs_event_cbs[i], watched_dir, 0); - ASSERT(r == 0); + ASSERT_OK(r); } } @@ -156,10 +156,10 @@ static void helper_timer_cb(uv_timer_t* thandle) { /* fire all fs_events */ r = uv_fs_utime(thandle->loop, &fs_req, watched_dir, 0, 0, NULL); - ASSERT(r == 0); - ASSERT(fs_req.result == 0); - ASSERT(fs_req.fs_type == UV_FS_UTIME); - ASSERT(strcmp(fs_req.path, watched_dir) == 0); + ASSERT_OK(r); + ASSERT_OK(fs_req.result); + ASSERT_EQ(fs_req.fs_type, UV_FS_UTIME); + ASSERT_OK(strcmp(fs_req.path, watched_dir)); uv_fs_req_cleanup(&fs_req); helper_timer_cb_calls++; @@ -182,21 +182,21 @@ TEST_IMPL(queue_foreach_delete) { /* helper timer to trigger async and fs_event callbacks */ r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, helper_timer_cb, 0, 0); - ASSERT(r == 0); + ASSERT_OK(r); #endif r = uv_run(loop, UV_RUN_NOWAIT); - ASSERT(r == 1); + ASSERT_EQ(1, r); END_ASSERTS(idle); END_ASSERTS(prepare); END_ASSERTS(check); #ifdef __linux__ - ASSERT(helper_timer_cb_calls == 1); + ASSERT_EQ(1, helper_timer_cb_calls); #endif MAKE_VALGRIND_HAPPY(loop); diff --git a/deps/uv/test/test-random.c b/deps/uv/test/test-random.c index 3ff3fa8b364824..d82d05782c098e 100644 --- a/deps/uv/test/test-random.c +++ b/deps/uv/test/test-random.c @@ -33,16 +33,16 @@ static void random_cb(uv_random_t* req, int status, void* buf, size_t buflen) { memset(zero, 0, sizeof(zero)); - ASSERT(0 == status); - ASSERT(buf == (void*) scratch); + ASSERT_OK(status); + ASSERT_PTR_EQ(buf, (void*) scratch); if (random_cb_called == 0) { - ASSERT(buflen == 0); - ASSERT(0 == memcmp(scratch, zero, sizeof(zero))); + ASSERT_OK(buflen); + ASSERT_OK(memcmp(scratch, zero, sizeof(zero))); } else { - ASSERT(buflen == sizeof(scratch)); + ASSERT_EQ(buflen, sizeof(scratch)); /* Buy a lottery ticket if you manage to trip this assertion. */ - ASSERT(0 != memcmp(scratch, zero, sizeof(zero))); + ASSERT_NE(0, memcmp(scratch, zero, sizeof(zero))); } random_cb_called++; @@ -54,21 +54,21 @@ TEST_IMPL(random_async) { uv_loop_t* loop; loop = uv_default_loop(); - ASSERT(UV_EINVAL == uv_random(loop, &req, scratch, sizeof(scratch), -1, - random_cb)); - ASSERT(UV_E2BIG == uv_random(loop, &req, scratch, -1, -1, random_cb)); + ASSERT_EQ(UV_EINVAL, uv_random(loop, &req, scratch, sizeof(scratch), -1, + random_cb)); + ASSERT_EQ(UV_E2BIG, uv_random(loop, &req, scratch, -1, -1, random_cb)); - ASSERT(0 == uv_random(loop, &req, scratch, 0, 0, random_cb)); - ASSERT(0 == random_cb_called); + ASSERT_OK(uv_random(loop, &req, scratch, 0, 0, random_cb)); + ASSERT_OK(random_cb_called); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == random_cb_called); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, random_cb_called); - ASSERT(0 == uv_random(loop, &req, scratch, sizeof(scratch), 0, random_cb)); - ASSERT(1 == random_cb_called); + ASSERT_OK(uv_random(loop, &req, scratch, sizeof(scratch), 0, random_cb)); + ASSERT_EQ(1, random_cb_called); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(2 == random_cb_called); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(2, random_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -79,15 +79,15 @@ TEST_IMPL(random_sync) { char zero[256]; char buf[256]; - ASSERT(UV_EINVAL == uv_random(NULL, NULL, buf, sizeof(buf), -1, NULL)); - ASSERT(UV_E2BIG == uv_random(NULL, NULL, buf, -1, -1, NULL)); + ASSERT_EQ(UV_EINVAL, uv_random(NULL, NULL, buf, sizeof(buf), -1, NULL)); + ASSERT_EQ(UV_E2BIG, uv_random(NULL, NULL, buf, -1, -1, NULL)); memset(buf, 0, sizeof(buf)); - ASSERT(0 == uv_random(NULL, NULL, buf, sizeof(buf), 0, NULL)); + ASSERT_OK(uv_random(NULL, NULL, buf, sizeof(buf), 0, NULL)); /* Buy a lottery ticket if you manage to trip this assertion. */ memset(zero, 0, sizeof(zero)); - ASSERT(0 != memcmp(buf, zero, sizeof(zero))); + ASSERT_NE(0, memcmp(buf, zero, sizeof(zero))); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-readable-on-eof.c b/deps/uv/test/test-readable-on-eof.c index 1162f8db1d06a4..2137ac5947f919 100644 --- a/deps/uv/test/test-readable-on-eof.c +++ b/deps/uv/test/test-readable-on-eof.c @@ -35,7 +35,7 @@ static int close_cb_called; static void write_cb(uv_write_t* req, int status) { write_cb_called++; - ASSERT_EQ(status, 0); + ASSERT_OK(status); } static void alloc_cb(uv_handle_t* handle, @@ -54,16 +54,16 @@ static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { int r; ASSERT_EQ(nread, UV_EOF); - ASSERT_EQ(uv_is_readable(handle), 1); - ASSERT_EQ(uv_is_writable(handle), 1); + ASSERT_EQ(1, uv_is_readable(handle)); + ASSERT_EQ(1, uv_is_writable(handle)); if (++read_cb_called == 3) { uv_close((uv_handle_t*) handle, close_cb); - ASSERT_EQ(uv_is_readable(handle), 0); - ASSERT_EQ(uv_is_writable(handle), 0); + ASSERT_OK(uv_is_readable(handle)); + ASSERT_OK(uv_is_writable(handle)); } else { r = uv_read_start((uv_stream_t*) &tcp_client, alloc_cb, read_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } } @@ -72,7 +72,7 @@ static void connect_cb(uv_connect_t* req, int status) { uv_buf_t close_me; connect_cb_called++; - ASSERT_EQ(status, 0); + ASSERT_OK(status); read_cb((uv_stream_t*) &tcp_client, UV_EOF, NULL); @@ -84,27 +84,26 @@ static void connect_cb(uv_connect_t* req, int status) { 1, write_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } TEST_IMPL(readable_on_eof) { struct sockaddr_in sa; - ASSERT_EQ(uv_ip4_addr("127.0.0.1", TEST_PORT, &sa), 0); - ASSERT_EQ(uv_loop_init(&loop), 0); - ASSERT_EQ(uv_tcp_init(&loop, &tcp_client), 0); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &sa)); + ASSERT_OK(uv_loop_init(&loop)); + ASSERT_OK(uv_tcp_init(&loop, &tcp_client)); - ASSERT_EQ(uv_tcp_connect(&connect_req, + ASSERT_OK(uv_tcp_connect(&connect_req, &tcp_client, (const struct sockaddr*) &sa, - connect_cb), - 0); + connect_cb)); - ASSERT_EQ(uv_run(&loop, UV_RUN_DEFAULT), 0); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); - ASSERT_EQ(connect_cb_called, 1); - ASSERT_EQ(read_cb_called, 3); - ASSERT_EQ(write_cb_called, 1); - ASSERT_EQ(close_cb_called, 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(3, read_cb_called); + ASSERT_EQ(1, write_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(&loop); return 0; diff --git a/deps/uv/test/test-ref.c b/deps/uv/test/test-ref.c index 7a9a0b9315b697..dbe94f7168b18d 100644 --- a/deps/uv/test/test-ref.c +++ b/deps/uv/test/test-ref.c @@ -47,9 +47,9 @@ static void close_cb(uv_handle_t* handle) { static void do_close(void* handle) { close_cb_called = 0; uv_close((uv_handle_t*)handle, close_cb); - ASSERT(close_cb_called == 0); + ASSERT_OK(close_cb_called); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); } @@ -69,13 +69,13 @@ static void req_cb(uv_handle_t* req, int status) { static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(req == &shutdown_req); + ASSERT_PTR_EQ(req, &shutdown_req); shutdown_cb_called++; } static void write_cb(uv_write_t* req, int status) { - ASSERT(req == &write_req); + ASSERT_PTR_EQ(req, &write_req); uv_shutdown(&shutdown_req, req->handle, shutdown_cb); write_cb_called++; } @@ -83,8 +83,8 @@ static void write_cb(uv_write_t* req, int status) { static void connect_and_write(uv_connect_t* req, int status) { uv_buf_t buf = uv_buf_init(buffer, sizeof buffer); - ASSERT(req == &connect_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &connect_req); + ASSERT_OK(status); uv_write(&write_req, req->handle, &buf, 1, write_cb); connect_cb_called++; } @@ -92,8 +92,8 @@ static void connect_and_write(uv_connect_t* req, int status) { static void connect_and_shutdown(uv_connect_t* req, int status) { - ASSERT(req == &connect_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &connect_req); + ASSERT_OK(status); uv_shutdown(&shutdown_req, req->handle, shutdown_cb); connect_cb_called++; } @@ -250,7 +250,7 @@ TEST_IMPL(tcp_ref2b) { uv_unref((uv_handle_t*)&h); uv_close((uv_handle_t*)&h, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; } @@ -259,7 +259,7 @@ TEST_IMPL(tcp_ref2b) { TEST_IMPL(tcp_ref3) { struct sockaddr_in addr; uv_tcp_t h; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); uv_tcp_init(uv_default_loop(), &h); uv_tcp_connect(&connect_req, &h, @@ -267,8 +267,8 @@ TEST_IMPL(tcp_ref3) { connect_and_shutdown); uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_called == 1); - ASSERT(shutdown_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, shutdown_cb_called); do_close(&h); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -278,7 +278,7 @@ TEST_IMPL(tcp_ref3) { TEST_IMPL(tcp_ref4) { struct sockaddr_in addr; uv_tcp_t h; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); uv_tcp_init(uv_default_loop(), &h); uv_tcp_connect(&connect_req, &h, @@ -286,9 +286,9 @@ TEST_IMPL(tcp_ref4) { connect_and_write); uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(shutdown_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, write_cb_called); + ASSERT_EQ(1, shutdown_cb_called); do_close(&h); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -309,7 +309,7 @@ TEST_IMPL(udp_ref) { TEST_IMPL(udp_ref2) { struct sockaddr_in addr; uv_udp_t h; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); uv_udp_init(uv_default_loop(), &h); uv_udp_bind(&h, (const struct sockaddr*) &addr, 0); uv_udp_recv_start(&h, (uv_alloc_cb)fail_cb, (uv_udp_recv_cb)fail_cb); @@ -327,7 +327,7 @@ TEST_IMPL(udp_ref3) { uv_udp_send_t req; uv_udp_t h; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); uv_udp_init(uv_default_loop(), &h); uv_udp_send(&req, &h, @@ -337,7 +337,7 @@ TEST_IMPL(udp_ref3) { (uv_udp_send_cb) req_cb); uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(req_cb_called == 1); + ASSERT_EQ(1, req_cb_called); do_close(&h); MAKE_VALGRIND_HAPPY(uv_default_loop()); @@ -374,8 +374,8 @@ TEST_IMPL(pipe_ref3) { uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_and_shutdown); uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_called == 1); - ASSERT(shutdown_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, shutdown_cb_called); do_close(&h); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -388,9 +388,9 @@ TEST_IMPL(pipe_ref4) { uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_and_write); uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(shutdown_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, write_cb_called); + ASSERT_EQ(1, shutdown_cb_called); do_close(&h); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -410,7 +410,7 @@ TEST_IMPL(process_ref) { exepath_size = sizeof(exepath); r = uv_exepath(exepath, &exepath_size); - ASSERT(r == 0); + ASSERT_OK(r); argv[0] = exepath; options.file = exepath; @@ -418,13 +418,13 @@ TEST_IMPL(process_ref) { options.exit_cb = NULL; r = uv_spawn(uv_default_loop(), &h, &options); - ASSERT(r == 0); + ASSERT_OK(r); uv_unref((uv_handle_t*)&h); uv_run(uv_default_loop(), UV_RUN_DEFAULT); r = uv_process_kill(&h, /* SIGTERM */ 15); - ASSERT(r == 0); + ASSERT_OK(r); do_close(&h); @@ -437,9 +437,9 @@ TEST_IMPL(has_ref) { uv_idle_t h; uv_idle_init(uv_default_loop(), &h); uv_ref((uv_handle_t*)&h); - ASSERT(uv_has_ref((uv_handle_t*)&h) == 1); + ASSERT_EQ(1, uv_has_ref((uv_handle_t*)&h)); uv_unref((uv_handle_t*)&h); - ASSERT(uv_has_ref((uv_handle_t*)&h) == 0); + ASSERT_OK(uv_has_ref((uv_handle_t*)&h)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; } diff --git a/deps/uv/test/test-run-nowait.c b/deps/uv/test/test-run-nowait.c index 704105376faeac..89f5f55b18ac47 100644 --- a/deps/uv/test/test-run-nowait.c +++ b/deps/uv/test/test-run-nowait.c @@ -27,7 +27,7 @@ static int timer_called = 0; static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer_handle); + ASSERT_PTR_EQ(handle, &timer_handle); timer_called = 1; } @@ -38,8 +38,8 @@ TEST_IMPL(run_nowait) { uv_timer_start(&timer_handle, timer_cb, 100, 100); r = uv_run(uv_default_loop(), UV_RUN_NOWAIT); - ASSERT(r != 0); - ASSERT(timer_called == 0); + ASSERT(r); + ASSERT_OK(timer_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-run-once.c b/deps/uv/test/test-run-once.c index ee332fa1a057d7..0ae0082c637b31 100644 --- a/deps/uv/test/test-run-once.c +++ b/deps/uv/test/test-run-once.c @@ -29,7 +29,7 @@ static int idle_counter; static void idle_cb(uv_idle_t* handle) { - ASSERT(handle == &idle_handle); + ASSERT_PTR_EQ(handle, &idle_handle); if (++idle_counter == NUM_TICKS) uv_idle_stop(handle); @@ -41,7 +41,7 @@ TEST_IMPL(run_once) { uv_idle_start(&idle_handle, idle_cb); while (uv_run(uv_default_loop(), UV_RUN_ONCE)); - ASSERT(idle_counter == NUM_TICKS); + ASSERT_EQ(idle_counter, NUM_TICKS); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-semaphore.c b/deps/uv/test/test-semaphore.c index ac03bb08f17ec7..ad54808d623a9f 100644 --- a/deps/uv/test/test-semaphore.c +++ b/deps/uv/test/test-semaphore.c @@ -40,7 +40,7 @@ static void worker(void* arg) { uv_sleep(c->delay); uv_mutex_lock(&c->mutex); - ASSERT(c->posted == 0); + ASSERT_OK(c->posted); uv_sem_post(&c->sem); c->posted = 1; uv_mutex_unlock(&c->mutex); @@ -53,17 +53,17 @@ TEST_IMPL(semaphore_1) { memset(&wc, 0, sizeof(wc)); - ASSERT(0 == uv_sem_init(&wc.sem, 0)); - ASSERT(0 == uv_mutex_init(&wc.mutex)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); + ASSERT_OK(uv_sem_init(&wc.sem, 0)); + ASSERT_OK(uv_mutex_init(&wc.mutex)); + ASSERT_OK(uv_thread_create(&thread, worker, &wc)); uv_sleep(100); uv_mutex_lock(&wc.mutex); - ASSERT(wc.posted == 1); + ASSERT_EQ(1, wc.posted); uv_sem_wait(&wc.sem); /* should not block */ uv_mutex_unlock(&wc.mutex); /* ergo, it should be ok to unlock after wait */ - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); uv_mutex_destroy(&wc.mutex); uv_sem_destroy(&wc.sem); @@ -78,13 +78,13 @@ TEST_IMPL(semaphore_2) { memset(&wc, 0, sizeof(wc)); wc.delay = 100; - ASSERT(0 == uv_sem_init(&wc.sem, 0)); - ASSERT(0 == uv_mutex_init(&wc.mutex)); - ASSERT(0 == uv_thread_create(&thread, worker, &wc)); + ASSERT_OK(uv_sem_init(&wc.sem, 0)); + ASSERT_OK(uv_mutex_init(&wc.mutex)); + ASSERT_OK(uv_thread_create(&thread, worker, &wc)); uv_sem_wait(&wc.sem); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_join(&thread)); uv_mutex_destroy(&wc.mutex); uv_sem_destroy(&wc.sem); @@ -95,15 +95,15 @@ TEST_IMPL(semaphore_2) { TEST_IMPL(semaphore_3) { uv_sem_t sem; - ASSERT(0 == uv_sem_init(&sem, 3)); + ASSERT_OK(uv_sem_init(&sem, 3)); uv_sem_wait(&sem); /* should not block */ uv_sem_wait(&sem); /* should not block */ - ASSERT(0 == uv_sem_trywait(&sem)); - ASSERT(UV_EAGAIN == uv_sem_trywait(&sem)); + ASSERT_OK(uv_sem_trywait(&sem)); + ASSERT_EQ(UV_EAGAIN, uv_sem_trywait(&sem)); uv_sem_post(&sem); - ASSERT(0 == uv_sem_trywait(&sem)); - ASSERT(UV_EAGAIN == uv_sem_trywait(&sem)); + ASSERT_OK(uv_sem_trywait(&sem)); + ASSERT_EQ(UV_EAGAIN, uv_sem_trywait(&sem)); uv_sem_destroy(&sem); diff --git a/deps/uv/test/test-shutdown-close.c b/deps/uv/test/test-shutdown-close.c index cb478b5fdd2939..306404afb45c74 100644 --- a/deps/uv/test/test-shutdown-close.c +++ b/deps/uv/test/test-shutdown-close.c @@ -37,7 +37,7 @@ static int close_cb_called = 0; static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(req == &shutdown_req); + ASSERT_PTR_EQ(req, &shutdown_req); ASSERT(status == 0 || status == UV_ECANCELED); shutdown_cb_called++; } @@ -51,14 +51,14 @@ static void close_cb(uv_handle_t* handle) { static void connect_cb(uv_connect_t* req, int status) { int r; - ASSERT(req == &connect_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &connect_req); + ASSERT_OK(status); r = uv_shutdown(&shutdown_req, req->handle, shutdown_cb); - ASSERT(r == 0); - ASSERT(0 == uv_is_closing((uv_handle_t*) req->handle)); + ASSERT_OK(r); + ASSERT_OK(uv_is_closing((uv_handle_t*) req->handle)); uv_close((uv_handle_t*) req->handle, close_cb); - ASSERT(1 == uv_is_closing((uv_handle_t*) req->handle)); + ASSERT_EQ(1, uv_is_closing((uv_handle_t*) req->handle)); connect_cb_called++; } @@ -69,20 +69,20 @@ TEST_IMPL(shutdown_close_tcp) { uv_tcp_t h; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &h); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &h, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(connect_cb_called == 1); - ASSERT(shutdown_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, shutdown_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -94,14 +94,14 @@ TEST_IMPL(shutdown_close_pipe) { int r; r = uv_pipe_init(uv_default_loop(), &h, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_pipe_connect(&connect_req, &h, TEST_PIPENAME, connect_cb); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(connect_cb_called == 1); - ASSERT(shutdown_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, shutdown_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-shutdown-eof.c b/deps/uv/test/test-shutdown-eof.c index 9c0b85652aef12..6669c29769be35 100644 --- a/deps/uv/test/test-shutdown-eof.c +++ b/deps/uv/test/test-shutdown-eof.c @@ -46,7 +46,7 @@ static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { static void read_cb(uv_stream_t* t, ssize_t nread, const uv_buf_t* buf) { - ASSERT((uv_tcp_t*)t == &tcp); + ASSERT_PTR_EQ((uv_tcp_t*)t, &tcp); if (nread == 0) { free(buf->base); @@ -54,14 +54,14 @@ static void read_cb(uv_stream_t* t, ssize_t nread, const uv_buf_t* buf) { } if (!got_q) { - ASSERT(nread == 1); + ASSERT_EQ(1, nread); ASSERT(!got_eof); - ASSERT(buf->base[0] == 'Q'); + ASSERT_EQ(buf->base[0], 'Q'); free(buf->base); got_q = 1; puts("got Q"); } else { - ASSERT(nread == UV_EOF); + ASSERT_EQ(nread, UV_EOF); if (buf->base) { free(buf->base); } @@ -72,24 +72,24 @@ static void read_cb(uv_stream_t* t, ssize_t nread, const uv_buf_t* buf) { static void shutdown_cb(uv_shutdown_t *req, int status) { - ASSERT(req == &shutdown_req); + ASSERT_PTR_EQ(req, &shutdown_req); - ASSERT(called_connect_cb == 1); + ASSERT_EQ(1, called_connect_cb); ASSERT(!got_eof); - ASSERT(called_tcp_close_cb == 0); - ASSERT(called_timer_close_cb == 0); - ASSERT(called_timer_cb == 0); + ASSERT_OK(called_tcp_close_cb); + ASSERT_OK(called_timer_close_cb); + ASSERT_OK(called_timer_cb); called_shutdown_cb++; } static void connect_cb(uv_connect_t *req, int status) { - ASSERT(status == 0); - ASSERT(req == &connect_req); + ASSERT_OK(status); + ASSERT_PTR_EQ(req, &connect_req); /* Start reading from our connection so we can receive the EOF. */ - ASSERT_EQ(0, uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb)); /* Check error handling. */ ASSERT_EQ(UV_EALREADY, uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb)); @@ -107,37 +107,37 @@ static void connect_cb(uv_connect_t *req, int status) { uv_shutdown(&shutdown_req, (uv_stream_t*) &tcp, shutdown_cb); called_connect_cb++; - ASSERT(called_shutdown_cb == 0); + ASSERT_OK(called_shutdown_cb); } static void tcp_close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*) &tcp); + ASSERT_PTR_EQ(handle, (uv_handle_t*) &tcp); - ASSERT(called_connect_cb == 1); + ASSERT_EQ(1, called_connect_cb); ASSERT(got_q); ASSERT(got_eof); - ASSERT(called_timer_cb == 1); + ASSERT_EQ(1, called_timer_cb); called_tcp_close_cb++; } static void timer_close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*) &timer); + ASSERT_PTR_EQ(handle, (uv_handle_t*) &timer); called_timer_close_cb++; } static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer); + ASSERT_PTR_EQ(handle, &timer); uv_close((uv_handle_t*) handle, timer_close_cb); /* * The most important assert of the test: we have not received * tcp_close_cb yet. */ - ASSERT(called_tcp_close_cb == 0); + ASSERT_OK(called_tcp_close_cb); uv_close((uv_handle_t*) &tcp, tcp_close_cb); called_timer_cb++; @@ -158,11 +158,11 @@ TEST_IMPL(shutdown_eof) { qbuf.len = 1; r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); + ASSERT_OK(r); uv_timer_start(&timer, timer_cb, 100, 0); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); r = uv_tcp_init(uv_default_loop(), &tcp); ASSERT(!r); @@ -174,13 +174,13 @@ TEST_IMPL(shutdown_eof) { uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(called_connect_cb == 1); - ASSERT(called_shutdown_cb == 1); + ASSERT_EQ(1, called_connect_cb); + ASSERT_EQ(1, called_shutdown_cb); ASSERT(got_eof); ASSERT(got_q); - ASSERT(called_tcp_close_cb == 1); - ASSERT(called_timer_close_cb == 1); - ASSERT(called_timer_cb == 1); + ASSERT_EQ(1, called_tcp_close_cb); + ASSERT_EQ(1, called_timer_close_cb); + ASSERT_EQ(1, called_timer_cb); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-shutdown-simultaneous.c b/deps/uv/test/test-shutdown-simultaneous.c index 14cc443730d565..0dd8e353c860f9 100644 --- a/deps/uv/test/test-shutdown-simultaneous.c +++ b/deps/uv/test/test-shutdown-simultaneous.c @@ -44,8 +44,8 @@ static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { static void shutdown_cb(uv_shutdown_t *req, int status) { ASSERT_PTR_EQ(req, &shutdown_req); - ASSERT_EQ(called_connect_cb, 1); - ASSERT_EQ(called_tcp_close_cb, 0); + ASSERT_EQ(1, called_connect_cb); + ASSERT_OK(called_tcp_close_cb); } @@ -58,8 +58,8 @@ static void read_cb(uv_stream_t* t, ssize_t nread, const uv_buf_t* buf) { } if (!got_q) { - ASSERT_EQ(nread, 4); - ASSERT_EQ(got_eof, 0); + ASSERT_EQ(4, nread); + ASSERT_OK(got_eof); ASSERT_MEM_EQ(buf->base, "QQSS", 4); free(buf->base); got_q = 1; @@ -79,11 +79,11 @@ static void read_cb(uv_stream_t* t, ssize_t nread, const uv_buf_t* buf) { static void connect_cb(uv_connect_t *req, int status) { - ASSERT_EQ(status, 0); + ASSERT_OK(status); ASSERT_PTR_EQ(req, &connect_req); /* Start reading from our connection so we can receive the EOF. */ - ASSERT_EQ(0, uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb)); /* Check error handling. */ ASSERT_EQ(UV_EALREADY, uv_read_start((uv_stream_t*)&tcp, alloc_cb, read_cb)); @@ -98,7 +98,7 @@ static void connect_cb(uv_connect_t *req, int status) { ASSERT_EQ(qbuf.len, uv_try_write((uv_stream_t*) &tcp, &qbuf, 1)); called_connect_cb++; - ASSERT_EQ(called_shutdown_cb, 0); + ASSERT_OK(called_shutdown_cb); } @@ -113,22 +113,22 @@ TEST_IMPL(shutdown_simultaneous) { qbuf.base = "QQSS"; qbuf.len = 4; - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); r = uv_tcp_init(uv_default_loop(), &tcp); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &tcp, (const struct sockaddr*) &server_addr, connect_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(called_connect_cb, 1); - ASSERT_EQ(called_shutdown_cb, 1); - ASSERT_EQ(got_eof, 1); - ASSERT_EQ(got_q, 1); + ASSERT_EQ(1, called_connect_cb); + ASSERT_EQ(1, called_shutdown_cb); + ASSERT_EQ(1, got_eof); + ASSERT_EQ(1, got_q); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-shutdown-twice.c b/deps/uv/test/test-shutdown-twice.c index d936a70cb7d7bb..c21a98340bd910 100644 --- a/deps/uv/test/test-shutdown-twice.c +++ b/deps/uv/test/test-shutdown-twice.c @@ -37,8 +37,8 @@ static void close_cb(uv_handle_t* handle) { } static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(req == &req1); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &req1); + ASSERT_OK(status); shutdown_cb_called++; uv_close((uv_handle_t*) req->handle, close_cb); } @@ -46,12 +46,12 @@ static void shutdown_cb(uv_shutdown_t* req, int status) { static void connect_cb(uv_connect_t* req, int status) { int r; - ASSERT(status == 0); + ASSERT_OK(status); r = uv_shutdown(&req1, req->handle, shutdown_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_shutdown(&req2, req->handle, shutdown_cb); - ASSERT(r != 0); + ASSERT(r); } @@ -63,22 +63,22 @@ TEST_IMPL(shutdown_twice) { uv_connect_t connect_req; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); loop = uv_default_loop(); r = uv_tcp_init(loop, &h); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &h, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(shutdown_cb_called == 1); + ASSERT_EQ(1, shutdown_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-signal-multiple-loops.c b/deps/uv/test/test-signal-multiple-loops.c index de511fc06804ef..e68eabf6fc2857 100644 --- a/deps/uv/test/test-signal-multiple-loops.c +++ b/deps/uv/test/test-signal-multiple-loops.c @@ -66,14 +66,14 @@ static void increment_counter(int* counter) { static void signal1_cb(uv_signal_t* handle, int signum) { - ASSERT(signum == SIGUSR1); + ASSERT_EQ(signum, SIGUSR1); increment_counter(&signal1_cb_counter); uv_signal_stop(handle); } static void signal2_cb(uv_signal_t* handle, int signum) { - ASSERT(signum == SIGUSR2); + ASSERT_EQ(signum, SIGUSR2); increment_counter(&signal2_cb_counter); uv_signal_stop(handle); } @@ -89,25 +89,25 @@ static void signal_handling_worker(void* context) { action = (enum signal_action) (uintptr_t) context; - ASSERT(0 == uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); /* Setup the signal watchers and start them. */ if (action == ONLY_SIGUSR1 || action == SIGUSR1_AND_SIGUSR2) { r = uv_signal_init(&loop, &signal1a); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_signal_start(&signal1a, signal1_cb, SIGUSR1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_signal_init(&loop, &signal1b); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_signal_start(&signal1b, signal1_cb, SIGUSR1); - ASSERT(r == 0); + ASSERT_OK(r); } if (action == ONLY_SIGUSR2 || action == SIGUSR1_AND_SIGUSR2) { r = uv_signal_init(&loop, &signal2); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_signal_start(&signal2, signal2_cb, SIGUSR2); - ASSERT(r == 0); + ASSERT_OK(r); } /* Signal watchers are now set up. */ @@ -117,26 +117,26 @@ static void signal_handling_worker(void* context) { * will return when all signal watchers caught a signal. */ r = uv_run(&loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); /* Restart the signal watchers. */ if (action == ONLY_SIGUSR1 || action == SIGUSR1_AND_SIGUSR2) { r = uv_signal_start(&signal1a, signal1_cb, SIGUSR1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_signal_start(&signal1b, signal1_cb, SIGUSR1); - ASSERT(r == 0); + ASSERT_OK(r); } if (action == ONLY_SIGUSR2 || action == SIGUSR1_AND_SIGUSR2) { r = uv_signal_start(&signal2, signal2_cb, SIGUSR2); - ASSERT(r == 0); + ASSERT_OK(r); } /* Wait for signals once more. */ uv_sem_post(&sem); r = uv_run(&loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); /* Close the watchers. */ if (action == ONLY_SIGUSR1 || action == SIGUSR1_AND_SIGUSR2) { @@ -150,7 +150,7 @@ static void signal_handling_worker(void* context) { /* Wait for the signal watchers to close. */ r = uv_run(&loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); uv_loop_close(&loop); } @@ -173,18 +173,18 @@ static void loop_creating_worker(void* context) { loop = malloc(sizeof(*loop)); ASSERT_NOT_NULL(loop); - ASSERT(0 == uv_loop_init(loop)); + ASSERT_OK(uv_loop_init(loop)); r = uv_signal_init(loop, &signal); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_signal_start(&signal, signal_unexpected_cb, SIGTERM); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &signal, NULL); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); uv_loop_close(loop); free(loop); @@ -229,17 +229,17 @@ TEST_IMPL(signal_multiple_loops) { int r; r = uv_sem_init(&sem, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_mutex_init(&lock); - ASSERT(r == 0); + ASSERT_OK(r); /* Create a couple of threads that create a destroy loops continuously. */ for (i = 0; i < NUM_LOOP_CREATING_THREADS; i++) { r = uv_thread_create(&loop_creating_threads[i], loop_creating_worker, NULL); - ASSERT(r == 0); + ASSERT_OK(r); } /* Create a couple of threads that actually handle signals. */ @@ -253,7 +253,7 @@ TEST_IMPL(signal_multiple_loops) { r = uv_thread_create(&signal_handling_threads[i], signal_handling_worker, (void*) (uintptr_t) action); - ASSERT(r == 0); + ASSERT_OK(r); } /* Wait until all threads have started and set up their signal watchers. */ @@ -261,9 +261,9 @@ TEST_IMPL(signal_multiple_loops) { uv_sem_wait(&sem); r = kill(getpid(), SIGUSR1); - ASSERT(r == 0); + ASSERT_OK(r); r = kill(getpid(), SIGUSR2); - ASSERT(r == 0); + ASSERT_OK(r); /* Wait for all threads to handle these signals. */ for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) @@ -277,14 +277,14 @@ TEST_IMPL(signal_multiple_loops) { pthread_sigmask(SIG_SETMASK, &sigset, NULL); r = kill(getpid(), SIGUSR1); - ASSERT(r == 0); + ASSERT_OK(r); r = kill(getpid(), SIGUSR2); - ASSERT(r == 0); + ASSERT_OK(r); /* Wait for all signal handling threads to exit. */ for (i = 0; i < NUM_SIGNAL_HANDLING_THREADS; i++) { r = uv_thread_join(&signal_handling_threads[i]); - ASSERT(r == 0); + ASSERT_OK(r); } /* Tell all loop creating threads to stop. */ @@ -295,7 +295,7 @@ TEST_IMPL(signal_multiple_loops) { /* Wait for all loop creating threads to exit. */ for (i = 0; i < NUM_LOOP_CREATING_THREADS; i++) { r = uv_thread_join(&loop_creating_threads[i]); - ASSERT(r == 0); + ASSERT_OK(r); } uv_sem_destroy(&sem); @@ -306,13 +306,13 @@ TEST_IMPL(signal_multiple_loops) { /* The division by three reflects the fact that we spawn three different * thread groups of (NUM_SIGNAL_HANDLING_THREADS / 3) threads each. */ - ASSERT(signal1_cb_counter == 8 * (NUM_SIGNAL_HANDLING_THREADS / 3)); - ASSERT(signal2_cb_counter == 4 * (NUM_SIGNAL_HANDLING_THREADS / 3)); + ASSERT_EQ(signal1_cb_counter, 8 * (NUM_SIGNAL_HANDLING_THREADS / 3)); + ASSERT_EQ(signal2_cb_counter, 4 * (NUM_SIGNAL_HANDLING_THREADS / 3)); /* We don't know exactly how much loops will be created and destroyed, but at * least there should be 1 for every loop creating thread. */ - ASSERT(loop_creation_counter >= NUM_LOOP_CREATING_THREADS); + ASSERT_GE(loop_creation_counter, NUM_LOOP_CREATING_THREADS); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-signal-pending-on-close.c b/deps/uv/test/test-signal-pending-on-close.c index e0b9bc300b159e..42a4296704bab5 100644 --- a/deps/uv/test/test-signal-pending-on-close.c +++ b/deps/uv/test/test-signal-pending-on-close.c @@ -35,7 +35,7 @@ static int close_cb_called; static void stop_loop_cb(uv_signal_t* signal, int signum) { - ASSERT(signum == SIGPIPE); + ASSERT_EQ(signum, SIGPIPE); uv_stop(signal->loop); } @@ -50,7 +50,7 @@ static void close_cb(uv_handle_t *handle) { static void write_cb(uv_write_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == UV_EPIPE); + ASSERT_EQ(status, UV_EPIPE); free(buf); uv_close((uv_handle_t *) &pipe_hdl, close_cb); uv_close((uv_handle_t *) &signal_hdl, close_cb); @@ -62,17 +62,17 @@ TEST_IMPL(signal_pending_on_close) { uv_buf_t buffer; int r; - ASSERT(0 == uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); - ASSERT(0 == uv_signal_init(&loop, &signal_hdl)); + ASSERT_OK(uv_signal_init(&loop, &signal_hdl)); - ASSERT(0 == uv_signal_start(&signal_hdl, signal_cb, SIGPIPE)); + ASSERT_OK(uv_signal_start(&signal_hdl, signal_cb, SIGPIPE)); - ASSERT(0 == pipe(pipefds)); + ASSERT_OK(pipe(pipefds)); - ASSERT(0 == uv_pipe_init(&loop, &pipe_hdl, 0)); + ASSERT_OK(uv_pipe_init(&loop, &pipe_hdl, 0)); - ASSERT(0 == uv_pipe_open(&pipe_hdl, pipefds[1])); + ASSERT_OK(uv_pipe_open(&pipe_hdl, pipefds[1])); /* Write data large enough so it needs loop iteration */ buf = malloc(1<<24); @@ -81,14 +81,14 @@ TEST_IMPL(signal_pending_on_close) { buffer = uv_buf_init(buf, 1<<24); r = uv_write(&write_req, (uv_stream_t *) &pipe_hdl, &buffer, 1, write_cb); - ASSERT(0 == r); + ASSERT_OK(r); /* cause a SIGPIPE on write in next iteration */ close(pipefds[0]); - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); - ASSERT(2 == close_cb_called); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(&loop); return 0; @@ -96,18 +96,18 @@ TEST_IMPL(signal_pending_on_close) { TEST_IMPL(signal_close_loop_alive) { - ASSERT(0 == uv_loop_init(&loop)); - ASSERT(0 == uv_signal_init(&loop, &signal_hdl)); - ASSERT(0 == uv_signal_start(&signal_hdl, stop_loop_cb, SIGPIPE)); + ASSERT_OK(uv_loop_init(&loop)); + ASSERT_OK(uv_signal_init(&loop, &signal_hdl)); + ASSERT_OK(uv_signal_start(&signal_hdl, stop_loop_cb, SIGPIPE)); uv_unref((uv_handle_t*) &signal_hdl); - ASSERT(0 == uv_kill(uv_os_getpid(), SIGPIPE)); - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_kill(uv_os_getpid(), SIGPIPE)); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); uv_close((uv_handle_t*) &signal_hdl, close_cb); - ASSERT(1 == uv_loop_alive(&loop)); + ASSERT_EQ(1, uv_loop_alive(&loop)); - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); - ASSERT(1 == close_cb_called); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(&loop); return 0; diff --git a/deps/uv/test/test-signal.c b/deps/uv/test/test-signal.c index f8222d14b4e71f..b1e24bb01a10e2 100644 --- a/deps/uv/test/test-signal.c +++ b/deps/uv/test/test-signal.c @@ -31,12 +31,12 @@ TEST_IMPL(kill_invalid_signum) { pid = uv_os_getpid(); - ASSERT(uv_kill(pid, -1) == UV_EINVAL); + ASSERT_EQ(uv_kill(pid, -1), UV_EINVAL); #ifdef _WIN32 /* NSIG is not available on all platforms. */ - ASSERT(uv_kill(pid, NSIG) == UV_EINVAL); + ASSERT_EQ(uv_kill(pid, NSIG), UV_EINVAL); #endif - ASSERT(uv_kill(pid, 4096) == UV_EINVAL); + ASSERT_EQ(uv_kill(pid, 4096), UV_EINVAL); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -55,20 +55,20 @@ TEST_IMPL(win32_signum_number) { loop = uv_default_loop(); uv_signal_init(loop, &signal); - ASSERT(uv_signal_start(&signal, signum_test_cb, 0) == UV_EINVAL); - ASSERT(uv_signal_start(&signal, signum_test_cb, SIGINT) == 0); - ASSERT(uv_signal_start(&signal, signum_test_cb, SIGBREAK) == 0); - ASSERT(uv_signal_start(&signal, signum_test_cb, SIGHUP) == 0); - ASSERT(uv_signal_start(&signal, signum_test_cb, SIGWINCH) == 0); - ASSERT(uv_signal_start(&signal, signum_test_cb, SIGILL) == 0); - ASSERT(uv_signal_start(&signal, signum_test_cb, SIGABRT_COMPAT) == 0); - ASSERT(uv_signal_start(&signal, signum_test_cb, SIGFPE) == 0); - ASSERT(uv_signal_start(&signal, signum_test_cb, SIGSEGV) == 0); - ASSERT(uv_signal_start(&signal, signum_test_cb, SIGTERM) == 0); - ASSERT(uv_signal_start(&signal, signum_test_cb, SIGABRT) == 0); - ASSERT(uv_signal_start(&signal, signum_test_cb, -1) == UV_EINVAL); - ASSERT(uv_signal_start(&signal, signum_test_cb, NSIG) == UV_EINVAL); - ASSERT(uv_signal_start(&signal, signum_test_cb, 1024) == UV_EINVAL); + ASSERT_EQ(uv_signal_start(&signal, signum_test_cb, 0), UV_EINVAL); + ASSERT_OK(uv_signal_start(&signal, signum_test_cb, SIGINT)); + ASSERT_OK(uv_signal_start(&signal, signum_test_cb, SIGBREAK)); + ASSERT_OK(uv_signal_start(&signal, signum_test_cb, SIGHUP)); + ASSERT_OK(uv_signal_start(&signal, signum_test_cb, SIGWINCH)); + ASSERT_OK(uv_signal_start(&signal, signum_test_cb, SIGILL)); + ASSERT_OK(uv_signal_start(&signal, signum_test_cb, SIGABRT_COMPAT)); + ASSERT_OK(uv_signal_start(&signal, signum_test_cb, SIGFPE)); + ASSERT_OK(uv_signal_start(&signal, signum_test_cb, SIGSEGV)); + ASSERT_OK(uv_signal_start(&signal, signum_test_cb, SIGTERM)); + ASSERT_OK(uv_signal_start(&signal, signum_test_cb, SIGABRT)); + ASSERT_EQ(uv_signal_start(&signal, signum_test_cb, -1), UV_EINVAL); + ASSERT_EQ(uv_signal_start(&signal, signum_test_cb, NSIG), UV_EINVAL); + ASSERT_EQ(uv_signal_start(&signal, signum_test_cb, 1024), UV_EINVAL); MAKE_VALGRIND_HAPPY(loop); return 0; } @@ -100,7 +100,7 @@ struct signal_ctx { static void signal_cb(uv_signal_t* handle, int signum) { struct signal_ctx* ctx = container_of(handle, struct signal_ctx, handle); - ASSERT(signum == ctx->signum); + ASSERT_EQ(signum, ctx->signum); if (++ctx->ncalls == NSIGNALS) { if (ctx->stop_or_close == STOP) uv_signal_stop(handle); @@ -113,8 +113,8 @@ static void signal_cb(uv_signal_t* handle, int signum) { static void signal_cb_one_shot(uv_signal_t* handle, int signum) { struct signal_ctx* ctx = container_of(handle, struct signal_ctx, handle); - ASSERT(signum == ctx->signum); - ASSERT(++ctx->ncalls == 1); + ASSERT_EQ(signum, ctx->signum); + ASSERT_EQ(1, ++ctx->ncalls); if (ctx->stop_or_close == CLOSE) uv_close((uv_handle_t*)handle, NULL); } @@ -138,18 +138,18 @@ static void start_watcher(uv_loop_t* loop, ctx->signum = signum; ctx->stop_or_close = CLOSE; ctx->one_shot = one_shot; - ASSERT(0 == uv_signal_init(loop, &ctx->handle)); + ASSERT_OK(uv_signal_init(loop, &ctx->handle)); if (one_shot) - ASSERT(0 == uv_signal_start_oneshot(&ctx->handle, signal_cb_one_shot, signum)); + ASSERT_OK(uv_signal_start_oneshot(&ctx->handle, signal_cb_one_shot, signum)); else - ASSERT(0 == uv_signal_start(&ctx->handle, signal_cb, signum)); + ASSERT_OK(uv_signal_start(&ctx->handle, signal_cb, signum)); } static void start_timer(uv_loop_t* loop, int signum, struct timer_ctx* ctx) { ctx->ncalls = 0; ctx->signum = signum; - ASSERT(0 == uv_timer_init(loop, &ctx->handle)); - ASSERT(0 == uv_timer_start(&ctx->handle, timer_cb, 5, 5)); + ASSERT_OK(uv_timer_init(loop, &ctx->handle)); + ASSERT_OK(uv_timer_start(&ctx->handle, timer_cb, 5, 5)); } @@ -162,23 +162,23 @@ TEST_IMPL(we_get_signal) { start_timer(loop, SIGCHLD, &tc); start_watcher(loop, SIGCHLD, &sc, 0); sc.stop_or_close = STOP; /* stop, don't close the signal handle */ - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc.ncalls == NSIGNALS); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(tc.ncalls, NSIGNALS); + ASSERT_EQ(sc.ncalls, NSIGNALS); start_timer(loop, SIGCHLD, &tc); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc.ncalls == NSIGNALS); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(tc.ncalls, NSIGNALS); + ASSERT_EQ(sc.ncalls, NSIGNALS); sc.ncalls = 0; sc.stop_or_close = CLOSE; /* now close it when it's done */ uv_signal_start(&sc.handle, signal_cb, SIGCHLD); start_timer(loop, SIGCHLD, &tc); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc.ncalls == NSIGNALS); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(tc.ncalls, NSIGNALS); + ASSERT_EQ(sc.ncalls, NSIGNALS); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -198,13 +198,13 @@ TEST_IMPL(we_get_signals) { start_watcher(loop, SIGUSR2, sc + 3, 0); start_timer(loop, SIGUSR1, tc + 0); start_timer(loop, SIGUSR2, tc + 1); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); for (i = 0; i < ARRAY_SIZE(sc); i++) - ASSERT(sc[i].ncalls == NSIGNALS); + ASSERT_EQ(sc[i].ncalls, NSIGNALS); for (i = 0; i < ARRAY_SIZE(tc); i++) - ASSERT(tc[i].ncalls == NSIGNALS); + ASSERT_EQ(tc[i].ncalls, NSIGNALS); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -219,21 +219,21 @@ TEST_IMPL(we_get_signal_one_shot) { start_timer(loop, SIGCHLD, &tc); start_watcher(loop, SIGCHLD, &sc, 1); sc.stop_or_close = NOOP; - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc.ncalls == 1); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(tc.ncalls, NSIGNALS); + ASSERT_EQ(1, sc.ncalls); start_timer(loop, SIGCHLD, &tc); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(sc.ncalls == 1); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, sc.ncalls); sc.ncalls = 0; sc.stop_or_close = CLOSE; /* now close it when it's done */ uv_signal_start_oneshot(&sc.handle, signal_cb_one_shot, SIGCHLD); start_timer(loop, SIGCHLD, &tc); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc.ncalls == 1); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(tc.ncalls, NSIGNALS); + ASSERT_EQ(1, sc.ncalls); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -252,10 +252,10 @@ TEST_IMPL(we_get_signals_mixed) { start_watcher(loop, SIGCHLD, sc + 1, 1); sc[0].stop_or_close = CLOSE; sc[1].stop_or_close = CLOSE; - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc[0].ncalls == 1); - ASSERT(sc[1].ncalls == 1); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(tc.ncalls, NSIGNALS); + ASSERT_EQ(1, sc[0].ncalls); + ASSERT_EQ(1, sc[1].ncalls); /* 2 one-shot, 1 normal then remove normal */ start_timer(loop, SIGCHLD, &tc); @@ -265,11 +265,11 @@ TEST_IMPL(we_get_signals_mixed) { sc[1].stop_or_close = CLOSE; start_watcher(loop, SIGCHLD, sc + 2, 0); uv_close((uv_handle_t*)&(sc[2]).handle, NULL); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc[0].ncalls == 1); - ASSERT(sc[1].ncalls == 1); - ASSERT(sc[2].ncalls == 0); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(tc.ncalls, NSIGNALS); + ASSERT_EQ(1, sc[0].ncalls); + ASSERT_EQ(1, sc[1].ncalls); + ASSERT_OK(sc[2].ncalls); /* 2 normal, 1 one-shot then remove one-shot */ start_timer(loop, SIGCHLD, &tc); @@ -279,11 +279,11 @@ TEST_IMPL(we_get_signals_mixed) { sc[1].stop_or_close = CLOSE; start_watcher(loop, SIGCHLD, sc + 2, 1); uv_close((uv_handle_t*)&(sc[2]).handle, NULL); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc[0].ncalls == NSIGNALS); - ASSERT(sc[1].ncalls == NSIGNALS); - ASSERT(sc[2].ncalls == 0); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(tc.ncalls, NSIGNALS); + ASSERT_EQ(sc[0].ncalls, NSIGNALS); + ASSERT_EQ(sc[1].ncalls, NSIGNALS); + ASSERT_OK(sc[2].ncalls); /* 2 normal, 2 one-shot then remove 2 normal */ start_timer(loop, SIGCHLD, &tc); @@ -295,12 +295,12 @@ TEST_IMPL(we_get_signals_mixed) { sc[3].stop_or_close = CLOSE; uv_close((uv_handle_t*)&(sc[0]).handle, NULL); uv_close((uv_handle_t*)&(sc[1]).handle, NULL); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc[0].ncalls == 0); - ASSERT(sc[1].ncalls == 0); - ASSERT(sc[2].ncalls == 1); - ASSERT(sc[2].ncalls == 1); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(tc.ncalls, NSIGNALS); + ASSERT_OK(sc[0].ncalls); + ASSERT_OK(sc[1].ncalls); + ASSERT_EQ(1, sc[2].ncalls); + ASSERT_EQ(1, sc[2].ncalls); /* 1 normal, 1 one-shot, 2 normal then remove 1st normal, 2nd normal */ start_timer(loop, SIGCHLD, &tc); @@ -311,12 +311,12 @@ TEST_IMPL(we_get_signals_mixed) { sc[3].stop_or_close = CLOSE; uv_close((uv_handle_t*)&(sc[0]).handle, NULL); uv_close((uv_handle_t*)&(sc[2]).handle, NULL); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(tc.ncalls == NSIGNALS); - ASSERT(sc[0].ncalls == 0); - ASSERT(sc[1].ncalls == 1); - ASSERT(sc[2].ncalls == 0); - ASSERT(sc[3].ncalls == NSIGNALS); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(tc.ncalls, NSIGNALS); + ASSERT_OK(sc[0].ncalls); + ASSERT_EQ(1, sc[1].ncalls); + ASSERT_OK(sc[2].ncalls); + ASSERT_EQ(sc[3].ncalls, NSIGNALS); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-socket-buffer-size.c b/deps/uv/test/test-socket-buffer-size.c index 5f072cb02be252..64904e93d5060f 100644 --- a/deps/uv/test/test-socket-buffer-size.c +++ b/deps/uv/test/test-socket-buffer-size.c @@ -40,14 +40,14 @@ static void check_buffer_size(uv_handle_t* handle) { int value; value = 0; - ASSERT(0 == uv_recv_buffer_size(handle, &value)); - ASSERT(value > 0); + ASSERT_OK(uv_recv_buffer_size(handle, &value)); + ASSERT_GT(value, 0); value = 10000; - ASSERT(0 == uv_recv_buffer_size(handle, &value)); + ASSERT_OK(uv_recv_buffer_size(handle, &value)); value = 0; - ASSERT(0 == uv_recv_buffer_size(handle, &value)); + ASSERT_OK(uv_recv_buffer_size(handle, &value)); /* linux sets double the value */ ASSERT(value == 10000 || value == 20000); } @@ -56,21 +56,21 @@ static void check_buffer_size(uv_handle_t* handle) { TEST_IMPL(socket_buffer_size) { struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &tcp)); - ASSERT(0 == uv_tcp_bind(&tcp, (struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &tcp)); + ASSERT_OK(uv_tcp_bind(&tcp, (struct sockaddr*) &addr, 0)); check_buffer_size((uv_handle_t*) &tcp); uv_close((uv_handle_t*) &tcp, close_cb); - ASSERT(0 == uv_udp_init(uv_default_loop(), &udp)); - ASSERT(0 == uv_udp_bind(&udp, (struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_udp_init(uv_default_loop(), &udp)); + ASSERT_OK(uv_udp_bind(&udp, (struct sockaddr*) &addr, 0)); check_buffer_size((uv_handle_t*) &udp); uv_close((uv_handle_t*) &udp, close_cb); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(close_cb_called == 2); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-spawn.c b/deps/uv/test/test-spawn.c index 5e84dcdbb11de7..bbb7cb498bacf2 100644 --- a/deps/uv/test/test-spawn.c +++ b/deps/uv/test/test-spawn.c @@ -65,8 +65,8 @@ static void exit_cb(uv_process_t* process, int term_signal) { printf("exit_cb\n"); exit_cb_called++; - ASSERT(exit_status == 1); - ASSERT(term_signal == 0); + ASSERT_EQ(1, exit_status); + ASSERT_OK(term_signal); uv_close((uv_handle_t*) process, close_cb); } @@ -86,9 +86,9 @@ static void kill_cb(uv_process_t* process, printf("exit_cb\n"); exit_cb_called++; #ifdef _WIN32 - ASSERT(exit_status == 1); + ASSERT_EQ(1, exit_status); #else - ASSERT(exit_status == 0); + ASSERT_OK(exit_status); #endif #if defined(__APPLE__) || defined(__MVS__) /* @@ -108,7 +108,7 @@ static void kill_cb(uv_process_t* process, * This process should be dead. */ err = uv_kill(process->pid, 0); - ASSERT(err == UV_ESRCH); + ASSERT_EQ(err, UV_ESRCH); } static void detach_failure_cb(uv_process_t* process, @@ -130,7 +130,7 @@ static void on_read(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { if (nread > 0) { output_used += nread; } else if (nread < 0) { - ASSERT(nread == UV_EOF); + ASSERT_EQ(nread, UV_EOF); uv_close((uv_handle_t*) tcp, close_cb); } } @@ -143,20 +143,20 @@ static void on_read_once(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); uv_close((uv_handle_t*) req->handle, close_cb); } static void write_null_cb(uv_write_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); } static void init_process_options(char* test, uv_exit_cb exit_cb) { /* Note spawn_helper1 defined in test/run-tests.c */ int r = uv_exepath(exepath, &exepath_size); - ASSERT(r == 0); + ASSERT_OK(r); exepath[exepath_size] = '\0'; args[0] = exepath; args[1] = test; @@ -189,9 +189,9 @@ TEST_IMPL(spawn_fails) { r = uv_spawn(uv_default_loop(), &process, &options); ASSERT(r == UV_ENOENT || r == UV_EACCES); - ASSERT(0 == uv_is_active((uv_handle_t*) &process)); + ASSERT_OK(uv_is_active((uv_handle_t*) &process)); uv_close((uv_handle_t*) &process, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -209,19 +209,19 @@ TEST_IMPL(spawn_fails_check_for_waitpid_cleanup) { r = uv_spawn(uv_default_loop(), &process, &options); ASSERT(r == UV_ENOENT || r == UV_EACCES); - ASSERT(0 == uv_is_active((uv_handle_t*) &process)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_is_active((uv_handle_t*) &process)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); /* verify the child is successfully cleaned up within libuv */ do err = waitpid(process.pid, &status, 0); while (err == -1 && errno == EINTR); - ASSERT(err == -1); - ASSERT(errno == ECHILD); + ASSERT_EQ(err, -1); + ASSERT_EQ(errno, ECHILD); uv_close((uv_handle_t*) &process, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -247,11 +247,11 @@ TEST_IMPL(spawn_empty_env) { options.env = env; env[0] = NULL; - ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_spawn(uv_default_loop(), &process, &options)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -264,13 +264,13 @@ TEST_IMPL(spawn_exit_code) { init_process_options("spawn_helper1", exit_cb); r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -292,18 +292,18 @@ TEST_IMPL(spawn_stdout) { options.stdio_count = 2; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */ + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(2, close_cb_called); /* Once for process once for the pipe. */ printf("output is: %s", output); - ASSERT(strcmp("hello world\n", output) == 0); + ASSERT_OK(strcmp("hello world\n", output)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -324,7 +324,7 @@ TEST_IMPL(spawn_stdout_to_file) { r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL); - ASSERT(r != -1); + ASSERT_NE(r, -1); uv_fs_req_cleanup(&fs_req); file = r; @@ -336,25 +336,25 @@ TEST_IMPL(spawn_stdout_to_file) { options.stdio_count = 2; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); buf = uv_buf_init(output, sizeof(output)); r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL); - ASSERT(r == 12); + ASSERT_EQ(12, r); uv_fs_req_cleanup(&fs_req); r = uv_fs_close(NULL, &fs_req, file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&fs_req); printf("output is: %s", output); - ASSERT(strcmp("hello world\n", output) == 0); + ASSERT_OK(strcmp("hello world\n", output)); /* Cleanup. */ unlink("stdout_file"); @@ -378,7 +378,7 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file) { r = uv_fs_open(NULL, &fs_req, "stdout_file", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL); - ASSERT(r != -1); + ASSERT_NE(r, -1); uv_fs_req_cleanup(&fs_req); file = r; @@ -392,25 +392,25 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file) { options.stdio_count = 3; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); buf = uv_buf_init(output, sizeof(output)); r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL); - ASSERT(r == 27); + ASSERT_EQ(27, r); uv_fs_req_cleanup(&fs_req); r = uv_fs_close(NULL, &fs_req, file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&fs_req); printf("output is: %s", output); - ASSERT(strcmp("hello world\nhello errworld\n", output) == 0); + ASSERT_OK(strcmp("hello world\nhello errworld\n", output)); /* Cleanup. */ unlink("stdout_file"); @@ -440,10 +440,10 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file2) { O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL); - ASSERT(r != -1); + ASSERT_NE(r, -1); uv_fs_req_cleanup(&fs_req); file = dup2(r, STDERR_FILENO); - ASSERT(file != -1); + ASSERT_NE(file, -1); options.stdio = stdio; options.stdio[0].flags = UV_IGNORE; @@ -454,25 +454,25 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file2) { options.stdio_count = 3; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); buf = uv_buf_init(output, sizeof(output)); r = uv_fs_read(NULL, &fs_req, file, &buf, 1, 0, NULL); - ASSERT(r == 27); + ASSERT_EQ(27, r); uv_fs_req_cleanup(&fs_req); r = uv_fs_close(NULL, &fs_req, file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&fs_req); printf("output is: %s", output); - ASSERT(strcmp("hello world\nhello errworld\n", output) == 0); + ASSERT_OK(strcmp("hello world\nhello errworld\n", output)); /* Cleanup. */ unlink("stdout_file"); @@ -507,18 +507,18 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file_swap) { O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL); - ASSERT(r != -1); + ASSERT_NE(r, -1); uv_fs_req_cleanup(&fs_req); stdout_file = dup2(r, STDOUT_FILENO); - ASSERT(stdout_file != -1); + ASSERT_NE(stdout_file, -1); /* open 'stderr_file' and replace STDERR_FILENO with it */ r = uv_fs_open(NULL, &fs_req, "stderr_file", O_CREAT | O_RDWR, S_IRUSR | S_IWUSR, NULL); - ASSERT(r != -1); + ASSERT_NE(r, -1); uv_fs_req_cleanup(&fs_req); stderr_file = dup2(r, STDERR_FILENO); - ASSERT(stderr_file != -1); + ASSERT_NE(stderr_file, -1); /* now we're going to swap them: the child process' stdout will be our * stderr_file and vice versa */ @@ -531,39 +531,39 @@ TEST_IMPL(spawn_stdout_and_stderr_to_file_swap) { options.stdio_count = 3; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); buf = uv_buf_init(output, sizeof(output)); /* check the content of stdout_file */ r = uv_fs_read(NULL, &fs_req, stdout_file, &buf, 1, 0, NULL); - ASSERT(r >= 15); + ASSERT_GE(r, 15); uv_fs_req_cleanup(&fs_req); r = uv_fs_close(NULL, &fs_req, stdout_file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&fs_req); printf("output is: %s", output); - ASSERT(strncmp("hello errworld\n", output, 15) == 0); + ASSERT_OK(strncmp("hello errworld\n", output, 15)); /* check the content of stderr_file */ r = uv_fs_read(NULL, &fs_req, stderr_file, &buf, 1, 0, NULL); - ASSERT(r >= 12); + ASSERT_GE(r, 12); uv_fs_req_cleanup(&fs_req); r = uv_fs_close(NULL, &fs_req, stderr_file, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_fs_req_cleanup(&fs_req); printf("output is: %s", output); - ASSERT(strncmp("hello world\n", output, 12) == 0); + ASSERT_OK(strncmp("hello world\n", output, 12)); /* Cleanup. */ unlink("stdout_file"); @@ -598,22 +598,22 @@ TEST_IMPL(spawn_stdin) { options.stdio_count = 2; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); buf.base = buffer; buf.len = sizeof(buffer); r = uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 3); /* Once for process twice for the pipe. */ - ASSERT(strcmp(buffer, output) == 0); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(3, close_cb_called); /* Once for process twice for the pipe. */ + ASSERT_OK(strcmp(buffer, output)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -637,18 +637,18 @@ TEST_IMPL(spawn_stdio_greater_than_3) { options.stdio_count = 4; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &pipe, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */ + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(2, close_cb_called); /* Once for process once for the pipe. */ printf("output from stdio[3] is: %s", output); - ASSERT(strcmp("fourth stdio!\n", output) == 0); + ASSERT_OK(strcmp("fourth stdio!\n", output)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -661,7 +661,7 @@ int spawn_tcp_server_helper(void) { int r; r = uv_tcp_init(uv_default_loop(), &tcp); - ASSERT(r == 0); + ASSERT_OK(r); #ifdef _WIN32 handle = _get_osfhandle(3); @@ -669,13 +669,13 @@ int spawn_tcp_server_helper(void) { handle = 3; #endif r = uv_tcp_open(&tcp, handle); - ASSERT(r == 0); + ASSERT_OK(r); /* Make sure that we can listen on a socket that was * passed down from the parent process */ r = uv_listen((uv_stream_t*) &tcp, SOMAXCONN, NULL); - ASSERT(r == 0); + ASSERT_OK(r); return 1; } @@ -692,21 +692,21 @@ TEST_IMPL(spawn_tcp_server) { init_process_options("spawn_tcp_server_helper", exit_cb); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); fd = -1; r = uv_tcp_init_ex(uv_default_loop(), &tcp_server, AF_INET); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); #ifdef _WIN32 r = uv_fileno((uv_handle_t*) &tcp_server, &handle); fd = _open_osfhandle((intptr_t) handle, 0); #else r = uv_fileno((uv_handle_t*) &tcp_server, &fd); #endif - ASSERT(r == 0); - ASSERT(fd > 0); + ASSERT_OK(r); + ASSERT_GT(fd, 0); options.stdio = stdio; options.stdio[0].flags = UV_INHERIT_FD; @@ -720,13 +720,13 @@ TEST_IMPL(spawn_tcp_server) { options.stdio_count = 4; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -742,13 +742,13 @@ TEST_IMPL(spawn_ignored_stdio) { options.stdio_count = 0; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -761,19 +761,19 @@ TEST_IMPL(spawn_and_kill) { init_process_options("spawn_helper4", kill_cb); r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, timer_cb, 500, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* Once for process and once for timer. */ + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(2, close_cb_called); /* Once for process and once for timer. */ MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -795,25 +795,25 @@ TEST_IMPL(spawn_preserve_env) { options.stdio_count = 2; r = putenv("ENV_TEST=testval"); - ASSERT(r == 0); + ASSERT_OK(r); /* Explicitly set options.env to NULL to test for env clobbering. */ options.env = NULL; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(2, close_cb_called); printf("output is: %s", output); - ASSERT(strcmp("testval", output) == 0); + ASSERT_OK(strcmp("testval", output)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -828,22 +828,22 @@ TEST_IMPL(spawn_detached) { options.flags |= UV_PROCESS_DETACHED; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); uv_unref((uv_handle_t*) &process); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 0); + ASSERT_OK(exit_cb_called); - ASSERT(process.pid == uv_process_get_pid(&process)); + ASSERT_EQ(process.pid, uv_process_get_pid(&process)); r = uv_kill(process.pid, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_kill(process.pid, SIGTERM); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -861,13 +861,13 @@ TEST_IMPL(spawn_and_kill_with_std) { init_process_options("spawn_helper4", kill_cb); r = uv_pipe_init(uv_default_loop(), &in, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_init(uv_default_loop(), &out, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_init(uv_default_loop(), &err, 0); - ASSERT(r == 0); + ASSERT_OK(r); options.stdio = stdio; options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE; @@ -879,29 +879,29 @@ TEST_IMPL(spawn_and_kill_with_std) { options.stdio_count = 3; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); buf = uv_buf_init(message, sizeof message); r = uv_write(&write, (uv_stream_t*) &in, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &err, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, timer_cb, 500, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 5); /* process x 1, timer x 1, stdio x 3. */ + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(5, close_cb_called); /* process x 1, timer x 1, stdio x 3. */ MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -928,27 +928,27 @@ TEST_IMPL(spawn_and_ping) { options.stdio_count = 2; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); /* Sending signum == 0 should check if the * child process is still alive, not kill it. */ r = uv_process_kill(&process, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 0); + ASSERT_OK(exit_cb_called); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(strcmp(output, "TEST") == 0); + ASSERT_EQ(1, exit_cb_called); + ASSERT_OK(strcmp(output, "TEST")); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -975,27 +975,27 @@ TEST_IMPL(spawn_same_stdout_stderr) { options.stdio_count = 2; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); /* Sending signum == 0 should check if the * child process is still alive, not kill it. */ r = uv_process_kill(&process, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 0); + ASSERT_OK(exit_cb_called); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(strcmp(output, "TEST") == 0); + ASSERT_EQ(1, exit_cb_called); + ASSERT_OK(strcmp(output, "TEST")); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1019,15 +1019,15 @@ TEST_IMPL(spawn_closed_process_io) { close(0); /* Close process stdin. */ - ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options)); + ASSERT_OK(uv_spawn(uv_default_loop(), &process, &options)); buf = uv_buf_init(buffer, sizeof(buffer)); - ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb)); + ASSERT_OK(uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_cb)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* process, child stdin */ + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(2, close_cb_called); /* process, child stdin */ MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1049,39 +1049,39 @@ TEST_IMPL(kill) { sigset_t set; sigemptyset(&set); sigaddset(&set, SIGTERM); - ASSERT(0 == pthread_sigmask(SIG_BLOCK, &set, NULL)); + ASSERT_OK(pthread_sigmask(SIG_BLOCK, &set, NULL)); } - ASSERT(SIG_ERR != signal(SIGTERM, SIG_IGN)); + ASSERT_NE(SIG_ERR, signal(SIGTERM, SIG_IGN)); #endif r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); #ifndef _WIN32 { sigset_t set; sigemptyset(&set); sigaddset(&set, SIGTERM); - ASSERT(0 == pthread_sigmask(SIG_UNBLOCK, &set, NULL)); + ASSERT_OK(pthread_sigmask(SIG_UNBLOCK, &set, NULL)); } - ASSERT(SIG_ERR != signal(SIGTERM, SIG_DFL)); + ASSERT_NE(SIG_ERR, signal(SIGTERM, SIG_DFL)); #endif /* Sending signum == 0 should check if the * child process is still alive, not kill it. */ r = uv_kill(process.pid, 0); - ASSERT(r == 0); + ASSERT_OK(r); /* Kill the process. */ r = uv_kill(process.pid, SIGTERM); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1119,21 +1119,21 @@ TEST_IMPL(spawn_detect_pipe_name_collisions_on_windows) { 65536, 0, NULL); - ASSERT(pipe_handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(pipe_handle, INVALID_HANDLE_VALUE); r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* Once for process once for the pipe. */ + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(2, close_cb_called); /* Once for process once for the pipe. */ printf("output is: %s", output); - ASSERT(strcmp("hello world\n", output) == 0); + ASSERT_OK(strcmp("hello world\n", output)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1197,7 +1197,7 @@ TEST_IMPL(argument_escaping) { cracked = CommandLineToArgvW(command_line, &num_args); for (i = 0; i < num_args; ++i) { wprintf(L"%d: %s\t%s\n", i, test_str[i], cracked[i]); - ASSERT(wcscmp(test_str[i], cracked[i]) == 0); + ASSERT_OK(wcscmp(test_str[i], cracked[i])); } LocalFree(cracked); @@ -1207,19 +1207,19 @@ TEST_IMPL(argument_escaping) { free(test_output); result = make_program_args(verbatim, 1, &verbatim_output); - ASSERT(result == 0); + ASSERT_OK(result); result = make_program_args(verbatim, 0, &non_verbatim_output); - ASSERT(result == 0); + ASSERT_OK(result); wprintf(L" verbatim_output: %s\n", verbatim_output); wprintf(L"non_verbatim_output: %s\n", non_verbatim_output); - ASSERT(wcscmp(verbatim_output, - L"cmd.exe /c c:\\path\\to\\node.exe --eval " - L"\"require('c:\\\\path\\\\to\\\\test.js')\"") == 0); - ASSERT(wcscmp(non_verbatim_output, - L"cmd.exe /c \"c:\\path\\to\\node.exe --eval " - L"\\\"require('c:\\\\path\\\\to\\\\test.js')\\\"\"") == 0); + ASSERT_OK(wcscmp(verbatim_output, + L"cmd.exe /c c:\\path\\to\\node.exe --eval " + L"\"require('c:\\\\path\\\\to\\\\test.js')\"")); + ASSERT_OK(wcscmp(non_verbatim_output, + L"cmd.exe /c \"c:\\path\\to\\node.exe --eval " + L"\\\"require('c:\\\\path\\\\to\\\\test.js')\\\"\"")); free(verbatim_output); free(non_verbatim_output); @@ -1303,7 +1303,7 @@ TEST_IMPL(environment_creation) { } result = make_program_env(environment, &env); - ASSERT(result == 0); + ASSERT_OK(result); for (str = env, prev = NULL; *str; prev = str, str += wcslen(str) + 1) { int found = 0; @@ -1327,7 +1327,7 @@ TEST_IMPL(environment_creation) { } if (prev) { /* verify sort order */ #if !defined(__MINGW32__) || defined(__MINGW64_VERSION_MAJOR) - ASSERT(CompareStringOrdinal(prev, -1, str, -1, TRUE) == 1); + ASSERT_EQ(1, CompareStringOrdinal(prev, -1, str, -1, TRUE)); #endif } ASSERT(found); /* verify that we expected this variable */ @@ -1359,9 +1359,37 @@ TEST_IMPL(spawn_with_an_odd_path) { options.file = options.args[0] = "program-that-had-better-not-exist"; r = uv_spawn(uv_default_loop(), &process, &options); ASSERT(r == UV_ENOENT || r == UV_EACCES); - ASSERT(0 == uv_is_active((uv_handle_t*) &process)); + ASSERT_OK(uv_is_active((uv_handle_t*) &process)); uv_close((uv_handle_t*) &process, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + + MAKE_VALGRIND_HAPPY(uv_default_loop()); + return 0; +} + + +TEST_IMPL(spawn_no_path) { + char* env[1]; + WCHAR* old_path = NULL; + DWORD old_path_len; + + if ((old_path_len = GetEnvironmentVariableW(L"PATH", NULL, 0)) > 0) { + old_path = malloc(old_path_len * sizeof(WCHAR)); + GetEnvironmentVariableW(L"PATH", old_path, old_path_len); + SetEnvironmentVariableW(L"PATH", NULL); + } + + init_process_options("spawn_helper1", exit_cb); + options.env = env; + env[0] = NULL; + + ASSERT_OK(uv_spawn(uv_default_loop(), &process, &options)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); + + SetEnvironmentVariableW(L"PATH", old_path); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1398,13 +1426,13 @@ TEST_IMPL(spawn_setuid_setgid) { if (r == UV_EACCES) RETURN_SKIP("user 'nobody' cannot access the test runner"); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1424,8 +1452,8 @@ TEST_IMPL(spawn_setuid_fails) { struct passwd* pw; pw = getpwnam("nobody"); ASSERT_NOT_NULL(pw); - ASSERT(0 == setgid(pw->pw_gid)); - ASSERT(0 == setuid(pw->pw_uid)); + ASSERT_OK(setgid(pw->pw_gid)); + ASSERT_OK(setuid(pw->pw_uid)); } #endif /* !__PASE__ */ @@ -1449,15 +1477,15 @@ TEST_IMPL(spawn_setuid_fails) { r = uv_spawn(uv_default_loop(), &process, &options); #if defined(__CYGWIN__) - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); #else - ASSERT(r == UV_EPERM); + ASSERT_EQ(r, UV_EPERM); #endif r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); + ASSERT_OK(close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1475,8 +1503,8 @@ TEST_IMPL(spawn_setgid_fails) { struct passwd* pw; pw = getpwnam("nobody"); ASSERT_NOT_NULL(pw); - ASSERT(0 == setgid(pw->pw_gid)); - ASSERT(0 == setuid(pw->pw_uid)); + ASSERT_OK(setgid(pw->pw_gid)); + ASSERT_OK(setuid(pw->pw_uid)); } #endif /* !__PASE__ */ @@ -1494,15 +1522,15 @@ TEST_IMPL(spawn_setgid_fails) { r = uv_spawn(uv_default_loop(), &process, &options); #if defined(__CYGWIN__) || defined(__MVS__) - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); #else - ASSERT(r == UV_EPERM); + ASSERT_EQ(r, UV_EPERM); #endif r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); + ASSERT_OK(close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1528,12 +1556,12 @@ TEST_IMPL(spawn_setuid_fails) { options.uid = (uv_uid_t) -42424242; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == UV_ENOTSUP); + ASSERT_EQ(r, UV_ENOTSUP); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); + ASSERT_OK(close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1549,12 +1577,12 @@ TEST_IMPL(spawn_setgid_fails) { options.gid = (uv_gid_t) -42424242; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == UV_ENOTSUP); + ASSERT_EQ(r, UV_ENOTSUP); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); + ASSERT_OK(close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1564,12 +1592,12 @@ TEST_IMPL(spawn_setgid_fails) { TEST_IMPL(spawn_auto_unref) { init_process_options("spawn_helper1", NULL); - ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == uv_is_closing((uv_handle_t*) &process)); + ASSERT_OK(uv_spawn(uv_default_loop(), &process, &options)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_is_closing((uv_handle_t*) &process)); uv_close((uv_handle_t*) &process, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(1 == uv_is_closing((uv_handle_t*) &process)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_EQ(1, uv_is_closing((uv_handle_t*) &process)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; } @@ -1594,13 +1622,13 @@ TEST_IMPL(spawn_fs_open) { #endif r = uv_fs_open(NULL, &fs_req, dev_null, O_RDWR, 0, NULL); - ASSERT(r != -1); + ASSERT_NE(r, -1); fd = uv_get_osfhandle((uv_file) fs_req.result); uv_fs_req_cleanup(&fs_req); init_process_options("spawn_helper8", exit_cb); - ASSERT(0 == uv_pipe_init(uv_default_loop(), &in, 0)); + ASSERT_OK(uv_pipe_init(uv_default_loop(), &in, 0)); options.stdio = stdio; options.stdio[0].flags = UV_CREATE_PIPE | UV_READABLE_PIPE; @@ -1609,29 +1637,35 @@ TEST_IMPL(spawn_fs_open) { /* make an inheritable copy */ #ifdef _WIN32 - ASSERT(0 != DuplicateHandle(GetCurrentProcess(), fd, GetCurrentProcess(), &dup_fd, - 0, /* inherit */ TRUE, DUPLICATE_SAME_ACCESS)); + ASSERT_NE(0, DuplicateHandle(GetCurrentProcess(), fd, GetCurrentProcess(), &dup_fd, + 0, /* inherit */ TRUE, DUPLICATE_SAME_ACCESS)); kernelbase_module = GetModuleHandleA("kernelbase.dll"); pCompareObjectHandles = (sCompareObjectHandles) GetProcAddress(kernelbase_module, "CompareObjectHandles"); - ASSERT(pCompareObjectHandles == NULL || pCompareObjectHandles(fd, dup_fd)); + ASSERT_NE(pCompareObjectHandles == NULL || + pCompareObjectHandles(fd, dup_fd), + 0); #else dup_fd = dup(fd); #endif - ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options)); + ASSERT_OK(uv_spawn(uv_default_loop(), &process, &options)); buf = uv_buf_init((char*) &fd, sizeof(fd)); - ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &in, &buf, 1, write_null_cb)); + ASSERT_OK(uv_write(&write_req, + (uv_stream_t*) &in, + &buf, + 1, + write_null_cb)); buf = uv_buf_init((char*) &dup_fd, sizeof(fd)); - ASSERT(0 == uv_write(&write_req2, (uv_stream_t*) &in, &buf, 1, write_cb)); + ASSERT_OK(uv_write(&write_req2, (uv_stream_t*) &in, &buf, 1, write_cb)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(0 == uv_fs_close(NULL, &fs_req, r, NULL)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_fs_close(NULL, &fs_req, r, NULL)); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 2); /* One for `in`, one for process */ + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(2, close_cb_called); /* One for `in`, one for process */ MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1647,9 +1681,9 @@ TEST_IMPL(closed_fd_events) { bufs[0] = uv_buf_init("", 1); /* create a pipe and share it with a child process */ - ASSERT(0 == uv_pipe(fd, 0, 0)); - ASSERT(fd[0] > 2); - ASSERT(fd[1] > 2); + ASSERT_OK(uv_pipe(fd, 0, 0)); + ASSERT_GT(fd[0], 2); + ASSERT_GT(fd[1], 2); /* spawn_helper4 blocks indefinitely. */ init_process_options("spawn_helper4", exit_cb); @@ -1660,49 +1694,51 @@ TEST_IMPL(closed_fd_events) { options.stdio[1].flags = UV_IGNORE; options.stdio[2].flags = UV_IGNORE; - ASSERT(0 == uv_spawn(uv_default_loop(), &process, &options)); + ASSERT_OK(uv_spawn(uv_default_loop(), &process, &options)); uv_unref((uv_handle_t*) &process); /* read from the pipe with uv */ - ASSERT(0 == uv_pipe_init(uv_default_loop(), &pipe_handle, 0)); - ASSERT(0 == uv_pipe_open(&pipe_handle, fd[0])); + ASSERT_OK(uv_pipe_init(uv_default_loop(), &pipe_handle, 0)); + ASSERT_OK(uv_pipe_open(&pipe_handle, fd[0])); /* uv_pipe_open() takes ownership of the file descriptor. */ fd[0] = -1; - ASSERT(0 == uv_read_start((uv_stream_t*) &pipe_handle, on_alloc, on_read_once)); + ASSERT_OK(uv_read_start((uv_stream_t*) &pipe_handle, + on_alloc, + on_read_once)); - ASSERT(1 == uv_fs_write(NULL, &req, fd[1], bufs, 1, -1, NULL)); - ASSERT(req.result == 1); + ASSERT_EQ(1, uv_fs_write(NULL, &req, fd[1], bufs, 1, -1, NULL)); + ASSERT_EQ(1, req.result); uv_fs_req_cleanup(&req); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_ONCE)); /* should have received just one byte */ - ASSERT(output_used == 1); + ASSERT_EQ(1, output_used); /* close the pipe and see if we still get events */ uv_close((uv_handle_t*) &pipe_handle, close_cb); - ASSERT(1 == uv_fs_write(NULL, &req, fd[1], bufs, 1, -1, NULL)); - ASSERT(req.result == 1); + ASSERT_EQ(1, uv_fs_write(NULL, &req, fd[1], bufs, 1, -1, NULL)); + ASSERT_EQ(1, req.result); uv_fs_req_cleanup(&req); - ASSERT(0 == uv_timer_init(uv_default_loop(), &timer)); - ASSERT(0 == uv_timer_start(&timer, timer_counter_cb, 10, 0)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &timer)); + ASSERT_OK(uv_timer_start(&timer, timer_counter_cb, 10, 0)); /* see if any spurious events interrupt the timer */ if (1 == uv_run(uv_default_loop(), UV_RUN_ONCE)) /* have to run again to really trigger the timer */ - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_ONCE)); - ASSERT(timer_counter == 1); + ASSERT_EQ(1, timer_counter); /* cleanup */ - ASSERT(0 == uv_process_kill(&process, SIGTERM)); + ASSERT_OK(uv_process_kill(&process, SIGTERM)); #ifdef _WIN32 - ASSERT(0 == _close(fd[1])); + ASSERT_OK(_close(fd[1])); #else - ASSERT(0 == close(fd[1])); + ASSERT_OK(close(fd[1])); #endif MAKE_VALGRIND_HAPPY(uv_default_loop()); @@ -1767,13 +1803,13 @@ TEST_IMPL(spawn_reads_child_path) { options.env = env; r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1799,27 +1835,27 @@ TEST_IMPL(spawn_inherit_streams) { init_process_options("spawn_helper9", exit_cb); loop = uv_default_loop(); - ASSERT(uv_pipe_init(loop, &pipe_stdin_child, 0) == 0); - ASSERT(uv_pipe_init(loop, &pipe_stdout_child, 0) == 0); - ASSERT(uv_pipe_init(loop, &pipe_stdin_parent, 0) == 0); - ASSERT(uv_pipe_init(loop, &pipe_stdout_parent, 0) == 0); - - ASSERT(uv_pipe(fds_stdin, 0, 0) == 0); - ASSERT(uv_pipe(fds_stdout, 0, 0) == 0); - - ASSERT(uv_pipe_open(&pipe_stdin_child, fds_stdin[0]) == 0); - ASSERT(uv_pipe_open(&pipe_stdout_child, fds_stdout[1]) == 0); - ASSERT(uv_pipe_open(&pipe_stdin_parent, fds_stdin[1]) == 0); - ASSERT(uv_pipe_open(&pipe_stdout_parent, fds_stdout[0]) == 0); + ASSERT_OK(uv_pipe_init(loop, &pipe_stdin_child, 0)); + ASSERT_OK(uv_pipe_init(loop, &pipe_stdout_child, 0)); + ASSERT_OK(uv_pipe_init(loop, &pipe_stdin_parent, 0)); + ASSERT_OK(uv_pipe_init(loop, &pipe_stdout_parent, 0)); + + ASSERT_OK(uv_pipe(fds_stdin, 0, 0)); + ASSERT_OK(uv_pipe(fds_stdout, 0, 0)); + + ASSERT_OK(uv_pipe_open(&pipe_stdin_child, fds_stdin[0])); + ASSERT_OK(uv_pipe_open(&pipe_stdout_child, fds_stdout[1])); + ASSERT_OK(uv_pipe_open(&pipe_stdin_parent, fds_stdin[1])); + ASSERT_OK(uv_pipe_open(&pipe_stdout_parent, fds_stdout[0])); ASSERT(uv_is_readable((uv_stream_t*) &pipe_stdin_child)); ASSERT(uv_is_writable((uv_stream_t*) &pipe_stdout_child)); ASSERT(uv_is_writable((uv_stream_t*) &pipe_stdin_parent)); ASSERT(uv_is_readable((uv_stream_t*) &pipe_stdout_parent)); /* Some systems (SVR4) open a bidirectional pipe, most don't. */ bidir = uv_is_writable((uv_stream_t*) &pipe_stdin_child); - ASSERT(uv_is_readable((uv_stream_t*) &pipe_stdout_child) == bidir); - ASSERT(uv_is_readable((uv_stream_t*) &pipe_stdin_parent) == bidir); - ASSERT(uv_is_writable((uv_stream_t*) &pipe_stdout_parent) == bidir); + ASSERT_EQ(uv_is_readable((uv_stream_t*) &pipe_stdout_child), bidir); + ASSERT_EQ(uv_is_readable((uv_stream_t*) &pipe_stdin_parent), bidir); + ASSERT_EQ(uv_is_writable((uv_stream_t*) &pipe_stdout_parent), bidir); child_stdio[0].flags = UV_INHERIT_STREAM; child_stdio[0].data.stream = (uv_stream_t *) &pipe_stdin_child; @@ -1830,7 +1866,7 @@ TEST_IMPL(spawn_inherit_streams) { options.stdio = child_stdio; options.stdio_count = 2; - ASSERT(uv_spawn(loop, &child_req, &options) == 0); + ASSERT_OK(uv_spawn(loop, &child_req, &options)); uv_close((uv_handle_t*) &pipe_stdin_child, NULL); uv_close((uv_handle_t*) &pipe_stdout_child, NULL); @@ -1845,19 +1881,19 @@ TEST_IMPL(spawn_inherit_streams) { &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &pipe_stdout_parent, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 3); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(3, close_cb_called); r = memcmp(ubuf, output, sizeof ubuf); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -1898,7 +1934,7 @@ TEST_IMPL(spawn_exercise_sigchld_issue) { init_process_options("spawn_helper1", exit_cb); r = uv_spawn(uv_default_loop(), &process, &options); - ASSERT_EQ(r, 0); + ASSERT_OK(r); // This test exercises a bug in the darwin kernel that causes SIGCHLD not to // be delivered sometimes. Calling posix_spawn many times increases the @@ -1917,10 +1953,10 @@ TEST_IMPL(spawn_exercise_sigchld_issue) { } r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(r, 0); + ASSERT_OK(r); - ASSERT_EQ(exit_cb_called, 1); - ASSERT_EQ(close_cb_called, 101); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(101, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -1939,14 +1975,14 @@ void spawn_stdin_stdout(void) { if (r == 0) { return; } - ASSERT(r > 0); + ASSERT_GT(r, 0); c = r; pbuf = buf; while (c) { do { w = write(1, pbuf, (size_t)c); } while (w == -1 && errno == EINTR); - ASSERT(w >= 0); + ASSERT_GE(w, 0); pbuf = pbuf + w; c = c - w; } @@ -1958,14 +1994,14 @@ void spawn_stdin_stdout(void) { char* pbuf; HANDLE h_stdin = GetStdHandle(STD_INPUT_HANDLE); HANDLE h_stdout = GetStdHandle(STD_OUTPUT_HANDLE); - ASSERT(h_stdin != INVALID_HANDLE_VALUE); - ASSERT(h_stdout != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(h_stdin, INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(h_stdout, INVALID_HANDLE_VALUE); for (;;) { DWORD n_read; DWORD n_written; DWORD to_write; if (!ReadFile(h_stdin, buf, sizeof buf, &n_read, NULL)) { - ASSERT(GetLastError() == ERROR_BROKEN_PIPE); + ASSERT_EQ(GetLastError(), ERROR_BROKEN_PIPE); return; } to_write = n_read; @@ -1985,7 +2021,7 @@ TEST_IMPL(spawn_relative_path) { init_process_options("spawn_helper1", exit_cb); exepath_size = sizeof(exepath) - 2; - ASSERT_EQ(0, uv_exepath(exepath, &exepath_size)); + ASSERT_OK(uv_exepath(exepath, &exepath_size)); exepath[exepath_size] = '\0'; /* Poor man's basename(3). */ @@ -2003,8 +2039,8 @@ TEST_IMPL(spawn_relative_path) { options.cwd = exepath; options.file = options.args[0] = sep + 1; - ASSERT_EQ(0, uv_spawn(uv_default_loop(), &process, &options)); - ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_spawn(uv_default_loop(), &process, &options)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); ASSERT_EQ(1, exit_cb_called); ASSERT_EQ(1, close_cb_called); diff --git a/deps/uv/test/test-stdio-over-pipes.c b/deps/uv/test/test-stdio-over-pipes.c index 1b7f17297cabb2..c41040ee2fdc78 100644 --- a/deps/uv/test/test-stdio-over-pipes.c +++ b/deps/uv/test/test-stdio-over-pipes.c @@ -52,8 +52,8 @@ static void exit_cb(uv_process_t* process, int term_signal) { printf("exit_cb\n"); exit_cb_called++; - ASSERT(exit_status == 0); - ASSERT(term_signal == 0); + ASSERT_OK(exit_status); + ASSERT_OK(term_signal); uv_close((uv_handle_t*)process, close_cb); uv_close((uv_handle_t*)&in, close_cb); uv_close((uv_handle_t*)&out, close_cb); @@ -62,7 +62,7 @@ static void exit_cb(uv_process_t* process, static void init_process_options(char* test, uv_exit_cb exit_cb) { int r = uv_exepath(exepath, &exepath_size); - ASSERT(r == 0); + ASSERT_OK(r); exepath[exepath_size] = '\0'; args[0] = exepath; args[1] = test; @@ -104,11 +104,11 @@ static void on_read(uv_stream_t* pipe, ssize_t nread, const uv_buf_t* rdbuf) { if (nread > 0) { output_used += nread; if (output_used % 12 == 0) { - ASSERT(memcmp("hello world\n", output, 12) == 0); + ASSERT_OK(memcmp("hello world\n", output, 12)); wrbuf = uv_buf_init(output, 12); req = malloc(sizeof(*req)); r = uv_write(req, (uv_stream_t*) &in, &wrbuf, 1, after_write); - ASSERT(r == 0); + ASSERT_OK(r); } } @@ -140,20 +140,20 @@ static void test_stdio_over_pipes(int overlapped) { options.stdio_count = 3; r = uv_spawn(loop, &process, &options); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*) &out, on_alloc, on_read); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(on_read_cb_called > 1); - ASSERT(after_write_cb_called == 2); - ASSERT(exit_cb_called == 1); - ASSERT(close_cb_called == 3); - ASSERT(memcmp("hello world\nhello world\n", output, 24) == 0); - ASSERT(output_used == 24); + ASSERT_GT(on_read_cb_called, 1); + ASSERT_EQ(2, after_write_cb_called); + ASSERT_EQ(1, exit_cb_called); + ASSERT_EQ(3, close_cb_called); + ASSERT_OK(memcmp("hello world\nhello world\n", output, 24)); + ASSERT_EQ(24, output_used); MAKE_VALGRIND_HAPPY(loop); } @@ -179,8 +179,8 @@ static uv_pipe_t stdin_pipe2; static uv_pipe_t stdout_pipe2; static void on_pipe_read(uv_stream_t* pipe, ssize_t nread, const uv_buf_t* buf) { - ASSERT(nread > 0); - ASSERT(memcmp("hello world\n", buf->base, nread) == 0); + ASSERT_GT(nread, 0); + ASSERT_OK(memcmp("hello world\n", buf->base, nread)); on_pipe_read_called++; free(buf->base); @@ -190,7 +190,7 @@ static void on_pipe_read(uv_stream_t* pipe, ssize_t nread, const uv_buf_t* buf) static void after_pipe_write(uv_write_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); after_write_called++; } @@ -222,17 +222,17 @@ int stdio_over_pipes_helper(void) { int r; uv_loop_t* loop = uv_default_loop(); - ASSERT(UV_NAMED_PIPE == uv_guess_handle(0)); - ASSERT(UV_NAMED_PIPE == uv_guess_handle(1)); + ASSERT_EQ(UV_NAMED_PIPE, uv_guess_handle(0)); + ASSERT_EQ(UV_NAMED_PIPE, uv_guess_handle(1)); r = uv_pipe_init(loop, &stdin_pipe1, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_init(loop, &stdout_pipe1, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_init(loop, &stdin_pipe2, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_pipe_init(loop, &stdout_pipe2, 0); - ASSERT(r == 0); + ASSERT_OK(r); uv_pipe_open(&stdin_pipe1, 0); uv_pipe_open(&stdout_pipe1, 1); @@ -256,15 +256,15 @@ int stdio_over_pipes_helper(void) { &buf[i], 1, after_pipe_write); - ASSERT(r == 0); + ASSERT_OK(r); } notify_parent_process(); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(after_write_called == 7 * (j + 1)); - ASSERT(on_pipe_read_called == j); - ASSERT(close_cb_called == 0); + ASSERT_EQ(after_write_called, 7 * (j + 1)); + ASSERT_EQ(on_pipe_read_called, j); + ASSERT_OK(close_cb_called); uv_ref((uv_handle_t*) &stdout_pipe1); uv_ref((uv_handle_t*) &stdin_pipe1); @@ -274,13 +274,13 @@ int stdio_over_pipes_helper(void) { r = uv_read_start((uv_stream_t*) (j == 0 ? &stdin_pipe1 : &stdin_pipe2), on_read_alloc, on_pipe_read); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(after_write_called == 7 * (j + 1)); - ASSERT(on_pipe_read_called == j + 1); - ASSERT(close_cb_called == 0); + ASSERT_EQ(after_write_called, 7 * (j + 1)); + ASSERT_EQ(on_pipe_read_called, j + 1); + ASSERT_OK(close_cb_called); } uv_close((uv_handle_t*)&stdin_pipe1, close_cb); @@ -290,9 +290,9 @@ int stdio_over_pipes_helper(void) { uv_run(loop, UV_RUN_DEFAULT); - ASSERT(after_write_called == 14); - ASSERT(on_pipe_read_called == 2); - ASSERT(close_cb_called == 4); + ASSERT_EQ(14, after_write_called); + ASSERT_EQ(2, on_pipe_read_called); + ASSERT_EQ(4, close_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-strscpy.c b/deps/uv/test/test-strscpy.c index 4e7db6ffec8ef2..b4699cff056137 100644 --- a/deps/uv/test/test-strscpy.c +++ b/deps/uv/test/test-strscpy.c @@ -29,25 +29,25 @@ TEST_IMPL(strscpy) { char d[4]; - ASSERT(0 == uv__strscpy(d, "", 0)); - ASSERT(0 == uv__strscpy(d, "x", 0)); + ASSERT_OK(uv__strscpy(d, "", 0)); + ASSERT_OK(uv__strscpy(d, "x", 0)); memset(d, 0, sizeof(d)); - ASSERT(1 == uv__strscpy(d, "x", sizeof(d))); - ASSERT(0 == memcmp(d, "x\0\0", sizeof(d))); + ASSERT_EQ(1, uv__strscpy(d, "x", sizeof(d))); + ASSERT_OK(memcmp(d, "x\0\0", sizeof(d))); memset(d, 0, sizeof(d)); - ASSERT(2 == uv__strscpy(d, "xy", sizeof(d))); - ASSERT(0 == memcmp(d, "xy\0", sizeof(d))); + ASSERT_EQ(2, uv__strscpy(d, "xy", sizeof(d))); + ASSERT_OK(memcmp(d, "xy\0", sizeof(d))); - ASSERT(3 == uv__strscpy(d, "xyz", sizeof(d))); - ASSERT(0 == memcmp(d, "xyz", sizeof(d))); + ASSERT_EQ(3, uv__strscpy(d, "xyz", sizeof(d))); + ASSERT_OK(memcmp(d, "xyz", sizeof(d))); - ASSERT(UV_E2BIG == uv__strscpy(d, "xyzz", sizeof(d))); - ASSERT(0 == memcmp(d, "xyz", sizeof(d))); + ASSERT_EQ(UV_E2BIG, uv__strscpy(d, "xyzz", sizeof(d))); + ASSERT_OK(memcmp(d, "xyz", sizeof(d))); - ASSERT(UV_E2BIG == uv__strscpy(d, "xyzzy", sizeof(d))); - ASSERT(0 == memcmp(d, "xyz", sizeof(d))); + ASSERT_EQ(UV_E2BIG, uv__strscpy(d, "xyzzy", sizeof(d))); + ASSERT_OK(memcmp(d, "xyz", sizeof(d))); return 0; } diff --git a/deps/uv/test/test-strtok.c b/deps/uv/test/test-strtok.c index 6c3d835914c388..f4e6cdf8b75a2b 100644 --- a/deps/uv/test/test-strtok.c +++ b/deps/uv/test/test-strtok.c @@ -56,7 +56,7 @@ const char* tokens[] = { }; #define ASSERT_STRCMP(x, y) \ - ASSERT((x != NULL && y != NULL && strcmp(x, y) == 0) || (x == y && x == NULL)) + ASSERT_NE((x != NULL && y != NULL && strcmp(x, y) == 0) || (x == y && x == NULL), 0) TEST_IMPL(strtok) { struct strtok_test_case tests[] = { @@ -74,13 +74,13 @@ TEST_IMPL(strtok) { char current_test[2048]; for (i = 0, j = 0; i < tests_len; i += 1) { - ASSERT(j < tokens_len); + ASSERT_LT(j, tokens_len); snprintf(current_test, sizeof(current_test), "%s", tests[i].str); tok_r = uv__strtok(current_test, tests[i].sep, &itr); ASSERT_STRCMP(tok_r, tokens[j]); j++; while (tok_r) { - ASSERT(j < tokens_len); + ASSERT_LT(j, tokens_len); tok_r = uv__strtok(NULL, tests[i].sep, &itr); ASSERT_STRCMP(tok_r, tokens[j]); j++; diff --git a/deps/uv/test/test-tcp-alloc-cb-fail.c b/deps/uv/test/test-tcp-alloc-cb-fail.c index a1b5e84d3b13dd..ff1cfcb844a70e 100644 --- a/deps/uv/test/test-tcp-alloc-cb-fail.c +++ b/deps/uv/test/test-tcp-alloc-cb-fail.c @@ -42,7 +42,7 @@ static void close_cb(uv_handle_t* handle) { } static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); } static void conn_alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { @@ -52,9 +52,9 @@ static void conn_alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { static void conn_read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { - ASSERT(nread == UV_ENOBUFS); + ASSERT_EQ(nread, UV_ENOBUFS); ASSERT_NULL(buf->base); - ASSERT(buf->len == 0); + ASSERT_OK(buf->len); uv_close((uv_handle_t*) &incoming, close_cb); uv_close((uv_handle_t*) &client, close_cb); @@ -65,23 +65,23 @@ static void connect_cb(uv_connect_t* req, int status) { int r; uv_buf_t buf; - ASSERT(status == 0); + ASSERT_OK(status); connect_cb_called++; buf = uv_buf_init(hello, sizeof(hello)); r = uv_write(&write_req, req->handle, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void connection_cb(uv_stream_t* tcp, int status) { - ASSERT(status == 0); + ASSERT_OK(status); - ASSERT(0 == uv_tcp_init(tcp->loop, &incoming)); - ASSERT(0 == uv_accept(tcp, (uv_stream_t*) &incoming)); - ASSERT(0 == uv_read_start((uv_stream_t*) &incoming, - conn_alloc_cb, - conn_read_cb)); + ASSERT_OK(uv_tcp_init(tcp->loop, &incoming)); + ASSERT_OK(uv_accept(tcp, (uv_stream_t*) &incoming)); + ASSERT_OK(uv_read_start((uv_stream_t*) &incoming, + conn_alloc_cb, + conn_read_cb)); connection_cb_called++; } @@ -90,11 +90,11 @@ static void connection_cb(uv_stream_t* tcp, int status) { static void start_server(void) { struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &server)); - ASSERT(0 == uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server, 128, connection_cb)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &server)); + ASSERT_OK(uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_listen((uv_stream_t*) &server, 128, connection_cb)); } @@ -104,19 +104,19 @@ TEST_IMPL(tcp_alloc_cb_fail) { start_server(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &client)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &client, - (struct sockaddr*) &addr, - connect_cb)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &client)); + ASSERT_OK(uv_tcp_connect(&connect_req, + &client, + (struct sockaddr*) &addr, + connect_cb)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(connect_cb_called == 1); - ASSERT(connection_cb_called == 1); - ASSERT(close_cb_called == 3); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, connection_cb_called); + ASSERT_EQ(3, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-bind-error.c b/deps/uv/test/test-tcp-bind-error.c index edb44c21459261..89e4e33993ffad 100644 --- a/deps/uv/test/test-tcp-bind-error.c +++ b/deps/uv/test/test-tcp-bind-error.c @@ -36,7 +36,7 @@ static void close_cb(uv_handle_t* handle) { static void connect_cb(uv_connect_t* req, int status) { - ASSERT(status == UV_EADDRINUSE); + ASSERT_EQ(status, UV_EADDRINUSE); uv_close((uv_handle_t*) req->handle, close_cb); connect_cb_called++; } @@ -53,24 +53,24 @@ TEST_IMPL(tcp_bind_error_addrinuse_connect) { * (greatest common denominator across platforms) but the connect callback * should receive an UV_EADDRINUSE error. */ - ASSERT(0 == uv_tcp_init(uv_default_loop(), &conn)); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_bind(&conn, (const struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &conn)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_tcp_bind(&conn, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT + 1, &addr)); - ASSERT(0 == uv_tcp_connect(&req, - &conn, - (const struct sockaddr*) &addr, - connect_cb)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT + 1, &addr)); + ASSERT_OK(uv_tcp_connect(&req, + &conn, + (const struct sockaddr*) &addr, + connect_cb)); addrlen = sizeof(addr); - ASSERT(UV_EADDRINUSE == uv_tcp_getsockname(&conn, - (struct sockaddr*) &addr, - &addrlen)); + ASSERT_EQ(UV_EADDRINUSE, uv_tcp_getsockname(&conn, + (struct sockaddr*) &addr, + &addrlen)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(connect_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -82,28 +82,28 @@ TEST_IMPL(tcp_bind_error_addrinuse_listen) { uv_tcp_t server1, server2; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server1, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_init(uv_default_loop(), &server2); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server2, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server1, 128, NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server2, 128, NULL); - ASSERT(r == UV_EADDRINUSE); + ASSERT_EQ(r, UV_EADDRINUSE); uv_close((uv_handle_t*)&server1, close_cb); uv_close((uv_handle_t*)&server2, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 2); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -115,10 +115,10 @@ TEST_IMPL(tcp_bind_error_addrnotavail_1) { uv_tcp_t server; int r; - ASSERT(0 == uv_ip4_addr("127.255.255.255", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.255.255.255", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); /* It seems that Linux is broken here - bind succeeds. */ r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); @@ -128,7 +128,7 @@ TEST_IMPL(tcp_bind_error_addrnotavail_1) { uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -140,18 +140,18 @@ TEST_IMPL(tcp_bind_error_addrnotavail_2) { uv_tcp_t server; int r; - ASSERT(0 == uv_ip4_addr("4.4.4.4", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("4.4.4.4", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == UV_EADDRNOTAVAIL); + ASSERT_EQ(r, UV_EADDRNOTAVAIL); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -168,15 +168,15 @@ TEST_IMPL(tcp_bind_error_fault) { garbage_addr = (struct sockaddr_in*) &garbage; r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) garbage_addr, 0); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -190,21 +190,21 @@ TEST_IMPL(tcp_bind_error_inval) { uv_tcp_t server; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr1)); - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT_2, &addr2)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr1)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT_2, &addr2)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr1, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr2, 0); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -216,12 +216,12 @@ TEST_IMPL(tcp_bind_localhost_ok) { uv_tcp_t server; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -233,12 +233,12 @@ TEST_IMPL(tcp_bind_invalid_flags) { uv_tcp_t server; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, UV_TCP_IPV6ONLY); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -250,9 +250,9 @@ TEST_IMPL(tcp_listen_without_bind) { uv_tcp_t server; r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server, 128, NULL); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -267,32 +267,32 @@ TEST_IMPL(tcp_bind_writable_flags) { uv_shutdown_t shutdown_req; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server, 128, NULL); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_is_writable((uv_stream_t*) &server)); - ASSERT(0 == uv_is_readable((uv_stream_t*) &server)); + ASSERT_OK(uv_is_writable((uv_stream_t*) &server)); + ASSERT_OK(uv_is_readable((uv_stream_t*) &server)); buf = uv_buf_init("PING", 4); r = uv_write(&write_req, (uv_stream_t*) &server, &buf, 1, NULL); - ASSERT(r == UV_EPIPE); + ASSERT_EQ(r, UV_EPIPE); r = uv_shutdown(&shutdown_req, (uv_stream_t*) &server, NULL); - ASSERT(r == UV_ENOTCONN); + ASSERT_EQ(r, UV_ENOTCONN); r = uv_read_start((uv_stream_t*) &server, (uv_alloc_cb) abort, (uv_read_cb) abort); - ASSERT(r == UV_ENOTCONN); + ASSERT_EQ(r, UV_ENOTCONN); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -307,11 +307,11 @@ TEST_IMPL(tcp_bind_or_listen_error_after_close) { addr.sin_port = htons(9999); addr.sin_family = AF_INET; - ASSERT_EQ(uv_tcp_init(uv_default_loop(), &tcp), 0); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &tcp)); uv_close((uv_handle_t*) &tcp, NULL); ASSERT_EQ(uv_tcp_bind(&tcp, (struct sockaddr*) &addr, 0), UV_EINVAL); ASSERT_EQ(uv_listen((uv_stream_t*) &tcp, 5, NULL), UV_EINVAL); - ASSERT_EQ(uv_run(uv_default_loop(), UV_RUN_DEFAULT), 0); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; } diff --git a/deps/uv/test/test-tcp-bind6-error.c b/deps/uv/test/test-tcp-bind6-error.c index 656ebe34e297da..f44d3b7ee9ade4 100644 --- a/deps/uv/test/test-tcp-bind6-error.c +++ b/deps/uv/test/test-tcp-bind6-error.c @@ -42,29 +42,29 @@ TEST_IMPL(tcp_bind6_error_addrinuse) { if (!can_ipv6()) RETURN_SKIP("IPv6 not supported"); - ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr)); + ASSERT_OK(uv_ip6_addr("::", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server1, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_init(uv_default_loop(), &server2); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server2, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server1, 128, NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&server2, 128, NULL); - ASSERT(r == UV_EADDRINUSE); + ASSERT_EQ(r, UV_EADDRINUSE); uv_close((uv_handle_t*)&server1, close_cb); uv_close((uv_handle_t*)&server2, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 2); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -79,18 +79,18 @@ TEST_IMPL(tcp_bind6_error_addrnotavail) { if (!can_ipv6()) RETURN_SKIP("IPv6 not supported"); - ASSERT(0 == uv_ip6_addr("4:4:4:4:4:4:4:4", TEST_PORT, &addr)); + ASSERT_OK(uv_ip6_addr("4:4:4:4:4:4:4:4", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == UV_EADDRNOTAVAIL); + ASSERT_EQ(r, UV_EADDRNOTAVAIL); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -110,15 +110,15 @@ TEST_IMPL(tcp_bind6_error_fault) { garbage_addr = (struct sockaddr_in6*) &garbage; r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) garbage_addr, 0); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -135,21 +135,21 @@ TEST_IMPL(tcp_bind6_error_inval) { if (!can_ipv6()) RETURN_SKIP("IPv6 not supported"); - ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr1)); - ASSERT(0 == uv_ip6_addr("::", TEST_PORT_2, &addr2)); + ASSERT_OK(uv_ip6_addr("::", TEST_PORT, &addr1)); + ASSERT_OK(uv_ip6_addr("::", TEST_PORT_2, &addr2)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr1, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr2, 0); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -164,12 +164,12 @@ TEST_IMPL(tcp_bind6_localhost_ok) { if (!can_ipv6()) RETURN_SKIP("IPv6 not supported"); - ASSERT(0 == uv_ip6_addr("::1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip6_addr("::1", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-close-accept.c b/deps/uv/test/test-tcp-close-accept.c index b255cfbd9f362e..4988dd132750c1 100644 --- a/deps/uv/test/test-tcp-close-accept.c +++ b/deps/uv/test/test-tcp-close-accept.c @@ -47,7 +47,7 @@ static void close_cb(uv_handle_t* handle) { } static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); write_cb_called++; } @@ -57,7 +57,7 @@ static void connect_cb(uv_connect_t* req, int status) { uv_stream_t* outgoing; if (req == &tcp_check_req) { - ASSERT(status != 0); + ASSERT(status); /* * Time to finish the test: close both the check and pending incoming @@ -68,14 +68,14 @@ static void connect_cb(uv_connect_t* req, int status) { return; } - ASSERT(status == 0); - ASSERT(connect_reqs <= req); - ASSERT(req <= connect_reqs + ARRAY_SIZE(connect_reqs)); + ASSERT_OK(status); + ASSERT_LE(connect_reqs, req); + ASSERT_LE(req, connect_reqs + ARRAY_SIZE(connect_reqs)); i = req - connect_reqs; buf = uv_buf_init("x", 1); outgoing = (uv_stream_t*) &tcp_outgoing[i]; - ASSERT(0 == uv_write(&write_reqs[i], outgoing, &buf, 1, write_cb)); + ASSERT_OK(uv_write(&write_reqs[i], outgoing, &buf, 1, write_cb)); } static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { @@ -89,9 +89,9 @@ static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { unsigned int i; pending_incoming = (uv_tcp_t*) stream - &tcp_incoming[0]; - ASSERT(pending_incoming < got_connections); - ASSERT(0 == uv_read_stop(stream)); - ASSERT(1 == nread); + ASSERT_LT(pending_incoming, got_connections); + ASSERT_OK(uv_read_stop(stream)); + ASSERT_EQ(1, nread); loop = stream->loop; read_cb_called++; @@ -106,19 +106,19 @@ static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { uv_close((uv_handle_t*) &tcp_server, close_cb); /* Create new fd that should be one of the closed incomings */ - ASSERT(0 == uv_tcp_init(loop, &tcp_check)); - ASSERT(0 == uv_tcp_connect(&tcp_check_req, - &tcp_check, - (const struct sockaddr*) &addr, - connect_cb)); - ASSERT(0 == uv_read_start((uv_stream_t*) &tcp_check, alloc_cb, read_cb)); + ASSERT_OK(uv_tcp_init(loop, &tcp_check)); + ASSERT_OK(uv_tcp_connect(&tcp_check_req, + &tcp_check, + (const struct sockaddr*) &addr, + connect_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*) &tcp_check, alloc_cb, read_cb)); } static void connection_cb(uv_stream_t* server, int status) { unsigned int i; uv_tcp_t* incoming; - ASSERT(server == (uv_stream_t*) &tcp_server); + ASSERT_PTR_EQ(server, (uv_stream_t*) &tcp_server); /* Ignore tcp_check connection */ if (got_connections == ARRAY_SIZE(tcp_incoming)) @@ -126,8 +126,8 @@ static void connection_cb(uv_stream_t* server, int status) { /* Accept everyone */ incoming = &tcp_incoming[got_connections++]; - ASSERT(0 == uv_tcp_init(server->loop, incoming)); - ASSERT(0 == uv_accept(server, (uv_stream_t*) incoming)); + ASSERT_OK(uv_tcp_init(server->loop, incoming)); + ASSERT_OK(uv_accept(server, (uv_stream_t*) incoming)); if (got_connections != ARRAY_SIZE(tcp_incoming)) return; @@ -135,7 +135,7 @@ static void connection_cb(uv_stream_t* server, int status) { /* Once all clients are accepted - start reading */ for (i = 0; i < ARRAY_SIZE(tcp_incoming); i++) { incoming = &tcp_incoming[i]; - ASSERT(0 == uv_read_start((uv_stream_t*) incoming, alloc_cb, read_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*) incoming, alloc_cb, read_cb)); } } @@ -162,30 +162,30 @@ TEST_IMPL(tcp_close_accept) { */ loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(loop, &tcp_server)); - ASSERT(0 == uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &tcp_server, - ARRAY_SIZE(tcp_outgoing), - connection_cb)); + ASSERT_OK(uv_tcp_init(loop, &tcp_server)); + ASSERT_OK(uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_listen((uv_stream_t*) &tcp_server, + ARRAY_SIZE(tcp_outgoing), + connection_cb)); for (i = 0; i < ARRAY_SIZE(tcp_outgoing); i++) { client = tcp_outgoing + i; - ASSERT(0 == uv_tcp_init(loop, client)); - ASSERT(0 == uv_tcp_connect(&connect_reqs[i], - client, - (const struct sockaddr*) &addr, - connect_cb)); + ASSERT_OK(uv_tcp_init(loop, client)); + ASSERT_OK(uv_tcp_connect(&connect_reqs[i], + client, + (const struct sockaddr*) &addr, + connect_cb)); } uv_run(loop, UV_RUN_DEFAULT); - ASSERT(ARRAY_SIZE(tcp_outgoing) == got_connections); - ASSERT((ARRAY_SIZE(tcp_outgoing) + 2) == close_cb_called); - ASSERT(ARRAY_SIZE(tcp_outgoing) == write_cb_called); - ASSERT(1 == read_cb_called); + ASSERT_EQ(ARRAY_SIZE(tcp_outgoing), got_connections); + ASSERT_EQ((ARRAY_SIZE(tcp_outgoing) + 2), close_cb_called); + ASSERT_EQ(ARRAY_SIZE(tcp_outgoing), write_cb_called); + ASSERT_EQ(1, read_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-tcp-close-after-read-timeout.c b/deps/uv/test/test-tcp-close-after-read-timeout.c index 098e405a87529c..1b81630157d03e 100644 --- a/deps/uv/test/test-tcp-close-after-read-timeout.c +++ b/deps/uv/test/test-tcp-close-after-read-timeout.c @@ -48,10 +48,10 @@ static void on_client_connect(uv_connect_t* conn_req, int status) { int r; r = uv_read_start((uv_stream_t*) &client, on_client_alloc, on_client_read); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_timer_start(&timer, on_client_timeout, 1000, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } @@ -72,8 +72,8 @@ static void on_client_read(uv_stream_t* stream, ssize_t nread, static void on_client_timeout(uv_timer_t* handle) { - ASSERT_EQ(handle, &timer); - ASSERT_EQ(read_cb_called, 0); + ASSERT_PTR_EQ(handle, &timer); + ASSERT_OK(read_cb_called); uv_read_stop((uv_stream_t*) &client); uv_close((uv_handle_t*) &client, on_close); uv_close((uv_handle_t*) &timer, on_close); @@ -101,20 +101,20 @@ static void on_connection_read(uv_stream_t* stream, static void on_connection(uv_stream_t* server, int status) { int r; - ASSERT_EQ(status, 0); - ASSERT_EQ(uv_accept(server, (uv_stream_t*) &connection), 0); + ASSERT_OK(status); + ASSERT_OK(uv_accept(server, (uv_stream_t*) &connection)); r = uv_read_start((uv_stream_t*) &connection, on_connection_alloc, on_connection_read); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } static void on_close(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*) &client || - handle == (uv_handle_t*) &connection || - handle == (uv_handle_t*) &timer); + ASSERT_NE(handle == (uv_handle_t*) &client || + handle == (uv_handle_t*) &connection || + handle == (uv_handle_t*) &timer, 0); on_close_called++; } @@ -123,16 +123,16 @@ static void start_server(uv_loop_t* loop, uv_tcp_t* handle) { struct sockaddr_in addr; int r; - ASSERT_EQ(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr), 0); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init(loop, handle); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_bind(handle, (const struct sockaddr*) &addr, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*) handle, 128, on_connection); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_unref((uv_handle_t*) handle); } @@ -147,7 +147,7 @@ TEST_IMPL(tcp_close_after_read_timeout) { uv_loop_t* loop; int r; - ASSERT_EQ(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr), 0); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); loop = uv_default_loop(); @@ -155,28 +155,28 @@ TEST_IMPL(tcp_close_after_read_timeout) { start_server(loop, &tcp_server); r = uv_tcp_init(loop, &client); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &client, (const struct sockaddr*) &addr, on_client_connect); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_init(loop, &connection); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_timer_init(loop, &timer); - ASSERT_EQ(r, 0); + ASSERT_OK(r); - ASSERT_EQ(read_cb_called, 0); - ASSERT_EQ(on_close_called, 0); + ASSERT_OK(read_cb_called); + ASSERT_OK(on_close_called); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT_EQ(r, 0); + ASSERT_OK(r); - ASSERT_EQ(read_cb_called, 1); - ASSERT_EQ(on_close_called, 3); + ASSERT_EQ(1, read_cb_called); + ASSERT_EQ(3, on_close_called); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-tcp-close-reset.c b/deps/uv/test/test-tcp-close-reset.c index 7415646996cd9f..74941789420f19 100644 --- a/deps/uv/test/test-tcp-close-reset.c +++ b/deps/uv/test/test-tcp-close-reset.c @@ -62,7 +62,7 @@ static void do_write(uv_tcp_t* handle) { buf = uv_buf_init("PING", 4); for (i = 0; i < ARRAY_SIZE(write_reqs); i++) { r = uv_write(&write_reqs[i], (uv_stream_t*) handle, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } } @@ -72,21 +72,25 @@ static void do_close(uv_tcp_t* handle) { int r; if (shutdown_before_close == 1) { - ASSERT(0 == uv_shutdown(&shutdown_req, (uv_stream_t*) handle, shutdown_cb)); - ASSERT(UV_EINVAL == uv_tcp_close_reset(handle, close_cb)); + ASSERT_OK(uv_shutdown(&shutdown_req, + (uv_stream_t*) handle, + shutdown_cb)); + ASSERT_EQ(UV_EINVAL, uv_tcp_close_reset(handle, close_cb)); } else if (shutdown_before_close == 2) { r = uv_fileno((const uv_handle_t*) handle, &fd); - ASSERT_EQ(r, 0); - ASSERT_NE(fd, INVALID_FD); + ASSERT_OK(r); #ifdef _WIN32 - ASSERT_EQ(0, shutdown(fd, SD_BOTH)); + ASSERT_PTR_NE(fd, INVALID_FD); + ASSERT_OK(shutdown((SOCKET)fd, SD_BOTH)); #else - ASSERT_EQ(0, shutdown(fd, SHUT_RDWR)); + ASSERT_NE(fd, INVALID_FD); + ASSERT_OK(shutdown(fd, SHUT_RDWR)); #endif - ASSERT_EQ(0, uv_tcp_close_reset(handle, close_cb)); + ASSERT_OK(uv_tcp_close_reset(handle, close_cb)); } else { - ASSERT(0 == uv_tcp_close_reset(handle, close_cb)); - ASSERT(UV_ENOTCONN == uv_shutdown(&shutdown_req, (uv_stream_t*) handle, shutdown_cb)); + ASSERT_OK(uv_tcp_close_reset(handle, close_cb)); + ASSERT_EQ(UV_ENOTCONN, uv_shutdown(&shutdown_req, (uv_stream_t*) handle, + shutdown_cb)); } uv_close((uv_handle_t*) &tcp_server, NULL); @@ -99,14 +103,14 @@ static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { } static void read_cb2(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { - ASSERT((uv_tcp_t*)stream == &tcp_client); + ASSERT_PTR_EQ((uv_tcp_t*)stream, &tcp_client); if (nread == UV_EOF) uv_close((uv_handle_t*) stream, NULL); } static void connect_cb(uv_connect_t* conn_req, int status) { - ASSERT(conn_req == &connect_req); + ASSERT_PTR_EQ(conn_req, &connect_req); uv_read_start((uv_stream_t*) &tcp_client, alloc_cb, read_cb2); do_write(&tcp_client); if (client_close) @@ -116,33 +120,33 @@ static void connect_cb(uv_connect_t* conn_req, int status) { static void write_cb(uv_write_t* req, int status) { /* write callbacks should run before the close callback */ - ASSERT(close_cb_called == 0); - ASSERT(req->handle == (uv_stream_t*)&tcp_client); + ASSERT_OK(close_cb_called); + ASSERT_PTR_EQ(req->handle, (uv_stream_t*)&tcp_client); write_cb_called++; } static void close_cb(uv_handle_t* handle) { if (client_close) - ASSERT(handle == (uv_handle_t*) &tcp_client); + ASSERT_PTR_EQ(handle, (uv_handle_t*) &tcp_client); else - ASSERT(handle == (uv_handle_t*) &tcp_accepted); + ASSERT_PTR_EQ(handle, (uv_handle_t*) &tcp_accepted); close_cb_called++; } static void shutdown_cb(uv_shutdown_t* req, int status) { if (client_close) - ASSERT(req->handle == (uv_stream_t*) &tcp_client); + ASSERT_PTR_EQ(req->handle, (uv_stream_t*) &tcp_client); else - ASSERT(req->handle == (uv_stream_t*) &tcp_accepted); + ASSERT_PTR_EQ(req->handle, (uv_stream_t*) &tcp_accepted); shutdown_cb_called++; } static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { - ASSERT((uv_tcp_t*)stream == &tcp_accepted); + ASSERT_PTR_EQ((uv_tcp_t*)stream, &tcp_accepted); if (nread < 0) { uv_close((uv_handle_t*) stream, NULL); } else { @@ -154,10 +158,10 @@ static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { static void connection_cb(uv_stream_t* server, int status) { - ASSERT(status == 0); + ASSERT_OK(status); - ASSERT(0 == uv_tcp_init(loop, &tcp_accepted)); - ASSERT(0 == uv_accept(server, (uv_stream_t*) &tcp_accepted)); + ASSERT_OK(uv_tcp_init(loop, &tcp_accepted)); + ASSERT_OK(uv_accept(server, (uv_stream_t*) &tcp_accepted)); uv_read_start((uv_stream_t*) &tcp_accepted, alloc_cb, read_cb); } @@ -167,16 +171,16 @@ static void start_server(uv_loop_t* loop, uv_tcp_t* handle) { struct sockaddr_in addr; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init(loop, handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(handle, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)handle, 128, connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -184,16 +188,16 @@ static void do_connect(uv_loop_t* loop, uv_tcp_t* tcp_client) { struct sockaddr_in addr; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init(loop, tcp_client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, tcp_client, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -212,16 +216,16 @@ TEST_IMPL(tcp_close_reset_client) { do_connect(loop, &tcp_client); - ASSERT(write_cb_called == 0); - ASSERT(close_cb_called == 0); - ASSERT(shutdown_cb_called == 0); + ASSERT_OK(write_cb_called); + ASSERT_OK(close_cb_called); + ASSERT_OK(shutdown_cb_called); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(write_cb_called == 4); - ASSERT(close_cb_called == 1); - ASSERT(shutdown_cb_called == 0); + ASSERT_EQ(4, write_cb_called); + ASSERT_EQ(1, close_cb_called); + ASSERT_OK(shutdown_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -239,16 +243,16 @@ TEST_IMPL(tcp_close_reset_client_after_shutdown) { do_connect(loop, &tcp_client); - ASSERT(write_cb_called == 0); - ASSERT(close_cb_called == 0); - ASSERT(shutdown_cb_called == 0); + ASSERT_OK(write_cb_called); + ASSERT_OK(close_cb_called); + ASSERT_OK(shutdown_cb_called); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(write_cb_called == 4); - ASSERT(close_cb_called == 0); - ASSERT(shutdown_cb_called == 1); + ASSERT_EQ(4, write_cb_called); + ASSERT_OK(close_cb_called); + ASSERT_EQ(1, shutdown_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -266,16 +270,16 @@ TEST_IMPL(tcp_close_reset_accepted) { do_connect(loop, &tcp_client); - ASSERT(write_cb_called == 0); - ASSERT(close_cb_called == 0); - ASSERT(shutdown_cb_called == 0); + ASSERT_OK(write_cb_called); + ASSERT_OK(close_cb_called); + ASSERT_OK(shutdown_cb_called); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(write_cb_called == 4); - ASSERT(close_cb_called == 1); - ASSERT(shutdown_cb_called == 0); + ASSERT_EQ(4, write_cb_called); + ASSERT_EQ(1, close_cb_called); + ASSERT_OK(shutdown_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -293,16 +297,16 @@ TEST_IMPL(tcp_close_reset_accepted_after_shutdown) { do_connect(loop, &tcp_client); - ASSERT(write_cb_called == 0); - ASSERT(close_cb_called == 0); - ASSERT(shutdown_cb_called == 0); + ASSERT_OK(write_cb_called); + ASSERT_OK(close_cb_called); + ASSERT_OK(shutdown_cb_called); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(write_cb_called == 4); - ASSERT(close_cb_called == 0); - ASSERT(shutdown_cb_called == 1); + ASSERT_EQ(4, write_cb_called); + ASSERT_OK(close_cb_called); + ASSERT_EQ(1, shutdown_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -320,16 +324,16 @@ TEST_IMPL(tcp_close_reset_accepted_after_socket_shutdown) { do_connect(loop, &tcp_client); - ASSERT_EQ(write_cb_called, 0); - ASSERT_EQ(close_cb_called, 0); - ASSERT_EQ(shutdown_cb_called, 0); + ASSERT_OK(write_cb_called); + ASSERT_OK(close_cb_called); + ASSERT_OK(shutdown_cb_called); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT_EQ(r, 0); + ASSERT_OK(r); - ASSERT_EQ(write_cb_called, 4); - ASSERT_EQ(close_cb_called, 1); - ASSERT_EQ(shutdown_cb_called, 0); + ASSERT_EQ(4, write_cb_called); + ASSERT_EQ(1, close_cb_called); + ASSERT_OK(shutdown_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-tcp-close-while-connecting.c b/deps/uv/test/test-tcp-close-while-connecting.c index 490413891bbc0c..ba5e46901a4302 100644 --- a/deps/uv/test/test-tcp-close-while-connecting.c +++ b/deps/uv/test/test-tcp-close-while-connecting.c @@ -69,24 +69,24 @@ TEST_IMPL(tcp_close_while_connecting) { int r; loop = uv_default_loop(); - ASSERT(0 == uv_ip4_addr("1.2.3.4", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(loop, &tcp_handle)); + ASSERT_OK(uv_ip4_addr("1.2.3.4", TEST_PORT, &addr)); + ASSERT_OK(uv_tcp_init(loop, &tcp_handle)); r = uv_tcp_connect(&connect_req, &tcp_handle, (const struct sockaddr*) &addr, connect_cb); if (r == UV_ENETUNREACH) RETURN_SKIP("Network unreachable."); - ASSERT(r == 0); - ASSERT(0 == uv_timer_init(loop, &timer1_handle)); - ASSERT(0 == uv_timer_start(&timer1_handle, timer1_cb, 1, 0)); - ASSERT(0 == uv_timer_init(loop, &timer2_handle)); - ASSERT(0 == uv_timer_start(&timer2_handle, timer2_cb, 86400 * 1000, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - - ASSERT(connect_cb_called == 1); - ASSERT(timer1_cb_called == 1); - ASSERT(close_cb_called == 2); + ASSERT_OK(r); + ASSERT_OK(uv_timer_init(loop, &timer1_handle)); + ASSERT_OK(uv_timer_start(&timer1_handle, timer1_cb, 1, 0)); + ASSERT_OK(uv_timer_init(loop, &timer2_handle)); + ASSERT_OK(uv_timer_start(&timer2_handle, timer2_cb, 86400 * 1000, 0)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, timer1_cb_called); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(loop); diff --git a/deps/uv/test/test-tcp-close.c b/deps/uv/test/test-tcp-close.c index 6879bae20f89ad..ed19da6f783b3e 100644 --- a/deps/uv/test/test-tcp-close.c +++ b/deps/uv/test/test-tcp-close.c @@ -49,7 +49,7 @@ static void connect_cb(uv_connect_t* conn_req, int status) { ASSERT_NOT_NULL(req); r = uv_write(req, (uv_stream_t*)&tcp_handle, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } uv_close((uv_handle_t*)&tcp_handle, close_cb); @@ -58,21 +58,21 @@ static void connect_cb(uv_connect_t* conn_req, int status) { static void write_cb(uv_write_t* req, int status) { /* write callbacks should run before the close callback */ - ASSERT(close_cb_called == 0); - ASSERT(req->handle == (uv_stream_t*)&tcp_handle); + ASSERT_OK(close_cb_called); + ASSERT_PTR_EQ(req->handle, (uv_stream_t*)&tcp_handle); write_cb_called++; free(req); } static void close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*)&tcp_handle); + ASSERT_PTR_EQ(handle, (uv_handle_t*)&tcp_handle); close_cb_called++; } static void connection_cb(uv_stream_t* server, int status) { - ASSERT(status == 0); + ASSERT_OK(status); } @@ -80,16 +80,16 @@ static void start_server(uv_loop_t* loop, uv_tcp_t* handle) { struct sockaddr_in addr; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init(loop, handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(handle, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)handle, 128, connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_unref((uv_handle_t*)handle); } @@ -104,7 +104,7 @@ TEST_IMPL(tcp_close) { uv_loop_t* loop; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); loop = uv_default_loop(); @@ -112,24 +112,24 @@ TEST_IMPL(tcp_close) { start_server(loop, &tcp_server); r = uv_tcp_init(loop, &tcp_handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &tcp_handle, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(write_cb_called == 0); - ASSERT(close_cb_called == 0); + ASSERT_OK(write_cb_called); + ASSERT_OK(close_cb_called); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); printf("%d of %d write reqs seen\n", write_cb_called, NUM_WRITE_REQS); - ASSERT(write_cb_called == NUM_WRITE_REQS); - ASSERT(close_cb_called == 1); + ASSERT_EQ(write_cb_called, NUM_WRITE_REQS); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-tcp-connect-error-after-write.c b/deps/uv/test/test-tcp-connect-error-after-write.c index 1800b4d6ed06d3..7321259628d5e6 100644 --- a/deps/uv/test/test-tcp-connect-error-after-write.c +++ b/deps/uv/test/test-tcp-connect-error-after-write.c @@ -37,14 +37,14 @@ static void close_cb(uv_handle_t* handle) { static void connect_cb(uv_connect_t* req, int status) { - ASSERT(status < 0); + ASSERT_LT(status, 0); connect_cb_called++; uv_close((uv_handle_t*)req->handle, close_cb); } static void write_cb(uv_write_t* req, int status) { - ASSERT(status < 0); + ASSERT_LT(status, 0); write_cb_called++; } @@ -67,30 +67,30 @@ TEST_IMPL(tcp_connect_error_after_write) { uv_buf_t buf; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); buf = uv_buf_init("TEST", 4); r = uv_tcp_init(uv_default_loop(), &conn); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb); - ASSERT(r == UV_EBADF); + ASSERT_EQ(r, UV_EBADF); r = uv_tcp_connect(&connect_req, &conn, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, write_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-connect-error.c b/deps/uv/test/test-tcp-connect-error.c index 9384ebce57c450..ee0f9ee5ce6220 100644 --- a/deps/uv/test/test-tcp-connect-error.c +++ b/deps/uv/test/test-tcp-connect-error.c @@ -54,19 +54,19 @@ TEST_IMPL(tcp_connect_error_fault) { garbage_addr = (const struct sockaddr_in*) &garbage; r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&req, &server, (const struct sockaddr*) garbage_addr, connect_cb); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_called == 0); - ASSERT(close_cb_called == 1); + ASSERT_OK(connect_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-connect-timeout.c b/deps/uv/test/test-tcp-connect-timeout.c index 4cd83e1d38b58c..4eb834e1afac80 100644 --- a/deps/uv/test/test-tcp-connect-timeout.c +++ b/deps/uv/test/test-tcp-connect-timeout.c @@ -38,14 +38,14 @@ static void close_cb(uv_handle_t* handle); static void connect_cb(uv_connect_t* req, int status) { - ASSERT(req == &connect_req); - ASSERT(status == UV_ECANCELED); + ASSERT_PTR_EQ(req, &connect_req); + ASSERT_EQ(status, UV_ECANCELED); connect_cb_called++; } static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer); + ASSERT_PTR_EQ(handle, &timer); uv_close((uv_handle_t*)&conn, close_cb); uv_close((uv_handle_t*)&timer, close_cb); } @@ -64,16 +64,16 @@ TEST_IMPL(tcp_connect_timeout) { struct sockaddr_in addr; int r; - ASSERT(0 == uv_ip4_addr("8.8.8.8", 9999, &addr)); + ASSERT_OK(uv_ip4_addr("8.8.8.8", 9999, &addr)); r = uv_timer_init(uv_default_loop(), &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, timer_cb, 50, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_init(uv_default_loop(), &conn); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &conn, @@ -81,10 +81,10 @@ TEST_IMPL(tcp_connect_timeout) { connect_cb); if (r == UV_ENETUNREACH) RETURN_SKIP("Network unreachable."); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -105,7 +105,7 @@ static int is_supported_system(void) { int min_semver[3] = {10, 0, 16299}; int cnt; uv_utsname_t uname; - ASSERT_EQ(uv_os_uname(&uname), 0); + ASSERT_OK(uv_os_uname(&uname)); if (strcmp(uname.sysname, "Windows_NT") == 0) { cnt = sscanf(uname.release, "%d.%d.%d", &semver[0], &semver[1], &semver[2]); if (cnt != 3) { @@ -130,17 +130,17 @@ TEST_IMPL(tcp_local_connect_timeout) { if (!is_supported_system()) { RETURN_SKIP("Unsupported system"); } - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_timer_init(uv_default_loop(), &timer); - ASSERT_EQ(r, 0); + ASSERT_OK(r); /* Give it 1s to timeout. */ r = uv_timer_start(&timer, timer_cb, 1000, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_init(uv_default_loop(), &conn); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &conn, @@ -148,10 +148,10 @@ TEST_IMPL(tcp_local_connect_timeout) { connect_local_cb); if (r == UV_ENETUNREACH) RETURN_SKIP("Network unreachable."); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -168,17 +168,17 @@ TEST_IMPL(tcp6_local_connect_timeout) { RETURN_SKIP("IPv6 not supported"); } - ASSERT_EQ(0, uv_ip6_addr("::1", 9999, &addr)); + ASSERT_OK(uv_ip6_addr("::1", 9999, &addr)); r = uv_timer_init(uv_default_loop(), &timer); - ASSERT_EQ(r, 0); + ASSERT_OK(r); /* Give it 1s to timeout. */ r = uv_timer_start(&timer, timer_cb, 1000, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_init(uv_default_loop(), &conn); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &conn, @@ -186,10 +186,10 @@ TEST_IMPL(tcp6_local_connect_timeout) { connect_local_cb); if (r == UV_ENETUNREACH) RETURN_SKIP("Network unreachable."); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(r, 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-connect6-error.c b/deps/uv/test/test-tcp-connect6-error.c index 8646dd56496eb0..1e6d7c78da999d 100644 --- a/deps/uv/test/test-tcp-connect6-error.c +++ b/deps/uv/test/test-tcp-connect6-error.c @@ -49,22 +49,63 @@ TEST_IMPL(tcp_connect6_error_fault) { int r; uv_connect_t req; + if (!can_ipv6()) + RETURN_SKIP("IPv6 not supported"); + garbage_addr = (const struct sockaddr_in6*) &garbage; r = uv_tcp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&req, &server, (const struct sockaddr*) garbage_addr, connect_cb); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_close((uv_handle_t*)&server, close_cb); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_called == 0); - ASSERT(close_cb_called == 1); + ASSERT_OK(connect_cb_called); + ASSERT_EQ(1, close_cb_called); + + MAKE_VALGRIND_HAPPY(uv_default_loop()); + return 0; +} + + +TEST_IMPL(tcp_connect6_link_local) { + struct sockaddr_in6 addr; + uv_connect_t req; + uv_tcp_t server; + + if (!can_ipv6()) + RETURN_SKIP("IPv6 not supported"); + +#if defined(__QEMU__) + /* qemu's sockaddr_in6 translation is broken pre-qemu 8.0.0 + * when host endianness != guest endiannes. + * Fixed in https://github.com/qemu/qemu/commit/44cf6731d6b. + */ + RETURN_SKIP("Test does not currently work in QEMU"); +#endif /* defined(__QEMU__) */ + + ASSERT_OK(uv_ip6_addr("fe80::0bad:babe", 1337, &addr)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &server)); + + /* We're making two shaky assumptions here: + * 1. There is a network interface that routes IPv6 link-local traffic, and + * 2. There is no firewall rule that blackholes or otherwise hard-kills the + * connection attempt to the address above, i.e., we don't expect the + * connect() system call to fail synchronously. + */ + ASSERT_OK(uv_tcp_connect(&req, + &server, + (struct sockaddr*) &addr, + connect_cb)); + + uv_close((uv_handle_t*) &server, NULL); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-create-socket-early.c b/deps/uv/test/test-tcp-create-socket-early.c index c84882dad216ef..e8c1aaab2765a8 100644 --- a/deps/uv/test/test-tcp-create-socket-early.c +++ b/deps/uv/test/test-tcp-create-socket-early.c @@ -32,7 +32,7 @@ static void on_connect(uv_connect_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); uv_close((uv_handle_t*) req->handle, NULL); } @@ -41,16 +41,16 @@ static void on_connection(uv_stream_t* server, int status) { uv_tcp_t* handle; int r; - ASSERT(status == 0); + ASSERT_OK(status); handle = malloc(sizeof(*handle)); ASSERT_NOT_NULL(handle); r = uv_tcp_init_ex(server->loop, handle, AF_INET); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_accept(server, (uv_stream_t*)handle); - ASSERT(r == UV_EBUSY); + ASSERT_EQ(r, UV_EBUSY); uv_close((uv_handle_t*) server, NULL); uv_close((uv_handle_t*) handle, (uv_close_cb)free); @@ -61,16 +61,16 @@ static void tcp_listener(uv_loop_t* loop, uv_tcp_t* server) { struct sockaddr_in addr; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_tcp_init(loop, server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*) server, 128, on_connection); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -78,16 +78,16 @@ static void tcp_connector(uv_loop_t* loop, uv_tcp_t* client, uv_connect_t* req) struct sockaddr_in server_addr; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); r = uv_tcp_init(loop, client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(req, client, (const struct sockaddr*) &server_addr, on_connect); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -98,32 +98,34 @@ TEST_IMPL(tcp_create_early) { uv_os_fd_t fd; int r, namelen; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init_ex(uv_default_loop(), &client, AF_INET); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fileno((const uv_handle_t*) &client, &fd); - ASSERT(r == 0); - ASSERT(fd != INVALID_FD); + ASSERT_OK(r); /* Windows returns WSAEINVAL if the socket is not bound */ #ifndef _WIN32 + ASSERT_NE(fd, INVALID_FD); namelen = sizeof sockname; r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(sockname.sin_family == AF_INET); + ASSERT_OK(r); + ASSERT_EQ(sockname.sin_family, AF_INET); +#else + ASSERT_PTR_NE(fd, INVALID_FD); #endif r = uv_tcp_bind(&client, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); namelen = sizeof sockname; r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(memcmp(&addr.sin_addr, - &sockname.sin_addr, - sizeof(addr.sin_addr)) == 0); + ASSERT_OK(r); + ASSERT_OK(memcmp(&addr.sin_addr, + &sockname.sin_addr, + sizeof(addr.sin_addr))); uv_close((uv_handle_t*) &client, NULL); uv_run(uv_default_loop(), UV_RUN_DEFAULT); @@ -142,32 +144,34 @@ TEST_IMPL(tcp_create_early_bad_bind) { if (!can_ipv6()) RETURN_SKIP("IPv6 not supported"); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init_ex(uv_default_loop(), &client, AF_INET6); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fileno((const uv_handle_t*) &client, &fd); - ASSERT(r == 0); - ASSERT(fd != INVALID_FD); + ASSERT_OK(r); /* Windows returns WSAEINVAL if the socket is not bound */ #ifndef _WIN32 + ASSERT_NE(fd, INVALID_FD); { int namelen; struct sockaddr_in6 sockname; namelen = sizeof sockname; r = uv_tcp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(sockname.sin6_family == AF_INET6); + ASSERT_OK(r); + ASSERT_EQ(sockname.sin6_family, AF_INET6); } +#else + ASSERT_PTR_NE(fd, INVALID_FD); #endif r = uv_tcp_bind(&client, (const struct sockaddr*) &addr, 0); #if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); #else - ASSERT(r == UV_EFAULT); + ASSERT_EQ(r, UV_EFAULT); #endif uv_close((uv_handle_t*) &client, NULL); @@ -183,10 +187,10 @@ TEST_IMPL(tcp_create_early_bad_domain) { int r; r = uv_tcp_init_ex(uv_default_loop(), &client, 47); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_tcp_init_ex(uv_default_loop(), &client, 1024); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_run(uv_default_loop(), UV_RUN_DEFAULT); diff --git a/deps/uv/test/test-tcp-flags.c b/deps/uv/test/test-tcp-flags.c index 6856429aa1dc75..30178d706d9418 100644 --- a/deps/uv/test/test-tcp-flags.c +++ b/deps/uv/test/test-tcp-flags.c @@ -34,18 +34,18 @@ TEST_IMPL(tcp_flags) { loop = uv_default_loop(); r = uv_tcp_init(loop, &handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_nodelay(&handle, 1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_keepalive(&handle, 1, 60); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*)&handle, NULL); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-tcp-oob.c b/deps/uv/test/test-tcp-oob.c index 989454ed8787f9..7962fa93448a20 100644 --- a/deps/uv/test/test-tcp-oob.c +++ b/deps/uv/test/test-tcp-oob.c @@ -61,22 +61,22 @@ static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { #endif uv_os_fd_t fd; - ASSERT(nread >= 0); - ASSERT(0 == uv_fileno((uv_handle_t*)handle, &fd)); - ASSERT(0 == uv_idle_start(&idle, idle_cb)); + ASSERT_GE(nread, 0); + ASSERT_OK(uv_fileno((uv_handle_t*)handle, &fd)); + ASSERT_OK(uv_idle_start(&idle, idle_cb)); #ifdef __MVS__ /* Need to flush out the OOB data. Otherwise, this callback will get * triggered on every poll with nread = 0. */ - ASSERT(-1 != recv(fd, lbuf, sizeof(lbuf), MSG_OOB)); + ASSERT_NE(-1, recv(fd, lbuf, sizeof(lbuf), MSG_OOB)); #endif } static void connect_cb(uv_connect_t* req, int status) { - ASSERT(req->handle == (uv_stream_t*) &client_handle); - ASSERT(0 == status); + ASSERT_PTR_EQ(req->handle, (uv_stream_t*) &client_handle); + ASSERT_OK(status); } @@ -84,14 +84,14 @@ static void connection_cb(uv_stream_t* handle, int status) { int r; uv_os_fd_t fd; - ASSERT(0 == status); - ASSERT(0 == uv_accept(handle, (uv_stream_t*) &peer_handle)); - ASSERT(0 == uv_read_start((uv_stream_t*) &peer_handle, alloc_cb, read_cb)); + ASSERT_OK(status); + ASSERT_OK(uv_accept(handle, (uv_stream_t*) &peer_handle)); + ASSERT_OK(uv_read_start((uv_stream_t*) &peer_handle, alloc_cb, read_cb)); /* Send some OOB data */ - ASSERT(0 == uv_fileno((uv_handle_t*) &client_handle, &fd)); + ASSERT_OK(uv_fileno((uv_handle_t*) &client_handle, &fd)); - ASSERT(0 == uv_stream_set_blocking((uv_stream_t*) &client_handle, 1)); + ASSERT_OK(uv_stream_set_blocking((uv_stream_t*) &client_handle, 1)); /* The problem triggers only on a second message, it seem that xnu is not * triggering `kevent()` for the first one @@ -99,14 +99,14 @@ static void connection_cb(uv_stream_t* handle, int status) { do { r = send(fd, "hello", 5, MSG_OOB); } while (r < 0 && errno == EINTR); - ASSERT(5 == r); + ASSERT_EQ(5, r); do { r = send(fd, "hello", 5, MSG_OOB); } while (r < 0 && errno == EINTR); - ASSERT(5 == r); + ASSERT_EQ(5, r); - ASSERT(0 == uv_stream_set_blocking((uv_stream_t*) &client_handle, 0)); + ASSERT_OK(uv_stream_set_blocking((uv_stream_t*) &client_handle, 0)); } @@ -114,26 +114,26 @@ TEST_IMPL(tcp_oob) { struct sockaddr_in addr; uv_loop_t* loop; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); loop = uv_default_loop(); - ASSERT(0 == uv_tcp_init(loop, &server_handle)); - ASSERT(0 == uv_tcp_init(loop, &client_handle)); - ASSERT(0 == uv_tcp_init(loop, &peer_handle)); - ASSERT(0 == uv_idle_init(loop, &idle)); - ASSERT(0 == uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 1, connection_cb)); + ASSERT_OK(uv_tcp_init(loop, &server_handle)); + ASSERT_OK(uv_tcp_init(loop, &client_handle)); + ASSERT_OK(uv_tcp_init(loop, &peer_handle)); + ASSERT_OK(uv_idle_init(loop, &idle)); + ASSERT_OK(uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_listen((uv_stream_t*) &server_handle, 1, connection_cb)); /* Ensure two separate packets */ - ASSERT(0 == uv_tcp_nodelay(&client_handle, 1)); + ASSERT_OK(uv_tcp_nodelay(&client_handle, 1)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &client_handle, - (const struct sockaddr*) &addr, - connect_cb)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_tcp_connect(&connect_req, + &client_handle, + (const struct sockaddr*) &addr, + connect_cb)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(ticks == kMaxTicks); + ASSERT_EQ(ticks, kMaxTicks); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-tcp-open.c b/deps/uv/test/test-tcp-open.c index b5c5621a793679..3fbcf2a5f23c83 100644 --- a/deps/uv/test/test-tcp-open.c +++ b/deps/uv/test/test-tcp-open.c @@ -46,7 +46,7 @@ static void startup(void) { #ifdef _WIN32 struct WSAData wsa_data; int r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); + ASSERT_OK(r); #endif } @@ -56,9 +56,9 @@ static uv_os_sock_t create_tcp_socket(void) { sock = socket(AF_INET, SOCK_STREAM, IPPROTO_IP); #ifdef _WIN32 - ASSERT(sock != INVALID_SOCKET); + ASSERT_NE(sock, INVALID_SOCKET); #else - ASSERT(sock >= 0); + ASSERT_GE(sock, 0); #endif #ifndef _WIN32 @@ -66,7 +66,7 @@ static uv_os_sock_t create_tcp_socket(void) { /* Allow reuse of the port. */ int yes = 1; int r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes); - ASSERT(r == 0); + ASSERT_OK(r); } #endif @@ -81,7 +81,7 @@ static void close_socket(uv_os_sock_t sock) { #else r = close(sock); #endif - ASSERT(r == 0); + ASSERT_OK(r); } @@ -89,7 +89,7 @@ static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { static char slab[65536]; - ASSERT(suggested_size <= sizeof(slab)); + ASSERT_LE(suggested_size, sizeof(slab)); buf->base = slab; buf->len = sizeof(slab); } @@ -102,8 +102,8 @@ static void close_cb(uv_handle_t* handle) { static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(req == &shutdown_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &shutdown_req); + ASSERT_OK(status); /* Now we wait for the EOF */ shutdown_cb_called++; @@ -114,11 +114,11 @@ static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { ASSERT_NOT_NULL(tcp); if (nread >= 0) { - ASSERT(nread == 4); - ASSERT(memcmp("PING", buf->base, nread) == 0); + ASSERT_EQ(4, nread); + ASSERT_OK(memcmp("PING", buf->base, nread)); } else { - ASSERT(nread == UV_EOF); + ASSERT_EQ(nread, UV_EOF); uv_close((uv_handle_t*)tcp, close_cb); } } @@ -130,9 +130,9 @@ static void read1_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { if (nread >= 0) { for (i = 0; i < nread; ++i) - ASSERT(buf->base[i] == 'P'); + ASSERT_EQ(buf->base[i], 'P'); } else { - ASSERT(nread == UV_EOF); + ASSERT_EQ(nread, UV_EOF); printf("GOT EOF\n"); uv_close((uv_handle_t*)tcp, close_cb); } @@ -166,7 +166,7 @@ static void write1_cb(uv_write_t* req, int status) { buf = uv_buf_init("P", 1); r = uv_write(&write_req, req->handle, &buf, 1, write1_cb); - ASSERT(r == 0); + ASSERT_OK(r); write_cb_called++; } @@ -177,7 +177,7 @@ static void timer_cb(uv_timer_t* handle) { /* Shutdown on drain. */ r = uv_shutdown(&shutdown_req, (uv_stream_t*) &client, shutdown_cb); - ASSERT(r == 0); + ASSERT_OK(r); shutdown_requested++; } @@ -187,22 +187,22 @@ static void connect_cb(uv_connect_t* req, int status) { uv_stream_t* stream; int r; - ASSERT(req == &connect_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &connect_req); + ASSERT_OK(status); stream = req->handle; connect_cb_called++; r = uv_write(&write_req, stream, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); /* Shutdown on drain. */ r = uv_shutdown(&shutdown_req, stream, shutdown_cb); - ASSERT(r == 0); + ASSERT_OK(r); /* Start reading */ r = uv_read_start(stream, alloc_cb, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -211,25 +211,25 @@ static void connect1_cb(uv_connect_t* req, int status) { uv_stream_t* stream; int r; - ASSERT(req == &connect_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &connect_req); + ASSERT_OK(status); stream = req->handle; connect_cb_called++; r = uv_timer_init(uv_default_loop(), &tm); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&tm, timer_cb, 2000, 0); - ASSERT(r == 0); + ASSERT_OK(r); buf = uv_buf_init("P", 1); r = uv_write(&write_req, stream, &buf, 1, write1_cb); - ASSERT(r == 0); + ASSERT_OK(r); /* Start reading */ r = uv_read_start(stream, alloc_cb, read1_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -239,30 +239,30 @@ TEST_IMPL(tcp_open) { int r; uv_tcp_t client2; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); startup(); sock = create_tcp_socket(); r = uv_tcp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_open(&client, sock); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &client, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); #ifndef _WIN32 { r = uv_tcp_init(uv_default_loop(), &client2); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_open(&client2, sock); - ASSERT(r == UV_EEXIST); + ASSERT_EQ(r, UV_EEXIST); uv_close((uv_handle_t*) &client2, NULL); } @@ -272,10 +272,10 @@ TEST_IMPL(tcp_open) { uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(shutdown_cb_called == 1); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, shutdown_cb_called); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, write_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -292,13 +292,13 @@ TEST_IMPL(tcp_open_twice) { sock2 = create_tcp_socket(); r = uv_tcp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_open(&client, sock1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_open(&client, sock2); - ASSERT(r == UV_EBUSY); + ASSERT_EQ(r, UV_EBUSY); close_socket(sock2); uv_close((uv_handle_t*) &client, NULL); @@ -317,15 +317,15 @@ TEST_IMPL(tcp_open_bound) { startup(); sock = create_tcp_socket(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &server)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &server)); - ASSERT(0 == bind(sock, (struct sockaddr*) &addr, sizeof(addr))); + ASSERT_OK(bind(sock, (struct sockaddr*) &addr, sizeof(addr))); - ASSERT(0 == uv_tcp_open(&server, sock)); + ASSERT_OK(uv_tcp_open(&server, sock)); - ASSERT(0 == uv_listen((uv_stream_t*) &server, 128, NULL)); + ASSERT_OK(uv_listen((uv_stream_t*) &server, 128, NULL)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -338,28 +338,34 @@ TEST_IMPL(tcp_open_connected) { uv_os_sock_t sock; uv_buf_t buf = uv_buf_init("PING", 4); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); startup(); sock = create_tcp_socket(); - ASSERT(0 == connect(sock, (struct sockaddr*) &addr, sizeof(addr))); + ASSERT_OK(connect(sock, (struct sockaddr*) &addr, sizeof(addr))); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &client)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &client)); - ASSERT(0 == uv_tcp_open(&client, sock)); + ASSERT_OK(uv_tcp_open(&client, sock)); - ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &client, &buf, 1, write_cb)); + ASSERT_OK(uv_write(&write_req, + (uv_stream_t*) &client, + &buf, + 1, + write_cb)); - ASSERT(0 == uv_shutdown(&shutdown_req, (uv_stream_t*) &client, shutdown_cb)); + ASSERT_OK(uv_shutdown(&shutdown_req, + (uv_stream_t*) &client, + shutdown_cb)); - ASSERT(0 == uv_read_start((uv_stream_t*) &client, alloc_cb, read_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*) &client, alloc_cb, read_cb)); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(shutdown_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, shutdown_cb_called); + ASSERT_EQ(1, write_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -371,30 +377,30 @@ TEST_IMPL(tcp_write_ready) { uv_os_sock_t sock; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); startup(); sock = create_tcp_socket(); r = uv_tcp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_open(&client, sock); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &client, (const struct sockaddr*) &addr, connect1_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(shutdown_cb_called == 1); - ASSERT(shutdown_requested == 1); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called > 0); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, shutdown_cb_called); + ASSERT_EQ(1, shutdown_requested); + ASSERT_EQ(1, connect_cb_called); + ASSERT_GT(write_cb_called, 0); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-read-stop-start.c b/deps/uv/test/test-tcp-read-stop-start.c index 9be12bb75b0b34..68d6f7c2ab5855 100644 --- a/deps/uv/test/test-tcp-read-stop-start.c +++ b/deps/uv/test/test-tcp-read-stop-start.c @@ -33,14 +33,14 @@ static uv_connect_t connect_req; static void on_read2(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf); static void on_write_close_immediately(uv_write_t* req, int status) { - ASSERT(0 == status); + ASSERT_OK(status); uv_close((uv_handle_t*)req->handle, NULL); /* Close immediately */ free(req); } static void on_write(uv_write_t* req, int status) { - ASSERT(0 == status); + ASSERT_OK(status); free(req); } @@ -50,7 +50,7 @@ static void do_write(uv_stream_t* stream, uv_write_cb cb) { uv_buf_t buf; buf.base = "1234578"; buf.len = 8; - ASSERT(0 == uv_write(req, stream, &buf, 1, cb)); + ASSERT_OK(uv_write(req, stream, &buf, 1, cb)); } static void on_alloc(uv_handle_t* handle, @@ -62,22 +62,22 @@ static void on_alloc(uv_handle_t* handle, } static void on_read1(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { - ASSERT(nread >= 0); + ASSERT_GE(nread, 0); /* Do write on a half open connection to force WSAECONNABORTED (on Windows) * in the subsequent uv_read_start() */ do_write(stream, on_write); - ASSERT(0 == uv_read_stop(stream)); + ASSERT_OK(uv_read_stop(stream)); - ASSERT(0 == uv_read_start(stream, on_alloc, on_read2)); + ASSERT_OK(uv_read_start(stream, on_alloc, on_read2)); read_cb_called++; } static void on_read2(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { - ASSERT(nread < 0); + ASSERT_LT(nread, 0); uv_close((uv_handle_t*)stream, NULL); uv_close((uv_handle_t*)&server, NULL); @@ -86,17 +86,17 @@ static void on_read2(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { } static void on_connection(uv_stream_t* server, int status) { - ASSERT(0 == status); + ASSERT_OK(status); - ASSERT(0 == uv_tcp_init(server->loop, &connection)); + ASSERT_OK(uv_tcp_init(server->loop, &connection)); - ASSERT(0 == uv_accept(server, (uv_stream_t* )&connection)); + ASSERT_OK(uv_accept(server, (uv_stream_t* )&connection)); - ASSERT(0 == uv_read_start((uv_stream_t*)&connection, on_alloc, on_read1)); + ASSERT_OK(uv_read_start((uv_stream_t*)&connection, on_alloc, on_read1)); } static void on_connect(uv_connect_t* req, int status) { - ASSERT(0 == status); + ASSERT_OK(status); do_write((uv_stream_t*)&client, on_write_close_immediately); } @@ -107,29 +107,29 @@ TEST_IMPL(tcp_read_stop_start) { { /* Server */ struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(loop, &server)); + ASSERT_OK(uv_tcp_init(loop, &server)); - ASSERT(0 == uv_tcp_bind(&server, (struct sockaddr*) & addr, 0)); + ASSERT_OK(uv_tcp_bind(&server, (struct sockaddr*) & addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*)&server, 10, on_connection)); + ASSERT_OK(uv_listen((uv_stream_t*)&server, 10, on_connection)); } { /* Client */ struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(loop, &client)); + ASSERT_OK(uv_tcp_init(loop, &client)); - ASSERT(0 == uv_tcp_connect(&connect_req, &client, - (const struct sockaddr*) & addr, on_connect)); + ASSERT_OK(uv_tcp_connect(&connect_req, &client, + (const struct sockaddr*) & addr, on_connect)); } - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(read_cb_called >= 2); + ASSERT_GE(read_cb_called, 2); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-tcp-read-stop.c b/deps/uv/test/test-tcp-read-stop.c index 1754876d4f1263..114c5ec135a82e 100644 --- a/deps/uv/test/test-tcp-read-stop.c +++ b/deps/uv/test/test-tcp-read-stop.c @@ -40,21 +40,21 @@ static void write_cb(uv_write_t* req, int status) { static void timer_cb(uv_timer_t* handle) { uv_buf_t buf = uv_buf_init("PING", 4); - ASSERT(0 == uv_write(&write_req, - (uv_stream_t*) &tcp_handle, - &buf, - 1, - write_cb)); - ASSERT(0 == uv_read_stop((uv_stream_t*) &tcp_handle)); + ASSERT_OK(uv_write(&write_req, + (uv_stream_t*) &tcp_handle, + &buf, + 1, + write_cb)); + ASSERT_OK(uv_read_stop((uv_stream_t*) &tcp_handle)); } static void connect_cb(uv_connect_t* req, int status) { - ASSERT(0 == status); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 50, 0)); - ASSERT(0 == uv_read_start((uv_stream_t*) &tcp_handle, - (uv_alloc_cb) fail_cb, - (uv_read_cb) fail_cb)); + ASSERT_OK(status); + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, 50, 0)); + ASSERT_OK(uv_read_start((uv_stream_t*) &tcp_handle, + (uv_alloc_cb) fail_cb, + (uv_read_cb) fail_cb)); } @@ -62,14 +62,14 @@ TEST_IMPL(tcp_read_stop) { uv_connect_t connect_req; struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle)); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &tcp_handle)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &tcp_handle, - (const struct sockaddr*) &addr, - connect_cb)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &timer_handle)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &tcp_handle)); + ASSERT_OK(uv_tcp_connect(&connect_req, + &tcp_handle, + (const struct sockaddr*) &addr, + connect_cb)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-rst.c b/deps/uv/test/test-tcp-rst.c index b5d216ce7e8e51..7729f03e607d6a 100644 --- a/deps/uv/test/test-tcp-rst.c +++ b/deps/uv/test/test-tcp-rst.c @@ -31,7 +31,7 @@ static int called_close_cb; static void close_cb(uv_handle_t* handle) { - ASSERT(handle == (uv_handle_t*) &tcp); + ASSERT_PTR_EQ(handle, (uv_handle_t*) &tcp); called_close_cb++; } @@ -48,7 +48,7 @@ static void read_cb(uv_stream_t* t, ssize_t nread, const uv_buf_t* buf) { ASSERT_EQ(nread, UV_ECONNRESET); int fd; - ASSERT_EQ(0, uv_fileno((uv_handle_t*) t, &fd)); + ASSERT_OK(uv_fileno((uv_handle_t*) t, &fd)); uv_handle_type type = uv_guess_handle(fd); ASSERT_EQ(type, UV_TCP); @@ -58,11 +58,11 @@ static void read_cb(uv_stream_t* t, ssize_t nread, const uv_buf_t* buf) { static void connect_cb(uv_connect_t *req, int status) { - ASSERT_EQ(status, 0); + ASSERT_OK(status); ASSERT_PTR_EQ(req, &connect_req); /* Start reading from the connection so we receive the RST in uv__read. */ - ASSERT_EQ(0, uv_read_start((uv_stream_t*) &tcp, alloc_cb, read_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*) &tcp, alloc_cb, read_cb)); /* Write 'QSH' to receive RST from the echo server. */ ASSERT_EQ(qbuf.len, uv_try_write((uv_stream_t*) &tcp, &qbuf, 1)); @@ -86,21 +86,21 @@ TEST_IMPL(tcp_rst) { qbuf.base = "QSH"; qbuf.len = 3; - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &server_addr)); r = uv_tcp_init(uv_default_loop(), &tcp); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &tcp, (const struct sockaddr*) &server_addr, connect_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(called_alloc_cb, 1); - ASSERT_EQ(called_connect_cb, 1); - ASSERT_EQ(called_close_cb, 1); + ASSERT_EQ(1, called_alloc_cb); + ASSERT_EQ(1, called_connect_cb); + ASSERT_EQ(1, called_close_cb); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-shutdown-after-write.c b/deps/uv/test/test-tcp-shutdown-after-write.c index d2401e8fdb36f6..cd8c24dd66b089 100644 --- a/deps/uv/test/test-tcp-shutdown-after-write.c +++ b/deps/uv/test/test-tcp-shutdown-after-write.c @@ -66,10 +66,10 @@ static void timer_cb(uv_timer_t* handle) { buf = uv_buf_init("TEST", 4); r = uv_write(&write_req, (uv_stream_t*)&conn, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_shutdown(&shutdown_req, (uv_stream_t*)&conn, shutdown_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -80,22 +80,22 @@ static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { static void connect_cb(uv_connect_t* req, int status) { int r; - ASSERT(status == 0); + ASSERT_OK(status); connect_cb_called++; r = uv_read_start((uv_stream_t*)&conn, alloc_cb, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); } static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); write_cb_called++; } static void shutdown_cb(uv_shutdown_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); shutdown_cb_called++; uv_close((uv_handle_t*)&conn, close_cb); } @@ -106,32 +106,32 @@ TEST_IMPL(tcp_shutdown_after_write) { uv_loop_t* loop; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); loop = uv_default_loop(); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, timer_cb, 125, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_init(loop, &conn); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &conn, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(shutdown_cb_called == 1); - ASSERT(conn_close_cb_called == 1); - ASSERT(timer_close_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, write_cb_called); + ASSERT_EQ(1, shutdown_cb_called); + ASSERT_EQ(1, conn_close_cb_called); + ASSERT_EQ(1, timer_close_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-tcp-try-write-error.c b/deps/uv/test/test-tcp-try-write-error.c index 97deccaa0dd7eb..80a23ed73793d6 100644 --- a/deps/uv/test/test-tcp-try-write-error.c +++ b/deps/uv/test/test-tcp-try-write-error.c @@ -49,21 +49,21 @@ static void incoming_close_cb(uv_handle_t* handle) { r = uv_try_write((uv_stream_t*) &client, &buf, 1); fprintf(stderr, "uv_try_write error: %d %s\n", r, uv_strerror(r)); ASSERT(r == UV_EPIPE || r == UV_ECONNABORTED || r == UV_ECONNRESET); - ASSERT(client.write_queue_size == 0); + ASSERT_OK(client.write_queue_size); } static void connect_cb(uv_connect_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); connect_cb_called++; } static void connection_cb(uv_stream_t* tcp, int status) { - ASSERT(status == 0); + ASSERT_OK(status); - ASSERT(0 == uv_tcp_init(tcp->loop, &incoming)); - ASSERT(0 == uv_accept(tcp, (uv_stream_t*) &incoming)); + ASSERT_OK(uv_tcp_init(tcp->loop, &incoming)); + ASSERT_OK(uv_accept(tcp, (uv_stream_t*) &incoming)); connection_cb_called++; uv_close((uv_handle_t*) &incoming, incoming_close_cb); @@ -74,11 +74,11 @@ static void connection_cb(uv_stream_t* tcp, int status) { static void start_server(void) { struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &server)); - ASSERT(0 == uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server, 128, connection_cb)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &server)); + ASSERT_OK(uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_listen((uv_stream_t*) &server, 128, connection_cb)); } @@ -88,21 +88,21 @@ TEST_IMPL(tcp_try_write_error) { start_server(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &client)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &client, - (struct sockaddr*) &addr, - connect_cb)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &client)); + ASSERT_OK(uv_tcp_connect(&connect_req, + &client, + (struct sockaddr*) &addr, + connect_cb)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); uv_close((uv_handle_t*) &client, close_cb); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(connect_cb_called == 1); - ASSERT(close_cb_called == 3); - ASSERT(connection_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(3, close_cb_called); + ASSERT_EQ(1, connection_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-try-write.c b/deps/uv/test/test-tcp-try-write.c index 6458857a85c879..afb20ec7df66ae 100644 --- a/deps/uv/test/test-tcp-try-write.c +++ b/deps/uv/test/test-tcp-try-write.c @@ -46,7 +46,7 @@ static void close_cb(uv_handle_t* handle) { static void connect_cb(uv_connect_t* req, int status) { int r; uv_buf_t buf; - ASSERT(status == 0); + ASSERT_OK(status); connect_cb_called++; do { @@ -87,24 +87,24 @@ static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { static void connection_cb(uv_stream_t* tcp, int status) { - ASSERT(status == 0); + ASSERT_OK(status); - ASSERT(0 == uv_tcp_init(tcp->loop, &incoming)); - ASSERT(0 == uv_accept(tcp, (uv_stream_t*) &incoming)); + ASSERT_OK(uv_tcp_init(tcp->loop, &incoming)); + ASSERT_OK(uv_accept(tcp, (uv_stream_t*) &incoming)); connection_cb_called++; - ASSERT(0 == uv_read_start((uv_stream_t*) &incoming, alloc_cb, read_cb)); + ASSERT_OK(uv_read_start((uv_stream_t*) &incoming, alloc_cb, read_cb)); } static void start_server(void) { struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &server)); - ASSERT(0 == uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server, 128, connection_cb)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &server)); + ASSERT_OK(uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_listen((uv_stream_t*) &server, 128, connection_cb)); } @@ -114,21 +114,21 @@ TEST_IMPL(tcp_try_write) { start_server(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &client)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &client, - (struct sockaddr*) &addr, - connect_cb)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &client)); + ASSERT_OK(uv_tcp_connect(&connect_req, + &client, + (struct sockaddr*) &addr, + connect_cb)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(connect_cb_called == 1); - ASSERT(close_cb_called == 3); - ASSERT(connection_cb_called == 1); - ASSERT(bytes_read == bytes_written); - ASSERT(bytes_written > 0); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(3, close_cb_called); + ASSERT_EQ(1, connection_cb_called); + ASSERT_EQ(bytes_read, bytes_written); + ASSERT_GT(bytes_written, 0); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-unexpected-read.c b/deps/uv/test/test-tcp-unexpected-read.c index e11f77473f4030..aef7a2f75d2242 100644 --- a/deps/uv/test/test-tcp-unexpected-read.c +++ b/deps/uv/test/test-tcp-unexpected-read.c @@ -60,14 +60,14 @@ static void read_cb(uv_stream_t* handle, ssize_t nread, const uv_buf_t* buf) { static void connect_cb(uv_connect_t* req, int status) { - ASSERT(req->handle == (uv_stream_t*) &client_handle); - ASSERT(0 == status); + ASSERT_PTR_EQ(req->handle, (uv_stream_t*) &client_handle); + ASSERT_OK(status); } static void write_cb(uv_write_t* req, int status) { - ASSERT(req->handle == (uv_stream_t*) &peer_handle); - ASSERT(0 == status); + ASSERT_PTR_EQ(req->handle, (uv_stream_t*) &peer_handle); + ASSERT_OK(status); } @@ -76,11 +76,11 @@ static void connection_cb(uv_stream_t* handle, int status) { buf = uv_buf_init("PING", 4); - ASSERT(0 == status); - ASSERT(0 == uv_accept(handle, (uv_stream_t*) &peer_handle)); - ASSERT(0 == uv_read_start((uv_stream_t*) &peer_handle, alloc_cb, read_cb)); - ASSERT(0 == uv_write(&write_req, (uv_stream_t*) &peer_handle, - &buf, 1, write_cb)); + ASSERT_OK(status); + ASSERT_OK(uv_accept(handle, (uv_stream_t*) &peer_handle)); + ASSERT_OK(uv_read_start((uv_stream_t*) &peer_handle, alloc_cb, read_cb)); + ASSERT_OK(uv_write(&write_req, (uv_stream_t*) &peer_handle, + &buf, 1, write_cb)); } @@ -88,29 +88,29 @@ TEST_IMPL(tcp_unexpected_read) { struct sockaddr_in addr; uv_loop_t* loop; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); loop = uv_default_loop(); - ASSERT(0 == uv_timer_init(loop, &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 1000, 0)); - ASSERT(0 == uv_check_init(loop, &check_handle)); - ASSERT(0 == uv_check_start(&check_handle, check_cb)); - ASSERT(0 == uv_tcp_init(loop, &server_handle)); - ASSERT(0 == uv_tcp_init(loop, &client_handle)); - ASSERT(0 == uv_tcp_init(loop, &peer_handle)); - ASSERT(0 == uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server_handle, 1, connection_cb)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &client_handle, - (const struct sockaddr*) &addr, - connect_cb)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_timer_init(loop, &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, 1000, 0)); + ASSERT_OK(uv_check_init(loop, &check_handle)); + ASSERT_OK(uv_check_start(&check_handle, check_cb)); + ASSERT_OK(uv_tcp_init(loop, &server_handle)); + ASSERT_OK(uv_tcp_init(loop, &client_handle)); + ASSERT_OK(uv_tcp_init(loop, &peer_handle)); + ASSERT_OK(uv_tcp_bind(&server_handle, (const struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_listen((uv_stream_t*) &server_handle, 1, connection_cb)); + ASSERT_OK(uv_tcp_connect(&connect_req, + &client_handle, + (const struct sockaddr*) &addr, + connect_cb)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); /* This is somewhat inexact but the idea is that the event loop should not * start busy looping when the server sends a message and the client isn't * reading. */ - ASSERT(ticks <= 20); + ASSERT_LE(ticks, 20); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-tcp-write-after-connect.c b/deps/uv/test/test-tcp-write-after-connect.c index 4a786995ff1002..63845bc45258a2 100644 --- a/deps/uv/test/test-tcp-write-after-connect.c +++ b/deps/uv/test/test-tcp-write-after-connect.c @@ -32,13 +32,13 @@ uv_buf_t buf = { "HELLO", 4 }; static void write_cb(uv_write_t *req, int status) { - ASSERT(status == UV_ECANCELED); + ASSERT_EQ(status, UV_ECANCELED); uv_close((uv_handle_t*) req->handle, NULL); } static void connect_cb(uv_connect_t *req, int status) { - ASSERT(status == UV_ECONNREFUSED); + ASSERT_EQ(status, UV_ECONNREFUSED); } @@ -49,20 +49,20 @@ TEST_IMPL(tcp_write_after_connect) { #endif struct sockaddr_in sa; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &sa)); - ASSERT(0 == uv_loop_init(&loop)); - ASSERT(0 == uv_tcp_init(&loop, &tcp_client)); - - ASSERT(0 == uv_tcp_connect(&connection_request, - &tcp_client, - (const struct sockaddr *) - &sa, - connect_cb)); - - ASSERT(0 == uv_write(&write_request, - (uv_stream_t *)&tcp_client, - &buf, 1, - write_cb)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &sa)); + ASSERT_OK(uv_loop_init(&loop)); + ASSERT_OK(uv_tcp_init(&loop, &tcp_client)); + + ASSERT_OK(uv_tcp_connect(&connection_request, + &tcp_client, + (const struct sockaddr *) + &sa, + connect_cb)); + + ASSERT_OK(uv_write(&write_request, + (uv_stream_t *)&tcp_client, + &buf, 1, + write_cb)); uv_run(&loop, UV_RUN_DEFAULT); diff --git a/deps/uv/test/test-tcp-write-fail.c b/deps/uv/test/test-tcp-write-fail.c index 2912e7c5068586..530329a3ac63c8 100644 --- a/deps/uv/test/test-tcp-write-fail.c +++ b/deps/uv/test/test-tcp-write-fail.c @@ -41,13 +41,13 @@ static void close_socket(uv_tcp_t* sock) { int r; r = uv_fileno((uv_handle_t*)sock, &fd); - ASSERT(r == 0); + ASSERT_OK(r); #ifdef _WIN32 r = closesocket((uv_os_sock_t)fd); #else r = close(fd); #endif - ASSERT(r == 0); + ASSERT_OK(r); } @@ -60,7 +60,7 @@ static void close_cb(uv_handle_t* handle) { static void write_cb(uv_write_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status != 0); + ASSERT(status); fprintf(stderr, "uv_write error: %s\n", uv_strerror(status)); write_cb_called++; @@ -73,8 +73,8 @@ static void connect_cb(uv_connect_t* req, int status) { uv_stream_t* stream; int r; - ASSERT(req == &connect_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &connect_req); + ASSERT_OK(status); stream = req->handle; connect_cb_called++; @@ -84,7 +84,7 @@ static void connect_cb(uv_connect_t* req, int status) { buf = uv_buf_init("hello\n", 6); r = uv_write(&write_req, stream, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -93,22 +93,22 @@ TEST_IMPL(tcp_write_fail) { uv_tcp_t client; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_tcp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &client, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, write_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-write-in-a-row.c b/deps/uv/test/test-tcp-write-in-a-row.c index 99f4dee125e1a8..89304eb5a34999 100644 --- a/deps/uv/test/test-tcp-write-in-a-row.c +++ b/deps/uv/test/test-tcp-write-in-a-row.c @@ -45,7 +45,7 @@ static void close_cb(uv_handle_t* handle) { static void write_cb(uv_write_t* w, int status) { /* the small write should finish immediately after the big write */ - ASSERT_EQ(0, uv_stream_get_write_queue_size((uv_stream_t*) &client)); + ASSERT_OK(uv_stream_get_write_queue_size((uv_stream_t*) &client)); write_cb_called++; @@ -62,13 +62,13 @@ static void connect_cb(uv_connect_t* _, int status) { uv_buf_t buf; size_t write_queue_size0, write_queue_size1; - ASSERT_EQ(0, status); + ASSERT_OK(status); connect_cb_called++; /* fire a big write */ buf = uv_buf_init(data, sizeof(data)); r = uv_write(&small_write, (uv_stream_t*) &client, &buf, 1, write_cb); - ASSERT_EQ(0, r); + ASSERT_OK(r); /* check that the write process gets stuck */ write_queue_size0 = uv_stream_get_write_queue_size((uv_stream_t*) &client); @@ -77,7 +77,7 @@ static void connect_cb(uv_connect_t* _, int status) { /* fire a small write, which should be queued */ buf = uv_buf_init("A", 1); r = uv_write(&big_write, (uv_stream_t*) &client, &buf, 1, write_cb); - ASSERT_EQ(0, r); + ASSERT_OK(r); write_queue_size1 = uv_stream_get_write_queue_size((uv_stream_t*) &client); ASSERT_EQ(write_queue_size1, write_queue_size0 + 1); @@ -93,22 +93,22 @@ static void alloc_cb(uv_handle_t* handle, size_t size, uv_buf_t* buf) { static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) {} static void connection_cb(uv_stream_t* tcp, int status) { - ASSERT_EQ(0, status); + ASSERT_OK(status); connection_cb_called++; - ASSERT_EQ(0, uv_tcp_init(tcp->loop, &incoming)); - ASSERT_EQ(0, uv_accept(tcp, (uv_stream_t*) &incoming)); - ASSERT_EQ(0, uv_read_start((uv_stream_t*) &incoming, alloc_cb, read_cb)); + ASSERT_OK(uv_tcp_init(tcp->loop, &incoming)); + ASSERT_OK(uv_accept(tcp, (uv_stream_t*) &incoming)); + ASSERT_OK(uv_read_start((uv_stream_t*) &incoming, alloc_cb, read_cb)); } static void start_server(void) { struct sockaddr_in addr; - ASSERT_EQ(0, uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - ASSERT_EQ(0, uv_tcp_init(uv_default_loop(), &server)); - ASSERT_EQ(0, uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); - ASSERT_EQ(0, uv_listen((uv_stream_t*) &server, 128, connection_cb)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &server)); + ASSERT_OK(uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_listen((uv_stream_t*) &server, 128, connection_cb)); } TEST_IMPL(tcp_write_in_a_row) { @@ -121,15 +121,15 @@ TEST_IMPL(tcp_write_in_a_row) { start_server(); - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT_EQ(0, uv_tcp_init(uv_default_loop(), &client)); - ASSERT_EQ(0, uv_tcp_connect(&connect_req, - &client, - (struct sockaddr*) &addr, - connect_cb)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &client)); + ASSERT_OK(uv_tcp_connect(&connect_req, + &client, + (struct sockaddr*) &addr, + connect_cb)); - ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); ASSERT_EQ(1, connect_cb_called); ASSERT_EQ(3, close_cb_called); diff --git a/deps/uv/test/test-tcp-write-queue-order.c b/deps/uv/test/test-tcp-write-queue-order.c index 7562c41d3de208..e838c88a6a2b55 100644 --- a/deps/uv/test/test-tcp-write-queue-order.c +++ b/deps/uv/test/test-tcp-write-queue-order.c @@ -67,7 +67,7 @@ static void connect_cb(uv_connect_t* req, int status) { int i; uv_buf_t buf; - ASSERT(status == 0); + ASSERT_OK(status); connect_cb_called++; buf = uv_buf_init(base, sizeof(base)); @@ -78,19 +78,19 @@ static void connect_cb(uv_connect_t* req, int status) { &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } } static void connection_cb(uv_stream_t* tcp, int status) { - ASSERT(status == 0); + ASSERT_OK(status); - ASSERT(0 == uv_tcp_init(tcp->loop, &incoming)); - ASSERT(0 == uv_accept(tcp, (uv_stream_t*) &incoming)); + ASSERT_OK(uv_tcp_init(tcp->loop, &incoming)); + ASSERT_OK(uv_accept(tcp, (uv_stream_t*) &incoming)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &timer)); - ASSERT(0 == uv_timer_start(&timer, timer_cb, 1000, 0)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &timer)); + ASSERT_OK(uv_timer_start(&timer, timer_cb, 1000, 0)); connection_cb_called++; } @@ -99,11 +99,11 @@ static void connection_cb(uv_stream_t* tcp, int status) { static void start_server(void) { struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - ASSERT(0 == uv_tcp_init(uv_default_loop(), &server)); - ASSERT(0 == uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); - ASSERT(0 == uv_listen((uv_stream_t*) &server, 128, connection_cb)); + ASSERT_OK(uv_tcp_init(uv_default_loop(), &server)); + ASSERT_OK(uv_tcp_bind(&server, (struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_listen((uv_stream_t*) &server, 128, connection_cb)); } @@ -114,25 +114,25 @@ TEST_IMPL(tcp_write_queue_order) { start_server(); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - - ASSERT(0 == uv_tcp_init(uv_default_loop(), &client)); - ASSERT(0 == uv_tcp_connect(&connect_req, - &client, - (struct sockaddr*) &addr, - connect_cb)); - ASSERT(0 == uv_send_buffer_size((uv_handle_t*) &client, &buffer_size)); - - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - - ASSERT(connect_cb_called == 1); - ASSERT(connection_cb_called == 1); - ASSERT(write_callbacks > 0); - ASSERT(write_cancelled_callbacks > 0); - ASSERT(write_callbacks + - write_error_callbacks + - write_cancelled_callbacks == REQ_COUNT); - ASSERT(close_cb_called == 3); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + + ASSERT_OK(uv_tcp_init(uv_default_loop(), &client)); + ASSERT_OK(uv_tcp_connect(&connect_req, + &client, + (struct sockaddr*) &addr, + connect_cb)); + ASSERT_OK(uv_send_buffer_size((uv_handle_t*) &client, &buffer_size)); + + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(1, connection_cb_called); + ASSERT_GT(write_callbacks, 0); + ASSERT_GT(write_cancelled_callbacks, 0); + ASSERT_EQ(write_callbacks + + write_error_callbacks + + write_cancelled_callbacks, REQ_COUNT); + ASSERT_EQ(3, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tcp-write-to-half-open-connection.c b/deps/uv/test/test-tcp-write-to-half-open-connection.c index 8978211d2b7663..2b2f5644e17969 100644 --- a/deps/uv/test/test-tcp-write-to-half-open-connection.c +++ b/deps/uv/test/test-tcp-write-to-half-open-connection.c @@ -45,23 +45,23 @@ static void connection_cb(uv_stream_t* server, int status) { int r; uv_buf_t buf; - ASSERT(server == (uv_stream_t*)&tcp_server); - ASSERT(status == 0); + ASSERT_PTR_EQ(server, (uv_stream_t*)&tcp_server); + ASSERT_OK(status); r = uv_tcp_init(server->loop, &tcp_peer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_accept(server, (uv_stream_t*)&tcp_peer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*)&tcp_peer, alloc_cb, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); buf.base = "hello\n"; buf.len = 6; r = uv_write(&write_req, (uv_stream_t*)&tcp_peer, &buf, 1, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -88,8 +88,8 @@ static void read_cb(uv_stream_t* stream, ssize_t nread, const uv_buf_t* buf) { static void connect_cb(uv_connect_t* req, int status) { - ASSERT(req == &connect_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &connect_req); + ASSERT_OK(status); /* Close the client. */ uv_close((uv_handle_t*)&tcp_client, NULL); @@ -97,7 +97,7 @@ static void connect_cb(uv_connect_t* req, int status) { static void write_cb(uv_write_t* req, int status) { - ASSERT(status == 0); + ASSERT_OK(status); write_cb_called++; } @@ -107,34 +107,34 @@ TEST_IMPL(tcp_write_to_half_open_connection) { uv_loop_t* loop; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); loop = uv_default_loop(); ASSERT_NOT_NULL(loop); r = uv_tcp_init(loop, &tcp_server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_bind(&tcp_server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_listen((uv_stream_t*)&tcp_server, 1, connection_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_init(loop, &tcp_client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &tcp_client, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(write_cb_called > 0); - ASSERT(read_cb_called > 0); + ASSERT_GT(write_cb_called, 0); + ASSERT_GT(read_cb_called, 0); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-tcp-writealot.c b/deps/uv/test/test-tcp-writealot.c index 3c6c149e92c590..ebafb1796327d3 100644 --- a/deps/uv/test/test-tcp-writealot.c +++ b/deps/uv/test/test-tcp-writealot.c @@ -65,19 +65,19 @@ static void close_cb(uv_handle_t* handle) { static void shutdown_cb(uv_shutdown_t* req, int status) { uv_tcp_t* tcp; - ASSERT(req == &shutdown_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &shutdown_req); + ASSERT_OK(status); tcp = (uv_tcp_t*)(req->handle); /* The write buffer should be empty by now. */ - ASSERT(tcp->write_queue_size == 0); + ASSERT_OK(tcp->write_queue_size); /* Now we wait for the EOF */ shutdown_cb_called++; /* We should have had all the writes called already. */ - ASSERT(write_cb_called == WRITES); + ASSERT_EQ(write_cb_called, WRITES); } @@ -88,7 +88,7 @@ static void read_cb(uv_stream_t* tcp, ssize_t nread, const uv_buf_t* buf) { bytes_received_done += nread; } else { - ASSERT(nread == UV_EOF); + ASSERT_EQ(nread, UV_EOF); printf("GOT EOF\n"); uv_close((uv_handle_t*)tcp, close_cb); } @@ -115,8 +115,8 @@ static void connect_cb(uv_connect_t* req, int status) { uv_stream_t* stream; int i, j, r; - ASSERT(req == &connect_req); - ASSERT(status == 0); + ASSERT_PTR_EQ(req, &connect_req); + ASSERT_OK(status); stream = req->handle; connect_cb_called++; @@ -131,16 +131,16 @@ static void connect_cb(uv_connect_t* req, int status) { } r = uv_write(write_req, stream, send_bufs, CHUNKS_PER_WRITE, write_cb); - ASSERT(r == 0); + ASSERT_OK(r); } /* Shutdown on drain. */ r = uv_shutdown(&shutdown_req, stream, shutdown_cb); - ASSERT(r == 0); + ASSERT_OK(r); /* Start reading */ r = uv_read_start(stream, alloc_cb, read_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -153,29 +153,29 @@ TEST_IMPL(tcp_writealot) { RETURN_SKIP("Test is too slow to run under ThreadSanitizer"); #endif - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); send_buffer = calloc(1, TOTAL_BYTES); ASSERT_NOT_NULL(send_buffer); r = uv_tcp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tcp_connect(&connect_req, &client, (const struct sockaddr*) &addr, connect_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(shutdown_cb_called == 1); - ASSERT(connect_cb_called == 1); - ASSERT(write_cb_called == WRITES); - ASSERT(close_cb_called == 1); - ASSERT(bytes_sent == TOTAL_BYTES); - ASSERT(bytes_sent_done == TOTAL_BYTES); - ASSERT(bytes_received_done == TOTAL_BYTES); + ASSERT_EQ(1, shutdown_cb_called); + ASSERT_EQ(1, connect_cb_called); + ASSERT_EQ(write_cb_called, WRITES); + ASSERT_EQ(1, close_cb_called); + ASSERT_EQ(bytes_sent, TOTAL_BYTES); + ASSERT_EQ(bytes_sent_done, TOTAL_BYTES); + ASSERT_EQ(bytes_received_done, TOTAL_BYTES); free(send_buffer); diff --git a/deps/uv/test/test-thread-affinity.c b/deps/uv/test/test-thread-affinity.c index 2c9b696ec7a5d2..d21487d9937756 100644 --- a/deps/uv/test/test-thread-affinity.c +++ b/deps/uv/test/test-thread-affinity.c @@ -1,4 +1,22 @@ /* Copyright libuv project contributors. All rights reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. */ #include "uv.h" @@ -16,12 +34,12 @@ static void check_affinity(void* arg) { cpumask = (char*)arg; cpumasksize = uv_cpumask_size(); - ASSERT(cpumasksize > 0); + ASSERT_GT(cpumasksize, 0); tid = uv_thread_self(); r = uv_thread_setaffinity(&tid, cpumask, NULL, cpumasksize); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_thread_setaffinity(&tid, cpumask + cpumasksize, cpumask, cpumasksize); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -45,13 +63,13 @@ TEST_IMPL(thread_affinity) { threads[0] = uv_thread_self(); #endif cpumasksize = uv_cpumask_size(); - ASSERT(cpumasksize > 0); + ASSERT_GT(cpumasksize, 0); cpumask = calloc(4 * cpumasksize, 1); ASSERT(cpumask); r = uv_thread_getaffinity(&threads[0], cpumask, cpumasksize); - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(cpumask[0] && "test must be run with cpu 0 affinity"); ncpus = 0; while (cpumask[++ncpus]) { } @@ -82,24 +100,24 @@ TEST_IMPL(thread_affinity) { } #endif - ASSERT(0 == uv_thread_create(threads + 1, - check_affinity, - &cpumask[t1first])); - ASSERT(0 == uv_thread_create(threads + 2, - check_affinity, - &cpumask[t2first])); - ASSERT(0 == uv_thread_join(threads + 1)); - ASSERT(0 == uv_thread_join(threads + 2)); + ASSERT_OK(uv_thread_create(threads + 1, + check_affinity, + &cpumask[t1first])); + ASSERT_OK(uv_thread_create(threads + 2, + check_affinity, + &cpumask[t2first])); + ASSERT_OK(uv_thread_join(threads + 1)); + ASSERT_OK(uv_thread_join(threads + 2)); ASSERT(cpumask[t1first + 0] == (ncpus == 1)); ASSERT(cpumask[t1first + 1] == (ncpus >= 2)); - ASSERT(cpumask[t1first + 2] == 0); + ASSERT_OK(cpumask[t1first + 2]); ASSERT(cpumask[t1first + 3] == (ncpus >= 4)); - ASSERT(cpumask[t2first + 0] == 1); - ASSERT(cpumask[t2first + 1] == 0); + ASSERT_EQ(1, cpumask[t2first + 0]); + ASSERT_OK(cpumask[t2first + 1]); ASSERT(cpumask[t2first + 2] == (ncpus >= 3)); - ASSERT(cpumask[t2first + 3] == 0); + ASSERT_OK(cpumask[t2first + 3]); c = uv_thread_getcpu(); ASSERT_GE(c, 0); @@ -107,16 +125,16 @@ TEST_IMPL(thread_affinity) { memset(cpumask, 0, cpumasksize); cpumask[c] = 1; r = uv_thread_setaffinity(&threads[0], cpumask, NULL, cpumasksize); - ASSERT_EQ(r, 0); + ASSERT_OK(r); memset(cpumask, 0, cpumasksize); r = uv_thread_getaffinity(&threads[0], cpumask, cpumasksize); - ASSERT_EQ(r, 0); + ASSERT_OK(r); for (i = 0; i < cpumasksize; i++) { if (i == c) ASSERT_EQ(1, cpumask[i]); else - ASSERT_EQ(0, cpumask[i]); + ASSERT_OK(cpumask[i]); } free(cpumask); @@ -129,7 +147,7 @@ TEST_IMPL(thread_affinity) { TEST_IMPL(thread_affinity) { int cpumasksize; cpumasksize = uv_cpumask_size(); - ASSERT(cpumasksize == UV_ENOTSUP); + ASSERT_EQ(cpumasksize, UV_ENOTSUP); return 0; } diff --git a/deps/uv/test/test-thread-equal.c b/deps/uv/test/test-thread-equal.c index f7bde71b3d900e..3b2ba8df4434b5 100644 --- a/deps/uv/test/test-thread-equal.c +++ b/deps/uv/test/test-thread-equal.c @@ -31,7 +31,7 @@ static void check_thread(void* arg) { #ifdef _WIN32 ASSERT_NOT_NULL(self_id); #endif - ASSERT(uv_thread_equal(&main_thread_id, &self_id) == 0); + ASSERT_OK(uv_thread_equal(&main_thread_id, &self_id)); *thread_id = uv_thread_self(); } @@ -41,11 +41,11 @@ TEST_IMPL(thread_equal) { #ifdef _WIN32 ASSERT_NOT_NULL(main_thread_id); #endif - ASSERT(0 != uv_thread_equal(&main_thread_id, &main_thread_id)); - ASSERT(0 == uv_thread_create(threads + 0, check_thread, subthreads + 0)); - ASSERT(0 == uv_thread_create(threads + 1, check_thread, subthreads + 1)); - ASSERT(0 == uv_thread_join(threads + 0)); - ASSERT(0 == uv_thread_join(threads + 1)); - ASSERT(0 == uv_thread_equal(subthreads + 0, subthreads + 1)); + ASSERT_NE(0, uv_thread_equal(&main_thread_id, &main_thread_id)); + ASSERT_OK(uv_thread_create(threads + 0, check_thread, subthreads + 0)); + ASSERT_OK(uv_thread_create(threads + 1, check_thread, subthreads + 1)); + ASSERT_OK(uv_thread_join(threads + 0)); + ASSERT_OK(uv_thread_join(threads + 1)); + ASSERT_OK(uv_thread_equal(subthreads + 0, subthreads + 1)); return 0; } diff --git a/deps/uv/test/test-thread.c b/deps/uv/test/test-thread.c index 82f80833ab1690..d0094e304435bb 100644 --- a/deps/uv/test/test-thread.c +++ b/deps/uv/test/test-thread.c @@ -71,7 +71,7 @@ static void getaddrinfo_do(struct getaddrinfo_req* req) { "localhost", NULL, NULL); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -80,7 +80,7 @@ static void getaddrinfo_cb(uv_getaddrinfo_t* handle, struct addrinfo* res) { struct getaddrinfo_req* req; - ASSERT(status == 0); + ASSERT_OK(status); req = container_of(handle, struct getaddrinfo_req, handle); uv_freeaddrinfo(res); @@ -94,7 +94,7 @@ static void fs_do(struct fs_req* req) { int r; r = uv_fs_stat(req->loop, &req->handle, ".", fs_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -115,7 +115,7 @@ static void do_work(void* arg) { size_t i; struct test_thread* thread = arg; - ASSERT(0 == uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); for (i = 0; i < ARRAY_SIZE(getaddrinfo_reqs); i++) { struct getaddrinfo_req* req = getaddrinfo_reqs + i; @@ -131,14 +131,14 @@ static void do_work(void* arg) { fs_do(req); } - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); - ASSERT(0 == uv_loop_close(&loop)); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_loop_close(&loop)); thread->thread_called = 1; } static void thread_entry(void* arg) { - ASSERT(arg == (void *) 42); + ASSERT_PTR_EQ(arg, (void *) 42); thread_called++; } @@ -148,12 +148,12 @@ TEST_IMPL(thread_create) { int r; r = uv_thread_create(&tid, thread_entry, (void *) 42); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_thread_join(&tid); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(thread_called == 1); + ASSERT_EQ(1, thread_called); return 0; } @@ -176,13 +176,13 @@ TEST_IMPL(threadpool_multiple_event_loops) { for (i = 0; i < ARRAY_SIZE(threads); i++) { r = uv_thread_create(&threads[i].thread_id, do_work, &threads[i]); - ASSERT(r == 0); + ASSERT_OK(r); } for (i = 0; i < ARRAY_SIZE(threads); i++) { r = uv_thread_join(&threads[i].thread_id); - ASSERT(r == 0); - ASSERT(threads[i].thread_called == 1); + ASSERT_OK(r); + ASSERT_EQ(1, threads[i].thread_called); } return 0; @@ -192,7 +192,7 @@ TEST_IMPL(threadpool_multiple_event_loops) { static void tls_thread(void* arg) { ASSERT_NULL(uv_key_get(&tls_key)); uv_key_set(&tls_key, arg); - ASSERT(arg == uv_key_get(&tls_key)); + ASSERT_PTR_EQ(arg, uv_key_get(&tls_key)); uv_key_set(&tls_key, NULL); ASSERT_NULL(uv_key_get(&tls_key)); } @@ -201,14 +201,14 @@ static void tls_thread(void* arg) { TEST_IMPL(thread_local_storage) { char name[] = "main"; uv_thread_t threads[2]; - ASSERT(0 == uv_key_create(&tls_key)); + ASSERT_OK(uv_key_create(&tls_key)); ASSERT_NULL(uv_key_get(&tls_key)); uv_key_set(&tls_key, name); - ASSERT(name == uv_key_get(&tls_key)); - ASSERT(0 == uv_thread_create(threads + 0, tls_thread, threads + 0)); - ASSERT(0 == uv_thread_create(threads + 1, tls_thread, threads + 1)); - ASSERT(0 == uv_thread_join(threads + 0)); - ASSERT(0 == uv_thread_join(threads + 1)); + ASSERT_PTR_EQ(name, uv_key_get(&tls_key)); + ASSERT_OK(uv_thread_create(threads + 0, tls_thread, threads + 0)); + ASSERT_OK(uv_thread_create(threads + 1, tls_thread, threads + 1)); + ASSERT_OK(uv_thread_join(threads + 0)); + ASSERT_OK(uv_thread_join(threads + 1)); uv_key_delete(&tls_key); return 0; } @@ -222,30 +222,30 @@ static void thread_check_stack(void* arg) { * on MacOS. */ if (expected == 0) expected = 512 * 1024; - ASSERT(pthread_get_stacksize_np(pthread_self()) >= expected); + ASSERT_GE(pthread_get_stacksize_np(pthread_self()), expected); #elif defined(__linux__) && defined(__GLIBC__) size_t expected; struct rlimit lim; size_t stack_size; pthread_attr_t attr; - ASSERT(0 == getrlimit(RLIMIT_STACK, &lim)); + ASSERT_OK(getrlimit(RLIMIT_STACK, &lim)); if (lim.rlim_cur == RLIM_INFINITY) lim.rlim_cur = 2 << 20; /* glibc default. */ - ASSERT(0 == pthread_getattr_np(pthread_self(), &attr)); - ASSERT(0 == pthread_attr_getstacksize(&attr, &stack_size)); + ASSERT_OK(pthread_getattr_np(pthread_self(), &attr)); + ASSERT_OK(pthread_attr_getstacksize(&attr, &stack_size)); expected = arg == NULL ? 0 : ((uv_thread_options_t*)arg)->stack_size; if (expected == 0) expected = (size_t)lim.rlim_cur; - ASSERT(stack_size >= expected); - ASSERT(0 == pthread_attr_destroy(&attr)); + ASSERT_GE(stack_size, expected); + ASSERT_OK(pthread_attr_destroy(&attr)); #endif } TEST_IMPL(thread_stack_size) { uv_thread_t thread; - ASSERT(0 == uv_thread_create(&thread, thread_check_stack, NULL)); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_create(&thread, thread_check_stack, NULL)); + ASSERT_OK(uv_thread_join(&thread)); return 0; } @@ -255,42 +255,42 @@ TEST_IMPL(thread_stack_size_explicit) { options.flags = UV_THREAD_HAS_STACK_SIZE; options.stack_size = 1024 * 1024; - ASSERT(0 == uv_thread_create_ex(&thread, &options, - thread_check_stack, &options)); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_create_ex(&thread, &options, + thread_check_stack, &options)); + ASSERT_OK(uv_thread_join(&thread)); options.stack_size = 8 * 1024 * 1024; /* larger than most default os sizes */ - ASSERT(0 == uv_thread_create_ex(&thread, &options, - thread_check_stack, &options)); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_create_ex(&thread, &options, + thread_check_stack, &options)); + ASSERT_OK(uv_thread_join(&thread)); options.stack_size = 0; - ASSERT(0 == uv_thread_create_ex(&thread, &options, - thread_check_stack, &options)); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_create_ex(&thread, &options, + thread_check_stack, &options)); + ASSERT_OK(uv_thread_join(&thread)); options.stack_size = 42; - ASSERT(0 == uv_thread_create_ex(&thread, &options, - thread_check_stack, &options)); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_create_ex(&thread, &options, + thread_check_stack, &options)); + ASSERT_OK(uv_thread_join(&thread)); #ifdef PTHREAD_STACK_MIN options.stack_size = PTHREAD_STACK_MIN - 42; /* unaligned size */ - ASSERT(0 == uv_thread_create_ex(&thread, &options, - thread_check_stack, &options)); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_create_ex(&thread, &options, + thread_check_stack, &options)); + ASSERT_OK(uv_thread_join(&thread)); options.stack_size = PTHREAD_STACK_MIN / 2 - 42; /* unaligned size */ - ASSERT(0 == uv_thread_create_ex(&thread, &options, - thread_check_stack, &options)); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_create_ex(&thread, &options, + thread_check_stack, &options)); + ASSERT_OK(uv_thread_join(&thread)); #endif /* unaligned size, should be larger than PTHREAD_STACK_MIN */ options.stack_size = 1234567; - ASSERT(0 == uv_thread_create_ex(&thread, &options, - thread_check_stack, &options)); - ASSERT(0 == uv_thread_join(&thread)); + ASSERT_OK(uv_thread_create_ex(&thread, &options, + thread_check_stack, &options)); + ASSERT_OK(uv_thread_join(&thread)); return 0; } diff --git a/deps/uv/test/test-threadpool-cancel.c b/deps/uv/test/test-threadpool-cancel.c index fed0b07a3ca960..b758ac4f6b66ec 100644 --- a/deps/uv/test/test-threadpool-cancel.c +++ b/deps/uv/test/test-threadpool-cancel.c @@ -73,8 +73,8 @@ static void saturate_threadpool(void) { loop = uv_default_loop(); for (i = 0; i < ARRAY_SIZE(pause_reqs); i += 1) { - ASSERT(0 == uv_sem_init(pause_sems + i, 0)); - ASSERT(0 == uv_queue_work(loop, pause_reqs + i, work_cb, done_cb)); + ASSERT_OK(uv_sem_init(pause_sems + i, 0)); + ASSERT_OK(uv_queue_work(loop, pause_reqs + i, work_cb, done_cb)); } } @@ -119,7 +119,8 @@ static int known_broken(uv_req_t* req) { static void fs_cb(uv_fs_t* req) { - ASSERT(known_broken((uv_req_t*) req) || req->result == UV_ECANCELED); + ASSERT_NE(known_broken((uv_req_t*) req) || \ + req->result == UV_ECANCELED, 0); uv_fs_req_cleanup(req); fs_cb_called++; } @@ -128,7 +129,7 @@ static void fs_cb(uv_fs_t* req) { static void getaddrinfo_cb(uv_getaddrinfo_t* req, int status, struct addrinfo* res) { - ASSERT(status == UV_EAI_CANCELED); + ASSERT_EQ(status, UV_EAI_CANCELED); ASSERT_NULL(res); uv_freeaddrinfo(res); /* Should not crash. */ } @@ -138,7 +139,7 @@ static void getnameinfo_cb(uv_getnameinfo_t* handle, int status, const char* hostname, const char* service) { - ASSERT(status == UV_EAI_CANCELED); + ASSERT_EQ(status, UV_EAI_CANCELED); ASSERT_NULL(hostname); ASSERT_NULL(service); } @@ -150,7 +151,7 @@ static void work2_cb(uv_work_t* req) { static void done2_cb(uv_work_t* req, int status) { - ASSERT(status == UV_ECANCELED); + ASSERT_EQ(status, UV_ECANCELED); done2_cb_called++; } @@ -174,7 +175,7 @@ static void timer_cb(uv_timer_t* handle) { static void nop_done_cb(uv_work_t* req, int status) { - ASSERT(status == UV_ECANCELED); + ASSERT_EQ(status, UV_ECANCELED); done_cb_called++; } @@ -184,9 +185,9 @@ static void nop_random_cb(uv_random_t* req, int status, void* buf, size_t len) { ri = container_of(req, struct random_info, random_req); - ASSERT(status == UV_ECANCELED); - ASSERT(buf == (void*) ri->buf); - ASSERT(len == sizeof(ri->buf)); + ASSERT_EQ(status, UV_ECANCELED); + ASSERT_PTR_EQ(buf, (void*) ri->buf); + ASSERT_EQ(len, sizeof(ri->buf)); done_cb_called++; } @@ -204,21 +205,21 @@ TEST_IMPL(threadpool_cancel_getaddrinfo) { saturate_threadpool(); r = uv_getaddrinfo(loop, reqs + 0, getaddrinfo_cb, "fail", NULL, NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_getaddrinfo(loop, reqs + 1, getaddrinfo_cb, NULL, "fail", NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_getaddrinfo(loop, reqs + 2, getaddrinfo_cb, "fail", "fail", NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_getaddrinfo(loop, reqs + 3, getaddrinfo_cb, "fail", NULL, &hints); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_timer_init(loop, &ci.timer_handle)); - ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == timer_cb_called); + ASSERT_OK(uv_timer_init(loop, &ci.timer_handle)); + ASSERT_OK(uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, timer_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -233,28 +234,28 @@ TEST_IMPL(threadpool_cancel_getnameinfo) { int r; r = uv_ip4_addr("127.0.0.1", 80, &addr4); - ASSERT(r == 0); + ASSERT_OK(r); INIT_CANCEL_INFO(&ci, reqs); loop = uv_default_loop(); saturate_threadpool(); r = uv_getnameinfo(loop, reqs + 0, getnameinfo_cb, (const struct sockaddr*)&addr4, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_getnameinfo(loop, reqs + 1, getnameinfo_cb, (const struct sockaddr*)&addr4, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_getnameinfo(loop, reqs + 2, getnameinfo_cb, (const struct sockaddr*)&addr4, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_getnameinfo(loop, reqs + 3, getnameinfo_cb, (const struct sockaddr*)&addr4, 0); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_timer_init(loop, &ci.timer_handle)); - ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == timer_cb_called); + ASSERT_OK(uv_timer_init(loop, &ci.timer_handle)); + ASSERT_OK(uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, timer_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -267,17 +268,17 @@ TEST_IMPL(threadpool_cancel_random) { saturate_threadpool(); loop = uv_default_loop(); - ASSERT(0 == uv_random(loop, - &req.random_req, - &req.buf, - sizeof(req.buf), - 0, - nop_random_cb)); - ASSERT(0 == uv_cancel((uv_req_t*) &req)); - ASSERT(0 == done_cb_called); + ASSERT_OK(uv_random(loop, + &req.random_req, + &req.buf, + sizeof(req.buf), + 0, + nop_random_cb)); + ASSERT_OK(uv_cancel((uv_req_t*) &req)); + ASSERT_OK(done_cb_called); unblock_threadpool(); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == done_cb_called); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, done_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -295,13 +296,13 @@ TEST_IMPL(threadpool_cancel_work) { saturate_threadpool(); for (i = 0; i < ARRAY_SIZE(reqs); i++) - ASSERT(0 == uv_queue_work(loop, reqs + i, work2_cb, done2_cb)); + ASSERT_OK(uv_queue_work(loop, reqs + i, work2_cb, done2_cb)); - ASSERT(0 == uv_timer_init(loop, &ci.timer_handle)); - ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == timer_cb_called); - ASSERT(ARRAY_SIZE(reqs) == done2_cb_called); + ASSERT_OK(uv_timer_init(loop, &ci.timer_handle)); + ASSERT_OK(uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, timer_cb_called); + ASSERT_EQ(ARRAY_SIZE(reqs), done2_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -322,39 +323,39 @@ TEST_IMPL(threadpool_cancel_fs) { /* Needs to match ARRAY_SIZE(fs_reqs). */ n = 0; - ASSERT(0 == uv_fs_chmod(loop, reqs + n++, "/", 0, fs_cb)); - ASSERT(0 == uv_fs_chown(loop, reqs + n++, "/", 0, 0, fs_cb)); - ASSERT(0 == uv_fs_close(loop, reqs + n++, 0, fs_cb)); - ASSERT(0 == uv_fs_fchmod(loop, reqs + n++, 0, 0, fs_cb)); - ASSERT(0 == uv_fs_fchown(loop, reqs + n++, 0, 0, 0, fs_cb)); - ASSERT(0 == uv_fs_fdatasync(loop, reqs + n++, 0, fs_cb)); - ASSERT(0 == uv_fs_fstat(loop, reqs + n++, 0, fs_cb)); - ASSERT(0 == uv_fs_fsync(loop, reqs + n++, 0, fs_cb)); - ASSERT(0 == uv_fs_ftruncate(loop, reqs + n++, 0, 0, fs_cb)); - ASSERT(0 == uv_fs_futime(loop, reqs + n++, 0, 0, 0, fs_cb)); - ASSERT(0 == uv_fs_link(loop, reqs + n++, "/", "/", fs_cb)); - ASSERT(0 == uv_fs_lstat(loop, reqs + n++, "/", fs_cb)); - ASSERT(0 == uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb)); - ASSERT(0 == uv_fs_open(loop, reqs + n++, "/", 0, 0, fs_cb)); - ASSERT(0 == uv_fs_read(loop, reqs + n++, -1, &iov, 1, 0, fs_cb)); - ASSERT(0 == uv_fs_scandir(loop, reqs + n++, "/", 0, fs_cb)); - ASSERT(0 == uv_fs_readlink(loop, reqs + n++, "/", fs_cb)); - ASSERT(0 == uv_fs_realpath(loop, reqs + n++, "/", fs_cb)); - ASSERT(0 == uv_fs_rename(loop, reqs + n++, "/", "/", fs_cb)); - ASSERT(0 == uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb)); - ASSERT(0 == uv_fs_sendfile(loop, reqs + n++, 0, 0, 0, 0, fs_cb)); - ASSERT(0 == uv_fs_stat(loop, reqs + n++, "/", fs_cb)); - ASSERT(0 == uv_fs_symlink(loop, reqs + n++, "/", "/", 0, fs_cb)); - ASSERT(0 == uv_fs_unlink(loop, reqs + n++, "/", fs_cb)); - ASSERT(0 == uv_fs_utime(loop, reqs + n++, "/", 0, 0, fs_cb)); - ASSERT(0 == uv_fs_write(loop, reqs + n++, -1, &iov, 1, 0, fs_cb)); - ASSERT(n == ARRAY_SIZE(reqs)); - - ASSERT(0 == uv_timer_init(loop, &ci.timer_handle)); - ASSERT(0 == uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(n == fs_cb_called); - ASSERT(1 == timer_cb_called); + ASSERT_OK(uv_fs_chmod(loop, reqs + n++, "/", 0, fs_cb)); + ASSERT_OK(uv_fs_chown(loop, reqs + n++, "/", 0, 0, fs_cb)); + ASSERT_OK(uv_fs_close(loop, reqs + n++, 0, fs_cb)); + ASSERT_OK(uv_fs_fchmod(loop, reqs + n++, 0, 0, fs_cb)); + ASSERT_OK(uv_fs_fchown(loop, reqs + n++, 0, 0, 0, fs_cb)); + ASSERT_OK(uv_fs_fdatasync(loop, reqs + n++, 0, fs_cb)); + ASSERT_OK(uv_fs_fstat(loop, reqs + n++, 0, fs_cb)); + ASSERT_OK(uv_fs_fsync(loop, reqs + n++, 0, fs_cb)); + ASSERT_OK(uv_fs_ftruncate(loop, reqs + n++, 0, 0, fs_cb)); + ASSERT_OK(uv_fs_futime(loop, reqs + n++, 0, 0, 0, fs_cb)); + ASSERT_OK(uv_fs_link(loop, reqs + n++, "/", "/", fs_cb)); + ASSERT_OK(uv_fs_lstat(loop, reqs + n++, "/", fs_cb)); + ASSERT_OK(uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb)); + ASSERT_OK(uv_fs_open(loop, reqs + n++, "/", 0, 0, fs_cb)); + ASSERT_OK(uv_fs_read(loop, reqs + n++, -1, &iov, 1, 0, fs_cb)); + ASSERT_OK(uv_fs_scandir(loop, reqs + n++, "/", 0, fs_cb)); + ASSERT_OK(uv_fs_readlink(loop, reqs + n++, "/", fs_cb)); + ASSERT_OK(uv_fs_realpath(loop, reqs + n++, "/", fs_cb)); + ASSERT_OK(uv_fs_rename(loop, reqs + n++, "/", "/", fs_cb)); + ASSERT_OK(uv_fs_mkdir(loop, reqs + n++, "/", 0, fs_cb)); + ASSERT_OK(uv_fs_sendfile(loop, reqs + n++, 0, 0, 0, 0, fs_cb)); + ASSERT_OK(uv_fs_stat(loop, reqs + n++, "/", fs_cb)); + ASSERT_OK(uv_fs_symlink(loop, reqs + n++, "/", "/", 0, fs_cb)); + ASSERT_OK(uv_fs_unlink(loop, reqs + n++, "/", fs_cb)); + ASSERT_OK(uv_fs_utime(loop, reqs + n++, "/", 0, 0, fs_cb)); + ASSERT_OK(uv_fs_write(loop, reqs + n++, -1, &iov, 1, 0, fs_cb)); + ASSERT_EQ(n, ARRAY_SIZE(reqs)); + + ASSERT_OK(uv_timer_init(loop, &ci.timer_handle)); + ASSERT_OK(uv_timer_start(&ci.timer_handle, timer_cb, 10, 0)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(n, fs_cb_called); + ASSERT_EQ(1, timer_cb_called); MAKE_VALGRIND_HAPPY(loop); @@ -368,12 +369,12 @@ TEST_IMPL(threadpool_cancel_single) { saturate_threadpool(); loop = uv_default_loop(); - ASSERT(0 == uv_queue_work(loop, &req, (uv_work_cb) abort, nop_done_cb)); - ASSERT(0 == uv_cancel((uv_req_t*) &req)); - ASSERT(0 == done_cb_called); + ASSERT_OK(uv_queue_work(loop, &req, (uv_work_cb) abort, nop_done_cb)); + ASSERT_OK(uv_cancel((uv_req_t*) &req)); + ASSERT_OK(done_cb_called); unblock_threadpool(); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); - ASSERT(1 == done_cb_called); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_EQ(1, done_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -404,7 +405,7 @@ TEST_IMPL(threadpool_cancel_when_busy) { ASSERT_EQ(uv_cancel((uv_req_t*) &req), UV_EBUSY); ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT_EQ(done_cb_called, 1); + ASSERT_EQ(1, done_cb_called); uv_sem_destroy(&sem_lock); diff --git a/deps/uv/test/test-threadpool.c b/deps/uv/test/test-threadpool.c index 5254131bce303d..fb5e5732e6aa34 100644 --- a/deps/uv/test/test-threadpool.c +++ b/deps/uv/test/test-threadpool.c @@ -29,16 +29,16 @@ static char data; static void work_cb(uv_work_t* req) { - ASSERT(req == &work_req); - ASSERT(req->data == &data); + ASSERT_PTR_EQ(req, &work_req); + ASSERT_PTR_EQ(req->data, &data); work_cb_count++; } static void after_work_cb(uv_work_t* req, int status) { - ASSERT(status == 0); - ASSERT(req == &work_req); - ASSERT(req->data == &data); + ASSERT_OK(status); + ASSERT_PTR_EQ(req, &work_req); + ASSERT_PTR_EQ(req->data, &data); after_work_cb_count++; } @@ -48,11 +48,11 @@ TEST_IMPL(threadpool_queue_work_simple) { work_req.data = &data; r = uv_queue_work(uv_default_loop(), &work_req, work_cb, after_work_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(work_cb_count == 1); - ASSERT(after_work_cb_count == 1); + ASSERT_EQ(1, work_cb_count); + ASSERT_EQ(1, after_work_cb_count); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -64,12 +64,12 @@ TEST_IMPL(threadpool_queue_work_einval) { work_req.data = &data; r = uv_queue_work(uv_default_loop(), &work_req, NULL, after_work_cb); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(work_cb_count == 0); - ASSERT(after_work_cb_count == 0); + ASSERT_OK(work_cb_count); + ASSERT_OK(after_work_cb_count); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-timer-again.c b/deps/uv/test/test-timer-again.c index cb298956aa94ac..d7f0b83ab5576f 100644 --- a/deps/uv/test/test-timer-again.c +++ b/deps/uv/test/test-timer-again.c @@ -44,8 +44,8 @@ static void close_cb(uv_handle_t* handle) { static void repeat_1_cb(uv_timer_t* handle) { int r; - ASSERT(handle == &repeat_1); - ASSERT(uv_timer_get_repeat((uv_timer_t*)handle) == 50); + ASSERT_PTR_EQ(handle, &repeat_1); + ASSERT_EQ(50, uv_timer_get_repeat((uv_timer_t*)handle)); fprintf(stderr, "repeat_1_cb called after %ld ms\n", (long int)(uv_now(uv_default_loop()) - start_time)); @@ -54,7 +54,7 @@ static void repeat_1_cb(uv_timer_t* handle) { repeat_1_cb_called++; r = uv_timer_again(&repeat_2); - ASSERT(r == 0); + ASSERT_OK(r); if (repeat_1_cb_called == 10) { uv_close((uv_handle_t*)handle, close_cb); @@ -67,7 +67,7 @@ static void repeat_1_cb(uv_timer_t* handle) { static void repeat_2_cb(uv_timer_t* handle) { - ASSERT(handle == &repeat_2); + ASSERT_PTR_EQ(handle, &repeat_2); ASSERT(repeat_2_cb_allowed); fprintf(stderr, "repeat_2_cb called after %ld ms\n", @@ -77,7 +77,7 @@ static void repeat_2_cb(uv_timer_t* handle) { repeat_2_cb_called++; if (uv_timer_get_repeat(&repeat_2) == 0) { - ASSERT(0 == uv_is_active((uv_handle_t*) handle)); + ASSERT_OK(uv_is_active((uv_handle_t*) handle)); uv_close((uv_handle_t*)handle, close_cb); return; } @@ -85,7 +85,7 @@ static void repeat_2_cb(uv_timer_t* handle) { fprintf(stderr, "uv_timer_get_repeat %ld ms\n", (long int)uv_timer_get_repeat(&repeat_2)); fflush(stderr); - ASSERT(uv_timer_get_repeat(&repeat_2) == 100); + ASSERT_EQ(100, uv_timer_get_repeat(&repeat_2)); /* This shouldn't take effect immediately. */ uv_timer_set_repeat(&repeat_2, 0); @@ -96,41 +96,41 @@ TEST_IMPL(timer_again) { int r; start_time = uv_now(uv_default_loop()); - ASSERT(0 < start_time); + ASSERT_LT(0, start_time); /* Verify that it is not possible to uv_timer_again a never-started timer. */ r = uv_timer_init(uv_default_loop(), &dummy); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_again(&dummy); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_unref((uv_handle_t*)&dummy); /* Start timer repeat_1. */ r = uv_timer_init(uv_default_loop(), &repeat_1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&repeat_1, repeat_1_cb, 50, 0); - ASSERT(r == 0); - ASSERT(uv_timer_get_repeat(&repeat_1) == 0); + ASSERT_OK(r); + ASSERT_OK(uv_timer_get_repeat(&repeat_1)); /* Actually make repeat_1 repeating. */ uv_timer_set_repeat(&repeat_1, 50); - ASSERT(uv_timer_get_repeat(&repeat_1) == 50); + ASSERT_EQ(50, uv_timer_get_repeat(&repeat_1)); /* * Start another repeating timer. It'll be again()ed by the repeat_1 so * it should not time out until repeat_1 stops. */ r = uv_timer_init(uv_default_loop(), &repeat_2); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&repeat_2, repeat_2_cb, 100, 100); - ASSERT(r == 0); - ASSERT(uv_timer_get_repeat(&repeat_2) == 100); + ASSERT_OK(r); + ASSERT_EQ(100, uv_timer_get_repeat(&repeat_2)); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(repeat_1_cb_called == 10); - ASSERT(repeat_2_cb_called == 2); - ASSERT(close_cb_called == 2); + ASSERT_EQ(10, repeat_1_cb_called); + ASSERT_EQ(2, repeat_2_cb_called); + ASSERT_EQ(2, close_cb_called); fprintf(stderr, "Test took %ld ms (expected ~700 ms)\n", (long int)(uv_now(uv_default_loop()) - start_time)); diff --git a/deps/uv/test/test-timer-from-check.c b/deps/uv/test/test-timer-from-check.c index e1a002d8121065..e5f5cb2f60a491 100644 --- a/deps/uv/test/test-timer-from-check.c +++ b/deps/uv/test/test-timer-from-check.c @@ -32,49 +32,49 @@ static int timer_cb_called; static void prepare_cb(uv_prepare_t* handle) { - ASSERT(0 == uv_prepare_stop(&prepare_handle)); - ASSERT(0 == prepare_cb_called); - ASSERT(1 == check_cb_called); - ASSERT(0 == timer_cb_called); + ASSERT_OK(uv_prepare_stop(&prepare_handle)); + ASSERT_OK(prepare_cb_called); + ASSERT_EQ(1, check_cb_called); + ASSERT_OK(timer_cb_called); prepare_cb_called++; } static void timer_cb(uv_timer_t* handle) { - ASSERT(0 == uv_timer_stop(&timer_handle)); - ASSERT(1 == prepare_cb_called); - ASSERT(1 == check_cb_called); - ASSERT(0 == timer_cb_called); + ASSERT_OK(uv_timer_stop(&timer_handle)); + ASSERT_EQ(1, prepare_cb_called); + ASSERT_EQ(1, check_cb_called); + ASSERT_OK(timer_cb_called); timer_cb_called++; } static void check_cb(uv_check_t* handle) { - ASSERT(0 == uv_check_stop(&check_handle)); - ASSERT(0 == uv_timer_stop(&timer_handle)); /* Runs before timer_cb. */ - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 50, 0)); - ASSERT(0 == uv_prepare_start(&prepare_handle, prepare_cb)); - ASSERT(0 == prepare_cb_called); - ASSERT(0 == check_cb_called); - ASSERT(0 == timer_cb_called); + ASSERT_OK(uv_check_stop(&check_handle)); + ASSERT_OK(uv_timer_stop(&timer_handle)); /* Runs before timer_cb. */ + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, 50, 0)); + ASSERT_OK(uv_prepare_start(&prepare_handle, prepare_cb)); + ASSERT_OK(prepare_cb_called); + ASSERT_OK(check_cb_called); + ASSERT_OK(timer_cb_called); check_cb_called++; } TEST_IMPL(timer_from_check) { - ASSERT(0 == uv_prepare_init(uv_default_loop(), &prepare_handle)); - ASSERT(0 == uv_check_init(uv_default_loop(), &check_handle)); - ASSERT(0 == uv_check_start(&check_handle, check_cb)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_cb, 50, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(1 == prepare_cb_called); - ASSERT(1 == check_cb_called); - ASSERT(1 == timer_cb_called); + ASSERT_OK(uv_prepare_init(uv_default_loop(), &prepare_handle)); + ASSERT_OK(uv_check_init(uv_default_loop(), &check_handle)); + ASSERT_OK(uv_check_start(&check_handle, check_cb)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, timer_cb, 50, 0)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_EQ(1, prepare_cb_called); + ASSERT_EQ(1, check_cb_called); + ASSERT_EQ(1, timer_cb_called); uv_close((uv_handle_t*) &prepare_handle, NULL); uv_close((uv_handle_t*) &check_handle, NULL); uv_close((uv_handle_t*) &timer_handle, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_ONCE)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; } diff --git a/deps/uv/test/test-timer.c b/deps/uv/test/test-timer.c index 2488f14c204b8b..d889e707731886 100644 --- a/deps/uv/test/test-timer.c +++ b/deps/uv/test/test-timer.c @@ -41,7 +41,7 @@ static void once_close_cb(uv_handle_t* handle) { printf("ONCE_CLOSE_CB\n"); ASSERT_NOT_NULL(handle); - ASSERT(0 == uv_is_active(handle)); + ASSERT_OK(uv_is_active(handle)); once_close_cb_called++; } @@ -51,7 +51,7 @@ static void once_cb(uv_timer_t* handle) { printf("ONCE_CB %d\n", once_cb_called); ASSERT_NOT_NULL(handle); - ASSERT(0 == uv_is_active((uv_handle_t*) handle)); + ASSERT_OK(uv_is_active((uv_handle_t*) handle)); once_cb_called++; @@ -65,7 +65,7 @@ static void twice_close_cb(uv_handle_t* handle) { printf("TWICE_CLOSE_CB\n"); ASSERT_NOT_NULL(handle); - ASSERT(0 == uv_is_active(handle)); + ASSERT_OK(uv_is_active(handle)); twice_close_cb_called++; } @@ -74,7 +74,7 @@ static void twice_cb(uv_timer_t* handle) { printf("TWICE_CB %d\n", twice_cb_called); ASSERT_NOT_NULL(handle); - ASSERT(0 == uv_is_active((uv_handle_t*) handle)); + ASSERT_OK(uv_is_active((uv_handle_t*) handle)); twice_cb_called++; @@ -96,7 +96,7 @@ static void repeat_cb(uv_timer_t* handle) { printf("REPEAT_CB\n"); ASSERT_NOT_NULL(handle); - ASSERT(1 == uv_is_active((uv_handle_t*) handle)); + ASSERT_EQ(1, uv_is_active((uv_handle_t*) handle)); repeat_cb_called++; @@ -119,41 +119,41 @@ TEST_IMPL(timer) { int r; start_time = uv_now(uv_default_loop()); - ASSERT(0 < start_time); + ASSERT_LT(0, start_time); /* Let 10 timers time out in 500 ms total. */ for (i = 0; i < ARRAY_SIZE(once_timers); i++) { once = once_timers + i; r = uv_timer_init(uv_default_loop(), once); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(once, once_cb, i * 50, 0); - ASSERT(r == 0); + ASSERT_OK(r); } /* The 11th timer is a repeating timer that runs 4 times */ r = uv_timer_init(uv_default_loop(), &repeat); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&repeat, repeat_cb, 100, 100); - ASSERT(r == 0); + ASSERT_OK(r); /* The 12th timer should not do anything. */ r = uv_timer_init(uv_default_loop(), &never); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&never, never_cb, 100, 100); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_stop(&never); - ASSERT(r == 0); + ASSERT_OK(r); uv_unref((uv_handle_t*)&never); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(once_cb_called == 10); - ASSERT(once_close_cb_called == 10); + ASSERT_EQ(10, once_cb_called); + ASSERT_EQ(10, once_close_cb_called); printf("repeat_cb_called %d\n", repeat_cb_called); - ASSERT(repeat_cb_called == 5); - ASSERT(repeat_close_cb_called == 1); + ASSERT_EQ(5, repeat_cb_called); + ASSERT_EQ(1, repeat_close_cb_called); - ASSERT(500 <= uv_now(uv_default_loop()) - start_time); + ASSERT_LE(500, uv_now(uv_default_loop()) - start_time); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -165,15 +165,15 @@ TEST_IMPL(timer_start_twice) { int r; r = uv_timer_init(uv_default_loop(), &once); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&once, never_cb, 86400 * 1000, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&once, twice_cb, 10, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(twice_cb_called == 1); + ASSERT_EQ(1, twice_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -183,10 +183,10 @@ TEST_IMPL(timer_start_twice) { TEST_IMPL(timer_init) { uv_timer_t handle; - ASSERT(0 == uv_timer_init(uv_default_loop(), &handle)); - ASSERT(0 == uv_timer_get_repeat(&handle)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &handle)); + ASSERT_OK(uv_timer_get_repeat(&handle)); ASSERT_UINT64_LE(0, uv_timer_get_due_in(&handle)); - ASSERT(0 == uv_is_active((uv_handle_t*) &handle)); + ASSERT_OK(uv_is_active((uv_handle_t*) &handle)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -194,12 +194,12 @@ TEST_IMPL(timer_init) { static void order_cb_a(uv_timer_t *handle) { - ASSERT(order_cb_called++ == *(int*)handle->data); + ASSERT_EQ(order_cb_called++, *(int*)handle->data); } static void order_cb_b(uv_timer_t *handle) { - ASSERT(order_cb_called++ == *(int*)handle->data); + ASSERT_EQ(order_cb_called++, *(int*)handle->data); } @@ -211,31 +211,31 @@ TEST_IMPL(timer_order) { first = 0; second = 1; - ASSERT(0 == uv_timer_init(uv_default_loop(), &handle_a)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &handle_b)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &handle_a)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &handle_b)); /* Test for starting handle_a then handle_b */ handle_a.data = &first; - ASSERT(0 == uv_timer_start(&handle_a, order_cb_a, 0, 0)); + ASSERT_OK(uv_timer_start(&handle_a, order_cb_a, 0, 0)); handle_b.data = &second; - ASSERT(0 == uv_timer_start(&handle_b, order_cb_b, 0, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_timer_start(&handle_b, order_cb_b, 0, 0)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(order_cb_called == 2); + ASSERT_EQ(2, order_cb_called); - ASSERT(0 == uv_timer_stop(&handle_a)); - ASSERT(0 == uv_timer_stop(&handle_b)); + ASSERT_OK(uv_timer_stop(&handle_a)); + ASSERT_OK(uv_timer_stop(&handle_b)); /* Test for starting handle_b then handle_a */ order_cb_called = 0; handle_b.data = &first; - ASSERT(0 == uv_timer_start(&handle_b, order_cb_b, 0, 0)); + ASSERT_OK(uv_timer_start(&handle_b, order_cb_b, 0, 0)); handle_a.data = &second; - ASSERT(0 == uv_timer_start(&handle_a, order_cb_a, 0, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_timer_start(&handle_a, order_cb_a, 0, 0)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT(order_cb_called == 2); + ASSERT_EQ(2, order_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -243,7 +243,7 @@ TEST_IMPL(timer_order) { static void tiny_timer_cb(uv_timer_t* handle) { - ASSERT(handle == &tiny_timer); + ASSERT_PTR_EQ(handle, &tiny_timer); uv_close((uv_handle_t*) &tiny_timer, NULL); uv_close((uv_handle_t*) &huge_timer1, NULL); uv_close((uv_handle_t*) &huge_timer2, NULL); @@ -251,16 +251,19 @@ static void tiny_timer_cb(uv_timer_t* handle) { TEST_IMPL(timer_huge_timeout) { - ASSERT(0 == uv_timer_init(uv_default_loop(), &tiny_timer)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer1)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer2)); - ASSERT(0 == uv_timer_start(&tiny_timer, tiny_timer_cb, 1, 0)); - ASSERT(0 == uv_timer_start(&huge_timer1, tiny_timer_cb, 0xffffffffffffLL, 0)); - ASSERT(0 == uv_timer_start(&huge_timer2, tiny_timer_cb, (uint64_t) -1, 0)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &tiny_timer)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &huge_timer1)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &huge_timer2)); + ASSERT_OK(uv_timer_start(&tiny_timer, tiny_timer_cb, 1, 0)); + ASSERT_OK(uv_timer_start(&huge_timer1, + tiny_timer_cb, + 0xffffffffffffLL, + 0)); + ASSERT_OK(uv_timer_start(&huge_timer2, tiny_timer_cb, (uint64_t) -1, 0)); ASSERT_UINT64_EQ(1, uv_timer_get_due_in(&tiny_timer)); ASSERT_UINT64_EQ(281474976710655, uv_timer_get_due_in(&huge_timer1)); ASSERT_UINT64_LE(0, uv_timer_get_due_in(&huge_timer2)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; } @@ -270,9 +273,9 @@ static void huge_repeat_cb(uv_timer_t* handle) { static int ncalls; if (ncalls == 0) - ASSERT(handle == &huge_timer1); + ASSERT_PTR_EQ(handle, &huge_timer1); else - ASSERT(handle == &tiny_timer); + ASSERT_PTR_EQ(handle, &tiny_timer); if (++ncalls == 10) { uv_close((uv_handle_t*) &tiny_timer, NULL); @@ -282,11 +285,11 @@ static void huge_repeat_cb(uv_timer_t* handle) { TEST_IMPL(timer_huge_repeat) { - ASSERT(0 == uv_timer_init(uv_default_loop(), &tiny_timer)); - ASSERT(0 == uv_timer_init(uv_default_loop(), &huge_timer1)); - ASSERT(0 == uv_timer_start(&tiny_timer, huge_repeat_cb, 2, 2)); - ASSERT(0 == uv_timer_start(&huge_timer1, huge_repeat_cb, 1, (uint64_t) -1)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &tiny_timer)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &huge_timer1)); + ASSERT_OK(uv_timer_start(&tiny_timer, huge_repeat_cb, 2, 2)); + ASSERT_OK(uv_timer_start(&huge_timer1, huge_repeat_cb, 1, (uint64_t) -1)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; } @@ -303,17 +306,17 @@ static void timer_run_once_timer_cb(uv_timer_t* handle) { TEST_IMPL(timer_run_once) { uv_timer_t timer_handle; - ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_run_once_timer_cb, 0, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); - ASSERT(1 == timer_run_once_timer_cb_called); + ASSERT_OK(uv_timer_init(uv_default_loop(), &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, timer_run_once_timer_cb, 0, 0)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_ONCE)); + ASSERT_EQ(1, timer_run_once_timer_cb_called); - ASSERT(0 == uv_timer_start(&timer_handle, timer_run_once_timer_cb, 1, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); - ASSERT(2 == timer_run_once_timer_cb_called); + ASSERT_OK(uv_timer_start(&timer_handle, timer_run_once_timer_cb, 1, 0)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_ONCE)); + ASSERT_EQ(2, timer_run_once_timer_cb_called); uv_close((uv_handle_t*) &timer_handle, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_ONCE)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_ONCE)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -323,10 +326,10 @@ TEST_IMPL(timer_run_once) { TEST_IMPL(timer_is_closing) { uv_timer_t handle; - ASSERT(0 == uv_timer_init(uv_default_loop(), &handle)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &handle)); uv_close((uv_handle_t *)&handle, NULL); - ASSERT(UV_EINVAL == uv_timer_start(&handle, never_cb, 100, 100)); + ASSERT_EQ(UV_EINVAL, uv_timer_start(&handle, never_cb, 100, 100)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -336,8 +339,8 @@ TEST_IMPL(timer_is_closing) { TEST_IMPL(timer_null_callback) { uv_timer_t handle; - ASSERT(0 == uv_timer_init(uv_default_loop(), &handle)); - ASSERT(UV_EINVAL == uv_timer_start(&handle, NULL, 100, 100)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &handle)); + ASSERT_EQ(UV_EINVAL, uv_timer_start(&handle, NULL, 100, 100)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -349,7 +352,7 @@ static uint64_t timer_early_check_expected_time; static void timer_early_check_cb(uv_timer_t* handle) { uint64_t hrtime = uv_hrtime() / 1000000; - ASSERT(hrtime >= timer_early_check_expected_time); + ASSERT_GE(hrtime, timer_early_check_expected_time); } @@ -359,12 +362,15 @@ TEST_IMPL(timer_early_check) { timer_early_check_expected_time = uv_now(uv_default_loop()) + timeout_ms; - ASSERT(0 == uv_timer_init(uv_default_loop(), &timer_handle)); - ASSERT(0 == uv_timer_start(&timer_handle, timer_early_check_cb, timeout_ms, 0)); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, + timer_early_check_cb, + timeout_ms, + 0)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); uv_close((uv_handle_t*) &timer_handle, NULL); - ASSERT(0 == uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -378,11 +384,11 @@ TEST_IMPL(timer_no_double_call_once) { uv_timer_t timer_handle; const uint64_t timeout_ms = 10; - ASSERT_EQ(0, uv_timer_init(uv_default_loop(), &timer_handle)); - ASSERT_EQ(0, uv_timer_start(&timer_handle, - timer_check_double_call, - timeout_ms, - timeout_ms)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, + timer_check_double_call, + timeout_ms, + timeout_ms)); uv_sleep(timeout_ms * 2); ASSERT_EQ(1, uv_run(uv_default_loop(), UV_RUN_ONCE)); ASSERT_EQ(1, timer_check_double_call_called); @@ -395,11 +401,11 @@ TEST_IMPL(timer_no_double_call_nowait) { uv_timer_t timer_handle; const uint64_t timeout_ms = 10; - ASSERT_EQ(0, uv_timer_init(uv_default_loop(), &timer_handle)); - ASSERT_EQ(0, uv_timer_start(&timer_handle, - timer_check_double_call, - timeout_ms, - timeout_ms)); + ASSERT_OK(uv_timer_init(uv_default_loop(), &timer_handle)); + ASSERT_OK(uv_timer_start(&timer_handle, + timer_check_double_call, + timeout_ms, + timeout_ms)); uv_sleep(timeout_ms * 2); ASSERT_EQ(1, uv_run(uv_default_loop(), UV_RUN_NOWAIT)); ASSERT_EQ(1, timer_check_double_call_called); @@ -414,7 +420,7 @@ TEST_IMPL(timer_no_run_on_unref) { ASSERT_OK(uv_timer_init(uv_default_loop(), &timer_handle)); ASSERT_OK(uv_timer_start(&timer_handle, (uv_timer_cb) abort, 0, 0)); uv_unref((uv_handle_t*) &timer_handle); - ASSERT_EQ(uv_run(uv_default_loop(), UV_RUN_DEFAULT), 0); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-tmpdir.c b/deps/uv/test/test-tmpdir.c index 86f72e25431a15..a4e9ce950aaa12 100644 --- a/deps/uv/test/test-tmpdir.c +++ b/deps/uv/test/test-tmpdir.c @@ -36,46 +36,46 @@ TEST_IMPL(tmpdir) { len = sizeof tmpdir; tmpdir[0] = '\0'; - ASSERT(strlen(tmpdir) == 0); + ASSERT_OK(strlen(tmpdir)); r = uv_os_tmpdir(tmpdir, &len); - ASSERT(r == 0); - ASSERT(strlen(tmpdir) == len); - ASSERT(len > 0); - ASSERT(tmpdir[len] == '\0'); + ASSERT_OK(r); + ASSERT_EQ(strlen(tmpdir), len); + ASSERT_GT(len, 0); + ASSERT_EQ(tmpdir[len], '\0'); if (len > 1) { last = tmpdir[len - 1]; #ifdef _WIN32 - ASSERT(last != '\\'); + ASSERT_NE(last, '\\'); #else - ASSERT(last != '/'); + ASSERT_NE(last, '/'); #endif } /* Test the case where the buffer is too small */ len = SMALLPATH; r = uv_os_tmpdir(tmpdir, &len); - ASSERT(r == UV_ENOBUFS); - ASSERT(len > SMALLPATH); + ASSERT_EQ(r, UV_ENOBUFS); + ASSERT_GT(len, SMALLPATH); /* Test invalid inputs */ r = uv_os_tmpdir(NULL, &len); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_os_tmpdir(tmpdir, NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); len = 0; r = uv_os_tmpdir(tmpdir, &len); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); #ifdef _WIN32 const char *name = "TMP"; char tmpdir_win[] = "C:\\xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; r = uv_os_setenv(name, tmpdir_win); - ASSERT(r == 0); + ASSERT_OK(r); char tmpdirx[PATHMAX]; size_t lenx = sizeof tmpdirx; r = uv_os_tmpdir(tmpdirx, &lenx); - ASSERT(r == 0); + ASSERT_OK(r); #endif return 0; diff --git a/deps/uv/test/test-tty-duplicate-key.c b/deps/uv/test/test-tty-duplicate-key.c index 6ba96c81352337..871d580266ad8d 100644 --- a/deps/uv/test/test-tty-duplicate-key.c +++ b/deps/uv/test/test-tty-duplicate-key.c @@ -73,7 +73,7 @@ static void tty_read(uv_stream_t* tty_in, ssize_t nread, const uv_buf_t* buf) { } uv_close((uv_handle_t*) tty_in, NULL); } else { - ASSERT(nread == 0); + ASSERT_OK(nread); } } @@ -150,25 +150,25 @@ TEST_IMPL(tty_duplicate_vt100_fn_key) { OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(handle, INVALID_HANDLE_VALUE); ttyin_fd = _open_osfhandle((intptr_t) handle, 0); - ASSERT(ttyin_fd >= 0); - ASSERT(UV_TTY == uv_guess_handle(ttyin_fd)); + ASSERT_GE(ttyin_fd, 0); + ASSERT_EQ(UV_TTY, uv_guess_handle(ttyin_fd)); r = uv_tty_init(uv_default_loop(), &tty_in, ttyin_fd, 1); /* Readable. */ - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(uv_is_readable((uv_stream_t*) &tty_in)); ASSERT(!uv_is_writable((uv_stream_t*) &tty_in)); r = uv_read_start((uv_stream_t*)&tty_in, tty_alloc, tty_read); - ASSERT(r == 0); + ASSERT_OK(r); expect_str = ESC"[[A"; expect_nread = strlen(expect_str); /* Turn on raw mode. */ r = uv_tty_set_mode(&tty_in, UV_TTY_MODE_RAW); - ASSERT(r == 0); + ASSERT_OK(r); /* * Send F1 keystrokes. Test of issue cause by #2114 that vt100 fn key @@ -176,7 +176,7 @@ TEST_IMPL(tty_duplicate_vt100_fn_key) { */ make_key_event_records(VK_F1, 0, TRUE, records); WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); - ASSERT(written == ARRAY_SIZE(records)); + ASSERT_EQ(written, ARRAY_SIZE(records)); uv_run(loop, UV_RUN_DEFAULT); @@ -204,45 +204,45 @@ TEST_IMPL(tty_duplicate_alt_modifier_key) { OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(handle, INVALID_HANDLE_VALUE); ttyin_fd = _open_osfhandle((intptr_t) handle, 0); - ASSERT(ttyin_fd >= 0); - ASSERT(UV_TTY == uv_guess_handle(ttyin_fd)); + ASSERT_GE(ttyin_fd, 0); + ASSERT_EQ(UV_TTY, uv_guess_handle(ttyin_fd)); r = uv_tty_init(uv_default_loop(), &tty_in, ttyin_fd, 1); /* Readable. */ - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(uv_is_readable((uv_stream_t*) &tty_in)); ASSERT(!uv_is_writable((uv_stream_t*) &tty_in)); r = uv_read_start((uv_stream_t*)&tty_in, tty_alloc, tty_read); - ASSERT(r == 0); + ASSERT_OK(r); expect_str = ESC"a"ESC"a"; expect_nread = strlen(expect_str); /* Turn on raw mode. */ r = uv_tty_set_mode(&tty_in, UV_TTY_MODE_RAW); - ASSERT(r == 0); + ASSERT_OK(r); /* Emulate transmission of M-a at normal console */ make_key_event_records(VK_MENU, 0, TRUE, alt_records); WriteConsoleInputW(handle, &alt_records[0], 1, &written); - ASSERT(written == 1); + ASSERT_EQ(1, written); make_key_event_records(L'A', LEFT_ALT_PRESSED, FALSE, records); WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); - ASSERT(written == 2); + ASSERT_EQ(2, written); WriteConsoleInputW(handle, &alt_records[1], 1, &written); - ASSERT(written == 1); + ASSERT_EQ(1, written); /* Emulate transmission of M-a at WSL(#2111) */ make_key_event_records(VK_MENU, 0, TRUE, alt_records); WriteConsoleInputW(handle, &alt_records[0], 1, &written); - ASSERT(written == 1); + ASSERT_EQ(1, written); make_key_event_records(L'A', LEFT_ALT_PRESSED, TRUE, records); WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); - ASSERT(written == 2); + ASSERT_EQ(2, written); WriteConsoleInputW(handle, &alt_records[1], 1, &written); - ASSERT(written == 1); + ASSERT_EQ(1, written); uv_run(loop, UV_RUN_DEFAULT); @@ -270,25 +270,25 @@ TEST_IMPL(tty_composing_character) { OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(handle, INVALID_HANDLE_VALUE); ttyin_fd = _open_osfhandle((intptr_t) handle, 0); - ASSERT(ttyin_fd >= 0); - ASSERT(UV_TTY == uv_guess_handle(ttyin_fd)); + ASSERT_GE(ttyin_fd, 0); + ASSERT_EQ(UV_TTY, uv_guess_handle(ttyin_fd)); r = uv_tty_init(uv_default_loop(), &tty_in, ttyin_fd, 1); /* Readable. */ - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(uv_is_readable((uv_stream_t*) &tty_in)); ASSERT(!uv_is_writable((uv_stream_t*) &tty_in)); r = uv_read_start((uv_stream_t*)&tty_in, tty_alloc, tty_read); - ASSERT(r == 0); + ASSERT_OK(r); expect_str = EUR_UTF8; expect_nread = strlen(expect_str); /* Turn on raw mode. */ r = uv_tty_set_mode(&tty_in, UV_TTY_MODE_RAW); - ASSERT(r == 0); + ASSERT_OK(r); /* Emulate EUR inputs by LEFT ALT+NUMPAD ASCII KeyComos */ make_key_event_records(VK_MENU, 0, FALSE, alt_records); @@ -296,16 +296,16 @@ TEST_IMPL(tty_composing_character) { WriteConsoleInputW(handle, &alt_records[0], 1, &written); make_key_event_records(VK_NUMPAD0, LEFT_ALT_PRESSED, FALSE, records); WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); - ASSERT(written == ARRAY_SIZE(records)); + ASSERT_EQ(written, ARRAY_SIZE(records)); make_key_event_records(VK_NUMPAD1, LEFT_ALT_PRESSED, FALSE, records); WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); - ASSERT(written == ARRAY_SIZE(records)); + ASSERT_EQ(written, ARRAY_SIZE(records)); make_key_event_records(VK_NUMPAD2, LEFT_ALT_PRESSED, FALSE, records); WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); - ASSERT(written == ARRAY_SIZE(records)); + ASSERT_EQ(written, ARRAY_SIZE(records)); make_key_event_records(VK_NUMPAD8, LEFT_ALT_PRESSED, FALSE, records); WriteConsoleInputW(handle, records, ARRAY_SIZE(records), &written); - ASSERT(written == ARRAY_SIZE(records)); + ASSERT_EQ(written, ARRAY_SIZE(records)); WriteConsoleInputW(handle, &alt_records[1], 1, &written); uv_run(loop, UV_RUN_DEFAULT); diff --git a/deps/uv/test/test-tty-escape-sequence-processing.c b/deps/uv/test/test-tty-escape-sequence-processing.c index 2f7d0364b8b5f0..4a041db11dfcea 100644 --- a/deps/uv/test/test-tty-escape-sequence-processing.c +++ b/deps/uv/test/test-tty-escape-sequence-processing.c @@ -165,8 +165,8 @@ static void write_console(uv_tty_t* tty_out, char* src) { buf.len = strlen(buf.base); r = uv_try_write((uv_stream_t*) tty_out, &buf, 1); - ASSERT(r >= 0); - ASSERT((unsigned int) r == buf.len); + ASSERT_GE(r, 0); + ASSERT_EQ((unsigned int) r, buf.len); } static void setup_screen(uv_tty_t* tty_out) { @@ -178,8 +178,8 @@ static void setup_screen(uv_tty_t* tty_out) { origin.X = 0; origin.Y = info.srWindow.Top; ASSERT(FillConsoleOutputCharacter( - tty_out->handle, '.', length, origin, &number_of_written)); - ASSERT(length == number_of_written); + tty_out->handle, '.', length, origin, &number_of_written)); + ASSERT_EQ(length, number_of_written); } static void clear_screen(uv_tty_t* tty_out, struct screen_info* si) { @@ -192,10 +192,10 @@ static void clear_screen(uv_tty_t* tty_out, struct screen_info* si) { origin.Y = info.srWindow.Top; FillConsoleOutputCharacterA( tty_out->handle, ' ', length, origin, &number_of_written); - ASSERT(length == number_of_written); + ASSERT_EQ(length, number_of_written); FillConsoleOutputAttribute( tty_out->handle, si->default_attr, length, origin, &number_of_written); - ASSERT(length == number_of_written); + ASSERT_EQ(length, number_of_written); } static void free_screen(struct captured_screen* cs) { @@ -216,11 +216,11 @@ static void capture_screen(uv_tty_t* tty_out, struct captured_screen* cs) { cs->attributes = (WORD*) malloc(cs->si.length * sizeof(*cs->attributes)); ASSERT_NOT_NULL(cs->attributes); ASSERT(ReadConsoleOutputCharacter( - tty_out->handle, cs->text, cs->si.length, origin, &length)); - ASSERT((unsigned int) cs->si.length == length); + tty_out->handle, cs->text, cs->si.length, origin, &length)); + ASSERT_EQ((unsigned int) cs->si.length, length); ASSERT(ReadConsoleOutputAttribute( - tty_out->handle, cs->attributes, cs->si.length, origin, &length)); - ASSERT((unsigned int) cs->si.length == length); + tty_out->handle, cs->attributes, cs->si.length, origin, &length)); + ASSERT_EQ((unsigned int) cs->si.length, length); } static void make_expect_screen_erase(struct captured_screen* cs, @@ -261,8 +261,8 @@ static void make_expect_screen_erase(struct captured_screen* cs, } else { ASSERT(FALSE); } - ASSERT(start < end); - ASSERT(end - cs->text <= cs->si.length); + ASSERT_PTR_LT(start, end); + ASSERT_LE(end - cs->text, cs->si.length); for (; start < end; start++) { *start = ' '; } @@ -360,13 +360,13 @@ static void initialize_tty(uv_tty_t* tty_out) { NULL, CONSOLE_TEXTMODE_BUFFER, NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(handle, INVALID_HANDLE_VALUE); ttyout_fd = _open_osfhandle((intptr_t) handle, 0); - ASSERT(ttyout_fd >= 0); - ASSERT(UV_TTY == uv_guess_handle(ttyout_fd)); + ASSERT_GE(ttyout_fd, 0); + ASSERT_EQ(UV_TTY, uv_guess_handle(ttyout_fd)); r = uv_tty_init(uv_default_loop(), tty_out, ttyout_fd, 0); /* Writable. */ - ASSERT(r == 0); + ASSERT_OK(r); } static void terminate_tty(uv_tty_t* tty_out) { @@ -394,16 +394,16 @@ TEST_IMPL(tty_cursor_up) { snprintf(buffer, sizeof(buffer), "%sA", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y - 1 == cursor_pos.Y); - ASSERT(cursor_pos_old.X == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y - 1, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X, cursor_pos.X); /* cursor up nth times */ cursor_pos_old = cursor_pos; snprintf(buffer, sizeof(buffer), "%s%dA", CSI, si.height / 4); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y - si.height / 4 == cursor_pos.Y); - ASSERT(cursor_pos_old.X == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y - si.height / 4, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X, cursor_pos.X); /* cursor up from Window top does nothing */ cursor_pos_old.X = 1; @@ -412,8 +412,8 @@ TEST_IMPL(tty_cursor_up) { snprintf(buffer, sizeof(buffer), "%sA", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); - ASSERT(cursor_pos_old.X == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X, cursor_pos.X); ASSERT(!is_scrolling(&tty_out, si)); terminate_tty(&tty_out); @@ -445,16 +445,16 @@ TEST_IMPL(tty_cursor_down) { snprintf(buffer, sizeof(buffer), "%sB", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y + 1 == cursor_pos.Y); - ASSERT(cursor_pos_old.X == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y + 1, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X, cursor_pos.X); /* cursor down nth times */ cursor_pos_old = cursor_pos; snprintf(buffer, sizeof(buffer), "%s%dB", CSI, si.height / 4); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y + si.height / 4 == cursor_pos.Y); - ASSERT(cursor_pos_old.X == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y + si.height / 4, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X, cursor_pos.X); /* cursor down from bottom line does nothing */ cursor_pos_old.X = si.width / 2; @@ -463,8 +463,8 @@ TEST_IMPL(tty_cursor_down) { snprintf(buffer, sizeof(buffer), "%sB", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); - ASSERT(cursor_pos_old.X == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X, cursor_pos.X); ASSERT(!is_scrolling(&tty_out, si)); terminate_tty(&tty_out); @@ -496,16 +496,16 @@ TEST_IMPL(tty_cursor_forward) { snprintf(buffer, sizeof(buffer), "%sC", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); - ASSERT(cursor_pos_old.X + 1 == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X + 1, cursor_pos.X); /* cursor forward nth times */ cursor_pos_old = cursor_pos; snprintf(buffer, sizeof(buffer), "%s%dC", CSI, si.width / 4); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); - ASSERT(cursor_pos_old.X + si.width / 4 == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X + si.width / 4, cursor_pos.X); /* cursor forward from end of line does nothing*/ cursor_pos_old.X = si.width; @@ -514,8 +514,8 @@ TEST_IMPL(tty_cursor_forward) { snprintf(buffer, sizeof(buffer), "%sC", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); - ASSERT(cursor_pos_old.X == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X, cursor_pos.X); /* cursor forward from end of screen does nothing */ cursor_pos_old.X = si.width; @@ -524,8 +524,8 @@ TEST_IMPL(tty_cursor_forward) { snprintf(buffer, sizeof(buffer), "%sC", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); - ASSERT(cursor_pos_old.X == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X, cursor_pos.X); ASSERT(!is_scrolling(&tty_out, si)); terminate_tty(&tty_out); @@ -557,16 +557,16 @@ TEST_IMPL(tty_cursor_back) { snprintf(buffer, sizeof(buffer), "%sD", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); - ASSERT(cursor_pos_old.X - 1 == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X - 1, cursor_pos.X); /* cursor back nth times */ cursor_pos_old = cursor_pos; snprintf(buffer, sizeof(buffer), "%s%dD", CSI, si.width / 4); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); - ASSERT(cursor_pos_old.X - si.width / 4 == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X - si.width / 4, cursor_pos.X); /* cursor back from beginning of line does nothing */ cursor_pos_old.X = 1; @@ -575,8 +575,8 @@ TEST_IMPL(tty_cursor_back) { snprintf(buffer, sizeof(buffer), "%sD", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); - ASSERT(cursor_pos_old.X == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); + ASSERT_EQ(cursor_pos_old.X, cursor_pos.X); /* cursor back from top of screen does nothing */ cursor_pos_old.X = 1; @@ -585,8 +585,8 @@ TEST_IMPL(tty_cursor_back) { snprintf(buffer, sizeof(buffer), "%sD", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(1 == cursor_pos.Y); - ASSERT(1 == cursor_pos.X); + ASSERT_EQ(1, cursor_pos.Y); + ASSERT_EQ(1, cursor_pos.X); ASSERT(!is_scrolling(&tty_out, si)); terminate_tty(&tty_out); @@ -618,16 +618,16 @@ TEST_IMPL(tty_cursor_next_line) { snprintf(buffer, sizeof(buffer), "%sE", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y + 1 == cursor_pos.Y); - ASSERT(1 == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y + 1, cursor_pos.Y); + ASSERT_EQ(1, cursor_pos.X); /* cursor next line nth times */ cursor_pos_old = cursor_pos; snprintf(buffer, sizeof(buffer), "%s%dE", CSI, si.height / 4); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y + si.height / 4 == cursor_pos.Y); - ASSERT(1 == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y + si.height / 4, cursor_pos.Y); + ASSERT_EQ(1, cursor_pos.X); /* cursor next line from buttom row moves beginning of line */ cursor_pos_old.X = si.width / 2; @@ -636,8 +636,8 @@ TEST_IMPL(tty_cursor_next_line) { snprintf(buffer, sizeof(buffer), "%sE", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); - ASSERT(1 == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); + ASSERT_EQ(1, cursor_pos.X); ASSERT(!is_scrolling(&tty_out, si)); terminate_tty(&tty_out); @@ -669,16 +669,16 @@ TEST_IMPL(tty_cursor_previous_line) { snprintf(buffer, sizeof(buffer), "%sF", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y - 1 == cursor_pos.Y); - ASSERT(1 == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y - 1, cursor_pos.Y); + ASSERT_EQ(1, cursor_pos.X); /* cursor previous line nth times */ cursor_pos_old = cursor_pos; snprintf(buffer, sizeof(buffer), "%s%dF", CSI, si.height / 4); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos_old.Y - si.height / 4 == cursor_pos.Y); - ASSERT(1 == cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y - si.height / 4, cursor_pos.Y); + ASSERT_EQ(1, cursor_pos.X); /* cursor previous line from top of screen does nothing */ cursor_pos_old.X = 1; @@ -687,8 +687,8 @@ TEST_IMPL(tty_cursor_previous_line) { snprintf(buffer, sizeof(buffer), "%sD", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(1 == cursor_pos.Y); - ASSERT(1 == cursor_pos.X); + ASSERT_EQ(1, cursor_pos.Y); + ASSERT_EQ(1, cursor_pos.X); ASSERT(!is_scrolling(&tty_out, si)); terminate_tty(&tty_out); @@ -720,22 +720,22 @@ TEST_IMPL(tty_cursor_horizontal_move_absolute) { snprintf(buffer, sizeof(buffer), "%sG", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(1 == cursor_pos.X); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); + ASSERT_EQ(1, cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); /* Move cursor to nth character */ snprintf(buffer, sizeof(buffer), "%s%dG", CSI, si.width / 4); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(si.width / 4 == cursor_pos.X); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); + ASSERT_EQ(si.width / 4, cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); /* Moving out of screen will fit within screen */ snprintf(buffer, sizeof(buffer), "%s%dG", CSI, si.width + 1); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(si.width == cursor_pos.X); - ASSERT(cursor_pos_old.Y == cursor_pos.Y); + ASSERT_EQ(si.width, cursor_pos.X); + ASSERT_EQ(cursor_pos_old.Y, cursor_pos.Y); terminate_tty(&tty_out); @@ -766,31 +766,31 @@ TEST_IMPL(tty_cursor_move_absolute) { snprintf(buffer, sizeof(buffer), "%sH", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(1 == cursor_pos.X); - ASSERT(1 == cursor_pos.Y); + ASSERT_EQ(1, cursor_pos.X); + ASSERT_EQ(1, cursor_pos.Y); /* Move the cursor to the middle of the screen */ snprintf( buffer, sizeof(buffer), "%s%d;%df", CSI, si.height / 2, si.width / 2); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(si.width / 2 == cursor_pos.X); - ASSERT(si.height / 2 == cursor_pos.Y); + ASSERT_EQ(si.width / 2, cursor_pos.X); + ASSERT_EQ(si.height / 2, cursor_pos.Y); /* Moving out of screen will fit within screen */ snprintf( buffer, sizeof(buffer), "%s%d;%df", CSI, si.height / 2, si.width + 1); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(si.width == cursor_pos.X); - ASSERT(si.height / 2 == cursor_pos.Y); + ASSERT_EQ(si.width, cursor_pos.X); + ASSERT_EQ(si.height / 2, cursor_pos.Y); snprintf( buffer, sizeof(buffer), "%s%d;%df", CSI, si.height + 1, si.width / 2); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(si.width / 2 == cursor_pos.X); - ASSERT(si.height == cursor_pos.Y); + ASSERT_EQ(si.width / 2, cursor_pos.X); + ASSERT_EQ(si.height, cursor_pos.Y); ASSERT(!is_scrolling(&tty_out, si)); terminate_tty(&tty_out); @@ -1000,38 +1000,38 @@ TEST_IMPL(tty_set_cursor_shape) { set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); snprintf(buffer, sizeof(buffer), "%s q", CSI); write_console(&tty_out, buffer); - ASSERT(get_cursor_size(&tty_out) == CURSOR_SIZE_LARGE); + ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_LARGE); /* cursor size large */ set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); snprintf(buffer, sizeof(buffer), "%s1 q", CSI); write_console(&tty_out, buffer); - ASSERT(get_cursor_size(&tty_out) == CURSOR_SIZE_LARGE); + ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_LARGE); set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); snprintf(buffer, sizeof(buffer), "%s2 q", CSI); write_console(&tty_out, buffer); - ASSERT(get_cursor_size(&tty_out) == CURSOR_SIZE_LARGE); + ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_LARGE); /* cursor size small */ set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); snprintf(buffer, sizeof(buffer), "%s3 q", CSI); write_console(&tty_out, buffer); - ASSERT(get_cursor_size(&tty_out) == CURSOR_SIZE_SMALL); + ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_SMALL); set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); snprintf(buffer, sizeof(buffer), "%s6 q", CSI); write_console(&tty_out, buffer); - ASSERT(get_cursor_size(&tty_out) == CURSOR_SIZE_SMALL); + ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_SMALL); /* Nothing occurs with arguments outside valid range */ set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); snprintf(buffer, sizeof(buffer), "%s7 q", CSI); write_console(&tty_out, buffer); - ASSERT(get_cursor_size(&tty_out) == CURSOR_SIZE_MIDDLE); + ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_MIDDLE); /* restore cursor size if arguments is zero */ snprintf(buffer, sizeof(buffer), "%s0 q", CSI); write_console(&tty_out, buffer); - ASSERT(get_cursor_size(&tty_out) == saved_cursor_size); + ASSERT_EQ(get_cursor_size(&tty_out), saved_cursor_size); terminate_tty(&tty_out); @@ -1122,7 +1122,7 @@ TEST_IMPL(tty_set_style) { } /* Set foreground and background color */ - ASSERT(ARRAY_SIZE(fg_attrs) == ARRAY_SIZE(bg_attrs)); + ASSERT_EQ(ARRAY_SIZE(fg_attrs), ARRAY_SIZE(bg_attrs)); length = ARRAY_SIZE(bg_attrs); for (i = 0; i < length; i++) { capture_screen(&tty_out, &expect); @@ -1271,8 +1271,8 @@ TEST_IMPL(tty_save_restore_cursor_position) { snprintf(buffer, sizeof(buffer), "%su", CSI); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos.X == cursor_pos_old.X); - ASSERT(cursor_pos.Y == cursor_pos_old.Y); + ASSERT_EQ(cursor_pos.X, cursor_pos_old.X); + ASSERT_EQ(cursor_pos.Y, cursor_pos_old.Y); cursor_pos_old.X = si.width / 2; cursor_pos_old.Y = si.height / 2; @@ -1290,8 +1290,8 @@ TEST_IMPL(tty_save_restore_cursor_position) { snprintf(buffer, sizeof(buffer), "%s8", ESC); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos.X == cursor_pos_old.X); - ASSERT(cursor_pos.Y == cursor_pos_old.Y); + ASSERT_EQ(cursor_pos.X, cursor_pos_old.X); + ASSERT_EQ(cursor_pos.Y, cursor_pos_old.Y); terminate_tty(&tty_out); @@ -1332,9 +1332,9 @@ TEST_IMPL(tty_full_reset) { write_console(&tty_out, buffer); capture_screen(&tty_out, &actual); ASSERT(compare_screen(&tty_out, &actual, &expect)); - ASSERT(get_cursor_size(&tty_out) == saved_cursor_size); - ASSERT(get_cursor_visibility(&tty_out) == saved_cursor_visibility); - ASSERT(actual.si.csbi.srWindow.Top == 0); + ASSERT_EQ(get_cursor_size(&tty_out), saved_cursor_size); + ASSERT_EQ(get_cursor_visibility(&tty_out), saved_cursor_visibility); + ASSERT_OK(actual.si.csbi.srWindow.Top); terminate_tty(&tty_out); @@ -1520,8 +1520,8 @@ TEST_IMPL(tty_escape_sequence_processing) { snprintf(buffer, sizeof(buffer), "%s1;%dH", CSI, UINT16_MAX + 1); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos.X == 1); - ASSERT(cursor_pos.Y == 1); + ASSERT_EQ(1, cursor_pos.X); + ASSERT_EQ(1, cursor_pos.Y); /* Too many argument are ignored */ cursor_pos.X = 1; @@ -1554,18 +1554,18 @@ TEST_IMPL(tty_escape_sequence_processing) { expect.si.width / 2); write_console(&tty_out, buffer); get_cursor_position(&tty_out, &cursor_pos); - ASSERT(cursor_pos.X == 1); - ASSERT(cursor_pos.Y == 1); + ASSERT_EQ(1, cursor_pos.X); + ASSERT_EQ(1, cursor_pos.Y); /* Invalid sequence are ignored */ saved_cursor_size = get_cursor_size(&tty_out); set_cursor_size(&tty_out, CURSOR_SIZE_MIDDLE); snprintf(buffer, sizeof(buffer), "%s 1q", CSI); write_console(&tty_out, buffer); - ASSERT(get_cursor_size(&tty_out) == CURSOR_SIZE_MIDDLE); + ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_MIDDLE); snprintf(buffer, sizeof(buffer), "%s 1 q", CSI); write_console(&tty_out, buffer); - ASSERT(get_cursor_size(&tty_out) == CURSOR_SIZE_MIDDLE); + ASSERT_EQ(get_cursor_size(&tty_out), CURSOR_SIZE_MIDDLE); set_cursor_size(&tty_out, saved_cursor_size); /* #1874 2. */ diff --git a/deps/uv/test/test-tty.c b/deps/uv/test/test-tty.c index 418ec31e4b53b3..1b11303829a137 100644 --- a/deps/uv/test/test-tty.c +++ b/deps/uv/test/test-tty.c @@ -57,7 +57,7 @@ TEST_IMPL(tty) { OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(handle, INVALID_HANDLE_VALUE); ttyin_fd = _open_osfhandle((intptr_t) handle, 0); handle = CreateFileA("conout$", @@ -67,7 +67,7 @@ TEST_IMPL(tty) { OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(handle, INVALID_HANDLE_VALUE); ttyout_fd = _open_osfhandle((intptr_t) handle, 0); #else /* unix */ @@ -86,26 +86,26 @@ TEST_IMPL(tty) { } #endif - ASSERT(ttyin_fd >= 0); - ASSERT(ttyout_fd >= 0); + ASSERT_GE(ttyin_fd, 0); + ASSERT_GE(ttyout_fd, 0); - ASSERT(UV_UNKNOWN_HANDLE == uv_guess_handle(-1)); + ASSERT_EQ(UV_UNKNOWN_HANDLE, uv_guess_handle(-1)); - ASSERT(UV_TTY == uv_guess_handle(ttyin_fd)); - ASSERT(UV_TTY == uv_guess_handle(ttyout_fd)); + ASSERT_EQ(UV_TTY, uv_guess_handle(ttyin_fd)); + ASSERT_EQ(UV_TTY, uv_guess_handle(ttyout_fd)); r = uv_tty_init(loop, &tty_in, ttyin_fd, 1); /* Readable. */ - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(uv_is_readable((uv_stream_t*) &tty_in)); ASSERT(!uv_is_writable((uv_stream_t*) &tty_in)); r = uv_tty_init(loop, &tty_out, ttyout_fd, 0); /* Writable. */ - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(!uv_is_readable((uv_stream_t*) &tty_out)); ASSERT(uv_is_writable((uv_stream_t*) &tty_out)); r = uv_tty_get_winsize(&tty_out, &width, &height); - ASSERT(r == 0); + ASSERT_OK(r); printf("width=%d height=%d\n", width, height); @@ -121,18 +121,18 @@ TEST_IMPL(tty) { /* Turn on raw mode. */ r = uv_tty_set_mode(&tty_in, UV_TTY_MODE_RAW); - ASSERT(r == 0); + ASSERT_OK(r); /* Turn off raw mode. */ r = uv_tty_set_mode(&tty_in, UV_TTY_MODE_NORMAL); - ASSERT(r == 0); + ASSERT_OK(r); /* Calling uv_tty_reset_mode() repeatedly should not clobber errno. */ errno = 0; - ASSERT(0 == uv_tty_reset_mode()); - ASSERT(0 == uv_tty_reset_mode()); - ASSERT(0 == uv_tty_reset_mode()); - ASSERT(0 == errno); + ASSERT_OK(uv_tty_reset_mode()); + ASSERT_OK(uv_tty_reset_mode()); + ASSERT_OK(uv_tty_reset_mode()); + ASSERT_OK(errno); /* TODO check the actual mode! */ @@ -154,11 +154,11 @@ static void tty_raw_alloc(uv_handle_t* handle, size_t size, uv_buf_t* buf) { static void tty_raw_read(uv_stream_t* tty_in, ssize_t nread, const uv_buf_t* buf) { if (nread > 0) { - ASSERT(nread == 1); - ASSERT(buf->base[0] == ' '); + ASSERT_EQ(1, nread ); + ASSERT_EQ(buf->base[0], ' '); uv_close((uv_handle_t*) tty_in, NULL); } else { - ASSERT(nread == 0); + ASSERT_OK(nread); } } @@ -179,25 +179,25 @@ TEST_IMPL(tty_raw) { OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(handle, INVALID_HANDLE_VALUE); ttyin_fd = _open_osfhandle((intptr_t) handle, 0); - ASSERT(ttyin_fd >= 0); - ASSERT(UV_TTY == uv_guess_handle(ttyin_fd)); + ASSERT_GE(ttyin_fd, 0); + ASSERT_EQ(UV_TTY, uv_guess_handle(ttyin_fd)); r = uv_tty_init(loop, &tty_in, ttyin_fd, 1); /* Readable. */ - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(uv_is_readable((uv_stream_t*) &tty_in)); ASSERT(!uv_is_writable((uv_stream_t*) &tty_in)); r = uv_read_start((uv_stream_t*)&tty_in, tty_raw_alloc, tty_raw_read); - ASSERT(r == 0); + ASSERT_OK(r); /* Give uv_tty_line_read_thread time to block on ReadConsoleW */ Sleep(100); /* Turn on raw mode. */ r = uv_tty_set_mode(&tty_in, UV_TTY_MODE_RAW); - ASSERT(r == 0); + ASSERT_OK(r); /* Write ' ' that should be read in raw mode */ record.EventType = KEY_EVENT; @@ -235,15 +235,15 @@ TEST_IMPL(tty_empty_write) { OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(handle, INVALID_HANDLE_VALUE); ttyout_fd = _open_osfhandle((intptr_t) handle, 0); - ASSERT(ttyout_fd >= 0); + ASSERT_GE(ttyout_fd, 0); - ASSERT(UV_TTY == uv_guess_handle(ttyout_fd)); + ASSERT_EQ(UV_TTY, uv_guess_handle(ttyout_fd)); r = uv_tty_init(loop, &tty_out, ttyout_fd, 0); /* Writable. */ - ASSERT(r == 0); + ASSERT_OK(r); ASSERT(!uv_is_readable((uv_stream_t*) &tty_out)); ASSERT(uv_is_writable((uv_stream_t*) &tty_out)); @@ -251,7 +251,7 @@ TEST_IMPL(tty_empty_write) { bufs[0].base = &dummy[0]; r = uv_try_write((uv_stream_t*) &tty_out, bufs, 1); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &tty_out, NULL); @@ -281,15 +281,15 @@ TEST_IMPL(tty_large_write) { OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(handle, INVALID_HANDLE_VALUE); ttyout_fd = _open_osfhandle((intptr_t) handle, 0); - ASSERT(ttyout_fd >= 0); + ASSERT_GE(ttyout_fd, 0); - ASSERT(UV_TTY == uv_guess_handle(ttyout_fd)); + ASSERT_EQ(UV_TTY, uv_guess_handle(ttyout_fd)); r = uv_tty_init(loop, &tty_out, ttyout_fd, 0); /* Writable. */ - ASSERT(r == 0); + ASSERT_OK(r); memset(dummy, '.', sizeof(dummy) - 1); dummy[sizeof(dummy) - 1] = '\n'; @@ -297,7 +297,7 @@ TEST_IMPL(tty_large_write) { bufs[0] = uv_buf_init(dummy, sizeof(dummy)); r = uv_try_write((uv_stream_t*) &tty_out, bufs, 1); - ASSERT(r == 10000); + ASSERT_EQ(10000, r); uv_close((uv_handle_t*) &tty_out, NULL); @@ -321,20 +321,20 @@ TEST_IMPL(tty_raw_cancel) { OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); - ASSERT(handle != INVALID_HANDLE_VALUE); + ASSERT_PTR_NE(handle, INVALID_HANDLE_VALUE); ttyin_fd = _open_osfhandle((intptr_t) handle, 0); - ASSERT(ttyin_fd >= 0); - ASSERT(UV_TTY == uv_guess_handle(ttyin_fd)); + ASSERT_GE(ttyin_fd, 0); + ASSERT_EQ(UV_TTY, uv_guess_handle(ttyin_fd)); r = uv_tty_init(uv_default_loop(), &tty_in, ttyin_fd, 1); /* Readable. */ - ASSERT(r == 0); + ASSERT_OK(r); r = uv_tty_set_mode(&tty_in, UV_TTY_MODE_RAW); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_start((uv_stream_t*)&tty_in, tty_raw_alloc, tty_raw_read); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_read_stop((uv_stream_t*) &tty_in); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -350,35 +350,35 @@ TEST_IMPL(tty_file) { uv_tty_t tty_wo; int fd; - ASSERT(0 == uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); fd = open("test/fixtures/empty_file", O_RDONLY); if (fd != -1) { - ASSERT(UV_EINVAL == uv_tty_init(&loop, &tty, fd, 1)); - ASSERT(0 == close(fd)); + ASSERT_EQ(UV_EINVAL, uv_tty_init(&loop, &tty, fd, 1)); + ASSERT_OK(close(fd)); /* test EBADF handling */ - ASSERT(UV_EINVAL == uv_tty_init(&loop, &tty, fd, 1)); + ASSERT_EQ(UV_EINVAL, uv_tty_init(&loop, &tty, fd, 1)); } /* Bug on AIX where '/dev/random' returns 1 from isatty() */ #ifndef _AIX fd = open("/dev/random", O_RDONLY); if (fd != -1) { - ASSERT(UV_EINVAL == uv_tty_init(&loop, &tty, fd, 1)); - ASSERT(0 == close(fd)); + ASSERT_EQ(UV_EINVAL, uv_tty_init(&loop, &tty, fd, 1)); + ASSERT_OK(close(fd)); } #endif /* _AIX */ fd = open("/dev/zero", O_RDONLY); if (fd != -1) { - ASSERT(UV_EINVAL == uv_tty_init(&loop, &tty, fd, 1)); - ASSERT(0 == close(fd)); + ASSERT_EQ(UV_EINVAL, uv_tty_init(&loop, &tty, fd, 1)); + ASSERT_OK(close(fd)); } fd = open("/dev/tty", O_RDWR); if (fd != -1) { - ASSERT(0 == uv_tty_init(&loop, &tty, fd, 1)); - ASSERT(0 == close(fd)); /* TODO: it's indeterminate who owns fd now */ + ASSERT_OK(uv_tty_init(&loop, &tty, fd, 1)); + ASSERT_OK(close(fd)); /* TODO: it's indeterminate who owns fd now */ ASSERT(uv_is_readable((uv_stream_t*) &tty)); ASSERT(uv_is_writable((uv_stream_t*) &tty)); uv_close((uv_handle_t*) &tty, NULL); @@ -388,8 +388,8 @@ TEST_IMPL(tty_file) { fd = open("/dev/tty", O_RDONLY); if (fd != -1) { - ASSERT(0 == uv_tty_init(&loop, &tty_ro, fd, 1)); - ASSERT(0 == close(fd)); /* TODO: it's indeterminate who owns fd now */ + ASSERT_OK(uv_tty_init(&loop, &tty_ro, fd, 1)); + ASSERT_OK(close(fd)); /* TODO: it's indeterminate who owns fd now */ ASSERT(uv_is_readable((uv_stream_t*) &tty_ro)); ASSERT(!uv_is_writable((uv_stream_t*) &tty_ro)); uv_close((uv_handle_t*) &tty_ro, NULL); @@ -399,8 +399,8 @@ TEST_IMPL(tty_file) { fd = open("/dev/tty", O_WRONLY); if (fd != -1) { - ASSERT(0 == uv_tty_init(&loop, &tty_wo, fd, 0)); - ASSERT(0 == close(fd)); /* TODO: it's indeterminate who owns fd now */ + ASSERT_OK(uv_tty_init(&loop, &tty_wo, fd, 0)); + ASSERT_OK(close(fd)); /* TODO: it's indeterminate who owns fd now */ ASSERT(!uv_is_readable((uv_stream_t*) &tty_wo)); ASSERT(uv_is_writable((uv_stream_t*) &tty_wo)); uv_close((uv_handle_t*) &tty_wo, NULL); @@ -409,7 +409,7 @@ TEST_IMPL(tty_file) { } - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(&loop); #endif @@ -436,14 +436,14 @@ TEST_IMPL(tty_pty) { uv_loop_t loop; uv_tty_t master_tty, slave_tty; - ASSERT(0 == uv_loop_init(&loop)); + ASSERT_OK(uv_loop_init(&loop)); r = openpty(&master_fd, &slave_fd, NULL, NULL, &w); if (r != 0) RETURN_SKIP("No pty available, skipping."); - ASSERT(0 == uv_tty_init(&loop, &slave_tty, slave_fd, 0)); - ASSERT(0 == uv_tty_init(&loop, &master_tty, master_fd, 0)); + ASSERT_OK(uv_tty_init(&loop, &slave_tty, slave_fd, 0)); + ASSERT_OK(uv_tty_init(&loop, &master_tty, master_fd, 0)); ASSERT(uv_is_readable((uv_stream_t*) &slave_tty)); ASSERT(uv_is_writable((uv_stream_t*) &slave_tty)); ASSERT(uv_is_readable((uv_stream_t*) &master_tty)); @@ -451,16 +451,16 @@ TEST_IMPL(tty_pty) { /* Check if the file descriptor was reopened. If it is, * UV_HANDLE_BLOCKING_WRITES (value 0x100000) isn't set on flags. */ - ASSERT(0 == (slave_tty.flags & 0x100000)); + ASSERT_OK((slave_tty.flags & 0x100000)); /* The master_fd of a pty should never be reopened. */ ASSERT(master_tty.flags & 0x100000); - ASSERT(0 == close(slave_fd)); + ASSERT_OK(close(slave_fd)); uv_close((uv_handle_t*) &slave_tty, NULL); - ASSERT(0 == close(master_fd)); + ASSERT_OK(close(master_fd)); uv_close((uv_handle_t*) &master_tty, NULL); - ASSERT(0 == uv_run(&loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(&loop, UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(&loop); #endif diff --git a/deps/uv/test/test-udp-alloc-cb-fail.c b/deps/uv/test/test-udp-alloc-cb-fail.c index 073dea977821d6..ae4bbee325e9b8 100644 --- a/deps/uv/test/test-udp-alloc-cb-fail.c +++ b/deps/uv/test/test-udp-alloc-cb-fail.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) + ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) static uv_udp_t server; static uv_udp_t client; @@ -60,7 +60,7 @@ static void cl_alloc_cb(uv_handle_t* handle, static void close_cb(uv_handle_t* handle) { CHECK_HANDLE(handle); - ASSERT(1 == uv_is_closing(handle)); + ASSERT_EQ(1, uv_is_closing(handle)); close_cb_called++; } @@ -71,8 +71,8 @@ static void cl_recv_cb(uv_udp_t* handle, const struct sockaddr* addr, unsigned flags) { CHECK_HANDLE(handle); - ASSERT(flags == 0); - ASSERT(nread == UV_ENOBUFS); + ASSERT_OK(flags); + ASSERT_EQ(nread, UV_ENOBUFS); cl_recv_cb_called++; @@ -84,11 +84,11 @@ static void cl_send_cb(uv_udp_send_t* req, int status) { int r; ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); CHECK_HANDLE(req->handle); r = uv_udp_recv_start(req->handle, cl_alloc_cb, cl_recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); cl_send_cb_called++; } @@ -96,7 +96,7 @@ static void cl_send_cb(uv_udp_send_t* req, int status) { static void sv_send_cb(uv_udp_send_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); CHECK_HANDLE(req->handle); uv_close((uv_handle_t*) req->handle, close_cb); @@ -126,21 +126,21 @@ static void sv_recv_cb(uv_udp_t* handle, } CHECK_HANDLE(handle); - ASSERT(flags == 0); + ASSERT_OK(flags); ASSERT_NOT_NULL(addr); - ASSERT(nread == 4); + ASSERT_EQ(4, nread); ASSERT(!memcmp("PING", rcvbuf->base, nread)); r = uv_udp_recv_stop(handle); - ASSERT(r == 0); + ASSERT_OK(r); req = malloc(sizeof *req); ASSERT_NOT_NULL(req); sndbuf = uv_buf_init("PONG", 4); r = uv_udp_send(req, handle, &sndbuf, 1, addr, sv_send_cb); - ASSERT(r == 0); + ASSERT_OK(r); sv_recv_cb_called++; } @@ -152,21 +152,21 @@ TEST_IMPL(udp_alloc_cb_fail) { uv_buf_t buf; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_recv_start(&server, sv_alloc_cb, sv_recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); buf = uv_buf_init("PING", 4); r = uv_udp_send(&req, @@ -175,21 +175,21 @@ TEST_IMPL(udp_alloc_cb_fail) { 1, (const struct sockaddr*) &addr, cl_send_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); - ASSERT(cl_send_cb_called == 0); - ASSERT(cl_recv_cb_called == 0); - ASSERT(sv_send_cb_called == 0); - ASSERT(sv_recv_cb_called == 0); + ASSERT_OK(close_cb_called); + ASSERT_OK(cl_send_cb_called); + ASSERT_OK(cl_recv_cb_called); + ASSERT_OK(sv_send_cb_called); + ASSERT_OK(sv_recv_cb_called); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(cl_send_cb_called == 1); - ASSERT(cl_recv_cb_called == 1); - ASSERT(sv_send_cb_called == 1); - ASSERT(sv_recv_cb_called == 1); - ASSERT(close_cb_called == 2); + ASSERT_EQ(1, cl_send_cb_called); + ASSERT_EQ(1, cl_recv_cb_called); + ASSERT_EQ(1, sv_send_cb_called); + ASSERT_EQ(1, sv_recv_cb_called); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-bind.c b/deps/uv/test/test-udp-bind.c index 200cdc7c927fa9..519f9b02fa2cc2 100644 --- a/deps/uv/test/test-udp-bind.c +++ b/deps/uv/test/test-udp-bind.c @@ -33,27 +33,27 @@ TEST_IMPL(udp_bind) { uv_udp_t h1, h2; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); loop = uv_default_loop(); r = uv_udp_init(loop, &h1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_init(loop, &h2); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&h1, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&h2, (const struct sockaddr*) &addr, 0); - ASSERT(r == UV_EADDRINUSE); + ASSERT_EQ(r, UV_EADDRINUSE); uv_close((uv_handle_t*) &h1, NULL); uv_close((uv_handle_t*) &h2, NULL); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -66,27 +66,27 @@ TEST_IMPL(udp_bind_reuseaddr) { uv_udp_t h1, h2; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); loop = uv_default_loop(); r = uv_udp_init(loop, &h1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_init(loop, &h2); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&h1, (const struct sockaddr*) &addr, UV_UDP_REUSEADDR); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&h2, (const struct sockaddr*) &addr, UV_UDP_REUSEADDR); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &h1, NULL); uv_close((uv_handle_t*) &h2, NULL); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-udp-connect.c b/deps/uv/test/test-udp-connect.c index c1e4064b94e255..88314acc69b073 100644 --- a/deps/uv/test/test-udp-connect.c +++ b/deps/uv/test/test-udp-connect.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) + ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) static uv_udp_t server; static uv_udp_t client; @@ -45,7 +45,7 @@ static void alloc_cb(uv_handle_t* handle, uv_buf_t* buf) { static char slab[65536]; CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); + ASSERT_LE(suggested_size, sizeof(slab)); buf->base = slab; buf->len = sizeof(slab); } @@ -62,19 +62,19 @@ static void cl_send_cb(uv_udp_send_t* req, int status) { int r; ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); CHECK_HANDLE(req->handle); if (++cl_send_cb_called == 1) { uv_udp_connect(&client, NULL); r = uv_udp_send(req, &client, &buf, 1, NULL, cl_send_cb); - ASSERT(r == UV_EDESTADDRREQ); + ASSERT_EQ(r, UV_EDESTADDRREQ); r = uv_udp_send(req, &client, &buf, 1, (const struct sockaddr*) &lo_addr, cl_send_cb); - ASSERT(r == 0); + ASSERT_OK(r); } } @@ -86,9 +86,9 @@ static void sv_recv_cb(uv_udp_t* handle, const struct sockaddr* addr, unsigned flags) { if (nread > 0) { - ASSERT(nread == 4); + ASSERT_EQ(4, nread); ASSERT_NOT_NULL(addr); - ASSERT(memcmp("EXIT", rcvbuf->base, nread) == 0); + ASSERT_OK(memcmp("EXIT", rcvbuf->base, nread)); if (++sv_recv_cb_called == 4) { uv_close((uv_handle_t*) &server, close_cb); uv_close((uv_handle_t*) &client, close_cb); @@ -107,89 +107,89 @@ TEST_IMPL(udp_connect) { int r; int addrlen; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &lo_addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &lo_addr)); r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&server, (const struct sockaddr*) &lo_addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); buf = uv_buf_init("EXIT", 4); /* connect() to INADDR_ANY fails on Windows with WSAEADDRNOTAVAIL */ - ASSERT_EQ(0, uv_ip4_addr("0.0.0.0", TEST_PORT, &tmp_addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &tmp_addr)); r = uv_udp_connect(&client, (const struct sockaddr*) &tmp_addr); #ifdef _WIN32 ASSERT_EQ(r, UV_EADDRNOTAVAIL); #else - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_connect(&client, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); #endif - ASSERT(0 == uv_ip4_addr("8.8.8.8", TEST_PORT, &ext_addr)); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &lo_addr)); + ASSERT_OK(uv_ip4_addr("8.8.8.8", TEST_PORT, &ext_addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &lo_addr)); r = uv_udp_connect(&client, (const struct sockaddr*) &lo_addr); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_connect(&client, (const struct sockaddr*) &ext_addr); - ASSERT(r == UV_EISCONN); + ASSERT_EQ(r, UV_EISCONN); addrlen = sizeof(tmp_addr); r = uv_udp_getpeername(&client, (struct sockaddr*) &tmp_addr, &addrlen); - ASSERT(r == 0); + ASSERT_OK(r); /* To send messages in connected UDP sockets addr must be NULL */ r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &lo_addr); - ASSERT(r == UV_EISCONN); + ASSERT_EQ(r, UV_EISCONN); r = uv_udp_try_send(&client, &buf, 1, NULL); - ASSERT(r == 4); + ASSERT_EQ(4, r); r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &ext_addr); - ASSERT(r == UV_EISCONN); + ASSERT_EQ(r, UV_EISCONN); r = uv_udp_connect(&client, NULL); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_connect(&client, NULL); - ASSERT(r == UV_ENOTCONN); + ASSERT_EQ(r, UV_ENOTCONN); addrlen = sizeof(tmp_addr); r = uv_udp_getpeername(&client, (struct sockaddr*) &tmp_addr, &addrlen); - ASSERT(r == UV_ENOTCONN); + ASSERT_EQ(r, UV_ENOTCONN); /* To send messages in disconnected UDP sockets addr must be set */ r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &lo_addr); - ASSERT(r == 4); + ASSERT_EQ(4, r); r = uv_udp_try_send(&client, &buf, 1, NULL); - ASSERT(r == UV_EDESTADDRREQ); + ASSERT_EQ(r, UV_EDESTADDRREQ); r = uv_udp_connect(&client, (const struct sockaddr*) &lo_addr); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_send(&req, &client, &buf, 1, (const struct sockaddr*) &lo_addr, cl_send_cb); - ASSERT(r == UV_EISCONN); + ASSERT_EQ(r, UV_EISCONN); r = uv_udp_send(&req, &client, &buf, 1, NULL, cl_send_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 2); - ASSERT(sv_recv_cb_called == 4); - ASSERT(cl_send_cb_called == 2); + ASSERT_EQ(2, close_cb_called); + ASSERT_EQ(4, sv_recv_cb_called); + ASSERT_EQ(2, cl_send_cb_called); - ASSERT(client.send_queue_size == 0); - ASSERT(server.send_queue_size == 0); + ASSERT_OK(client.send_queue_size); + ASSERT_OK(server.send_queue_size); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-connect6.c b/deps/uv/test/test-udp-connect6.c index 076d8d77b92df4..bbc4033c55f9fd 100644 --- a/deps/uv/test/test-udp-connect6.c +++ b/deps/uv/test/test-udp-connect6.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) + ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) static uv_udp_t server; static uv_udp_t client; @@ -62,7 +62,7 @@ static void cl_send_cb(uv_udp_send_t* req, int status) { int r; ASSERT_NOT_NULL(req); - ASSERT_EQ(status, 0); + ASSERT_OK(status); CHECK_HANDLE(req->handle); if (++cl_send_cb_called == 1) { uv_udp_connect(&client, NULL); @@ -74,7 +74,7 @@ static void cl_send_cb(uv_udp_send_t* req, int status) { 1, (const struct sockaddr*) &lo_addr, cl_send_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } } @@ -86,9 +86,9 @@ static void sv_recv_cb(uv_udp_t* handle, const struct sockaddr* addr, unsigned flags) { if (nread > 0) { - ASSERT_EQ(nread, 4); + ASSERT_EQ(4, nread); ASSERT_NOT_NULL(addr); - ASSERT_EQ(memcmp("EXIT", rcvbuf->base, nread), 0); + ASSERT_OK(memcmp("EXIT", rcvbuf->base, nread)); if (++sv_recv_cb_called == 4) { uv_close((uv_handle_t*) &server, close_cb); uv_close((uv_handle_t*) &client, close_cb); @@ -110,55 +110,55 @@ TEST_IMPL(udp_connect6) { if (!can_ipv6()) RETURN_SKIP("IPv6 not supported"); - ASSERT_EQ(0, uv_ip6_addr("::", TEST_PORT, &lo_addr)); + ASSERT_OK(uv_ip6_addr("::", TEST_PORT, &lo_addr)); r = uv_udp_init(uv_default_loop(), &server); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_bind(&server, (const struct sockaddr*) &lo_addr, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_init(uv_default_loop(), &client); - ASSERT_EQ(r, 0); + ASSERT_OK(r); buf = uv_buf_init("EXIT", 4); /* connect() to INADDR_ANY fails on Windows wih WSAEADDRNOTAVAIL */ - ASSERT_EQ(0, uv_ip6_addr("::", TEST_PORT, &tmp_addr)); + ASSERT_OK(uv_ip6_addr("::", TEST_PORT, &tmp_addr)); r = uv_udp_connect(&client, (const struct sockaddr*) &tmp_addr); #ifdef _WIN32 ASSERT_EQ(r, UV_EADDRNOTAVAIL); #else - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_connect(&client, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); #endif - ASSERT_EQ(0, uv_ip6_addr("2001:4860:4860::8888", TEST_PORT, &ext_addr)); - ASSERT_EQ(0, uv_ip6_addr("::1", TEST_PORT, &lo_addr)); + ASSERT_OK(uv_ip6_addr("2001:4860:4860::8888", TEST_PORT, &ext_addr)); + ASSERT_OK(uv_ip6_addr("::1", TEST_PORT, &lo_addr)); r = uv_udp_connect(&client, (const struct sockaddr*) &lo_addr); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_connect(&client, (const struct sockaddr*) &ext_addr); ASSERT_EQ(r, UV_EISCONN); addrlen = sizeof(tmp_addr); r = uv_udp_getpeername(&client, (struct sockaddr*) &tmp_addr, &addrlen); - ASSERT_EQ(r, 0); + ASSERT_OK(r); /* To send messages in connected UDP sockets addr must be NULL */ r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &lo_addr); ASSERT_EQ(r, UV_EISCONN); r = uv_udp_try_send(&client, &buf, 1, NULL); - ASSERT_EQ(r, 4); + ASSERT_EQ(4, r); r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &ext_addr); ASSERT_EQ(r, UV_EISCONN); r = uv_udp_connect(&client, NULL); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_connect(&client, NULL); ASSERT_EQ(r, UV_ENOTCONN); @@ -168,13 +168,13 @@ TEST_IMPL(udp_connect6) { /* To send messages in disconnected UDP sockets addr must be set */ r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &lo_addr); - ASSERT_EQ(r, 4); + ASSERT_EQ(4, r); r = uv_udp_try_send(&client, &buf, 1, NULL); ASSERT_EQ(r, UV_EDESTADDRREQ); r = uv_udp_connect(&client, (const struct sockaddr*) &lo_addr); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_send(&req, &client, &buf, @@ -183,16 +183,16 @@ TEST_IMPL(udp_connect6) { cl_send_cb); ASSERT_EQ(r, UV_EISCONN); r = uv_udp_send(&req, &client, &buf, 1, NULL, cl_send_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT_EQ(close_cb_called, 2); - ASSERT_EQ(sv_recv_cb_called, 4); - ASSERT_EQ(cl_send_cb_called, 2); + ASSERT_EQ(2, close_cb_called); + ASSERT_EQ(4, sv_recv_cb_called); + ASSERT_EQ(2, cl_send_cb_called); - ASSERT_EQ(client.send_queue_size, 0); - ASSERT_EQ(server.send_queue_size, 0); + ASSERT_OK(client.send_queue_size); + ASSERT_OK(server.send_queue_size); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-create-socket-early.c b/deps/uv/test/test-udp-create-socket-early.c index f51e275ba1e352..f2e166af9c2b80 100644 --- a/deps/uv/test/test-udp-create-socket-early.c +++ b/deps/uv/test/test-udp-create-socket-early.c @@ -38,32 +38,34 @@ TEST_IMPL(udp_create_early) { uv_os_fd_t fd; int r, namelen; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_udp_init_ex(uv_default_loop(), &client, AF_INET); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fileno((const uv_handle_t*) &client, &fd); - ASSERT(r == 0); - ASSERT(fd != INVALID_FD); + ASSERT_OK(r); /* Windows returns WSAEINVAL if the socket is not bound */ #ifndef _WIN32 + ASSERT_NE(fd, INVALID_FD); namelen = sizeof sockname; r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(sockname.sin_family == AF_INET); + ASSERT_OK(r); + ASSERT_EQ(sockname.sin_family, AF_INET); +#else + ASSERT_PTR_NE(fd, INVALID_FD); #endif r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); namelen = sizeof sockname; r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(memcmp(&addr.sin_addr, - &sockname.sin_addr, - sizeof(addr.sin_addr)) == 0); + ASSERT_OK(r); + ASSERT_OK(memcmp(&addr.sin_addr, + &sockname.sin_addr, + sizeof(addr.sin_addr))); uv_close((uv_handle_t*) &client, NULL); uv_run(uv_default_loop(), UV_RUN_DEFAULT); @@ -82,32 +84,34 @@ TEST_IMPL(udp_create_early_bad_bind) { if (!can_ipv6()) RETURN_SKIP("IPv6 not supported"); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_udp_init_ex(uv_default_loop(), &client, AF_INET6); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_fileno((const uv_handle_t*) &client, &fd); - ASSERT(r == 0); - ASSERT(fd != INVALID_FD); + ASSERT_OK(r); /* Windows returns WSAEINVAL if the socket is not bound */ -#ifndef _WIN32 - { +#ifndef _WIN32 + ASSERT_NE(fd, INVALID_FD); + { int namelen; struct sockaddr_in6 sockname; namelen = sizeof sockname; r = uv_udp_getsockname(&client, (struct sockaddr*) &sockname, &namelen); - ASSERT(r == 0); - ASSERT(sockname.sin6_family == AF_INET6); + ASSERT_OK(r); + ASSERT_EQ(sockname.sin6_family, AF_INET6); } +#else + ASSERT_PTR_NE(fd, INVALID_FD); #endif r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0); #if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(__MSYS__) - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); #else - ASSERT(r == UV_EFAULT); + ASSERT_EQ(r, UV_EFAULT); #endif uv_close((uv_handle_t*) &client, NULL); @@ -123,10 +127,10 @@ TEST_IMPL(udp_create_early_bad_domain) { int r; r = uv_udp_init_ex(uv_default_loop(), &client, 47); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); r = uv_udp_init_ex(uv_default_loop(), &client, 1024); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); uv_run(uv_default_loop(), UV_RUN_DEFAULT); diff --git a/deps/uv/test/test-udp-dgram-too-big.c b/deps/uv/test/test-udp-dgram-too-big.c index 9db8b47be18da8..8fae756e5c4c88 100644 --- a/deps/uv/test/test-udp-dgram-too-big.c +++ b/deps/uv/test/test-udp-dgram-too-big.c @@ -27,10 +27,10 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &handle_) + ASSERT_PTR_EQ((uv_udp_t*)(handle), &handle_) #define CHECK_REQ(req) \ - ASSERT((req) == &req_); + ASSERT_PTR_EQ((req), &req_); static uv_udp_t handle_; static uv_udp_send_t req_; @@ -49,7 +49,7 @@ static void send_cb(uv_udp_send_t* req, int status) { CHECK_REQ(req); CHECK_HANDLE(req->handle); - ASSERT(status == UV_EMSGSIZE); + ASSERT_EQ(status, UV_EMSGSIZE); uv_close((uv_handle_t*)req->handle, close_cb); send_cb_called++; @@ -65,10 +65,10 @@ TEST_IMPL(udp_dgram_too_big) { memset(dgram, 42, sizeof dgram); /* silence valgrind */ r = uv_udp_init(uv_default_loop(), &handle_); - ASSERT(r == 0); + ASSERT_OK(r); buf = uv_buf_init(dgram, sizeof dgram); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_udp_send(&req_, &handle_, @@ -76,15 +76,15 @@ TEST_IMPL(udp_dgram_too_big) { 1, (const struct sockaddr*) &addr, send_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); - ASSERT(send_cb_called == 0); + ASSERT_OK(close_cb_called); + ASSERT_OK(send_cb_called); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(send_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, send_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-ipv6.c b/deps/uv/test/test-udp-ipv6.c index ae55cd01b0b2a7..8ad80b9b5a9b6d 100644 --- a/deps/uv/test/test-udp-ipv6.c +++ b/deps/uv/test/test-udp-ipv6.c @@ -30,13 +30,13 @@ #include #endif -#define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server \ - || (uv_udp_t*)(handle) == &client \ - || (uv_timer_t*)(handle) == &timeout) +#define CHECK_HANDLE(handle) \ + ASSERT_NE((uv_udp_t*)(handle) == &server \ + || (uv_udp_t*)(handle) == &client \ + || (uv_timer_t*)(handle) == &timeout, 0) #define CHECK_REQ(req) \ - ASSERT((req) == &req_); + ASSERT_PTR_EQ((req), &req_); static uv_udp_t client; static uv_udp_t server; @@ -81,7 +81,7 @@ static void close_cb(uv_handle_t* handle) { static void send_cb(uv_udp_send_t* req, int status) { CHECK_REQ(req); CHECK_HANDLE(req->handle); - ASSERT(status == 0); + ASSERT_OK(status); send_cb_called++; } @@ -92,7 +92,7 @@ static int is_from_client(const struct sockaddr* addr) { /* Debugging output, and filter out unwanted network traffic */ if (addr != NULL) { - ASSERT(addr->sa_family == AF_INET6); + ASSERT_EQ(addr->sa_family, AF_INET6); addr6 = (struct sockaddr_in6*) addr; r = uv_inet_ntop(addr->sa_family, &addr6->sin6_addr, dst, sizeof(dst)); if (r == 0) @@ -129,7 +129,7 @@ static void ipv6_recv_ok(uv_udp_t* handle, if (!is_from_client(addr) || (nread == 0 && addr == NULL)) return; - ASSERT(nread == 9); + ASSERT_EQ(9, nread); ASSERT(!memcmp(buf->base, data, 9)); recv_cb_called++; } @@ -151,31 +151,39 @@ static void do_test(uv_udp_recv_cb recv_cb, int bind_flags) { char dst[256]; int r; - ASSERT(0 == uv_ip6_addr("::0", TEST_PORT, &addr6)); + ASSERT_OK(uv_ip6_addr("::0", TEST_PORT, &addr6)); r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&server, (const struct sockaddr*) &addr6, bind_flags); - ASSERT(r == 0); + ASSERT_OK(r); addr6_len = sizeof(addr6); - ASSERT(uv_udp_getsockname(&server, (struct sockaddr*) &addr6, &addr6_len) == 0); - ASSERT(uv_inet_ntop(addr6.sin6_family, &addr6.sin6_addr, dst, sizeof(dst)) == 0); + ASSERT_OK(uv_udp_getsockname(&server, + (struct sockaddr*) &addr6, + &addr6_len)); + ASSERT_OK(uv_inet_ntop(addr6.sin6_family, + &addr6.sin6_addr, + dst, + sizeof(dst))); printf("on [%.*s]:%d\n", (int) sizeof(dst), dst, addr6.sin6_port); r = uv_udp_recv_start(&server, alloc_cb, recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT(uv_inet_ntop(addr.sin_family, &addr.sin_addr, dst, sizeof(dst)) == 0); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_inet_ntop(addr.sin_family, &addr.sin_addr, dst, sizeof(dst))); printf("to [%.*s]:%d\n", (int) sizeof(dst), dst, addr.sin_port); /* Create some unique data to send */ - ASSERT(9 == snprintf(data, sizeof(data), "PING%5u", uv_os_getpid() & 0xFFFF)); + ASSERT_EQ(9, snprintf(data, + sizeof(data), + "PING%5u", + uv_os_getpid() & 0xFFFF)); buf = uv_buf_init(data, 9); printf("sending %s\n", data); @@ -185,27 +193,27 @@ static void do_test(uv_udp_recv_cb recv_cb, int bind_flags) { 1, (const struct sockaddr*) &addr, send_cb); - ASSERT(r == 0); + ASSERT_OK(r); addr_len = sizeof(addr); - ASSERT(uv_udp_getsockname(&client, (struct sockaddr*) &addr, &addr_len) == 0); - ASSERT(uv_inet_ntop(addr.sin_family, &addr.sin_addr, dst, sizeof(dst)) == 0); + ASSERT_OK(uv_udp_getsockname(&client, (struct sockaddr*) &addr, &addr_len)); + ASSERT_OK(uv_inet_ntop(addr.sin_family, &addr.sin_addr, dst, sizeof(dst))); printf("from [%.*s]:%d\n", (int) sizeof(dst), dst, addr.sin_port); client_port = addr.sin_port; r = uv_timer_init(uv_default_loop(), &timeout); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timeout, timeout_cb, 500, 0); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); - ASSERT(send_cb_called == 0); - ASSERT(recv_cb_called == 0); + ASSERT_OK(close_cb_called); + ASSERT_OK(send_cb_called); + ASSERT_OK(recv_cb_called); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 3); + ASSERT_EQ(3, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); } @@ -231,8 +239,8 @@ TEST_IMPL(udp_dual_stack) { printf("recv_cb_called %d\n", recv_cb_called); printf("send_cb_called %d\n", send_cb_called); - ASSERT(recv_cb_called == 1); - ASSERT(send_cb_called == 1); + ASSERT_EQ(1, recv_cb_called); + ASSERT_EQ(1, send_cb_called); return 0; } @@ -244,8 +252,8 @@ TEST_IMPL(udp_ipv6_only) { do_test(ipv6_recv_fail, UV_UDP_IPV6ONLY); - ASSERT(recv_cb_called == 0); - ASSERT(send_cb_called == 1); + ASSERT_OK(recv_cb_called); + ASSERT_EQ(1, send_cb_called); return 0; } diff --git a/deps/uv/test/test-udp-mmsg.c b/deps/uv/test/test-udp-mmsg.c index c37343f8c9f4c5..c0e000b9d92bbf 100644 --- a/deps/uv/test/test-udp-mmsg.c +++ b/deps/uv/test/test-udp-mmsg.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &recver || (uv_udp_t*)(handle) == &sender) + ASSERT_NE((uv_udp_t*)(handle) == &recver || (uv_udp_t*)(handle) == &sender, 0) #define BUFFER_MULTIPLIER 20 #define MAX_DGRAM_SIZE (64 * 1024) @@ -77,7 +77,7 @@ static void recv_cb(uv_udp_t* handle, /* free and return if this is a mmsg free-only callback invocation */ if (flags & UV_UDP_MMSG_FREE) { - ASSERT_EQ(nread, 0); + ASSERT_OK(nread); ASSERT_NULL(addr); free(rcvbuf->base); return; @@ -87,7 +87,7 @@ static void recv_cb(uv_udp_t* handle, /* There can be no more available data for the time being. */ ASSERT_NULL(addr); } else { - ASSERT_EQ(nread, 4); + ASSERT_EQ(4, nread); ASSERT_NOT_NULL(addr); ASSERT_MEM_EQ("PING", rcvbuf->base, nread); received_datagrams++; @@ -110,31 +110,31 @@ TEST_IMPL(udp_mmsg) { uv_buf_t buf; int i; - ASSERT_EQ(0, uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); - ASSERT_EQ(0, uv_udp_init_ex(uv_default_loop(), &recver, - AF_UNSPEC | UV_UDP_RECVMMSG)); + ASSERT_OK(uv_udp_init_ex(uv_default_loop(), &recver, + AF_UNSPEC | UV_UDP_RECVMMSG)); - ASSERT_EQ(0, uv_udp_bind(&recver, (const struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_udp_bind(&recver, (const struct sockaddr*) &addr, 0)); - ASSERT_EQ(0, uv_udp_recv_start(&recver, alloc_cb, recv_cb)); + ASSERT_OK(uv_udp_recv_start(&recver, alloc_cb, recv_cb)); - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT_EQ(0, uv_udp_init(uv_default_loop(), &sender)); + ASSERT_OK(uv_udp_init(uv_default_loop(), &sender)); buf = uv_buf_init("PING", 4); for (i = 0; i < NUM_SENDS; i++) { ASSERT_EQ(4, uv_udp_try_send(&sender, &buf, 1, (const struct sockaddr*) &addr)); } - ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); - ASSERT_EQ(close_cb_called, 2); + ASSERT_EQ(2, close_cb_called); ASSERT_EQ(received_datagrams, NUM_SENDS); - ASSERT_EQ(sender.send_queue_size, 0); - ASSERT_EQ(recver.send_queue_size, 0); + ASSERT_OK(sender.send_queue_size); + ASSERT_OK(recver.send_queue_size); printf("%d allocs for %d recvs\n", alloc_cb_called, recv_cb_called); diff --git a/deps/uv/test/test-udp-multicast-interface.c b/deps/uv/test/test-udp-multicast-interface.c index 447d3487f5cefc..2c558c8b0f156e 100644 --- a/deps/uv/test/test-udp-multicast-interface.c +++ b/deps/uv/test/test-udp-multicast-interface.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) + ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) static uv_udp_t server; static uv_udp_t client; @@ -65,17 +65,17 @@ TEST_IMPL(udp_multicast_interface) { struct sockaddr_in addr; struct sockaddr_in baddr; - ASSERT(0 == uv_ip4_addr("239.255.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("239.255.0.1", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &baddr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", 0, &baddr)); r = uv_udp_bind(&server, (const struct sockaddr*)&baddr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_set_multicast_interface(&server, "0.0.0.0"); - ASSERT(r == 0); + ASSERT_OK(r); /* server sends "PING" */ buf = uv_buf_init("PING", 4); @@ -85,19 +85,19 @@ TEST_IMPL(udp_multicast_interface) { 1, (const struct sockaddr*)&addr, sv_send_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); - ASSERT(sv_send_cb_called == 0); + ASSERT_OK(close_cb_called); + ASSERT_OK(sv_send_cb_called); /* run the loop till all events are processed */ uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(sv_send_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, sv_send_cb_called); + ASSERT_EQ(1, close_cb_called); - ASSERT(client.send_queue_size == 0); - ASSERT(server.send_queue_size == 0); + ASSERT_OK(client.send_queue_size); + ASSERT_OK(server.send_queue_size); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-multicast-interface6.c b/deps/uv/test/test-udp-multicast-interface6.c index 1d40aefa8cb236..54fc87ed4e93ae 100644 --- a/deps/uv/test/test-udp-multicast-interface6.c +++ b/deps/uv/test/test-udp-multicast-interface6.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) + ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) static uv_udp_t server; static uv_udp_t client; @@ -44,7 +44,7 @@ static void close_cb(uv_handle_t* handle) { static void sv_send_cb(uv_udp_send_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); CHECK_HANDLE(req->handle); sv_send_cb_called++; @@ -68,21 +68,21 @@ TEST_IMPL(udp_multicast_interface6) { if (!can_ipv6()) RETURN_SKIP("IPv6 not supported"); - ASSERT(0 == uv_ip6_addr("::1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip6_addr("::1", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_ip6_addr("::", 0, &baddr)); + ASSERT_OK(uv_ip6_addr("::", 0, &baddr)); r = uv_udp_bind(&server, (const struct sockaddr*)&baddr, 0); - ASSERT(r == 0); + ASSERT_OK(r); #if defined(__APPLE__) || defined(__FreeBSD__) r = uv_udp_set_multicast_interface(&server, "::1%lo0"); #else r = uv_udp_set_multicast_interface(&server, NULL); #endif - ASSERT(r == 0); + ASSERT_OK(r); /* server sends "PING" */ buf = uv_buf_init("PING", 4); @@ -92,16 +92,16 @@ TEST_IMPL(udp_multicast_interface6) { 1, (const struct sockaddr*)&addr, sv_send_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); - ASSERT(sv_send_cb_called == 0); + ASSERT_OK(close_cb_called); + ASSERT_OK(sv_send_cb_called); /* run the loop till all events are processed */ uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(sv_send_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, sv_send_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-multicast-join.c b/deps/uv/test/test-udp-multicast-join.c index dddcea4662f1d9..7e8fbe39f08c3b 100644 --- a/deps/uv/test/test-udp-multicast-join.c +++ b/deps/uv/test/test-udp-multicast-join.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) + ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) #define MULTICAST_ADDR "239.255.0.1" @@ -47,7 +47,7 @@ static void alloc_cb(uv_handle_t* handle, uv_buf_t* buf) { static char slab[65536]; CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); + ASSERT_LE(suggested_size, sizeof(slab)); buf->base = slab; buf->len = sizeof(slab); } @@ -61,7 +61,7 @@ static void close_cb(uv_handle_t* handle) { static void sv_send_cb(uv_udp_send_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); CHECK_HANDLE(req->handle); sv_send_cb_called++; @@ -77,7 +77,7 @@ static int do_send(uv_udp_send_t* send_req) { buf = uv_buf_init("PING", 4); - ASSERT(0 == uv_ip4_addr(MULTICAST_ADDR, TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr(MULTICAST_ADDR, TEST_PORT, &addr)); /* client sends "PING" */ return uv_udp_send(send_req, @@ -95,7 +95,7 @@ static void cl_recv_cb(uv_udp_t* handle, const struct sockaddr* addr, unsigned flags) { CHECK_HANDLE(handle); - ASSERT(flags == 0); + ASSERT_OK(flags); if (nread < 0) { ASSERT(0 && "unexpected error"); @@ -108,7 +108,7 @@ static void cl_recv_cb(uv_udp_t* handle, } ASSERT_NOT_NULL(addr); - ASSERT(nread == 4); + ASSERT_EQ(4, nread); ASSERT(!memcmp("PING", buf->base, nread)); cl_recv_cb_called++; @@ -121,18 +121,18 @@ static void cl_recv_cb(uv_udp_t* handle, char source_addr[64]; r = uv_ip4_name((const struct sockaddr_in*)addr, source_addr, sizeof(source_addr)); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_set_membership(&server, MULTICAST_ADDR, NULL, UV_LEAVE_GROUP); - ASSERT(r == 0); + ASSERT_OK(r); #if !defined(__OpenBSD__) && !defined(__NetBSD__) r = uv_udp_set_source_membership(&server, MULTICAST_ADDR, NULL, source_addr, UV_JOIN_GROUP); - ASSERT(r == 0); + ASSERT_OK(r); #endif r = do_send(&req_ss); - ASSERT(r == 0); + ASSERT_OK(r); } } @@ -144,40 +144,40 @@ TEST_IMPL(udp_multicast_join) { int r; struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); /* bind to the desired port */ r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); /* join the multicast channel */ r = uv_udp_set_membership(&server, MULTICAST_ADDR, NULL, UV_JOIN_GROUP); if (r == UV_ENODEV) RETURN_SKIP("No multicast support."); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_recv_start(&server, alloc_cb, cl_recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = do_send(&req); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); - ASSERT(cl_recv_cb_called == 0); - ASSERT(sv_send_cb_called == 0); + ASSERT_OK(close_cb_called); + ASSERT_OK(cl_recv_cb_called); + ASSERT_OK(sv_send_cb_called); /* run the loop till all events are processed */ uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(cl_recv_cb_called == 2); - ASSERT(sv_send_cb_called == 2); - ASSERT(close_cb_called == 2); + ASSERT_EQ(2, cl_recv_cb_called); + ASSERT_EQ(2, sv_send_cb_called); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-multicast-join6.c b/deps/uv/test/test-udp-multicast-join6.c index d5262b6a9a07bf..11efb0a6f67d78 100644 --- a/deps/uv/test/test-udp-multicast-join6.c +++ b/deps/uv/test/test-udp-multicast-join6.c @@ -28,7 +28,7 @@ #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) + ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) #if defined(__APPLE__) || \ defined(_AIX) || \ @@ -58,7 +58,7 @@ static void alloc_cb(uv_handle_t* handle, uv_buf_t* buf) { static char slab[65536]; CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); + ASSERT_LE(suggested_size, sizeof(slab)); buf->base = slab; buf->len = sizeof(slab); } @@ -72,7 +72,7 @@ static void close_cb(uv_handle_t* handle) { static void sv_send_cb(uv_udp_send_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); CHECK_HANDLE(req->handle); sv_send_cb_called++; @@ -88,7 +88,7 @@ static int do_send(uv_udp_send_t* send_req) { buf = uv_buf_init("PING", 4); - ASSERT(0 == uv_ip6_addr(MULTICAST_ADDR, TEST_PORT, &addr)); + ASSERT_OK(uv_ip6_addr(MULTICAST_ADDR, TEST_PORT, &addr)); /* client sends "PING" */ return uv_udp_send(send_req, @@ -106,7 +106,7 @@ static void cl_recv_cb(uv_udp_t* handle, const struct sockaddr* addr, unsigned flags) { CHECK_HANDLE(handle); - ASSERT(flags == 0); + ASSERT_OK(flags); if (nread < 0) { ASSERT(0 && "unexpected error"); @@ -119,7 +119,7 @@ static void cl_recv_cb(uv_udp_t* handle, } ASSERT_NOT_NULL(addr); - ASSERT(nread == 4); + ASSERT_EQ(4, nread); ASSERT(!memcmp("PING", buf->base, nread)); cl_recv_cb_called++; @@ -132,16 +132,16 @@ static void cl_recv_cb(uv_udp_t* handle, char source_addr[64]; r = uv_ip6_name((const struct sockaddr_in6*)addr, source_addr, sizeof(source_addr)); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_set_membership(&server, MULTICAST_ADDR, INTERFACE_ADDR, UV_LEAVE_GROUP); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_set_source_membership(&server, MULTICAST_ADDR, INTERFACE_ADDR, source_addr, UV_JOIN_GROUP); - ASSERT(r == 0); + ASSERT_OK(r); r = do_send(&req_ss); - ASSERT(r == 0); + ASSERT_OK(r); } } @@ -172,17 +172,17 @@ TEST_IMPL(udp_multicast_join6) { if (!can_ipv6_external()) RETURN_SKIP("No external IPv6 interface available"); - ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr)); + ASSERT_OK(uv_ip6_addr("::", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); /* bind to the desired port */ r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_set_membership(&server, MULTICAST_ADDR, INTERFACE_ADDR, UV_JOIN_GROUP); if (r == UV_ENODEV) { @@ -190,28 +190,28 @@ TEST_IMPL(udp_multicast_join6) { RETURN_SKIP("No ipv6 multicast route"); } - ASSERT(r == 0); + ASSERT_OK(r); /* TODO(gengjiawen): Fix test on QEMU. */ #if defined(__QEMU__) RETURN_SKIP("Test does not currently work in QEMU"); #endif r = uv_udp_recv_start(&server, alloc_cb, cl_recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = do_send(&req); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); - ASSERT(cl_recv_cb_called == 0); - ASSERT(sv_send_cb_called == 0); + ASSERT_OK(close_cb_called); + ASSERT_OK(cl_recv_cb_called); + ASSERT_OK(sv_send_cb_called); /* run the loop till all events are processed */ uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(cl_recv_cb_called == 2); - ASSERT(sv_send_cb_called == 2); - ASSERT(close_cb_called == 2); + ASSERT_EQ(2, cl_recv_cb_called); + ASSERT_EQ(2, sv_send_cb_called); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-multicast-ttl.c b/deps/uv/test/test-udp-multicast-ttl.c index 9aa5bb9147ffbe..50bc54a066ff44 100644 --- a/deps/uv/test/test-udp-multicast-ttl.c +++ b/deps/uv/test/test-udp-multicast-ttl.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) + ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) static uv_udp_t server; static uv_udp_t client; @@ -60,34 +60,34 @@ TEST_IMPL(udp_multicast_ttl) { struct sockaddr_in addr; r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_ip4_addr("0.0.0.0", 0, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", 0, &addr)); r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_set_multicast_ttl(&server, 32); - ASSERT(r == 0); + ASSERT_OK(r); /* server sends "PING" */ buf = uv_buf_init("PING", 4); - ASSERT(0 == uv_ip4_addr("239.255.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("239.255.0.1", TEST_PORT, &addr)); r = uv_udp_send(&req, &server, &buf, 1, (const struct sockaddr*) &addr, sv_send_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); - ASSERT(sv_send_cb_called == 0); + ASSERT_OK(close_cb_called); + ASSERT_OK(sv_send_cb_called); /* run the loop till all events are processed */ uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(sv_send_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, sv_send_cb_called); + ASSERT_EQ(1, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-open.c b/deps/uv/test/test-udp-open.c index 0e09f56a49fa59..6fddc93717ba30 100644 --- a/deps/uv/test/test-udp-open.c +++ b/deps/uv/test/test-udp-open.c @@ -41,7 +41,7 @@ static void startup(void) { #ifdef _WIN32 struct WSAData wsa_data; int r = WSAStartup(MAKEWORD(2, 2), &wsa_data); - ASSERT(r == 0); + ASSERT_OK(r); #endif } @@ -51,9 +51,9 @@ static uv_os_sock_t create_udp_socket(void) { sock = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP); #ifdef _WIN32 - ASSERT(sock != INVALID_SOCKET); + ASSERT_NE(sock, INVALID_SOCKET); #else - ASSERT(sock >= 0); + ASSERT_GE(sock, 0); #endif #ifndef _WIN32 @@ -61,7 +61,7 @@ static uv_os_sock_t create_udp_socket(void) { /* Allow reuse of the port. */ int yes = 1; int r = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &yes, sizeof yes); - ASSERT(r == 0); + ASSERT_OK(r); } #endif @@ -76,7 +76,7 @@ static void close_socket(uv_os_sock_t sock) { #else r = close(sock); #endif - ASSERT(r == 0); + ASSERT_OK(r); } @@ -84,7 +84,7 @@ static void alloc_cb(uv_handle_t* handle, size_t suggested_size, uv_buf_t* buf) { static char slab[65536]; - ASSERT(suggested_size <= sizeof(slab)); + ASSERT_LE(suggested_size, sizeof(slab)); buf->base = slab; buf->len = sizeof(slab); } @@ -113,14 +113,14 @@ static void recv_cb(uv_udp_t* handle, return; } - ASSERT(flags == 0); + ASSERT_OK(flags); ASSERT_NOT_NULL(addr); - ASSERT(nread == 4); - ASSERT(memcmp("PING", buf->base, nread) == 0); + ASSERT_EQ(4, nread); + ASSERT_OK(memcmp("PING", buf->base, nread)); r = uv_udp_recv_stop(handle); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) handle, close_cb); } @@ -128,7 +128,7 @@ static void recv_cb(uv_udp_t* handle, static void send_cb(uv_udp_send_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); send_cb_called++; uv_close((uv_handle_t*)req->handle, close_cb); @@ -142,22 +142,22 @@ TEST_IMPL(udp_open) { uv_os_sock_t sock; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); startup(); sock = create_udp_socket(); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_open(&client, sock); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&client, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_recv_start(&client, alloc_cb, recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_send(&send_req, &client, @@ -165,15 +165,15 @@ TEST_IMPL(udp_open) { 1, (const struct sockaddr*) &addr, send_cb); - ASSERT(r == 0); + ASSERT_OK(r); #ifndef _WIN32 { r = uv_udp_init(uv_default_loop(), &client2); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_open(&client2, sock); - ASSERT(r == UV_EEXIST); + ASSERT_EQ(r, UV_EEXIST); uv_close((uv_handle_t*) &client2, NULL); } @@ -183,10 +183,10 @@ TEST_IMPL(udp_open) { uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(send_cb_called == 1); - ASSERT(close_cb_called == 1); + ASSERT_EQ(1, send_cb_called); + ASSERT_EQ(1, close_cb_called); - ASSERT(client.send_queue_size == 0); + ASSERT_OK(client.send_queue_size); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -203,13 +203,13 @@ TEST_IMPL(udp_open_twice) { sock2 = create_udp_socket(); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_open(&client, sock1); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_open(&client, sock2); - ASSERT(r == UV_EBUSY); + ASSERT_EQ(r, UV_EBUSY); close_socket(sock2); uv_close((uv_handle_t*) &client, NULL); @@ -225,22 +225,22 @@ TEST_IMPL(udp_open_bound) { uv_os_sock_t sock; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); startup(); sock = create_udp_socket(); r = bind(sock, (struct sockaddr*) &addr, sizeof(addr)); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_open(&client, sock); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_recv_start(&client, alloc_cb, recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*) &client, NULL); uv_run(uv_default_loop(), UV_RUN_DEFAULT); @@ -257,28 +257,28 @@ TEST_IMPL(udp_open_connect) { uv_os_sock_t sock; int r; - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); startup(); sock = create_udp_socket(); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); r = connect(sock, (const struct sockaddr*) &addr, sizeof(addr)); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_open(&client, sock); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_recv_start(&server, alloc_cb, recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_send(&send_req, &client, @@ -286,14 +286,14 @@ TEST_IMPL(udp_open_connect) { 1, NULL, send_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(send_cb_called == 1); - ASSERT(close_cb_called == 2); + ASSERT_EQ(1, send_cb_called); + ASSERT_EQ(2, close_cb_called); - ASSERT(client.send_queue_size == 0); + ASSERT_OK(client.send_queue_size); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; @@ -315,20 +315,20 @@ TEST_IMPL(udp_send_unix) { memset(&addr, 0, sizeof addr); addr.sun_family = AF_UNIX; - ASSERT(strlen(TEST_PIPENAME) < sizeof(addr.sun_path)); + ASSERT_LT(strlen(TEST_PIPENAME), sizeof(addr.sun_path)); memcpy(addr.sun_path, TEST_PIPENAME, strlen(TEST_PIPENAME)); fd = socket(AF_UNIX, SOCK_STREAM, 0); - ASSERT(fd >= 0); + ASSERT_GE(fd, 0); unlink(TEST_PIPENAME); - ASSERT(0 == bind(fd, (const struct sockaddr*)&addr, sizeof addr)); - ASSERT(0 == listen(fd, 1)); + ASSERT_OK(bind(fd, (const struct sockaddr*)&addr, sizeof addr)); + ASSERT_OK(listen(fd, 1)); r = uv_udp_init(loop, &handle); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_open(&handle, fd); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(loop, UV_RUN_DEFAULT); r = uv_udp_send(&req, @@ -337,7 +337,7 @@ TEST_IMPL(udp_send_unix) { 1, (const struct sockaddr*) &addr, NULL); - ASSERT(r == 0); + ASSERT_OK(r); uv_close((uv_handle_t*)&handle, NULL); uv_run(loop, UV_RUN_DEFAULT); diff --git a/deps/uv/test/test-udp-options.c b/deps/uv/test/test-udp-options.c index 11e58b996a18ac..bb4a24ca7d1c47 100644 --- a/deps/uv/test/test-udp-options.c +++ b/deps/uv/test/test-udp-options.c @@ -36,56 +36,56 @@ static int udp_options_test(const struct sockaddr* addr) { loop = uv_default_loop(); r = uv_udp_init(loop, &h); - ASSERT(r == 0); + ASSERT_OK(r); uv_unref((uv_handle_t*)&h); /* don't keep the loop alive */ r = uv_udp_bind(&h, addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_set_broadcast(&h, 1); r |= uv_udp_set_broadcast(&h, 1); r |= uv_udp_set_broadcast(&h, 0); r |= uv_udp_set_broadcast(&h, 0); - ASSERT(r == 0); + ASSERT_OK(r); /* values 1-255 should work */ for (i = 1; i <= 255; i++) { r = uv_udp_set_ttl(&h, i); #if defined(__MVS__) if (addr->sa_family == AF_INET6) - ASSERT(r == 0); + ASSERT_OK(r); else - ASSERT(r == UV_ENOTSUP); + ASSERT_EQ(r, UV_ENOTSUP); #else - ASSERT(r == 0); + ASSERT_OK(r); #endif } for (i = 0; i < (int) ARRAY_SIZE(invalid_ttls); i++) { r = uv_udp_set_ttl(&h, invalid_ttls[i]); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); } r = uv_udp_set_multicast_loop(&h, 1); r |= uv_udp_set_multicast_loop(&h, 1); r |= uv_udp_set_multicast_loop(&h, 0); r |= uv_udp_set_multicast_loop(&h, 0); - ASSERT(r == 0); + ASSERT_OK(r); /* values 0-255 should work */ for (i = 0; i <= 255; i++) { r = uv_udp_set_multicast_ttl(&h, i); - ASSERT(r == 0); + ASSERT_OK(r); } /* anything >255 should fail */ r = uv_udp_set_multicast_ttl(&h, 256); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); /* don't test ttl=-1, it's a valid value on some platforms */ r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); + ASSERT_OK(r); MAKE_VALGRIND_HAPPY(loop); return 0; @@ -95,7 +95,7 @@ static int udp_options_test(const struct sockaddr* addr) { TEST_IMPL(udp_options) { struct sockaddr_in addr; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); return udp_options_test((const struct sockaddr*) &addr); } @@ -106,7 +106,7 @@ TEST_IMPL(udp_options6) { if (!can_ipv6()) RETURN_SKIP("IPv6 not supported"); - ASSERT(0 == uv_ip6_addr("::", TEST_PORT, &addr)); + ASSERT_OK(uv_ip6_addr("::", TEST_PORT, &addr)); return udp_options_test((const struct sockaddr*) &addr); } @@ -119,41 +119,41 @@ TEST_IMPL(udp_no_autobind) { loop = uv_default_loop(); /* Test a lazy initialized socket. */ - ASSERT(0 == uv_udp_init(loop, &h)); - ASSERT(UV_EBADF == uv_udp_set_multicast_ttl(&h, 32)); - ASSERT(UV_EBADF == uv_udp_set_broadcast(&h, 1)); + ASSERT_OK(uv_udp_init(loop, &h)); + ASSERT_EQ(UV_EBADF, uv_udp_set_multicast_ttl(&h, 32)); + ASSERT_EQ(UV_EBADF, uv_udp_set_broadcast(&h, 1)); #if defined(__MVS__) - ASSERT(UV_ENOTSUP == uv_udp_set_ttl(&h, 1)); + ASSERT_EQ(UV_ENOTSUP, uv_udp_set_ttl(&h, 1)); #else - ASSERT(UV_EBADF == uv_udp_set_ttl(&h, 1)); + ASSERT_EQ(UV_EBADF, uv_udp_set_ttl(&h, 1)); #endif - ASSERT(UV_EBADF == uv_udp_set_multicast_loop(&h, 1)); + ASSERT_EQ(UV_EBADF, uv_udp_set_multicast_loop(&h, 1)); /* TODO(gengjiawen): Fix test on QEMU. */ #if defined(__QEMU__) RETURN_SKIP("Test does not currently work in QEMU"); #endif - ASSERT(UV_EBADF == uv_udp_set_multicast_interface(&h, "0.0.0.0")); + ASSERT_EQ(UV_EBADF, uv_udp_set_multicast_interface(&h, "0.0.0.0")); uv_close((uv_handle_t*) &h, NULL); /* Test a non-lazily initialized socket. */ - ASSERT(0 == uv_udp_init_ex(loop, &h2, AF_INET | UV_UDP_RECVMMSG)); - ASSERT(0 == uv_udp_set_multicast_ttl(&h2, 32)); - ASSERT(0 == uv_udp_set_broadcast(&h2, 1)); + ASSERT_OK(uv_udp_init_ex(loop, &h2, AF_INET | UV_UDP_RECVMMSG)); + ASSERT_OK(uv_udp_set_multicast_ttl(&h2, 32)); + ASSERT_OK(uv_udp_set_broadcast(&h2, 1)); #if defined(__MVS__) /* zOS only supports setting ttl for IPv6 sockets. */ - ASSERT(UV_ENOTSUP == uv_udp_set_ttl(&h2, 1)); + ASSERT_EQ(UV_ENOTSUP, uv_udp_set_ttl(&h2, 1)); #else - ASSERT(0 == uv_udp_set_ttl(&h2, 1)); + ASSERT_OK(uv_udp_set_ttl(&h2, 1)); #endif - ASSERT(0 == uv_udp_set_multicast_loop(&h2, 1)); - ASSERT(0 == uv_udp_set_multicast_interface(&h2, "0.0.0.0")); + ASSERT_OK(uv_udp_set_multicast_loop(&h2, 1)); + ASSERT_OK(uv_udp_set_multicast_interface(&h2, "0.0.0.0")); uv_close((uv_handle_t*) &h2, NULL); - ASSERT(0 == uv_run(loop, UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(loop, UV_RUN_DEFAULT)); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-udp-recv-in-a-row.c b/deps/uv/test/test-udp-recv-in-a-row.c index 98aca28e193693..30745def0f602d 100644 --- a/deps/uv/test/test-udp-recv-in-a-row.c +++ b/deps/uv/test/test-udp-recv-in-a-row.c @@ -53,7 +53,7 @@ static void sv_recv_cb(uv_udp_t* handle, if (++ recv_cnt < N) { ASSERT_EQ(sizeof(send_data), nread); } else { - ASSERT_EQ(0, nread); + ASSERT_OK(nread); } } @@ -69,7 +69,7 @@ static void check_cb(uv_check_t* handle) { check_cb_called = 1; /* we are done */ - ASSERT_EQ(0, uv_check_stop(handle)); + ASSERT_OK(uv_check_stop(handle)); uv_close((uv_handle_t*) &client, NULL); uv_close((uv_handle_t*) &check_handle, NULL); uv_close((uv_handle_t*) &server, NULL); @@ -79,16 +79,16 @@ static void check_cb(uv_check_t* handle) { TEST_IMPL(udp_recv_in_a_row) { int i, r; - ASSERT_EQ(0, uv_check_init(uv_default_loop(), &check_handle)); - ASSERT_EQ(0, uv_check_start(&check_handle, check_cb)); + ASSERT_OK(uv_check_init(uv_default_loop(), &check_handle)); + ASSERT_OK(uv_check_start(&check_handle, check_cb)); - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT_EQ(0, uv_udp_init(uv_default_loop(), &server)); - ASSERT_EQ(0, uv_udp_bind(&server, (const struct sockaddr*) &addr, 0)); - ASSERT_EQ(0, uv_udp_recv_start(&server, alloc_cb, sv_recv_cb)); + ASSERT_OK(uv_udp_init(uv_default_loop(), &server)); + ASSERT_OK(uv_udp_bind(&server, (const struct sockaddr*) &addr, 0)); + ASSERT_OK(uv_udp_recv_start(&server, alloc_cb, sv_recv_cb)); - ASSERT_EQ(0, uv_udp_init(uv_default_loop(), &client)); + ASSERT_OK(uv_udp_init(uv_default_loop(), &client)); /* send N-1 udp packets */ buf = uv_buf_init(send_data, sizeof(send_data)); @@ -106,13 +106,13 @@ TEST_IMPL(udp_recv_in_a_row) { &buf, 1, (const struct sockaddr*) &addr); - ASSERT_EQ(0, r); + ASSERT_OK(r); /* check_cb() asserts that the N packets can be received * before it gets called. */ - ASSERT_EQ(0, uv_run(uv_default_loop(), UV_RUN_DEFAULT)); + ASSERT_OK(uv_run(uv_default_loop(), UV_RUN_DEFAULT)); ASSERT(check_cb_called); diff --git a/deps/uv/test/test-udp-send-and-recv.c b/deps/uv/test/test-udp-send-and-recv.c index ab60e84a138179..b24fe1d0532822 100644 --- a/deps/uv/test/test-udp-send-and-recv.c +++ b/deps/uv/test/test-udp-send-and-recv.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) + ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) static uv_udp_t server; static uv_udp_t client; @@ -46,7 +46,7 @@ static void alloc_cb(uv_handle_t* handle, uv_buf_t* buf) { static char slab[65536]; CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); + ASSERT_LE(suggested_size, sizeof(slab)); buf->base = slab; buf->len = sizeof(slab); } @@ -54,7 +54,7 @@ static void alloc_cb(uv_handle_t* handle, static void close_cb(uv_handle_t* handle) { CHECK_HANDLE(handle); - ASSERT(1 == uv_is_closing(handle)); + ASSERT_EQ(1, uv_is_closing(handle)); close_cb_called++; } @@ -65,7 +65,7 @@ static void cl_recv_cb(uv_udp_t* handle, const struct sockaddr* addr, unsigned flags) { CHECK_HANDLE(handle); - ASSERT(flags == 0); + ASSERT_OK(flags); if (nread < 0) { ASSERT(0 && "unexpected error"); @@ -78,7 +78,7 @@ static void cl_recv_cb(uv_udp_t* handle, } ASSERT_NOT_NULL(addr); - ASSERT(nread == 4); + ASSERT_EQ(4, nread); ASSERT(!memcmp("PONG", buf->base, nread)); cl_recv_cb_called++; @@ -91,11 +91,11 @@ static void cl_send_cb(uv_udp_send_t* req, int status) { int r; ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); CHECK_HANDLE(req->handle); r = uv_udp_recv_start(req->handle, alloc_cb, cl_recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); cl_send_cb_called++; } @@ -103,7 +103,7 @@ static void cl_send_cb(uv_udp_send_t* req, int status) { static void sv_send_cb(uv_udp_send_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); CHECK_HANDLE(req->handle); uv_close((uv_handle_t*) req->handle, close_cb); @@ -133,10 +133,10 @@ static void sv_recv_cb(uv_udp_t* handle, } CHECK_HANDLE(handle); - ASSERT(flags == 0); + ASSERT_OK(flags); ASSERT_NOT_NULL(addr); - ASSERT(nread == 4); + ASSERT_EQ(4, nread); ASSERT(!memcmp("PING", rcvbuf->base, nread)); /* FIXME? `uv_udp_recv_stop` does what it says: recv_cb is not called @@ -144,14 +144,14 @@ static void sv_recv_cb(uv_udp_t* handle, * either... Not sure I like that but it's consistent with `uv_read_stop`. */ r = uv_udp_recv_stop(handle); - ASSERT(r == 0); + ASSERT_OK(r); req = malloc(sizeof *req); ASSERT_NOT_NULL(req); sndbuf = uv_buf_init("PONG", 4); r = uv_udp_send(req, handle, &sndbuf, 1, addr, sv_send_cb); - ASSERT(r == 0); + ASSERT_OK(r); sv_recv_cb_called++; } @@ -163,21 +163,21 @@ TEST_IMPL(udp_send_and_recv) { uv_buf_t buf; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); /* client sends "PING", expects "PONG" */ buf = uv_buf_init("PING", 4); @@ -188,24 +188,24 @@ TEST_IMPL(udp_send_and_recv) { 1, (const struct sockaddr*) &addr, cl_send_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(close_cb_called == 0); - ASSERT(cl_send_cb_called == 0); - ASSERT(cl_recv_cb_called == 0); - ASSERT(sv_send_cb_called == 0); - ASSERT(sv_recv_cb_called == 0); + ASSERT_OK(close_cb_called); + ASSERT_OK(cl_send_cb_called); + ASSERT_OK(cl_recv_cb_called); + ASSERT_OK(sv_send_cb_called); + ASSERT_OK(sv_recv_cb_called); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(cl_send_cb_called == 1); - ASSERT(cl_recv_cb_called == 1); - ASSERT(sv_send_cb_called == 1); - ASSERT(sv_recv_cb_called == 1); - ASSERT(close_cb_called == 2); + ASSERT_EQ(1, cl_send_cb_called); + ASSERT_EQ(1, cl_recv_cb_called); + ASSERT_EQ(1, sv_send_cb_called); + ASSERT_EQ(1, sv_recv_cb_called); + ASSERT_EQ(2, close_cb_called); - ASSERT(client.send_queue_size == 0); - ASSERT(server.send_queue_size == 0); + ASSERT_OK(client.send_queue_size); + ASSERT_OK(server.send_queue_size); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-send-hang-loop.c b/deps/uv/test/test-udp-send-hang-loop.c index b1e02263d3ca5a..763bb28bdb0d80 100644 --- a/deps/uv/test/test-udp-send-hang-loop.c +++ b/deps/uv/test/test-udp-send-hang-loop.c @@ -27,7 +27,7 @@ #include #define CHECK_OBJECT(handle, type, parent) \ - ASSERT((type*)(handle) == &(parent)) + ASSERT_PTR_EQ((type*)(handle), &(parent)) static uv_udp_t client; static uv_idle_t idle_handle; @@ -46,7 +46,7 @@ static void idle_cb(uv_idle_t* handle) { ASSERT_NULL(send_req.handle); CHECK_OBJECT(handle, uv_idle_t, idle_handle); - ASSERT(0 == uv_idle_stop(handle)); + ASSERT_OK(uv_idle_stop(handle)); /* It probably would have stalled by now if it's going to stall at all. */ if (++loop_hang_called > 1000) { @@ -61,7 +61,7 @@ static void idle_cb(uv_idle_t* handle) { 1, (const struct sockaddr*) &addr, send_cb); - ASSERT(r == 0); + ASSERT_OK(r); } @@ -72,27 +72,27 @@ static void send_cb(uv_udp_send_t* req, int status) { CHECK_OBJECT(req, uv_udp_send_t, send_req); req->handle = NULL; - ASSERT(0 == uv_idle_start(&idle_handle, idle_cb)); + ASSERT_OK(uv_idle_start(&idle_handle, idle_cb)); } TEST_IMPL(udp_send_hang_loop) { - ASSERT(0 == uv_idle_init(uv_default_loop(), &idle_handle)); + ASSERT_OK(uv_idle_init(uv_default_loop(), &idle_handle)); - /* 192.0.2.0/8 is "TEST-NET" and reserved for documentation. + /* 192.0.2.0/24 is "TEST-NET" and reserved for documentation. * Good for us, though. Since we want to have something unreachable. */ - ASSERT(0 == uv_ip4_addr("192.0.2.3", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("192.0.2.3", TEST_PORT, &addr)); - ASSERT(0 == uv_udp_init(uv_default_loop(), &client)); + ASSERT_OK(uv_udp_init(uv_default_loop(), &client)); buf = uv_buf_init(send_data, sizeof(send_data)); - ASSERT(0 == uv_idle_start(&idle_handle, idle_cb)); + ASSERT_OK(uv_idle_start(&idle_handle, idle_cb)); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(loop_hang_called > 1000); + ASSERT_GT(loop_hang_called, 1000); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-send-immediate.c b/deps/uv/test/test-udp-send-immediate.c index ee70a6165a21da..8e7f83ff05bc2c 100644 --- a/deps/uv/test/test-udp-send-immediate.c +++ b/deps/uv/test/test-udp-send-immediate.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) + ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) static uv_udp_t server; static uv_udp_t client; @@ -42,7 +42,7 @@ static void alloc_cb(uv_handle_t* handle, uv_buf_t* buf) { static char slab[65536]; CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); + ASSERT_LE(suggested_size, sizeof(slab)); buf->base = slab; buf->len = sizeof(slab); } @@ -50,14 +50,14 @@ static void alloc_cb(uv_handle_t* handle, static void close_cb(uv_handle_t* handle) { CHECK_HANDLE(handle); - ASSERT(1 == uv_is_closing(handle)); + ASSERT_EQ(1, uv_is_closing(handle)); close_cb_called++; } static void cl_send_cb(uv_udp_send_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == 0); + ASSERT_OK(status); CHECK_HANDLE(req->handle); cl_send_cb_called++; @@ -80,10 +80,10 @@ static void sv_recv_cb(uv_udp_t* handle, } CHECK_HANDLE(handle); - ASSERT(flags == 0); + ASSERT_OK(flags); ASSERT_NOT_NULL(addr); - ASSERT(nread == 4); + ASSERT_EQ(4, nread); ASSERT(memcmp("PING", rcvbuf->base, nread) == 0 || memcmp("PANG", rcvbuf->base, nread) == 0); @@ -100,21 +100,21 @@ TEST_IMPL(udp_send_immediate) { uv_buf_t buf; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); /* client sends "PING", then "PANG" */ buf = uv_buf_init("PING", 4); @@ -125,7 +125,7 @@ TEST_IMPL(udp_send_immediate) { 1, (const struct sockaddr*) &addr, cl_send_cb); - ASSERT(r == 0); + ASSERT_OK(r); buf = uv_buf_init("PANG", 4); @@ -135,13 +135,13 @@ TEST_IMPL(udp_send_immediate) { 1, (const struct sockaddr*) &addr, cl_send_cb); - ASSERT(r == 0); + ASSERT_OK(r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(cl_send_cb_called == 2); - ASSERT(sv_recv_cb_called == 2); - ASSERT(close_cb_called == 2); + ASSERT_EQ(2, cl_send_cb_called); + ASSERT_EQ(2, sv_recv_cb_called); + ASSERT_EQ(2, close_cb_called); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-send-unreachable.c b/deps/uv/test/test-udp-send-unreachable.c index 7075deb189666b..0a2f4a47a97580 100644 --- a/deps/uv/test/test-udp-send-unreachable.c +++ b/deps/uv/test/test-udp-send-unreachable.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &client || (uv_udp_t*)(handle) == &client2) + ASSERT_NE((uv_udp_t*)(handle) == &client || (uv_udp_t*)(handle) == &client2, 0) static uv_udp_t client; static uv_udp_t client2; @@ -61,8 +61,8 @@ static void close_cb(uv_handle_t* handle) { static void send_cb(uv_udp_send_t* req, int status) { ASSERT_NOT_NULL(req); - ASSERT(status == 0); - ASSERT_EQ(status, 0); + ASSERT_OK(status); + ASSERT_OK(status); CHECK_HANDLE(req->handle); send_cb_called++; } @@ -115,24 +115,24 @@ TEST_IMPL(udp_send_unreachable) { can_recverr = 1; #endif - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT_2, &addr2)); - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT_3, &addr3)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT_2, &addr2)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT_3, &addr3)); r = uv_timer_init( uv_default_loop(), &timer ); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_timer_start( &timer, timer_cb, 1000, 0 ); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_init(uv_default_loop(), &client); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_bind(&client, (const struct sockaddr*) &addr2, 0); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_recv_start(&client, alloc_cb, recv_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); /* client sends "PING", then "PANG" */ buf = uv_buf_init("PING", 4); @@ -143,7 +143,7 @@ TEST_IMPL(udp_send_unreachable) { 1, (const struct sockaddr*) &addr, send_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); buf = uv_buf_init("PANG", 4); @@ -153,19 +153,19 @@ TEST_IMPL(udp_send_unreachable) { 1, (const struct sockaddr*) &addr, send_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); if (can_recverr) { r = uv_udp_init(uv_default_loop(), &client2); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_bind(&client2, (const struct sockaddr*) &addr3, UV_UDP_LINUX_RECVERR); - ASSERT_EQ(r, 0); + ASSERT_OK(r); r = uv_udp_recv_start(&client2, alloc_cb, recv_cb); - ASSERT_EQ(r, 0); + ASSERT_OK(r); /* client sends "PING", then "PANG" */ buf = uv_buf_init("PING", 4); @@ -176,7 +176,7 @@ TEST_IMPL(udp_send_unreachable) { 1, (const struct sockaddr*) &addr, send_cb_recverr); - ASSERT_EQ(r, 0); + ASSERT_OK(r); buf = uv_buf_init("PANG", 4); @@ -186,14 +186,14 @@ TEST_IMPL(udp_send_unreachable) { 1, (const struct sockaddr*) &addr, send_cb_recverr); - ASSERT_EQ(r, 0); + ASSERT_OK(r); } uv_run(uv_default_loop(), UV_RUN_DEFAULT); ASSERT_EQ(send_cb_called, (long)(can_recverr ? 4 : 2)); ASSERT_EQ(recv_cb_called, alloc_cb_called); - ASSERT_EQ(timer_cb_called, 1); + ASSERT_EQ(1, timer_cb_called); ASSERT_EQ(close_cb_called, (long)(can_recverr ? 3 : 2)); MAKE_VALGRIND_HAPPY(uv_default_loop()); diff --git a/deps/uv/test/test-udp-sendmmsg-error.c b/deps/uv/test/test-udp-sendmmsg-error.c index 7b1741a3e04f2f..0b647585e4f4b8 100644 --- a/deps/uv/test/test-udp-sendmmsg-error.c +++ b/deps/uv/test/test-udp-sendmmsg-error.c @@ -55,20 +55,20 @@ TEST_IMPL(udp_sendmmsg_error) { uv_buf_t buf; int i; - ASSERT_EQ(0, uv_udp_init(uv_default_loop(), &client)); - ASSERT_EQ(0, uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); - ASSERT_EQ(0, uv_udp_connect(&client, (const struct sockaddr*)&addr)); + ASSERT_OK(uv_udp_init(uv_default_loop(), &client)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_udp_connect(&client, (const struct sockaddr*)&addr)); buf = uv_buf_init("TEST", 4); for (i = 0; i < DATAGRAMS; ++i) - ASSERT_EQ(0, uv_udp_send(&req[i], &client, &buf, 1, NULL, send_cb)); + ASSERT_OK(uv_udp_send(&req[i], &client, &buf, 1, NULL, send_cb)); uv_run(uv_default_loop(), UV_RUN_DEFAULT); ASSERT_EQ(1, close_cb_called); ASSERT_EQ(DATAGRAMS, send_cb_called); - ASSERT_EQ(0, client.send_queue_size); + ASSERT_OK(client.send_queue_size); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-udp-try-send.c b/deps/uv/test/test-udp-try-send.c index b81506cc39f3ce..0c76fb1c84df68 100644 --- a/deps/uv/test/test-udp-try-send.c +++ b/deps/uv/test/test-udp-try-send.c @@ -27,7 +27,7 @@ #include #define CHECK_HANDLE(handle) \ - ASSERT((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client) + ASSERT_NE((uv_udp_t*)(handle) == &server || (uv_udp_t*)(handle) == &client, 0) static uv_udp_t server; static uv_udp_t client; @@ -42,7 +42,7 @@ static void alloc_cb(uv_handle_t* handle, uv_buf_t* buf) { static char slab[65536]; CHECK_HANDLE(handle); - ASSERT(suggested_size <= sizeof(slab)); + ASSERT_LE(suggested_size, sizeof(slab)); buf->base = slab; buf->len = sizeof(slab); } @@ -60,17 +60,17 @@ static void sv_recv_cb(uv_udp_t* handle, const uv_buf_t* rcvbuf, const struct sockaddr* addr, unsigned flags) { - ASSERT(nread > 0); + ASSERT_GT(nread, 0); if (nread == 0) { ASSERT_NULL(addr); return; } - ASSERT(nread == 4); + ASSERT_EQ(4, nread); ASSERT_NOT_NULL(addr); - ASSERT(memcmp("EXIT", rcvbuf->base, nread) == 0); + ASSERT_OK(memcmp("EXIT", rcvbuf->base, nread)); uv_close((uv_handle_t*) handle, close_cb); uv_close((uv_handle_t*) &client, close_cb); @@ -84,37 +84,37 @@ TEST_IMPL(udp_try_send) { uv_buf_t buf; int r; - ASSERT(0 == uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("0.0.0.0", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &server); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_bind(&server, (const struct sockaddr*) &addr, 0); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_udp_recv_start(&server, alloc_cb, sv_recv_cb); - ASSERT(r == 0); + ASSERT_OK(r); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); r = uv_udp_init(uv_default_loop(), &client); - ASSERT(r == 0); + ASSERT_OK(r); buf = uv_buf_init(buffer, sizeof(buffer)); r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &addr); - ASSERT(r == UV_EMSGSIZE); + ASSERT_EQ(r, UV_EMSGSIZE); buf = uv_buf_init("EXIT", 4); r = uv_udp_try_send(&client, &buf, 1, (const struct sockaddr*) &addr); - ASSERT(r == 4); + ASSERT_EQ(4, r); uv_run(uv_default_loop(), UV_RUN_DEFAULT); - ASSERT(close_cb_called == 2); - ASSERT(sv_recv_cb_called == 1); + ASSERT_EQ(2, close_cb_called); + ASSERT_EQ(1, sv_recv_cb_called); - ASSERT(client.send_queue_size == 0); - ASSERT(server.send_queue_size == 0); + ASSERT_OK(client.send_queue_size); + ASSERT_OK(server.send_queue_size); MAKE_VALGRIND_HAPPY(uv_default_loop()); return 0; diff --git a/deps/uv/test/test-uname.c b/deps/uv/test/test-uname.c index 105a17fe67771a..a384e9f8422666 100644 --- a/deps/uv/test/test-uname.c +++ b/deps/uv/test/test-uname.c @@ -39,28 +39,28 @@ TEST_IMPL(uname) { /* Verify that NULL is handled properly. */ r = uv_os_uname(NULL); - ASSERT(r == UV_EINVAL); + ASSERT_EQ(r, UV_EINVAL); /* Verify the happy path. */ r = uv_os_uname(&buffer); - ASSERT(r == 0); + ASSERT_OK(r); #ifndef _WIN32 - ASSERT(uname(&buf) != -1); - ASSERT(strcmp(buffer.sysname, buf.sysname) == 0); - ASSERT(strcmp(buffer.version, buf.version) == 0); + ASSERT_NE(uname(&buf), -1); + ASSERT_OK(strcmp(buffer.sysname, buf.sysname)); + ASSERT_OK(strcmp(buffer.version, buf.version)); # ifdef _AIX snprintf(temp, sizeof(temp), "%s.%s", buf.version, buf.release); - ASSERT(strcmp(buffer.release, temp) == 0); + ASSERT_OK(strcmp(buffer.release, temp)); # else - ASSERT(strcmp(buffer.release, buf.release) == 0); + ASSERT_OK(strcmp(buffer.release, buf.release)); # endif /* _AIX */ # if defined(_AIX) || defined(__PASE__) - ASSERT(strcmp(buffer.machine, "ppc64") == 0); + ASSERT_OK(strcmp(buffer.machine, "ppc64")); # else - ASSERT(strcmp(buffer.machine, buf.machine) == 0); + ASSERT_OK(strcmp(buffer.machine, buf.machine)); # endif /* defined(_AIX) || defined(__PASE__) */ #endif /* _WIN32 */ diff --git a/deps/uv/test/test-walk-handles.c b/deps/uv/test/test-walk-handles.c index 50f0ce84f1e846..86fcb04907e7ef 100644 --- a/deps/uv/test/test-walk-handles.c +++ b/deps/uv/test/test-walk-handles.c @@ -31,7 +31,7 @@ static uv_timer_t timer; static void walk_cb(uv_handle_t* handle, void* arg) { - ASSERT(arg == (void*)magic_cookie); + ASSERT_PTR_EQ(arg, (void*)magic_cookie); if (handle == (uv_handle_t*)&timer) { seen_timer_handle++; @@ -42,7 +42,7 @@ static void walk_cb(uv_handle_t* handle, void* arg) { static void timer_cb(uv_timer_t* handle) { - ASSERT(handle == &timer); + ASSERT_PTR_EQ(handle, &timer); uv_walk(handle->loop, walk_cb, magic_cookie); uv_close((uv_handle_t*)handle, NULL); @@ -56,21 +56,21 @@ TEST_IMPL(walk_handles) { loop = uv_default_loop(); r = uv_timer_init(loop, &timer); - ASSERT(r == 0); + ASSERT_OK(r); r = uv_timer_start(&timer, timer_cb, 1, 0); - ASSERT(r == 0); + ASSERT_OK(r); /* Start event loop, expect to see the timer handle in walk_cb. */ - ASSERT(seen_timer_handle == 0); + ASSERT_OK(seen_timer_handle); r = uv_run(loop, UV_RUN_DEFAULT); - ASSERT(r == 0); - ASSERT(seen_timer_handle == 1); + ASSERT_OK(r); + ASSERT_EQ(1, seen_timer_handle); /* Loop is finished, walk_cb should not see our timer handle. */ seen_timer_handle = 0; uv_walk(loop, walk_cb, magic_cookie); - ASSERT(seen_timer_handle == 0); + ASSERT_OK(seen_timer_handle); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/test/test-watcher-cross-stop.c b/deps/uv/test/test-watcher-cross-stop.c index bbc0c30574a7f7..8f79abb7b03e4d 100644 --- a/deps/uv/test/test-watcher-cross-stop.c +++ b/deps/uv/test/test-watcher-cross-stop.c @@ -76,22 +76,22 @@ TEST_IMPL(watcher_cross_stop) { TEST_FILE_LIMIT(ARRAY_SIZE(sockets) + 32); - ASSERT(0 == uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); + ASSERT_OK(uv_ip4_addr("127.0.0.1", TEST_PORT, &addr)); memset(big_string, 'A', sizeof(big_string)); buf = uv_buf_init(big_string, sizeof(big_string)); for (i = 0; i < ARRAY_SIZE(sockets); i++) { - ASSERT(0 == uv_udp_init(loop, &sockets[i])); - ASSERT(0 == uv_udp_bind(&sockets[i], - (const struct sockaddr*) &addr, - UV_UDP_REUSEADDR)); - ASSERT(0 == uv_udp_recv_start(&sockets[i], alloc_cb, recv_cb)); - ASSERT(0 == uv_udp_send(&reqs[i], - &sockets[i], - &buf, - 1, - (const struct sockaddr*) &addr, - send_cb)); + ASSERT_OK(uv_udp_init(loop, &sockets[i])); + ASSERT_OK(uv_udp_bind(&sockets[i], + (const struct sockaddr*) &addr, + UV_UDP_REUSEADDR)); + ASSERT_OK(uv_udp_recv_start(&sockets[i], alloc_cb, recv_cb)); + ASSERT_OK(uv_udp_send(&reqs[i], + &sockets[i], + &buf, + 1, + (const struct sockaddr*) &addr, + send_cb)); } while (recv_cb_called == 0) @@ -100,12 +100,12 @@ TEST_IMPL(watcher_cross_stop) { for (i = 0; i < ARRAY_SIZE(sockets); i++) uv_close((uv_handle_t*) &sockets[i], close_cb); - ASSERT(recv_cb_called > 0); + ASSERT_GT(recv_cb_called, 0); uv_run(loop, UV_RUN_DEFAULT); - ASSERT(ARRAY_SIZE(sockets) == send_cb_called); - ASSERT(ARRAY_SIZE(sockets) == close_cb_called); + ASSERT_EQ(ARRAY_SIZE(sockets), send_cb_called); + ASSERT_EQ(ARRAY_SIZE(sockets), close_cb_called); MAKE_VALGRIND_HAPPY(loop); return 0; diff --git a/deps/uv/unofficial.gni b/deps/uv/unofficial.gni new file mode 100644 index 00000000000000..0789d2eaccb573 --- /dev/null +++ b/deps/uv/unofficial.gni @@ -0,0 +1,111 @@ +# Copyright (c) 2013-2019 GitHub Inc. +# Copyright 2019 the V8 project authors. All rights reserved. +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("uv_gn_build") { + config("uv_external_config") { + include_dirs = [ "include" ] + } + + config("uv_internal_config") { + include_dirs = [ + "include", + "src", + ] + + defines = [ "BUILDING_UV_SHARED" ] # always export symbols + if (is_posix) { + defines += [ + "_LARGEFILE_SOURCE", + "_FILE_OFFSET_BITS=64", + ] + } + if (is_linux) { + defines += [ + "_POSIX_C_SOURCE=200112", + "_GNU_SOURCE", + ] + } + if (is_apple) { + defines += [ + "_DARWIN_USE_64_BIT_INODE=1", + "_DARWIN_UNLIMITED_SELECT=1", + ] + } + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-deprecated-declarations", + "-Wno-extra-semi", + "-Wno-implicit-fallthrough", + "-Wno-missing-braces", + "-Wno-string-conversion", + "-Wno-shadow", + "-Wno-unreachable-code", + "-Wno-unreachable-code-return", + "-Wno-unused-but-set-parameter", + "-Wno-unused-but-set-variable", + "-Wno-unused-function", + "-Wno-unused-result", + "-Wno-unused-variable", + ] + } + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("uv.gyp") ], + "scope", + [ "uv.gyp" ]) + + component(target_name) { + forward_variables_from(invoker, "*") + + configs += [ ":uv_internal_config" ] + public_configs = [ ":uv_external_config" ] + + if (is_win) { + libs = [ + "advapi32.lib", + "iphlpapi.lib", + "psapi.lib", + "shell32.lib", + "user32.lib", + "userenv.lib", + "ws2_32.lib", + ] + } + if (is_posix) { + libs = [ "m" ] + ldflags = [ "-pthread" ] + } + if (is_linux) { + libs += [ + "dl", + "rt", + ] + } + + sources = gypi_values.uv_sources_common + if (is_win) { + sources += gypi_values.uv_sources_win + } + if (is_posix) { + sources += gypi_values.uv_sources_posix + + [ "src/unix/proctitle.c" ] + } + if (is_linux) { + sources += gypi_values.uv_sources_linux + } + if (is_apple) { + sources += gypi_values.uv_sources_apple + + gypi_values.uv_sources_bsd_common + } + } +} diff --git a/deps/uvwasi/BUILD.gn b/deps/uvwasi/BUILD.gn new file mode 100644 index 00000000000000..4f8fb081df805a --- /dev/null +++ b/deps/uvwasi/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +uvwasi_gn_build("uvwasi") { +} diff --git a/deps/uvwasi/unofficial.gni b/deps/uvwasi/unofficial.gni new file mode 100644 index 00000000000000..17f4c8e6eed0b3 --- /dev/null +++ b/deps/uvwasi/unofficial.gni @@ -0,0 +1,38 @@ +# Copyright (c) 2013-2019 GitHub Inc. +# Copyright 2019 the V8 project authors. All rights reserved. +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please edit the gyp files if you are making changes to build system. + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("uvwasi_gn_build") { + config("uvwasi_config") { + include_dirs = [ "include" ] + } + + gypi_values = exec_script("../../tools/gypi_to_gn.py", + [ rebase_path("uvwasi.gyp") ], + "scope", + [ "uvwasi.gyp" ]) + + source_set(target_name) { + forward_variables_from(invoker, "*") + + public_configs = [ ":uvwasi_config" ] + sources = gypi_values.uvwasi_sources + include_dirs = [ "src" ] + deps = [ "../uv" ] + + if (is_clang || !is_win) { + cflags_c = [ + "-Wno-extra-semi", + "-Wno-shadow", + ] + } + } +} diff --git a/deps/v8/BUILD.gn b/deps/v8/BUILD.gn index dd97c4f922c81a..7e1e4b833d9c3c 100644 --- a/deps/v8/BUILD.gn +++ b/deps/v8/BUILD.gn @@ -500,6 +500,7 @@ if (v8_enable_short_builtin_calls == "") { if (v8_enable_external_code_space == "") { v8_enable_external_code_space = v8_enable_pointer_compression && + v8_enable_pointer_compression_shared_cage && (v8_current_cpu == "x64" || v8_current_cpu == "arm64") } if (v8_enable_maglev == "") { @@ -683,6 +684,12 @@ assert( !v8_enable_pointer_compression_shared_cage || v8_enable_pointer_compression, "Can't share a pointer compression cage if pointers aren't compressed") +assert( + !v8_enable_pointer_compression || + v8_enable_pointer_compression_shared_cage || + !v8_enable_external_code_space, + "Multi-cage pointer compression mode is not compatible with external code space") + assert( !v8_enable_pointer_compression_shared_cage || v8_current_cpu == "x64" || v8_current_cpu == "arm64" || v8_current_cpu == "riscv64" || diff --git a/deps/v8/src/api/api.cc b/deps/v8/src/api/api.cc index ddf93efc1bd8da..2708ad9b2e55c7 100644 --- a/deps/v8/src/api/api.cc +++ b/deps/v8/src/api/api.cc @@ -9227,6 +9227,14 @@ void Isolate::TerminateExecution() { bool Isolate::IsExecutionTerminating() { i::Isolate* i_isolate = reinterpret_cast(this); +#ifdef DEBUG + // This method might be called on a thread that's not bound to any Isolate + // and thus pointer compression schemes might have cage base value unset. + // Read-only roots accessors contain type DCHECKs which require access to + // V8 heap in order to check the object type. So, allow heap access here + // to let the checks work. + i::PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); +#endif // DEBUG return i_isolate->is_execution_terminating(); } @@ -9898,6 +9906,14 @@ void Isolate::LowMemoryNotification() { i::NestedTimedHistogramScope idle_notification_scope( i_isolate->counters()->gc_low_memory_notification()); TRACE_EVENT0("v8", "V8.GCLowMemoryNotification"); +#ifdef DEBUG + // This method might be called on a thread that's not bound to any Isolate + // and thus pointer compression schemes might have cage base value unset. + // Read-only roots accessors contain type DCHECKs which require access to + // V8 heap in order to check the object type. So, allow heap access here + // to let the checks work. + i::PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); +#endif // DEBUG i_isolate->heap()->CollectAllAvailableGarbage( i::GarbageCollectionReason::kLowMemoryNotification); } diff --git a/deps/v8/src/common/ptr-compr-inl.h b/deps/v8/src/common/ptr-compr-inl.h index abba4502a29c65..f3b3a280a52c2a 100644 --- a/deps/v8/src/common/ptr-compr-inl.h +++ b/deps/v8/src/common/ptr-compr-inl.h @@ -91,11 +91,16 @@ Address V8HeapCompressionScheme::DecompressTaggedSigned(Tagged_t raw_value) { template Address V8HeapCompressionScheme::DecompressTagged(TOnHeapAddress on_heap_addr, Tagged_t raw_value) { -#if defined(V8_COMPRESS_POINTERS_IN_SHARED_CAGE) +#ifdef V8_COMPRESS_POINTERS Address cage_base = base(); +#ifdef V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE + DCHECK_WITH_MSG(cage_base != kNullAddress, + "V8HeapCompressionScheme::base is not initialized for " + "current thread"); +#endif // V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE #else Address cage_base = GetPtrComprCageBaseAddress(on_heap_addr); -#endif +#endif // V8_COMPRESS_POINTERS Address result = cage_base + static_cast
    (raw_value); V8_ASSUME(static_cast(result) == raw_value); return result; @@ -191,11 +196,16 @@ Address ExternalCodeCompressionScheme::DecompressTaggedSigned( template Address ExternalCodeCompressionScheme::DecompressTagged( TOnHeapAddress on_heap_addr, Tagged_t raw_value) { -#if defined(V8_COMPRESS_POINTERS_IN_SHARED_CAGE) +#ifdef V8_COMPRESS_POINTERS Address cage_base = base(); +#ifdef V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE + DCHECK_WITH_MSG(cage_base != kNullAddress, + "ExternalCodeCompressionScheme::base is not initialized for " + "current thread"); +#endif // V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE #else Address cage_base = GetPtrComprCageBaseAddress(on_heap_addr); -#endif +#endif // V8_COMPRESS_POINTERS Address result = cage_base + static_cast
    (raw_value); V8_ASSUME(static_cast(result) == raw_value); return result; @@ -275,6 +285,19 @@ V8_INLINE PtrComprCageBase GetPtrComprCageBase(Tagged object) { return GetPtrComprCageBaseFromOnHeapAddress(object.ptr()); } +#ifdef V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE + +PtrComprCageAccessScope::PtrComprCageAccessScope(Isolate* isolate) + : cage_base_(V8HeapCompressionScheme::base()) { + V8HeapCompressionScheme::InitBase(isolate->cage_base()); +} + +PtrComprCageAccessScope::~PtrComprCageAccessScope() { + V8HeapCompressionScheme::InitBase(cage_base_); +} + +#endif // V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE + } // namespace internal } // namespace v8 diff --git a/deps/v8/src/common/ptr-compr.h b/deps/v8/src/common/ptr-compr.h index ca5f0e1f9b328d..c60e66eca500a7 100644 --- a/deps/v8/src/common/ptr-compr.h +++ b/deps/v8/src/common/ptr-compr.h @@ -55,8 +55,8 @@ class V8HeapCompressionScheme { private: // These non-inlined accessors to base_ field are used in component builds // where cross-component access to thread local variables is not allowed. - static Address base_non_inlined(); - static void set_base_non_inlined(Address base); + static V8_EXPORT_PRIVATE Address base_non_inlined(); + static V8_EXPORT_PRIVATE void set_base_non_inlined(Address base); #ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE static V8_EXPORT_PRIVATE uintptr_t base_ V8_CONSTINIT; @@ -156,6 +156,29 @@ static inline void WriteMaybeUnalignedValue(Address p, V value) { } } +// When multi-cage pointer compression mode is enabled this scope object +// saves current cage's base values and sets them according to given Isolate. +// For all other configurations this scope object is a no-op. +class PtrComprCageAccessScope final { + public: +#ifdef V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE + V8_INLINE explicit PtrComprCageAccessScope(Isolate* isolate); + V8_INLINE ~PtrComprCageAccessScope(); +#else + V8_INLINE explicit PtrComprCageAccessScope(Isolate* isolate) {} + V8_INLINE ~PtrComprCageAccessScope() {} +#endif + + private: +#ifdef V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE + const Address cage_base_; +#ifdef V8_EXTERNAL_CODE_SPACE +// In case this configuration is necessary the code cage base must be saved too. +#error Multi-cage pointer compression with external code space is not supported +#endif // V8_EXTERNAL_CODE_SPACE +#endif // V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE +}; + } // namespace v8::internal #endif // V8_COMMON_PTR_COMPR_H_ diff --git a/deps/v8/src/compiler/turboshaft/utils.h b/deps/v8/src/compiler/turboshaft/utils.h index 232c7a6dbd5b43..a028b23a490420 100644 --- a/deps/v8/src/compiler/turboshaft/utils.h +++ b/deps/v8/src/compiler/turboshaft/utils.h @@ -6,6 +6,7 @@ #define V8_COMPILER_TURBOSHAFT_UTILS_H_ #include +#include #include #include "src/base/logging.h" diff --git a/deps/v8/src/execution/isolate.cc b/deps/v8/src/execution/isolate.cc index cbe353e95f5584..9663fb8f65bbe1 100644 --- a/deps/v8/src/execution/isolate.cc +++ b/deps/v8/src/execution/isolate.cc @@ -3933,6 +3933,14 @@ Isolate::~Isolate() { void Isolate::InitializeThreadLocal() { thread_local_top()->Initialize(this); +#ifdef DEBUG + // This method might be called on a thread that's not bound to any Isolate + // and thus pointer compression schemes might have cage base value unset. + // Read-only roots accessors contain type DCHECKs which require access to + // V8 heap in order to check the object type. So, allow heap access here + // to let the checks work. + i::PtrComprCageAccessScope ptr_compr_cage_access_scope(this); +#endif // DEBUG clear_pending_exception(); clear_pending_message(); clear_scheduled_exception(); diff --git a/deps/v8/src/execution/v8threads.cc b/deps/v8/src/execution/v8threads.cc index be4f4a7f209e3e..9d4437c75e62cd 100644 --- a/deps/v8/src/execution/v8threads.cc +++ b/deps/v8/src/execution/v8threads.cc @@ -124,6 +124,10 @@ bool ThreadManager::RestoreThread() { InitThread(access); return false; } + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate_); + ThreadState* state = per_thread->thread_state(); char* from = state->data(); from = isolate_->handle_scope_implementer()->RestoreThread(from); @@ -274,6 +278,14 @@ void ThreadManager::EagerlyArchiveThread() { } void ThreadManager::FreeThreadResources() { +#ifdef DEBUG + // This method might be called on a thread that's not bound to any Isolate + // and thus pointer compression schemes might have cage base value unset. + // Read-only roots accessors contain type DCHECKs which require access to + // V8 heap in order to check the object type. So, allow heap access here + // to let the checks work. + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate_); +#endif // DEBUG DCHECK(!isolate_->has_pending_exception()); DCHECK(!isolate_->external_caught_exception()); DCHECK_NULL(isolate_->try_catch_handler()); diff --git a/deps/v8/src/flags/flag-definitions.h b/deps/v8/src/flags/flag-definitions.h index 6acb97299e0026..fb1e6b325a9a88 100644 --- a/deps/v8/src/flags/flag-definitions.h +++ b/deps/v8/src/flags/flag-definitions.h @@ -298,7 +298,6 @@ DEFINE_WEAK_IMPLICATION(harmony_rab_gsab_transfer, harmony_rab_gsab) #define HARMONY_SHIPPING_BASE(V) \ V(harmony_import_assertions, "harmony import assertions") \ V(harmony_change_array_by_copy, "harmony change-Array-by-copy") \ - V(harmony_string_is_well_formed, "harmony String#{is,to}WellFormed") \ V(harmony_rab_gsab, \ "harmony ResizableArrayBuffer / GrowableSharedArrayBuffer") \ V(harmony_regexp_unicode_sets, "harmony RegExp Unicode Sets") \ diff --git a/deps/v8/src/heap/collection-barrier.cc b/deps/v8/src/heap/collection-barrier.cc index 1bc9a972fab5a3..9cafa96eaaaac2 100644 --- a/deps/v8/src/heap/collection-barrier.cc +++ b/deps/v8/src/heap/collection-barrier.cc @@ -51,7 +51,12 @@ class BackgroundCollectionInterruptTask : public CancelableTask { private: // v8::internal::CancelableTask overrides. - void RunInternal() override { heap_->CheckCollectionRequested(); } + void RunInternal() override { + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope(heap_->isolate()); + heap_->CheckCollectionRequested(); + } Heap* heap_; }; diff --git a/deps/v8/src/heap/concurrent-marking.cc b/deps/v8/src/heap/concurrent-marking.cc index 14cf52df6e9b8a..37ab77f0747ee7 100644 --- a/deps/v8/src/heap/concurrent-marking.cc +++ b/deps/v8/src/heap/concurrent-marking.cc @@ -153,6 +153,11 @@ class ConcurrentMarking::JobTaskMajor : public v8::JobTask { // v8::JobTask overrides. void Run(JobDelegate* delegate) override { + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope( + concurrent_marking_->heap_->isolate()); + if (delegate->IsJoiningThread()) { // TRACE_GC is not needed here because the caller opens the right scope. concurrent_marking_->RunMajor(delegate, code_flush_mode_, @@ -197,6 +202,11 @@ class ConcurrentMarking::JobTaskMinor : public v8::JobTask { // v8::JobTask overrides. void Run(JobDelegate* delegate) override { + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope( + concurrent_marking_->heap_->isolate()); + if (delegate->IsJoiningThread()) { TRACE_GC_WITH_FLOW(concurrent_marking_->heap_->tracer(), GCTracer::Scope::MINOR_MS_MARK_PARALLEL, trace_id_, diff --git a/deps/v8/src/heap/incremental-marking-job.cc b/deps/v8/src/heap/incremental-marking-job.cc index 0b0b5de2013b54..03be503d3ba92f 100644 --- a/deps/v8/src/heap/incremental-marking-job.cc +++ b/deps/v8/src/heap/incremental-marking-job.cc @@ -91,6 +91,9 @@ void IncrementalMarkingJob::Task::RunInternal() { VMState state(isolate()); TRACE_EVENT_CALL_STATS_SCOPED(isolate(), "v8", "V8.IncrementalMarkingJob.Task"); + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate()); isolate()->stack_guard()->ClearStartIncrementalMarking(); diff --git a/deps/v8/src/heap/local-heap.cc b/deps/v8/src/heap/local-heap.cc index 426466a48caa33..12f1dfe8c70be8 100644 --- a/deps/v8/src/heap/local-heap.cc +++ b/deps/v8/src/heap/local-heap.cc @@ -48,6 +48,7 @@ void LocalHeap::VerifyCurrent() const { LocalHeap::LocalHeap(Heap* heap, ThreadKind kind, std::unique_ptr persistent_handles) : heap_(heap), + ptr_compr_cage_access_scope_(heap->isolate()), is_main_thread_(kind == ThreadKind::kMain), state_(ThreadState::Parked()), allocation_failed_(false), diff --git a/deps/v8/src/heap/local-heap.h b/deps/v8/src/heap/local-heap.h index 1062f87b928c6c..9868c1ca29b0c0 100644 --- a/deps/v8/src/heap/local-heap.h +++ b/deps/v8/src/heap/local-heap.h @@ -13,6 +13,7 @@ #include "src/base/platform/condition-variable.h" #include "src/base/platform/mutex.h" #include "src/common/assert-scope.h" +#include "src/common/ptr-compr.h" #include "src/execution/isolate.h" #include "src/handles/global-handles.h" #include "src/handles/persistent-handles.h" @@ -348,6 +349,7 @@ class V8_EXPORT_PRIVATE LocalHeap { void SetUpSharedMarking(); Heap* heap_; + V8_NO_UNIQUE_ADDRESS PtrComprCageAccessScope ptr_compr_cage_access_scope_; bool is_main_thread_; AtomicThreadState state_; diff --git a/deps/v8/src/heap/mark-compact.cc b/deps/v8/src/heap/mark-compact.cc index 189e023cc147f2..20e381ae768d7c 100644 --- a/deps/v8/src/heap/mark-compact.cc +++ b/deps/v8/src/heap/mark-compact.cc @@ -2522,6 +2522,10 @@ class ClearStringTableJobItem final : public ParallelClearingJob::ClearingItem { GCTracer::Scope::MC_CLEAR_STRING_TABLE)) {} void Run(JobDelegate* delegate) final { + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate_); + if (isolate_->OwnsStringTables()) { TRACE_GC1_WITH_FLOW(isolate_->heap()->tracer(), GCTracer::Scope::MC_CLEAR_STRING_TABLE, @@ -4135,6 +4139,11 @@ class PageEvacuationJob : public v8::JobTask { tracer_->CurrentEpoch(GCTracer::Scope::MC_EVACUATE)) {} void Run(JobDelegate* delegate) override { + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope( + collector_->heap()->isolate()); + Evacuator* evacuator = (*evacuators_)[delegate->GetTaskId()].get(); if (delegate->IsJoiningThread()) { TRACE_GC_WITH_FLOW(tracer_, GCTracer::Scope::MC_EVACUATE_COPY_PARALLEL, @@ -4471,6 +4480,11 @@ class PointersUpdatingJob : public v8::JobTask { tracer_->CurrentEpoch(GCTracer::Scope::MC_EVACUATE)) {} void Run(JobDelegate* delegate) override { + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope( + collector_->heap()->isolate()); + if (delegate->IsJoiningThread()) { TRACE_GC_WITH_FLOW(tracer_, GCTracer::Scope::MC_EVACUATE_UPDATE_POINTERS_PARALLEL, diff --git a/deps/v8/src/heap/mark-compact.h b/deps/v8/src/heap/mark-compact.h index ceeb596edac85e..a8a56db74b7442 100644 --- a/deps/v8/src/heap/mark-compact.h +++ b/deps/v8/src/heap/mark-compact.h @@ -161,6 +161,8 @@ class MarkCompactCollector final { return use_background_threads_in_cycle_; } + Heap* heap() { return heap_; } + explicit MarkCompactCollector(Heap* heap); ~MarkCompactCollector(); diff --git a/deps/v8/src/heap/scavenger.cc b/deps/v8/src/heap/scavenger.cc index 7760a6a540e1e5..cd2d9a49546fe3 100644 --- a/deps/v8/src/heap/scavenger.cc +++ b/deps/v8/src/heap/scavenger.cc @@ -200,6 +200,10 @@ ScavengerCollector::JobTask::JobTask( void ScavengerCollector::JobTask::Run(JobDelegate* delegate) { DCHECK_LT(delegate->GetTaskId(), scavengers_->size()); + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope(outer_->heap_->isolate()); + Scavenger* scavenger = (*scavengers_)[delegate->GetTaskId()].get(); if (delegate->IsJoiningThread()) { TRACE_GC_WITH_FLOW(outer_->heap_->tracer(), diff --git a/deps/v8/src/heap/sweeper.cc b/deps/v8/src/heap/sweeper.cc index c8649bfa21a9ec..7a712cf200aeed 100644 --- a/deps/v8/src/heap/sweeper.cc +++ b/deps/v8/src/heap/sweeper.cc @@ -144,6 +144,11 @@ class Sweeper::MajorSweeperJob final : public JobTask { private: void RunImpl(JobDelegate* delegate, bool is_joining_thread) { + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope( + sweeper_->heap_->isolate()); + DCHECK(sweeper_->major_sweeping_in_progress()); const int offset = delegate->GetTaskId(); DCHECK_LT(offset, concurrent_sweepers.size()); @@ -213,6 +218,11 @@ class Sweeper::MinorSweeperJob final : public JobTask { tracer_, sweeper_->GetTracingScope(NEW_SPACE, is_joining_thread), is_joining_thread ? ThreadKind::kMain : ThreadKind::kBackground, trace_id_, TRACE_EVENT_FLAG_FLOW_IN); + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope( + sweeper_->heap_->isolate()); + if (!concurrent_sweeper.ConcurrentSweepSpace(delegate)) return; concurrent_sweeper.ConcurrentSweepPromotedPages(delegate); } diff --git a/deps/v8/src/init/bootstrapper.cc b/deps/v8/src/init/bootstrapper.cc index 2beaf45b14089b..388ee3d576c88a 100644 --- a/deps/v8/src/init/bootstrapper.cc +++ b/deps/v8/src/init/bootstrapper.cc @@ -2158,6 +2158,8 @@ void Genesis::InitializeGlobal(Handle global_object, Builtin::kStringPrototypeIncludes, 1, false); SimpleInstallFunction(isolate_, prototype, "indexOf", Builtin::kStringPrototypeIndexOf, 1, false); + SimpleInstallFunction(isolate(), prototype, "isWellFormed", + Builtin::kStringPrototypeIsWellFormed, 0, false); SimpleInstallFunction(isolate_, prototype, "italics", Builtin::kStringPrototypeItalics, 0, false); SimpleInstallFunction(isolate_, prototype, "lastIndexOf", @@ -2214,6 +2216,8 @@ void Genesis::InitializeGlobal(Handle global_object, Builtin::kStringPrototypeStartsWith, 1, false); SimpleInstallFunction(isolate_, prototype, "toString", Builtin::kStringPrototypeToString, 0, true); + SimpleInstallFunction(isolate(), prototype, "toWellFormed", + Builtin::kStringPrototypeToWellFormed, 0, false); SimpleInstallFunction(isolate_, prototype, "trim", Builtin::kStringPrototypeTrim, 0, false); @@ -5062,18 +5066,6 @@ void Genesis::InitializeGlobal_harmony_rab_gsab() { Builtin::kSharedArrayBufferPrototypeGrow, 1, true); } -void Genesis::InitializeGlobal_harmony_string_is_well_formed() { - if (!v8_flags.harmony_string_is_well_formed) return; - Handle string_function(native_context()->string_function(), - isolate()); - Handle string_prototype( - JSObject::cast(string_function->initial_map()->prototype()), isolate()); - SimpleInstallFunction(isolate(), string_prototype, "isWellFormed", - Builtin::kStringPrototypeIsWellFormed, 0, false); - SimpleInstallFunction(isolate(), string_prototype, "toWellFormed", - Builtin::kStringPrototypeToWellFormed, 0, false); -} - void Genesis::InitializeGlobal_harmony_temporal() { if (!v8_flags.harmony_temporal) return; // -- T e m p o r a l diff --git a/deps/v8/src/wasm/c-api.cc b/deps/v8/src/wasm/c-api.cc index 333708e85d0e45..0f259ee1ca4c45 100644 --- a/deps/v8/src/wasm/c-api.cc +++ b/deps/v8/src/wasm/c-api.cc @@ -59,6 +59,17 @@ namespace wasm { namespace { +// Multi-cage pointer compression mode related note. +// Wasm C-Api is allowed to be used from a thread that's not bound to any +// Isolate. As a result, in a multi-cage pointer compression mode it's not +// guaranteed that current pointer compression cage base value is initialized +// for current thread (see V8HeapCompressionScheme::base_) which makes it +// impossible to read compressed pointers from V8 heap objects. +// This scope ensures that the pointer compression base value is set according +// to respective Wasm C-Api object. +// For all other configurations this scope is a no-op. +using PtrComprCageAccessScope = i::PtrComprCageAccessScope; + auto ReadLebU64(const byte_t** pos) -> uint64_t { uint64_t n = 0; uint64_t shift = 0; @@ -414,12 +425,16 @@ void CheckAndHandleInterrupts(i::Isolate* isolate) { // Stores StoreImpl::~StoreImpl() { + { #ifdef DEBUG - reinterpret_cast(isolate_)->heap()->PreciseCollectAllGarbage( - i::GCFlag::kForced, i::GarbageCollectionReason::kTesting, - v8::kNoGCCallbackFlags); + i::Isolate* i_isolate = reinterpret_cast(isolate_); + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); + i_isolate->heap()->PreciseCollectAllGarbage( + i::GCFlag::kForced, i::GarbageCollectionReason::kTesting, + v8::kNoGCCallbackFlags); #endif - context()->Exit(); + context()->Exit(); + } isolate_->Dispose(); delete create_params_.array_buffer_allocator; } @@ -451,6 +466,7 @@ void StoreImpl::SetHostInfo(i::Handle object, void* info, } void* StoreImpl::GetHostInfo(i::Handle key) { + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate()); i::Tagged raw = i::EphemeronHashTable::cast(host_info_map_->table())->Lookup(key); if (IsTheHole(raw, i_isolate())) return nullptr; @@ -909,7 +925,12 @@ class RefImpl { i::Isolate* isolate() const { return val_->GetIsolate(); } - i::Handle v8_object() const { return i::Handle::cast(val_); } + i::Handle v8_object() const { +#ifdef DEBUG + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate()); +#endif // DEBUG + return i::Handle::cast(val_); + } void* get_host_info() const { return store()->GetHostInfo(v8_object()); } @@ -1024,7 +1045,7 @@ auto Trap::make(Store* store_abs, const Message& message) -> own { auto Trap::message() const -> Message { auto isolate = impl(this)->isolate(); - v8::Isolate::Scope isolate_scope(impl(this)->store()->isolate()); + v8::Isolate::Scope isolate_scope(reinterpret_cast(isolate)); i::HandleScope handle_scope(isolate); i::Handle message = @@ -1044,6 +1065,7 @@ own GetInstance(StoreImpl* store, own CreateFrameFromInternal(i::Handle frames, int index, i::Isolate* isolate, StoreImpl* store) { + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate); i::Handle frame(i::CallSiteInfo::cast(frames->get(index)), isolate); i::Handle instance(frame->GetWasmInstance(), isolate); @@ -1059,6 +1081,7 @@ own CreateFrameFromInternal(i::Handle frames, int index, own Trap::origin() const { i::Isolate* isolate = impl(this)->isolate(); + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); i::HandleScope handle_scope(isolate); i::Handle frames = @@ -1071,6 +1094,7 @@ own Trap::origin() const { ownvec Trap::trace() const { i::Isolate* isolate = impl(this)->isolate(); + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate); i::HandleScope handle_scope(isolate); i::Handle frames = @@ -1122,6 +1146,7 @@ auto Module::validate(Store* store_abs, const vec& binary) -> bool { i::wasm::ModuleWireBytes bytes( {reinterpret_cast(binary.get()), binary.size()}); i::Isolate* isolate = impl(store_abs)->i_isolate(); + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate); i::HandleScope scope(isolate); i::wasm::WasmFeatures features = i::wasm::WasmFeatures::FromIsolate(isolate); return i::wasm::GetWasmEngine()->SyncValidate(isolate, features, bytes); @@ -1185,6 +1210,7 @@ ownvec ExportsImpl(i::Handle module_obj) { } auto Module::exports() const -> ownvec { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); return ExportsImpl(impl(this)->v8_object()); } @@ -1192,6 +1218,7 @@ auto Module::exports() const -> ownvec { // If no TurboFan code existed before calling this function, then the call to // {serialize} may take a long time. auto Module::serialize() const -> vec { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); i::wasm::NativeModule* native_module = impl(this)->v8_object()->native_module(); native_module->compilation_state()->TierUpAllFunctions(); @@ -1291,6 +1318,7 @@ Extern::~Extern() = default; auto Extern::copy() const -> own { return impl(this)->copy(); } auto Extern::kind() const -> ExternKind { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); i::Handle obj = impl(this)->v8_object(); if (i::WasmExportedFunction::IsWasmExportedFunction(*obj)) { return wasm::EXTERN_FUNC; @@ -1469,6 +1497,7 @@ auto Func::make(Store* store, const FuncType* type, callback_with_env callback, } auto Func::type() const -> own { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); i::Handle func = impl(this)->v8_object(); if (i::WasmCapiFunction::IsWasmCapiFunction(*func)) { return SignatureHelper::Deserialize(SignatureHelper::GetSig(func)); @@ -1483,6 +1512,7 @@ auto Func::type() const -> own { } auto Func::param_arity() const -> size_t { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); i::Handle func = impl(this)->v8_object(); if (i::WasmCapiFunction::IsWasmCapiFunction(*func)) { return i::wasm::SerializedSignatureHelper::ParamCount( @@ -1497,6 +1527,7 @@ auto Func::param_arity() const -> size_t { } auto Func::result_arity() const -> size_t { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); i::Handle func = impl(this)->v8_object(); if (i::WasmCapiFunction::IsWasmCapiFunction(*func)) { return i::wasm::SerializedSignatureHelper::ReturnCount( @@ -1853,6 +1884,7 @@ auto Global::type() const -> own { } auto Global::get() const -> Val { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); i::Handle v8_global = impl(this)->v8_object(); switch (v8_global->type().kind()) { case i::wasm::kI32: @@ -2008,7 +2040,8 @@ auto Table::type() const -> own { auto Table::get(size_t index) const -> own { i::Handle table = impl(this)->v8_object(); if (index >= static_cast(table->current_length())) return own(); - i::Isolate* isolate = table->GetIsolate(); + i::Isolate* isolate = impl(this)->isolate(); + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate); i::HandleScope handle_scope(isolate); i::Handle result = i::WasmTableObject::Get(isolate, table, static_cast(index)); @@ -2026,8 +2059,8 @@ auto Table::get(size_t index) const -> own { auto Table::set(size_t index, const Ref* ref) -> bool { i::Handle table = impl(this)->v8_object(); if (index >= static_cast(table->current_length())) return false; - i::Isolate* isolate = table->GetIsolate(); - v8::Isolate::Scope isolate_scope(impl(this)->store()->isolate()); + i::Isolate* isolate = impl(this)->isolate(); + v8::Isolate::Scope isolate_scope(reinterpret_cast(isolate)); i::HandleScope handle_scope(isolate); i::Handle obj = WasmRefToV8(isolate, ref); const char* error_message; @@ -2042,13 +2075,14 @@ auto Table::set(size_t index, const Ref* ref) -> bool { // TODO(jkummerow): Having Table::size_t shadowing "std" size_t is ugly. auto Table::size() const -> size_t { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); return impl(this)->v8_object()->current_length(); } auto Table::grow(size_t delta, const Ref* ref) -> bool { i::Handle table = impl(this)->v8_object(); - i::Isolate* isolate = table->GetIsolate(); - v8::Isolate::Scope isolate_scope(impl(this)->store()->isolate()); + i::Isolate* isolate = impl(this)->isolate(); + v8::Isolate::Scope isolate_scope(reinterpret_cast(isolate)); i::HandleScope scope(isolate); i::Handle obj = WasmRefToV8(isolate, ref); const char* error_message; @@ -2101,6 +2135,7 @@ auto Memory::make(Store* store_abs, const MemoryType* type) -> own { } auto Memory::type() const -> own { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); i::Handle memory = impl(this)->v8_object(); uint32_t min = static_cast(memory->array_buffer()->byte_length() / i::wasm::kWasmPageSize); @@ -2110,15 +2145,18 @@ auto Memory::type() const -> own { } auto Memory::data() const -> byte_t* { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); return reinterpret_cast( impl(this)->v8_object()->array_buffer()->backing_store()); } auto Memory::data_size() const -> size_t { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); return impl(this)->v8_object()->array_buffer()->byte_length(); } auto Memory::size() const -> pages_t { + PtrComprCageAccessScope ptr_compr_cage_access_scope(impl(this)->isolate()); return static_cast( impl(this)->v8_object()->array_buffer()->byte_length() / i::wasm::kWasmPageSize); @@ -2126,8 +2164,8 @@ auto Memory::size() const -> pages_t { auto Memory::grow(pages_t delta) -> bool { i::Handle memory = impl(this)->v8_object(); - i::Isolate* isolate = memory->GetIsolate(); - v8::Isolate::Scope isolate_scope(impl(this)->store()->isolate()); + i::Isolate* isolate = impl(this)->isolate(); + v8::Isolate::Scope isolate_scope(reinterpret_cast(isolate)); i::HandleScope handle_scope(isolate); int32_t old = i::WasmMemoryObject::Grow(isolate, memory, delta); return old != -1; diff --git a/deps/v8/src/wasm/module-compiler.cc b/deps/v8/src/wasm/module-compiler.cc index f6ac958579af5b..bbb29f7f47b299 100644 --- a/deps/v8/src/wasm/module-compiler.cc +++ b/deps/v8/src/wasm/module-compiler.cc @@ -1983,6 +1983,9 @@ class AsyncCompileJSToWasmWrapperJob final } TRACE_EVENT0("v8.wasm", "wasm.JSToWasmWrapperCompilation"); + // In case multi-cage pointer compression mode is enabled ensure that + // current thread's cage base values are properly initialized. + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate); while (true) { DCHECK_EQ(isolate, wrapper_unit->isolate()); wrapper_unit->Execute(); diff --git a/deps/v8/test/cctest/heap/test-concurrent-allocation.cc b/deps/v8/test/cctest/heap/test-concurrent-allocation.cc index c46814e15ca465..12143306d24ab7 100644 --- a/deps/v8/test/cctest/heap/test-concurrent-allocation.cc +++ b/deps/v8/test/cctest/heap/test-concurrent-allocation.cc @@ -133,8 +133,10 @@ UNINITIALIZED_TEST(ConcurrentAllocationInOldSpaceFromMainThread) { v8::Isolate* isolate = v8::Isolate::New(create_params); Isolate* i_isolate = reinterpret_cast(isolate); - AllocateSomeObjects(i_isolate->main_thread_local_heap()); - + { + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); + AllocateSomeObjects(i_isolate->main_thread_local_heap()); + } isolate->Dispose(); } @@ -383,36 +385,38 @@ UNINITIALIZED_TEST(ConcurrentBlackAllocation) { v8::Isolate* isolate = v8::Isolate::New(create_params); Isolate* i_isolate = reinterpret_cast(isolate); Heap* heap = i_isolate->heap(); + { + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); - std::vector
    objects; + std::vector
    objects; - base::Semaphore sema_white(0); - base::Semaphore sema_marking_started(0); + base::Semaphore sema_white(0); + base::Semaphore sema_marking_started(0); - auto thread = std::make_unique( - heap, &objects, &sema_white, &sema_marking_started); - CHECK(thread->Start()); + auto thread = std::make_unique( + heap, &objects, &sema_white, &sema_marking_started); + CHECK(thread->Start()); - sema_white.Wait(); - heap->StartIncrementalMarking(i::GCFlag::kNoFlags, - i::GarbageCollectionReason::kTesting); - sema_marking_started.Signal(); + sema_white.Wait(); + heap->StartIncrementalMarking(i::GCFlag::kNoFlags, + i::GarbageCollectionReason::kTesting); + sema_marking_started.Signal(); - thread->Join(); + thread->Join(); - const int kObjectsAllocatedPerIteration = 2; + const int kObjectsAllocatedPerIteration = 2; - for (int i = 0; i < kNumIterations * kObjectsAllocatedPerIteration; i++) { - Address address = objects[i]; - Tagged object = HeapObject::FromAddress(address); + for (int i = 0; i < kNumIterations * kObjectsAllocatedPerIteration; i++) { + Address address = objects[i]; + Tagged object = HeapObject::FromAddress(address); - if (i < kWhiteIterations * kObjectsAllocatedPerIteration) { - CHECK(heap->marking_state()->IsUnmarked(object)); - } else { - CHECK(heap->marking_state()->IsMarked(object)); + if (i < kWhiteIterations * kObjectsAllocatedPerIteration) { + CHECK(heap->marking_state()->IsUnmarked(object)); + } else { + CHECK(heap->marking_state()->IsMarked(object)); + } } } - isolate->Dispose(); } @@ -449,34 +453,35 @@ UNINITIALIZED_TEST(ConcurrentWriteBarrier) { v8::Isolate* isolate = v8::Isolate::New(create_params); Isolate* i_isolate = reinterpret_cast(isolate); Heap* heap = i_isolate->heap(); - - Tagged fixed_array; - Tagged value; { - HandleScope handle_scope(i_isolate); - Handle fixed_array_handle( - i_isolate->factory()->NewFixedArray(1)); - Handle value_handle( - i_isolate->factory()->NewHeapNumber(1.1)); - fixed_array = *fixed_array_handle; - value = *value_handle; - } - heap->StartIncrementalMarking(i::GCFlag::kNoFlags, - i::GarbageCollectionReason::kTesting); - CHECK(heap->marking_state()->IsUnmarked(value)); - - // Mark host |fixed_array| to trigger the barrier. - heap->marking_state()->TryMarkAndAccountLiveBytes(fixed_array); + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); + Tagged fixed_array; + Tagged value; + { + HandleScope handle_scope(i_isolate); + Handle fixed_array_handle( + i_isolate->factory()->NewFixedArray(1)); + Handle value_handle( + i_isolate->factory()->NewHeapNumber(1.1)); + fixed_array = *fixed_array_handle; + value = *value_handle; + } + heap->StartIncrementalMarking(i::GCFlag::kNoFlags, + i::GarbageCollectionReason::kTesting); + CHECK(heap->marking_state()->IsUnmarked(value)); - auto thread = - std::make_unique(heap, fixed_array, value); - CHECK(thread->Start()); + // Mark host |fixed_array| to trigger the barrier. + heap->marking_state()->TryMarkAndAccountLiveBytes(fixed_array); - thread->Join(); + auto thread = std::make_unique( + heap, fixed_array, value); + CHECK(thread->Start()); - CHECK(heap->marking_state()->IsMarked(value)); - heap::InvokeMajorGC(heap); + thread->Join(); + CHECK(heap->marking_state()->IsMarked(value)); + heap::InvokeMajorGC(heap); + } isolate->Dispose(); } @@ -525,6 +530,7 @@ UNINITIALIZED_TEST(ConcurrentRecordRelocSlot) { Isolate* i_isolate = reinterpret_cast(isolate); Heap* heap = i_isolate->heap(); { + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); Tagged code; Tagged value; { diff --git a/deps/v8/test/cctest/heap/test-heap.cc b/deps/v8/test/cctest/heap/test-heap.cc index bcf0106da2c1a7..edbfb112d26d5e 100644 --- a/deps/v8/test/cctest/heap/test-heap.cc +++ b/deps/v8/test/cctest/heap/test-heap.cc @@ -1301,6 +1301,7 @@ UNINITIALIZED_TEST(Regress10843) { &callback_was_invoked); { + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); HandleScope scope(i_isolate); std::vector> arrays; for (int i = 0; i < 140; i++) { @@ -6504,6 +6505,7 @@ UNINITIALIZED_TEST(OutOfMemory) { oom_isolate = i_isolate; isolate->SetOOMErrorHandler(OOMCallback); { + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); Factory* factory = i_isolate->factory(); HandleScope handle_scope(i_isolate); while (true) { @@ -6530,8 +6532,10 @@ UNINITIALIZED_TEST(OutOfMemoryIneffectiveGC) { isolate->SetOOMErrorHandler(OOMCallback); Factory* factory = i_isolate->factory(); Heap* heap = i_isolate->heap(); - heap::InvokeMajorGC(heap); { + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); + heap::InvokeMajorGC(heap); + HandleScope scope(i_isolate); while (heap->OldGenerationSizeOfObjects() < heap->MaxOldGenerationSize() * 0.9) { @@ -6685,6 +6689,8 @@ UNINITIALIZED_TEST(OutOfMemorySmallObjects) { state.oom_triggered = false; heap->AddNearHeapLimitCallback(NearHeapLimitCallback, &state); { + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate); + HandleScope handle_scope(isolate); while (!state.oom_triggered) { factory->NewFixedArray(100); @@ -6718,26 +6724,29 @@ UNINITIALIZED_TEST(OutOfMemoryLargeObjects) { state.heap = heap; state.oom_triggered = false; heap->AddNearHeapLimitCallback(NearHeapLimitCallback, &state); - const int kFixedArrayLength = 1000000; { - HandleScope handle_scope(isolate); - while (!state.oom_triggered) { - factory->NewFixedArray(kFixedArrayLength); + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate); + const int kFixedArrayLength = 1000000; + { + HandleScope handle_scope(isolate); + while (!state.oom_triggered) { + factory->NewFixedArray(kFixedArrayLength); + } } + CHECK_LE(state.old_generation_capacity_at_oom, + kOldGenerationLimit + state.new_space_capacity_at_oom + + state.new_lo_space_size_at_oom + + FixedArray::SizeFor(kFixedArrayLength)); + CHECK_LE(kOldGenerationLimit, state.old_generation_capacity_at_oom + + state.new_space_capacity_at_oom + + state.new_lo_space_size_at_oom + + FixedArray::SizeFor(kFixedArrayLength)); + CHECK_LE(state.memory_allocator_size_at_oom, + MemoryAllocatorSizeFromHeapCapacity( + state.old_generation_capacity_at_oom + + 2 * state.new_space_capacity_at_oom + + state.new_lo_space_size_at_oom)); } - CHECK_LE(state.old_generation_capacity_at_oom, - kOldGenerationLimit + state.new_space_capacity_at_oom + - state.new_lo_space_size_at_oom + - FixedArray::SizeFor(kFixedArrayLength)); - CHECK_LE(kOldGenerationLimit, state.old_generation_capacity_at_oom + - state.new_space_capacity_at_oom + - state.new_lo_space_size_at_oom + - FixedArray::SizeFor(kFixedArrayLength)); - CHECK_LE( - state.memory_allocator_size_at_oom, - MemoryAllocatorSizeFromHeapCapacity(state.old_generation_capacity_at_oom + - 2 * state.new_space_capacity_at_oom + - state.new_lo_space_size_at_oom)); reinterpret_cast(isolate)->Dispose(); } @@ -6757,6 +6766,7 @@ UNINITIALIZED_TEST(RestoreHeapLimit) { Factory* factory = isolate->factory(); { + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate); DisableConservativeStackScanningScopeForTesting no_stack_scanning(heap); OutOfMemoryState state; @@ -7060,8 +7070,9 @@ UNINITIALIZED_HEAP_TEST(CodeLargeObjectSpace64k) { v8::Isolate::CreateParams create_params; create_params.array_buffer_allocator = CcTest::array_buffer_allocator(); v8::Isolate* isolate = v8::Isolate::New(create_params); - - Heap* heap = reinterpret_cast(isolate)->heap(); + i::Isolate* i_isolate = reinterpret_cast(isolate); + Heap* heap = i_isolate->heap(); + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); // Allocate a regular code object. { diff --git a/deps/v8/test/cctest/test-debug-helper.cc b/deps/v8/test/cctest/test-debug-helper.cc index 809a6b9ba6fbe8..4d986c87b8e432 100644 --- a/deps/v8/test/cctest/test-debug-helper.cc +++ b/deps/v8/test/cctest/test-debug-helper.cc @@ -126,6 +126,7 @@ TEST(GetObjectProperties) { CcTest::InitializeVM(); v8::Isolate* isolate = CcTest::isolate(); i::Isolate* i_isolate = reinterpret_cast(isolate); + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); v8::HandleScope scope(isolate); LocalContext context; // Claim we don't know anything about the heap layout. @@ -470,6 +471,8 @@ static void FrameIterationCheck( THREADED_TEST(GetFrameStack) { LocalContext env; v8::Isolate* isolate = env->GetIsolate(); + i::Isolate* i_isolate = reinterpret_cast(isolate); + PtrComprCageAccessScope ptr_compr_cage_access_scope(i_isolate); v8::HandleScope scope(isolate); v8::Local obj = v8::ObjectTemplate::New(isolate); obj->SetAccessor(v8_str("xxx"), FrameIterationCheck); @@ -490,6 +493,7 @@ TEST(SmallOrderedHashSetGetObjectProperties) { LocalContext context; Isolate* isolate = reinterpret_cast((*context)->GetIsolate()); Factory* factory = isolate->factory(); + PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate); HandleScope scope(isolate); Handle set = factory->NewSmallOrderedHashSet(); diff --git a/deps/v8/test/cctest/test-serialize.cc b/deps/v8/test/cctest/test-serialize.cc index 36f131630d6fd4..bf346454f16ab6 100644 --- a/deps/v8/test/cctest/test-serialize.cc +++ b/deps/v8/test/cctest/test-serialize.cc @@ -4262,10 +4262,10 @@ UNINITIALIZED_TEST(ReinitializeHashSeedJSCollectionRehashable) { create_params.snapshot_blob = &blob; v8::Isolate* isolate = v8::Isolate::New(create_params); { + v8::Isolate::Scope isolate_scope(isolate); // Check that rehashing has been performed. CHECK_EQ(static_cast(1337), HashSeed(reinterpret_cast(isolate))); - v8::Isolate::Scope isolate_scope(isolate); v8::HandleScope handle_scope(isolate); v8::Local context = v8::Context::New(isolate); CHECK(!context.IsEmpty()); @@ -4330,10 +4330,10 @@ UNINITIALIZED_TEST(ReinitializeHashSeedRehashable) { create_params.snapshot_blob = &blob; v8::Isolate* isolate = v8::Isolate::New(create_params); { + v8::Isolate::Scope isolate_scope(isolate); // Check that rehashing has been performed. CHECK_EQ(static_cast(1337), HashSeed(reinterpret_cast(isolate))); - v8::Isolate::Scope isolate_scope(isolate); v8::HandleScope handle_scope(isolate); v8::Local context = v8::Context::New(isolate); CHECK(!context.IsEmpty()); diff --git a/deps/v8/test/fuzzer/wasm-async.cc b/deps/v8/test/fuzzer/wasm-async.cc index 488047d1d7326c..63176aa4fb85af 100644 --- a/deps/v8/test/fuzzer/wasm-async.cc +++ b/deps/v8/test/fuzzer/wasm-async.cc @@ -54,12 +54,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { Isolate* i_isolate = reinterpret_cast(isolate); + v8::Isolate::Scope isolate_scope(isolate); + // Clear any pending exceptions from a prior run. if (i_isolate->has_pending_exception()) { i_isolate->clear_pending_exception(); } - v8::Isolate::Scope isolate_scope(isolate); v8::HandleScope handle_scope(isolate); v8::Context::Scope context_scope(support->GetContext()); diff --git a/deps/v8/test/fuzzer/wasm-fuzzer-common.cc b/deps/v8/test/fuzzer/wasm-fuzzer-common.cc index ff00334f87ac21..281da1edc8ba3e 100644 --- a/deps/v8/test/fuzzer/wasm-fuzzer-common.cc +++ b/deps/v8/test/fuzzer/wasm-fuzzer-common.cc @@ -811,10 +811,13 @@ void WasmExecutionFuzzer::FuzzWasmModule(base::Vector data, Isolate* i_isolate = reinterpret_cast(isolate); + v8::Isolate::Scope isolate_scope(isolate); + // Clear any pending exceptions from a prior run. - i_isolate->clear_pending_exception(); + if (i_isolate->has_pending_exception()) { + i_isolate->clear_pending_exception(); + } - v8::Isolate::Scope isolate_scope(isolate); v8::HandleScope handle_scope(isolate); v8::Context::Scope context_scope(support->GetContext()); diff --git a/deps/v8/test/fuzzer/wasm.cc b/deps/v8/test/fuzzer/wasm.cc index ad4d5163d001df..b99b30168f93d2 100644 --- a/deps/v8/test/fuzzer/wasm.cc +++ b/deps/v8/test/fuzzer/wasm.cc @@ -32,12 +32,13 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) { Isolate* i_isolate = reinterpret_cast(isolate); + v8::Isolate::Scope isolate_scope(isolate); + // Clear any pending exceptions from a prior run. if (i_isolate->has_pending_exception()) { i_isolate->clear_pending_exception(); } - v8::Isolate::Scope isolate_scope(isolate); v8::HandleScope handle_scope(isolate); v8::Context::Scope context_scope(support->GetContext()); diff --git a/deps/v8/test/wasm-api-tests/serialize.cc b/deps/v8/test/wasm-api-tests/serialize.cc index 5916ce9abe9995..be1716e28bb6ff 100644 --- a/deps/v8/test/wasm-api-tests/serialize.cc +++ b/deps/v8/test/wasm-api-tests/serialize.cc @@ -2,6 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include "src/common/ptr-compr-inl.h" #include "src/execution/isolate.h" #include "src/wasm/c-api.h" #include "test/wasm-api-tests/wasm-api-test.h" @@ -35,12 +36,19 @@ TEST_F(WasmCapiTest, Serialize) { // We reset the module and collect it to make sure the NativeModuleCache does // not contain it anymore. Otherwise deserialization will not happen. ResetModule(); - Heap* heap = - reinterpret_cast<::wasm::StoreImpl*>(store())->i_isolate()->heap(); - heap->PreciseCollectAllGarbage(GCFlag::kForced, - GarbageCollectionReason::kTesting); - heap->PreciseCollectAllGarbage(GCFlag::kForced, - GarbageCollectionReason::kTesting); + { + Isolate* isolate = + reinterpret_cast<::wasm::StoreImpl*>(store())->i_isolate(); + // This method might be called on a thread that's not bound to any Isolate + // and thus pointer compression schemes might have cage base value unset. + // Ensure cage bases are initialized so that the V8 heap can be accessed. + i::PtrComprCageAccessScope ptr_compr_cage_access_scope(isolate); + Heap* heap = isolate->heap(); + heap->PreciseCollectAllGarbage(GCFlag::kForced, + GarbageCollectionReason::kTesting); + heap->PreciseCollectAllGarbage(GCFlag::kForced, + GarbageCollectionReason::kTesting); + } own deserialized = Module::deserialize(store(), serialized); // Try to serialize the module again. This can fail if deserialization does diff --git a/deps/v8/tools/debug_helper/debug-helper-internal.cc b/deps/v8/tools/debug_helper/debug-helper-internal.cc index 8ff3f29f5cd2d3..65098d13f0f8b3 100644 --- a/deps/v8/tools/debug_helper/debug-helper-internal.cc +++ b/deps/v8/tools/debug_helper/debug-helper-internal.cc @@ -23,13 +23,13 @@ bool IsPointerCompressed(uintptr_t address) { uintptr_t EnsureDecompressed(uintptr_t address, uintptr_t any_uncompressed_ptr) { if (!COMPRESS_POINTERS_BOOL || !IsPointerCompressed(address)) return address; -#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE +#ifdef V8_COMPRESS_POINTERS Address base = V8HeapCompressionScheme::GetPtrComprCageBaseAddress(any_uncompressed_ptr); if (base != V8HeapCompressionScheme::base()) { V8HeapCompressionScheme::InitBase(base); } -#endif +#endif // V8_COMPRESS_POINTERS // TODO(v8:11880): ExternalCodeCompressionScheme might be needed here for // decompressing Code pointers from external code space. return i::V8HeapCompressionScheme::DecompressTagged( diff --git a/deps/v8/tools/debug_helper/get-object-properties.cc b/deps/v8/tools/debug_helper/get-object-properties.cc index ac1d7a8af04c18..9d14e01093ca74 100644 --- a/deps/v8/tools/debug_helper/get-object-properties.cc +++ b/deps/v8/tools/debug_helper/get-object-properties.cc @@ -659,13 +659,13 @@ std::unique_ptr GetHeapObjectPropertiesMaybeCompressed( any_uncompressed_ptr = heap_addresses.old_space_first_page; if (any_uncompressed_ptr == 0) any_uncompressed_ptr = heap_addresses.read_only_space_first_page; -#ifdef V8_COMPRESS_POINTERS_IN_SHARED_CAGE +#ifdef V8_COMPRESS_POINTERS Address base = V8HeapCompressionScheme::GetPtrComprCageBaseAddress(any_uncompressed_ptr); if (base != V8HeapCompressionScheme::base()) { V8HeapCompressionScheme::InitBase(base); } -#endif +#endif // V8_COMPRESS_POINTERS FillInUnknownHeapAddresses(&heap_addresses, any_uncompressed_ptr); if (any_uncompressed_ptr == 0) { // We can't figure out the heap range. Just check for known objects. diff --git a/deps/zlib/CMakeLists.txt b/deps/zlib/CMakeLists.txt index 234eab8db41def..a9cf9c5f945378 100644 --- a/deps/zlib/CMakeLists.txt +++ b/deps/zlib/CMakeLists.txt @@ -1,9 +1,9 @@ -cmake_minimum_required(VERSION 3.0) +cmake_minimum_required(VERSION 2.4.4...3.15.0) set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON) project(zlib C) -set(VERSION "1.2.13.1") +set(VERSION "1.3") set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") diff --git a/deps/zlib/crc32.c b/deps/zlib/crc32.c index 1e1a57519cbda6..cf8579f30aa707 100644 --- a/deps/zlib/crc32.c +++ b/deps/zlib/crc32.c @@ -792,8 +792,8 @@ unsigned long ZEXPORT crc32_z(unsigned long crc, const unsigned char FAR *buf, words = (z_word_t const *)buf; /* Do endian check at execution time instead of compile time, since ARM - processors can change the endianess at execution time. If the - compiler knows what the endianess will be, it can optimize out the + processors can change the endianness at execution time. If the + compiler knows what the endianness will be, it can optimize out the check and the unused branch. */ endian = 1; if (*(unsigned char *)&endian) { diff --git a/deps/zlib/deflate.c b/deps/zlib/deflate.c index 173ce596be582e..779bd294b0c8af 100644 --- a/deps/zlib/deflate.c +++ b/deps/zlib/deflate.c @@ -1,5 +1,5 @@ /* deflate.c -- compress data using the deflation algorithm - * Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler + * Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -65,7 +65,7 @@ #endif const char deflate_copyright[] = - " deflate 1.2.13.1 Copyright 1995-2022 Jean-loup Gailly and Mark Adler "; + " deflate 1.3 Copyright 1995-2023 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -168,6 +168,11 @@ local const config configuration_table[10] = { * bit values at the expense of memory usage). We slide even when level == 0 to * keep the hash table consistent if we switch back to level > 0 later. */ +#if defined(__has_feature) +# if __has_feature(memory_sanitizer) + __attribute__((no_sanitize("memory"))) +# endif +#endif local void slide_hash(deflate_state *s) { #if defined(DEFLATE_SLIDE_HASH_SSE2) || defined(DEFLATE_SLIDE_HASH_NEON) slide_hash_simd(s->head, s->prev, s->w_size, s->hash_size); diff --git a/deps/zlib/gzguts.h b/deps/zlib/gzguts.h index e23f831f531bb1..f9375047e8c58f 100644 --- a/deps/zlib/gzguts.h +++ b/deps/zlib/gzguts.h @@ -7,9 +7,8 @@ # ifndef _LARGEFILE_SOURCE # define _LARGEFILE_SOURCE 1 # endif -# ifdef _FILE_OFFSET_BITS -# undef _FILE_OFFSET_BITS -# endif +# undef _FILE_OFFSET_BITS +# undef _TIME_BITS #endif #ifdef HAVE_HIDDEN diff --git a/deps/zlib/gzlib.c b/deps/zlib/gzlib.c index 9810e3553e0263..0d3ebf8d297e57 100644 --- a/deps/zlib/gzlib.c +++ b/deps/zlib/gzlib.c @@ -311,8 +311,8 @@ int ZEXPORT gzbuffer(gzFile file, unsigned size) { /* check and set requested size */ if ((size << 1) < size) return -1; /* need to be able to double it */ - if (size < 2) - size = 2; /* need two bytes to check magic header */ + if (size < 8) + size = 8; /* needed to behave well with flushing */ state->want = size; return 0; } diff --git a/deps/zlib/inftrees.c b/deps/zlib/inftrees.c index afc4c4212d8022..8a208c2daa8cee 100644 --- a/deps/zlib/inftrees.c +++ b/deps/zlib/inftrees.c @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2022 Mark Adler + * Copyright (C) 1995-2023 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.13.1 Copyright 1995-2022 Mark Adler "; + " inflate 1.3 Copyright 1995-2023 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -57,7 +57,7 @@ int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 77, 76}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 198, 203}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, diff --git a/deps/zlib/zlib.h b/deps/zlib/zlib.h index 014331fc8dc33f..8f296ec481f73c 100644 --- a/deps/zlib/zlib.h +++ b/deps/zlib/zlib.h @@ -1,7 +1,7 @@ /* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.13.1, October xxth, 2022 + version 1.3, August 18th, 2023 - Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2023 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -37,12 +37,12 @@ extern "C" { #endif -#define ZLIB_VERSION "1.2.13.1-motley" -#define ZLIB_VERNUM 0x12d1 +#define ZLIB_VERSION "1.3" +#define ZLIB_VERNUM 0x1300 #define ZLIB_VER_MAJOR 1 -#define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 13 -#define ZLIB_VER_SUBREVISION 1 +#define ZLIB_VER_MINOR 3 +#define ZLIB_VER_REVISION 0 +#define ZLIB_VER_SUBREVISION 0 /* The 'zlib' compression library provides in-memory compression and @@ -230,7 +230,7 @@ ZEXTERN int ZEXPORT deflateInit(z_streamp strm, int level); Initializes the internal stream state for compression. The fields zalloc, zfree and opaque must be initialized before by the caller. If zalloc and zfree are set to Z_NULL, deflateInit updates them to use default - allocation functions. + allocation functions. total_in, total_out, adler, and msg are initialized. The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: 1 gives best speed, 9 gives best compression, 0 gives no compression at all @@ -320,8 +320,8 @@ ZEXTERN int ZEXPORT deflate(z_streamp strm, int flush); with the same value of the flush parameter and more output space (updated avail_out), until the flush is complete (deflate returns with non-zero avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. + avail_out is greater than six when the flush marker begins, in order to avoid + repeated flush markers upon calling deflate() again when avail_out == 0. If the parameter flush is set to Z_FINISH, pending input is processed, pending output is flushed and deflate returns with Z_STREAM_END if there was @@ -382,7 +382,8 @@ ZEXTERN int ZEXPORT inflateInit(z_streamp strm); read or consumed. The allocation of a sliding window will be deferred to the first call of inflate (if the decompression does not complete on the first call). If zalloc and zfree are set to Z_NULL, inflateInit updates - them to use default allocation functions. + them to use default allocation functions. total_in, total_out, adler, and + msg are initialized. inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_VERSION_ERROR if the zlib library version is incompatible with the @@ -695,7 +696,7 @@ ZEXTERN int ZEXPORT deflateReset(z_streamp strm); This function is equivalent to deflateEnd followed by deflateInit, but does not free and reallocate the internal compression state. The stream will leave the compression level and any other attributes that may have been - set unchanged. + set unchanged. total_in, total_out, adler, and msg are initialized. deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). @@ -820,8 +821,9 @@ ZEXTERN int ZEXPORT deflateSetHeader(z_streamp strm, gzip file" and give up. If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). + the time set to zero, and os set to the current operating system, with no + extra, name, or comment fields. The gzip header is returned to the default + state by deflateReset(). deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent. @@ -960,6 +962,7 @@ ZEXTERN int ZEXPORT inflateReset(z_streamp strm); This function is equivalent to inflateEnd followed by inflateInit, but does not free and reallocate the internal decompression state. The stream will keep attributes that may have been set by inflateInit2. + total_in, total_out, adler, and msg are initialized. inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source stream state was inconsistent (such as zalloc or state being Z_NULL). diff --git a/doc/abi_version_registry.json b/doc/abi_version_registry.json index c5fd7d2fd2a3ee..2dc7511694859d 100644 --- a/doc/abi_version_registry.json +++ b/doc/abi_version_registry.json @@ -1,5 +1,6 @@ { "NODE_MODULE_VERSION": [ + { "modules": 121,"runtime": "electron", "variant": "electron", "versions": "29" }, { "modules": 120,"runtime": "node", "variant": "v8_11.8", "versions": "21.0.0" }, { "modules": 119,"runtime": "electron", "variant": "electron", "versions": "28" }, { "modules": 118,"runtime": "electron", "variant": "electron", "versions": "27" }, diff --git a/doc/api/buffer.md b/doc/api/buffer.md index 3a46599649d025..7bb7d42454fad6 100644 --- a/doc/api/buffer.md +++ b/doc/api/buffer.md @@ -808,8 +808,8 @@ A `TypeError` will be thrown if `size` is not a number. The `Buffer` module pre-allocates an internal `Buffer` instance of size [`Buffer.poolSize`][] that is used as a pool for the fast allocation of new `Buffer` instances created using [`Buffer.allocUnsafe()`][], [`Buffer.from(array)`][], -and [`Buffer.concat()`][] only when `size` is less than or equal to -`Buffer.poolSize >> 1` (floor of [`Buffer.poolSize`][] divided by two). +and [`Buffer.concat()`][] only when `size` is less than +`Buffer.poolSize >>> 1` (floor of [`Buffer.poolSize`][] divided by two). Use of this pre-allocated internal memory pool is a key difference between calling `Buffer.alloc(size, fill)` vs. `Buffer.allocUnsafe(size).fill(fill)`. diff --git a/doc/api/cli.md b/doc/api/cli.md index 1f5136ce69442f..c17af97f38b3fd 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -166,7 +166,7 @@ The valid arguments for the `--allow-fs-read` flag are: Example `--allow-fs-read=/folder1/ --allow-fs-read=/folder1/` Paths delimited by comma (`,`) are no longer allowed. -When passing a single flag with a comma a warning will be diplayed +When passing a single flag with a comma a warning will be displayed. Examples can be found in the [File System Permissions][] documentation. @@ -220,7 +220,7 @@ The valid arguments for the `--allow-fs-write` flag are: Example `--allow-fs-read=/folder1/ --allow-fs-read=/folder1/` Paths delimited by comma (`,`) are no longer allowed. -When passing a single flag with a comma a warning will be diplayed +When passing a single flag with a comma a warning will be displayed. Examples can be found in the [File System Permissions][] documentation. @@ -443,6 +443,57 @@ Affects the default output directory of: * [`--heap-prof-dir`][] * [`--redirect-warnings`][] +### `--disable-warning=code-or-type` + +> Stability: 1.1 - Active development + + + +Disable specific process warnings by `code` or `type`. + +Warnings emitted from [`process.emitWarning()`][emit_warning] may contain a +`code` and a `type`. This option will not-emit warnings that have a matching +`code` or `type`. + +List of [deprecation warnings][]. + +The Node.js core warning types are: `DeprecationWarning` and +`ExperimentalWarning` + +For example, the following script will not emit +[DEP0025 `require('node:sys')`][DEP0025 warning] when executed with +`node --disable-warning=DEP0025`: + +```mjs +import sys from 'node:sys'; +``` + +```cjs +const sys = require('node:sys'); +``` + +For example, the following script will emit the +[DEP0025 `require('node:sys')`][DEP0025 warning], but not any Experimental +Warnings (such as +[ExperimentalWarning: `vm.measureMemory` is an experimental feature][] +in <=v21) when executed with `node --disable-warning=ExperimentalWarnings`: + +```mjs +import sys from 'node:sys'; +import vm from 'node:vm'; + +vm.measureMemory(); +``` + +```cjs +const sys = require('node:sys'); +const vm = require('node:vm'); + +vm.measureMemory(); +``` + ### `--disable-proto=mode` > Stability: 1.0 - Early development @@ -625,6 +678,7 @@ JavaScript. > Stability: 1.0 - Early development @@ -653,7 +707,9 @@ added: - v13.9.0 - v12.16.2 changes: - - version: v20.6.0 + - version: + - v20.6.0 + - v18.19.0 pr-url: https://github.com/nodejs/node/pull/49028 description: synchronous import.meta.resolve made available by default, with the flag retained for enabling the experimental second argument @@ -800,7 +856,9 @@ Enable experimental WebAssembly module support. ### `--experimental-websocket` Enable experimental [`WebSocket`][] support. @@ -1021,12 +1079,13 @@ Modules preloaded with `--require` will run before modules preloaded with `--imp added: v12.0.0 --> -This configures Node.js to interpret string input as CommonJS or as an ES -module. String input is input via `--eval`, `--print`, or `STDIN`. - -Valid values are `"commonjs"` and `"module"`. The default is `"commonjs"`. +This configures Node.js to interpret `--eval` or `STDIN` input as CommonJS or +as an ES module. Valid values are `"commonjs"` or `"module"`. The default is +`"commonjs"` unless [`--experimental-default-type=module`][] is used. -The REPL does not support this option. +The REPL does not support this option. Usage of `--input-type=module` with +[`--print`][] will throw an error, as `--print` does not support ES module +syntax. ### `--insecure-http-parser` @@ -1199,7 +1258,7 @@ Disable exposition of [CustomEvent Web API][] on the global scope. ### `--no-experimental-global-navigator` > Stability: 1 - Experimental @@ -1695,7 +1754,10 @@ for more details. ### `--test-concurrency` The maximum number of test files that the test runner CLI will execute @@ -1763,7 +1825,9 @@ The destination for the corresponding test reporter. See the documentation on ### `--test-shard` Test suite shard to execute in a format of `/`, where @@ -1784,7 +1848,7 @@ node --test --test-shard=3/3 ### `--test-timeout` A number of milliseconds the test execution will fail after. If unspecified, @@ -2327,6 +2391,7 @@ Node.js options that are allowed are: * `--conditions`, `-C` * `--diagnostic-dir` * `--disable-proto` +* `--disable-warning` * `--dns-result-order` * `--enable-fips` * `--enable-network-family-autoselection` @@ -2779,7 +2844,9 @@ done [CommonJS]: modules.md [CommonJS module]: modules.md [CustomEvent Web API]: https://dom.spec.whatwg.org/#customevent +[DEP0025 warning]: deprecations.md#dep0025-requirenodesys [ECMAScript module]: esm.md#modules-ecmascript-modules +[ExperimentalWarning: `vm.measureMemory` is an experimental feature]: vm.md#vmmeasurememoryoptions [Fetch API]: https://developer.mozilla.org/en-US/docs/Web/API/Fetch_API [File System Permissions]: permissions.md#file-system-permissions [Module customization hooks]: module.md#customization-hooks @@ -2810,6 +2877,7 @@ done [`--import`]: #--importmodule [`--openssl-config`]: #--openssl-configfile [`--preserve-symlinks`]: #--preserve-symlinks +[`--print`]: #-p---print-script [`--redirect-warnings`]: #--redirect-warningsfile [`--require`]: #-r---require-module [`Atomics.wait()`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Atomics/wait @@ -2835,6 +2903,7 @@ done [context-aware]: addons.md#context-aware-addons [debugger]: debugger.md [debugging security implications]: https://nodejs.org/en/docs/guides/debugging-getting-started/#security-implications +[deprecation warnings]: deprecations.md#list-of-deprecated-apis [emit_warning]: process.md#processemitwarningwarning-options [environment_variables]: #environment-variables [filtering tests by name]: test.md#filtering-tests-by-name diff --git a/doc/api/crypto.md b/doc/api/crypto.md index 194f3cb9bb1024..3175d391032ae4 100644 --- a/doc/api/crypto.md +++ b/doc/api/crypto.md @@ -42,7 +42,7 @@ calling `require('node:crypto')` will result in an error being thrown. When using CommonJS, the error thrown can be caught using try/catch: - + ```cjs let crypto; @@ -53,6 +53,8 @@ try { } ``` + + When using the lexical ESM `import` keyword, the error can only be caught if a handler for `process.on('uncaughtException')` is registered _before_ any attempt to load the module is made (using, for instance, @@ -2722,7 +2724,7 @@ added: v15.9.0 The issuer certificate or `undefined` if the issuer certificate is not available. -### `x509.keyUsage` +### `x509.extKeyUsage` -Type: Runtime (supports [`--pending-deprecation`][]) +Type: Application (non-`node_modules` code only) The `Buffer()` function and `new Buffer()` constructor are deprecated due to API usability issues that can lead to accidental security issues. @@ -964,6 +972,9 @@ The [`tls.SecurePair`][] class is deprecated. Please use -Type: Documentation-only +Type: Runtime The [`util.isArray()`][] API is deprecated. Please use `Array.isArray()` instead. @@ -985,6 +996,9 @@ instead. -Type: Documentation-only +Type: Runtime -The [`util.isBoolean()`][] API is deprecated. +The [`util.isBoolean()`][] API is deprecated. Please use +`typeof arg === 'boolean'` instead. ### DEP0046: `util.isBuffer()` -Type: Documentation-only +Type: Runtime The [`util.isBuffer()`][] API is deprecated. Please use [`Buffer.isBuffer()`][] instead. @@ -1026,6 +1044,9 @@ The [`util.isBuffer()`][] API is deprecated. Please use -Type: Documentation-only +Type: Runtime -The [`util.isDate()`][] API is deprecated. +The [`util.isDate()`][] API is deprecated. Please use +`arg instanceof Date` instead. ### DEP0048: `util.isError()` -Type: Documentation-only +Type: Runtime -The [`util.isError()`][] API is deprecated. +The [`util.isError()`][] API is deprecated. Please use +`Object.prototype.toString(arg) === '[object Error]' || arg instanceof Error` +instead. ### DEP0049: `util.isFunction()` -Type: Documentation-only +Type: Runtime -The [`util.isFunction()`][] API is deprecated. +The [`util.isFunction()`][] API is deprecated. Please use +`typeof arg === 'function'` instead. ### DEP0050: `util.isNull()` -Type: Documentation-only +Type: Runtime -The [`util.isNull()`][] API is deprecated. +The [`util.isNull()`][] API is deprecated. Please use +`arg === null` instead. ### DEP0051: `util.isNullOrUndefined()` -Type: Documentation-only +Type: Runtime -The [`util.isNullOrUndefined()`][] API is deprecated. +The [`util.isNullOrUndefined()`][] API is deprecated. Please use +`arg === null || arg === undefined` instead. ### DEP0052: `util.isNumber()` -Type: Documentation-only +Type: Runtime -The [`util.isNumber()`][] API is deprecated. +The [`util.isNumber()`][] API is deprecated. Please use +`typeof arg === 'number'` instead. ### DEP0053: `util.isObject()` -Type: Documentation-only +Type: Runtime -The [`util.isObject()`][] API is deprecated. +The [`util.isObject()`][] API is deprecated. Please use +`arg && typeof arg === 'object'` instead. ### DEP0054: `util.isPrimitive()` -Type: Documentation-only +Type: Runtime -The [`util.isPrimitive()`][] API is deprecated. +The [`util.isPrimitive()`][] API is deprecated. Please use +`arg === null || (typeof arg !=='object' && typeof arg !== 'function')` +instead. ### DEP0055: `util.isRegExp()` -Type: Documentation-only +Type: Runtime -The [`util.isRegExp()`][] API is deprecated. +The [`util.isRegExp()`][] API is deprecated. Please use +`arg instanceof RegExp` instead. ### DEP0056: `util.isString()` -Type: Documentation-only +Type: Runtime -The [`util.isString()`][] API is deprecated. +The [`util.isString()`][] API is deprecated. Please use +`typeof arg === 'string'` instead. ### DEP0057: `util.isSymbol()` -Type: Documentation-only +Type: Runtime -The [`util.isSymbol()`][] API is deprecated. +The [`util.isSymbol()`][] API is deprecated. Please use +`typeof arg === 'symbol'` instead. ### DEP0058: `util.isUndefined()` -Type: Documentation-only +Type: Runtime -The [`util.isUndefined()`][] API is deprecated. +The [`util.isUndefined()`][] API is deprecated. Please use +`arg === undefined` instead. ### DEP0059: `util.log()` -Type: Documentation-only +Type: Runtime + +The [`util.log()`][] API has been deprecated because it's an unmaintained +legacy API that was exposed to user land by accident. Instead, +consider the following alternatives based on your specific needs: + +* **Third-Party Logging Libraries** + +* **Use `console.log(new Date().toLocaleString(), message)`** -The [`util.log()`][] API is deprecated. +By adopting one of these alternatives, you can transition away from `util.log()` +and choose a logging strategy that aligns with the specific +requirements and complexity of your application. ### DEP0060: `util._extend()` -Type: Documentation-only +Type: Runtime -The [`util._extend()`][] API is deprecated. +The [`util._extend()`][] API is deprecated because it's an unmaintained +legacy API that was exposed to user land by accident. +Please use `target = Object.assign(target, source)` instead. ### DEP0061: `fs.SyncWriteStream` @@ -3428,6 +3514,52 @@ Type: Documentation-only `F_OK`, `R_OK`, `W_OK` and `X_OK` getters exposed directly on `node:fs` are deprecated. Get them from `fs.constants` or `fs.promises.constants` instead. +### DEP0177: `util.types.isWebAssemblyCompiledModule` + + + +Type: Documentation-only + +The [`util.types.isWebAssemblyCompiledModule`][] API is deprecated. Please use +`value instanceof WebAssembly.Module` instead. + +### DEP0178: `dirent.path` + + + +Type: Documentation-only + +The [`dirent.path`][] is deprecated due to its lack of consistency across +release lines. Please use [`dirent.parentPath`][] instead. + +### DEP0179: `Hash` constructor + + + +Type: Documentation-only + +Calling `Hash` class directly with `Hash()` or `new Hash()` is +deprecated due to being internals, not intended for public use. +Please use the [`crypto.createHash()`][] method to create Hash instances. + [NIST SP 800-38D]: https://nvlpubs.nist.gov/nistpubs/Legacy/SP/nistspecialpublication800-38d.pdf [RFC 6066]: https://tools.ietf.org/html/rfc6066#section-3 [RFC 8247 Section 2.4]: https://www.rfc-editor.org/rfc/rfc8247#section-2.4 @@ -3466,6 +3598,7 @@ deprecated. Get them from `fs.constants` or `fs.promises.constants` instead. [`crypto.createCipheriv()`]: crypto.md#cryptocreatecipherivalgorithm-key-iv-options [`crypto.createDecipher()`]: crypto.md#cryptocreatedecipheralgorithm-password-options [`crypto.createDecipheriv()`]: crypto.md#cryptocreatedecipherivalgorithm-key-iv-options +[`crypto.createHash()`]: crypto.md#cryptocreatehashalgorithm-options [`crypto.fips`]: crypto.md#cryptofips [`crypto.pbkdf2()`]: crypto.md#cryptopbkdf2password-salt-iterations-keylen-digest-callback [`crypto.randomBytes()`]: crypto.md#cryptorandombytessize-callback @@ -3474,6 +3607,8 @@ deprecated. Get them from `fs.constants` or `fs.promises.constants` instead. [`decipher.setAuthTag()`]: crypto.md#deciphersetauthtagbuffer-encoding [`diagnostics_channel.subscribe(name, onMessage)`]: diagnostics_channel.md#diagnostics_channelsubscribename-onmessage [`diagnostics_channel.unsubscribe(name, onMessage)`]: diagnostics_channel.md#diagnostics_channelunsubscribename-onmessage +[`dirent.parentPath`]: fs.md#direntparentpath +[`dirent.path`]: fs.md#direntpath [`dns.lookup()`]: dns.md#dnslookuphostname-options-callback [`dnsPromises.lookup()`]: dns.md#dnspromiseslookuphostname-options [`domain`]: domain.md @@ -3571,6 +3706,7 @@ deprecated. Get them from `fs.constants` or `fs.promises.constants` instead. [`util.log()`]: util.md#utillogstring [`util.promisify`]: util.md#utilpromisifyoriginal [`util.toUSVString()`]: util.md#utiltousvstringstring +[`util.types.isWebAssemblyCompiledModule`]: util.md#utiltypesiswebassemblycompiledmodulevalue [`util.types`]: util.md#utiltypes [`util`]: util.md [`worker.exitedAfterDisconnect`]: cluster.md#workerexitedafterdisconnect diff --git a/doc/api/diagnostics_channel.md b/doc/api/diagnostics_channel.md index b92ee0b014de02..7b68b3b8d1cf21 100644 --- a/doc/api/diagnostics_channel.md +++ b/doc/api/diagnostics_channel.md @@ -236,6 +236,7 @@ diagnostics_channel.unsubscribe('my-channel', onMessage); > Stability: 1 - Experimental @@ -466,6 +467,7 @@ channel.unsubscribe(onMessage); > Stability: 1 - Experimental @@ -510,6 +512,7 @@ channel.bindStore(store, (data) => { > Stability: 1 - Experimental @@ -549,6 +552,7 @@ channel.unbindStore(store); > Stability: 1 - Experimental @@ -610,6 +614,7 @@ channel.runStores({ some: 'message' }, () => { > Stability: 1 - Experimental @@ -627,6 +632,7 @@ dynamically. > Stability: 1 - Experimental @@ -695,6 +701,7 @@ channels.subscribe({ > Stability: 1 - Experimental @@ -765,6 +772,7 @@ channels.unsubscribe({ > Stability: 1 - Experimental @@ -810,6 +818,7 @@ channels.traceSync(() => { > Stability: 1 - Experimental @@ -853,34 +862,35 @@ channels.tracePromise(async () => { }); ``` -#### `tracingChannel.traceCallback(fn[, position[, context[, thisArg[, ...args]]]])` +#### `tracingChannel.traceCallback(fn, position, context, thisArg, ...args)` > Stability: 1 - Experimental * `fn` {Function} callback using function to wrap a trace around * `position` {number} Zero-indexed argument position of expected callback -* `context` {Object} Shared object to correlate trace events through + (defaults to last argument if `undefined` is passed) +* `context` {Object} Shared object to correlate trace events through (defaults + to `{}` if `undefined` is passed) * `thisArg` {any} The receiver to be used for the function call -* `...args` {any} Optional arguments to pass to the function +* `...args` {any} arguments to pass to the function (must include the callback) * Returns: {any} The return value of the given function -Trace a callback-receiving function call. This will always produce a +Trace a callback-receiving function call. The callback is expected to follow +the error as first arg convention typically used. This will always produce a [`start` event][] and [`end` event][] around the synchronous portion of the function execution, and will produce a [`asyncStart` event][] and [`asyncEnd` event][] around the callback execution. It may also produce an -[`error` event][] if the given function throws an error or the returned -promise rejects. This will run the given function using +[`error` event][] if the given function throws or the first argument passed to +the callback is set. This will run the given function using [`channel.runStores(context, ...)`][] on the `start` channel which ensures all events should have any bound stores set to match this trace context. -The `position` will be -1 by default to indicate the final argument should -be used as the callback. - ```mjs import diagnostics_channel from 'node:diagnostics_channel'; diff --git a/doc/api/errors.md b/doc/api/errors.md index 50e9f658fcbf3a..6a1d06a6f5baba 100644 --- a/doc/api/errors.md +++ b/doc/api/errors.md @@ -1777,7 +1777,10 @@ An import attribute is missing, preventing the specified module to be imported. ### `ERR_IMPORT_ATTRIBUTE_UNSUPPORTED` An import attribute is not supported by this version of Node.js. @@ -2938,9 +2941,7 @@ signal (such as [`subprocess.kill()`][]). [self-reference a package using its name][] and [define a custom subpath][] in the [`"exports"`][] field of the [`package.json`][] file. - - -```js +```mjs import './'; // unsupported import './index.js'; // supported import 'package-name'; // supported diff --git a/doc/api/esm.md b/doc/api/esm.md index 278513ae78b435..4ea219f43df0dd 100644 --- a/doc/api/esm.md +++ b/doc/api/esm.md @@ -7,10 +7,14 @@ @@ -335,7 +342,7 @@ properties. ### `import.meta.dirname` > Stability: 1.2 - Release candidate @@ -348,7 +355,7 @@ added: REPLACEME ### `import.meta.filename` > Stability: 1.2 - Release candidate @@ -382,15 +389,21 @@ added: - v13.9.0 - v12.16.2 changes: - - version: v20.6.0 + - version: + - v20.6.0 + - v18.19.0 pr-url: https://github.com/nodejs/node/pull/49028 description: Unflag `import.meta.resolve``, with `parentURL` parameter still flagged. - - version: v20.6.0 + - version: + - v20.6.0 + - v18.19.0 pr-url: https://github.com/nodejs/node/pull/49038 description: This API no longer throws when targeting `file:` URLs that do not map to an existing file on the local FS. - - version: v20.0.0 + - version: + - v20.0.0 + - v18.19.0 pr-url: https://github.com/nodejs/node/pull/44710 description: This API now returns a string synchronously instead of a Promise. - version: @@ -933,9 +946,9 @@ The resolver can throw the following errors: > 2. If _resolved_ is not **null** or **undefined**, return _resolved_. > 3. Otherwise, if _exports_ is an Object and all keys of _exports_ start with > _"."_, then -> 1. Let _matchKey_ be the string _"./"_ concatenated with _subpath_. +> 1. Assert: _subpath_ begins with _"./"_. > 2. Let _resolved_ be the result of **PACKAGE\_IMPORTS\_EXPORTS\_RESOLVE**( -> _matchKey_, _exports_, _packageURL_, **false**, _conditions_). +> _subpath_, _exports_, _packageURL_, **false**, _conditions_). > 3. If _resolved_ is not **null** or **undefined**, return _resolved_. > 4. Throw a _Package Path Not Exported_ error. @@ -1015,7 +1028,7 @@ _isImports_, _conditions_) > Package Target_ error. > 3. Let _resolvedTarget_ be the URL resolution of the concatenation of > _packageURL_ and _target_. -> 4. Assert: _resolvedTarget_ is contained in _packageURL_. +> 4. Assert: _packageURL_ is contained in _resolvedTarget_. > 5. If _patternMatch_ is **null**, then > 1. Return _resolvedTarget_. > 6. If _patternMatch_ split on _"/"_ or _"\\"_ contains any _""_, _"."_, @@ -1024,7 +1037,7 @@ _isImports_, _conditions_) > 7. Return the URL resolution of _resolvedTarget_ with every instance of > _"\*"_ replaced with _patternMatch_. > 2. Otherwise, if _target_ is a non-null Object, then -> 1. If _exports_ contains any index property keys, as defined in ECMA-262 +> 1. If _target_ contains any index property keys, as defined in ECMA-262 > [6.1.7 Array Index][], throw an _Invalid Package Configuration_ error. > 2. For each property _p_ of _target_, in object insertion order as, > 1. If _p_ equals _"default"_ or _conditions_ contains an entry for _p_, diff --git a/doc/api/fs.md b/doc/api/fs.md index 243ab75ca72541..95afa01cbdec7b 100644 --- a/doc/api/fs.md +++ b/doc/api/fs.md @@ -180,7 +180,9 @@ longer be used. @@ -902,7 +906,9 @@ the error raised if the file is not accessible. @@ -1198,7 +1204,9 @@ makeDirectory().catch(console.error); + +> Stability: 1 – Experimental + +* {string} + +The path to the parent directory of the file this {fs.Dirent} object refers to. + #### `dirent.path` +> Stability: 0 - Deprecated: Use [`dirent.parentPath`][] instead. + * {string} -The base path that this {fs.Dirent} object refers to. +Alias for `dirent.parentPath`. ### Class: `fs.FSWatcher` @@ -8176,6 +8217,7 @@ the file contents. [`Number.MAX_SAFE_INTEGER`]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER [`ReadDirectoryChangesW`]: https://docs.microsoft.com/en-us/windows/desktop/api/winbase/nf-winbase-readdirectorychangesw [`UV_THREADPOOL_SIZE`]: cli.md#uv_threadpool_sizesize +[`dirent.parentPath`]: #direntparentpath [`event ports`]: https://illumos.org/man/port_create [`filehandle.createReadStream()`]: #filehandlecreatereadstreamoptions [`filehandle.createWriteStream()`]: #filehandlecreatewritestreamoptions diff --git a/doc/api/globals.md b/doc/api/globals.md index 7869986bb1cd31..e17e0f7eebf10d 100644 --- a/doc/api/globals.md +++ b/doc/api/globals.md @@ -634,7 +634,7 @@ console.log(`This process is running on ${navigator.hardwareConcurrency} logical ### `navigator.language` * {string} @@ -655,7 +655,7 @@ console.log(`The preferred language of the Node.js instance has the tag '${navig ### `navigator.languages` * {Array} @@ -675,7 +675,7 @@ console.log(`The preferred languages are '${navigator.languages}'`); ### `navigator.platform` * {string} @@ -1094,7 +1094,9 @@ The object that acts as the namespace for all W3C ## `WebSocket` > Stability: 1 - Experimental. diff --git a/doc/api/http.md b/doc/api/http.md index 11b01b6e9ee767..e0b2c55a56a3d0 100644 --- a/doc/api/http.md +++ b/doc/api/http.md @@ -16,14 +16,12 @@ user is able to stream data. HTTP message headers are represented by an object like this: - - -```js -{ 'content-length': '123', - 'content-type': 'text/plain', - 'connection': 'keep-alive', - 'host': 'example.com', - 'accept': '*/*' } +```json +{ "content-length": "123", + "content-type": "text/plain", + "connection": "keep-alive", + "host": "example.com", + "accept": "*/*" } ``` Keys are lowercased. Values are not modified. diff --git a/doc/api/https.md b/doc/api/https.md index 20f427d3b7dfd9..8ae80d28b61654 100644 --- a/doc/api/https.md +++ b/doc/api/https.md @@ -17,8 +17,6 @@ calling `require('node:https')` will result in an error being thrown. When using CommonJS, the error thrown can be caught using try/catch: - - ```cjs let https; try { diff --git a/doc/api/module.md b/doc/api/module.md index f4338028abe31d..ee938953abeeca 100644 --- a/doc/api/module.md +++ b/doc/api/module.md @@ -83,9 +83,13 @@ isBuiltin('wss'); // false ### `module.register(specifier[, parentURL][, options])` @@ -99,6 +103,10 @@ changes: URL, such as `import.meta.url`, you can pass that URL here. **Default:** `'data:'` * `options` {Object} + * `parentURL` {string|URL} If you want to resolve `specifier` relative to a + base URL, such as `import.meta.url`, you can pass that URL here. This + property is ignored if the `parentURL` is supplied as the second argument. + **Default:** `'data:'` * `data` {any} Any arbitrary, cloneable JavaScript value to pass into the [`initialize`][] hook. * `transferList` {Object\[]} [transferrable objects][] to be passed into the @@ -153,7 +161,9 @@ import('node:fs').then((esmFS) => { > Stability: 1.2 - Release candidate @@ -458,7 +470,10 @@ register('./path-to-my-hooks.js', { > Stability: 1 - Experimental diff --git a/doc/api/net.md b/doc/api/net.md index 23f2096049b0e0..fc260b9f636266 100644 --- a/doc/api/net.md +++ b/doc/api/net.md @@ -38,7 +38,10 @@ it will unlink the Unix domain socket as well. For example, socket outside of these abstractions, the user will need to remove it. The same applies when a Node.js API creates a Unix domain socket but the program then crashes. In short, a Unix domain socket will be visible in the file system and -will persist until unlinked. +will persist until unlinked. On Linux, You can use Unix abstract socket by adding +`\0` to the beginning of the path, such as `\0abstract`. The path to the Unix +abstract socket is not visible in the file system and it will disappear automatically +when all open references to the socket are closed. On Windows, the local domain is implemented using a named pipe. The path _must_ refer to an entry in `\\?\pipe\` or `\\.\pipe\`. Any characters are permitted, diff --git a/doc/api/packages.md b/doc/api/packages.md index 9287ff71c404c9..8a5efdc89c4853 100644 --- a/doc/api/packages.md +++ b/doc/api/packages.md @@ -69,13 +69,14 @@ expressions: * Strings passed in as an argument to `--eval`, or piped to `node` via `STDIN`, with the flag `--input-type=module`. -* Code that contains syntax that only parses successfully as [ES modules][], - such as `import` or `export` statements or `import.meta`, when the code has no - explicit marker of how it should be interpreted. Explicit markers are `.mjs` - or `.cjs` extensions, `package.json` `"type"` fields with either `"module"` or - `"commonjs"` values, or `--input-type` or `--experimental-default-type` flags. - Dynamic `import()` expressions are supported in either CommonJS or ES modules - and would not cause a file to be treated as an ES module. +* When using [`--experimental-detect-module`][], code containing syntax only + successfully parsed as [ES modules][], such as `import` or `export` + statements or `import.meta`, having no explicit marker of how it should be + interpreted. Explicit markers are `.mjs` or `.cjs` extensions, `package.json` + `"type"` fields with either `"module"` or `"commonjs"` values, or + `--input-type` or `--experimental-default-type` flags. Dynamic `import()` + expressions are supported in either CommonJS or ES modules and would not + cause a file to be treated as an ES module. Node.js will treat the following as [CommonJS][] when passed to `node` as the initial input, or when referenced by `import` statements or `import()` @@ -1362,6 +1363,7 @@ This field defines [subpath imports][] for the current package. [`"type"`]: #type [`--conditions` / `-C` flag]: #resolving-user-conditions [`--experimental-default-type`]: cli.md#--experimental-default-typetype +[`--experimental-detect-module`]: cli.md#--experimental-detect-module [`--no-addons` flag]: cli.md#--no-addons [`ERR_PACKAGE_PATH_NOT_EXPORTED`]: errors.md#err_package_path_not_exported [`esm`]: https://github.com/standard-things/esm#readme diff --git a/doc/api/perf_hooks.md b/doc/api/perf_hooks.md index 8323b9ab03fcd0..040b8eaa52027b 100644 --- a/doc/api/perf_hooks.md +++ b/doc/api/perf_hooks.md @@ -1328,13 +1328,15 @@ const obs = new PerformanceObserver((perfObserverList, observer) => { * name: 'test', * entryType: 'mark', * startTime: 81.465639, - * duration: 0 + * duration: 0, + * detail: null * }, * PerformanceEntry { * name: 'meow', * entryType: 'mark', * startTime: 81.860064, - * duration: 0 + * duration: 0, + * detail: null * } * ] */ @@ -1378,7 +1380,8 @@ const obs = new PerformanceObserver((perfObserverList, observer) => { * name: 'meow', * entryType: 'mark', * startTime: 98.545991, - * duration: 0 + * duration: 0, + * detail: null * } * ] */ @@ -1391,7 +1394,8 @@ const obs = new PerformanceObserver((perfObserverList, observer) => { * name: 'test', * entryType: 'mark', * startTime: 63.518931, - * duration: 0 + * duration: 0, + * detail: null * } * ] */ @@ -1434,13 +1438,15 @@ const obs = new PerformanceObserver((perfObserverList, observer) => { * name: 'test', * entryType: 'mark', * startTime: 55.897834, - * duration: 0 + * duration: 0, + * detail: null * }, * PerformanceEntry { * name: 'meow', * entryType: 'mark', * startTime: 56.350146, - * duration: 0 + * duration: 0, + * detail: null * } * ] */ diff --git a/doc/api/process.md b/doc/api/process.md index f0ce10fa9f071a..df7af5feaa92f9 100644 --- a/doc/api/process.md +++ b/doc/api/process.md @@ -3523,7 +3523,9 @@ Using this function is mutually exclusive with using the deprecated ## `process.sourceMapsEnabled` > Stability: 1 - Experimental diff --git a/doc/api/querystring.md b/doc/api/querystring.md index 752d4b9d584242..f7f45d57d927ce 100644 --- a/doc/api/querystring.md +++ b/doc/api/querystring.md @@ -87,12 +87,10 @@ collection of key and value pairs. For example, the query string `'foo=bar&abc=xyz&abc=123'` is parsed into: - - -```js +```json { - foo: 'bar', - abc: ['xyz', '123'] + "foo": "bar", + "abc": ["xyz", "123"] } ``` diff --git a/doc/api/stream.md b/doc/api/stream.md index 83b26c4d6a95b2..93d7635a2679d0 100644 --- a/doc/api/stream.md +++ b/doc/api/stream.md @@ -2015,7 +2015,9 @@ added: - v17.4.0 - v16.14.0 changes: - - version: v20.7.0 + - version: + - v20.7.0 + - v18.19.0 pr-url: https://github.com/nodejs/node/pull/49249 description: added `highWaterMark` in options. --> @@ -2068,7 +2070,9 @@ added: - v17.4.0 - v16.14.0 changes: - - version: v20.7.0 + - version: + - v20.7.0 + - v18.19.0 pr-url: https://github.com/nodejs/node/pull/49249 description: added `highWaterMark` in options. --> @@ -2823,7 +2827,9 @@ const server = http.createServer((req, res) => { > Stability: 1 - Experimental @@ -1816,8 +1822,9 @@ which is a `MockTimers` instance. This function restores the default behavior of all mocks that were previously @@ -1924,6 +1932,7 @@ Calls `timers.reset()`. Advances time for all mocked timers. @@ -2240,6 +2249,7 @@ test('should tick five times testing a real use case', async (context) => { Triggers all pending mocked timers immediately. If the `Date` object is also @@ -2303,7 +2313,7 @@ clocks or actual timers outside of the mocking environment. Sets the current Unix timestamp that will be used as reference for any mocked diff --git a/doc/api/tls.md b/doc/api/tls.md index 37f26189e5e62e..200da769a20333 100644 --- a/doc/api/tls.md +++ b/doc/api/tls.md @@ -22,8 +22,6 @@ calling `require('node:tls')` will result in an error being thrown. When using CommonJS, the error thrown can be caught using try/catch: - - ```cjs let tls; try { @@ -2049,7 +2047,9 @@ where `secureSocket` has the same API as `pair.cleartext`. - -```js +```mjs import * as ns from './a.js'; util.types.isModuleNamespaceObject(ns); // Returns true diff --git a/doc/api/vm.md b/doc/api/vm.md index fd94c932db9de8..7a2c59c867f4a1 100644 --- a/doc/api/vm.md +++ b/doc/api/vm.md @@ -619,7 +619,10 @@ The identifier of the current module, as set in the constructor. diff --git a/doc/api/webcrypto.md b/doc/api/webcrypto.md index 0c5fa8b413b992..07677b8f180de9 100644 --- a/doc/api/webcrypto.md +++ b/doc/api/webcrypto.md @@ -330,7 +330,7 @@ async function pbkdf2Key(pass, salt, iterations = 1000, length = 256) { iterations, }, keyMaterial, { name: 'AES-GCM', - length: 256, + length, }, true, ['encrypt', 'decrypt']); return key; } diff --git a/doc/api/webstreams.md b/doc/api/webstreams.md index 03f95b87ff0b3c..a90575c8fe4aca 100644 --- a/doc/api/webstreams.md +++ b/doc/api/webstreams.md @@ -1420,9 +1420,13 @@ changes: -* `format` {string} One of either `'deflate'` or `'gzip'`. +* `format` {string} One of `'deflate'`, `'deflate-raw'`, or `'gzip'`. #### `compressionStream.readable` @@ -1454,9 +1458,13 @@ changes: -* `format` {string} One of either `'deflate'` or `'gzip'`. +* `format` {string} One of `'deflate'`, `'deflate-raw'`, or `'gzip'`. #### `decompressionStream.readable` diff --git a/doc/api_assets/api.js b/doc/api_assets/api.js index c7568206e29f19..394b5ba990946c 100644 --- a/doc/api_assets/api.js +++ b/doc/api_assets/api.js @@ -2,11 +2,11 @@ { function setupTheme() { - const kCustomPreference = 'customDarkTheme'; - const userSettings = sessionStorage.getItem(kCustomPreference); + const storedTheme = localStorage.getItem('theme'); const themeToggleButton = document.getElementById('theme-toggle-btn'); - if (userSettings === null && window.matchMedia) { + // Follow operating system theme preference + if (storedTheme === null && window.matchMedia) { const mq = window.matchMedia('(prefers-color-scheme: dark)'); if ('onchange' in mq) { @@ -24,20 +24,14 @@ ); } } - - if (mq.matches) { - document.documentElement.classList.add('dark-mode'); - } - } else if (userSettings === 'true') { - document.documentElement.classList.add('dark-mode'); } if (themeToggleButton) { themeToggleButton.hidden = false; themeToggleButton.addEventListener('click', function() { - sessionStorage.setItem( - kCustomPreference, - document.documentElement.classList.toggle('dark-mode'), + localStorage.setItem( + 'theme', + document.documentElement.classList.toggle('dark-mode') ? 'dark' : 'light', ); }); } diff --git a/doc/changelogs/CHANGELOG_V18.md b/doc/changelogs/CHANGELOG_V18.md index 62f249b2c18adc..ce6a317efe48dd 100644 --- a/doc/changelogs/CHANGELOG_V18.md +++ b/doc/changelogs/CHANGELOG_V18.md @@ -9,6 +9,7 @@ +18.19.0
    18.18.2
    18.18.1
    18.18.0
    @@ -65,6 +66,466 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + + +## 2023-11-29, Version 18.19.0 'Hydrogen' (LTS), @targos + +### Notable Changes + +#### npm updated to v10 + +After two months of baking time in Node.js 20, npm 10 is backported, so that all +release lines include a supported version of npm. This release includes npm v10.2.3. + +Refer to for the plan to land npm 10. + +#### ESM and customization hook changes + +##### Leverage loaders when resolving subsequent loaders + +Loaders now apply to subsequent loaders, for example: `--experimental-loader ts-node --experimental-loader loader-written-in-typescript`. + +Contributed by Maël Nison in [#43772](https://github.com/nodejs/node/pull/43772). + +##### New `node:module` API `register` for module customization hooks; new `initialize` hook + +There is a new API `register` available on `node:module` to specify a file that exports module customization hooks, and pass data to the hooks, and establish communication channels with them. The “define the file with the hooks” part was previously handled by a flag `--experimental-loader`, but when the hooks moved into a dedicated thread in 20.0.0 there was a need to provide a way to communicate between the main (application) thread and the hooks thread. This can now be done by calling `register` from the main thread and passing data, including `MessageChannel` instances. + +We encourage users to migrate to an approach that uses [`--import`](https://nodejs.org/api/cli.html#--importmodule) with `register`, such as: + +```bash +node --import ./file-that-calls-register.js ./app.js +``` + +Using `--import` ensures that the customization hooks are registered before any application code runs, even the entry point. + +Contributed by João Lenon and Jacob Smith in [#46826](https://github.com/nodejs/node/pull/46826), Izaak Schroeder and Jacob Smith in [#48842](https://github.com/nodejs/node/pull/48842) and [#48559](https://github.com/nodejs/node/pull/48559). + +##### `import.meta.resolve` unflagged + +In ES modules, [`import.meta.resolve(specifier)`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/import.meta/resolve) +can be used to get an absolute URL string to which `specifier` resolves, similar +to `require.resolve` in CommonJS. This aligns Node.js with browsers and other server-side runtimes. + +Contributed by Guy Bedford in [#49028](https://github.com/nodejs/node/pull/49028). + +##### `--experimental-default-type` flag to flip module defaults + +The new flag `--experimental-default-type` can be used to flip the default +module system used by Node.js. Input that is already explicitly defined as ES +modules or CommonJS, such as by a `package.json` `"type"` field or `.mjs`/`.cjs` +file extension or the `--input-type` flag, is unaffected. What is currently +implicitly CommonJS would instead be interpreted as ES modules under +`--experimental-default-type=module`: + +* String input provided via `--eval` or STDIN, if `--input-type` is unspecified. + +* Files ending in `.js` or with no extension, if there is no `package.json` file + present in the same folder or any parent folder. + +* Files ending in `.js` or with no extension, if the nearest parent + `package.json` field lacks a `type` field; unless the folder is inside a + `node_modules` folder. + +In addition, extensionless files are interpreted as Wasm if +`--experimental-wasm-modules` is passed and the file contains the "magic bytes" +Wasm header. + +Contributed by Geoffrey Booth in [#49869](https://github.com/nodejs/node/pull/49869). + +##### Other ESM-related changes + +* \[[`ed2d46f4cc`](https://github.com/nodejs/node/commit/ed2d46f4cc)] - **doc**: move and rename loaders section (Geoffrey Booth) [#49261](https://github.com/nodejs/node/pull/49261) +* \[[`92734d4480`](https://github.com/nodejs/node/commit/92734d4480)] - **esm**: use import attributes instead of import assertions (Antoine du Hamel) [#50140](https://github.com/nodejs/node/pull/50140) +* \[[`e96f7ef881`](https://github.com/nodejs/node/commit/e96f7ef881)] - **(SEMVER-MINOR)** **vm**: use import attributes instead of import assertions (Antoine du Hamel) [#50141](https://github.com/nodejs/node/pull/50141) + +#### Test runner changes + +Many changes to the built-in test runner have been backported. This includes +the following additions: + +* \[[`b283ae4238`](https://github.com/nodejs/node/commit/b283ae4238)] - **(SEMVER-MINOR)** **test\_runner**: accept `testOnly` in `run` (Moshe Atlow) [#49753](https://github.com/nodejs/node/pull/49753) +* \[[`059b1945d8`](https://github.com/nodejs/node/commit/059b1945d8)] - **(SEMVER-MINOR)** **test\_runner**: add junit reporter (Moshe Atlow) [#49614](https://github.com/nodejs/node/pull/49614) +* \[[`d61a505546`](https://github.com/nodejs/node/commit/d61a505546)] - **(SEMVER-MINOR)** **test\_runner**: expose location of tests (Colin Ihrig) [#48975](https://github.com/nodejs/node/pull/48975) +* \[[`b55eb2a8d1`](https://github.com/nodejs/node/commit/b55eb2a8d1)] - **(SEMVER-MINOR)** **test\_runner**: add shards support (Raz Luvaton) [#48639](https://github.com/nodejs/node/pull/48639) +* \[[`05e7f28b40`](https://github.com/nodejs/node/commit/05e7f28b40)] - **(SEMVER-MINOR)** **test\_runner**: add initial draft for fakeTimers (Erick Wendel) [#47775](https://github.com/nodejs/node/pull/47775) +* \[[`428301ad27`](https://github.com/nodejs/node/commit/428301ad27)] - **(SEMVER-MINOR)** **test\_runner, cli**: add --test-concurrency flag (Colin Ihrig) [#49996](https://github.com/nodejs/node/pull/49996) + +#### Other notable changes + +* \[[`0c4a84e8e9`](https://github.com/nodejs/node/commit/0c4a84e8e9)] - **(SEMVER-MINOR)** **deps**: update uvwasi to 0.0.19 (Node.js GitHub Bot) [#49908](https://github.com/nodejs/node/pull/49908) +* \[[`fae60c5841`](https://github.com/nodejs/node/commit/fae60c5841)] - **stream**: use bitmap in readable state (Benjamin Gruenbaum) [#49745](https://github.com/nodejs/node/pull/49745) +* \[[`17246be158`](https://github.com/nodejs/node/commit/17246be158)] - **(SEMVER-MINOR)** **lib**: add api to detect whether source-maps are enabled (翠 / green) [#46391](https://github.com/nodejs/node/pull/46391) +* \[[`2e9f7284a1`](https://github.com/nodejs/node/commit/2e9f7284a1)] - **(SEMVER-MINOR)** **lib**: add tracing channel to diagnostics\_channel (Stephen Belanger) [#44943](https://github.com/nodejs/node/pull/44943) +* \[[`cc7bf1f641`](https://github.com/nodejs/node/commit/cc7bf1f641)] - **(SEMVER-MINOR)** **src**: add cjs\_module\_lexer\_version base64\_version (Jithil P Ponnan) [#45629](https://github.com/nodejs/node/pull/45629) +* \[[`b5d16cd8f0`](https://github.com/nodejs/node/commit/b5d16cd8f0)] - **(SEMVER-MINOR)** **tls**: add ALPNCallback server option for dynamic ALPN negotiation (Tim Perry) [#45190](https://github.com/nodejs/node/pull/45190) + +### Commits + +* \[[`0d0eb47e2a`](https://github.com/nodejs/node/commit/0d0eb47e2a)] - **benchmark**: add benchmarks for the test\_runner (Raz Luvaton) [#48931](https://github.com/nodejs/node/pull/48931) +* \[[`8bb03d10f4`](https://github.com/nodejs/node/commit/8bb03d10f4)] - **benchmark**: differentiate whatwg and legacy url (Yagiz Nizipli) [#47377](https://github.com/nodejs/node/pull/47377) +* \[[`3d7734cbe3`](https://github.com/nodejs/node/commit/3d7734cbe3)] - **benchmark**: lower URL.canParse runs (Khafra) [#47351](https://github.com/nodejs/node/pull/47351) +* \[[`24d3fcf415`](https://github.com/nodejs/node/commit/24d3fcf415)] - **benchmark**: stablize encode benchmark (Joyee Cheung) [#46658](https://github.com/nodejs/node/pull/46658) +* \[[`e08fd98bcc`](https://github.com/nodejs/node/commit/e08fd98bcc)] - **bootstrap**: use correct descriptor for Symbol.{dispose,asyncDispose} (Jordan Harband) [#48703](https://github.com/nodejs/node/pull/48703) +* \[[`cf9ddcd6c8`](https://github.com/nodejs/node/commit/cf9ddcd6c8)] - **bootstrap**: simplify initialization of source map handlers (Joyee Cheung) [#48304](https://github.com/nodejs/node/pull/48304) +* \[[`12d731e431`](https://github.com/nodejs/node/commit/12d731e431)] - **bootstrap**: log isolate data info in mksnapshot debug logs (Joyee Cheung) [#47768](https://github.com/nodejs/node/pull/47768) +* \[[`d66873871a`](https://github.com/nodejs/node/commit/d66873871a)] - **bootstrap**: store internal loaders in C++ via a binding (Joyee Cheung) [#47215](https://github.com/nodejs/node/pull/47215) +* \[[`1a499c5082`](https://github.com/nodejs/node/commit/1a499c5082)] - **bootstrap**: optimize modules loaded in the built-in snapshot (Joyee Cheung) [#45849](https://github.com/nodejs/node/pull/45849) +* \[[`e0e09caafe`](https://github.com/nodejs/node/commit/e0e09caafe)] - **bootstrap**: make CJS loader snapshotable (Joyee Cheung) [#45849](https://github.com/nodejs/node/pull/45849) +* \[[`5f37decd56`](https://github.com/nodejs/node/commit/5f37decd56)] - **bootstrap**: include event\_target into the built-in snapshot (Joyee Cheung) [#45849](https://github.com/nodejs/node/pull/45849) +* \[[`c3f56a3dee`](https://github.com/nodejs/node/commit/c3f56a3dee)] - **bootstrap**: support module\_wrap binding in snapshot (Joyee Cheung) [#45849](https://github.com/nodejs/node/pull/45849) +* \[[`6466acbc89`](https://github.com/nodejs/node/commit/6466acbc89)] - **bootstrap**: lazy load non-essential modules (Joyee Cheung) [#45659](https://github.com/nodejs/node/pull/45659) +* \[[`a0d4b69df4`](https://github.com/nodejs/node/commit/a0d4b69df4)] - **bootstrap**: lazy-load Performance.prototype.timeOrigin (Joyee Cheung) [#46425](https://github.com/nodejs/node/pull/46425) +* \[[`c1bc8118e3`](https://github.com/nodejs/node/commit/c1bc8118e3)] - **bootstrap**: generate bootstrapper arguments in BuiltinLoader (Joyee Cheung) [#44488](https://github.com/nodejs/node/pull/44488) +* \[[`075c57e88b`](https://github.com/nodejs/node/commit/075c57e88b)] - **build**: add symlink to `compile_commands.json` file if needed (Juan José) [#49260](https://github.com/nodejs/node/pull/49260) +* \[[`9e1c531b8d`](https://github.com/nodejs/node/commit/9e1c531b8d)] - **build**: expand when we run internet tests (Michael Dawson) [#49218](https://github.com/nodejs/node/pull/49218) +* \[[`a781d24624`](https://github.com/nodejs/node/commit/a781d24624)] - **build**: fix typo `libray` -> `library` (configure.py) (michalbiesek) [#49106](https://github.com/nodejs/node/pull/49106) +* \[[`f2eccb7a04`](https://github.com/nodejs/node/commit/f2eccb7a04)] - **build**: fix `configure --link-module` (Richard Lau) [#48522](https://github.com/nodejs/node/pull/48522) +* \[[`a44d555494`](https://github.com/nodejs/node/commit/a44d555494)] - **build**: fix IBM i build with Python 3.9 (Richard Lau) [#48056](https://github.com/nodejs/node/pull/48056) +* \[[`7f68e14ea2`](https://github.com/nodejs/node/commit/7f68e14ea2)] - **child\_process**: improve spawn performance on Linux (Keyhan Vakil) [#48523](https://github.com/nodejs/node/pull/48523) +* \[[`76e4d4117c`](https://github.com/nodejs/node/commit/76e4d4117c)] - **crypto**: ensure valid point on elliptic curve in SubtleCrypto.importKey (Filip Skokan) [#50234](https://github.com/nodejs/node/pull/50234) +* \[[`7af54279b5`](https://github.com/nodejs/node/commit/7af54279b5)] - **deps**: V8: cherry-pick 70caf337c3f6 (kxxt) [#50506](https://github.com/nodejs/node/pull/50506) +* \[[`49c5495339`](https://github.com/nodejs/node/commit/49c5495339)] - **deps**: update zlib to 1.2.13.1-motley-fef5869 (Node.js GitHub Bot) [#50085](https://github.com/nodejs/node/pull/50085) +* \[[`e0fd52bf07`](https://github.com/nodejs/node/commit/e0fd52bf07)] - **deps**: update googletest to 2dd1c13 (Node.js GitHub Bot) [#50081](https://github.com/nodejs/node/pull/50081) +* \[[`1b103cc567`](https://github.com/nodejs/node/commit/1b103cc567)] - **deps**: update googletest to e47544a (Node.js GitHub Bot) [#49982](https://github.com/nodejs/node/pull/49982) +* \[[`736c869eeb`](https://github.com/nodejs/node/commit/736c869eeb)] - **deps**: update googletest to d1467f5 (Node.js GitHub Bot) [#49676](https://github.com/nodejs/node/pull/49676) +* \[[`cd99ee1f35`](https://github.com/nodejs/node/commit/cd99ee1f35)] - **deps**: update googletest to 8a6feab (Node.js GitHub Bot) [#49463](https://github.com/nodejs/node/pull/49463) +* \[[`5c338573ff`](https://github.com/nodejs/node/commit/5c338573ff)] - **deps**: update zlib to 1.2.13.1-motley-f5fd0ad (Node.js GitHub Bot) [#49252](https://github.com/nodejs/node/pull/49252) +* \[[`374ec3d623`](https://github.com/nodejs/node/commit/374ec3d623)] - **deps**: update googletest to 7e33b6a (Node.js GitHub Bot) [#49034](https://github.com/nodejs/node/pull/49034) +* \[[`c15dd6679b`](https://github.com/nodejs/node/commit/c15dd6679b)] - **deps**: update zlib to 1.2.13.1-motley-526382e (Node.js GitHub Bot) [#49033](https://github.com/nodejs/node/pull/49033) +* \[[`588bd5e524`](https://github.com/nodejs/node/commit/588bd5e524)] - **deps**: update googletest to c875c4e (Node.js GitHub Bot) [#48964](https://github.com/nodejs/node/pull/48964) +* \[[`6059b59018`](https://github.com/nodejs/node/commit/6059b59018)] - **deps**: update zlib to 1.2.13.1-motley-61dc0bd (Node.js GitHub Bot) [#48788](https://github.com/nodejs/node/pull/48788) +* \[[`e455dd4003`](https://github.com/nodejs/node/commit/e455dd4003)] - **deps**: update googletest to cc36671 (Node.js GitHub Bot) [#48789](https://github.com/nodejs/node/pull/48789) +* \[[`747fbb49ca`](https://github.com/nodejs/node/commit/747fbb49ca)] - **deps**: V8: cherry-pick 1a782f6543ae (Keyhan Vakil) [#48523](https://github.com/nodejs/node/pull/48523) +* \[[`272e55c66f`](https://github.com/nodejs/node/commit/272e55c66f)] - **deps**: upgrade npm to 10.2.3 (npm team) [#50531](https://github.com/nodejs/node/pull/50531) +* \[[`3f6dcc62e5`](https://github.com/nodejs/node/commit/3f6dcc62e5)] - **deps**: update archs files for openssl-3.0.12+quic1 (Node.js GitHub Bot) [#50411](https://github.com/nodejs/node/pull/50411) +* \[[`da26cdbe84`](https://github.com/nodejs/node/commit/da26cdbe84)] - **deps**: upgrade openssl sources to quictls/openssl-3.0.12+quic1 (Node.js GitHub Bot) [#50411](https://github.com/nodejs/node/pull/50411) +* \[[`23069c34b2`](https://github.com/nodejs/node/commit/23069c34b2)] - **deps**: V8: cherry-pick d69c7937c99d (Michaël Zasso) [#46425](https://github.com/nodejs/node/pull/46425) +* \[[`5f852cc9fe`](https://github.com/nodejs/node/commit/5f852cc9fe)] - **deps**: V8: cherry-pick f7d000a7ae7b (Luke Albao) [#50344](https://github.com/nodejs/node/pull/50344) +* \[[`0c4a84e8e9`](https://github.com/nodejs/node/commit/0c4a84e8e9)] - **(SEMVER-MINOR)** **deps**: update uvwasi to 0.0.19 (Node.js GitHub Bot) [#49908](https://github.com/nodejs/node/pull/49908) +* \[[`8682b90d02`](https://github.com/nodejs/node/commit/8682b90d02)] - **deps**: update simdutf to 3.2.18 (Node.js GitHub Bot) [#50091](https://github.com/nodejs/node/pull/50091) +* \[[`11ecd06aeb`](https://github.com/nodejs/node/commit/11ecd06aeb)] - **deps**: update simdutf to 3.2.17 (Node.js GitHub Bot) [#49019](https://github.com/nodejs/node/pull/49019) +* \[[`43bfe5f020`](https://github.com/nodejs/node/commit/43bfe5f020)] - **deps**: upgrade npm to 10.2.0 (npm team) [#50027](https://github.com/nodejs/node/pull/50027) +* \[[`a140bc284b`](https://github.com/nodejs/node/commit/a140bc284b)] - **deps**: upgrade npm to 10.1.0 (npm team) [#49570](https://github.com/nodejs/node/pull/49570) +* \[[`65ca41c276`](https://github.com/nodejs/node/commit/65ca41c276)] - **(SEMVER-MINOR)** **deps**: upgrade npm to 10.0.0 (npm team) [#49423](https://github.com/nodejs/node/pull/49423) +* \[[`df1ff8e3da`](https://github.com/nodejs/node/commit/df1ff8e3da)] - **deps**: fix call to undeclared functions 'ntohl' and 'htons' (MatteoBax) [#49979](https://github.com/nodejs/node/pull/49979) +* \[[`f228dc7955`](https://github.com/nodejs/node/commit/f228dc7955)] - **deps**: update corepack to 0.22.0 (Node.js GitHub Bot) [#50325](https://github.com/nodejs/node/pull/50325) +* \[[`4324ebab67`](https://github.com/nodejs/node/commit/4324ebab67)] - **deps**: update corepack to 0.21.0 (Node.js GitHub Bot) [#50088](https://github.com/nodejs/node/pull/50088) +* \[[`1cabb77659`](https://github.com/nodejs/node/commit/1cabb77659)] - **deps**: update corepack to 0.20.0 (Node.js GitHub Bot) [#49464](https://github.com/nodejs/node/pull/49464) +* \[[`04227b287e`](https://github.com/nodejs/node/commit/04227b287e)] - **deps**: update c-ares to 1.20.1 (Node.js GitHub Bot) [#50082](https://github.com/nodejs/node/pull/50082) +* \[[`13e69ee11c`](https://github.com/nodejs/node/commit/13e69ee11c)] - **deps**: update c-ares to 1.20.0 (Node.js GitHub Bot) [#50082](https://github.com/nodejs/node/pull/50082) +* \[[`ac717df17e`](https://github.com/nodejs/node/commit/ac717df17e)] - **deps**: update ada to 2.7.2 (Node.js GitHub Bot) [#50338](https://github.com/nodejs/node/pull/50338) +* \[[`6885fc9386`](https://github.com/nodejs/node/commit/6885fc9386)] - **deps**: update ada to 2.6.10 (Node.js GitHub Bot) [#49984](https://github.com/nodejs/node/pull/49984) +* \[[`76c5f4039f`](https://github.com/nodejs/node/commit/76c5f4039f)] - **deps**: update ada to 2.6.9 (Node.js GitHub Bot) [#49340](https://github.com/nodejs/node/pull/49340) +* \[[`597ea77422`](https://github.com/nodejs/node/commit/597ea77422)] - **deps**: update ada to 2.6.8 (Node.js GitHub Bot) [#49340](https://github.com/nodejs/node/pull/49340) +* \[[`8e7dcba553`](https://github.com/nodejs/node/commit/8e7dcba553)] - **deps**: update ada to 2.6.7 (Node.js GitHub Bot) [#49340](https://github.com/nodejs/node/pull/49340) +* \[[`9f2037e8ee`](https://github.com/nodejs/node/commit/9f2037e8ee)] - **deps**: update ada to 2.6.5 (Node.js GitHub Bot) [#49340](https://github.com/nodejs/node/pull/49340) +* \[[`4723976703`](https://github.com/nodejs/node/commit/4723976703)] - **deps**: update ada to 2.6.3 (Node.js GitHub Bot) [#49340](https://github.com/nodejs/node/pull/49340) +* \[[`7ccb478664`](https://github.com/nodejs/node/commit/7ccb478664)] - **deps**: update undici to 5.26.4 (Node.js GitHub Bot) [#50274](https://github.com/nodejs/node/pull/50274) +* \[[`88f9ebb770`](https://github.com/nodejs/node/commit/88f9ebb770)] - **diagnostics\_channel**: fix ref counting bug when reaching zero subscribers (Stephen Belanger) [#47520](https://github.com/nodejs/node/pull/47520) +* \[[`284a869540`](https://github.com/nodejs/node/commit/284a869540)] - **dns**: call `ada::idna::to_ascii` directly from c++ (Yagiz Nizipli) [#47920](https://github.com/nodejs/node/pull/47920) +* \[[`10968370b5`](https://github.com/nodejs/node/commit/10968370b5)] - **doc**: drop github actions check in sec release process (Rafael Gonzaga) [#48978](https://github.com/nodejs/node/pull/48978) +* \[[`07c3b88c74`](https://github.com/nodejs/node/commit/07c3b88c74)] - **doc**: remove `@anonrig` from performance initiative (Yagiz Nizipli) [#49641](https://github.com/nodejs/node/pull/49641) +* \[[`e26b89e8be`](https://github.com/nodejs/node/commit/e26b89e8be)] - **doc**: fix node-api call example (Chengzhong Wu) [#49395](https://github.com/nodejs/node/pull/49395) +* \[[`4c93905f6c`](https://github.com/nodejs/node/commit/4c93905f6c)] - **doc**: add news issue for Diagnostics WG (Michael Dawson) [#49306](https://github.com/nodejs/node/pull/49306) +* \[[`3f1a237a8f`](https://github.com/nodejs/node/commit/3f1a237a8f)] - **doc**: add print results for examples in `StringDecoder` (Jungku Lee) [#49326](https://github.com/nodejs/node/pull/49326) +* \[[`45caad82bb`](https://github.com/nodejs/node/commit/45caad82bb)] - **doc**: update outdated reference to NIST SP 800-131A (Tobias Nießen) [#49316](https://github.com/nodejs/node/pull/49316) +* \[[`62f823d5a2`](https://github.com/nodejs/node/commit/62f823d5a2)] - **doc**: use `cjs` as block code's type in `MockTimers` (Deokjin Kim) [#49309](https://github.com/nodejs/node/pull/49309) +* \[[`0dda724d3f`](https://github.com/nodejs/node/commit/0dda724d3f)] - **doc**: update `options.filter` description for `fs.cp` (Shubham Pandey) [#49289](https://github.com/nodejs/node/pull/49289) +* \[[`4ba11e352b`](https://github.com/nodejs/node/commit/4ba11e352b)] - **doc**: avoid "not currently recommended" (Tobias Nießen) [#49300](https://github.com/nodejs/node/pull/49300) +* \[[`9ca85b58b3`](https://github.com/nodejs/node/commit/9ca85b58b3)] - **doc**: modify param description for end(),write() in `StringDecoder` (Jungku Lee) [#49285](https://github.com/nodejs/node/pull/49285) +* \[[`3f771cab67`](https://github.com/nodejs/node/commit/3f771cab67)] - **doc**: use NODE\_API\_SUPPORTED\_VERSION\_MAX in release doc (Cheng Zhao) [#49268](https://github.com/nodejs/node/pull/49268) +* \[[`f181c37e75`](https://github.com/nodejs/node/commit/f181c37e75)] - **doc**: fix typo in `stream.finished` documentation (Antoine du Hamel) [#49271](https://github.com/nodejs/node/pull/49271) +* \[[`c70945ddc2`](https://github.com/nodejs/node/commit/c70945ddc2)] - **doc**: update description for `percent_encode` sets in `WHATWG API` (Jungku Lee) [#49258](https://github.com/nodejs/node/pull/49258) +* \[[`f9c2a3fb3e`](https://github.com/nodejs/node/commit/f9c2a3fb3e)] - **doc**: clarify use of Uint8Array for n-api (Fedor Indutny) [#48742](https://github.com/nodejs/node/pull/48742) +* \[[`bf22a5f66e`](https://github.com/nodejs/node/commit/bf22a5f66e)] - **doc**: use same name in the doc as in the code (Hyunjin Kim) [#49216](https://github.com/nodejs/node/pull/49216) +* \[[`72bd527fb6`](https://github.com/nodejs/node/commit/72bd527fb6)] - **doc**: add notable-change label mention to PR template (Rafael Gonzaga) [#49188](https://github.com/nodejs/node/pull/49188) +* \[[`2247e52fe0`](https://github.com/nodejs/node/commit/2247e52fe0)] - **doc**: add h1 summary to security release process (Rafael Gonzaga) [#49112](https://github.com/nodejs/node/pull/49112) +* \[[`3b82e9aed1`](https://github.com/nodejs/node/commit/3b82e9aed1)] - **doc**: fix wording in napi\_async\_init (Tobias Nießen) [#49180](https://github.com/nodejs/node/pull/49180) +* \[[`55171d88a0`](https://github.com/nodejs/node/commit/55171d88a0)] - **doc**: fix `Type` notation in webstreams (Deokjin Kim) [#49121](https://github.com/nodejs/node/pull/49121) +* \[[`79c0497398`](https://github.com/nodejs/node/commit/79c0497398)] - **doc**: make the NODE\_VERSION\_IS\_RELEASE revert clear (Rafael Gonzaga) [#49114](https://github.com/nodejs/node/pull/49114) +* \[[`7ee26fb8df`](https://github.com/nodejs/node/commit/7ee26fb8df)] - **doc**: update with latest security release (Rafael Gonzaga) [#49085](https://github.com/nodejs/node/pull/49085) +* \[[`9ce73964be`](https://github.com/nodejs/node/commit/9ce73964be)] - **doc**: add description for `--port` flag of `node inspect` (Michael Bianco) [#48785](https://github.com/nodejs/node/pull/48785) +* \[[`633b8cd181`](https://github.com/nodejs/node/commit/633b8cd181)] - **doc**: add missing period (Rich Trott) [#49094](https://github.com/nodejs/node/pull/49094) +* \[[`6daa9ec2a4`](https://github.com/nodejs/node/commit/6daa9ec2a4)] - **doc**: add ESM examples in http.md (btea) [#47763](https://github.com/nodejs/node/pull/47763) +* \[[`12b83e81b9`](https://github.com/nodejs/node/commit/12b83e81b9)] - **doc**: detailed description of keystrokes Ctrl-Y and Meta-Y (Ray) [#43529](https://github.com/nodejs/node/pull/43529) +* \[[`ead654f976`](https://github.com/nodejs/node/commit/ead654f976)] - **doc**: clarify use of process.env in worker threads on Windows (Daeyeon Jeong) [#49008](https://github.com/nodejs/node/pull/49008) +* \[[`4047947838`](https://github.com/nodejs/node/commit/4047947838)] - **doc**: remove v14 mention (Rafael Gonzaga) [#49005](https://github.com/nodejs/node/pull/49005) +* \[[`833c643eb4`](https://github.com/nodejs/node/commit/833c643eb4)] - **doc**: run license-builder (github-actions\[bot]) [#48898](https://github.com/nodejs/node/pull/48898) +* \[[`cb43717c97`](https://github.com/nodejs/node/commit/cb43717c97)] - **doc**: add ver of 18.x where Node-api 9 is supported (Michael Dawson) [#48876](https://github.com/nodejs/node/pull/48876) +* \[[`a8d5c16a2a`](https://github.com/nodejs/node/commit/a8d5c16a2a)] - **doc**: include experimental features assessment (Rafael Gonzaga) [#48824](https://github.com/nodejs/node/pull/48824) +* \[[`e6d8735e2b`](https://github.com/nodejs/node/commit/e6d8735e2b)] - **doc**: add new TSC members (Michael Dawson) [#48841](https://github.com/nodejs/node/pull/48841) +* \[[`d4fe00d0c7`](https://github.com/nodejs/node/commit/d4fe00d0c7)] - **doc**: refactor node-api support matrix (Michael Dawson) [#48774](https://github.com/nodejs/node/pull/48774) +* \[[`629132d84c`](https://github.com/nodejs/node/commit/629132d84c)] - **doc**: declare `path` on example of `async_hooks.executionAsyncId()` (Deokjin Kim) [#48556](https://github.com/nodejs/node/pull/48556) +* \[[`dfd368ac9f`](https://github.com/nodejs/node/commit/dfd368ac9f)] - **doc**: remove the . in the end to reduce confusing (Jason) [#48719](https://github.com/nodejs/node/pull/48719) +* \[[`74d8f96413`](https://github.com/nodejs/node/commit/74d8f96413)] - **doc**: nodejs-social over nodejs/tweet (Rafael Gonzaga) [#48769](https://github.com/nodejs/node/pull/48769) +* \[[`73a7e00d06`](https://github.com/nodejs/node/commit/73a7e00d06)] - **doc**: add missing history info for `import.meta.resolve` (Antoine du Hamel) [#49700](https://github.com/nodejs/node/pull/49700) +* \[[`c20fdb4e52`](https://github.com/nodejs/node/commit/c20fdb4e52)] - **doc**: edit `import.meta.resolve` documentation (Antoine du Hamel) [#49247](https://github.com/nodejs/node/pull/49247) +* \[[`1ac389ecef`](https://github.com/nodejs/node/commit/1ac389ecef)] - **doc**: update module hooks docs (Geoffrey Booth) [#49265](https://github.com/nodejs/node/pull/49265) +* \[[`ed2d46f4cc`](https://github.com/nodejs/node/commit/ed2d46f4cc)] - **doc**: move and rename loaders section (Geoffrey Booth) [#49261](https://github.com/nodejs/node/pull/49261) +* \[[`258df0e72d`](https://github.com/nodejs/node/commit/258df0e72d)] - **doc**: add signature for `module.register` (Geoffrey Booth) [#49251](https://github.com/nodejs/node/pull/49251) +* \[[`58eaf3f6ae`](https://github.com/nodejs/node/commit/58eaf3f6ae)] - **doc**: caveat unavailability of `import.meta.resolve` in custom loaders (Jacob Smith) [#49242](https://github.com/nodejs/node/pull/49242) +* \[[`2fef28b2b9`](https://github.com/nodejs/node/commit/2fef28b2b9)] - **doc**: fix name of the flag in `initialize()` docs (Antoine du Hamel) [#49158](https://github.com/nodejs/node/pull/49158) +* \[[`15280fb42c`](https://github.com/nodejs/node/commit/15280fb42c)] - **doc**: add steps about signing the binary in single-executable docs (Darshan Sen) [#46764](https://github.com/nodejs/node/pull/46764) +* \[[`e374ba296c`](https://github.com/nodejs/node/commit/e374ba296c)] - **doc**: add "type" to test runner event details (Phil Nash) [#49014](https://github.com/nodejs/node/pull/49014) +* \[[`ec0a6c1f1b`](https://github.com/nodejs/node/commit/ec0a6c1f1b)] - **doc**: add new reporter events to custom reporter examples (Chemi Atlow) [#48903](https://github.com/nodejs/node/pull/48903) +* \[[`e8a32fb49b`](https://github.com/nodejs/node/commit/e8a32fb49b)] - **doc**: change duration to duration\_ms on test documentation (Ardi\_Nugraha) [#48892](https://github.com/nodejs/node/pull/48892) +* \[[`2b30c8b8a3`](https://github.com/nodejs/node/commit/2b30c8b8a3)] - **doc**: fix `globalPreload` example (bmacnaughton) [#50300](https://github.com/nodejs/node/pull/50300) +* \[[`8a57182769`](https://github.com/nodejs/node/commit/8a57182769)] - **doc,test**: extend the list of platforms supported by single-executables (Darshan Sen) [#47026](https://github.com/nodejs/node/pull/47026) +* \[[`92734d4480`](https://github.com/nodejs/node/commit/92734d4480)] - **esm**: use import attributes instead of import assertions (Antoine du Hamel) [#50140](https://github.com/nodejs/node/pull/50140) +* \[[`c3c945e654`](https://github.com/nodejs/node/commit/c3c945e654)] - **esm**: bypass CommonJS loader under --default-type (Geoffrey Booth) [#49986](https://github.com/nodejs/node/pull/49986) +* \[[`fe691984b2`](https://github.com/nodejs/node/commit/fe691984b2)] - **esm**: unflag extensionless javascript and wasm in module scope (Geoffrey Booth) [#49974](https://github.com/nodejs/node/pull/49974) +* \[[`56bd9a88ac`](https://github.com/nodejs/node/commit/56bd9a88ac)] - **esm**: --experimental-default-type flag to flip module defaults (Geoffrey Booth) [#49869](https://github.com/nodejs/node/pull/49869) +* \[[`72644d62e7`](https://github.com/nodejs/node/commit/72644d62e7)] - **esm**: improve JSDoc annotation of internal functions (Antoine du Hamel) [#49959](https://github.com/nodejs/node/pull/49959) +* \[[`957725f601`](https://github.com/nodejs/node/commit/957725f601)] - **esm**: require braces for modules code (Geoffrey Booth) [#49657](https://github.com/nodejs/node/pull/49657) +* \[[`c12685f82d`](https://github.com/nodejs/node/commit/c12685f82d)] - **esm**: fix cache collision on JSON files using file: URL (Antoine du Hamel) [#49887](https://github.com/nodejs/node/pull/49887) +* \[[`ed8dd33493`](https://github.com/nodejs/node/commit/ed8dd33493)] - **esm**: identify parent importing a url with invalid host (Jacob Smith) [#49736](https://github.com/nodejs/node/pull/49736) +* \[[`46d730ab75`](https://github.com/nodejs/node/commit/46d730ab75)] - **esm**: fix return type of `import.meta.resolve` (Antoine du Hamel) [#49698](https://github.com/nodejs/node/pull/49698) +* \[[`12cb700478`](https://github.com/nodejs/node/commit/12cb700478)] - **esm**: update loaders warning (Geoffrey Booth) [#49633](https://github.com/nodejs/node/pull/49633) +* \[[`47193a347e`](https://github.com/nodejs/node/commit/47193a347e)] - **esm**: fix support for `URL` instances in `register` (Antoine du Hamel) [#49655](https://github.com/nodejs/node/pull/49655) +* \[[`51ced0f1a1`](https://github.com/nodejs/node/commit/51ced0f1a1)] - **esm**: clarify ERR\_REQUIRE\_ESM errors (Daniel Compton) [#49521](https://github.com/nodejs/node/pull/49521) +* \[[`4be5612bae`](https://github.com/nodejs/node/commit/4be5612bae)] - **esm**: remove return value for `Module.register` (Antoine du Hamel) [#49529](https://github.com/nodejs/node/pull/49529) +* \[[`0875867e27`](https://github.com/nodejs/node/commit/0875867e27)] - **esm**: refactor test-esm-loader-resolve-type (Geoffrey Booth) [#49493](https://github.com/nodejs/node/pull/49493) +* \[[`9b7c9d93e9`](https://github.com/nodejs/node/commit/9b7c9d93e9)] - **esm**: refactor test-esm-named-exports (Geoffrey Booth) [#49493](https://github.com/nodejs/node/pull/49493) +* \[[`d1f5514917`](https://github.com/nodejs/node/commit/d1f5514917)] - **esm**: refactor mocking test (Geoffrey Booth) [#49465](https://github.com/nodejs/node/pull/49465) +* \[[`01ca6d277d`](https://github.com/nodejs/node/commit/01ca6d277d)] - **esm**: fix `globalPreload` warning (Antoine du Hamel) [#49069](https://github.com/nodejs/node/pull/49069) +* \[[`c1a84398b4`](https://github.com/nodejs/node/commit/c1a84398b4)] - **esm**: unflag import.meta.resolve (Guy Bedford) [#49028](https://github.com/nodejs/node/pull/49028) +* \[[`ef43f084e9`](https://github.com/nodejs/node/commit/ef43f084e9)] - **esm**: import.meta.resolve exact module not found errors should return (Guy Bedford) [#49038](https://github.com/nodejs/node/pull/49038) +* \[[`385f24c9cc`](https://github.com/nodejs/node/commit/385f24c9cc)] - **esm**: protect `ERR_UNSUPPORTED_DIR_IMPORT` against prototype pollution (Antoine du Hamel) [#49060](https://github.com/nodejs/node/pull/49060) +* \[[`10e7c3a376`](https://github.com/nodejs/node/commit/10e7c3a376)] - **esm**: add `initialize` hook, integrate with `register` (Izaak Schroeder) [#48842](https://github.com/nodejs/node/pull/48842) +* \[[`f96b610268`](https://github.com/nodejs/node/commit/f96b610268)] - **esm**: fix typo `parentUrl` -> `parentURL` (Antoine du Hamel) [#48999](https://github.com/nodejs/node/pull/48999) +* \[[`03c1b5e647`](https://github.com/nodejs/node/commit/03c1b5e647)] - **esm**: unflag `Module.register` and allow nested loader `import()` (Izaak Schroeder) [#48559](https://github.com/nodejs/node/pull/48559) +* \[[`63aa5d7270`](https://github.com/nodejs/node/commit/63aa5d7270)] - **esm**: add back `globalPreload` tests and fix failing ones (Antoine du Hamel) [#48779](https://github.com/nodejs/node/pull/48779) +* \[[`1c7be606f1`](https://github.com/nodejs/node/commit/1c7be606f1)] - **esm**: remove support for arrays in `import` internal method (Antoine du Hamel) [#48296](https://github.com/nodejs/node/pull/48296) +* \[[`655111fa00`](https://github.com/nodejs/node/commit/655111fa00)] - **esm**: handle `globalPreload` hook returning a nullish value (Antoine du Hamel) [#48249](https://github.com/nodejs/node/pull/48249) +* \[[`9938a8bf13`](https://github.com/nodejs/node/commit/9938a8bf13)] - **esm**: handle more error types thrown from the loader thread (Antoine du Hamel) [#48247](https://github.com/nodejs/node/pull/48247) +* \[[`8cab32a5d1`](https://github.com/nodejs/node/commit/8cab32a5d1)] - **esm**: do not use `'beforeExit'` on the main thread (Antoine du Hamel) [#47964](https://github.com/nodejs/node/pull/47964) +* \[[`b61efcce95`](https://github.com/nodejs/node/commit/b61efcce95)] - **esm**: rename `URLCanParse` to be consistent (Antoine du Hamel) [#47668](https://github.com/nodejs/node/pull/47668) +* \[[`ca20f5931d`](https://github.com/nodejs/node/commit/ca20f5931d)] - **esm**: remove support for deprecated hooks (Antoine du Hamel) [#47580](https://github.com/nodejs/node/pull/47580) +* \[[`5de37a1e37`](https://github.com/nodejs/node/commit/5de37a1e37)] - **esm**: initialize `import.meta` on eval (Antoine du Hamel) [#47551](https://github.com/nodejs/node/pull/47551) +* \[[`39fbce7313`](https://github.com/nodejs/node/commit/39fbce7313)] - **esm**: propagate `process.exit` from the loader thread to the main thread (Antoine du Hamel) [#47548](https://github.com/nodejs/node/pull/47548) +* \[[`2a528b76e6`](https://github.com/nodejs/node/commit/2a528b76e6)] - **esm**: avoid try/catch when validating urls (Yagiz Nizipli) [#47541](https://github.com/nodejs/node/pull/47541) +* \[[`bac9b1758f`](https://github.com/nodejs/node/commit/bac9b1758f)] - **esm**: move hook execution to separate thread (Jacob Smith) [#44710](https://github.com/nodejs/node/pull/44710) +* \[[`dfa444477a`](https://github.com/nodejs/node/commit/dfa444477a)] - **esm**: skip file: URL conversion to path when possible (Antoine du Hamel) [#46305](https://github.com/nodejs/node/pull/46305) +* \[[`45de8d1bd7`](https://github.com/nodejs/node/commit/45de8d1bd7)] - **esm**: allow resolve to return import assertions (Geoffrey Booth) [#46153](https://github.com/nodejs/node/pull/46153) +* \[[`5ffc90a06b`](https://github.com/nodejs/node/commit/5ffc90a06b)] - **esm**: move hooks handling into separate class (Geoffrey Booth) [#45869](https://github.com/nodejs/node/pull/45869) +* \[[`490b598dbf`](https://github.com/nodejs/node/commit/490b598dbf)] - **esm**: leverage loaders when resolving subsequent loaders (Maël Nison) [#43772](https://github.com/nodejs/node/pull/43772) +* \[[`acd987287c`](https://github.com/nodejs/node/commit/acd987287c)] - **events**: remove weak listener for event target (Raz Luvaton) [#48952](https://github.com/nodejs/node/pull/48952) +* \[[`69b7f91a92`](https://github.com/nodejs/node/commit/69b7f91a92)] - **fs**: remove redundant code in readableWebStream() (Deokjin Kim) [#49298](https://github.com/nodejs/node/pull/49298) +* \[[`ae8bb162b4`](https://github.com/nodejs/node/commit/ae8bb162b4)] - **fs**: remove redundant `nullCheck` (Livia Medeiros) [#48826](https://github.com/nodejs/node/pull/48826) +* \[[`48c25b154b`](https://github.com/nodejs/node/commit/48c25b154b)] - **fs**: make `mkdtemp` accept buffers and URL (LiviaMedeiros) [#48828](https://github.com/nodejs/node/pull/48828) +* \[[`edf46c1b59`](https://github.com/nodejs/node/commit/edf46c1b59)] - **fs**: move fs\_use\_promises\_symbol to per-isolate symbols (Joyee Cheung) [#47768](https://github.com/nodejs/node/pull/47768) +* \[[`fe41d22afc`](https://github.com/nodejs/node/commit/fe41d22afc)] - **fs**: use kResistStopPropagation (Chemi Atlow) [#48521](https://github.com/nodejs/node/pull/48521) +* \[[`7c758f60ab`](https://github.com/nodejs/node/commit/7c758f60ab)] - **fs**: fix readdir recursive sync & callback (Ethan Arrowood) [#48698](https://github.com/nodejs/node/pull/48698) +* \[[`8874b2e11d`](https://github.com/nodejs/node/commit/8874b2e11d)] - **http**: start connections checking interval on listen (Paolo Insogna) [#48611](https://github.com/nodejs/node/pull/48611) +* \[[`29697229b6`](https://github.com/nodejs/node/commit/29697229b6)] - **https**: fix connection checking interval not clearing on server close (Nitzan Uziely) [#48383](https://github.com/nodejs/node/pull/48383) +* \[[`981aa7866d`](https://github.com/nodejs/node/commit/981aa7866d)] - **lib**: fix MIME overmatch in data URLs (André Alves) [#49104](https://github.com/nodejs/node/pull/49104) +* \[[`fe26f8a860`](https://github.com/nodejs/node/commit/fe26f8a860)] - **lib**: merge cjs and esm package json reader caches (Yagiz Nizipli) [#48477](https://github.com/nodejs/node/pull/48477) +* \[[`17246be158`](https://github.com/nodejs/node/commit/17246be158)] - **(SEMVER-MINOR)** **lib**: add api to detect whether source-maps are enabled (翠 / green) [#46391](https://github.com/nodejs/node/pull/46391) +* \[[`2e9f7284a1`](https://github.com/nodejs/node/commit/2e9f7284a1)] - **(SEMVER-MINOR)** **lib**: add tracing channel to diagnostics\_channel (Stephen Belanger) [#44943](https://github.com/nodejs/node/pull/44943) +* \[[`04dad9c2f6`](https://github.com/nodejs/node/commit/04dad9c2f6)] - **lib**: fix BroadcastChannel initialization location (Shelley Vohr) [#46864](https://github.com/nodejs/node/pull/46864) +* \[[`671d2c0067`](https://github.com/nodejs/node/commit/671d2c0067)] - **lib**: fix DOMException property descriptors after being lazy loaded (Filip Skokan) [#46799](https://github.com/nodejs/node/pull/46799) +* \[[`9a4b57d6d4`](https://github.com/nodejs/node/commit/9a4b57d6d4)] - **lib**: improve esm resolve performance (Yagiz Nizipli) [#46652](https://github.com/nodejs/node/pull/46652) +* \[[`c6b2f56723`](https://github.com/nodejs/node/commit/c6b2f56723)] - **lib**: lazy-load deps in modules/run\_main.js (Joyee Cheung) [#45849](https://github.com/nodejs/node/pull/45849) +* \[[`baa280a4f6`](https://github.com/nodejs/node/commit/baa280a4f6)] - **lib**: lazy-load deps in source\_map\_cache.js (Joyee Cheung) [#45849](https://github.com/nodejs/node/pull/45849) +* \[[`00bdb72b6e`](https://github.com/nodejs/node/commit/00bdb72b6e)] - **lib**: add getLazy() method to internal/util (Joyee Cheung) [#45849](https://github.com/nodejs/node/pull/45849) +* \[[`b77a6b2376`](https://github.com/nodejs/node/commit/b77a6b2376)] - **loader**: use default loader as cascaded loader in the in loader worker (Joyee Cheung) [#47620](https://github.com/nodejs/node/pull/47620) +* \[[`7778e190b0`](https://github.com/nodejs/node/commit/7778e190b0)] - **meta**: move Trott to TSC regular member (Rich Trott) [#50297](https://github.com/nodejs/node/pull/50297) +* \[[`5b9575dd30`](https://github.com/nodejs/node/commit/5b9575dd30)] - **meta**: ping TSC for offboarding (Tobias Nießen) [#50147](https://github.com/nodejs/node/pull/50147) +* \[[`d24c3a0692`](https://github.com/nodejs/node/commit/d24c3a0692)] - **meta**: update website team with new name (Rich Trott) [#49883](https://github.com/nodejs/node/pull/49883) +* \[[`332d2aedb4`](https://github.com/nodejs/node/commit/332d2aedb4)] - **meta**: fix linter error (Antoine du Hamel) [#49755](https://github.com/nodejs/node/pull/49755) +* \[[`dc70c444f4`](https://github.com/nodejs/node/commit/dc70c444f4)] - **meta**: add primordials strategic initiative (Benjamin Gruenbaum) [#49706](https://github.com/nodejs/node/pull/49706) +* \[[`213a9f8a4b`](https://github.com/nodejs/node/commit/213a9f8a4b)] - **meta**: bump rtCamp/action-slack-notify from 2.2.0 to 2.2.1 (dependabot\[bot]) [#49437](https://github.com/nodejs/node/pull/49437) +* \[[`2827779faa`](https://github.com/nodejs/node/commit/2827779faa)] - **meta**: remove modules team from CODEOWNERS (Benjamin Gruenbaum) [#49412](https://github.com/nodejs/node/pull/49412) +* \[[`5d6daf0d01`](https://github.com/nodejs/node/commit/5d6daf0d01)] - **meta**: add test/reporters to codeowners (Chemi Atlow) [#49186](https://github.com/nodejs/node/pull/49186) +* \[[`dee7dc5d54`](https://github.com/nodejs/node/commit/dee7dc5d54)] - **meta**: bump actions/upload-artifact from 3.1.2 to 3.1.3 (dependabot\[bot]) [#50000](https://github.com/nodejs/node/pull/50000) +* \[[`98294fdeee`](https://github.com/nodejs/node/commit/98294fdeee)] - **meta**: bump actions/cache from 3.3.1 to 3.3.2 (dependabot\[bot]) [#50003](https://github.com/nodejs/node/pull/50003) +* \[[`79270327d0`](https://github.com/nodejs/node/commit/79270327d0)] - **meta**: bump github/codeql-action from 2.21.5 to 2.21.9 (dependabot\[bot]) [#50002](https://github.com/nodejs/node/pull/50002) +* \[[`6591a03c89`](https://github.com/nodejs/node/commit/6591a03c89)] - **meta**: bump github/codeql-action from 2.21.2 to 2.21.5 (dependabot\[bot]) [#49438](https://github.com/nodejs/node/pull/49438) +* \[[`3a107f80bc`](https://github.com/nodejs/node/commit/3a107f80bc)] - **meta**: bump actions/checkout from 3.6.0 to 4.1.0 (dependabot\[bot]) [#50001](https://github.com/nodejs/node/pull/50001) +* \[[`26c5c3c4a2`](https://github.com/nodejs/node/commit/26c5c3c4a2)] - **meta**: bump actions/checkout from 3.5.3 to 3.6.0 (dependabot\[bot]) [#49436](https://github.com/nodejs/node/pull/49436) +* \[[`0fc0b88d97`](https://github.com/nodejs/node/commit/0fc0b88d97)] - **meta**: bump step-security/harden-runner from 2.5.0 to 2.5.1 (dependabot\[bot]) [#49435](https://github.com/nodejs/node/pull/49435) +* \[[`dad5785d5d`](https://github.com/nodejs/node/commit/dad5785d5d)] - **meta**: bump actions/setup-node from 3.7.0 to 3.8.1 (dependabot\[bot]) [#49434](https://github.com/nodejs/node/pull/49434) +* \[[`155a275acb`](https://github.com/nodejs/node/commit/155a275acb)] - **meta**: move one or more collaborators to emeritus (Node.js GitHub Bot) [#49264](https://github.com/nodejs/node/pull/49264) +* \[[`bd17f0b992`](https://github.com/nodejs/node/commit/bd17f0b992)] - **meta**: mention nodejs/tsc when changing GH templates (Rafael Gonzaga) [#49189](https://github.com/nodejs/node/pull/49189) +* \[[`f6e68a0238`](https://github.com/nodejs/node/commit/f6e68a0238)] - **meta**: bump github/codeql-action from 2.20.1 to 2.21.2 (dependabot\[bot]) [#48986](https://github.com/nodejs/node/pull/48986) +* \[[`5c352eeecb`](https://github.com/nodejs/node/commit/5c352eeecb)] - **meta**: bump step-security/harden-runner from 2.4.1 to 2.5.0 (dependabot\[bot]) [#48985](https://github.com/nodejs/node/pull/48985) +* \[[`42ac5a6e5f`](https://github.com/nodejs/node/commit/42ac5a6e5f)] - **meta**: bump actions/setup-node from 3.6.0 to 3.7.0 (dependabot\[bot]) [#48984](https://github.com/nodejs/node/pull/48984) +* \[[`b0d769fe7c`](https://github.com/nodejs/node/commit/b0d769fe7c)] - **meta**: bump actions/setup-python from 4.6.1 to 4.7.0 (dependabot\[bot]) [#48983](https://github.com/nodejs/node/pull/48983) +* \[[`f62b24276c`](https://github.com/nodejs/node/commit/f62b24276c)] - **meta**: add mailmap entry for atlowChemi (Chemi Atlow) [#48810](https://github.com/nodejs/node/pull/48810) +* \[[`8c55f317a3`](https://github.com/nodejs/node/commit/8c55f317a3)] - **module**: move helpers out of cjs loader (Geoffrey Booth) [#49912](https://github.com/nodejs/node/pull/49912) +* \[[`14e148ee6c`](https://github.com/nodejs/node/commit/14e148ee6c)] - **module**: ensure successful import returns the same result (Antoine du Hamel) [#46662](https://github.com/nodejs/node/pull/46662) +* \[[`65dfe85f03`](https://github.com/nodejs/node/commit/65dfe85f03)] - **module**: implement `register` utility (João Lenon) [#46826](https://github.com/nodejs/node/pull/46826) +* \[[`6f0458d0a6`](https://github.com/nodejs/node/commit/6f0458d0a6)] - **module**: refactor to use `normalizeRequirableId` in the CJS module loader (Darshan Sen) [#47896](https://github.com/nodejs/node/pull/47896) +* \[[`89ed24b94a`](https://github.com/nodejs/node/commit/89ed24b94a)] - **module**: do less CJS module loader initialization at run time (Joyee Cheung) [#47194](https://github.com/nodejs/node/pull/47194) +* \[[`939c8764b8`](https://github.com/nodejs/node/commit/939c8764b8)] - **module**: move callbacks and conditions into modules/esm/utils.js (Joyee Cheung) [#45849](https://github.com/nodejs/node/pull/45849) +* \[[`a3b0f4cf55`](https://github.com/nodejs/node/commit/a3b0f4cf55)] - **module**: move modules/cjs/helpers.js to modules/helpers.js (Joyee Cheung) [#45849](https://github.com/nodejs/node/pull/45849) +* \[[`97579895f2`](https://github.com/nodejs/node/commit/97579895f2)] - **module, esm**: jsdoc for modules files (Geoffrey Booth) [#49523](https://github.com/nodejs/node/pull/49523) +* \[[`daca87bbef`](https://github.com/nodejs/node/commit/daca87bbef)] - **net**: use asserts in JS Socket Stream to catch races in future (Tim Perry) [#49400](https://github.com/nodejs/node/pull/49400) +* \[[`03063bd022`](https://github.com/nodejs/node/commit/03063bd022)] - **net**: fix crash due to simultaneous close/shutdown on JS Stream Sockets (Tim Perry) [#49400](https://github.com/nodejs/node/pull/49400) +* \[[`67fe7d8822`](https://github.com/nodejs/node/commit/67fe7d8822)] - **net**: fix setting of value in 'setDefaultAutoSelectFamilyAttemptTimeout' (Deokjin Kim) [#47012](https://github.com/nodejs/node/pull/47012) +* \[[`f449b222fd`](https://github.com/nodejs/node/commit/f449b222fd)] - **node-api**: update headers for better wasm support (Toyo Li) [#49037](https://github.com/nodejs/node/pull/49037) +* \[[`5148f030b8`](https://github.com/nodejs/node/commit/5148f030b8)] - **node-api**: run finalizers directly from GC (Vladimir Morozov) [#42651](https://github.com/nodejs/node/pull/42651) +* \[[`edef4fa668`](https://github.com/nodejs/node/commit/edef4fa668)] - **node-api**: enable uncaught exceptions policy by default (Chengzhong Wu) [#49313](https://github.com/nodejs/node/pull/49313) +* \[[`48a1b9336b`](https://github.com/nodejs/node/commit/48a1b9336b)] - **node-api**: fix compiler warning in node\_api.h (Michael Graeb) [#49103](https://github.com/nodejs/node/pull/49103) +* \[[`57966318fe`](https://github.com/nodejs/node/commit/57966318fe)] - **node-api**: avoid macro redefinition (Tobias Nießen) [#48879](https://github.com/nodejs/node/pull/48879) +* \[[`d4f26f4651`](https://github.com/nodejs/node/commit/d4f26f4651)] - **policy**: fix path to URL conversion (Antoine du Hamel) [#49133](https://github.com/nodejs/node/pull/49133) +* \[[`a625f22acb`](https://github.com/nodejs/node/commit/a625f22acb)] - **readline**: add paste bracket mode (Jakub Jankiewicz) [#47150](https://github.com/nodejs/node/pull/47150) +* \[[`bbafd42d75`](https://github.com/nodejs/node/commit/bbafd42d75)] - **repl**: display dynamic import variant in static import error messages (Hemanth HM) [#48129](https://github.com/nodejs/node/pull/48129) +* \[[`b8634eeb16`](https://github.com/nodejs/node/commit/b8634eeb16)] - **sea**: allow requiring core modules with the "node:" prefix (Darshan Sen) [#47779](https://github.com/nodejs/node/pull/47779) +* \[[`066d9d4492`](https://github.com/nodejs/node/commit/066d9d4492)] - **src**: remove unused function `GetName()` in node\_perf (Jungku Lee) [#49244](https://github.com/nodejs/node/pull/49244) +* \[[`158c91a38a`](https://github.com/nodejs/node/commit/158c91a38a)] - **src**: use ARES\_SUCCESS instead of 0 (Jungku Lee) [#49048](https://github.com/nodejs/node/pull/49048) +* \[[`8c33731ac6`](https://github.com/nodejs/node/commit/8c33731ac6)] - **src**: add a condition if the argument of `DomainToUnicode` is empty (Jungku Lee) [#49097](https://github.com/nodejs/node/pull/49097) +* \[[`67dba57d77`](https://github.com/nodejs/node/commit/67dba57d77)] - **src**: use ARES\_SUCCESS instead of 0 (Hyunjin Kim) [#48834](https://github.com/nodejs/node/pull/48834) +* \[[`97d87495c7`](https://github.com/nodejs/node/commit/97d87495c7)] - **src**: remove unnecessary temporary creation (Jason) [#48734](https://github.com/nodejs/node/pull/48734) +* \[[`f5384c3262`](https://github.com/nodejs/node/commit/f5384c3262)] - **src**: fix nullptr access on realm (Jan Olaf Krems) [#48802](https://github.com/nodejs/node/pull/48802) +* \[[`358273d77f`](https://github.com/nodejs/node/commit/358273d77f)] - **src**: remove OnScopeLeaveImpl's move assignment overload (Jason) [#48732](https://github.com/nodejs/node/pull/48732) +* \[[`cc7bf1f641`](https://github.com/nodejs/node/commit/cc7bf1f641)] - **(SEMVER-MINOR)** **src**: add cjs\_module\_lexer\_version base64\_version (Jithil P Ponnan) [#45629](https://github.com/nodejs/node/pull/45629) +* \[[`0a950c3752`](https://github.com/nodejs/node/commit/0a950c3752)] - **src**: add missing to\_ascii method in dns queries (Daniel Lemire) [#48354](https://github.com/nodejs/node/pull/48354) +* \[[`3552afb904`](https://github.com/nodejs/node/commit/3552afb904)] - **src**: fix duplication of externalized builtin code (Keyhan Vakil) [#47079](https://github.com/nodejs/node/pull/47079) +* \[[`66e4ba5062`](https://github.com/nodejs/node/commit/66e4ba5062)] - **src**: fix AliasedBuffer memory attribution in heap snapshots (Joyee Cheung) [#46817](https://github.com/nodejs/node/pull/46817) +* \[[`946f19b5e3`](https://github.com/nodejs/node/commit/946f19b5e3)] - **src**: move AliasedBuffer implementation to -inl.h (Joyee Cheung) [#46817](https://github.com/nodejs/node/pull/46817) +* \[[`d35f8702c9`](https://github.com/nodejs/node/commit/d35f8702c9)] - **src**: bootstrap prepare stack trace callback in shadow realm (Chengzhong Wu) [#47107](https://github.com/nodejs/node/pull/47107) +* \[[`3551a19205`](https://github.com/nodejs/node/commit/3551a19205)] - **src**: make BuiltinLoader threadsafe and non-global (Anna Henningsen) [#45942](https://github.com/nodejs/node/pull/45942) +* \[[`92311a0801`](https://github.com/nodejs/node/commit/92311a0801)] - **src**: define per-isolate internal bindings registration callback (Chengzhong Wu) [#45547](https://github.com/nodejs/node/pull/45547) +* \[[`629fc774ca`](https://github.com/nodejs/node/commit/629fc774ca)] - **src**: use an array for faster binding data lookup (Joyee Cheung) [#46620](https://github.com/nodejs/node/pull/46620) +* \[[`62e2e590fc`](https://github.com/nodejs/node/commit/62e2e590fc)] - **src**: fix TLSWrap lifetime bug in ALPN callback (Ben Noordhuis) [#49635](https://github.com/nodejs/node/pull/49635) +* \[[`fae60c5841`](https://github.com/nodejs/node/commit/fae60c5841)] - **stream**: use bitmap in readable state (Benjamin Gruenbaum) [#49745](https://github.com/nodejs/node/pull/49745) +* \[[`ee4fc7d78c`](https://github.com/nodejs/node/commit/ee4fc7d78c)] - **stream**: use Buffer.from when constructor is a Buffer (Matthew Aitken) [#49250](https://github.com/nodejs/node/pull/49250) +* \[[`651e4504ce`](https://github.com/nodejs/node/commit/651e4504ce)] - **stream**: add `highWaterMark` for the map operator (Raz Luvaton) [#49249](https://github.com/nodejs/node/pull/49249) +* \[[`d585d13127`](https://github.com/nodejs/node/commit/d585d13127)] - **stream**: improve WebStreams performance (Raz Luvaton) [#49089](https://github.com/nodejs/node/pull/49089) +* \[[`7f39f8e805`](https://github.com/nodejs/node/commit/7f39f8e805)] - **test**: replace forEach with for..of in test-http-perf\_hooks.js (Niya Shiyas) [#49818](https://github.com/nodejs/node/pull/49818) +* \[[`2f0ffde842`](https://github.com/nodejs/node/commit/2f0ffde842)] - **test**: replace forEach with for..of in test-net-isipv4.js (Niya Shiyas) [#49822](https://github.com/nodejs/node/pull/49822) +* \[[`bbd302b5ab`](https://github.com/nodejs/node/commit/bbd302b5ab)] - **test**: replace forEach with for..of in test-http2-server (Niya Shiyas) [#49819](https://github.com/nodejs/node/pull/49819) +* \[[`128ca3e213`](https://github.com/nodejs/node/commit/128ca3e213)] - **test**: replace forEach with for..of in test-http2-client-destroy.js (Niya Shiyas) [#49820](https://github.com/nodejs/node/pull/49820) +* \[[`a2ca1a605f`](https://github.com/nodejs/node/commit/a2ca1a605f)] - **test**: print instruction for creating missing snapshot in assertSnapshot (Raz Luvaton) [#48914](https://github.com/nodejs/node/pull/48914) +* \[[`a0bb30cdca`](https://github.com/nodejs/node/commit/a0bb30cdca)] - **test**: set `test-watch-mode-inspect` as flaky (Yagiz Nizipli) [#50259](https://github.com/nodejs/node/pull/50259) +* \[[`1047d95698`](https://github.com/nodejs/node/commit/1047d95698)] - **test**: set `test-emit-after-on-destroyed` as flaky (Yagiz Nizipli) [#50246](https://github.com/nodejs/node/pull/50246) +* \[[`91a3b57962`](https://github.com/nodejs/node/commit/91a3b57962)] - **test**: set inspector async stack test as flaky (Yagiz Nizipli) [#50244](https://github.com/nodejs/node/pull/50244) +* \[[`b41aa7b82a`](https://github.com/nodejs/node/commit/b41aa7b82a)] - **test**: set test-worker-nearheaplimit-deadlock flaky (StefanStojanovic) [#50277](https://github.com/nodejs/node/pull/50277) +* \[[`e81b066fb1`](https://github.com/nodejs/node/commit/e81b066fb1)] - **test**: set `test-cli-node-options` as flaky (Yagiz Nizipli) [#50296](https://github.com/nodejs/node/pull/50296) +* \[[`0c05c25c4e`](https://github.com/nodejs/node/commit/0c05c25c4e)] - **test**: set crypto-timing test as flaky (Yagiz Nizipli) [#50232](https://github.com/nodejs/node/pull/50232) +* \[[`83e339dbba`](https://github.com/nodejs/node/commit/83e339dbba)] - **test**: set `test-structuredclone-*` as flaky (Yagiz Nizipli) [#50261](https://github.com/nodejs/node/pull/50261) +* \[[`866a399488`](https://github.com/nodejs/node/commit/866a399488)] - **test**: set inspector async hook test as flaky (Yagiz Nizipli) [#50252](https://github.com/nodejs/node/pull/50252) +* \[[`cb0bd2116b`](https://github.com/nodejs/node/commit/cb0bd2116b)] - **test**: set parallel http server test as flaky (Yagiz Nizipli) [#50227](https://github.com/nodejs/node/pull/50227) +* \[[`54f3d877ae`](https://github.com/nodejs/node/commit/54f3d877ae)] - **test**: set test-worker-nearheaplimit-deadlock flaky (Stefan Stojanovic) [#50238](https://github.com/nodejs/node/pull/50238) +* \[[`5953a255b6`](https://github.com/nodejs/node/commit/5953a255b6)] - **test**: set `test-runner-watch-mode` as flaky (Yagiz Nizipli) [#50221](https://github.com/nodejs/node/pull/50221) +* \[[`5820d7e14d`](https://github.com/nodejs/node/commit/5820d7e14d)] - **test**: deflake test-runner-output (Moshe Atlow) [#49878](https://github.com/nodejs/node/pull/49878) +* \[[`1d75da43f2`](https://github.com/nodejs/node/commit/1d75da43f2)] - _**Revert**_ "**test**: mark test-http-regr-gh-2928 as flaky" (Luigi Pinca) [#49708](https://github.com/nodejs/node/pull/49708) +* \[[`5df23520e7`](https://github.com/nodejs/node/commit/5df23520e7)] - **test**: mark test-runner-watch-mode as flaky (Joyee Cheung) [#49627](https://github.com/nodejs/node/pull/49627) +* \[[`7e714e6497`](https://github.com/nodejs/node/commit/7e714e6497)] - **test**: remove --no-warnings flag in test\_runner fixtures (Raz Luvaton) [#48989](https://github.com/nodejs/node/pull/48989) +* \[[`0fea550641`](https://github.com/nodejs/node/commit/0fea550641)] - **test**: reorder test files fixtures for better understanding (Raz Luvaton) [#48787](https://github.com/nodejs/node/pull/48787) +* \[[`c5857bde42`](https://github.com/nodejs/node/commit/c5857bde42)] - **test**: avoid copying test source files (Chengzhong Wu) [#49515](https://github.com/nodejs/node/pull/49515) +* \[[`67cb6f9a34`](https://github.com/nodejs/node/commit/67cb6f9a34)] - **test**: reduce length in crypto keygen tests (Joyee Cheung) [#49221](https://github.com/nodejs/node/pull/49221) +* \[[`958e114655`](https://github.com/nodejs/node/commit/958e114655)] - **test**: split JWK async elliptic curve keygen tests (Joyee Cheung) [#49221](https://github.com/nodejs/node/pull/49221) +* \[[`344592dc00`](https://github.com/nodejs/node/commit/344592dc00)] - **test**: split test-crypto-keygen.js (Joyee Cheung) [#49221](https://github.com/nodejs/node/pull/49221) +* \[[`5f1a1aeeed`](https://github.com/nodejs/node/commit/5f1a1aeeed)] - **test**: rename test-crypto-modp1-error (Tobias Nießen) [#49348](https://github.com/nodejs/node/pull/49348) +* \[[`107015b45d`](https://github.com/nodejs/node/commit/107015b45d)] - **test**: migrate message source map tests from Python to JS (Yiyun Lei) [#49238](https://github.com/nodejs/node/pull/49238) +* \[[`ddebd29515`](https://github.com/nodejs/node/commit/ddebd29515)] - **test**: fix compiler warning in NodeCryptoEnv (Tobias Nießen) [#49206](https://github.com/nodejs/node/pull/49206) +* \[[`0261c5de56`](https://github.com/nodejs/node/commit/0261c5de56)] - **test**: make test-perf-hooks more robust and work with workers (Joyee Cheung) [#49197](https://github.com/nodejs/node/pull/49197) +* \[[`e18de802c8`](https://github.com/nodejs/node/commit/e18de802c8)] - **test**: use gcUntil() in test-v8-serialize-leak (Joyee Cheung) [#49168](https://github.com/nodejs/node/pull/49168) +* \[[`52d5dd8dba`](https://github.com/nodejs/node/commit/52d5dd8dba)] - **test**: add expectSyncExitWithoutError() and expectSyncExit() utils (Joyee Cheung) [#49020](https://github.com/nodejs/node/pull/49020) +* \[[`67925bb914`](https://github.com/nodejs/node/commit/67925bb914)] - **test**: add Symbol.dispose support to mock timers (Benjamin Gruenbaum) [#48549](https://github.com/nodejs/node/pull/48549) +* \[[`00c08539b6`](https://github.com/nodejs/node/commit/00c08539b6)] - **test**: fix edge snapshot stack traces (Geoffrey Booth) [#49659](https://github.com/nodejs/node/pull/49659) +* \[[`48f6d9a975`](https://github.com/nodejs/node/commit/48f6d9a975)] - **test**: refactor `test-node-output-errors` (Antoine du Hamel) [#48992](https://github.com/nodejs/node/pull/48992) +* \[[`c1a8ae38c0`](https://github.com/nodejs/node/commit/c1a8ae38c0)] - **test**: deflake `test-loaders-workers-spawned` (Antoine du Hamel) [#50251](https://github.com/nodejs/node/pull/50251) +* \[[`d5cc5d7956`](https://github.com/nodejs/node/commit/d5cc5d7956)] - **test**: deflake `test-esm-loader-resolve-type` (Antoine du Hamel) [#50273](https://github.com/nodejs/node/pull/50273) +* \[[`866d646b0e`](https://github.com/nodejs/node/commit/866d646b0e)] - **test**: increase coverage of `Module.register` and `initialize` hook (Antoine du Hamel) [#49532](https://github.com/nodejs/node/pull/49532) +* \[[`65201ab36b`](https://github.com/nodejs/node/commit/65201ab36b)] - **test**: isolate `globalPreload` tests (Geoffrey Booth) [#49545](https://github.com/nodejs/node/pull/49545) +* \[[`65058d9a35`](https://github.com/nodejs/node/commit/65058d9a35)] - **test**: add `tmpdir.fileURL()` (Livia Medeiros) [#49040](https://github.com/nodejs/node/pull/49040) +* \[[`e1c6f46926`](https://github.com/nodejs/node/commit/e1c6f46926)] - **test**: reduce flakiness of `test-esm-loader-hooks` (Antoine du Hamel) [#49248](https://github.com/nodejs/node/pull/49248) +* \[[`e8d475ffc4`](https://github.com/nodejs/node/commit/e8d475ffc4)] - **test**: refactor `test-esm-loader-hooks` for easier debugging (Antoine du Hamel) [#49131](https://github.com/nodejs/node/pull/49131) +* \[[`26f01669fc`](https://github.com/nodejs/node/commit/26f01669fc)] - **test**: reduce flakiness of `test-esm-loader-hooks` (Antoine du Hamel) [#49105](https://github.com/nodejs/node/pull/49105) +* \[[`d5a1153970`](https://github.com/nodejs/node/commit/d5a1153970)] - **test**: use `fixtures.fileURL` when appropriate (Antoine du Hamel) [#48990](https://github.com/nodejs/node/pull/48990) +* \[[`3424793013`](https://github.com/nodejs/node/commit/3424793013)] - **test**: fix snapshot tests when cwd contains spaces or backslashes (Antoine du Hamel) [#48959](https://github.com/nodejs/node/pull/48959) +* \[[`a9347a4635`](https://github.com/nodejs/node/commit/a9347a4635)] - **test**: order `common.mjs` in ASCII order (Antoine du Hamel) [#48960](https://github.com/nodejs/node/pull/48960) +* \[[`adb9280d8e`](https://github.com/nodejs/node/commit/adb9280d8e)] - **test**: fix some assumptions in tests (Antoine du Hamel) [#48958](https://github.com/nodejs/node/pull/48958) +* \[[`f02637e805`](https://github.com/nodejs/node/commit/f02637e805)] - **test**: fix `es-module/test-esm-initialization` (Antoine du Hamel) [#48880](https://github.com/nodejs/node/pull/48880) +* \[[`8c918e5e59`](https://github.com/nodejs/node/commit/8c918e5e59)] - **test**: relax version check with shared OpenSSL (Luigi Pinca) [#50505](https://github.com/nodejs/node/pull/50505) +* \[[`c6caf13ad5`](https://github.com/nodejs/node/commit/c6caf13ad5)] - **test**: fix crypto-dh error message for OpenSSL 3.x (Kerem Kat) [#50395](https://github.com/nodejs/node/pull/50395) +* \[[`65b41ebd1f`](https://github.com/nodejs/node/commit/65b41ebd1f)] - **test**: split test-crypto-dh to avoid timeout on slow machines in the CI (Joyee Cheung) [#49492](https://github.com/nodejs/node/pull/49492) +* \[[`7606921e1d`](https://github.com/nodejs/node/commit/7606921e1d)] - **test**: fix testsuite against zlib version 1.3 (Dominique Leuenberger) [#50364](https://github.com/nodejs/node/pull/50364) +* \[[`4f78233254`](https://github.com/nodejs/node/commit/4f78233254)] - **test**: verify tracePromise does not do runStores (Stephen Belanger) [#47349](https://github.com/nodejs/node/pull/47349) +* \[[`cb6ef74cf2`](https://github.com/nodejs/node/commit/cb6ef74cf2)] - **test**: fix IPv6 checks on IBM i (Abdirahim Musse) [#46546](https://github.com/nodejs/node/pull/46546) +* \[[`bcf97ab1b2`](https://github.com/nodejs/node/commit/bcf97ab1b2)] - **test**: fix flaky test-runner-exit-code.js (Colin Ihrig) [#46138](https://github.com/nodejs/node/pull/46138) +* \[[`f0e8ff90eb`](https://github.com/nodejs/node/commit/f0e8ff90eb)] - **test**: use an array for WPT gloablThis initialization scripts (Joyee Cheung) [#46425](https://github.com/nodejs/node/pull/46425) +* \[[`0e0dd1fe90`](https://github.com/nodejs/node/commit/0e0dd1fe90)] - **test**: adapt tests for OpenSSL 3.1 (OttoHollmann) [#47859](https://github.com/nodejs/node/pull/47859) +* \[[`e3ea906988`](https://github.com/nodejs/node/commit/e3ea906988)] - **test**: disambiguate AIX and IBM i (Richard Lau) [#48056](https://github.com/nodejs/node/pull/48056) +* \[[`088460d80c`](https://github.com/nodejs/node/commit/088460d80c)] - **test**: add os setPriority, getPriority test coverage (Wael) [#38771](https://github.com/nodejs/node/pull/38771) +* \[[`b011a498c5`](https://github.com/nodejs/node/commit/b011a498c5)] - **test,benchmark**: use `tmpdir.fileURL()` (Livia Medeiros) [#49138](https://github.com/nodejs/node/pull/49138) +* \[[`54168b7364`](https://github.com/nodejs/node/commit/54168b7364)] - **test\_runner**: add test location for FileTests (Colin Ihrig) [#49999](https://github.com/nodejs/node/pull/49999) +* \[[`1d9c37161d`](https://github.com/nodejs/node/commit/1d9c37161d)] - **test\_runner**: replace spurious if with else (Colin Ihrig) [#49943](https://github.com/nodejs/node/pull/49943) +* \[[`b283ae4238`](https://github.com/nodejs/node/commit/b283ae4238)] - **(SEMVER-MINOR)** **test\_runner**: accept `testOnly` in `run` (Moshe Atlow) [#49753](https://github.com/nodejs/node/pull/49753) +* \[[`103c4a088a`](https://github.com/nodejs/node/commit/103c4a088a)] - **test\_runner**: catch reporter errors (Moshe Atlow) [#49646](https://github.com/nodejs/node/pull/49646) +* \[[`e459598cf2`](https://github.com/nodejs/node/commit/e459598cf2)] - **test\_runner**: fix test runner watch mode when no positional arguments (Moshe Atlow) [#49578](https://github.com/nodejs/node/pull/49578) +* \[[`059b1945d8`](https://github.com/nodejs/node/commit/059b1945d8)] - **(SEMVER-MINOR)** **test\_runner**: add junit reporter (Moshe Atlow) [#49614](https://github.com/nodejs/node/pull/49614) +* \[[`76a35632d3`](https://github.com/nodejs/node/commit/76a35632d3)] - **test\_runner**: add jsdocs to mock.js (Caio Borghi) [#49555](https://github.com/nodejs/node/pull/49555) +* \[[`ba57c24fde`](https://github.com/nodejs/node/commit/ba57c24fde)] - **test\_runner**: fix invalid timer call (Erick Wendel) [#49477](https://github.com/nodejs/node/pull/49477) +* \[[`5949ae016f`](https://github.com/nodejs/node/commit/5949ae016f)] - **test\_runner**: add jsdocs to MockTimers (Erick Wendel) [#49476](https://github.com/nodejs/node/pull/49476) +* \[[`429846f258`](https://github.com/nodejs/node/commit/429846f258)] - **test\_runner**: fix typescript coverage (Moshe Atlow) [#49406](https://github.com/nodejs/node/pull/49406) +* \[[`760c98280e`](https://github.com/nodejs/node/commit/760c98280e)] - **test\_runner**: preserve original property descriptor (Erick Wendel) [#49433](https://github.com/nodejs/node/pull/49433) +* \[[`95cc98e14b`](https://github.com/nodejs/node/commit/95cc98e14b)] - **test\_runner**: expose spec reporter as newable function (Chemi Atlow) [#49184](https://github.com/nodejs/node/pull/49184) +* \[[`d83964031b`](https://github.com/nodejs/node/commit/d83964031b)] - **test\_runner**: reland run global after() hook earlier (Colin Ihrig) [#49116](https://github.com/nodejs/node/pull/49116) +* \[[`d61a505546`](https://github.com/nodejs/node/commit/d61a505546)] - **(SEMVER-MINOR)** **test\_runner**: expose location of tests (Colin Ihrig) [#48975](https://github.com/nodejs/node/pull/48975) +* \[[`00c70e12f7`](https://github.com/nodejs/node/commit/00c70e12f7)] - **test\_runner**: dont set exit code on todo tests (Moshe Atlow) [#48929](https://github.com/nodejs/node/pull/48929) +* \[[`71f7ed728d`](https://github.com/nodejs/node/commit/71f7ed728d)] - **test\_runner**: fix global after not failing the tests (Raz Luvaton) [#48913](https://github.com/nodejs/node/pull/48913) +* \[[`11fbd924ed`](https://github.com/nodejs/node/commit/11fbd924ed)] - **test\_runner**: add support for setImmediate (Erick Wendel) [#49397](https://github.com/nodejs/node/pull/49397) +* \[[`fb64d415be`](https://github.com/nodejs/node/commit/fb64d415be)] - **test\_runner**: fix timeout in \*Each hook failing further tests (Raz Luvaton) [#48925](https://github.com/nodejs/node/pull/48925) +* \[[`67d7faddb2`](https://github.com/nodejs/node/commit/67d7faddb2)] - **test\_runner**: cleanup test timeout abort listener (Raz Luvaton) [#48915](https://github.com/nodejs/node/pull/48915) +* \[[`d217435cd3`](https://github.com/nodejs/node/commit/d217435cd3)] - **test\_runner**: fix todo and only in spec reporter (Moshe Atlow) [#48929](https://github.com/nodejs/node/pull/48929) +* \[[`9f122be15a`](https://github.com/nodejs/node/commit/9f122be15a)] - **test\_runner**: unwrap error message in TAP reporter (Colin Ihrig) [#48942](https://github.com/nodejs/node/pull/48942) +* \[[`3a74316624`](https://github.com/nodejs/node/commit/3a74316624)] - **test\_runner**: add `__proto__` null (Raz Luvaton) [#48663](https://github.com/nodejs/node/pull/48663) +* \[[`66ea9bdb4d`](https://github.com/nodejs/node/commit/66ea9bdb4d)] - **test\_runner**: fix global before not called when no global test exists (Raz Luvaton) [#48877](https://github.com/nodejs/node/pull/48877) +* \[[`0bd9704018`](https://github.com/nodejs/node/commit/0bd9704018)] - **test\_runner**: use os.availableParallelism() (Colin Ihrig) [#45969](https://github.com/nodejs/node/pull/45969) +* \[[`b55eb2a8d1`](https://github.com/nodejs/node/commit/b55eb2a8d1)] - **(SEMVER-MINOR)** **test\_runner**: add shards support (Raz Luvaton) [#48639](https://github.com/nodejs/node/pull/48639) +* \[[`c2575c8db0`](https://github.com/nodejs/node/commit/c2575c8db0)] - **test\_runner**: fix test\_runner `test:fail` event type (Ethan Arrowood) [#48854](https://github.com/nodejs/node/pull/48854) +* \[[`6b186d41cd`](https://github.com/nodejs/node/commit/6b186d41cd)] - **test\_runner**: fix async callback in describe not awaited (Raz Luvaton) [#48856](https://github.com/nodejs/node/pull/48856) +* \[[`2d4511baab`](https://github.com/nodejs/node/commit/2d4511baab)] - **test\_runner**: call abort on test finish (Raz Luvaton) [#48827](https://github.com/nodejs/node/pull/48827) +* \[[`05e7f28b40`](https://github.com/nodejs/node/commit/05e7f28b40)] - **(SEMVER-MINOR)** **test\_runner**: add initial draft for fakeTimers (Erick Wendel) [#47775](https://github.com/nodejs/node/pull/47775) +* \[[`428301ad27`](https://github.com/nodejs/node/commit/428301ad27)] - **(SEMVER-MINOR)** **test\_runner, cli**: add --test-concurrency flag (Colin Ihrig) [#49996](https://github.com/nodejs/node/pull/49996) +* \[[`4b2e258c76`](https://github.com/nodejs/node/commit/4b2e258c76)] - **test\_runner,test**: fix flaky test-runner-cli-concurrency.js (Colin Ihrig) [#50108](https://github.com/nodejs/node/pull/50108) +* \[[`b5d16cd8f0`](https://github.com/nodejs/node/commit/b5d16cd8f0)] - **(SEMVER-MINOR)** **tls**: add ALPNCallback server option for dynamic ALPN negotiation (Tim Perry) [#45190](https://github.com/nodejs/node/pull/45190) +* \[[`a1c94037ab`](https://github.com/nodejs/node/commit/a1c94037ab)] - **tools**: fix --v8-non-optimized-debug for v18.x (Joyee Cheung) [#50612](https://github.com/nodejs/node/pull/50612) +* \[[`3b65c61f5c`](https://github.com/nodejs/node/commit/3b65c61f5c)] - **tools**: update lint-md-dependencies (Node.js GitHub Bot) [#50083](https://github.com/nodejs/node/pull/50083) +* \[[`07941a3609`](https://github.com/nodejs/node/commit/07941a3609)] - **tools**: update lint-md-dependencies (Node.js GitHub Bot) [#49983](https://github.com/nodejs/node/pull/49983) +* \[[`ad6e7a6270`](https://github.com/nodejs/node/commit/ad6e7a6270)] - **tools**: update lint-md-dependencies to rollup\@3.29.2 (Node.js GitHub Bot) [#49679](https://github.com/nodejs/node/pull/49679) +* \[[`3511b13c94`](https://github.com/nodejs/node/commit/3511b13c94)] - **tools**: update lint-md-dependencies to rollup\@3.29.0 unified\@11.0.3 (Node.js GitHub Bot) [#49584](https://github.com/nodejs/node/pull/49584) +* \[[`b6522a2b6b`](https://github.com/nodejs/node/commit/b6522a2b6b)] - **tools**: update lint-md-dependencies (Node.js GitHub Bot) [#49342](https://github.com/nodejs/node/pull/49342) +* \[[`01b2588acf`](https://github.com/nodejs/node/commit/01b2588acf)] - **tools**: update lint-md-dependencies (Node.js GitHub Bot) [#49253](https://github.com/nodejs/node/pull/49253) +* \[[`0cb42ccb5c`](https://github.com/nodejs/node/commit/0cb42ccb5c)] - **tools**: update lint-md-dependencies (Node.js GitHub Bot) [#49122](https://github.com/nodejs/node/pull/49122) +* \[[`caa7ecca30`](https://github.com/nodejs/node/commit/caa7ecca30)] - **tools**: update lint-md-dependencies to rollup\@3.27.2 (Node.js GitHub Bot) [#49035](https://github.com/nodejs/node/pull/49035) +* \[[`42846a02b3`](https://github.com/nodejs/node/commit/42846a02b3)] - **tools**: limit the number of auto start CIs (Antoine du Hamel) [#49067](https://github.com/nodejs/node/pull/49067) +* \[[`9cc3b2061f`](https://github.com/nodejs/node/commit/9cc3b2061f)] - **tools**: update lint-md-dependencies to rollup\@3.27.0 (Node.js GitHub Bot) [#48965](https://github.com/nodejs/node/pull/48965) +* \[[`1cbb186039`](https://github.com/nodejs/node/commit/1cbb186039)] - **tools**: update lint-md-dependencies to rollup\@3.26.3 (Node.js GitHub Bot) [#48888](https://github.com/nodejs/node/pull/48888) +* \[[`f7d6e9ba43`](https://github.com/nodejs/node/commit/f7d6e9ba43)] - **tools**: update lint-md-dependencies to @rollup/plugin-commonjs\@25.0.3 (Node.js GitHub Bot) [#48791](https://github.com/nodejs/node/pull/48791) +* \[[`a98addb626`](https://github.com/nodejs/node/commit/a98addb626)] - **tools**: skip ruff on tools/node\_modules (Moshe Atlow) [#49838](https://github.com/nodejs/node/pull/49838) +* \[[`6cf8dd95d1`](https://github.com/nodejs/node/commit/6cf8dd95d1)] - **tools**: update eslint to 8.51.0 (Node.js GitHub Bot) [#50084](https://github.com/nodejs/node/pull/50084) +* \[[`b8d2a29ff5`](https://github.com/nodejs/node/commit/b8d2a29ff5)] - **tools**: update eslint to 8.50.0 (Node.js GitHub Bot) [#49989](https://github.com/nodejs/node/pull/49989) +* \[[`1c1cbf06f0`](https://github.com/nodejs/node/commit/1c1cbf06f0)] - **tools**: update eslint to 8.49.0 (Node.js GitHub Bot) [#49586](https://github.com/nodejs/node/pull/49586) +* \[[`92d21864c5`](https://github.com/nodejs/node/commit/92d21864c5)] - **tools**: update eslint to 8.48.0 (Node.js GitHub Bot) [#49343](https://github.com/nodejs/node/pull/49343) +* \[[`0940de36ee`](https://github.com/nodejs/node/commit/0940de36ee)] - **tools**: update eslint to 8.47.0 (Node.js GitHub Bot) [#49124](https://github.com/nodejs/node/pull/49124) +* \[[`4880a05fa2`](https://github.com/nodejs/node/commit/4880a05fa2)] - **tools**: update eslint to 8.46.0 (Node.js GitHub Bot) [#48966](https://github.com/nodejs/node/pull/48966) +* \[[`e9632454cd`](https://github.com/nodejs/node/commit/e9632454cd)] - **tools**: update eslint to 8.45.0 (Node.js GitHub Bot) [#48793](https://github.com/nodejs/node/pull/48793) +* \[[`ae49f319c4`](https://github.com/nodejs/node/commit/ae49f319c4)] - **tools**: drop support for osx notarization with gon (Ulises Gascón) [#50291](https://github.com/nodejs/node/pull/50291) +* \[[`014b65e9b7`](https://github.com/nodejs/node/commit/014b65e9b7)] - **tools**: use osx notarytool for future releases (Ulises Gascon) [#48701](https://github.com/nodejs/node/pull/48701) +* \[[`71c386a25c`](https://github.com/nodejs/node/commit/71c386a25c)] - **typings**: update JSDoc for `cwd` in `child_process` (LiviaMedeiros) [#49029](https://github.com/nodejs/node/pull/49029) +* \[[`4d70a2c344`](https://github.com/nodejs/node/commit/4d70a2c344)] - **typings**: sync JSDoc with the actual implementation (Hyunjin Kim) [#48853](https://github.com/nodejs/node/pull/48853) +* \[[`945609487c`](https://github.com/nodejs/node/commit/945609487c)] - **typings**: fix missing property in `ExportedHooks` (Antoine du Hamel) [#49567](https://github.com/nodejs/node/pull/49567) +* \[[`2ef80f12b9`](https://github.com/nodejs/node/commit/2ef80f12b9)] - **typings**: fix JSDoc in ESM loader modules (Antoine du Hamel) [#48424](https://github.com/nodejs/node/pull/48424) +* \[[`7fc15b6d42`](https://github.com/nodejs/node/commit/7fc15b6d42)] - **url**: fix `isURL` detection by checking `path` (Zhuo Zhang) [#48928](https://github.com/nodejs/node/pull/48928) +* \[[`916a63b124`](https://github.com/nodejs/node/commit/916a63b124)] - **url**: improve `isURL` detection (Yagiz Nizipli) [#47886](https://github.com/nodejs/node/pull/47886) +* \[[`ac27431372`](https://github.com/nodejs/node/commit/ac27431372)] - **url**: validate `pathToFileURL(path)` argument as string (LiviaMedeiros) [#49161](https://github.com/nodejs/node/pull/49161) +* \[[`f256b160bf`](https://github.com/nodejs/node/commit/f256b160bf)] - **url**: handle unicode hostname if empty (Yagiz Nizipli) [#49396](https://github.com/nodejs/node/pull/49396) +* \[[`2441415c68`](https://github.com/nodejs/node/commit/2441415c68)] - **url**: reduce `pathToFileURL` cpp calls (Yagiz Nizipli) [#48709](https://github.com/nodejs/node/pull/48709) +* \[[`227e749888`](https://github.com/nodejs/node/commit/227e749888)] - **url**: validate URL constructor arg length (Matthew Aitken) [#47513](https://github.com/nodejs/node/pull/47513) +* \[[`bf4ee17d18`](https://github.com/nodejs/node/commit/bf4ee17d18)] - **url**: validate argument length in canParse (Matthew Aitken) [#47513](https://github.com/nodejs/node/pull/47513) +* \[[`a67fa2a107`](https://github.com/nodejs/node/commit/a67fa2a107)] - **util**: add `getCwdSafe` internal util fn (João Lenon) [#48434](https://github.com/nodejs/node/pull/48434) +* \[[`e96f7ef881`](https://github.com/nodejs/node/commit/e96f7ef881)] - **(SEMVER-MINOR)** **vm**: use import attributes instead of import assertions (Antoine du Hamel) [#50141](https://github.com/nodejs/node/pull/50141) +* \[[`525de686a7`](https://github.com/nodejs/node/commit/525de686a7)] - **(SEMVER-MINOR)** **wasi**: updates required for latest uvwasi version (Michael Dawson) [#49908](https://github.com/nodejs/node/pull/49908) +* \[[`f27d505805`](https://github.com/nodejs/node/commit/f27d505805)] - **watch**: decrease debounce rate (Moshe Atlow) [#48926](https://github.com/nodejs/node/pull/48926) +* \[[`83a6d20d70`](https://github.com/nodejs/node/commit/83a6d20d70)] - **watch**: use debounce instead of throttle (Moshe Atlow) [#48926](https://github.com/nodejs/node/pull/48926) +* \[[`879b958184`](https://github.com/nodejs/node/commit/879b958184)] - **worker**: protect against user mutating well-known prototypes (Antoine du Hamel) [#49270](https://github.com/nodejs/node/pull/49270) + ## 2023-10-13, Version 18.18.2 'Hydrogen' (LTS), @RafaelGSS diff --git a/doc/changelogs/CHANGELOG_V20.md b/doc/changelogs/CHANGELOG_V20.md index 691025793c3c8f..083cfe318ea318 100644 --- a/doc/changelogs/CHANGELOG_V20.md +++ b/doc/changelogs/CHANGELOG_V20.md @@ -9,6 +9,7 @@ +20.10.0
    20.9.0
    @@ -52,6 +53,330 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + + +## 2023-11-22, Version 20.10.0 'Iron' (LTS), @targos + +### Notable Changes + +#### `--experimental-default-type` flag to flip module defaults + +The new flag `--experimental-default-type` can be used to flip the default +module system used by Node.js. Input that is already explicitly defined as ES +modules or CommonJS, such as by a `package.json` `"type"` field or `.mjs`/`.cjs` +file extension or the `--input-type` flag, is unaffected. What is currently +implicitly CommonJS would instead be interpreted as ES modules under +`--experimental-default-type=module`: + +* String input provided via `--eval` or STDIN, if `--input-type` is unspecified. + +* Files ending in `.js` or with no extension, if there is no `package.json` file + present in the same folder or any parent folder. + +* Files ending in `.js` or with no extension, if the nearest parent + `package.json` field lacks a `type` field; unless the folder is inside a + `node_modules` folder. + +In addition, extensionless files are interpreted as Wasm if +`--experimental-wasm-modules` is passed and the file contains the "magic bytes" +Wasm header. + +Contributed by Geoffrey Booth in [#49869](https://github.com/nodejs/node/pull/49869). + +#### Detect ESM syntax in ambiguous JavaScript + +The new flag `--experimental-detect-module` can be used to automatically run ES +modules when their syntax can be detected. For “ambiguous” files, which are +`.js` or extensionless files with no `package.json` with a `type` field, Node.js +will parse the file to detect ES module syntax; if found, it will run the file +as an ES module, otherwise it will run the file as a CommonJS module. The same +applies to string input via `--eval` or `STDIN`. + +We hope to make detection enabled by default in a future version of Node.js. +Detection increases startup time, so we encourage everyone—especially package +authors—to add a `type` field to `package.json`, even for the default +`"type": "commonjs"`. The presence of a `type` field, or explicit extensions +such as `.mjs` or `.cjs`, will opt out of detection. + +Contributed by Geoffrey Booth in [#50096](https://github.com/nodejs/node/pull/50096). + +#### New `flush` option in file system functions + +When writing to files, it is possible that data is not immediately flushed to +permanent storage. This allows subsequent read operations to see stale data. +This PR adds a `'flush'` option to the `fs.writeFile` family of functions which +forces the data to be flushed at the end of a successful write operation. + +Contributed by Colin Ihrig in [#50009](https://github.com/nodejs/node/pull/50009) and [#50095](https://github.com/nodejs/node/pull/50095). + +#### Experimental WebSocket client + +Adds a `--experimental-websocket` flag that adds a [`WebSocket`](https://developer.mozilla.org/en-US/docs/Web/API/WebSocket) +global, as [standardized by WHATWG](https://websockets.spec.whatwg.org/#the-websocket-interface). + +Contributed by Matthew Aitken in [#49830](https://github.com/nodejs/node/pull/49830). + +#### vm: fix V8 compilation cache support for vm.Script + +Previously repeated compilation of the same source code using `vm.Script` +stopped hitting the V8 compilation cache after v16.x when support for +`importModuleDynamically` was added to `vm.Script`, resulting in a performance +regression that blocked users (in particular Jest users) from upgrading from +v16.x. + +The recent fixes allow the compilation cache to be hit again +for `vm.Script` when `--experimental-vm-modules` is not used even in the +presence of the `importModuleDynamically` option, so that users affected by the +performance regression can now upgrade. Ongoing work is also being done to +enable compilation cache support for `vm.CompileFunction`. + +Contributed by Joyee Cheung in [#49950](https://github.com/nodejs/node/pull/49950) +and [#50137](https://github.com/nodejs/node/pull/50137). + +#### Other notable changes + +* \[[`21453ae555`](https://github.com/nodejs/node/commit/21453ae555)] - **(SEMVER-MINOR)** **deps**: update uvwasi to 0.0.19 (Node.js GitHub Bot) [#49908](https://github.com/nodejs/node/pull/49908) +* \[[`ee65e44c31`](https://github.com/nodejs/node/commit/ee65e44c31)] - **esm**: use import attributes instead of import assertions (Antoine du Hamel) [#50140](https://github.com/nodejs/node/pull/50140) +* \[[`ffdc357167`](https://github.com/nodejs/node/commit/ffdc357167)] - **(SEMVER-MINOR)** **stream**: allow passing stream class to `stream.compose` (Alex Yang) [#50187](https://github.com/nodejs/node/pull/50187) +* \[[`4861ad6431`](https://github.com/nodejs/node/commit/4861ad6431)] - **stream**: improve performance of readable stream reads (Raz Luvaton) [#50173](https://github.com/nodejs/node/pull/50173) +* \[[`4b27087b30`](https://github.com/nodejs/node/commit/4b27087b30)] - **stream**: optimize Writable (Robert Nagy) [#50012](https://github.com/nodejs/node/pull/50012) +* \[[`709c6c0cab`](https://github.com/nodejs/node/commit/709c6c0cab)] - **(SEMVER-MINOR)** **test\_runner, cli**: add --test-concurrency flag (Colin Ihrig) [#49996](https://github.com/nodejs/node/pull/49996) +* \[[`57efd5292c`](https://github.com/nodejs/node/commit/57efd5292c)] - **(SEMVER-MINOR)** **vm**: use import attributes instead of import assertions (Antoine du Hamel) [#50141](https://github.com/nodejs/node/pull/50141) + +### Commits + +* \[[`73757a5f42`](https://github.com/nodejs/node/commit/73757a5f42)] - **benchmark**: fix race condition on fs benchs (Vinicius Lourenço) [#50035](https://github.com/nodejs/node/pull/50035) +* \[[`23269717bb`](https://github.com/nodejs/node/commit/23269717bb)] - **benchmark**: add warmup to accessSync bench (Rafael Gonzaga) [#50073](https://github.com/nodejs/node/pull/50073) +* \[[`88611d199a`](https://github.com/nodejs/node/commit/88611d199a)] - **benchmark**: improved config for blob,file benchmark (Vinícius Lourenço) [#49730](https://github.com/nodejs/node/pull/49730) +* \[[`b70757476c`](https://github.com/nodejs/node/commit/b70757476c)] - **benchmark**: added new benchmarks for blob (Vinícius Lourenço) [#49730](https://github.com/nodejs/node/pull/49730) +* \[[`458d9a82e3`](https://github.com/nodejs/node/commit/458d9a82e3)] - **buffer**: remove unnecessary assignment in fromString (Tobias Nießen) [#50199](https://github.com/nodejs/node/pull/50199) +* \[[`878c0b332e`](https://github.com/nodejs/node/commit/878c0b332e)] - **build**: fix IBM i build with Python 3.9 (Richard Lau) [#48056](https://github.com/nodejs/node/pull/48056) +* \[[`773320e1de`](https://github.com/nodejs/node/commit/773320e1de)] - **crypto**: ensure valid point on elliptic curve in SubtleCrypto.importKey (Filip Skokan) [#50234](https://github.com/nodejs/node/pull/50234) +* \[[`edb0ffd7d4`](https://github.com/nodejs/node/commit/edb0ffd7d4)] - **crypto**: use X509\_ALGOR accessors instead of reaching into X509\_ALGOR (David Benjamin) [#50057](https://github.com/nodejs/node/pull/50057) +* \[[`3f98c06dbb`](https://github.com/nodejs/node/commit/3f98c06dbb)] - **crypto**: account for disabled SharedArrayBuffer (Shelley Vohr) [#50034](https://github.com/nodejs/node/pull/50034) +* \[[`55485ff1cc`](https://github.com/nodejs/node/commit/55485ff1cc)] - **crypto**: return clear errors when loading invalid PFX data (Tim Perry) [#49566](https://github.com/nodejs/node/pull/49566) +* \[[`68ec1e5eeb`](https://github.com/nodejs/node/commit/68ec1e5eeb)] - **deps**: upgrade npm to 10.2.3 (npm team) [#50531](https://github.com/nodejs/node/pull/50531) +* \[[`b00c11ad7c`](https://github.com/nodejs/node/commit/b00c11ad7c)] - **deps**: V8: cherry-pick d90d4533b053 (Michaël Zasso) [#50077](https://github.com/nodejs/node/pull/50077) +* \[[`e63aef91b4`](https://github.com/nodejs/node/commit/e63aef91b4)] - **deps**: V8: cherry-pick f7d000a7ae7b (Luke Albao) [#50077](https://github.com/nodejs/node/pull/50077) +* \[[`4b243b553a`](https://github.com/nodejs/node/commit/4b243b553a)] - **deps**: V8: cherry-pick 9721082687c9 (Shi Pujin) [#50077](https://github.com/nodejs/node/pull/50077) +* \[[`9d3cdcbebf`](https://github.com/nodejs/node/commit/9d3cdcbebf)] - **deps**: V8: cherry-pick 840650f2ff4e (Michaël Zasso) [#50077](https://github.com/nodejs/node/pull/50077) +* \[[`0c40b513fd`](https://github.com/nodejs/node/commit/0c40b513fd)] - **deps**: V8: cherry-pick a1efa5343880 (Michaël Zasso) [#50077](https://github.com/nodejs/node/pull/50077) +* \[[`68cddd79f7`](https://github.com/nodejs/node/commit/68cddd79f7)] - **deps**: update archs files for openssl-3.0.12+quic1 (Node.js GitHub Bot) [#50411](https://github.com/nodejs/node/pull/50411) +* \[[`3308189180`](https://github.com/nodejs/node/commit/3308189180)] - **deps**: upgrade openssl sources to quictls/openssl-3.0.12+quic1 (Node.js GitHub Bot) [#50411](https://github.com/nodejs/node/pull/50411) +* \[[`b61707e535`](https://github.com/nodejs/node/commit/b61707e535)] - **deps**: update ada to 2.7.2 (Node.js GitHub Bot) [#50338](https://github.com/nodejs/node/pull/50338) +* \[[`1aecf0c17b`](https://github.com/nodejs/node/commit/1aecf0c17b)] - **deps**: update corepack to 0.22.0 (Node.js GitHub Bot) [#50325](https://github.com/nodejs/node/pull/50325) +* \[[`f5924f174c`](https://github.com/nodejs/node/commit/f5924f174c)] - **deps**: update c-ares to 1.20.1 (Node.js GitHub Bot) [#50082](https://github.com/nodejs/node/pull/50082) +* \[[`b705e19a95`](https://github.com/nodejs/node/commit/b705e19a95)] - **deps**: update c-ares to 1.20.0 (Node.js GitHub Bot) [#50082](https://github.com/nodejs/node/pull/50082) +* \[[`f72cbb7e02`](https://github.com/nodejs/node/commit/f72cbb7e02)] - **deps**: V8: cherry-pick 25902244ad1a (Joyee Cheung) [#50156](https://github.com/nodejs/node/pull/50156) +* \[[`6547bd2493`](https://github.com/nodejs/node/commit/6547bd2493)] - **deps**: V8: cherry-pick ea996ad04a68 (Antoine du Hamel) [#50183](https://github.com/nodejs/node/pull/50183) +* \[[`16fd730e95`](https://github.com/nodejs/node/commit/16fd730e95)] - **deps**: V8: cherry-pick a0fd3209dda8 (Antoine du Hamel) [#50183](https://github.com/nodejs/node/pull/50183) +* \[[`614c3620c3`](https://github.com/nodejs/node/commit/614c3620c3)] - **deps**: update corepack to 0.21.0 (Node.js GitHub Bot) [#50088](https://github.com/nodejs/node/pull/50088) +* \[[`545aa74ae2`](https://github.com/nodejs/node/commit/545aa74ae2)] - **deps**: update simdutf to 3.2.18 (Node.js GitHub Bot) [#50091](https://github.com/nodejs/node/pull/50091) +* \[[`9302806c0a`](https://github.com/nodejs/node/commit/9302806c0a)] - **deps**: update zlib to 1.2.13.1-motley-fef5869 (Node.js GitHub Bot) [#50085](https://github.com/nodejs/node/pull/50085) +* \[[`03bf5c5d9a`](https://github.com/nodejs/node/commit/03bf5c5d9a)] - **deps**: update googletest to 2dd1c13 (Node.js GitHub Bot) [#50081](https://github.com/nodejs/node/pull/50081) +* \[[`cd8e90690b`](https://github.com/nodejs/node/commit/cd8e90690b)] - **deps**: update googletest to e47544a (Node.js GitHub Bot) [#49982](https://github.com/nodejs/node/pull/49982) +* \[[`40672cfe53`](https://github.com/nodejs/node/commit/40672cfe53)] - **deps**: update ada to 2.6.10 (Node.js GitHub Bot) [#49984](https://github.com/nodejs/node/pull/49984) +* \[[`34c7eb0eb2`](https://github.com/nodejs/node/commit/34c7eb0eb2)] - **deps**: fix call to undeclared functions 'ntohl' and 'htons' (MatteoBax) [#49979](https://github.com/nodejs/node/pull/49979) +* \[[`03654b44b6`](https://github.com/nodejs/node/commit/03654b44b6)] - **deps**: update ada to 2.6.9 (Node.js GitHub Bot) [#49340](https://github.com/nodejs/node/pull/49340) +* \[[`4c740b1dd8`](https://github.com/nodejs/node/commit/4c740b1dd8)] - **deps**: update ada to 2.6.8 (Node.js GitHub Bot) [#49340](https://github.com/nodejs/node/pull/49340) +* \[[`759cf5a760`](https://github.com/nodejs/node/commit/759cf5a760)] - **deps**: update ada to 2.6.7 (Node.js GitHub Bot) [#49340](https://github.com/nodejs/node/pull/49340) +* \[[`31a4e9781a`](https://github.com/nodejs/node/commit/31a4e9781a)] - **deps**: update ada to 2.6.5 (Node.js GitHub Bot) [#49340](https://github.com/nodejs/node/pull/49340) +* \[[`2ca867f2ab`](https://github.com/nodejs/node/commit/2ca867f2ab)] - **deps**: update ada to 2.6.3 (Node.js GitHub Bot) [#49340](https://github.com/nodejs/node/pull/49340) +* \[[`21453ae555`](https://github.com/nodejs/node/commit/21453ae555)] - **(SEMVER-MINOR)** **deps**: update uvwasi to 0.0.19 (Node.js GitHub Bot) [#49908](https://github.com/nodejs/node/pull/49908) +* \[[`7ca1228be8`](https://github.com/nodejs/node/commit/7ca1228be8)] - **deps**: V8: cherry-pick 8ec2651fbdd8 (Abdirahim Musse) [#49862](https://github.com/nodejs/node/pull/49862) +* \[[`3cc41d253c`](https://github.com/nodejs/node/commit/3cc41d253c)] - **deps**: upgrade npm to 10.2.0 (npm team) [#50027](https://github.com/nodejs/node/pull/50027) +* \[[`61b4afb7dd`](https://github.com/nodejs/node/commit/61b4afb7dd)] - **deps**: update undici to 5.26.4 (Node.js GitHub Bot) [#50274](https://github.com/nodejs/node/pull/50274) +* \[[`ea28738336`](https://github.com/nodejs/node/commit/ea28738336)] - **doc**: add loong64 info into platform list (Shi Pujin) [#50086](https://github.com/nodejs/node/pull/50086) +* \[[`00c12b7a20`](https://github.com/nodejs/node/commit/00c12b7a20)] - **doc**: update release process LTS step (Richard Lau) [#50299](https://github.com/nodejs/node/pull/50299) +* \[[`a9ba29ba10`](https://github.com/nodejs/node/commit/a9ba29ba10)] - **doc**: fix release process table of contents (Richard Lau) [#50216](https://github.com/nodejs/node/pull/50216) +* \[[`4b5033519e`](https://github.com/nodejs/node/commit/4b5033519e)] - **doc**: update api `stream.compose` (Alex Yang) [#50206](https://github.com/nodejs/node/pull/50206) +* \[[`d4659e2080`](https://github.com/nodejs/node/commit/d4659e2080)] - **doc**: add ReflectConstruct to known perf issues (Vinicius Lourenço) [#50111](https://github.com/nodejs/node/pull/50111) +* \[[`ffa94612fd`](https://github.com/nodejs/node/commit/ffa94612fd)] - **doc**: fix typo in dgram docs (Peter Johnson) [#50211](https://github.com/nodejs/node/pull/50211) +* \[[`f37b577b14`](https://github.com/nodejs/node/commit/f37b577b14)] - **doc**: fix H4ad collaborator sort (Vinicius Lourenço) [#50218](https://github.com/nodejs/node/pull/50218) +* \[[`c75264b1f9`](https://github.com/nodejs/node/commit/c75264b1f9)] - **doc**: add H4ad to collaborators (Vinícius Lourenço) [#50217](https://github.com/nodejs/node/pull/50217) +* \[[`5025e24ac7`](https://github.com/nodejs/node/commit/5025e24ac7)] - **doc**: update release-stewards with last sec-release (Rafael Gonzaga) [#50179](https://github.com/nodejs/node/pull/50179) +* \[[`63379313d5`](https://github.com/nodejs/node/commit/63379313d5)] - **doc**: add command to keep major branch sync (Rafael Gonzaga) [#50102](https://github.com/nodejs/node/pull/50102) +* \[[`85de4b8254`](https://github.com/nodejs/node/commit/85de4b8254)] - **doc**: add loong64 to list of architectures (Shi Pujin) [#50172](https://github.com/nodejs/node/pull/50172) +* \[[`ff8e1b860e`](https://github.com/nodejs/node/commit/ff8e1b860e)] - **doc**: update security release process (Michael Dawson) [#50166](https://github.com/nodejs/node/pull/50166) +* \[[`33470d965c`](https://github.com/nodejs/node/commit/33470d965c)] - **doc**: improve ccache explanation (Chengzhong Wu) [#50133](https://github.com/nodejs/node/pull/50133) +* \[[`7b97c44e2a`](https://github.com/nodejs/node/commit/7b97c44e2a)] - **doc**: move danielleadams to TSC non-voting member (Danielle Adams) [#50142](https://github.com/nodejs/node/pull/50142) +* \[[`3d03ca9f31`](https://github.com/nodejs/node/commit/3d03ca9f31)] - **doc**: fix description of `fs.readdir` `recursive` option (RamdohokarAngha) [#48902](https://github.com/nodejs/node/pull/48902) +* \[[`aab045ec4b`](https://github.com/nodejs/node/commit/aab045ec4b)] - **doc**: mention files read before env setup (Rafael Gonzaga) [#50072](https://github.com/nodejs/node/pull/50072) +* \[[`26a7608a24`](https://github.com/nodejs/node/commit/26a7608a24)] - **doc**: move permission model to Active Development (Rafael Gonzaga) [#50068](https://github.com/nodejs/node/pull/50068) +* \[[`d7bbf7f2c4`](https://github.com/nodejs/node/commit/d7bbf7f2c4)] - **doc**: add command to get patch minors and majors (Rafael Gonzaga) [#50067](https://github.com/nodejs/node/pull/50067) +* \[[`9830165e34`](https://github.com/nodejs/node/commit/9830165e34)] - **doc**: use precise promise terminology in fs (Benjamin Gruenbaum) [#50029](https://github.com/nodejs/node/pull/50029) +* \[[`585cbb211d`](https://github.com/nodejs/node/commit/585cbb211d)] - **doc**: use precise terminology in test runner (Benjamin Gruenbaum) [#50028](https://github.com/nodejs/node/pull/50028) +* \[[`2862f07124`](https://github.com/nodejs/node/commit/2862f07124)] - **doc**: clarify explaination text on how to run the example (Anshul Sinha) [#39020](https://github.com/nodejs/node/pull/39020) +* \[[`fe47c8ad91`](https://github.com/nodejs/node/commit/fe47c8ad91)] - **doc**: reserve 119 for Electron 28 (David Sanders) [#50020](https://github.com/nodejs/node/pull/50020) +* \[[`36ecd2c588`](https://github.com/nodejs/node/commit/36ecd2c588)] - **doc**: update Collaborator pronouns (Tierney Cyren) [#50005](https://github.com/nodejs/node/pull/50005) +* \[[`315d82a73e`](https://github.com/nodejs/node/commit/315d82a73e)] - **doc**: update link to Abstract Modules Records spec (Rich Trott) [#49961](https://github.com/nodejs/node/pull/49961) +* \[[`f63a92bb6c`](https://github.com/nodejs/node/commit/f63a92bb6c)] - **doc**: updated building docs for windows (Claudio W) [#49767](https://github.com/nodejs/node/pull/49767) +* \[[`ad17126501`](https://github.com/nodejs/node/commit/ad17126501)] - **doc**: update CHANGELOG\_V20 about vm fixes (Joyee Cheung) [#49951](https://github.com/nodejs/node/pull/49951) +* \[[`24458e2ac3`](https://github.com/nodejs/node/commit/24458e2ac3)] - **doc**: document dangerous symlink behavior (Tobias Nießen) [#49154](https://github.com/nodejs/node/pull/49154) +* \[[`337a676d1f`](https://github.com/nodejs/node/commit/337a676d1f)] - **doc**: add main ARIA landmark to API docs (Rich Trott) [#49882](https://github.com/nodejs/node/pull/49882) +* \[[`959ef7ac6b`](https://github.com/nodejs/node/commit/959ef7ac6b)] - **doc**: add navigation ARIA landmark to doc ToC (Rich Trott) [#49882](https://github.com/nodejs/node/pull/49882) +* \[[`a60fbf2ab3`](https://github.com/nodejs/node/commit/a60fbf2ab3)] - **doc**: mark Node.js 19 as End-of-Life (Richard Lau) [#48283](https://github.com/nodejs/node/pull/48283) +* \[[`c255575699`](https://github.com/nodejs/node/commit/c255575699)] - **errors**: improve performance of determine-specific-type (Aras Abbasi) [#49696](https://github.com/nodejs/node/pull/49696) +* \[[`e66991e6b2`](https://github.com/nodejs/node/commit/e66991e6b2)] - **errors**: improve formatList in errors.js (Aras Abbasi) [#49642](https://github.com/nodejs/node/pull/49642) +* \[[`c71e548b65`](https://github.com/nodejs/node/commit/c71e548b65)] - **errors**: improve performance of instantiation (Aras Abbasi) [#49654](https://github.com/nodejs/node/pull/49654) +* \[[`3b867e4256`](https://github.com/nodejs/node/commit/3b867e4256)] - **esm**: do not give wrong hints when detecting file format (Antoine du Hamel) [#50314](https://github.com/nodejs/node/pull/50314) +* \[[`a589a1a905`](https://github.com/nodejs/node/commit/a589a1a905)] - **(SEMVER-MINOR)** **esm**: detect ESM syntax in ambiguous JavaScript (Geoffrey Booth) [#50096](https://github.com/nodejs/node/pull/50096) +* \[[`c64490e9aa`](https://github.com/nodejs/node/commit/c64490e9aa)] - **esm**: improve check for ESM syntax (Geoffrey Booth) [#50127](https://github.com/nodejs/node/pull/50127) +* \[[`ee65e44c31`](https://github.com/nodejs/node/commit/ee65e44c31)] - **esm**: use import attributes instead of import assertions (Antoine du Hamel) [#50140](https://github.com/nodejs/node/pull/50140) +* \[[`4de838fdeb`](https://github.com/nodejs/node/commit/4de838fdeb)] - **esm**: bypass CommonJS loader under --default-type (Geoffrey Booth) [#49986](https://github.com/nodejs/node/pull/49986) +* \[[`27e02b633d`](https://github.com/nodejs/node/commit/27e02b633d)] - **esm**: unflag extensionless javascript and wasm in module scope (Geoffrey Booth) [#49974](https://github.com/nodejs/node/pull/49974) +* \[[`1e762ddf63`](https://github.com/nodejs/node/commit/1e762ddf63)] - **esm**: improve `getFormatOfExtensionlessFile` speed (Yagiz Nizipli) [#49965](https://github.com/nodejs/node/pull/49965) +* \[[`112cc7f9f2`](https://github.com/nodejs/node/commit/112cc7f9f2)] - **esm**: improve JSDoc annotation of internal functions (Antoine du Hamel) [#49959](https://github.com/nodejs/node/pull/49959) +* \[[`c48cd84188`](https://github.com/nodejs/node/commit/c48cd84188)] - **esm**: fix cache collision on JSON files using file: URL (Antoine du Hamel) [#49887](https://github.com/nodejs/node/pull/49887) +* \[[`dc80ccef25`](https://github.com/nodejs/node/commit/dc80ccef25)] - **esm**: --experimental-default-type flag to flip module defaults (Geoffrey Booth) [#49869](https://github.com/nodejs/node/pull/49869) +* \[[`01039795a2`](https://github.com/nodejs/node/commit/01039795a2)] - **esm**: require braces for modules code (Geoffrey Booth) [#49657](https://github.com/nodejs/node/pull/49657) +* \[[`e49ebf8f9a`](https://github.com/nodejs/node/commit/e49ebf8f9a)] - **fs**: improve error performance for `readSync` (Jungku Lee) [#50033](https://github.com/nodejs/node/pull/50033) +* \[[`eb33f70260`](https://github.com/nodejs/node/commit/eb33f70260)] - **fs**: improve error performance for `fsyncSync` (Jungku Lee) [#49880](https://github.com/nodejs/node/pull/49880) +* \[[`8d0edc6399`](https://github.com/nodejs/node/commit/8d0edc6399)] - **fs**: improve error performance for `mkdirSync` (CanadaHonk) [#49847](https://github.com/nodejs/node/pull/49847) +* \[[`36df27509e`](https://github.com/nodejs/node/commit/36df27509e)] - **fs**: improve error performance of `realpathSync` (Yagiz Nizipli) [#49962](https://github.com/nodejs/node/pull/49962) +* \[[`4242cb7d7f`](https://github.com/nodejs/node/commit/4242cb7d7f)] - **fs**: improve error performance of `lchownSync` (Yagiz Nizipli) [#49962](https://github.com/nodejs/node/pull/49962) +* \[[`89e7878e44`](https://github.com/nodejs/node/commit/89e7878e44)] - **fs**: improve error performance of `symlinkSync` (Yagiz Nizipli) [#49962](https://github.com/nodejs/node/pull/49962) +* \[[`af6a0611fe`](https://github.com/nodejs/node/commit/af6a0611fe)] - **fs**: improve error performance of `readlinkSync` (Yagiz Nizipli) [#49962](https://github.com/nodejs/node/pull/49962) +* \[[`12cda31c52`](https://github.com/nodejs/node/commit/12cda31c52)] - **fs**: improve error performance of `mkdtempSync` (Yagiz Nizipli) [#49962](https://github.com/nodejs/node/pull/49962) +* \[[`9dba771acb`](https://github.com/nodejs/node/commit/9dba771acb)] - **fs**: improve error performance of `linkSync` (Yagiz Nizipli) [#49962](https://github.com/nodejs/node/pull/49962) +* \[[`ea7902de13`](https://github.com/nodejs/node/commit/ea7902de13)] - **fs**: improve error performance of `chownSync` (Yagiz Nizipli) [#49962](https://github.com/nodejs/node/pull/49962) +* \[[`39f31a38cf`](https://github.com/nodejs/node/commit/39f31a38cf)] - **fs**: improve error performance of `renameSync` (Yagiz Nizipli) [#49962](https://github.com/nodejs/node/pull/49962) +* \[[`35164fa466`](https://github.com/nodejs/node/commit/35164fa466)] - **(SEMVER-MINOR)** **fs**: add flush option to appendFile() functions (Colin Ihrig) [#50095](https://github.com/nodejs/node/pull/50095) +* \[[`06aa4b9fe9`](https://github.com/nodejs/node/commit/06aa4b9fe9)] - **fs**: improve error performance of `readdirSync` (Yagiz Nizipli) [#50131](https://github.com/nodejs/node/pull/50131) +* \[[`b5aecebcd6`](https://github.com/nodejs/node/commit/b5aecebcd6)] - **fs**: fix `unlinkSync` typings (Yagiz Nizipli) [#49859](https://github.com/nodejs/node/pull/49859) +* \[[`6ddea07225`](https://github.com/nodejs/node/commit/6ddea07225)] - **fs**: improve error perf of sync `chmod`+`fchmod` (CanadaHonk) [#49859](https://github.com/nodejs/node/pull/49859) +* \[[`841367078e`](https://github.com/nodejs/node/commit/841367078e)] - **fs**: improve error perf of sync `*times` (CanadaHonk) [#49864](https://github.com/nodejs/node/pull/49864) +* \[[`eb52f73e3e`](https://github.com/nodejs/node/commit/eb52f73e3e)] - **fs**: improve error performance of writevSync (IlyasShabi) [#50038](https://github.com/nodejs/node/pull/50038) +* \[[`d1aa62f1f5`](https://github.com/nodejs/node/commit/d1aa62f1f5)] - **fs**: add flush option to createWriteStream() (Colin Ihrig) [#50093](https://github.com/nodejs/node/pull/50093) +* \[[`57eb06edff`](https://github.com/nodejs/node/commit/57eb06edff)] - **fs**: improve error performance for `ftruncateSync` (André Alves) [#50032](https://github.com/nodejs/node/pull/50032) +* \[[`22e3eb659a`](https://github.com/nodejs/node/commit/22e3eb659a)] - **fs**: add flush option to writeFile() functions (Colin Ihrig) [#50009](https://github.com/nodejs/node/pull/50009) +* \[[`d7132d9214`](https://github.com/nodejs/node/commit/d7132d9214)] - **fs**: improve error performance for `fdatasyncSync` (Jungku Lee) [#49898](https://github.com/nodejs/node/pull/49898) +* \[[`bc2c0410d3`](https://github.com/nodejs/node/commit/bc2c0410d3)] - **fs**: throw errors from sync branches instead of separate implementations (Joyee Cheung) [#49913](https://github.com/nodejs/node/pull/49913) +* \[[`f46bcf1749`](https://github.com/nodejs/node/commit/f46bcf1749)] - **http**: refactor to make servername option normalization testable (Rongjian Zhang) [#38733](https://github.com/nodejs/node/pull/38733) +* \[[`1bfcf817af`](https://github.com/nodejs/node/commit/1bfcf817af)] - **http2**: allow streams to complete gracefully after goaway (Michael Lumish) [#50202](https://github.com/nodejs/node/pull/50202) +* \[[`5c66ec9e66`](https://github.com/nodejs/node/commit/5c66ec9e66)] - **inspector**: simplify dispatchProtocolMessage (Daniel Lemire) [#49780](https://github.com/nodejs/node/pull/49780) +* \[[`251ae1dd72`](https://github.com/nodejs/node/commit/251ae1dd72)] - **lib**: improve performance of validateStringArray and validateBooleanArray (Aras Abbasi) [#49756](https://github.com/nodejs/node/pull/49756) +* \[[`d9c791a508`](https://github.com/nodejs/node/commit/d9c791a508)] - **lib**: fix compileFunction throws range error for negative numbers (Jithil P Ponnan) [#49855](https://github.com/nodejs/node/pull/49855) +* \[[`24cbc550c2`](https://github.com/nodejs/node/commit/24cbc550c2)] - **lib**: reduce overhead of validateObject (Vinicius Lourenço) [#49928](https://github.com/nodejs/node/pull/49928) +* \[[`b80e9497f3`](https://github.com/nodejs/node/commit/b80e9497f3)] - **lib**: make fetch sync and return a Promise (Matthew Aitken) [#49936](https://github.com/nodejs/node/pull/49936) +* \[[`d9eda6761b`](https://github.com/nodejs/node/commit/d9eda6761b)] - **lib**: fix `primordials` typings (Sam Verschueren) [#49895](https://github.com/nodejs/node/pull/49895) +* \[[`3e0d47c1f4`](https://github.com/nodejs/node/commit/3e0d47c1f4)] - **lib**: update params in jsdoc for `HTTPRequestOptions` (Jungku Lee) [#49872](https://github.com/nodejs/node/pull/49872) +* \[[`a01050dec4`](https://github.com/nodejs/node/commit/a01050dec4)] - **(SEMVER-MINOR)** **lib**: add WebSocket client (Matthew Aitken) [#49830](https://github.com/nodejs/node/pull/49830) +* \[[`5bca8feed2`](https://github.com/nodejs/node/commit/5bca8feed2)] - **lib,test**: do not hardcode Buffer.kMaxLength (Michaël Zasso) [#49876](https://github.com/nodejs/node/pull/49876) +* \[[`e8ebed7a24`](https://github.com/nodejs/node/commit/e8ebed7a24)] - **meta**: move Trott to TSC regular member (Rich Trott) [#50297](https://github.com/nodejs/node/pull/50297) +* \[[`27e957cea8`](https://github.com/nodejs/node/commit/27e957cea8)] - **meta**: ping TSC for offboarding (Tobias Nießen) [#50147](https://github.com/nodejs/node/pull/50147) +* \[[`fab39062d5`](https://github.com/nodejs/node/commit/fab39062d5)] - **meta**: bump actions/upload-artifact from 3.1.2 to 3.1.3 (dependabot\[bot]) [#50000](https://github.com/nodejs/node/pull/50000) +* \[[`46ec82496c`](https://github.com/nodejs/node/commit/46ec82496c)] - **meta**: bump actions/cache from 3.3.1 to 3.3.2 (dependabot\[bot]) [#50003](https://github.com/nodejs/node/pull/50003) +* \[[`a634fb431e`](https://github.com/nodejs/node/commit/a634fb431e)] - **meta**: bump github/codeql-action from 2.21.5 to 2.21.9 (dependabot\[bot]) [#50002](https://github.com/nodejs/node/pull/50002) +* \[[`c221f72911`](https://github.com/nodejs/node/commit/c221f72911)] - **meta**: bump actions/checkout from 3.6.0 to 4.1.0 (dependabot\[bot]) [#50001](https://github.com/nodejs/node/pull/50001) +* \[[`d356e5e395`](https://github.com/nodejs/node/commit/d356e5e395)] - **meta**: update website team with new name (Rich Trott) [#49883](https://github.com/nodejs/node/pull/49883) +* \[[`2ff4e71452`](https://github.com/nodejs/node/commit/2ff4e71452)] - **module**: move helpers out of cjs loader (Geoffrey Booth) [#49912](https://github.com/nodejs/node/pull/49912) +* \[[`142ac3f82d`](https://github.com/nodejs/node/commit/142ac3f82d)] - **module, esm**: jsdoc for modules files (Geoffrey Booth) [#49523](https://github.com/nodejs/node/pull/49523) +* \[[`e2f0ef2a60`](https://github.com/nodejs/node/commit/e2f0ef2a60)] - **node-api**: update headers for better wasm support (Toyo Li) [#49037](https://github.com/nodejs/node/pull/49037) +* \[[`db2a07fcd6`](https://github.com/nodejs/node/commit/db2a07fcd6)] - **node-api**: run finalizers directly from GC (Vladimir Morozov) [#42651](https://github.com/nodejs/node/pull/42651) +* \[[`c25716be8b`](https://github.com/nodejs/node/commit/c25716be8b)] - **os**: cache homedir, remove getCheckedFunction (Aras Abbasi) [#50037](https://github.com/nodejs/node/pull/50037) +* \[[`e8f024b4db`](https://github.com/nodejs/node/commit/e8f024b4db)] - **perf\_hooks**: reduce overhead of new user timings (Vinicius Lourenço) [#49914](https://github.com/nodejs/node/pull/49914) +* \[[`a517be0a5a`](https://github.com/nodejs/node/commit/a517be0a5a)] - **perf\_hooks**: reducing overhead of performance observer entry list (Vinicius Lourenço) [#50008](https://github.com/nodejs/node/pull/50008) +* \[[`42e49ec381`](https://github.com/nodejs/node/commit/42e49ec381)] - **perf\_hooks**: reduce overhead of new resource timings (Vinicius Lourenço) [#49837](https://github.com/nodejs/node/pull/49837) +* \[[`c99e51ed1b`](https://github.com/nodejs/node/commit/c99e51ed1b)] - **src**: generate default snapshot with --predictable (Joyee Cheung) [#48749](https://github.com/nodejs/node/pull/48749) +* \[[`47164e238f`](https://github.com/nodejs/node/commit/47164e238f)] - **src**: fix TLSWrap lifetime bug in ALPN callback (Ben Noordhuis) [#49635](https://github.com/nodejs/node/pull/49635) +* \[[`e1df69e73e`](https://github.com/nodejs/node/commit/e1df69e73e)] - **src**: set port in node\_options to uint16\_t (Yagiz Nizipli) [#49151](https://github.com/nodejs/node/pull/49151) +* \[[`1eb2af29b4`](https://github.com/nodejs/node/commit/1eb2af29b4)] - **src**: name scoped lock (Mohammed Keyvanzadeh) [#50010](https://github.com/nodejs/node/pull/50010) +* \[[`5131fde655`](https://github.com/nodejs/node/commit/5131fde655)] - **src**: use exact return value for `uv_os_getenv` (Yagiz Nizipli) [#49149](https://github.com/nodejs/node/pull/49149) +* \[[`ba169be5ca`](https://github.com/nodejs/node/commit/ba169be5ca)] - **src**: move const variable in `node_file.h` to `node_file.cc` (Jungku Lee) [#49688](https://github.com/nodejs/node/pull/49688) +* \[[`5a2351d3ab`](https://github.com/nodejs/node/commit/5a2351d3ab)] - **src**: remove unused variable (Michaël Zasso) [#49665](https://github.com/nodejs/node/pull/49665) +* \[[`f2f993a32f`](https://github.com/nodejs/node/commit/f2f993a32f)] - **stream**: simplify prefinish (Robert Nagy) [#50204](https://github.com/nodejs/node/pull/50204) +* \[[`6d7274e3ca`](https://github.com/nodejs/node/commit/6d7274e3ca)] - **stream**: reduce scope of readable bitmap details (Robert Nagy) [#49963](https://github.com/nodejs/node/pull/49963) +* \[[`ffdc357167`](https://github.com/nodejs/node/commit/ffdc357167)] - **(SEMVER-MINOR)** **stream**: allow pass stream class to `stream.compose` (Alex Yang) [#50187](https://github.com/nodejs/node/pull/50187) +* \[[`4861ad6431`](https://github.com/nodejs/node/commit/4861ad6431)] - **stream**: call helper function from push and unshift (Raz Luvaton) [#50173](https://github.com/nodejs/node/pull/50173) +* \[[`e60b3ab31b`](https://github.com/nodejs/node/commit/e60b3ab31b)] - **stream**: use private symbol for bitmap state (Robert Nagy) [#49993](https://github.com/nodejs/node/pull/49993) +* \[[`ecbfb23f6b`](https://github.com/nodejs/node/commit/ecbfb23f6b)] - **stream**: lazy allocate back pressure buffer (Robert Nagy) [#50013](https://github.com/nodejs/node/pull/50013) +* \[[`88c739bef4`](https://github.com/nodejs/node/commit/88c739bef4)] - **stream**: avoid unnecessary drain for sync stream (Robert Nagy) [#50014](https://github.com/nodejs/node/pull/50014) +* \[[`4b27087b30`](https://github.com/nodejs/node/commit/4b27087b30)] - **stream**: optimize Writable (Robert Nagy) [#50012](https://github.com/nodejs/node/pull/50012) +* \[[`def55f80a1`](https://github.com/nodejs/node/commit/def55f80a1)] - **stream**: avoid tick in writable hot path (Robert Nagy) [#49966](https://github.com/nodejs/node/pull/49966) +* \[[`35ec93115d`](https://github.com/nodejs/node/commit/35ec93115d)] - **stream**: writable state bitmap (Robert Nagy) [#49899](https://github.com/nodejs/node/pull/49899) +* \[[`6e0f0fafe4`](https://github.com/nodejs/node/commit/6e0f0fafe4)] - **test**: use ppc and ppc64 to skip SEA tests on PowerPC (Joyee Cheung) [#50828](https://github.com/nodejs/node/pull/50828) +* \[[`a528bbceca`](https://github.com/nodejs/node/commit/a528bbceca)] - **test**: mark SEA tests as flaky on PowerPC (Joyee Cheung) [#50750](https://github.com/nodejs/node/pull/50750) +* \[[`4e34f9a26e`](https://github.com/nodejs/node/commit/4e34f9a26e)] - **test**: relax version check with shared OpenSSL (Luigi Pinca) [#50505](https://github.com/nodejs/node/pull/50505) +* \[[`41ca1132eb`](https://github.com/nodejs/node/commit/41ca1132eb)] - **test**: fix crypto-dh error message for OpenSSL 3.x (Kerem Kat) [#50395](https://github.com/nodejs/node/pull/50395) +* \[[`a6a05e8a88`](https://github.com/nodejs/node/commit/a6a05e8a88)] - **test**: fix testsuite against zlib version 1.3 (Dominique Leuenberger) [#50364](https://github.com/nodejs/node/pull/50364) +* \[[`8dd895e574`](https://github.com/nodejs/node/commit/8dd895e574)] - **test**: replace forEach with for..of in test-process-env (Niya Shiyas) [#49825](https://github.com/nodejs/node/pull/49825) +* \[[`81886c66d1`](https://github.com/nodejs/node/commit/81886c66d1)] - **test**: replace forEach with for..of in test-http-url (Niya Shiyas) [#49840](https://github.com/nodejs/node/pull/49840) +* \[[`7d8a18b257`](https://github.com/nodejs/node/commit/7d8a18b257)] - **test**: improve watch mode test (Moshe Atlow) [#50319](https://github.com/nodejs/node/pull/50319) +* \[[`baa04b79ca`](https://github.com/nodejs/node/commit/baa04b79ca)] - **test**: set `test-watch-mode-inspect` as flaky (Yagiz Nizipli) [#50259](https://github.com/nodejs/node/pull/50259) +* \[[`3d9130bc2e`](https://github.com/nodejs/node/commit/3d9130bc2e)] - _**Revert**_ "**test**: set `test-esm-loader-resolve-type` as flaky" (Antoine du Hamel) [#50315](https://github.com/nodejs/node/pull/50315) +* \[[`72626f9a35`](https://github.com/nodejs/node/commit/72626f9a35)] - **test**: replace forEach with for..of in test-http-perf\_hooks.js (Niya Shiyas) [#49818](https://github.com/nodejs/node/pull/49818) +* \[[`379a7255e8`](https://github.com/nodejs/node/commit/379a7255e8)] - **test**: replace forEach with for..of in test-net-isipv4.js (Niya Shiyas) [#49822](https://github.com/nodejs/node/pull/49822) +* \[[`b55fcd75da`](https://github.com/nodejs/node/commit/b55fcd75da)] - **test**: deflake `test-esm-loader-resolve-type` (Antoine du Hamel) [#50273](https://github.com/nodejs/node/pull/50273) +* \[[`0134af3eeb`](https://github.com/nodejs/node/commit/0134af3eeb)] - **test**: replace forEach with for..of in test-http2-server (Niya Shiyas) [#49819](https://github.com/nodejs/node/pull/49819) +* \[[`8c15281d06`](https://github.com/nodejs/node/commit/8c15281d06)] - **test**: replace forEach with for..of in test-http2-client-destroy.js (Niya Shiyas) [#49820](https://github.com/nodejs/node/pull/49820) +* \[[`c37a75a898`](https://github.com/nodejs/node/commit/c37a75a898)] - **test**: update `url` web platform tests (Yagiz Nizipli) [#50264](https://github.com/nodejs/node/pull/50264) +* \[[`ab5985d0e9`](https://github.com/nodejs/node/commit/ab5985d0e9)] - **test**: set `test-emit-after-on-destroyed` as flaky (Yagiz Nizipli) [#50246](https://github.com/nodejs/node/pull/50246) +* \[[`50181a19b8`](https://github.com/nodejs/node/commit/50181a19b8)] - **test**: set inspector async stack test as flaky (Yagiz Nizipli) [#50244](https://github.com/nodejs/node/pull/50244) +* \[[`b9e0fed995`](https://github.com/nodejs/node/commit/b9e0fed995)] - **test**: set test-worker-nearheaplimit-deadlock flaky (StefanStojanovic) [#50277](https://github.com/nodejs/node/pull/50277) +* \[[`2cfc4007d1`](https://github.com/nodejs/node/commit/2cfc4007d1)] - **test**: set `test-cli-node-options` as flaky (Yagiz Nizipli) [#50296](https://github.com/nodejs/node/pull/50296) +* \[[`788714b28f`](https://github.com/nodejs/node/commit/788714b28f)] - **test**: reduce the number of requests and parsers (Luigi Pinca) [#50240](https://github.com/nodejs/node/pull/50240) +* \[[`0dce19c8f6`](https://github.com/nodejs/node/commit/0dce19c8f6)] - **test**: set crypto-timing test as flaky (Yagiz Nizipli) [#50232](https://github.com/nodejs/node/pull/50232) +* \[[`5d4b5ff1b8`](https://github.com/nodejs/node/commit/5d4b5ff1b8)] - **test**: set `test-structuredclone-*` as flaky (Yagiz Nizipli) [#50261](https://github.com/nodejs/node/pull/50261) +* \[[`5c56081d67`](https://github.com/nodejs/node/commit/5c56081d67)] - **test**: deflake `test-loaders-workers-spawned` (Antoine du Hamel) [#50251](https://github.com/nodejs/node/pull/50251) +* \[[`3441e1982d`](https://github.com/nodejs/node/commit/3441e1982d)] - **test**: improve code coverage of diagnostics\_channel (Jithil P Ponnan) [#50053](https://github.com/nodejs/node/pull/50053) +* \[[`696ba93329`](https://github.com/nodejs/node/commit/696ba93329)] - **test**: set `test-esm-loader-resolve-type` as flaky (Yagiz Nizipli) [#50226](https://github.com/nodejs/node/pull/50226) +* \[[`8b260c5d6b`](https://github.com/nodejs/node/commit/8b260c5d6b)] - **test**: set inspector async hook test as flaky (Yagiz Nizipli) [#50252](https://github.com/nodejs/node/pull/50252) +* \[[`f3296d25e8`](https://github.com/nodejs/node/commit/f3296d25e8)] - **test**: skip test-benchmark-os.js on IBM i (Abdirahim Musse) [#50208](https://github.com/nodejs/node/pull/50208) +* \[[`fefe17b02e`](https://github.com/nodejs/node/commit/fefe17b02e)] - **test**: set parallel http server test as flaky (Yagiz Nizipli) [#50227](https://github.com/nodejs/node/pull/50227) +* \[[`228c87f329`](https://github.com/nodejs/node/commit/228c87f329)] - **test**: set test-worker-nearheaplimit-deadlock flaky (Stefan Stojanovic) [#50238](https://github.com/nodejs/node/pull/50238) +* \[[`c2c2506eab`](https://github.com/nodejs/node/commit/c2c2506eab)] - **test**: set `test-runner-watch-mode` as flaky (Yagiz Nizipli) [#50221](https://github.com/nodejs/node/pull/50221) +* \[[`16a07983d4`](https://github.com/nodejs/node/commit/16a07983d4)] - **test**: set sea snapshot tests as flaky (Yagiz Nizipli) [#50223](https://github.com/nodejs/node/pull/50223) +* \[[`7cd406a0b8`](https://github.com/nodejs/node/commit/7cd406a0b8)] - **test**: fix defect path traversal tests (Tobias Nießen) [#50124](https://github.com/nodejs/node/pull/50124) +* \[[`1cf3f8da32`](https://github.com/nodejs/node/commit/1cf3f8da32)] - **test**: replace forEach with for..of in test-net-isipv6.js (Niya Shiyas) [#49823](https://github.com/nodejs/node/pull/49823) +* \[[`214997a99e`](https://github.com/nodejs/node/commit/214997a99e)] - **test**: reduce number of repetition in test-heapdump-shadowrealm.js (Chengzhong Wu) [#50104](https://github.com/nodejs/node/pull/50104) +* \[[`9d836516e6`](https://github.com/nodejs/node/commit/9d836516e6)] - **test**: replace forEach with for..of in test-parse-args.mjs (Niya Shiyas) [#49824](https://github.com/nodejs/node/pull/49824) +* \[[`fee8b24603`](https://github.com/nodejs/node/commit/fee8b24603)] - **test**: replace forEach() in test-net-perf\_hooks with for of (Narcisa Codreanu) [#49831](https://github.com/nodejs/node/pull/49831) +* \[[`4c58b92ba8`](https://github.com/nodejs/node/commit/4c58b92ba8)] - **test**: change forEach to for...of (Tiffany Lastimosa) [#49799](https://github.com/nodejs/node/pull/49799) +* \[[`01b01527d7`](https://github.com/nodejs/node/commit/01b01527d7)] - **test**: update skip for moved `test-wasm-web-api` (Richard Lau) [#49958](https://github.com/nodejs/node/pull/49958) +* \[[`179e293103`](https://github.com/nodejs/node/commit/179e293103)] - _**Revert**_ "**test**: mark test-runner-output as flaky" (Luigi Pinca) [#49905](https://github.com/nodejs/node/pull/49905) +* \[[`829eb99afd`](https://github.com/nodejs/node/commit/829eb99afd)] - **test**: disambiguate AIX and IBM i (Richard Lau) [#48056](https://github.com/nodejs/node/pull/48056) +* \[[`126407d438`](https://github.com/nodejs/node/commit/126407d438)] - **test**: deflake test-perf-hooks.js (Joyee Cheung) [#49892](https://github.com/nodejs/node/pull/49892) +* \[[`393fd5b7c9`](https://github.com/nodejs/node/commit/393fd5b7c9)] - **test**: migrate message error tests from Python to JS (Yiyun Lei) [#49721](https://github.com/nodejs/node/pull/49721) +* \[[`5dfe4236f8`](https://github.com/nodejs/node/commit/5dfe4236f8)] - **test**: fix edge snapshot stack traces (Geoffrey Booth) [#49659](https://github.com/nodejs/node/pull/49659) +* \[[`d164e537bf`](https://github.com/nodejs/node/commit/d164e537bf)] - **test,crypto**: update WebCryptoAPI WPT (Filip Skokan) [#50039](https://github.com/nodejs/node/pull/50039) +* \[[`55a03fedae`](https://github.com/nodejs/node/commit/55a03fedae)] - **test\_runner**: add test location for FileTests (Colin Ihrig) [#49999](https://github.com/nodejs/node/pull/49999) +* \[[`10b35cfb6e`](https://github.com/nodejs/node/commit/10b35cfb6e)] - **test\_runner**: replace spurious if with else (Colin Ihrig) [#49943](https://github.com/nodejs/node/pull/49943) +* \[[`27558c4314`](https://github.com/nodejs/node/commit/27558c4314)] - **test\_runner**: catch reporter errors (Moshe Atlow) [#49646](https://github.com/nodejs/node/pull/49646) +* \[[`709c6c0cab`](https://github.com/nodejs/node/commit/709c6c0cab)] - **(SEMVER-MINOR)** **test\_runner, cli**: add --test-concurrency flag (Colin Ihrig) [#49996](https://github.com/nodejs/node/pull/49996) +* \[[`64ef108dd9`](https://github.com/nodejs/node/commit/64ef108dd9)] - **test\_runner,test**: fix flaky test-runner-cli-concurrency.js (Colin Ihrig) [#50108](https://github.com/nodejs/node/pull/50108) +* \[[`d2def152d9`](https://github.com/nodejs/node/commit/d2def152d9)] - **tls**: reduce TLS 'close' event listener warnings (Tim Perry) [#50136](https://github.com/nodejs/node/pull/50136) +* \[[`294b650f5c`](https://github.com/nodejs/node/commit/294b650f5c)] - **tls**: handle cases where the raw socket is destroyed (Luigi Pinca) [#49980](https://github.com/nodejs/node/pull/49980) +* \[[`52b5693949`](https://github.com/nodejs/node/commit/52b5693949)] - **tls**: ciphers allow bang syntax (Chemi Atlow) [#49712](https://github.com/nodejs/node/pull/49712) +* \[[`05ee35028b`](https://github.com/nodejs/node/commit/05ee35028b)] - **tools**: update comment in `update-uncidi.sh` and `acorn_version.h` (Jungku Lee) [#50175](https://github.com/nodejs/node/pull/50175) +* \[[`35b160e6a3`](https://github.com/nodejs/node/commit/35b160e6a3)] - **tools**: refactor checkimports.py (Mohammed Keyvanzadeh) [#50011](https://github.com/nodejs/node/pull/50011) +* \[[`b959d36b77`](https://github.com/nodejs/node/commit/b959d36b77)] - **tools**: fix comments referencing dep\_updaters scripts (Keksonoid) [#50165](https://github.com/nodejs/node/pull/50165) +* \[[`bd5d5331b0`](https://github.com/nodejs/node/commit/bd5d5331b0)] - **tools**: remove no-return-await lint rule (翠 / green) [#50118](https://github.com/nodejs/node/pull/50118) +* \[[`b9adf3d66e`](https://github.com/nodejs/node/commit/b9adf3d66e)] - **tools**: update lint-md-dependencies (Node.js GitHub Bot) [#50083](https://github.com/nodejs/node/pull/50083) +* \[[`4978bdc4ec`](https://github.com/nodejs/node/commit/4978bdc4ec)] - **tools**: update eslint to 8.51.0 (Node.js GitHub Bot) [#50084](https://github.com/nodejs/node/pull/50084) +* \[[`e323a367fd`](https://github.com/nodejs/node/commit/e323a367fd)] - **tools**: remove genv8constants.py (Ben Noordhuis) [#50023](https://github.com/nodejs/node/pull/50023) +* \[[`1cc6cbff26`](https://github.com/nodejs/node/commit/1cc6cbff26)] - **tools**: update eslint to 8.50.0 (Node.js GitHub Bot) [#49989](https://github.com/nodejs/node/pull/49989) +* \[[`924231be2a`](https://github.com/nodejs/node/commit/924231be2a)] - **tools**: update lint-md-dependencies (Node.js GitHub Bot) [#49983](https://github.com/nodejs/node/pull/49983) +* \[[`732b5661ea`](https://github.com/nodejs/node/commit/732b5661ea)] - **tools**: add navigation ARIA landmark to generated API ToC (Rich Trott) [#49882](https://github.com/nodejs/node/pull/49882) +* \[[`353a14278e`](https://github.com/nodejs/node/commit/353a14278e)] - **tools**: update github\_reporter to 1.5.3 (Node.js GitHub Bot) [#49877](https://github.com/nodejs/node/pull/49877) +* \[[`0aaab45d7c`](https://github.com/nodejs/node/commit/0aaab45d7c)] - **tools**: improve macOS notarization process output readability (Ulises Gascón) [#50389](https://github.com/nodejs/node/pull/50389) +* \[[`ad326033e2`](https://github.com/nodejs/node/commit/ad326033e2)] - **tools**: remove unused `version` function (Ulises Gascón) [#50390](https://github.com/nodejs/node/pull/50390) +* \[[`2f32472544`](https://github.com/nodejs/node/commit/2f32472544)] - **tools**: drop support for osx notarization with gon (Ulises Gascón) [#50291](https://github.com/nodejs/node/pull/50291) +* \[[`3b1c15aeb0`](https://github.com/nodejs/node/commit/3b1c15aeb0)] - **tools**: use osx notarytool for future releases (Ulises Gascon) [#48701](https://github.com/nodejs/node/pull/48701) +* \[[`0ddb87ede3`](https://github.com/nodejs/node/commit/0ddb87ede3)] - **typings**: use `Symbol.dispose` and `Symbol.asyncDispose` in types (Niklas Mollenhauer) [#50123](https://github.com/nodejs/node/pull/50123) +* \[[`bf5b2115a0`](https://github.com/nodejs/node/commit/bf5b2115a0)] - **util**: remove internal mime fns from benchmarks (Aras Abbasi) [#50201](https://github.com/nodejs/node/pull/50201) +* \[[`ac02cdb0ad`](https://github.com/nodejs/node/commit/ac02cdb0ad)] - **util**: lazy parse mime parameters (Aras Abbasi) [#49889](https://github.com/nodejs/node/pull/49889) +* \[[`9853fd96df`](https://github.com/nodejs/node/commit/9853fd96df)] - **vm**: reject in importModuleDynamically without --experimental-vm-modules (Joyee Cheung) [#50137](https://github.com/nodejs/node/pull/50137) +* \[[`3697c19c80`](https://github.com/nodejs/node/commit/3697c19c80)] - **vm**: use internal versions of compileFunction and Script (Joyee Cheung) [#50137](https://github.com/nodejs/node/pull/50137) +* \[[`56bbc30a44`](https://github.com/nodejs/node/commit/56bbc30a44)] - **vm**: unify host-defined option generation in vm.compileFunction (Joyee Cheung) [#50137](https://github.com/nodejs/node/pull/50137) +* \[[`57efd5292c`](https://github.com/nodejs/node/commit/57efd5292c)] - **(SEMVER-MINOR)** **vm**: use import attributes instead of import assertions (Antoine du Hamel) [#50141](https://github.com/nodejs/node/pull/50141) +* \[[`17581c2716`](https://github.com/nodejs/node/commit/17581c2716)] - **vm**: use default HDO when importModuleDynamically is not set (Joyee Cheung) [#49950](https://github.com/nodejs/node/pull/49950) +* \[[`65e18aa8e7`](https://github.com/nodejs/node/commit/65e18aa8e7)] - **wasi**: address coverity warning (Michael Dawson) [#49866](https://github.com/nodejs/node/pull/49866) +* \[[`5b695d6a8d`](https://github.com/nodejs/node/commit/5b695d6a8d)] - **wasi**: fix up wasi tests for ibmi (Michael Dawson) [#49953](https://github.com/nodejs/node/pull/49953) +* \[[`b86e1f5cbd`](https://github.com/nodejs/node/commit/b86e1f5cbd)] - **(SEMVER-MINOR)** **wasi**: updates required for latest uvwasi version (Michael Dawson) [#49908](https://github.com/nodejs/node/pull/49908) +* \[[`b4d149b4d6`](https://github.com/nodejs/node/commit/b4d149b4d6)] - **worker**: handle detached `MessagePort` from a different context (Juan José) [#49150](https://github.com/nodejs/node/pull/49150) +* \[[`f564ed4e05`](https://github.com/nodejs/node/commit/f564ed4e05)] - **zlib**: fix discovery of cpu-features.h for android (MatteoBax) [#49828](https://github.com/nodejs/node/pull/49828) + ## 2023-10-24, Version 20.9.0 'Iron' (LTS), @richardlau diff --git a/doc/changelogs/CHANGELOG_V21.md b/doc/changelogs/CHANGELOG_V21.md index 4804d815c5fe0f..aadf867d4549ee 100644 --- a/doc/changelogs/CHANGELOG_V21.md +++ b/doc/changelogs/CHANGELOG_V21.md @@ -8,6 +8,9 @@ +21.4.0
    +21.3.0
    +21.2.0
    21.1.0
    21.0.0
    @@ -37,6 +40,401 @@ * [io.js](CHANGELOG_IOJS.md) * [Archive](CHANGELOG_ARCHIVE.md) + + +## 2023-12-05, Version 21.4.0 (Current), @targos + +### Notable Changes + +This release fixes a regression introduced in v21.3.0 that caused the `fs.writeFileSync` +method to throw when called with `'utf8'` encoding, no flag option, and if the target file didn't exist yet. + +* \[[`32acafeeb6`](https://github.com/nodejs/node/commit/32acafeeb6)] - **(SEMVER-MINOR)** **fs**: introduce `dirent.parentPath` (Antoine du Hamel) [#50976](https://github.com/nodejs/node/pull/50976) +* \[[`724548674d`](https://github.com/nodejs/node/commit/724548674d)] - **fs**: use default w flag for writeFileSync with utf8 encoding (Murilo Kakazu) [#50990](https://github.com/nodejs/node/pull/50990) + +### Commits + +* \[[`b24ee15fb2`](https://github.com/nodejs/node/commit/b24ee15fb2)] - **benchmark**: update iterations in benchmark/crypto/hkdf.js (Lei Shi) [#50866](https://github.com/nodejs/node/pull/50866) +* \[[`f79b54e60e`](https://github.com/nodejs/node/commit/f79b54e60e)] - **benchmark**: update iterations in benchmark/crypto/get-ciphers.js (Lei Shi) [#50863](https://github.com/nodejs/node/pull/50863) +* \[[`dc049acbbb`](https://github.com/nodejs/node/commit/dc049acbbb)] - **benchmark**: update number of iterations for `util.inspect` (kylo5aby) [#50651](https://github.com/nodejs/node/pull/50651) +* \[[`d7c562ae38`](https://github.com/nodejs/node/commit/d7c562ae38)] - **deps**: update googletest to 76bb2af (Node.js GitHub Bot) [#50555](https://github.com/nodejs/node/pull/50555) +* \[[`59a45ddbef`](https://github.com/nodejs/node/commit/59a45ddbef)] - **deps**: update googletest to b10fad3 (Node.js GitHub Bot) [#50555](https://github.com/nodejs/node/pull/50555) +* \[[`099ebdb781`](https://github.com/nodejs/node/commit/099ebdb781)] - **deps**: update undici to 5.28.1 (Node.js GitHub Bot) [#50975](https://github.com/nodejs/node/pull/50975) +* \[[`4b1bed04f7`](https://github.com/nodejs/node/commit/4b1bed04f7)] - **deps**: update undici to 5.28.0 (Node.js GitHub Bot) [#50915](https://github.com/nodejs/node/pull/50915) +* \[[`b281e98b1e`](https://github.com/nodejs/node/commit/b281e98b1e)] - **doc**: add additional details about `--input-type` (Shubham Pandey) [#50796](https://github.com/nodejs/node/pull/50796) +* \[[`b7036f2028`](https://github.com/nodejs/node/commit/b7036f2028)] - **doc**: add procedure when CVEs don't get published (Rafael Gonzaga) [#50945](https://github.com/nodejs/node/pull/50945) +* \[[`7adf239af0`](https://github.com/nodejs/node/commit/7adf239af0)] - **doc**: fix some errors in esm resolution algorithms (Christopher Jeffrey (JJ)) [#50898](https://github.com/nodejs/node/pull/50898) +* \[[`759ebcaead`](https://github.com/nodejs/node/commit/759ebcaead)] - **doc**: reserve 121 for Electron 29 (Shelley Vohr) [#50957](https://github.com/nodejs/node/pull/50957) +* \[[`cedc3427fa`](https://github.com/nodejs/node/commit/cedc3427fa)] - **doc**: run license-builder (github-actions\[bot]) [#50926](https://github.com/nodejs/node/pull/50926) +* \[[`30a6f19769`](https://github.com/nodejs/node/commit/30a6f19769)] - **doc**: document non-node\_modules-only runtime deprecation (Joyee Cheung) [#50748](https://github.com/nodejs/node/pull/50748) +* \[[`eecab883f0`](https://github.com/nodejs/node/commit/eecab883f0)] - **doc**: add doc for Unix abstract socket (theanarkh) [#50904](https://github.com/nodejs/node/pull/50904) +* \[[`ec74b93b38`](https://github.com/nodejs/node/commit/ec74b93b38)] - **doc**: remove flicker on page load on dark theme (Dima Demakov) [#50942](https://github.com/nodejs/node/pull/50942) +* \[[`724548674d`](https://github.com/nodejs/node/commit/724548674d)] - **fs**: use default w flag for writeFileSync with utf8 encoding (Murilo Kakazu) [#50990](https://github.com/nodejs/node/pull/50990) +* \[[`32acafeeb6`](https://github.com/nodejs/node/commit/32acafeeb6)] - **(SEMVER-MINOR)** **fs**: introduce `dirent.parentPath` (Antoine du Hamel) [#50976](https://github.com/nodejs/node/pull/50976) +* \[[`c1ee506454`](https://github.com/nodejs/node/commit/c1ee506454)] - **fs**: remove workaround for `esm` package (Yagiz Nizipli) [#50907](https://github.com/nodejs/node/pull/50907) +* \[[`1cf087dfb3`](https://github.com/nodejs/node/commit/1cf087dfb3)] - **lib**: refactor to use validateFunction in diagnostics\_channel (Deokjin Kim) [#50955](https://github.com/nodejs/node/pull/50955) +* \[[`c37d18d5e1`](https://github.com/nodejs/node/commit/c37d18d5e1)] - **lib**: streamline process.binding() handling (Joyee Cheung) [#50773](https://github.com/nodejs/node/pull/50773) +* \[[`246cf73631`](https://github.com/nodejs/node/commit/246cf73631)] - **lib,src**: replace toUSVString with `toWellFormed()` (Yagiz Nizipli) [#47342](https://github.com/nodejs/node/pull/47342) +* \[[`9bc79173a0`](https://github.com/nodejs/node/commit/9bc79173a0)] - **loader**: speed up line length calc used by moduleProvider (Mudit) [#50969](https://github.com/nodejs/node/pull/50969) +* \[[`812ab9e4f8`](https://github.com/nodejs/node/commit/812ab9e4f8)] - **meta**: bump step-security/harden-runner from 2.6.0 to 2.6.1 (dependabot\[bot]) [#50999](https://github.com/nodejs/node/pull/50999) +* \[[`1dbe1af19a`](https://github.com/nodejs/node/commit/1dbe1af19a)] - **meta**: bump github/codeql-action from 2.22.5 to 2.22.8 (dependabot\[bot]) [#50998](https://github.com/nodejs/node/pull/50998) +* \[[`bed1b93f8a`](https://github.com/nodejs/node/commit/bed1b93f8a)] - **meta**: move one or more collaborators to emeritus (Node.js GitHub Bot) [#50931](https://github.com/nodejs/node/pull/50931) +* \[[`1e7d101428`](https://github.com/nodejs/node/commit/1e7d101428)] - **src**: make ModifyCodeGenerationFromStrings more robust (Joyee Cheung) [#50763](https://github.com/nodejs/node/pull/50763) +* \[[`709ac479eb`](https://github.com/nodejs/node/commit/709ac479eb)] - **src**: disable uncaught exception abortion for ESM syntax detection (Yagiz Nizipli) [#50987](https://github.com/nodejs/node/pull/50987) +* \[[`f6ff11c9f9`](https://github.com/nodejs/node/commit/f6ff11c9f9)] - **src**: fix backtrace with tail \[\[noreturn]] abort (Chengzhong Wu) [#50849](https://github.com/nodejs/node/pull/50849) +* \[[`74f5a1cbc9`](https://github.com/nodejs/node/commit/74f5a1cbc9)] - **src**: print MKSNAPSHOT debug logs to stderr (Joyee Cheung) [#50759](https://github.com/nodejs/node/pull/50759) +* \[[`3a1c664a97`](https://github.com/nodejs/node/commit/3a1c664a97)] - **test**: replace forEach to for.. test-webcrypto-export-import-cfrg.js (Angelo Parziale) [#50785](https://github.com/nodejs/node/pull/50785) +* \[[`ac3a6eefe3`](https://github.com/nodejs/node/commit/ac3a6eefe3)] - **test**: log more information in SEA tests (Joyee Cheung) [#50759](https://github.com/nodejs/node/pull/50759) +* \[[`94462d42f5`](https://github.com/nodejs/node/commit/94462d42f5)] - **test**: consolidate utf8 text fixtures in tests (Joyee Cheung) [#50732](https://github.com/nodejs/node/pull/50732) +* \[[`8e1a70a347`](https://github.com/nodejs/node/commit/8e1a70a347)] - **tools**: add triggers to update release links workflow (Moshe Atlow) [#50974](https://github.com/nodejs/node/pull/50974) +* \[[`ca10cbb774`](https://github.com/nodejs/node/commit/ca10cbb774)] - **tools**: update lint-md-dependencies to rollup\@4.5.2 (Node.js GitHub Bot) [#50913](https://github.com/nodejs/node/pull/50913) +* \[[`1e40c4a366`](https://github.com/nodejs/node/commit/1e40c4a366)] - **tools**: fix current version check (Marco Ippolito) [#50951](https://github.com/nodejs/node/pull/50951) +* \[[`3faed331e1`](https://github.com/nodejs/node/commit/3faed331e1)] - **typings**: fix JSDoc in `internal/modules/esm/hooks` (Alex Yang) [#50887](https://github.com/nodejs/node/pull/50887) +* \[[`6a087ceffa`](https://github.com/nodejs/node/commit/6a087ceffa)] - **url**: throw error if argument length of revokeObjectURL is 0 (DylanTet) [#50433](https://github.com/nodejs/node/pull/50433) + + + +## 2023-11-30, Version 21.3.0 (Current), @RafaelGSS + +### Notable Changes + +#### New `--disable-warning` flag + +This version adds a new `--disable-warning` option that allows users to disable specific warnings either by code +(i.e. DEP0025) or type (i.e. DeprecationWarning, ExperimentalWarning). + +This option works alongside existing `--warnings` and `--no-warnings`. + +For example, the following script will not emit DEP0025 `require('node:sys')` when executed with +`node --disable-warning=DEP0025`: + +```mjs +import sys from 'node:sys'; +``` + +Contributed by Ethan-Arrowood in [#50661](https://github.com/nodejs/node/pull/50661) + +#### Update Root Certificates to NSS 3.95 + +This is the [certdata.txt](https://hg.mozilla.org/projects/nss/raw-file/NSS_3_95_RTM/lib/ckfw/builtins/certdata.txt) from NSS 3.95, released on 2023-11-16. + +This is the version of NSS that will ship in Firefox 121 on +2023-12-19. + +Certificates added: + +* TrustAsia Global Root CA G3 +* TrustAsia Global Root CA G4 +* CommScope Public Trust ECC Root-01 +* CommScope Public Trust ECC Root-02 +* CommScope Public Trust RSA Root-01 +* CommScope Public Trust RSA Root-02 + +Certificates removed: + +* Autoridad de Certificacion Firmaprofesional CIF A62634068 + +#### Fast fs.writeFileSync with UTF-8 Strings + +Enhanced writeFileSync functionality by implementing a highly efficient fast path primarily in C++ for UTF8-encoded string data. +Additionally, optimized the `appendFileSync` method by leveraging the improved `writeFileSync` functionality. +For simplicity and performance considerations, the current implementation supports only string data, +as benchmark results raise concerns about the efficacy of using Buffer for this purpose. +Future optimizations and expansions may be explored, but for now, the focus is on maximizing efficiency for string data operations. + +Contributed by CanadaHonk in [#49884](https://github.com/nodejs/node/pull/49884). + +#### Other Notable Changes + +* \[[`c7a7493ca2`](https://github.com/nodejs/node/commit/c7a7493ca2)] - **(SEMVER-MINOR)** **module**: bootstrap module loaders in shadow realm (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) +* \[[`bc3f7b5401`](https://github.com/nodejs/node/commit/bc3f7b5401)] - **(SEMVER-MINOR)** **module**: remove useCustomLoadersIfPresent flag (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) +* \[[`aadff07e59`](https://github.com/nodejs/node/commit/aadff07e59)] - **(SEMVER-MINOR)** **src**: create per isolate proxy env template (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) +* \[[`91aa9dd23a`](https://github.com/nodejs/node/commit/91aa9dd23a)] - **(SEMVER-MINOR)** **src**: create fs\_dir per isolate properties (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) +* \[[`5c5834190a`](https://github.com/nodejs/node/commit/5c5834190a)] - **(SEMVER-MINOR)** **src**: create worker per isolate properties (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) +* \[[`4a1ce45181`](https://github.com/nodejs/node/commit/4a1ce45181)] - **(SEMVER-MINOR)** **src**: make process binding data weak (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) + +### Commits + +* \[[`4a20912279`](https://github.com/nodejs/node/commit/4a20912279)] - **benchmark**: update iterations in benchmark/util/splice-one.js (Liu Jia) [#50698](https://github.com/nodejs/node/pull/50698) +* \[[`36380eb53d`](https://github.com/nodejs/node/commit/36380eb53d)] - **benchmark**: increase the iteration number to an appropriate value (Lei Shi) [#50766](https://github.com/nodejs/node/pull/50766) +* \[[`23f56d8bb3`](https://github.com/nodejs/node/commit/23f56d8bb3)] - **benchmark**: rewrite import.meta benchmark (Joyee Cheung) [#50683](https://github.com/nodejs/node/pull/50683) +* \[[`f7245d73d9`](https://github.com/nodejs/node/commit/f7245d73d9)] - **benchmark**: add misc/startup-cli-version benchmark (Joyee Cheung) [#50684](https://github.com/nodejs/node/pull/50684) +* \[[`c81d2acfe0`](https://github.com/nodejs/node/commit/c81d2acfe0)] - **benchmark**: remove punycode from require-builtins fixture (Joyee Cheung) [#50689](https://github.com/nodejs/node/pull/50689) +* \[[`5849f09874`](https://github.com/nodejs/node/commit/5849f09874)] - **build**: add GN configurations for simdjson (Cheng Zhao) [#50831](https://github.com/nodejs/node/pull/50831) +* \[[`12605e8f7d`](https://github.com/nodejs/node/commit/12605e8f7d)] - **build**: add configuration flag to enable Maglev (Keyhan Vakil) [#50692](https://github.com/nodejs/node/pull/50692) +* \[[`43da9ea9e5`](https://github.com/nodejs/node/commit/43da9ea9e5)] - **build**: fix GN configuration for deps/base64 (Cheng Zhao) [#50696](https://github.com/nodejs/node/pull/50696) +* \[[`465f75b58a`](https://github.com/nodejs/node/commit/465f75b58a)] - **build**: disable flag v8\_scriptormodule\_legacy\_lifetime (Chengzhong Wu) [#50616](https://github.com/nodejs/node/pull/50616) +* \[[`d2c0dfb1b7`](https://github.com/nodejs/node/commit/d2c0dfb1b7)] - **crypto**: update root certificates to NSS 3.95 (Node.js GitHub Bot) [#50805](https://github.com/nodejs/node/pull/50805) +* \[[`8d3a1d8911`](https://github.com/nodejs/node/commit/8d3a1d8911)] - **deps**: update zlib to 1.2.13.1-motley-5daffc7 (Node.js GitHub Bot) [#50803](https://github.com/nodejs/node/pull/50803) +* \[[`e02f304de7`](https://github.com/nodejs/node/commit/e02f304de7)] - **deps**: V8: cherry-pick 0f9ebbc672c7 (Chengzhong Wu) [#50867](https://github.com/nodejs/node/pull/50867) +* \[[`c31ad5ceaa`](https://github.com/nodejs/node/commit/c31ad5ceaa)] - **deps**: update icu to 74.1 (Node.js GitHub Bot) [#50515](https://github.com/nodejs/node/pull/50515) +* \[[`3ff2bda34e`](https://github.com/nodejs/node/commit/3ff2bda34e)] - **deps**: update ada to 2.7.4 (Node.js GitHub Bot) [#50815](https://github.com/nodejs/node/pull/50815) +* \[[`221f02df6d`](https://github.com/nodejs/node/commit/221f02df6d)] - **deps**: update undici to 5.27.2 (Node.js GitHub Bot) [#50813](https://github.com/nodejs/node/pull/50813) +* \[[`ee69c613a2`](https://github.com/nodejs/node/commit/ee69c613a2)] - **deps**: update minimatch to 9.0.3 (Node.js GitHub Bot) [#50806](https://github.com/nodejs/node/pull/50806) +* \[[`00dab30fd2`](https://github.com/nodejs/node/commit/00dab30fd2)] - **deps**: V8: cherry-pick 475c8cdf9a95 (Keyhan Vakil) [#50680](https://github.com/nodejs/node/pull/50680) +* \[[`a0c01b23b4`](https://github.com/nodejs/node/commit/a0c01b23b4)] - **deps**: update simdutf to 4.0.4 (Node.js GitHub Bot) [#50772](https://github.com/nodejs/node/pull/50772) +* \[[`071e46ae56`](https://github.com/nodejs/node/commit/071e46ae56)] - **deps**: upgrade npm to 10.2.4 (npm team) [#50751](https://github.com/nodejs/node/pull/50751) +* \[[`5d28f8d18f`](https://github.com/nodejs/node/commit/5d28f8d18f)] - **deps**: escape Python strings correctly (Michaël Zasso) [#50695](https://github.com/nodejs/node/pull/50695) +* \[[`3731f836ed`](https://github.com/nodejs/node/commit/3731f836ed)] - **deps**: V8: cherry-pick 8f0b94671ddb (Lu Yahan) [#50654](https://github.com/nodejs/node/pull/50654) +* \[[`6dfe1023c3`](https://github.com/nodejs/node/commit/6dfe1023c3)] - **dns**: call handle.setServers() with a valid array (Luigi Pinca) [#50811](https://github.com/nodejs/node/pull/50811) +* \[[`2f13db475e`](https://github.com/nodejs/node/commit/2f13db475e)] - **doc**: make theme consistent across api and other docs (Dima Demakov) [#50877](https://github.com/nodejs/node/pull/50877) +* \[[`8c4976b732`](https://github.com/nodejs/node/commit/8c4976b732)] - **doc**: add a section regarding `instanceof` in `primordials.md` (Antoine du Hamel) [#50874](https://github.com/nodejs/node/pull/50874) +* \[[`6485687642`](https://github.com/nodejs/node/commit/6485687642)] - **doc**: update email to reflect affiliation (Yagiz Nizipli) [#50856](https://github.com/nodejs/node/pull/50856) +* \[[`bc31375a09`](https://github.com/nodejs/node/commit/bc31375a09)] - **doc**: shard not supported with watch mode (Pulkit Gupta) [#50640](https://github.com/nodejs/node/pull/50640) +* \[[`08c3b0ab20`](https://github.com/nodejs/node/commit/08c3b0ab20)] - **doc**: get rid of unnecessary `eslint-skip` comments (Antoine du Hamel) [#50829](https://github.com/nodejs/node/pull/50829) +* \[[`98fb1faff1`](https://github.com/nodejs/node/commit/98fb1faff1)] - **doc**: create deprecation code for isWebAssemblyCompiledModule (Marco Ippolito) [#50486](https://github.com/nodejs/node/pull/50486) +* \[[`e116fcdb01`](https://github.com/nodejs/node/commit/e116fcdb01)] - **doc**: add CanadaHonk to triagers (CanadaHonk) [#50848](https://github.com/nodejs/node/pull/50848) +* \[[`a37d9ee1e3`](https://github.com/nodejs/node/commit/a37d9ee1e3)] - **doc**: fix typos in --allow-fs-\* (Tobias Nießen) [#50845](https://github.com/nodejs/node/pull/50845) +* \[[`8468daf1a9`](https://github.com/nodejs/node/commit/8468daf1a9)] - **doc**: update Crypto API doc for x509.keyUsage (Daniel Meechan) [#50603](https://github.com/nodejs/node/pull/50603) +* \[[`b4935dde60`](https://github.com/nodejs/node/commit/b4935dde60)] - **doc**: fix fs.writeFileSync return value documentation (Ryan Zimmerman) [#50760](https://github.com/nodejs/node/pull/50760) +* \[[`ead9879a04`](https://github.com/nodejs/node/commit/ead9879a04)] - **doc**: update print results(detail) in `PerformanceEntry` (Jungku Lee) [#50723](https://github.com/nodejs/node/pull/50723) +* \[[`6b7403c5df`](https://github.com/nodejs/node/commit/6b7403c5df)] - **doc**: fix `Buffer.allocUnsafe` documentation (Mert Can Altın) [#50686](https://github.com/nodejs/node/pull/50686) +* \[[`713fdf1fc3`](https://github.com/nodejs/node/commit/713fdf1fc3)] - **doc**: run license-builder (github-actions\[bot]) [#50691](https://github.com/nodejs/node/pull/50691) +* \[[`50f336c06f`](https://github.com/nodejs/node/commit/50f336c06f)] - **esm**: fallback to `getSource` when `load` returns nullish `source` (Antoine du Hamel) [#50825](https://github.com/nodejs/node/pull/50825) +* \[[`bd58870556`](https://github.com/nodejs/node/commit/bd58870556)] - **esm**: do not call `getSource` when format is `commonjs` (Francesco Trotta) [#50465](https://github.com/nodejs/node/pull/50465) +* \[[`e59268a076`](https://github.com/nodejs/node/commit/e59268a076)] - **fs**: add c++ fast path for writeFileSync utf8 (CanadaHonk) [#49884](https://github.com/nodejs/node/pull/49884) +* \[[`483200f68f`](https://github.com/nodejs/node/commit/483200f68f)] - **fs**: improve error performance for `rmdirSync` (CanadaHonk) [#49846](https://github.com/nodejs/node/pull/49846) +* \[[`e4e0add0de`](https://github.com/nodejs/node/commit/e4e0add0de)] - **fs**: fix glob returning duplicates (Moshe Atlow) [#50881](https://github.com/nodejs/node/pull/50881) +* \[[`45b2bb09f2`](https://github.com/nodejs/node/commit/45b2bb09f2)] - **fs**: fix to not return for void function (Jungku Lee) [#50769](https://github.com/nodejs/node/pull/50769) +* \[[`492e3e30b7`](https://github.com/nodejs/node/commit/492e3e30b7)] - **fs**: replace deprecated `path._makeLong` in copyFile (CanadaHonk) [#50844](https://github.com/nodejs/node/pull/50844) +* \[[`9dc4cde75b`](https://github.com/nodejs/node/commit/9dc4cde75b)] - **fs**: improve error perf of sync `lstat`+`fstat` (CanadaHonk) [#49868](https://github.com/nodejs/node/pull/49868) +* \[[`c3eee590be`](https://github.com/nodejs/node/commit/c3eee590be)] - **inspector**: use private fields instead of symbols (Yagiz Nizipli) [#50776](https://github.com/nodejs/node/pull/50776) +* \[[`1a0069b13d`](https://github.com/nodejs/node/commit/1a0069b13d)] - **meta**: clarify nomination process according to Node.js charter (Matteo Collina) [#50834](https://github.com/nodejs/node/pull/50834) +* \[[`65a811a86d`](https://github.com/nodejs/node/commit/65a811a86d)] - **meta**: clarify recommendation for bug reproductions (Antoine du Hamel) [#50882](https://github.com/nodejs/node/pull/50882) +* \[[`5811a59016`](https://github.com/nodejs/node/commit/5811a59016)] - **meta**: move cjihrig to TSC regular member (Colin Ihrig) [#50816](https://github.com/nodejs/node/pull/50816) +* \[[`c7a7493ca2`](https://github.com/nodejs/node/commit/c7a7493ca2)] - **(SEMVER-MINOR)** **module**: bootstrap module loaders in shadow realm (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) +* \[[`bc3f7b5401`](https://github.com/nodejs/node/commit/bc3f7b5401)] - **(SEMVER-MINOR)** **module**: remove useCustomLoadersIfPresent flag (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) +* \[[`9197b0f2fc`](https://github.com/nodejs/node/commit/9197b0f2fc)] - **net**: check pipe mode and path (theanarkh) [#50770](https://github.com/nodejs/node/pull/50770) +* \[[`673de300b4`](https://github.com/nodejs/node/commit/673de300b4)] - **node-api**: factor out common code into macros (Gabriel Schulhof) [#50664](https://github.com/nodejs/node/pull/50664) +* \[[`aebe2fc702`](https://github.com/nodejs/node/commit/aebe2fc702)] - **perf\_hooks**: implement performance.now() with fast API calls (Joyee Cheung) [#50492](https://github.com/nodejs/node/pull/50492) +* \[[`3fdecc4a8b`](https://github.com/nodejs/node/commit/3fdecc4a8b)] - **permission**: do not create symlinks if target is relative (Tobias Nießen) [#49156](https://github.com/nodejs/node/pull/49156) +* \[[`27a4f58640`](https://github.com/nodejs/node/commit/27a4f58640)] - **permission**: mark const functions as such (Tobias Nießen) [#50705](https://github.com/nodejs/node/pull/50705) +* \[[`feb8ff9427`](https://github.com/nodejs/node/commit/feb8ff9427)] - **src**: assert return value of BN\_bn2binpad (Tobias Nießen) [#50860](https://github.com/nodejs/node/pull/50860) +* \[[`fd9195d750`](https://github.com/nodejs/node/commit/fd9195d750)] - **src**: fix coverity warning (Michael Dawson) [#50846](https://github.com/nodejs/node/pull/50846) +* \[[`adcab85c0c`](https://github.com/nodejs/node/commit/adcab85c0c)] - **src**: fix compatility with upcoming V8 12.1 APIs (Cheng Zhao) [#50709](https://github.com/nodejs/node/pull/50709) +* \[[`79ef39b8c8`](https://github.com/nodejs/node/commit/79ef39b8c8)] - **(SEMVER-MINOR)** **src**: add `--disable-warning` option (Ethan Arrowood) [#50661](https://github.com/nodejs/node/pull/50661) +* \[[`faf6a04ba6`](https://github.com/nodejs/node/commit/faf6a04ba6)] - **src**: add IsolateScopes before using isolates (Keyhan Vakil) [#50680](https://github.com/nodejs/node/pull/50680) +* \[[`eacf4ba485`](https://github.com/nodejs/node/commit/eacf4ba485)] - **src**: iterate on import attributes array correctly (Michaël Zasso) [#50703](https://github.com/nodejs/node/pull/50703) +* \[[`0fb35b6a67`](https://github.com/nodejs/node/commit/0fb35b6a67)] - **src**: avoid copying strings in FSPermission::Apply (Tobias Nießen) [#50662](https://github.com/nodejs/node/pull/50662) +* \[[`83ad272fa6`](https://github.com/nodejs/node/commit/83ad272fa6)] - **src**: remove erroneous default argument in RadixTree (Tobias Nießen) [#50736](https://github.com/nodejs/node/pull/50736) +* \[[`2e8e237ce2`](https://github.com/nodejs/node/commit/2e8e237ce2)] - **src**: fix JSONParser leaking internal V8 scopes (Keyhan Vakil) [#50688](https://github.com/nodejs/node/pull/50688) +* \[[`0d3aa725cf`](https://github.com/nodejs/node/commit/0d3aa725cf)] - **src**: return error --env-file if file is not found (Ardi Nugraha) [#50588](https://github.com/nodejs/node/pull/50588) +* \[[`aadff07e59`](https://github.com/nodejs/node/commit/aadff07e59)] - **(SEMVER-MINOR)** **src**: create per isolate proxy env template (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) +* \[[`91aa9dd23a`](https://github.com/nodejs/node/commit/91aa9dd23a)] - **(SEMVER-MINOR)** **src**: create fs\_dir per isolate properties (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) +* \[[`5c5834190a`](https://github.com/nodejs/node/commit/5c5834190a)] - **(SEMVER-MINOR)** **src**: create worker per isolate properties (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) +* \[[`4a1ce45181`](https://github.com/nodejs/node/commit/4a1ce45181)] - **(SEMVER-MINOR)** **src**: make process binding data weak (Chengzhong Wu) [#48655](https://github.com/nodejs/node/pull/48655) +* \[[`8746073664`](https://github.com/nodejs/node/commit/8746073664)] - **src**: avoid silent coercion to signed/unsigned int (Tobias Nießen) [#50663](https://github.com/nodejs/node/pull/50663) +* \[[`57587de1fa`](https://github.com/nodejs/node/commit/57587de1fa)] - **src**: handle errors from uv\_pipe\_connect2() (Deokjin Kim) [#50657](https://github.com/nodejs/node/pull/50657) +* \[[`e5cce004e8`](https://github.com/nodejs/node/commit/e5cce004e8)] - **stream**: fix enumerability of ReadableStream.from (Mattias Buelens) [#50779](https://github.com/nodejs/node/pull/50779) +* \[[`4522e229c0`](https://github.com/nodejs/node/commit/4522e229c0)] - **stream**: fix enumerability of ReadableStream.prototype.values (Mattias Buelens) [#50779](https://github.com/nodejs/node/pull/50779) +* \[[`2e0abed973`](https://github.com/nodejs/node/commit/2e0abed973)] - **stream**: yield expected Error class on zlib errors (Filip Skokan) [#50712](https://github.com/nodejs/node/pull/50712) +* \[[`a275155e81`](https://github.com/nodejs/node/commit/a275155e81)] - **stream**: add Symbol.toStringTag to Compression Streams (Filip Skokan) [#50712](https://github.com/nodejs/node/pull/50712) +* \[[`146ad9cab0`](https://github.com/nodejs/node/commit/146ad9cab0)] - **stream**: treat compression web stream format per its WebIDL definition (Filip Skokan) [#50631](https://github.com/nodejs/node/pull/50631) +* \[[`087cffc7c2`](https://github.com/nodejs/node/commit/087cffc7c2)] - **test**: fix message v8 not normalising alphanumeric paths (Jithil P Ponnan) [#50730](https://github.com/nodejs/node/pull/50730) +* \[[`7de900a442`](https://github.com/nodejs/node/commit/7de900a442)] - **test**: fix dns test case failures after c-ares update to 1.21.0+ (Brad House) [#50743](https://github.com/nodejs/node/pull/50743) +* \[[`b1b6c44712`](https://github.com/nodejs/node/commit/b1b6c44712)] - **test**: replace forEach with for of (Conor Watson) [#50594](https://github.com/nodejs/node/pull/50594) +* \[[`7f44164ad4`](https://github.com/nodejs/node/commit/7f44164ad4)] - **test**: replace forEach to for at test-webcrypto-sign-verify-ecdsa.js (Alessandro Di Nisio) [#50795](https://github.com/nodejs/node/pull/50795) +* \[[`9d76de1993`](https://github.com/nodejs/node/commit/9d76de1993)] - **test**: replace foreach with for in test-https-simple.js (Shikha Mehta) [#49793](https://github.com/nodejs/node/pull/49793) +* \[[`ce8fc56ee4`](https://github.com/nodejs/node/commit/ce8fc56ee4)] - **test**: add note about unresolved spec issue (Mattias Buelens) [#50779](https://github.com/nodejs/node/pull/50779) +* \[[`628a12ac18`](https://github.com/nodejs/node/commit/628a12ac18)] - **test**: add note about readable streams with type owning (Mattias Buelens) [#50779](https://github.com/nodejs/node/pull/50779) +* \[[`82f0882ce0`](https://github.com/nodejs/node/commit/82f0882ce0)] - **test**: replace forEach with for-of in test-url-relative (vitosorriso) [#50788](https://github.com/nodejs/node/pull/50788) +* \[[`3b7998305d`](https://github.com/nodejs/node/commit/3b7998305d)] - **test**: replace forEach() with for ... of in test-tls-getprotocol.js (Steve Goode) [#50600](https://github.com/nodejs/node/pull/50600) +* \[[`0e4d25eb5c`](https://github.com/nodejs/node/commit/0e4d25eb5c)] - **test**: use requires instead of flaky in console WPT status (Filip Skokan) [#50812](https://github.com/nodejs/node/pull/50812) +* \[[`221952a88e`](https://github.com/nodejs/node/commit/221952a88e)] - **test**: use ppc and ppc64 to skip SEA tests on PowerPC (Joyee Cheung) [#50828](https://github.com/nodejs/node/pull/50828) +* \[[`0e3b714069`](https://github.com/nodejs/node/commit/0e3b714069)] - **test**: enable idlharness tests for encoding (Mattias Buelens) [#50778](https://github.com/nodejs/node/pull/50778) +* \[[`c8d4cd68b4`](https://github.com/nodejs/node/commit/c8d4cd68b4)] - **test**: replace forEach in whatwg-encoding-custom-interop (Honza Machala) [#50607](https://github.com/nodejs/node/pull/50607) +* \[[`f25637b5c9`](https://github.com/nodejs/node/commit/f25637b5c9)] - **test**: update WPT files for WebIDL tests (Filip Skokan) [#50712](https://github.com/nodejs/node/pull/50712) +* \[[`f2e0fce389`](https://github.com/nodejs/node/commit/f2e0fce389)] - **test**: replace forEach() with for-loop (Jan) [#50596](https://github.com/nodejs/node/pull/50596) +* \[[`4b26f14a53`](https://github.com/nodejs/node/commit/4b26f14a53)] - **test**: improve test-bootstrap-modules.js (Joyee Cheung) [#50708](https://github.com/nodejs/node/pull/50708) +* \[[`28d78de0dd`](https://github.com/nodejs/node/commit/28d78de0dd)] - **test**: skip parallel/test-macos-app-sandbox if disk space < 120MB (Joyee Cheung) [#50764](https://github.com/nodejs/node/pull/50764) +* \[[`4088b750e7`](https://github.com/nodejs/node/commit/4088b750e7)] - **test**: mark SEA tests as flaky on PowerPC (Joyee Cheung) [#50750](https://github.com/nodejs/node/pull/50750) +* \[[`6475cee6a4`](https://github.com/nodejs/node/commit/6475cee6a4)] - **test**: give more time to GC in test-shadow-realm-gc-\* (Joyee Cheung) [#50735](https://github.com/nodejs/node/pull/50735) +* \[[`0e8275b610`](https://github.com/nodejs/node/commit/0e8275b610)] - **test**: replace foreach with for (Markus Muschol) [#50599](https://github.com/nodejs/node/pull/50599) +* \[[`377deded59`](https://github.com/nodejs/node/commit/377deded59)] - **test**: test streambase has already has a consumer (Jithil P Ponnan) [#48059](https://github.com/nodejs/node/pull/48059) +* \[[`342a83e728`](https://github.com/nodejs/node/commit/342a83e728)] - **test**: change forEach to for...of in path extname (Kyriakos Markakis) [#50667](https://github.com/nodejs/node/pull/50667) +* \[[`75265e491d`](https://github.com/nodejs/node/commit/75265e491d)] - **test**: replace forEach with for...of (Ryan Williams) [#50611](https://github.com/nodejs/node/pull/50611) +* \[[`982b57651b`](https://github.com/nodejs/node/commit/982b57651b)] - **test**: migrate message v8 tests from Python to JS (Joshua LeMay) [#50421](https://github.com/nodejs/node/pull/50421) +* \[[`7ebc8c2aed`](https://github.com/nodejs/node/commit/7ebc8c2aed)] - **test,stream**: enable compression WPTs (Filip Skokan) [#50631](https://github.com/nodejs/node/pull/50631) +* \[[`0bd694ab64`](https://github.com/nodejs/node/commit/0bd694ab64)] - **test\_runner**: add tests for various mock timer issues (Mika Fischer) [#50384](https://github.com/nodejs/node/pull/50384) +* \[[`dee8039c9b`](https://github.com/nodejs/node/commit/dee8039c9b)] - **tls**: fix order of setting cipher before setting cert and key (Kumar Rishav) [#50186](https://github.com/nodejs/node/pull/50186) +* \[[`5de30531b8`](https://github.com/nodejs/node/commit/5de30531b8)] - **tools**: add macOS notarization verification step (Ulises Gascón) [#50833](https://github.com/nodejs/node/pull/50833) +* \[[`a12d9e03f2`](https://github.com/nodejs/node/commit/a12d9e03f2)] - **tools**: use macOS keychain to notarize the releases (Ulises Gascón) [#50715](https://github.com/nodejs/node/pull/50715) +* \[[`f21637717f`](https://github.com/nodejs/node/commit/f21637717f)] - **tools**: update eslint to 8.54.0 (Node.js GitHub Bot) [#50809](https://github.com/nodejs/node/pull/50809) +* \[[`daa933d93a`](https://github.com/nodejs/node/commit/daa933d93a)] - **tools**: update lint-md-dependencies to rollup\@4.5.0 (Node.js GitHub Bot) [#50807](https://github.com/nodejs/node/pull/50807) +* \[[`52830b71cc`](https://github.com/nodejs/node/commit/52830b71cc)] - **tools**: add workflow to update release links (Michaël Zasso) [#50710](https://github.com/nodejs/node/pull/50710) +* \[[`db8ce5bbdd`](https://github.com/nodejs/node/commit/db8ce5bbdd)] - **tools**: recognize GN files in dep\_updaters (Cheng Zhao) [#50693](https://github.com/nodejs/node/pull/50693) +* \[[`5ef6729b66`](https://github.com/nodejs/node/commit/5ef6729b66)] - **tools**: remove unused file (Ulises Gascon) [#50622](https://github.com/nodejs/node/pull/50622) +* \[[`c49483820a`](https://github.com/nodejs/node/commit/c49483820a)] - **tools**: change minimatch install strategy (Marco Ippolito) [#50476](https://github.com/nodejs/node/pull/50476) +* \[[`0d556d9a59`](https://github.com/nodejs/node/commit/0d556d9a59)] - **tools**: update lint-md-dependencies to rollup\@4.3.1 (Node.js GitHub Bot) [#50675](https://github.com/nodejs/node/pull/50675) +* \[[`eaa4c14e6b`](https://github.com/nodejs/node/commit/eaa4c14e6b)] - **util**: improve performance of normalizeEncoding (kylo5aby) [#50721](https://github.com/nodejs/node/pull/50721) +* \[[`a5d959b765`](https://github.com/nodejs/node/commit/a5d959b765)] - **v8,tools**: expose necessary V8 defines (Cheng Zhao) [#50820](https://github.com/nodejs/node/pull/50820) + + + +## 2023-11-14, Version 21.2.0 (Current), @targos + +### Notable Changes + +* \[[`e25c65ee2f`](https://github.com/nodejs/node/commit/e25c65ee2f)] - **doc**: add MrJithil to collaborators (Jithil P Ponnan) [#50666](https://github.com/nodejs/node/pull/50666) +* \[[`f2366573f9`](https://github.com/nodejs/node/commit/f2366573f9)] - **doc**: add Ethan-Arrowood as a collaborator (Ethan Arrowood) [#50393](https://github.com/nodejs/node/pull/50393) +* \[[`eac9cc5fcb`](https://github.com/nodejs/node/commit/eac9cc5fcb)] - **(SEMVER-MINOR)** **esm**: add import.meta.dirname and import.meta.filename (James Sumners) [#48740](https://github.com/nodejs/node/pull/48740) +* \[[`7e151114b1`](https://github.com/nodejs/node/commit/7e151114b1)] - **fs**: add stacktrace to fs/promises (翠 / green) [#49849](https://github.com/nodejs/node/pull/49849) +* \[[`6dbb280733`](https://github.com/nodejs/node/commit/6dbb280733)] - **(SEMVER-MINOR)** **lib**: add `--no-experimental-global-navigator` CLI flag (Antoine du Hamel) [#50562](https://github.com/nodejs/node/pull/50562) +* \[[`03c730b931`](https://github.com/nodejs/node/commit/03c730b931)] - **(SEMVER-MINOR)** **lib**: add navigator.language & navigator.languages (Aras Abbasi) [#50303](https://github.com/nodejs/node/pull/50303) +* \[[`f932f4c518`](https://github.com/nodejs/node/commit/f932f4c518)] - **(SEMVER-MINOR)** **lib**: add navigator.platform (Aras Abbasi) [#50385](https://github.com/nodejs/node/pull/50385) +* \[[`91f37d1dc3`](https://github.com/nodejs/node/commit/91f37d1dc3)] - **(SEMVER-MINOR)** **stream**: add support for `deflate-raw` format to webstreams compression (Damian Krzeminski) [#50097](https://github.com/nodejs/node/pull/50097) +* \[[`65850a67c7`](https://github.com/nodejs/node/commit/65850a67c7)] - **stream**: use Array for Readable buffer (Robert Nagy) [#50341](https://github.com/nodejs/node/pull/50341) +* \[[`e433fa54b7`](https://github.com/nodejs/node/commit/e433fa54b7)] - **stream**: optimize creation (Robert Nagy) [#50337](https://github.com/nodejs/node/pull/50337) +* \[[`c9b92bba58`](https://github.com/nodejs/node/commit/c9b92bba58)] - **(SEMVER-MINOR)** **test\_runner**: adds built in lcov reporter (Phil Nash) [#50018](https://github.com/nodejs/node/pull/50018) +* \[[`f6c496563e`](https://github.com/nodejs/node/commit/f6c496563e)] - **(SEMVER-MINOR)** **test\_runner**: add Date to the supported mock APIs (Lucas Santos) [#48638](https://github.com/nodejs/node/pull/48638) +* \[[`05e8b6ef20`](https://github.com/nodejs/node/commit/05e8b6ef20)] - **(SEMVER-MINOR)** **test\_runner, cli**: add --test-timeout flag (Shubham Pandey) [#50443](https://github.com/nodejs/node/pull/50443) + +### Commits + +* \[[`065d8844c5`](https://github.com/nodejs/node/commit/065d8844c5)] - **benchmark**: change iterations in benchmark/es/string-concatenations.js (Liu Jia) [#50585](https://github.com/nodejs/node/pull/50585) +* \[[`3f37ed9f0f`](https://github.com/nodejs/node/commit/3f37ed9f0f)] - **benchmark**: add benchmarks for encodings (Aras Abbasi) [#50348](https://github.com/nodejs/node/pull/50348) +* \[[`c4b6e1e9e4`](https://github.com/nodejs/node/commit/c4b6e1e9e4)] - **benchmark**: add more cases to Readable.from (Raz Luvaton) [#50351](https://github.com/nodejs/node/pull/50351) +* \[[`2006b57a9a`](https://github.com/nodejs/node/commit/2006b57a9a)] - **benchmark**: skip test-benchmark-os on IBMi (Michael Dawson) [#50286](https://github.com/nodejs/node/pull/50286) +* \[[`800206b04a`](https://github.com/nodejs/node/commit/800206b04a)] - **benchmark**: move permission-fs-read to permission-processhas-fs-read (Aki Hasegawa-Johnson) [#49770](https://github.com/nodejs/node/pull/49770) +* \[[`3bedaf9405`](https://github.com/nodejs/node/commit/3bedaf9405)] - **buffer**: improve Buffer.equals performance (kylo5aby) [#50621](https://github.com/nodejs/node/pull/50621) +* \[[`b9f3613908`](https://github.com/nodejs/node/commit/b9f3613908)] - **build**: add GN build files (Cheng Zhao) [#47637](https://github.com/nodejs/node/pull/47637) +* \[[`22eb0257d8`](https://github.com/nodejs/node/commit/22eb0257d8)] - **build**: fix build with Python 3.12 (Luigi Pinca) [#50582](https://github.com/nodejs/node/pull/50582) +* \[[`642c057299`](https://github.com/nodejs/node/commit/642c057299)] - **build**: support Python 3.12 (Shi Pujin) [#50209](https://github.com/nodejs/node/pull/50209) +* \[[`54ebfc10cb`](https://github.com/nodejs/node/commit/54ebfc10cb)] - **build**: fix building when there is only python3 (Cheng Zhao) [#48462](https://github.com/nodejs/node/pull/48462) +* \[[`5073a3e16d`](https://github.com/nodejs/node/commit/5073a3e16d)] - **deps**: update base64 to 0.5.1 (Node.js GitHub Bot) [#50629](https://github.com/nodejs/node/pull/50629) +* \[[`f70a59f4fa`](https://github.com/nodejs/node/commit/f70a59f4fa)] - **deps**: update corepack to 0.23.0 (Node.js GitHub Bot) [#50563](https://github.com/nodejs/node/pull/50563) +* \[[`78b3432be5`](https://github.com/nodejs/node/commit/78b3432be5)] - **deps**: V8: cherry-pick 13192d6e10fa (Levi Zim) [#50552](https://github.com/nodejs/node/pull/50552) +* \[[`93e3cc3907`](https://github.com/nodejs/node/commit/93e3cc3907)] - **deps**: upgrade npm to 10.2.3 (npm team) [#50531](https://github.com/nodejs/node/pull/50531) +* \[[`189e5e5326`](https://github.com/nodejs/node/commit/189e5e5326)] - **deps**: update nghttp2 to 1.58.0 (Node.js GitHub Bot) [#50441](https://github.com/nodejs/node/pull/50441) +* \[[`57bfe53095`](https://github.com/nodejs/node/commit/57bfe53095)] - **deps**: update zlib to 1.2.13.1-motley-dfc48fc (Node.js GitHub Bot) [#50456](https://github.com/nodejs/node/pull/50456) +* \[[`1e6922e67a`](https://github.com/nodejs/node/commit/1e6922e67a)] - **deps**: patch V8 to 11.8.172.17 (Michaël Zasso) [#50292](https://github.com/nodejs/node/pull/50292) +* \[[`28453ff966`](https://github.com/nodejs/node/commit/28453ff966)] - **deps**: update acorn to 8.11.2 (Node.js GitHub Bot) [#50460](https://github.com/nodejs/node/pull/50460) +* \[[`0a793a2566`](https://github.com/nodejs/node/commit/0a793a2566)] - **deps**: update undici to 5.27.0 (Node.js GitHub Bot) [#50463](https://github.com/nodejs/node/pull/50463) +* \[[`a90c6d669c`](https://github.com/nodejs/node/commit/a90c6d669c)] - **deps**: update archs files for openssl-3.0.12+quic1 (Node.js GitHub Bot) [#50411](https://github.com/nodejs/node/pull/50411) +* \[[`a64217c116`](https://github.com/nodejs/node/commit/a64217c116)] - **deps**: upgrade openssl sources to quictls/openssl-3.0.12+quic1 (Node.js GitHub Bot) [#50411](https://github.com/nodejs/node/pull/50411) +* \[[`62515e118c`](https://github.com/nodejs/node/commit/62515e118c)] - **deps**: update llhttp to 9.1.3 (Node.js GitHub Bot) [#50080](https://github.com/nodejs/node/pull/50080) +* \[[`d6f49c7bdc`](https://github.com/nodejs/node/commit/d6f49c7bdc)] - **deps**: update googletest to 116b7e5 (Node.js GitHub Bot) [#50324](https://github.com/nodejs/node/pull/50324) +* \[[`e25c65ee2f`](https://github.com/nodejs/node/commit/e25c65ee2f)] - **doc**: add MrJithil to collaborators (Jithil P Ponnan) [#50666](https://github.com/nodejs/node/pull/50666) +* \[[`8be0efd68f`](https://github.com/nodejs/node/commit/8be0efd68f)] - **doc**: fix typo in fs.md (fwio) [#50570](https://github.com/nodejs/node/pull/50570) +* \[[`a656bf2dee`](https://github.com/nodejs/node/commit/a656bf2dee)] - **doc**: add missing description of argument in `subtle.encrypt` (Deokjin Kim) [#50578](https://github.com/nodejs/node/pull/50578) +* \[[`4cbe44ed6f`](https://github.com/nodejs/node/commit/4cbe44ed6f)] - **doc**: update pm documentation to include resource (Ranieri Innocenti Spada) [#50601](https://github.com/nodejs/node/pull/50601) +* \[[`479c1ea9fe`](https://github.com/nodejs/node/commit/479c1ea9fe)] - **doc**: correct attribution in v20.6.0 changelog (Jacob Smith) [#50564](https://github.com/nodejs/node/pull/50564) +* \[[`1668798902`](https://github.com/nodejs/node/commit/1668798902)] - **doc**: update to align `console.table` row to the left (Jungku Lee) [#50553](https://github.com/nodejs/node/pull/50553) +* \[[`886fc48f87`](https://github.com/nodejs/node/commit/886fc48f87)] - **doc**: underline links (Rich Trott) [#50481](https://github.com/nodejs/node/pull/50481) +* \[[`98cfa3a72b`](https://github.com/nodejs/node/commit/98cfa3a72b)] - **doc**: recommend supported Python versions (Luigi Pinca) [#50407](https://github.com/nodejs/node/pull/50407) +* \[[`921e36ece9`](https://github.com/nodejs/node/commit/921e36ece9)] - **doc**: remove duplicate word (Gerhard Stöbich) [#50475](https://github.com/nodejs/node/pull/50475) +* \[[`43074ee21c`](https://github.com/nodejs/node/commit/43074ee21c)] - **doc**: fix typo in `webstreams.md` (André Santos) [#50426](https://github.com/nodejs/node/pull/50426) +* \[[`0b11bf16e8`](https://github.com/nodejs/node/commit/0b11bf16e8)] - **doc**: update notable changes in v21.1.0 (Joyee Cheung) [#50388](https://github.com/nodejs/node/pull/50388) +* \[[`d62e81229c`](https://github.com/nodejs/node/commit/d62e81229c)] - **doc**: add information about Node-API versions >=9 (Michael Dawson) [#50168](https://github.com/nodejs/node/pull/50168) +* \[[`f2366573f9`](https://github.com/nodejs/node/commit/f2366573f9)] - **doc**: add Ethan-Arrowood as a collaborator (Ethan Arrowood) [#50393](https://github.com/nodejs/node/pull/50393) +* \[[`d9f92bc042`](https://github.com/nodejs/node/commit/d9f92bc042)] - **doc**: fix TOC in `releases.md` (Bryce Seefieldt) [#50372](https://github.com/nodejs/node/pull/50372) +* \[[`14e3675b13`](https://github.com/nodejs/node/commit/14e3675b13)] - **errors**: improve hideStackFrames (Aras Abbasi) [#49990](https://github.com/nodejs/node/pull/49990) +* \[[`09c02ed26b`](https://github.com/nodejs/node/commit/09c02ed26b)] - **esm**: bypass CJS loader in default load under `--default-type=module` (Antoine du Hamel) [#50004](https://github.com/nodejs/node/pull/50004) +* \[[`eac9cc5fcb`](https://github.com/nodejs/node/commit/eac9cc5fcb)] - **(SEMVER-MINOR)** **esm**: add import.meta.dirname and import.meta.filename (James Sumners) [#48740](https://github.com/nodejs/node/pull/48740) +* \[[`44f19ce394`](https://github.com/nodejs/node/commit/44f19ce394)] - **fs**: update param in jsdoc for `readdir` (Jungku Lee) [#50448](https://github.com/nodejs/node/pull/50448) +* \[[`7e151114b1`](https://github.com/nodejs/node/commit/7e151114b1)] - **fs**: add stacktrace to fs/promises (翠 / green) [#49849](https://github.com/nodejs/node/pull/49849) +* \[[`3e7226a12f`](https://github.com/nodejs/node/commit/3e7226a12f)] - **fs**: do not throw error on cpSync internals (Yagiz Nizipli) [#50185](https://github.com/nodejs/node/pull/50185) +* \[[`67cbe1b80f`](https://github.com/nodejs/node/commit/67cbe1b80f)] - **fs,url**: move `FromNamespacedPath` to `node_url` (Yagiz Nizipli) [#50090](https://github.com/nodejs/node/pull/50090) +* \[[`b4db32e9cb`](https://github.com/nodejs/node/commit/b4db32e9cb)] - **fs,url**: refactor `FileURLToPath` method (Yagiz Nizipli) [#50090](https://github.com/nodejs/node/pull/50090) +* \[[`4345ee2ede`](https://github.com/nodejs/node/commit/4345ee2ede)] - **fs,url**: move `FileURLToPath` to node\_url (Yagiz Nizipli) [#50090](https://github.com/nodejs/node/pull/50090) +* \[[`ed293fc520`](https://github.com/nodejs/node/commit/ed293fc520)] - **lib**: remove deprecated string methods (Jithil P Ponnan) [#50592](https://github.com/nodejs/node/pull/50592) +* \[[`363bc46b92`](https://github.com/nodejs/node/commit/363bc46b92)] - **lib**: fix assert shows diff messages in ESM and CJS (Jithil P Ponnan) [#50634](https://github.com/nodejs/node/pull/50634) +* \[[`5fa40bea9e`](https://github.com/nodejs/node/commit/5fa40bea9e)] - **lib**: make event static properties non writable and configurable (Muthukumar) [#50425](https://github.com/nodejs/node/pull/50425) +* \[[`6dbb280733`](https://github.com/nodejs/node/commit/6dbb280733)] - **(SEMVER-MINOR)** **lib**: add `--no-experimental-global-navigator` CLI flag (Antoine du Hamel) [#50562](https://github.com/nodejs/node/pull/50562) +* \[[`03c730b931`](https://github.com/nodejs/node/commit/03c730b931)] - **(SEMVER-MINOR)** **lib**: add navigator.language & navigator.languages (Aras Abbasi) [#50303](https://github.com/nodejs/node/pull/50303) +* \[[`f932f4c518`](https://github.com/nodejs/node/commit/f932f4c518)] - **(SEMVER-MINOR)** **lib**: add navigator.platform (Aras Abbasi) [#50385](https://github.com/nodejs/node/pull/50385) +* \[[`c9bd0c5000`](https://github.com/nodejs/node/commit/c9bd0c5000)] - **lib**: use primordials for navigator.userAgent (Aras Abbasi) [#50467](https://github.com/nodejs/node/pull/50467) +* \[[`6dabe7cf60`](https://github.com/nodejs/node/commit/6dabe7cf60)] - **lib**: avoid memory allocation on nodeprecation flag (Vinicius Lourenço) [#50231](https://github.com/nodejs/node/pull/50231) +* \[[`3615a61ac8`](https://github.com/nodejs/node/commit/3615a61ac8)] - **lib**: align console.table row to the left (Jithil P Ponnan) [#50135](https://github.com/nodejs/node/pull/50135) +* \[[`9e7131ffda`](https://github.com/nodejs/node/commit/9e7131ffda)] - **meta**: add web-standards as WPTs owner (Filip Skokan) [#50636](https://github.com/nodejs/node/pull/50636) +* \[[`dedfb5ab26`](https://github.com/nodejs/node/commit/dedfb5ab26)] - **meta**: bump github/codeql-action from 2.21.9 to 2.22.5 (dependabot\[bot]) [#50513](https://github.com/nodejs/node/pull/50513) +* \[[`4e83036d89`](https://github.com/nodejs/node/commit/4e83036d89)] - **meta**: bump step-security/harden-runner from 2.5.1 to 2.6.0 (dependabot\[bot]) [#50512](https://github.com/nodejs/node/pull/50512) +* \[[`4bf9cffa95`](https://github.com/nodejs/node/commit/4bf9cffa95)] - **meta**: bump ossf/scorecard-action from 2.2.0 to 2.3.1 (dependabot\[bot]) [#50509](https://github.com/nodejs/node/pull/50509) +* \[[`49cce7634b`](https://github.com/nodejs/node/commit/49cce7634b)] - **meta**: fix spacing in collaborator list (Antoine du Hamel) [#50641](https://github.com/nodejs/node/pull/50641) +* \[[`12e54e360c`](https://github.com/nodejs/node/commit/12e54e360c)] - **meta**: bump actions/setup-python from 4.7.0 to 4.7.1 (dependabot\[bot]) [#50510](https://github.com/nodejs/node/pull/50510) +* \[[`85a527e6e0`](https://github.com/nodejs/node/commit/85a527e6e0)] - **meta**: add crypto as crypto and webcrypto docs owner (Filip Skokan) [#50579](https://github.com/nodejs/node/pull/50579) +* \[[`ff9b3bdf34`](https://github.com/nodejs/node/commit/ff9b3bdf34)] - **meta**: bump actions/setup-node from 3.8.1 to 4.0.0 (dependabot\[bot]) [#50514](https://github.com/nodejs/node/pull/50514) +* \[[`840303078f`](https://github.com/nodejs/node/commit/840303078f)] - **meta**: bump actions/checkout from 4.1.0 to 4.1.1 (dependabot\[bot]) [#50511](https://github.com/nodejs/node/pull/50511) +* \[[`c9e6e4e739`](https://github.com/nodejs/node/commit/c9e6e4e739)] - **meta**: add to mailmap (Ethan Arrowood) [#50491](https://github.com/nodejs/node/pull/50491) +* \[[`d94010b745`](https://github.com/nodejs/node/commit/d94010b745)] - **meta**: add web-standards as web api visibility owner (Chengzhong Wu) [#50418](https://github.com/nodejs/node/pull/50418) +* \[[`e008336b17`](https://github.com/nodejs/node/commit/e008336b17)] - **meta**: mention other notable changes section (Rafael Gonzaga) [#50309](https://github.com/nodejs/node/pull/50309) +* \[[`3606a0a848`](https://github.com/nodejs/node/commit/3606a0a848)] - **module**: execute `--import` sequentially (Antoine du Hamel) [#50474](https://github.com/nodejs/node/pull/50474) +* \[[`667d245e75`](https://github.com/nodejs/node/commit/667d245e75)] - **module**: add application/json in accept header when fetching json module (Marco Ippolito) [#50119](https://github.com/nodejs/node/pull/50119) +* \[[`905ca00cbc`](https://github.com/nodejs/node/commit/905ca00cbc)] - **perf\_hooks**: reduce overhead of createHistogram (Vinícius Lourenço) [#50074](https://github.com/nodejs/node/pull/50074) +* \[[`7c35055c8e`](https://github.com/nodejs/node/commit/7c35055c8e)] - **permission**: address coverity warning (Michael Dawson) [#50215](https://github.com/nodejs/node/pull/50215) +* \[[`b740324f7c`](https://github.com/nodejs/node/commit/b740324f7c)] - **src**: use v8::Isolate::TryGetCurrent() in DumpJavaScriptBacktrace() (Joyee Cheung) [#50518](https://github.com/nodejs/node/pull/50518) +* \[[`6e20e083dd`](https://github.com/nodejs/node/commit/6e20e083dd)] - **src**: print more information in C++ assertions (Joyee Cheung) [#50242](https://github.com/nodejs/node/pull/50242) +* \[[`9f55dfc266`](https://github.com/nodejs/node/commit/9f55dfc266)] - **src**: hide node::credentials::HasOnly outside unit (Tobias Nießen) [#50450](https://github.com/nodejs/node/pull/50450) +* \[[`4eb74a2c24`](https://github.com/nodejs/node/commit/4eb74a2c24)] - **src**: readiterable entries may be empty (Matthew Aitken) [#50398](https://github.com/nodejs/node/pull/50398) +* \[[`5b453d45d6`](https://github.com/nodejs/node/commit/5b453d45d6)] - **src**: implement structuredClone in native (Joyee Cheung) [#50330](https://github.com/nodejs/node/pull/50330) +* \[[`f1d79b3cbb`](https://github.com/nodejs/node/commit/f1d79b3cbb)] - **src**: use find instead of char-by-char in FromFilePath() (Daniel Lemire) [#50288](https://github.com/nodejs/node/pull/50288) +* \[[`541bdf1e92`](https://github.com/nodejs/node/commit/541bdf1e92)] - **src**: add commit hash shorthand in zlib version (Jithil P Ponnan) [#50158](https://github.com/nodejs/node/pull/50158) +* \[[`91f37d1dc3`](https://github.com/nodejs/node/commit/91f37d1dc3)] - **(SEMVER-MINOR)** **stream**: add support for `deflate-raw` format to webstreams compression (Damian Krzeminski) [#50097](https://github.com/nodejs/node/pull/50097) +* \[[`360f5d9088`](https://github.com/nodejs/node/commit/360f5d9088)] - **stream**: fix Writable.destroy performance regression (Robert Nagy) [#50478](https://github.com/nodejs/node/pull/50478) +* \[[`0116ae7601`](https://github.com/nodejs/node/commit/0116ae7601)] - **stream**: pre-allocate \_events (Robert Nagy) [#50428](https://github.com/nodejs/node/pull/50428) +* \[[`2c0d88e83e`](https://github.com/nodejs/node/commit/2c0d88e83e)] - **stream**: remove no longer relevant comment (Robert Nagy) [#50446](https://github.com/nodejs/node/pull/50446) +* \[[`03c4ff760d`](https://github.com/nodejs/node/commit/03c4ff760d)] - **stream**: use bit fields for construct/destroy (Robert Nagy) [#50408](https://github.com/nodejs/node/pull/50408) +* \[[`e20b272d46`](https://github.com/nodejs/node/commit/e20b272d46)] - **stream**: improve from perf (Raz Luvaton) [#50359](https://github.com/nodejs/node/pull/50359) +* \[[`893024cb7c`](https://github.com/nodejs/node/commit/893024cb7c)] - **stream**: avoid calls to listenerCount (Robert Nagy) [#50357](https://github.com/nodejs/node/pull/50357) +* \[[`586ec48e5f`](https://github.com/nodejs/node/commit/586ec48e5f)] - **stream**: readable use bitmap accessors (Robert Nagy) [#50350](https://github.com/nodejs/node/pull/50350) +* \[[`65850a67c7`](https://github.com/nodejs/node/commit/65850a67c7)] - **stream**: use Array for Readable buffer (Robert Nagy) [#50341](https://github.com/nodejs/node/pull/50341) +* \[[`e433fa54b7`](https://github.com/nodejs/node/commit/e433fa54b7)] - **stream**: optimize creation (Robert Nagy) [#50337](https://github.com/nodejs/node/pull/50337) +* \[[`f56ae67c7b`](https://github.com/nodejs/node/commit/f56ae67c7b)] - **stream**: refactor writable \_write (Robert Nagy) [#50198](https://github.com/nodejs/node/pull/50198) +* \[[`766bd9c8cc`](https://github.com/nodejs/node/commit/766bd9c8cc)] - **stream**: avoid getter for defaultEncoding (Robert Nagy) [#50203](https://github.com/nodejs/node/pull/50203) +* \[[`8be718a0bd`](https://github.com/nodejs/node/commit/8be718a0bd)] - **test**: use destructuring for accessing setting values (Honza Jedlička) [#50609](https://github.com/nodejs/node/pull/50609) +* \[[`b701567a46`](https://github.com/nodejs/node/commit/b701567a46)] - **test**: replace forEach() with for .. of (Evgenia Blajer) [#50605](https://github.com/nodejs/node/pull/50605) +* \[[`e978fd4375`](https://github.com/nodejs/node/commit/e978fd4375)] - **test**: replace forEach() with for ... of in test-readline-keys.js (William Liang) [#50604](https://github.com/nodejs/node/pull/50604) +* \[[`bc92be4ca9`](https://github.com/nodejs/node/commit/bc92be4ca9)] - **test**: replace forEach() with for ... of in test-http2-single-headers.js (spiritualized) [#50606](https://github.com/nodejs/node/pull/50606) +* \[[`864cd32003`](https://github.com/nodejs/node/commit/864cd32003)] - **test**: replace forEach with for of (john-mcinall) [#50602](https://github.com/nodejs/node/pull/50602) +* \[[`2fdcf5c3da`](https://github.com/nodejs/node/commit/2fdcf5c3da)] - **test**: remove unused file (James Sumners) [#50528](https://github.com/nodejs/node/pull/50528) +* \[[`2eeda3f09b`](https://github.com/nodejs/node/commit/2eeda3f09b)] - **test**: replace forEach with for of (Kevin Kühnemund) [#50597](https://github.com/nodejs/node/pull/50597) +* \[[`1d52a57cba`](https://github.com/nodejs/node/commit/1d52a57cba)] - **test**: replace forEach with for of (CorrWu) [#49785](https://github.com/nodejs/node/pull/49785) +* \[[`52b517f4ec`](https://github.com/nodejs/node/commit/52b517f4ec)] - **test**: replace forEach with for \[...] of (Gabriel Bota) [#50615](https://github.com/nodejs/node/pull/50615) +* \[[`931e1e756a`](https://github.com/nodejs/node/commit/931e1e756a)] - **test**: relax version check with shared OpenSSL (Luigi Pinca) [#50505](https://github.com/nodejs/node/pull/50505) +* \[[`6ed8fbf612`](https://github.com/nodejs/node/commit/6ed8fbf612)] - **test**: add WPT report test duration (Filip Skokan) [#50574](https://github.com/nodejs/node/pull/50574) +* \[[`7c7be517b4`](https://github.com/nodejs/node/commit/7c7be517b4)] - **test**: replace forEach() with for ... of loop in test-global.js (Kajol) [#49772](https://github.com/nodejs/node/pull/49772) +* \[[`de46a346ab`](https://github.com/nodejs/node/commit/de46a346ab)] - **test**: skip test-diagnostics-channel-memory-leak.js (Joyee Cheung) [#50327](https://github.com/nodejs/node/pull/50327) +* \[[`8487cac24c`](https://github.com/nodejs/node/commit/8487cac24c)] - **test**: improve `UV_THREADPOOL_SIZE` tests on `.env` (Yagiz Nizipli) [#49213](https://github.com/nodejs/node/pull/49213) +* \[[`ee751102a4`](https://github.com/nodejs/node/commit/ee751102a4)] - **test**: recognize wpt completion error (Chengzhong Wu) [#50429](https://github.com/nodejs/node/pull/50429) +* \[[`7e3eb02252`](https://github.com/nodejs/node/commit/7e3eb02252)] - **test**: report error wpt test results (Chengzhong Wu) [#50429](https://github.com/nodejs/node/pull/50429) +* \[[`90833a89a9`](https://github.com/nodejs/node/commit/90833a89a9)] - **test**: replace forEach() with for...of (Ram) [#49794](https://github.com/nodejs/node/pull/49794) +* \[[`f40435d143`](https://github.com/nodejs/node/commit/f40435d143)] - **test**: replace forEach() with for...of in test-trace-events-http (Chand) [#49795](https://github.com/nodejs/node/pull/49795) +* \[[`f70a2dd70d`](https://github.com/nodejs/node/commit/f70a2dd70d)] - **test**: fix testsuite against zlib version 1.3 (Dominique Leuenberger) [#50364](https://github.com/nodejs/node/pull/50364) +* \[[`d24de129a7`](https://github.com/nodejs/node/commit/d24de129a7)] - **test**: replace forEach with for...of in test-fs-realpath-buffer-encoding (Niya Shiyas) [#49804](https://github.com/nodejs/node/pull/49804) +* \[[`2b6d283265`](https://github.com/nodejs/node/commit/2b6d283265)] - **test**: fix timeout of test-cpu-prof-dir-worker.js in LoongArch devices (Shi Pujin) [#50363](https://github.com/nodejs/node/pull/50363) +* \[[`bd5b61fa6c`](https://github.com/nodejs/node/commit/bd5b61fa6c)] - **test**: fix crypto-dh error message for OpenSSL 3.x (Kerem Kat) [#50395](https://github.com/nodejs/node/pull/50395) +* \[[`aa86c78a9c`](https://github.com/nodejs/node/commit/aa86c78a9c)] - **test**: fix vm assertion actual and expected order (Chengzhong Wu) [#50371](https://github.com/nodejs/node/pull/50371) +* \[[`ab9cad8107`](https://github.com/nodejs/node/commit/ab9cad8107)] - **test**: v8: Add test-linux-perf-logger test suite (Luke Albao) [#50352](https://github.com/nodejs/node/pull/50352) +* \[[`31cd05c39f`](https://github.com/nodejs/node/commit/31cd05c39f)] - **test**: ensure never settling promises are detected (Antoine du Hamel) [#50318](https://github.com/nodejs/node/pull/50318) +* \[[`ad316419dd`](https://github.com/nodejs/node/commit/ad316419dd)] - **test**: avoid v8 deadcode on performance function (Vinícius Lourenço) [#50074](https://github.com/nodejs/node/pull/50074) +* \[[`01bed64cbb`](https://github.com/nodejs/node/commit/01bed64cbb)] - **test\_runner**: pass abortSignal to test files (Moshe Atlow) [#50630](https://github.com/nodejs/node/pull/50630) +* \[[`ae4a7ba991`](https://github.com/nodejs/node/commit/ae4a7ba991)] - **test\_runner**: replace forEach with for of (Tom Haddad) [#50595](https://github.com/nodejs/node/pull/50595) +* \[[`913e4b9173`](https://github.com/nodejs/node/commit/913e4b9173)] - **test\_runner**: output errors of suites (Moshe Atlow) [#50361](https://github.com/nodejs/node/pull/50361) +* \[[`c9b92bba58`](https://github.com/nodejs/node/commit/c9b92bba58)] - **(SEMVER-MINOR)** **test\_runner**: adds built in lcov reporter (Phil Nash) [#50018](https://github.com/nodejs/node/pull/50018) +* \[[`e2c3b015cd`](https://github.com/nodejs/node/commit/e2c3b015cd)] - **test\_runner**: test return value of mocked promisified timers (Mika Fischer) [#50331](https://github.com/nodejs/node/pull/50331) +* \[[`f6c496563e`](https://github.com/nodejs/node/commit/f6c496563e)] - **(SEMVER-MINOR)** **test\_runner**: add Date to the supported mock APIs (Lucas Santos) [#48638](https://github.com/nodejs/node/pull/48638) +* \[[`05e8b6ef20`](https://github.com/nodejs/node/commit/05e8b6ef20)] - **(SEMVER-MINOR)** **test\_runner, cli**: add --test-timeout flag (Shubham Pandey) [#50443](https://github.com/nodejs/node/pull/50443) +* \[[`b71c8c447e`](https://github.com/nodejs/node/commit/b71c8c447e)] - **tls**: use `validateFunction` for `options.SNICallback` (Deokjin Kim) [#50530](https://github.com/nodejs/node/pull/50530) +* \[[`5fcd67a8ea`](https://github.com/nodejs/node/commit/5fcd67a8ea)] - **tools**: add macOS notarization stapler (Ulises Gascón) [#50625](https://github.com/nodejs/node/pull/50625) +* \[[`253e206fe9`](https://github.com/nodejs/node/commit/253e206fe9)] - **tools**: update eslint to 8.53.0 (Node.js GitHub Bot) [#50559](https://github.com/nodejs/node/pull/50559) +* \[[`f5e1c95447`](https://github.com/nodejs/node/commit/f5e1c95447)] - **tools**: update lint-md-dependencies to rollup\@4.3.0 (Node.js GitHub Bot) [#50556](https://github.com/nodejs/node/pull/50556) +* \[[`257e22073e`](https://github.com/nodejs/node/commit/257e22073e)] - **tools**: compare ICU checksums before file changes (Michaël Zasso) [#50522](https://github.com/nodejs/node/pull/50522) +* \[[`aa8feea5f1`](https://github.com/nodejs/node/commit/aa8feea5f1)] - **tools**: improve update acorn-walk script (Marco Ippolito) [#50473](https://github.com/nodejs/node/pull/50473) +* \[[`c0206bf44c`](https://github.com/nodejs/node/commit/c0206bf44c)] - **tools**: update lint-md-dependencies to rollup\@4.2.0 (Node.js GitHub Bot) [#50496](https://github.com/nodejs/node/pull/50496) +* \[[`02dec645f3`](https://github.com/nodejs/node/commit/02dec645f3)] - **tools**: improve macOS notarization process output readability (Ulises Gascón) [#50389](https://github.com/nodejs/node/pull/50389) +* \[[`52e7b6d29a`](https://github.com/nodejs/node/commit/52e7b6d29a)] - **tools**: update gyp-next to v0.16.1 (Michaël Zasso) [#50380](https://github.com/nodejs/node/pull/50380) +* \[[`9fc29c909b`](https://github.com/nodejs/node/commit/9fc29c909b)] - **tools**: skip ruff on tools/gyp (Michaël Zasso) [#50380](https://github.com/nodejs/node/pull/50380) +* \[[`ec7005abff`](https://github.com/nodejs/node/commit/ec7005abff)] - **tools**: update lint-md-dependencies to rollup\@4.1.5 unified\@11.0.4 (Node.js GitHub Bot) [#50461](https://github.com/nodejs/node/pull/50461) +* \[[`aed590035f`](https://github.com/nodejs/node/commit/aed590035f)] - **tools**: remove unused `version` function (Ulises Gascón) [#50390](https://github.com/nodejs/node/pull/50390) +* \[[`f7590481f2`](https://github.com/nodejs/node/commit/f7590481f2)] - **tools**: avoid npm install in deps installation (Marco Ippolito) [#50413](https://github.com/nodejs/node/pull/50413) +* \[[`92d64035c6`](https://github.com/nodejs/node/commit/92d64035c6)] - _**Revert**_ "**tools**: update doc dependencies" (Richard Lau) [#50414](https://github.com/nodejs/node/pull/50414) +* \[[`90c9dd3e0e`](https://github.com/nodejs/node/commit/90c9dd3e0e)] - **tools**: update doc dependencies (Node.js GitHub Bot) [#49988](https://github.com/nodejs/node/pull/49988) +* \[[`f210915681`](https://github.com/nodejs/node/commit/f210915681)] - **tools**: run coverage CI only on relevant files (Antoine du Hamel) [#50349](https://github.com/nodejs/node/pull/50349) +* \[[`5ccdda4004`](https://github.com/nodejs/node/commit/5ccdda4004)] - **tools**: update eslint to 8.52.0 (Node.js GitHub Bot) [#50326](https://github.com/nodejs/node/pull/50326) +* \[[`bd4634874c`](https://github.com/nodejs/node/commit/bd4634874c)] - **tools**: update lint-md-dependencies (Node.js GitHub Bot) [#50190](https://github.com/nodejs/node/pull/50190) +* \[[`773cfa59bb`](https://github.com/nodejs/node/commit/773cfa59bb)] - **vm**: allow dynamic import with a referrer realm (Chengzhong Wu) [#50360](https://github.com/nodejs/node/pull/50360) +* \[[`2f86d50e70`](https://github.com/nodejs/node/commit/2f86d50e70)] - **wasi**: document security sandboxing status (Guy Bedford) [#50396](https://github.com/nodejs/node/pull/50396) + ## 2023-10-24, Version 21.1.0 (Current), @targos diff --git a/doc/contributing/adding-new-napi-api.md b/doc/contributing/adding-new-napi-api.md index 8d2233bc30f690..e834a395b6206f 100644 --- a/doc/contributing/adding-new-napi-api.md +++ b/doc/contributing/adding-new-napi-api.md @@ -34,6 +34,10 @@ Node-API. * Experimental APIs **must** be documented as such. * Experimental APIs **must** require an explicit compile-time flag (`#define`) to be set to opt-in. + * A feature flag of the form `NODE_API_EXPERIMENTAL_HAS_` **must** + be added with each experimental feature in order to allow code to + distinguish between experimental features as present in one version of + Node.js versus another. * Experimental APIs **must** be considered for backport. * Experimental status exit criteria **must** involve at least the following: diff --git a/doc/contributing/collaborator-guide.md b/doc/contributing/collaborator-guide.md index 2ecf14a082dc3b..2bf751b7076139 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -532,9 +532,10 @@ The TSC serves as the final arbiter where required. [build](https://github.com/nodejs/build/issues) repositories, open new issues. Run a new CI any time someone pushes new code to the pull request. 4. Check that the commit message adheres to [commit message guidelines][]. -5. Add all necessary [metadata](#metadata) to commit messages before landing. If - you are unsure exactly how to format the commit messages, use the commit log - as a reference. See [this commit][commit-example] as an example. +5. Add all necessary [metadata][git-node-metadata] to commit messages before + landing. If you are unsure exactly how to format the commit messages, use + the commit log as a reference. See [this commit][commit-example] as an + example. For pull requests from first-time contributors, be [welcoming](#welcoming-first-time-contributors). Also, verify that their git diff --git a/doc/contributing/maintaining/maintaining-dependencies.md b/doc/contributing/maintaining/maintaining-dependencies.md index 9c2e3485271e41..47ecd2aafa0240 100644 --- a/doc/contributing/maintaining/maintaining-dependencies.md +++ b/doc/contributing/maintaining/maintaining-dependencies.md @@ -9,16 +9,16 @@ All dependencies are located within the `deps` directory. This a list of all the dependencies: * [acorn 8.11.2][] -* [ada 2.7.2][] -* [base64 0.5.0][] +* [ada 2.7.4][] +* [base64 0.5.1][] * [brotli 1.0.9][] * [c-ares 1.20.1][] * [cjs-module-lexer 1.2.2][] * [corepack][] -* [googletest 116b7e5][] +* [googletest 76bb2af][] * [histogram 0.11.8][] -* [icu-small 73.2][] -* [libuv 1.46.0][] +* [icu-small 74.1][] +* [libuv 1.47.0][] * [llhttp 9.1.3][] * [minimatch 9.0.3][] * [nghttp2 1.58.0][] @@ -27,11 +27,12 @@ This a list of all the dependencies: * [npm 9.6.7][] * [openssl 3.0.8][] * [postject 1.0.0-alpha.6][] -* [simdutf 3.2.18][] -* [undici 5.27.0][] +* [simdjson 3.6.2][] +* [simdutf 4.0.4][] +* [undici 5.28.2][] * [uvwasi 0.0.19][] * [V8 11.8.172.12][] -* [zlib 1.2.13.1-motley-dfc48fc][] +* [zlib 1.3-22124f5][] Any code which meets one or more of these conditions should be managed as a dependency: @@ -150,12 +151,12 @@ The [acorn](https://github.com/acornjs/acorn) dependency is a JavaScript parser. [acorn-walk](https://github.com/acornjs/acorn/tree/master/acorn-walk) is an abstract syntax tree walker for the ESTree format. -### ada 2.7.2 +### ada 2.7.4 The [ada](https://github.com/ada-url/ada) dependency is a fast and spec-compliant URL parser written in C++. -### base64 0.5.0 +### base64 0.5.1 The [base64](https://github.com/aklomp/base64) dependency is a base64 stream encoding/decoding library in C99 with SIMD and OpenMP acceleration. @@ -189,7 +190,7 @@ In practical terms, Corepack will let you use Yarn and pnpm without having to install them - just like what currently happens with npm, which is shipped by Node.js by default. -### googletest 116b7e5 +### googletest 76bb2af The [googletest](https://github.com/google/googletest) dependency is Google’s C++ testing and mocking framework. @@ -199,14 +200,14 @@ C++ testing and mocking framework. The [histogram](https://github.com/HdrHistogram/HdrHistogram_c) dependency is a C port of High Dynamic Range (HDR) Histogram. -### icu-small 73.2 +### icu-small 74.1 The [icu](http://site.icu-project.org) is widely used set of C/C++ and Java libraries providing Unicode and Globalization support for software applications. See [maintaining-icu][] for more informations. -### libuv 1.46.0 +### libuv 1.47.0 The [libuv](https://github.com/libuv/libuv) dependency is a multi-platform support library with a focus on asynchronous I/O. @@ -286,12 +287,17 @@ See [maintaining-openssl][] for more informations. The [postject](https://github.com/nodejs/postject) dependency is used for the [Single Executable strategic initiative](https://github.com/nodejs/single-executable). -### simdutf 3.2.18 +### simdjson 3.6.2 + +The [simdjson](https://github.com/simdjson/simdjson) dependency is +a C++ library for fast JSON parsing. + +### simdutf 4.0.4 The [simdutf](https://github.com/simdutf/simdutf) dependency is a C++ library for fast UTF-8 decoding and encoding. -### undici 5.27.0 +### undici 5.28.2 The [undici](https://github.com/nodejs/undici) dependency is an HTTP/1.1 client, written from scratch for Node.js.. @@ -311,7 +317,7 @@ See [maintaining-web-assembly][] for more informations. high-performance JavaScript and WebAssembly engine, written in C++. See [maintaining-V8][] for more informations. -### zlib 1.2.13.1-motley-dfc48fc +### zlib 1.3-22124f5 The [zlib](https://chromium.googlesource.com/chromium/src/+/refs/heads/main/third_party/zlib) dependency lossless data-compression library, @@ -319,17 +325,17 @@ it comes from the Chromium team's zlib fork which incorporated performance improvements not currently available in standard zlib. [acorn 8.11.2]: #acorn-8112 -[ada 2.7.2]: #ada-272 -[base64 0.5.0]: #base64-050 +[ada 2.7.4]: #ada-274 +[base64 0.5.1]: #base64-051 [brotli 1.0.9]: #brotli-109 [c-ares 1.20.1]: #c-ares-1201 [cjs-module-lexer 1.2.2]: #cjs-module-lexer-122 [corepack]: #corepack [dependency-update-action]: ../../../.github/workflows/tools.yml -[googletest 116b7e5]: #googletest-116b7e5 +[googletest 76bb2af]: #googletest-76bb2af [histogram 0.11.8]: #histogram-0118 -[icu-small 73.2]: #icu-small-732 -[libuv 1.46.0]: #libuv-1460 +[icu-small 74.1]: #icu-small-741 +[libuv 1.47.0]: #libuv-1470 [llhttp 9.1.3]: #llhttp-913 [maintaining-V8]: ./maintaining-V8.md [maintaining-cjs-module-lexer]: ./maintaining-cjs-module-lexer.md @@ -344,9 +350,10 @@ performance improvements not currently available in standard zlib. [npm 9.6.7]: #npm-967 [openssl 3.0.8]: #openssl-308 [postject 1.0.0-alpha.6]: #postject-100-alpha6 -[simdutf 3.2.18]: #simdutf-3218 -[undici 5.27.0]: #undici-5270 +[simdjson 3.6.2]: #simdutf-362 +[simdutf 4.0.4]: #simdutf-404 +[undici 5.28.2]: #undici-5282 [update-openssl-action]: ../../../.github/workflows/update-openssl.yml [uvwasi 0.0.19]: #uvwasi-0019 [v8 11.8.172.12]: #v8-11817212 -[zlib 1.2.13.1-motley-dfc48fc]: #zlib-12131-motley-dfc48fc +[zlib 1.3-22124f5]: #zlib-13-22124f5 diff --git a/doc/contributing/primordials.md b/doc/contributing/primordials.md index b763c88880f94c..4ca383c41cbd25 100644 --- a/doc/contributing/primordials.md +++ b/doc/contributing/primordials.md @@ -775,3 +775,49 @@ const proxyWithNullPrototypeObject = new Proxy(objectToProxy, { }); console.log(proxyWithNullPrototypeObject.someProperty); // genuine value ``` + +### Checking if an object is an instance of a class + +#### Using `instanceof` looks up the `@@hasInstance` property of the class + +```js +// User-land +Object.defineProperty(Array, Symbol.hasInstance, { + __proto__: null, + value: () => true, +}); +Object.defineProperty(Date, Symbol.hasInstance, { + __proto__: null, + value: () => false, +}); + +// Core +const { + FunctionPrototypeSymbolHasInstance, +} = primordials; + +console.log(new Date() instanceof Array); // true +console.log(new Date() instanceof Date); // false + +console.log(FunctionPrototypeSymbolHasInstance(Array, new Date())); // false +console.log(FunctionPrototypeSymbolHasInstance(Date, new Date())); // true +``` + +Even without user mutations, the result of `instanceof` can be deceiving when +dealing with values from different realms: + +```js +const vm = require('node:vm'); + +console.log(vm.runInNewContext('[]') instanceof Array); // false +console.log(vm.runInNewContext('[]') instanceof vm.runInNewContext('Array')); // false +console.log([] instanceof vm.runInNewContext('Array')); // false + +console.log(Array.isArray(vm.runInNewContext('[]'))); // true +console.log(vm.runInNewContext('Array').isArray(vm.runInNewContext('[]'))); // true +console.log(vm.runInNewContext('Array').isArray([])); // true +``` + +In general, using `instanceof` (or `FunctionPrototypeSymbolHasInstance`) checks +is not recommended, consider checking for the presence of properties or methods +for more reliable results. diff --git a/doc/contributing/releases-node-api.md b/doc/contributing/releases-node-api.md index f2277b228ec0d6..5f4e6df9a5c3bc 100644 --- a/doc/contributing/releases-node-api.md +++ b/doc/contributing/releases-node-api.md @@ -100,6 +100,8 @@ and update the define version guards with the release version: + #endif // NAPI_VERSION >= 10 ``` +Remove any feature flags of the form `NODE_API_EXPERIMENTAL_HAS_`. + Also, update the Node-API version value of the `napi_get_version` test in `test/js-native-api/test_general/test.js` with the release version `x`: diff --git a/doc/contributing/security-release-process.md b/doc/contributing/security-release-process.md index 4cd9835a953e94..fa94d25e6fc176 100644 --- a/doc/contributing/security-release-process.md +++ b/doc/contributing/security-release-process.md @@ -200,6 +200,12 @@ out a better way, forward the email you receive to * Request publication of [H1 CVE requests][] * (Check that the "Version Fixed" field in the CVE is correct, and provide links to the release blogs in the "Public Reference" section) + * In case the reporter doesn't accept the disclosure follow this process: + * Remove the original report reference within the reference text box and + insert the public URL you would like to be attached to this CVE. + * Then uncheck the Public Disclosure on HackerOne box at the bottom of the + page. + ![screenshot of HackerOne CVE form](https://github.com/nodejs/node/assets/26234614/e22e4f33-7948-4dd2-952e-2f9166f5568d) * [ ] PR machine-readable JSON descriptions of the vulnerabilities to the [core](https://github.com/nodejs/security-wg/tree/HEAD/vuln/core) diff --git a/doc/template.html b/doc/template.html index fb334852aba434..658c8d94cd0723 100644 --- a/doc/template.html +++ b/doc/template.html @@ -10,6 +10,19 @@ + __JS_FLAVORED_DYNAMIC_CSS__ diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index c197cedfeab3db..3eb3b2089b0596 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -19,7 +19,7 @@ rules: - selector: ThrowStatement > CallExpression[callee.name=/Error$/] message: Use new keyword when throwing an Error. # Config specific to lib - - selector: NewExpression[callee.name=/Error$/]:not([callee.name=/^(AssertionError|NghttpError|AbortError)$/]) + - selector: NewExpression[callee.name=/Error$/]:not([callee.name=/^(AssertionError|NghttpError|AbortError|NodeAggregateError)$/]) message: Use an error exported by the internal/errors module. - selector: CallExpression[callee.object.name='Error'][callee.property.name='captureStackTrace'] message: Please use `require('internal/errors').hideStackFrames()` instead. diff --git a/lib/_http_agent.js b/lib/_http_agent.js index e23409f2ee797f..a4829526f6e138 100644 --- a/lib/_http_agent.js +++ b/lib/_http_agent.js @@ -38,7 +38,7 @@ const { StringPrototypeIndexOf, StringPrototypeSplit, StringPrototypeStartsWith, - StringPrototypeSubstr, + StringPrototypeSubstring, Symbol, } = primordials; @@ -363,7 +363,7 @@ function calculateServerName(options, req) { // Leading '[', but no ']'. Need to do something... servername = hostHeader; } else { - servername = StringPrototypeSubstr(hostHeader, 1, index - 1); + servername = StringPrototypeSubstring(hostHeader, 1, index); } } else { servername = StringPrototypeSplit(hostHeader, ':', 1)[0]; diff --git a/lib/_http_client.js b/lib/_http_client.js index dc2e71dcaabc0a..7aeaa6734c1cb4 100644 --- a/lib/_http_client.js +++ b/lib/_http_client.js @@ -72,7 +72,7 @@ const { traceEnd, getNextTraceEventId, } = require('internal/http'); -const { connResetException, codes } = require('internal/errors'); +const { ConnResetException, codes } = require('internal/errors'); const { ERR_HTTP_HEADERS_SENT, ERR_INVALID_ARG_TYPE, @@ -452,7 +452,7 @@ function socketCloseListener() { if (res) { // Socket closed before we emitted 'end' below. if (!res.complete) { - res.destroy(connResetException('aborted')); + res.destroy(new ConnResetException('aborted')); } req._closed = true; req.emit('close'); @@ -465,7 +465,7 @@ function socketCloseListener() { // receive a response. The error needs to // fire on the request. req.socket._hadError = true; - req.emit('error', connResetException('socket hang up')); + req.emit('error', new ConnResetException('socket hang up')); } req._closed = true; req.emit('close'); @@ -516,7 +516,7 @@ function socketOnEnd() { // If we don't have a response then we know that the socket // ended prematurely and we need to emit an error on the request. req.socket._hadError = true; - req.emit('error', connResetException('socket hang up')); + req.emit('error', new ConnResetException('socket hang up')); } if (parser) { parser.finish(); @@ -869,7 +869,7 @@ function onSocketNT(req, socket, err) { function _destroy(req, err) { if (!req.aborted && !err) { - err = connResetException('socket hang up'); + err = new ConnResetException('socket hang up'); } if (err) { req.emit('error', err); diff --git a/lib/_http_outgoing.js b/lib/_http_outgoing.js index 046324a5d44866..ddd87308ccc823 100644 --- a/lib/_http_outgoing.js +++ b/lib/_http_outgoing.js @@ -663,17 +663,17 @@ function matchHeader(self, state, field, value) { const validateHeaderName = hideStackFrames((name, label) => { if (typeof name !== 'string' || !name || !checkIsHttpToken(name)) { - throw new ERR_INVALID_HTTP_TOKEN(label || 'Header name', name); + throw new ERR_INVALID_HTTP_TOKEN.HideStackFramesError(label || 'Header name', name); } }); const validateHeaderValue = hideStackFrames((name, value) => { if (value === undefined) { - throw new ERR_HTTP_INVALID_HEADER_VALUE(value, name); + throw new ERR_HTTP_INVALID_HEADER_VALUE.HideStackFramesError(value, name); } if (checkInvalidHeaderChar(value)) { debug('Header "%s" contains invalid characters', name); - throw new ERR_INVALID_CHAR('header content', name); + throw new ERR_INVALID_CHAR.HideStackFramesError('header content', name); } }); diff --git a/lib/_http_server.js b/lib/_http_server.js index b9a11cb5039d14..dbffa82d2ef41b 100644 --- a/lib/_http_server.js +++ b/lib/_http_server.js @@ -69,7 +69,7 @@ const { } = require('internal/async_hooks'); const { IncomingMessage } = require('_http_incoming'); const { - connResetException, + ConnResetException, codes, } = require('internal/errors'); const { @@ -790,7 +790,7 @@ function socketOnClose(socket, state) { function abortIncoming(incoming) { while (incoming.length) { const req = incoming.shift(); - req.destroy(connResetException('aborted')); + req.destroy(new ConnResetException('aborted')); } // Abort socket._httpMessage ? } diff --git a/lib/_tls_wrap.js b/lib/_tls_wrap.js index 719f13aee000d6..01a771cbdb5017 100644 --- a/lib/_tls_wrap.js +++ b/lib/_tls_wrap.js @@ -66,7 +66,7 @@ const { Pipe, constants: PipeConstants } = internalBinding('pipe_wrap'); const { owner_symbol } = require('internal/async_hooks').symbols; const { isArrayBufferView } = require('internal/util/types'); const { SecureContext: NativeSecureContext } = internalBinding('crypto'); -const { connResetException, codes } = require('internal/errors'); +const { ConnResetException, codes } = require('internal/errors'); const { ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, @@ -909,7 +909,7 @@ TLSSocket.prototype._init = function(socket, wrap) { options.SNICallback && (options.SNICallback !== SNICallback || (options.server && options.server._contexts.length))) { - assert(typeof options.SNICallback === 'function'); + validateFunction(options.SNICallback, 'options.SNICallback'); this._SNICallback = options.SNICallback; ssl.enableCertCb(); } @@ -1218,7 +1218,7 @@ function onSocketClose(err) { // Emit ECONNRESET if (!this._controlReleased && !this[kErrorEmitted]) { this[kErrorEmitted] = true; - const connReset = connResetException('socket hang up'); + const connReset = new ConnResetException('socket hang up'); this._tlsOptions.server.emit('tlsClientError', connReset, this); } } @@ -1724,9 +1724,9 @@ function onConnectEnd() { if (!this._hadError) { const options = this[kConnectOptions]; this._hadError = true; - const error = connResetException('Client network socket disconnected ' + - 'before secure TLS connection was ' + - 'established'); + const error = new ConnResetException('Client network socket disconnected ' + + 'before secure TLS connection was ' + + 'established'); error.path = options.path; error.host = options.host; error.port = options.port; diff --git a/lib/assert.js b/lib/assert.js index b7d7a3da01d520..9dfcf80a913942 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -73,6 +73,7 @@ const CallTracker = require('internal/assert/calltracker'); const { validateFunction, } = require('internal/validators'); +const { fileURLToPath } = require('internal/url'); let isDeepEqual; let isDeepStrictEqual; @@ -296,7 +297,7 @@ function getErrMessage(message, fn) { overrideStackTrace.set(err, (_, stack) => stack); const call = err.stack[0]; - const filename = call.getFileName(); + let filename = call.getFileName(); const line = call.getLineNumber() - 1; let column = call.getColumnNumber() - 1; let identifier; @@ -330,6 +331,14 @@ function getErrMessage(message, fn) { const { StringDecoder } = require('string_decoder'); decoder = new StringDecoder('utf8'); } + + // ESM file prop is a file proto. Convert that to path. + // This ensure opensync will not throw ENOENT for ESM files. + const fileProtoPrefix = 'file://'; + if (StringPrototypeStartsWith(filename, fileProtoPrefix)) { + filename = fileURLToPath(filename); + } + fd = openSync(filename, 'r', 0o666); // Reset column and message. ({ 0: column, 1: message } = getCode(fd, line, column)); diff --git a/lib/buffer.js b/lib/buffer.js index ee30c69cc9611c..59a125960c276f 100644 --- a/lib/buffer.js +++ b/lib/buffer.js @@ -108,7 +108,6 @@ const { ERR_UNKNOWN_ENCODING, }, genericNodeError, - hideStackFrames, } = require('internal/errors'); const { validateArray, @@ -386,19 +385,12 @@ Buffer.of = of; ObjectSetPrototypeOf(Buffer, Uint8Array); -// The 'assertSize' method will remove itself from the callstack when an error -// occurs. This is done simply to keep the internal details of the -// implementation from bleeding out to users. -const assertSize = hideStackFrames((size) => { - validateNumber(size, 'size', 0, kMaxLength); -}); - /** * Creates a new filled Buffer instance. * alloc(size[, fill[, encoding]]) */ Buffer.alloc = function alloc(size, fill, encoding) { - assertSize(size); + validateNumber(size, 'size', 0, kMaxLength); if (fill !== undefined && fill !== 0 && size > 0) { const buf = createUnsafeBuffer(size); return _fill(buf, fill, 0, buf.length, encoding); @@ -411,7 +403,7 @@ Buffer.alloc = function alloc(size, fill, encoding) { * instance. If `--zero-fill-buffers` is set, will zero-fill the buffer. */ Buffer.allocUnsafe = function allocUnsafe(size) { - assertSize(size); + validateNumber(size, 'size', 0, kMaxLength); return allocate(size); }; @@ -421,15 +413,15 @@ Buffer.allocUnsafe = function allocUnsafe(size) { * If `--zero-fill-buffers` is set, will zero-fill the buffer. */ Buffer.allocUnsafeSlow = function allocUnsafeSlow(size) { - assertSize(size); + validateNumber(size, 'size', 0, kMaxLength); return createUnsafeBuffer(size); }; // If --zero-fill-buffers command line argument is set, a zero-filled // buffer is returned. -function SlowBuffer(length) { - assertSize(length); - return createUnsafeBuffer(length); +function SlowBuffer(size) { + validateNumber(size, 'size', 0, kMaxLength); + return createUnsafeBuffer(size); } ObjectSetPrototypeOf(SlowBuffer.prototype, Uint8ArrayPrototype); @@ -860,11 +852,11 @@ Buffer.prototype.equals = function equals(otherBuffer) { if (this === otherBuffer) return true; - - if (this.byteLength !== otherBuffer.byteLength) + const len = TypedArrayPrototypeGetByteLength(this); + if (len !== TypedArrayPrototypeGetByteLength(otherBuffer)) return false; - return this.byteLength === 0 || _compare(this, otherBuffer) === 0; + return len === 0 || _compare(this, otherBuffer) === 0; }; let INSPECT_MAX_BYTES = 50; diff --git a/lib/dgram.js b/lib/dgram.js index 1fa49fdaa738a4..1dfdda0b823d3f 100644 --- a/lib/dgram.js +++ b/lib/dgram.js @@ -96,9 +96,10 @@ function lazyLoadCluster() { return _cluster; } -const errnoException = errors.errnoException; -const exceptionWithHostPort = errors.exceptionWithHostPort; - +const { + ErrnoException, + ExceptionWithHostPort, +} = errors; function Socket(type, listener) { FunctionPrototypeCall(EventEmitter, this); @@ -286,7 +287,7 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) { flags: null, }, (err) => { // Callback to handle error. - const ex = errnoException(err, 'open'); + const ex = new ErrnoException(err, 'open'); state.bindState = BIND_STATE_UNBOUND; this.emit('error', ex); }); @@ -299,7 +300,7 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) { const err = state.handle.open(fd); if (err) - throw errnoException(err, 'open'); + throw new ErrnoException(err, 'open'); startListening(this); return this; @@ -350,7 +351,7 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) { flags: flags, }, (err) => { // Callback to handle error. - const ex = exceptionWithHostPort(err, 'bind', ip, port); + const ex = new ExceptionWithHostPort(err, 'bind', ip, port); state.bindState = BIND_STATE_UNBOUND; this.emit('error', ex); }); @@ -360,7 +361,7 @@ Socket.prototype.bind = function(port_, address_ /* , callback */) { const err = state.handle.bind(ip, port || 0, flags); if (err) { - const ex = exceptionWithHostPort(err, 'bind', ip, port); + const ex = new ExceptionWithHostPort(err, 'bind', ip, port); state.bindState = BIND_STATE_UNBOUND; this.emit('error', ex); // Todo: close? @@ -429,7 +430,7 @@ function doConnect(ex, self, ip, address, port, callback) { if (!ex) { const err = state.handle.connect(ip, port); if (err) { - ex = exceptionWithHostPort(err, 'connect', address, port); + ex = new ExceptionWithHostPort(err, 'connect', address, port); } } @@ -457,7 +458,7 @@ Socket.prototype.disconnect = function() { const err = state.handle.disconnect(); if (err) - throw errnoException(err, 'connect'); + throw new ErrnoException(err, 'connect'); else state.connectState = CONNECT_STATE_DISCONNECTED; }; @@ -715,13 +716,13 @@ function doSend(ex, self, ip, list, address, port, callback) { if (err && callback) { // Don't emit as error, dgram_legacy.js compatibility const ex = exceptionWithHostPort(err, 'send', address, port); - pqueueMicrotask(() => callback(ex)); + pqueueMicrotask(() => callback(new ExceptionWithHostPort(err, 'send', address, port))); } } function afterSend(err, sent) { if (err) { - err = exceptionWithHostPort(err, 'send', this.address, this.port); + err = new ExceptionWithHostPort(err, 'send', this.address, this.port); } else { err = null; } @@ -772,7 +773,7 @@ Socket.prototype.address = function() { const out = {}; const err = this[kStateSymbol].handle.getsockname(out); if (err) { - throw errnoException(err, 'getsockname'); + throw new ErrnoException(err, 'getsockname'); } return out; @@ -788,7 +789,7 @@ Socket.prototype.remoteAddress = function() { const out = {}; const err = state.handle.getpeername(out); if (err) - throw errnoException(err, 'getpeername'); + throw new ErrnoException(err, 'getpeername'); return out; }; @@ -797,7 +798,7 @@ Socket.prototype.remoteAddress = function() { Socket.prototype.setBroadcast = function(arg) { const err = this[kStateSymbol].handle.setBroadcast(arg ? 1 : 0); if (err) { - throw errnoException(err, 'setBroadcast'); + throw new ErrnoException(err, 'setBroadcast'); } }; @@ -807,7 +808,7 @@ Socket.prototype.setTTL = function(ttl) { const err = this[kStateSymbol].handle.setTTL(ttl); if (err) { - throw errnoException(err, 'setTTL'); + throw new ErrnoException(err, 'setTTL'); } return ttl; @@ -819,7 +820,7 @@ Socket.prototype.setMulticastTTL = function(ttl) { const err = this[kStateSymbol].handle.setMulticastTTL(ttl); if (err) { - throw errnoException(err, 'setMulticastTTL'); + throw new ErrnoException(err, 'setMulticastTTL'); } return ttl; @@ -829,7 +830,7 @@ Socket.prototype.setMulticastTTL = function(ttl) { Socket.prototype.setMulticastLoopback = function(arg) { const err = this[kStateSymbol].handle.setMulticastLoopback(arg ? 1 : 0); if (err) { - throw errnoException(err, 'setMulticastLoopback'); + throw new ErrnoException(err, 'setMulticastLoopback'); } return arg; // 0.4 compatibility @@ -842,7 +843,7 @@ Socket.prototype.setMulticastInterface = function(interfaceAddress) { const err = this[kStateSymbol].handle.setMulticastInterface(interfaceAddress); if (err) { - throw errnoException(err, 'setMulticastInterface'); + throw new ErrnoException(err, 'setMulticastInterface'); } }; @@ -857,7 +858,7 @@ Socket.prototype.addMembership = function(multicastAddress, const { handle } = this[kStateSymbol]; const err = handle.addMembership(multicastAddress, interfaceAddress); if (err) { - throw errnoException(err, 'addMembership'); + throw new ErrnoException(err, 'addMembership'); } }; @@ -873,7 +874,7 @@ Socket.prototype.dropMembership = function(multicastAddress, const { handle } = this[kStateSymbol]; const err = handle.dropMembership(multicastAddress, interfaceAddress); if (err) { - throw errnoException(err, 'dropMembership'); + throw new ErrnoException(err, 'dropMembership'); } }; @@ -890,7 +891,7 @@ Socket.prototype.addSourceSpecificMembership = function(sourceAddress, groupAddress, interfaceAddress); if (err) { - throw errnoException(err, 'addSourceSpecificMembership'); + throw new ErrnoException(err, 'addSourceSpecificMembership'); } }; @@ -908,7 +909,7 @@ Socket.prototype.dropSourceSpecificMembership = function(sourceAddress, groupAddress, interfaceAddress); if (err) { - throw errnoException(err, 'dropSourceSpecificMembership'); + throw new ErrnoException(err, 'dropSourceSpecificMembership'); } }; @@ -935,7 +936,7 @@ function stopReceiving(socket) { function onMessage(nread, handle, buf, rinfo) { const self = handle[owner_symbol]; if (nread < 0) { - return self.emit('error', errnoException(nread, 'recvmsg')); + return self.emit('error', new ErrnoException(nread, 'recvmsg')); } rinfo.size = buf.length; // compatibility self.emit('message', buf, rinfo); diff --git a/lib/diagnostics_channel.js b/lib/diagnostics_channel.js index 0ace01d1b23d2a..503d1ca25ff11e 100644 --- a/lib/diagnostics_channel.js +++ b/lib/diagnostics_channel.js @@ -371,9 +371,7 @@ class TracingChannel { // Using runStores here enables manual context failure recovery asyncStart.runStores(context, () => { try { - if (callback) { - return ReflectApply(callback, this, arguments); - } + return ReflectApply(callback, this, arguments); } finally { asyncEnd.publish(context); } @@ -381,9 +379,7 @@ class TracingChannel { } const callback = ArrayPrototypeAt(args, position); - if (typeof callback !== 'function') { - throw new ERR_INVALID_ARG_TYPE('callback', ['function'], callback); - } + validateFunction(callback, 'callback'); ArrayPrototypeSplice(args, position, 1, wrappedCallback); return start.runStores(context, () => { diff --git a/lib/dns.js b/lib/dns.js index fe3a93db17a629..363168bcdd1cf0 100644 --- a/lib/dns.js +++ b/lib/dns.js @@ -30,7 +30,14 @@ const { const cares = internalBinding('cares_wrap'); const { isIP } = require('internal/net'); const { customPromisifyArgs } = require('internal/util'); -const errors = require('internal/errors'); +const { + codes: { + ERR_INVALID_ARG_TYPE, + ERR_INVALID_ARG_VALUE, + ERR_MISSING_ARGS, + }, + DNSException, +} = require('internal/errors'); const { bindDefaultResolver, setDefaultResolver, @@ -70,11 +77,6 @@ const { ADDRGETNETWORKPARAMS, CANCELLED, } = dnsErrorCodes; -const { - ERR_INVALID_ARG_TYPE, - ERR_INVALID_ARG_VALUE, - ERR_MISSING_ARGS, -} = errors.codes; const { validateBoolean, validateFunction, @@ -98,13 +100,11 @@ const { stopPerf, } = require('internal/perf/observe'); -const dnsException = errors.dnsException; - let promises = null; // Lazy loaded function onlookup(err, addresses) { if (err) { - return this.callback(dnsException(err, 'getaddrinfo', this.hostname)); + return this.callback(new DNSException(err, 'getaddrinfo', this.hostname)); } this.callback(null, addresses[0], this.family || isIP(addresses[0])); if (this[kPerfHooksDnsLookupContext] && hasObserver('dns')) { @@ -115,7 +115,7 @@ function onlookup(err, addresses) { function onlookupall(err, addresses) { if (err) { - return this.callback(dnsException(err, 'getaddrinfo', this.hostname)); + return this.callback(new DNSException(err, 'getaddrinfo', this.hostname)); } const family = this.family; @@ -222,7 +222,7 @@ function lookup(hostname, options, callback) { req, hostname, family, hints, verbatim, ); if (err) { - queueMicrotask(() => callback(dnsException(err, 'getaddrinfo', hostname))); + queueMicrotask(() => callback(new DNSException(err, 'getaddrinfo', hostname))); return {}; } if (hasObserver('dns')) { @@ -243,7 +243,7 @@ ObjectDefineProperty(lookup, customPromisifyArgs, function onlookupservice(err, hostname, service) { if (err) - return this.callback(dnsException(err, 'getnameinfo', this.hostname)); + return this.callback(new DNSException(err, 'getnameinfo', this.hostname)); this.callback(null, hostname, service); if (this[kPerfHooksDnsLookupServiceContext] && hasObserver('dns')) { @@ -272,7 +272,7 @@ function lookupService(address, port, callback) { req.oncomplete = onlookupservice; const err = cares.getnameinfo(req, address, port); - if (err) throw dnsException(err, 'getnameinfo', address); + if (err) throw new DNSException(err, 'getnameinfo', address); if (hasObserver('dns')) { startPerf(req, kPerfHooksDnsLookupServiceContext, { type: 'dns', diff --git a/lib/fs.js b/lib/fs.js index dd260b76180a7d..7fd8f15d63afe2 100644 --- a/lib/fs.js +++ b/lib/fs.js @@ -58,6 +58,7 @@ const { } = constants; const pathModule = require('path'); +const { isAbsolute } = pathModule; const { isArrayBufferView } = require('internal/util/types'); const binding = internalBinding('fs'); @@ -68,12 +69,11 @@ const { Buffer } = require('buffer'); const { aggregateTwoErrors, codes: { + ERR_ACCESS_DENIED, ERR_FS_FILE_TOO_LARGE, ERR_INVALID_ARG_VALUE, }, AbortError, - uvErrmapGet, - uvException, } = require('internal/errors'); const { @@ -143,6 +143,8 @@ const { kValidateObjectAllowNullable, } = require('internal/validators'); +const permission = require('internal/process/permission'); + let truncateWarn = true; let fs; @@ -398,11 +400,9 @@ function readFile(path, options, callback) { } function tryStatSync(fd, isUserFd) { - const ctx = {}; - const stats = binding.fstat(fd, false, undefined, ctx); - if (ctx.errno !== undefined && !isUserFd) { + const stats = binding.fstat(fd, false, undefined, true /* shouldNotThrow */); + if (stats === undefined && !isUserFd) { fs.closeSync(fd); - throw uvException(ctx); } return stats; } @@ -530,7 +530,7 @@ function close(fd, callback = defaultCloseCallback) { function closeSync(fd) { fd = getValidatedFd(fd); - return binding.close(fd); + binding.close(fd); } /** @@ -782,7 +782,7 @@ function readv(fd, buffers, position, callback) { if (typeof position !== 'number') position = null; - return binding.readBuffers(fd, buffers, position, req); + binding.readBuffers(fd, buffers, position, req); } ObjectDefineProperty(readv, kCustomPromisifyArgsSymbol, @@ -801,14 +801,10 @@ function readvSync(fd, buffers, position) { fd = getValidatedFd(fd); validateBufferArray(buffers); - const ctx = {}; - if (typeof position !== 'number') position = null; - const result = binding.readBuffers(fd, buffers, position, undefined, ctx); - handleErrorFromBinding(ctx); - return result; + return binding.readBuffers(fd, buffers, position); } /** @@ -858,7 +854,8 @@ function write(fd, buffer, offsetOrOptions, length, position, callback) { const req = new FSReqCallback(); req.oncomplete = wrapper; - return binding.writeBuffer(fd, buffer, offset, length, position, req); + binding.writeBuffer(fd, buffer, offset, length, position, req); + return; } validateStringAfterArrayBufferView(buffer, 'buffer'); @@ -879,7 +876,7 @@ function write(fd, buffer, offsetOrOptions, length, position, callback) { const req = new FSReqCallback(); req.oncomplete = wrapper; - return binding.writeString(fd, str, offset, length, req); + binding.writeString(fd, str, offset, length, req); } ObjectDefineProperty(write, kCustomPromisifyArgsSymbol, @@ -969,7 +966,7 @@ function writev(fd, buffers, position, callback) { if (typeof position !== 'number') position = null; - return binding.writeBuffers(fd, buffers, position, req); + binding.writeBuffers(fd, buffers, position, req); } ObjectDefineProperty(writev, kCustomPromisifyArgsSymbol, { @@ -1175,7 +1172,8 @@ function rmdir(path, options, callback) { if (err === false) { const req = new FSReqCallback(); req.oncomplete = callback; - return binding.rmdir(path, req); + binding.rmdir(path, req); + return; } if (err) { return callback(err); @@ -1188,7 +1186,7 @@ function rmdir(path, options, callback) { validateRmdirOptions(options); const req = new FSReqCallback(); req.oncomplete = callback; - return binding.rmdir(path, req); + binding.rmdir(path, req); } } @@ -1216,9 +1214,7 @@ function rmdirSync(path, options) { validateRmdirOptions(options); } - const ctx = { path }; - binding.rmdir(pathModule.toNamespacedPath(path), undefined, ctx); - return handleErrorFromBinding(ctx); + binding.rmdir(pathModule.toNamespacedPath(path)); } /** @@ -1294,7 +1290,7 @@ function fdatasync(fd, callback) { */ function fdatasyncSync(fd) { fd = getValidatedFd(fd); - return binding.fdatasync(fd); + binding.fdatasync(fd); } /** @@ -1319,7 +1315,7 @@ function fsync(fd, callback) { */ function fsyncSync(fd) { fd = getValidatedFd(fd); - return binding.fsync(fd); + binding.fsync(fd); } /** @@ -1426,7 +1422,7 @@ function readdirSyncRecursive(basePath, options) { const dirent = getDirent(path, readdirResult[0][i], readdirResult[1][i]); ArrayPrototypePush(readdirResults, dirent); if (dirent.isDirectory()) { - ArrayPrototypePush(pathsQueue, pathModule.join(dirent.path, dirent.name)); + ArrayPrototypePush(pathsQueue, pathModule.join(dirent.parentPath, dirent.name)); } } } else { @@ -1612,19 +1608,6 @@ function statfs(path, options = { bigint: false }, callback) { binding.statfs(pathModule.toNamespacedPath(path), options.bigint, req); } -function hasNoEntryError(ctx) { - if (ctx.errno) { - const uvErr = uvErrmapGet(ctx.errno); - return uvErr?.[0] === 'ENOENT'; - } - - if (ctx.error) { - return ctx.error.code === 'ENOENT'; - } - - return false; -} - /** * Synchronously retrieves the `fs.Stats` for * the file descriptor. @@ -1632,13 +1615,14 @@ function hasNoEntryError(ctx) { * @param {{ * bigint?: boolean; * }} [options] - * @returns {Stats} + * @returns {Stats | undefined} */ function fstatSync(fd, options = { bigint: false }) { fd = getValidatedFd(fd); - const ctx = { fd }; - const stats = binding.fstat(fd, options.bigint, undefined, ctx); - handleErrorFromBinding(ctx); + const stats = binding.fstat(fd, options.bigint, undefined, false); + if (stats === undefined) { + return; + } return getStatsFromBinding(stats); } @@ -1650,17 +1634,20 @@ function fstatSync(fd, options = { bigint: false }) { * bigint?: boolean; * throwIfNoEntry?: boolean; * }} [options] - * @returns {Stats} + * @returns {Stats | undefined} */ function lstatSync(path, options = { bigint: false, throwIfNoEntry: true }) { path = getValidatedPath(path); - const ctx = { path }; - const stats = binding.lstat(pathModule.toNamespacedPath(path), - options.bigint, undefined, ctx); - if (options.throwIfNoEntry === false && hasNoEntryError(ctx)) { - return undefined; + const stats = binding.lstat( + pathModule.toNamespacedPath(path), + options.bigint, + undefined, + options.throwIfNoEntry, + ); + + if (stats === undefined) { + return; } - handleErrorFromBinding(ctx); return getStatsFromBinding(stats); } @@ -1742,6 +1729,15 @@ function symlink(target, path, type_, callback_) { const type = (typeof type_ === 'string' ? type_ : null); const callback = makeCallback(arguments[arguments.length - 1]); + if (permission.isEnabled()) { + // The permission model's security guarantees fall apart in the presence of + // relative symbolic links. Thus, we have to prevent their creation. + if (typeof target !== 'string' || !isAbsolute(toPathIfFileURL(target))) { + callback(new ERR_ACCESS_DENIED('relative symbolic link target')); + return; + } + } + target = getValidatedPath(target, 'target'); path = getValidatedPath(path); @@ -1798,6 +1794,15 @@ function symlinkSync(target, path, type) { type = 'dir'; } } + + if (permission.isEnabled()) { + // The permission model's security guarantees fall apart in the presence of + // relative symbolic links. Thus, we have to prevent their creation. + if (typeof target !== 'string' || !isAbsolute(toPathIfFileURL(target))) { + throw new ERR_ACCESS_DENIED('relative symbolic link target'); + } + } + target = getValidatedPath(target, 'target'); path = getValidatedPath(path); @@ -1868,7 +1873,7 @@ function unlink(path, callback) { */ function unlinkSync(path) { path = pathModule.toNamespacedPath(getValidatedPath(path)); - return binding.unlink(path); + binding.unlink(path); } /** @@ -2334,13 +2339,26 @@ function writeFileSync(path, data, options) { validateBoolean(flush, 'options.flush'); + const flag = options.flag || 'w'; + + // C++ fast path for string data and UTF8 encoding + if (typeof data === 'string' && (options.encoding === 'utf8' || options.encoding === 'utf-8')) { + if (!isInt32(path)) { + path = pathModule.toNamespacedPath(getValidatedPath(path)); + } + + return binding.writeFileUtf8( + path, data, + stringToFlags(flag), + parseFileMode(options.mode, 'mode', 0o666), + ); + } + if (!isArrayBufferView(data)) { validateStringAfterArrayBufferView(data, 'data'); data = Buffer.from(data, options.encoding || 'utf8'); } - const flag = options.flag || 'w'; - const isUserFd = isFd(path); // File descriptor ownership const fd = isUserFd ? path : fs.openSync(path, flag, options.mode); @@ -2645,9 +2663,10 @@ function realpathSync(p, options) { // On windows, check that the root exists. On unix there is no need. if (isWindows) { - const ctx = { path: base }; - binding.lstat(pathModule.toNamespacedPath(base), false, undefined, ctx); - handleErrorFromBinding(ctx); + const out = binding.lstat(pathModule.toNamespacedPath(base), false, undefined, true /* throwIfNoEntry */); + if (out === undefined) { + return; + } knownHard.add(base); } @@ -2687,9 +2706,10 @@ function realpathSync(p, options) { // for our internal use. const baseLong = pathModule.toNamespacedPath(base); - const ctx = { path: base }; - const stats = binding.lstat(baseLong, true, undefined, ctx); - handleErrorFromBinding(ctx); + const stats = binding.lstat(baseLong, true, undefined, true /* throwIfNoEntry */); + if (stats === undefined) { + return; + } if (!isFileType(stats, S_IFLNK)) { knownHard.add(base); @@ -2728,9 +2748,10 @@ function realpathSync(p, options) { // On windows, check that the root exists. On unix there is no need. if (isWindows && !knownHard.has(base)) { - const ctx = { path: base }; - binding.lstat(pathModule.toNamespacedPath(base), false, undefined, ctx); - handleErrorFromBinding(ctx); + const out = binding.lstat(pathModule.toNamespacedPath(base), false, undefined, true /* throwIfNoEntry */); + if (out === undefined) { + return; + } knownHard.add(base); } } @@ -2909,7 +2930,7 @@ realpath.native = (path, options, callback) => { path = getValidatedPath(path); const req = new FSReqCallback(); req.oncomplete = callback; - return binding.realpath(pathModule.toNamespacedPath(path), options.encoding, req); + binding.realpath(pathModule.toNamespacedPath(path), options.encoding, req); }; /** @@ -2981,8 +3002,8 @@ function copyFile(src, dest, mode, callback) { src = getValidatedPath(src, 'src'); dest = getValidatedPath(dest, 'dest'); - src = pathModule._makeLong(src); - dest = pathModule._makeLong(dest); + src = pathModule.toNamespacedPath(src); + dest = pathModule.toNamespacedPath(dest); mode = getValidMode(mode, 'copyFile'); callback = makeCallback(callback); @@ -3071,6 +3092,7 @@ function lazyLoadStreams() { * end?: number; * highWaterMark?: number; * fs?: object | null; + * signal?: AbortSignal | null; * }} [options] * @returns {ReadStream} */ @@ -3091,6 +3113,8 @@ function createReadStream(path, options) { * emitClose?: boolean; * start: number; * fs?: object | null; + * signal?: AbortSignal | null; + * highWaterMark?: number; * flush?: boolean; * }} [options] * @returns {WriteStream} diff --git a/lib/inspector.js b/lib/inspector.js index 4ead7d6ca78726..1247567a140b34 100644 --- a/lib/inspector.js +++ b/lib/inspector.js @@ -4,7 +4,6 @@ const { JSONParse, JSONStringify, SafeMap, - Symbol, SymbolDispose, } = primordials; @@ -45,28 +44,19 @@ const { console, } = internalBinding('inspector'); -const connectionSymbol = Symbol('connectionProperty'); -const messageCallbacksSymbol = Symbol('messageCallbacks'); -const nextIdSymbol = Symbol('nextId'); -const onMessageSymbol = Symbol('onMessage'); - class Session extends EventEmitter { - constructor() { - super(); - this[connectionSymbol] = null; - this[nextIdSymbol] = 1; - this[messageCallbacksSymbol] = new SafeMap(); - } + #connection = null; + #nextId = 1; + #messageCallbacks = new SafeMap(); /** * Connects the session to the inspector back-end. * @returns {void} */ connect() { - if (this[connectionSymbol]) + if (this.#connection) throw new ERR_INSPECTOR_ALREADY_CONNECTED('The inspector session'); - this[connectionSymbol] = - new Connection((message) => this[onMessageSymbol](message)); + this.#connection = new Connection((message) => this.#onMessage(message)); } /** @@ -77,23 +67,24 @@ class Session extends EventEmitter { connectToMainThread() { if (isMainThread) throw new ERR_INSPECTOR_NOT_WORKER(); - if (this[connectionSymbol]) + if (this.#connection) throw new ERR_INSPECTOR_ALREADY_CONNECTED('The inspector session'); - this[connectionSymbol] = + this.#connection = new MainThreadConnection( - (message) => queueMicrotask(() => this[onMessageSymbol](message))); + (message) => queueMicrotask(() => this.#onMessage(message))); } - [onMessageSymbol](message) { + #onMessage(message) { const parsed = JSONParse(message); try { if (parsed.id) { - const callback = this[messageCallbacksSymbol].get(parsed.id); - this[messageCallbacksSymbol].delete(parsed.id); + const callback = this.#messageCallbacks.get(parsed.id); + this.#messageCallbacks.delete(parsed.id); if (callback) { if (parsed.error) { - return callback(new ERR_INSPECTOR_COMMAND(parsed.error.code, - parsed.error.message)); + return callback( + new ERR_INSPECTOR_COMMAND(parsed.error.code, parsed.error.message), + ); } callback(null, parsed.result); @@ -127,18 +118,18 @@ class Session extends EventEmitter { validateFunction(callback, 'callback'); } - if (!this[connectionSymbol]) { + if (!this.#connection) { throw new ERR_INSPECTOR_NOT_CONNECTED(); } - const id = this[nextIdSymbol]++; + const id = this.#nextId++; const message = { id, method }; if (params) { message.params = params; } if (callback) { - this[messageCallbacksSymbol].set(id, callback); + this.#messageCallbacks.set(id, callback); } - this[connectionSymbol].dispatch(JSONStringify(message)); + this.#connection.dispatch(JSONStringify(message)); } /** @@ -148,16 +139,16 @@ class Session extends EventEmitter { * @returns {void} */ disconnect() { - if (!this[connectionSymbol]) + if (!this.#connection) return; - this[connectionSymbol].disconnect(); - this[connectionSymbol] = null; - const remainingCallbacks = this[messageCallbacksSymbol].values(); + this.#connection.disconnect(); + this.#connection = null; + const remainingCallbacks = this.#messageCallbacks.values(); for (const callback of remainingCallbacks) { queueMicrotask(() => callback(new ERR_INSPECTOR_CLOSED())); } - this[messageCallbacksSymbol].clear(); - this[nextIdSymbol] = 1; + this.#messageCallbacks.clear(); + this.#nextId = 1; } } diff --git a/lib/internal/bootstrap/realm.js b/lib/internal/bootstrap/realm.js index c6935c6f7775fc..93a939cc7e4645 100644 --- a/lib/internal/bootstrap/realm.js +++ b/lib/internal/bootstrap/realm.js @@ -50,6 +50,8 @@ const { ArrayFrom, + ArrayPrototypeFilter, + ArrayPrototypeIncludes, ArrayPrototypeMap, ArrayPrototypePush, ArrayPrototypeSlice, @@ -85,34 +87,26 @@ ObjectDefineProperty(process, 'moduleLoadList', { // more, we just implement them as legacy wrappers instead. See the // legacyWrapperList. const processBindingAllowList = new SafeSet([ - 'async_wrap', 'buffer', 'cares_wrap', 'config', 'constants', 'contextify', - 'crypto', 'fs', 'fs_event_wrap', - 'http_parser', 'icu', 'inspector', 'js_stream', - 'natives', 'os', 'pipe_wrap', 'process_wrap', - 'signal_wrap', 'spawn_sync', 'stream_wrap', 'tcp_wrap', 'tls_wrap', 'tty_wrap', 'udp_wrap', - 'url', - 'util', 'uv', - 'v8', 'zlib', ]); @@ -146,19 +140,23 @@ const experimentalModuleList = new SafeSet(); process.binding = function binding(module) { module = String(module); + const mod = bindingObj[module]; + if (typeof mod === 'object') { + return mod; + } // Deprecated specific process.binding() modules, but not all, allow // selective fallback to internalBinding for the deprecated ones. + if (runtimeDeprecatedList.has(module)) { + process.emitWarning( + `Access to process.binding('${module}') is deprecated.`, + 'DeprecationWarning', + 'DEP0111'); + return internalBinding(module); + } + if (legacyWrapperList.has(module)) { + return requireBuiltin('internal/legacy/processbinding')[module](); + } if (processBindingAllowList.has(module)) { - if (runtimeDeprecatedList.has(module)) { - runtimeDeprecatedList.delete(module); - process.emitWarning( - `Access to process.binding('${module}') is deprecated.`, - 'DeprecationWarning', - 'DEP0111'); - } - if (legacyWrapperList.has(module)) { - return requireBuiltin('internal/legacy/processbinding')[module](); - } return internalBinding(module); } // eslint-disable-next-line no-restricted-syntax @@ -215,8 +213,8 @@ const internalBuiltinIds = builtinIds .filter((id) => StringPrototypeStartsWith(id, 'internal/') && id !== selfId); // When --expose-internals is on we'll add the internal builtin ids to these. -const canBeRequiredByUsersList = new SafeSet(publicBuiltinIds); -const canBeRequiredByUsersWithoutSchemeList = +let canBeRequiredByUsersList = new SafeSet(publicBuiltinIds); +let canBeRequiredByUsersWithoutSchemeList = new SafeSet(publicBuiltinIds.filter((id) => !schemelessBlockList.has(id))); /** @@ -269,6 +267,13 @@ class BuiltinModule { } } + static setRealmAllowRequireByUsers(ids) { + canBeRequiredByUsersList = + new SafeSet(ArrayPrototypeFilter(ids, (id) => ArrayPrototypeIncludes(publicBuiltinIds, id))); + canBeRequiredByUsersWithoutSchemeList = + new SafeSet(ArrayPrototypeFilter(ids, (id) => !schemelessBlockList.has(id))); + } + // To be called during pre-execution when --expose-internals is on. // Enables the user-land module loader to access internal modules. static exposeInternals() { diff --git a/lib/internal/bootstrap/shadow_realm.js b/lib/internal/bootstrap/shadow_realm.js new file mode 100644 index 00000000000000..b99502355d9818 --- /dev/null +++ b/lib/internal/bootstrap/shadow_realm.js @@ -0,0 +1,21 @@ +'use strict'; + +// This script sets up the context for shadow realms. + +const { + prepareShadowRealmExecution, +} = require('internal/process/pre_execution'); +const { + BuiltinModule, +} = require('internal/bootstrap/realm'); + +BuiltinModule.setRealmAllowRequireByUsers([ + /** + * The built-in modules exposed in the ShadowRealm must each be providing + * platform capabilities with no authority to cause side effects such as + * I/O or mutation of values that are shared across different realms within + * the same Node.js environment. + */ +]); + +prepareShadowRealmExecution(); diff --git a/lib/internal/child_process.js b/lib/internal/child_process.js index 92f616fff0863a..5dd10da715c7a8 100644 --- a/lib/internal/child_process.js +++ b/lib/internal/child_process.js @@ -17,7 +17,7 @@ const { } = primordials; const { - errnoException, + ErrnoException, codes: { ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, @@ -283,7 +283,7 @@ function ChildProcess() { if (exitCode < 0) { const syscall = this.spawnfile ? 'spawn ' + this.spawnfile : 'spawn'; - const err = errnoException(exitCode, syscall); + const err = new ErrnoException(exitCode, syscall); if (this.spawnfile) err.path = this.spawnfile; @@ -418,7 +418,7 @@ ChildProcess.prototype.spawn = function(options) { this._handle.close(); this._handle = null; - throw errnoException(err, 'spawn'); + throw new ErrnoException(err, 'spawn'); } else { queueMicrotask(() => onSpawnNT(this)); } @@ -506,10 +506,10 @@ ChildProcess.prototype.kill = function(sig) { /* Already dead. */ } else if (err === UV_EINVAL || err === UV_ENOSYS) { /* The underlying platform doesn't support this signal. */ - throw errnoException(err, 'kill'); + throw new ErrnoException(err, 'kill'); } else { /* Other error, almost certainly EPERM. */ - this.emit('error', errnoException(err, 'kill')); + this.emit('error', new ErrnoException(err, 'kill')); } } @@ -876,7 +876,7 @@ function setupChannel(target, channel, serializationMode) { obj.postSend(message, handle, options, callback); if (!options.swallowErrors) { - const ex = errnoException(err, 'write'); + const ex = new ErrnoException(err, 'write'); if (typeof callback === 'function') { queueMicrotask(() => callback(ex)); } else { @@ -1121,7 +1121,7 @@ function spawnSync(options) { result.stderr = result.output && result.output[2]; if (result.error) { - result.error = errnoException(result.error, 'spawnSync ' + options.file); + result.error = new ErrnoException(result.error, 'spawnSync ' + options.file); result.error.path = options.file; result.error.spawnargs = ArrayPrototypeSlice(options.args, 1); } diff --git a/lib/internal/crypto/hash.js b/lib/internal/crypto/hash.js index 57fcb63518d52d..4ed97034f612fb 100644 --- a/lib/internal/crypto/hash.js +++ b/lib/internal/crypto/hash.js @@ -57,7 +57,7 @@ const kState = Symbol('kState'); const kFinalized = Symbol('kFinalized'); function Hash(algorithm, options) { - if (!(this instanceof Hash)) + if (!new.target) return new Hash(algorithm, options); if (!(algorithm instanceof _Hash)) validateString(algorithm, 'algorithm'); diff --git a/lib/internal/crypto/hkdf.js b/lib/internal/crypto/hkdf.js index cf3c39e8d9da5a..757a2391a0167f 100644 --- a/lib/internal/crypto/hkdf.js +++ b/lib/internal/crypto/hkdf.js @@ -49,15 +49,15 @@ const { } = require('internal/errors'); const validateParameters = hideStackFrames((hash, key, salt, info, length) => { - validateString(hash, 'digest'); + validateString.withoutStackTrace(hash, 'digest'); key = prepareKey(key); - salt = validateByteSource(salt, 'salt'); - info = validateByteSource(info, 'info'); + salt = validateByteSource.withoutStackTrace(salt, 'salt'); + info = validateByteSource.withoutStackTrace(info, 'info'); - validateInteger(length, 'length', 0, kMaxLength); + validateInteger.withoutStackTrace(length, 'length', 0, kMaxLength); if (info.byteLength > 1024) { - throw new ERR_OUT_OF_RANGE( + throw new ERR_OUT_OF_RANGE.HideStackFramesError( 'info', 'must not contain more than 1024 bytes', info.byteLength); diff --git a/lib/internal/crypto/util.js b/lib/internal/crypto/util.js index 51ca3f4c056fb9..45a236a1130249 100644 --- a/lib/internal/crypto/util.js +++ b/lib/internal/crypto/util.js @@ -116,7 +116,7 @@ const getArrayBufferOrView = hideStackFrames((buffer, name, encoding) => { return Buffer.from(buffer, encoding); } if (!isArrayBufferView(buffer)) { - throw new ERR_INVALID_ARG_TYPE( + throw new ERR_INVALID_ARG_TYPE.HideStackFramesError( name, [ 'string', @@ -403,7 +403,7 @@ const validateByteSource = hideStackFrames((val, name) => { if (isAnyArrayBuffer(val) || isArrayBufferView(val)) return val; - throw new ERR_INVALID_ARG_TYPE( + throw new ERR_INVALID_ARG_TYPE.HideStackFramesError( name, [ 'string', diff --git a/lib/internal/crypto/webidl.js b/lib/internal/crypto/webidl.js index 61a4cfe4330703..326d520b844d23 100644 --- a/lib/internal/crypto/webidl.js +++ b/lib/internal/crypto/webidl.js @@ -19,20 +19,22 @@ const { MathTrunc, Number, NumberIsFinite, - ObjectAssign, ObjectPrototypeIsPrototypeOf, SafeArrayIterator, - SafeSet, String, SymbolIterator, TypedArrayPrototypeGetBuffer, TypedArrayPrototypeGetSymbolToStringTag, - TypeError, globalThis: { SharedArrayBuffer, }, } = primordials; +const { + makeException, + createEnumConverter, +} = require('internal/webidl'); + const { kEmptyObject, setOwnProperty, @@ -40,23 +42,6 @@ const { const { CryptoKey } = require('internal/crypto/webcrypto'); const { getDataViewOrTypedArrayBuffer } = require('internal/crypto/util'); -function codedTypeError(message, errorProperties = kEmptyObject) { - // eslint-disable-next-line no-restricted-syntax - const err = new TypeError(message); - ObjectAssign(err, errorProperties); - return err; -} - -function makeException(message, opts = kEmptyObject) { - const prefix = opts.prefix ? opts.prefix + ': ' : ''; - const context = opts.context?.length === 0 ? - '' : (opts.context ?? 'Value') + ' '; - return codedTypeError( - `${prefix}${context}${message}`, - { code: opts.code || 'ERR_INVALID_ARG_TYPE' }, - ); -} - // https://tc39.es/ecma262/#sec-tonumber function toNumber(value, opts = kEmptyObject) { switch (typeof value) { @@ -308,22 +293,6 @@ function createDictionaryConverter(name, dictionaries) { }; } -function createEnumConverter(name, values) { - const E = new SafeSet(values); - - return function(V, opts = kEmptyObject) { - const S = String(V); - - if (!E.has(S)) { - throw makeException( - `value '${S}' is not a valid enum value of type ${name}.`, - { __proto__: null, ...opts, code: 'ERR_INVALID_ARG_VALUE' }); - } - - return S; - }; -} - function createSequenceConverter(converter) { return function(V, opts = kEmptyObject) { if (type(V) !== 'Object') { diff --git a/lib/internal/dns/callback_resolver.js b/lib/internal/dns/callback_resolver.js index e57a597c08c716..5b7758865a85c6 100644 --- a/lib/internal/dns/callback_resolver.js +++ b/lib/internal/dns/callback_resolver.js @@ -12,7 +12,7 @@ const { ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, }, - dnsException, + DNSException, } = require('internal/errors'); const { @@ -42,7 +42,7 @@ function onresolve(err, result, ttls) { result, (address, index) => ({ address, ttl: ttls[index] })); if (err) - this.callback(dnsException(err, this.bindingName, this.hostname)); + this.callback(new DNSException(err, this.bindingName, this.hostname)); else { this.callback(null, result); if (this[kPerfHooksDnsLookupResolveContext] && hasObserver('dns')) { @@ -69,7 +69,7 @@ function resolver(bindingName) { req.oncomplete = onresolve; req.ttl = !!(options && options.ttl); const err = this._handle[bindingName](req, name); - if (err) throw dnsException(err, bindingName, name); + if (err) throw new DNSException(err, bindingName, name); if (hasObserver('dns')) { startPerf(req, kPerfHooksDnsLookupResolveContext, { type: 'dns', diff --git a/lib/internal/dns/promises.js b/lib/internal/dns/promises.js index 1169b2735d4efe..56276fdbae7db7 100644 --- a/lib/internal/dns/promises.js +++ b/lib/internal/dns/promises.js @@ -45,7 +45,7 @@ const { ADDRGETNETWORKPARAMS, CANCELLED, } = dnsErrorCodes; -const { codes, dnsException } = require('internal/errors'); +const { codes, DNSException } = require('internal/errors'); const { isIP } = require('internal/net'); const { getaddrinfo, @@ -79,7 +79,7 @@ const { function onlookup(err, addresses) { if (err) { - this.reject(dnsException(err, 'getaddrinfo', this.hostname)); + this.reject(new DNSException(err, 'getaddrinfo', this.hostname)); return; } @@ -92,7 +92,7 @@ function onlookup(err, addresses) { function onlookupall(err, addresses) { if (err) { - this.reject(dnsException(err, 'getaddrinfo', this.hostname)); + this.reject(new DNSException(err, 'getaddrinfo', this.hostname)); return; } @@ -153,7 +153,7 @@ function createLookupPromise(family, hostname, all, hints, verbatim) { const err = getaddrinfo(req, hostname, family, hints, verbatim); if (err) { - reject(dnsException(err, 'getaddrinfo', hostname)); + reject(new DNSException(err, 'getaddrinfo', hostname)); } else if (hasObserver('dns')) { const detail = { hostname, @@ -220,7 +220,7 @@ function lookup(hostname, options) { function onlookupservice(err, hostname, service) { if (err) { - this.reject(dnsException(err, 'getnameinfo', this.host)); + this.reject(new DNSException(err, 'getnameinfo', this.host)); return; } @@ -243,7 +243,7 @@ function createLookupServicePromise(hostname, port) { const err = getnameinfo(req, hostname, port); if (err) - reject(dnsException(err, 'getnameinfo', hostname)); + reject(new DNSException(err, 'getnameinfo', hostname)); else if (hasObserver('dns')) { startPerf(req, kPerfHooksDnsLookupServiceContext, { type: 'dns', @@ -272,7 +272,7 @@ function lookupService(address, port) { function onresolve(err, result, ttls) { if (err) { - this.reject(dnsException(err, this.bindingName, this.hostname)); + this.reject(new DNSException(err, this.bindingName, this.hostname)); return; } @@ -300,7 +300,7 @@ function createResolverPromise(resolver, bindingName, hostname, ttl) { const err = resolver._handle[bindingName](req, hostname); if (err) - reject(dnsException(err, bindingName, hostname)); + reject(new DNSException(err, bindingName, hostname)); else if (hasObserver('dns')) { startPerf(req, kPerfHooksDnsLookupResolveContext, { type: 'dns', diff --git a/lib/internal/dns/utils.js b/lib/internal/dns/utils.js index fa8f0b8cf14103..0d1f817593f2e7 100644 --- a/lib/internal/dns/utils.js +++ b/lib/internal/dns/utils.js @@ -2,7 +2,6 @@ const { ArrayPrototypeForEach, - ArrayPrototypeJoin, ArrayPrototypeMap, ArrayPrototypePush, FunctionPrototypeBind, @@ -143,12 +142,15 @@ class ResolverBase { } [kSetServersInteral](newSet, servers) { - const orig = this._handle.getServers() || []; + const orig = ArrayPrototypeMap(this._handle.getServers() || [], (val) => { + val.unshift(isIP(val[0])); + return val; + }); const errorNumber = this._handle.setServers(newSet); if (errorNumber !== 0) { // Reset the servers to the old servers, because ares probably unset them. - this._handle.setServers(ArrayPrototypeJoin(orig, ',')); + this._handle.setServers(orig); const { strerror } = lazyBinding(); const err = strerror(errorNumber); throw new ERR_DNS_SET_SERVERS_FAILED(err, servers); diff --git a/lib/internal/errors.js b/lib/internal/errors.js index 363b9d3bb8fe8b..ad151cc2bdd227 100644 --- a/lib/internal/errors.js +++ b/lib/internal/errors.js @@ -86,8 +86,7 @@ const kTypes = [ const MainContextError = Error; const overrideStackTrace = new SafeWeakMap(); const kNoOverride = Symbol('kNoOverride'); -let userStackTraceLimit; -const nodeInternalPrefix = '__node_internal_'; + const prepareStackTrace = (globalThis, error, trace) => { // API for node internals to override error stack formatting // without interfering with userland code. @@ -97,21 +96,6 @@ const prepareStackTrace = (globalThis, error, trace) => { return f(error, trace); } - const firstFrame = trace[0]?.getFunctionName(); - if (firstFrame && StringPrototypeStartsWith(firstFrame, nodeInternalPrefix)) { - for (let l = trace.length - 1; l >= 0; l--) { - const fn = trace[l]?.getFunctionName(); - if (fn && StringPrototypeStartsWith(fn, nodeInternalPrefix)) { - ArrayPrototypeSplice(trace, 0, l + 1); - break; - } - } - // `userStackTraceLimit` is the user value for `Error.stackTraceLimit`, - // it is updated at every new exception in `captureLargerStackTrace`. - if (trace.length > userStackTraceLimit) - ArrayPrototypeSplice(trace, userStackTraceLimit); - } - const globalOverride = maybeOverridePrepareStackTrace(globalThis, error, trace); if (globalOverride !== kNoOverride) return globalOverride; @@ -151,30 +135,51 @@ const maybeOverridePrepareStackTrace = (globalThis, error, trace) => { return kNoOverride; }; -const aggregateTwoErrors = hideStackFrames((innerError, outerError) => { +const aggregateTwoErrors = (innerError, outerError) => { if (innerError && outerError && innerError !== outerError) { if (ArrayIsArray(outerError.errors)) { // If `outerError` is already an `AggregateError`. ArrayPrototypePush(outerError.errors, innerError); return outerError; } - // eslint-disable-next-line no-restricted-syntax - const err = new AggregateError(new SafeArrayIterator([ - outerError, - innerError, - ]), outerError.message); + let err; + if (isErrorStackTraceLimitWritable()) { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + // eslint-disable-next-line no-restricted-syntax + err = new AggregateError(new SafeArrayIterator([ + outerError, + innerError, + ]), outerError.message); + Error.stackTraceLimit = limit; + ErrorCaptureStackTrace(err, aggregateTwoErrors); + } else { + // eslint-disable-next-line no-restricted-syntax + err = new AggregateError(new SafeArrayIterator([ + outerError, + innerError, + ]), outerError.message); + } err.code = outerError.code; return err; } return innerError || outerError; -}); +}; -const aggregateErrors = hideStackFrames((errors, message, code) => { - // eslint-disable-next-line no-restricted-syntax - const err = new AggregateError(new SafeArrayIterator(errors), message); - err.code = errors[0]?.code; - return err; -}); +class NodeAggregateError extends AggregateError { + constructor(errors, message) { + super(new SafeArrayIterator(errors), message); + this.code = errors[0]?.code; + } + + get [kIsNodeError]() { + return true; + } + + get ['constructor']() { + return AggregateError; + } +} const assert = require('internal/assert'); @@ -242,11 +247,7 @@ function inspectWithNoCustomRetry(obj, options) { // and may have .path and .dest. class SystemError extends Error { constructor(key, context) { - const limit = Error.stackTraceLimit; - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; super(); - // Reset the limit and setting the name property. - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = limit; const prefix = getMessage(key, [], this); let message = `${prefix}: ${context.syscall} returned ` + `${context.code} (${context.message})`; @@ -256,8 +257,6 @@ class SystemError extends Error { if (context.dest !== undefined) message += ` => ${context.dest}`; - captureLargerStackTrace(this); - this.code = key; ObjectDefineProperties(this, { @@ -372,6 +371,33 @@ function makeSystemErrorWithCode(key) { }; } +// This is a special error type that is only used for the E function. +class HideStackFramesError extends Error { +} + +function makeNodeErrorForHideStackFrame(Base, clazz) { + class HideStackFramesError extends Base { + constructor(...args) { + if (isErrorStackTraceLimitWritable()) { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + super(...args); + Error.stackTraceLimit = limit; + } else { + super(...args); + } + } + + // This is a workaround for wpt tests that expect that the error + // constructor has a `name` property of the base class. + get ['constructor']() { + return clazz; + } + } + + return HideStackFramesError; +} + function makeNodeErrorWithCode(Base, key) { const msg = messages.get(key); const expectedLength = typeof msg !== 'string' ? -1 : getExpectedArgumentLength(msg); @@ -479,11 +505,16 @@ function makeNodeErrorWithCode(Base, key) { * @returns {T} */ function hideStackFrames(fn) { - // We rename the functions that will be hidden to cut off the stacktrace - // at the outermost one - const hidden = nodeInternalPrefix + fn.name; - ObjectDefineProperty(fn, 'name', { __proto__: null, value: hidden }); - return fn; + function wrappedFn(...args) { + try { + return ReflectApply(fn, this, args); + } catch (error) { + Error.stackTraceLimit && ErrorCaptureStackTrace(error, wrappedFn); + throw error; + } + } + wrappedFn.withoutStackTrace = fn; + return wrappedFn; } // Utility function for registering the error codes. Only used here. Exported @@ -492,18 +523,33 @@ function E(sym, val, def, ...otherClasses) { // Special case for SystemError that formats the error message differently // The SystemErrors only have SystemError as their base classes. messages.set(sym, val); - if (def === SystemError) { - def = makeSystemErrorWithCode(sym); - } else { - def = makeNodeErrorWithCode(def, sym); - } + + const ErrClass = def === SystemError ? + makeSystemErrorWithCode(sym) : + makeNodeErrorWithCode(def, sym); if (otherClasses.length !== 0) { - otherClasses.forEach((clazz) => { - def[clazz.name] = makeNodeErrorWithCode(clazz, sym); - }); + if (otherClasses.includes(HideStackFramesError)) { + if (otherClasses.length !== 1) { + otherClasses.forEach((clazz) => { + if (clazz !== HideStackFramesError) { + ErrClass[clazz.name] = makeNodeErrorWithCode(clazz, sym); + ErrClass[clazz.name].HideStackFramesError = makeNodeErrorForHideStackFrame(ErrClass[clazz.name], clazz); + } + }); + } + } else { + otherClasses.forEach((clazz) => { + ErrClass[clazz.name] = makeNodeErrorWithCode(clazz, sym); + }); + } } - codes[sym] = def; + + if (otherClasses.includes(HideStackFramesError)) { + ErrClass.HideStackFramesError = makeNodeErrorForHideStackFrame(ErrClass, def); + } + + codes[sym] = ErrClass; } function getExpectedArgumentLength(msg) { @@ -553,84 +599,67 @@ function uvErrmapGet(name) { return MapPrototypeGet(uvBinding.errmap, name); } -const captureLargerStackTrace = hideStackFrames( - function captureLargerStackTrace(err) { - const stackTraceLimitIsWritable = isErrorStackTraceLimitWritable(); - if (stackTraceLimitIsWritable) { - userStackTraceLimit = Error.stackTraceLimit; - Error.stackTraceLimit = Infinity; - } - ErrorCaptureStackTrace(err); - // Reset the limit - if (stackTraceLimitIsWritable) Error.stackTraceLimit = userStackTraceLimit; - - return err; - }); - /** * This creates an error compatible with errors produced in the C++ * function UVException using a context object with data assembled in C++. * The goal is to migrate them to ERR_* errors later when compatibility is * not a concern. - * @param {object} ctx - * @returns {Error} */ -const uvException = hideStackFrames(function uvException(ctx) { - const { 0: code, 1: uvmsg } = uvErrmapGet(ctx.errno) || uvUnmappedError; - let message = `${code}: ${ctx.message || uvmsg}, ${ctx.syscall}`; - - let path; - let dest; - if (ctx.path) { - path = ctx.path.toString(); - message += ` '${path}'`; - } - if (ctx.dest) { - dest = ctx.dest.toString(); - message += ` -> '${dest}'`; - } +class UVException extends Error { + /** + * @param {object} ctx + */ + constructor(ctx) { + const { 0: code, 1: uvmsg } = uvErrmapGet(ctx.errno) || uvUnmappedError; + let message = `${code}: ${ctx.message || uvmsg}, ${ctx.syscall}`; + + let path; + let dest; + if (ctx.path) { + path = ctx.path.toString(); + message += ` '${path}'`; + } + if (ctx.dest) { + dest = ctx.dest.toString(); + message += ` -> '${dest}'`; + } - // Reducing the limit improves the performance significantly. We do not lose - // the stack frames due to the `captureStackTrace()` function that is called - // later. - const tmpLimit = Error.stackTraceLimit; - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; - // Pass the message to the constructor instead of setting it on the object - // to make sure it is the same as the one created in C++ - // eslint-disable-next-line no-restricted-syntax - const err = new Error(message); - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = tmpLimit; + super(message); - for (const prop of ObjectKeys(ctx)) { - if (prop === 'message' || prop === 'path' || prop === 'dest') { - continue; + for (const prop of ObjectKeys(ctx)) { + if (prop === 'message' || prop === 'path' || prop === 'dest') { + continue; + } + this[prop] = ctx[prop]; } - err[prop] = ctx[prop]; - } - err.code = code; - if (path) { - err.path = path; - } - if (dest) { - err.dest = dest; + this.code = code; + if (path) { + this.path = path; + } + if (dest) { + this.dest = dest; + } } - return captureLargerStackTrace(err); -}); + get ['constructor']() { + return Error; + } +} /** * This creates an error compatible with errors produced in the C++ * This function should replace the deprecated * `exceptionWithHostPort()` function. - * @param {number} err - A libuv error number - * @param {string} syscall - * @param {string} address - * @param {number} [port] - * @returns {Error} */ -const uvExceptionWithHostPort = hideStackFrames( - function uvExceptionWithHostPort(err, syscall, address, port) { +class UVExceptionWithHostPort extends Error { + /** + * @param {number} err - A libuv error number + * @param {string} syscall + * @param {string} address + * @param {number} [port] + */ + constructor(err, syscall, address, port) { const { 0: code, 1: uvmsg } = uvErrmapGet(err) || uvUnmappedError; const message = `${syscall} ${code}: ${uvmsg}`; let details = ''; @@ -641,34 +670,32 @@ const uvExceptionWithHostPort = hideStackFrames( details = ` ${address}`; } - // Reducing the limit improves the performance significantly. We do not - // lose the stack frames due to the `captureStackTrace()` function that - // is called later. - const tmpLimit = Error.stackTraceLimit; - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; - // eslint-disable-next-line no-restricted-syntax - const ex = new Error(`${message}${details}`); - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = tmpLimit; - ex.code = code; - ex.errno = err; - ex.syscall = syscall; - ex.address = address; + super(`${message}${details}`); + + this.code = code; + this.errno = err; + this.syscall = syscall; + this.address = address; if (port) { - ex.port = port; + this.port = port; } + } - return captureLargerStackTrace(ex); - }); + get ['constructor']() { + return Error; + } +} /** * This used to be util._errnoException(). - * @param {number} err - A libuv error number - * @param {string} syscall - * @param {string} [original] - * @returns {Error} */ -const errnoException = hideStackFrames( - function errnoException(err, syscall, original) { +class ErrnoException extends Error { + /** + * @param {number} err - A libuv error number + * @param {string} syscall + * @param {string} [original] err + */ + constructor(err, syscall, original) { // TODO(joyeecheung): We have to use the type-checked // getSystemErrorName(err) to guard against invalid arguments from users. // This can be replaced with [ code ] = errmap.get(err) when this method @@ -678,20 +705,20 @@ const errnoException = hideStackFrames( const message = original ? `${syscall} ${code} ${original}` : `${syscall} ${code}`; - const tmpLimit = Error.stackTraceLimit; - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; - // eslint-disable-next-line no-restricted-syntax - const ex = new Error(message); - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = tmpLimit; - ex.errno = err; - ex.code = code; - ex.syscall = syscall; + super(message); - return captureLargerStackTrace(ex); - }); + this.errno = err; + this.code = code; + this.syscall = syscall; + } + + get ['constructor']() { + return Error; + } +} /** - * Deprecated, new function is `uvExceptionWithHostPort()` + * Deprecated, new Error is `UVExceptionWithHostPort()` * New function added the error description directly * from C++. this method for backwards compatibility * @param {number} err - A libuv error number @@ -701,8 +728,8 @@ const errnoException = hideStackFrames( * @param {string} [additional] * @returns {Error} */ -const exceptionWithHostPort = hideStackFrames( - function exceptionWithHostPort(err, syscall, address, port, additional) { +class ExceptionWithHostPort extends Error { + constructor(err, syscall, address, port, additional) { // TODO(joyeecheung): We have to use the type-checked // getSystemErrorName(err) to guard against invalid arguments from users. // This can be replaced with [ code ] = errmap.get(err) when this method @@ -719,78 +746,75 @@ const exceptionWithHostPort = hideStackFrames( details += ` - Local (${additional})`; } - // Reducing the limit improves the performance significantly. We do not - // lose the stack frames due to the `captureStackTrace()` function that - // is called later. - const tmpLimit = Error.stackTraceLimit; - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; - // eslint-disable-next-line no-restricted-syntax - const ex = new Error(`${syscall} ${code}${details}`); - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = tmpLimit; - ex.errno = err; - ex.code = code; - ex.syscall = syscall; - ex.address = address; + super(`${syscall} ${code}${details}`); + + this.errno = err; + this.code = code; + this.syscall = syscall; + this.address = address; if (port) { - ex.port = port; + this.port = port; } + } - return captureLargerStackTrace(ex); - }); + get ['constructor']() { + return Error; + } +} -/** - * @param {number|string} code - A libuv error number or a c-ares error code - * @param {string} syscall - * @param {string} [hostname] - * @returns {Error} - */ -const dnsException = hideStackFrames(function(code, syscall, hostname) { - let errno; - // If `code` is of type number, it is a libuv error number, else it is a - // c-ares error code. - // TODO(joyeecheung): translate c-ares error codes into numeric ones and - // make them available in a property that's not error.errno (since they - // can be in conflict with libuv error codes). Also make sure - // util.getSystemErrorName() can understand them when an being informed that - // the number is a c-ares error code. - if (typeof code === 'number') { - errno = code; - // ENOTFOUND is not a proper POSIX error, but this error has been in place - // long enough that it's not practical to remove it. - if (code === lazyUv().UV_EAI_NODATA || code === lazyUv().UV_EAI_NONAME) { - code = 'ENOTFOUND'; // Fabricated error name. - } else { - code = lazyInternalUtil().getSystemErrorName(code); +class DNSException extends Error { + /** + * @param {number|string} code - A libuv error number or a c-ares error code + * @param {string} syscall + * @param {string} [hostname] + */ + constructor(code, syscall, hostname) { + let errno; + // If `code` is of type number, it is a libuv error number, else it is a + // c-ares error code. + // TODO(joyeecheung): translate c-ares error codes into numeric ones and + // make them available in a property that's not error.errno (since they + // can be in conflict with libuv error codes). Also make sure + // util.getSystemErrorName() can understand them when an being informed that + // the number is a c-ares error code. + if (typeof code === 'number') { + errno = code; + // ENOTFOUND is not a proper POSIX error, but this error has been in place + // long enough that it's not practical to remove it. + if (code === lazyUv().UV_EAI_NODATA || code === lazyUv().UV_EAI_NONAME) { + code = 'ENOTFOUND'; // Fabricated error name. + } else { + code = lazyInternalUtil().getSystemErrorName(code); + } + } + super(`${syscall} ${code}${hostname ? ` ${hostname}` : ''}`); + this.errno = errno; + this.code = code; + this.syscall = syscall; + if (hostname) { + this.hostname = hostname; } } - const message = `${syscall} ${code}${hostname ? ` ${hostname}` : ''}`; - // Reducing the limit improves the performance significantly. We do not lose - // the stack frames due to the `captureStackTrace()` function that is called - // later. - const tmpLimit = Error.stackTraceLimit; - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = 0; - // eslint-disable-next-line no-restricted-syntax - const ex = new Error(message); - if (isErrorStackTraceLimitWritable()) Error.stackTraceLimit = tmpLimit; - ex.errno = errno; - ex.code = code; - ex.syscall = syscall; - if (hostname) { - ex.hostname = hostname; + + get ['constructor']() { + return Error; } +} - return captureLargerStackTrace(ex); -}); +class ConnResetException extends Error { + constructor(msg) { + super(msg); + this.code = 'ECONNRESET'; + } -function connResetException(msg) { - // eslint-disable-next-line no-restricted-syntax - const ex = new Error(msg); - ex.code = 'ECONNRESET'; - return ex; + get ['constructor']() { + return Error; + } } let maxStack_ErrorName; let maxStack_ErrorMessage; + /** * Returns true if `err.name` and `err.message` are equal to engine-specific * values indicating max call stack size has been exceeded. @@ -1011,16 +1035,15 @@ function formatList(array, type = 'and') { module.exports = { AbortError, aggregateTwoErrors, - aggregateErrors, - captureLargerStackTrace, + NodeAggregateError, codes, - connResetException, - dnsException, + ConnResetException, + DNSException, // This is exported only to facilitate testing. determineSpecificType, E, - errnoException, - exceptionWithHostPort, + ErrnoException, + ExceptionWithHostPort, fatalExceptionStackEnhancers, formatList, genericNodeError, @@ -1039,8 +1062,8 @@ module.exports = { setArrowMessage, SystemError, uvErrmapGet, - uvException, - uvExceptionWithHostPort, + UVException, + UVExceptionWithHostPort, }; // To declare an error message, use the E(sym, val, def) function above. The sym @@ -1147,7 +1170,7 @@ E('ERR_EVENT_RECURSION', 'The event "%s" is already being dispatched', Error); E('ERR_FALSY_VALUE_REJECTION', function(reason) { this.reason = reason; return 'Promise was rejected with falsy value'; -}, Error); +}, Error, HideStackFramesError); E('ERR_FEATURE_UNAVAILABLE_ON_PLATFORM', 'The feature %s is unavailable on the current platform' + ', which is being used to run Node.js', @@ -1163,7 +1186,7 @@ E('ERR_FS_CP_SOCKET', 'Cannot copy a socket file', SystemError); E('ERR_FS_CP_SYMLINK_TO_SUBDIRECTORY', 'Cannot overwrite symlink in subdirectory of self', SystemError); E('ERR_FS_CP_UNKNOWN', 'Cannot copy an unknown file type', SystemError); -E('ERR_FS_EISDIR', 'Path is a directory', SystemError); +E('ERR_FS_EISDIR', 'Path is a directory', SystemError, HideStackFramesError); E('ERR_FS_FILE_TOO_LARGE', 'File size (%s) is greater than 2 GiB', RangeError); E('ERR_FS_INVALID_SYMLINK_TYPE', 'Symlink type must be one of "dir", "file", or "junction". Received "%s"', @@ -1190,7 +1213,7 @@ E('ERR_HTTP2_INFO_STATUS_NOT_ALLOWED', E('ERR_HTTP2_INVALID_CONNECTION_HEADERS', 'HTTP/1 Connection specific headers are forbidden: "%s"', TypeError); E('ERR_HTTP2_INVALID_HEADER_VALUE', - 'Invalid value "%s" for header "%s"', TypeError); + 'Invalid value "%s" for header "%s"', TypeError, HideStackFramesError); E('ERR_HTTP2_INVALID_INFO_STATUS', 'Invalid informational status code: %s', RangeError); E('ERR_HTTP2_INVALID_ORIGIN', @@ -1198,7 +1221,7 @@ E('ERR_HTTP2_INVALID_ORIGIN', E('ERR_HTTP2_INVALID_PACKED_SETTINGS_LENGTH', 'Packed settings length must be a multiple of six', RangeError); E('ERR_HTTP2_INVALID_PSEUDOHEADER', - '"%s" is an invalid pseudoheader or is used incorrectly', TypeError); + '"%s" is an invalid pseudoheader or is used incorrectly', TypeError, HideStackFramesError); E('ERR_HTTP2_INVALID_SESSION', 'The session has been destroyed', Error); E('ERR_HTTP2_INVALID_SETTING_VALUE', // Using default arguments here is important so the arguments are not counted @@ -1210,7 +1233,7 @@ E('ERR_HTTP2_INVALID_SETTING_VALUE', this.max = max; } return `Invalid value for setting "${name}": ${actual}`; - }, TypeError, RangeError); + }, TypeError, RangeError, HideStackFramesError); E('ERR_HTTP2_INVALID_STREAM', 'The stream has been destroyed', Error); E('ERR_HTTP2_MAX_PENDING_SETTINGS_ACK', 'Maximum number of pending settings acknowledgements', Error); @@ -1230,7 +1253,7 @@ E('ERR_HTTP2_PAYLOAD_FORBIDDEN', E('ERR_HTTP2_PING_CANCEL', 'HTTP2 ping cancelled', Error); E('ERR_HTTP2_PING_LENGTH', 'HTTP2 ping payload must be 8 bytes', RangeError); E('ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED', - 'Cannot set HTTP/2 pseudo-headers', TypeError); + 'Cannot set HTTP/2 pseudo-headers', TypeError, HideStackFramesError); E('ERR_HTTP2_PUSH_DISABLED', 'HTTP/2 client has disabled push streams', Error); E('ERR_HTTP2_SEND_FILE', 'Directories cannot be sent', Error); E('ERR_HTTP2_SEND_FILE_NOSEEK', @@ -1270,7 +1293,7 @@ E('ERR_HTTP_CONTENT_LENGTH_MISMATCH', E('ERR_HTTP_HEADERS_SENT', 'Cannot %s headers after they are sent to the client', Error); E('ERR_HTTP_INVALID_HEADER_VALUE', - 'Invalid value "%s" for header "%s"', TypeError); + 'Invalid value "%s" for header "%s"', TypeError, HideStackFramesError); E('ERR_HTTP_INVALID_STATUS_CODE', 'Invalid status code: %s', RangeError); E('ERR_HTTP_REQUEST_TIMEOUT', 'Request timeout', Error); E('ERR_HTTP_SOCKET_ASSIGNED', @@ -1287,7 +1310,7 @@ E('ERR_IMPORT_ATTRIBUTE_TYPE_INCOMPATIBLE', E('ERR_IMPORT_ATTRIBUTE_UNSUPPORTED', 'Import attribute "%s" with value "%s" is not supported', TypeError); E('ERR_INCOMPATIBLE_OPTION_PAIR', - 'Option "%s" cannot be used in combination with option "%s"', TypeError); + 'Option "%s" cannot be used in combination with option "%s"', TypeError, HideStackFramesError); E('ERR_INPUT_TYPE_NOT_ALLOWED', '--input-type can only be used with string ' + 'input via --eval, --print, or STDIN', Error); E('ERR_INSPECTOR_ALREADY_ACTIVATED', @@ -1383,7 +1406,7 @@ E('ERR_INVALID_ARG_TYPE', msg += `. Received ${determineSpecificType(actual)}`; return msg; - }, TypeError); + }, TypeError, HideStackFramesError); E('ERR_INVALID_ARG_VALUE', (name, value, reason = 'is invalid') => { let inspected = lazyInternalUtilInspect().inspect(value); if (inspected.length > 128) { @@ -1391,7 +1414,7 @@ E('ERR_INVALID_ARG_VALUE', (name, value, reason = 'is invalid') => { } const type = StringPrototypeIncludes(name, '.') ? 'property' : 'argument'; return `The ${type} '${name}' ${reason}. Received ${inspected}`; -}, TypeError, RangeError); +}, TypeError, RangeError, HideStackFramesError); E('ERR_INVALID_ASYNC_ID', 'Invalid %s value: %s', RangeError); E('ERR_INVALID_BUFFER_SIZE', 'Buffer size must be a multiple of %s', RangeError); @@ -1404,7 +1427,7 @@ E('ERR_INVALID_CHAR', msg += ` ["${field}"]`; } return msg; - }, TypeError); + }, TypeError, HideStackFramesError); E('ERR_INVALID_CURSOR_POS', 'Cannot set cursor row without setting its column', TypeError); E('ERR_INVALID_FD', @@ -1414,7 +1437,7 @@ E('ERR_INVALID_FILE_URL_HOST', 'File URL host must be "localhost" or empty on %s', TypeError); E('ERR_INVALID_FILE_URL_PATH', 'File URL path %s', TypeError); E('ERR_INVALID_HANDLE_TYPE', 'This handle type cannot be sent', TypeError); -E('ERR_INVALID_HTTP_TOKEN', '%s must be a valid HTTP token ["%s"]', TypeError); +E('ERR_INVALID_HTTP_TOKEN', '%s must be a valid HTTP token ["%s"]', TypeError, HideStackFramesError); E('ERR_INVALID_IP_ADDRESS', 'Invalid IP address: %s', TypeError); E('ERR_INVALID_MIME_SYNTAX', (production, str, invalidIndex) => { const msg = invalidIndex !== -1 ? ` at ${invalidIndex}` : ''; @@ -1452,11 +1475,11 @@ E('ERR_INVALID_REPL_EVAL_CONFIG', E('ERR_INVALID_REPL_INPUT', '%s', TypeError); E('ERR_INVALID_RETURN_PROPERTY', (input, name, prop, value) => { return `Expected a valid ${input} to be returned for the "${prop}" from the` + - ` "${name}" function but got ${determineSpecificType(value)}.`; + ` "${name}" hook but got ${determineSpecificType(value)}.`; }, TypeError); E('ERR_INVALID_RETURN_PROPERTY_VALUE', (input, name, prop, value) => { return `Expected ${input} to be returned for the "${prop}" from the` + - ` "${name}" function but got ${determineSpecificType(value)}.`; + ` "${name}" hook but got ${determineSpecificType(value)}.`; }, TypeError); E('ERR_INVALID_RETURN_VALUE', (input, name, value) => { const type = determineSpecificType(value); @@ -1603,7 +1626,7 @@ E('ERR_OUT_OF_RANGE', } msg += ` It must be ${range}. Received ${received}`; return msg; - }, RangeError); + }, RangeError, HideStackFramesError); E('ERR_PACKAGE_IMPORT_NOT_DEFINED', (specifier, packagePath, base) => { return `Package import specifier "${specifier}" is not defined${packagePath ? ` in package ${packagePath}package.json` : ''} imported from ${base}`; @@ -1669,7 +1692,7 @@ E('ERR_SOCKET_BAD_PORT', (name, port, allowZero = true) => { "The 'allowZero' argument must be of type boolean."); const operator = allowZero ? '>=' : '>'; return `${name} should be ${operator} 0 and < 65536. Received ${determineSpecificType(port)}.`; -}, RangeError); +}, RangeError, HideStackFramesError); E('ERR_SOCKET_BAD_TYPE', 'Bad socket type specified. Valid types are: udp4, udp6', TypeError); E('ERR_SOCKET_BUFFER_SIZE', @@ -1700,7 +1723,7 @@ E('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', E('ERR_STREAM_WRAP', 'Stream has StringDecoder set or is in objectMode', Error); E('ERR_STREAM_WRITE_AFTER_END', 'write after end', Error); E('ERR_SYNTHETIC', 'JavaScript Callstack', Error); -E('ERR_SYSTEM_ERROR', 'A system error occurred', SystemError); +E('ERR_SYSTEM_ERROR', 'A system error occurred', SystemError, HideStackFramesError); E('ERR_TAP_LEXER_ERROR', function(errorMsg) { hideInternalStackFrames(this); return errorMsg; @@ -1794,7 +1817,7 @@ E('ERR_UNKNOWN_ENCODING', 'Unknown encoding: %s', TypeError); E('ERR_UNKNOWN_FILE_EXTENSION', 'Unknown file extension "%s" for %s', TypeError); E('ERR_UNKNOWN_MODULE_FORMAT', 'Unknown module format: %s for URL %s', RangeError); -E('ERR_UNKNOWN_SIGNAL', 'Unknown signal: %s', TypeError); +E('ERR_UNKNOWN_SIGNAL', 'Unknown signal: %s', TypeError, HideStackFramesError); E('ERR_UNSUPPORTED_DIR_IMPORT', function(path, base, exactUrl) { lazyInternalUtil().setOwnProperty(this, 'url', exactUrl); return `Directory import '${path}' is not supported ` + diff --git a/lib/internal/event_target.js b/lib/internal/event_target.js index 3f7ea8a8b1da60..e5510301b13363 100644 --- a/lib/internal/event_target.js +++ b/lib/internal/event_target.js @@ -2,6 +2,7 @@ const { ArrayFrom, + ArrayPrototypeReduce, Boolean, Error, FunctionPrototypeCall, @@ -314,11 +315,6 @@ class Event { throw new ERR_INVALID_THIS('Event'); this.#propagationStopped = true; } - - static NONE = 0; - static CAPTURING_PHASE = 1; - static AT_TARGET = 2; - static BUBBLING_PHASE = 3; } ObjectDefineProperties( @@ -354,6 +350,22 @@ ObjectDefineProperties( isTrusted: isTrustedDescriptor, }); +const staticProps = ['NONE', 'CAPTURING_PHASE', 'AT_TARGET', 'BUBBLING_PHASE']; + +ObjectDefineProperties( + Event, + ArrayPrototypeReduce(staticProps, (result, staticProp, index = 0) => { + result[staticProp] = { + __proto__: null, + writable: false, + configurable: false, + enumerable: true, + value: index, + }; + return result; + }, {}), +); + function isCustomEvent(value) { return isEvent(value) && (value?.[kDetail] !== undefined); } diff --git a/lib/internal/file.js b/lib/internal/file.js index 1fc08c45a90f33..e35eb7bf70931f 100644 --- a/lib/internal/file.js +++ b/lib/internal/file.js @@ -4,6 +4,7 @@ const { DateNow, NumberIsNaN, ObjectDefineProperties, + StringPrototypeToWellFormed, SymbolToStringTag, } = primordials; @@ -15,7 +16,6 @@ const { customInspectSymbol: kInspect, kEnumerableProperty, kEmptyObject, - toUSVString, } = require('internal/util'); const { @@ -55,7 +55,7 @@ class File extends Blob { lastModified = DateNow(); } - this.#name = toUSVString(fileName); + this.#name = StringPrototypeToWellFormed(`${fileName}`); this.#lastModified = lastModified; } diff --git a/lib/internal/fs/dir.js b/lib/internal/fs/dir.js index e63dc1edcee3de..12a4a94fd18d40 100644 --- a/lib/internal/fs/dir.js +++ b/lib/internal/fs/dir.js @@ -161,7 +161,7 @@ class Dir { } readSyncRecursive(dirent) { - const path = pathModule.join(dirent.path, dirent.name); + const path = pathModule.join(dirent.parentPath, dirent.name); const ctx = { path }; const handle = dirBinding.opendir( pathModule.toNamespacedPath(path), diff --git a/lib/internal/fs/glob.js b/lib/internal/fs/glob.js index 323ef2a25d434c..4c62369048ce74 100644 --- a/lib/internal/fs/glob.js +++ b/lib/internal/fs/glob.js @@ -148,7 +148,7 @@ class Glob { #root; #exclude; #cache = new Cache(); - #results = []; + #results = new SafeSet(); #queue = []; #subpatterns = new SafeMap(); constructor(patterns, options = kEmptyObject) { @@ -193,7 +193,7 @@ class Glob { .forEach((patterns, path) => ArrayPrototypePush(this.#queue, { __proto__: null, path, patterns })); this.#subpatterns.clear(); } - return this.#results; + return ArrayFrom(this.#results); } #addSubpattern(path, pattern) { if (!this.#subpatterns.has(path)) { @@ -240,7 +240,7 @@ class Glob { const p = pattern.at(-1); const stat = this.#cache.statSync(join(fullpath, p)); if (stat && (p || isDirectory)) { - ArrayPrototypePush(this.#results, join(path, p)); + this.#results.add(join(path, p)); } if (pattern.indexes.size === 1 && pattern.indexes.has(last)) { return; @@ -249,7 +249,7 @@ class Glob { (path !== '.' || pattern.at(0) === '.' || (last === 0 && stat))) { // If pattern ends with **, add to results // if path is ".", add it only if pattern starts with "." or pattern is exactly "**" - ArrayPrototypePush(this.#results, path); + this.#results.add(path); } if (!isDirectory) { @@ -296,7 +296,7 @@ class Glob { subPatterns.add(index); } else if (!fromSymlink && index === last) { // If ** is last, add to results - ArrayPrototypePush(this.#results, entryPath); + this.#results.add(entryPath); } // Any pattern after ** is also a potential pattern @@ -304,7 +304,7 @@ class Glob { const nextMatches = pattern.test(nextIndex, entry.name); if (nextMatches && nextIndex === last && !isLast) { // If next pattern is the last one, add to results - ArrayPrototypePush(this.#results, entryPath); + this.#results.add(entryPath); } else if (nextMatches && entry.isDirectory()) { // Pattern mached, meaning two patterns forward // are also potential patterns @@ -337,11 +337,11 @@ class Glob { } else { if (!this.#cache.seen(path, pattern, nextIndex)) { this.#cache.add(path, pattern.child(new SafeSet([nextIndex]))); - ArrayPrototypePush(this.#results, path); + this.#results.add(path); } if (!this.#cache.seen(path, pattern, nextIndex) || !this.#cache.seen(parent, pattern, nextIndex)) { this.#cache.add(parent, pattern.child(new SafeSet([nextIndex]))); - ArrayPrototypePush(this.#results, parent); + this.#results.add(parent); } } } @@ -354,7 +354,7 @@ class Glob { } else if (current === '.' && pattern.test(nextIndex, entry.name)) { // If current pattern is ".", proceed to test next pattern if (nextIndex === last) { - ArrayPrototypePush(this.#results, entryPath); + this.#results.add(entryPath); } else { subPatterns.add(nextIndex + 1); } @@ -364,7 +364,7 @@ class Glob { // If current pattern is a regex that matches entry name (e.g *.js) // add next pattern to potential patterns, or to results if it's the last pattern if (index === last) { - ArrayPrototypePush(this.#results, entryPath); + this.#results.add(entryPath); } else if (entry.isDirectory()) { subPatterns.add(nextIndex); } diff --git a/lib/internal/fs/promises.js b/lib/internal/fs/promises.js index e9a82ab64b16bf..43d4ad7c0e9f63 100644 --- a/lib/internal/fs/promises.js +++ b/lib/internal/fs/promises.js @@ -33,6 +33,7 @@ const { Buffer } = require('buffer'); const { codes: { + ERR_ACCESS_DENIED, ERR_FS_FILE_TOO_LARGE, ERR_INVALID_ARG_VALUE, ERR_INVALID_STATE, @@ -86,6 +87,8 @@ const { kValidateObjectAllowNullable, } = require('internal/validators'); const pathModule = require('path'); +const { isAbsolute } = pathModule; +const { toPathIfFileURL } = require('internal/url'); const { kEmptyObject, lazyDOMException, @@ -98,6 +101,8 @@ const nonNativeWatcher = require('internal/fs/recursive_watch'); const { isIterable } = require('internal/streams/utils'); const assert = require('internal/assert'); +const permission = require('internal/process/permission'); + const kHandle = Symbol('kHandle'); const kFd = Symbol('kFd'); const kRefs = Symbol('kRefs'); @@ -974,6 +979,15 @@ async function symlink(target, path, type_) { type = 'file'; } } + + if (permission.isEnabled()) { + // The permission model's security guarantees fall apart in the presence of + // relative symbolic links. Thus, we have to prevent their creation. + if (typeof target !== 'string' || !isAbsolute(toPathIfFileURL(target))) { + throw new ERR_ACCESS_DENIED('relative symbolic link target'); + } + } + target = getValidatedPath(target, 'target'); path = getValidatedPath(path); return await PromisePrototypeThen( diff --git a/lib/internal/fs/utils.js b/lib/internal/fs/utils.js index 611b6c242047b9..fa2851a244b5ee 100644 --- a/lib/internal/fs/utils.js +++ b/lib/internal/fs/utils.js @@ -38,7 +38,7 @@ const { ERR_OUT_OF_RANGE, }, hideStackFrames, - uvException, + UVException, } = require('internal/errors'); const { isArrayBufferView, @@ -165,6 +165,7 @@ function assertEncoding(encoding) { class Dirent { constructor(name, type, path) { this.name = name; + this.parentPath = path; this.path = path; this[kType] = type; } @@ -348,7 +349,7 @@ function getOptions(options, defaultOptions = kEmptyObject) { */ function handleErrorFromBinding(ctx) { if (ctx.errno !== undefined) { // libuv error numbers - const err = uvException(ctx); + const err = new UVException(ctx); ErrorCaptureStackTrace(err, handleErrorFromBinding); throw err; } @@ -361,30 +362,6 @@ function handleErrorFromBinding(ctx) { } } -// Check if the path contains null types if it is a string nor Uint8Array, -// otherwise return silently. -const nullCheck = hideStackFrames((path, propName, throwError = true) => { - const pathIsString = typeof path === 'string'; - const pathIsUint8Array = isUint8Array(path); - - // We can only perform meaningful checks on strings and Uint8Arrays. - if ((!pathIsString && !pathIsUint8Array) || - (pathIsString && !StringPrototypeIncludes(path, '\u0000')) || - (pathIsUint8Array && !TypedArrayPrototypeIncludes(path, 0))) { - return; - } - - const err = new ERR_INVALID_ARG_VALUE( - propName, - path, - 'must be a string, Uint8Array, or URL without null bytes', - ); - if (throwError) { - throw err; - } - return err; -}); - function preprocessSymlinkDestination(path, type, linkPath) { if (!isWindows) { // No preprocessing is needed on Unix. @@ -521,10 +498,6 @@ function Stats(dev, mode, nlink, uid, gid, rdev, blksize, ObjectSetPrototypeOf(Stats.prototype, StatsBase.prototype); ObjectSetPrototypeOf(Stats, StatsBase); -// HACK: Workaround for https://github.com/standard-things/esm/issues/821. -// TODO(ronag): Remove this as soon as `esm` publishes a fixed version. -Stats.prototype.isFile = StatsBase.prototype.isFile; - Stats.prototype._checkModeProperty = function(property) { if (isWindows && (property === S_IFIFO || property === S_IFBLK || property === S_IFSOCK)) { @@ -664,14 +637,14 @@ function toUnixTimestamp(time, name = 'time') { const validateOffsetLengthRead = hideStackFrames( (offset, length, bufferLength) => { if (offset < 0) { - throw new ERR_OUT_OF_RANGE('offset', '>= 0', offset); + throw new ERR_OUT_OF_RANGE.HideStackFramesError('offset', '>= 0', offset); } if (length < 0) { - throw new ERR_OUT_OF_RANGE('length', '>= 0', length); + throw new ERR_OUT_OF_RANGE.HideStackFramesError('length', '>= 0', length); } if (offset + length > bufferLength) { - throw new ERR_OUT_OF_RANGE('length', - `<= ${bufferLength - offset}`, length); + throw new ERR_OUT_OF_RANGE.HideStackFramesError('length', + `<= ${bufferLength - offset}`, length); } }, ); @@ -679,31 +652,41 @@ const validateOffsetLengthRead = hideStackFrames( const validateOffsetLengthWrite = hideStackFrames( (offset, length, byteLength) => { if (offset > byteLength) { - throw new ERR_OUT_OF_RANGE('offset', `<= ${byteLength}`, offset); + throw new ERR_OUT_OF_RANGE.HideStackFramesError('offset', `<= ${byteLength}`, offset); } if (length > byteLength - offset) { - throw new ERR_OUT_OF_RANGE('length', `<= ${byteLength - offset}`, length); + throw new ERR_OUT_OF_RANGE.HideStackFramesError('length', `<= ${byteLength - offset}`, length); } if (length < 0) { - throw new ERR_OUT_OF_RANGE('length', '>= 0', length); + throw new ERR_OUT_OF_RANGE.HideStackFramesError('length', '>= 0', length); } - validateInt32(length, 'length', 0); + validateInt32.withoutStackTrace(length, 'length', 0); }, ); const validatePath = hideStackFrames((path, propName = 'path') => { if (typeof path !== 'string' && !isUint8Array(path)) { - throw new ERR_INVALID_ARG_TYPE(propName, ['string', 'Buffer', 'URL'], path); + throw new ERR_INVALID_ARG_TYPE.HideStackFramesError(propName, ['string', 'Buffer', 'URL'], path); } - const err = nullCheck(path, propName, false); + const pathIsString = typeof path === 'string'; + const pathIsUint8Array = isUint8Array(path); - if (err !== undefined) { - throw err; + // We can only perform meaningful checks on strings and Uint8Arrays. + if ((!pathIsString && !pathIsUint8Array) || + (pathIsString && !StringPrototypeIncludes(path, '\u0000')) || + (pathIsUint8Array && !TypedArrayPrototypeIncludes(path, 0))) { + return; } + + throw new ERR_INVALID_ARG_VALUE.HideStackFramesError( + propName, + path, + 'must be a string, Uint8Array, or URL without null bytes', + ); }); // TODO(rafaelgss): implement the path.resolve on C++ side @@ -742,11 +725,11 @@ const getValidatedFd = hideStackFrames((fd, propName = 'fd') => { const validateBufferArray = hideStackFrames((buffers, propName = 'buffers') => { if (!ArrayIsArray(buffers)) - throw new ERR_INVALID_ARG_TYPE(propName, 'ArrayBufferView[]', buffers); + throw new ERR_INVALID_ARG_TYPE.HideStackFramesError(propName, 'ArrayBufferView[]', buffers); for (let i = 0; i < buffers.length; i++) { if (!isArrayBufferView(buffers[i])) - throw new ERR_INVALID_ARG_TYPE(propName, 'ArrayBufferView[]', buffers); + throw new ERR_INVALID_ARG_TYPE.HideStackFramesError(propName, 'ArrayBufferView[]', buffers); } return buffers; @@ -802,7 +785,7 @@ const validateCpOptions = hideStackFrames((options) => { validateBoolean(options.verbatimSymlinks, 'options.verbatimSymlinks'); options.mode = getValidMode(options.mode, 'copyFile'); if (options.dereference === true && options.verbatimSymlinks === true) { - throw new ERR_INCOMPATIBLE_OPTION_PAIR('dereference', 'verbatimSymlinks'); + throw new ERR_INCOMPATIBLE_OPTION_PAIR.HideStackFramesError('dereference', 'verbatimSymlinks'); } if (options.filter !== undefined) { validateFunction(options.filter, 'options.filter'); @@ -827,21 +810,23 @@ const validateRmOptions = hideStackFrames((path, options, expectDir, cb) => { } if (stats.isDirectory() && !options.recursive) { - return cb(new ERR_FS_EISDIR({ + const err = new ERR_FS_EISDIR.HideStackFramesError({ code: 'EISDIR', message: 'is a directory', path, syscall: 'rm', errno: EISDIR, - })); + }); + + return cb(err); } return cb(null, options); }); }); const validateRmOptionsSync = hideStackFrames((path, options, expectDir) => { - options = validateRmdirOptions(options, defaultRmOptions); - validateBoolean(options.force, 'options.force'); + options = validateRmdirOptions.withoutStackTrace(options, defaultRmOptions); + validateBoolean.withoutStackTrace(options.force, 'options.force'); if (!options.force || expectDir || !options.recursive) { const isDirectory = lazyLoadFs() @@ -852,7 +837,7 @@ const validateRmOptionsSync = hideStackFrames((path, options, expectDir) => { } if (isDirectory && !options.recursive) { - throw new ERR_FS_EISDIR({ + throw new ERR_FS_EISDIR.HideStackFramesError({ code: 'EISDIR', message: 'is a directory', path, @@ -882,13 +867,13 @@ const validateRmdirOptions = hideStackFrames( (options, defaults = defaultRmdirOptions) => { if (options === undefined) return defaults; - validateObject(options, 'options'); + validateObject.withoutStackTrace(options, 'options'); options = { ...defaults, ...options }; - validateBoolean(options.recursive, 'options.recursive'); - validateInt32(options.retryDelay, 'options.retryDelay', 0); - validateUint32(options.maxRetries, 'options.maxRetries'); + validateBoolean.withoutStackTrace(options.recursive, 'options.recursive'); + validateInt32.withoutStackTrace(options.retryDelay, 'options.retryDelay', 0); + validateUint32.withoutStackTrace(options.maxRetries, 'options.maxRetries'); return options; }); @@ -907,13 +892,13 @@ const getValidMode = hideStackFrames((mode, type) => { if (mode == null) { return def; } - validateInteger(mode, 'mode', min, max); + validateInteger.withoutStackTrace(mode, 'mode', min, max); return mode; }); const validateStringAfterArrayBufferView = hideStackFrames((buffer, name) => { if (typeof buffer !== 'string') { - throw new ERR_INVALID_ARG_TYPE( + throw new ERR_INVALID_ARG_TYPE.HideStackFramesError( name, ['string', 'Buffer', 'TypedArray', 'DataView'], buffer, @@ -923,16 +908,16 @@ const validateStringAfterArrayBufferView = hideStackFrames((buffer, name) => { const validatePosition = hideStackFrames((position, name, length) => { if (typeof position === 'number') { - validateInteger(position, name, -1); + validateInteger.withoutStackTrace(position, name, -1); } else if (typeof position === 'bigint') { const maxPosition = 2n ** 63n - 1n - BigInt(length); if (!(position >= -1n && position <= maxPosition)) { - throw new ERR_OUT_OF_RANGE(name, - `>= -1 && <= ${maxPosition}`, - position); + throw new ERR_OUT_OF_RANGE.HideStackFramesError(name, + `>= -1 && <= ${maxPosition}`, + position); } } else { - throw new ERR_INVALID_ARG_TYPE(name, ['integer', 'bigint'], position); + throw new ERR_INVALID_ARG_TYPE.HideStackFramesError(name, ['integer', 'bigint'], position); } }); @@ -956,7 +941,6 @@ module.exports = { getValidatedPath, getValidMode, handleErrorFromBinding, - nullCheck, possiblyTransformPath, preprocessSymlinkDestination, realpathCacheKey: Symbol('realpathCacheKey'), diff --git a/lib/internal/fs/watchers.js b/lib/internal/fs/watchers.js index ff877647212282..fb0daf326515a4 100644 --- a/lib/internal/fs/watchers.js +++ b/lib/internal/fs/watchers.js @@ -9,7 +9,7 @@ const { const { AbortError, - uvException, + UVException, codes: { ERR_INVALID_ARG_VALUE, }, @@ -119,7 +119,7 @@ StatWatcher.prototype[kFSStatWatcherStart] = function(filename, validateUint32(interval, 'interval'); const err = this._handle.start(toNamespacedPath(filename), interval); if (err) { - const error = uvException({ + const error = new UVException({ errno: err, syscall: 'watch', path: filename, @@ -204,7 +204,7 @@ function FSWatcher() { this._handle.close(); this._handle = null; // Make the handle garbage collectable. } - const error = uvException({ + const error = new UVException({ errno: status, syscall: 'watch', path: filename, @@ -244,7 +244,7 @@ FSWatcher.prototype[kFSWatchStart] = function(filename, recursive, encoding); if (err) { - const error = uvException({ + const error = new UVException({ errno: err, syscall: 'watch', path: filename, @@ -338,7 +338,7 @@ async function* watch(filename, options = kEmptyObject) { } handle.onchange = (status, eventType, filename) => { if (status < 0) { - const error = uvException({ + const error = new UVException({ errno: status, syscall: 'watch', path: filename, @@ -354,7 +354,7 @@ async function* watch(filename, options = kEmptyObject) { const err = handle.start(path, persistent, recursive, encoding); if (err) { - const error = uvException({ + const error = new UVException({ errno: err, syscall: 'watch', path: filename, diff --git a/lib/internal/http2/compat.js b/lib/internal/http2/compat.js index 2ab9c70ccd7402..7bf079900c652f 100644 --- a/lib/internal/http2/compat.js +++ b/lib/internal/http2/compat.js @@ -89,13 +89,13 @@ const assertValidHeader = hideStackFrames((name, value) => { if (name === '' || typeof name !== 'string' || StringPrototypeIncludes(name, ' ')) { - throw new ERR_INVALID_HTTP_TOKEN('Header name', name); + throw new ERR_INVALID_HTTP_TOKEN.HideStackFramesError('Header name', name); } if (isPseudoHeader(name)) { - throw new ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED(); + throw new ERR_HTTP2_PSEUDOHEADER_NOT_ALLOWED.HideStackFramesError(); } if (value === undefined || value === null) { - throw new ERR_HTTP2_INVALID_HEADER_VALUE(value, name); + throw new ERR_HTTP2_INVALID_HEADER_VALUE.HideStackFramesError(value, name); } if (!isConnectionHeaderAllowed(name, value)) { connectionHeaderMessageWarn(); diff --git a/lib/internal/http2/core.js b/lib/internal/http2/core.js index 909946816c7495..58d0783701286d 100644 --- a/lib/internal/http2/core.js +++ b/lib/internal/http2/core.js @@ -766,25 +766,25 @@ const setAndValidatePriorityOptions = hideStackFrames((options) => { if (options.weight === undefined) { options.weight = NGHTTP2_DEFAULT_WEIGHT; } else { - validateNumber(options.weight, 'options.weight'); + validateNumber.withoutStackTrace(options.weight, 'options.weight'); } if (options.parent === undefined) { options.parent = 0; } else { - validateNumber(options.parent, 'options.parent', 0); + validateNumber.withoutStackTrace(options.parent, 'options.parent', 0); } if (options.exclusive === undefined) { options.exclusive = false; } else { - validateBoolean(options.exclusive, 'options.exclusive'); + validateBoolean.withoutStackTrace(options.exclusive, 'options.exclusive'); } if (options.silent === undefined) { options.silent = false; } else { - validateBoolean(options.silent, 'options.silent'); + validateBoolean.withoutStackTrace(options.silent, 'options.silent'); } }); @@ -946,33 +946,33 @@ function pingCallback(cb) { // All settings are optional and may be left undefined const validateSettings = hideStackFrames((settings) => { if (settings === undefined) return; - assertWithinRange('headerTableSize', - settings.headerTableSize, - 0, kMaxInt); - assertWithinRange('initialWindowSize', - settings.initialWindowSize, - 0, kMaxInt); - assertWithinRange('maxFrameSize', - settings.maxFrameSize, - 16384, kMaxFrameSize); - assertWithinRange('maxConcurrentStreams', - settings.maxConcurrentStreams, - 0, kMaxStreams); - assertWithinRange('maxHeaderListSize', - settings.maxHeaderListSize, - 0, kMaxInt); - assertWithinRange('maxHeaderSize', - settings.maxHeaderSize, - 0, kMaxInt); + assertWithinRange.withoutStackTrace('headerTableSize', + settings.headerTableSize, + 0, kMaxInt); + assertWithinRange.withoutStackTrace('initialWindowSize', + settings.initialWindowSize, + 0, kMaxInt); + assertWithinRange.withoutStackTrace('maxFrameSize', + settings.maxFrameSize, + 16384, kMaxFrameSize); + assertWithinRange.withoutStackTrace('maxConcurrentStreams', + settings.maxConcurrentStreams, + 0, kMaxStreams); + assertWithinRange.withoutStackTrace('maxHeaderListSize', + settings.maxHeaderListSize, + 0, kMaxInt); + assertWithinRange.withoutStackTrace('maxHeaderSize', + settings.maxHeaderSize, + 0, kMaxInt); if (settings.enablePush !== undefined && typeof settings.enablePush !== 'boolean') { - throw new ERR_HTTP2_INVALID_SETTING_VALUE('enablePush', - settings.enablePush); + throw new ERR_HTTP2_INVALID_SETTING_VALUE.HideStackFramesError('enablePush', + settings.enablePush); } if (settings.enableConnectProtocol !== undefined && typeof settings.enableConnectProtocol !== 'boolean') { - throw new ERR_HTTP2_INVALID_SETTING_VALUE('enableConnectProtocol', - settings.enableConnectProtocol); + throw new ERR_HTTP2_INVALID_SETTING_VALUE.HideStackFramesError('enableConnectProtocol', + settings.enableConnectProtocol); } }); diff --git a/lib/internal/http2/util.js b/lib/internal/http2/util.js index 6d4a7f94b3d11a..a9d636c2f20581 100644 --- a/lib/internal/http2/util.js +++ b/lib/internal/http2/util.js @@ -8,7 +8,6 @@ const { Error, MathMax, Number, - ObjectDefineProperty, ObjectKeys, SafeSet, String, @@ -23,12 +22,11 @@ const { codes: { ERR_HTTP2_HEADER_SINGLE_VALUE, ERR_HTTP2_INVALID_CONNECTION_HEADERS, - ERR_HTTP2_INVALID_PSEUDOHEADER, + ERR_HTTP2_INVALID_PSEUDOHEADER: { HideStackFramesError: ERR_HTTP2_INVALID_PSEUDOHEADER }, ERR_HTTP2_INVALID_SETTING_VALUE, ERR_INVALID_ARG_TYPE, ERR_INVALID_HTTP_TOKEN, }, - captureLargerStackTrace, getMessage, hideStackFrames, kIsNodeError, @@ -552,14 +550,10 @@ class NghttpError extends Error { binding.nghttp2ErrorString(integerCode)); this.code = customErrorCode || 'ERR_HTTP2_ERROR'; this.errno = integerCode; - captureLargerStackTrace(this); - ObjectDefineProperty(this, kIsNodeError, { - __proto__: null, - value: true, - enumerable: false, - writable: false, - configurable: true, - }); + } + + get [kIsNodeError]() { + return true; } toString() { @@ -572,7 +566,7 @@ const assertIsObject = hideStackFrames((value, name, types) => { (value === null || typeof value !== 'object' || ArrayIsArray(value))) { - throw new ERR_INVALID_ARG_TYPE(name, types || 'Object', value); + throw new ERR_INVALID_ARG_TYPE.HideStackFramesError(name, types || 'Object', value); } }); @@ -580,7 +574,7 @@ const assertWithinRange = hideStackFrames( (name, value, min = 0, max = Infinity) => { if (value !== undefined && (typeof value !== 'number' || value < min || value > max)) { - throw new ERR_HTTP2_INVALID_SETTING_VALUE.RangeError( + throw new ERR_HTTP2_INVALID_SETTING_VALUE.RangeError.HideStackFramesError( name, value, min, max); } }, diff --git a/lib/internal/main/mksnapshot.js b/lib/internal/main/mksnapshot.js index 34701716839326..f00bf886153e6e 100644 --- a/lib/internal/main/mksnapshot.js +++ b/lib/internal/main/mksnapshot.js @@ -19,7 +19,7 @@ const { const { isExperimentalSeaWarningNeeded } = internalBinding('sea'); const { emitExperimentalWarning } = require('internal/util'); - +const { emitWarningSync } = require('internal/process/warning'); const { getOptionValue, } = require('internal/options'); @@ -29,6 +29,7 @@ const { namespace: { addSerializeCallback, addDeserializeCallback, + isBuildingSnapshot, }, } = require('internal/v8/startup_snapshot'); @@ -119,10 +120,18 @@ function requireForUserSnapshot(id) { err.code = 'MODULE_NOT_FOUND'; throw err; } - if (!supportedInUserSnapshot(normalizedId)) { + if (isBuildingSnapshot() && !supportedInUserSnapshot(normalizedId)) { if (!warnedModules.has(normalizedId)) { - process.emitWarning( - `built-in module ${id} is not yet supported in user snapshots`); + // Emit the warning synchronously in case we don't get to process + // the tick and print it before the unsupported built-in causes a + // crash. + emitWarningSync( + `It's not yet fully verified whether built-in module "${id}" ` + + 'works in user snapshot builder scripts.\n' + + 'It may still work in some cases, but in other cases certain ' + + 'run-time states may be out-of-sync after snapshot deserialization.\n' + + 'To request support for the module, use the Node.js issue tracker: ' + + 'https://github.com/nodejs/node/issues'); warnedModules.add(normalizedId); } } diff --git a/lib/internal/main/print_help.js b/lib/internal/main/print_help.js index edb861668cac3d..73227fbd9cb456 100644 --- a/lib/internal/main/print_help.js +++ b/lib/internal/main/print_help.js @@ -11,7 +11,7 @@ const { RegExpPrototypeSymbolReplace, StringPrototypeLocaleCompare, StringPrototypeSlice, - StringPrototypeTrimLeft, + StringPrototypeTrimStart, StringPrototypeRepeat, SafeMap, } = primordials; @@ -180,7 +180,7 @@ function format( else text += StringPrototypeRepeat(' ', firstColumn - displayName.length); - text += StringPrototypeTrimLeft( + text += StringPrototypeTrimStart( indent(fold(displayHelpText, secondColumn), firstColumn)) + '\n'; } diff --git a/lib/internal/main/worker_thread.js b/lib/internal/main/worker_thread.js index 0dda4c760e4acb..c14091ffe09ca7 100644 --- a/lib/internal/main/worker_thread.js +++ b/lib/internal/main/worker_thread.js @@ -136,6 +136,7 @@ port.on('message', (message) => { const isLoaderWorker = doEval === 'internal' && filename === require('internal/modules/esm/utils').loaderWorkerId; + // Disable custom loaders in loader worker. setupUserModules(isLoaderWorker); if (!hasStdin) diff --git a/lib/internal/modules/cjs/loader.js b/lib/internal/modules/cjs/loader.js index b077ee386bb40e..9c59b2b5a77218 100644 --- a/lib/internal/modules/cjs/loader.js +++ b/lib/internal/modules/cjs/loader.js @@ -427,7 +427,7 @@ ObjectDefineProperty(Module, '_readPackage', { * @param {string} originalPath The specifier passed to `require` */ function tryPackage(requestPath, exts, isMain, originalPath) { - const pkg = _readPackage(requestPath).main; + const { main: pkg, pjsonPath } = _readPackage(requestPath); if (!pkg) { return tryExtensions(path.resolve(requestPath, 'index'), exts, isMain); @@ -446,14 +446,13 @@ function tryPackage(requestPath, exts, isMain, originalPath) { 'Please verify that the package.json has a valid "main" entry', ); err.code = 'MODULE_NOT_FOUND'; - err.path = path.resolve(requestPath, 'package.json'); + err.path = pjsonPath; err.requestPath = originalPath; // TODO(BridgeAR): Add the requireStack as well. throw err; } else { - const jsonPath = path.resolve(requestPath, 'package.json'); process.emitWarning( - `Invalid 'main' field in '${jsonPath}' of '${pkg}'. ` + + `Invalid 'main' field in '${pjsonPath}' of '${pkg}'. ` + 'Please either fix that or report it to the module author', 'DeprecationWarning', 'DEP0128', @@ -539,16 +538,16 @@ function trySelfParentPath(parent) { function trySelf(parentPath, request) { if (!parentPath) { return false; } - const { data: pkg, path: pkgPath } = packageJsonReader.readPackageScope(parentPath); - if (!pkg || pkg.exports == null || pkg.name === undefined) { + const pkg = packageJsonReader.getNearestParentPackageJSON(parentPath); + if (pkg?.data.exports === undefined || pkg.data.name === undefined) { return false; } let expansion; - if (request === pkg.name) { + if (request === pkg.data.name) { expansion = '.'; - } else if (StringPrototypeStartsWith(request, `${pkg.name}/`)) { - expansion = '.' + StringPrototypeSlice(request, pkg.name.length); + } else if (StringPrototypeStartsWith(request, `${pkg.data.name}/`)) { + expansion = '.' + StringPrototypeSlice(request, pkg.data.name.length); } else { return false; } @@ -556,11 +555,11 @@ function trySelf(parentPath, request) { try { const { packageExportsResolve } = require('internal/modules/esm/resolve'); return finalizeEsmResolution(packageExportsResolve( - pathToFileURL(pkgPath + '/package.json'), expansion, pkg, - pathToFileURL(parentPath), getCjsConditions()), parentPath, pkgPath); + pathToFileURL(pkg.path + '/package.json'), expansion, pkg.data, + pathToFileURL(parentPath), getCjsConditions()), parentPath, pkg.path); } catch (e) { if (e.code === 'ERR_MODULE_NOT_FOUND') { - throw createEsmNotFoundErr(request, pkgPath + '/package.json'); + throw createEsmNotFoundErr(request, pkg.path + '/package.json'); } throw e; } @@ -1099,7 +1098,7 @@ Module._resolveFilename = function(request, parent, isMain, options) { if (request[0] === '#' && (parent?.filename || parent?.id === '')) { const parentPath = parent?.filename ?? process.cwd() + path.sep; - const pkg = packageJsonReader.readPackageScope(parentPath) || { __proto__: null }; + const pkg = packageJsonReader.getNearestParentPackageJSON(parentPath) || { __proto__: null }; if (pkg.data?.imports != null) { try { const { packageImportsResolve } = require('internal/modules/esm/resolve'); @@ -1397,9 +1396,9 @@ Module._extensions['.js'] = function(module, filename) { content = fs.readFileSync(filename, 'utf8'); } if (StringPrototypeEndsWith(filename, '.js')) { - const pkg = packageJsonReader.readPackageScope(filename) || { __proto__: null }; + const pkg = packageJsonReader.getNearestParentPackageJSON(filename); // Function require shouldn't be used in ES modules. - if (pkg.data?.type === 'module') { + if (pkg?.data.type === 'module') { // This is an error path because `require` of a `.js` file in a `"type": "module"` scope is not allowed. const parent = moduleParentCache.get(module); const parentPath = parent?.filename; diff --git a/lib/internal/modules/esm/get_format.js b/lib/internal/modules/esm/get_format.js index 1931688e85d05e..5959d476e13bd9 100644 --- a/lib/internal/modules/esm/get_format.js +++ b/lib/internal/modules/esm/get_format.js @@ -19,7 +19,7 @@ const { const experimentalNetworkImports = getOptionValue('--experimental-network-imports'); const { containsModuleSyntax } = internalBinding('contextify'); -const { getPackageType } = require('internal/modules/esm/resolve'); +const { getPackageType } = require('internal/modules/package_json_reader'); const { fileURLToPath } = require('internal/url'); const { ERR_UNKNOWN_FILE_EXTENSION } = require('internal/errors').codes; diff --git a/lib/internal/modules/esm/hooks.js b/lib/internal/modules/esm/hooks.js index cb2bc456dbb8f1..314c49a95a4ea1 100644 --- a/lib/internal/modules/esm/hooks.js +++ b/lib/internal/modules/esm/hooks.js @@ -100,6 +100,7 @@ function defineImportAssertionAlias(context) { * @typedef {object} KeyedHook * @property {Function} fn The hook function. * @property {URL['href']} url The URL of the module. + * @property {KeyedHook?} next The next hook in the chain. */ // [2] `validate...()`s throw the wrong error @@ -688,7 +689,7 @@ function pluckHooks({ * A utility function to iterate through a hook chain, track advancement in the * chain, and generate and supply the `next` argument to the custom * hook. - * @param {Hook} current The (currently) first hook in the chain (this shifts + * @param {KeyedHook} current The (currently) first hook in the chain (this shifts * on every call). * @param {object} meta Properties that change as the current hook advances * along the chain. diff --git a/lib/internal/modules/esm/load.js b/lib/internal/modules/esm/load.js index 6f9b73abd8a761..5239bc8ed883a5 100644 --- a/lib/internal/modules/esm/load.js +++ b/lib/internal/modules/esm/load.js @@ -18,6 +18,8 @@ const policy = getOptionValue('--experimental-policy') ? null; const experimentalNetworkImports = getOptionValue('--experimental-network-imports'); +const defaultType = + getOptionValue('--experimental-default-type'); const { Buffer: { from: BufferFrom } } = require('buffer'); @@ -130,20 +132,21 @@ async function defaultLoad(url, context = kEmptyObject) { if (urlInstance.protocol === 'node:') { source = null; format ??= 'builtin'; - } else { - let contextToPass = context; + } else if (format !== 'commonjs' || defaultType === 'module') { if (source == null) { ({ responseURL, source } = await getSource(urlInstance, context)); - contextToPass = { __proto__: context, source }; + context = { __proto__: context, source }; } - // Now that we have the source for the module, run `defaultGetFormat` again in case we detect ESM syntax. - format ??= await defaultGetFormat(urlInstance, contextToPass); + if (format == null) { + // Now that we have the source for the module, run `defaultGetFormat` to detect its format. + format = await defaultGetFormat(urlInstance, context); - if (format === 'commonjs' && contextToPass !== context) { - // For backward compatibility reasons, we need to discard the source in - // order for the CJS loader to re-fetch it. - source = null; + if (format === 'commonjs') { + // For backward compatibility reasons, we need to discard the source in + // order for the CJS loader to re-fetch it. + source = null; + } } } @@ -259,5 +262,6 @@ function throwUnknownModuleFormat(url, format) { module.exports = { defaultLoad, defaultLoadSync, + getSourceSync, throwUnknownModuleFormat, }; diff --git a/lib/internal/modules/esm/loader.js b/lib/internal/modules/esm/loader.js index 6044765c3709f5..0694c7ef2b902d 100644 --- a/lib/internal/modules/esm/loader.js +++ b/lib/internal/modules/esm/loader.js @@ -524,15 +524,14 @@ let emittedLoaderFlagWarning = false; * A loader instance is used as the main entry point for loading ES modules. Currently, this is a singleton; there is * only one used for loading the main module and everything in its dependency graph, though separate instances of this * class might be instantiated as part of bootstrap for other purposes. - * @param {boolean} useCustomLoadersIfPresent If the user has provided loaders via the --loader flag, use them. * @returns {ModuleLoader} */ -function createModuleLoader(useCustomLoadersIfPresent = true) { +function createModuleLoader() { let customizations = null; - if (useCustomLoadersIfPresent && - // Don't spawn a new worker if we're already in a worker thread created by instantiating CustomizedModuleLoader; - // doing so would cause an infinite loop. - !require('internal/modules/esm/utils').isLoaderWorker()) { + // Don't spawn a new worker if custom loaders are disabled. For instance, if + // we're already in a worker thread created by instantiating + // CustomizedModuleLoader; doing so would cause an infinite loop. + if (!require('internal/modules/esm/utils').forceDefaultLoader()) { const userLoaderPaths = getOptionValue('--experimental-loader'); if (userLoaderPaths.length > 0) { if (!emittedLoaderFlagWarning) { diff --git a/lib/internal/modules/esm/module_job.js b/lib/internal/modules/esm/module_job.js index 83c23456e05f10..33576c5893600b 100644 --- a/lib/internal/modules/esm/module_job.js +++ b/lib/internal/modules/esm/module_job.js @@ -228,7 +228,7 @@ class ModuleJob { const packageConfig = StringPrototypeStartsWith(this.module.url, 'file://') && RegExpPrototypeExec(/\.js(\?[^#]*)?(#.*)?$/, this.module.url) !== null && - require('internal/modules/esm/resolve') + require('internal/modules/package_json_reader') .getPackageScopeConfig(this.module.url); if (packageConfig.type === 'module') { e.message += diff --git a/lib/internal/modules/esm/package_config.js b/lib/internal/modules/esm/package_config.js deleted file mode 100644 index 5da47764c9de2c..00000000000000 --- a/lib/internal/modules/esm/package_config.js +++ /dev/null @@ -1,69 +0,0 @@ -'use strict'; - -const { - StringPrototypeEndsWith, -} = primordials; -const { URL, fileURLToPath } = require('internal/url'); -const packageJsonReader = require('internal/modules/package_json_reader'); - -/** - * @typedef {object} PackageConfig - * @property {string} pjsonPath - The path to the package.json file. - * @property {boolean} exists - Whether the package.json file exists. - * @property {'none' | 'commonjs' | 'module'} type - The type of the package. - * @property {string} [name] - The name of the package. - * @property {string} [main] - The main entry point of the package. - * @property {PackageTarget} [exports] - The exports configuration of the package. - * @property {Record>} [imports] - The imports configuration of the package. - */ -/** - * @typedef {string | string[] | Record>} PackageTarget - */ - -/** - * Returns the package configuration for the given resolved URL. - * @param {URL | string} resolved - The resolved URL. - * @returns {PackageConfig} - The package configuration. - */ -function getPackageScopeConfig(resolved) { - let packageJSONUrl = new URL('./package.json', resolved); - while (true) { - const packageJSONPath = packageJSONUrl.pathname; - if (StringPrototypeEndsWith(packageJSONPath, 'node_modules/package.json')) { - break; - } - const packageConfig = packageJsonReader.read(fileURLToPath(packageJSONUrl), { - __proto__: null, - specifier: resolved, - isESM: true, - }); - if (packageConfig.exists) { - return packageConfig; - } - - const lastPackageJSONUrl = packageJSONUrl; - packageJSONUrl = new URL('../package.json', packageJSONUrl); - - // Terminates at root where ../package.json equals ../../package.json - // (can't just check "/package.json" for Windows support). - if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { - break; - } - } - const packageJSONPath = fileURLToPath(packageJSONUrl); - return { - __proto__: null, - pjsonPath: packageJSONPath, - exists: false, - main: undefined, - name: undefined, - type: 'none', - exports: undefined, - imports: undefined, - }; -} - - -module.exports = { - getPackageScopeConfig, -}; diff --git a/lib/internal/modules/esm/resolve.js b/lib/internal/modules/esm/resolve.js index 06a34c11254a2f..c40f81200de5fc 100644 --- a/lib/internal/modules/esm/resolve.js +++ b/lib/internal/modules/esm/resolve.js @@ -55,7 +55,6 @@ const { } = require('internal/errors').codes; const { Module: CJSModule } = require('internal/modules/cjs/loader'); -const { getPackageScopeConfig } = require('internal/modules/esm/package_config'); const { getConditionsSet } = require('internal/modules/esm/utils'); const packageJsonReader = require('internal/modules/package_json_reader'); const { internalModuleStat } = internalBinding('fs'); @@ -198,7 +197,7 @@ const legacyMainResolveExtensionsIndexes = { * 4. TRY(pkg_url/index.js, pkg_url/index.json, pkg_url/index.node) * 5. NOT_FOUND * @param {URL} packageJSONUrl - * @param {PackageConfig} packageConfig + * @param {import('typings/internalBinding/modules').PackageConfig} packageConfig * @param {string | URL | undefined} base * @returns {URL} */ @@ -502,7 +501,7 @@ function resolvePackageTarget(packageJSONUrl, target, subpath, packageSubpath, } return resolveResult; } - if (lastException === undefined || lastException === null) { + if (lastException == null) { return lastException; } throw lastException; @@ -575,7 +574,7 @@ function isConditionalExportsMainSugar(exports, packageJSONUrl, base) { */ function packageExportsResolve( packageJSONUrl, packageSubpath, packageConfig, base, conditions) { - let exports = packageConfig.exports; + let { exports } = packageConfig; if (isConditionalExportsMainSugar(exports, packageJSONUrl, base)) { exports = { '.': exports }; } @@ -687,7 +686,7 @@ function packageImportsResolve(name, base, conditions) { throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath(base)); } let packageJSONUrl; - const packageConfig = getPackageScopeConfig(base); + const packageConfig = packageJsonReader.getPackageScopeConfig(base); if (packageConfig.exists) { packageJSONUrl = pathToFileURL(packageConfig.pjsonPath); const imports = packageConfig.imports; @@ -740,15 +739,6 @@ function packageImportsResolve(name, base, conditions) { throw importNotDefined(name, packageJSONUrl, base); } -/** - * Returns the package type for a given URL. - * @param {URL} url - The URL to get the package type for. - */ -function getPackageType(url) { - const packageConfig = getPackageScopeConfig(url); - return packageConfig.type; -} - /** * Parse a package name from a specifier. * @param {string} specifier - The import specifier. @@ -796,6 +786,7 @@ function parsePackageName(specifier, base) { * @returns {URL} - The resolved URL. */ function packageResolve(specifier, base, conditions) { + // TODO(@anonrig): Move this to a C++ function. if (BuiltinModule.canBeRequiredWithoutScheme(specifier)) { return new URL('node:' + specifier); } @@ -804,7 +795,7 @@ function packageResolve(specifier, base, conditions) { parsePackageName(specifier, base); // ResolveSelf - const packageConfig = getPackageScopeConfig(base); + const packageConfig = packageJsonReader.getPackageScopeConfig(base); if (packageConfig.exists) { const packageJSONUrl = pathToFileURL(packageConfig.pjsonPath); if (packageConfig.exports != null && packageConfig.name === packageName) { @@ -1179,8 +1170,6 @@ module.exports = { decorateErrorWithCommonJSHints, defaultResolve, encodedSepRegEx, - getPackageScopeConfig, - getPackageType, packageExportsResolve, packageImportsResolve, throwIfInvalidParentURL, diff --git a/lib/internal/modules/esm/translators.js b/lib/internal/modules/esm/translators.js index 7a62615cfe4210..949dbab7f6ad6b 100644 --- a/lib/internal/modules/esm/translators.js +++ b/lib/internal/modules/esm/translators.js @@ -31,6 +31,7 @@ function lazyTypes() { } const { containsModuleSyntax } = internalBinding('contextify'); +const { BuiltinModule } = require('internal/bootstrap/realm'); const assert = require('internal/assert'); const { readFileSync } = require('fs'); const { dirname, extname, isAbsolute } = require('path'); @@ -58,6 +59,17 @@ const asyncESM = require('internal/process/esm_loader'); const { emitWarningSync } = require('internal/process/warning'); const { internalCompileFunction } = require('internal/vm'); +// Lazy-loading to avoid circular dependencies. +let getSourceSync; +/** + * @param {Parameters[0]} url + * @returns {ReturnType} + */ +function getSource(url) { + getSourceSync ??= require('internal/modules/esm/load').getSourceSync; + return getSourceSync(url); +} + /** @type {import('deps/cjs-module-lexer/lexer.js').parse} */ let cjsParse; /** @@ -116,7 +128,7 @@ function assertBufferSource(body, allowString, hookName) { */ function stringify(body) { if (typeof body === 'string') { return body; } - assertBufferSource(body, false, 'transformSource'); + assertBufferSource(body, false, 'load'); const { TextDecoder } = require('internal/encoding'); DECODER = DECODER === null ? new TextDecoder() : DECODER; return DECODER.decode(body); @@ -225,21 +237,19 @@ function loadCJSModule(module, source, url, filename) { // eslint-disable-next-line func-name-matching,func-style const requireFn = function require(specifier) { let importAttributes = kEmptyObject; - if (!StringPrototypeStartsWith(specifier, 'node:')) { + if (!StringPrototypeStartsWith(specifier, 'node:') && !BuiltinModule.normalizeRequirableId(specifier)) { // TODO: do not depend on the monkey-patchable CJS loader here. const path = CJSModule._resolveFilename(specifier, module); - if (specifier !== path) { - switch (extname(path)) { - case '.json': - importAttributes = { __proto__: null, type: 'json' }; - break; - case '.node': - return CJSModule._load(specifier, module); - default: + switch (extname(path)) { + case '.json': + importAttributes = { __proto__: null, type: 'json' }; + break; + case '.node': + return CJSModule._load(specifier, module); + default: // fall through - } - specifier = `${pathToFileURL(path)}`; } + specifier = `${pathToFileURL(path)}`; } const job = asyncESM.esmLoader.getModuleJobSync(specifier, url, importAttributes); job.runSync(); @@ -276,7 +286,8 @@ function createCJSModuleWrap(url, source, isMain, loadCJS = loadCJSModule) { debug(`Translating CJSModule ${url}`); const filename = StringPrototypeStartsWith(url, 'file://') ? fileURLToPath(url) : url; - source = stringify(source); + // In case the source was not provided by the `load` step, we need fetch it now. + source = stringify(source ?? getSource(new URL(url)).source); const { exportNames, module } = cjsPreparseModuleExports(filename, source); cjsCache.set(url, module); diff --git a/lib/internal/modules/esm/utils.js b/lib/internal/modules/esm/utils.js index 3fe1daabe98f1d..df15169f68faa1 100644 --- a/lib/internal/modules/esm/utils.js +++ b/lib/internal/modules/esm/utils.js @@ -4,6 +4,7 @@ const { ArrayIsArray, SafeSet, SafeWeakMap, + Symbol, ObjectFreeze, } = primordials; @@ -157,6 +158,26 @@ function registerModule(referrer, registry) { moduleRegistries.set(idSymbol, registry); } +/** + * Registers the ModuleRegistry for dynamic import() calls with a realm + * as the referrer. Similar to {@link registerModule}, but this function + * generates a new id symbol instead of using the one from the referrer + * object. + * @param {globalThis} globalThis The globalThis object of the realm. + * @param {ModuleRegistry} registry + */ +function registerRealm(globalThis, registry) { + let idSymbol = globalThis[host_defined_option_symbol]; + // If the per-realm host-defined options is already registered, do nothing. + if (idSymbol) { + return; + } + // Otherwise, register the per-realm host-defined options. + idSymbol = Symbol('Realm globalThis'); + globalThis[host_defined_option_symbol] = idSymbol; + moduleRegistries.set(idSymbol, registry); +} + /** * Defines the `import.meta` object for a given module. * @param {symbol} symbol - Reference to the module. @@ -192,28 +213,29 @@ async function importModuleDynamicallyCallback(referrerSymbol, specifier, attrib throw new ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING(); } -let _isLoaderWorker = false; +let _forceDefaultLoader = false; /** * Initializes handling of ES modules. * This is configured during pre-execution. Specifically it's set to true for * the loader worker in internal/main/worker_thread.js. - * @param {boolean} [isLoaderWorker=false] - A boolean indicating whether the loader is a worker or not. + * @param {boolean} [forceDefaultLoader=false] - A boolean indicating disabling custom loaders. */ -function initializeESM(isLoaderWorker = false) { - _isLoaderWorker = isLoaderWorker; +function initializeESM(forceDefaultLoader = false) { + _forceDefaultLoader = forceDefaultLoader; initializeDefaultConditions(); - // Setup per-isolate callbacks that locate data or callbacks that we keep + // Setup per-realm callbacks that locate data or callbacks that we keep // track of for different ESM modules. setInitializeImportMetaObjectCallback(initializeImportMetaObject); setImportModuleDynamicallyCallback(importModuleDynamicallyCallback); } /** - * Determine whether the current process is a loader worker. - * @returns {boolean} Whether the current process is a loader worker. + * Determine whether custom loaders are disabled and it is forced to use the + * default loader. + * @returns {boolean} */ -function isLoaderWorker() { - return _isLoaderWorker; +function forceDefaultLoader() { + return _forceDefaultLoader; } /** @@ -251,10 +273,11 @@ async function initializeHooks() { module.exports = { registerModule, + registerRealm, initializeESM, initializeHooks, getDefaultConditions, getConditionsSet, loaderWorkerId: 'internal/modules/esm/worker', - isLoaderWorker, + forceDefaultLoader, }; diff --git a/lib/internal/modules/package_json_reader.js b/lib/internal/modules/package_json_reader.js index 65f5ce3551bbd0..0842d543862c33 100644 --- a/lib/internal/modules/package_json_reader.js +++ b/lib/internal/modules/package_json_reader.js @@ -1,162 +1,191 @@ 'use strict'; const { + ArrayIsArray, JSONParse, - ObjectPrototypeHasOwnProperty, - SafeMap, - StringPrototypeEndsWith, - StringPrototypeIndexOf, - StringPrototypeLastIndexOf, StringPrototypeSlice, + StringPrototypeLastIndexOf, + ObjectDefineProperty, } = primordials; -const { - ERR_INVALID_PACKAGE_CONFIG, -} = require('internal/errors').codes; -const { internalModuleReadJSON } = internalBinding('fs'); -const { resolve, sep, toNamespacedPath } = require('path'); -const permission = require('internal/process/permission'); -const { kEmptyObject, setOwnProperty } = require('internal/util'); - -const { fileURLToPath, pathToFileURL } = require('internal/url'); - -const cache = new SafeMap(); +const modulesBinding = internalBinding('modules'); +const { resolve, sep } = require('path'); +const { kEmptyObject } = require('internal/util'); +const { pathToFileURL } = require('internal/url'); let manifest; /** - * @typedef {{ - * exists: boolean, - * pjsonPath: string, - * exports?: string | string[] | Record, - * imports?: string | string[] | Record, - * name?: string, - * main?: string, - * type: 'commonjs' | 'module' | 'none', - * }} PackageConfig + * @param {string} jsonPath + * @param {string} value The integrity value to check against. + */ +function checkPackageJSONIntegrity(jsonPath, value) { + if (manifest === undefined) { + const { getOptionValue } = require('internal/options'); + manifest = getOptionValue('--experimental-policy') ? + require('internal/process/policy').manifest : + null; + } + if (manifest !== null) { + const jsonURL = pathToFileURL(jsonPath); + manifest.assertIntegrity(jsonURL, value); + } +} + +/** + * @param {string} path + * @param {import('typings/internalBinding/modules').SerializedPackageConfig} contents + * @param {boolean} [checkIntegrity=false] Whether to check the integrity of the package.json file. + * @returns {import('typings/internalBinding/modules').PackageConfig} */ +function deserializePackageJSON(path, contents, checkIntegrity = false) { + if (contents === undefined) { + return { + __proto__: null, + exists: false, + pjsonPath: path, + type: 'none', // Ignore unknown types for forwards compatibility + }; + } + + let pjsonPath = path; + const { + 0: name, + 1: main, + 2: type, + 3: plainImports, + 4: plainExports, + 5: manifest, + 6: optionalFilePath, + } = contents; + + // This is required to be used in getPackageScopeConfig. + if (optionalFilePath) { + pjsonPath = optionalFilePath; + } + + if (checkIntegrity) { + // parsed[5] is only available when experimental policy is enabled. + checkPackageJSONIntegrity(pjsonPath, manifest); + } + + // The imports and exports fields can be either undefined or a string. + // - If it's a string, it's either plain string or a stringified JSON string. + // - If it's a stringified JSON string, it starts with either '[' or '{'. + const requiresJSONParse = (value) => (value !== undefined && (value[0] === '[' || value[0] === '{')); + + return { + __proto__: null, + exists: true, + pjsonPath, + name, + main, + type, + // This getters are used to lazily parse the imports and exports fields. + get imports() { + const value = requiresJSONParse(plainImports) ? JSONParse(plainImports) : plainImports; + ObjectDefineProperty(this, 'imports', { __proto__: null, value }); + return this.imports; + }, + get exports() { + const value = requiresJSONParse(plainExports) ? JSONParse(plainExports) : plainExports; + ObjectDefineProperty(this, 'exports', { __proto__: null, value }); + return this.exports; + }, + }; +} /** + * Reads a package.json file and returns the parsed contents. * @param {string} jsonPath * @param {{ - * base?: string, - * specifier: string, - * isESM: boolean, + * base?: URL | string, + * specifier?: URL | string, + * isESM?: boolean, * }} options - * @returns {PackageConfig} + * @returns {import('typings/internalBinding/modules').PackageConfig} */ function read(jsonPath, { base, specifier, isESM } = kEmptyObject) { - if (cache.has(jsonPath)) { - return cache.get(jsonPath); - } - - const string = internalModuleReadJSON( - toNamespacedPath(jsonPath), + // This function will be called by both CJS and ESM, so we need to make sure + // non-null attributes are converted to strings. + const parsed = modulesBinding.readPackageJSON( + jsonPath, + isESM, + base == null ? undefined : `${base}`, + specifier == null ? undefined : `${specifier}`, ); - const result = { - __proto__: null, - exists: false, - pjsonPath: jsonPath, - main: undefined, - name: undefined, - type: 'none', // Ignore unknown types for forwards compatibility - exports: undefined, - imports: undefined, - }; - if (string !== undefined) { - let parsed; - try { - parsed = JSONParse(string); - } catch (cause) { - const error = new ERR_INVALID_PACKAGE_CONFIG( - jsonPath, - isESM && (base ? `"${specifier}" from ` : '') + fileURLToPath(base || specifier), - cause.message, - ); - setOwnProperty(error, 'cause', cause); - throw error; - } - - result.exists = true; - - // ObjectPrototypeHasOwnProperty is used to avoid prototype pollution. - if (ObjectPrototypeHasOwnProperty(parsed, 'name') && typeof parsed.name === 'string') { - result.name = parsed.name; - } - - if (ObjectPrototypeHasOwnProperty(parsed, 'main') && typeof parsed.main === 'string') { - result.main = parsed.main; - } - - if (ObjectPrototypeHasOwnProperty(parsed, 'exports')) { - result.exports = parsed.exports; - } - - if (ObjectPrototypeHasOwnProperty(parsed, 'imports')) { - result.imports = parsed.imports; - } - - // Ignore unknown types for forwards compatibility - if (ObjectPrototypeHasOwnProperty(parsed, 'type') && (parsed.type === 'commonjs' || parsed.type === 'module')) { - result.type = parsed.type; - } - - if (manifest === undefined) { - const { getOptionValue } = require('internal/options'); - manifest = getOptionValue('--experimental-policy') ? - require('internal/process/policy').manifest : - null; - } - if (manifest !== null) { - const jsonURL = pathToFileURL(jsonPath); - manifest.assertIntegrity(jsonURL, string); - } - } - cache.set(jsonPath, result); - return result; + return deserializePackageJSON(jsonPath, parsed, true /* checkIntegrity */); } /** + * @deprecated Expected to be removed in favor of `read` in the future. + * Behaves the same was as `read`, but appends package.json to the path. * @param {string} requestPath * @return {PackageConfig} */ function readPackage(requestPath) { + // TODO(@anonrig): Remove this function. return read(resolve(requestPath, 'package.json')); } /** * Get the nearest parent package.json file from a given path. - * Return the package.json data and the path to the package.json file, or false. + * Return the package.json data and the path to the package.json file, or undefined. * @param {string} checkPath The path to start searching from. + * @returns {undefined | {data: import('typings/internalBinding/modules').PackageConfig, path: string}} + */ +function getNearestParentPackageJSON(checkPath) { + const result = modulesBinding.getNearestParentPackageJSON(checkPath); + + if (result === undefined) { + return undefined; + } + + const data = deserializePackageJSON(checkPath, result, true /* checkIntegrity */); + + // Path should be the root folder of the matched package.json + // For example for ~/path/package.json, it should be ~/path + const path = StringPrototypeSlice(data.pjsonPath, 0, StringPrototypeLastIndexOf(data.pjsonPath, sep)); + + return { data, path }; +} + +/** + * Returns the package configuration for the given resolved URL. + * @param {URL | string} resolved - The resolved URL. + * @returns {import('typings/internalBinding/modules').PackageConfig} - The package configuration. + */ +function getPackageScopeConfig(resolved) { + const result = modulesBinding.getPackageScopeConfig(`${resolved}`); + + if (ArrayIsArray(result)) { + return deserializePackageJSON(`${resolved}`, result, false /* checkIntegrity */); + } + + // This means that the response is a string + // and it is the path to the package.json file + return { + __proto__: null, + pjsonPath: result, + exists: false, + type: 'none', + }; +} + +/** + * Returns the package type for a given URL. + * @param {URL} url - The URL to get the package type for. */ -function readPackageScope(checkPath) { - const rootSeparatorIndex = StringPrototypeIndexOf(checkPath, sep); - let separatorIndex; - const enabledPermission = permission.isEnabled(); - do { - separatorIndex = StringPrototypeLastIndexOf(checkPath, sep); - checkPath = StringPrototypeSlice(checkPath, 0, separatorIndex); - // Stop the search when the process doesn't have permissions - // to walk upwards - if (enabledPermission && !permission.has('fs.read', checkPath + sep)) { - return false; - } - if (StringPrototypeEndsWith(checkPath, sep + 'node_modules')) { - return false; - } - const pjson = readPackage(checkPath + sep); - if (pjson.exists) { - return { - data: pjson, - path: checkPath, - }; - } - } while (separatorIndex > rootSeparatorIndex); - return false; +function getPackageType(url) { + // TODO(@anonrig): Write a C++ function that returns only "type". + return getPackageScopeConfig(url).type; } module.exports = { + checkPackageJSONIntegrity, read, readPackage, - readPackageScope, + getNearestParentPackageJSON, + getPackageScopeConfig, + getPackageType, }; diff --git a/lib/internal/modules/run_main.js b/lib/internal/modules/run_main.js index 1f03c313121db0..23268637e4fd58 100644 --- a/lib/internal/modules/run_main.js +++ b/lib/internal/modules/run_main.js @@ -5,7 +5,9 @@ const { } = primordials; const { containsModuleSyntax } = internalBinding('contextify'); +const { getNearestParentPackageJSONType } = internalBinding('modules'); const { getOptionValue } = require('internal/options'); +const { checkPackageJSONIntegrity } = require('internal/modules/package_json_reader'); const path = require('path'); /** @@ -68,22 +70,27 @@ function shouldUseESMLoader(mainPath) { if (mainPath && StringPrototypeEndsWith(mainPath, '.mjs')) { return true; } if (!mainPath || StringPrototypeEndsWith(mainPath, '.cjs')) { return false; } - const { readPackageScope } = require('internal/modules/package_json_reader'); - const pkg = readPackageScope(mainPath); - // No need to guard `pkg` as it can only be an object or `false`. - switch (pkg.data?.type) { - case 'module': - return true; - case 'commonjs': - return false; - default: { // No package.json or no `type` field. - if (getOptionValue('--experimental-detect-module')) { - // If the first argument of `containsModuleSyntax` is undefined, it will read `mainPath` from the file system. - return containsModuleSyntax(undefined, mainPath); - } - return false; + const response = getNearestParentPackageJSONType(mainPath); + + // No package.json or no `type` field. + if (response === undefined || response[0] === 'none') { + if (getOptionValue('--experimental-detect-module')) { + // If the first argument of `containsModuleSyntax` is undefined, it will read `mainPath` from the file system. + return containsModuleSyntax(undefined, mainPath); } + return false; } + + // TODO(@anonrig): Do not return filePath and rawContent if experimental-policy is not used. + const { + 0: type, + 1: filePath, + 2: rawContent, + } = response; + + checkPackageJSONIntegrity(filePath, rawContent); + + return type === 'module'; } /** diff --git a/lib/internal/net.js b/lib/internal/net.js index 8b04d5f226eb17..0f2fc5dfff5ea8 100644 --- a/lib/internal/net.js +++ b/lib/internal/net.js @@ -58,7 +58,7 @@ function makeSyncWrite(fd) { const ctx = {}; writeBuffer(fd, chunk, 0, chunk.length, null, undefined, ctx); if (ctx.errno !== undefined) { - const ex = errors.uvException(ctx); + const ex = new errors.UVException(ctx); ex.errno = ctx.errno; return cb(ex); } diff --git a/lib/internal/perf/utils.js b/lib/internal/perf/utils.js index a0b7955c70481c..bbc1c996e318f8 100644 --- a/lib/internal/perf/utils.js +++ b/lib/internal/perf/utils.js @@ -5,6 +5,7 @@ const { NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN, }, milestones, + now, } = internalBinding('performance'); function getTimeOrigin() { @@ -13,12 +14,6 @@ function getTimeOrigin() { return milestones[NODE_PERFORMANCE_MILESTONE_TIME_ORIGIN] / 1e6; } -// Returns the time relative to the process start time in milliseconds. -function now() { - const hr = process.hrtime(); - return (hr[0] * 1000 + hr[1] / 1e6) - getTimeOrigin(); -} - // Returns the milestone relative to the process start time in milliseconds. function getMilestoneTimestamp(milestoneIdx) { const ns = milestones[milestoneIdx]; diff --git a/lib/internal/process/esm_loader.js b/lib/internal/process/esm_loader.js index 47c909c9e55435..0865d7ceef66b7 100644 --- a/lib/internal/process/esm_loader.js +++ b/lib/internal/process/esm_loader.js @@ -11,10 +11,10 @@ let esmLoader; module.exports = { get esmLoader() { - return esmLoader ??= createModuleLoader(true); + return esmLoader ??= createModuleLoader(); }, async loadESM(callback) { - esmLoader ??= createModuleLoader(true); + esmLoader ??= createModuleLoader(); try { const userImports = getOptionValue('--import'); if (userImports.length > 0) { diff --git a/lib/internal/process/per_thread.js b/lib/internal/process/per_thread.js index ce4822af019d5f..9b86f20053da3b 100644 --- a/lib/internal/process/per_thread.js +++ b/lib/internal/process/per_thread.js @@ -28,11 +28,10 @@ const { StringPrototypeStartsWith, Symbol, SymbolIterator, - Uint32Array, } = primordials; const { - errnoException, + ErrnoException, codes: { ERR_ASSERTION, ERR_INVALID_ARG_TYPE, @@ -65,10 +64,10 @@ function refreshHrtimeBuffer() { // The 3 entries filled in by the original process.hrtime contains // the upper/lower 32 bits of the second part of the value, // and the remaining nanoseconds of the value. - hrValues = new Uint32Array(binding.hrtimeBuffer); + hrValues = binding.hrtimeBuffer; // Use a BigUint64Array in the closure because this is actually a bit // faster than simply returning a BigInt from C++ in V8 7.1. - hrBigintValues = new BigUint64Array(binding.hrtimeBuffer, 0, 1); + hrBigintValues = new BigUint64Array(binding.hrtimeBuffer.buffer, 0, 1); } // Create the buffers. @@ -231,7 +230,7 @@ function wrapProcessMethods(binding) { } if (err) - throw errnoException(err, 'kill'); + throw new ErrnoException(err, 'kill'); return true; } diff --git a/lib/internal/process/pre_execution.js b/lib/internal/process/pre_execution.js index c535f8e8ed8a5d..1cf204a3f7d3e6 100644 --- a/lib/internal/process/pre_execution.js +++ b/lib/internal/process/pre_execution.js @@ -67,6 +67,26 @@ function prepareWorkerThreadExecution() { }); } +function prepareShadowRealmExecution() { + const { registerRealm } = require('internal/modules/esm/utils'); + // Patch the process object with legacy properties and normalizations. + // Do not expand argv1 as it is not available in ShadowRealm. + patchProcessObject(false); + setupDebugEnv(); + + // Disable custom loaders in ShadowRealm. + setupUserModules(true); + registerRealm(globalThis, { + __proto__: null, + importModuleDynamically: (specifier, _referrer, attributes) => { + // The handler for `ShadowRealm.prototype.importValue`. + const { esmLoader } = require('internal/process/esm_loader'); + // `parentURL` is not set in the case of a ShadowRealm top-level import. + return esmLoader.import(specifier, undefined, attributes); + }, + }); +} + function prepareExecution(options) { const { expandArgv1, initializeModules, isMainThread } = options; @@ -161,16 +181,17 @@ function setupSymbolDisposePolyfill() { } } -function setupUserModules(isLoaderWorker = false) { +function setupUserModules(forceDefaultLoader = false) { initializeCJSLoader(); - initializeESMLoader(isLoaderWorker); + initializeESMLoader(forceDefaultLoader); const CJSLoader = require('internal/modules/cjs/loader'); assert(!CJSLoader.hasLoadedAnyUserCJSModule); - // Loader workers are responsible for doing this themselves. - if (isLoaderWorker) { - return; + // Do not enable preload modules if custom loaders are disabled. + // For example, loader workers are responsible for doing this themselves. + // And preload modules are not supported in ShadowRealm as well. + if (!forceDefaultLoader) { + loadPreloadModules(); } - loadPreloadModules(); // Need to be done after --require setup. initializeFrozenIntrinsics(); } @@ -701,9 +722,9 @@ function initializeCJSLoader() { initializeCJS(); } -function initializeESMLoader(isLoaderWorker) { +function initializeESMLoader(forceDefaultLoader) { const { initializeESM } = require('internal/modules/esm/utils'); - initializeESM(isLoaderWorker); + initializeESM(forceDefaultLoader); // Patch the vm module when --experimental-vm-modules is on. // Please update the comments in vm.js when this block changes. @@ -779,6 +800,7 @@ module.exports = { setupUserModules, prepareMainThreadExecution, prepareWorkerThreadExecution, + prepareShadowRealmExecution, markBootstrapComplete, loadPreloadModules, initializeFrozenIntrinsics, diff --git a/lib/internal/process/signal.js b/lib/internal/process/signal.js index 548f19a65c7602..b636a4be086007 100644 --- a/lib/internal/process/signal.js +++ b/lib/internal/process/signal.js @@ -6,7 +6,7 @@ const { } = primordials; const { - errnoException, + ErrnoException, } = require('internal/errors'); const { signals } = internalBinding('constants').os; @@ -33,7 +33,7 @@ function startListeningIfSignal(type) { const err = wrap.start(signum); if (err) { wrap.close(); - throw errnoException(err, 'uv_signal_start'); + throw new ErrnoException(err, 'uv_signal_start'); } signalWraps.set(type, wrap); diff --git a/lib/internal/process/warning.js b/lib/internal/process/warning.js index e4495ad82ebb6f..7fbdc44651369c 100644 --- a/lib/internal/process/warning.js +++ b/lib/internal/process/warning.js @@ -6,8 +6,13 @@ const { ErrorPrototypeToString, ErrorCaptureStackTrace, String, + SafeSet, } = primordials; +const { + getOptionValue, +} = require('internal/options'); + const assert = require('internal/assert'); const { codes: { @@ -89,8 +94,21 @@ function doEmitWarning(warning) { process.emit('warning', warning); } +let disableWarningSet; + function onWarning(warning) { + if (!disableWarningSet) { + disableWarningSet = new SafeSet(); + const disableWarningValues = getOptionValue('--disable-warning'); + for (let i = 0; i < disableWarningValues.length; i++) { + disableWarningSet.add(disableWarningValues[i]); + } + } + if ((warning?.code && disableWarningSet.has(warning.code)) || + (warning?.name && disableWarningSet.has(warning.name))) return; + if (!(warning instanceof Error)) return; + const isDeprecation = warning.name === 'DeprecationWarning'; if (isDeprecation && process.noDeprecation) return; const trace = process.traceProcessWarnings || diff --git a/lib/internal/source_map/source_map_cache.js b/lib/internal/source_map/source_map_cache.js index 2813da21dfdc63..23a8ceb4da4d1e 100644 --- a/lib/internal/source_map/source_map_cache.js +++ b/lib/internal/source_map/source_map_cache.js @@ -1,12 +1,12 @@ 'use strict'; const { - ArrayPrototypeMap, + ArrayPrototypePush, JSONParse, ObjectKeys, RegExpPrototypeExec, - RegExpPrototypeSymbolSplit, SafeMap, + StringPrototypeCodePointAt, StringPrototypeSplit, } = primordials; @@ -39,6 +39,7 @@ const kLeadingProtocol = /^\w+:\/\//; const kSourceMappingURLMagicComment = /\/[*/]#\s+sourceMappingURL=(?[^\s]+)/g; const kSourceURLMagicComment = /\/[*/]#\s+sourceURL=(?[^\s]+)/g; +const { isAbsolute } = require('path'); const { fileURLToPath, pathToFileURL, URL } = require('internal/url'); let SourceMap; @@ -205,14 +206,26 @@ function dataFromUrl(sourceURL, sourceMappingURL) { // from. This allows translation from byte offset V8 coverage reports, // to line/column offset Source Map V3. function lineLengths(content) { - // We purposefully keep \r as part of the line-length calculation, in - // cases where there is a \r\n separator, so that this can be taken into - // account in coverage calculations. - return ArrayPrototypeMap(RegExpPrototypeSymbolSplit(/\n|\u2028|\u2029/, content), (line) => { - return line.length; - }); + const contentLength = content.length; + const output = []; + let lineLength = 0; + for (let i = 0; i < contentLength; i++, lineLength++) { + const codePoint = StringPrototypeCodePointAt(content, i); + + // We purposefully keep \r as part of the line-length calculation, in + // cases where there is a \r\n separator, so that this can be taken into + // account in coverage calculations. + // codepoints for \n (new line), \u2028 (line separator) and \u2029 (paragraph separator) + if (codePoint === 10 || codePoint === 0x2028 || codePoint === 0x2029) { + ArrayPrototypePush(output, lineLength); + lineLength = -1; // To not count the matched codePoint such as \n character + } + } + ArrayPrototypePush(output, lineLength); + return output; } + function sourceMapFromFile(mapURL) { try { const fs = require('fs'); @@ -251,9 +264,13 @@ function sourceMapFromDataUrl(sourceURL, url) { // If the sources are not absolute URLs after prepending of the "sourceRoot", // the sources are resolved relative to the SourceMap (like resolving script // src in a html document). +// If the sources are absolute paths, the sources are converted to absolute file URLs. function sourcesToAbsolute(baseURL, data) { data.sources = data.sources.map((source) => { source = (data.sourceRoot || '') + source; + if (isAbsolute(source)) { + return pathToFileURL(source).href; + } return new URL(source, baseURL).href; }); // The sources array is now resolved to absolute URLs, sourceRoot should diff --git a/lib/internal/stream_base_commons.js b/lib/internal/stream_base_commons.js index 1555956affe6c3..b692e3c30c3869 100644 --- a/lib/internal/stream_base_commons.js +++ b/lib/internal/stream_base_commons.js @@ -17,7 +17,7 @@ const { } = internalBinding('stream_wrap'); const { UV_EOF } = internalBinding('uv'); const { - errnoException, + ErrnoException, } = require('internal/errors'); const { owner_symbol } = require('internal/async_hooks').symbols; const { @@ -91,7 +91,7 @@ function onWriteComplete(status) { // TODO (ronag): This should be moved before if(stream.destroyed) // in order to avoid swallowing error. if (status < 0) { - const ex = errnoException(status, 'write', this.error); + const ex = new ErrnoException(status, 'write', this.error); if (typeof this.callback === 'function') this.callback(ex); else @@ -157,7 +157,7 @@ function afterWriteDispatched(req, err, cb) { req.async = !!streamBaseState[kLastWriteWasAsync]; if (err !== 0) - return cb(errnoException(err, 'write', req.error)); + return cb(new ErrnoException(err, 'write', req.error)); if (!req.async && typeof req.callback === 'function') { req.callback(); @@ -194,7 +194,7 @@ function onStreamRead(arrayBuffer) { if (!stream.destroyed) { const err = handle.readStop(); if (err) - stream.destroy(errnoException(err, 'read')); + stream.destroy(new ErrnoException(err, 'read')); } } @@ -214,7 +214,7 @@ function onStreamRead(arrayBuffer) { if (nread !== UV_EOF) { // CallJSOnreadMethod expects the return value to be a buffer. // Ref: https://github.com/nodejs/node/pull/34375 - stream.destroy(errnoException(nread, 'read')); + stream.destroy(new ErrnoException(nread, 'read')); return; } diff --git a/lib/internal/streams/writable.js b/lib/internal/streams/writable.js index e55ddc1796cf6c..0dbf56d7a69ca9 100644 --- a/lib/internal/streams/writable.js +++ b/lib/internal/streams/writable.js @@ -733,7 +733,8 @@ function errorBuffer(state) { // If there's something in the buffer waiting, then process it. function clearBuffer(stream, state) { - if ((state[kState] & (kDestroyed | kBufferProcessing | kCorked | kBuffered)) !== kBuffered) { + if ((state[kState] & (kDestroyed | kBufferProcessing | kCorked | kBuffered | kConstructed)) !== + (kBuffered | kConstructed)) { return; } diff --git a/lib/internal/test_runner/mock/mock_timers.js b/lib/internal/test_runner/mock/mock_timers.js index 8fac645e9a3617..85512cc4b66a51 100644 --- a/lib/internal/test_runner/mock/mock_timers.js +++ b/lib/internal/test_runner/mock/mock_timers.js @@ -260,20 +260,23 @@ class MockTimers { #createTimer(isInterval, callback, delay, ...args) { const timerId = this.#currentTimer++; - this.#executionQueue.insert({ + const timer = { __proto__: null, id: timerId, callback, runAt: this.#now + delay, - interval: isInterval, + interval: isInterval ? delay : undefined, args, - }); - - return timerId; + }; + this.#executionQueue.insert(timer); + return timer; } - #clearTimer(position) { - this.#executionQueue.removeAt(position); + #clearTimer(timer) { + if (timer.priorityQueuePosition !== undefined) { + this.#executionQueue.removeAt(timer.priorityQueuePosition); + timer.priorityQueuePosition = undefined; + } } #createDate() { @@ -397,10 +400,10 @@ class MockTimers { emitter.emit('data', result); }; - const timerId = this.#createTimer(true, callback, interval, options); + const timer = this.#createTimer(true, callback, interval, options); const clearListeners = () => { emitter.removeAllListeners(); - context.#clearTimer(timerId); + context.#clearTimer(timer); }; const iterator = { __proto__: null, @@ -453,11 +456,11 @@ class MockTimers { } const onabort = () => { - clearFn(id); + clearFn(timer); return reject(abortIt(options.signal)); }; - const id = timerFn(() => { + const timer = timerFn(() => { return resolve(result); }, ms); @@ -620,11 +623,11 @@ class MockTimers { FunctionPrototypeApply(timer.callback, undefined, timer.args); this.#executionQueue.shift(); + timer.priorityQueuePosition = undefined; - if (timer.interval) { + if (timer.interval !== undefined) { timer.runAt += timer.interval; this.#executionQueue.insert(timer); - return; } timer = this.#executionQueue.peek(); diff --git a/lib/internal/test_runner/reporter/spec.js b/lib/internal/test_runner/reporter/spec.js index 75b4d9773c4161..b93405872f278c 100644 --- a/lib/internal/test_runner/reporter/spec.js +++ b/lib/internal/test_runner/reporter/spec.js @@ -14,19 +14,11 @@ const { const assert = require('assert'); const Transform = require('internal/streams/transform'); const { inspectWithNoCustomRetry } = require('internal/errors'); -const { green, blue, red, white, gray, shouldColorize } = require('internal/util/colors'); +const colors = require('internal/util/colors'); const { kSubtestsFailed } = require('internal/test_runner/test'); const { getCoverageReport } = require('internal/test_runner/utils'); const { relative } = require('path'); -const inspectOptions = { __proto__: null, colors: shouldColorize(process.stdout), breakLength: Infinity }; - -const colors = { - '__proto__': null, - 'test:fail': red, - 'test:pass': green, - 'test:diagnostic': blue, -}; const symbols = { '__proto__': null, 'test:fail': '\u2716 ', @@ -42,9 +34,19 @@ class SpecReporter extends Transform { #indentMemo = new SafeMap(); #failedTests = []; #cwd = process.cwd(); + #inspectOptions; + #colors; constructor() { super({ __proto__: null, writableObjectMode: true }); + colors.refresh(); + this.#inspectOptions = { __proto__: null, colors: colors.shouldColorize(process.stdout), breakLength: Infinity }; + this.#colors = { + '__proto__': null, + 'test:fail': colors.red, + 'test:pass': colors.green, + 'test:diagnostic': colors.blue, + }; } #indent(nesting) { @@ -62,15 +64,15 @@ class SpecReporter extends Transform { const message = ArrayPrototypeJoin( RegExpPrototypeSymbolSplit( hardenRegExp(/\r?\n/), - inspectWithNoCustomRetry(err, inspectOptions), + inspectWithNoCustomRetry(err, this.#inspectOptions), ), `\n${indent} `); return `\n${indent} ${message}\n`; } #formatTestReport(type, data, prefix = '', indent = '', hasChildren = false) { - let color = colors[type] ?? white; + let color = this.#colors[type] ?? colors.white; let symbol = symbols[type] ?? ' '; const { skip, todo } = data; - const duration_ms = data.details?.duration_ms ? ` ${gray}(${data.details.duration_ms}ms)${white}` : ''; + const duration_ms = data.details?.duration_ms ? ` ${colors.gray}(${data.details.duration_ms}ms)${colors.white}` : ''; let title = `${data.name}${duration_ms}`; if (skip !== undefined) { @@ -82,13 +84,13 @@ class SpecReporter extends Transform { if (hasChildren) { // If this test has had children - it was already reported, so slightly modify the output const err = data.details?.error?.failureType === 'subtestsFailed' ? '' : error; - return `${prefix}${indent}${color}${symbols['arrow:right']}${white}${title}\n${err}`; + return `${prefix}${indent}${color}${symbols['arrow:right']}${colors.white}${title}\n${err}`; } if (skip !== undefined) { - color = gray; + color = colors.gray; symbol = symbols['hyphen:minus']; } - return `${prefix}${indent}${color}${symbol}${title}${white}${error}`; + return `${prefix}${indent}${color}${symbol}${title}${colors.white}${error}`; } #handleTestReportEvent(type, data) { const subtest = ArrayPrototypeShift(this.#stack); // This is the matching `test:start` event @@ -130,9 +132,9 @@ class SpecReporter extends Transform { case 'test:stdout': return data.message; case 'test:diagnostic': - return `${colors[type]}${this.#indent(data.nesting)}${symbols[type]}${data.message}${white}\n`; + return `${this.#colors[type]}${this.#indent(data.nesting)}${symbols[type]}${data.message}${colors.white}\n`; case 'test:coverage': - return getCoverageReport(this.#indent(data.nesting), data.summary, symbols['test:coverage'], blue, true); + return getCoverageReport(this.#indent(data.nesting), data.summary, symbols['test:coverage'], colors.blue, true); } } _transform({ type, data }, encoding, callback) { @@ -143,7 +145,7 @@ class SpecReporter extends Transform { callback(null, ''); return; } - const results = [`\n${colors['test:fail']}${symbols['test:fail']}failing tests:${white}\n`]; + const results = [`\n${this.#colors['test:fail']}${symbols['test:fail']}failing tests:${colors.white}\n`]; for (let i = 0; i < this.#failedTests.length; i++) { const test = this.#failedTests[i]; const relPath = relative(this.#cwd, test.file); diff --git a/lib/internal/test_runner/runner.js b/lib/internal/test_runner/runner.js index cc9bcc09b714fe..34100213ebd935 100644 --- a/lib/internal/test_runner/runner.js +++ b/lib/internal/test_runner/runner.js @@ -318,7 +318,7 @@ class FileTest extends Test { function runTestFile(path, filesWatcher, opts) { const watchMode = filesWatcher != null; - const subtest = opts.root.createSubtest(FileTest, path, async (t) => { + const subtest = opts.root.createSubtest(FileTest, path, { __proto__: null, signal: opts.signal }, async (t) => { const args = getRunArgs(path, opts); const stdio = ['pipe', 'pipe', 'pipe']; const env = { __proto__: null, ...process.env, NODE_TEST_CONTEXT: 'child-v8' }; @@ -487,6 +487,9 @@ function run(options = kEmptyObject) { } const root = createTestTree({ __proto__: null, concurrency, timeout, signal }); + if (process.env.NODE_TEST_CONTEXT !== undefined) { + return root.reporter; + } let testFiles = files ?? createTestFileList(); if (shard) { diff --git a/lib/internal/tls/secure-context.js b/lib/internal/tls/secure-context.js index 0fa3098ffa1020..40d995f9890d53 100644 --- a/lib/internal/tls/secure-context.js +++ b/lib/internal/tls/secure-context.js @@ -148,6 +148,31 @@ function configSecureContext(context, options = kEmptyObject, name = 'options') ticketKeys, } = options; + // Set the cipher list and cipher suite before anything else because + // @SECLEVEL= changes the security level and that affects subsequent + // operations. + if (ciphers !== undefined && ciphers !== null) + validateString(ciphers, `${name}.ciphers`); + + // Work around an OpenSSL API quirk. cipherList is for TLSv1.2 and below, + // cipherSuites is for TLSv1.3 (and presumably any later versions). TLSv1.3 + // cipher suites all have a standard name format beginning with TLS_, so split + // the ciphers and pass them to the appropriate API. + const { + cipherList, + cipherSuites, + } = processCiphers(ciphers, `${name}.ciphers`); + + if (cipherSuites !== '') + context.setCipherSuites(cipherSuites); + context.setCiphers(cipherList); + + if (cipherList === '' && + context.getMinProto() < TLS1_3_VERSION && + context.getMaxProto() > TLS1_2_VERSION) { + context.setMinProto(TLS1_3_VERSION); + } + // Add CA before the cert to be able to load cert's issuer in C++ code. // NOTE(@jasnell): ca, cert, and key are permitted to be falsy, so do not // change the checks to !== undefined checks. @@ -218,28 +243,6 @@ function configSecureContext(context, options = kEmptyObject, name = 'options') } } - if (ciphers !== undefined && ciphers !== null) - validateString(ciphers, `${name}.ciphers`); - - // Work around an OpenSSL API quirk. cipherList is for TLSv1.2 and below, - // cipherSuites is for TLSv1.3 (and presumably any later versions). TLSv1.3 - // cipher suites all have a standard name format beginning with TLS_, so split - // the ciphers and pass them to the appropriate API. - const { - cipherList, - cipherSuites, - } = processCiphers(ciphers, `${name}.ciphers`); - - if (cipherSuites !== '') - context.setCipherSuites(cipherSuites); - context.setCiphers(cipherList); - - if (cipherList === '' && - context.getMinProto() < TLS1_3_VERSION && - context.getMaxProto() > TLS1_2_VERSION) { - context.setMinProto(TLS1_3_VERSION); - } - validateString(ecdhCurve, `${name}.ecdhCurve`); context.setECDHCurve(ecdhCurve); diff --git a/lib/internal/url.js b/lib/internal/url.js index ca41c48582b19d..38f97926064595 100644 --- a/lib/internal/url.js +++ b/lib/internal/url.js @@ -26,6 +26,7 @@ const { StringPrototypeIndexOf, StringPrototypeSlice, StringPrototypeStartsWith, + StringPrototypeToWellFormed, Symbol, SymbolIterator, SymbolToStringTag, @@ -42,7 +43,6 @@ const { const { getConstructorOf, removeColors, - toUSVString, kEnumerableProperty, SideEffectFreeRegExpPrototypeSymbolReplace, } = require('internal/util'); @@ -366,7 +366,11 @@ class URLSearchParams { throw new ERR_INVALID_TUPLE('Each query pair', '[name, value]'); } // Append (innerSequence[0], innerSequence[1]) to querys list. - ArrayPrototypePush(this.#searchParams, toUSVString(pair[0]), toUSVString(pair[1])); + ArrayPrototypePush( + this.#searchParams, + StringPrototypeToWellFormed(`${pair[0]}`), + StringPrototypeToWellFormed(`${pair[1]}`), + ); } else { if (((typeof pair !== 'object' && typeof pair !== 'function') || typeof pair[SymbolIterator] !== 'function')) { @@ -377,7 +381,7 @@ class URLSearchParams { for (const element of pair) { length++; - ArrayPrototypePush(this.#searchParams, toUSVString(element)); + ArrayPrototypePush(this.#searchParams, StringPrototypeToWellFormed(`${element}`)); } // If innerSequence's size is not 2, then throw a TypeError. @@ -395,8 +399,8 @@ class URLSearchParams { const key = keys[i]; const desc = ReflectGetOwnPropertyDescriptor(init, key); if (desc !== undefined && desc.enumerable) { - const typedKey = toUSVString(key); - const typedValue = toUSVString(init[key]); + const typedKey = StringPrototypeToWellFormed(key); + const typedValue = StringPrototypeToWellFormed(`${init[key]}`); // Two different keys may become the same USVString after normalization. // In that case, we retain the later one. Refer to WPT. @@ -413,7 +417,7 @@ class URLSearchParams { } } else { // https://url.spec.whatwg.org/#dom-urlsearchparams-urlsearchparams - init = toUSVString(init); + init = StringPrototypeToWellFormed(`${init}`); this.#searchParams = init ? parseParams(init) : []; } } @@ -468,8 +472,8 @@ class URLSearchParams { throw new ERR_MISSING_ARGS('name', 'value'); } - name = toUSVString(name); - value = toUSVString(value); + name = StringPrototypeToWellFormed(`${name}`); + value = StringPrototypeToWellFormed(`${value}`); ArrayPrototypePush(this.#searchParams, name, value); if (this.#context) { this.#context.search = this.toString(); @@ -485,10 +489,10 @@ class URLSearchParams { } const list = this.#searchParams; - name = toUSVString(name); + name = StringPrototypeToWellFormed(`${name}`); if (value !== undefined) { - value = toUSVString(value); + value = StringPrototypeToWellFormed(`${value}`); for (let i = 0; i < list.length;) { if (list[i] === name && list[i + 1] === value) { list.splice(i, 2); @@ -519,7 +523,7 @@ class URLSearchParams { } const list = this.#searchParams; - name = toUSVString(name); + name = StringPrototypeToWellFormed(`${name}`); for (let i = 0; i < list.length; i += 2) { if (list[i] === name) { return list[i + 1]; @@ -538,7 +542,7 @@ class URLSearchParams { const list = this.#searchParams; const values = []; - name = toUSVString(name); + name = StringPrototypeToWellFormed(`${name}`); for (let i = 0; i < list.length; i += 2) { if (list[i] === name) { values.push(list[i + 1]); @@ -556,10 +560,10 @@ class URLSearchParams { } const list = this.#searchParams; - name = toUSVString(name); + name = StringPrototypeToWellFormed(`${name}`); if (value !== undefined) { - value = toUSVString(value); + value = StringPrototypeToWellFormed(`${value}`); } for (let i = 0; i < list.length; i += 2) { @@ -582,8 +586,8 @@ class URLSearchParams { } const list = this.#searchParams; - name = toUSVString(name); - value = toUSVString(value); + name = StringPrototypeToWellFormed(`${name}`); + value = StringPrototypeToWellFormed(`${value}`); // If there are any name-value pairs whose name is `name`, in `list`, set // the value of the first such name-value pair to `value` and remove the @@ -773,7 +777,7 @@ class URL { throw new ERR_MISSING_ARGS('url'); } - // toUSVString is not needed. + // StringPrototypeToWellFormed is not needed. input = `${input}`; if (base !== undefined) { @@ -1006,7 +1010,7 @@ class URL { } set search(value) { - const href = bindingUrl.update(this.#context.href, updateActions.kSearch, toUSVString(value)); + const href = bindingUrl.update(this.#context.href, updateActions.kSearch, StringPrototypeToWellFormed(`${value}`)); if (href) { this.#updateContext(href); } @@ -1104,6 +1108,10 @@ function installObjectURLMethods() { } function revokeObjectURL(url) { + if (arguments.length === 0) { + throw new ERR_MISSING_ARGS('url'); + } + bindingBlob.revokeObjectURL(`${url}`); } @@ -1297,7 +1305,7 @@ function domainToASCII(domain) { if (arguments.length < 1) throw new ERR_MISSING_ARGS('domain'); - // toUSVString is not needed. + // StringPrototypeToWellFormed is not needed. return bindingUrl.domainToASCII(`${domain}`); } @@ -1305,7 +1313,7 @@ function domainToUnicode(domain) { if (arguments.length < 1) throw new ERR_MISSING_ARGS('domain'); - // toUSVString is not needed. + // StringPrototypeToWellFormed is not needed. return bindingUrl.domainToUnicode(`${domain}`); } @@ -1501,7 +1509,6 @@ function getURLOrigin(url) { } module.exports = { - toUSVString, fileURLToPath, pathToFileURL, toPathIfFileURL, diff --git a/lib/internal/util.js b/lib/internal/util.js index 558a5da69773bb..b32c0e8472b320 100644 --- a/lib/internal/util.js +++ b/lib/internal/util.js @@ -8,6 +8,7 @@ const { ArrayPrototypeSlice, ArrayPrototypeSort, Error, + ErrorCaptureStackTrace, FunctionPrototypeCall, ObjectDefineProperties, ObjectDefineProperty, @@ -44,11 +45,11 @@ const { } = primordials; const { - hideStackFrames, codes: { ERR_NO_CRYPTO, ERR_UNKNOWN_SIGNAL, }, + isErrorStackTraceLimitWritable, uvErrmapGet, overrideStackTrace, } = require('internal/errors'); @@ -61,7 +62,6 @@ const { decorated_private_symbol, }, sleep: _sleep, - toUSVString: _toUSVString, } = internalBinding('util'); const { isNativeError, isPromise } = internalBinding('types'); const { getOptionValue } = require('internal/options'); @@ -72,18 +72,6 @@ const experimentalWarnings = new SafeSet(); const colorRegExp = /\u001b\[\d\d?m/g; // eslint-disable-line no-control-regex -const unpairedSurrogateRe = - /(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])/; -function toUSVString(val) { - const str = `${val}`; - // As of V8 5.5, `str.search()` (and `unpairedSurrogateRe[@@search]()`) are - // slower than `unpairedSurrogateRe.exec()`. - const match = RegExpPrototypeExec(unpairedSurrogateRe, str); - if (!match) - return str; - return _toUSVString(str, match.index); -} - let uvBinding; function lazyUv() { @@ -219,13 +207,13 @@ function slowCases(enc) { case 4: if (enc === 'UTF8') return 'utf8'; if (enc === 'ucs2' || enc === 'UCS2') return 'utf16le'; - enc = `${enc}`.toLowerCase(); + enc = StringPrototypeToLowerCase(enc); if (enc === 'utf8') return 'utf8'; if (enc === 'ucs2') return 'utf16le'; break; case 3: if (enc === 'hex' || enc === 'HEX' || - `${enc}`.toLowerCase() === 'hex') + StringPrototypeToLowerCase(enc) === 'hex') return 'hex'; break; case 5: @@ -234,7 +222,7 @@ function slowCases(enc) { if (enc === 'UTF-8') return 'utf8'; if (enc === 'ASCII') return 'ascii'; if (enc === 'UCS-2') return 'utf16le'; - enc = `${enc}`.toLowerCase(); + enc = StringPrototypeToLowerCase(enc); if (enc === 'utf-8') return 'utf8'; if (enc === 'ascii') return 'ascii'; if (enc === 'ucs-2') return 'utf16le'; @@ -244,23 +232,23 @@ function slowCases(enc) { if (enc === 'latin1' || enc === 'binary') return 'latin1'; if (enc === 'BASE64') return 'base64'; if (enc === 'LATIN1' || enc === 'BINARY') return 'latin1'; - enc = `${enc}`.toLowerCase(); + enc = StringPrototypeToLowerCase(enc); if (enc === 'base64') return 'base64'; if (enc === 'latin1' || enc === 'binary') return 'latin1'; break; case 7: if (enc === 'utf16le' || enc === 'UTF16LE' || - `${enc}`.toLowerCase() === 'utf16le') + StringPrototypeToLowerCase(enc) === 'utf16le') return 'utf16le'; break; case 8: if (enc === 'utf-16le' || enc === 'UTF-16LE' || - `${enc}`.toLowerCase() === 'utf-16le') + StringPrototypeToLowerCase(enc) === 'utf-16le') return 'utf16le'; break; case 9: if (enc === 'base64url' || enc === 'BASE64URL' || - `${enc}`.toLowerCase() === 'base64url') + StringPrototypeToLowerCase(enc) === 'base64url') return 'base64url'; break; default: @@ -693,10 +681,19 @@ const lazyDOMExceptionClass = () => { return _DOMException; }; -const lazyDOMException = hideStackFrames((message, name) => { +const lazyDOMException = (message, name) => { _DOMException ??= internalBinding('messaging').DOMException; + if (isErrorStackTraceLimitWritable()) { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + const ex = new _DOMException(message, name); + Error.stackTraceLimit = limit; + ErrorCaptureStackTrace(ex, lazyDOMException); + return ex; + } return new _DOMException(message, name); -}); + +}; const kEnumerableProperty = { __proto__: null }; kEnumerableProperty.enumerable = true; @@ -903,7 +900,6 @@ module.exports = { sleep, spliceOne, setupCoverageHooks, - toUSVString, removeColors, // Symbol used to customize promisify conversion diff --git a/lib/internal/util/comparisons.js b/lib/internal/util/comparisons.js index d86e59adae9880..d26d887636c565 100644 --- a/lib/internal/util/comparisons.js +++ b/lib/internal/util/comparisons.js @@ -21,6 +21,7 @@ const { StringPrototypeValueOf, SymbolPrototypeValueOf, TypedArrayPrototypeGetSymbolToStringTag, + TypedArrayPrototypeGetByteLength, Uint8Array, } = primordials; @@ -71,7 +72,8 @@ function areSimilarFloatArrays(a, b) { if (a.byteLength !== b.byteLength) { return false; } - for (let offset = 0; offset < a.byteLength; offset++) { + const len = TypedArrayPrototypeGetByteLength(a); + for (let offset = 0; offset < len; offset++) { if (a[offset] !== b[offset]) { return false; } diff --git a/lib/internal/validators.js b/lib/internal/validators.js index 77b67a4a37ff91..6abf4d9a3cd7d3 100644 --- a/lib/internal/validators.js +++ b/lib/internal/validators.js @@ -22,11 +22,11 @@ const { const { hideStackFrames, codes: { - ERR_SOCKET_BAD_PORT, - ERR_INVALID_ARG_TYPE, - ERR_INVALID_ARG_VALUE, - ERR_OUT_OF_RANGE, - ERR_UNKNOWN_SIGNAL, + ERR_SOCKET_BAD_PORT: { HideStackFramesError: ERR_SOCKET_BAD_PORT }, + ERR_INVALID_ARG_TYPE: { HideStackFramesError: ERR_INVALID_ARG_TYPE }, + ERR_INVALID_ARG_VALUE: { HideStackFramesError: ERR_INVALID_ARG_VALUE }, + ERR_OUT_OF_RANGE: { HideStackFramesError: ERR_OUT_OF_RANGE }, + ERR_UNKNOWN_SIGNAL: { HideStackFramesError: ERR_UNKNOWN_SIGNAL }, }, } = require('internal/errors'); const { normalizeEncoding } = require('internal/util'); @@ -157,10 +157,10 @@ const validateUint32 = hideStackFrames((value, name, positive = false) => { */ /** @type {validateString} */ -function validateString(value, name) { +const validateString = hideStackFrames((value, name) => { if (typeof value !== 'string') throw new ERR_INVALID_ARG_TYPE(name, 'string', value); -} +}); /** * @callback validateNumber @@ -172,7 +172,7 @@ function validateString(value, name) { */ /** @type {validateNumber} */ -function validateNumber(value, name, min = undefined, max) { +const validateNumber = hideStackFrames((value, name, min = undefined, max) => { if (typeof value !== 'number') throw new ERR_INVALID_ARG_TYPE(name, 'number', value); @@ -183,7 +183,7 @@ function validateNumber(value, name, min = undefined, max) { `${min != null ? `>= ${min}` : ''}${min != null && max != null ? ' && ' : ''}${max != null ? `<= ${max}` : ''}`, value); } -} +}); /** * @callback validateOneOf @@ -213,10 +213,10 @@ const validateOneOf = hideStackFrames((value, name, oneOf) => { */ /** @type {validateBoolean} */ -function validateBoolean(value, name) { +const validateBoolean = hideStackFrames((value, name) => { if (typeof value !== 'boolean') throw new ERR_INVALID_ARG_TYPE(name, 'boolean', value); -} +}); const kValidateObjectNone = 0; const kValidateObjectAllowNullable = 1 << 0; @@ -309,7 +309,7 @@ const validateArray = hideStackFrames((value, name, minLength = 0) => { */ /** @type {validateStringArray} */ -function validateStringArray(value, name) { +const validateStringArray = hideStackFrames((value, name) => { validateArray(value, name); for (let i = 0; i < value.length; ++i) { // Don't use validateString here for performance reasons, as @@ -318,7 +318,7 @@ function validateStringArray(value, name) { throw new ERR_INVALID_ARG_TYPE(`${name}[${i}]`, 'string', value[i]); } } -} +}); /** * @callback validateBooleanArray @@ -328,7 +328,7 @@ function validateStringArray(value, name) { */ /** @type {validateBooleanArray} */ -function validateBooleanArray(value, name) { +const validateBooleanArray = hideStackFrames((value, name) => { validateArray(value, name); for (let i = 0; i < value.length; ++i) { // Don't use validateBoolean here for performance reasons, as @@ -337,7 +337,7 @@ function validateBooleanArray(value, name) { throw new ERR_INVALID_ARG_TYPE(`${name}[${i}]`, 'boolean', value[i]); } } -} +}); /** * @callback validateAbortSignalArray @@ -364,7 +364,7 @@ function validateAbortSignalArray(value, name) { * @param {string} [name='signal'] * @returns {asserts signal is keyof signals} */ -function validateSignalName(signal, name = 'signal') { +const validateSignalName = hideStackFrames((signal, name = 'signal') => { validateString(signal, name); if (signals[signal] === undefined) { @@ -375,7 +375,7 @@ function validateSignalName(signal, name = 'signal') { throw new ERR_UNKNOWN_SIGNAL(signal); } -} +}); /** * @callback validateBuffer @@ -397,7 +397,7 @@ const validateBuffer = hideStackFrames((buffer, name = 'buffer') => { * @param {string} data * @param {string} encoding */ -function validateEncoding(data, encoding) { +const validateEncoding = hideStackFrames((data, encoding) => { const normalizedEncoding = normalizeEncoding(encoding); const length = data.length; @@ -405,7 +405,7 @@ function validateEncoding(data, encoding) { throw new ERR_INVALID_ARG_VALUE('encoding', encoding, `is invalid for data of length ${length}`); } -} +}); /** * Check that the port number is not NaN when coerced to a number, @@ -415,7 +415,7 @@ function validateEncoding(data, encoding) { * @param {boolean} [allowZero=true] * @returns {number} */ -function validatePort(port, name = 'Port', allowZero = true) { +const validatePort = hideStackFrames((port, name = 'Port', allowZero = true) => { if ((typeof port !== 'number' && typeof port !== 'string') || (typeof port === 'string' && StringPrototypeTrim(port).length === 0) || +port !== (+port >>> 0) || @@ -424,7 +424,7 @@ function validatePort(port, name = 'Port', allowZero = true) { throw new ERR_SOCKET_BAD_PORT(name, port, allowZero); } return port | 0; -} +}); /** * @callback validateAbortSignal @@ -507,7 +507,7 @@ const linkValueRegExp = /^(?:<[^>]*>)(?:\s*;\s*[^;"\s]+(?:=(")?[^;"\s]*\1)?)*$/; * @param {any} value * @param {string} name */ -function validateLinkHeaderFormat(value, name) { +const validateLinkHeaderFormat = hideStackFrames((value, name) => { if ( typeof value === 'undefined' || !RegExpPrototypeExec(linkValueRegExp, value) @@ -518,7 +518,7 @@ function validateLinkHeaderFormat(value, name) { 'must be an array or string of format "; rel=preload; as=style"', ); } -} +}); const validateInternalField = hideStackFrames((object, fieldKey, className) => { if (typeof object !== 'object' || object === null || !ObjectPrototypeHasOwnProperty(object, fieldKey)) { @@ -530,9 +530,9 @@ const validateInternalField = hideStackFrames((object, fieldKey, className) => { * @param {any} hints * @return {string} */ -function validateLinkHeaderValue(hints) { +const validateLinkHeaderValue = hideStackFrames((hints) => { if (typeof hints === 'string') { - validateLinkHeaderFormat(hints, 'hints'); + validateLinkHeaderFormat.withoutStackTrace(hints, 'hints'); return hints; } else if (ArrayIsArray(hints)) { const hintsLength = hints.length; @@ -544,7 +544,7 @@ function validateLinkHeaderValue(hints) { for (let i = 0; i < hintsLength; i++) { const link = hints[i]; - validateLinkHeaderFormat(link, 'hints'); + validateLinkHeaderFormat.withoutStackTrace(link, 'hints'); result += link; if (i !== hintsLength - 1) { @@ -560,7 +560,7 @@ function validateLinkHeaderValue(hints) { hints, 'must be an array or string of format "; rel=preload; as=style"', ); -} +}); module.exports = { isInt32, diff --git a/lib/internal/webidl.js b/lib/internal/webidl.js index 67c01418f167f7..eeb0f35586a2ed 100644 --- a/lib/internal/webidl.js +++ b/lib/internal/webidl.js @@ -10,7 +10,10 @@ const { NumberIsNaN, NumberMAX_SAFE_INTEGER, NumberMIN_SAFE_INTEGER, + ObjectAssign, + SafeSet, String, + TypeError, } = primordials; const { @@ -173,8 +176,43 @@ converters.DOMString = function DOMString(V) { return String(V); }; +function codedTypeError(message, errorProperties = kEmptyObject) { + // eslint-disable-next-line no-restricted-syntax + const err = new TypeError(message); + ObjectAssign(err, errorProperties); + return err; +} + +function makeException(message, opts = kEmptyObject) { + const prefix = opts.prefix ? opts.prefix + ': ' : ''; + const context = opts.context?.length === 0 ? + '' : (opts.context ?? 'Value') + ' '; + return codedTypeError( + `${prefix}${context}${message}`, + { code: opts.code || 'ERR_INVALID_ARG_TYPE' }, + ); +} + +function createEnumConverter(name, values) { + const E = new SafeSet(values); + + return function(V, opts = kEmptyObject) { + const S = String(V); + + if (!E.has(S)) { + throw makeException( + `value '${S}' is not a valid enum value of type ${name}.`, + { __proto__: null, ...opts, code: 'ERR_INVALID_ARG_VALUE' }); + } + + return S; + }; +} + module.exports = { + converters, convertToInt, + createEnumConverter, evenRound, - converters, + makeException, }; diff --git a/lib/internal/webstreams/adapters.js b/lib/internal/webstreams/adapters.js index 786148ffed9703..3b52dc919c111f 100644 --- a/lib/internal/webstreams/adapters.js +++ b/lib/internal/webstreams/adapters.js @@ -1,13 +1,19 @@ 'use strict'; const { + ArrayPrototypeFilter, + ArrayPrototypeMap, + Boolean, + ObjectEntries, PromisePrototypeThen, PromiseResolve, SafePromiseAll, SafePromisePrototypeFinally, + SafeSet, TypedArrayPrototypeGetBuffer, - TypedArrayPrototypeGetByteOffset, TypedArrayPrototypeGetByteLength, + TypedArrayPrototypeGetByteOffset, + TypeError, Uint8Array, } = primordials; @@ -46,7 +52,7 @@ const { } = require('buffer'); const { - errnoException, + ErrnoException, codes: { ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE, @@ -82,6 +88,38 @@ const { UV_EOF } = internalBinding('uv'); const encoder = new TextEncoder(); +// Collect all negative (error) ZLIB codes and Z_NEED_DICT +const ZLIB_FAILURES = new SafeSet([ + ...ArrayPrototypeFilter( + ArrayPrototypeMap( + ObjectEntries(internalBinding('constants').zlib), + ({ 0: code, 1: value }) => (value < 0 ? code : null), + ), + Boolean, + ), + 'Z_NEED_DICT', +]); + +/** + * @param {Error|null} cause + * @returns {Error|null} + */ +function handleKnownInternalErrors(cause) { + switch (true) { + case cause?.code === 'ERR_STREAM_PREMATURE_CLOSE': { + return new AbortError(undefined, { cause }); + } + case ZLIB_FAILURES.has(cause?.code): { + // eslint-disable-next-line no-restricted-syntax + const error = new TypeError(undefined, { cause }); + error.code = cause.code; + return error; + } + default: + return cause; + } +} + /** * @typedef {import('../../stream').Writable} Writable * @typedef {import('../../stream').Readable} Readable @@ -137,10 +175,7 @@ function newWritableStreamFromStreamWritable(streamWritable) { } const cleanup = finished(streamWritable, (error) => { - if (error?.code === 'ERR_STREAM_PREMATURE_CLOSE') { - const err = new AbortError(undefined, { cause: error }); - error = err; - } + error = handleKnownInternalErrors(error); cleanup(); // This is a protection against non-standard, legacy streams @@ -440,10 +475,7 @@ function newReadableStreamFromStreamReadable(streamReadable, options = kEmptyObj streamReadable.pause(); const cleanup = finished(streamReadable, (error) => { - if (error?.code === 'ERR_STREAM_PREMATURE_CLOSE') { - const err = new AbortError(undefined, { cause: error }); - error = err; - } + error = handleKnownInternalErrors(error); cleanup(); // This is a protection against non-standard, legacy streams @@ -856,7 +888,7 @@ function newWritableStreamFromStreamBase(streamBase, strategy) { function onWriteComplete(status) { if (status < 0) { - const error = errnoException(status, 'write', this.error); + const error = new ErrnoException(status, 'write', this.error); this.promise.reject(error); this.controller.error(error); return; @@ -879,7 +911,7 @@ function newWritableStreamFromStreamBase(streamBase, strategy) { } if (ret !== 0) - promise.reject(errnoException(ret, 'write', req)); + promise.reject(new ErrnoException(ret, 'write', req)); else if (!req.async) promise.resolve(); diff --git a/lib/internal/webstreams/compression.js b/lib/internal/webstreams/compression.js index 6cbaa3f3250e73..ac10d093dcefcc 100644 --- a/lib/internal/webstreams/compression.js +++ b/lib/internal/webstreams/compression.js @@ -2,12 +2,9 @@ const { ObjectDefineProperties, + SymbolToStringTag, } = primordials; -const { - codes: { ERR_INVALID_ARG_VALUE }, -} = require('internal/errors'); - const { newReadableWritablePairFromDuplex, } = require('internal/webstreams/adapters'); @@ -19,12 +16,20 @@ const { kEnumerableProperty, } = require('internal/util'); +const { createEnumConverter } = require('internal/webidl'); + let zlib; function lazyZlib() { zlib ??= require('zlib'); return zlib; } +const formatConverter = createEnumConverter('CompressionFormat', [ + 'deflate', + 'deflate-raw', + 'gzip', +]); + /** * @typedef {import('./readablestream').ReadableStream} ReadableStream * @typedef {import('./writablestream').WritableStream} WritableStream @@ -35,18 +40,23 @@ class CompressionStream { #transform; /** - * @param {'deflate'|'gzip'} format + * @param {'deflate'|'deflate-raw'|'gzip'} format */ constructor(format) { + format = formatConverter(format, { + prefix: "Failed to construct 'CompressionStream'", + context: '1st argument', + }); switch (format) { case 'deflate': this.#handle = lazyZlib().createDeflate(); break; + case 'deflate-raw': + this.#handle = lazyZlib().createDeflateRaw(); + break; case 'gzip': this.#handle = lazyZlib().createGzip(); break; - default: - throw new ERR_INVALID_ARG_VALUE('format', format); } this.#transform = newReadableWritablePairFromDuplex(this.#handle); } @@ -80,18 +90,23 @@ class DecompressionStream { #transform; /** - * @param {'deflate'|'gzip'} format + * @param {'deflate'|'deflate-raw'|'gzip'} format */ constructor(format) { + format = formatConverter(format, { + prefix: "Failed to construct 'DecompressionStream'", + context: '1st argument', + }); switch (format) { case 'deflate': this.#handle = lazyZlib().createInflate(); break; + case 'deflate-raw': + this.#handle = lazyZlib().createInflateRaw(); + break; case 'gzip': this.#handle = lazyZlib().createGunzip(); break; - default: - throw new ERR_INVALID_ARG_VALUE('format', format); } this.#transform = newReadableWritablePairFromDuplex(this.#handle); } @@ -123,11 +138,21 @@ class DecompressionStream { ObjectDefineProperties(CompressionStream.prototype, { readable: kEnumerableProperty, writable: kEnumerableProperty, + [SymbolToStringTag]: { + __proto__: null, + configurable: true, + value: 'CompressionStream', + }, }); ObjectDefineProperties(DecompressionStream.prototype, { readable: kEnumerableProperty, writable: kEnumerableProperty, + [SymbolToStringTag]: { + __proto__: null, + configurable: true, + value: 'DecompressionStream', + }, }); module.exports = { diff --git a/lib/internal/webstreams/readablestream.js b/lib/internal/webstreams/readablestream.js index d369dfb04f4a99..454d4c4a7bad75 100644 --- a/lib/internal/webstreams/readablestream.js +++ b/lib/internal/webstreams/readablestream.js @@ -636,8 +636,12 @@ ObjectDefineProperties(ReadableStream.prototype, { pipeThrough: kEnumerableProperty, pipeTo: kEnumerableProperty, tee: kEnumerableProperty, + values: kEnumerableProperty, [SymbolToStringTag]: getNonWritablePropertyDescriptor(ReadableStream.name), }); +ObjectDefineProperties(ReadableStream, { + from: kEnumerableProperty, +}); function InternalTransferredReadableStream() { markTransferMode(this, false, true); diff --git a/lib/net.js b/lib/net.js index 6f4e6ed9318abc..7ed6bb1c6bb01a 100644 --- a/lib/net.js +++ b/lib/net.js @@ -106,11 +106,11 @@ const { ERR_SOCKET_CLOSED_BEFORE_CONNECTION, ERR_MISSING_ARGS, }, - aggregateErrors, - errnoException, - exceptionWithHostPort, + ErrnoException, + ExceptionWithHostPort, genericNodeError, - uvExceptionWithHostPort, + NodeAggregateError, + UVExceptionWithHostPort, } = require('internal/errors'); const { isUint8Array } = require('internal/util/types'); const { queueMicrotask } = require('internal/process/task_queues'); @@ -425,7 +425,7 @@ function Socket(options) { // which cannot be opened. This is difficult to test as most // un-openable fds will throw on `createHandle` if (err) - throw errnoException(err, 'open'); + throw new ErrnoException(err, 'open'); this[async_id_symbol] = this._handle.getAsyncId(); @@ -434,7 +434,7 @@ function Socket(options) { // Make stdout and stderr blocking on Windows err = this._handle.setBlocking(true); if (err) - throw errnoException(err, 'setBlocking'); + throw new ErrnoException(err, 'setBlocking'); this._writev = null; this._write = makeSyncWrite(fd); @@ -533,7 +533,7 @@ Socket.prototype._final = function(cb) { if (err === 1 || err === UV_ENOTCONN) // synchronous finish return cb(); else if (err !== 0) - return cb(errnoException(err, 'shutdown')); + return cb(new ErrnoException(err, 'shutdown')); }; function afterShutdown() { @@ -698,7 +698,7 @@ function tryReadStart(socket) { socket._handle.reading = true; const err = socket._handle.readStart(); if (err) - socket.destroy(errnoException(err, 'read')); + socket.destroy(new ErrnoException(err, 'read')); } // Just call handle.readStart until we have enough in the buffer @@ -747,7 +747,7 @@ Socket.prototype.pause = function() { if (!this.destroyed) { const err = this._handle.readStop(); if (err) - this.destroy(errnoException(err, 'read')); + this.destroy(new ErrnoException(err, 'read')); } } return stream.Duplex.prototype.pause.call(this); @@ -816,7 +816,7 @@ Socket.prototype._destroy = function(exception, cb) { this.emit('close', isException); }); if (err) - this.emit('error', errnoException(err, 'reset')); + this.emit('error', new ErrnoException(err, 'reset')); } else if (this._closeAfterHandlingError) { // Enqueue closing the socket as a microtask, so that the socket can be // accessible when an `error` event is handled in the `next tick queue`. @@ -1051,7 +1051,7 @@ function internalConnect( err = checkBindError(err, localPort, self._handle); if (err) { - const ex = exceptionWithHostPort(err, 'bind', localAddress, localPort); + const ex = new ExceptionWithHostPort(err, 'bind', localAddress, localPort); self.destroy(ex); return; } @@ -1087,7 +1087,7 @@ function internalConnect( details = sockname.address + ':' + sockname.port; } - const ex = exceptionWithHostPort(err, 'connect', address, port, details); + const ex = new ExceptionWithHostPort(err, 'connect', address, port, details); self.destroy(ex); } else if ((addressType === 6 || addressType === 4) && hasObserver('net')) { startPerf(self, kPerfHooksNetConnectContext, { type: 'net', name: 'connect', detail: { host: address, port } }); @@ -1111,7 +1111,7 @@ function internalConnectMultiple(context, canceled) { return; } - self.destroy(aggregateErrors(context.errors)); + self.destroy(new NodeAggregateError(context.errors)); return; } @@ -1142,7 +1142,7 @@ function internalConnectMultiple(context, canceled) { err = checkBindError(err, localPort, self._handle); if (err) { - ArrayPrototypePush(context.errors, exceptionWithHostPort(err, 'bind', localAddress, localPort)); + ArrayPrototypePush(context.errors, new ExceptionWithHostPort(err, 'bind', localAddress, localPort)); internalConnectMultiple(context); return; } @@ -1173,7 +1173,7 @@ function internalConnectMultiple(context, canceled) { details = sockname.address + ':' + sockname.port; } - ArrayPrototypePush(context.errors, exceptionWithHostPort(err, 'connect', address, port, details)); + ArrayPrototypePush(context.errors, new ExceptionWithHostPort(err, 'connect', address, port, details)); internalConnectMultiple(context); return; } @@ -1592,11 +1592,11 @@ function afterConnect(status, handle, req, readable, writable) { if (req.localAddress && req.localPort) { details = req.localAddress + ':' + req.localPort; } - const ex = exceptionWithHostPort(status, - 'connect', - req.address, - req.port, - details); + const ex = new ExceptionWithHostPort(status, + 'connect', + req.address, + req.port, + details); if (details) { ex.localAddress = req.localAddress; ex.localPort = req.localPort; @@ -1631,11 +1631,11 @@ function createConnectionError(req, status) { details = req.localAddress + ':' + req.localPort; } - const ex = exceptionWithHostPort(status, - 'connect', - req.address, - req.port, - details); + const ex = new ExceptionWithHostPort(status, + 'connect', + req.address, + req.port, + details); if (details) { ex.localAddress = req.localAddress; ex.localPort = req.localPort; @@ -1852,8 +1852,8 @@ function setupListenHandle(address, port, addressType, backlog, fd, flags) { rval = createServerHandle(address, port, addressType, fd, flags); if (typeof rval === 'number') { - const error = uvExceptionWithHostPort(rval, 'listen', address, port); - queueMicrotask(emitErrorNT, this, error); + const error = new UVExceptionWithHostPort(rval, 'listen', address, port); + queueMicrotask(() => emitErrorNT(this, error)); return; } this._handle = rval; @@ -1869,7 +1869,7 @@ function setupListenHandle(address, port, addressType, backlog, fd, flags) { const err = this._handle.listen(backlog || 511); if (err) { - const ex = uvExceptionWithHostPort(err, 'listen', address, port); + const ex = new UVExceptionWithHostPort(err, 'listen', address, port); this._handle.close(); this._handle = null; defaultTriggerAsyncIdScope(this[async_id_symbol], @@ -1937,7 +1937,7 @@ function listenInCluster(server, address, port, addressType, err = checkBindError(err, port, handle); if (err) { - const ex = exceptionWithHostPort(err, 'bind', address, port); + const ex = new ExceptionWithHostPort(err, 'bind', address, port); return server.emit('error', ex); } @@ -2014,6 +2014,12 @@ Server.prototype.listen = function(...args) { // (path[, backlog][, cb]) or (options[, cb]) // where path or options.path is a UNIX domain socket or Windows pipe if (options.path && isPipeName(options.path)) { + // We can not call fchmod on abstract unix socket + if (options.path[0] === '\0' && + (options.readableAll || options.writableAll)) { + const msg = 'can not set readableAll or writableAllt to true when path is abstract unix socket'; + throw new ERR_INVALID_ARG_VALUE('options', options, msg); + } const pipeName = this._pipeName = options.path; backlog = options.backlog || backlogFromArgs; listenInCluster(this, @@ -2045,7 +2051,7 @@ Server.prototype.listen = function(...args) { if (err) { this._handle.close(); this._handle = null; - throw errnoException(err, 'uv_pipe_chmod'); + throw new ErrnoException(err, 'uv_pipe_chmod'); } } return this; @@ -2086,7 +2092,7 @@ Server.prototype.address = function() { const out = {}; const err = this._handle.getsockname(out); if (err) { - throw errnoException(err, 'address'); + throw new ErrnoException(err, 'address'); } return out; } else if (this._pipeName) { @@ -2102,7 +2108,7 @@ function onconnection(err, clientHandle) { debug('onconnection'); if (err) { - self.emit('error', errnoException(err, 'accept')); + self.emit('error', new ErrnoException(err, 'accept')); return; } diff --git a/lib/os.js b/lib/os.js index 1ad17c635182d4..bef4936c7c0bbe 100644 --- a/lib/os.js +++ b/lib/os.js @@ -65,7 +65,7 @@ function getCheckedFunction(fn) { const ctx = {}; const ret = fn(ctx); if (ret === undefined) { - throw new ERR_SYSTEM_ERROR(ctx); + throw new ERR_SYSTEM_ERROR.HideStackFramesError(ctx); } return ret; }); diff --git a/lib/repl.js b/lib/repl.js index 006c0f0b65f679..1fcf5760d7684f 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -90,7 +90,7 @@ const { StringPrototypeSplit, StringPrototypeStartsWith, StringPrototypeTrim, - StringPrototypeTrimLeft, + StringPrototypeTrimStart, StringPrototypeToLocaleLowerCase, Symbol, SyntaxError, @@ -1326,7 +1326,7 @@ function complete(line, callback) { let completeOn, group; // Ignore right whitespace. It could change the outcome. - line = StringPrototypeTrimLeft(line); + line = StringPrototypeTrimStart(line); let filter = ''; diff --git a/lib/tty.js b/lib/tty.js index fb0319f93ebe67..aa929cd9ba0d08 100644 --- a/lib/tty.js +++ b/lib/tty.js @@ -74,7 +74,7 @@ ReadStream.prototype.setRawMode = function(flag) { flag = !!flag; const err = this._handle?.setRawMode(flag); if (err) { - this.emit('error', errors.errnoException(err, 'setRawMode')); + this.emit('error', new errors.ErrnoException(err, 'setRawMode')); return this; } this.isRaw = flag; @@ -129,7 +129,7 @@ WriteStream.prototype._refreshSize = function() { const winSize = new Array(2); const err = this._handle.getWindowSize(winSize); if (err) { - this.emit('error', errors.errnoException(err, 'getWindowSize')); + this.emit('error', new errors.ErrnoException(err, 'getWindowSize')); return; } const { 0: newCols, 1: newRows } = winSize; diff --git a/lib/util.js b/lib/util.js index 4876b650282223..0e9afc018fc952 100644 --- a/lib/util.js +++ b/lib/util.js @@ -32,6 +32,7 @@ const { DatePrototypeGetMonth, DatePrototypeGetSeconds, Error, + ErrorCaptureStackTrace, FunctionPrototypeBind, NumberIsSafeInteger, ObjectDefineProperties, @@ -43,6 +44,7 @@ const { ObjectValues, ReflectApply, StringPrototypePadStart, + StringPrototypeToWellFormed, } = primordials; const { @@ -51,9 +53,9 @@ const { ERR_INVALID_ARG_TYPE, ERR_OUT_OF_RANGE, }, - errnoException, - exceptionWithHostPort, - hideStackFrames, + isErrorStackTraceLimitWritable, + ErrnoException, + ExceptionWithHostPort, } = require('internal/errors'); const { format, @@ -74,7 +76,6 @@ const { getSystemErrorMap, getSystemErrorName: internalErrorName, promisify, - toUSVString, defineLazyProperties, } = require('internal/util'); @@ -278,16 +279,17 @@ function _extend(target, source) { return target; } -const callbackifyOnRejected = hideStackFrames((reason, cb) => { +const callbackifyOnRejected = (reason, cb) => { // `!reason` guard inspired by bluebird (Ref: https://goo.gl/t5IS6M). // Because `null` is a special error value in callbacks which means "no error // occurred", we error-wrap so the callback consumer can distinguish between // "the promise rejected with null" or "the promise fulfilled with undefined". if (!reason) { - reason = new ERR_FALSY_VALUE_REJECTION(reason); + reason = new ERR_FALSY_VALUE_REJECTION.HideStackFramesError(reason); + ErrorCaptureStackTrace(reason, callbackifyOnRejected); } return cb(reason); -}); +}; /** * @template {(...args: any[]) => Promise} T @@ -345,11 +347,37 @@ function getSystemErrorName(err) { return internalErrorName(err); } +function _errnoException(...args) { + if (isErrorStackTraceLimitWritable()) { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + const e = new ErrnoException(...args); + Error.stackTraceLimit = limit; + ErrorCaptureStackTrace(e, _exceptionWithHostPort); + return e; + } + return new ErrnoException(...args); +} + +function _exceptionWithHostPort(...args) { + if (isErrorStackTraceLimitWritable()) { + const limit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + const e = new ExceptionWithHostPort(...args); + Error.stackTraceLimit = limit; + ErrorCaptureStackTrace(e, _exceptionWithHostPort); + return e; + } + return new ExceptionWithHostPort(...args); +} + // Keep the `exports =` so that various functions can still be monkeypatched module.exports = { - _errnoException: errnoException, - _exceptionWithHostPort: exceptionWithHostPort, - _extend, + _errnoException, + _exceptionWithHostPort, + _extend: deprecate(_extend, + 'The `util._extend` API is deprecated. Please use Object.assign() instead.', + 'DEP0060'), callbackify, debug: debuglog, debuglog, @@ -360,9 +388,15 @@ module.exports = { getSystemErrorName, inherits, inspect, - isArray: ArrayIsArray, - isBoolean, - isBuffer, + isArray: deprecate(ArrayIsArray, + 'The `util.isArray` API is deprecated. Please use `Array.isArray()` instead.', + 'DEP0044'), + isBoolean: deprecate(isBoolean, + 'The `util.isBoolean` API is deprecated. Please use `typeof arg === "boolean"` instead.', + 'DEP0045'), + isBuffer: deprecate(isBuffer, + 'The `util.isBuffer` API is deprecated. Please use `Buffer.isBuffer()` instead.', + 'DEP0046'), isDeepStrictEqual(a, b) { if (internalDeepEqual === undefined) { internalDeepEqual = require('internal/util/comparisons') @@ -370,22 +404,57 @@ module.exports = { } return internalDeepEqual(a, b); }, - isNull, - isNullOrUndefined, - isNumber, - isString, - isSymbol, - isUndefined, - isRegExp: types.isRegExp, - isObject, - isDate: types.isDate, - isError, - isFunction, - isPrimitive, - log, + isNull: deprecate(isNull, + 'The `util.isNull` API is deprecated. Please use `arg === null` instead.', + 'DEP0050'), + isNullOrUndefined: deprecate(isNullOrUndefined, + 'The `util.isNullOrUndefined` API is deprecated. ' + + 'Please use `arg === null || arg === undefined` instead.', + 'DEP0051'), + isNumber: deprecate(isNumber, + 'The `util.isNumber` API is deprecated. Please use `typeof arg === "number"` instead.', + 'DEP0052'), + isString: deprecate(isString, + 'The `util.isString` API is deprecated. Please use `typeof arg === "string"` instead.', + 'DEP0056'), + isSymbol: deprecate(isSymbol, + 'The `util.isSymbol` API is deprecated. Please use `arg === "symbol"` instead.', + 'DEP0057'), + isUndefined: deprecate(isUndefined, + 'The `util.isUndefined` API is deprecated. Please use `arg === undefined` instead.', + 'DEP0058'), + isRegExp: deprecate(types.isRegExp, + 'The `util.isRegExp` API is deprecated. Please use `arg instanceof RegExp` instead.', + 'DEP0055'), + isObject: deprecate(isObject, + 'The `util.isObject` API is deprecated. ' + + 'Please use `arg !== null && typeof arg === "object"` instead.', + 'DEP0053'), + isDate: deprecate(types.isDate, + 'The `util.isDate` API is deprecated. Please use `arg instanceof Date` instead.', + 'DEP0047'), + isError: deprecate(isError, + 'The `util.isError` API is deprecated. ' + + 'Please use `ObjectPrototypeToString(e) === "[object Error]" ' + + '|| e instanceof Error` instead.', + 'DEP0048'), + isFunction: deprecate(isFunction, + 'The `util.isFunction` API is deprecated. Please use `typeof arg === "function"` instead.', + 'DEP0049'), + isPrimitive: deprecate(isPrimitive, + 'The `util.isPrimitive` API is deprecated. ' + + 'Please use `arg === null || ' + + '(typeof arg !== "object" && typeof arg !== "function")` instead.', + 'DEP0054'), + log: deprecate(log, + 'The `util.log API is deprecated. ' + + 'Please use console.log() with a custom formatter or a third-party logger instead.', + 'DEP0059'), promisify, stripVTControlCharacters, - toUSVString, + toUSVString(input) { + return StringPrototypeToWellFormed(`${input}`); + }, get transferableAbortSignal() { return lazyAbortController().transferableAbortSignal; }, diff --git a/lib/zlib.js b/lib/zlib.js index c98a1b96b5dee8..dbf911c7f56be4 100644 --- a/lib/zlib.js +++ b/lib/zlib.js @@ -211,10 +211,10 @@ const checkFiniteNumber = hideStackFrames((number, name) => { return false; } - validateNumber(number, name); + validateNumber.withoutStackTrace(number, name); // Infinite numbers - throw new ERR_OUT_OF_RANGE(name, 'a finite number', number); + throw new ERR_OUT_OF_RANGE.HideStackFramesError(name, 'a finite number', number); }); // 1. Returns def for number when it's undefined or NaN @@ -223,12 +223,12 @@ const checkFiniteNumber = hideStackFrames((number, name) => { // 4. Throws ERR_OUT_OF_RANGE for infinite numbers or numbers > upper or < lower const checkRangesOrGetDefault = hideStackFrames( (number, name, lower, upper, def) => { - if (!checkFiniteNumber(number, name)) { + if (!checkFiniteNumber.withoutStackTrace(number, name)) { return def; } if (number < lower || number > upper) { - throw new ERR_OUT_OF_RANGE(name, - `>= ${lower} and <= ${upper}`, number); + throw new ERR_OUT_OF_RANGE.HideStackFramesError(name, + `>= ${lower} and <= ${upper}`, number); } return number; }, diff --git a/node.gni b/node.gni new file mode 100644 index 00000000000000..2be97a17a2f710 --- /dev/null +++ b/node.gni @@ -0,0 +1,67 @@ +# Copyright 2019 the V8 project authors. All rights reserved. +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please take a look at node.gyp if you are making changes to build system. + +# Embedder options. +declare_args() { + # The location of Node.js in source code tree. + node_path = "//node" + + # The location of V8, use the one from node's deps by default. + node_v8_path = "$node_path/deps/v8" + + # The NODE_MODULE_VERSION defined in node_version.h. + node_module_version = exec_script("$node_path/tools/getmoduleversion.py", [], "value") + + # Support for external shareable builtins. + # TODO(zcbenz): This is currently copied from configure.py, we should share + # the list between configure.py and GN configurations. + node_builtin_shareable_builtins = [ + "deps/cjs-module-lexer/lexer.js", + "deps/cjs-module-lexer/dist/lexer.js", + "deps/undici/undici.js", + ] +} + +# Equivalent of gyp file's configurations. +declare_args() { + # Enable the V8 inspector protocol for use with node. + node_enable_inspector = true + + # Build node with SSL support. + # The variable is called "openssl" for parity with node's GYP build. + node_use_openssl = true + + # Use the specified path to system CA (PEM format) in addition to + # the BoringSSL supplied CA store or compiled-in Mozilla CA copy. + node_openssl_system_ca_path = "" + + # Initialize v8 platform during node.js startup. + node_use_v8_platform = true + + # Custom build tag. + node_tag = "" + + # V8 options to pass, see `node --v8-options` for examples. + node_v8_options = "" + + # Provide a custom URL prefix for the `process.release` properties + # `sourceUrl` and `headersUrl`. When compiling a release build, this will + # default to https://nodejs.org/download/release/'). + node_release_urlbase = "" + + # Use code cache to speed up startup. Disabled for cross compilation. + node_use_node_code_cache = host_os == target_os && host_cpu == target_cpu + + # Use snapshot to speed up startup. + # TODO(zcbenz): node_mksnapshot is not ready for cross-os compilation. + node_use_node_snapshot = host_os == target_os +} + +assert(!node_enable_inspector || node_use_openssl, + "node_enable_inspector requires node_use_openssl") diff --git a/node.gyp b/node.gyp index 3f6915b266fc38..811d15b0df9ad3 100644 --- a/node.gyp +++ b/node.gyp @@ -112,6 +112,7 @@ 'src/node_main_instance.cc', 'src/node_messaging.cc', 'src/node_metadata.cc', + 'src/node_modules.cc', 'src/node_options.cc', 'src/node_os.cc', 'src/node_perf.cc', @@ -234,6 +235,7 @@ 'src/node_messaging.h', 'src/node_metadata.h', 'src/node_mutex.h', + 'src/node_modules.h', 'src/node_object_wrap.h', 'src/node_options.h', 'src/node_options-inl.h', @@ -816,6 +818,7 @@ 'deps/googletest/googletest.gyp:gtest_prod', 'deps/histogram/histogram.gyp:histogram', 'deps/uvwasi/uvwasi.gyp:uvwasi', + 'deps/simdjson/simdjson.gyp:simdjson', 'deps/simdutf/simdutf.gyp:simdutf', 'deps/ada/ada.gyp:ada', 'node_js2c#host', @@ -1047,6 +1050,7 @@ 'deps/googletest/googletest.gyp:gtest_main', 'deps/histogram/histogram.gyp:histogram', 'deps/uvwasi/uvwasi.gyp:uvwasi', + 'deps/simdjson/simdjson.gyp:simdjson', 'deps/simdutf/simdutf.gyp:simdutf', 'deps/ada/ada.gyp:ada', ], diff --git a/node.gypi b/node.gypi index 9138317c62c7cd..95133818dff7c7 100644 --- a/node.gypi +++ b/node.gypi @@ -141,6 +141,7 @@ } ], [ 'node_shared_zlib=="false"', { 'dependencies': [ 'deps/zlib/zlib.gyp:zlib' ], + 'defines': [ 'NODE_BUNDLED_ZLIB' ], 'conditions': [ [ 'force_load=="true"', { 'xcode_settings': { diff --git a/src/api/environment.cc b/src/api/environment.cc index 6a6164b6d29443..7e30a35ad7e611 100644 --- a/src/api/environment.cc +++ b/src/api/environment.cc @@ -313,6 +313,8 @@ void SetIsolateMiscHandlers(v8::Isolate* isolate, const IsolateSettings& s) { void SetIsolateUpForNode(v8::Isolate* isolate, const IsolateSettings& settings) { + Isolate::Scope isolate_scope(isolate); + SetIsolateErrorHandlers(isolate, settings); SetIsolateMiscHandlers(isolate, settings); } @@ -354,6 +356,9 @@ Isolate* NewIsolate(Isolate::CreateParams* params, SetIsolateCreateParamsForNode(params); Isolate::Initialize(isolate, *params); + + Isolate::Scope isolate_scope(isolate); + if (snapshot_data == nullptr) { // If in deserialize mode, delay until after the deserialization is // complete. @@ -428,6 +433,8 @@ Environment* CreateEnvironment( ThreadId thread_id, std::unique_ptr inspector_parent_handle) { Isolate* isolate = isolate_data->isolate(); + + Isolate::Scope isolate_scope(isolate); HandleScope handle_scope(isolate); const bool use_snapshot = context.IsEmpty(); @@ -727,7 +734,7 @@ Maybe InitializeContextRuntime(Local context) { } } else if (per_process::cli_options->disable_proto != "") { // Validated in ProcessGlobalArgs - OnFatalError("InitializeContextRuntime()", "invalid --disable-proto mode"); + UNREACHABLE("invalid --disable-proto mode"); } return Just(true); diff --git a/src/async_wrap.cc b/src/async_wrap.cc index 42cddc52aed285..8b784cddf41603 100644 --- a/src/async_wrap.cc +++ b/src/async_wrap.cc @@ -372,8 +372,9 @@ void AsyncWrap::CreatePerContextProperties(Local target, Local unused, Local context, void* priv) { - Environment* env = Environment::GetCurrent(context); - Isolate* isolate = env->isolate(); + Realm* realm = Realm::GetCurrent(context); + Environment* env = realm->env(); + Isolate* isolate = realm->isolate(); HandleScope scope(isolate); PropertyAttribute ReadOnlyDontDelete = @@ -446,13 +447,16 @@ void AsyncWrap::CreatePerContextProperties(Local target, #undef FORCE_SET_TARGET_FIELD - env->set_async_hooks_init_function(Local()); - env->set_async_hooks_before_function(Local()); - env->set_async_hooks_after_function(Local()); - env->set_async_hooks_destroy_function(Local()); - env->set_async_hooks_promise_resolve_function(Local()); - env->set_async_hooks_callback_trampoline(Local()); - env->set_async_hooks_binding(target); + // TODO(legendecas): async hook functions are not realm-aware yet. + // This simply avoid overriding principal realm's functions when a + // ShadowRealm initializes the binding. + realm->set_async_hooks_init_function(Local()); + realm->set_async_hooks_before_function(Local()); + realm->set_async_hooks_after_function(Local()); + realm->set_async_hooks_destroy_function(Local()); + realm->set_async_hooks_promise_resolve_function(Local()); + realm->set_async_hooks_callback_trampoline(Local()); + realm->set_async_hooks_binding(target); } void AsyncWrap::RegisterExternalReferences( diff --git a/src/base64_version.h b/src/base64_version.h index fa492a293b40e1..c3737f4beebfcb 100644 --- a/src/base64_version.h +++ b/src/base64_version.h @@ -2,5 +2,5 @@ // Refer to tools/dep_updaters/update-base64.sh #ifndef SRC_BASE64_VERSION_H_ #define SRC_BASE64_VERSION_H_ -#define BASE64_VERSION "0.5.0" +#define BASE64_VERSION "0.5.1" #endif // SRC_BASE64_VERSION_H_ diff --git a/src/base_object_types.h b/src/base_object_types.h index cb034f1d62b681..9cfe6a77f71708 100644 --- a/src/base_object_types.h +++ b/src/base_object_types.h @@ -17,7 +17,8 @@ namespace node { V(blob_binding_data, BlobBindingData) \ V(process_binding_data, process::BindingData) \ V(timers_binding_data, timers::BindingData) \ - V(url_binding_data, url::BindingData) + V(url_binding_data, url::BindingData) \ + V(modules_binding_data, modules::BindingData) #define UNSERIALIZABLE_BINDING_TYPES(V) \ V(http2_binding_data, http2::BindingData) \ diff --git a/src/crypto/crypto_random.cc b/src/crypto/crypto_random.cc index 245f3529186964..48154df7dc91ed 100644 --- a/src/crypto/crypto_random.cc +++ b/src/crypto/crypto_random.cc @@ -75,10 +75,10 @@ Maybe RandomPrimeTraits::EncodeOutput( size_t size = BN_num_bytes(params.prime.get()); std::shared_ptr store = ArrayBuffer::NewBackingStore(env->isolate(), size); - BN_bn2binpad( - params.prime.get(), - reinterpret_cast(store->Data()), - size); + CHECK_EQ(static_cast(size), + BN_bn2binpad(params.prime.get(), + reinterpret_cast(store->Data()), + size)); *result = ArrayBuffer::New(env->isolate(), store); return Just(true); } diff --git a/src/dataqueue/queue.cc b/src/dataqueue/queue.cc index 994b82a8751f6e..c3de4eb570beab 100644 --- a/src/dataqueue/queue.cc +++ b/src/dataqueue/queue.cc @@ -162,6 +162,27 @@ class DataQueueImpl final : public DataQueue, "entries", entries_, "std::vector>"); } + void addBackpressureListener(BackpressureListener* listener) override { + if (idempotent_) return; + DCHECK_NOT_NULL(listener); + backpressure_listeners_.insert(listener); + } + + void removeBackpressureListener(BackpressureListener* listener) override { + if (idempotent_) return; + DCHECK_NOT_NULL(listener); + backpressure_listeners_.erase(listener); + } + + void NotifyBackpressure(size_t amount) { + if (idempotent_) return; + for (auto& listener : backpressure_listeners_) listener->EntryRead(amount); + } + + bool HasBackpressureListeners() const noexcept { + return !backpressure_listeners_.empty(); + } + std::shared_ptr get_reader() override; SET_MEMORY_INFO_NAME(DataQueue) SET_SELF_SIZE(DataQueueImpl) @@ -173,6 +194,8 @@ class DataQueueImpl final : public DataQueue, std::optional capped_size_ = std::nullopt; bool locked_to_reader_ = false; + std::unordered_set backpressure_listeners_; + friend class DataQueue; friend class IdempotentDataQueueReader; friend class NonIdempotentDataQueueReader; @@ -433,6 +456,17 @@ class NonIdempotentDataQueueReader final return; } + // If there is a backpressure listener, lets report on how much data + // was actually read. + if (data_queue_->HasBackpressureListeners()) { + // How much did we actually read? + size_t read = 0; + for (uint64_t n = 0; n < count; n++) { + read += vecs[n].len; + } + data_queue_->NotifyBackpressure(read); + } + // Now that we have updated this readers state, we can forward // everything on to the outer next. std::move(next)(status, vecs, count, std::move(done)); diff --git a/src/dataqueue/queue.h b/src/dataqueue/queue.h index 9bf34ffb6572aa..a37bd27549986e 100644 --- a/src/dataqueue/queue.h +++ b/src/dataqueue/queue.h @@ -141,6 +141,14 @@ class DataQueue : public MemoryRetainer { using Done = bob::Done; }; + // A BackpressureListener can be used to receive notifications + // when a non-idempotent DataQueue releases entries as they + // are consumed. + class BackpressureListener { + public: + virtual void EntryRead(size_t amount) = 0; + }; + // A DataQueue::Entry represents a logical chunk of data in the queue. // The entry may or may not represent memory-resident data. It may // or may not be consumable more than once. @@ -285,6 +293,10 @@ class DataQueue : public MemoryRetainer { // been set, maybeCapRemaining() will return std::nullopt. virtual std::optional maybeCapRemaining() const = 0; + // BackpressureListeners only work on non-idempotent DataQueues. + virtual void addBackpressureListener(BackpressureListener* listener) = 0; + virtual void removeBackpressureListener(BackpressureListener* listener) = 0; + static void Initialize(Environment* env, v8::Local target); static void RegisterExternalReferences(ExternalReferenceRegistry* registry); }; diff --git a/src/env-inl.h b/src/env-inl.h index 793dc72e0dbad8..d5124e73e7c4c6 100644 --- a/src/env-inl.h +++ b/src/env-inl.h @@ -775,13 +775,18 @@ inline void Environment::ThrowRangeError(const char* errmsg) { ThrowError(v8::Exception::RangeError, errmsg); } -inline void Environment::ThrowError( - v8::Local (*fun)(v8::Local), - const char* errmsg) { +inline void Environment::ThrowError(V8ExceptionConstructorOld fun, + const char* errmsg) { v8::HandleScope handle_scope(isolate()); isolate()->ThrowException(fun(OneByteString(isolate(), errmsg))); } +inline void Environment::ThrowError(V8ExceptionConstructorNew fun, + const char* errmsg) { + v8::HandleScope handle_scope(isolate()); + isolate()->ThrowException(fun(OneByteString(isolate(), errmsg), {})); +} + inline void Environment::ThrowErrnoException(int errorno, const char* syscall, const char* message, diff --git a/src/env.cc b/src/env.cc index 4a25309449c8c7..f921a545f1be3e 100644 --- a/src/env.cc +++ b/src/env.cc @@ -30,6 +30,7 @@ #include #include #include +#include #include namespace node { @@ -55,6 +56,8 @@ using v8::Number; using v8::Object; using v8::ObjectTemplate; using v8::Private; +using v8::Promise; +using v8::PromiseHookType; using v8::Script; using v8::SnapshotCreator; using v8::StackTrace; @@ -62,6 +65,7 @@ using v8::String; using v8::Symbol; using v8::TracingController; using v8::TryCatch; +using v8::Uint32; using v8::Undefined; using v8::Value; using v8::WrapperDescriptor; @@ -349,6 +353,8 @@ IsolateDataSerializeInfo IsolateData::Serialize(SnapshotCreator* creator) { void IsolateData::DeserializeProperties(const IsolateDataSerializeInfo* info) { size_t i = 0; + + v8::Isolate::Scope isolate_scope(isolate_); HandleScope handle_scope(isolate_); if (per_process::enabled_debug_list.enabled(DebugCategory::MKSNAPSHOT)) { @@ -431,6 +437,7 @@ void IsolateData::CreateProperties() { // One byte because our strings are ASCII and we can safely skip V8's UTF-8 // decoding step. + v8::Isolate::Scope isolate_scope(isolate_); HandleScope handle_scope(isolate_); #define V(PropertyName, StringValue) \ @@ -501,6 +508,7 @@ void IsolateData::CreateProperties() { binding::CreateInternalBindingTemplates(this); contextify::ContextifyContext::InitializeGlobalTemplates(this); + CreateEnvProxyTemplate(this); } constexpr uint16_t kDefaultCppGCEmebdderID = 0x90de; @@ -1650,10 +1658,13 @@ void AsyncHooks::MemoryInfo(MemoryTracker* tracker) const { void AsyncHooks::grow_async_ids_stack() { async_ids_stack_.reserve(async_ids_stack_.Length() * 3); - env()->async_hooks_binding()->Set( - env()->context(), - env()->async_ids_stack_string(), - async_ids_stack_.GetJSArray()).Check(); + env() + ->principal_realm() + ->async_hooks_binding() + ->Set(env()->context(), + env()->async_ids_stack_string(), + async_ids_stack_.GetJSArray()) + .Check(); } void AsyncHooks::FailWithCorruptedAsyncStack(double expected_async_id) { @@ -1832,6 +1843,60 @@ void Environment::BuildEmbedderGraph(Isolate* isolate, tracker.Track(env); } +std::optional GetPromiseId(Environment* env, Local promise) { + Local id_val; + if (!promise->GetPrivate(env->context(), env->promise_trace_id()) + .ToLocal(&id_val) || + !id_val->IsUint32()) { + return std::nullopt; + } + return id_val.As()->Value(); +} + +void Environment::TracePromises(PromiseHookType type, + Local promise, + Local parent) { + // We don't care about the execution of promises, just the + // creation/resolution. + if (type == PromiseHookType::kBefore || type == PromiseHookType::kAfter) { + return; + } + Isolate* isolate = Isolate::GetCurrent(); + Local context = isolate->GetCurrentContext(); + Environment* env = Environment::GetCurrent(context); + if (env == nullptr) return; + + std::optional parent_id; + if (!parent.IsEmpty() && parent->IsPromise()) { + parent_id = GetPromiseId(env, parent.As()); + } + + uint32_t id = 0; + std::string action; + if (type == PromiseHookType::kInit) { + id = env->trace_promise_id_counter_++; + promise->SetPrivate( + context, env->promise_trace_id(), Uint32::New(isolate, id)); + action = "created"; + } else if (type == PromiseHookType::kResolve) { + auto opt = GetPromiseId(env, promise); + if (!opt.has_value()) return; + id = opt.value(); + action = "resolved"; + } else { + UNREACHABLE(); + } + + FPrintF(stderr, "[--trace-promises] "); + if (parent_id.has_value()) { + FPrintF(stderr, "promise #%d ", parent_id.value()); + } + FPrintF(stderr, "%s promise #%d\n", action, id); + // TODO(joyeecheung): we can dump the native stack trace too if the + // JS stack trace is empty i.e. it may be resolved on the native side. + PrintCurrentStackTrace(isolate); +} + size_t Environment::NearHeapLimitCallback(void* data, size_t current_heap_limit, size_t initial_heap_limit) { diff --git a/src/env.h b/src/env.h index afe67d2237ae69..244b8828c73a18 100644 --- a/src/env.h +++ b/src/env.h @@ -934,6 +934,9 @@ class Environment : public MemoryRetainer { inline void RemoveCleanupHook(CleanupQueue::Callback cb, void* arg); void RunCleanup(); + static void TracePromises(v8::PromiseHookType type, + v8::Local promise, + v8::Local parent); static size_t NearHeapLimitCallback(void* data, size_t current_heap_limit, size_t initial_heap_limit); @@ -1016,8 +1019,14 @@ class Environment : public MemoryRetainer { }; private: - inline void ThrowError(v8::Local (*fun)(v8::Local), - const char* errmsg); + // V8 has changed the constructor of exceptions, support both APIs before Node + // updates to V8 12.1. + using V8ExceptionConstructorOld = + v8::Local (*)(v8::Local); + using V8ExceptionConstructorNew = + v8::Local (*)(v8::Local, v8::Local); + inline void ThrowError(V8ExceptionConstructorOld fun, const char* errmsg); + inline void ThrowError(V8ExceptionConstructorNew fun, const char* errmsg); void TrackContext(v8::Local context); void UntrackContext(v8::Local context); @@ -1088,6 +1097,7 @@ class Environment : public MemoryRetainer { uint32_t module_id_counter_ = 0; uint32_t script_id_counter_ = 0; uint32_t function_id_counter_ = 0; + uint32_t trace_promise_id_counter_ = 0; AliasedInt32Array exit_info_; diff --git a/src/env_properties.h b/src/env_properties.h index 7356846d6e7085..916dc4033fa833 100644 --- a/src/env_properties.h +++ b/src/env_properties.h @@ -28,6 +28,7 @@ V(napi_wrapper, "node:napi:wrapper") \ V(untransferable_object_private_symbol, "node:untransferableObject") \ V(exit_info_private_symbol, "node:exit_info_private_symbol") \ + V(promise_trace_id, "node:promise_trace_id") \ V(require_private_symbol, "node:require_private_symbol") // Symbols are per-isolate primitives but Environment proxies them diff --git a/src/inspector/BUILD.gn b/src/inspector/BUILD.gn new file mode 100644 index 00000000000000..909fd14345fcd9 --- /dev/null +++ b/src/inspector/BUILD.gn @@ -0,0 +1,14 @@ +############################################################################## +# # +# DO NOT EDIT THIS FILE! # +# # +############################################################################## + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please modify the gyp files if you are making changes to build system. + +import("unofficial.gni") + +inspector_gn_build("inspector") { +} diff --git a/src/inspector/unofficial.gni b/src/inspector/unofficial.gni new file mode 100644 index 00000000000000..b562109e94c17d --- /dev/null +++ b/src/inspector/unofficial.gni @@ -0,0 +1,81 @@ +# Copyright (c) 2013-2019 GitHub Inc. +# Copyright 2019 the V8 project authors. All rights reserved. +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("../../node.gni") +import("$node_v8_path/gni/v8.gni") + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("inspector_gn_build") { + group(target_name) { + forward_variables_from(invoker, "*") + deps = [ + ":node_protocol_generated_sources", + ":v8_inspector_compress_protocol_json", + ] + } + + node_gen_dir = get_label_info("../..", "target_gen_dir") + protocol_tool_path = "../../tools/inspector_protocol" + + gypi_values = exec_script( + "../../tools/gypi_to_gn.py", + [ rebase_path("node_inspector.gypi"), + "--replace=<(SHARED_INTERMEDIATE_DIR)=$node_gen_dir", + "--replace=<(protocol_tool_path)=$protocol_tool_path" ], + "scope", + [ "node_inspector.gypi" ]) + + action("node_protocol_generated_sources") { + script = "$protocol_tool_path/code_generator.py" + + deps = [ ":node_protocol_json" ] + + outputs = gypi_values.node_inspector_generated_sources + inputs = gypi_values.node_protocol_files + [ + "node_protocol_config.json", + "$node_gen_dir/src/node_protocol.json", + ] + + args = [ + "--jinja_dir", + # jinja is in third_party. + rebase_path("//third_party/", root_build_dir), + "--output_base", + rebase_path("$node_gen_dir/src", root_build_dir), + "--config", + rebase_path("node_protocol_config.json", root_build_dir), + ] + } + + action("v8_inspector_compress_protocol_json") { + script = "../../tools/compress_json.py" + deps = [ ":concatenate_protocols" ] + inputs = [ "$target_gen_dir/concatenated_protocol.json" ] + outputs = [ "$target_gen_dir/v8_inspector_protocol_json.h" ] + args = rebase_path(inputs + outputs, root_build_dir) + } + + action("concatenate_protocols") { + script = "$protocol_tool_path/concatenate_protocols.py" + deps = [ ":node_protocol_json" ] + inputs = [ + "$node_gen_dir/src/js_protocol.json", + "$node_gen_dir/src/node_protocol.json", + ] + outputs = [ + "$target_gen_dir/concatenated_protocol.json", + ] + args = rebase_path(inputs + outputs, root_build_dir) + } + + action_foreach("node_protocol_json") { + script = "$node_v8_path/third_party/inspector_protocol/convert_protocol_to_json.py" + sources = [ "node_protocol.pdl", v8_inspector_js_protocol ] + outputs = [ "$node_gen_dir/src/{{source_name_part}}.json" ] + args = [ "{{source}}" ] + rebase_path(outputs, root_build_dir) + } +} diff --git a/src/inspector_agent.cc b/src/inspector_agent.cc index de372400fd9ced..31597de1e14083 100644 --- a/src/inspector_agent.cc +++ b/src/inspector_agent.cc @@ -36,9 +36,6 @@ namespace node { namespace inspector { namespace { - -using node::OnFatalError; - using v8::Context; using v8::Function; using v8::HandleScope; @@ -917,8 +914,7 @@ void Agent::ToggleAsyncHook(Isolate* isolate, Local fn) { USE(fn->Call(context, Undefined(isolate), 0, nullptr)); if (try_catch.HasCaught() && !try_catch.HasTerminated()) { PrintCaughtException(isolate, context, try_catch); - OnFatalError("\nnode::inspector::Agent::ToggleAsyncHook", - "Cannot toggle Inspector's AsyncHook, please report this."); + UNREACHABLE("Cannot toggle Inspector's AsyncHook, please report this."); } } diff --git a/src/js_native_api.h b/src/js_native_api.h index d665052b947552..a3ee3a0e224262 100644 --- a/src/js_native_api.h +++ b/src/js_native_api.h @@ -93,6 +93,7 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_create_string_utf16(napi_env env, size_t length, napi_value* result); #ifdef NAPI_EXPERIMENTAL +#define NODE_API_EXPERIMENTAL_HAS_EXTERNAL_STRINGS NAPI_EXTERN napi_status NAPI_CDECL node_api_create_external_string_latin1(napi_env env, char* str, @@ -518,6 +519,7 @@ NAPI_EXTERN napi_status NAPI_CDECL napi_add_finalizer(napi_env env, #endif // NAPI_VERSION >= 5 #ifdef NAPI_EXPERIMENTAL +#define NODE_API_EXPERIMENTAL_HAS_POST_FINALIZER NAPI_EXTERN napi_status NAPI_CDECL node_api_post_finalizer(napi_env env, diff --git a/src/js_native_api_v8.cc b/src/js_native_api_v8.cc index 7f96a7edd82ef7..53c0be9e02663d 100644 --- a/src/js_native_api_v8.cc +++ b/src/js_native_api_v8.cc @@ -38,6 +38,17 @@ #define CHECK_NEW_FROM_UTF8(env, result, str) \ CHECK_NEW_FROM_UTF8_LEN((env), (result), (str), NAPI_AUTO_LENGTH) +#define CHECK_NEW_STRING_ARGS(env, str, length, result) \ + do { \ + CHECK_ENV_NOT_IN_GC((env)); \ + if ((length) > 0) CHECK_ARG((env), (str)); \ + CHECK_ARG((env), (result)); \ + RETURN_STATUS_IF_FALSE( \ + (env), \ + ((length) == NAPI_AUTO_LENGTH) || (length) <= INT_MAX, \ + napi_invalid_arg); \ + } while (0) + #define CREATE_TYPED_ARRAY( \ env, type, size_of_element, buffer, byte_offset, length, out) \ do { \ @@ -81,12 +92,7 @@ napi_status NewString(napi_env env, size_t length, napi_value* result, StringMaker string_maker) { - CHECK_ENV(env); - env->CheckGCAccess(); - if (length > 0) CHECK_ARG(env, str); - CHECK_ARG(env, result); - RETURN_STATUS_IF_FALSE( - env, (length == NAPI_AUTO_LENGTH) || length <= INT_MAX, napi_invalid_arg); + CHECK_NEW_STRING_ARGS(env, str, length, result); auto isolate = env->isolate; auto str_maybe = string_maker(isolate); @@ -105,9 +111,10 @@ napi_status NewExternalString(napi_env env, bool* copied, CreateAPI create_api, StringMaker string_maker) { + CHECK_NEW_STRING_ARGS(env, str, length, result); + napi_status status; #if defined(V8_ENABLE_SANDBOX) - env->CheckGCAccess(); status = create_api(env, str, length, result); if (status == napi_ok) { if (copied != nullptr) { @@ -961,11 +968,8 @@ napi_define_class(napi_env env, env, p->setter, p->data, &setter_tpl)); } - tpl->PrototypeTemplate()->SetAccessorProperty(property_name, - getter_tpl, - setter_tpl, - attributes, - v8::AccessControl::DEFAULT); + tpl->PrototypeTemplate()->SetAccessorProperty( + property_name, getter_tpl, setter_tpl, attributes); } else if (p->method != nullptr) { v8::Local t; STATUS_CALL(v8impl::FunctionCallbackWrapper::NewTemplate( @@ -1467,8 +1471,7 @@ napi_status NAPI_CDECL napi_object_seal(napi_env env, napi_value object) { napi_status NAPI_CDECL napi_is_array(napi_env env, napi_value value, bool* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -1528,8 +1531,7 @@ napi_status NAPI_CDECL napi_get_prototype(napi_env env, } napi_status NAPI_CDECL napi_create_object(napi_env env, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = v8impl::JsValueFromV8LocalValue(v8::Object::New(env->isolate)); @@ -1538,8 +1540,7 @@ napi_status NAPI_CDECL napi_create_object(napi_env env, napi_value* result) { } napi_status NAPI_CDECL napi_create_array(napi_env env, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = v8impl::JsValueFromV8LocalValue(v8::Array::New(env->isolate)); @@ -1550,8 +1551,7 @@ napi_status NAPI_CDECL napi_create_array(napi_env env, napi_value* result) { napi_status NAPI_CDECL napi_create_array_with_length(napi_env env, size_t length, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = @@ -1651,8 +1651,7 @@ node_api_create_external_string_utf16(napi_env env, napi_status NAPI_CDECL napi_create_double(napi_env env, double value, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = @@ -1664,8 +1663,7 @@ napi_status NAPI_CDECL napi_create_double(napi_env env, napi_status NAPI_CDECL napi_create_int32(napi_env env, int32_t value, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = @@ -1677,8 +1675,7 @@ napi_status NAPI_CDECL napi_create_int32(napi_env env, napi_status NAPI_CDECL napi_create_uint32(napi_env env, uint32_t value, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = v8impl::JsValueFromV8LocalValue( @@ -1690,8 +1687,7 @@ napi_status NAPI_CDECL napi_create_uint32(napi_env env, napi_status NAPI_CDECL napi_create_int64(napi_env env, int64_t value, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = v8impl::JsValueFromV8LocalValue( @@ -1703,8 +1699,7 @@ napi_status NAPI_CDECL napi_create_int64(napi_env env, napi_status NAPI_CDECL napi_create_bigint_int64(napi_env env, int64_t value, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = @@ -1716,8 +1711,7 @@ napi_status NAPI_CDECL napi_create_bigint_int64(napi_env env, napi_status NAPI_CDECL napi_create_bigint_uint64(napi_env env, uint64_t value, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = v8impl::JsValueFromV8LocalValue( @@ -1732,7 +1726,6 @@ napi_status NAPI_CDECL napi_create_bigint_words(napi_env env, const uint64_t* words, napi_value* result) { NAPI_PREAMBLE(env); - env->CheckGCAccess(); CHECK_ARG(env, words); CHECK_ARG(env, result); @@ -1752,8 +1745,7 @@ napi_status NAPI_CDECL napi_create_bigint_words(napi_env env, napi_status NAPI_CDECL napi_get_boolean(napi_env env, bool value, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); v8::Isolate* isolate = env->isolate; @@ -1770,8 +1762,7 @@ napi_status NAPI_CDECL napi_get_boolean(napi_env env, napi_status NAPI_CDECL napi_create_symbol(napi_env env, napi_value description, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); v8::Isolate* isolate = env->isolate; @@ -1793,8 +1784,7 @@ napi_status NAPI_CDECL node_api_symbol_for(napi_env env, const char* utf8description, size_t length, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); napi_value js_description_string; @@ -1839,8 +1829,7 @@ napi_status NAPI_CDECL napi_create_error(napi_env env, napi_value code, napi_value msg, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, msg); CHECK_ARG(env, result); @@ -1860,8 +1849,7 @@ napi_status NAPI_CDECL napi_create_type_error(napi_env env, napi_value code, napi_value msg, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, msg); CHECK_ARG(env, result); @@ -1881,8 +1869,7 @@ napi_status NAPI_CDECL napi_create_range_error(napi_env env, napi_value code, napi_value msg, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, msg); CHECK_ARG(env, result); @@ -1902,8 +1889,7 @@ napi_status NAPI_CDECL node_api_create_syntax_error(napi_env env, napi_value code, napi_value msg, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, msg); CHECK_ARG(env, result); @@ -1924,8 +1910,7 @@ napi_status NAPI_CDECL napi_typeof(napi_env env, napi_valuetype* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -1964,8 +1949,7 @@ napi_status NAPI_CDECL napi_typeof(napi_env env, } napi_status NAPI_CDECL napi_get_undefined(napi_env env, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = v8impl::JsValueFromV8LocalValue(v8::Undefined(env->isolate)); @@ -1974,8 +1958,7 @@ napi_status NAPI_CDECL napi_get_undefined(napi_env env, napi_value* result) { } napi_status NAPI_CDECL napi_get_null(napi_env env, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = v8impl::JsValueFromV8LocalValue(v8::Null(env->isolate)); @@ -2018,10 +2001,9 @@ napi_status NAPI_CDECL napi_get_cb_info( napi_status NAPI_CDECL napi_get_new_target(napi_env env, napi_callback_info cbinfo, napi_value* result) { - CHECK_ENV(env); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, cbinfo); CHECK_ARG(env, result); - env->CheckGCAccess(); v8impl::CallbackWrapper* info = reinterpret_cast(cbinfo); @@ -2063,8 +2045,7 @@ napi_status NAPI_CDECL napi_call_function(napi_env env, } napi_status NAPI_CDECL napi_get_global(napi_env env, napi_value* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = v8impl::JsValueFromV8LocalValue(env->context()->Global()); @@ -2161,8 +2142,7 @@ napi_status NAPI_CDECL napi_is_error(napi_env env, bool* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot // throw JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -2177,8 +2157,7 @@ napi_status NAPI_CDECL napi_get_value_double(napi_env env, double* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -2195,8 +2174,7 @@ napi_status NAPI_CDECL napi_get_value_int32(napi_env env, int32_t* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -2220,8 +2198,7 @@ napi_status NAPI_CDECL napi_get_value_uint32(napi_env env, uint32_t* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -2245,8 +2222,7 @@ napi_status NAPI_CDECL napi_get_value_int64(napi_env env, int64_t* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -2279,8 +2255,7 @@ napi_status NAPI_CDECL napi_get_value_bigint_int64(napi_env env, napi_value value, int64_t* result, bool* lossless) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); CHECK_ARG(env, lossless); @@ -2298,8 +2273,7 @@ napi_status NAPI_CDECL napi_get_value_bigint_uint64(napi_env env, napi_value value, uint64_t* result, bool* lossless) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); CHECK_ARG(env, lossless); @@ -2318,8 +2292,7 @@ napi_status NAPI_CDECL napi_get_value_bigint_words(napi_env env, int* sign_bit, size_t* word_count, uint64_t* words) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, word_count); @@ -2349,8 +2322,7 @@ napi_status NAPI_CDECL napi_get_value_bool(napi_env env, bool* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -2372,8 +2344,7 @@ napi_status NAPI_CDECL napi_get_value_bool(napi_env env, // The result argument is optional unless buf is NULL. napi_status NAPI_CDECL napi_get_value_string_latin1( napi_env env, napi_value value, char* buf, size_t bufsize, size_t* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); v8::Local val = v8impl::V8LocalValueFromJsValue(value); @@ -2411,8 +2382,7 @@ napi_status NAPI_CDECL napi_get_value_string_latin1( // The result argument is optional unless buf is NULL. napi_status NAPI_CDECL napi_get_value_string_utf8( napi_env env, napi_value value, char* buf, size_t bufsize, size_t* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); v8::Local val = v8impl::V8LocalValueFromJsValue(value); @@ -2453,8 +2423,7 @@ napi_status NAPI_CDECL napi_get_value_string_utf16(napi_env env, char16_t* buf, size_t bufsize, size_t* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); v8::Local val = v8impl::V8LocalValueFromJsValue(value); @@ -2640,8 +2609,7 @@ napi_status NAPI_CDECL napi_check_object_type_tag(napi_env env, napi_status NAPI_CDECL napi_get_value_external(napi_env env, napi_value value, void** result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -2661,8 +2629,7 @@ napi_status NAPI_CDECL napi_create_reference(napi_env env, napi_ref* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -2686,8 +2653,7 @@ napi_status NAPI_CDECL napi_create_reference(napi_env env, napi_status NAPI_CDECL napi_delete_reference(napi_env env, napi_ref ref) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, ref); delete reinterpret_cast(ref); @@ -2705,8 +2671,7 @@ napi_status NAPI_CDECL napi_reference_ref(napi_env env, uint32_t* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, ref); v8impl::Reference* reference = reinterpret_cast(ref); @@ -2728,8 +2693,7 @@ napi_status NAPI_CDECL napi_reference_unref(napi_env env, uint32_t* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, ref); v8impl::Reference* reference = reinterpret_cast(ref); @@ -2755,8 +2719,7 @@ napi_status NAPI_CDECL napi_get_reference_value(napi_env env, napi_value* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, ref); CHECK_ARG(env, result); @@ -2770,8 +2733,7 @@ napi_status NAPI_CDECL napi_open_handle_scope(napi_env env, napi_handle_scope* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = v8impl::JsHandleScopeFromV8HandleScope( @@ -2784,8 +2746,7 @@ napi_status NAPI_CDECL napi_close_handle_scope(napi_env env, napi_handle_scope scope) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, scope); if (env->open_handle_scopes == 0) { return napi_handle_scope_mismatch; @@ -2800,8 +2761,7 @@ napi_status NAPI_CDECL napi_open_escapable_handle_scope( napi_env env, napi_escapable_handle_scope* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = v8impl::JsEscapableHandleScopeFromV8EscapableHandleScope( @@ -2814,8 +2774,7 @@ napi_status NAPI_CDECL napi_close_escapable_handle_scope( napi_env env, napi_escapable_handle_scope scope) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, scope); if (env->open_handle_scopes == 0) { return napi_handle_scope_mismatch; @@ -2832,8 +2791,7 @@ napi_status NAPI_CDECL napi_escape_handle(napi_env env, napi_value* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, scope); CHECK_ARG(env, escapee); CHECK_ARG(env, result); @@ -2911,8 +2869,7 @@ napi_status NAPI_CDECL napi_instanceof(napi_env env, napi_status NAPI_CDECL napi_is_exception_pending(napi_env env, bool* result) { // NAPI_PREAMBLE is not used here: this function must execute when there is a // pending exception. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); *result = !env->last_exception.IsEmpty(); @@ -2923,8 +2880,7 @@ napi_status NAPI_CDECL napi_get_and_clear_last_exception(napi_env env, napi_value* result) { // NAPI_PREAMBLE is not used here: this function must execute when there is a // pending exception. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, result); if (env->last_exception.IsEmpty()) { @@ -2941,8 +2897,7 @@ napi_status NAPI_CDECL napi_get_and_clear_last_exception(napi_env env, napi_status NAPI_CDECL napi_is_arraybuffer(napi_env env, napi_value value, bool* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -2994,8 +2949,7 @@ napi_status NAPI_CDECL napi_get_arraybuffer_info(napi_env env, napi_value arraybuffer, void** data, size_t* byte_length) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, arraybuffer); v8::Local value = v8impl::V8LocalValueFromJsValue(arraybuffer); @@ -3017,8 +2971,7 @@ napi_status NAPI_CDECL napi_get_arraybuffer_info(napi_env env, napi_status NAPI_CDECL napi_is_typedarray(napi_env env, napi_value value, bool* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -3104,8 +3057,7 @@ napi_status NAPI_CDECL napi_get_typedarray_info(napi_env env, void** data, napi_value* arraybuffer, size_t* byte_offset) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, typedarray); v8::Local value = v8impl::V8LocalValueFromJsValue(typedarray); @@ -3195,8 +3147,7 @@ napi_status NAPI_CDECL napi_create_dataview(napi_env env, napi_status NAPI_CDECL napi_is_dataview(napi_env env, napi_value value, bool* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -3212,8 +3163,7 @@ napi_status NAPI_CDECL napi_get_dataview_info(napi_env env, void** data, napi_value* arraybuffer, size_t* byte_offset) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, dataview); v8::Local value = v8impl::V8LocalValueFromJsValue(dataview); @@ -3288,8 +3238,7 @@ napi_status NAPI_CDECL napi_reject_deferred(napi_env env, napi_status NAPI_CDECL napi_is_promise(napi_env env, napi_value value, bool* is_promise) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, is_promise); @@ -3315,8 +3264,7 @@ napi_status NAPI_CDECL napi_create_date(napi_env env, napi_status NAPI_CDECL napi_is_date(napi_env env, napi_value value, bool* is_date) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, is_date); @@ -3329,7 +3277,6 @@ napi_status NAPI_CDECL napi_get_date_value(napi_env env, napi_value value, double* result) { NAPI_PREAMBLE(env); - env->CheckGCAccess(); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -3375,8 +3322,7 @@ napi_status NAPI_CDECL napi_add_finalizer(napi_env env, napi_ref* result) { // Omit NAPI_PREAMBLE and GET_RETURN_STATUS because V8 calls here cannot throw // JS exceptions. - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, js_object); CHECK_ARG(env, finalize_cb); @@ -3455,8 +3401,7 @@ napi_status NAPI_CDECL napi_get_instance_data(napi_env env, void** data) { napi_status NAPI_CDECL napi_detach_arraybuffer(napi_env env, napi_value arraybuffer) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, arraybuffer); v8::Local value = v8impl::V8LocalValueFromJsValue(arraybuffer); @@ -3475,8 +3420,7 @@ napi_status NAPI_CDECL napi_detach_arraybuffer(napi_env env, napi_status NAPI_CDECL napi_is_detached_arraybuffer(napi_env env, napi_value arraybuffer, bool* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, arraybuffer); CHECK_ARG(env, result); diff --git a/src/js_native_api_v8.h b/src/js_native_api_v8.h index db39686c91127e..bdb29490dd9c4e 100644 --- a/src/js_native_api_v8.h +++ b/src/js_native_api_v8.h @@ -212,6 +212,12 @@ inline napi_status napi_set_last_error(napi_env env, } \ } while (0) +#define CHECK_ENV_NOT_IN_GC(env) \ + do { \ + CHECK_ENV((env)); \ + (env)->CheckGCAccess(); \ + } while (0) + #define CHECK_ARG(env, arg) \ RETURN_STATUS_IF_FALSE((env), ((arg) != nullptr), napi_invalid_arg) @@ -227,8 +233,7 @@ inline napi_status napi_set_last_error(napi_env env, // NAPI_PREAMBLE is not wrapped in do..while: try_catch must have function scope #define NAPI_PREAMBLE(env) \ - CHECK_ENV((env)); \ - (env)->CheckGCAccess(); \ + CHECK_ENV_NOT_IN_GC((env)); \ RETURN_STATUS_IF_FALSE( \ (env), (env)->last_exception.IsEmpty(), napi_pending_exception); \ RETURN_STATUS_IF_FALSE((env), \ diff --git a/src/json_parser.cc b/src/json_parser.cc index 1e19e174833fa5..1b445193bc8ceb 100644 --- a/src/json_parser.cc +++ b/src/json_parser.cc @@ -11,16 +11,17 @@ using v8::Object; using v8::String; using v8::Value; -JSONParser::JSONParser() - : handle_scope_(isolate_.get()), - context_(isolate_.get(), Context::New(isolate_.get())), - context_scope_(context_.Get(isolate_.get())) {} +JSONParser::JSONParser() {} bool JSONParser::Parse(const std::string& content) { DCHECK(!parsed_); Isolate* isolate = isolate_.get(); - Local context = context_.Get(isolate); + v8::Isolate::Scope isolate_scope(isolate); + v8::HandleScope handle_scope(isolate); + + Local context = Context::New(isolate); + Context::Scope context_scope(context); // It's not a real script, so don't print the source line. errors::PrinterTryCatch bootstrapCatch( @@ -34,16 +35,25 @@ bool JSONParser::Parse(const std::string& content) { !result_value->IsObject()) { return false; } + + context_.Reset(isolate, context); content_.Reset(isolate, result_value.As()); parsed_ = true; + return true; } std::optional JSONParser::GetTopLevelStringField( std::string_view field) { Isolate* isolate = isolate_.get(); + v8::Isolate::Scope isolate_scope(isolate); + v8::HandleScope handle_scope(isolate); + Local context = context_.Get(isolate); + Context::Scope context_scope(context); + Local content_object = content_.Get(isolate); + Local value; // It's not a real script, so don't print the source line. errors::PrinterTryCatch bootstrapCatch( @@ -62,7 +72,12 @@ std::optional JSONParser::GetTopLevelStringField( std::optional JSONParser::GetTopLevelBoolField(std::string_view field) { Isolate* isolate = isolate_.get(); + v8::Isolate::Scope isolate_scope(isolate); + v8::HandleScope handle_scope(isolate); + Local context = context_.Get(isolate); + Context::Scope context_scope(context); + Local content_object = content_.Get(isolate); Local value; bool has_field; diff --git a/src/json_parser.h b/src/json_parser.h index f2e7d592d9aaa7..9e6c00ef8d8712 100644 --- a/src/json_parser.h +++ b/src/json_parser.h @@ -24,10 +24,9 @@ class JSONParser { private: // We might want a lighter-weight JSON parser for this use case. But for now // using V8 is good enough. - RAIIIsolate isolate_; - v8::HandleScope handle_scope_; + RAIIIsolateWithoutEntering isolate_; + v8::Global context_; - v8::Context::Scope context_scope_; v8::Global content_; bool parsed_ = false; }; diff --git a/src/module_wrap.cc b/src/module_wrap.cc index 1d61fe5f0522ba..52976d61814256 100644 --- a/src/module_wrap.cc +++ b/src/module_wrap.cc @@ -39,6 +39,7 @@ using v8::MicrotaskQueue; using v8::Module; using v8::ModuleRequest; using v8::Object; +using v8::ObjectTemplate; using v8::PrimitiveArray; using v8::Promise; using v8::ScriptCompiler; @@ -49,15 +50,17 @@ using v8::UnboundModuleScript; using v8::Undefined; using v8::Value; -ModuleWrap::ModuleWrap(Environment* env, +ModuleWrap::ModuleWrap(Realm* realm, Local object, Local module, Local url, Local context_object, Local synthetic_evaluation_step) - : BaseObject(env, object), - module_(env->isolate(), module), + : BaseObject(realm, object), + module_(realm->isolate(), module), module_hash_(module->GetIdentityHash()) { + realm->env()->hash_to_module_map.emplace(module_hash_, this); + object->SetInternalField(kModuleSlot, module); object->SetInternalField(kURLSlot, url); object->SetInternalField(kSyntheticEvaluationStepsSlot, @@ -72,7 +75,6 @@ ModuleWrap::ModuleWrap(Environment* env, } ModuleWrap::~ModuleWrap() { - HandleScope scope(env()->isolate()); auto range = env()->hash_to_module_map.equal_range(module_hash_); for (auto it = range.first; it != range.second; ++it) { if (it->second == this) { @@ -107,8 +109,8 @@ void ModuleWrap::New(const FunctionCallbackInfo& args) { CHECK(args.IsConstructCall()); CHECK_GE(args.Length(), 3); - Environment* env = Environment::GetCurrent(args); - Isolate* isolate = env->isolate(); + Realm* realm = Realm::GetCurrent(args); + Isolate* isolate = realm->isolate(); Local that = args.This(); @@ -122,7 +124,7 @@ void ModuleWrap::New(const FunctionCallbackInfo& args) { } else { CHECK(args[1]->IsObject()); contextify_context = ContextifyContext::ContextFromContextifiedSandbox( - env, args[1].As()); + realm->env(), args[1].As()); CHECK_NOT_NULL(contextify_context); context = contextify_context->context(); } @@ -148,8 +150,8 @@ void ModuleWrap::New(const FunctionCallbackInfo& args) { Local id_symbol = Symbol::New(isolate, url); host_defined_options->Set(isolate, HostDefinedOptions::kID, id_symbol); - ShouldNotAbortOnUncaughtScope no_abort_scope(env); - TryCatchScope try_catch(env); + ShouldNotAbortOnUncaughtScope no_abort_scope(realm->env()); + TryCatchScope try_catch(realm->env()); Local module; @@ -206,7 +208,9 @@ void ModuleWrap::New(const FunctionCallbackInfo& args) { if (try_catch.HasCaught() && !try_catch.HasTerminated()) { CHECK(!try_catch.Message().IsEmpty()); CHECK(!try_catch.Exception().IsEmpty()); - AppendExceptionLine(env, try_catch.Exception(), try_catch.Message(), + AppendExceptionLine(realm->env(), + try_catch.Exception(), + try_catch.Message(), ErrorHandlingMode::MODULE_ERROR); try_catch.ReThrow(); } @@ -215,18 +219,21 @@ void ModuleWrap::New(const FunctionCallbackInfo& args) { if (options == ScriptCompiler::kConsumeCodeCache && source.GetCachedData()->rejected) { THROW_ERR_VM_MODULE_CACHED_DATA_REJECTED( - env, "cachedData buffer was rejected"); + realm, "cachedData buffer was rejected"); try_catch.ReThrow(); return; } } } - if (!that->Set(context, env->url_string(), url).FromMaybe(false)) { + if (!that->Set(context, realm->isolate_data()->url_string(), url) + .FromMaybe(false)) { return; } - if (that->SetPrivate(context, env->host_defined_option_symbol(), id_symbol) + if (that->SetPrivate(context, + realm->isolate_data()->host_defined_option_symbol(), + id_symbol) .IsNothing()) { return; } @@ -236,28 +243,30 @@ void ModuleWrap::New(const FunctionCallbackInfo& args) { // be stored in an internal field. Local context_object = context->GetExtrasBindingObject(); Local synthetic_evaluation_step = - synthetic ? args[3] : Undefined(env->isolate()).As(); + synthetic ? args[3] : Undefined(realm->isolate()).As(); ModuleWrap* obj = new ModuleWrap( - env, that, module, url, context_object, synthetic_evaluation_step); + realm, that, module, url, context_object, synthetic_evaluation_step); obj->contextify_context_ = contextify_context; - env->hash_to_module_map.emplace(module->GetIdentityHash(), obj); - that->SetIntegrityLevel(context, IntegrityLevel::kFrozen); args.GetReturnValue().Set(that); } static Local createImportAttributesContainer( - Environment* env, Isolate* isolate, Local raw_attributes) { + Realm* realm, + Isolate* isolate, + Local raw_attributes, + const int elements_per_attribute) { + CHECK_EQ(raw_attributes->Length() % elements_per_attribute, 0); Local attributes = - Object::New(isolate, v8::Null(env->isolate()), nullptr, nullptr, 0); - for (int i = 0; i < raw_attributes->Length(); i += 3) { + Object::New(isolate, v8::Null(isolate), nullptr, nullptr, 0); + for (int i = 0; i < raw_attributes->Length(); i += elements_per_attribute) { attributes - ->Set(env->context(), - raw_attributes->Get(env->context(), i).As(), - raw_attributes->Get(env->context(), i + 1).As()) + ->Set(realm->context(), + raw_attributes->Get(realm->context(), i).As(), + raw_attributes->Get(realm->context(), i + 1).As()) .ToChecked(); } @@ -265,7 +274,7 @@ static Local createImportAttributesContainer( } void ModuleWrap::Link(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); + Realm* realm = Realm::GetCurrent(args); Isolate* isolate = args.GetIsolate(); CHECK_EQ(args.Length(), 1); @@ -292,14 +301,14 @@ void ModuleWrap::Link(const FunctionCallbackInfo& args) { // call the dependency resolve callbacks for (int i = 0; i < module_requests_length; i++) { Local module_request = - module_requests->Get(env->context(), i).As(); + module_requests->Get(realm->context(), i).As(); Local specifier = module_request->GetSpecifier(); - Utf8Value specifier_utf8(env->isolate(), specifier); + Utf8Value specifier_utf8(realm->isolate(), specifier); std::string specifier_std(*specifier_utf8, specifier_utf8.length()); Local raw_attributes = module_request->GetImportAssertions(); Local attributes = - createImportAttributesContainer(env, isolate, raw_attributes); + createImportAttributesContainer(realm, isolate, raw_attributes, 3); Local argv[] = { specifier, @@ -315,11 +324,11 @@ void ModuleWrap::Link(const FunctionCallbackInfo& args) { maybe_resolve_return_value.ToLocalChecked(); if (!resolve_return_value->IsPromise()) { THROW_ERR_VM_MODULE_LINK_FAILURE( - env, "request for '%s' did not return promise", specifier_std); + realm, "request for '%s' did not return promise", specifier_std); return; } Local resolve_promise = resolve_return_value.As(); - obj->resolve_cache_[specifier_std].Reset(env->isolate(), resolve_promise); + obj->resolve_cache_[specifier_std].Reset(isolate, resolve_promise); promises[i] = resolve_promise; } @@ -329,13 +338,13 @@ void ModuleWrap::Link(const FunctionCallbackInfo& args) { } void ModuleWrap::Instantiate(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); + Realm* realm = Realm::GetCurrent(args); Isolate* isolate = args.GetIsolate(); ModuleWrap* obj; ASSIGN_OR_RETURN_UNWRAP(&obj, args.This()); Local context = obj->context(); Local module = obj->module_.Get(isolate); - TryCatchScope try_catch(env); + TryCatchScope try_catch(realm->env()); USE(module->InstantiateModule(context, ResolveModuleCallback)); // clear resolve cache on instantiate @@ -344,7 +353,9 @@ void ModuleWrap::Instantiate(const FunctionCallbackInfo& args) { if (try_catch.HasCaught() && !try_catch.HasTerminated()) { CHECK(!try_catch.Message().IsEmpty()); CHECK(!try_catch.Exception().IsEmpty()); - AppendExceptionLine(env, try_catch.Exception(), try_catch.Message(), + AppendExceptionLine(realm->env(), + try_catch.Exception(), + try_catch.Message(), ErrorHandlingMode::MODULE_ERROR); try_catch.ReThrow(); return; @@ -352,8 +363,8 @@ void ModuleWrap::Instantiate(const FunctionCallbackInfo& args) { } void ModuleWrap::Evaluate(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); - Isolate* isolate = env->isolate(); + Realm* realm = Realm::GetCurrent(args); + Isolate* isolate = realm->isolate(); ModuleWrap* obj; ASSIGN_OR_RETURN_UNWRAP(&obj, args.This()); Local context = obj->context(); @@ -368,14 +379,14 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo& args) { CHECK_EQ(args.Length(), 2); CHECK(args[0]->IsNumber()); - int64_t timeout = args[0]->IntegerValue(env->context()).FromJust(); + int64_t timeout = args[0]->IntegerValue(realm->context()).FromJust(); CHECK(args[1]->IsBoolean()); bool break_on_sigint = args[1]->IsTrue(); - ShouldNotAbortOnUncaughtScope no_abort_scope(env); - TryCatchScope try_catch(env); - Isolate::SafeForTerminationScope safe_for_termination(env->isolate()); + ShouldNotAbortOnUncaughtScope no_abort_scope(realm->env()); + TryCatchScope try_catch(realm->env()); + Isolate::SafeForTerminationScope safe_for_termination(isolate); bool timed_out = false; bool received_signal = false; @@ -406,16 +417,15 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo& args) { // Convert the termination exception into a regular exception. if (timed_out || received_signal) { - if (!env->is_main_thread() && env->is_stopping()) - return; - env->isolate()->CancelTerminateExecution(); + if (!realm->env()->is_main_thread() && realm->env()->is_stopping()) return; + isolate->CancelTerminateExecution(); // It is possible that execution was terminated by another timeout in // which this timeout is nested, so check whether one of the watchdogs // from this invocation is responsible for termination. if (timed_out) { - THROW_ERR_SCRIPT_EXECUTION_TIMEOUT(env, timeout); + THROW_ERR_SCRIPT_EXECUTION_TIMEOUT(realm->env(), timeout); } else if (received_signal) { - THROW_ERR_SCRIPT_EXECUTION_INTERRUPTED(env); + THROW_ERR_SCRIPT_EXECUTION_INTERRUPTED(realm->env()); } } @@ -429,7 +439,7 @@ void ModuleWrap::Evaluate(const FunctionCallbackInfo& args) { } void ModuleWrap::GetNamespace(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); + Realm* realm = Realm::GetCurrent(args); Isolate* isolate = args.GetIsolate(); ModuleWrap* obj; ASSIGN_OR_RETURN_UNWRAP(&obj, args.This()); @@ -439,7 +449,7 @@ void ModuleWrap::GetNamespace(const FunctionCallbackInfo& args) { switch (module->GetStatus()) { case v8::Module::Status::kUninstantiated: case v8::Module::Status::kInstantiating: - return env->ThrowError( + return realm->env()->ThrowError( "cannot get namespace, module has not been instantiated"); case v8::Module::Status::kInstantiated: case v8::Module::Status::kEvaluating: @@ -466,11 +476,11 @@ void ModuleWrap::GetStatus(const FunctionCallbackInfo& args) { void ModuleWrap::GetStaticDependencySpecifiers( const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); + Realm* realm = Realm::GetCurrent(args); ModuleWrap* obj; ASSIGN_OR_RETURN_UNWRAP(&obj, args.This()); - Local module = obj->module_.Get(env->isolate()); + Local module = obj->module_.Get(realm->isolate()); Local module_requests = module->GetModuleRequests(); int count = module_requests->Length(); @@ -479,12 +489,12 @@ void ModuleWrap::GetStaticDependencySpecifiers( for (int i = 0; i < count; i++) { Local module_request = - module_requests->Get(env->context(), i).As(); + module_requests->Get(realm->context(), i).As(); specifiers[i] = module_request->GetSpecifier(); } args.GetReturnValue().Set( - Array::New(env->isolate(), specifiers.out(), count)); + Array::New(realm->isolate(), specifiers.out(), count)); } void ModuleWrap::GetError(const FunctionCallbackInfo& args) { @@ -501,15 +511,13 @@ MaybeLocal ModuleWrap::ResolveModuleCallback( Local specifier, Local import_attributes, Local referrer) { + Isolate* isolate = context->GetIsolate(); Environment* env = Environment::GetCurrent(context); if (env == nullptr) { - Isolate* isolate = context->GetIsolate(); THROW_ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE(isolate); return MaybeLocal(); } - Isolate* isolate = env->isolate(); - Utf8Value specifier_utf8(isolate, specifier); std::string specifier_std(*specifier_utf8, specifier_utf8.length()); @@ -559,11 +567,16 @@ static MaybeLocal ImportModuleDynamically( THROW_ERR_EXECUTION_ENVIRONMENT_NOT_AVAILABLE(isolate); return MaybeLocal(); } + Realm* realm = Realm::GetCurrent(context); + if (realm == nullptr) { + // Fallback to the principal realm if it's in a vm context. + realm = env->principal_realm(); + } EscapableHandleScope handle_scope(isolate); Local import_callback = - env->host_import_module_dynamically_callback(); + realm->host_import_module_dynamically_callback(); Local id; Local options = host_defined_options.As(); @@ -579,7 +592,7 @@ static MaybeLocal ImportModuleDynamically( } Local attributes = - createImportAttributesContainer(env, isolate, import_attributes); + createImportAttributesContainer(realm, isolate, import_attributes, 2); Local import_args[] = { id, @@ -603,13 +616,13 @@ static MaybeLocal ImportModuleDynamically( void ModuleWrap::SetImportModuleDynamicallyCallback( const FunctionCallbackInfo& args) { Isolate* isolate = args.GetIsolate(); - Environment* env = Environment::GetCurrent(args); + Realm* realm = Realm::GetCurrent(args); HandleScope handle_scope(isolate); CHECK_EQ(args.Length(), 1); CHECK(args[0]->IsFunction()); Local import_callback = args[0].As(); - env->set_host_import_module_dynamically_callback(import_callback); + realm->set_host_import_module_dynamically_callback(import_callback); isolate->SetHostImportModuleDynamicallyCallback(ImportModuleDynamically); } @@ -624,10 +637,15 @@ void ModuleWrap::HostInitializeImportMetaObjectCallback( if (module_wrap == nullptr) { return; } + Realm* realm = Realm::GetCurrent(context); + if (realm == nullptr) { + // Fallback to the principal realm if it's in a vm context. + realm = env->principal_realm(); + } Local wrap = module_wrap->object(); Local callback = - env->host_initialize_import_meta_object_callback(); + realm->host_initialize_import_meta_object_callback(); Local id; if (!wrap->GetPrivate(context, env->host_defined_option_symbol()) .ToLocal(&id)) { @@ -637,7 +655,7 @@ void ModuleWrap::HostInitializeImportMetaObjectCallback( Local args[] = {id, meta}; TryCatchScope try_catch(env); USE(callback->Call( - context, Undefined(env->isolate()), arraysize(args), args)); + context, Undefined(realm->isolate()), arraysize(args), args)); if (try_catch.HasCaught() && !try_catch.HasTerminated()) { try_catch.ReThrow(); } @@ -645,13 +663,13 @@ void ModuleWrap::HostInitializeImportMetaObjectCallback( void ModuleWrap::SetInitializeImportMetaObjectCallback( const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); - Isolate* isolate = env->isolate(); + Realm* realm = Realm::GetCurrent(args); + Isolate* isolate = realm->isolate(); CHECK_EQ(args.Length(), 1); CHECK(args[0]->IsFunction()); Local import_meta_callback = args[0].As(); - env->set_host_initialize_import_meta_object_callback(import_meta_callback); + realm->set_host_initialize_import_meta_object_callback(import_meta_callback); isolate->SetHostInitializeImportMetaObjectCallback( HostInitializeImportMetaObjectCallback); @@ -742,12 +760,9 @@ void ModuleWrap::CreateCachedData(const FunctionCallbackInfo& args) { } } -void ModuleWrap::Initialize(Local target, - Local unused, - Local context, - void* priv) { - Environment* env = Environment::GetCurrent(context); - Isolate* isolate = env->isolate(); +void ModuleWrap::CreatePerIsolateProperties(IsolateData* isolate_data, + Local target) { + Isolate* isolate = isolate_data->isolate(); Local tpl = NewFunctionTemplate(isolate, New); tpl->InstanceTemplate()->SetInternalFieldCount( @@ -767,28 +782,36 @@ void ModuleWrap::Initialize(Local target, "getStaticDependencySpecifiers", GetStaticDependencySpecifiers); - SetConstructorFunction(context, target, "ModuleWrap", tpl); + SetConstructorFunction(isolate, target, "ModuleWrap", tpl); - SetMethod(context, + SetMethod(isolate, target, "setImportModuleDynamicallyCallback", SetImportModuleDynamicallyCallback); - SetMethod(context, + SetMethod(isolate, target, "setInitializeImportMetaObjectCallback", SetInitializeImportMetaObjectCallback); +} +void ModuleWrap::CreatePerContextProperties(Local target, + Local unused, + Local context, + void* priv) { + Realm* realm = Realm::GetCurrent(context); + Isolate* isolate = realm->isolate(); #define V(name) \ - target->Set(context, \ - FIXED_ONE_BYTE_STRING(env->isolate(), #name), \ - Integer::New(env->isolate(), Module::Status::name)) \ - .FromJust() - V(kUninstantiated); - V(kInstantiating); - V(kInstantiated); - V(kEvaluating); - V(kEvaluated); - V(kErrored); + target \ + ->Set(context, \ + FIXED_ONE_BYTE_STRING(isolate, #name), \ + Integer::New(isolate, Module::Status::name)) \ + .FromJust() + V(kUninstantiated); + V(kInstantiating); + V(kInstantiated); + V(kEvaluating); + V(kEvaluated); + V(kErrored); #undef V } @@ -812,7 +835,9 @@ void ModuleWrap::RegisterExternalReferences( } // namespace loader } // namespace node -NODE_BINDING_CONTEXT_AWARE_INTERNAL(module_wrap, - node::loader::ModuleWrap::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL( + module_wrap, node::loader::ModuleWrap::CreatePerContextProperties) +NODE_BINDING_PER_ISOLATE_INIT( + module_wrap, node::loader::ModuleWrap::CreatePerIsolateProperties) NODE_BINDING_EXTERNAL_REFERENCE( module_wrap, node::loader::ModuleWrap::RegisterExternalReferences) diff --git a/src/module_wrap.h b/src/module_wrap.h index 1fc801edced9c5..e17048357feca2 100644 --- a/src/module_wrap.h +++ b/src/module_wrap.h @@ -10,6 +10,7 @@ namespace node { +class IsolateData; class Environment; class ExternalReferenceRegistry; @@ -40,10 +41,12 @@ class ModuleWrap : public BaseObject { kInternalFieldCount }; - static void Initialize(v8::Local target, - v8::Local unused, - v8::Local context, - void* priv); + static void CreatePerIsolateProperties(IsolateData* isolate_data, + v8::Local target); + static void CreatePerContextProperties(v8::Local target, + v8::Local unused, + v8::Local context, + void* priv); static void RegisterExternalReferences(ExternalReferenceRegistry* registry); static void HostInitializeImportMetaObjectCallback( v8::Local context, @@ -66,7 +69,7 @@ class ModuleWrap : public BaseObject { } private: - ModuleWrap(Environment* env, + ModuleWrap(Realm* realm, v8::Local object, v8::Local module, v8::Local url, diff --git a/src/node.cc b/src/node.cc index a9336a14304fc6..0d601ae21b8314 100644 --- a/src/node.cc +++ b/src/node.cc @@ -264,6 +264,9 @@ void Environment::InitializeDiagnostics() { env->isolate()->SetAtomicsWaitCallback(nullptr, nullptr); }, this); } + if (options_->trace_promises) { + isolate_->SetPromiseHook(TracePromises); + } } static @@ -866,7 +869,9 @@ static ExitCode InitializeNodeWithArgsInternal( for (const auto& file_path : file_paths) { std::string path = cwd + kPathSeparator + file_path; - per_process::dotenv_file.ParsePath(path); + auto path_exists = per_process::dotenv_file.ParsePath(path); + + if (!path_exists) errors->push_back(file_path + ": not found"); } per_process::dotenv_file.AssignNodeOptionsIfAvailable(&node_options); diff --git a/src/node_api.cc b/src/node_api.cc index 23e9fedf8b146e..1a6cdcb8b1de9a 100644 --- a/src/node_api.cc +++ b/src/node_api.cc @@ -917,8 +917,7 @@ napi_status NAPI_CDECL napi_async_init(napi_env env, napi_value async_resource, napi_value async_resource_name, napi_async_context* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, async_resource_name); CHECK_ARG(env, result); @@ -951,8 +950,7 @@ napi_status NAPI_CDECL napi_async_init(napi_env env, napi_status NAPI_CDECL napi_async_destroy(napi_env env, napi_async_context async_context) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, async_context); v8impl::AsyncContext* node_async_context = @@ -1101,8 +1099,7 @@ napi_status NAPI_CDECL napi_create_buffer_copy(napi_env env, napi_status NAPI_CDECL napi_is_buffer(napi_env env, napi_value value, bool* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); CHECK_ARG(env, result); @@ -1114,8 +1111,7 @@ napi_status NAPI_CDECL napi_get_buffer_info(napi_env env, napi_value value, void** data, size_t* length) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, value); v8::Local buffer = v8impl::V8LocalValueFromJsValue(value); @@ -1236,8 +1232,7 @@ napi_create_async_work(napi_env env, napi_async_complete_callback complete, void* data, napi_async_work* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, execute); CHECK_ARG(env, result); @@ -1267,8 +1262,7 @@ napi_create_async_work(napi_env env, napi_status NAPI_CDECL napi_delete_async_work(napi_env env, napi_async_work work) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, work); uvimpl::Work::Delete(reinterpret_cast(work)); @@ -1322,8 +1316,7 @@ napi_create_threadsafe_function(napi_env env, void* context, napi_threadsafe_function_call_js call_js_cb, napi_threadsafe_function* result) { - CHECK_ENV(env); - env->CheckGCAccess(); + CHECK_ENV_NOT_IN_GC(env); CHECK_ARG(env, async_resource_name); RETURN_STATUS_IF_FALSE(env, initial_thread_count > 0, napi_invalid_arg); CHECK_ARG(env, result); diff --git a/src/node_binding.cc b/src/node_binding.cc index 97257d47c61738..2b69a828a744b6 100644 --- a/src/node_binding.cc +++ b/src/node_binding.cc @@ -49,6 +49,7 @@ V(js_stream) \ V(js_udp_wrap) \ V(messaging) \ + V(modules) \ V(module_wrap) \ V(mksnapshot) \ V(options) \ diff --git a/src/node_binding.h b/src/node_binding.h index 9f0692ca4e190b..dfcfe5fe9e1bf4 100644 --- a/src/node_binding.h +++ b/src/node_binding.h @@ -37,10 +37,14 @@ static_assert(static_cast(NM_F_LINKED) == V(contextify) \ V(encoding_binding) \ V(fs) \ + V(fs_dir) \ + V(messaging) \ V(mksnapshot) \ - V(timers) \ - V(process_methods) \ + V(modules) \ + V(module_wrap) \ V(performance) \ + V(process_methods) \ + V(timers) \ V(url) \ V(worker) \ NODE_BUILTIN_ICU_BINDINGS(V) diff --git a/src/node_builtins.cc b/src/node_builtins.cc index 84815969b6d1fa..bafd8d4b8581f0 100644 --- a/src/node_builtins.cc +++ b/src/node_builtins.cc @@ -680,37 +680,38 @@ void BuiltinLoader::CreatePerIsolateProperties(IsolateData* isolate_data, Local target) { Isolate* isolate = isolate_data->isolate(); - target->SetAccessor(isolate_data->config_string(), - ConfigStringGetter, - nullptr, - Local(), - DEFAULT, - None, - SideEffectType::kHasNoSideEffect); - - target->SetAccessor(FIXED_ONE_BYTE_STRING(isolate, "builtinIds"), - BuiltinIdsGetter, - nullptr, - Local(), - DEFAULT, - None, - SideEffectType::kHasNoSideEffect); - - target->SetAccessor(FIXED_ONE_BYTE_STRING(isolate, "builtinCategories"), - GetBuiltinCategories, - nullptr, - Local(), - DEFAULT, - None, - SideEffectType::kHasNoSideEffect); - - target->SetAccessor(FIXED_ONE_BYTE_STRING(isolate, "natives"), - GetNatives, - nullptr, - Local(), - DEFAULT, - None, - SideEffectType::kHasNoSideEffect); + target->SetNativeDataProperty(isolate_data->config_string(), + ConfigStringGetter, + nullptr, + Local(), + None, + DEFAULT, + SideEffectType::kHasNoSideEffect); + + target->SetNativeDataProperty(FIXED_ONE_BYTE_STRING(isolate, "builtinIds"), + BuiltinIdsGetter, + nullptr, + Local(), + None, + DEFAULT, + SideEffectType::kHasNoSideEffect); + + target->SetNativeDataProperty( + FIXED_ONE_BYTE_STRING(isolate, "builtinCategories"), + GetBuiltinCategories, + nullptr, + Local(), + None, + DEFAULT, + SideEffectType::kHasNoSideEffect); + + target->SetNativeDataProperty(FIXED_ONE_BYTE_STRING(isolate, "natives"), + GetNatives, + nullptr, + Local(), + None, + DEFAULT, + SideEffectType::kHasNoSideEffect); SetMethod(isolate, target, "getCacheUsage", BuiltinLoader::GetCacheUsage); SetMethod(isolate, target, "compileFunction", BuiltinLoader::CompileFunction); diff --git a/src/node_contextify.cc b/src/node_contextify.cc index 8b27b000f7da06..85cdd4b3e74163 100644 --- a/src/node_contextify.cc +++ b/src/node_contextify.cc @@ -1468,11 +1468,12 @@ void ContextifyContext::ContainsModuleSyntax( String::NewFromUtf8(isolate, "__dirname").ToLocalChecked()}; TryCatchScope try_catch(env); + ShouldNotAbortOnUncaughtScope no_abort_scope(env); ContextifyContext::CompileFunctionAndCacheResult(env, context, &source, - params, + std::move(params), std::vector>(), options, true, diff --git a/src/node_dir.cc b/src/node_dir.cc index 10cde6067899c7..21d5b880ccee98 100644 --- a/src/node_dir.cc +++ b/src/node_dir.cc @@ -423,27 +423,29 @@ static void OpenDirSync(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(handle->object().As()); } -void Initialize(Local target, - Local unused, - Local context, - void* priv) { - Environment* env = Environment::GetCurrent(context); - Isolate* isolate = env->isolate(); +void CreatePerIsolateProperties(IsolateData* isolate_data, + Local target) { + Isolate* isolate = isolate_data->isolate(); - SetMethod(context, target, "opendir", OpenDir); - SetMethod(context, target, "opendirSync", OpenDirSync); + SetMethod(isolate, target, "opendir", OpenDir); + SetMethod(isolate, target, "opendirSync", OpenDirSync); // Create FunctionTemplate for DirHandle Local dir = NewFunctionTemplate(isolate, DirHandle::New); - dir->Inherit(AsyncWrap::GetConstructorTemplate(env)); + dir->Inherit(AsyncWrap::GetConstructorTemplate(isolate_data)); SetProtoMethod(isolate, dir, "read", DirHandle::Read); SetProtoMethod(isolate, dir, "close", DirHandle::Close); Local dirt = dir->InstanceTemplate(); dirt->SetInternalFieldCount(DirHandle::kInternalFieldCount); - SetConstructorFunction(context, target, "DirHandle", dir); - env->set_dir_instance_template(dirt); + SetConstructorFunction(isolate, target, "DirHandle", dir); + isolate_data->set_dir_instance_template(dirt); } +void CreatePerContextProperties(Local target, + Local unused, + Local context, + void* priv) {} + void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(OpenDir); registry->Register(OpenDirSync); @@ -456,6 +458,8 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // end namespace node -NODE_BINDING_CONTEXT_AWARE_INTERNAL(fs_dir, node::fs_dir::Initialize) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(fs_dir, + node::fs_dir::CreatePerContextProperties) +NODE_BINDING_PER_ISOLATE_INIT(fs_dir, node::fs_dir::CreatePerIsolateProperties) NODE_BINDING_EXTERNAL_REFERENCE(fs_dir, node::fs_dir::RegisterExternalReferences) diff --git a/src/node_dotenv.cc b/src/node_dotenv.cc index 0633ef51269959..992633c50b9a14 100644 --- a/src/node_dotenv.cc +++ b/src/node_dotenv.cc @@ -64,14 +64,14 @@ void Dotenv::SetEnvironment(node::Environment* env) { } } -void Dotenv::ParsePath(const std::string_view path) { +bool Dotenv::ParsePath(const std::string_view path) { uv_fs_t req; auto defer_req_cleanup = OnScopeLeave([&req]() { uv_fs_req_cleanup(&req); }); uv_file file = uv_fs_open(nullptr, &req, path.data(), 0, 438, nullptr); if (req.result < 0) { // req will be cleaned up by scope leave. - return; + return false; } uv_fs_req_cleanup(&req); @@ -89,7 +89,7 @@ void Dotenv::ParsePath(const std::string_view path) { auto r = uv_fs_read(nullptr, &req, file, &buf, 1, -1, nullptr); if (req.result < 0) { // req will be cleaned up by scope leave. - return; + return false; } uv_fs_req_cleanup(&req); if (r <= 0) { @@ -104,6 +104,7 @@ void Dotenv::ParsePath(const std::string_view path) { for (const auto& line : lines) { ParseLine(line); } + return true; } void Dotenv::AssignNodeOptionsIfAvailable(std::string* node_options) { diff --git a/src/node_dotenv.h b/src/node_dotenv.h index ee74f9ff84a353..cc87008d149f43 100644 --- a/src/node_dotenv.h +++ b/src/node_dotenv.h @@ -18,7 +18,7 @@ class Dotenv { Dotenv& operator=(const Dotenv& d) = default; ~Dotenv() = default; - void ParsePath(const std::string_view path); + bool ParsePath(const std::string_view path); void AssignNodeOptionsIfAvailable(std::string* node_options); void SetEnvironment(Environment* env); diff --git a/src/node_env_var.cc b/src/node_env_var.cc index 94936ea1c2bd22..bce7ae07214ddf 100644 --- a/src/node_env_var.cc +++ b/src/node_env_var.cc @@ -456,7 +456,8 @@ static void EnvDefiner(Local property, } } -void CreateEnvProxyTemplate(Isolate* isolate, IsolateData* isolate_data) { +void CreateEnvProxyTemplate(IsolateData* isolate_data) { + Isolate* isolate = isolate_data->isolate(); HandleScope scope(isolate); if (!isolate_data->env_proxy_template().IsEmpty()) return; Local env_proxy_ctor_template = diff --git a/src/node_errors.cc b/src/node_errors.cc index 9c4ebbe4502698..7ef6ea7f07998f 100644 --- a/src/node_errors.cc +++ b/src/node_errors.cc @@ -291,6 +291,13 @@ void PrintStackTrace(Isolate* isolate, PrintToStderrAndFlush(FormatStackTrace(isolate, stack, prefix)); } +void PrintCurrentStackTrace(Isolate* isolate, StackTracePrefix prefix) { + Local stack; + if (GetCurrentStackTrace(isolate).ToLocal(&stack)) { + PrintStackTrace(isolate, stack, prefix); + } +} + std::string FormatCaughtException(Isolate* isolate, Local context, Local err, @@ -376,14 +383,7 @@ void AppendExceptionLine(Environment* env, .FromMaybe(false)); } -[[noreturn]] void Abort() { - DumpNativeBacktrace(stderr); - DumpJavaScriptBacktrace(stderr); - fflush(stderr); - ABORT_NO_BACKTRACE(); -} - -[[noreturn]] void Assert(const AssertionInfo& info) { +void Assert(const AssertionInfo& info) { std::string name = GetHumanReadableProcessName(); fprintf(stderr, @@ -396,7 +396,7 @@ void AppendExceptionLine(Environment* env, info.message); fflush(stderr); - Abort(); + ABORT(); } enum class EnhanceFatalException { kEnhance, kDontEnhance }; @@ -404,7 +404,7 @@ enum class EnhanceFatalException { kEnhance, kDontEnhance }; /** * Report the exception to the inspector, then print it to stderr. * This should only be used when the Node.js instance is about to exit - * (i.e. this should be followed by a env->Exit() or an Abort()). + * (i.e. this should be followed by a env->Exit() or an ABORT()). * * Use enhance_stack = EnhanceFatalException::kDontEnhance * when it's unsafe to call into JavaScript. @@ -576,8 +576,7 @@ static void ReportFatalException(Environment* env, ABORT(); } -[[noreturn]] void OOMErrorHandler(const char* location, - const v8::OOMDetails& details) { +void OOMErrorHandler(const char* location, const v8::OOMDetails& details) { // We should never recover from this handler so once it's true it's always // true. is_in_oom.store(true); @@ -616,8 +615,18 @@ v8::ModifyCodeGenerationFromStringsResult ModifyCodeGenerationFromStrings( bool is_code_like) { HandleScope scope(context->GetIsolate()); + if (context->GetNumberOfEmbedderDataFields() <= + ContextEmbedderIndex::kAllowCodeGenerationFromStrings) { + // The context is not (yet) configured by Node.js for this. We don't + // have enough information to make a decision, just allow it which is + // the default. + return {true, {}}; + } Environment* env = Environment::GetCurrent(context); - if (env->source_maps_enabled()) { + if (env == nullptr) { + return {true, {}}; + } + if (env->source_maps_enabled() && env->can_call_into_js()) { // We do not expect the maybe_cache_generated_source_map to throw any more // exceptions. If it does, just ignore it. errors::TryCatchScope try_catch(env); @@ -1063,7 +1072,7 @@ static void TriggerUncaughtException(const FunctionCallbackInfo& args) { if (env != nullptr && env->abort_on_uncaught_exception()) { ReportFatalException( env, exception, message, EnhanceFatalException::kEnhance); - Abort(); + ABORT(); } bool from_promise = args[1]->IsTrue(); errors::TriggerUncaughtException(isolate, exception, message, from_promise); @@ -1174,7 +1183,7 @@ void TriggerUncaughtException(Isolate* isolate, // much we can do, so we just print whatever is useful and crash. PrintToStderrAndFlush( FormatCaughtException(isolate, context, error, message)); - Abort(); + ABORT(); } // Invoke process._fatalException() to give user a chance to handle it. diff --git a/src/node_errors.h b/src/node_errors.h index 0f4a2d0cc6eaaf..9e7aaf2c36dd0e 100644 --- a/src/node_errors.h +++ b/src/node_errors.h @@ -19,9 +19,14 @@ void AppendExceptionLine(Environment* env, v8::Local message, enum ErrorHandlingMode mode); +// This function calls backtrace, it should have not be marked as [[noreturn]]. +// But it is a public API, removing the attribute can break. +// Prefer UNREACHABLE() internally instead, it doesn't need manually set +// location. [[noreturn]] void OnFatalError(const char* location, const char* message); -[[noreturn]] void OOMErrorHandler(const char* location, - const v8::OOMDetails& details); +// This function calls backtrace, do not mark as [[noreturn]]. Read more in the +// ABORT macro. +void OOMErrorHandler(const char* location, const v8::OOMDetails& details); // Helpers to construct errors similar to the ones provided by // lib/internal/errors.js. @@ -71,6 +76,7 @@ void AppendExceptionLine(Environment* env, V(ERR_INVALID_ARG_TYPE, TypeError) \ V(ERR_INVALID_FILE_URL_HOST, TypeError) \ V(ERR_INVALID_FILE_URL_PATH, TypeError) \ + V(ERR_INVALID_PACKAGE_CONFIG, Error) \ V(ERR_INVALID_OBJECT_DEFINE_PROPERTY, TypeError) \ V(ERR_INVALID_MODULE, Error) \ V(ERR_INVALID_STATE, Error) \ @@ -123,6 +129,10 @@ void AppendExceptionLine(Environment* env, inline void THROW_##code( \ Environment* env, const char* format, Args&&... args) { \ THROW_##code(env->isolate(), format, std::forward(args)...); \ + } \ + template \ + inline void THROW_##code(Realm* realm, const char* format, Args&&... args) { \ + THROW_##code(realm->isolate(), format, std::forward(args)...); \ } ERRORS_WITH_CODE(V) #undef V diff --git a/src/node_external_reference.h b/src/node_external_reference.h index ae37094c8e117e..f15c97c03d2e9d 100644 --- a/src/node_external_reference.h +++ b/src/node_external_reference.h @@ -15,6 +15,8 @@ using CFunctionCallbackWithOneByteString = using CFunctionCallback = void (*)(v8::Local receiver); using CFunctionCallbackReturnDouble = double (*)(v8::Local receiver); +using CFunctionCallbackValueReturnDouble = + double (*)(v8::Local receiver); using CFunctionCallbackWithInt64 = void (*)(v8::Local receiver, int64_t); using CFunctionCallbackWithBool = void (*)(v8::Local receiver, @@ -38,6 +40,7 @@ class ExternalReferenceRegistry { V(CFunctionCallback) \ V(CFunctionCallbackWithOneByteString) \ V(CFunctionCallbackReturnDouble) \ + V(CFunctionCallbackValueReturnDouble) \ V(CFunctionCallbackWithInt64) \ V(CFunctionCallbackWithBool) \ V(CFunctionCallbackWithString) \ @@ -100,6 +103,7 @@ class ExternalReferenceRegistry { V(messaging) \ V(mksnapshot) \ V(module_wrap) \ + V(modules) \ V(options) \ V(os) \ V(performance) \ diff --git a/src/node_file.cc b/src/node_file.cc index 32df2217403c0d..30fb7b46944b25 100644 --- a/src/node_file.cc +++ b/src/node_file.cc @@ -39,19 +39,10 @@ #include "stream_base-inl.h" #include "string_bytes.h" -#include -#include -#include -#include -#include -#include - #if defined(__MINGW32__) || defined(_MSC_VER) # include #endif -#include - namespace node { namespace fs { @@ -1038,68 +1029,6 @@ static void ExistsSync(const FunctionCallbackInfo& args) { args.GetReturnValue().Set(err == 0); } -// Used to speed up module loading. Returns an array [string, boolean] -static void InternalModuleReadJSON(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); - Isolate* isolate = env->isolate(); - uv_loop_t* loop = env->event_loop(); - - CHECK(args[0]->IsString()); - node::Utf8Value path(isolate, args[0]); - THROW_IF_INSUFFICIENT_PERMISSIONS( - env, permission::PermissionScope::kFileSystemRead, path.ToStringView()); - - if (strlen(*path) != path.length()) { - return; // Contains a nul byte. - } - uv_fs_t open_req; - const int fd = uv_fs_open(loop, &open_req, *path, O_RDONLY, 0, nullptr); - uv_fs_req_cleanup(&open_req); - - if (fd < 0) { - return; - } - - auto defer_close = OnScopeLeave([fd, loop]() { - uv_fs_t close_req; - CHECK_EQ(0, uv_fs_close(loop, &close_req, fd, nullptr)); - uv_fs_req_cleanup(&close_req); - }); - - const size_t kBlockSize = 32 << 10; - std::vector chars; - int64_t offset = 0; - ssize_t numchars; - do { - const size_t start = chars.size(); - chars.resize(start + kBlockSize); - - uv_buf_t buf; - buf.base = &chars[start]; - buf.len = kBlockSize; - - uv_fs_t read_req; - numchars = uv_fs_read(loop, &read_req, fd, &buf, 1, offset, nullptr); - uv_fs_req_cleanup(&read_req); - - if (numchars < 0) { - return; - } - offset += numchars; - } while (static_cast(numchars) == kBlockSize); - - size_t start = 0; - if (offset >= 3 && 0 == memcmp(chars.data(), "\xEF\xBB\xBF", 3)) { - start = 3; // Skip UTF-8 BOM. - } - const size_t size = offset - start; - - args.GetReturnValue().Set( - String::NewFromUtf8( - isolate, &chars[start], v8::NewStringType::kNormal, size) - .ToLocalChecked()); -} - // Used to speed up module loading. Returns 0 if the path refers to // a file, 1 when it's a directory or < 0 on error (usually -ENOENT.) // The speedup comes from not creating thousands of Stat and Error objects. @@ -1180,21 +1109,26 @@ static void LStat(const FunctionCallbackInfo& args) { CHECK_NOT_NULL(*path); bool use_bigint = args[1]->IsTrue(); - FSReqBase* req_wrap_async = GetReqWrap(args, 2, use_bigint); - if (req_wrap_async != nullptr) { // lstat(path, use_bigint, req) + if (!args[2]->IsUndefined()) { // lstat(path, use_bigint, req) + FSReqBase* req_wrap_async = GetReqWrap(args, 2, use_bigint); FS_ASYNC_TRACE_BEGIN1( UV_FS_LSTAT, req_wrap_async, "path", TRACE_STR_COPY(*path)) AsyncCall(env, req_wrap_async, args, "lstat", UTF8, AfterStat, uv_fs_lstat, *path); - } else { // lstat(path, use_bigint, undefined, ctx) - CHECK_EQ(argc, 4); - FSReqWrapSync req_wrap_sync; + } else { // lstat(path, use_bigint, undefined, throw_if_no_entry) + bool do_not_throw_if_no_entry = args[3]->IsFalse(); + FSReqWrapSync req_wrap_sync("lstat", *path); FS_SYNC_TRACE_BEGIN(lstat); - int err = SyncCall(env, args[3], &req_wrap_sync, "lstat", uv_fs_lstat, - *path); + int result; + if (do_not_throw_if_no_entry) { + result = SyncCallAndThrowIf( + is_uv_error_except_no_entry, env, &req_wrap_sync, uv_fs_lstat, *path); + } else { + result = SyncCallAndThrowOnError(env, &req_wrap_sync, uv_fs_lstat, *path); + } FS_SYNC_TRACE_END(lstat); - if (err != 0) { - return; // error info is in ctx + if (is_uv_error(result)) { + return; } Local arr = FillGlobalStatsArray(binding_data, use_bigint, @@ -1215,19 +1149,23 @@ static void FStat(const FunctionCallbackInfo& args) { int fd = args[0].As()->Value(); bool use_bigint = args[1]->IsTrue(); - FSReqBase* req_wrap_async = GetReqWrap(args, 2, use_bigint); - if (req_wrap_async != nullptr) { // fstat(fd, use_bigint, req) + if (!args[2]->IsUndefined()) { // fstat(fd, use_bigint, req) + FSReqBase* req_wrap_async = GetReqWrap(args, 2, use_bigint); FS_ASYNC_TRACE_BEGIN0(UV_FS_FSTAT, req_wrap_async) AsyncCall(env, req_wrap_async, args, "fstat", UTF8, AfterStat, uv_fs_fstat, fd); - } else { // fstat(fd, use_bigint, undefined, ctx) - CHECK_EQ(argc, 4); - FSReqWrapSync req_wrap_sync; + } else { // fstat(fd, use_bigint, undefined, do_not_throw_error) + bool do_not_throw_error = args[2]->IsTrue(); + const auto should_throw = [do_not_throw_error](int result) { + return is_uv_error(result) && !do_not_throw_error; + }; + FSReqWrapSync req_wrap_sync("fstat"); FS_SYNC_TRACE_BEGIN(fstat); - int err = SyncCall(env, args[3], &req_wrap_sync, "fstat", uv_fs_fstat, fd); + int err = + SyncCallAndThrowIf(should_throw, env, &req_wrap_sync, uv_fs_fstat, fd); FS_SYNC_TRACE_END(fstat); - if (err != 0) { - return; // error info is in ctx + if (is_uv_error(err)) { + return; } Local arr = FillGlobalStatsArray(binding_data, use_bigint, @@ -1553,25 +1491,23 @@ static void RMDir(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); const int argc = args.Length(); - CHECK_GE(argc, 2); + CHECK_GE(argc, 1); BufferValue path(env->isolate(), args[0]); CHECK_NOT_NULL(*path); THROW_IF_INSUFFICIENT_PERMISSIONS( env, permission::PermissionScope::kFileSystemWrite, path.ToStringView()); - FSReqBase* req_wrap_async = GetReqWrap(args, 1); // rmdir(path, req) - if (req_wrap_async != nullptr) { + if (argc > 1) { + FSReqBase* req_wrap_async = GetReqWrap(args, 1); // rmdir(path, req) FS_ASYNC_TRACE_BEGIN1( UV_FS_RMDIR, req_wrap_async, "path", TRACE_STR_COPY(*path)) AsyncCall(env, req_wrap_async, args, "rmdir", UTF8, AfterNoArgs, uv_fs_rmdir, *path); - } else { // rmdir(path, undefined, ctx) - CHECK_EQ(argc, 3); - FSReqWrapSync req_wrap_sync; + } else { // rmdir(path) + FSReqWrapSync req_wrap_sync("rmdir", *path); FS_SYNC_TRACE_BEGIN(rmdir); - SyncCall(env, args[2], &req_wrap_sync, "rmdir", - uv_fs_rmdir, *path); + SyncCallAndThrowOnError(env, &req_wrap_sync, uv_fs_rmdir, *path); FS_SYNC_TRACE_END(rmdir); } } @@ -2285,6 +2221,84 @@ static void WriteString(const FunctionCallbackInfo& args) { } } +static void WriteFileUtf8(const FunctionCallbackInfo& args) { + // Fast C++ path for fs.writeFileSync(path, data) with utf8 encoding + // (file, data, options.flag, options.mode) + + Environment* env = Environment::GetCurrent(args); + auto isolate = env->isolate(); + + CHECK_EQ(args.Length(), 4); + + BufferValue value(isolate, args[1]); + CHECK_NOT_NULL(*value); + + CHECK(args[2]->IsInt32()); + const int flags = args[2].As()->Value(); + + CHECK(args[3]->IsInt32()); + const int mode = args[3].As()->Value(); + + uv_file file; + + bool is_fd = args[0]->IsInt32(); + + // Check for file descriptor + if (is_fd) { + file = args[0].As()->Value(); + } else { + BufferValue path(isolate, args[0]); + CHECK_NOT_NULL(*path); + if (CheckOpenPermissions(env, path, flags).IsNothing()) return; + + FSReqWrapSync req_open("open", *path); + + FS_SYNC_TRACE_BEGIN(open); + file = + SyncCallAndThrowOnError(env, &req_open, uv_fs_open, *path, flags, mode); + FS_SYNC_TRACE_END(open); + + if (is_uv_error(file)) { + return; + } + } + + int bytesWritten = 0; + uint32_t offset = 0; + + const size_t length = value.length(); + uv_buf_t uvbuf = uv_buf_init(value.out(), length); + + FS_SYNC_TRACE_BEGIN(write); + while (offset < length) { + FSReqWrapSync req_write("write"); + bytesWritten = SyncCallAndThrowOnError( + env, &req_write, uv_fs_write, file, &uvbuf, 1, -1); + + // Write errored out + if (bytesWritten < 0) { + break; + } + + offset += bytesWritten; + DCHECK_LE(offset, length); + uvbuf.base += bytesWritten; + uvbuf.len -= bytesWritten; + } + FS_SYNC_TRACE_END(write); + + if (!is_fd) { + FSReqWrapSync req_close("close"); + + FS_SYNC_TRACE_BEGIN(close); + int result = SyncCallAndThrowOnError(env, &req_close, uv_fs_close, file); + FS_SYNC_TRACE_END(close); + + if (is_uv_error(result)) { + return; + } + } +} /* * Wrapper for read(2). @@ -2444,18 +2458,20 @@ static void ReadBuffers(const FunctionCallbackInfo& args) { iovs[i] = uv_buf_init(Buffer::Data(buffer), Buffer::Length(buffer)); } - FSReqBase* req_wrap_async = GetReqWrap(args, 3); - if (req_wrap_async != nullptr) { // readBuffers(fd, buffers, pos, req) + if (argc > 3) { // readBuffers(fd, buffers, pos, req) + FSReqBase* req_wrap_async = GetReqWrap(args, 3); FS_ASYNC_TRACE_BEGIN0(UV_FS_READ, req_wrap_async) AsyncCall(env, req_wrap_async, args, "read", UTF8, AfterInteger, uv_fs_read, fd, *iovs, iovs.length(), pos); } else { // readBuffers(fd, buffers, undefined, ctx) - CHECK_EQ(argc, 5); - FSReqWrapSync req_wrap_sync; + FSReqWrapSync req_wrap_sync("read"); FS_SYNC_TRACE_BEGIN(read); - int bytesRead = SyncCall(env, /* ctx */ args[4], &req_wrap_sync, "read", - uv_fs_read, fd, *iovs, iovs.length(), pos); + int bytesRead = SyncCallAndThrowOnError( + env, &req_wrap_sync, uv_fs_read, fd, *iovs, iovs.length(), pos); FS_SYNC_TRACE_END(read, "bytesRead", bytesRead); + if (is_uv_error(bytesRead)) { + return; + } args.GetReturnValue().Set(bytesRead); } } @@ -3114,7 +3130,6 @@ static void CreatePerIsolateProperties(IsolateData* isolate_data, SetMethod(isolate, target, "rmdir", RMDir); SetMethod(isolate, target, "mkdir", MKDir); SetMethod(isolate, target, "readdir", ReadDir); - SetMethod(isolate, target, "internalModuleReadJSON", InternalModuleReadJSON); SetMethod(isolate, target, "internalModuleStat", InternalModuleStat); SetMethod(isolate, target, "stat", Stat); SetMethod(isolate, target, "lstat", LStat); @@ -3127,6 +3142,7 @@ static void CreatePerIsolateProperties(IsolateData* isolate_data, SetMethod(isolate, target, "writeBuffer", WriteBuffer); SetMethod(isolate, target, "writeBuffers", WriteBuffers); SetMethod(isolate, target, "writeString", WriteString); + SetMethod(isolate, target, "writeFileUtf8", WriteFileUtf8); SetMethod(isolate, target, "realpath", RealPath); SetMethod(isolate, target, "copyFile", CopyFile); @@ -3234,7 +3250,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(RMDir); registry->Register(MKDir); registry->Register(ReadDir); - registry->Register(InternalModuleReadJSON); registry->Register(InternalModuleStat); registry->Register(Stat); registry->Register(LStat); @@ -3247,6 +3262,7 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(WriteBuffer); registry->Register(WriteBuffers); registry->Register(WriteString); + registry->Register(WriteFileUtf8); registry->Register(RealPath); registry->Register(CopyFile); diff --git a/src/node_internals.h b/src/node_internals.h index 9a96e042fc5cda..5604f35aeff6b4 100644 --- a/src/node_internals.h +++ b/src/node_internals.h @@ -87,6 +87,8 @@ enum class StackTracePrefix { kAt, // " at " kNumber }; +void PrintCurrentStackTrace(v8::Isolate* isolate, + StackTracePrefix prefix = StackTracePrefix::kAt); void PrintStackTrace(v8::Isolate* isolate, v8::Local stack, StackTracePrefix prefix = StackTracePrefix::kAt); diff --git a/src/node_messaging.cc b/src/node_messaging.cc index 47cc80cf551f74..59d2495ddb27bd 100644 --- a/src/node_messaging.cc +++ b/src/node_messaging.cc @@ -30,6 +30,7 @@ using v8::Maybe; using v8::MaybeLocal; using v8::Nothing; using v8::Object; +using v8::ObjectTemplate; using v8::SharedArrayBuffer; using v8::SharedValueConveyor; using v8::String; @@ -717,7 +718,8 @@ MessagePort* MessagePort::New( std::unique_ptr data, std::shared_ptr sibling_group) { Context::Scope context_scope(context); - Local ctor_templ = GetMessagePortConstructorTemplate(env); + Local ctor_templ = + GetMessagePortConstructorTemplate(env->isolate_data()); // Construct a new instance, then assign the listener instance and possibly // the MessagePortData to it. @@ -1116,7 +1118,8 @@ void MessagePort::Stop(const FunctionCallbackInfo& args) { void MessagePort::CheckType(const FunctionCallbackInfo& args) { Environment* env = Environment::GetCurrent(args); args.GetReturnValue().Set( - GetMessagePortConstructorTemplate(env)->HasInstance(args[0])); + GetMessagePortConstructorTemplate(env->isolate_data()) + ->HasInstance(args[0])); } void MessagePort::Drain(const FunctionCallbackInfo& args) { @@ -1193,28 +1196,30 @@ void MessagePort::MemoryInfo(MemoryTracker* tracker) const { tracker->TrackField("emit_message_fn", emit_message_fn_); } -Local GetMessagePortConstructorTemplate(Environment* env) { +Local GetMessagePortConstructorTemplate( + IsolateData* isolate_data) { // Factor generating the MessagePort JS constructor into its own piece // of code, because it is needed early on in the child environment setup. - Local templ = env->message_port_constructor_template(); + Local templ = + isolate_data->message_port_constructor_template(); if (!templ.IsEmpty()) return templ; { - Isolate* isolate = env->isolate(); + Isolate* isolate = isolate_data->isolate(); Local m = NewFunctionTemplate(isolate, MessagePort::New); - m->SetClassName(env->message_port_constructor_string()); + m->SetClassName(isolate_data->message_port_constructor_string()); m->InstanceTemplate()->SetInternalFieldCount( MessagePort::kInternalFieldCount); - m->Inherit(HandleWrap::GetConstructorTemplate(env)); + m->Inherit(HandleWrap::GetConstructorTemplate(isolate_data)); SetProtoMethod(isolate, m, "postMessage", MessagePort::PostMessage); SetProtoMethod(isolate, m, "start", MessagePort::Start); - env->set_message_port_constructor_template(m); + isolate_data->set_message_port_constructor_template(m); } - return GetMessagePortConstructorTemplate(env); + return GetMessagePortConstructorTemplate(isolate_data); } // static @@ -1636,15 +1641,12 @@ static void BroadcastChannel(const FunctionCallbackInfo& args) { } } -static void InitMessaging(Local target, - Local unused, - Local context, - void* priv) { - Environment* env = Environment::GetCurrent(context); - Isolate* isolate = env->isolate(); +static void CreatePerIsolateProperties(IsolateData* isolate_data, + Local target) { + Isolate* isolate = isolate_data->isolate(); { - SetConstructorFunction(context, + SetConstructorFunction(isolate, target, "MessageChannel", NewFunctionTemplate(isolate, MessageChannel)); @@ -1655,31 +1657,36 @@ static void InitMessaging(Local target, t->InstanceTemplate()->SetInternalFieldCount( JSTransferable::kInternalFieldCount); t->SetClassName(OneByteString(isolate, "JSTransferable")); - env->isolate_data()->set_js_transferable_constructor_template(t); + isolate_data->set_js_transferable_constructor_template(t); } - SetConstructorFunction(context, + SetConstructorFunction(isolate, target, - env->message_port_constructor_string(), - GetMessagePortConstructorTemplate(env), - SetConstructorFunctionFlag::NONE); + isolate_data->message_port_constructor_string(), + GetMessagePortConstructorTemplate(isolate_data)); // These are not methods on the MessagePort prototype, because // the browser equivalents do not provide them. - SetMethod(context, target, "stopMessagePort", MessagePort::Stop); - SetMethod(context, target, "checkMessagePort", MessagePort::CheckType); - SetMethod(context, target, "drainMessagePort", MessagePort::Drain); + SetMethod(isolate, target, "stopMessagePort", MessagePort::Stop); + SetMethod(isolate, target, "checkMessagePort", MessagePort::CheckType); + SetMethod(isolate, target, "drainMessagePort", MessagePort::Drain); SetMethod( - context, target, "receiveMessageOnPort", MessagePort::ReceiveMessage); + isolate, target, "receiveMessageOnPort", MessagePort::ReceiveMessage); SetMethod( - context, target, "moveMessagePortToContext", MessagePort::MoveToContext); - SetMethod(context, + isolate, target, "moveMessagePortToContext", MessagePort::MoveToContext); + SetMethod(isolate, target, "setDeserializerCreateObjectFunction", SetDeserializerCreateObjectFunction); - SetMethod(context, target, "broadcastChannel", BroadcastChannel); - SetMethod(context, target, "structuredClone", StructuredClone); + SetMethod(isolate, target, "broadcastChannel", BroadcastChannel); + SetMethod(isolate, target, "structuredClone", StructuredClone); +} +static void CreatePerContextProperties(Local target, + Local unused, + Local context, + void* priv) { + Environment* env = Environment::GetCurrent(context); { Local domexception = GetDOMException(context).ToLocalChecked(); target @@ -1710,6 +1717,9 @@ static void RegisterExternalReferences(ExternalReferenceRegistry* registry) { } // namespace worker } // namespace node -NODE_BINDING_CONTEXT_AWARE_INTERNAL(messaging, node::worker::InitMessaging) +NODE_BINDING_CONTEXT_AWARE_INTERNAL(messaging, + node::worker::CreatePerContextProperties) +NODE_BINDING_PER_ISOLATE_INIT(messaging, + node::worker::CreatePerIsolateProperties) NODE_BINDING_EXTERNAL_REFERENCE(messaging, node::worker::RegisterExternalReferences) diff --git a/src/node_messaging.h b/src/node_messaging.h index a32d477c2e2f79..6dd34b8bd5a407 100644 --- a/src/node_messaging.h +++ b/src/node_messaging.h @@ -379,7 +379,7 @@ class JSTransferable : public BaseObject { }; v8::Local GetMessagePortConstructorTemplate( - Environment* env); + IsolateData* isolate_data); } // namespace worker } // namespace node diff --git a/src/node_metadata.cc b/src/node_metadata.cc index f6837ba6d07933..14fb8ec9714001 100644 --- a/src/node_metadata.cc +++ b/src/node_metadata.cc @@ -8,13 +8,19 @@ #include "llhttp.h" #include "nghttp2/nghttp2ver.h" #include "node.h" +#include "simdjson.h" #include "simdutf.h" #include "undici_version.h" #include "util.h" #include "uv.h" #include "uvwasi.h" #include "v8.h" + +#ifdef NODE_BUNDLED_ZLIB #include "zlib_version.h" +#else +#include +#endif // NODE_BUNDLED_ZLIB #if HAVE_OPENSSL #include @@ -78,7 +84,11 @@ Metadata::Versions::Versions() { node = NODE_VERSION_STRING; v8 = v8::V8::GetVersion(); uv = uv_version_string(); +#ifdef NODE_BUNDLED_ZLIB zlib = ZLIB_VERSION; +#else + zlib = zlibVersion(); +#endif // NODE_BUNDLED_ZLIB ares = ARES_VERSION_STR; modules = NODE_STRINGIFY(NODE_MODULE_VERSION); nghttp2 = NGHTTP2_VERSION; @@ -119,6 +129,7 @@ Metadata::Versions::Versions() { nghttp3 = NGHTTP3_VERSION; #endif + simdjson = SIMDJSON_VERSION; simdutf = SIMDUTF_VERSION; ada = ADA_VERSION; } diff --git a/src/node_metadata.h b/src/node_metadata.h index cf051585e779e2..2eccd1d9dcdfd0 100644 --- a/src/node_metadata.h +++ b/src/node_metadata.h @@ -46,6 +46,7 @@ namespace node { V(llhttp) \ V(uvwasi) \ V(acorn) \ + V(simdjson) \ V(simdutf) \ V(ada) \ NODE_VERSIONS_KEY_UNDICI(V) \ diff --git a/src/node_modules.cc b/src/node_modules.cc new file mode 100644 index 00000000000000..9217b94852e33b --- /dev/null +++ b/src/node_modules.cc @@ -0,0 +1,453 @@ +#include "node_modules.h" +#include +#include "base_object-inl.h" +#include "node_errors.h" +#include "node_external_reference.h" +#include "node_url.h" +#include "permission/permission.h" +#include "permission/permission_base.h" +#include "util-inl.h" +#include "v8-fast-api-calls.h" +#include "v8-function-callback.h" +#include "v8-primitive.h" +#include "v8-value.h" +#include "v8.h" + +#include "simdjson.h" + +namespace node { +namespace modules { + +using v8::Array; +using v8::Context; +using v8::FunctionCallbackInfo; +using v8::HandleScope; +using v8::Isolate; +using v8::Local; +using v8::NewStringType; +using v8::Object; +using v8::ObjectTemplate; +using v8::Primitive; +using v8::String; +using v8::Undefined; +using v8::Value; + +#ifdef __POSIX__ +constexpr char kPathSeparator = '/'; +constexpr std::string_view kNodeModules = "/node_modules"; +#else +constexpr char kPathSeparator = '\\'; +constexpr std::string_view kNodeModules = "\\node_modules"; +#endif + +void BindingData::MemoryInfo(MemoryTracker* tracker) const { + // Do nothing +} + +BindingData::BindingData(Realm* realm, + v8::Local object, + InternalFieldInfo* info) + : SnapshotableObject(realm, object, type_int) {} + +bool BindingData::PrepareForSerialization(v8::Local context, + v8::SnapshotCreator* creator) { + // Return true because we need to maintain the reference to the binding from + // JS land. + return true; +} + +InternalFieldInfoBase* BindingData::Serialize(int index) { + DCHECK_IS_SNAPSHOT_SLOT(index); + InternalFieldInfo* info = + InternalFieldInfoBase::New(type()); + return info; +} + +void BindingData::Deserialize(v8::Local context, + v8::Local holder, + int index, + InternalFieldInfoBase* info) { + DCHECK_IS_SNAPSHOT_SLOT(index); + HandleScope scope(context->GetIsolate()); + Realm* realm = Realm::GetCurrent(context); + BindingData* binding = realm->AddBindingData(holder); + CHECK_NOT_NULL(binding); +} + +Local BindingData::PackageConfig::Serialize(Realm* realm) const { + auto has_manifest = !realm->env()->options()->experimental_policy.empty(); + auto isolate = realm->isolate(); + const auto ToString = [isolate](std::string_view input) -> Local { + return String::NewFromUtf8( + isolate, input.data(), NewStringType::kNormal, input.size()) + .ToLocalChecked(); + }; + Local values[7] = { + name.has_value() ? ToString(*name) : Undefined(isolate), + main.has_value() ? ToString(*main) : Undefined(isolate), + ToString(type), + imports.has_value() ? ToString(*imports) : Undefined(isolate), + exports.has_value() ? ToString(*exports) : Undefined(isolate), + has_manifest ? ToString(raw_json) : Undefined(isolate), + ToString(file_path), + }; + return Array::New(isolate, values, 7); +} + +const BindingData::PackageConfig* BindingData::GetPackageJSON( + Realm* realm, std::string_view path, ErrorContext* error_context) { + auto binding_data = realm->GetBindingData(); + + auto cache_entry = binding_data->package_configs_.find(path.data()); + if (cache_entry != binding_data->package_configs_.end()) { + return &cache_entry->second; + } + + PackageConfig package_config{}; + package_config.file_path = path; + // No need to exclude BOM since simdjson will skip it. + if (ReadFileSync(&package_config.raw_json, path.data()) < 0) { + return nullptr; + } + + simdjson::ondemand::document document; + simdjson::ondemand::object main_object; + simdjson::error_code error = + binding_data->json_parser.iterate(package_config.raw_json).get(document); + + const auto throw_invalid_package_config = [error_context, path, realm]() { + if (error_context == nullptr) { + THROW_ERR_INVALID_PACKAGE_CONFIG( + realm->isolate(), "Invalid package config %s.", path.data()); + } else if (error_context->base.has_value()) { + auto file_url = ada::parse(error_context->base.value()); + CHECK(file_url); + auto file_path = url::FileURLToPath(realm->env(), *file_url); + CHECK(file_path.has_value()); + THROW_ERR_INVALID_PACKAGE_CONFIG( + realm->isolate(), + "Invalid package config %s while importing \"%s\" from %s.", + path.data(), + error_context->specifier.c_str(), + file_path->c_str()); + } else { + THROW_ERR_INVALID_PACKAGE_CONFIG( + realm->isolate(), "Invalid package config %s.", path.data()); + } + + return nullptr; + }; + + if (error || document.get_object().get(main_object)) { + return throw_invalid_package_config(); + } + + simdjson::ondemand::raw_json_string key; + simdjson::ondemand::value value; + std::string_view field_value; + simdjson::ondemand::json_type field_type; + + for (auto field : main_object) { + // Throw error if getting key or value fails. + if (field.key().get(key) || field.value().get(value)) { + return throw_invalid_package_config(); + } + + // based on coverity using key with == derefs the raw value + // avoid derefing if its null + if (key.raw() == nullptr) continue; + + if (key == "name") { + // Though there is a key "name" with a corresponding value, + // the value may not be a string or could be an invalid JSON string + if (value.get_string(package_config.name)) { + return throw_invalid_package_config(); + } + } else if (key == "main") { + // Omit all non-string values + USE(value.get_string(package_config.main)); + } else if (key == "exports") { + if (value.type().get(field_type)) { + return throw_invalid_package_config(); + } + switch (field_type) { + case simdjson::ondemand::json_type::object: + case simdjson::ondemand::json_type::array: { + if (value.raw_json().get(field_value)) { + return throw_invalid_package_config(); + } + package_config.exports = field_value; + break; + } + case simdjson::ondemand::json_type::string: { + if (value.get_string(package_config.exports)) { + return throw_invalid_package_config(); + } + break; + } + default: + break; + } + } else if (key == "imports") { + if (value.type().get(field_type)) { + return throw_invalid_package_config(); + } + switch (field_type) { + case simdjson::ondemand::json_type::array: + case simdjson::ondemand::json_type::object: { + if (value.raw_json().get(field_value)) { + return throw_invalid_package_config(); + } + package_config.imports = field_value; + break; + } + case simdjson::ondemand::json_type::string: { + if (value.get_string(package_config.imports)) { + return throw_invalid_package_config(); + } + break; + } + default: + break; + } + } else if (key == "type") { + if (value.get_string().get(field_value)) { + return throw_invalid_package_config(); + } + // Only update type if it is "commonjs" or "module" + // The default value is "none" for backward compatibility. + if (field_value == "commonjs" || field_value == "module") { + package_config.type = field_value; + } + } + } + // package_config could be quite large, so we should move it instead of + // copying it. + auto cached = binding_data->package_configs_.insert( + {std::string(path), std::move(package_config)}); + + return &cached.first->second; +} + +void BindingData::ReadPackageJSON(const FunctionCallbackInfo& args) { + CHECK_GE(args.Length(), 1); // path, [is_esm, base, specifier] + CHECK(args[0]->IsString()); // path + + Realm* realm = Realm::GetCurrent(args); + auto isolate = realm->isolate(); + + Utf8Value path(isolate, args[0]); + bool is_esm = args[1]->IsTrue(); + auto error_context = ErrorContext(); + if (is_esm) { + CHECK(args[2]->IsUndefined() || args[2]->IsString()); // base + CHECK(args[3]->IsString()); // specifier + + if (args[2]->IsString()) { + Utf8Value base_value(isolate, args[2]); + error_context.base = base_value.ToString(); + } + Utf8Value specifier(isolate, args[3]); + error_context.specifier = specifier.ToString(); + } + + THROW_IF_INSUFFICIENT_PERMISSIONS( + realm->env(), + permission::PermissionScope::kFileSystemRead, + path.ToStringView()); + + auto package_json = + GetPackageJSON(realm, path.ToString(), is_esm ? &error_context : nullptr); + if (package_json == nullptr) { + return; + } + + args.GetReturnValue().Set(package_json->Serialize(realm)); +} + +const BindingData::PackageConfig* BindingData::TraverseParent( + Realm* realm, std::string_view check_path) { + auto env = realm->env(); + auto root_separator_index = check_path.find_first_of(kPathSeparator); + size_t separator_index = 0; + const bool is_permissions_enabled = env->permission()->enabled(); + + do { + separator_index = check_path.find_last_of(kPathSeparator); + check_path = check_path.substr(0, separator_index); + + // We don't need to try "/" + if (check_path.empty()) { + break; + } + + // Stop the search when the process doesn't have permissions + // to walk upwards + if (UNLIKELY(is_permissions_enabled && + !env->permission()->is_granted( + permission::PermissionScope::kFileSystemRead, + std::string(check_path) + kPathSeparator))) { + return nullptr; + } + + // Check if the path ends with `/node_modules` + if (check_path.size() >= kNodeModules.size() && + std::equal(check_path.end() - kNodeModules.size(), + check_path.end(), + kNodeModules.begin())) { + return nullptr; + } + + auto package_json = GetPackageJSON( + realm, + std::string(check_path) + kPathSeparator + "package.json", + nullptr); + if (package_json != nullptr) { + return package_json; + } + } while (separator_index > root_separator_index); + + return nullptr; +} + +void BindingData::GetNearestParentPackageJSON( + const v8::FunctionCallbackInfo& args) { + CHECK_GE(args.Length(), 1); + CHECK(args[0]->IsString()); + + Realm* realm = Realm::GetCurrent(args); + Utf8Value path_value(realm->isolate(), args[0]); + auto package_json = TraverseParent(realm, path_value.ToStringView()); + + if (package_json != nullptr) { + args.GetReturnValue().Set(package_json->Serialize(realm)); + } +} + +void BindingData::GetNearestParentPackageJSONType( + const FunctionCallbackInfo& args) { + CHECK_GE(args.Length(), 1); + CHECK(args[0]->IsString()); + + Realm* realm = Realm::GetCurrent(args); + Utf8Value path(realm->isolate(), args[0]); + auto package_json = TraverseParent(realm, path.ToStringView()); + + if (package_json == nullptr) { + return; + } + + Local values[3] = { + ToV8Value(realm->context(), package_json->type).ToLocalChecked(), + ToV8Value(realm->context(), package_json->file_path).ToLocalChecked(), + ToV8Value(realm->context(), package_json->raw_json).ToLocalChecked()}; + args.GetReturnValue().Set(Array::New(realm->isolate(), values, 3)); +} + +void BindingData::GetPackageScopeConfig( + const FunctionCallbackInfo& args) { + CHECK_GE(args.Length(), 1); + CHECK(args[0]->IsString()); + + Realm* realm = Realm::GetCurrent(args); + Utf8Value resolved(realm->isolate(), args[0]); + auto package_json_url_base = ada::parse(resolved.ToStringView()); + if (!package_json_url_base) { + url::ThrowInvalidURL(realm->env(), resolved.ToStringView(), std::nullopt); + return; + } + auto package_json_url = + ada::parse("./package.json", &package_json_url_base.value()); + if (!package_json_url) { + url::ThrowInvalidURL(realm->env(), "./package.json", resolved.ToString()); + return; + } + + std::string_view node_modules_package_path = "node_modules/package.json"; + auto error_context = ErrorContext(); + error_context.is_esm = true; + + // TODO(@anonrig): Rewrite this function and avoid calling URL parser. + while (true) { + auto pathname = package_json_url->get_pathname(); + if (pathname.size() >= node_modules_package_path.size() && + pathname.compare(pathname.size() - node_modules_package_path.size(), + node_modules_package_path.size(), + node_modules_package_path) == 0) { + break; + } + + auto file_url = url::FileURLToPath(realm->env(), *package_json_url); + CHECK(file_url); + error_context.specifier = resolved.ToString(); + auto package_json = GetPackageJSON(realm, *file_url, &error_context); + if (package_json != nullptr) { + return args.GetReturnValue().Set(package_json->Serialize(realm)); + } + + auto last_href = std::string(package_json_url->get_href()); + auto last_pathname = std::string(package_json_url->get_pathname()); + package_json_url = ada::parse("../package.json", &package_json_url.value()); + if (!package_json_url) { + url::ThrowInvalidURL(realm->env(), "../package.json", last_href); + return; + } + + // Terminates at root where ../package.json equals ../../package.json + // (can't just check "/package.json" for Windows support). + if (package_json_url->get_pathname() == last_pathname) { + break; + } + } + + auto package_json_url_as_path = + url::FileURLToPath(realm->env(), *package_json_url); + CHECK(package_json_url_as_path); + return args.GetReturnValue().Set( + String::NewFromUtf8(realm->isolate(), + package_json_url_as_path->c_str(), + NewStringType::kNormal, + package_json_url_as_path->size()) + .ToLocalChecked()); +} + +void BindingData::CreatePerIsolateProperties(IsolateData* isolate_data, + Local target) { + Isolate* isolate = isolate_data->isolate(); + SetMethod(isolate, target, "readPackageJSON", ReadPackageJSON); + SetMethod(isolate, + target, + "getNearestParentPackageJSONType", + GetNearestParentPackageJSONType); + SetMethod(isolate, + target, + "getNearestParentPackageJSON", + GetNearestParentPackageJSON); + SetMethod(isolate, target, "getPackageScopeConfig", GetPackageScopeConfig); +} + +void BindingData::CreatePerContextProperties(Local target, + Local unused, + Local context, + void* priv) { + Realm* realm = Realm::GetCurrent(context); + realm->AddBindingData(target); +} + +void BindingData::RegisterExternalReferences( + ExternalReferenceRegistry* registry) { + registry->Register(ReadPackageJSON); + registry->Register(GetNearestParentPackageJSONType); + registry->Register(GetNearestParentPackageJSON); + registry->Register(GetPackageScopeConfig); +} + +} // namespace modules +} // namespace node + +NODE_BINDING_CONTEXT_AWARE_INTERNAL( + modules, node::modules::BindingData::CreatePerContextProperties) +NODE_BINDING_PER_ISOLATE_INIT( + modules, node::modules::BindingData::CreatePerIsolateProperties) +NODE_BINDING_EXTERNAL_REFERENCE( + modules, node::modules::BindingData::RegisterExternalReferences) diff --git a/src/node_modules.h b/src/node_modules.h new file mode 100644 index 00000000000000..27b2bcb11f56b0 --- /dev/null +++ b/src/node_modules.h @@ -0,0 +1,89 @@ +#ifndef SRC_NODE_MODULES_H_ +#define SRC_NODE_MODULES_H_ + +#include "v8-function-callback.h" +#if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + +#include "node.h" +#include "node_snapshotable.h" +#include "simdjson.h" +#include "util.h" +#include "v8-fast-api-calls.h" +#include "v8.h" + +#include +#include +#include +#include + +namespace node { +class ExternalReferenceRegistry; + +namespace modules { + +class BindingData : public SnapshotableObject { + public: + using InternalFieldInfo = InternalFieldInfoBase; + + struct PackageConfig { + std::string file_path; + std::optional name; + std::optional main; + std::string type = "none"; + std::optional exports; + std::optional imports; + std::string raw_json; + + v8::Local Serialize(Realm* realm) const; + }; + + struct ErrorContext { + std::optional base; + std::string specifier; + bool is_esm; + }; + + BindingData(Realm* realm, + v8::Local obj, + InternalFieldInfo* info = nullptr); + SERIALIZABLE_OBJECT_METHODS() + SET_BINDING_ID(modules_binding_data) + + void MemoryInfo(MemoryTracker* tracker) const override; + SET_SELF_SIZE(BindingData) + SET_MEMORY_INFO_NAME(BindingData) + + static void ReadPackageJSON(const v8::FunctionCallbackInfo& args); + static void GetNearestParentPackageJSON( + const v8::FunctionCallbackInfo& args); + static void GetNearestParentPackageJSONType( + const v8::FunctionCallbackInfo& args); + static void GetPackageScopeConfig( + const v8::FunctionCallbackInfo& args); + + static void CreatePerIsolateProperties(IsolateData* isolate_data, + v8::Local ctor); + static void CreatePerContextProperties(v8::Local target, + v8::Local unused, + v8::Local context, + void* priv); + static void RegisterExternalReferences(ExternalReferenceRegistry* registry); + + private: + std::unordered_map package_configs_; + simdjson::ondemand::parser json_parser; + // returns null on error + static const PackageConfig* GetPackageJSON( + Realm* realm, + std::string_view path, + ErrorContext* error_context = nullptr); + static const PackageConfig* TraverseParent(Realm* realm, + std::string_view check_path); +}; + +} // namespace modules +} // namespace node + +#endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS + +#endif // SRC_NODE_MODULES_H_ diff --git a/src/node_options.cc b/src/node_options.cc index 417d4679e84ec3..ccfca6f4e55523 100644 --- a/src/node_options.cc +++ b/src/node_options.cc @@ -527,6 +527,10 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { &EnvironmentOptions::warnings, kAllowedInEnvvar, true); + AddOption("--disable-warning", + "silence specific process warnings", + &EnvironmentOptions::disable_warnings, + kAllowedInEnvvar); AddOption("--force-context-aware", "disable loading non-context-aware addons", &EnvironmentOptions::force_context_aware, @@ -668,6 +672,10 @@ EnvironmentOptionsParser::EnvironmentOptionsParser() { "show stack traces on process warnings", &EnvironmentOptions::trace_warnings, kAllowedInEnvvar); + AddOption("--trace-promises", + "show stack traces on promise initialization and resolution", + &EnvironmentOptions::trace_promises, + kAllowedInEnvvar); AddOption("--experimental-default-type", "set module system to use by default", &EnvironmentOptions::type, diff --git a/src/node_options.h b/src/node_options.h index 04c8a9e438dcfb..21b572c265c4c9 100644 --- a/src/node_options.h +++ b/src/node_options.h @@ -139,6 +139,7 @@ class EnvironmentOptions : public Options { bool allow_native_addons = true; bool global_search_paths = true; bool warnings = true; + std::vector disable_warnings; bool force_context_aware = false; bool pending_deprecation = false; bool preserve_symlinks = false; @@ -178,6 +179,7 @@ class EnvironmentOptions : public Options { bool trace_tls = false; bool trace_uncaught = false; bool trace_warnings = false; + bool trace_promises = false; bool extra_info_on_fatal_exception = true; std::string unhandled_rejections; std::vector userland_loaders; diff --git a/src/node_perf.cc b/src/node_perf.cc index 360cc8bf673073..603af57b2639b2 100644 --- a/src/node_perf.cc +++ b/src/node_perf.cc @@ -291,6 +291,22 @@ void MarkBootstrapComplete(const FunctionCallbackInfo& args) { performance::NODE_PERFORMANCE_MILESTONE_BOOTSTRAP_COMPLETE); } +static double PerformanceNowImpl() { + return static_cast(uv_hrtime() - performance_process_start) / + NANOS_PER_MILLIS; +} + +static double FastPerformanceNow(v8::Local receiver) { + return PerformanceNowImpl(); +} + +static void SlowPerformanceNow(const FunctionCallbackInfo& args) { + args.GetReturnValue().Set(PerformanceNowImpl()); +} + +static v8::CFunction fast_performance_now( + v8::CFunction::Make(FastPerformanceNow)); + static void CreatePerIsolateProperties(IsolateData* isolate_data, Local target) { Isolate* isolate = isolate_data->isolate(); @@ -311,6 +327,8 @@ static void CreatePerIsolateProperties(IsolateData* isolate_data, SetMethod(isolate, target, "getTimeOriginTimestamp", GetTimeOriginTimeStamp); SetMethod(isolate, target, "createELDHistogram", CreateELDHistogram); SetMethod(isolate, target, "markBootstrapComplete", MarkBootstrapComplete); + SetFastMethodNoSideEffect( + isolate, target, "now", SlowPerformanceNow, &fast_performance_now); } void CreatePerContextProperties(Local target, @@ -376,6 +394,9 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(GetTimeOriginTimeStamp); registry->Register(CreateELDHistogram); registry->Register(MarkBootstrapComplete); + registry->Register(SlowPerformanceNow); + registry->Register(FastPerformanceNow); + registry->Register(fast_performance_now.GetTypeInfo()); HistogramBase::RegisterExternalReferences(registry); IntervalHistogram::RegisterExternalReferences(registry); } diff --git a/src/node_process.h b/src/node_process.h index cb8c7962825f46..ee6e6a81676bd6 100644 --- a/src/node_process.h +++ b/src/node_process.h @@ -15,7 +15,7 @@ class MemoryTracker; class ExternalReferenceRegistry; class Realm; -void CreateEnvProxyTemplate(v8::Isolate* isolate, IsolateData* isolate_data); +void CreateEnvProxyTemplate(IsolateData* isolate_data); // Most of the time, it's best to use `console.error` to write // to the process.stderr stream. However, in some cases, such as @@ -48,16 +48,20 @@ void PatchProcessObject(const v8::FunctionCallbackInfo& args); namespace process { class BindingData : public SnapshotableObject { public: + struct InternalFieldInfo : public node::InternalFieldInfoBase { + AliasedBufferIndex hrtime_buffer; + }; + static void AddMethods(v8::Isolate* isolate, v8::Local target); static void RegisterExternalReferences(ExternalReferenceRegistry* registry); - using InternalFieldInfo = InternalFieldInfoBase; - SERIALIZABLE_OBJECT_METHODS() SET_BINDING_ID(process_binding_data) - BindingData(Realm* realm, v8::Local object); + BindingData(Realm* realm, + v8::Local object, + InternalFieldInfo* info = nullptr); void MemoryInfo(MemoryTracker* tracker) const override; SET_MEMORY_INFO_NAME(BindingData) @@ -81,10 +85,10 @@ class BindingData : public SnapshotableObject { static void SlowBigInt(const v8::FunctionCallbackInfo& args); private: - static constexpr size_t kBufferSize = - std::max(sizeof(uint64_t), sizeof(uint32_t) * 3); - v8::Global array_buffer_; - std::shared_ptr backing_store_; + // Buffer length in uint32. + static constexpr size_t kHrTimeBufferLength = 3; + AliasedUint32Array hrtime_buffer_; + InternalFieldInfo* internal_field_info_ = nullptr; // These need to be static so that we have their addresses available to // register as external references in the snapshot at environment creation diff --git a/src/node_process_methods.cc b/src/node_process_methods.cc index 34d3c3af4c3e10..cdbe07947b01d1 100644 --- a/src/node_process_methods.cc +++ b/src/node_process_methods.cc @@ -64,7 +64,7 @@ Mutex umask_mutex; #define NANOS_PER_SEC 1000000000 static void Abort(const FunctionCallbackInfo& args) { - Abort(); + ABORT(); } // For internal testing only, not exposed to userland. @@ -465,15 +465,29 @@ static void ReallyExit(const FunctionCallbackInfo& args) { namespace process { -BindingData::BindingData(Realm* realm, v8::Local object) - : SnapshotableObject(realm, object, type_int) { +BindingData::BindingData(Realm* realm, + v8::Local object, + InternalFieldInfo* info) + : SnapshotableObject(realm, object, type_int), + hrtime_buffer_(realm->isolate(), + kHrTimeBufferLength, + MAYBE_FIELD_PTR(info, hrtime_buffer)) { Isolate* isolate = realm->isolate(); Local context = realm->context(); - Local ab = ArrayBuffer::New(isolate, kBufferSize); - array_buffer_.Reset(isolate, ab); - object->Set(context, FIXED_ONE_BYTE_STRING(isolate, "hrtimeBuffer"), ab) - .ToChecked(); - backing_store_ = ab->GetBackingStore(); + + if (info == nullptr) { + object + ->Set(context, + FIXED_ONE_BYTE_STRING(isolate, "hrtimeBuffer"), + hrtime_buffer_.GetJSArray()) + .ToChecked(); + } else { + hrtime_buffer_.Deserialize(realm->context()); + } + + // The hrtime buffer is referenced from the binding data js object. + // Make the native handle weak to avoid keeping the realm alive. + hrtime_buffer_.MakeWeak(); } v8::CFunction BindingData::fast_number_(v8::CFunction::Make(FastNumber)); @@ -503,7 +517,7 @@ BindingData* BindingData::FromV8Value(Local value) { } void BindingData::MemoryInfo(MemoryTracker* tracker) const { - tracker->TrackField("array_buffer", array_buffer_); + tracker->TrackField("hrtime_buffer", hrtime_buffer_); } // This is the legacy version of hrtime before BigInt was introduced in @@ -516,20 +530,19 @@ void BindingData::MemoryInfo(MemoryTracker* tracker) const { // because there is no Uint64Array in JS. // The third entry contains the remaining nanosecond part of the value. void BindingData::NumberImpl(BindingData* receiver) { - // Make sure we don't accidentally access buffers wiped for snapshot. - CHECK(!receiver->array_buffer_.IsEmpty()); uint64_t t = uv_hrtime(); - uint32_t* fields = static_cast(receiver->backing_store_->Data()); - fields[0] = (t / NANOS_PER_SEC) >> 32; - fields[1] = (t / NANOS_PER_SEC) & 0xffffffff; - fields[2] = t % NANOS_PER_SEC; + receiver->hrtime_buffer_[0] = (t / NANOS_PER_SEC) >> 32; + receiver->hrtime_buffer_[1] = (t / NANOS_PER_SEC) & 0xffffffff; + receiver->hrtime_buffer_[2] = t % NANOS_PER_SEC; } void BindingData::BigIntImpl(BindingData* receiver) { - // Make sure we don't accidentally access buffers wiped for snapshot. - CHECK(!receiver->array_buffer_.IsEmpty()); uint64_t t = uv_hrtime(); - uint64_t* fields = static_cast(receiver->backing_store_->Data()); + // The buffer is a Uint32Array, so we need to reinterpret it as a + // Uint64Array to write the value. The buffer is valid at this scope so we + // can safely cast away the constness. + uint64_t* fields = reinterpret_cast( + const_cast(receiver->hrtime_buffer_.GetNativeBuffer())); fields[0] = t; } @@ -543,9 +556,10 @@ void BindingData::SlowNumber(const v8::FunctionCallbackInfo& args) { bool BindingData::PrepareForSerialization(Local context, v8::SnapshotCreator* creator) { - // It's not worth keeping. - // Release it, we will recreate it when the instance is dehydrated. - array_buffer_.Reset(); + DCHECK_NULL(internal_field_info_); + internal_field_info_ = InternalFieldInfoBase::New(type()); + internal_field_info_->hrtime_buffer = + hrtime_buffer_.Serialize(context, creator); // Return true because we need to maintain the reference to the binding from // JS land. return true; @@ -553,8 +567,8 @@ bool BindingData::PrepareForSerialization(Local context, InternalFieldInfoBase* BindingData::Serialize(int index) { DCHECK_IS_SNAPSHOT_SLOT(index); - InternalFieldInfo* info = - InternalFieldInfoBase::New(type()); + InternalFieldInfo* info = internal_field_info_; + internal_field_info_ = nullptr; return info; } @@ -566,7 +580,9 @@ void BindingData::Deserialize(Local context, v8::HandleScope scope(context->GetIsolate()); Realm* realm = Realm::GetCurrent(context); // Recreate the buffer in the constructor. - BindingData* binding = realm->AddBindingData(holder); + InternalFieldInfo* casted_info = static_cast(info); + BindingData* binding = + realm->AddBindingData(holder, casted_info); CHECK_NOT_NULL(binding); } diff --git a/src/node_realm.cc b/src/node_realm.cc index 7101b23e347c7c..6262ed8cde59f2 100644 --- a/src/node_realm.cc +++ b/src/node_realm.cc @@ -223,7 +223,7 @@ void Realm::PrintInfoForSnapshot() { fprintf(stderr, "BaseObjects of the Realm:\n"); size_t i = 0; ForEachBaseObject([&](BaseObject* obj) { - std::cout << "#" << i++ << " " << obj << ": " << obj->MemoryInfoName() + std::cerr << "#" << i++ << " " << obj << ": " << obj->MemoryInfoName() << "\n"; }); @@ -344,10 +344,11 @@ MaybeLocal PrincipalRealm::BootstrapRealm() { return MaybeLocal(); } + // Setup process.env proxy. Local env_string = FIXED_ONE_BYTE_STRING(isolate_, "env"); Local env_proxy; - CreateEnvProxyTemplate(isolate_, env_->isolate_data()); - if (!env_->env_proxy_template()->NewInstance(context()).ToLocal(&env_proxy) || + if (!isolate_data()->env_proxy_template()->NewInstance(context()).ToLocal( + &env_proxy) || process_object()->Set(context(), env_string, env_proxy).IsNothing()) { return MaybeLocal(); } diff --git a/src/node_root_certs.h b/src/node_root_certs.h index 2d30eef6192d05..cb1c6d7b70a446 100644 --- a/src/node_root_certs.h +++ b/src/node_root_certs.h @@ -655,39 +655,6 @@ "WD9f\n" "-----END CERTIFICATE-----", -/* Autoridad de Certificacion Firmaprofesional CIF A62634068 */ -"-----BEGIN CERTIFICATE-----\n" -"MIIGFDCCA/ygAwIBAgIIU+w77vuySF8wDQYJKoZIhvcNAQEFBQAwUTELMAkGA1UEBhMCRVMx\n" -"QjBABgNVBAMMOUF1dG9yaWRhZCBkZSBDZXJ0aWZpY2FjaW9uIEZpcm1hcHJvZmVzaW9uYWwg\n" -"Q0lGIEE2MjYzNDA2ODAeFw0wOTA1MjAwODM4MTVaFw0zMDEyMzEwODM4MTVaMFExCzAJBgNV\n" -"BAYTAkVTMUIwQAYDVQQDDDlBdXRvcmlkYWQgZGUgQ2VydGlmaWNhY2lvbiBGaXJtYXByb2Zl\n" -"c2lvbmFsIENJRiBBNjI2MzQwNjgwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDK\n" -"lmuO6vj78aI14H9M2uDDUtd9thDIAl6zQyrET2qyyhxdKJp4ERppWVevtSBC5IsP5t9bpgOS\n" -"L/UR5GLXMnE42QQMcas9UX4PB99jBVzpv5RvwSmCwLTaUbDBPLutN0pcyvFLNg4kq7/DhHf9\n" -"qFD0sefGL9ItWY16Ck6WaVICqjaY7Pz6FIMMNx/Jkjd/14Et5cS54D40/mf0PmbR0/RAz15i\n" -"NA9wBj4gGFrO93IbJWyTdBSTo3OxDqqHECNZXyAFGUftaI6SEspd/NYrspI8IM/hX68gvqB2\n" -"f3bl7BqGYTM+53u0P6APjqK5am+5hyZvQWyIplD9amML9ZMWGxmPsu2bm8mQ9QEM3xk9Dz44\n" -"I8kvjwzRAv4bVdZO0I08r0+k8/6vKtMFnXkIoctXMbScyJCyZ/QYFpM6/EfY0XiWMR+6Kwxf\n" -"XZmtY4laJCB22N/9q06mIqqdXuYnin1oKaPnirjaEbsXLZmdEyRG98Xi2J+Of8ePdG1asuhy\n" -"9azuJBCtLxTa/y2aRnFHvkLfuwHb9H/TKI8xWVvTyQKmtFLKbpf7Q8UIJm+K9Lv9nyiqDdVF\n" -"8xM6HdjAeI9BZzwelGSuewvF6NkBiDkal4ZkQdU7hwxu+g/GvUgUvzlN1J5Bto+WHWOWk9mV\n" -"BngxaJ43BjuAiUVhOSPHG0SjFeUc+JIwuwIDAQABo4HvMIHsMBIGA1UdEwEB/wQIMAYBAf8C\n" -"AQEwDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBRlzeurNR4APn7VdMActHNHDhpkLzCBpgYD\n" -"VR0gBIGeMIGbMIGYBgRVHSAAMIGPMC8GCCsGAQUFBwIBFiNodHRwOi8vd3d3LmZpcm1hcHJv\n" -"ZmVzaW9uYWwuY29tL2NwczBcBggrBgEFBQcCAjBQHk4AUABhAHMAZQBvACAAZABlACAAbABh\n" -"ACAAQgBvAG4AYQBuAG8AdgBhACAANAA3ACAAQgBhAHIAYwBlAGwAbwBuAGEAIAAwADgAMAAx\n" -"ADcwDQYJKoZIhvcNAQEFBQADggIBABd9oPm03cXF661LJLWhAqvdpYhKsg9VSytXjDvlMd3+\n" -"xDLx51tkljYyGOylMnfX40S2wBEqgLk9am58m9Ot/MPWo+ZkKXzR4Tgegiv/J2Wv+xYVxC5x\n" -"hOW1//qkR71kMrv2JYSiJ0L1ILDCExARzRAVukKQKtJE4ZYm6zFIEv0q2skGz3QeqUvVhyj5\n" -"eTSSPi5E6PaPT481PyWzOdxjKpBrIF/EUhJOlywqrJ2X3kjyo2bbwtKDlaZmp54lD+kLM5Fl\n" -"ClrD2VQS3a/DTg4fJl4N3LON7NWBcN7STyQF82xO9UxJZo3R/9ILJUFI/lGExkKvgATP0H5k\n" -"SeTy36LssUzAKh3ntLFlosS88Zj0qnAHY7S42jtM+kAiMFsRpvAFDsYCA0irhpuF3dvd6qJ2\n" -"gHN99ZwExEWN57kci57q13XRcrHedUTnQn3iV2t93Jm8PYMo6oCTjcVMZcFwgbg4/EMxsvYD\n" -"NEeyrPsiBsse3RdHHF9mudMaotoRsaS8I8nkvof/uZS2+F0gStRf571oe2XyFR7SOqkt6dhr\n" -"JKyXWERHrVkY8SFlcN7ONGCoQPHzPKTDKCOM/iczQ0CgFzzr6juwcqajuUpLXhZI9LK8yIyS\n" -"xZ2frHI2vDSANGupi5LAuBft7HZT9SQBjLMi6Et8Vcad+qMUu2WFbm5PEn4KPJ2V\n" -"-----END CERTIFICATE-----", - /* Izenpe.com */ "-----BEGIN CERTIFICATE-----\n" "MIIF8TCCA9mgAwIBAgIQALC3WhZIX7/hy/WL1xnmfTANBgkqhkiG9w0BAQsFADA4MQswCQYD\n" @@ -3440,4 +3407,141 @@ "dDTedk+SKlOxJTnbPP/lPqYO5Wue/9vsL3SD3460s6neFE3/MaNFcyT6lSnMEpcEoji2jbDw\n" "N/zIIX8/syQbPYtuzE2wFg2WHYMfRsCbvUOZ58SWLs5fyQ==\n" "-----END CERTIFICATE-----", + +/* TrustAsia Global Root CA G3 */ +"-----BEGIN CERTIFICATE-----\n" +"MIIFpTCCA42gAwIBAgIUZPYOZXdhaqs7tOqFhLuxibhxkw8wDQYJKoZIhvcNAQEMBQAwWjEL\n" +"MAkGA1UEBhMCQ04xJTAjBgNVBAoMHFRydXN0QXNpYSBUZWNobm9sb2dpZXMsIEluYy4xJDAi\n" +"BgNVBAMMG1RydXN0QXNpYSBHbG9iYWwgUm9vdCBDQSBHMzAeFw0yMTA1MjAwMjEwMTlaFw00\n" +"NjA1MTkwMjEwMTlaMFoxCzAJBgNVBAYTAkNOMSUwIwYDVQQKDBxUcnVzdEFzaWEgVGVjaG5v\n" +"bG9naWVzLCBJbmMuMSQwIgYDVQQDDBtUcnVzdEFzaWEgR2xvYmFsIFJvb3QgQ0EgRzMwggIi\n" +"MA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQDAMYJhkuSUGwoqZdC+BqmHO1ES6nBBruL7\n" +"dOoKjbmzTNyPtxNST1QY4SxzlZHFZjtqz6xjbYdT8PfxObegQ2OwxANdV6nnRM7EoYNl9lA+\n" +"sX4WuDqKAtCWHwDNBSHvBm3dIZwZQ0WhxeiAysKtQGIXBsaqvPPW5vxQfmZCHzyLpnl5hkA1\n" +"nyDvP+uLRx+PjsXUjrYsyUQE49RDdT/VP68czH5GX6zfZBCK70bwkPAPLfSIC7Epqq+FqklY\n" +"qL9joDiR5rPmd2jE+SoZhLsO4fWvieylL1AgdB4SQXMeJNnKziyhWTXAyB1GJ2Faj/lN03J5\n" +"Zh6fFZAhLf3ti1ZwA0pJPn9pMRJpxx5cynoTi+jm9WAPzJMshH/x/Gr8m0ed262IPfN2dTPX\n" +"S6TIi/n1Q1hPy8gDVI+lhXgEGvNz8teHHUGf59gXzhqcD0r83ERoVGjiQTz+LISGNzzNPy+i\n" +"2+f3VANfWdP3kXjHi3dqFuVJhZBFcnAvkV34PmVACxmZySYgWmjBNb9Pp1Hx2BErW+Canig7\n" +"CjoKH8GB5S7wprlppYiU5msTf9FkPz2ccEblooV7WIQn3MSAPmeamseaMQ4w7OYXQJXZRe0B\n" +"lqq/DPNL0WP3E1jAuPP6Z92bfW1K/zJMtSU7/xxnD4UiWQWRkUF3gdCFTIcQcf+eQxuulXUt\n" +"gQIDAQABo2MwYTAPBgNVHRMBAf8EBTADAQH/MB8GA1UdIwQYMBaAFEDk5PIj7zjKsK5Xf/Ih\n" +"MBY027ySMB0GA1UdDgQWBBRA5OTyI+84yrCuV3/yITAWNNu8kjAOBgNVHQ8BAf8EBAMCAQYw\n" +"DQYJKoZIhvcNAQEMBQADggIBACY7UeFNOPMyGLS0XuFlXsSUT9SnYaP4wM8zAQLpw6o1D/GU\n" +"E3d3NZ4tVlFEbuHGLige/9rsR82XRBf34EzC4Xx8MnpmyFq2XFNFV1pF1AWZLy4jVe5jaN/T\n" +"G3inEpQGAHUNcoTpLrxaatXeL1nHo+zSh2bbt1S1JKv0Q3jbSwTEb93mPmY+KfJLaHEih6D4\n" +"sTNjduMNhXJEIlU/HHzp/LgV6FL6qj6jITk1dImmasI5+njPtqzn59ZW/yOSLlALqbUHM/Q4\n" +"X6RJpstlcHboCoWASzY9M/eVVHUl2qzEc4Jl6VL1XP04lQJqaTDFHApXB64ipCz5xUG3uOyf\n" +"T0gA+QEEVcys+TIxxHWVBqB/0Y0n3bOppHKH/lmLmnp0Ft0WpWIp6zqW3IunaFnT63eROfjX\n" +"y9mPX1onAX1daBli2MjN9LdyR75bl87yraKZk62Uy5P2EgmVtqvXO9A/EcswFi55gORngS1d\n" +"7XB4tmBZrOFdRWOPyN9yaFvqHbgB8X7754qz41SgOAngPN5C8sLtLpvzHzW2NtjjgKGLzZlk\n" +"D8Kqq7HK9W+eQ42EVJmzbsASZthwEPEGNTNDqJwuuhQxzhB/HIbjj9LV+Hfsm6vxL2PZQl/g\n" +"Z4FkkfGXL/xuJvYz+NO1+MRiqzFRJQJ6+N1rZdVtTTDIZbpoFGWsJwt0ivKH\n" +"-----END CERTIFICATE-----", + +/* TrustAsia Global Root CA G4 */ +"-----BEGIN CERTIFICATE-----\n" +"MIICVTCCAdygAwIBAgIUTyNkuI6XY57GU4HBdk7LKnQV1tcwCgYIKoZIzj0EAwMwWjELMAkG\n" +"A1UEBhMCQ04xJTAjBgNVBAoMHFRydXN0QXNpYSBUZWNobm9sb2dpZXMsIEluYy4xJDAiBgNV\n" +"BAMMG1RydXN0QXNpYSBHbG9iYWwgUm9vdCBDQSBHNDAeFw0yMTA1MjAwMjEwMjJaFw00NjA1\n" +"MTkwMjEwMjJaMFoxCzAJBgNVBAYTAkNOMSUwIwYDVQQKDBxUcnVzdEFzaWEgVGVjaG5vbG9n\n" +"aWVzLCBJbmMuMSQwIgYDVQQDDBtUcnVzdEFzaWEgR2xvYmFsIFJvb3QgQ0EgRzQwdjAQBgcq\n" +"hkjOPQIBBgUrgQQAIgNiAATxs8045CVD5d4ZCbuBeaIVXxVjAd7Cq92zphtnS4CDr5nLrBfb\n" +"K5bKfFJV4hrhPVbwLxYI+hW8m7tH5j/uqOFMjPXTNvk4XatwmkcN4oFBButJ+bAp3TPsUKV/\n" +"eSm4IJijYzBhMA8GA1UdEwEB/wQFMAMBAf8wHwYDVR0jBBgwFoAUpbtKl86zK3+kMd6Xg1mD\n" +"pm9xy94wHQYDVR0OBBYEFKW7SpfOsyt/pDHel4NZg6ZvccveMA4GA1UdDwEB/wQEAwIBBjAK\n" +"BggqhkjOPQQDAwNnADBkAjBe8usGzEkxn0AAbbd+NvBNEU/zy4k6LHiRUKNbwMp1JvK/kF0L\n" +"goxgKJ/GcJpo5PECMFxYDlZ2z1jD1xCMuo6u47xkdUfFVZDj/bpV6wfEU6s3qe4hsiFbYI89\n" +"MvHVI5TWWA==\n" +"-----END CERTIFICATE-----", + +/* CommScope Public Trust ECC Root-01 */ +"-----BEGIN CERTIFICATE-----\n" +"MIICHTCCAaOgAwIBAgIUQ3CCd89NXTTxyq4yLzf39H91oJ4wCgYIKoZIzj0EAwMwTjELMAkG\n" +"A1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1Ymxp\n" +"YyBUcnVzdCBFQ0MgUm9vdC0wMTAeFw0yMTA0MjgxNzM1NDNaFw00NjA0MjgxNzM1NDJaME4x\n" +"CzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQ\n" +"dWJsaWMgVHJ1c3QgRUNDIFJvb3QtMDEwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAARLNumuV16o\n" +"cNfQj3Rid8NeeqrltqLxeP0CflfdkXmcbLlSiFS8LwS+uM32ENEp7LXQoMPwiXAZu1FlxUOc\n" +"w5tjnSCDPgYLpkJEhRGnSjot6dZoL0hOUysHP029uax3OVejQjBAMA8GA1UdEwEB/wQFMAMB\n" +"Af8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBSOB2LAUN3GGQYARnQE9/OufXVNMDAKBggq\n" +"hkjOPQQDAwNoADBlAjEAnDPfQeMjqEI2Jpc1XHvr20v4qotzVRVcrHgpD7oh2MSg2NED3W3R\n" +"OT3Ek2DS43KyAjB8xX6I01D1HiXo+k515liWpDVfG2XqYZpwI7UNo5uSUm9poIyNStDuiw7L\n" +"R47QjRE=\n" +"-----END CERTIFICATE-----", + +/* CommScope Public Trust ECC Root-02 */ +"-----BEGIN CERTIFICATE-----\n" +"MIICHDCCAaOgAwIBAgIUKP2ZYEFHpgE6yhR7H+/5aAiDXX0wCgYIKoZIzj0EAwMwTjELMAkG\n" +"A1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1Ymxp\n" +"YyBUcnVzdCBFQ0MgUm9vdC0wMjAeFw0yMTA0MjgxNzQ0NTRaFw00NjA0MjgxNzQ0NTNaME4x\n" +"CzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29wZSBQ\n" +"dWJsaWMgVHJ1c3QgRUNDIFJvb3QtMDIwdjAQBgcqhkjOPQIBBgUrgQQAIgNiAAR4MIHoYx7l\n" +"63FRD/cHB8o5mXxO1Q/MMDALj2aTPs+9xYa9+bG3tD60B8jzljHz7aRP+KNOjSkVWLjVb3/u\n" +"bCK1sK9IRQq9qEmUv4RDsNuESgMjGWdqb8FuvAY5N9GIIvejQjBAMA8GA1UdEwEB/wQFMAMB\n" +"Af8wDgYDVR0PAQH/BAQDAgEGMB0GA1UdDgQWBBTmGHX/72DehKT1RsfeSlXjMjZ59TAKBggq\n" +"hkjOPQQDAwNnADBkAjAmc0l6tqvmSfR9Uj/UQQSugEODZXW5hYA4O9Zv5JOGq4/nich/m35r\n" +"ChJVYaoR4HkCMHfoMXGsPHED1oQmHhS48zs73u1Z/GtMMH9ZzkXpc2AVmkzw5l4lIhVtwodZ\n" +"0LKOag==\n" +"-----END CERTIFICATE-----", + +/* CommScope Public Trust RSA Root-01 */ +"-----BEGIN CERTIFICATE-----\n" +"MIIFbDCCA1SgAwIBAgIUPgNJgXUWdDGOTKvVxZAplsU5EN0wDQYJKoZIhvcNAQELBQAwTjEL\n" +"MAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1\n" +"YmxpYyBUcnVzdCBSU0EgUm9vdC0wMTAeFw0yMTA0MjgxNjQ1NTRaFw00NjA0MjgxNjQ1NTNa\n" +"ME4xCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29w\n" +"ZSBQdWJsaWMgVHJ1c3QgUlNBIFJvb3QtMDEwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK\n" +"AoICAQCwSGWjDR1C45FtnYSkYZYSwu3D2iM0GXb26v1VWvZVAVMP8syMl0+5UMuzAURWlv2b\n" +"KOx7dAvnQmtVzslhsuitQDy6uUEKBU8bJoWPQ7VAtYXR1HHcg0Hz9kXHgKKEUJdGzqAMxGBW\n" +"BB0HW0alDrJLpA6lfO741GIDuZNqihS4cPgugkY4Iw50x2tBt9Apo52AsH53k2NC+zSDO3Oj\n" +"WiE260f6GBfZumbCk6SP/F2krfxQapWsvCQz0b2If4b19bJzKo98rwjyGpg/qYFlP8GMicWW\n" +"MJoKz/TUyDTtnS+8jTiGU+6Xn6myY5QXjQ/cZip8UlF1y5mO6D1cv547KI2DAg+pn3LiLCuz\n" +"3GaXAEDQpFSOm117RTYm1nJD68/A6g3czhLmfTifBSeolz7pUcZsBSjBAg/pGG3svZwG1KdJ\n" +"9FQFa2ww8esD1eo9anbCyxooSU1/ZOD6K9pzg4H/kQO9lLvkuI6cMmPNn7togbGEW682v3fu\n" +"HX/3SZtS7NJ3Wn2RnU3COS3kuoL4b/JOHg9O5j9ZpSPcPYeoKFgo0fEbNttPxP/hjFtyjMcm\n" +"AyejOQoBqsCyMWCDIqFPEgkBEa801M/XrmLTBQe0MXXgDW1XT2mH+VepuhX2yFJtocucH+X8\n" +"eKg1mp9BFM6ltM6UCBwJrVbl2rZJmkrqYxhTnCwuwwIDAQABo0IwQDAPBgNVHRMBAf8EBTAD\n" +"AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUN12mmnQywsL5x6YVEFm45P3luG0wDQYJ\n" +"KoZIhvcNAQELBQADggIBAK+nz97/4L1CjU3lIpbfaOp9TSp90K09FlxD533Ahuh6NWPxzIHI\n" +"xgvoLlI1pKZJkGNRrDSsBTtXAOnTYtPZKdVUvhwQkZyybf5Z/Xn36lbQnmhUQo8mUuJM3y+X\n" +"pi/SB5io82BdS5pYV4jvguX6r2yBS5KPQJqTRlnLX3gWsWc+QgvfKNmwrZggvkN80V4aCRck\n" +"jXtdlemrwWCrWxhkgPut4AZ9HcpZuPN4KWfGVh2vtrV0KnahP/t1MJ+UXjulYPPLXAziDslg\n" +"+MkfFoom3ecnf+slpoq9uC02EJqxWE2aaE9gVOX2RhOOiKy8IUISrcZKiX2bwdgt6ZYD9KJ0\n" +"DLwAHb/WNyVntHKLr4W96ioDj8z7PEQkguIBpQtZtjSNMgsSDesnwv1B10A8ckYpwIzqug/x\n" +"BpMu95yo9GA+o/E4Xo4TwbM6l4c/ksp4qRyv0LAbJh6+cOx69TOY6lz/KwsETkPdY34Op054\n" +"A5U+1C0wlREQKC6/oAI+/15Z0wUOlV9TRe9rh9VIzRamloPh37MG88EU26fsHItdkJANclHn\n" +"YfkUyq+Dj7+vsQpZXdxc1+SWrVtgHdqul7I52Qb1dgAT+GhMIbA1xNxVssnBQVocicCMb3Sg\n" +"azNNtQEo/a2tiRc7ppqEvOuM6sRxJKi6KfkIsidWNTJf6jn7MZrVGczw\n" +"-----END CERTIFICATE-----", + +/* CommScope Public Trust RSA Root-02 */ +"-----BEGIN CERTIFICATE-----\n" +"MIIFbDCCA1SgAwIBAgIUVBa/O345lXGN0aoApYYNK496BU4wDQYJKoZIhvcNAQELBQAwTjEL\n" +"MAkGA1UEBhMCVVMxEjAQBgNVBAoMCUNvbW1TY29wZTErMCkGA1UEAwwiQ29tbVNjb3BlIFB1\n" +"YmxpYyBUcnVzdCBSU0EgUm9vdC0wMjAeFw0yMTA0MjgxNzE2NDNaFw00NjA0MjgxNzE2NDJa\n" +"ME4xCzAJBgNVBAYTAlVTMRIwEAYDVQQKDAlDb21tU2NvcGUxKzApBgNVBAMMIkNvbW1TY29w\n" +"ZSBQdWJsaWMgVHJ1c3QgUlNBIFJvb3QtMDIwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK\n" +"AoICAQDh+g77aAASyE3VrCLENQE7xVTlWXZjpX/rwcRqmL0yjReA61260WI9JSMZNRTpf4mn\n" +"G2I81lDnNJUDMrG0kyI9p+Kx7eZ7Ti6Hmw0zdQreqjXnfuU2mKKuJZ6VszKWpCtYHu8//mI0\n" +"SFHRtI1CrWDaSWqVcN3SAOLMV2MCe5bdSZdbkk6V0/nLKR8YSvgBKtJjCW4k6YnS5cciTNxz\n" +"hkcAqg2Ijq6FfUrpuzNPDlJwnZXjfG2WWy09X6GDRl224yW4fKcZgBzqZUPckXk2LHR88mcG\n" +"yYnJ27/aaL8j7dxrrSiDeS/sOKUNNwFnJ5rpM9kzXzehxfCrPfp4sOcsn/Y+n2Dg70jpkEUe\n" +"BVF4GiwSLFworA2iI540jwXmojPOEXcT1A6kHkIfhs1w/tkuFT0du7jyU1fbzMZ0KZwYszZ1\n" +"OC4PVKH4kh+Jlk+71O6d6Ts2QrUKOyrUZHk2EOH5kQMreyBUzQ0ZGshBMjTRsJnhkB4BQDa1\n" +"t/qp5Xd1pCKBXbCL5CcSD1SIxtuFdOa3wNemKfrb3vOTlycEVS8KbzfFPROvCgCpLIscgSjX\n" +"74Yxqa7ybrjKaixUR9gqiC6vwQcQeKwRoi9C8DfF8rhW3Q5iLc4tVn5V8qdE9isy9COoR+jU\n" +"KgF4z2rDN6ieZdIs5fq6M8EGRPbmz6UNp2YINIos8wIDAQABo0IwQDAPBgNVHRMBAf8EBTAD\n" +"AQH/MA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUR9DnsSL/nSz12Vdgs7GxcJXvYXowDQYJ\n" +"KoZIhvcNAQELBQADggIBAIZpsU0v6Z9PIpNojuQhmaPORVMbc0RTAIFhzTHjCLqBKCh6krm2\n" +"qMhDnscTJk3C2OVVnJJdUNjCK9v+5qiXz1I6JMNlZFxHMaNlNRPDk7n3+VGXu6TwYofF1gbT\n" +"l4MgqX67tiHCpQ2EAOHyJxCDut0DgdXdaMNmEMjRdrSzbymeAPnCKfWxkxlSaRosTKCL4BWa\n" +"MS/TiJVZbuXEs1DIFAhKm4sTg7GkcrI7djNB3NyqpgdvHSQSn8h2vS/ZjvQs7rfSOBAkNlEv\n" +"41xdgSGn2rtO/+YHqP65DSdsu3BaVXoT6fEqSWnHX4dXTEN5bTpl6TBcQe7rd6VzEojov32u\n" +"5cSoHw2OHG1QAk8mGEPej1WFsQs3BWDJVTkSBKEqz3EWnzZRSb9wO55nnPt7eck5HHisd5FU\n" +"mrh1CoFSl+NmYWvtPjgelmFV4ZFUjO2MJB+ByRCac5krFk5yAD9UG/iNuovnFNa2RU9g7Jau\n" +"wy8CTl2dlklyALKrdVwPaFsdZcJfMw8eD/A7hvWwTruc9+olBdytoptLFwG+Qt81IR2tq670\n" +"v64fG9PiO/yzcnMcmyiQiRM9HcEARwmWmjgb3bHPDcK0RPOWlc4yOo80nOAXx17Org3bhzjl\n" +"P1v9mxnhMUF6cKojawHhRUzNlM47ni3niAIi9G7oyOzWPPO5std3eqx7\n" +"-----END CERTIFICATE-----", #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS diff --git a/src/node_sea.cc b/src/node_sea.cc index 521f2f670b28c8..d1ab5051032d76 100644 --- a/src/node_sea.cc +++ b/src/node_sea.cc @@ -414,7 +414,9 @@ std::optional GenerateCodeCache(std::string_view main_path, RAIIIsolate raii_isolate(SnapshotBuilder::GetEmbeddedSnapshotData()); Isolate* isolate = raii_isolate.get(); + v8::Isolate::Scope isolate_scope(isolate); HandleScope handle_scope(isolate); + Local context = Context::New(isolate); Context::Scope context_scope(context); diff --git a/src/node_shadow_realm.cc b/src/node_shadow_realm.cc index 1cf0a57617b8b2..e7199e18756521 100644 --- a/src/node_shadow_realm.cc +++ b/src/node_shadow_realm.cc @@ -1,6 +1,7 @@ #include "node_shadow_realm.h" #include "env-inl.h" #include "node_errors.h" +#include "node_process.h" namespace node { namespace shadow_realm { @@ -9,6 +10,8 @@ using v8::EscapableHandleScope; using v8::HandleScope; using v8::Local; using v8::MaybeLocal; +using v8::Object; +using v8::String; using v8::Value; using TryCatchScope = node::errors::TryCatchScope; @@ -16,6 +19,11 @@ using TryCatchScope = node::errors::TryCatchScope; // static ShadowRealm* ShadowRealm::New(Environment* env) { ShadowRealm* realm = new ShadowRealm(env); + // TODO(legendecas): required by node::PromiseRejectCallback. + // Remove this once promise rejection doesn't need to be handled across + // realms. + realm->context()->SetSecurityToken( + env->principal_realm()->context()->GetSecurityToken()); // We do not expect the realm bootstrapping to throw any // exceptions. If it does, exit the current Node.js instance. @@ -32,6 +40,10 @@ MaybeLocal HostCreateShadowRealmContextCallback( Local initiator_context) { Environment* env = Environment::GetCurrent(initiator_context); EscapableHandleScope scope(env->isolate()); + + // We do not expect the realm bootstrapping to throw any + // exceptions. If it does, exit the current Node.js instance. + TryCatchScope try_catch(env, TryCatchScope::CatchMode::kFatal); ShadowRealm* realm = ShadowRealm::New(env); if (realm != nullptr) { return scope.Escape(realm->context()); @@ -137,6 +149,28 @@ v8::MaybeLocal ShadowRealm::BootstrapRealm() { } } + // The process object is not exposed globally in ShadowRealm yet. + // However, the process properties need to be setup for built-in modules. + // Specifically, process.cwd() is needed by the ESM loader. + if (ExecuteBootstrapper( + "internal/bootstrap/switches/does_not_own_process_state") + .IsEmpty()) { + return MaybeLocal(); + } + + // Setup process.env proxy. + Local env_string = FIXED_ONE_BYTE_STRING(isolate_, "env"); + Local env_proxy; + if (!isolate_data()->env_proxy_template()->NewInstance(context()).ToLocal( + &env_proxy) || + process_object()->Set(context(), env_string, env_proxy).IsNothing()) { + return MaybeLocal(); + } + + if (ExecuteBootstrapper("internal/bootstrap/shadow_realm").IsEmpty()) { + return MaybeLocal(); + } + return v8::True(isolate_); } diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index 562a47ddcc9c8e..f40669d1695a4b 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -19,6 +19,7 @@ #include "node_internals.h" #include "node_main_instance.h" #include "node_metadata.h" +#include "node_modules.h" #include "node_process.h" #include "node_snapshot_builder.h" #include "node_url.h" @@ -1074,7 +1075,7 @@ ExitCode SnapshotBuilder::CreateSnapshot(SnapshotData* out, if (per_process::enabled_debug_list.enabled(DebugCategory::MKSNAPSHOT)) { env->ForEachRealm([](Realm* realm) { realm->PrintInfoForSnapshot(); }); - printf("Environment = %p\n", env); + fprintf(stderr, "Environment = %p\n", env); } // Serialize the native states diff --git a/src/node_url.cc b/src/node_url.cc index 94510aa1904a00..95d15c78407359 100644 --- a/src/node_url.cc +++ b/src/node_url.cc @@ -229,35 +229,6 @@ void BindingData::Format(const FunctionCallbackInfo& args) { .ToLocalChecked()); } -void BindingData::ThrowInvalidURL(node::Environment* env, - std::string_view input, - std::optional base) { - Local err = ERR_INVALID_URL(env->isolate(), "Invalid URL"); - DCHECK(err->IsObject()); - - auto err_object = err.As(); - - USE(err_object->Set(env->context(), - env->input_string(), - v8::String::NewFromUtf8(env->isolate(), - input.data(), - v8::NewStringType::kNormal, - input.size()) - .ToLocalChecked())); - - if (base.has_value()) { - USE(err_object->Set(env->context(), - env->base_string(), - v8::String::NewFromUtf8(env->isolate(), - base.value().c_str(), - v8::NewStringType::kNormal, - base.value().size()) - .ToLocalChecked())); - } - - env->isolate()->ThrowException(err); -} - void BindingData::Parse(const FunctionCallbackInfo& args) { CHECK_GE(args.Length(), 1); CHECK(args[0]->IsString()); // input @@ -419,6 +390,35 @@ void BindingData::RegisterExternalReferences( } } +void ThrowInvalidURL(node::Environment* env, + std::string_view input, + std::optional base) { + Local err = ERR_INVALID_URL(env->isolate(), "Invalid URL"); + DCHECK(err->IsObject()); + + auto err_object = err.As(); + + USE(err_object->Set(env->context(), + env->input_string(), + v8::String::NewFromUtf8(env->isolate(), + input.data(), + v8::NewStringType::kNormal, + input.size()) + .ToLocalChecked())); + + if (base.has_value()) { + USE(err_object->Set(env->context(), + env->base_string(), + v8::String::NewFromUtf8(env->isolate(), + base.value().c_str(), + v8::NewStringType::kNormal, + base.value().size()) + .ToLocalChecked())); + } + + env->isolate()->ThrowException(err); +} + std::string FromFilePath(std::string_view file_path) { // Avoid unnecessary allocations. size_t pos = file_path.empty() ? std::string_view::npos : file_path.find('%'); diff --git a/src/node_url.h b/src/node_url.h index c106e8245284da..3c77b538b16f8f 100644 --- a/src/node_url.h +++ b/src/node_url.h @@ -77,11 +77,11 @@ class BindingData : public SnapshotableObject { const ada::scheme::type type); static v8::CFunction fast_can_parse_methods_[]; - static void ThrowInvalidURL(Environment* env, - std::string_view input, - std::optional base); }; +void ThrowInvalidURL(Environment* env, + std::string_view input, + std::optional base); std::string FromFilePath(std::string_view file_path); std::optional FileURLToPath(Environment* env, const ada::url_aggregator& file_url); diff --git a/src/node_util.cc b/src/node_util.cc index 9b3ba203a3a8fc..dfdd87d297e1e2 100644 --- a/src/node_util.cc +++ b/src/node_util.cc @@ -37,9 +37,6 @@ using v8::String; using v8::Uint32; using v8::Value; -// Used in ToUSVString(). -constexpr char16_t kUnicodeReplacementCharacter = 0xFFFD; - // If a UTF-16 character is a low/trailing surrogate. CHAR_TEST(16, IsUnicodeTrail, (ch & 0xFC00) == 0xDC00) @@ -240,40 +237,6 @@ static uint32_t FastGuessHandleType(Local receiver, const uint32_t fd) { CFunction fast_guess_handle_type_(CFunction::Make(FastGuessHandleType)); -static void ToUSVString(const FunctionCallbackInfo& args) { - Environment* env = Environment::GetCurrent(args); - CHECK_GE(args.Length(), 2); - CHECK(args[0]->IsString()); - CHECK(args[1]->IsNumber()); - - TwoByteValue value(env->isolate(), args[0]); - - int64_t start = args[1]->IntegerValue(env->context()).FromJust(); - CHECK_GE(start, 0); - - for (size_t i = start; i < value.length(); i++) { - char16_t c = value[i]; - if (!IsUnicodeSurrogate(c)) { - continue; - } else if (IsUnicodeSurrogateTrail(c) || i == value.length() - 1) { - value[i] = kUnicodeReplacementCharacter; - } else { - char16_t d = value[i + 1]; - if (IsUnicodeTrail(d)) { - i++; - } else { - value[i] = kUnicodeReplacementCharacter; - } - } - } - - args.GetReturnValue().Set( - String::NewFromTwoByte(env->isolate(), - *value, - v8::NewStringType::kNormal, - value.length()).ToLocalChecked()); -} - void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(GetPromiseDetails); registry->Register(GetProxyDetails); @@ -288,7 +251,6 @@ void RegisterExternalReferences(ExternalReferenceRegistry* registry) { registry->Register(GuessHandleType); registry->Register(FastGuessHandleType); registry->Register(fast_guess_handle_type_.GetTypeInfo()); - registry->Register(ToUSVString); } void Initialize(Local target, @@ -403,8 +365,6 @@ void Initialize(Local target, "guessHandleType", GuessHandleType, &fast_guess_handle_type_); - - SetMethodNoSideEffect(context, target, "toUSVString", ToUSVString); } } // namespace util diff --git a/src/node_watchdog.cc b/src/node_watchdog.cc index 8f0a3844121e23..d4eb79ebc32154 100644 --- a/src/node_watchdog.cc +++ b/src/node_watchdog.cc @@ -45,7 +45,7 @@ Watchdog::Watchdog(v8::Isolate* isolate, uint64_t ms, bool* timed_out) int rc; rc = uv_loop_init(&loop_); if (rc != 0) { - OnFatalError("node::Watchdog::Watchdog()", "Failed to initialize uv loop."); + UNREACHABLE("Failed to initialize uv loop."); } rc = uv_async_init(&loop_, &async_, [](uv_async_t* signal) { diff --git a/src/permission/child_process_permission.cc b/src/permission/child_process_permission.cc index de078febf4bcd9..da85083918aa21 100644 --- a/src/permission/child_process_permission.cc +++ b/src/permission/child_process_permission.cc @@ -15,7 +15,7 @@ void ChildProcessPermission::Apply(const std::vector& allow, } bool ChildProcessPermission::is_granted(PermissionScope perm, - const std::string_view& param) { + const std::string_view& param) const { return deny_all_ == false; } diff --git a/src/permission/child_process_permission.h b/src/permission/child_process_permission.h index cf0ec97d5021a3..58f05b01982d6c 100644 --- a/src/permission/child_process_permission.h +++ b/src/permission/child_process_permission.h @@ -15,7 +15,7 @@ class ChildProcessPermission final : public PermissionBase { void Apply(const std::vector& allow, PermissionScope scope) override; bool is_granted(PermissionScope perm, - const std::string_view& param = "") override; + const std::string_view& param = "") const override; private: bool deny_all_; diff --git a/src/permission/fs_permission.cc b/src/permission/fs_permission.cc index fadf75968c779d..5780d6cb2607e3 100644 --- a/src/permission/fs_permission.cc +++ b/src/permission/fs_permission.cc @@ -50,13 +50,14 @@ void FreeRecursivelyNode( delete node; } -bool is_tree_granted(node::permission::FSPermission::RadixTree* granted_tree, - const std::string_view& param) { +bool is_tree_granted( + const node::permission::FSPermission::RadixTree* granted_tree, + const std::string_view& param) { #ifdef _WIN32 // is UNC file path if (param.rfind("\\\\", 0) == 0) { // return lookup with normalized param - int starting_pos = 4; // "\\?\" + size_t starting_pos = 4; // "\\?\" if (param.rfind("\\\\?\\UNC\\") == 0) { starting_pos += 4; // "UNC\" } @@ -118,10 +119,8 @@ namespace permission { // allow = '/tmp/,/home/example.js' void FSPermission::Apply(const std::vector& allow, PermissionScope scope) { - using std::string_view_literals::operator""sv; - - for (const std::string_view res : allow) { - if (res == "*"sv) { + for (const std::string& res : allow) { + if (res == "*") { if (scope == PermissionScope::kFileSystemRead) { deny_all_in_ = false; allow_all_in_ = true; @@ -131,7 +130,7 @@ void FSPermission::Apply(const std::vector& allow, } return; } - GrantAccess(scope, std::string(res.data(), res.size())); + GrantAccess(scope, res); } } @@ -147,7 +146,7 @@ void FSPermission::GrantAccess(PermissionScope perm, const std::string& res) { } bool FSPermission::is_granted(PermissionScope perm, - const std::string_view& param = "") { + const std::string_view& param = "") const { switch (perm) { case PermissionScope::kFileSystem: return allow_all_in_ && allow_all_out_; @@ -171,12 +170,12 @@ FSPermission::RadixTree::~RadixTree() { } bool FSPermission::RadixTree::Lookup(const std::string_view& s, - bool when_empty_return = false) { + bool when_empty_return) const { FSPermission::RadixTree::Node* current_node = root_node_; if (current_node->children.size() == 0) { return when_empty_return; } - unsigned int parent_node_prefix_len = current_node->prefix.length(); + size_t parent_node_prefix_len = current_node->prefix.length(); const std::string path(s); auto path_len = path.length(); @@ -202,10 +201,10 @@ bool FSPermission::RadixTree::Lookup(const std::string_view& s, void FSPermission::RadixTree::Insert(const std::string& path) { FSPermission::RadixTree::Node* current_node = root_node_; - unsigned int parent_node_prefix_len = current_node->prefix.length(); - int path_len = path.length(); + size_t parent_node_prefix_len = current_node->prefix.length(); + size_t path_len = path.length(); - for (int i = 1; i <= path_len; ++i) { + for (size_t i = 1; i <= path_len; ++i) { bool is_wildcard_node = path[i - 1] == '*'; bool is_last_char = i == path_len; diff --git a/src/permission/fs_permission.h b/src/permission/fs_permission.h index 80374a08c75d26..1c818567934f7d 100644 --- a/src/permission/fs_permission.h +++ b/src/permission/fs_permission.h @@ -17,7 +17,8 @@ class FSPermission final : public PermissionBase { public: void Apply(const std::vector& allow, PermissionScope scope) override; - bool is_granted(PermissionScope perm, const std::string_view& param) override; + bool is_granted(PermissionScope perm, + const std::string_view& param) const override; struct RadixTree { struct Node { @@ -45,8 +46,8 @@ class FSPermission final : public PermissionBase { } // swap prefix - unsigned int i = 0; - unsigned int prefix_len = prefix.length(); + size_t i = 0; + size_t prefix_len = prefix.length(); for (; i < child->prefix.length(); ++i) { if (i > prefix_len || prefix[i] != child->prefix[i]) { std::string parent_prefix = child->prefix.substr(0, i); @@ -72,7 +73,7 @@ class FSPermission final : public PermissionBase { return wildcard_child; } - Node* NextNode(const std::string& path, unsigned int idx) { + Node* NextNode(const std::string& path, size_t idx) const { if (idx >= path.length()) { return nullptr; } @@ -83,8 +84,8 @@ class FSPermission final : public PermissionBase { } auto child = it->second; // match prefix - unsigned int prefix_len = child->prefix.length(); - for (unsigned int i = 0; i < path.length(); ++i) { + size_t prefix_len = child->prefix.length(); + for (size_t i = 0; i < path.length(); ++i) { if (i >= prefix_len || child->prefix[i] == '*') { return child; } @@ -115,7 +116,7 @@ class FSPermission final : public PermissionBase { // ---> '\000' ASCII (0) || \0 // ---> er // ---> n - bool IsEndNode() { + bool IsEndNode() const { if (children.size() == 0) { return true; } @@ -126,8 +127,8 @@ class FSPermission final : public PermissionBase { RadixTree(); ~RadixTree(); void Insert(const std::string& s); - bool Lookup(const std::string_view& s) { return Lookup(s, false); } - bool Lookup(const std::string_view& s, bool when_empty_return); + bool Lookup(const std::string_view& s) const { return Lookup(s, false); } + bool Lookup(const std::string_view& s, bool when_empty_return) const; private: Node* root_node_; diff --git a/src/permission/inspector_permission.cc b/src/permission/inspector_permission.cc index 401d801ac0adb5..34e55db4bef590 100644 --- a/src/permission/inspector_permission.cc +++ b/src/permission/inspector_permission.cc @@ -14,7 +14,7 @@ void InspectorPermission::Apply(const std::vector& allow, } bool InspectorPermission::is_granted(PermissionScope perm, - const std::string_view& param) { + const std::string_view& param) const { return deny_all_ == false; } diff --git a/src/permission/inspector_permission.h b/src/permission/inspector_permission.h index e5c6d1b81677f5..fc8b357c4fcb15 100644 --- a/src/permission/inspector_permission.h +++ b/src/permission/inspector_permission.h @@ -15,7 +15,7 @@ class InspectorPermission final : public PermissionBase { void Apply(const std::vector& allow, PermissionScope scope) override; bool is_granted(PermissionScope perm, - const std::string_view& param = "") override; + const std::string_view& param = "") const override; private: bool deny_all_; diff --git a/src/permission/permission_base.h b/src/permission/permission_base.h index c2f377424f6fc5..b817efb88a76bb 100644 --- a/src/permission/permission_base.h +++ b/src/permission/permission_base.h @@ -42,7 +42,7 @@ class PermissionBase { virtual void Apply(const std::vector& allow, PermissionScope scope) = 0; virtual bool is_granted(PermissionScope perm, - const std::string_view& param = "") = 0; + const std::string_view& param = "") const = 0; }; } // namespace permission diff --git a/src/permission/worker_permission.cc b/src/permission/worker_permission.cc index a18938e5fe1efd..78293589faa3bd 100644 --- a/src/permission/worker_permission.cc +++ b/src/permission/worker_permission.cc @@ -15,7 +15,7 @@ void WorkerPermission::Apply(const std::vector& allow, } bool WorkerPermission::is_granted(PermissionScope perm, - const std::string_view& param) { + const std::string_view& param) const { return deny_all_ == false; } diff --git a/src/permission/worker_permission.h b/src/permission/worker_permission.h index cdc224925c2291..99d6b039ee22c1 100644 --- a/src/permission/worker_permission.h +++ b/src/permission/worker_permission.h @@ -15,7 +15,7 @@ class WorkerPermission final : public PermissionBase { void Apply(const std::vector& allow, PermissionScope scope) override; bool is_granted(PermissionScope perm, - const std::string_view& param = "") override; + const std::string_view& param = "") const override; private: bool deny_all_; diff --git a/src/pipe_wrap.cc b/src/pipe_wrap.cc index 738a51a140d0af..e6f1f38120db71 100644 --- a/src/pipe_wrap.cc +++ b/src/pipe_wrap.cc @@ -225,16 +225,19 @@ void PipeWrap::Connect(const FunctionCallbackInfo& args) { ConnectWrap* req_wrap = new ConnectWrap(env, req_wrap_obj, AsyncWrap::PROVIDER_PIPECONNECTWRAP); - req_wrap->Dispatch( + int err = req_wrap->Dispatch( uv_pipe_connect2, &wrap->handle_, *name, name.length(), 0, AfterConnect); + if (err) { + delete req_wrap; + } else { + TRACE_EVENT_NESTABLE_ASYNC_BEGIN1(TRACING_CATEGORY_NODE2(net, native), + "connect", + req_wrap, + "pipe_path", + TRACE_STR_COPY(*name)); + } - TRACE_EVENT_NESTABLE_ASYNC_BEGIN1(TRACING_CATEGORY_NODE2(net, native), - "connect", - req_wrap, - "pipe_path", - TRACE_STR_COPY(*name)); - - args.GetReturnValue().Set(0); // uv_pipe_connect() doesn't return errors. + args.GetReturnValue().Set(err); } } // namespace node diff --git a/src/quic/application.cc b/src/quic/application.cc index b7ba7fcf86b1ca..cafd6a8941c830 100644 --- a/src/quic/application.cc +++ b/src/quic/application.cc @@ -1,3 +1,4 @@ +#include "node_bob.h" #include "uv.h" #if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC @@ -79,7 +80,7 @@ void Session::Application::AcknowledgeStreamData(Stream* stream, void Session::Application::BlockStream(int64_t id) { auto stream = session().FindStream(id); - if (stream) stream->Blocked(); + if (stream) stream->EmitBlocked(); } bool Session::Application::CanAddHeader(size_t current_count, @@ -233,7 +234,7 @@ void Session::Application::SendPendingData() { // and no more outbound data can be sent. CHECK_LE(ndatalen, 0); auto stream = session_->FindStream(stream_data.id); - if (stream) stream->End(); + if (stream) stream->EndWritable(); continue; } case NGTCP2_ERR_WRITE_MORE: { @@ -360,10 +361,8 @@ class DefaultApplication final : public Session::Application { stream_data->data, arraysize(stream_data->data), kMaxVectorCount); - switch (ret) { - case bob::Status::STATUS_EOS: - stream_data->fin = 1; - break; + if (ret == bob::Status::STATUS_EOS) { + stream_data->fin = 1; } } else { stream_data->fin = 1; diff --git a/src/quic/bindingdata.cc b/src/quic/bindingdata.cc index 3e95372ba2fc37..499206356a5862 100644 --- a/src/quic/bindingdata.cc +++ b/src/quic/bindingdata.cc @@ -203,8 +203,12 @@ CallbackScopeBase::CallbackScopeBase(Environment* env) : env(env), context_scope(env->context()), try_catch(env->isolate()) {} CallbackScopeBase::~CallbackScopeBase() { - if (try_catch.HasCaught() && !try_catch.HasTerminated()) { - errors::TriggerUncaughtException(env->isolate(), try_catch); + if (try_catch.HasCaught()) { + if (!try_catch.HasTerminated() && env->can_call_into_js()) { + errors::TriggerUncaughtException(env->isolate(), try_catch); + } else { + try_catch.ReThrow(); + } } } diff --git a/src/quic/bindingdata.h b/src/quic/bindingdata.h index 2b33642b7ad76a..5ab0cc4b3f45a6 100644 --- a/src/quic/bindingdata.h +++ b/src/quic/bindingdata.h @@ -103,7 +103,6 @@ constexpr size_t kMaxVectorCount = 16; V(session_version_negotiation, SessionVersionNegotiation) \ V(session_path_validation, SessionPathValidation) \ V(stream_close, StreamClose) \ - V(stream_error, StreamError) \ V(stream_created, StreamCreated) \ V(stream_reset, StreamReset) \ V(stream_headers, StreamHeaders) \ @@ -304,6 +303,8 @@ struct CallbackScopeBase { ~CallbackScopeBase(); }; +// Maintains a strong reference to BaseObject type ptr to keep it alive during +// a MakeCallback during which it might be destroyed. template struct CallbackScope final : public CallbackScopeBase { BaseObjectPtr ref; diff --git a/src/quic/streams.cc b/src/quic/streams.cc index ae208e0eb0007a..4cca65f56d900e 100644 --- a/src/quic/streams.cc +++ b/src/quic/streams.cc @@ -1,19 +1,680 @@ #if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC #include "streams.h" +#include #include #include #include #include +#include #include #include +#include "application.h" +#include "bindingdata.h" +#include "defs.h" #include "session.h" namespace node { + +using v8::Array; +using v8::ArrayBuffer; +using v8::ArrayBufferView; +using v8::BigInt; +using v8::FunctionCallbackInfo; +using v8::FunctionTemplate; +using v8::Integer; +using v8::Just; +using v8::Local; +using v8::Maybe; +using v8::Nothing; +using v8::Object; +using v8::PropertyAttribute; +using v8::SharedArrayBuffer; +using v8::Uint32; +using v8::Value; + namespace quic { -Stream::Stream(BaseObjectPtr session, v8::Local obj) - : AsyncWrap(session->env(), obj, AsyncWrap::PROVIDER_QUIC_STREAM) { - MakeWeak(); +#define STREAM_STATE(V) \ + V(ID, id, int64_t) \ + V(FIN_SENT, fin_sent, uint8_t) \ + V(FIN_RECEIVED, fin_received, uint8_t) \ + V(READ_ENDED, read_ended, uint8_t) \ + V(WRITE_ENDED, write_ended, uint8_t) \ + V(DESTROYED, destroyed, uint8_t) \ + V(PAUSED, paused, uint8_t) \ + V(RESET, reset, uint8_t) \ + V(HAS_READER, has_reader, uint8_t) \ + /* Set when the stream has a block event handler */ \ + V(WANTS_BLOCK, wants_block, uint8_t) \ + /* Set when the stream has a headers event handler */ \ + V(WANTS_HEADERS, wants_headers, uint8_t) \ + /* Set when the stream has a reset event handler */ \ + V(WANTS_RESET, wants_reset, uint8_t) \ + /* Set when the stream has a trailers event handler */ \ + V(WANTS_TRAILERS, wants_trailers, uint8_t) + +#define STREAM_STATS(V) \ + V(CREATED_AT, created_at) \ + V(RECEIVED_AT, received_at) \ + V(ACKED_AT, acked_at) \ + V(CLOSING_AT, closing_at) \ + V(DESTROYED_AT, destroyed_at) \ + V(BYTES_RECEIVED, bytes_received) \ + V(BYTES_SENT, bytes_sent) \ + V(MAX_OFFSET, max_offset) \ + V(MAX_OFFSET_ACK, max_offset_ack) \ + V(MAX_OFFSET_RECV, max_offset_received) \ + V(FINAL_SIZE, final_size) + +#define STREAM_JS_METHODS(V) \ + V(AttachSource, attachSource, false) \ + V(Destroy, destroy, false) \ + V(SendHeaders, sendHeaders, false) \ + V(StopSending, stopSending, false) \ + V(ResetStream, resetStream, false) \ + V(SetPriority, setPriority, false) \ + V(GetPriority, getPriority, true) \ + V(GetReader, getReader, false) + +struct Stream::State { +#define V(_, name, type) type name; + STREAM_STATE(V) +#undef V +}; + +STAT_STRUCT(Stream, STREAM) + +// ============================================================================ + +namespace { +Maybe> GetDataQueueFromSource(Environment* env, + Local value) { + DCHECK_IMPLIES(!value->IsUndefined(), value->IsObject()); + if (value->IsUndefined()) { + return Just(std::shared_ptr()); + } else if (value->IsArrayBuffer()) { + auto buffer = value.As(); + std::vector> entries(1); + entries.push_back(DataQueue::CreateInMemoryEntryFromBackingStore( + buffer->GetBackingStore(), 0, buffer->ByteLength())); + return Just(DataQueue::CreateIdempotent(std::move(entries))); + } else if (value->IsSharedArrayBuffer()) { + auto buffer = value.As(); + std::vector> entries(1); + entries.push_back(DataQueue::CreateInMemoryEntryFromBackingStore( + buffer->GetBackingStore(), 0, buffer->ByteLength())); + return Just(DataQueue::CreateIdempotent(std::move(entries))); + } else if (value->IsArrayBufferView()) { + std::vector> entries(1); + entries.push_back( + DataQueue::CreateInMemoryEntryFromView(value.As())); + return Just(DataQueue::CreateIdempotent(std::move(entries))); + } else if (Blob::HasInstance(env, value)) { + Blob* blob; + ASSIGN_OR_RETURN_UNWRAP( + &blob, value, Nothing>()); + return Just(blob->getDataQueue().slice(0)); + } + // TODO(jasnell): Add streaming sources... + THROW_ERR_INVALID_ARG_TYPE(env, "Invalid data source type"); + return Nothing>(); +} +} // namespace + +struct Stream::Impl { + static void AttachSource(const FunctionCallbackInfo& args) { + Environment* env = Environment::GetCurrent(args); + + std::shared_ptr dataqueue; + if (GetDataQueueFromSource(env, args[0]).To(&dataqueue)) { + Stream* stream; + ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); + stream->set_outbound(std::move(dataqueue)); + } + } + + static void Destroy(const FunctionCallbackInfo& args) { + Stream* stream; + ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); + if (args.Length() > 1) { + CHECK(args[0]->IsBigInt()); + bool unused = false; + stream->Destroy(QuicError::ForApplication( + args[0].As()->Uint64Value(&unused))); + } else { + stream->Destroy(); + } + } + + static void SendHeaders(const FunctionCallbackInfo& args) { + Stream* stream; + ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); + CHECK(args[0]->IsUint32()); // Kind + CHECK(args[1]->IsArray()); // Headers + CHECK(args[2]->IsUint32()); // Flags + + HeadersKind kind = static_cast(args[0].As()->Value()); + Local headers = args[1].As(); + HeadersFlags flags = + static_cast(args[2].As()->Value()); + + if (stream->is_destroyed()) return args.GetReturnValue().Set(false); + + args.GetReturnValue().Set(stream->session().application().SendHeaders( + *stream, kind, headers, flags)); + } + + // Tells the peer to stop sending data for this stream. This has the effect + // of shutting down the readable side of the stream for this peer. Any data + // that has already been received is still readable. + static void StopSending(const FunctionCallbackInfo& args) { + Stream* stream; + ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); + uint64_t code = NGTCP2_APP_NOERROR; + CHECK_IMPLIES(!args[0]->IsUndefined(), args[0]->IsBigInt()); + if (!args[0]->IsUndefined()) { + bool lossless = false; // not used but still necessary. + code = args[0].As()->Uint64Value(&lossless); + } + + if (stream->is_destroyed()) return; + stream->EndReadable(); + Session::SendPendingDataScope send_scope(&stream->session()); + ngtcp2_conn_shutdown_stream_read(stream->session(), stream->id(), code); + } + + // Sends a reset stream to the peer to tell it we will not be sending any + // more data for this stream. This has the effect of shutting down the + // writable side of the stream for this peer. Any data that is held in the + // outbound queue will be dropped. The stream may still be readable. + static void ResetStream(const FunctionCallbackInfo& args) { + Stream* stream; + ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); + uint64_t code = NGTCP2_APP_NOERROR; + CHECK_IMPLIES(!args[0]->IsUndefined(), args[0]->IsBigInt()); + if (!args[0]->IsUndefined()) { + bool lossless = false; // not used but still necessary. + code = args[0].As()->Uint64Value(&lossless); + } + + if (stream->is_destroyed() || stream->state_->reset == 1) return; + stream->EndWritable(); + // We can release our outbound here now. Since the stream is being reset + // on the ngtcp2 side, we do not need to keep any of the data around + // waiting for acknowledgement that will never come. + stream->outbound_.reset(); + stream->state_->reset = 1; + Session::SendPendingDataScope send_scope(&stream->session()); + ngtcp2_conn_shutdown_stream_write(stream->session(), stream->id(), code); + } + + static void SetPriority(const FunctionCallbackInfo& args) { + Stream* stream; + ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); + CHECK(args[0]->IsUint32()); // Priority + CHECK(args[1]->IsUint32()); // Priority flag + + StreamPriority priority = + static_cast(args[0].As()->Value()); + StreamPriorityFlags flags = + static_cast(args[1].As()->Value()); + + stream->session().application().SetStreamPriority(*stream, priority, flags); + } + + static void GetPriority(const FunctionCallbackInfo& args) { + Stream* stream; + ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); + auto priority = stream->session().application().GetStreamPriority(*stream); + args.GetReturnValue().Set(static_cast(priority)); + } + + static void GetReader(const FunctionCallbackInfo& args) { + Stream* stream; + ASSIGN_OR_RETURN_UNWRAP(&stream, args.Holder()); + BaseObjectPtr reader = stream->get_reader(); + if (reader) return args.GetReturnValue().Set(reader->object()); + THROW_ERR_INVALID_STATE(Environment::GetCurrent(args), + "Unable to get a reader for the stream"); + } +}; + +// ============================================================================ + +class Stream::Outbound final : public MemoryRetainer { + public: + Outbound(Stream* stream, std::shared_ptr queue) + : stream_(stream), + queue_(std::move(queue)), + reader_(queue_->get_reader()) {} + + void Acknowledge(size_t amount) { + size_t remaining = std::min(amount, total_ - uncommitted_); + while (remaining > 0 && head_ != nullptr) { + DCHECK_LE(head_->ack_offset, head_->offset); + // The amount to acknowledge in this chunk is the lesser of the total + // amount remaining to acknowledge or the total remaining unacknowledged + // bytes in the chunk. + size_t amount_to_ack = + std::min(remaining, head_->offset - head_->ack_offset); + // If the amount to ack is zero here, it means our ack offset has caught + // up to our commit offset, which means there's nothing left to + // acknowledge yet. We could treat this as an error but let's just stop + // here. + if (amount_to_ack == 0) break; + + // Adjust our remaining down and our ack_offset up... + remaining -= amount_to_ack; + head_->ack_offset += amount_to_ack; + + // If we've fully acknowledged this chunk, free it and decrement total. + if (head_->ack_offset == head_->buf.len) { + DCHECK_GE(total_, head_->buf.len); + total_ -= head_->buf.len; + // if tail_ == head_ here, it means we've fully acknowledged our current + // buffer. Set tail to nullptr since we're freeing it here. + if (head_.get() == tail_) { + // In this case, commit_head_ should have already been set to nullptr. + // Because we should only have hit this case if the entire buffer + // had been committed. + DCHECK(commit_head_ == nullptr); + tail_ = nullptr; + } + head_ = std::move(head_->next); + DCHECK_IMPLIES(head_ == nullptr, tail_ == nullptr); + } + } + } + + void Commit(size_t amount) { + // Commit amount number of bytes from the current uncommitted + // byte queue. Importantly, this does not remove the bytes + // from the byte queue. + size_t remaining = std::min(uncommitted_, amount); + // There's nothing to commit. + while (remaining > 0 && commit_head_ != nullptr) { + // The amount to commit is the lesser of the total amount remaining to + // commit and the remaining uncommitted bytes in this chunk. + size_t amount_to_commit = std::min( + remaining, + static_cast(commit_head_->buf.len - commit_head_->offset)); + + // The amount to commit here should never be zero because that means we + // should have already advanced the commit head. + DCHECK_NE(amount_to_commit, 0); + uncommitted_ -= amount_to_commit; + remaining -= amount_to_commit; + commit_head_->offset += amount_to_commit; + if (commit_head_->offset == commit_head_->buf.len) { + count_--; + commit_head_ = commit_head_->next.get(); + } + } + } + + void Cap() { + // Calling cap without a value halts the ability to add any + // new data to the queue if it is not idempotent. If it is + // idempotent, it's a non-op. + queue_->cap(); + } + + int Pull(bob::Next next, + int options, + ngtcp2_vec* data, + size_t count, + size_t max_count_hint) { + if (next_pending_) { + std::move(next)(bob::Status::STATUS_BLOCK, nullptr, 0, [](int) {}); + return bob::Status::STATUS_BLOCK; + } + + if (errored_) { + std::move(next)(UV_EBADF, nullptr, 0, [](int) {}); + return UV_EBADF; + } + + // If eos_ is true and there are no uncommitted bytes we'll return eos, + // otherwise, return whatever is in the uncommitted queue. + if (eos_) { + if (uncommitted_ > 0) { + PullUncommitted(std::move(next)); + return bob::Status::STATUS_CONTINUE; + } + std::move(next)(bob::Status::STATUS_EOS, nullptr, 0, [](int) {}); + return bob::Status::STATUS_EOS; + } + + // If there are uncommitted bytes in the queue_, and there are enough to + // fill a full data packet, then pull will just return the current + // uncommitted bytes currently in the queue rather than reading more from + // the queue. + if (uncommitted_ >= kDefaultMaxPacketLength) { + PullUncommitted(std::move(next)); + return bob::Status::STATUS_CONTINUE; + } + + DCHECK(queue_); + DCHECK(reader_); + + // At this point, we know our reader hasn't finished yet, there might be + // uncommitted bytes but we want to go ahead and pull some more. We request + // that the pull is sync but allow for it to be async. + int ret = reader_->Pull( + [this](auto status, auto vecs, auto count, auto done) { + // Always make sure next_pending_ is false when we're done. + auto on_exit = OnScopeLeave([this] { next_pending_ = false; }); + + // The status should never be wait here. + DCHECK_NE(status, bob::Status::STATUS_WAIT); + + if (status < 0) { + // If next_pending_ is true then a pull from the reader ended up + // being asynchronous, our stream is blocking waiting for the data, + // but we have an error! oh no! We need to error the stream. + if (next_pending_) { + stream_->Destroy( + QuicError::ForNgtcp2Error(NGTCP2_INTERNAL_ERROR)); + // We do not need to worry about calling MarkErrored in this case + // since we are immediately destroying the stream which will + // release the outbound buffer anyway. + } + return; + } + + if (status == bob::Status::STATUS_EOS) { + DCHECK_EQ(count, 0); + DCHECK_NULL(vecs); + MarkEnded(); + // If next_pending_ is true then a pull from the reader ended up + // being asynchronous, our stream is blocking waiting for the data. + // Here, there is no more data to read, but we will might have data + // in the uncommitted queue. We'll resume the stream so that the + // session will try to read from it again. + if (next_pending_ && !stream_->is_destroyed()) { + stream_->session().ResumeStream(stream_->id()); + } + return; + } + + if (status == bob::Status::STATUS_BLOCK) { + DCHECK_EQ(count, 0); + DCHECK_NULL(vecs); + // If next_pending_ is true then a pull from the reader ended up + // being asynchronous, our stream is blocking waiting for the data. + // Here, we're still blocking! so there's nothing left for us to do! + return; + } + + DCHECK_EQ(status, bob::Status::STATUS_CONTINUE); + // If the read returns bytes, those will be added to the uncommitted + // bytes in the queue. + Append(vecs, count, std::move(done)); + + // If next_pending_ is true, then a pull from the reader ended up + // being asynchronous, our stream is blocking waiting for the data. + // Now that we have data, let's resume the stream so the session will + // pull from it again. + if (next_pending_ && !stream_->is_destroyed()) { + stream_->session().ResumeStream(stream_->id()); + } + }, + bob::OPTIONS_SYNC, + nullptr, + 0, + kMaxVectorCount); + + // There was an error. We'll report that immediately. We do not have + // to destroy the stream here since that will be taken care of by + // the caller. + if (ret < 0) { + MarkErrored(); + std::move(next)(ret, nullptr, 0, [](int) {}); + // Since we are erroring and won't be able to make use of this DataQueue + // any longer, let's free both it and the reader and put ourselves into + // an errored state. Further attempts to read from the outbound will + // result in a UV_EBADF error. The caller, however, should handle this by + // closing down the stream so that doesn't happen. + return ret; + } + + if (ret == bob::Status::STATUS_EOS) { + // Here, we know we are done with the DataQueue and the Reader, but we + // might not yet have committed or acknowledged all of the queued data. + // We'll release our references to the queue_ and reader_ but everything + // else is untouched. + MarkEnded(); + if (uncommitted_ > 0) { + // If the read returns eos, and there are uncommitted bytes in the + // queue, we'll set eos_ to true and return the current set of + // uncommitted bytes. + PullUncommitted(std::move(next)); + return bob::STATUS_CONTINUE; + } + // If the read returns eos, and there are no uncommitted bytes in the + // queue, we'll return eos with no data. + std::move(next)(bob::Status::STATUS_EOS, nullptr, 0, [](int) {}); + return bob::Status::STATUS_EOS; + } + + if (ret == bob::Status::STATUS_BLOCK) { + // If the read returns blocked, and there are uncommitted bytes in the + // queue, we'll return the current set of uncommitted bytes. + if (uncommitted_ > 0) { + PullUncommitted(std::move(next)); + return bob::Status::STATUS_CONTINUE; + } + // If the read returns blocked, and there are no uncommitted bytes in the + // queue, we'll return blocked. + std::move(next)(bob::Status::STATUS_BLOCK, nullptr, 0, [](int) {}); + return bob::Status::STATUS_BLOCK; + } + + // Reads here are generally expected to be synchronous. If we have a reader + // that insists on providing data asynchronously, then we'll have to block + // until the data is actually available. + if (ret == bob::Status::STATUS_WAIT) { + next_pending_ = true; + std::move(next)(bob::Status::STATUS_BLOCK, nullptr, 0, [](int) {}); + return bob::Status::STATUS_BLOCK; + } + + DCHECK_EQ(ret, bob::Status::STATUS_CONTINUE); + PullUncommitted(std::move(next)); + return bob::Status::STATUS_CONTINUE; + } + + void MemoryInfo(MemoryTracker* tracker) const override { + tracker->TrackField("queue", queue_); + tracker->TrackField("reader", reader_); + tracker->TrackFieldWithSize("buffer", total_); + } + + SET_MEMORY_INFO_NAME(Stream::Outbound) + SET_SELF_SIZE(Outbound) + + private: + struct OnComplete { + bob::Done done; + explicit OnComplete(bob::Done done) : done(std::move(done)) {} + ~OnComplete() { std::move(done)(0); } + }; + + void PullUncommitted(bob::Next next) { + MaybeStackBuffer chunks; + chunks.AllocateSufficientStorage(count_); + auto head = commit_head_; + size_t n = 0; + while (head != nullptr && n < count_) { + // There might only be one byte here but there should never be zero. + DCHECK_LT(head->offset, head->buf.len); + chunks[n].base = head->buf.base + head->offset; + chunks[n].len = head->buf.len - head->offset; + head = head->next.get(); + n++; + } + std::move(next)(bob::Status::STATUS_CONTINUE, chunks.out(), n, [](int) {}); + } + + void MarkErrored() { + errored_ = true; + head_.reset(); + tail_ = nullptr; + commit_head_ = nullptr; + total_ = 0; + count_ = 0; + uncommitted_ = 0; + MarkEnded(); + } + + void MarkEnded() { + eos_ = true; + queue_.reset(); + reader_.reset(); + } + + void Append(const DataQueue::Vec* vectors, size_t count, bob::Done done) { + if (count == 0) return; + // The done callback should only be invoked after we're done with + // all of the vectors passed in this call. To ensure of that, we + // wrap it with a shared pointer that calls done when the final + // instance is dropped. + auto on_complete = std::make_shared(std::move(done)); + for (size_t n = 0; n < count; n++) { + if (vectors[n].len == 0 || vectors[n].base == nullptr) continue; + auto entry = std::make_unique(vectors[n], on_complete); + if (tail_ == nullptr) { + head_ = std::move(entry); + tail_ = head_.get(); + commit_head_ = head_.get(); + } else { + DCHECK_NULL(tail_->next); + tail_->next = std::move(entry); + tail_ = tail_->next.get(); + if (commit_head_ == nullptr) commit_head_ = tail_; + } + count_++; + total_ += vectors[n].len; + uncommitted_ += vectors[n].len; + } + } + + Stream* stream_; + std::shared_ptr queue_; + std::shared_ptr reader_; + + bool errored_ = false; + + // Will be set to true if the reader_ ends up providing a pull result + // asynchronously. + bool next_pending_ = false; + + // Will be set to true once reader_ has returned eos. + bool eos_ = false; + + // The collection of buffers that we have pulled from reader_ and that we + // are holding onto until they are acknowledged. + struct Entry { + size_t offset = 0; + size_t ack_offset = 0; + DataQueue::Vec buf; + std::shared_ptr on_complete; + std::unique_ptr next; + Entry(DataQueue::Vec buf, std::shared_ptr on_complete) + : buf(buf), on_complete(std::move(on_complete)) {} + }; + + std::unique_ptr head_ = nullptr; + Entry* commit_head_ = nullptr; + Entry* tail_ = nullptr; + + // The total number of uncommitted chunks. + size_t count_ = 0; + + // The total number of bytes currently held in the buffer. + size_t total_ = 0; + + // The current byte offset of buffer_ that has been confirmed to have been + // sent. Any offset lower than this represents bytes that we are currently + // waiting to be acknowledged. When we receive acknowledgement, we will + // automatically free held bytes from the buffer. + size_t uncommitted_ = 0; +}; + +// ============================================================================ + +bool Stream::HasInstance(Environment* env, Local value) { + return GetConstructorTemplate(env)->HasInstance(value); +} + +Local Stream::GetConstructorTemplate(Environment* env) { + auto& state = BindingData::Get(env); + auto tmpl = state.stream_constructor_template(); + if (tmpl.IsEmpty()) { + auto isolate = env->isolate(); + tmpl = NewFunctionTemplate(isolate, IllegalConstructor); + tmpl->SetClassName(state.stream_string()); + tmpl->Inherit(AsyncWrap::GetConstructorTemplate(env)); + tmpl->InstanceTemplate()->SetInternalFieldCount( + Stream::kInternalFieldCount); +#define V(name, key, no_side_effect) \ + if (no_side_effect) { \ + SetProtoMethodNoSideEffect(isolate, tmpl, #key, Impl::name); \ + } else { \ + SetProtoMethod(isolate, tmpl, #key, Impl::name); \ + } + + STREAM_JS_METHODS(V) + +#undef V + state.set_stream_constructor_template(tmpl); + } + return tmpl; +} + +void Stream::RegisterExternalReferences(ExternalReferenceRegistry* registry) { +#define V(name, _, __) registry->Register(Impl::name); + STREAM_JS_METHODS(V) +#undef V +} + +void Stream::Initialize(Environment* env, Local target) { + USE(GetConstructorTemplate(env)); + +#define V(name, _) IDX_STATS_STREAM_##name, + enum StreamStatsIdx { STREAM_STATS(V) IDX_STATS_STREAM_COUNT }; +#undef V + +#define V(name, key, __) \ + auto IDX_STATE_STREAM_##name = offsetof(Stream::State, key); + STREAM_STATE(V) +#undef V + +#define V(name, _) NODE_DEFINE_CONSTANT(target, IDX_STATS_STREAM_##name); + STREAM_STATS(V) +#undef V +#define V(name, _, __) NODE_DEFINE_CONSTANT(target, IDX_STATE_STREAM_##name); + STREAM_STATE(V) +#undef V + + constexpr int QUIC_STREAM_HEADERS_KIND_HINTS = + static_cast(HeadersKind::HINTS); + constexpr int QUIC_STREAM_HEADERS_KIND_INITIAL = + static_cast(HeadersKind::INITIAL); + constexpr int QUIC_STREAM_HEADERS_KIND_TRAILING = + static_cast(HeadersKind::TRAILING); + + constexpr int QUIC_STREAM_HEADERS_FLAGS_NONE = + static_cast(HeadersFlags::NONE); + constexpr int QUIC_STREAM_HEADERS_FLAGS_TERMINAL = + static_cast(HeadersFlags::TERMINAL); + + NODE_DEFINE_CONSTANT(target, QUIC_STREAM_HEADERS_KIND_HINTS); + NODE_DEFINE_CONSTANT(target, QUIC_STREAM_HEADERS_KIND_INITIAL); + NODE_DEFINE_CONSTANT(target, QUIC_STREAM_HEADERS_KIND_TRAILING); + + NODE_DEFINE_CONSTANT(target, QUIC_STREAM_HEADERS_FLAGS_NONE); + NODE_DEFINE_CONSTANT(target, QUIC_STREAM_HEADERS_FLAGS_TERMINAL); } Stream* Stream::From(void* stream_user_data) { @@ -21,41 +682,369 @@ Stream* Stream::From(void* stream_user_data) { return static_cast(stream_user_data); } -BaseObjectPtr Stream::Create(Session* session, int64_t id) { - return BaseObjectPtr(); +BaseObjectPtr Stream::Create(Session* session, + int64_t id, + std::shared_ptr source) { + DCHECK_GE(id, 0); + DCHECK_NOT_NULL(session); + Local obj; + if (!GetConstructorTemplate(session->env()) + ->InstanceTemplate() + ->NewInstance(session->env()->context()) + .ToLocal(&obj)) { + return BaseObjectPtr(); + } + + return MakeDetachedBaseObject( + BaseObjectWeakPtr(session), obj, id, std::move(source)); +} + +Stream::Stream(BaseObjectWeakPtr session, + v8::Local object, + int64_t id, + std::shared_ptr source) + : AsyncWrap(session->env(), object, AsyncWrap::PROVIDER_QUIC_STREAM), + stats_(env()->isolate()), + state_(env()->isolate()), + session_(std::move(session)), + origin_(id & 0b01 ? Side::SERVER : Side::CLIENT), + direction_(id & 0b10 ? Direction::UNIDIRECTIONAL + : Direction::BIDIRECTIONAL), + inbound_(DataQueue::Create()) { + MakeWeak(); + state_->id = id; + + // Allows us to be notified when data is actually read from the + // inbound queue so that we can update the stream flow control. + inbound_->addBackpressureListener(this); + + const auto defineProperty = [&](auto name, auto value) { + object + ->DefineOwnProperty( + env()->context(), name, value, PropertyAttribute::ReadOnly) + .Check(); + }; + + defineProperty(env()->state_string(), state_.GetArrayBuffer()); + defineProperty(env()->stats_string(), stats_.GetArrayBuffer()); + + set_outbound(std::move(source)); + + auto params = ngtcp2_conn_get_local_transport_params(this->session()); + STAT_SET(Stats, max_offset, params->initial_max_data); +} + +Stream::~Stream() { + // Make sure that Destroy() was called before Stream is destructed. + DCHECK(is_destroyed()); } int64_t Stream::id() const { - return 0; + return state_->id; } + Side Stream::origin() const { - return Side::CLIENT; + return origin_; } + Direction Stream::direction() const { - return Direction::BIDIRECTIONAL; + return direction_; +} + +Session& Stream::session() const { + return *session_; } bool Stream::is_destroyed() const { - return false; + return state_->destroyed; } + bool Stream::is_eos() const { - return false; + return state_->fin_sent; +} + +bool Stream::is_writable() const { + if (direction() == Direction::UNIDIRECTIONAL) { + switch (origin()) { + case Side::CLIENT: { + if (session_->is_server()) return false; + break; + } + case Side::SERVER: { + if (!session_->is_server()) return false; + break; + } + } + } + return state_->write_ended == 0; +} + +bool Stream::is_readable() const { + if (direction() == Direction::UNIDIRECTIONAL) { + switch (origin()) { + case Side::CLIENT: { + if (!session_->is_server()) return false; + break; + } + case Side::SERVER: { + if (session_->is_server()) return false; + break; + } + } + } + return state_->read_ended == 0; +} + +BaseObjectPtr Stream::get_reader() { + if (!is_readable() || state_->has_reader) + return BaseObjectPtr(); + state_->has_reader = 1; + return Blob::Reader::Create(env(), Blob::Create(env(), inbound_)); +} + +void Stream::set_final_size(uint64_t final_size) { + DCHECK_IMPLIES(state_->fin_received == 1, + final_size <= STAT_GET(Stats, final_size)); + state_->fin_received = 1; + STAT_SET(Stats, final_size, final_size); +} + +void Stream::set_outbound(std::shared_ptr source) { + if (!source || is_destroyed() || !is_writable()) return; + DCHECK_NULL(outbound_); + outbound_ = std::make_unique(this, std::move(source)); + session_->ResumeStream(id()); +} + +void Stream::EntryRead(size_t amount) { + // Tells us that amount bytes were read from inbound_ + // We use this as a signal to extend the flow control + // window to receive more bytes. + if (!is_destroyed() && session_) session_->ExtendStreamOffset(id(), amount); +} + +int Stream::DoPull(bob::Next next, + int options, + ngtcp2_vec* data, + size_t count, + size_t max_count_hint) { + if (is_destroyed() || is_eos()) { + std::move(next)(bob::Status::STATUS_EOS, nullptr, 0, [](int) {}); + return bob::Status::STATUS_EOS; + } + + // If an outbound source has not yet been attached, block until one is + // available. When AttachOutboundSource() is called the stream will be + // resumed. Note that when we say "block" here we don't mean it in the + // traditional "block the thread" sense. Instead, this will inform the + // Session to not try to send any more data from this stream until there + // is a source attached. + if (outbound_ == nullptr) { + std::move(next)(bob::Status::STATUS_BLOCK, nullptr, 0, [](size_t len) {}); + return bob::Status::STATUS_BLOCK; + } + + return outbound_->Pull(std::move(next), options, data, count, max_count_hint); +} + +void Stream::BeginHeaders(HeadersKind kind) { + if (is_destroyed()) return; + headers_length_ = 0; + headers_.clear(); + headers_kind_ = kind; +} + +bool Stream::AddHeader(const Header& header) { + size_t len = header.length(); + if (is_destroyed() || !session_->application().CanAddHeader( + headers_.size(), headers_length_, len)) { + return false; + } + + headers_length_ += len; + + auto& state = BindingData::Get(env()); + + const auto push = [&](auto raw) { + Local value; + if (UNLIKELY(!raw.ToLocal(&value))) return false; + headers_.push_back(value); + return true; + }; + + return push(header.GetName(&state)) && push(header.GetValue(&state)); +} + +void Stream::Acknowledge(size_t datalen) { + if (is_destroyed() || outbound_ == nullptr) return; + + // ngtcp2 guarantees that offset must always be greater than the previously + // received offset. + DCHECK_GE(datalen, STAT_GET(Stats, max_offset_ack)); + STAT_SET(Stats, max_offset_ack, datalen); + + // // Consumes the given number of bytes in the buffer. + outbound_->Acknowledge(datalen); +} + +void Stream::Commit(size_t datalen) { + if (!is_destroyed() && outbound_) outbound_->Commit(datalen); } -void Stream::Acknowledge(size_t datalen) {} -void Stream::Blocked() {} -void Stream::Commit(size_t datalen) {} -void Stream::End() {} -void Stream::Destroy(QuicError error) {} +void Stream::EndWritable() { + if (is_destroyed() || !is_writable()) return; + // If an outbound_ has been attached, we want to mark it as being ended. + // If the outbound_ is wrapping an idempotent DataQueue, then capping + // will be a non-op since we're not going to be writing any more data + // into it anyway. + if (outbound_ != nullptr) outbound_->Cap(); + state_->write_ended = 1; +} + +void Stream::EndReadable(std::optional maybe_final_size) { + if (is_destroyed() || !is_readable()) return; + state_->read_ended = 1; + set_final_size(maybe_final_size.value_or(STAT_GET(Stats, bytes_received))); + inbound_->cap(STAT_GET(Stats, final_size)); +} + +void Stream::Destroy(QuicError error) { + if (is_destroyed()) return; + + // End the writable before marking as destroyed. + EndWritable(); + + // Also end the readable side if it isn't already. + EndReadable(); + + state_->destroyed = 1; + + EmitClose(error); + + // We are going to release our reference to the outbound_ queue here. + outbound_.reset(); + + // We reset the inbound here also. However, it's important to note that + // the JavaScript side could still have a reader on the inbound DataQueue, + // which may keep that data alive a bit longer. + inbound_->removeBackpressureListener(this); + inbound_.reset(); + + // Finally, remove the stream from the session and clear our reference + // to the session. + session_->RemoveStream(id()); +} void Stream::ReceiveData(const uint8_t* data, size_t len, - ReceiveDataFlags flags) {} -void Stream::ReceiveStopSending(QuicError error) {} -void Stream::ReceiveStreamReset(uint64_t final_size, QuicError error) {} + ReceiveDataFlags flags) { + if (is_destroyed()) return; + + // If reading has ended, or there is no data, there's nothing to do but maybe + // end the readable side if this is the last bit of data we've received. + if (state_->read_ended == 1 || len == 0) { + if (flags.fin) EndReadable(); + return; + } + + STAT_INCREMENT_N(Stats, bytes_received, len); + auto backing = ArrayBuffer::NewBackingStore(env()->isolate(), len); + memcpy(backing->Data(), data, len); + inbound_->append(DataQueue::CreateInMemoryEntryFromBackingStore( + std::move(backing), 0, len)); + if (flags.fin) EndReadable(); +} + +void Stream::ReceiveStopSending(QuicError error) { + // Note that this comes from *this* endpoint, not the other side. We handle it + // if we haven't already shutdown our *receiving* side of the stream. + if (is_destroyed() || state_->read_ended) return; + ngtcp2_conn_shutdown_stream_read(session(), id(), error.code()); + EndReadable(); +} + +void Stream::ReceiveStreamReset(uint64_t final_size, QuicError error) { + // Importantly, reset stream only impacts the inbound data flow. It has no + // impact on the outbound data flow. It is essentially a signal that the peer + // has abruptly terminated the writable end of their stream with an error. + // Any data we have received up to this point remains in the queue waiting to + // be read. + EndReadable(final_size); + EmitReset(error); +} + +// ============================================================================ + +void Stream::EmitBlocked() { + // state_->wants_block will be set from the javascript side if the + // stream object has a handler for the blocked event. + if (is_destroyed() || !env()->can_call_into_js() || + state_->wants_block == 0) { + return; + } + CallbackScope cb_scope(this); + MakeCallback(BindingData::Get(env()).stream_blocked_callback(), 0, nullptr); +} + +void Stream::EmitClose(const QuicError& error) { + if (is_destroyed() || !env()->can_call_into_js()) return; + CallbackScope cb_scope(this); + Local err; + if (!error.ToV8Value(env()).ToLocal(&err)) return; -void Stream::Schedule(Stream::Queue* queue) {} -void Stream::Unschedule() {} + MakeCallback(BindingData::Get(env()).stream_close_callback(), 1, &err); +} + +void Stream::EmitHeaders() { + if (is_destroyed() || !env()->can_call_into_js() || + state_->wants_headers == 0) { + return; + } + CallbackScope cb_scope(this); + + Local argv[] = { + Array::New(env()->isolate(), headers_.data(), headers_.size()), + Integer::NewFromUnsigned(env()->isolate(), + static_cast(headers_kind_))}; + + headers_.clear(); + + MakeCallback( + BindingData::Get(env()).stream_headers_callback(), arraysize(argv), argv); +} + +void Stream::EmitReset(const QuicError& error) { + if (is_destroyed() || !env()->can_call_into_js() || + state_->wants_reset == 0) { + return; + } + CallbackScope cb_scope(this); + Local err; + if (!error.ToV8Value(env()).ToLocal(&err)) return; + + MakeCallback(BindingData::Get(env()).stream_reset_callback(), 1, &err); +} + +void Stream::EmitWantTrailers() { + if (is_destroyed() || !env()->can_call_into_js() || + state_->wants_trailers == 0) { + return; + } + CallbackScope cb_scope(this); + MakeCallback(BindingData::Get(env()).stream_trailers_callback(), 0, nullptr); +} + +// ============================================================================ + +void Stream::Schedule(Stream::Queue* queue) { + // If this stream is not already in the queue to send data, add it. + if (!is_destroyed() && outbound_ && stream_queue_.IsEmpty()) + queue->PushBack(this); +} + +void Stream::Unschedule() { + stream_queue_.Remove(); +} } // namespace quic } // namespace node diff --git a/src/quic/streams.h b/src/quic/streams.h index a97efa9acba6f7..fe53d2d9a0e50b 100644 --- a/src/quic/streams.h +++ b/src/quic/streams.h @@ -1,12 +1,18 @@ #pragma once +#include #if defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS #if HAVE_OPENSSL && NODE_OPENSSL_HAS_QUIC +#include #include #include +#include #include +#include +#include #include +#include #include "bindingdata.h" #include "data.h" @@ -17,27 +23,122 @@ class Session; using Ngtcp2Source = bob::SourceImpl; -// TODO(@jasnell): This is currently a placeholder for the actual definition. -class Stream : public AsyncWrap, public Ngtcp2Source { +// QUIC Stream's are simple data flows that may be: +// +// * Bidirectional (both sides can send) or Unidirectional (one side can send) +// * Server or Client Initiated +// +// The flow direction and origin of the stream are important in determining the +// write and read state (Open or Closed). Specifically: +// +// Bidirectional Stream States: +// +--------+--------------+----------+----------+ +// | ON | Initiated By | Readable | Writable | +// +--------+--------------+----------+----------+ +// | Server | Server | Y | Y | +// +--------+--------------+----------+----------+ +// | Server | Client | Y | Y | +// +--------+--------------+----------+----------+ +// | Client | Server | Y | Y | +// +--------+--------------+----------+----------+ +// | Client | Client | Y | Y | +// +--------+--------------+----------+----------+ +// +// Unidirectional Stream States +// +--------+--------------+----------+----------+ +// | ON | Initiated By | Readable | Writable | +// +--------+--------------+----------+----------+ +// | Server | Server | N | Y | +// +--------+--------------+----------+----------+ +// | Server | Client | Y | N | +// +--------+--------------+----------+----------+ +// | Client | Server | Y | N | +// +--------+--------------+----------+----------+ +// | Client | Client | N | Y | +// +--------+--------------+----------+----------+ +// +// All data sent via the Stream is buffered internally until either receipt is +// acknowledged from the peer or attempts to send are abandoned. The fact that +// data is buffered in memory makes it essential that the flow control for the +// session and the stream are properly handled. For now, we are largely relying +// on ngtcp2's default flow control mechanisms which generally should be doing +// the right thing. +// +// A Stream may be in a fully closed state (No longer readable nor writable) +// state but still have unacknowledged data in it's inbound and outbound +// queues. +// +// A Stream is gracefully closed when (a) both read and write states are closed, +// (b) all queued data has been acknowledged. +// +// The Stream may be forcefully closed immediately using destroy(err). This +// causes all queued outbound data and pending JavaScript writes are abandoned, +// and causes the Stream to be immediately closed at the ngtcp2 level without +// waiting for any outstanding acknowledgements. Keep in mind, however, that the +// peer is not notified that the stream is destroyed and may attempt to continue +// sending data and acknowledgements. +// +// QUIC streams in general do not have headers. Some QUIC applications, however, +// may associate headers with the stream (HTTP/3 for instance). +class Stream : public AsyncWrap, + public Ngtcp2Source, + public DataQueue::BackpressureListener { public: - static Stream* From(void* stream_user_data); + using Header = NgHeaderBase; - static BaseObjectPtr Create(Session* session, int64_t id); + static Stream* From(void* stream_user_data); - Stream(BaseObjectPtr session, v8::Local obj); + static bool HasInstance(Environment* env, v8::Local value); + static v8::Local GetConstructorTemplate( + Environment* env); + static void Initialize(Environment* env, v8::Local target); + static void RegisterExternalReferences(ExternalReferenceRegistry* registry); + + static BaseObjectPtr Create( + Session* session, + int64_t id, + std::shared_ptr source = nullptr); + + // The constructor is only public to be visible by MakeDetachedBaseObject. + // Call Create to create new instances of Stream. + Stream(BaseObjectWeakPtr session, + v8::Local obj, + int64_t id, + std::shared_ptr source); + ~Stream() override; int64_t id() const; Side origin() const; Direction direction() const; + Session& session() const; bool is_destroyed() const; + + // True if we've completely sent all outbound data for this stream. bool is_eos() const; + bool is_readable() const; + bool is_writable() const; + + // Called by the session/application to indicate that the specified number + // of bytes have been acknowledged by the peer. void Acknowledge(size_t datalen); - void Blocked(); void Commit(size_t datalen); - void End(); - void Destroy(QuicError error); + void EndWritable(); + void EndReadable(std::optional maybe_final_size = std::nullopt); + void EntryRead(size_t amount) override; + + // Pulls data from the internal outbound DataQueue configured for this stream. + int DoPull(bob::Next next, + int options, + ngtcp2_vec* data, + size_t count, + size_t max_count_hint) override; + + // Forcefully close the stream immediately. All queued data and pending + // writes are abandoned, and the stream is immediately closed at the ngtcp2 + // level without waiting for any outstanding acknowledgements. + void Destroy(QuicError error = QuicError()); struct ReceiveDataFlags final { // Identifies the final chunk of data that the peer will send for the @@ -53,11 +154,61 @@ class Stream : public AsyncWrap, public Ngtcp2Source { void ReceiveStopSending(QuicError error); void ReceiveStreamReset(uint64_t final_size, QuicError error); + void BeginHeaders(HeadersKind kind); + // Returns false if the header cannot be added. This will typically happen + // if the application does not support headers, a maximimum number of headers + // have already been added, or the maximum total header length is reached. + bool AddHeader(const Header& header); + SET_NO_MEMORY_INFO() SET_MEMORY_INFO_NAME(Stream) SET_SELF_SIZE(Stream) - ListNode stream_queue_; + struct State; + struct Stats; + + // Notifies the JavaScript side that sending data on the stream has been + // blocked because of flow control restriction. + void EmitBlocked(); + + private: + struct Impl; + class Outbound; + + // Gets a reader for the data received for this stream from the peer, + BaseObjectPtr get_reader(); + + void set_final_size(uint64_t amount); + void set_outbound(std::shared_ptr source); + + // JavaScript callouts + + // Notifies the JavaScript side that the stream has been destroyed. + void EmitClose(const QuicError& error); + + // Delivers the set of inbound headers that have been collected. + void EmitHeaders(); + + // Notifies the JavaScript side that the stream has been reset. + void EmitReset(const QuicError& error); + + // Notifies the JavaScript side that the application is ready to receive + // trailing headers. + void EmitWantTrailers(); + + AliasedStruct stats_; + AliasedStruct state_; + BaseObjectWeakPtr session_; + const Side origin_; + const Direction direction_; + std::unique_ptr outbound_; + std::shared_ptr inbound_; + + std::vector> headers_; + HeadersKind headers_kind_ = HeadersKind::INITIAL; + size_t headers_length_ = 0; + + friend struct Impl; public: // The Queue/Schedule/Unschedule here are part of the mechanism used to @@ -69,6 +220,7 @@ class Stream : public AsyncWrap, public Ngtcp2Source { // data to send (such as when it is initially created or is using an async // source that is still waiting for data to be pushed) it will not appear in // the queue. + ListNode stream_queue_; using Queue = ListHead; void Schedule(Queue* queue); diff --git a/src/undici_version.h b/src/undici_version.h index 930c2318ec80bd..02433e7e0c3a84 100644 --- a/src/undici_version.h +++ b/src/undici_version.h @@ -2,5 +2,5 @@ // Refer to tools/dep_updaters/update-undici.sh #ifndef SRC_UNDICI_VERSION_H_ #define SRC_UNDICI_VERSION_H_ -#define UNDICI_VERSION "5.27.0" +#define UNDICI_VERSION "5.28.2" #endif // SRC_UNDICI_VERSION_H_ diff --git a/src/util.cc b/src/util.cc index 19fb91c959a205..38b1f9be72747e 100644 --- a/src/util.cc +++ b/src/util.cc @@ -678,7 +678,7 @@ Local UnionBytes::ToStringChecked(Isolate* isolate) const { } } -RAIIIsolate::RAIIIsolate(const SnapshotData* data) +RAIIIsolateWithoutEntering::RAIIIsolateWithoutEntering(const SnapshotData* data) : allocator_{ArrayBuffer::Allocator::NewDefaultAllocator()} { isolate_ = Isolate::Allocate(); CHECK_NOT_NULL(isolate_); @@ -692,9 +692,14 @@ RAIIIsolate::RAIIIsolate(const SnapshotData* data) Isolate::Initialize(isolate_, params); } -RAIIIsolate::~RAIIIsolate() { +RAIIIsolateWithoutEntering::~RAIIIsolateWithoutEntering() { per_process::v8_platform.Platform()->UnregisterIsolate(isolate_); isolate_->Dispose(); } +RAIIIsolate::RAIIIsolate(const SnapshotData* data) + : isolate_{data}, isolate_scope_{isolate_.get()} {} + +RAIIIsolate::~RAIIIsolate() {} + } // namespace node diff --git a/src/util.h b/src/util.h index 5340182423681e..08b9151f1cfabf 100644 --- a/src/util.h +++ b/src/util.h @@ -113,8 +113,9 @@ struct AssertionInfo { const char* message; const char* function; }; -[[noreturn]] void NODE_EXTERN_PRIVATE Assert(const AssertionInfo& info); -[[noreturn]] void NODE_EXTERN_PRIVATE Abort(); + +// This indirectly calls backtrace so it can not be marked as [[noreturn]]. +void NODE_EXTERN_PRIVATE Assert(const AssertionInfo& info); void DumpNativeBacktrace(FILE* fp); void DumpJavaScriptBacktrace(FILE* fp); @@ -125,16 +126,32 @@ void DumpJavaScriptBacktrace(FILE* fp); #define ABORT_NO_BACKTRACE() abort() #endif -#define ABORT() node::Abort() +// Caller of this macro must not be marked as [[noreturn]]. Printing of +// backtraces may not work correctly in [[noreturn]] functions because +// when generating code for them the compiler can choose not to +// maintain the frame pointers or link registers that are necessary for +// correct backtracing. +// `ABORT` must be a macro and not a [[noreturn]] function to make sure the +// backtrace is correct. +#define ABORT() \ + do { \ + node::DumpNativeBacktrace(stderr); \ + node::DumpJavaScriptBacktrace(stderr); \ + fflush(stderr); \ + ABORT_NO_BACKTRACE(); \ + } while (0) -#define ERROR_AND_ABORT(expr) \ - do { \ - /* Make sure that this struct does not end up in inline code, but */ \ - /* rather in a read-only data section when modifying this code. */ \ - static const node::AssertionInfo args = { \ - __FILE__ ":" STRINGIFY(__LINE__), #expr, PRETTY_FUNCTION_NAME \ - }; \ - node::Assert(args); \ +#define ERROR_AND_ABORT(expr) \ + do { \ + /* Make sure that this struct does not end up in inline code, but */ \ + /* rather in a read-only data section when modifying this code. */ \ + static const node::AssertionInfo args = { \ + __FILE__ ":" STRINGIFY(__LINE__), #expr, PRETTY_FUNCTION_NAME}; \ + node::Assert(args); \ + /* `node::Assert` doesn't return. Add an [[noreturn]] abort() here to */ \ + /* make the compiler happy about no return value in the caller */ \ + /* function when calling ERROR_AND_ABORT. */ \ + ABORT_NO_BACKTRACE(); \ } while (0) #ifdef __GNUC__ @@ -969,11 +986,11 @@ void SetConstructorFunction(v8::Isolate* isolate, SetConstructorFunctionFlag flag = SetConstructorFunctionFlag::SET_CLASS_NAME); -// Simple RAII class to spin up a v8::Isolate instance. -class RAIIIsolate { +// Like RAIIIsolate, except doesn't enter the isolate while it's in scope. +class RAIIIsolateWithoutEntering { public: - explicit RAIIIsolate(const SnapshotData* data = nullptr); - ~RAIIIsolate(); + explicit RAIIIsolateWithoutEntering(const SnapshotData* data = nullptr); + ~RAIIIsolateWithoutEntering(); v8::Isolate* get() const { return isolate_; } @@ -982,6 +999,20 @@ class RAIIIsolate { v8::Isolate* isolate_; }; +// Simple RAII class to spin up a v8::Isolate instance and enter it +// immediately. +class RAIIIsolate { + public: + explicit RAIIIsolate(const SnapshotData* data = nullptr); + ~RAIIIsolate(); + + v8::Isolate* get() const { return isolate_.get(); } + + private: + RAIIIsolateWithoutEntering isolate_; + v8::Isolate::Scope isolate_scope_; +}; + } // namespace node #endif // defined(NODE_WANT_INTERNALS) && NODE_WANT_INTERNALS diff --git a/src/zlib_version.h b/src/zlib_version.h index 02390a4afd0ec5..62d4f1536e783e 100644 --- a/src/zlib_version.h +++ b/src/zlib_version.h @@ -2,5 +2,5 @@ // Refer to tools/dep_updaters/update-zlib.sh #ifndef SRC_ZLIB_VERSION_H_ #define SRC_ZLIB_VERSION_H_ -#define ZLIB_VERSION "1.2.13.1-motley-dfc48fc" +#define ZLIB_VERSION "1.3-22124f5" #endif // SRC_ZLIB_VERSION_H_ diff --git a/test/benchmark/test-benchmark-websocket.js b/test/benchmark/test-benchmark-websocket.js new file mode 100644 index 00000000000000..d02e46a76b4e9e --- /dev/null +++ b/test/benchmark/test-benchmark-websocket.js @@ -0,0 +1,9 @@ +'use strict'; + +const common = require('../common'); +if (!common.enoughTestMem) + common.skip('Insufficient memory for Websocket benchmark test'); + +const runBenchmark = require('../common/benchmark'); + +runBenchmark('websocket', { NODEJS_BENCHMARK_ZERO_ALLOWED: 1 }); diff --git a/test/common/fixtures.js b/test/common/fixtures.js index 3ee87e8b2d7b59..75815b035ba186 100644 --- a/test/common/fixtures.js +++ b/test/common/fixtures.js @@ -28,6 +28,23 @@ function readFixtureKeys(enc, ...names) { return names.map((name) => readFixtureKey(name, enc)); } +// This should be in sync with test/fixtures/utf8_test_text.txt. +// We copy them here as a string because this is supposed to be used +// in fs API tests. +const utf8TestText = '永和九年,嵗在癸丑,暮春之初,會於會稽山隂之蘭亭,脩稧事也。' + + '羣賢畢至,少長咸集。此地有崇山峻領,茂林脩竹;又有清流激湍,' + + '暎帶左右。引以為流觴曲水,列坐其次。雖無絲竹管弦之盛,一觴一詠,' + + '亦足以暢敘幽情。是日也,天朗氣清,恵風和暢;仰觀宇宙之大,' + + '俯察品類之盛;所以遊目騁懐,足以極視聽之娛,信可樂也。夫人之相與,' + + '俯仰一世,或取諸懐抱,悟言一室之內,或因寄所託,放浪形骸之外。' + + '雖趣舎萬殊,靜躁不同,當其欣扵所遇,暫得扵己,怏然自足,' + + '不知老之將至。及其所之既惓,情隨事遷,感慨係之矣。向之所欣,' + + '俛仰之閒以為陳跡,猶不能不以之興懐;況脩短隨化,終期扵盡。' + + '古人云:「死生亦大矣。」豈不痛哉!每攬昔人興感之由,若合一契,' + + '未嘗不臨文嗟悼,不能喻之扵懐。固知一死生為虛誕,齊彭殤為妄作。' + + '後之視今,亦由今之視昔,悲夫!故列敘時人,錄其所述,雖世殊事異,' + + '所以興懐,其致一也。後之攬者,亦將有感扵斯文。'; + module.exports = { fixturesDir, path: fixturesPath, @@ -35,4 +52,8 @@ module.exports = { readSync: readFixtureSync, readKey: readFixtureKey, readKeys: readFixtureKeys, + utf8TestText, + get utf8TestTextPath() { + return fixturesPath('utf8_test_text.txt'); + }, }; diff --git a/test/common/gc.js b/test/common/gc.js index af637af7bedcd6..9860bb191ee072 100644 --- a/test/common/gc.js +++ b/test/common/gc.js @@ -1,5 +1,7 @@ 'use strict'; +const wait = require('timers/promises').setTimeout; + // TODO(joyeecheung): merge ongc.js and gcUntil from common/index.js // into this. @@ -65,6 +67,15 @@ async function checkIfCollectable( createObject(); } +// Repeat an operation and give GC some breathing room at every iteration. +async function runAndBreathe(fn, repeat, waitTime = 20) { + for (let i = 0; i < repeat; i++) { + await fn(); + await wait(waitTime); + } +} + module.exports = { checkIfCollectable, + runAndBreathe, }; diff --git a/test/common/sea.js b/test/common/sea.js index cc1890a5464012..d57c9e4238d867 100644 --- a/test/common/sea.js +++ b/test/common/sea.js @@ -2,6 +2,7 @@ const common = require('../common'); const fixtures = require('../common/fixtures'); +const tmpdir = require('../common/tmpdir'); const { readFileSync } = require('fs'); const { @@ -43,6 +44,14 @@ function skipIfSingleExecutableIsNotSupported() { common.skip('On s390x, postject fails with `memory access out of bounds`.'); } } + + tmpdir.refresh(); + + // The SEA tests involve making a copy of the executable and writing some fixtures + // to the tmpdir. To be safe, ensure that at least 120MB disk space is available. + if (!tmpdir.hasEnoughSpace(120 * 1024 * 1024)) { + common.skip('Available disk space < 120MB'); + } } function injectAndCodeSign(targetExecutable, resource) { diff --git a/test/common/wpt.js b/test/common/wpt.js index 7d0b030614b003..7917e17729c7ee 100644 --- a/test/common/wpt.js +++ b/test/common/wpt.js @@ -210,6 +210,7 @@ class ResourceLoader { const data = await fsPromises.readFile(file); return { ok: true, + arrayBuffer() { return data.buffer; }, json() { return JSON.parse(data.toString()); }, text() { return data.toString(); }, }; @@ -382,7 +383,7 @@ const kIntlRequirement = { // TODO(joyeecheung): we may need to deal with --with-intl=system-icu }; -class IntlRequirement { +class BuildRequirement { constructor() { this.currentIntl = kIntlRequirement.none; if (process.config.variables.v8_enable_i18n_support === 0) { @@ -395,6 +396,9 @@ class IntlRequirement { } else { this.currentIntl = kIntlRequirement.full; } + // Not using common.hasCrypto because of the global leak checks + this.hasCrypto = Boolean(process.versions.openssl) && + !process.env.NODE_SKIP_CRYPTO; } /** @@ -409,11 +413,14 @@ class IntlRequirement { if (requires.has('small-icu') && current < kIntlRequirement.small) { return 'small-icu'; } + if (requires.has('crypto') && !this.hasCrypto) { + return 'crypto'; + } return false; } } -const intlRequirements = new IntlRequirement(); +const buildRequirements = new BuildRequirement(); class StatusLoader { /** @@ -440,7 +447,7 @@ class StatusLoader { const list = this.grep(filepath); result = result.concat(list); } else { - if (!(/\.\w+\.js$/.test(filepath)) || filepath.endsWith('.helper.js')) { + if (!(/\.\w+\.js$/.test(filepath))) { continue; } result.push(filepath); @@ -610,7 +617,7 @@ class WPTRunner { 'ReadableStreamBYOBReader', 'ReadableStreamBYOBRequest', 'ReadableByteStreamController', 'ReadableStreamDefaultController', 'ByteLengthQueuingStrategy', 'CountQueuingStrategy', - 'TextEncoderStream', 'TextDecoderStream', + 'TextEncoder', 'TextDecoder', 'TextEncoderStream', 'TextDecoderStream', 'CompressionStream', 'DecompressionStream', ]; if (Boolean(process.versions.openssl) && !process.env.NODE_SKIP_CRYPTO) { @@ -945,9 +952,9 @@ class WPTRunner { continue; } - const lackingIntl = intlRequirements.isLacking(spec.requires); - if (lackingIntl) { - this.skip(spec, [ `requires ${lackingIntl}` ]); + const lackingSupport = buildRequirements.isLacking(spec.requires); + if (lackingSupport) { + this.skip(spec, [ `requires ${lackingSupport}` ]); continue; } diff --git a/test/embedding/test-embedding.js b/test/embedding/test-embedding.js index 1fb3bc73f494cb..558ccaee47ff0f 100644 --- a/test/embedding/test-embedding.js +++ b/test/embedding/test-embedding.js @@ -14,12 +14,11 @@ tmpdir.refresh(); common.allowGlobals(global.require); common.allowGlobals(global.embedVars); -function resolveBuiltBinary(bin) { - let binary = `out/${common.buildType}/${bin}`; +function resolveBuiltBinary(binary) { if (common.isWindows) { binary += '.exe'; } - return path.resolve(__dirname, '..', '..', binary); + return path.join(path.dirname(process.execPath), binary); } const binary = resolveBuiltBinary('embedtest'); diff --git a/test/es-module/test-esm-detect-ambiguous.mjs b/test/es-module/test-esm-detect-ambiguous.mjs index 34c5f17f007c8f..43537f26f5304a 100644 --- a/test/es-module/test-esm-detect-ambiguous.mjs +++ b/test/es-module/test-esm-detect-ambiguous.mjs @@ -235,3 +235,23 @@ describe('--experimental-detect-module', { concurrency: true }, () => { } }); }); + +// Validate temporarily disabling `--abort-on-uncaught-exception` +// while running `containsModuleSyntax`. +// Ref: https://github.com/nodejs/node/issues/50878 +describe('Wrapping a `require` of an ES module while using `--abort-on-uncaught-exception`', () => { + it('should work', async () => { + const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ + '--abort-on-uncaught-exception', + '--eval', + 'assert.throws(() => require("./package-type-module/esm.js"), { code: "ERR_REQUIRE_ESM" })', + ], { + cwd: fixtures.path('es-modules'), + }); + + strictEqual(stderr, ''); + strictEqual(stdout, ''); + strictEqual(code, 0); + strictEqual(signal, null); + }); +}); diff --git a/test/es-module/test-esm-dynamic-import-commonjs.js b/test/es-module/test-esm-dynamic-import-commonjs.js new file mode 100644 index 00000000000000..9022b83f1fcffa --- /dev/null +++ b/test/es-module/test-esm-dynamic-import-commonjs.js @@ -0,0 +1,19 @@ +'use strict'; + +const common = require('../common'); +const fixtures = require('../common/fixtures'); +const assert = require('node:assert'); + +(async () => { + + // Make sure that the CommonJS module lexer has been initialized. + // See https://github.com/nodejs/node/blob/v21.1.0/lib/internal/modules/esm/translators.js#L61-L81. + await import(fixtures.fileURL('empty.js')); + + let tickDuringCJSImport = false; + process.nextTick(() => { tickDuringCJSImport = true; }); + await import(fixtures.fileURL('empty.cjs')); + + assert(!tickDuringCJSImport); + +})().then(common.mustCall()); diff --git a/test/es-module/test-esm-dynamic-import-commonjs.mjs b/test/es-module/test-esm-dynamic-import-commonjs.mjs new file mode 100644 index 00000000000000..6a8f2506c0eb05 --- /dev/null +++ b/test/es-module/test-esm-dynamic-import-commonjs.mjs @@ -0,0 +1,9 @@ +import '../common/index.mjs'; +import fixtures from '../common/fixtures.js'; +import assert from 'node:assert'; + +let tickDuringCJSImport = false; +process.nextTick(() => { tickDuringCJSImport = true; }); +await import(fixtures.fileURL('empty.cjs')); + +assert(!tickDuringCJSImport); diff --git a/test/es-module/test-esm-import-attributes-errors.js b/test/es-module/test-esm-import-attributes-errors.js index 243277fdcd7d29..828ded7e684342 100644 --- a/test/es-module/test-esm-import-attributes-errors.js +++ b/test/es-module/test-esm-import-attributes-errors.js @@ -26,6 +26,11 @@ async function test() { { code: 'ERR_IMPORT_ATTRIBUTE_TYPE_INCOMPATIBLE' } ); + await rejects( + import(jsModuleDataUrl, { with: { type: 'json', other: 'unsupported' } }), + { code: 'ERR_IMPORT_ATTRIBUTE_TYPE_INCOMPATIBLE' } + ); + await rejects( import(jsModuleDataUrl, { with: { type: 'unsupported' } }), { code: 'ERR_IMPORT_ATTRIBUTE_UNSUPPORTED' } diff --git a/test/es-module/test-esm-import-attributes-errors.mjs b/test/es-module/test-esm-import-attributes-errors.mjs index c29cc459326c4b..887a1b97cc26ee 100644 --- a/test/es-module/test-esm-import-attributes-errors.mjs +++ b/test/es-module/test-esm-import-attributes-errors.mjs @@ -21,6 +21,11 @@ await rejects( { code: 'ERR_IMPORT_ATTRIBUTE_TYPE_INCOMPATIBLE' } ); +await rejects( + import(jsModuleDataUrl, { with: { type: 'json', other: 'unsupported' } }), + { code: 'ERR_IMPORT_ATTRIBUTE_TYPE_INCOMPATIBLE' } +); + await rejects( import(import.meta.url, { with: { type: 'unsupported' } }), { code: 'ERR_IMPORT_ATTRIBUTE_UNSUPPORTED' } diff --git a/test/es-module/test-esm-invalid-pjson.js b/test/es-module/test-esm-invalid-pjson.js index 9b49f6f1357685..52cef9ea98b40a 100644 --- a/test/es-module/test-esm-invalid-pjson.js +++ b/test/es-module/test-esm-invalid-pjson.js @@ -1,6 +1,6 @@ 'use strict'; -const { checkoutEOL, spawnPromisified } = require('../common'); +const { spawnPromisified } = require('../common'); const fixtures = require('../common/fixtures.js'); const assert = require('node:assert'); const { execPath } = require('node:process'); @@ -14,12 +14,10 @@ describe('ESM: Package.json', { concurrency: true }, () => { const { code, signal, stderr } = await spawnPromisified(execPath, [entry]); + assert.ok(stderr.includes('code: \'ERR_INVALID_PACKAGE_CONFIG\''), stderr); assert.ok( stderr.includes( - `[ERR_INVALID_PACKAGE_CONFIG]: Invalid package config ${invalidJson} ` + - `while importing "invalid-pjson" from ${entry}. ` + - "Expected ':' after property name in JSON at position " + - `${12 + checkoutEOL.length * 2}` + `Invalid package config ${invalidJson} while importing "invalid-pjson" from ${entry}.` ), stderr ); diff --git a/test/es-module/test-esm-loader-hooks.mjs b/test/es-module/test-esm-loader-hooks.mjs index a4c2f52d0df367..c7b8632bae3df8 100644 --- a/test/es-module/test-esm-loader-hooks.mjs +++ b/test/es-module/test-esm-loader-hooks.mjs @@ -746,4 +746,39 @@ describe('Loader hooks', { concurrency: true }, () => { assert.strictEqual(code, 0); assert.strictEqual(signal, null); }); + + it('should handle mixed of opt-in modules and non-opt-in ones', async () => { + const { code, signal, stdout, stderr } = await spawnPromisified(execPath, [ + '--no-warnings', + '--experimental-loader', + `data:text/javascript,const fixtures=${JSON.stringify(fixtures.path('empty.js'))};export ${ + encodeURIComponent(function resolve(s, c, n) { + if (s.endsWith('entry-point')) { + return { + shortCircuit: true, + url: 'file:///c:/virtual-entry-point', + format: 'commonjs', + }; + } + return n(s, c); + }) + }export ${ + encodeURIComponent(async function load(u, c, n) { + if (u === 'file:///c:/virtual-entry-point') { + return { + shortCircuit: true, + source: `"use strict";require(${JSON.stringify(fixtures)});console.log("Hello");`, + format: 'commonjs', + }; + } + return n(u, c); + })}`, + 'entry-point', + ]); + + assert.strictEqual(stderr, ''); + assert.strictEqual(stdout, 'Hello\n'); + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + }); }); diff --git a/test/es-module/test-esm-loader-with-source.mjs b/test/es-module/test-esm-loader-with-source.mjs new file mode 100644 index 00000000000000..41dca12dfc6bab --- /dev/null +++ b/test/es-module/test-esm-loader-with-source.mjs @@ -0,0 +1,10 @@ +// Flags: --experimental-loader ./test/fixtures/es-module-loaders/preset-cjs-source.mjs +import '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import assert from 'assert'; + +const { default: existingFileSource } = await import(fixtures.fileURL('es-modules', 'cjs-file.cjs')); +const { default: noSuchFileSource } = await import(new URL('./no-such-file.cjs', import.meta.url)); + +assert.strictEqual(existingFileSource, 'no .cjs file was read to get this source'); +assert.strictEqual(noSuchFileSource, 'no .cjs file was read to get this source'); diff --git a/test/es-module/test-esm-loader.mjs b/test/es-module/test-esm-loader.mjs index e19a38cc4231b0..de34814324818c 100644 --- a/test/es-module/test-esm-loader.mjs +++ b/test/es-module/test-esm-loader.mjs @@ -43,6 +43,11 @@ await assert.rejects( { code: 'ERR_INVALID_RETURN_PROPERTY_VALUE' }, ); +await assert.rejects(import('esmHook/commonJsNullSource.mjs'), { + code: 'ERR_INVALID_RETURN_PROPERTY_VALUE', + message: /"source".*'load'.*got type bigint/, +}); + await import('../fixtures/es-module-loaders/js-as-esm.js') .then((parsedModule) => { assert.strictEqual(typeof parsedModule, 'object'); diff --git a/test/es-module/test-esm-type-flag-errors.mjs b/test/es-module/test-esm-type-flag-errors.mjs index 6d54eff94763ef..8fd06c7d562bb0 100644 --- a/test/es-module/test-esm-type-flag-errors.mjs +++ b/test/es-module/test-esm-type-flag-errors.mjs @@ -1,31 +1,101 @@ import { spawnPromisified } from '../common/index.mjs'; import * as fixtures from '../common/fixtures.mjs'; import { describe, it } from 'node:test'; -import { match, strictEqual } from 'node:assert'; - -describe('--experimental-default-type=module should not affect the interpretation of files with unknown extensions', - { concurrency: true }, () => { - it('should error on an entry point with an unknown extension', async () => { - const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ - '--experimental-default-type=module', - fixtures.path('es-modules/package-type-module/extension.unknown'), - ]); - - match(stderr, /ERR_UNKNOWN_FILE_EXTENSION/); - strictEqual(stdout, ''); - strictEqual(code, 1); - strictEqual(signal, null); - }); - - it('should error on an import with an unknown extension', async () => { - const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ - '--experimental-default-type=module', - fixtures.path('es-modules/package-type-module/imports-unknownext.mjs'), - ]); - - match(stderr, /ERR_UNKNOWN_FILE_EXTENSION/); - strictEqual(stdout, ''); - strictEqual(code, 1); - strictEqual(signal, null); - }); - }); +import { deepStrictEqual, match, strictEqual } from 'node:assert'; + +describe('--experimental-default-type=module', { concurrency: true }, () => { + describe('should not affect the interpretation of files with unknown extensions', { concurrency: true }, () => { + it('should error on an entry point with an unknown extension', async () => { + const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ + '--experimental-default-type=module', + fixtures.path('es-modules/package-type-module/extension.unknown'), + ]); + + match(stderr, /ERR_UNKNOWN_FILE_EXTENSION/); + strictEqual(stdout, ''); + strictEqual(code, 1); + strictEqual(signal, null); + }); + + it('should error on an import with an unknown extension', async () => { + const { code, signal, stdout, stderr } = await spawnPromisified(process.execPath, [ + '--experimental-default-type=module', + fixtures.path('es-modules/package-type-module/imports-unknownext.mjs'), + ]); + + match(stderr, /ERR_UNKNOWN_FILE_EXTENSION/); + strictEqual(stdout, ''); + strictEqual(code, 1); + strictEqual(signal, null); + }); + }); + + it('should affect CJS .js files (imported, required, entry points)', async () => { + const result = await spawnPromisified(process.execPath, [ + '--experimental-default-type=module', + fixtures.path('es-modules/package-type-commonjs/echo-require-cache.js'), + ]); + + deepStrictEqual(result, { + code: 0, + stderr: '', + stdout: 'undefined\n', + signal: null, + }); + }); + + it('should affect .cjs files that are imported', async () => { + const result = await spawnPromisified(process.execPath, [ + '--experimental-default-type=module', + '-e', + `import ${JSON.stringify(fixtures.fileURL('es-module-require-cache/echo.cjs'))}`, + ]); + + deepStrictEqual(result, { + code: 0, + stderr: '', + stdout: 'undefined\n', + signal: null, + }); + }); + + it('should affect entry point .cjs files (with no hooks)', async () => { + const { stderr, stdout, code } = await spawnPromisified(process.execPath, [ + '--experimental-default-type=module', + fixtures.path('es-module-require-cache/echo.cjs'), + ]); + + strictEqual(stderr, ''); + match(stdout, /^undefined\n$/); + strictEqual(code, 0); + }); + + it('should affect entry point .cjs files (when any hooks is registered)', async () => { + const result = await spawnPromisified(process.execPath, [ + '--experimental-default-type=module', + '--import', + 'data:text/javascript,import{register}from"node:module";register("data:text/javascript,");', + fixtures.path('es-module-require-cache/echo.cjs'), + ]); + + deepStrictEqual(result, { + code: 0, + stderr: '', + stdout: 'undefined\n', + signal: null, + }); + }); + + it('should not affect CJS from input-type', async () => { + const { stderr, stdout, code } = await spawnPromisified(process.execPath, [ + '--experimental-default-type=module', + '--input-type=commonjs', + '-p', + 'require.cache', + ]); + + strictEqual(stderr, ''); + match(stdout, /^\[Object: null prototype\] \{\}\n$/); + strictEqual(code, 0); + }); +}); diff --git a/test/fixtures/disable-warning-worker.js b/test/fixtures/disable-warning-worker.js new file mode 100644 index 00000000000000..eae892d6466bad --- /dev/null +++ b/test/fixtures/disable-warning-worker.js @@ -0,0 +1,4 @@ +'use strict'; +const path = require('node:path'); +const { Worker } = require('node:worker_threads'); +new Worker(path.join(__dirname, './disable-warning.js')); diff --git a/test/fixtures/disable-warning.js b/test/fixtures/disable-warning.js new file mode 100644 index 00000000000000..ad9822fb9f5d9c --- /dev/null +++ b/test/fixtures/disable-warning.js @@ -0,0 +1,15 @@ +'use strict'; + +process.emitWarning('Deprecation Warning 1', { + code: 'DEP1', + type: 'DeprecationWarning' +}); + +process.emitWarning('Deprecation Warning 2', { + code: 'DEP2', + type: 'DeprecationWarning' +}); + +process.emitWarning('Experimental Warning', { + type: 'ExperimentalWarning' +}); diff --git a/test/fixtures/empty.cjs b/test/fixtures/empty.cjs new file mode 100644 index 00000000000000..e69de29bb2d1d6 diff --git a/test/fixtures/errors/error_aggregateTwoErrors.snapshot b/test/fixtures/errors/error_aggregateTwoErrors.snapshot index a8d13c461b2cb0..77715c40cbfb92 100644 --- a/test/fixtures/errors/error_aggregateTwoErrors.snapshot +++ b/test/fixtures/errors/error_aggregateTwoErrors.snapshot @@ -2,7 +2,8 @@ throw aggregateTwoErrors(err, originalError); ^ -[AggregateError: original] { +AggregateError: original + at Object. (*error_aggregateTwoErrors.js:*:*) { code: 'ERR0', [errors]: [ Error: original diff --git a/test/fixtures/es-module-loaders/hooks-custom.mjs b/test/fixtures/es-module-loaders/hooks-custom.mjs index 5656f95232b856..3c38649a88794f 100644 --- a/test/fixtures/es-module-loaders/hooks-custom.mjs +++ b/test/fixtures/es-module-loaders/hooks-custom.mjs @@ -97,5 +97,13 @@ export function load(url, context, next) { }; } + if (url.endsWith('esmHook/commonJsNullSource.mjs')) { + return { + format: 'commonjs', + shortCircuit: true, + source: 1n, + }; + } + return next(url); } diff --git a/test/fixtures/es-module-loaders/preset-cjs-source.mjs b/test/fixtures/es-module-loaders/preset-cjs-source.mjs new file mode 100644 index 00000000000000..2cfa851a23f889 --- /dev/null +++ b/test/fixtures/es-module-loaders/preset-cjs-source.mjs @@ -0,0 +1,21 @@ +export function resolve(specifier, context, next) { + if (specifier.endsWith('/no-such-file.cjs')) { + // Shortcut to avoid ERR_MODULE_NOT_FOUND for non-existing file, but keep the url for the load hook. + return { + shortCircuit: true, + url: specifier, + }; + } + return next(specifier); +} + +export function load(href, context, next) { + if (href.endsWith('.cjs')) { + return { + format: 'commonjs', + shortCircuit: true, + source: 'module.exports = "no .cjs file was read to get this source";', + }; + } + return next(href); +} diff --git a/test/fixtures/es-module-require-cache/echo.cjs b/test/fixtures/es-module-require-cache/echo.cjs new file mode 100644 index 00000000000000..c00af019304dbe --- /dev/null +++ b/test/fixtures/es-module-require-cache/echo.cjs @@ -0,0 +1 @@ +console.log(require.cache); diff --git a/test/fixtures/es-module-shadow-realm/custom-loaders.js b/test/fixtures/es-module-shadow-realm/custom-loaders.js new file mode 100644 index 00000000000000..bf4402250cc4f8 --- /dev/null +++ b/test/fixtures/es-module-shadow-realm/custom-loaders.js @@ -0,0 +1,15 @@ +// This fixture is used to test that custom loaders are not enabled in the ShadowRealm. + +'use strict'; +const assert = require('assert'); + +async function workInChildProcess() { + // Assert that the process is running with a custom loader. + const moduleNamespace = await import('file:///42.mjs'); + assert.strictEqual(moduleNamespace.default, 42); + + const realm = new ShadowRealm(); + await assert.rejects(realm.importValue('file:///42.mjs', 'default'), TypeError); +} + +workInChildProcess(); diff --git a/test/fixtures/es-module-shadow-realm/preload-main.js b/test/fixtures/es-module-shadow-realm/preload-main.js new file mode 100644 index 00000000000000..4258b012ad6139 --- /dev/null +++ b/test/fixtures/es-module-shadow-realm/preload-main.js @@ -0,0 +1,9 @@ +// This fixture is used to test that --require preload modules are not enabled in the ShadowRealm. + +'use strict'; +const assert = require('assert'); + +assert.strictEqual(globalThis.preload, 42); +const realm = new ShadowRealm(); +const value = realm.evaluate(`globalThis.preload`); +assert.strictEqual(value, undefined); diff --git a/test/fixtures/es-module-shadow-realm/preload.js b/test/fixtures/es-module-shadow-realm/preload.js new file mode 100644 index 00000000000000..dbbcb65e5a17e7 --- /dev/null +++ b/test/fixtures/es-module-shadow-realm/preload.js @@ -0,0 +1 @@ +globalThis.preload = 42; diff --git a/test/fixtures/es-module-shadow-realm/re-export-state-counter.mjs b/test/fixtures/es-module-shadow-realm/re-export-state-counter.mjs new file mode 100644 index 00000000000000..50a6aa3fe1e5b1 --- /dev/null +++ b/test/fixtures/es-module-shadow-realm/re-export-state-counter.mjs @@ -0,0 +1,3 @@ +// This module verifies that the module specifier is resolved relative to the +// current module and not the current working directory in the ShadowRealm. +export { getCounter } from "./state-counter.mjs"; diff --git a/test/fixtures/es-module-shadow-realm/state-counter.mjs b/test/fixtures/es-module-shadow-realm/state-counter.mjs new file mode 100644 index 00000000000000..c547658bf455ba --- /dev/null +++ b/test/fixtures/es-module-shadow-realm/state-counter.mjs @@ -0,0 +1,4 @@ +let counter = 0; +export const getCounter = () => { + return counter++; +}; diff --git a/test/fixtures/es-modules/package-type-commonjs/echo-require-cache.js b/test/fixtures/es-modules/package-type-commonjs/echo-require-cache.js new file mode 100644 index 00000000000000..c00af019304dbe --- /dev/null +++ b/test/fixtures/es-modules/package-type-commonjs/echo-require-cache.js @@ -0,0 +1 @@ +console.log(require.cache); diff --git a/test/fixtures/keys/agent11-cert.pem b/test/fixtures/keys/agent11-cert.pem new file mode 100644 index 00000000000000..42b34d537fc535 --- /dev/null +++ b/test/fixtures/keys/agent11-cert.pem @@ -0,0 +1,8 @@ +-----BEGIN CERTIFICATE----- +MIIBFjCBwaADAgECAgEBMA0GCSqGSIb3DQEBBQUAMBQxEjAQBgNVBAMTCWxvY2Fs +aG9zdDAeFw0yMzEwMTUxNzQ5MTBaFw0yNDEwMTUxNzQ5MTBaMBQxEjAQBgNVBAMT +CWxvY2FsaG9zdDBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDW9vH7W98zSi1IfoTG +pTjbvXRzmmSG6y5z1S3gvC6+keC5QQkEdIG5vWas1efX5qEPybptRyM34T6aWv+U +uzUJAgMBAAEwDQYJKoZIhvcNAQEFBQADQQAEIwD5mLIALrim6uD39DO/umYDtDIb +TAQmgWdkQrCdCtX0Yp49gJyaq2HtFgsk/cxMoYMYkDtT5a7nwEQu+Xqt +-----END CERTIFICATE----- diff --git a/test/fixtures/keys/agent11-key.pem b/test/fixtures/keys/agent11-key.pem new file mode 100644 index 00000000000000..a8bccd007c857c --- /dev/null +++ b/test/fixtures/keys/agent11-key.pem @@ -0,0 +1,9 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIBOwIBAAJBANb28ftb3zNKLUh+hMalONu9dHOaZIbrLnPVLeC8Lr6R4LlBCQR0 +gbm9ZqzV59fmoQ/Jum1HIzfhPppa/5S7NQkCAwEAAQJAaetb6GKoY/lUvre4bLjU +f1Gmo5+bkO8pAGI2LNoMnlETjLjlnvShkqu0kxY96G5Il6VSX4Yjz0D40f4IrlJW +AQIhAPChOjGBlOFcGA/pPmzMcW8jRCLvVubiO9TpiYVhWz45AiEA5LIKsSR8HT9y +eyVNNNkRbNvTrddbvXMBBjj+KwxQrVECIQDjalzHQQJl4lXTY8rdpHJoaNoSckSd +PJ7zYCvaZOKI8QIhALoGbRYMxHySCJBNFlE/pKH06mnE/RXMf2/NWkov+UwRAiAz +ucgBN8xY5KvG3eI78WHdE2B5X0B4EabFXmUlzIrhTA== +-----END RSA PRIVATE KEY----- diff --git a/test/fixtures/node_modules/pkgexports-number/package.json b/test/fixtures/node_modules/pkgexports-number/package.json index 315f39a66e32a6..c5807f588ce8f7 100644 --- a/test/fixtures/node_modules/pkgexports-number/package.json +++ b/test/fixtures/node_modules/pkgexports-number/package.json @@ -1,3 +1,3 @@ { - "exports": 42 + "exports": {} } diff --git a/test/fixtures/source-map/ts-node-win32.js b/test/fixtures/source-map/ts-node-win32.js new file mode 100644 index 00000000000000..22606906c9a5ba --- /dev/null +++ b/test/fixtures/source-map/ts-node-win32.js @@ -0,0 +1,10 @@ +function foo(str) { + return str; +} +foo('noop'); +// To recreate (Windows only): +// +// const filePath = require.resolve('./test/fixtures/source-map/ts-node.ts'); +// const compiled = require('ts-node').create({ transpileOnly: true }).compile(fs.readFileSync(filePath, 'utf8'), filePath); +// fs.writeFileSync('test/fixtures/source-map/ts-node-win32.js', compiled); +//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRDovd29ya3NwYWNlcy9ub2RlL3Rlc3QvZml4dHVyZXMvc291cmNlLW1hcC90cy1ub2RlLnRzIiwic291cmNlcyI6WyJEOi93b3Jrc3BhY2VzL25vZGUvdGVzdC9maXh0dXJlcy9zb3VyY2UtbWFwL3RzLW5vZGUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUyxHQUFHLENBQUMsR0FBVztJQUN0QixPQUFPLEdBQUcsQ0FBQztBQUNiLENBQUM7QUFFRCxHQUFHLENBQUMsTUFBTSxDQUFDLENBQUM7QUFFWiw4QkFBOEI7QUFDOUIsRUFBRTtBQUNGLDZFQUE2RTtBQUM3RSw0SEFBNEg7QUFDNUgsMkVBQTJFIiwic291cmNlc0NvbnRlbnQiOlsiZnVuY3Rpb24gZm9vKHN0cjogc3RyaW5nKSB7XG4gIHJldHVybiBzdHI7XG59XG5cbmZvbygnbm9vcCcpO1xuXG4vLyBUbyByZWNyZWF0ZSAoV2luZG93cyBvbmx5KTpcbi8vXG4vLyBjb25zdCBmaWxlUGF0aCA9IHJlcXVpcmUucmVzb2x2ZSgnLi90ZXN0L2ZpeHR1cmVzL3NvdXJjZS1tYXAvdHMtbm9kZS50cycpO1xuLy8gY29uc3QgY29tcGlsZWQgPSByZXF1aXJlKCd0cy1ub2RlJykuY3JlYXRlKHsgdHJhbnNwaWxlT25seTogdHJ1ZSB9KS5jb21waWxlKGZzLnJlYWRGaWxlU3luYyhmaWxlUGF0aCwgJ3V0ZjgnKSwgZmlsZVBhdGgpO1xuLy8gZnMud3JpdGVGaWxlU3luYygndGVzdC9maXh0dXJlcy9zb3VyY2UtbWFwL3RzLW5vZGUtd2luMzIuanMnLCBjb21waWxlZCk7XG4iXX0= diff --git a/test/fixtures/source-map/ts-node.ts b/test/fixtures/source-map/ts-node.ts new file mode 100644 index 00000000000000..2ff34e0f942f15 --- /dev/null +++ b/test/fixtures/source-map/ts-node.ts @@ -0,0 +1,11 @@ +function foo(str: string) { + return str; +} + +foo('noop'); + +// To recreate (Windows only): +// +// const filePath = require.resolve('./test/fixtures/source-map/ts-node.ts'); +// const compiled = require('ts-node').create({ transpileOnly: true }).compile(fs.readFileSync(filePath, 'utf8'), filePath); +// fs.writeFileSync('test/fixtures/source-map/ts-node-win32.js', compiled); diff --git a/test/fixtures/test-runner/output/arbitrary-output-colored.js b/test/fixtures/test-runner/output/arbitrary-output-colored.js index b09eeeb9971cf6..af23e674cb361e 100644 --- a/test/fixtures/test-runner/output/arbitrary-output-colored.js +++ b/test/fixtures/test-runner/output/arbitrary-output-colored.js @@ -6,6 +6,7 @@ const fixtures = require('../../../common/fixtures'); (async function run() { const test = fixtures.path('test-runner/output/arbitrary-output-colored-1.js'); - await once(spawn(process.execPath, ['--test', test], { stdio: 'inherit', env: { FORCE_COLOR: 1 } }), 'exit'); - await once(spawn(process.execPath, ['--test', '--test-reporter', 'tap', test], { stdio: 'inherit', env: { FORCE_COLOR: 1 } }), 'exit'); + const reset = fixtures.path('test-runner/output/reset-color-depth.js'); + await once(spawn(process.execPath, ['-r', reset, '--test', test], { stdio: 'inherit' }), 'exit'); + await once(spawn(process.execPath, ['-r', reset, '--test', '--test-reporter', 'tap', test], { stdio: 'inherit' }), 'exit'); })().then(common.mustCall()); diff --git a/test/fixtures/test-runner/output/reset-color-depth.js b/test/fixtures/test-runner/output/reset-color-depth.js new file mode 100644 index 00000000000000..02c04b247ad4d9 --- /dev/null +++ b/test/fixtures/test-runner/output/reset-color-depth.js @@ -0,0 +1,5 @@ +'use strict'; + +// Make tests OS-independent by overriding stdio getColorDepth(). +process.stdout.getColorDepth = () => 8; +process.stderr.getColorDepth = () => 8; diff --git a/test/fixtures/utf8_test_text.txt b/test/fixtures/utf8_test_text.txt new file mode 100644 index 00000000000000..f4b6fc9bcfcb5e --- /dev/null +++ b/test/fixtures/utf8_test_text.txt @@ -0,0 +1 @@ +永和九年,嵗在癸丑,暮春之初,會於會稽山隂之蘭亭,脩稧事也。羣賢畢至,少長咸集。此地有崇山峻領,茂林脩竹;又有清流激湍,暎帶左右。引以為流觴曲水,列坐其次。雖無絲竹管弦之盛,一觴一詠,亦足以暢敘幽情。是日也,天朗氣清,恵風和暢;仰觀宇宙之大,俯察品類之盛;所以遊目騁懐,足以極視聽之娛,信可樂也。夫人之相與,俯仰一世,或取諸懐抱,悟言一室之內,或因寄所託,放浪形骸之外。雖趣舎萬殊,靜躁不同,當其欣扵所遇,暫得扵己,怏然自足,不知老之將至。及其所之既惓,情隨事遷,感慨係之矣。向之所欣,俛仰之閒以為陳跡,猶不能不以之興懐;況脩短隨化,終期扵盡。古人云:「死生亦大矣。」豈不痛哉!每攬昔人興感之由,若合一契,未嘗不臨文嗟悼,不能喻之扵懐。固知一死生為虛誕,齊彭殤為妄作。後之視今,亦由今之視昔,悲夫!故列敘時人,錄其所述,雖世殊事異,所以興懐,其致一也。後之攬者,亦將有感扵斯文。 \ No newline at end of file diff --git a/test/fixtures/wpt/README.md b/test/fixtures/wpt/README.md index 6404571a498200..26dd520f8f3eed 100644 --- a/test/fixtures/wpt/README.md +++ b/test/fixtures/wpt/README.md @@ -11,6 +11,7 @@ See [test/wpt](../../wpt/README.md) for information on how these tests are run. Last update: - common: https://github.com/web-platform-tests/wpt/tree/dbd648158d/common +- compression: https://github.com/web-platform-tests/wpt/tree/c82521cfa5/compression - console: https://github.com/web-platform-tests/wpt/tree/767ae35464/console - dom/abort: https://github.com/web-platform-tests/wpt/tree/d1f1ecbd52/dom/abort - dom/events: https://github.com/web-platform-tests/wpt/tree/ab8999891c/dom/events @@ -22,10 +23,10 @@ Last update: - html/webappapis/microtask-queuing: https://github.com/web-platform-tests/wpt/tree/2c5c3c4c27/html/webappapis/microtask-queuing - html/webappapis/structured-clone: https://github.com/web-platform-tests/wpt/tree/47d3fb280c/html/webappapis/structured-clone - html/webappapis/timers: https://github.com/web-platform-tests/wpt/tree/5873f2d8f1/html/webappapis/timers -- interfaces: https://github.com/web-platform-tests/wpt/tree/df731dab88/interfaces +- interfaces: https://github.com/web-platform-tests/wpt/tree/727995f043/interfaces - performance-timeline: https://github.com/web-platform-tests/wpt/tree/17ebc3aea0/performance-timeline - resource-timing: https://github.com/web-platform-tests/wpt/tree/22d38586d0/resource-timing -- resources: https://github.com/web-platform-tests/wpt/tree/919874f84f/resources +- resources: https://github.com/web-platform-tests/wpt/tree/1e140d63ec/resources - streams: https://github.com/web-platform-tests/wpt/tree/517e945bbf/streams - url: https://github.com/web-platform-tests/wpt/tree/c2d7e70b52/url - user-timing: https://github.com/web-platform-tests/wpt/tree/5ae85bf826/user-timing diff --git a/test/fixtures/wpt/compression/META.yml b/test/fixtures/wpt/compression/META.yml new file mode 100644 index 00000000000000..0afbe29a53e807 --- /dev/null +++ b/test/fixtures/wpt/compression/META.yml @@ -0,0 +1,3 @@ +spec: https://wicg.github.io/compression/ +suggested_reviewers: + - ricea diff --git a/test/fixtures/wpt/compression/compression-bad-chunks.tentative.any.js b/test/fixtures/wpt/compression/compression-bad-chunks.tentative.any.js new file mode 100644 index 00000000000000..2d0b5684733930 --- /dev/null +++ b/test/fixtures/wpt/compression/compression-bad-chunks.tentative.any.js @@ -0,0 +1,74 @@ +// META: global=window,worker,shadowrealm + +'use strict'; + +const badChunks = [ + { + name: 'undefined', + value: undefined + }, + { + name: 'null', + value: null + }, + { + name: 'numeric', + value: 3.14 + }, + { + name: 'object, not BufferSource', + value: {} + }, + { + name: 'array', + value: [65] + }, + { + name: 'SharedArrayBuffer', + // Use a getter to postpone construction so that all tests don't fail where + // SharedArrayBuffer is not yet implemented. + get value() { + // See https://github.com/whatwg/html/issues/5380 for why not `new SharedArrayBuffer()` + return new WebAssembly.Memory({ shared:true, initial:1, maximum:1 }).buffer; + } + }, + { + name: 'shared Uint8Array', + get value() { + // See https://github.com/whatwg/html/issues/5380 for why not `new SharedArrayBuffer()` + return new Uint8Array(new WebAssembly.Memory({ shared:true, initial:1, maximum:1 }).buffer) + } + }, +]; + +for (const chunk of badChunks) { + promise_test(async t => { + const cs = new CompressionStream('gzip'); + const reader = cs.readable.getReader(); + const writer = cs.writable.getWriter(); + const writePromise = writer.write(chunk.value); + const readPromise = reader.read(); + await promise_rejects_js(t, TypeError, writePromise, 'write should reject'); + await promise_rejects_js(t, TypeError, readPromise, 'read should reject'); + }, `chunk of type ${chunk.name} should error the stream for gzip`); + + promise_test(async t => { + const cs = new CompressionStream('deflate'); + const reader = cs.readable.getReader(); + const writer = cs.writable.getWriter(); + const writePromise = writer.write(chunk.value); + const readPromise = reader.read(); + await promise_rejects_js(t, TypeError, writePromise, 'write should reject'); + await promise_rejects_js(t, TypeError, readPromise, 'read should reject'); + }, `chunk of type ${chunk.name} should error the stream for deflate`); + + promise_test(async t => { + const cs = new CompressionStream('deflate-raw'); + const reader = cs.readable.getReader(); + const writer = cs.writable.getWriter(); + const writePromise = writer.write(chunk.value); + const readPromise = reader.read(); + await promise_rejects_js(t, TypeError, writePromise, 'write should reject'); + await promise_rejects_js(t, TypeError, readPromise, 'read should reject'); + }, `chunk of type ${chunk.name} should error the stream for deflate-raw`); +} diff --git a/test/fixtures/wpt/compression/compression-constructor-error.tentative.any.js b/test/fixtures/wpt/compression/compression-constructor-error.tentative.any.js new file mode 100644 index 00000000000000..b39ab93bd02aba --- /dev/null +++ b/test/fixtures/wpt/compression/compression-constructor-error.tentative.any.js @@ -0,0 +1,15 @@ +// META: global=window,worker,shadowrealm + +'use strict'; + +test(t => { + assert_throws_js(TypeError, () => new CompressionStream('a'), 'constructor should throw'); +}, '"a" should cause the constructor to throw'); + +test(t => { + assert_throws_js(TypeError, () => new CompressionStream(), 'constructor should throw'); +}, 'no input should cause the constructor to throw'); + +test(t => { + assert_throws_js(Error, () => new CompressionStream({ toString() { throw Error(); } }), 'constructor should throw'); +}, 'non-string input should cause the constructor to throw'); diff --git a/test/fixtures/wpt/compression/compression-including-empty-chunk.tentative.any.js b/test/fixtures/wpt/compression/compression-including-empty-chunk.tentative.any.js new file mode 100644 index 00000000000000..a7fd1ceb24f086 --- /dev/null +++ b/test/fixtures/wpt/compression/compression-including-empty-chunk.tentative.any.js @@ -0,0 +1,63 @@ +// META: global=window,worker,shadowrealm +// META: script=third_party/pako/pako_inflate.min.js +// META: timeout=long + +'use strict'; + +// This test asserts that compressing '' doesn't affect the compressed data. +// Example: compressing ['Hello', '', 'Hello'] results in 'HelloHello' + +async function compressChunkList(chunkList, format) { + const cs = new CompressionStream(format); + const writer = cs.writable.getWriter(); + for (const chunk of chunkList) { + const chunkByte = new TextEncoder().encode(chunk); + writer.write(chunkByte); + } + const closePromise = writer.close(); + const out = []; + const reader = cs.readable.getReader(); + let totalSize = 0; + while (true) { + const { value, done } = await reader.read(); + if (done) + break; + out.push(value); + totalSize += value.byteLength; + } + await closePromise; + const concatenated = new Uint8Array(totalSize); + let offset = 0; + for (const array of out) { + concatenated.set(array, offset); + offset += array.byteLength; + } + return concatenated; +} + +const chunkLists = [ + ['', 'Hello', 'Hello'], + ['Hello', '', 'Hello'], + ['Hello', 'Hello', ''] +]; +const expectedValue = new TextEncoder().encode('HelloHello'); + +for (const chunkList of chunkLists) { + promise_test(async t => { + const compressedData = await compressChunkList(chunkList, 'deflate'); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflate(compressedData), 'value should match'); + }, `the result of compressing [${chunkList}] with deflate should be 'HelloHello'`); + + promise_test(async t => { + const compressedData = await compressChunkList(chunkList, 'gzip'); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflate(compressedData), 'value should match'); + }, `the result of compressing [${chunkList}] with gzip should be 'HelloHello'`); + + promise_test(async t => { + const compressedData = await compressChunkList(chunkList, 'deflate-raw'); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflateRaw(compressedData), 'value should match'); + }, `the result of compressing [${chunkList}] with deflate-raw should be 'HelloHello'`); +} diff --git a/test/fixtures/wpt/compression/compression-large-flush-output.any.js b/test/fixtures/wpt/compression/compression-large-flush-output.any.js new file mode 100644 index 00000000000000..6afcb4d52875b9 --- /dev/null +++ b/test/fixtures/wpt/compression/compression-large-flush-output.any.js @@ -0,0 +1,41 @@ +// META: global=window,worker,shadowrealm +// META: script=third_party/pako/pako_inflate.min.js +// META: script=resources/concatenate-stream.js +// META: timeout=long + +'use strict'; + +// This test verifies that a large flush output will not truncate the +// final results. + +async function compressData(chunk, format) { + const cs = new CompressionStream(format); + const writer = cs.writable.getWriter(); + writer.write(chunk); + writer.close(); + return await concatenateStream(cs.readable); +} + +// JSON-encoded array of 10 thousands numbers ("[0,1,2,...]"). This produces 48_891 bytes of data. +const fullData = new TextEncoder().encode(JSON.stringify(Array.from({ length: 10_000 }, (_, i) => i))); +const data = fullData.subarray(0, 35_579); +const expectedValue = data; + +promise_test(async t => { + const compressedData = await compressData(data, 'deflate'); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflate(compressedData), 'value should match'); +}, `deflate compression with large flush output`); + +promise_test(async t => { + const compressedData = await compressData(data, 'gzip'); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflate(compressedData), 'value should match'); +}, `gzip compression with large flush output`); + +promise_test(async t => { + const compressedData = await compressData(data, 'deflate-raw'); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflateRaw(compressedData), 'value should match'); +}, `deflate-raw compression with large flush output`); + diff --git a/test/fixtures/wpt/compression/compression-multiple-chunks.tentative.any.js b/test/fixtures/wpt/compression/compression-multiple-chunks.tentative.any.js new file mode 100644 index 00000000000000..28a90e5ca53902 --- /dev/null +++ b/test/fixtures/wpt/compression/compression-multiple-chunks.tentative.any.js @@ -0,0 +1,67 @@ +// META: global=window,worker,shadowrealm +// META: script=third_party/pako/pako_inflate.min.js +// META: timeout=long + +'use strict'; + +// This test asserts that compressing multiple chunks should work. + +// Example: ('Hello', 3) => TextEncoder().encode('HelloHelloHello') +function makeExpectedChunk(input, numberOfChunks) { + const expectedChunk = input.repeat(numberOfChunks); + return new TextEncoder().encode(expectedChunk); +} + +// Example: ('Hello', 3, 'deflate') => compress ['Hello', 'Hello', Hello'] +async function compressMultipleChunks(input, numberOfChunks, format) { + const cs = new CompressionStream(format); + const writer = cs.writable.getWriter(); + const chunk = new TextEncoder().encode(input); + for (let i = 0; i < numberOfChunks; ++i) { + writer.write(chunk); + } + const closePromise = writer.close(); + const out = []; + const reader = cs.readable.getReader(); + let totalSize = 0; + while (true) { + const { value, done } = await reader.read(); + if (done) + break; + out.push(value); + totalSize += value.byteLength; + } + await closePromise; + const concatenated = new Uint8Array(totalSize); + let offset = 0; + for (const array of out) { + concatenated.set(array, offset); + offset += array.byteLength; + } + return concatenated; +} + +const hello = 'Hello'; + +for (let numberOfChunks = 2; numberOfChunks <= 16; ++numberOfChunks) { + promise_test(async t => { + const compressedData = await compressMultipleChunks(hello, numberOfChunks, 'deflate'); + const expectedValue = makeExpectedChunk(hello, numberOfChunks); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflate(compressedData), 'value should match'); + }, `compressing ${numberOfChunks} chunks with deflate should work`); + + promise_test(async t => { + const compressedData = await compressMultipleChunks(hello, numberOfChunks, 'gzip'); + const expectedValue = makeExpectedChunk(hello, numberOfChunks); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflate(compressedData), 'value should match'); + }, `compressing ${numberOfChunks} chunks with gzip should work`); + + promise_test(async t => { + const compressedData = await compressMultipleChunks(hello, numberOfChunks, 'deflate-raw'); + const expectedValue = makeExpectedChunk(hello, numberOfChunks); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(expectedValue, pako.inflateRaw(compressedData), 'value should match'); + }, `compressing ${numberOfChunks} chunks with deflate-raw should work`); +} diff --git a/test/fixtures/wpt/compression/compression-output-length.tentative.any.js b/test/fixtures/wpt/compression/compression-output-length.tentative.any.js new file mode 100644 index 00000000000000..7aa13734500d26 --- /dev/null +++ b/test/fixtures/wpt/compression/compression-output-length.tentative.any.js @@ -0,0 +1,64 @@ +// META: global=window,worker,shadowrealm + +'use strict'; + +// This test asserts that compressed data length is shorter than the original +// data length. If the input is extremely small, the compressed data may be +// larger than the original data. + +const LARGE_FILE = '/media/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm'; + +async function compressArrayBuffer(input, format) { + const cs = new CompressionStream(format); + const writer = cs.writable.getWriter(); + writer.write(input); + const closePromise = writer.close(); + const out = []; + const reader = cs.readable.getReader(); + let totalSize = 0; + while (true) { + const { value, done } = await reader.read(); + if (done) + break; + out.push(value); + totalSize += value.byteLength; + } + await closePromise; + const concatenated = new Uint8Array(totalSize); + let offset = 0; + for (const array of out) { + concatenated.set(array, offset); + offset += array.byteLength; + } + return concatenated; +} + +promise_test(async () => { + const response = await fetch(LARGE_FILE); + const buffer = await response.arrayBuffer(); + const bufferView = new Uint8Array(buffer); + const originalLength = bufferView.length; + const compressedData = await compressArrayBuffer(bufferView, 'deflate'); + const compressedLength = compressedData.length; + assert_less_than(compressedLength, originalLength, 'output should be smaller'); +}, 'the length of deflated data should be shorter than that of the original data'); + +promise_test(async () => { + const response = await fetch(LARGE_FILE); + const buffer = await response.arrayBuffer(); + const bufferView = new Uint8Array(buffer); + const originalLength = bufferView.length; + const compressedData = await compressArrayBuffer(bufferView, 'gzip'); + const compressedLength = compressedData.length; + assert_less_than(compressedLength, originalLength, 'output should be smaller'); +}, 'the length of gzipped data should be shorter than that of the original data'); + +promise_test(async () => { + const response = await fetch(LARGE_FILE); + const buffer = await response.arrayBuffer(); + const bufferView = new Uint8Array(buffer); + const originalLength = bufferView.length; + const compressedData = await compressArrayBuffer(bufferView, 'deflate-raw'); + const compressedLength = compressedData.length; + assert_less_than(compressedLength, originalLength, 'output should be smaller'); +}, 'the length of deflated (with -raw) data should be shorter than that of the original data'); diff --git a/test/fixtures/wpt/compression/compression-stream.tentative.any.js b/test/fixtures/wpt/compression/compression-stream.tentative.any.js new file mode 100644 index 00000000000000..a7ea0cb908402f --- /dev/null +++ b/test/fixtures/wpt/compression/compression-stream.tentative.any.js @@ -0,0 +1,91 @@ +// META: global=window,worker,shadowrealm +// META: script=third_party/pako/pako_inflate.min.js +// META: timeout=long + +'use strict'; + +const SMALL_FILE = "/media/foo.vtt"; +const LARGE_FILE = "/media/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm"; + +async function compressArrayBuffer(input, format) { + const cs = new CompressionStream(format); + const writer = cs.writable.getWriter(); + writer.write(input); + const closePromise = writer.close(); + const out = []; + const reader = cs.readable.getReader(); + let totalSize = 0; + while (true) { + const { value, done } = await reader.read(); + if (done) + break; + out.push(value); + totalSize += value.byteLength; + } + await closePromise; + const concatenated = new Uint8Array(totalSize); + let offset = 0; + for (const array of out) { + concatenated.set(array, offset); + offset += array.byteLength; + } + return concatenated; +} + +test(() => { + assert_throws_js(TypeError, () => { + const transformer = new CompressionStream("nonvalid"); + }, "non supported format should throw"); +}, "CompressionStream constructor should throw on invalid format"); + +promise_test(async () => { + const buffer = new ArrayBuffer(0); + const bufferView = new Uint8Array(buffer); + const compressedData = await compressArrayBuffer(bufferView, "deflate"); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(bufferView, pako.inflate(compressedData)); +}, "deflated empty data should be reinflated back to its origin"); + +promise_test(async () => { + const response = await fetch(SMALL_FILE) + const buffer = await response.arrayBuffer(); + const bufferView = new Uint8Array(buffer); + const compressedData = await compressArrayBuffer(bufferView, "deflate"); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(bufferView, pako.inflate(compressedData)); +}, "deflated small amount data should be reinflated back to its origin"); + +promise_test(async () => { + const response = await fetch(LARGE_FILE) + const buffer = await response.arrayBuffer(); + const bufferView = new Uint8Array(buffer); + const compressedData = await compressArrayBuffer(bufferView, "deflate"); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(bufferView, pako.inflate(compressedData)); +}, "deflated large amount data should be reinflated back to its origin"); + +promise_test(async () => { + const buffer = new ArrayBuffer(0); + const bufferView = new Uint8Array(buffer); + const compressedData = await compressArrayBuffer(bufferView, "gzip"); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(bufferView, pako.inflate(compressedData)); +}, "gzipped empty data should be reinflated back to its origin"); + +promise_test(async () => { + const response = await fetch(SMALL_FILE) + const buffer = await response.arrayBuffer(); + const bufferView = new Uint8Array(buffer); + const compressedData = await compressArrayBuffer(bufferView, "gzip"); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(bufferView, pako.inflate(compressedData)); +}, "gzipped small amount data should be reinflated back to its origin"); + +promise_test(async () => { + const response = await fetch(LARGE_FILE) + const buffer = await response.arrayBuffer(); + const bufferView = new Uint8Array(buffer); + const compressedData = await compressArrayBuffer(bufferView, "gzip"); + // decompress with pako, and check that we got the same result as our original string + assert_array_equals(bufferView, pako.inflate(compressedData)); +}, "gzipped large amount data should be reinflated back to its origin"); diff --git a/test/fixtures/wpt/compression/compression-with-detach.tentative.window.js b/test/fixtures/wpt/compression/compression-with-detach.tentative.window.js new file mode 100644 index 00000000000000..465feaa47d4e9a --- /dev/null +++ b/test/fixtures/wpt/compression/compression-with-detach.tentative.window.js @@ -0,0 +1,55 @@ +// META: global=window,worker,shadowrealm +// META: script=resources/concatenate-stream.js + +'use strict'; + +const kInputLength = 500000; + +function createLargeRandomInput() { + const buffer = new ArrayBuffer(kInputLength); + // The getRandomValues API will only let us get 65536 bytes at a time, so call + // it multiple times. + const kChunkSize = 65536; + for (let offset = 0; offset < kInputLength; offset += kChunkSize) { + const length = + offset + kChunkSize > kInputLength ? kInputLength - offset : kChunkSize; + const view = new Uint8Array(buffer, offset, length); + crypto.getRandomValues(view); + } + return new Uint8Array(buffer); +} + +function decompress(view) { + const ds = new DecompressionStream('deflate'); + const writer = ds.writable.getWriter(); + writer.write(view); + writer.close(); + return concatenateStream(ds.readable); +} + +promise_test(async () => { + const input = createLargeRandomInput(); + const inputCopy = input.slice(0, input.byteLength); + const cs = new CompressionStream('deflate'); + const writer = cs.writable.getWriter(); + writer.write(input); + writer.close(); + // Object.prototype.then will be looked up synchronously when the promise + // returned by read() is resolved. + Object.defineProperty(Object.prototype, 'then', { + get() { + // Cause input to become detached and unreferenced. + try { + postMessage(undefined, 'nowhere', [input.buffer]); + } catch (e) { + // It's already detached. + } + } + }); + const output = await concatenateStream(cs.readable); + // Perform the comparison as strings since this is reasonably fast even when + // JITted JavaScript is running under an emulator. + assert_equals( + inputCopy.toString(), (await decompress(output)).toString(), + 'decompressing the output should return the input'); +}, 'data should be correctly compressed even if input is detached partway'); diff --git a/test/fixtures/wpt/compression/decompression-bad-chunks.tentative.any.js b/test/fixtures/wpt/compression/decompression-bad-chunks.tentative.any.js new file mode 100644 index 00000000000000..f450b0c4cb2553 --- /dev/null +++ b/test/fixtures/wpt/compression/decompression-bad-chunks.tentative.any.js @@ -0,0 +1,85 @@ +// META: global=window,worker,shadowrealm + +'use strict'; + +const badChunks = [ + { + name: 'undefined', + value: undefined + }, + { + name: 'null', + value: null + }, + { + name: 'numeric', + value: 3.14 + }, + { + name: 'object, not BufferSource', + value: {} + }, + { + name: 'array', + value: [65] + }, + { + name: 'SharedArrayBuffer', + // Use a getter to postpone construction so that all tests don't fail where + // SharedArrayBuffer is not yet implemented. + get value() { + // See https://github.com/whatwg/html/issues/5380 for why not `new SharedArrayBuffer()` + return new WebAssembly.Memory({ shared:true, initial:1, maximum:1 }).buffer; + } + }, + { + name: 'shared Uint8Array', + get value() { + // See https://github.com/whatwg/html/issues/5380 for why not `new SharedArrayBuffer()` + return new Uint8Array(new WebAssembly.Memory({ shared:true, initial:1, maximum:1 }).buffer) + } + }, + { + name: 'invalid deflate bytes', + value: new Uint8Array([0, 156, 75, 173, 40, 72, 77, 46, 73, 77, 81, 200, 47, 45, 41, 40, 45, 1, 0, 48, 173, 6, 36]) + }, + { + name: 'invalid gzip bytes', + value: new Uint8Array([0, 139, 8, 0, 0, 0, 0, 0, 0, 3, 75, 173, 40, 72, 77, 46, 73, 77, 81, 200, 47, 45, 41, 40, 45, 1, 0, 176, 1, 57, 179, 15, 0, 0, 0]) + }, +]; + +// Test Case Design +// We need to wait until after we close the writable stream to check if the decoded stream is valid. +// We can end up in a state where all reads/writes are valid, but upon closing the writable stream an error is detected. +// (Example: A zlib encoded chunk w/o the checksum). + +async function decompress(chunk, format, t) +{ + const ds = new DecompressionStream(format); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + + writer.write(chunk.value).then(() => {}, () => {}); + reader.read().then(() => {}, () => {}); + + await promise_rejects_js(t, TypeError, writer.close(), 'writer.close() should reject'); + await promise_rejects_js(t, TypeError, writer.closed, 'write.closed should reject'); + + await promise_rejects_js(t, TypeError, reader.read(), 'reader.read() should reject'); + await promise_rejects_js(t, TypeError, reader.closed, 'read.closed should reject'); +} + +for (const chunk of badChunks) { + promise_test(async t => { + await decompress(chunk, 'gzip', t); + }, `chunk of type ${chunk.name} should error the stream for gzip`); + + promise_test(async t => { + await decompress(chunk, 'deflate', t); + }, `chunk of type ${chunk.name} should error the stream for deflate`); + + promise_test(async t => { + await decompress(chunk, 'deflate-raw', t); + }, `chunk of type ${chunk.name} should error the stream for deflate-raw`); +} diff --git a/test/fixtures/wpt/compression/decompression-buffersource.tentative.any.js b/test/fixtures/wpt/compression/decompression-buffersource.tentative.any.js new file mode 100644 index 00000000000000..e81fc566779800 --- /dev/null +++ b/test/fixtures/wpt/compression/decompression-buffersource.tentative.any.js @@ -0,0 +1,192 @@ +// META: global=window,worker,shadowrealm + +'use strict'; + +const compressedBytesWithDeflate = [120, 156, 75, 52, 48, 52, 50, 54, 49, 53, 3, 0, 8, 136, 1, 199]; +const compressedBytesWithGzip = [31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 75, 52, 48, 52, 2, 0, 216, 252, 63, 136, 4, 0, 0, 0]; +const compressedBytesWithDeflateRaw = [ + 0x00, 0x06, 0x00, 0xf9, 0xff, 0x41, 0x42, 0x43, + 0x44, 0x45, 0x46, 0x01, 0x00, 0x00, 0xff, 0xff, +]; +// These chunk values below were chosen to make the length of the compressed +// output be a multiple of 8 bytes. +const deflateExpectedChunkValue = new TextEncoder().encode('a0123456'); +const gzipExpectedChunkValue = new TextEncoder().encode('a012'); +const deflateRawExpectedChunkValue = new TextEncoder().encode('ABCDEF'); + +const bufferSourceChunksForDeflate = [ + { + name: 'ArrayBuffer', + value: new Uint8Array(compressedBytesWithDeflate).buffer + }, + { + name: 'Int8Array', + value: new Int8Array(new Uint8Array(compressedBytesWithDeflate).buffer) + }, + { + name: 'Uint8Array', + value: new Uint8Array(new Uint8Array(compressedBytesWithDeflate).buffer) + }, + { + name: 'Uint8ClampedArray', + value: new Uint8ClampedArray(new Uint8Array(compressedBytesWithDeflate).buffer) + }, + { + name: 'Int16Array', + value: new Int16Array(new Uint8Array(compressedBytesWithDeflate).buffer) + }, + { + name: 'Uint16Array', + value: new Uint16Array(new Uint8Array(compressedBytesWithDeflate).buffer) + }, + { + name: 'Int32Array', + value: new Int32Array(new Uint8Array(compressedBytesWithDeflate).buffer) + }, + { + name: 'Uint32Array', + value: new Uint32Array(new Uint8Array(compressedBytesWithDeflate).buffer) + }, + { + name: 'Float32Array', + value: new Float32Array(new Uint8Array(compressedBytesWithDeflate).buffer) + }, + { + name: 'Float64Array', + value: new Float64Array(new Uint8Array(compressedBytesWithDeflate).buffer) + }, + { + name: 'DataView', + value: new DataView(new Uint8Array(compressedBytesWithDeflate).buffer) + }, +]; + +const bufferSourceChunksForGzip = [ + { + name: 'ArrayBuffer', + value: new Uint8Array(compressedBytesWithGzip).buffer + }, + { + name: 'Int8Array', + value: new Int8Array(new Uint8Array(compressedBytesWithGzip).buffer) + }, + { + name: 'Uint8Array', + value: new Uint8Array(new Uint8Array(compressedBytesWithGzip).buffer) + }, + { + name: 'Uint8ClambedArray', + value: new Uint8ClampedArray(new Uint8Array(compressedBytesWithGzip).buffer) + }, + { + name: 'Int16Array', + value: new Int16Array(new Uint8Array(compressedBytesWithGzip).buffer) + }, + { + name: 'Uint16Array', + value: new Uint16Array(new Uint8Array(compressedBytesWithGzip).buffer) + }, + { + name: 'Int32Array', + value: new Int32Array(new Uint8Array(compressedBytesWithGzip).buffer) + }, + { + name: 'Uint32Array', + value: new Uint32Array(new Uint8Array(compressedBytesWithGzip).buffer) + }, + { + name: 'Float32Array', + value: new Float32Array(new Uint8Array(compressedBytesWithGzip).buffer) + }, + { + name: 'Float64Array', + value: new Float64Array(new Uint8Array(compressedBytesWithGzip).buffer) + }, + { + name: 'DataView', + value: new DataView(new Uint8Array(compressedBytesWithGzip).buffer) + }, +]; + +const bufferSourceChunksForDeflateRaw = [ + { + name: 'ArrayBuffer', + value: new Uint8Array(compressedBytesWithDeflateRaw).buffer + }, + { + name: 'Int8Array', + value: new Int8Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer) + }, + { + name: 'Uint8Array', + value: new Uint8Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer) + }, + { + name: 'Uint8ClampedArray', + value: new Uint8ClampedArray(new Uint8Array(compressedBytesWithDeflateRaw).buffer) + }, + { + name: 'Int16Array', + value: new Int16Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer) + }, + { + name: 'Uint16Array', + value: new Uint16Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer) + }, + { + name: 'Int32Array', + value: new Int32Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer) + }, + { + name: 'Uint32Array', + value: new Uint32Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer) + }, + { + name: 'Float32Array', + value: new Float32Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer) + }, + { + name: 'Float64Array', + value: new Float64Array(new Uint8Array(compressedBytesWithDeflateRaw).buffer) + }, + { + name: 'DataView', + value: new DataView(new Uint8Array(compressedBytesWithDeflateRaw).buffer) + }, +]; + +for (const chunk of bufferSourceChunksForDeflate) { + promise_test(async t => { + const ds = new DecompressionStream('deflate'); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + const writePromise = writer.write(chunk.value); + writer.close(); + const { value } = await reader.read(); + assert_array_equals(Array.from(value), deflateExpectedChunkValue, 'value should match'); + }, `chunk of type ${chunk.name} should work for deflate`); +} + +for (const chunk of bufferSourceChunksForGzip) { + promise_test(async t => { + const ds = new DecompressionStream('gzip'); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + const writePromise = writer.write(chunk.value); + writer.close(); + const { value } = await reader.read(); + assert_array_equals(Array.from(value), gzipExpectedChunkValue, 'value should match'); + }, `chunk of type ${chunk.name} should work for gzip`); +} + +for (const chunk of bufferSourceChunksForDeflateRaw) { + promise_test(async t => { + const ds = new DecompressionStream('deflate-raw'); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + const writePromise = writer.write(chunk.value); + writer.close(); + const { value } = await reader.read(); + assert_array_equals(Array.from(value), deflateRawExpectedChunkValue, 'value should match'); + }, `chunk of type ${chunk.name} should work for deflate-raw`); +} diff --git a/test/fixtures/wpt/compression/decompression-constructor-error.tentative.any.js b/test/fixtures/wpt/compression/decompression-constructor-error.tentative.any.js new file mode 100644 index 00000000000000..0270ba7353128c --- /dev/null +++ b/test/fixtures/wpt/compression/decompression-constructor-error.tentative.any.js @@ -0,0 +1,15 @@ +// META: global=window,worker,shadowrealm + +'use strict'; + +test(t => { + assert_throws_js(TypeError, () => new DecompressionStream('a'), 'constructor should throw'); +}, '"a" should cause the constructor to throw'); + +test(t => { + assert_throws_js(TypeError, () => new DecompressionStream(), 'constructor should throw'); +}, 'no input should cause the constructor to throw'); + +test(t => { + assert_throws_js(Error, () => new DecompressionStream({ toString() { throw Error(); } }), 'constructor should throw'); +}, 'non-string input should cause the constructor to throw'); diff --git a/test/fixtures/wpt/compression/decompression-correct-input.tentative.any.js b/test/fixtures/wpt/compression/decompression-correct-input.tentative.any.js new file mode 100644 index 00000000000000..90519445e3667b --- /dev/null +++ b/test/fixtures/wpt/compression/decompression-correct-input.tentative.any.js @@ -0,0 +1,39 @@ +// META: global=window,worker,shadowrealm + +'use strict'; + +const deflateChunkValue = new Uint8Array([120, 156, 75, 173, 40, 72, 77, 46, 73, 77, 81, 200, 47, 45, 41, 40, 45, 1, 0, 48, 173, 6, 36]); +const gzipChunkValue = new Uint8Array([31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 75, 173, 40, 72, 77, 46, 73, 77, 81, 200, 47, 45, 41, 40, 45, 1, 0, 176, 1, 57, 179, 15, 0, 0, 0]); +const deflateRawChunkValue = new Uint8Array([ + 0x4b, 0xad, 0x28, 0x48, 0x4d, 0x2e, 0x49, 0x4d, 0x51, 0xc8, + 0x2f, 0x2d, 0x29, 0x28, 0x2d, 0x01, 0x00, +]); +const trueChunkValue = new TextEncoder().encode('expected output'); + +promise_test(async t => { + const ds = new DecompressionStream('deflate'); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + const writePromise = writer.write(deflateChunkValue); + const { done, value } = await reader.read(); + assert_array_equals(Array.from(value), trueChunkValue, "value should match"); +}, 'decompressing deflated input should work'); + + +promise_test(async t => { + const ds = new DecompressionStream('gzip'); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + const writePromise = writer.write(gzipChunkValue); + const { done, value } = await reader.read(); + assert_array_equals(Array.from(value), trueChunkValue, "value should match"); +}, 'decompressing gzip input should work'); + +promise_test(async t => { + const ds = new DecompressionStream('deflate-raw'); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + const writePromise = writer.write(deflateRawChunkValue); + const { done, value } = await reader.read(); + assert_array_equals(Array.from(value), trueChunkValue, "value should match"); +}, 'decompressing deflated (with -raw) input should work'); diff --git a/test/fixtures/wpt/compression/decompression-corrupt-input.tentative.any.js b/test/fixtures/wpt/compression/decompression-corrupt-input.tentative.any.js new file mode 100644 index 00000000000000..fc18197dfbd3db --- /dev/null +++ b/test/fixtures/wpt/compression/decompression-corrupt-input.tentative.any.js @@ -0,0 +1,318 @@ +// META global=window,worker,shadowrealm + +// This test checks that DecompressionStream behaves according to the standard +// when the input is corrupted. To avoid a combinatorial explosion in the +// number of tests, we only mutate one field at a time, and we only test +// "interesting" values. + +'use strict'; + +// The many different cases are summarised in this data structure. +const expectations = [ + { + format: 'deflate', + + // Decompresses to 'expected output'. + baseInput: [120, 156, 75, 173, 40, 72, 77, 46, 73, 77, 81, 200, 47, 45, 41, + 40, 45, 1, 0, 48, 173, 6, 36], + + // See RFC1950 for the definition of the various fields used by deflate: + // https://tools.ietf.org/html/rfc1950. + fields: [ + { + // The function of this field. This matches the name used in the RFC. + name: 'CMF', + + // The offset of the field in bytes from the start of the input. + offset: 0, + + // The length of the field in bytes. + length: 1, + + cases: [ + { + // The value to set the field to. If the field contains multiple + // bytes, all the bytes will be set to this value. + value: 0, + + // The expected result. 'success' means the input is decoded + // successfully. 'error' means that the stream will be errored. + result: 'error' + } + ] + }, + { + name: 'FLG', + offset: 1, + length: 1, + + // FLG contains a 4-bit checksum (FCHECK) which is calculated in such a + // way that there are 4 valid values for this field. + cases: [ + { + value: 218, + result: 'success' + }, + { + value: 1, + result: 'success' + }, + { + value: 94, + result: 'success' + }, + { + // The remaining 252 values cause an error. + value: 157, + result: 'error' + } + ] + }, + { + name: 'DATA', + // In general, changing any bit of the data will trigger a checksum + // error. Only the last byte does anything else. + offset: 18, + length: 1, + cases: [ + { + value: 4, + result: 'success' + }, + { + value: 5, + result: 'error' + } + ] + }, + { + name: 'ADLER', + offset: -4, + length: 4, + cases: [ + { + value: 255, + result: 'error' + } + ] + } + ] + }, + { + format: 'gzip', + + // Decompresses to 'expected output'. + baseInput: [31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 75, 173, 40, 72, 77, 46, 73, + 77, 81, 200, 47, 45, 41, 40, 45, 1, 0, 176, 1, 57, 179, 15, 0, + 0, 0], + + // See RFC1952 for the definition of the various fields used by gzip: + // https://tools.ietf.org/html/rfc1952. + fields: [ + { + name: 'ID', + offset: 0, + length: 2, + cases: [ + { + value: 255, + result: 'error' + } + ] + }, + { + name: 'CM', + offset: 2, + length: 1, + cases: [ + { + value: 0, + result: 'error' + } + ] + }, + { + name: 'FLG', + offset: 3, + length: 1, + cases: [ + { + value: 1, // FTEXT + result: 'success' + }, + { + value: 2, // FHCRC + result: 'error' + } + ] + }, + { + name: 'MTIME', + offset: 4, + length: 4, + cases: [ + { + // Any value is valid for this field. + value: 255, + result: 'success' + } + ] + }, + { + name: 'XFL', + offset: 8, + length: 1, + cases: [ + { + // Any value is accepted. + value: 255, + result: 'success' + } + ] + }, + { + name: 'OS', + offset: 9, + length: 1, + cases: [ + { + // Any value is accepted. + value: 128, + result: 'success' + } + ] + }, + { + name: 'DATA', + + // The last byte of the data is the most interesting. + offset: 26, + length: 1, + cases: [ + { + value: 3, + result: 'error' + }, + { + value: 4, + result: 'success' + } + ] + }, + { + name: 'CRC', + offset: -8, + length: 4, + cases: [ + { + // Any change will error the stream. + value: 0, + result: 'error' + } + ] + }, + { + name: 'ISIZE', + offset: -4, + length: 4, + cases: [ + { + // A mismatch will error the stream. + value: 1, + result: 'error' + } + ] + } + ] + } +]; + +async function tryDecompress(input, format) { + const ds = new DecompressionStream(format); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + writer.write(input).catch(() => {}); + writer.close().catch(() => {}); + let out = []; + while (true) { + try { + const { value, done } = await reader.read(); + if (done) { + break; + } + out = out.concat(Array.from(value)); + } catch (e) { + if (e instanceof TypeError) { + return { result: 'error' }; + } else { + return { result: e.name }; + } + } + } + const expectedOutput = 'expected output'; + if (out.length !== expectedOutput.length) { + return { result: 'corrupt' }; + } + for (let i = 0; i < out.length; ++i) { + if (out[i] !== expectedOutput.charCodeAt(i)) { + return { result: 'corrupt' }; + } + } + return { result: 'success' }; +} + +function corruptInput(input, offset, length, value) { + const output = new Uint8Array(input); + if (offset < 0) { + offset += input.length; + } + for (let i = offset; i < offset + length; ++i) { + output[i] = value; + } + return output; +} + +for (const { format, baseInput, fields } of expectations) { + promise_test(async () => { + const { result } = await tryDecompress(new Uint8Array(baseInput), format); + assert_equals(result, 'success', 'decompression should succeed'); + }, `the unchanged input for '${format}' should decompress successfully`); + + promise_test(async () => { + const truncatedInput = new Uint8Array(baseInput.slice(0, -1)); + const { result } = await tryDecompress(truncatedInput, format); + assert_equals(result, 'error', 'decompression should fail'); + }, `truncating the input for '${format}' should give an error`); + + promise_test(async () => { + const extendedInput = new Uint8Array(baseInput.concat([0])); + const { result } = await tryDecompress(extendedInput, format); + assert_equals(result, 'error', 'decompression should fail'); + }, `trailing junk for '${format}' should give an error`); + + for (const { name, offset, length, cases } of fields) { + for (const { value, result } of cases) { + promise_test(async () => { + const corruptedInput = corruptInput(baseInput, offset, length, value); + const { result: actual } = + await tryDecompress(corruptedInput, format); + assert_equals(actual, result, 'result should match'); + }, `format '${format}' field ${name} should be ${result} for ${value}`); + } + } +} + +promise_test(async () => { + // Data generated in Python: + // ```py + // h = b"thequickbrownfoxjumped\x00" + // words = h.split() + // zdict = b''.join(words) + // co = zlib.compressobj(zdict=zdict) + // cd = co.compress(h) + co.flush() + // ``` + const { result } = await tryDecompress(new Uint8Array([ + 0x78, 0xbb, 0x74, 0xee, 0x09, 0x59, 0x2b, 0xc1, 0x2e, 0x0c, 0x00, 0x74, 0xee, 0x09, 0x59 + ]), 'deflate'); + assert_equals(result, 'error', 'Data compressed with a dictionary should throw TypeError'); +}, 'the deflate input compressed with dictionary should give an error') diff --git a/test/fixtures/wpt/compression/decompression-empty-input.tentative.any.js b/test/fixtures/wpt/compression/decompression-empty-input.tentative.any.js new file mode 100644 index 00000000000000..201db8ec0b0d7c --- /dev/null +++ b/test/fixtures/wpt/compression/decompression-empty-input.tentative.any.js @@ -0,0 +1,43 @@ +// META: global=window,worker,shadowrealm + +'use strict'; + +const gzipEmptyValue = new Uint8Array([31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0]); +const deflateEmptyValue = new Uint8Array([120, 156, 3, 0, 0, 0, 0, 1]); +const deflateRawEmptyValue = new Uint8Array([1, 0, 0, 255, 255]); + +promise_test(async t => { + const ds = new DecompressionStream('gzip'); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + const writePromise = writer.write(gzipEmptyValue); + writer.close(); + const { value, done } = await reader.read(); + assert_true(done, "read() should set done"); + assert_equals(value, undefined, "value should be undefined"); + await writePromise; +}, 'decompressing gzip empty input should work'); + +promise_test(async t => { + const ds = new DecompressionStream('deflate'); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + const writePromise = writer.write(deflateEmptyValue); + writer.close(); + const { value, done } = await reader.read(); + assert_true(done, "read() should set done"); + assert_equals(value, undefined, "value should be undefined"); + await writePromise; +}, 'decompressing deflate empty input should work'); + +promise_test(async t => { + const ds = new DecompressionStream('deflate-raw'); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + const writePromise = writer.write(deflateRawEmptyValue); + writer.close(); + const { value, done } = await reader.read(); + assert_true(done, "read() should set done"); + assert_equals(value, undefined, "value should be undefined"); + await writePromise; +}, 'decompressing deflate-raw empty input should work'); diff --git a/test/fixtures/wpt/compression/decompression-split-chunk.tentative.any.js b/test/fixtures/wpt/compression/decompression-split-chunk.tentative.any.js new file mode 100644 index 00000000000000..eb12c2a2360cd9 --- /dev/null +++ b/test/fixtures/wpt/compression/decompression-split-chunk.tentative.any.js @@ -0,0 +1,53 @@ +// META: global=window,worker,shadowrealm + +'use strict'; + +const compressedBytesWithDeflate = new Uint8Array([120, 156, 75, 173, 40, 72, 77, 46, 73, 77, 81, 200, 47, 45, 41, 40, 45, 1, 0, 48, 173, 6, 36]); +const compressedBytesWithGzip = new Uint8Array([31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 75, 173, 40, 72, 77, 46, 73, 77, 81, 200, 47, 45, 41, 40, 45, 1, 0, 176, 1, 57, 179, 15, 0, 0, 0]); +const compressedBytesWithDeflateRaw = new Uint8Array([ + 0x4b, 0xad, 0x28, 0x48, 0x4d, 0x2e, 0x49, 0x4d, 0x51, 0xc8, + 0x2f, 0x2d, 0x29, 0x28, 0x2d, 0x01, 0x00, +]); +const expectedChunkValue = new TextEncoder().encode('expected output'); + +async function decompressArrayBuffer(input, format, chunkSize) { + const ds = new DecompressionStream(format); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + for (let beginning = 0; beginning < input.length; beginning += chunkSize) { + writer.write(input.slice(beginning, beginning + chunkSize)); + } + writer.close(); + const out = []; + let totalSize = 0; + while (true) { + const { value, done } = await reader.read(); + if (done) break; + out.push(value); + totalSize += value.byteLength; + } + const concatenated = new Uint8Array(totalSize); + let offset = 0; + for (const array of out) { + concatenated.set(array, offset); + offset += array.byteLength; + } + return concatenated; +} + +for (let chunkSize = 1; chunkSize < 16; ++chunkSize) { + promise_test(async t => { + const decompressedData = await decompressArrayBuffer(compressedBytesWithDeflate, 'deflate', chunkSize); + assert_array_equals(decompressedData, expectedChunkValue, "value should match"); + }, `decompressing splitted chunk into pieces of size ${chunkSize} should work in deflate`); + + promise_test(async t => { + const decompressedData = await decompressArrayBuffer(compressedBytesWithGzip, 'gzip', chunkSize); + assert_array_equals(decompressedData, expectedChunkValue, "value should match"); + }, `decompressing splitted chunk into pieces of size ${chunkSize} should work in gzip`); + + promise_test(async t => { + const decompressedData = await decompressArrayBuffer(compressedBytesWithDeflateRaw, 'deflate-raw', chunkSize); + assert_array_equals(decompressedData, expectedChunkValue, "value should match"); + }, `decompressing splitted chunk into pieces of size ${chunkSize} should work in deflate-raw`); +} diff --git a/test/fixtures/wpt/compression/decompression-uint8array-output.tentative.any.js b/test/fixtures/wpt/compression/decompression-uint8array-output.tentative.any.js new file mode 100644 index 00000000000000..0c45a0aaa727f1 --- /dev/null +++ b/test/fixtures/wpt/compression/decompression-uint8array-output.tentative.any.js @@ -0,0 +1,30 @@ +// META: global=window,worker,shadowrealm +// META: timeout=long +// +// This test isn't actually slow usually, but sometimes it takes >10 seconds on +// Firefox with service worker for no obvious reason. + +'use strict'; + +const deflateChunkValue = new Uint8Array([120, 156, 75, 173, 40, 72, 77, 46, 73, 77, 81, 200, 47, 45, 41, 40, 45, 1, 0, 48, 173, 6, 36]); +const gzipChunkValue = new Uint8Array([31, 139, 8, 0, 0, 0, 0, 0, 0, 3, 75, 173, 40, 72, 77, 46, 73, 77, 81, 200, 47, 45, 41, 40, 45, 1, 0, 176, 1, 57, 179, 15, 0, 0, 0]); + +promise_test(async t => { + const ds = new DecompressionStream('deflate'); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + const writePromise = writer.write(deflateChunkValue); + const { value } = await reader.read(); + assert_equals(value.constructor, Uint8Array, "type should match"); + await writePromise; +}, 'decompressing deflated output should give Uint8Array chunks'); + +promise_test(async t => { + const ds = new DecompressionStream('gzip'); + const reader = ds.readable.getReader(); + const writer = ds.writable.getWriter(); + const writePromise = writer.write(gzipChunkValue); + const { value } = await reader.read(); + assert_equals(value.constructor, Uint8Array, "type should match"); + await writePromise; +}, 'decompressing gzip output should give Uint8Array chunks'); diff --git a/test/fixtures/wpt/compression/decompression-with-detach.tentative.window.js b/test/fixtures/wpt/compression/decompression-with-detach.tentative.window.js new file mode 100644 index 00000000000000..1ff9c269837022 --- /dev/null +++ b/test/fixtures/wpt/compression/decompression-with-detach.tentative.window.js @@ -0,0 +1,41 @@ +// META: global=window,worker,shadowrealm +// META: script=resources/concatenate-stream.js + +'use strict'; + +const kInputLength = 1000000; + +async function createLargeCompressedInput() { + const cs = new CompressionStream('deflate'); + // The input has to be large enough that it won't fit in a single chunk when + // decompressed. + const writer = cs.writable.getWriter(); + writer.write(new Uint8Array(kInputLength)); + writer.close(); + return concatenateStream(cs.readable); +} + +promise_test(async () => { + const input = await createLargeCompressedInput(); + const ds = new DecompressionStream('deflate'); + const writer = ds.writable.getWriter(); + writer.write(input); + writer.close(); + // Object.prototype.then will be looked up synchronously when the promise + // returned by read() is resolved. + Object.defineProperty(Object.prototype, 'then', { + get() { + // Cause input to become detached and unreferenced. + try { + postMessage(undefined, 'nowhere', [input.buffer]); + } catch (e) { + // It's already detached. + } + } + }); + const output = await concatenateStream(ds.readable); + // If output successfully decompressed and gave the right length, we can be + // reasonably confident that no data corruption happened. + assert_equals( + output.byteLength, kInputLength, 'output should be the right length'); +}, 'data should be correctly decompressed even if input is detached partway'); diff --git a/test/fixtures/wpt/compression/idlharness-shadowrealm.window.js b/test/fixtures/wpt/compression/idlharness-shadowrealm.window.js new file mode 100644 index 00000000000000..2fdc807ee07e32 --- /dev/null +++ b/test/fixtures/wpt/compression/idlharness-shadowrealm.window.js @@ -0,0 +1,2 @@ +// META: script=/resources/idlharness-shadowrealm.js +idl_test_shadowrealm(["compression"], ["streams"]); diff --git a/test/fixtures/wpt/compression/idlharness.https.any.js b/test/fixtures/wpt/compression/idlharness.https.any.js new file mode 100644 index 00000000000000..8d96cf523c4953 --- /dev/null +++ b/test/fixtures/wpt/compression/idlharness.https.any.js @@ -0,0 +1,17 @@ +// META: script=/resources/WebIDLParser.js +// META: script=/resources/idlharness.js + +'use strict'; + +// https://wicg.github.io/compression/ + +idl_test( + ['compression'], + ['streams'], + idl_array => { + idl_array.add_objects({ + CompressionStream: ['new CompressionStream("deflate")'], + DecompressionStream: ['new DecompressionStream("deflate")'], + }); + } +); diff --git a/test/fixtures/wpt/compression/resources/concatenate-stream.js b/test/fixtures/wpt/compression/resources/concatenate-stream.js new file mode 100644 index 00000000000000..a35bb1416e7548 --- /dev/null +++ b/test/fixtures/wpt/compression/resources/concatenate-stream.js @@ -0,0 +1,25 @@ +'use strict'; + +// Read all the chunks from a stream that returns BufferSource objects and +// concatenate them into a single Uint8Array. +async function concatenateStream(readableStream) { + const reader = readableStream.getReader(); + let totalSize = 0; + const buffers = []; + while (true) { + const { value, done } = await reader.read(); + if (done) { + break; + } + buffers.push(value); + totalSize += value.byteLength; + } + reader.releaseLock(); + const concatenated = new Uint8Array(totalSize); + let offset = 0; + for (const buffer of buffers) { + concatenated.set(buffer, offset); + offset += buffer.byteLength; + } + return concatenated; +} diff --git a/deps/minimatch/src/node_modules/balanced-match/LICENSE.md b/test/fixtures/wpt/compression/third_party/pako/LICENSE similarity index 51% rename from deps/minimatch/src/node_modules/balanced-match/LICENSE.md rename to test/fixtures/wpt/compression/third_party/pako/LICENSE index 2cdc8e4148cc0a..a934ef8db47845 100644 --- a/deps/minimatch/src/node_modules/balanced-match/LICENSE.md +++ b/test/fixtures/wpt/compression/third_party/pako/LICENSE @@ -1,21 +1,21 @@ -(MIT) +(The MIT License) -Copyright (c) 2013 Julian Gruber <julian@juliangruber.com> +Copyright (C) 2014-2017 by Vitaly Puzrin and Andrei Tuputcyn -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. diff --git a/test/fixtures/wpt/compression/third_party/pako/README b/test/fixtures/wpt/compression/third_party/pako/README new file mode 100644 index 00000000000000..96028388ebb9d5 --- /dev/null +++ b/test/fixtures/wpt/compression/third_party/pako/README @@ -0,0 +1,2 @@ +original repository: +https://github.com/nodeca/pako diff --git a/test/fixtures/wpt/compression/third_party/pako/pako_inflate.min.js b/test/fixtures/wpt/compression/third_party/pako/pako_inflate.min.js new file mode 100644 index 00000000000000..a191a78a8956cd --- /dev/null +++ b/test/fixtures/wpt/compression/third_party/pako/pako_inflate.min.js @@ -0,0 +1 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pako=e()}}(function(){return function r(o,s,f){function l(t,e){if(!s[t]){if(!o[t]){var i="function"==typeof require&&require;if(!e&&i)return i(t,!0);if(d)return d(t,!0);var n=new Error("Cannot find module '"+t+"'");throw n.code="MODULE_NOT_FOUND",n}var a=s[t]={exports:{}};o[t][0].call(a.exports,function(e){return l(o[t][1][e]||e)},a,a.exports,r,o,s,f)}return s[t].exports}for(var d="function"==typeof require&&require,e=0;e>>6:(i<65536?t[r++]=224|i>>>12:(t[r++]=240|i>>>18,t[r++]=128|i>>>12&63),t[r++]=128|i>>>6&63),t[r++]=128|63&i);return t},i.buf2binstring=function(e){return d(e,e.length)},i.binstring2buf=function(e){for(var t=new f.Buf8(e.length),i=0,n=t.length;i>10&1023,s[n++]=56320|1023&a)}return d(s,n)},i.utf8border=function(e,t){var i;for((t=t||e.length)>e.length&&(t=e.length),i=t-1;0<=i&&128==(192&e[i]);)i--;return i<0?t:0===i?t:i+l[e[i]]>t?i:t}},{"./common":1}],3:[function(e,t,i){"use strict";t.exports=function(e,t,i,n){for(var a=65535&e|0,r=e>>>16&65535|0,o=0;0!==i;){for(i-=o=2e3>>1:e>>>1;t[i]=e}return t}();t.exports=function(e,t,i,n){var a=s,r=n+i;e^=-1;for(var o=n;o>>8^a[255&(e^t[o])];return-1^e}},{}],6:[function(e,t,i){"use strict";t.exports=function(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}},{}],7:[function(e,t,i){"use strict";t.exports=function(e,t){var i,n,a,r,o,s,f,l,d,c,u,h,b,m,w,k,_,g,v,p,x,y,S,E,Z;i=e.state,n=e.next_in,E=e.input,a=n+(e.avail_in-5),r=e.next_out,Z=e.output,o=r-(t-e.avail_out),s=r+(e.avail_out-257),f=i.dmax,l=i.wsize,d=i.whave,c=i.wnext,u=i.window,h=i.hold,b=i.bits,m=i.lencode,w=i.distcode,k=(1<>>=v=g>>>24,b-=v,0===(v=g>>>16&255))Z[r++]=65535&g;else{if(!(16&v)){if(0==(64&v)){g=m[(65535&g)+(h&(1<>>=v,b-=v),b<15&&(h+=E[n++]<>>=v=g>>>24,b-=v,!(16&(v=g>>>16&255))){if(0==(64&v)){g=w[(65535&g)+(h&(1<>>=v,b-=v,(v=r-o)>3,h&=(1<<(b-=p<<3))-1,e.next_in=n,e.next_out=r,e.avail_in=n>>24&255)+(e>>>8&65280)+((65280&e)<<8)+((255&e)<<24)}function r(){this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new z.Buf16(320),this.work=new z.Buf16(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}function o(e){var t;return e&&e.state?(t=e.state,e.total_in=e.total_out=t.total=0,e.msg="",t.wrap&&(e.adler=1&t.wrap),t.mode=F,t.last=0,t.havedict=0,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new z.Buf32(n),t.distcode=t.distdyn=new z.Buf32(a),t.sane=1,t.back=-1,T):U}function s(e){var t;return e&&e.state?((t=e.state).wsize=0,t.whave=0,t.wnext=0,o(e)):U}function f(e,t){var i,n;return e&&e.state?(n=e.state,t<0?(i=0,t=-t):(i=1+(t>>4),t<48&&(t&=15)),t&&(t<8||15=r.wsize?(z.arraySet(r.window,t,i-r.wsize,r.wsize,0),r.wnext=0,r.whave=r.wsize):(n<(a=r.wsize-r.wnext)&&(a=n),z.arraySet(r.window,t,i-n,a,r.wnext),(n-=a)?(z.arraySet(r.window,t,i-n,n,0),r.wnext=n,r.whave=r.wsize):(r.wnext+=a,r.wnext===r.wsize&&(r.wnext=0),r.whave>>8&255,i.check=N(i.check,B,2,0),d=l=0,i.mode=2;break}if(i.flags=0,i.head&&(i.head.done=!1),!(1&i.wrap)||(((255&l)<<8)+(l>>8))%31){e.msg="incorrect header check",i.mode=30;break}if(8!=(15&l)){e.msg="unknown compression method",i.mode=30;break}if(d-=4,x=8+(15&(l>>>=4)),0===i.wbits)i.wbits=x;else if(x>i.wbits){e.msg="invalid window size",i.mode=30;break}i.dmax=1<>8&1),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=3;case 3:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<>>8&255,B[2]=l>>>16&255,B[3]=l>>>24&255,i.check=N(i.check,B,4,0)),d=l=0,i.mode=4;case 4:for(;d<16;){if(0===s)break e;s--,l+=n[r++]<>8),512&i.flags&&(B[0]=255&l,B[1]=l>>>8&255,i.check=N(i.check,B,2,0)),d=l=0,i.mode=5;case 5:if(1024&i.flags){for(;d<16;){if(0===s)break e;s--,l+=n[r++]<>>8&255,i.check=N(i.check,B,2,0)),d=l=0}else i.head&&(i.head.extra=null);i.mode=6;case 6:if(1024&i.flags&&(s<(h=i.length)&&(h=s),h&&(i.head&&(x=i.head.extra_len-i.length,i.head.extra||(i.head.extra=new Array(i.head.extra_len)),z.arraySet(i.head.extra,n,r,h,x)),512&i.flags&&(i.check=N(i.check,n,h,r)),s-=h,r+=h,i.length-=h),i.length))break e;i.length=0,i.mode=7;case 7:if(2048&i.flags){if(0===s)break e;for(h=0;x=n[r+h++],i.head&&x&&i.length<65536&&(i.head.name+=String.fromCharCode(x)),x&&h>9&1,i.head.done=!0),e.adler=i.check=0,i.mode=12;break;case 10:for(;d<32;){if(0===s)break e;s--,l+=n[r++]<>>=7&d,d-=7&d,i.mode=27;break}for(;d<3;){if(0===s)break e;s--,l+=n[r++]<>>=1)){case 0:i.mode=14;break;case 1:if(H(i),i.mode=20,6!==t)break;l>>>=2,d-=2;break e;case 2:i.mode=17;break;case 3:e.msg="invalid block type",i.mode=30}l>>>=2,d-=2;break;case 14:for(l>>>=7&d,d-=7&d;d<32;){if(0===s)break e;s--,l+=n[r++]<>>16^65535)){e.msg="invalid stored block lengths",i.mode=30;break}if(i.length=65535&l,d=l=0,i.mode=15,6===t)break e;case 15:i.mode=16;case 16:if(h=i.length){if(s>>=5,d-=5,i.ndist=1+(31&l),l>>>=5,d-=5,i.ncode=4+(15&l),l>>>=4,d-=4,286>>=3,d-=3}for(;i.have<19;)i.lens[A[i.have++]]=0;if(i.lencode=i.lendyn,i.lenbits=7,S={bits:i.lenbits},y=C(0,i.lens,0,19,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg="invalid code lengths set",i.mode=30;break}i.have=0,i.mode=19;case 19:for(;i.have>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=w,d-=w,i.lens[i.have++]=_;else{if(16===_){for(E=w+2;d>>=w,d-=w,0===i.have){e.msg="invalid bit length repeat",i.mode=30;break}x=i.lens[i.have-1],h=3+(3&l),l>>>=2,d-=2}else if(17===_){for(E=w+3;d>>=w)),l>>>=3,d-=3}else{for(E=w+7;d>>=w)),l>>>=7,d-=7}if(i.have+h>i.nlen+i.ndist){e.msg="invalid bit length repeat",i.mode=30;break}for(;h--;)i.lens[i.have++]=x}}if(30===i.mode)break;if(0===i.lens[256]){e.msg="invalid code -- missing end-of-block",i.mode=30;break}if(i.lenbits=9,S={bits:i.lenbits},y=C(I,i.lens,0,i.nlen,i.lencode,0,i.work,S),i.lenbits=S.bits,y){e.msg="invalid literal/lengths set",i.mode=30;break}if(i.distbits=6,i.distcode=i.distdyn,S={bits:i.distbits},y=C(D,i.lens,i.nlen,i.ndist,i.distcode,0,i.work,S),i.distbits=S.bits,y){e.msg="invalid distances set",i.mode=30;break}if(i.mode=20,6===t)break e;case 20:i.mode=21;case 21:if(6<=s&&258<=f){e.next_out=o,e.avail_out=f,e.next_in=r,e.avail_in=s,i.hold=l,i.bits=d,O(e,u),o=e.next_out,a=e.output,f=e.avail_out,r=e.next_in,n=e.input,s=e.avail_in,l=i.hold,d=i.bits,12===i.mode&&(i.back=-1);break}for(i.back=0;k=(Z=i.lencode[l&(1<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,i.length=_,0===k){i.mode=26;break}if(32&k){i.back=-1,i.mode=12;break}if(64&k){e.msg="invalid literal/length code",i.mode=30;break}i.extra=15&k,i.mode=22;case 22:if(i.extra){for(E=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}i.was=i.length,i.mode=23;case 23:for(;k=(Z=i.distcode[l&(1<>>16&255,_=65535&Z,!((w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>g)])>>>16&255,_=65535&Z,!(g+(w=Z>>>24)<=d);){if(0===s)break e;s--,l+=n[r++]<>>=g,d-=g,i.back+=g}if(l>>>=w,d-=w,i.back+=w,64&k){e.msg="invalid distance code",i.mode=30;break}i.offset=_,i.extra=15&k,i.mode=24;case 24:if(i.extra){for(E=i.extra;d>>=i.extra,d-=i.extra,i.back+=i.extra}if(i.offset>i.dmax){e.msg="invalid distance too far back",i.mode=30;break}i.mode=25;case 25:if(0===f)break e;if(h=u-f,i.offset>h){if((h=i.offset-h)>i.whave&&i.sane){e.msg="invalid distance too far back",i.mode=30;break}h>i.wnext?(h-=i.wnext,b=i.wsize-h):b=i.wnext-h,h>i.length&&(h=i.length),m=i.window}else m=a,b=o-i.offset,h=i.length;for(fh?(m=O[C+o[g]],w=A[z+o[g]]):(m=96,w=0),f=1<<_-S,v=l=1<>S)+(l-=f)]=b<<24|m<<16|w|0,0!==l;);for(f=1<<_-1;B&f;)f>>=1;if(0!==f?(B&=f-1,B+=f):B=0,g++,0==--R[_]){if(_===p)break;_=t[i+o[g]]}if(x<_&&(B&c)!==d){for(0===S&&(S=x),u+=v,E=1<<(y=_-S);y+S signals); readonly attribute boolean aborted; readonly attribute any reason; @@ -618,7 +619,7 @@ callback interface XPathNSResolver { interface mixin XPathEvaluatorBase { [NewObject] XPathExpression createExpression(DOMString expression, optional XPathNSResolver? resolver = null); - XPathNSResolver createNSResolver(Node nodeResolver); + Node createNSResolver(Node nodeResolver); // legacy // XPathResult.ANY_TYPE = 0 XPathResult evaluate(DOMString expression, Node contextNode, optional XPathNSResolver? resolver = null, optional unsigned short type = 0, optional XPathResult? result = null); }; diff --git a/test/fixtures/wpt/interfaces/encoding.idl b/test/fixtures/wpt/interfaces/encoding.idl index a8cbe4431a2dc7..a9499f62378dd9 100644 --- a/test/fixtures/wpt/interfaces/encoding.idl +++ b/test/fixtures/wpt/interfaces/encoding.idl @@ -22,7 +22,7 @@ dictionary TextDecodeOptions { interface TextDecoder { constructor(optional DOMString label = "utf-8", optional TextDecoderOptions options = {}); - USVString decode(optional [AllowShared] BufferSource input, optional TextDecodeOptions options = {}); + USVString decode(optional AllowSharedBufferSource input, optional TextDecodeOptions options = {}); }; TextDecoder includes TextDecoderCommon; diff --git a/test/fixtures/wpt/interfaces/hr-time.idl b/test/fixtures/wpt/interfaces/hr-time.idl index 13aa109b6c764c..835ee8a65c84c0 100644 --- a/test/fixtures/wpt/interfaces/hr-time.idl +++ b/test/fixtures/wpt/interfaces/hr-time.idl @@ -7,7 +7,7 @@ typedef double DOMHighResTimeStamp; typedef unsigned long long EpochTimeStamp; -[Exposed=*] +[Exposed=(Window,Worker)] interface Performance : EventTarget { DOMHighResTimeStamp now(); readonly attribute DOMHighResTimeStamp timeOrigin; diff --git a/test/fixtures/wpt/interfaces/html.idl b/test/fixtures/wpt/interfaces/html.idl index d9068b4ad1e550..c7f744ccbe601b 100644 --- a/test/fixtures/wpt/interfaces/html.idl +++ b/test/fixtures/wpt/interfaces/html.idl @@ -98,7 +98,6 @@ partial interface Document { // also has obsolete members }; Document includes GlobalEventHandlers; -Document includes DocumentAndElementEventHandlers; partial interface mixin DocumentOrShadowRoot { readonly attribute Element? activeElement; @@ -128,10 +127,15 @@ interface HTMLElement : Element { [CEReactions] attribute [LegacyNullToEmptyString] DOMString outerText; ElementInternals attachInternals(); + + // The popover API + undefined showPopover(); + undefined hidePopover(); + boolean togglePopover(optional boolean force); + [CEReactions] attribute DOMString? popover; }; HTMLElement includes GlobalEventHandlers; -HTMLElement includes DocumentAndElementEventHandlers; HTMLElement includes ElementContentEditable; HTMLElement includes HTMLOrSVGElement; @@ -204,6 +208,7 @@ interface HTMLLinkElement : HTMLElement { [CEReactions] attribute DOMString referrerPolicy; [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking; [CEReactions] attribute boolean disabled; + [CEReactions] attribute DOMString fetchPriority; // also has obsolete members }; @@ -432,6 +437,7 @@ interface HTMLImageElement : HTMLElement { [CEReactions] attribute DOMString referrerPolicy; [CEReactions] attribute DOMString decoding; [CEReactions] attribute DOMString loading; + [CEReactions] attribute DOMString fetchPriority; Promise decode(); @@ -886,7 +892,7 @@ interface HTMLInputElement : HTMLElement { [CEReactions] attribute DOMString formTarget; [CEReactions] attribute unsigned long height; attribute boolean indeterminate; - readonly attribute HTMLElement? list; + readonly attribute HTMLDataListElement? list; [CEReactions] attribute DOMString max; [CEReactions] attribute long maxLength; [CEReactions] attribute DOMString min; @@ -931,6 +937,7 @@ interface HTMLInputElement : HTMLElement { // also has obsolete members }; +HTMLInputElement includes PopoverInvokerElement; [Exposed=Window] interface HTMLButtonElement : HTMLElement { @@ -956,6 +963,7 @@ interface HTMLButtonElement : HTMLElement { readonly attribute NodeList labels; }; +HTMLButtonElement includes PopoverInvokerElement; [Exposed=Window] interface HTMLSelectElement : HTMLElement { @@ -1216,6 +1224,7 @@ interface HTMLScriptElement : HTMLElement { [CEReactions] attribute DOMString integrity; [CEReactions] attribute DOMString referrerPolicy; [SameObject, PutForwards=value] readonly attribute DOMTokenList blocking; + [CEReactions] attribute DOMString fetchPriority; static boolean supports(DOMString type); @@ -1364,14 +1373,7 @@ interface mixin CanvasShadowStyles { interface mixin CanvasFilters { // filters - attribute (DOMString or CanvasFilter) filter; // (default "none") -}; - -typedef record CanvasFilterInput; - -[Exposed=(Window,Worker,PaintWorklet)] -interface CanvasFilter { - constructor(optional (CanvasFilterInput or sequence) filters); + attribute DOMString filter; // (default "none") }; interface mixin CanvasRect { @@ -1592,6 +1594,7 @@ OffscreenCanvasRenderingContext2D includes CanvasPath; interface CustomElementRegistry { [CEReactions] undefined define(DOMString name, CustomElementConstructor constructor, optional ElementDefinitionOptions options = {}); (CustomElementConstructor or undefined) get(DOMString name); + DOMString? getName(CustomElementConstructor constructor); Promise whenDefined(DOMString name); [CEReactions] undefined upgrade(Node root); }; @@ -1641,8 +1644,39 @@ dictionary ValidityStateFlags { boolean customError = false; }; +[Exposed=(Window)] +interface VisibilityStateEntry : PerformanceEntry { + readonly attribute DOMString name; // shadows inherited name + readonly attribute DOMString entryType; // shadows inherited entryType + readonly attribute DOMHighResTimeStamp startTime; // shadows inherited startTime + readonly attribute unsigned long duration; // shadows inherited duration +}; + +[Exposed=Window] +interface UserActivation { + readonly attribute boolean hasBeenActive; + readonly attribute boolean isActive; +}; + +partial interface Navigator { + [SameObject] readonly attribute UserActivation userActivation; +}; + +[Exposed=Window] +interface ToggleEvent : Event { + constructor(DOMString type, optional ToggleEventInit eventInitDict = {}); + readonly attribute DOMString oldState; + readonly attribute DOMString newState; +}; + +dictionary ToggleEventInit : EventInit { + DOMString oldState = ""; + DOMString newState = ""; +}; + dictionary FocusOptions { boolean preventScroll = false; + boolean focusVisible; }; interface mixin ElementContentEditable { @@ -1702,6 +1736,11 @@ dictionary DragEventInit : MouseEventInit { DataTransfer? dataTransfer = null; }; +interface mixin PopoverInvokerElement { + [CEReactions] attribute Element? popoverTargetElement; + [CEReactions] attribute DOMString popoverTargetAction; +}; + [Global=Window, Exposed=Window, LegacyUnenumerableNamedProperties] @@ -1713,6 +1752,7 @@ interface Window : EventTarget { attribute DOMString name; [PutForwards=href, LegacyUnforgeable] readonly attribute Location location; readonly attribute History history; + readonly attribute Navigation navigation; readonly attribute CustomElementRegistry customElements; [Replaceable] readonly attribute BarProp locationbar; [Replaceable] readonly attribute BarProp menubar; @@ -1735,14 +1775,15 @@ interface Window : EventTarget { [Replaceable] readonly attribute WindowProxy? parent; readonly attribute Element? frameElement; WindowProxy? open(optional USVString url = "", optional DOMString target = "_blank", optional [LegacyNullToEmptyString] DOMString features = ""); - getter object (DOMString name); + // Since this is the global object, the IDL named getter adds a NamedPropertiesObject exotic // object on the prototype chain. Indeed, this does not make the global object an exotic object. // Indexed access is taken care of by the WindowProxy exotic object. + getter object (DOMString name); // the user agent readonly attribute Navigator navigator; - readonly attribute Navigator clientInformation; // legacy alias of .navigator + [Replaceable] readonly attribute Navigator clientInformation; // legacy alias of .navigator readonly attribute boolean originAgentCluster; // user prompts @@ -1769,20 +1810,6 @@ interface BarProp { readonly attribute boolean visible; }; -enum ScrollRestoration { "auto", "manual" }; - -[Exposed=Window] -interface History { - readonly attribute unsigned long length; - attribute ScrollRestoration scrollRestoration; - readonly attribute any state; - undefined go(optional long delta = 0); - undefined back(); - undefined forward(); - undefined pushState(any data, DOMString unused, optional USVString? url = null); - undefined replaceState(any data, DOMString unused, optional USVString? url = null); -}; - [Exposed=Window] interface Location { // but see also additional creation steps and overridden internal methods [LegacyUnforgeable] stringifier attribute USVString href; @@ -1802,15 +1829,183 @@ interface Location { // but see also additional creation steps and overridden in [LegacyUnforgeable, SameObject] readonly attribute DOMStringList ancestorOrigins; }; +enum ScrollRestoration { "auto", "manual" }; + +[Exposed=Window] +interface History { + readonly attribute unsigned long length; + attribute ScrollRestoration scrollRestoration; + readonly attribute any state; + undefined go(optional long delta = 0); + undefined back(); + undefined forward(); + undefined pushState(any data, DOMString unused, optional USVString? url = null); + undefined replaceState(any data, DOMString unused, optional USVString? url = null); +}; + +[Exposed=Window] +interface Navigation : EventTarget { + sequence entries(); + readonly attribute NavigationHistoryEntry? currentEntry; + undefined updateCurrentEntry(NavigationUpdateCurrentEntryOptions options); + readonly attribute NavigationTransition? transition; + + readonly attribute boolean canGoBack; + readonly attribute boolean canGoForward; + + NavigationResult navigate(USVString url, optional NavigationNavigateOptions options = {}); + NavigationResult reload(optional NavigationReloadOptions options = {}); + + NavigationResult traverseTo(DOMString key, optional NavigationOptions options = {}); + NavigationResult back(optional NavigationOptions options = {}); + NavigationResult forward(optional NavigationOptions options = {}); + + attribute EventHandler onnavigate; + attribute EventHandler onnavigatesuccess; + attribute EventHandler onnavigateerror; + attribute EventHandler oncurrententrychange; +}; + +dictionary NavigationUpdateCurrentEntryOptions { + required any state; +}; + +dictionary NavigationOptions { + any info; +}; + +dictionary NavigationNavigateOptions : NavigationOptions { + any state; + NavigationHistoryBehavior history = "auto"; +}; + +dictionary NavigationReloadOptions : NavigationOptions { + any state; +}; + +dictionary NavigationResult { + Promise committed; + Promise finished; +}; + +enum NavigationHistoryBehavior { + "auto", + "push", + "replace" +}; + +enum NavigationType { + "push", + "replace", + "reload", + "traverse" +}; + +[Exposed=Window] +interface NavigationHistoryEntry : EventTarget { + readonly attribute USVString? url; + readonly attribute DOMString key; + readonly attribute DOMString id; + readonly attribute long long index; + readonly attribute boolean sameDocument; + + any getState(); + + attribute EventHandler ondispose; +}; + +[Exposed=Window] +interface NavigationTransition { + readonly attribute NavigationType navigationType; + readonly attribute NavigationHistoryEntry from; + readonly attribute Promise finished; +}; + +[Exposed=Window] +interface NavigateEvent : Event { + constructor(DOMString type, NavigateEventInit eventInitDict); + + readonly attribute NavigationType navigationType; + readonly attribute NavigationDestination destination; + readonly attribute boolean canIntercept; + readonly attribute boolean userInitiated; + readonly attribute boolean hashChange; + readonly attribute AbortSignal signal; + readonly attribute FormData? formData; + readonly attribute DOMString? downloadRequest; + readonly attribute any info; + readonly attribute boolean hasUAVisualTransition; + + undefined intercept(optional NavigationInterceptOptions options = {}); + undefined scroll(); +}; + +dictionary NavigateEventInit : EventInit { + NavigationType navigationType = "push"; + required NavigationDestination destination; + boolean canIntercept = false; + boolean userInitiated = false; + boolean hashChange = false; + required AbortSignal signal; + FormData? formData = null; + DOMString? downloadRequest = null; + any info; + boolean hasUAVisualTransition = false; +}; + +dictionary NavigationInterceptOptions { + NavigationInterceptHandler handler; + NavigationFocusReset focusReset; + NavigationScrollBehavior scroll; +}; + +enum NavigationFocusReset { + "after-transition", + "manual" +}; + +enum NavigationScrollBehavior { + "after-transition", + "manual" +}; + +callback NavigationInterceptHandler = Promise (); + +[Exposed=Window] +interface NavigationDestination { + readonly attribute USVString url; + readonly attribute DOMString key; + readonly attribute DOMString id; + readonly attribute long long index; + readonly attribute boolean sameDocument; + + any getState(); +}; + +[Exposed=Window] +interface NavigationCurrentEntryChangeEvent : Event { + constructor(DOMString type, NavigationCurrentEntryChangeEventInit eventInitDict); + + readonly attribute NavigationType? navigationType; + readonly attribute NavigationHistoryEntry from; +}; + +dictionary NavigationCurrentEntryChangeEventInit : EventInit { + NavigationType? navigationType = null; + required NavigationHistoryEntry from; +}; + [Exposed=Window] interface PopStateEvent : Event { constructor(DOMString type, optional PopStateEventInit eventInitDict = {}); readonly attribute any state; + readonly attribute boolean hasUAVisualTransition; }; dictionary PopStateEventInit : EventInit { any state = null; + boolean hasUAVisualTransition = false; }; [Exposed=Window] @@ -1891,6 +2086,7 @@ interface mixin GlobalEventHandlers { attribute EventHandler onauxclick; attribute EventHandler onbeforeinput; attribute EventHandler onbeforematch; + attribute EventHandler onbeforetoggle; attribute EventHandler onblur; attribute EventHandler oncancel; attribute EventHandler oncanplay; @@ -1901,7 +2097,9 @@ interface mixin GlobalEventHandlers { attribute EventHandler oncontextlost; attribute EventHandler oncontextmenu; attribute EventHandler oncontextrestored; + attribute EventHandler oncopy; attribute EventHandler oncuechange; + attribute EventHandler oncut; attribute EventHandler ondblclick; attribute EventHandler ondrag; attribute EventHandler ondragend; @@ -1932,6 +2130,7 @@ interface mixin GlobalEventHandlers { attribute EventHandler onmouseout; attribute EventHandler onmouseover; attribute EventHandler onmouseup; + attribute EventHandler onpaste; attribute EventHandler onpause; attribute EventHandler onplay; attribute EventHandler onplaying; @@ -1940,6 +2139,7 @@ interface mixin GlobalEventHandlers { attribute EventHandler onreset; attribute EventHandler onresize; attribute EventHandler onscroll; + attribute EventHandler onscrollend; attribute EventHandler onsecuritypolicyviolation; attribute EventHandler onseeked; attribute EventHandler onseeking; @@ -1978,12 +2178,6 @@ interface mixin WindowEventHandlers { attribute EventHandler onunload; }; -interface mixin DocumentAndElementEventHandlers { - attribute EventHandler oncopy; - attribute EventHandler oncut; - attribute EventHandler onpaste; -}; - typedef (DOMString or Function) TimerHandler; interface mixin WindowOrWorkerGlobalScope { @@ -2132,13 +2326,13 @@ typedef (CanvasImageSource or Blob or ImageData) ImageBitmapSource; -enum ImageOrientation { "none", "flipY" }; +enum ImageOrientation { "from-image", "flipY" }; enum PremultiplyAlpha { "none", "premultiply", "default" }; enum ColorSpaceConversion { "none", "default" }; enum ResizeQuality { "pixelated", "low", "medium", "high" }; dictionary ImageBitmapOptions { - ImageOrientation imageOrientation = "none"; + ImageOrientation imageOrientation = "from-image"; PremultiplyAlpha premultiplyAlpha = "default"; ColorSpaceConversion colorSpaceConversion = "default"; [EnforceRange] unsigned long resizeWidth; diff --git a/test/fixtures/wpt/interfaces/performance-timeline.idl b/test/fixtures/wpt/interfaces/performance-timeline.idl index 9f6cc5e2e902dc..cdd8fafd8c64e6 100644 --- a/test/fixtures/wpt/interfaces/performance-timeline.idl +++ b/test/fixtures/wpt/interfaces/performance-timeline.idl @@ -1,7 +1,7 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Performance Timeline Level 2 (https://w3c.github.io/performance-timeline/) +// Source: Performance Timeline (https://w3c.github.io/performance-timeline/) partial interface Performance { PerformanceEntryList getEntries (); @@ -10,7 +10,7 @@ partial interface Performance { }; typedef sequence PerformanceEntryList; -[Exposed=*] +[Exposed=(Window,Worker)] interface PerformanceEntry { readonly attribute DOMString name; readonly attribute DOMString entryType; @@ -22,7 +22,7 @@ interface PerformanceEntry { callback PerformanceObserverCallback = undefined (PerformanceObserverEntryList entries, PerformanceObserver observer, optional PerformanceObserverCallbackOptions options = {}); -[Exposed=*] +[Exposed=(Window,Worker)] interface PerformanceObserver { constructor(PerformanceObserverCallback callback); undefined observe (optional PerformanceObserverInit options = {}); @@ -41,7 +41,7 @@ dictionary PerformanceObserverInit { boolean buffered; }; -[Exposed=*] +[Exposed=(Window,Worker)] interface PerformanceObserverEntryList { PerformanceEntryList getEntries(); PerformanceEntryList getEntriesByType (DOMString type); diff --git a/test/fixtures/wpt/interfaces/resource-timing.idl b/test/fixtures/wpt/interfaces/resource-timing.idl index 235963b804bf9a..33fed05b756838 100644 --- a/test/fixtures/wpt/interfaces/resource-timing.idl +++ b/test/fixtures/wpt/interfaces/resource-timing.idl @@ -1,11 +1,12 @@ // GENERATED CONTENT - DO NOT EDIT // Content was automatically extracted by Reffy into webref // (https://github.com/w3c/webref) -// Source: Resource Timing Level 2 (https://w3c.github.io/resource-timing/) +// Source: Resource Timing (https://w3c.github.io/resource-timing/) [Exposed=(Window,Worker)] interface PerformanceResourceTiming : PerformanceEntry { readonly attribute DOMString initiatorType; + readonly attribute DOMString deliveryType; readonly attribute ByteString nextHopProtocol; readonly attribute DOMHighResTimeStamp workerStart; readonly attribute DOMHighResTimeStamp redirectStart; @@ -17,14 +18,23 @@ interface PerformanceResourceTiming : PerformanceEntry { readonly attribute DOMHighResTimeStamp connectEnd; readonly attribute DOMHighResTimeStamp secureConnectionStart; readonly attribute DOMHighResTimeStamp requestStart; + readonly attribute DOMHighResTimeStamp firstInterimResponseStart; readonly attribute DOMHighResTimeStamp responseStart; readonly attribute DOMHighResTimeStamp responseEnd; readonly attribute unsigned long long transferSize; readonly attribute unsigned long long encodedBodySize; readonly attribute unsigned long long decodedBodySize; + readonly attribute unsigned short responseStatus; + readonly attribute RenderBlockingStatusType renderBlockingStatus; + readonly attribute DOMString contentType; [Default] object toJSON(); }; +enum RenderBlockingStatusType { + "blocking", + "non-blocking" +}; + partial interface Performance { undefined clearResourceTimings (); undefined setResourceTimingBufferSize (unsigned long maxSize); diff --git a/test/fixtures/wpt/interfaces/streams.idl b/test/fixtures/wpt/interfaces/streams.idl index fd5420f16a0967..838bf39c6d6df5 100644 --- a/test/fixtures/wpt/interfaces/streams.idl +++ b/test/fixtures/wpt/interfaces/streams.idl @@ -7,6 +7,8 @@ interface ReadableStream { constructor(optional object underlyingSource, optional QueuingStrategy strategy = {}); + static ReadableStream from(any asyncIterable); + readonly attribute boolean locked; Promise cancel(optional any reason); diff --git a/test/fixtures/wpt/interfaces/url.idl b/test/fixtures/wpt/interfaces/url.idl index 360c9adcfa1104..a5e4d1eb492e82 100644 --- a/test/fixtures/wpt/interfaces/url.idl +++ b/test/fixtures/wpt/interfaces/url.idl @@ -8,6 +8,8 @@ interface URL { constructor(USVString url, optional USVString base); + static boolean canParse(USVString url, optional USVString base); + stringifier attribute USVString href; readonly attribute USVString origin; attribute USVString protocol; @@ -28,11 +30,13 @@ interface URL { interface URLSearchParams { constructor(optional (sequence> or record or USVString) init = ""); + readonly attribute unsigned long size; + undefined append(USVString name, USVString value); - undefined delete(USVString name); + undefined delete(USVString name, optional USVString value); USVString? get(USVString name); sequence getAll(USVString name); - boolean has(USVString name); + boolean has(USVString name, optional USVString value); undefined set(USVString name, USVString value); undefined sort(); diff --git a/test/fixtures/wpt/interfaces/user-timing.idl b/test/fixtures/wpt/interfaces/user-timing.idl index a0b8f94710ec33..28ee8aac2b19a6 100644 --- a/test/fixtures/wpt/interfaces/user-timing.idl +++ b/test/fixtures/wpt/interfaces/user-timing.idl @@ -22,13 +22,13 @@ partial interface Performance { undefined clearMeasures(optional DOMString measureName); }; -[Exposed=*] +[Exposed=(Window,Worker)] interface PerformanceMark : PerformanceEntry { constructor(DOMString markName, optional PerformanceMarkOptions markOptions = {}); readonly attribute any detail; }; -[Exposed=*] +[Exposed=(Window,Worker)] interface PerformanceMeasure : PerformanceEntry { readonly attribute any detail; }; diff --git a/test/fixtures/wpt/interfaces/webidl.idl b/test/fixtures/wpt/interfaces/webidl.idl index 43748c5ac4c889..4d0dfaa106275f 100644 --- a/test/fixtures/wpt/interfaces/webidl.idl +++ b/test/fixtures/wpt/interfaces/webidl.idl @@ -9,7 +9,8 @@ typedef (Int8Array or Int16Array or Int32Array or Float32Array or Float64Array or DataView) ArrayBufferView; typedef (ArrayBufferView or ArrayBuffer) BufferSource; -[Exposed=(Window,Worker), +typedef (ArrayBuffer or SharedArrayBuffer or [AllowShared] ArrayBufferView) AllowSharedBufferSource; +[Exposed=*, Serializable] interface DOMException { // but see below note about ECMAScript binding constructor(optional DOMString message = "", optional DOMString name = "Error"); @@ -46,5 +47,3 @@ interface DOMException { // but see below note about ECMAScript binding callback Function = any (any... arguments); callback VoidFunction = undefined (); - -typedef unsigned long long DOMTimeStamp; diff --git a/test/fixtures/wpt/media/foo.vtt b/test/fixtures/wpt/media/foo.vtt new file mode 100644 index 00000000000000..b533895c604ed7 --- /dev/null +++ b/test/fixtures/wpt/media/foo.vtt @@ -0,0 +1,4 @@ +WEBVTT + +00:00:00.000 --> 00:00:05.000 +Foo diff --git a/test/fixtures/wpt/media/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm b/test/fixtures/wpt/media/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm new file mode 100644 index 00000000000000..8b705dbc898070 Binary files /dev/null and b/test/fixtures/wpt/media/test-av-384k-44100Hz-1ch-320x240-30fps-10kfr.webm differ diff --git a/test/fixtures/wpt/resources/declarative-shadow-dom-polyfill.js b/test/fixtures/wpt/resources/declarative-shadow-dom-polyfill.js index 8ab08b0294c297..99a3e911eb6336 100644 --- a/test/fixtures/wpt/resources/declarative-shadow-dom-polyfill.js +++ b/test/fixtures/wpt/resources/declarative-shadow-dom-polyfill.js @@ -16,7 +16,8 @@ function polyfill_declarative_shadow_dom(root) { return; root.querySelectorAll("template[shadowrootmode]").forEach(template => { const mode = template.getAttribute("shadowrootmode"); - const shadowRoot = template.parentNode.attachShadow({ mode }); + const delegatesFocus = template.hasAttribute("shadowrootdelegatesfocus"); + const shadowRoot = template.parentNode.attachShadow({ mode, delegatesFocus }); shadowRoot.appendChild(template.content); template.remove(); polyfill_declarative_shadow_dom(shadowRoot); diff --git a/test/fixtures/wpt/resources/idlharness.js b/test/fixtures/wpt/resources/idlharness.js index 46aa11e5ca123c..8f741b09b26bcb 100644 --- a/test/fixtures/wpt/resources/idlharness.js +++ b/test/fixtures/wpt/resources/idlharness.js @@ -2357,12 +2357,13 @@ IdlInterface.prototype.do_member_operation_asserts = function(memberHolderObject assert_equals(typeof memberHolderObject[member.name], "function", "property must be a function"); - const ctors = this.members.filter(function(m) { - return m.type == "operation" && m.name == member.name; + const operationOverloads = this.members.filter(function(m) { + return m.type == "operation" && m.name == member.name && + (m.special === "static") === (member.special === "static"); }); assert_equals( memberHolderObject[member.name].length, - minOverloadLength(ctors), + minOverloadLength(operationOverloads), "property has wrong .length"); assert_equals( memberHolderObject[member.name].name, diff --git a/test/fixtures/wpt/resources/testdriver.js b/test/fixtures/wpt/resources/testdriver.js index 76ae2834fdfb0a..ddf723cb3ee8a5 100644 --- a/test/fixtures/wpt/resources/testdriver.js +++ b/test/fixtures/wpt/resources/testdriver.js @@ -220,6 +220,40 @@ return cookie; }, + /** + * Get Computed Label for an element. + * + * This matches the behaviour of the + * `Get Computed Label + * `_ + * WebDriver command. + * + * @param {Element} element + * @returns {Promise} fulfilled after the computed label is returned, or + * rejected in the cases the WebDriver command errors + */ + get_computed_label: async function(element) { + let label = await window.test_driver_internal.get_computed_label(element); + return label; + }, + + /** + * Get Computed Role for an element. + * + * This matches the behaviour of the + * `Get Computed Label + * `_ + * WebDriver command. + * + * @param {Element} element + * @returns {Promise} fulfilled after the computed role is returned, or + * rejected in the cases the WebDriver command errors + */ + get_computed_role: async function(element) { + let role = await window.test_driver_internal.get_computed_role(element); + return role; + }, + /** * Send keys to an element. * @@ -228,7 +262,9 @@ * occurs. * * If ``element`` is from a different browsing context, the - * command will be run in that context. + * command will be run in that context. The test must not depend + * on the ``window.name`` property being unset on the target + * window. * * To send special keys, send the respective key's codepoint, * as defined by `WebDriver @@ -262,12 +298,6 @@ inline: "nearest"}); } - var pointerInteractablePaintTree = getPointerInteractablePaintTree(element); - if (pointerInteractablePaintTree.length === 0 || - !element.contains(pointerInteractablePaintTree[0])) { - return Promise.reject(new Error("element send_keys intercepted error")); - } - return window.test_driver_internal.send_keys(element, keys); }, @@ -300,9 +330,9 @@ * to run the call, or null for the current * browsing context. * - * @returns {Promise} fulfilled with the previous {@link - * https://www.w3.org/TR/webdriver/#dfn-windowrect-object|WindowRect} - * value, after the window is minimized. + * @returns {Promise} fulfilled with the previous `WindowRect + * `_ + * value, after the window is minimized. */ minimize_window: function(context=null) { return window.test_driver_internal.minimize_window(context); @@ -315,8 +345,8 @@ * `_ * WebDriver command * - * @param {Object} rect - A {@link - * https://www.w3.org/TR/webdriver/#dfn-windowrect-object|WindowRect} + * @param {Object} rect - A `WindowRect + * `_ * @param {WindowProxy} context - Browsing context in which * to run the call, or null for the current * browsing context. @@ -389,8 +419,9 @@ /** * Sets the state of a permission * - * This function simulates a user setting a permission into a - * particular state. + * This function causes permission requests and queries for the status + * of a certain permission type (e.g. "push", or "background-fetch") to + * always return ``state``. * * Matches the `Set Permission * `_ @@ -402,8 +433,10 @@ * * @param {PermissionDescriptor} descriptor - a `PermissionDescriptor * `_ - * dictionary. - * @param {String} state - the state of the permission + * or derived object. + * @param {PermissionState} state - a `PermissionState + * `_ + * value. * @param {WindowProxy} context - Browsing context in which * to run the call, or null for the current * browsing context. @@ -646,6 +679,296 @@ set_spc_transaction_mode: function(mode, context=null) { return window.test_driver_internal.set_spc_transaction_mode(mode, context); }, + + /** + * Cancels the Federated Credential Management dialog + * + * Matches the `Cancel dialog + * `_ + * WebDriver command. + * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the dialog is canceled, or rejected + * in case the WebDriver command errors + */ + cancel_fedcm_dialog: function(context=null) { + return window.test_driver_internal.cancel_fedcm_dialog(context); + }, + + /** + * Clicks a button on the Federated Credential Management dialog + * + * Matches the `Click dialog button + * `_ + * WebDriver command. + * + * @param {String} dialog_button - String enum representing the dialog button to click. + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the button is clicked, + * or rejected in case the WebDriver command errors + */ + click_fedcm_dialog_button: function(dialog_button, context=null) { + return window.test_driver_internal.click_fedcm_dialog_button(dialog_button, context); + }, + + /** + * Selects an account from the Federated Credential Management dialog + * + * Matches the `Select account + * `_ + * WebDriver command. + * + * @param {number} account_index - Index of the account to select. + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the account is selected, + * or rejected in case the WebDriver command errors + */ + select_fedcm_account: function(account_index, context=null) { + return window.test_driver_internal.select_fedcm_account(account_index, context); + }, + + /** + * Gets the account list from the Federated Credential Management dialog + * + * Matches the `Account list + * `_ + * WebDriver command. + * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} fulfilled after the account list is returned, or + * rejected in case the WebDriver command errors + */ + get_fedcm_account_list: function(context=null) { + return window.test_driver_internal.get_fedcm_account_list(context); + }, + + /** + * Gets the title of the Federated Credential Management dialog + * + * Matches the `Get title + * `_ + * WebDriver command. + * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the title is returned, or rejected + * in case the WebDriver command errors + */ + get_fedcm_dialog_title: function(context=null) { + return window.test_driver_internal.get_fedcm_dialog_title(context); + }, + + /** + * Gets the type of the Federated Credential Management dialog + * + * Matches the `Get dialog type + * `_ + * WebDriver command. + * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the dialog type is returned, or + * rejected in case the WebDriver command errors + */ + get_fedcm_dialog_type: function(context=null) { + return window.test_driver_internal.get_fedcm_dialog_type(context); + }, + + /** + * Sets whether promise rejection delay is enabled for the Federated Credential Management dialog + * + * Matches the `Set delay enabled + * `_ + * WebDriver command. + * + * @param {boolean} enabled - Whether to delay FedCM promise rejection. + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the delay has been enabled or disabled, + * or rejected in case the WebDriver command errors + */ + set_fedcm_delay_enabled: function(enabled, context=null) { + return window.test_driver_internal.set_fedcm_delay_enabled(enabled, context); + }, + + /** + * Resets the Federated Credential Management dialog's cooldown + * + * Matches the `Reset cooldown + * `_ + * WebDriver command. + * + * @param {WindowProxy} context - Browsing context in which + * to run the call, or null for the current + * browsing context. + * + * @returns {Promise} Fulfilled after the cooldown has been reset, + * or rejected in case the WebDriver command errors + */ + reset_fedcm_cooldown: function(context=null) { + return window.test_driver_internal.reset_fedcm_cooldown(context); + }, + + /** + * Creates a virtual sensor for use with the Generic Sensors APIs. + * + * Matches the `Create Virtual Sensor + * `_ + * WebDriver command. + * + * Once created, a virtual sensor is available to all navigables under + * the same top-level traversable (i.e. all frames in the same page, + * regardless of origin). + * + * @param {String} sensor_type - A `virtual sensor type + * `_ + * such as "accelerometer". + * @param {Object} [sensor_params={}] - Optional parameters described + * in `Create Virtual Sensor + * `_. + * @param {WindowProxy} [context=null] - Browsing context in which to + * run the call, or null for the + * current browsing context. + * + * @returns {Promise} Fulfilled when virtual sensor is created. + * Rejected in case the WebDriver command errors out + * (including if a virtual sensor of the same type + * already exists). + */ + create_virtual_sensor: function(sensor_type, sensor_params={}, context=null) { + return window.test_driver_internal.create_virtual_sensor(sensor_type, sensor_params, context); + }, + + /** + * Causes a virtual sensor to report a new reading to any connected + * platform sensor. + * + * Matches the `Update Virtual Sensor Reading + * `_ + * WebDriver command. + * + * Note: The ``Promise`` it returns may fulfill before or after a + * "reading" event is fired. When using + * :js:func:`EventWatcher.wait_for`, it is necessary to take this into + * account: + * + * Note: New values may also be discarded due to the checks in `update + * latest reading + * `_. + * + * @example + * // Avoid races between EventWatcher and update_virtual_sensor(). + * // This assumes you are sure this reading will be processed (see + * // the example below otherwise). + * const reading = { x: 1, y: 2, z: 3 }; + * await Promise.all([ + * test_driver.update_virtual_sensor('gyroscope', reading), + * watcher.wait_for('reading') + * ]); + * + * @example + * // Do not wait forever if you are not sure the reading will be + * // processed. + * const readingPromise = watcher.wait_for('reading'); + * const timeoutPromise = new Promise(resolve => { + * t.step_timeout(() => resolve('TIMEOUT', 3000)) + * }); + * + * const reading = { x: 1, y: 2, z: 3 }; + * await test_driver.update_virtual_sensor('gyroscope', 'reading'); + * + * const value = + * await Promise.race([timeoutPromise, readingPromise]); + * if (value !== 'TIMEOUT') { + * // Do something. The "reading" event was fired. + * } + * + * @param {String} sensor_type - A `virtual sensor type + * `_ + * such as "accelerometer". + * @param {Object} reading - An Object describing a reading in a format + * dependent on ``sensor_type`` (e.g. ``{x: + * 1, y: 2, z: 3}`` or ``{ illuminance: 42 + * }``). + * @param {WindowProxy} [context=null] - Browsing context in which to + * run the call, or null for the + * current browsing context. + * + * @returns {Promise} Fulfilled after the reading update reaches the + * virtual sensor. Rejected in case the WebDriver + * command errors out (including if a virtual sensor + * of the given type does not exist). + */ + update_virtual_sensor: function(sensor_type, reading, context=null) { + return window.test_driver_internal.update_virtual_sensor(sensor_type, reading, context); + }, + + /** + * Triggers the removal of a virtual sensor if it exists. + * + * Matches the `Delete Virtual Sensor + * `_ + * WebDriver command. + * + * @param {String} sensor_type - A `virtual sensor type + * `_ + * such as "accelerometer". + * @param {WindowProxy} [context=null] - Browsing context in which to + * run the call, or null for the + * current browsing context. + * + * @returns {Promise} Fulfilled after the virtual sensor has been + * removed or if a sensor of the given type does not + * exist. Rejected in case the WebDriver command + * errors out. + + */ + remove_virtual_sensor: function(sensor_type, context=null) { + return window.test_driver_internal.remove_virtual_sensor(sensor_type, context); + }, + + /** + * Returns information about a virtual sensor. + * + * Matches the `Get Virtual Sensor Information + * `_ + * WebDriver command. + * + * @param {String} sensor_type - A `virtual sensor type + * `_ + * such as "accelerometer". + * @param {WindowProxy} [context=null] - Browsing context in which to + * run the call, or null for the + * current browsing context. + * + * @returns {Promise} Fulfilled with an Object with the properties + * described in `Get Virtual Sensor Information + * `_. + * Rejected in case the WebDriver command errors out + * (including if a virtual sensor of the given type + * does not exist). + */ + get_virtual_sensor_information: function(sensor_type, context=null) { + return window.test_driver_internal.get_virtual_sensor_information(sensor_type, context); + } }; window.test_driver_internal = { @@ -657,9 +980,9 @@ */ in_automation: false, - click: function(element, coords) { + async click(element, coords) { if (this.in_automation) { - return Promise.reject(new Error('Not implemented')); + throw new Error("click() is not implemented by testdriver-vendor.js"); } return new Promise(function(resolve, reject) { @@ -667,21 +990,21 @@ }); }, - delete_all_cookies: function(context=null) { - return Promise.reject(new Error("unimplemented")); + async delete_all_cookies(context=null) { + throw new Error("delete_all_cookies() is not implemented by testdriver-vendor.js"); }, - get_all_cookies: function(context=null) { - return Promise.reject(new Error("unimplemented")); + async get_all_cookies(context=null) { + throw new Error("get_all_cookies() is not implemented by testdriver-vendor.js"); }, - get_named_cookie: function(name, context=null) { - return Promise.reject(new Error("unimplemented")); + async get_named_cookie(name, context=null) { + throw new Error("get_named_cookie() is not implemented by testdriver-vendor.js"); }, - send_keys: function(element, keys) { + async send_keys(element, keys) { if (this.in_automation) { - return Promise.reject(new Error('Not implemented')); + throw new Error("send_keys() is not implemented by testdriver-vendor.js"); } return new Promise(function(resolve, reject) { @@ -711,66 +1034,112 @@ }); }, - freeze: function(context=null) { - return Promise.reject(new Error("unimplemented")); + async freeze(context=null) { + throw new Error("freeze() is not implemented by testdriver-vendor.js"); }, - minimize_window: function(context=null) { - return Promise.reject(new Error("unimplemented")); + async minimize_window(context=null) { + throw new Error("minimize_window() is not implemented by testdriver-vendor.js"); }, - set_window_rect: function(rect, context=null) { - return Promise.reject(new Error("unimplemented")); + async set_window_rect(rect, context=null) { + throw new Error("set_window_rect() is not implemented by testdriver-vendor.js"); }, - action_sequence: function(actions, context=null) { - return Promise.reject(new Error("unimplemented")); + async action_sequence(actions, context=null) { + throw new Error("action_sequence() is not implemented by testdriver-vendor.js"); }, - generate_test_report: function(message, context=null) { - return Promise.reject(new Error("unimplemented")); + async generate_test_report(message, context=null) { + throw new Error("generate_test_report() is not implemented by testdriver-vendor.js"); }, + async set_permission(permission_params, context=null) { + throw new Error("set_permission() is not implemented by testdriver-vendor.js"); + }, - set_permission: function(permission_params, context=null) { - return Promise.reject(new Error("unimplemented")); + async add_virtual_authenticator(config, context=null) { + throw new Error("add_virtual_authenticator() is not implemented by testdriver-vendor.js"); }, - add_virtual_authenticator: function(config, context=null) { - return Promise.reject(new Error("unimplemented")); + async remove_virtual_authenticator(authenticator_id, context=null) { + throw new Error("remove_virtual_authenticator() is not implemented by testdriver-vendor.js"); }, - remove_virtual_authenticator: function(authenticator_id, context=null) { - return Promise.reject(new Error("unimplemented")); + async add_credential(authenticator_id, credential, context=null) { + throw new Error("add_credential() is not implemented by testdriver-vendor.js"); }, - add_credential: function(authenticator_id, credential, context=null) { - return Promise.reject(new Error("unimplemented")); + async get_credentials(authenticator_id, context=null) { + throw new Error("get_credentials() is not implemented by testdriver-vendor.js"); }, - get_credentials: function(authenticator_id, context=null) { - return Promise.reject(new Error("unimplemented")); + async remove_credential(authenticator_id, credential_id, context=null) { + throw new Error("remove_credential() is not implemented by testdriver-vendor.js"); }, - remove_credential: function(authenticator_id, credential_id, context=null) { - return Promise.reject(new Error("unimplemented")); + async remove_all_credentials(authenticator_id, context=null) { + throw new Error("remove_all_credentials() is not implemented by testdriver-vendor.js"); }, - remove_all_credentials: function(authenticator_id, context=null) { - return Promise.reject(new Error("unimplemented")); + async set_user_verified(authenticator_id, uv, context=null) { + throw new Error("set_user_verified() is not implemented by testdriver-vendor.js"); }, - set_user_verified: function(authenticator_id, uv, context=null) { - return Promise.reject(new Error("unimplemented")); + async set_storage_access(origin, embedding_origin, blocked, context=null) { + throw new Error("set_storage_access() is not implemented by testdriver-vendor.js"); }, - set_storage_access: function(origin, embedding_origin, blocked, context=null) { - return Promise.reject(new Error("unimplemented")); + async set_spc_transaction_mode(mode, context=null) { + throw new Error("set_spc_transaction_mode() is not implemented by testdriver-vendor.js"); }, - set_spc_transaction_mode: function(mode, context=null) { - return Promise.reject(new Error("unimplemented")); + async cancel_fedcm_dialog(context=null) { + throw new Error("cancel_fedcm_dialog() is not implemented by testdriver-vendor.js"); + }, + + async click_fedcm_dialog_button(dialog_button, context=null) { + throw new Error("click_fedcm_dialog_button() is not implemented by testdriver-vendor.js"); + }, + + async select_fedcm_account(account_index, context=null) { + throw new Error("select_fedcm_account() is not implemented by testdriver-vendor.js"); + }, + + async get_fedcm_account_list(context=null) { + throw new Error("get_fedcm_account_list() is not implemented by testdriver-vendor.js"); + }, + + async get_fedcm_dialog_title(context=null) { + throw new Error("get_fedcm_dialog_title() is not implemented by testdriver-vendor.js"); + }, + + async get_fedcm_dialog_type(context=null) { + throw new Error("get_fedcm_dialog_type() is not implemented by testdriver-vendor.js"); }, + async set_fedcm_delay_enabled(enabled, context=null) { + throw new Error("set_fedcm_delay_enabled() is not implemented by testdriver-vendor.js"); + }, + + async reset_fedcm_cooldown(context=null) { + throw new Error("reset_fedcm_cooldown() is not implemented by testdriver-vendor.js"); + }, + + async create_virtual_sensor(sensor_type, sensor_params, context=null) { + throw new Error("create_virtual_sensor() is not implemented by testdriver-vendor.js"); + }, + + async update_virtual_sensor(sensor_type, reading, context=null) { + throw new Error("update_virtual_sensor() is not implemented by testdriver-vendor.js"); + }, + + async remove_virtual_sensor(sensor_type, context=null) { + throw new Error("remove_virtual_sensor() is not implemented by testdriver-vendor.js"); + }, + + async get_virtual_sensor_information(sensor_type, context=null) { + throw new Error("get_virtual_sensor_information() is not implemented by testdriver-vendor.js"); + } }; })(); diff --git a/test/fixtures/wpt/resources/testharness.js b/test/fixtures/wpt/resources/testharness.js index 112790bb1eeb87..497ae23f0e83ee 100644 --- a/test/fixtures/wpt/resources/testharness.js +++ b/test/fixtures/wpt/resources/testharness.js @@ -1426,12 +1426,16 @@ function assert_wrapper(...args) { let status = Test.statuses.TIMEOUT; let stack = null; + let new_assert_index = null; try { if (settings.debug) { console.debug("ASSERT", name, tests.current_test && tests.current_test.name, args); } if (tests.output) { tests.set_assert(name, args); + // Remember the newly pushed assert's index, because `apply` + // below might push new asserts. + new_assert_index = tests.asserts_run.length - 1; } const rv = f.apply(undefined, args); status = Test.statuses.PASS; @@ -1445,7 +1449,7 @@ stack = get_stack(); } if (tests.output) { - tests.set_assert_status(status, stack); + tests.set_assert_status(new_assert_index, status, stack); } } } @@ -1493,7 +1497,7 @@ /** * Assert that ``actual`` is the same value as ``expected``. * - * For objects this compares by cobject identity; for primitives + * For objects this compares by object identity; for primitives * this distinguishes between 0 and -0, and has correct handling * of NaN. * @@ -2725,8 +2729,9 @@ * speed when the condition is quickly met. * * @param {Function} cond A function taking no arguments and - * returning a boolean. The callback is called - * when this function returns true. + * returning a boolean or a Promise. The callback is + * called when this function returns true, or the + * returned Promise is resolved with true. * @param {Function} func A function taking no arguments to call once * the condition is met. * @param {string} [description] Error message to add to assert in case of @@ -2742,11 +2747,11 @@ var remaining = Math.ceil(timeout_full / interval); var test_this = this; - var wait_for_inner = test_this.step_func(() => { - if (cond()) { + const step = test_this.step_func((result) => { + if (result) { func(); } else { - if(remaining === 0) { + if (remaining === 0) { assert(false, "step_wait_func", description, "Timed out waiting on condition"); } @@ -2755,6 +2760,12 @@ } }); + var wait_for_inner = test_this.step_func(() => { + Promise.resolve(cond()).then( + step, + test_this.unreached_func("step_wait_func")); + }); + wait_for_inner(); }; @@ -2780,8 +2791,9 @@ * }, "Navigating a popup to about:blank"); * * @param {Function} cond A function taking no arguments and - * returning a boolean. The callback is called - * when this function returns true. + * returning a boolean or a Promise. The callback is + * called when this function returns true, or the + * returned Promise is resolved with true. * @param {Function} func A function taking no arguments to call once * the condition is met. * @param {string} [description] Error message to add to assert in case of @@ -2817,7 +2829,7 @@ * }, ""); * * @param {Function} cond A function taking no arguments and - * returning a boolean. + * returning a boolean or a Promise. * @param {string} [description] Error message to add to assert in case of * failure. * @param {number} timeout Timeout in ms. This is multiplied by the global @@ -3673,8 +3685,8 @@ this.asserts_run.push(new AssertRecord(this.current_test, assert_name, args)) } - Tests.prototype.set_assert_status = function(status, stack) { - let assert_record = this.asserts_run[this.asserts_run.length - 1]; + Tests.prototype.set_assert_status = function(index, status, stack) { + let assert_record = this.asserts_run[index]; assert_record.status = status; assert_record.stack = stack; } diff --git a/test/fixtures/wpt/versions.json b/test/fixtures/wpt/versions.json index 4b28c06e6c40df..8ec93059e8ea69 100644 --- a/test/fixtures/wpt/versions.json +++ b/test/fixtures/wpt/versions.json @@ -3,6 +3,10 @@ "commit": "dbd648158d337580885e70a54f929daf215211a0", "path": "common" }, + "compression": { + "commit": "c82521cfa587505746a853a24d22589633825b10", + "path": "compression" + }, "console": { "commit": "767ae354642bee1e4d90b28df4480475b9260e14", "path": "console" @@ -48,7 +52,7 @@ "path": "html/webappapis/timers" }, "interfaces": { - "commit": "df731dab88a1a25c04eb7e6238c11dc28fda0801", + "commit": "727995f0432f7ab2ea35c8679412edc28d87ec08", "path": "interfaces" }, "performance-timeline": { @@ -60,7 +64,7 @@ "path": "resource-timing" }, "resources": { - "commit": "919874f84ff3703365063e749161a34af38c3d2a", + "commit": "1e140d63ec885703ce24b3798abd81912696bb85", "path": "resources" }, "streams": { diff --git a/test/js-native-api/test_cannot_run_js/entry_point.c b/test/js-native-api/test_cannot_run_js/entry_point.c deleted file mode 100644 index 6b7b50a38c9535..00000000000000 --- a/test/js-native-api/test_cannot_run_js/entry_point.c +++ /dev/null @@ -1,7 +0,0 @@ -#include - -EXTERN_C_START -napi_value Init(napi_env env, napi_value exports); -EXTERN_C_END - -NAPI_MODULE(NODE_GYP_MODULE_NAME, Init) diff --git a/test/parallel/test-assert-esm-cjs-message-verify.js b/test/parallel/test-assert-esm-cjs-message-verify.js new file mode 100644 index 00000000000000..9a66d83abd9c4b --- /dev/null +++ b/test/parallel/test-assert-esm-cjs-message-verify.js @@ -0,0 +1,51 @@ +'use strict'; + +const { spawnPromisified } = require('../common'); +const tmpdir = require('../common/tmpdir'); +const assert = require('assert'); +const { writeFileSync, unlink } = require('fs'); +const { describe, after, it } = require('node:test'); + +tmpdir.refresh(); + +const fileImports = { + cjs: 'const assert = require("assert");', + mjs: 'import assert from "assert";', +}; + +const fileNames = []; + +for (const [ext, header] of Object.entries(fileImports)) { + const fileName = `test-file.${ext}`; + // Store the generated filesnames in an array + fileNames.push(`${tmpdir.path}/${fileName}`); + + writeFileSync(tmpdir.resolve(fileName), `${header}\nassert.ok(0 === 2);`); +} + +describe('ensure the assert.ok throwing similar error messages for esm and cjs files', () => { + const nodejsPath = `${process.execPath}`; + const errorsMessages = []; + + it('should return code 1 for each command', async () => { + for (const fileName of fileNames) { + const { stderr, code } = await spawnPromisified(nodejsPath, [fileName]); + assert.strictEqual(code, 1); + // For each error message, filter the lines which will starts with AssertionError + errorsMessages.push( + stderr.split('\n').find((s) => s.startsWith('AssertionError')) + ); + } + }); + + after(() => { + assert.strictEqual(errorsMessages.length, 2); + assert.deepStrictEqual(errorsMessages[0], errorsMessages[1]); + + for (const fileName of fileNames) { + unlink(fileName, () => {}); + } + + tmpdir.refresh(); + }); +}); diff --git a/test/parallel/test-async-wrap-constructor.js b/test/parallel/test-async-wrap-constructor.js index e89bc49df02333..853898aa0adf1a 100644 --- a/test/parallel/test-async-wrap-constructor.js +++ b/test/parallel/test-async-wrap-constructor.js @@ -6,15 +6,16 @@ require('../common'); const assert = require('assert'); const async_hooks = require('async_hooks'); -[0, 1, false, true, null, 'hello'].forEach((badArg) => { +const falsyValues = [0, 1, false, true, null, 'hello']; +for (const badArg of falsyValues) { const hookNames = ['init', 'before', 'after', 'destroy', 'promiseResolve']; - hookNames.forEach((field) => { + for (const hookName of hookNames) { assert.throws(() => { - async_hooks.createHook({ [field]: badArg }); + async_hooks.createHook({ [hookName]: badArg }); }, { code: 'ERR_ASYNC_CALLBACK', name: 'TypeError', - message: `hook.${field} must be a function` + message: `hook.${hookName} must be a function` }); - }); -}); + } +} diff --git a/test/parallel/test-bootstrap-modules.js b/test/parallel/test-bootstrap-modules.js index e4561d746606ed..d158e489196c39 100644 --- a/test/parallel/test-bootstrap-modules.js +++ b/test/parallel/test-bootstrap-modules.js @@ -1,16 +1,30 @@ -// Flags: --expose-internals 'use strict'; -// This list must be computed before we require any modules to +// This list must be computed before we require any builtins to // to eliminate the noise. -const actualModules = new Set(process.moduleLoadList.slice()); +const list = process.moduleLoadList.slice(); const common = require('../common'); const assert = require('assert'); +const { inspect } = require('util'); -const expectedModules = new Set([ +const preExecIndex = + list.findIndex((i) => i.includes('pre_execution')); +const actual = { + beforePreExec: new Set(list.slice(0, preExecIndex)), + atRunTime: new Set(list.slice(preExecIndex)), +}; + +// Currently, we don't add additional builtins to worker snapshots. +// So for worker snapshots we'll just concatenate the two. Once we +// add more builtins to worker snapshots, we should also distinguish +// the two stages for them. +const expected = {}; + +expected.beforePreExec = new Set([ 'Internal Binding builtins', 'Internal Binding encoding_binding', + 'Internal Binding modules', 'Internal Binding errors', 'Internal Binding util', 'NativeModule internal/errors', @@ -84,22 +98,25 @@ const expectedModules = new Set([ 'NativeModule internal/modules/package_json_reader', 'Internal Binding module_wrap', 'NativeModule internal/modules/cjs/loader', - 'NativeModule internal/vm/module', - 'NativeModule internal/modules/esm/utils', +]); + +expected.atRunTime = new Set([ 'Internal Binding wasm_web_api', 'Internal Binding worker', 'NativeModule internal/modules/run_main', 'NativeModule internal/net', 'NativeModule internal/dns/utils', 'NativeModule internal/process/pre_execution', + 'NativeModule internal/vm/module', + 'NativeModule internal/modules/esm/utils', ]); if (common.isMainThread) { [ 'NativeModule internal/idna', 'NativeModule url', - ].forEach(expectedModules.add.bind(expectedModules)); -} else { + ].forEach(expected.beforePreExec.add.bind(expected.beforePreExec)); +} else { // Worker. [ 'NativeModule diagnostics_channel', 'NativeModule internal/abort_controller', @@ -127,35 +144,97 @@ if (common.isMainThread) { 'NativeModule stream/promises', 'NativeModule string_decoder', 'NativeModule worker_threads', - ].forEach(expectedModules.add.bind(expectedModules)); + ].forEach(expected.atRunTime.add.bind(expected.atRunTime)); + // For now we'll concatenate the two stages for workers. We prefer + // atRunTime here because that's what currently happens for these. } if (common.isWindows) { // On Windows fs needs SideEffectFreeRegExpPrototypeExec which uses vm. - expectedModules.add('NativeModule vm'); + expected.atRunTime.add('NativeModule vm'); } if (common.hasIntl) { - expectedModules.add('Internal Binding icu'); + expected.beforePreExec.add('Internal Binding icu'); } if (process.features.inspector) { - expectedModules.add('Internal Binding inspector'); - expectedModules.add('NativeModule internal/inspector_async_hook'); - expectedModules.add('NativeModule internal/util/inspector'); + expected.beforePreExec.add('Internal Binding inspector'); + expected.beforePreExec.add('NativeModule internal/util/inspector'); + expected.atRunTime.add('NativeModule internal/inspector_async_hook'); } const difference = (setA, setB) => { return new Set([...setA].filter((x) => !setB.has(x))); }; -const missingModules = difference(expectedModules, actualModules); -const extraModules = difference(actualModules, expectedModules); -const printSet = (s) => { return `${[...s].sort().join(',\n ')}\n`; }; - -assert.deepStrictEqual(actualModules, expectedModules, - (missingModules.size > 0 ? - 'These modules were not loaded:\n ' + - printSet(missingModules) : '') + - (extraModules.size > 0 ? - 'These modules were unexpectedly loaded:\n ' + - printSet(extraModules) : '')); + +// Accumulate all the errors and print them at the end instead of throwing +// immediately which makes it harder to update the test. +const errorLogs = []; +function err(message) { + if (typeof message === 'string') { + errorLogs.push(message); + } else { + // Show the items in individual lines for easier copy-pasting. + errorLogs.push(inspect(message, { compact: false })); + } +} + +if (common.isMainThread) { + const missing = difference(expected.beforePreExec, actual.beforePreExec); + const extra = difference(actual.beforePreExec, expected.beforePreExec); + if (missing.size !== 0) { + err('These builtins are now no longer loaded before pre-execution.'); + err('If this is intentional, remove them from `expected.beforePreExec`.'); + err('\n--- These could be removed from expected.beforePreExec ---'); + err([...missing].sort()); + err(''); + } + if (extra.size !== 0) { + err('These builtins are now unexpectedly loaded before pre-execution.'); + err('If this is intentional, add them to `expected.beforePreExec`.'); + err('\n# Note: loading more builtins before pre-execution can lead to ' + + 'startup performance regression or invalid snapshots.'); + err('- Consider lazy loading builtins that are not used universally.'); + err('- Make sure that the builtins do not access environment dependent ' + + 'states e.g. command line arguments or environment variables ' + + 'during loading.'); + err('- When in doubt, ask @nodejs/startup.'); + err('\n--- These could be added to expected.beforePreExec ---'); + err([...extra].sort()); + err(''); + } +} + +if (!common.isMainThread) { + // For workers, just merge beforePreExec into atRunTime for now. + // When we start adding modules to the worker snapshot, this branch + // can be removed and we can just remove the common.isMainThread + // conditions. + expected.beforePreExec.forEach(expected.atRunTime.add.bind(expected.atRunTime)); + actual.beforePreExec.forEach(actual.atRunTime.add.bind(actual.atRunTime)); +} + +{ + const missing = difference(expected.atRunTime, actual.atRunTime); + const extra = difference(actual.atRunTime, expected.atRunTime); + if (missing.size !== 0) { + err('These builtins are now no longer loaded at run time.'); + err('If this is intentional, remove them from `expected.atRunTime`.'); + err('\n--- These could be removed from expected.atRunTime ---'); + err([...missing].sort()); + err(''); + } + if (extra.size !== 0) { + err('These builtins are now unexpectedly loaded at run time.'); + err('If this is intentional, add them to `expected.atRunTime`.'); + err('\n# Note: loading more builtins at run time can lead to ' + + 'startup performance regression.'); + err('- Consider lazy loading builtins that are not used universally.'); + err('\n--- These could be added to expected.atRunTime ---'); + err([...extra].sort()); + err(''); + } +} + +assert.strictEqual(errorLogs.length, 0, errorLogs.join('\n')); diff --git a/test/parallel/test-buffer-slice.js b/test/parallel/test-buffer-slice.js index 05cbfba4733829..52720bb87b3cea 100644 --- a/test/parallel/test-buffer-slice.js +++ b/test/parallel/test-buffer-slice.js @@ -71,9 +71,9 @@ for (let i = 0, s = buf.toString(); i < buf.length; ++i) { ); } -expectedSameBufs.forEach(([buf1, buf2]) => { +for (const [buf1, buf2] of expectedSameBufs) { assert.strictEqual(Buffer.compare(buf1, buf2), 0); -}); +} const utf16Buf = Buffer.from('0123456789', 'utf16le'); assert.deepStrictEqual(utf16Buf.slice(0, 6), Buffer.from('012', 'utf16le')); diff --git a/test/parallel/test-crypto-getcipherinfo.js b/test/parallel/test-crypto-getcipherinfo.js index 98d2a52eceac4b..64b79fc36ccf4d 100644 --- a/test/parallel/test-crypto-getcipherinfo.js +++ b/test/parallel/test-crypto-getcipherinfo.js @@ -16,12 +16,12 @@ const ciphers = getCiphers(); assert.strictEqual(getCipherInfo(-1), undefined); assert.strictEqual(getCipherInfo('cipher that does not exist'), undefined); -ciphers.forEach((cipher) => { +for (const cipher of ciphers) { const info = getCipherInfo(cipher); assert(info); const info2 = getCipherInfo(info.nid); assert.deepStrictEqual(info, info2); -}); +} const info = getCipherInfo('aes-128-cbc'); assert.strictEqual(info.name, 'aes-128-cbc'); diff --git a/test/parallel/test-dns-memory-error.js b/test/parallel/test-dns-memory-error.js index 29907fb1dbfd5e..c95715f80a735c 100644 --- a/test/parallel/test-dns-memory-error.js +++ b/test/parallel/test-dns-memory-error.js @@ -11,6 +11,8 @@ const errors = require('internal/errors'); const { internalBinding } = require('internal/test/binding'); const { UV_EAI_MEMORY } = internalBinding('uv'); -const memoryError = errors.dnsException(UV_EAI_MEMORY, 'fhqwhgads'); +const memoryError = new errors.DNSException(UV_EAI_MEMORY, 'fhqwhgads'); assert.strictEqual(memoryError.code, 'EAI_MEMORY'); +const stack = memoryError.stack.split('\n'); +assert.match(stack[1], /^ {4}at Object/); diff --git a/test/parallel/test-dns-resolveany-bad-ancount.js b/test/parallel/test-dns-resolveany-bad-ancount.js index 71fcbe03cd58f1..5cea388ad6a9f0 100644 --- a/test/parallel/test-dns-resolveany-bad-ancount.js +++ b/test/parallel/test-dns-resolveany-bad-ancount.js @@ -30,13 +30,14 @@ server.bind(0, common.mustCall(async () => { dnsPromises.resolveAny('example.org') .then(common.mustNotCall()) .catch(common.expectsError({ - code: 'EBADRESP', + // May return EBADRESP or ETIMEOUT + code: /^(?:EBADRESP|ETIMEOUT)$/, syscall: 'queryAny', hostname: 'example.org' })); dns.resolveAny('example.org', common.mustCall((err) => { - assert.strictEqual(err.code, 'EBADRESP'); + assert.notStrictEqual(err.code, 'SUCCESS'); assert.strictEqual(err.syscall, 'queryAny'); assert.strictEqual(err.hostname, 'example.org'); const descriptor = Object.getOwnPropertyDescriptor(err, 'message'); diff --git a/test/parallel/test-dns-resolveany.js b/test/parallel/test-dns-resolveany.js index 0bbfe8f9f18432..f64dbfc93e2da8 100644 --- a/test/parallel/test-dns-resolveany.js +++ b/test/parallel/test-dns-resolveany.js @@ -11,7 +11,7 @@ const answers = [ { type: 'AAAA', address: '::42', ttl: 123 }, { type: 'MX', priority: 42, exchange: 'foobar.com', ttl: 124 }, { type: 'NS', value: 'foobar.org', ttl: 457 }, - { type: 'TXT', entries: [ 'v=spf1 ~all', 'xyz\0foo' ] }, + { type: 'TXT', entries: [ 'v=spf1 ~all xyz\0foo' ] }, { type: 'PTR', value: 'baz.org', ttl: 987 }, { type: 'SOA', diff --git a/test/parallel/test-dotenv-edge-cases.js b/test/parallel/test-dotenv-edge-cases.js index ae2b3dc2a35f35..9735a89618172c 100644 --- a/test/parallel/test-dotenv-edge-cases.js +++ b/test/parallel/test-dotenv-edge-cases.js @@ -34,8 +34,8 @@ describe('.env supports edge cases', () => { [ '--env-file=.env', '--eval', code ], { cwd: __dirname }, ); - assert.strictEqual(child.stderr, ''); - assert.strictEqual(child.code, 0); + assert.notStrictEqual(child.stderr.toString(), ''); + assert.strictEqual(child.code, 9); }); it('should not override existing environment variables but introduce new vars', async () => { diff --git a/test/parallel/test-error-aggregateTwoErrors.js b/test/parallel/test-error-aggregateTwoErrors.js index 89224efd6b161f..2332437d990164 100644 --- a/test/parallel/test-error-aggregateTwoErrors.js +++ b/test/parallel/test-error-aggregateTwoErrors.js @@ -57,3 +57,15 @@ assert.strictEqual(aggregateTwoErrors(null, null), null); assert.strictEqual(chainedError.code, err0.code); assert.deepStrictEqual(chainedError.errors, [err0, err1]); } + +{ + const err0 = new Error('original'); + const err1 = new Error('second error'); + + err0.code = 'ERR0'; + err1.code = 'ERR1'; + + const chainedError = aggregateTwoErrors(null, aggregateTwoErrors(err1, err0)); + const stack = chainedError.stack.split('\n'); + assert.match(stack[1], /^ {4}at Object/); +} diff --git a/test/parallel/test-errors-hide-stack-frames.js b/test/parallel/test-errors-hide-stack-frames.js new file mode 100644 index 00000000000000..fdaeb96fad76bb --- /dev/null +++ b/test/parallel/test-errors-hide-stack-frames.js @@ -0,0 +1,242 @@ +// Flags: --expose-internals +'use strict'; + +require('../common'); +const { hideStackFrames, codes } = require('internal/errors'); +const { validateInteger } = require('internal/validators'); +const assert = require('assert'); + +{ + // Test that the a built-in error has the correct name and message. + function a() { + b(); + } + + function b() { + c(); + } + + const c = hideStackFrames(function() { + throw new Error('test'); + }); + + try { + a(); + } catch (e) { + assert.strictEqual(e.name, 'Error'); + assert.strictEqual(e.message, 'test'); + } +} + +{ + // Test that validator errors have the correct name and message. + try { + validateInteger('2', 'test'); + } catch (e) { + assert.strictEqual(e.name, 'TypeError'); + assert.strictEqual(e.message, 'The "test" argument must be of type number. Received type string (\'2\')'); + } +} + +{ + // Test that validator fn is not in the stack trace. + + function a(value) { + validateInteger(value, 'test'); + } + try { + a('2'); + } catch (e) { + assert.strictEqual(Error.stackTraceLimit, 10); + const stack = e.stack.split('\n'); + assert.doesNotMatch(stack[1], /validateInteger/); + assert.match(stack[1], /at a/); + } +} + +{ + // Test that the stack trace is hidden for normal unnamed functions. + function a() { + b(); + } + + function b() { + c(); + } + + const c = hideStackFrames(function() { + throw new Error('test'); + }); + + try { + a(); + } catch (e) { + assert.strictEqual(Error.stackTraceLimit, 10); + const stack = e.stack.split('\n'); + assert.doesNotMatch(stack[1], /at c/); + assert.match(stack[1], /at b/); + assert.strictEqual(Error.stackTraceLimit, 10); + } +} + +{ + // Test that the stack trace is hidden for normal functions. + function a() { + b(); + } + + function b() { + c(); + } + + const c = hideStackFrames(function c() { + throw new Error('test'); + }); + + try { + a(); + } catch (e) { + assert.strictEqual(Error.stackTraceLimit, 10); + const stack = e.stack.split('\n'); + assert.doesNotMatch(stack[1], /at c/); + assert.match(stack[1], /at b/); + assert.strictEqual(Error.stackTraceLimit, 10); + } +} + +{ + // Test that the stack trace is hidden for arrow functions. + function a() { + b(); + } + + function b() { + c(); + } + + const c = hideStackFrames(() => { + throw new Error('test'); + }); + + try { + a(); + } catch (e) { + assert.strictEqual(Error.stackTraceLimit, 10); + const stack = e.stack.split('\n'); + assert.doesNotMatch(stack[1], /at c/); + assert.match(stack[1], /at b/); + assert.strictEqual(Error.stackTraceLimit, 10); + } +} + +{ + // Creating a new Error object without stack trace, then throwing it + // should get a stack trace by hideStackFrames. + function a() { + b(); + } + + function b() { + c(); + } + + const c = hideStackFrames(function() { + throw new Error('test'); + }); + + try { + a(); + } catch (e) { + assert.strictEqual(Error.stackTraceLimit, 10); + const stack = e.stack.split('\n'); + assert.doesNotMatch(stack[1], /at c/); + assert.match(stack[1], /at b/); + assert.strictEqual(Error.stackTraceLimit, 10); + } +} + +{ + const ERR_ACCESS_DENIED = codes.ERR_ACCESS_DENIED; + // Creating a new Error object without stack trace, then throwing it + // should get a stack trace by hideStackFrames. + function a() { + b(); + } + + function b() { + c(); + } + + const c = hideStackFrames(function() { + throw new ERR_ACCESS_DENIED.NoStackError('test'); + }); + + try { + a(); + } catch (e) { + assert.strictEqual(Error.stackTraceLimit, 10); + const stack = e.stack.split('\n'); + assert.doesNotMatch(stack[1], /at c/); + assert.match(stack[1], /at b/); + assert.strictEqual(Error.stackTraceLimit, 10); + } +} + +{ + // Creating a new Error object with stack trace, then throwing it + // should get a stack trace by hideStackFrames. + function a() { + b(); + } + + const b = hideStackFrames(function b() { + c(); + }); + + const c = hideStackFrames(function() { + throw new Error('test'); + }); + + try { + a(); + } catch (e) { + assert.strictEqual(Error.stackTraceLimit, 10); + const stack = e.stack.split('\n'); + assert.match(stack[1], /at a/); + assert.strictEqual(Error.stackTraceLimit, 10); + } +} + +{ + // Binding passes the value of this to the wrapped function. + let called = false; + function a() { + b.bind({ key: 'value' })(); + } + + const b = hideStackFrames(function b() { + assert.strictEqual(this.key, 'value'); + called = true; + }); + + a(); + + assert.strictEqual(called, true); +} + +{ + // Binding passes the value of this to the withoutStackTrace function. + let called = false; + function a() { + b.withoutStackTrace.bind({ key: 'value' })(); + } + + const b = hideStackFrames(function b() { + assert.strictEqual(this.key, 'value'); + called = true; + }); + + a(); + + assert.strictEqual(called, true); +} diff --git a/test/parallel/test-event-target.js b/test/parallel/test-event-target.js new file mode 100644 index 00000000000000..12246b15ae859c --- /dev/null +++ b/test/parallel/test-event-target.js @@ -0,0 +1,21 @@ +'use strict'; + +require('../common'); +const assert = require('assert'); + +const eventPhases = { + 'NONE': 0, + 'CAPTURING_PHASE': 1, + 'AT_TARGET': 2, + 'BUBBLING_PHASE': 3 +}; + +for (const [prop, value] of Object.entries(eventPhases)) { + // Check if the value of the property matches the expected value + assert.strictEqual(Event[prop], value, `Expected Event.${prop} to be ${value}, but got ${Event[prop]}`); + + const desc = Object.getOwnPropertyDescriptor(Event, prop); + assert.strictEqual(desc.writable, false, `${prop} should not be writable`); + assert.strictEqual(desc.configurable, false, `${prop} should not be configurable`); + assert.strictEqual(desc.enumerable, true, `${prop} should be enumerable`); +} diff --git a/test/parallel/test-file-write-stream5.js b/test/parallel/test-file-write-stream5.js new file mode 100644 index 00000000000000..cdc8b52eebd48d --- /dev/null +++ b/test/parallel/test-file-write-stream5.js @@ -0,0 +1,28 @@ +'use strict'; + +// Test 'uncork' for WritableStream. +// Refs: https://github.com/nodejs/node/issues/50979 + +const common = require('../common'); +const fs = require('fs'); +const assert = require('assert'); +const test = require('node:test'); +const tmpdir = require('../common/tmpdir'); + +const filepath = tmpdir.resolve('write_stream.txt'); +tmpdir.refresh(); + +const data = 'data'; + +test('writable stream uncork', () => { + const fileWriteStream = fs.createWriteStream(filepath); + + fileWriteStream.on('finish', common.mustCall(() => { + const writtenData = fs.readFileSync(filepath, 'utf8'); + assert.strictEqual(writtenData, data); + })); + fileWriteStream.cork(); + fileWriteStream.write(data, common.mustCall()); + fileWriteStream.uncork(); + fileWriteStream.end(); +}); diff --git a/test/parallel/test-fs-append-file-sync.js b/test/parallel/test-fs-append-file-sync.js index fd6ee690f4ab7d..f32b4585354561 100644 --- a/test/parallel/test-fs-append-file-sync.js +++ b/test/parallel/test-fs-append-file-sync.js @@ -27,15 +27,10 @@ const fs = require('fs'); const currentFileData = 'ABCD'; const m = 0o600; const num = 220; -const data = '南越国是前203年至前111年存在于岭南地区的一个国家,国都位于番禺,疆域包括今天中国的广东、' + - '广西两省区的大部份地区,福建省、湖南、贵州、云南的一小部份地区和越南的北部。' + - '南越国是秦朝灭亡后,由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。' + - '前196年和前179年,南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' + - '南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。南越国共存在93年,' + - '历经五代君主。南越国是岭南地区的第一个有记载的政权国家,采用封建制和郡县制并存的制度,' + - '它的建立保证了秦末乱世岭南地区社会秩序的稳定,有效的改善了岭南地区落后的政治、##济现状。\n'; - const tmpdir = require('../common/tmpdir'); +const fixtures = require('../common/fixtures'); +const data = fixtures.utf8TestText; + tmpdir.refresh(); // Test that empty file will be created and have content added. diff --git a/test/parallel/test-fs-append-file.js b/test/parallel/test-fs-append-file.js index 2151b5cedd1c9a..1e20625e5b9697 100644 --- a/test/parallel/test-fs-append-file.js +++ b/test/parallel/test-fs-append-file.js @@ -27,14 +27,8 @@ const fs = require('fs'); const tmpdir = require('../common/tmpdir'); const currentFileData = 'ABCD'; - -const s = '南越国是前203年至前111年存在于岭南地区的一个国家,国都位于番禺,疆域包括今天中国的广东、' + - '广西两省区的大部份地区,福建省、湖南、贵州、云南的一小部份地区和越南的北部。' + - '南越国是秦朝灭亡后,由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。' + - '前196年和前179年,南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' + - '南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。南越国共存在93年,' + - '历经五代君主。南越国是岭南地区的第一个有记载的政权国家,采用封建制和郡县制并存的制度,' + - '它的建立保证了秦末乱世岭南地区社会秩序的稳定,有效的改善了岭南地区落后的政治、##济现状。\n'; +const fixtures = require('../common/fixtures'); +const s = fixtures.utf8TestText; tmpdir.refresh(); diff --git a/test/parallel/test-fs-glob.mjs b/test/parallel/test-fs-glob.mjs index 0936f6575cb6d7..a789ed1167098a 100644 --- a/test/parallel/test-fs-glob.mjs +++ b/test/parallel/test-fs-glob.mjs @@ -65,6 +65,7 @@ const patterns = { ], 'a/{b,c,d,e,f}/**/g': [], 'a/b/**': ['a/b', 'a/b/c', 'a/b/c/d'], + 'a/{b/**,b/c}': ['a/b', 'a/b/c', 'a/b/c/d'], './**/g': ['a/abcdef/g', 'a/abcfed/g'], 'a/abc{fed,def}/g/h': ['a/abcdef/g/h', 'a/abcfed/g/h'], 'a/abc{fed/g,def}/**/': ['a/abcdef', 'a/abcdef/g', 'a/abcfed/g'], diff --git a/test/parallel/test-fs-mkdtemp-prefix-check.js b/test/parallel/test-fs-mkdtemp-prefix-check.js index 33a06914a46e10..af5cb6ab7db07d 100644 --- a/test/parallel/test-fs-mkdtemp-prefix-check.js +++ b/test/parallel/test-fs-mkdtemp-prefix-check.js @@ -27,7 +27,7 @@ function failAsync(value) { }); } -prefixValues.forEach((prefixValue) => { +for (const prefixValue of prefixValues) { fail(prefixValue); failAsync(prefixValue); -}); +} diff --git a/test/parallel/test-fs-opendir.js b/test/parallel/test-fs-opendir.js index 82ee8e20da31cd..8b8fc161eee661 100644 --- a/test/parallel/test-fs-opendir.js +++ b/test/parallel/test-fs-opendir.js @@ -48,9 +48,11 @@ const invalidCallbackObj = { const entries = files.map(() => { const dirent = dir.readSync(); assertDirent(dirent); - return dirent.name; - }); - assert.deepStrictEqual(files, entries.sort()); + return { name: dirent.name, path: dirent.path, parentPath: dirent.parentPath, toString() { return dirent.name; } }; + }).sort(); + assert.deepStrictEqual(entries.map((d) => d.name), files); + assert.deepStrictEqual(entries.map((d) => d.path), Array(entries.length).fill(testDir)); + assert.deepStrictEqual(entries.map((d) => d.parentPath), Array(entries.length).fill(testDir)); // dir.read should return null when no more entries exist assert.strictEqual(dir.readSync(), null); diff --git a/test/parallel/test-fs-sync-fd-leak.js b/test/parallel/test-fs-sync-fd-leak.js index 52f6f38f9c0ea0..1abb75964a46e2 100644 --- a/test/parallel/test-fs-sync-fd-leak.js +++ b/test/parallel/test-fs-sync-fd-leak.js @@ -25,7 +25,6 @@ require('../common'); const assert = require('assert'); const fs = require('fs'); const { internalBinding } = require('internal/test/binding'); -const { UV_EBADF } = internalBinding('uv'); // Ensure that (read|write|append)FileSync() closes the file descriptor fs.openSync = function() { @@ -42,21 +41,34 @@ fs.writeSync = function() { throw new Error('BAM'); }; -internalBinding('fs').fstat = function(fd, bigint, _, ctx) { - ctx.errno = UV_EBADF; - ctx.syscall = 'fstat'; +// Internal fast paths are pure C++, can't error inside write +internalBinding('fs').writeFileUtf8 = function() { + // Fake close + close_called++; + throw new Error('BAM'); +}; + +internalBinding('fs').fstat = function() { + throw new Error('EBADF: bad file descriptor, fstat'); }; let close_called = 0; ensureThrows(function() { - fs.readFileSync('dummy'); -}, 'EBADF: bad file descriptor, fstat'); -ensureThrows(function() { + // Fast path: writeFileSync utf8 fs.writeFileSync('dummy', 'xxx'); }, 'BAM'); ensureThrows(function() { + // Non-fast path + fs.writeFileSync('dummy', 'xxx', { encoding: 'base64' }); +}, 'BAM'); +ensureThrows(function() { + // Fast path: writeFileSync utf8 fs.appendFileSync('dummy', 'xxx'); }, 'BAM'); +ensureThrows(function() { + // Non-fast path + fs.appendFileSync('dummy', 'xxx', { encoding: 'base64' }); +}, 'BAM'); function ensureThrows(cb, message) { let got_exception = false; diff --git a/test/parallel/test-fs-timestamp-parsing-error.js b/test/parallel/test-fs-timestamp-parsing-error.js index 1fe0294f68b714..b3fd3e23dfcc35 100644 --- a/test/parallel/test-fs-timestamp-parsing-error.js +++ b/test/parallel/test-fs-timestamp-parsing-error.js @@ -3,7 +3,7 @@ require('../common'); const assert = require('assert'); const fs = require('fs'); -[Infinity, -Infinity, NaN].forEach((input) => { +for (const input of [Infinity, -Infinity, NaN]) { assert.throws( () => { fs._toUnixTimestamp(input); @@ -12,7 +12,7 @@ const fs = require('fs'); code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' }); -}); +} assert.throws( () => { @@ -24,6 +24,6 @@ assert.throws( }); const okInputs = [1, -1, '1', '-1', Date.now()]; -okInputs.forEach((input) => { +for (const input of okInputs) { fs._toUnixTimestamp(input); -}); +} diff --git a/test/parallel/test-fs-write-file-sync.js b/test/parallel/test-fs-write-file-sync.js index 26aa819a8107f0..4ead91530bb748 100644 --- a/test/parallel/test-fs-write-file-sync.js +++ b/test/parallel/test-fs-write-file-sync.js @@ -101,6 +101,22 @@ tmpdir.refresh(); assert.strictEqual(content, 'hello world!'); } +// Test writeFileSync with no flags +{ + const utf8Data = 'hello world!'; + for (const test of [ + { data: utf8Data }, + { data: utf8Data, options: { encoding: 'utf8' } }, + { data: Buffer.from(utf8Data, 'utf8').toString('hex'), options: { encoding: 'hex' } }, + ]) { + const file = tmpdir.resolve(`testWriteFileSyncNewFile_${Math.random()}.txt`); + fs.writeFileSync(file, test.data, test.options); + + const content = fs.readFileSync(file, { encoding: 'utf-8' }); + assert.strictEqual(content, utf8Data); + } +} + // Test writeFileSync with an invalid input { const file = tmpdir.resolve('testWriteFileSyncInvalid.txt'); diff --git a/test/parallel/test-fs-write-file-typedarrays.js b/test/parallel/test-fs-write-file-typedarrays.js index e398579f123ab1..a05385048ad48f 100644 --- a/test/parallel/test-fs-write-file-typedarrays.js +++ b/test/parallel/test-fs-write-file-typedarrays.js @@ -7,14 +7,8 @@ const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); const filename = tmpdir.resolve('test.txt'); - -const s = '南越国是前203年至前111年存在于岭南地区的一个国家,国都位于番禺,疆域包括今天中国的广东、' + - '广西两省区的大部份地区,福建省、湖南、贵州、云南的一小部份地区和越南的北部。' + - '南越国是秦朝灭亡后,由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。' + - '前196年和前179年,南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' + - '南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。南越国共存在93年,' + - '历经五代君主。南越国是岭南地区的第一个有记载的政权国家,采用封建制和郡县制并存的制度,' + - '它的建立保证了秦末乱世岭南地区社会秩序的稳定,有效的改善了岭南地区落后的政治、##济现状。\n'; +const fixtures = require('../common/fixtures'); +const s = fixtures.utf8TestText; // The length of the buffer should be a multiple of 8 // as required by common.getArrayBufferViews() diff --git a/test/parallel/test-fs-write-file.js b/test/parallel/test-fs-write-file.js index 404caa4636de04..120b9ec9ef6c1c 100644 --- a/test/parallel/test-fs-write-file.js +++ b/test/parallel/test-fs-write-file.js @@ -28,14 +28,8 @@ const tmpdir = require('../common/tmpdir'); tmpdir.refresh(); const filename = tmpdir.resolve('test.txt'); - -const s = '南越国是前203年至前111年存在于岭南地区的一个国家,国都位于番禺,疆域包括今天中国的广东、' + - '广西两省区的大部份地区,福建省、湖南、贵州、云南的一小部份地区和越南的北部。' + - '南越国是秦朝灭亡后,由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。' + - '前196年和前179年,南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' + - '南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。南越国共存在93年,' + - '历经五代君主。南越国是岭南地区的第一个有记载的政权国家,采用封建制和郡县制并存的制度,' + - '它的建立保证了秦末乱世岭南地区社会秩序的稳定,有效的改善了岭南地区落后的政治、##济现状。\n'; +const fixtures = require('../common/fixtures'); +const s = fixtures.utf8TestText; fs.writeFile(filename, s, common.mustSucceed(() => { fs.readFile(filename, common.mustSucceed((buffer) => { diff --git a/test/parallel/test-http-chunked.js b/test/parallel/test-http-chunked.js index 264a87be6adc7f..cfa34e3afedb74 100644 --- a/test/parallel/test-http-chunked.js +++ b/test/parallel/test-http-chunked.js @@ -23,16 +23,8 @@ const common = require('../common'); const assert = require('assert'); const http = require('http'); - -const UTF8_STRING = '南越国是前203年至前111年存在于岭南地区的一个国家,' + - '国都位于番禺,疆域包括今天中国的广东、广西两省区的大部份地区,福建省、湖南、' + - '贵州、云南的一小部份地区和越南的北部。南越国是秦朝灭亡后,' + - '由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。前196年和前179年,' + - '南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' + - '南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。' + - '南越国共存在93年,历经五代君主。南越国是岭南地区的第一个有记载的政权国家,' + - '采用封建制和郡县制并存的制度,它的建立保证了秦末乱世岭南地区社会秩序的稳定,' + - '有效的改善了岭南地区落后的政治、经济现状。'; +const fixtures = require('../common/fixtures'); +const UTF8_STRING = fixtures.utf8TestText; const server = http.createServer(common.mustCall((req, res) => { res.writeHead(200, { 'Content-Type': 'text/plain; charset=utf8' }); diff --git a/test/parallel/test-http2-session-settings.js b/test/parallel/test-http2-session-settings.js index 571ee87d93768c..bcf78c6aa512a0 100644 --- a/test/parallel/test-http2-session-settings.js +++ b/test/parallel/test-http2-session-settings.js @@ -104,15 +104,15 @@ server.listen( ['maxHeaderListSize', 2 ** 32], ['maxHeaderSize', -1], ['maxHeaderSize', 2 ** 32], - ].forEach((i) => { + ].forEach(([key, value]) => { const settings = {}; - settings[i[0]] = i[1]; + settings[key] = value; assert.throws( () => client.settings(settings), { name: 'RangeError', code: 'ERR_HTTP2_INVALID_SETTING_VALUE', - message: `Invalid value for setting "${i[0]}": ${i[1]}` + message: `Invalid value for setting "${key}": ${value}` } ); }); diff --git a/test/parallel/test-http2-single-headers.js b/test/parallel/test-http2-single-headers.js index c10623b9be7bf0..36ad8c3b419f4e 100644 --- a/test/parallel/test-http2-single-headers.js +++ b/test/parallel/test-http2-single-headers.js @@ -27,7 +27,7 @@ server.on('stream', common.mustNotCall()); server.listen(0, common.mustCall(() => { const client = http2.connect(`http://localhost:${server.address().port}`); - singles.forEach((i) => { + for (const i of singles) { assert.throws( () => client.request({ [i]: 'abc', [i.toUpperCase()]: 'xyz' }), { @@ -45,7 +45,7 @@ server.listen(0, common.mustCall(() => { message: `Header field "${i}" must only have a single value` } ); - }); + } server.close(); client.close(); diff --git a/test/parallel/test-https-simple.js b/test/parallel/test-https-simple.js index a65883162f60a2..b0562a1cd98174 100644 --- a/test/parallel/test-https-simple.js +++ b/test/parallel/test-https-simple.js @@ -45,13 +45,13 @@ const serverCallback = common.mustCall(function(req, res) { }); const invalid_options = [ 'foo', 42, true, [] ]; -invalid_options.forEach((option) => { +for (const option of invalid_options) { assert.throws(() => { new https.Server(option); }, { code: 'ERR_INVALID_ARG_TYPE', }); -}); +} const server = https.createServer(options, serverCallback); diff --git a/test/parallel/test-icu-env.js b/test/parallel/test-icu-env.js index 45b9fea8dbd8c8..d453281bd726f8 100644 --- a/test/parallel/test-icu-env.js +++ b/test/parallel/test-icu-env.js @@ -123,19 +123,19 @@ if (isMockable) { locales.map((LANG) => runEnvOutside({ LANG, TZ: 'Europe/Zurich' }, 'new Date(333333333333).toLocaleString()')), [ '7/25/1980, 1:35:33 AM', - '1980/7/25 01:35:33', + '1980/7/25 1:35:33', '25/7/1980, 1:35:33 am', '25/7/1980, 1:35:33', - '25/07/1980 01:35:33', + '25/07/1980 1:35:33', '٢٥‏/٧‏/١٩٨٠، ١:٣٥:٣٣ ص', '২৫/৭/১৯৮০, ১:৩৫:৩৩ AM', - '25.07.1980, 01:35:33', - '25/07/1980, 01:35:33', + '25.07.1980, 1:35:33', + '25/07/1980, 1:35:33', '25/7/1980، 1:35:33 AM', '25/7/1980, 01.35.33', - '25.7.1980, 01:35:33', + '25.7.1980, 1:35:33', '1980/7/25 1:35:33', - '25/7/1980 01:35:33', + '25/7/1980 1:35:33', '२५/७/१९८०, १:३५:३३ AM', '25/7/1980 1:35:33 AM', ] diff --git a/test/parallel/test-macos-app-sandbox.js b/test/parallel/test-macos-app-sandbox.js index 91485b75983f84..60ad67b3db3790 100644 --- a/test/parallel/test-macos-app-sandbox.js +++ b/test/parallel/test-macos-app-sandbox.js @@ -17,6 +17,10 @@ const nodeBinary = process.execPath; tmpdir.refresh(); +if (!tmpdir.hasEnoughSpace(120 * 1024 * 1024)) { + common.skip('Available disk space < 120MB'); +} + const appBundlePath = tmpdir.resolve('node_sandboxed.app'); const appBundleContentPath = path.join(appBundlePath, 'Contents'); const appExecutablePath = path.join( diff --git a/test/parallel/test-module-binding.js b/test/parallel/test-module-binding.js deleted file mode 100644 index d7f76d6ef5b153..00000000000000 --- a/test/parallel/test-module-binding.js +++ /dev/null @@ -1,29 +0,0 @@ -// Flags: --expose-internals -'use strict'; -require('../common'); -const fixtures = require('../common/fixtures'); -const { internalBinding } = require('internal/test/binding'); -const { filterOwnProperties } = require('internal/util'); -const { internalModuleReadJSON } = internalBinding('fs'); -const { readFileSync } = require('fs'); -const { strictEqual, deepStrictEqual } = require('assert'); - -{ - strictEqual(internalModuleReadJSON('nosuchfile'), undefined); -} -{ - strictEqual(internalModuleReadJSON(fixtures.path('empty.txt')), ''); -} -{ - strictEqual(internalModuleReadJSON(fixtures.path('empty-with-bom.txt')), ''); -} -{ - const filename = fixtures.path('require-bin/package.json'); - const returnValue = JSON.parse(internalModuleReadJSON(filename)); - const file = JSON.parse(readFileSync(filename, 'utf-8')); - const expectedValue = filterOwnProperties(file, ['name', 'main', 'exports', 'imports', 'type']); - deepStrictEqual({ - __proto__: null, - ...returnValue, - }, expectedValue); -} diff --git a/test/parallel/test-node-output-v8-warning.mjs b/test/parallel/test-node-output-v8-warning.mjs index 7278a03ce178e7..8e497739d21c70 100644 --- a/test/parallel/test-node-output-v8-warning.mjs +++ b/test/parallel/test-node-output-v8-warning.mjs @@ -13,6 +13,7 @@ describe('v8 output', { concurrency: true }, () => { .replaceAll(/:\d+/g, ':*') .replaceAll('/', '*') .replaceAll('*test*', '*') + .replaceAll(/.*?\*fixtures\*v8\*/g, '(node:*) V8: *') // Replace entire path before fixtures/v8 .replaceAll('*fixtures*v8*', '*') .replaceAll('node --', '* --'); } diff --git a/test/parallel/test-path-extname.js b/test/parallel/test-path-extname.js index 47b327d370d78e..be5a6316b0c7c3 100644 --- a/test/parallel/test-path-extname.js +++ b/test/parallel/test-path-extname.js @@ -6,7 +6,7 @@ const path = require('path'); const failures = []; const slashRE = /\//g; -[ +const testPaths = [ [__filename, '.js'], ['', ''], ['/path/to/file', ''], @@ -50,10 +50,13 @@ const slashRE = /\//g; ['file//', ''], ['file./', '.'], ['file.//', '.'], -].forEach((test) => { - const expected = test[1]; - [path.posix.extname, path.win32.extname].forEach((extname) => { - let input = test[0]; +]; + +for (const testPath of testPaths) { + const expected = testPath[1]; + const extNames = [path.posix.extname, path.win32.extname]; + for (const extname of extNames) { + let input = testPath[0]; let os; if (extname === path.win32.extname) { input = input.replace(slashRE, '\\'); @@ -66,16 +69,14 @@ const slashRE = /\//g; JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; if (actual !== expected) failures.push(`\n${message}`); - }); - { - const input = `C:${test[0].replace(slashRE, '\\')}`; - const actual = path.win32.extname(input); - const message = `path.win32.extname(${JSON.stringify(input)})\n expect=${ - JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; - if (actual !== expected) - failures.push(`\n${message}`); } -}); + const input = `C:${testPath[0].replace(slashRE, '\\')}`; + const actual = path.win32.extname(input); + const message = `path.win32.extname(${JSON.stringify(input)})\n expect=${ + JSON.stringify(expected)}\n actual=${JSON.stringify(actual)}`; + if (actual !== expected) + failures.push(`\n${message}`); +} assert.strictEqual(failures.length, 0, failures.join('')); // On Windows, backslash is a path separator. diff --git a/test/parallel/test-path.js b/test/parallel/test-path.js index 7a5f3d4715a7f2..0cb55d42aa2999 100644 --- a/test/parallel/test-path.js +++ b/test/parallel/test-path.js @@ -35,8 +35,8 @@ function fail(fn) { }, { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError' }); } -typeErrorTests.forEach((test) => { - [path.posix, path.win32].forEach((namespace) => { +for (const test of typeErrorTests) { + for (const namespace of [path.posix, path.win32]) { fail(namespace.join, test); fail(namespace.resolve, test); fail(namespace.normalize, test); @@ -52,8 +52,8 @@ typeErrorTests.forEach((test) => { if (test !== undefined) { fail(namespace.basename, 'foo', test); } - }); -}); + } +} // path.sep tests // windows diff --git a/test/parallel/test-permission-fs-symlink-relative.js b/test/parallel/test-permission-fs-symlink-relative.js new file mode 100644 index 00000000000000..e7cd99ad5f227a --- /dev/null +++ b/test/parallel/test-permission-fs-symlink-relative.js @@ -0,0 +1,27 @@ +// Flags: --experimental-permission --allow-fs-read=* --allow-fs-write=* +'use strict'; + +const common = require('../common'); +common.skipIfWorker(); + +const assert = require('assert'); +const { symlinkSync, symlink, promises: { symlink: symlinkAsync } } = require('fs'); + +const error = { + code: 'ERR_ACCESS_DENIED', + message: /relative symbolic link target/, +}; + +for (const targetString of ['a', './b/c', '../d', 'e/../f', 'C:drive-relative', 'ntfs:alternate']) { + for (const target of [targetString, Buffer.from(targetString)]) { + for (const path of [__filename, __dirname, process.execPath]) { + assert.throws(() => symlinkSync(target, path), error); + symlink(target, path, common.mustCall((err) => { + assert(err); + assert.strictEqual(err.code, error.code); + assert.match(err.message, error.message); + })); + assert.rejects(() => symlinkAsync(target, path), error).then(common.mustCall()); + } + } +} diff --git a/test/parallel/test-pipe-abstract-socket.js b/test/parallel/test-pipe-abstract-socket.js new file mode 100644 index 00000000000000..baf76d6b82cf59 --- /dev/null +++ b/test/parallel/test-pipe-abstract-socket.js @@ -0,0 +1,34 @@ +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const net = require('net'); + +if (!common.isLinux) common.skip(); + +const path = '\0abstract'; +const message = /can not set readableAll or writableAllt to true when path is abstract unix socket/; + +assert.throws(() => { + const server = net.createServer(common.mustNotCall()); + server.listen({ + path, + readableAll: true + }); +}, message); + +assert.throws(() => { + const server = net.createServer(common.mustNotCall()); + server.listen({ + path, + writableAll: true + }); +}, message); + +assert.throws(() => { + const server = net.createServer(common.mustNotCall()); + server.listen({ + path, + readableAll: true, + writableAll: true + }); +}, message); diff --git a/test/parallel/test-process-env-allowed-flags-are-documented.js b/test/parallel/test-process-env-allowed-flags-are-documented.js index dc4c704b6f0b88..2746fdfc086f99 100644 --- a/test/parallel/test-process-env-allowed-flags-are-documented.js +++ b/test/parallel/test-process-env-allowed-flags-are-documented.js @@ -106,6 +106,8 @@ assert(undocumented.delete('--no-node-snapshot')); assert(undocumented.delete('--loader')); assert(undocumented.delete('--verify-base-objects')); assert(undocumented.delete('--no-verify-base-objects')); +assert(undocumented.delete('--trace-promises')); +assert(undocumented.delete('--no-trace-promises')); // Remove negated versions of the flags. for (const flag of undocumented) { diff --git a/test/parallel/test-process-versions.js b/test/parallel/test-process-versions.js index 98dbda9ee8f20b..cf35aa67a42cdb 100644 --- a/test/parallel/test-process-versions.js +++ b/test/parallel/test-process-versions.js @@ -18,6 +18,7 @@ const expected_keys = [ 'llhttp', 'uvwasi', 'acorn', + 'simdjson', 'simdutf', 'ada', 'cjs_module_lexer', diff --git a/test/parallel/test-process-warnings.mjs b/test/parallel/test-process-warnings.mjs new file mode 100644 index 00000000000000..e5712b38d633b8 --- /dev/null +++ b/test/parallel/test-process-warnings.mjs @@ -0,0 +1,163 @@ +import { spawnPromisified } from '../common/index.mjs'; +import * as fixtures from '../common/fixtures.mjs'; +import { describe, it } from 'node:test'; +import assert from 'node:assert'; + +const fixturePath = fixtures.path('disable-warning.js'); +const fixturePathWorker = fixtures.path('disable-warning-worker.js'); +const dep1Message = /\(node:\d+\) \[DEP1\] DeprecationWarning/; +const dep2Message = /\(node:\d+\) \[DEP2\] DeprecationWarning/; +const experimentalWarningMessage = /\(node:\d+\) ExperimentalWarning/; + +describe('process warnings', { concurrency: true }, () => { + + it('should emit all warnings by default', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + fixturePath, + ]); + + assert.strictEqual(stdout, ''); + assert.match(stderr, dep1Message); + assert.match(stderr, dep2Message); + assert.match(stderr, experimentalWarningMessage); + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + }); + + describe('--no-warnings', { concurrency: true }, () => { + it('should silence all warnings by default', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + '--no-warnings', + fixturePath, + ]); + + assert.strictEqual(stdout, ''); + assert.doesNotMatch(stderr, dep1Message); + assert.doesNotMatch(stderr, dep2Message); + assert.doesNotMatch(stderr, experimentalWarningMessage); + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + }); + }); + + describe('--no-deprecation', { concurrency: true }, () => { + it('should silence all deprecation warnings', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + '--no-deprecation', + fixturePath, + ]); + + assert.strictEqual(stdout, ''); + assert.doesNotMatch(stderr, dep1Message); + assert.doesNotMatch(stderr, dep2Message); + assert.match(stderr, experimentalWarningMessage); + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + }); + }); + + describe('--disable-warning', { concurrency: true }, () => { + it('should silence deprecation warning DEP1', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + '--disable-warning=DEP1', + fixturePath, + ]); + + assert.strictEqual(stdout, ''); + assert.doesNotMatch(stderr, dep1Message); + assert.match(stderr, dep2Message); + assert.match(stderr, experimentalWarningMessage); + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + }); + + it('should silence deprecation warnings DEP1 and DEP2', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + '--disable-warning=DEP1', + '--disable-warning=DEP2', + fixturePath, + ]); + + assert.strictEqual(stdout, ''); + assert.doesNotMatch(stderr, dep1Message); + assert.doesNotMatch(stderr, dep2Message); + assert.match(stderr, experimentalWarningMessage); + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + }); + + it('should silence all deprecation warnings using type DeprecationWarning', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + '--disable-warning=DeprecationWarning', + fixturePath, + ]); + + assert.strictEqual(stdout, ''); + assert.doesNotMatch(stderr, dep1Message); + assert.doesNotMatch(stderr, dep2Message); + assert.match(stderr, experimentalWarningMessage); + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + }); + + it('should silence all experimental warnings using type ExperimentalWarning', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + '--disable-warning=ExperimentalWarning', + fixturePath, + ]); + + assert.strictEqual(stdout, ''); + assert.match(stderr, dep1Message); + assert.match(stderr, dep2Message); + assert.doesNotMatch(stderr, experimentalWarningMessage); + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + }); + + it('should pass down option to worker', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + '--disable-warning=DEP2', + fixturePathWorker, + ]); + + assert.strictEqual(stdout, ''); + assert.match(stderr, dep1Message); + assert.doesNotMatch(stderr, dep2Message); + assert.match(stderr, experimentalWarningMessage); + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + }); + + it('should not support a comma separated list', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + '--disable-warning=DEP1,DEP2', + fixturePathWorker, + ]); + + assert.strictEqual(stdout, ''); + assert.match(stderr, dep1Message); + assert.match(stderr, dep2Message); + assert.match(stderr, experimentalWarningMessage); + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + }); + + it('should be specifiable in NODE_OPTIONS', async () => { + const { stdout, stderr, code, signal } = await spawnPromisified(process.execPath, [ + fixturePath, + ], { + env: { + ...process.env, + NODE_OPTIONS: '--disable-warning=DEP2' + } + }); + + assert.strictEqual(stdout, ''); + assert.match(stderr, dep1Message); + assert.doesNotMatch(stderr, dep2Message); + assert.match(stderr, experimentalWarningMessage); + assert.strictEqual(code, 0); + assert.strictEqual(signal, null); + }); + }); +}); diff --git a/test/parallel/test-readline-keys.js b/test/parallel/test-readline-keys.js index 01757b302a7991..28b5846d4eb58f 100644 --- a/test/parallel/test-readline-keys.js +++ b/test/parallel/test-readline-keys.js @@ -34,9 +34,9 @@ function addTest(sequences, expectedKeys) { keys = []; - sequences.forEach((sequence) => { + for (const sequence of sequences) { fi.write(sequence); - }); + } assert.deepStrictEqual(keys, expectedKeys); } diff --git a/test/parallel/test-runner-cli.js b/test/parallel/test-runner-cli.js index 34ce67caa5e6a5..ab6078a4a05d74 100644 --- a/test/parallel/test-runner-cli.js +++ b/test/parallel/test-runner-cli.js @@ -104,7 +104,7 @@ const testFixtures = fixtures.path('test-runner'); ['--print', 'console.log("should not print")', '--test'], ]; - flags.forEach((args) => { + for (const args of flags) { const child = spawnSync(process.execPath, args); assert.notStrictEqual(child.status, 0); @@ -112,7 +112,7 @@ const testFixtures = fixtures.path('test-runner'); assert.strictEqual(child.stdout.toString(), ''); const stderr = child.stderr.toString(); assert.match(stderr, /--test/); - }); + } } { diff --git a/test/parallel/test-runner-mock-timers.js b/test/parallel/test-runner-mock-timers.js index fae520b94cdf67..eb5cec84e122f2 100644 --- a/test/parallel/test-runner-mock-timers.js +++ b/test/parallel/test-runner-mock-timers.js @@ -479,6 +479,59 @@ describe('Mock Timers Test Suite', () => { code: 'ERR_INVALID_ARG_TYPE', }); }); + + // Test for https://github.com/nodejs/node/issues/50365 + it('should not affect other timers when aborting', async (t) => { + const f1 = t.mock.fn(); + const f2 = t.mock.fn(); + t.mock.timers.enable({ apis: ['setTimeout'] }); + const ac = new AbortController(); + + // id 1 & pos 1 in priority queue + nodeTimersPromises.setTimeout(100, undefined, { signal: ac.signal }).then(f1, f1); + // id 2 & pos 1 in priority queue (id 1 is moved to pos 2) + nodeTimersPromises.setTimeout(50).then(f2, f2); + + ac.abort(); // BUG: will remove timer at pos 1 not timer with id 1! + + t.mock.timers.runAll(); + await nodeTimersPromises.setImmediate(); // let promises settle + + // First setTimeout is aborted + assert.strictEqual(f1.mock.callCount(), 1); + assert.strictEqual(f1.mock.calls[0].arguments[0].code, 'ABORT_ERR'); + + // Second setTimeout should resolve, but never settles, because it was eronously removed by ac.abort() + assert.strictEqual(f2.mock.callCount(), 1); + }); + + // Test for https://github.com/nodejs/node/issues/50365 + it('should not affect other timers when aborted after triggering', async (t) => { + const f1 = t.mock.fn(); + const f2 = t.mock.fn(); + t.mock.timers.enable({ apis: ['setTimeout'] }); + const ac = new AbortController(); + + // id 1 & pos 1 in priority queue + nodeTimersPromises.setTimeout(50, true, { signal: ac.signal }).then(f1, f1); + // id 2 & pos 2 in priority queue + nodeTimersPromises.setTimeout(100).then(f2, f2); + + // First setTimeout resolves + t.mock.timers.tick(50); + await nodeTimersPromises.setImmediate(); // let promises settle + assert.strictEqual(f1.mock.callCount(), 1); + assert.strictEqual(f1.mock.calls[0].arguments.length, 1); + assert.strictEqual(f1.mock.calls[0].arguments[0], true); + + // Now timer with id 2 will be at pos 1 in priority queue + ac.abort(); // BUG: will remove timer at pos 1 not timer with id 1! + + // Second setTimeout should resolve, but never settles, because it was eronously removed by ac.abort() + t.mock.timers.runAll(); + await nodeTimersPromises.setImmediate(); // let promises settle + assert.strictEqual(f2.mock.callCount(), 1); + }); }); describe('setInterval Suite', () => { @@ -626,6 +679,38 @@ describe('Mock Timers Test Suite', () => { }); assert.strictEqual(numIterations, expectedIterations); }); + + // Test for https://github.com/nodejs/node/issues/50381 + it('should use the mocked interval', (t) => { + t.mock.timers.enable({ apis: ['setInterval'] }); + const fn = t.mock.fn(); + setInterval(fn, 1000); + assert.strictEqual(fn.mock.callCount(), 0); + t.mock.timers.tick(1000); + assert.strictEqual(fn.mock.callCount(), 1); + t.mock.timers.tick(1); + t.mock.timers.tick(1); + t.mock.timers.tick(1); + assert.strictEqual(fn.mock.callCount(), 1); + }); + + // Test for https://github.com/nodejs/node/issues/50382 + it('should not prevent due timers to be processed', async (t) => { + t.mock.timers.enable({ apis: ['setInterval', 'setTimeout'] }); + const f1 = t.mock.fn(); + const f2 = t.mock.fn(); + + setInterval(f1, 1000); + setTimeout(f2, 1001); + + assert.strictEqual(f1.mock.callCount(), 0); + assert.strictEqual(f2.mock.callCount(), 0); + + t.mock.timers.tick(1001); + + assert.strictEqual(f1.mock.callCount(), 1); + assert.strictEqual(f2.mock.callCount(), 1); + }); }); }); }); diff --git a/test/parallel/test-runner-output.mjs b/test/parallel/test-runner-output.mjs index 0e41ff101b843f..e40ce896bff465 100644 --- a/test/parallel/test-runner-output.mjs +++ b/test/parallel/test-runner-output.mjs @@ -15,7 +15,7 @@ function replaceTestDuration(str) { } const color = '(\\[\\d+m)'; -const stackTraceBasePath = new RegExp(`${color}\\(${process.cwd()}/?${color}(.*)${color}\\)`, 'g'); +const stackTraceBasePath = new RegExp(`${color}\\(${process.cwd().replaceAll(/[\\^$*+?.()|[\]{}]/g, '\\$&')}/?${color}(.*)${color}\\)`, 'g'); function replaceSpecDuration(str) { return str diff --git a/test/parallel/test-runner-run.mjs b/test/parallel/test-runner-run.mjs index 0d7aa346409647..c712f500153b42 100644 --- a/test/parallel/test-runner-run.mjs +++ b/test/parallel/test-runner-run.mjs @@ -176,6 +176,17 @@ describe('require(\'node:test\').run', { concurrency: true }, () => { }); describe('AbortSignal', () => { + it('should accept a signal', async () => { + const stream = run({ signal: AbortSignal.timeout(50), files: [ + fixtures.path('test-runner', 'never_ending_sync.js'), + fixtures.path('test-runner', 'never_ending_async.js'), + ] }); + stream.on('test:fail', common.mustCall(2)); + stream.on('test:pass', common.mustNotCall()); + // eslint-disable-next-line no-unused-vars + for await (const _ of stream); + }); + it('should stop watch mode when abortSignal aborts', async () => { const controller = new AbortController(); const result = await run({ @@ -455,4 +466,37 @@ describe('require(\'node:test\').run', { concurrency: true }, () => { })); }); }); + + it('should run with no files', async () => { + const stream = run({ + files: undefined + }).compose(tap); + stream.on('test:fail', common.mustNotCall()); + stream.on('test:pass', common.mustNotCall()); + + // eslint-disable-next-line no-unused-vars + for await (const _ of stream); + }); + + it('should run with no files and use spec reporter', async () => { + const stream = run({ + files: undefined + }).compose(spec); + stream.on('test:fail', common.mustNotCall()); + stream.on('test:pass', common.mustNotCall()); + + // eslint-disable-next-line no-unused-vars + for await (const _ of stream); + }); + + it('should run with no files and use dot reporter', async () => { + const stream = run({ + files: undefined + }).compose(dot); + stream.on('test:fail', common.mustNotCall()); + stream.on('test:pass', common.mustNotCall()); + + // eslint-disable-next-line no-unused-vars + for await (const _ of stream); + }); }); diff --git a/test/parallel/test-shadow-realm-allowed-builtin-modules.js b/test/parallel/test-shadow-realm-allowed-builtin-modules.js new file mode 100644 index 00000000000000..2aa550ac7bb55b --- /dev/null +++ b/test/parallel/test-shadow-realm-allowed-builtin-modules.js @@ -0,0 +1,21 @@ +// Flags: --experimental-shadow-realm +'use strict'; +const common = require('../common'); +const assert = require('assert'); + +async function main() { + // Verifies that builtin modules can not be imported in the ShadowRealm. + const realm = new ShadowRealm(); + // The error object created inside the ShadowRealm with the error code + // property is not copied on the realm boundary. Only the error message + // is copied. Simply check the error message here. + await assert.rejects(realm.importValue('fs', 'readFileSync'), { + message: /Cannot find package 'fs'/, + }); + // As above, we can only validate the error message, not the error code. + await assert.rejects(realm.importValue('node:fs', 'readFileSync'), { + message: /No such built-in module: node:fs/, + }); +} + +main().then(common.mustCall()); diff --git a/test/parallel/test-shadow-realm-custom-loaders.js b/test/parallel/test-shadow-realm-custom-loaders.js new file mode 100644 index 00000000000000..80cda74bb88940 --- /dev/null +++ b/test/parallel/test-shadow-realm-custom-loaders.js @@ -0,0 +1,26 @@ +'use strict'; +const common = require('../common'); +const fixtures = require('../common/fixtures'); +const assert = require('assert'); + +const commonArgs = [ + '--experimental-shadow-realm', + '--no-warnings', +]; + +async function main() { + // Verifies that custom loaders are not enabled in the ShadowRealm. + const child = await common.spawnPromisified(process.execPath, [ + ...commonArgs, + '--experimental-loader', + fixtures.fileURL('es-module-loaders', 'loader-resolve-shortcircuit.mjs'), + '--experimental-loader', + fixtures.fileURL('es-module-loaders', 'loader-load-foo-or-42.mjs'), + fixtures.path('es-module-shadow-realm', 'custom-loaders.js'), + ]); + + assert.strictEqual(child.stderr, ''); + assert.strictEqual(child.code, 0); +} + +main().then(common.mustCall()); diff --git a/test/parallel/test-shadow-realm-gc-module.js b/test/parallel/test-shadow-realm-gc-module.js new file mode 100644 index 00000000000000..6077bf03146d87 --- /dev/null +++ b/test/parallel/test-shadow-realm-gc-module.js @@ -0,0 +1,18 @@ +// Flags: --experimental-shadow-realm --max-old-space-size=20 +'use strict'; + +/** + * Verifying modules imported by ShadowRealm instances can be correctly + * garbage collected. + */ + +const common = require('../common'); +const fixtures = require('../common/fixtures'); +const { runAndBreathe } = require('../common/gc'); + +const mod = fixtures.fileURL('es-module-shadow-realm', 'state-counter.mjs'); + +runAndBreathe(async () => { + const realm = new ShadowRealm(); + await realm.importValue(mod, 'getCounter'); +}, 100).then(common.mustCall()); diff --git a/test/parallel/test-shadow-realm-gc.js b/test/parallel/test-shadow-realm-gc.js index 83f793fd89222f..c6de4a32a88faa 100644 --- a/test/parallel/test-shadow-realm-gc.js +++ b/test/parallel/test-shadow-realm-gc.js @@ -6,14 +6,16 @@ */ const common = require('../common'); +const { runAndBreathe } = require('../common/gc'); const assert = require('assert'); const { isMainThread, Worker } = require('worker_threads'); -for (let i = 0; i < 100; i++) { +runAndBreathe(() => { const realm = new ShadowRealm(); realm.evaluate('new TextEncoder(); 1;'); -} +}, 100).then(common.mustCall()); +// Test it in worker too. if (isMainThread) { const worker = new Worker(__filename); worker.on('exit', common.mustCall((code) => { diff --git a/test/parallel/test-shadow-realm-import-value-resolve.js b/test/parallel/test-shadow-realm-import-value-resolve.js new file mode 100644 index 00000000000000..ee1c17d67c12f1 --- /dev/null +++ b/test/parallel/test-shadow-realm-import-value-resolve.js @@ -0,0 +1,28 @@ +// Flags: --experimental-shadow-realm +'use strict'; +const common = require('../common'); +const assert = require('assert'); +const path = require('path'); + +common.skipIfWorker('process.chdir is not supported in workers.'); + +async function main() { + const realm = new ShadowRealm(); + + const dirname = __dirname; + // Set process cwd to the parent directory of __dirname. + const cwd = path.dirname(dirname); + process.chdir(cwd); + // Hardcode the relative path to ensure the string is still a valid relative + // URL string. + const relativePath = './fixtures/es-module-shadow-realm/re-export-state-counter.mjs'; + + // Make sure that the module can not be resolved relative to __filename. + assert.throws(() => require.resolve(relativePath), { code: 'MODULE_NOT_FOUND' }); + + // Resolve relative to the current working directory. + const getCounter = await realm.importValue(relativePath, 'getCounter'); + assert.strictEqual(typeof getCounter, 'function'); +} + +main().then(common.mustCall()); diff --git a/test/parallel/test-shadow-realm-module.js b/test/parallel/test-shadow-realm-module.js new file mode 100644 index 00000000000000..bc0c2c04f69f2b --- /dev/null +++ b/test/parallel/test-shadow-realm-module.js @@ -0,0 +1,29 @@ +// Flags: --experimental-shadow-realm +'use strict'; +const common = require('../common'); +const fixtures = require('../common/fixtures'); +const assert = require('assert'); + +async function main() { + const realm = new ShadowRealm(); + const mod = fixtures.fileURL('es-module-shadow-realm', 'state-counter.mjs'); + const getCounter = await realm.importValue(mod, 'getCounter'); + assert.strictEqual(getCounter(), 0); + const getCounter1 = await realm.importValue(mod, 'getCounter'); + // Returned value is a newly wrapped function. + assert.notStrictEqual(getCounter, getCounter1); + // Verify that the module state is shared between two `importValue` calls. + assert.strictEqual(getCounter1(), 1); + assert.strictEqual(getCounter(), 2); + + const { getCounter: getCounterThisRealm } = await import(mod); + assert.notStrictEqual(getCounterThisRealm, getCounter); + // Verify that the module state is not shared between two realms. + assert.strictEqual(getCounterThisRealm(), 0); + assert.strictEqual(getCounter(), 3); + + // Verify that shadow realm rejects to import a non-existing module. + await assert.rejects(realm.importValue('non-exists', 'exports'), TypeError); +} + +main().then(common.mustCall()); diff --git a/test/parallel/test-shadow-realm-preload-module.js b/test/parallel/test-shadow-realm-preload-module.js new file mode 100644 index 00000000000000..ebd29c1c4a8b80 --- /dev/null +++ b/test/parallel/test-shadow-realm-preload-module.js @@ -0,0 +1,20 @@ +'use strict'; +const common = require('../common'); +const fixtures = require('../common/fixtures'); +const { spawnSyncAndExitWithoutError } = require('../common/child_process'); + +const commonArgs = [ + '--experimental-shadow-realm', +]; + +async function main() { + // Verifies that --require preload modules are not enabled in the ShadowRealm. + spawnSyncAndExitWithoutError(process.execPath, [ + ...commonArgs, + '--require', + fixtures.path('es-module-shadow-realm', 'preload.js'), + fixtures.path('es-module-shadow-realm', 'preload-main.js'), + ]); +} + +main().then(common.mustCall()); diff --git a/test/parallel/test-source-map-enable.js b/test/parallel/test-source-map-enable.js index 5038aff360e518..46c25d26cfa8e7 100644 --- a/test/parallel/test-source-map-enable.js +++ b/test/parallel/test-source-map-enable.js @@ -289,6 +289,30 @@ function nextdir() { assert.match(output.stderr.toString(), /at functionC.*10:3/); } +// Properly converts Windows absolute paths to absolute URLs. +// Refs: https://github.com/nodejs/node/issues/50523 +// Refs: https://github.com/TypeStrong/ts-node/issues/1769 +{ + const coverageDirectory = nextdir(); + const output = spawnSync(process.execPath, [ + require.resolve('../fixtures/source-map/ts-node-win32.js'), + ], { env: { ...process.env, NODE_V8_COVERAGE: coverageDirectory } }); + assert.strictEqual(output.status, 0); + assert.strictEqual(output.stderr.toString(), ''); + const sourceMap = getSourceMapFromCache( + 'ts-node-win32.js', + coverageDirectory + ); + // base64 JSON should have been decoded, the D: in the sources field should + // have been taken as the drive letter on Windows, the scheme on POSIX. + assert.strictEqual( + sourceMap.data.sources[0], + common.isWindows ? + 'file:///D:/workspaces/node/test/fixtures/source-map/ts-node.ts' : + 'd:/workspaces/node/test/fixtures/source-map/ts-node.ts' + ); +} + // Stores and applies source map associated with file that throws while // being required. { diff --git a/test/parallel/test-stdin-from-file.js b/test/parallel/test-stdin-from-file.js index 7c263d1858a556..67404c84c9830b 100644 --- a/test/parallel/test-stdin-from-file.js +++ b/test/parallel/test-stdin-from-file.js @@ -8,22 +8,10 @@ const fs = require('fs'); const stdoutScript = fixtures.path('echo-close-check.js'); const tmpFile = tmpdir.resolve('stdin.txt'); +const string = fixtures.utf8TestText; const cmd = `"${process.argv[0]}" "${stdoutScript}" < "${tmpFile}"`; -const string = 'abc\nümlaut.\nsomething else\n' + - '南越国是前203年至前111年存在于岭南地区的一个国家,国都位于番禺,' + - '疆域包括今天中国的广东、广西两省区的大部份地区,福建省、湖南、贵州、' + - '云南的一小部份地区和越南的北部。南越国是秦朝灭亡后,' + - '由南海郡尉赵佗于前203年起兵兼并桂林郡和象郡后建立。前196年和前179年,' + - '南越国曾先后两次名义上臣属于西汉,成为西汉的“外臣”。前112年,' + - '南越国末代君主赵建德与西汉发生战争,被汉武帝于前111年所灭。南越国共存在93年,' + - '历经五代君主。南越国是岭南地区的第一个有记载的政权国家,' + - '采用封建制和郡县制并存的制度,' + - '它的建立保证了秦末乱世岭南地区社会秩序的稳定,' + - '有效的改善了岭南地区落后的政治、##济现状。\n'; - - tmpdir.refresh(); console.log(`${cmd}\n\n`); diff --git a/test/parallel/test-tls-getprotocol.js b/test/parallel/test-tls-getprotocol.js index 7da2f60676d00e..571f400cea5746 100644 --- a/test/parallel/test-tls-getprotocol.js +++ b/test/parallel/test-tls-getprotocol.js @@ -35,7 +35,7 @@ const serverConfig = { const server = tls.createServer(serverConfig, common.mustCall(clientConfigs.length)) .listen(0, common.localhostIPv4, function() { let connected = 0; - clientConfigs.forEach(function(v) { + for (const v of clientConfigs) { tls.connect({ host: common.localhostIPv4, port: server.address().port, @@ -51,5 +51,5 @@ const server = tls.createServer(serverConfig, common.mustCall(clientConfigs.leng if (++connected === clientConfigs.length) server.close(); })); - }); + } }); diff --git a/test/parallel/test-tls-reduced-SECLEVEL-in-cipher.js b/test/parallel/test-tls-reduced-SECLEVEL-in-cipher.js new file mode 100644 index 00000000000000..9f4458e0a7d671 --- /dev/null +++ b/test/parallel/test-tls-reduced-SECLEVEL-in-cipher.js @@ -0,0 +1,26 @@ +'use strict'; +const common = require('../common'); + +if (!common.hasCrypto) + common.skip('missing crypto'); + +const assert = require('assert'); +const tls = require('tls'); +const fixtures = require('../common/fixtures'); + +{ + const options = { + key: fixtures.readKey('agent11-key.pem'), + cert: fixtures.readKey('agent11-cert.pem'), + ciphers: 'DEFAULT' + }; + + // Should throw error as key is too small because openssl v3 doesn't allow it + assert.throws(() => tls.createServer(options, common.mustNotCall()), + /key too small/i); + + // Reducing SECLEVEL to 0 in ciphers retains compatibility with previous versions of OpenSSL like using a small key. + // As ciphers are getting set before the cert and key get loaded. + options.ciphers = 'DEFAULT:@SECLEVEL=0'; + assert.ok(tls.createServer(options, common.mustNotCall())); +} diff --git a/test/parallel/test-tls-snicallback-error.js b/test/parallel/test-tls-snicallback-error.js index 1e1c82225309b4..aac7cb9f96704a 100644 --- a/test/parallel/test-tls-snicallback-error.js +++ b/test/parallel/test-tls-snicallback-error.js @@ -4,11 +4,21 @@ if (!common.hasCrypto) common.skip('missing crypto'); const assert = require('assert'); +const net = require('net'); const tls = require('tls'); -['fhqwhgads', 42, {}, []].forEach((testValue) => { - assert.throws( - () => { tls.createServer({ SNICallback: testValue }); }, - { code: 'ERR_INVALID_ARG_TYPE', message: /\boptions\.SNICallback\b/ } - ); -}); +for (const SNICallback of ['fhqwhgads', 42, {}, []]) { + assert.throws(() => { + tls.createServer({ SNICallback }); + }, { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + }); + + assert.throws(() => { + new tls.TLSSocket(new net.Socket(), { isServer: true, SNICallback }); + }, { + code: 'ERR_INVALID_ARG_TYPE', + name: 'TypeError', + }); +} diff --git a/test/parallel/test-trace-events-vm.js b/test/parallel/test-trace-events-vm.js index b52d22368d07d2..d85a2cefd645af 100644 --- a/test/parallel/test-trace-events-vm.js +++ b/test/parallel/test-trace-events-vm.js @@ -32,10 +32,10 @@ if (process.argv[2] === 'child') { fs.readFile(file, common.mustCall((err, data) => { const traces = JSON.parse(data.toString()).traceEvents .filter((trace) => trace.cat !== '__metadata'); - traces.forEach((trace) => { + for (const trace of traces) { assert.strictEqual(trace.pid, proc.pid); assert(names.includes(trace.name)); - }); + } })); })); } diff --git a/test/parallel/test-url-relative.js b/test/parallel/test-url-relative.js index 9a398a0e508f33..9dfe954c1fe854 100644 --- a/test/parallel/test-url-relative.js +++ b/test/parallel/test-url-relative.js @@ -55,13 +55,15 @@ const relativeTests = [ ['http://localhost', 'file://foo/Users', 'file://foo/Users'], ['https://registry.npmjs.org', '@foo/bar', 'https://registry.npmjs.org/@foo/bar'], ]; -relativeTests.forEach(function(relativeTest) { +for (let i = 0; i < relativeTests.length; i++) { + const relativeTest = relativeTests[i]; + const a = url.resolve(relativeTest[0], relativeTest[1]); const e = relativeTest[2]; assert.strictEqual(a, e, `resolve(${relativeTest[0]}, ${relativeTest[1]})` + ` == ${e}\n actual=${a}`); -}); +} // // Tests below taken from Chiron @@ -374,19 +376,23 @@ const relativeTests2 = [ // No path at all ['#hash1', '#hash2', '#hash1'], ]; -relativeTests2.forEach(function(relativeTest) { +for (let i = 0; i < relativeTests2.length; i++) { + const relativeTest = relativeTests2[i]; + const a = url.resolve(relativeTest[1], relativeTest[0]); const e = url.format(relativeTest[2]); assert.strictEqual(a, e, `resolve(${relativeTest[0]}, ${relativeTest[1]})` + ` == ${e}\n actual=${a}`); -}); +} // If format and parse are inverse operations then // resolveObject(parse(x), y) == parse(resolve(x, y)) // format: [from, path, expected] -relativeTests.forEach(function(relativeTest) { +for (let i = 0; i < relativeTests.length; i++) { + const relativeTest = relativeTests[i]; + let actual = url.resolveObject(url.parse(relativeTest[0]), relativeTest[1]); let expected = url.parse(relativeTest[2]); @@ -399,7 +405,8 @@ relativeTests.forEach(function(relativeTest) { assert.strictEqual(actual, expected, `format(${actual}) == ${expected}\n` + `actual: ${actual}`); -}); + +} // format: [to, from, result] // the test: ['.//g', 'f:/a', 'f://g'] is a fundamental problem @@ -415,7 +422,9 @@ if (relativeTests2[181][0] === './/g' && relativeTests2[181][2] === 'f://g') { relativeTests2.splice(181, 1); } -relativeTests2.forEach(function(relativeTest) { +for (let i = 0; i < relativeTests2.length; i++) { + const relativeTest = relativeTests2[i]; + let actual = url.resolveObject(url.parse(relativeTest[1]), relativeTest[0]); let expected = url.parse(relativeTest[2]); @@ -431,4 +440,4 @@ relativeTests2.forEach(function(relativeTest) { assert.strictEqual(actual, expected, `format(${relativeTest[1]}) == ${expected}\n` + `actual: ${actual}`); -}); +} diff --git a/test/parallel/test-url-revokeobjecturl.js b/test/parallel/test-url-revokeobjecturl.js new file mode 100644 index 00000000000000..dae980c4d0074c --- /dev/null +++ b/test/parallel/test-url-revokeobjecturl.js @@ -0,0 +1,14 @@ +'use strict'; + +require('../common'); + +// Test ensures that the function receives the url argument. + +const assert = require('node:assert'); + +assert.throws(() => { + URL.revokeObjectURL(); +}, { + code: 'ERR_MISSING_ARGS', + name: 'TypeError', +}); diff --git a/test/parallel/test-util-callbackify.js b/test/parallel/test-util-callbackify.js index 444e10b16bf85a..f287c91e946217 100644 --- a/test/parallel/test-util-callbackify.js +++ b/test/parallel/test-util-callbackify.js @@ -225,6 +225,7 @@ const values = [ const errLines = stderr.trim().split(/[\r\n]+/); const errLine = errLines.find((l) => /^Error/.exec(l)); assert.strictEqual(errLine, `Error: ${fixture}`); + assert.strictEqual(errLines.length, 7); }) ); } @@ -279,3 +280,20 @@ const values = [ }); }); } + +{ + // Test Promise factory + function promiseFn(value) { + return Promise.reject(value); + } + + const cbPromiseFn = callbackify(promiseFn); + + cbPromiseFn(null, (err) => { + assert.strictEqual(err.message, 'Promise was rejected with falsy value'); + assert.strictEqual(err.code, 'ERR_FALSY_VALUE_REJECTION'); + assert.strictEqual(err.reason, null); + const stack = err.stack.split(/[\r\n]+/); + assert.match(stack[1], /at process\.processTicksAndRejections/); + }); +} diff --git a/test/parallel/test-uv-unmapped-exception.js b/test/parallel/test-uv-unmapped-exception.js index 0b63461dd25dee..02a52062228ab5 100644 --- a/test/parallel/test-uv-unmapped-exception.js +++ b/test/parallel/test-uv-unmapped-exception.js @@ -2,10 +2,10 @@ 'use strict'; require('../common'); const assert = require('assert'); -const { uvException, uvExceptionWithHostPort } = require('internal/errors'); +const { UVException, UVExceptionWithHostPort } = require('internal/errors'); { - const exception = uvException({ errno: 100, syscall: 'open' }); + const exception = new UVException({ errno: 100, syscall: 'open' }); assert.strictEqual(exception.message, 'UNKNOWN: unknown error, open'); assert.strictEqual(exception.errno, 100); @@ -14,7 +14,7 @@ const { uvException, uvExceptionWithHostPort } = require('internal/errors'); } { - const exception = uvExceptionWithHostPort(100, 'listen', '127.0.0.1', 80); + const exception = new UVExceptionWithHostPort(100, 'listen', '127.0.0.1', 80); assert.strictEqual(exception.message, 'listen UNKNOWN: unknown error 127.0.0.1:80'); diff --git a/test/parallel/test-webcrypto-export-import-cfrg.js b/test/parallel/test-webcrypto-export-import-cfrg.js index 85a1319fa8cab4..144424ce01ded2 100644 --- a/test/parallel/test-webcrypto-export-import-cfrg.js +++ b/test/parallel/test-webcrypto-export-import-cfrg.js @@ -340,15 +340,14 @@ async function testImportRaw({ name, publicUsages }) { (async function() { const tests = []; - testVectors.forEach((vector) => { - [true, false].forEach((extractable) => { + for (const vector of testVectors) { + for (const extractable of [true, false]) { tests.push(testImportSpki(vector, extractable)); tests.push(testImportPkcs8(vector, extractable)); tests.push(testImportJwk(vector, extractable)); - }); + } tests.push(testImportRaw(vector)); - }); - + } await Promise.all(tests); })().then(common.mustCall()); diff --git a/test/parallel/test-webcrypto-sign-verify-ecdsa.js b/test/parallel/test-webcrypto-sign-verify-ecdsa.js index 072485cca59f7f..8fbf572ef5c64e 100644 --- a/test/parallel/test-webcrypto-sign-verify-ecdsa.js +++ b/test/parallel/test-webcrypto-sign-verify-ecdsa.js @@ -227,10 +227,11 @@ async function testSign({ name, (async function() { const variations = []; - vectors.forEach((vector) => { + for (let i = 0; i < vectors.length; ++i) { + const vector = vectors[i]; variations.push(testVerify(vector)); variations.push(testSign(vector)); - }); + } await Promise.all(variations); })().then(common.mustCall()); diff --git a/test/parallel/test-webcrypto-sign-verify-hmac.js b/test/parallel/test-webcrypto-sign-verify-hmac.js index 00b742dbfea5d1..5c2d8e6cd770ff 100644 --- a/test/parallel/test-webcrypto-sign-verify-hmac.js +++ b/test/parallel/test-webcrypto-sign-verify-hmac.js @@ -172,10 +172,10 @@ async function testSign({ hash, (async function() { const variations = []; - vectors.forEach((vector) => { + for (const vector of vectors) { variations.push(testVerify(vector)); variations.push(testSign(vector)); - }); + } await Promise.all(variations); })().then(common.mustCall()); diff --git a/test/parallel/test-whatwg-encoding-custom-interop.js b/test/parallel/test-whatwg-encoding-custom-interop.js index 592dcc8582816f..80d088f6ce3741 100644 --- a/test/parallel/test-whatwg-encoding-custom-interop.js +++ b/test/parallel/test-whatwg-encoding-custom-interop.js @@ -56,9 +56,9 @@ assert(TextEncoder); encodingGetter.call(instance); const invalidThisArgs = [{}, [], true, 1, '', new TextDecoder()]; - invalidThisArgs.forEach((i) => { + for (const i of invalidThisArgs) { assert.throws(() => inspectFn.call(i, Infinity, {}), expectedError); assert.throws(() => encodeFn.call(i), expectedError); assert.throws(() => encodingGetter.call(i), expectedError); - }); + } } diff --git a/test/parallel/test-whatwg-webstreams-adapters-streambase.js b/test/parallel/test-whatwg-webstreams-adapters-streambase.js index 43d28f0499dc7d..bd864ab8c14195 100644 --- a/test/parallel/test-whatwg-webstreams-adapters-streambase.js +++ b/test/parallel/test-whatwg-webstreams-adapters-streambase.js @@ -65,3 +65,12 @@ const { const readable = newReadableStreamFromStreamBase(stream); readable.cancel().then(common.mustCall()); } + +{ + const stream = new JSStream(); + stream.onread = common.mustCall(); + assert.throws(() => newReadableStreamFromStreamBase(stream), { + code: 'ERR_INVALID_STATE' + }); + stream.emitEOF(); +} diff --git a/test/parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js b/test/parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js index 83d21247a49265..5062b9e179ac1e 100644 --- a/test/parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js +++ b/test/parallel/test-whatwg-webstreams-adapters-to-readablewritablepair.js @@ -248,3 +248,9 @@ const { reader.closed.then(common.mustCall()); writer.close().then(common.mustCall()); } + +{ + assert.throws(() => newReadableWritablePairFromDuplex(null), { + code: 'ERR_INVALID_ARG_TYPE' + }); +} diff --git a/test/parallel/test-whatwg-webstreams-adapters-to-streamduplex.js b/test/parallel/test-whatwg-webstreams-adapters-to-streamduplex.js index 15ac9f832714e9..9c92a4778a00fd 100644 --- a/test/parallel/test-whatwg-webstreams-adapters-to-streamduplex.js +++ b/test/parallel/test-whatwg-webstreams-adapters-to-streamduplex.js @@ -164,3 +164,21 @@ const { duplex.end(); } + +{ + const transform = { readable: {}, writable: {} }; + assert.throws(() => newStreamDuplexFromReadableWritablePair(transform), { + code: 'ERR_INVALID_ARG_TYPE' + }); +} + +{ + const transform = { + readable: new ReadableStream(), + writable: null + }; + + assert.throws(() => newStreamDuplexFromReadableWritablePair(transform), { + code: 'ERR_INVALID_ARG_TYPE', + }); +} diff --git a/test/parallel/test-whatwg-webstreams-compression.js b/test/parallel/test-whatwg-webstreams-compression.js index c527fc1f13d10e..c144a0a2e3d43d 100644 --- a/test/parallel/test-whatwg-webstreams-compression.js +++ b/test/parallel/test-whatwg-webstreams-compression.js @@ -15,6 +15,9 @@ async function test(format) { const gzip = new CompressionStream(format); const gunzip = new DecompressionStream(format); + assert.strictEqual(gzip[Symbol.toStringTag], 'CompressionStream'); + assert.strictEqual(gunzip[Symbol.toStringTag], 'DecompressionStream'); + gzip.readable.pipeTo(gunzip.writable).then(common.mustCall()); const reader = gunzip.readable.getReader(); @@ -38,7 +41,7 @@ async function test(format) { ]); } -Promise.all(['gzip', 'deflate'].map((i) => test(i))).then(common.mustCall()); +Promise.all(['gzip', 'deflate', 'deflate-raw'].map((i) => test(i))).then(common.mustCall()); [1, 'hello', false, {}].forEach((i) => { assert.throws(() => new CompressionStream(i), { diff --git a/test/sequential/sequential.status b/test/sequential/sequential.status index 6d89fa0a4d2127..a5e2d38ff31aa8 100644 --- a/test/sequential/sequential.status +++ b/test/sequential/sequential.status @@ -46,3 +46,11 @@ test-watch-mode-inspect: PASS, FLAKY [$arch==s390x] # https://github.com/nodejs/node/issues/41286 test-performance-eventloopdelay: PASS, FLAKY + +[$system==ppc || $system==ppc64] +# https://github.com/nodejs/node/issues/50740 +test-single-executable-application-empty: PASS, FLAKY +test-single-executable-application-snapshot-and-code-cache: PASS, FLAKY +test-single-executable-application-snapshot: PASS, FLAKY +test-single-executable-application-use-code-cache: PASS, FLAKY +test-single-executable-application: PASS, FLAKY diff --git a/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js b/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js index 0b4701b07e1c54..fdd0c23a26da3e 100644 --- a/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js +++ b/test/sequential/test-single-executable-application-disable-experimental-sea-warning.js @@ -15,9 +15,8 @@ skipIfSingleExecutableIsNotSupported(); const fixtures = require('../common/fixtures'); const tmpdir = require('../common/tmpdir'); const { copyFileSync, writeFileSync, existsSync } = require('fs'); -const { execFileSync } = require('child_process'); +const { spawnSyncAndExitWithoutError } = require('../common/child_process'); const { join } = require('path'); -const { strictEqual } = require('assert'); const assert = require('assert'); const inputFile = fixtures.path('sea.js'); @@ -44,17 +43,27 @@ writeFileSync(configFile, ` // Copy input to working directory copyFileSync(inputFile, tmpdir.resolve('sea.js')); -execFileSync(process.execPath, ['--experimental-sea-config', 'sea-config.json'], { - cwd: tmpdir.path -}); +spawnSyncAndExitWithoutError( + process.execPath, + ['--experimental-sea-config', 'sea-config.json'], + { cwd: tmpdir.path }, + {}); assert(existsSync(seaPrepBlob)); copyFileSync(process.execPath, outputFile); injectAndCodeSign(outputFile, seaPrepBlob); -const singleExecutableApplicationOutput = execFileSync( +spawnSyncAndExitWithoutError( outputFile, [ '-a', '--b=c', 'd' ], - { env: { COMMON_DIRECTORY: join(__dirname, '..', 'common') } }); -strictEqual(singleExecutableApplicationOutput.toString(), 'Hello, world! 😊\n'); + { + env: { + COMMON_DIRECTORY: join(__dirname, '..', 'common'), + NODE_DEBUG_NATIVE: 'SEA', + ...process.env, + } + }, + { + stdout: 'Hello, world! 😊\n' + }); diff --git a/test/sequential/test-single-executable-application-empty.js b/test/sequential/test-single-executable-application-empty.js index 13dc2e834b7caa..047685b0074aa9 100644 --- a/test/sequential/test-single-executable-application-empty.js +++ b/test/sequential/test-single-executable-application-empty.js @@ -14,7 +14,7 @@ skipIfSingleExecutableIsNotSupported(); const tmpdir = require('../common/tmpdir'); const { copyFileSync, writeFileSync, existsSync } = require('fs'); -const { execFileSync } = require('child_process'); +const { spawnSyncAndExitWithoutError } = require('../common/child_process'); const assert = require('assert'); const configFile = tmpdir.resolve('sea-config.json'); @@ -31,13 +31,22 @@ writeFileSync(configFile, ` } `); -execFileSync(process.execPath, ['--experimental-sea-config', 'sea-config.json'], { - cwd: tmpdir.path -}); +spawnSyncAndExitWithoutError( + process.execPath, + ['--experimental-sea-config', 'sea-config.json'], + { cwd: tmpdir.path }); assert(existsSync(seaPrepBlob)); copyFileSync(process.execPath, outputFile); injectAndCodeSign(outputFile, seaPrepBlob); -execFileSync(outputFile); +spawnSyncAndExitWithoutError( + outputFile, + { + env: { + NODE_DEBUG_NATIVE: 'SEA', + ...process.env, + } + }, + {}); diff --git a/test/sequential/test-single-executable-application-snapshot-and-code-cache.js b/test/sequential/test-single-executable-application-snapshot-and-code-cache.js index 6d86d6a79d8d68..952003cf02c585 100644 --- a/test/sequential/test-single-executable-application-snapshot-and-code-cache.js +++ b/test/sequential/test-single-executable-application-snapshot-and-code-cache.js @@ -49,7 +49,11 @@ const outputFile = join(tmpdir.path, process.platform === 'win32' ? 'sea.exe' : process.execPath, ['--experimental-sea-config', 'sea-config.json'], { - cwd: tmpdir.path + cwd: tmpdir.path, + env: { + NODE_DEBUG_NATIVE: 'SEA', + ...process.env, + }, }, { stderr: /"useCodeCache" is redundant when "useSnapshot" is true/ @@ -61,8 +65,15 @@ const outputFile = join(tmpdir.path, process.platform === 'win32' ? 'sea.exe' : copyFileSync(process.execPath, outputFile); injectAndCodeSign(outputFile, seaPrepBlob); - spawnSyncAndExitWithoutError(outputFile, { - stdout: 'Hello from snapshot', - trim: true, - }); + spawnSyncAndExitWithoutError( + outputFile, + { + env: { + NODE_DEBUG_NATIVE: 'SEA,MKSNAPSHOT', + ...process.env, + } + }, { + stdout: 'Hello from snapshot', + trim: true, + }); } diff --git a/test/sequential/test-single-executable-application-snapshot.js b/test/sequential/test-single-executable-application-snapshot.js index 5c2d8c36fdd38f..402505a6122c74 100644 --- a/test/sequential/test-single-executable-application-snapshot.js +++ b/test/sequential/test-single-executable-application-snapshot.js @@ -73,7 +73,11 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se process.execPath, ['--experimental-sea-config', 'sea-config.json'], { - cwd: tmpdir.path + cwd: tmpdir.path, + env: { + NODE_DEBUG_NATIVE: 'SEA', + ...process.env, + }, }, { stderr: /Single executable application is an experimental feature/ @@ -86,6 +90,12 @@ const outputFile = tmpdir.resolve(process.platform === 'win32' ? 'sea.exe' : 'se spawnSyncAndExitWithoutError( outputFile, + { + env: { + NODE_DEBUG_NATIVE: 'SEA,MKSNAPSHOT', + ...process.env, + } + }, { trim: true, stdout: 'Hello from snapshot', diff --git a/test/sequential/test-single-executable-application-use-code-cache.js b/test/sequential/test-single-executable-application-use-code-cache.js index 96de5769b1fe6b..af5f2855ed6318 100644 --- a/test/sequential/test-single-executable-application-use-code-cache.js +++ b/test/sequential/test-single-executable-application-use-code-cache.js @@ -15,9 +15,8 @@ skipIfSingleExecutableIsNotSupported(); const fixtures = require('../common/fixtures'); const tmpdir = require('../common/tmpdir'); const { copyFileSync, writeFileSync, existsSync } = require('fs'); -const { execFileSync } = require('child_process'); +const { spawnSyncAndExitWithoutError } = require('../common/child_process'); const { join } = require('path'); -const { strictEqual } = require('assert'); const assert = require('assert'); const inputFile = fixtures.path('sea.js'); @@ -44,17 +43,32 @@ writeFileSync(configFile, ` // Copy input to working directory copyFileSync(inputFile, tmpdir.resolve('sea.js')); -execFileSync(process.execPath, ['--experimental-sea-config', 'sea-config.json'], { - cwd: tmpdir.path -}); +spawnSyncAndExitWithoutError( + process.execPath, + ['--experimental-sea-config', 'sea-config.json'], + { + cwd: tmpdir.path, + env: { + NODE_DEBUG_NATIVE: 'SEA', + ...process.env, + }, + }); assert(existsSync(seaPrepBlob)); copyFileSync(process.execPath, outputFile); injectAndCodeSign(outputFile, seaPrepBlob); -const singleExecutableApplicationOutput = execFileSync( +spawnSyncAndExitWithoutError( outputFile, [ '-a', '--b=c', 'd' ], - { env: { COMMON_DIRECTORY: join(__dirname, '..', 'common') } }); -strictEqual(singleExecutableApplicationOutput.toString(), 'Hello, world! 😊\n'); + { + env: { + COMMON_DIRECTORY: join(__dirname, '..', 'common'), + NODE_DEBUG_NATIVE: 'SEA', + ...process.env, + } + }, + { + stdout: 'Hello, world! 😊\n' + }); diff --git a/test/sequential/test-single-executable-application.js b/test/sequential/test-single-executable-application.js index e930254cb0a7ae..6379dfd2ea4b6d 100644 --- a/test/sequential/test-single-executable-application.js +++ b/test/sequential/test-single-executable-application.js @@ -14,9 +14,8 @@ skipIfSingleExecutableIsNotSupported(); const fixtures = require('../common/fixtures'); const tmpdir = require('../common/tmpdir'); const { copyFileSync, writeFileSync, existsSync } = require('fs'); -const { execFileSync } = require('child_process'); +const { spawnSyncAndExitWithoutError } = require('../common/child_process'); const { join } = require('path'); -const { strictEqual } = require('assert'); const assert = require('assert'); const inputFile = fixtures.path('sea.js'); @@ -43,17 +42,27 @@ writeFileSync(configFile, ` // Copy input to working directory copyFileSync(inputFile, tmpdir.resolve('sea.js')); -execFileSync(process.execPath, ['--experimental-sea-config', 'sea-config.json'], { - cwd: tmpdir.path -}); +spawnSyncAndExitWithoutError( + process.execPath, + ['--experimental-sea-config', 'sea-config.json'], + { cwd: tmpdir.path }, + {}); assert(existsSync(seaPrepBlob)); copyFileSync(process.execPath, outputFile); injectAndCodeSign(outputFile, seaPrepBlob); -const singleExecutableApplicationOutput = execFileSync( +spawnSyncAndExitWithoutError( outputFile, [ '-a', '--b=c', 'd' ], - { env: { COMMON_DIRECTORY: join(__dirname, '..', 'common') } }); -strictEqual(singleExecutableApplicationOutput.toString(), 'Hello, world! 😊\n'); + { + env: { + COMMON_DIRECTORY: join(__dirname, '..', 'common'), + NODE_DEBUG_NATIVE: 'SEA', + ...process.env, + } + }, + { + stdout: 'Hello, world! 😊\n' + }); diff --git a/test/wpt/README.md b/test/wpt/README.md index a378e3244a1f0b..0f73062e289a47 100644 --- a/test/wpt/README.md +++ b/test/wpt/README.md @@ -153,7 +153,7 @@ expected failures. { "something.scope.js": { // the file name // Optional: If the requirement is not met, this test will be skipped - "requires": ["small-icu"], // supports: "small-icu", "full-icu" + "requires": ["small-icu"], // supports: "small-icu", "full-icu", "crypto" // Optional: the test will be skipped with the reason printed "skip": "explain why we cannot run a test that's supposed to pass", diff --git a/test/wpt/status/compression.json b/test/wpt/status/compression.json new file mode 100644 index 00000000000000..0cae222832e823 --- /dev/null +++ b/test/wpt/status/compression.json @@ -0,0 +1,28 @@ +{ + "compression-bad-chunks.tentative.any.js": { + "skip": "Execution \"hangs\", ArrayBuffer and TypedArray is not accepted and throws, instead of rejects during writer.write" + }, + "decompression-bad-chunks.tentative.any.js": { + "skip": "Execution \"hangs\", ArrayBuffer and TypedArray is not accepted and throws, instead of rejects during writer.write" + }, + "decompression-buffersource.tentative.any.js": { + "skip": "ArrayBuffer and TypedArray is not accepted and throws, instead of rejects during writer.write" + }, + "compression-with-detach.tentative.window.js": { + "requires": ["crypto"] + }, + "decompression-corrupt-input.tentative.any.js": { + "fail": { + "expected": [ + "trailing junk for 'deflate' should give an error", + "trailing junk for 'gzip' should give an error" + ] + } + }, + "idlharness-shadowrealm.window.js": { + "skip": "ShadowRealm support is not enabled" + }, + "third_party/pako/pako_inflate.min.js": { + "skip": "This is not a test file." + } +} diff --git a/test/wpt/status/console.json b/test/wpt/status/console.json index afbef314ac0569..7c9dadf0cc4465 100644 --- a/test/wpt/status/console.json +++ b/test/wpt/status/console.json @@ -1,12 +1,7 @@ { "idlharness.any.js": { - "fail": { - "flaky": [ - "console namespace: operation assert(optional boolean, any...)", - "console namespace: operation table(optional any, optional sequence)", - "console namespace: operation dir(optional any, optional object?)" - ] - } + "note": "https://github.com/nodejs/node/issues/44185", + "requires": ["crypto", "small-icu"] }, "idlharness-shadowrealm.window.js": { "skip": "ShadowRealm support is not enabled" diff --git a/test/wpt/status/encoding.json b/test/wpt/status/encoding.json index 09f8c2b545b247..db481cca6a09df 100644 --- a/test/wpt/status/encoding.json +++ b/test/wpt/status/encoding.json @@ -37,7 +37,7 @@ "skip": "The iso-8859-16 encoding is not supported" }, "idlharness.any.js": { - "skip": "No implementation of TextDecoderStream and TextEncoderStream" + "requires": ["small-icu"] }, "idlharness-shadowrealm.window.js": { "skip": "ShadowRealm support is not enabled" diff --git a/test/wpt/status/performance-timeline.json b/test/wpt/status/performance-timeline.json index 9a297e641437df..36eeb36782c9aa 100644 --- a/test/wpt/status/performance-timeline.json +++ b/test/wpt/status/performance-timeline.json @@ -7,6 +7,9 @@ ] } }, + "navigation-id.helper.js": { + "skip": "This is not a test file." + }, "webtiming-resolution.any.js": { "skip": "flaky" } diff --git a/test/wpt/status/resource-timing.json b/test/wpt/status/resource-timing.json index 22f21cfe48d7fe..db5154260227b3 100644 --- a/test/wpt/status/resource-timing.json +++ b/test/wpt/status/resource-timing.json @@ -19,5 +19,22 @@ }, "buffered-flag.any.js": { "skip": "Browser-specific test" + }, + "idlharness.any.js": { + "fail": { + "expected": [ + "PerformanceResourceTiming interface: attribute deliveryType", + "PerformanceResourceTiming interface: attribute firstInterimResponseStart", + "PerformanceResourceTiming interface: attribute responseStatus", + "PerformanceResourceTiming interface: attribute renderBlockingStatus", + "PerformanceResourceTiming interface: attribute contentType", + "PerformanceResourceTiming interface: resource must inherit property \"deliveryType\" with the proper type", + "PerformanceResourceTiming interface: resource must inherit property \"firstInterimResponseStart\" with the proper type", + "PerformanceResourceTiming interface: resource must inherit property \"responseStatus\" with the proper type", + "PerformanceResourceTiming interface: resource must inherit property \"renderBlockingStatus\" with the proper type", + "PerformanceResourceTiming interface: resource must inherit property \"contentType\" with the proper type", + "PerformanceResourceTiming interface: default toJSON operation on resource" + ] + } } } diff --git a/test/wpt/status/streams.json b/test/wpt/status/streams.json index 6454918110dfbd..3b6e0ce6429f9d 100644 --- a/test/wpt/status/streams.json +++ b/test/wpt/status/streams.json @@ -1,16 +1,10 @@ { - "idlharness.any.js": { - "fail": { - "expected": [ - "ReadableStream interface: async iterable" - ] - } - }, "idlharness-shadowrealm.window.js": { "skip": "ShadowRealm support is not enabled" }, "piping/general-addition.any.js": { "fail": { + "note": "Blocked on https://github.com/whatwg/streams/issues/1243", "expected": [ "enqueue() must not synchronously call write algorithm" ] @@ -24,6 +18,7 @@ }, "readable-streams/owning-type-message-port.any.js": { "fail": { + "note": "Readable streams with type owning are not yet supported", "expected": [ "Transferred MessageChannel works as expected", "Second branch of owning ReadableStream tee should end up into errors with transfer only values" @@ -35,6 +30,7 @@ }, "readable-streams/owning-type.any.js": { "fail": { + "note": "Readable streams with type owning are not yet supported", "expected": [ "ReadableStream can be constructed with owning type", "ReadableStream of type owning should call start with a ReadableStreamDefaultController", diff --git a/test/wpt/test-compression.js b/test/wpt/test-compression.js new file mode 100644 index 00000000000000..23800734922afe --- /dev/null +++ b/test/wpt/test-compression.js @@ -0,0 +1,9 @@ +'use strict'; + +const { WPTRunner } = require('../common/wpt'); + +const runner = new WPTRunner('compression'); + +runner.pretendGlobalThisAs('Window'); + +runner.runJsTests(); diff --git a/test/wpt/test-encoding.js b/test/wpt/test-encoding.js index af20760bd533d3..eb54c70867cb43 100644 --- a/test/wpt/test-encoding.js +++ b/test/wpt/test-encoding.js @@ -3,4 +3,6 @@ const { WPTRunner } = require('../common/wpt'); const runner = new WPTRunner('encoding'); +runner.pretendGlobalThisAs('Window'); + runner.runJsTests(); diff --git a/tools/certdata.txt b/tools/certdata.txt index dd113ae00101dc..59cc15df6e9ddc 100644 --- a/tools/certdata.txt +++ b/tools/certdata.txt @@ -205,346 +205,6 @@ CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE -# -# Certificate "Verisign Class 1 Public Primary Certification Authority - G3" -# -# Issuer: CN=VeriSign Class 1 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US -# Serial Number:00:8b:5b:75:56:84:54:85:0b:00:cf:af:38:48:ce:b1:a4 -# Subject: CN=VeriSign Class 1 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US -# Not Valid Before: Fri Oct 01 00:00:00 1999 -# Not Valid After : Wed Jul 16 23:59:59 2036 -# Fingerprint (SHA-256): CB:B5:AF:18:5E:94:2A:24:02:F9:EA:CB:C0:ED:5B:B8:76:EE:A3:C1:22:36:23:D0:04:47:E4:F3:BA:55:4B:65 -# Fingerprint (SHA1): 20:42:85:DC:F7:EB:76:41:95:57:8E:13:6B:D4:B7:D1:E9:8E:46:A5 -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Verisign Class 1 Public Primary Certification Authority - G3" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\201\312\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 -\151\147\156\054\040\111\156\143\056\061\037\060\035\006\003\125 -\004\013\023\026\126\145\162\151\123\151\147\156\040\124\162\165 -\163\164\040\116\145\164\167\157\162\153\061\072\060\070\006\003 -\125\004\013\023\061\050\143\051\040\061\071\071\071\040\126\145 -\162\151\123\151\147\156\054\040\111\156\143\056\040\055\040\106 -\157\162\040\141\165\164\150\157\162\151\172\145\144\040\165\163 -\145\040\157\156\154\171\061\105\060\103\006\003\125\004\003\023 -\074\126\145\162\151\123\151\147\156\040\103\154\141\163\163\040 -\061\040\120\165\142\154\151\143\040\120\162\151\155\141\162\171 -\040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101 -\165\164\150\157\162\151\164\171\040\055\040\107\063 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\201\312\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 -\151\147\156\054\040\111\156\143\056\061\037\060\035\006\003\125 -\004\013\023\026\126\145\162\151\123\151\147\156\040\124\162\165 -\163\164\040\116\145\164\167\157\162\153\061\072\060\070\006\003 -\125\004\013\023\061\050\143\051\040\061\071\071\071\040\126\145 -\162\151\123\151\147\156\054\040\111\156\143\056\040\055\040\106 -\157\162\040\141\165\164\150\157\162\151\172\145\144\040\165\163 -\145\040\157\156\154\171\061\105\060\103\006\003\125\004\003\023 -\074\126\145\162\151\123\151\147\156\040\103\154\141\163\163\040 -\061\040\120\165\142\154\151\143\040\120\162\151\155\141\162\171 -\040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101 -\165\164\150\157\162\151\164\171\040\055\040\107\063 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\021\000\213\133\165\126\204\124\205\013\000\317\257\070\110 -\316\261\244 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\004\032\060\202\003\002\002\021\000\213\133\165\126\204 -\124\205\013\000\317\257\070\110\316\261\244\060\015\006\011\052 -\206\110\206\367\015\001\001\005\005\000\060\201\312\061\013\060 -\011\006\003\125\004\006\023\002\125\123\061\027\060\025\006\003 -\125\004\012\023\016\126\145\162\151\123\151\147\156\054\040\111 -\156\143\056\061\037\060\035\006\003\125\004\013\023\026\126\145 -\162\151\123\151\147\156\040\124\162\165\163\164\040\116\145\164 -\167\157\162\153\061\072\060\070\006\003\125\004\013\023\061\050 -\143\051\040\061\071\071\071\040\126\145\162\151\123\151\147\156 -\054\040\111\156\143\056\040\055\040\106\157\162\040\141\165\164 -\150\157\162\151\172\145\144\040\165\163\145\040\157\156\154\171 -\061\105\060\103\006\003\125\004\003\023\074\126\145\162\151\123 -\151\147\156\040\103\154\141\163\163\040\061\040\120\165\142\154 -\151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 -\146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 -\164\171\040\055\040\107\063\060\036\027\015\071\071\061\060\060 -\061\060\060\060\060\060\060\132\027\015\063\066\060\067\061\066 -\062\063\065\071\065\071\132\060\201\312\061\013\060\011\006\003 -\125\004\006\023\002\125\123\061\027\060\025\006\003\125\004\012 -\023\016\126\145\162\151\123\151\147\156\054\040\111\156\143\056 -\061\037\060\035\006\003\125\004\013\023\026\126\145\162\151\123 -\151\147\156\040\124\162\165\163\164\040\116\145\164\167\157\162 -\153\061\072\060\070\006\003\125\004\013\023\061\050\143\051\040 -\061\071\071\071\040\126\145\162\151\123\151\147\156\054\040\111 -\156\143\056\040\055\040\106\157\162\040\141\165\164\150\157\162 -\151\172\145\144\040\165\163\145\040\157\156\154\171\061\105\060 -\103\006\003\125\004\003\023\074\126\145\162\151\123\151\147\156 -\040\103\154\141\163\163\040\061\040\120\165\142\154\151\143\040 -\120\162\151\155\141\162\171\040\103\145\162\164\151\146\151\143 -\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171\040 -\055\040\107\063\060\202\001\042\060\015\006\011\052\206\110\206 -\367\015\001\001\001\005\000\003\202\001\017\000\060\202\001\012 -\002\202\001\001\000\335\204\324\271\264\371\247\330\363\004\170 -\234\336\075\334\154\023\026\331\172\335\044\121\146\300\307\046 -\131\015\254\006\010\302\224\321\063\037\360\203\065\037\156\033 -\310\336\252\156\025\116\124\047\357\304\155\032\354\013\343\016 -\360\104\245\127\307\100\130\036\243\107\037\161\354\140\366\155 -\224\310\030\071\355\376\102\030\126\337\344\114\111\020\170\116 -\001\166\065\143\022\066\335\146\274\001\004\066\243\125\150\325 -\242\066\011\254\253\041\046\124\006\255\077\312\024\340\254\312 -\255\006\035\225\342\370\235\361\340\140\377\302\177\165\053\114 -\314\332\376\207\231\041\352\272\376\076\124\327\322\131\170\333 -\074\156\317\240\023\000\032\270\047\241\344\276\147\226\312\240 -\305\263\234\335\311\165\236\353\060\232\137\243\315\331\256\170 -\031\077\043\351\134\333\051\275\255\125\310\033\124\214\143\366 -\350\246\352\307\067\022\134\243\051\036\002\331\333\037\073\264 -\327\017\126\107\201\025\004\112\257\203\047\321\305\130\210\301 -\335\366\252\247\243\030\332\150\252\155\021\121\341\277\145\153 -\237\226\166\321\075\002\003\001\000\001\060\015\006\011\052\206 -\110\206\367\015\001\001\005\005\000\003\202\001\001\000\253\146 -\215\327\263\272\307\232\266\346\125\320\005\361\237\061\215\132 -\252\331\252\106\046\017\161\355\245\255\123\126\142\001\107\052 -\104\351\376\077\164\013\023\233\271\364\115\033\262\321\137\262 -\266\322\210\134\263\237\315\313\324\247\331\140\225\204\072\370 -\301\067\035\141\312\347\260\305\345\221\332\124\246\254\061\201 -\256\227\336\315\010\254\270\300\227\200\177\156\162\244\347\151 -\023\225\145\037\304\223\074\375\171\217\004\324\076\117\352\367 -\236\316\315\147\174\117\145\002\377\221\205\124\163\307\377\066 -\367\206\055\354\320\136\117\377\021\237\162\006\326\270\032\361 -\114\015\046\145\342\104\200\036\307\237\343\335\350\012\332\354 -\245\040\200\151\150\241\117\176\341\153\317\007\101\372\203\216 -\274\070\335\260\056\021\261\153\262\102\314\232\274\371\110\042 -\171\112\031\017\262\034\076\040\164\331\152\303\276\362\050\170 -\023\126\171\117\155\120\352\033\260\265\127\261\067\146\130\043 -\363\334\017\337\012\207\304\357\206\005\325\070\024\140\231\243 -\113\336\006\226\161\054\362\333\266\037\244\357\077\356 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE -# For Email Distrust After: Wed Aug 31 00:00:00 2022 -CKA_NSS_EMAIL_DISTRUST_AFTER MULTILINE_OCTAL -\062\062\060\070\063\061\060\060\060\060\060\060\132 -END - -# Trust for "Verisign Class 1 Public Primary Certification Authority - G3" -# Issuer: CN=VeriSign Class 1 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US -# Serial Number:00:8b:5b:75:56:84:54:85:0b:00:cf:af:38:48:ce:b1:a4 -# Subject: CN=VeriSign Class 1 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US -# Not Valid Before: Fri Oct 01 00:00:00 1999 -# Not Valid After : Wed Jul 16 23:59:59 2036 -# Fingerprint (SHA-256): CB:B5:AF:18:5E:94:2A:24:02:F9:EA:CB:C0:ED:5B:B8:76:EE:A3:C1:22:36:23:D0:04:47:E4:F3:BA:55:4B:65 -# Fingerprint (SHA1): 20:42:85:DC:F7:EB:76:41:95:57:8E:13:6B:D4:B7:D1:E9:8E:46:A5 -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Verisign Class 1 Public Primary Certification Authority - G3" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\040\102\205\334\367\353\166\101\225\127\216\023\153\324\267\321 -\351\216\106\245 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\261\107\274\030\127\321\030\240\170\055\354\161\350\052\225\163 -END -CKA_ISSUER MULTILINE_OCTAL -\060\201\312\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 -\151\147\156\054\040\111\156\143\056\061\037\060\035\006\003\125 -\004\013\023\026\126\145\162\151\123\151\147\156\040\124\162\165 -\163\164\040\116\145\164\167\157\162\153\061\072\060\070\006\003 -\125\004\013\023\061\050\143\051\040\061\071\071\071\040\126\145 -\162\151\123\151\147\156\054\040\111\156\143\056\040\055\040\106 -\157\162\040\141\165\164\150\157\162\151\172\145\144\040\165\163 -\145\040\157\156\154\171\061\105\060\103\006\003\125\004\003\023 -\074\126\145\162\151\123\151\147\156\040\103\154\141\163\163\040 -\061\040\120\165\142\154\151\143\040\120\162\151\155\141\162\171 -\040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101 -\165\164\150\157\162\151\164\171\040\055\040\107\063 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\021\000\213\133\165\126\204\124\205\013\000\317\257\070\110 -\316\261\244 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - -# -# Certificate "Verisign Class 2 Public Primary Certification Authority - G3" -# -# Issuer: CN=VeriSign Class 2 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US -# Serial Number:61:70:cb:49:8c:5f:98:45:29:e7:b0:a6:d9:50:5b:7a -# Subject: CN=VeriSign Class 2 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US -# Not Valid Before: Fri Oct 01 00:00:00 1999 -# Not Valid After : Wed Jul 16 23:59:59 2036 -# Fingerprint (SHA-256): 92:A9:D9:83:3F:E1:94:4D:B3:66:E8:BF:AE:7A:95:B6:48:0C:2D:6C:6C:2A:1B:E6:5D:42:36:B6:08:FC:A1:BB -# Fingerprint (SHA1): 61:EF:43:D7:7F:CA:D4:61:51:BC:98:E0:C3:59:12:AF:9F:EB:63:11 -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Verisign Class 2 Public Primary Certification Authority - G3" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\201\312\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 -\151\147\156\054\040\111\156\143\056\061\037\060\035\006\003\125 -\004\013\023\026\126\145\162\151\123\151\147\156\040\124\162\165 -\163\164\040\116\145\164\167\157\162\153\061\072\060\070\006\003 -\125\004\013\023\061\050\143\051\040\061\071\071\071\040\126\145 -\162\151\123\151\147\156\054\040\111\156\143\056\040\055\040\106 -\157\162\040\141\165\164\150\157\162\151\172\145\144\040\165\163 -\145\040\157\156\154\171\061\105\060\103\006\003\125\004\003\023 -\074\126\145\162\151\123\151\147\156\040\103\154\141\163\163\040 -\062\040\120\165\142\154\151\143\040\120\162\151\155\141\162\171 -\040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101 -\165\164\150\157\162\151\164\171\040\055\040\107\063 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\201\312\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 -\151\147\156\054\040\111\156\143\056\061\037\060\035\006\003\125 -\004\013\023\026\126\145\162\151\123\151\147\156\040\124\162\165 -\163\164\040\116\145\164\167\157\162\153\061\072\060\070\006\003 -\125\004\013\023\061\050\143\051\040\061\071\071\071\040\126\145 -\162\151\123\151\147\156\054\040\111\156\143\056\040\055\040\106 -\157\162\040\141\165\164\150\157\162\151\172\145\144\040\165\163 -\145\040\157\156\154\171\061\105\060\103\006\003\125\004\003\023 -\074\126\145\162\151\123\151\147\156\040\103\154\141\163\163\040 -\062\040\120\165\142\154\151\143\040\120\162\151\155\141\162\171 -\040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101 -\165\164\150\157\162\151\164\171\040\055\040\107\063 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\020\141\160\313\111\214\137\230\105\051\347\260\246\331\120 -\133\172 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\004\031\060\202\003\001\002\020\141\160\313\111\214\137 -\230\105\051\347\260\246\331\120\133\172\060\015\006\011\052\206 -\110\206\367\015\001\001\005\005\000\060\201\312\061\013\060\011 -\006\003\125\004\006\023\002\125\123\061\027\060\025\006\003\125 -\004\012\023\016\126\145\162\151\123\151\147\156\054\040\111\156 -\143\056\061\037\060\035\006\003\125\004\013\023\026\126\145\162 -\151\123\151\147\156\040\124\162\165\163\164\040\116\145\164\167 -\157\162\153\061\072\060\070\006\003\125\004\013\023\061\050\143 -\051\040\061\071\071\071\040\126\145\162\151\123\151\147\156\054 -\040\111\156\143\056\040\055\040\106\157\162\040\141\165\164\150 -\157\162\151\172\145\144\040\165\163\145\040\157\156\154\171\061 -\105\060\103\006\003\125\004\003\023\074\126\145\162\151\123\151 -\147\156\040\103\154\141\163\163\040\062\040\120\165\142\154\151 -\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151\146 -\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151\164 -\171\040\055\040\107\063\060\036\027\015\071\071\061\060\060\061 -\060\060\060\060\060\060\132\027\015\063\066\060\067\061\066\062 -\063\065\071\065\071\132\060\201\312\061\013\060\011\006\003\125 -\004\006\023\002\125\123\061\027\060\025\006\003\125\004\012\023 -\016\126\145\162\151\123\151\147\156\054\040\111\156\143\056\061 -\037\060\035\006\003\125\004\013\023\026\126\145\162\151\123\151 -\147\156\040\124\162\165\163\164\040\116\145\164\167\157\162\153 -\061\072\060\070\006\003\125\004\013\023\061\050\143\051\040\061 -\071\071\071\040\126\145\162\151\123\151\147\156\054\040\111\156 -\143\056\040\055\040\106\157\162\040\141\165\164\150\157\162\151 -\172\145\144\040\165\163\145\040\157\156\154\171\061\105\060\103 -\006\003\125\004\003\023\074\126\145\162\151\123\151\147\156\040 -\103\154\141\163\163\040\062\040\120\165\142\154\151\143\040\120 -\162\151\155\141\162\171\040\103\145\162\164\151\146\151\143\141 -\164\151\157\156\040\101\165\164\150\157\162\151\164\171\040\055 -\040\107\063\060\202\001\042\060\015\006\011\052\206\110\206\367 -\015\001\001\001\005\000\003\202\001\017\000\060\202\001\012\002 -\202\001\001\000\257\012\015\302\325\054\333\147\271\055\345\224 -\047\335\245\276\340\260\115\217\263\141\126\074\326\174\303\364 -\315\076\206\313\242\210\342\341\330\244\151\305\265\342\277\301 -\246\107\120\136\106\071\213\325\226\272\265\157\024\277\020\316 -\047\023\236\005\107\233\061\172\023\330\037\331\323\002\067\213 -\255\054\107\360\216\201\006\247\015\060\014\353\367\074\017\040 -\035\334\162\106\356\245\002\310\133\303\311\126\151\114\305\030 -\301\221\173\013\325\023\000\233\274\357\303\110\076\106\140\040 -\205\052\325\220\266\315\213\240\314\062\335\267\375\100\125\262 -\120\034\126\256\314\215\167\115\307\040\115\247\061\166\357\150 -\222\212\220\036\010\201\126\262\255\151\243\122\320\313\034\304 -\043\075\037\231\376\114\350\026\143\216\306\010\216\366\061\366 -\322\372\345\166\335\265\034\222\243\111\315\315\001\315\150\315 -\251\151\272\243\353\035\015\234\244\040\246\301\240\305\321\106 -\114\027\155\322\254\146\077\226\214\340\204\324\066\377\042\131 -\305\371\021\140\250\137\004\175\362\032\366\045\102\141\017\304 -\112\270\076\211\002\003\001\000\001\060\015\006\011\052\206\110 -\206\367\015\001\001\005\005\000\003\202\001\001\000\064\046\025 -\074\300\215\115\103\111\035\275\351\041\222\327\146\234\267\336 -\305\270\320\344\135\137\166\042\300\046\371\204\072\072\371\214 -\265\373\354\140\361\350\316\004\260\310\335\247\003\217\060\363 -\230\337\244\346\244\061\337\323\034\013\106\334\162\040\077\256 -\356\005\074\244\063\077\013\071\254\160\170\163\113\231\053\337 -\060\302\124\260\250\073\125\241\376\026\050\315\102\275\164\156 -\200\333\047\104\247\316\104\135\324\033\220\230\015\036\102\224 -\261\000\054\004\320\164\243\002\005\042\143\143\315\203\265\373 -\301\155\142\153\151\165\375\135\160\101\271\365\277\174\337\276 -\301\062\163\042\041\213\130\201\173\025\221\172\272\343\144\110 -\260\177\373\066\045\332\225\320\361\044\024\027\335\030\200\153 -\106\043\071\124\365\216\142\011\004\035\224\220\246\233\346\045 -\342\102\105\252\270\220\255\276\010\217\251\013\102\030\224\317 -\162\071\341\261\103\340\050\317\267\347\132\154\023\153\111\263 -\377\343\030\174\211\213\063\135\254\063\327\247\371\332\072\125 -\311\130\020\371\252\357\132\266\317\113\113\337\052 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE -# For Email Distrust After: Wed Aug 31 00:00:00 2022 -CKA_NSS_EMAIL_DISTRUST_AFTER MULTILINE_OCTAL -\062\062\060\070\063\061\060\060\060\060\060\060\132 -END - -# Trust for "Verisign Class 2 Public Primary Certification Authority - G3" -# Issuer: CN=VeriSign Class 2 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US -# Serial Number:61:70:cb:49:8c:5f:98:45:29:e7:b0:a6:d9:50:5b:7a -# Subject: CN=VeriSign Class 2 Public Primary Certification Authority - G3,OU="(c) 1999 VeriSign, Inc. - For authorized use only",OU=VeriSign Trust Network,O="VeriSign, Inc.",C=US -# Not Valid Before: Fri Oct 01 00:00:00 1999 -# Not Valid After : Wed Jul 16 23:59:59 2036 -# Fingerprint (SHA-256): 92:A9:D9:83:3F:E1:94:4D:B3:66:E8:BF:AE:7A:95:B6:48:0C:2D:6C:6C:2A:1B:E6:5D:42:36:B6:08:FC:A1:BB -# Fingerprint (SHA1): 61:EF:43:D7:7F:CA:D4:61:51:BC:98:E0:C3:59:12:AF:9F:EB:63:11 -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Verisign Class 2 Public Primary Certification Authority - G3" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\141\357\103\327\177\312\324\141\121\274\230\340\303\131\022\257 -\237\353\143\021 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\370\276\304\143\042\311\250\106\164\213\270\035\036\112\053\366 -END -CKA_ISSUER MULTILINE_OCTAL -\060\201\312\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\027\060\025\006\003\125\004\012\023\016\126\145\162\151\123 -\151\147\156\054\040\111\156\143\056\061\037\060\035\006\003\125 -\004\013\023\026\126\145\162\151\123\151\147\156\040\124\162\165 -\163\164\040\116\145\164\167\157\162\153\061\072\060\070\006\003 -\125\004\013\023\061\050\143\051\040\061\071\071\071\040\126\145 -\162\151\123\151\147\156\054\040\111\156\143\056\040\055\040\106 -\157\162\040\141\165\164\150\157\162\151\172\145\144\040\165\163 -\145\040\157\156\154\171\061\105\060\103\006\003\125\004\003\023 -\074\126\145\162\151\123\151\147\156\040\103\154\141\163\163\040 -\062\040\120\165\142\154\151\143\040\120\162\151\155\141\162\171 -\040\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101 -\165\164\150\157\162\151\164\171\040\055\040\107\063 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\020\141\160\313\111\214\137\230\105\051\347\260\246\331\120 -\133\172 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - # # Certificate "Entrust.net Premium 2048 Secure Server CA" # @@ -4696,182 +4356,6 @@ CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE -# -# Certificate "Autoridad de Certificacion Firmaprofesional CIF A62634068" -# -# Issuer: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068,C=ES -# Serial Number:53:ec:3b:ee:fb:b2:48:5f -# Subject: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068,C=ES -# Not Valid Before: Wed May 20 08:38:15 2009 -# Not Valid After : Tue Dec 31 08:38:15 2030 -# Fingerprint (SHA-256): 04:04:80:28:BF:1F:28:64:D4:8F:9A:D4:D8:32:94:36:6A:82:88:56:55:3F:3B:14:30:3F:90:14:7F:5D:40:EF -# Fingerprint (SHA1): AE:C5:FB:3F:C8:E1:BF:C4:E5:4F:03:07:5A:9A:E8:00:B7:F7:B6:FA -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Autoridad de Certificacion Firmaprofesional CIF A62634068" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\121\061\013\060\011\006\003\125\004\006\023\002\105\123\061 -\102\060\100\006\003\125\004\003\014\071\101\165\164\157\162\151 -\144\141\144\040\144\145\040\103\145\162\164\151\146\151\143\141 -\143\151\157\156\040\106\151\162\155\141\160\162\157\146\145\163 -\151\157\156\141\154\040\103\111\106\040\101\066\062\066\063\064 -\060\066\070 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\121\061\013\060\011\006\003\125\004\006\023\002\105\123\061 -\102\060\100\006\003\125\004\003\014\071\101\165\164\157\162\151 -\144\141\144\040\144\145\040\103\145\162\164\151\146\151\143\141 -\143\151\157\156\040\106\151\162\155\141\160\162\157\146\145\163 -\151\157\156\141\154\040\103\111\106\040\101\066\062\066\063\064 -\060\066\070 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\010\123\354\073\356\373\262\110\137 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\006\024\060\202\003\374\240\003\002\001\002\002\010\123 -\354\073\356\373\262\110\137\060\015\006\011\052\206\110\206\367 -\015\001\001\005\005\000\060\121\061\013\060\011\006\003\125\004 -\006\023\002\105\123\061\102\060\100\006\003\125\004\003\014\071 -\101\165\164\157\162\151\144\141\144\040\144\145\040\103\145\162 -\164\151\146\151\143\141\143\151\157\156\040\106\151\162\155\141 -\160\162\157\146\145\163\151\157\156\141\154\040\103\111\106\040 -\101\066\062\066\063\064\060\066\070\060\036\027\015\060\071\060 -\065\062\060\060\070\063\070\061\065\132\027\015\063\060\061\062 -\063\061\060\070\063\070\061\065\132\060\121\061\013\060\011\006 -\003\125\004\006\023\002\105\123\061\102\060\100\006\003\125\004 -\003\014\071\101\165\164\157\162\151\144\141\144\040\144\145\040 -\103\145\162\164\151\146\151\143\141\143\151\157\156\040\106\151 -\162\155\141\160\162\157\146\145\163\151\157\156\141\154\040\103 -\111\106\040\101\066\062\066\063\064\060\066\070\060\202\002\042 -\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000\003 -\202\002\017\000\060\202\002\012\002\202\002\001\000\312\226\153 -\216\352\370\373\361\242\065\340\177\114\332\340\303\122\327\175 -\266\020\310\002\136\263\103\052\304\117\152\262\312\034\135\050 -\232\170\021\032\151\131\127\257\265\040\102\344\213\017\346\337 -\133\246\003\222\057\365\021\344\142\327\062\161\070\331\004\014 -\161\253\075\121\176\017\007\337\143\005\134\351\277\224\157\301 -\051\202\300\264\332\121\260\301\074\273\255\067\112\134\312\361 -\113\066\016\044\253\277\303\204\167\375\250\120\364\261\347\306 -\057\322\055\131\215\172\012\116\226\151\122\002\252\066\230\354 -\374\372\024\203\014\067\037\311\222\067\177\327\201\055\345\304 -\271\340\076\064\376\147\364\076\146\321\323\364\100\317\136\142 -\064\017\160\006\076\040\030\132\316\367\162\033\045\154\223\164 -\024\223\243\163\261\016\252\207\020\043\131\137\040\005\031\107 -\355\150\216\222\022\312\135\374\326\053\262\222\074\040\317\341 -\137\257\040\276\240\166\177\166\345\354\032\206\141\063\076\347 -\173\264\077\240\017\216\242\271\152\157\271\207\046\157\101\154 -\210\246\120\375\152\143\013\365\223\026\033\031\217\262\355\233 -\233\311\220\365\001\014\337\031\075\017\076\070\043\311\057\217 -\014\321\002\376\033\125\326\116\320\215\074\257\117\244\363\376 -\257\052\323\005\235\171\010\241\313\127\061\264\234\310\220\262 -\147\364\030\026\223\072\374\107\330\321\170\226\061\037\272\053 -\014\137\135\231\255\143\211\132\044\040\166\330\337\375\253\116 -\246\042\252\235\136\346\047\212\175\150\051\243\347\212\270\332 -\021\273\027\055\231\235\023\044\106\367\305\342\330\237\216\177 -\307\217\164\155\132\262\350\162\365\254\356\044\020\255\057\024 -\332\377\055\232\106\161\107\276\102\337\273\001\333\364\177\323 -\050\217\061\131\133\323\311\002\246\264\122\312\156\227\373\103 -\305\010\046\157\212\364\273\375\237\050\252\015\325\105\363\023 -\072\035\330\300\170\217\101\147\074\036\224\144\256\173\013\305 -\350\331\001\210\071\032\227\206\144\101\325\073\207\014\156\372 -\017\306\275\110\024\277\071\115\324\236\101\266\217\226\035\143 -\226\223\331\225\006\170\061\150\236\067\006\073\200\211\105\141 -\071\043\307\033\104\243\025\345\034\370\222\060\273\002\003\001 -\000\001\243\201\357\060\201\354\060\022\006\003\125\035\023\001 -\001\377\004\010\060\006\001\001\377\002\001\001\060\016\006\003 -\125\035\017\001\001\377\004\004\003\002\001\006\060\035\006\003 -\125\035\016\004\026\004\024\145\315\353\253\065\036\000\076\176 -\325\164\300\034\264\163\107\016\032\144\057\060\201\246\006\003 -\125\035\040\004\201\236\060\201\233\060\201\230\006\004\125\035 -\040\000\060\201\217\060\057\006\010\053\006\001\005\005\007\002 -\001\026\043\150\164\164\160\072\057\057\167\167\167\056\146\151 -\162\155\141\160\162\157\146\145\163\151\157\156\141\154\056\143 -\157\155\057\143\160\163\060\134\006\010\053\006\001\005\005\007 -\002\002\060\120\036\116\000\120\000\141\000\163\000\145\000\157 -\000\040\000\144\000\145\000\040\000\154\000\141\000\040\000\102 -\000\157\000\156\000\141\000\156\000\157\000\166\000\141\000\040 -\000\064\000\067\000\040\000\102\000\141\000\162\000\143\000\145 -\000\154\000\157\000\156\000\141\000\040\000\060\000\070\000\060 -\000\061\000\067\060\015\006\011\052\206\110\206\367\015\001\001 -\005\005\000\003\202\002\001\000\027\175\240\371\264\335\305\305 -\353\255\113\044\265\241\002\253\335\245\210\112\262\017\125\113 -\053\127\214\073\345\061\335\376\304\062\361\347\133\144\226\066 -\062\030\354\245\062\167\327\343\104\266\300\021\052\200\271\075 -\152\156\174\233\323\255\374\303\326\243\346\144\051\174\321\341 -\070\036\202\053\377\047\145\257\373\026\025\304\056\161\204\345 -\265\377\372\244\107\275\144\062\273\366\045\204\242\047\102\365 -\040\260\302\023\020\021\315\020\025\272\102\220\052\322\104\341 -\226\046\353\061\110\022\375\052\332\311\006\317\164\036\251\113 -\325\207\050\371\171\064\222\076\056\104\350\366\217\117\217\065 -\077\045\263\071\334\143\052\220\153\040\137\304\122\022\116\227 -\054\052\254\235\227\336\110\362\243\146\333\302\322\203\225\246 -\146\247\236\045\017\351\013\063\221\145\012\132\303\331\124\022 -\335\257\303\116\016\037\046\136\015\334\263\215\354\325\201\160 -\336\322\117\044\005\363\154\116\365\114\111\146\215\321\377\322 -\013\045\101\110\376\121\204\306\102\257\200\004\317\320\176\144 -\111\344\362\337\242\354\261\114\300\052\035\347\264\261\145\242 -\304\274\361\230\364\252\160\007\143\264\270\332\073\114\372\100 -\042\060\133\021\246\360\005\016\306\002\003\110\253\206\233\205 -\335\333\335\352\242\166\200\163\175\365\234\004\304\105\215\347 -\271\034\213\236\352\327\165\321\162\261\336\165\104\347\102\175 -\342\127\153\175\334\231\274\075\203\050\352\200\223\215\305\114 -\145\301\160\201\270\070\374\103\061\262\366\003\064\107\262\254 -\373\042\006\313\036\335\027\107\034\137\146\271\323\032\242\332 -\021\261\244\274\043\311\344\276\207\377\271\224\266\370\135\040 -\112\324\137\347\275\150\173\145\362\025\036\322\072\251\055\351 -\330\153\044\254\227\130\104\107\255\131\030\361\041\145\160\336 -\316\064\140\250\100\361\363\074\244\303\050\043\214\376\047\063 -\103\100\240\027\074\353\352\073\260\162\246\243\271\112\113\136 -\026\110\364\262\274\310\214\222\305\235\237\254\162\066\274\064 -\200\064\153\251\213\222\300\270\027\355\354\166\123\365\044\001 -\214\263\042\350\113\174\125\306\235\372\243\024\273\145\205\156 -\156\117\022\176\012\074\235\225 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE -CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE - -# Trust for "Autoridad de Certificacion Firmaprofesional CIF A62634068" -# Issuer: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068,C=ES -# Serial Number:53:ec:3b:ee:fb:b2:48:5f -# Subject: CN=Autoridad de Certificacion Firmaprofesional CIF A62634068,C=ES -# Not Valid Before: Wed May 20 08:38:15 2009 -# Not Valid After : Tue Dec 31 08:38:15 2030 -# Fingerprint (SHA-256): 04:04:80:28:BF:1F:28:64:D4:8F:9A:D4:D8:32:94:36:6A:82:88:56:55:3F:3B:14:30:3F:90:14:7F:5D:40:EF -# Fingerprint (SHA1): AE:C5:FB:3F:C8:E1:BF:C4:E5:4F:03:07:5A:9A:E8:00:B7:F7:B6:FA -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Autoridad de Certificacion Firmaprofesional CIF A62634068" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\256\305\373\077\310\341\277\304\345\117\003\007\132\232\350\000 -\267\367\266\372 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\163\072\164\172\354\273\243\226\246\302\344\342\310\233\300\303 -END -CKA_ISSUER MULTILINE_OCTAL -\060\121\061\013\060\011\006\003\125\004\006\023\002\105\123\061 -\102\060\100\006\003\125\004\003\014\071\101\165\164\157\162\151 -\144\141\144\040\144\145\040\103\145\162\164\151\146\151\143\141 -\143\151\157\156\040\106\151\162\155\141\160\162\157\146\145\163 -\151\157\156\141\154\040\103\111\106\040\101\066\062\066\063\064 -\060\066\070 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\010\123\354\073\356\373\262\110\137 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - # # Certificate "Izenpe.com" # @@ -5042,430 +4526,6 @@ CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE -# -# Certificate "Chambers of Commerce Root - 2008" -# -# Issuer: CN=Chambers of Commerce Root - 2008,O=AC Camerfirma S.A.,serialNumber=A82743287,L=Madrid (see current address at www.camerfirma.com/address),C=EU -# Serial Number:00:a3:da:42:7e:a4:b1:ae:da -# Subject: CN=Chambers of Commerce Root - 2008,O=AC Camerfirma S.A.,serialNumber=A82743287,L=Madrid (see current address at www.camerfirma.com/address),C=EU -# Not Valid Before: Fri Aug 01 12:29:50 2008 -# Not Valid After : Sat Jul 31 12:29:50 2038 -# Fingerprint (SHA-256): 06:3E:4A:FA:C4:91:DF:D3:32:F3:08:9B:85:42:E9:46:17:D8:93:D7:FE:94:4E:10:A7:93:7E:E2:9D:96:93:C0 -# Fingerprint (SHA1): 78:6A:74:AC:76:AB:14:7F:9C:6A:30:50:BA:9E:A8:7E:FE:9A:CE:3C -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Chambers of Commerce Root - 2008" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\201\256\061\013\060\011\006\003\125\004\006\023\002\105\125 -\061\103\060\101\006\003\125\004\007\023\072\115\141\144\162\151 -\144\040\050\163\145\145\040\143\165\162\162\145\156\164\040\141 -\144\144\162\145\163\163\040\141\164\040\167\167\167\056\143\141 -\155\145\162\146\151\162\155\141\056\143\157\155\057\141\144\144 -\162\145\163\163\051\061\022\060\020\006\003\125\004\005\023\011 -\101\070\062\067\064\063\062\070\067\061\033\060\031\006\003\125 -\004\012\023\022\101\103\040\103\141\155\145\162\146\151\162\155 -\141\040\123\056\101\056\061\051\060\047\006\003\125\004\003\023 -\040\103\150\141\155\142\145\162\163\040\157\146\040\103\157\155 -\155\145\162\143\145\040\122\157\157\164\040\055\040\062\060\060 -\070 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\201\256\061\013\060\011\006\003\125\004\006\023\002\105\125 -\061\103\060\101\006\003\125\004\007\023\072\115\141\144\162\151 -\144\040\050\163\145\145\040\143\165\162\162\145\156\164\040\141 -\144\144\162\145\163\163\040\141\164\040\167\167\167\056\143\141 -\155\145\162\146\151\162\155\141\056\143\157\155\057\141\144\144 -\162\145\163\163\051\061\022\060\020\006\003\125\004\005\023\011 -\101\070\062\067\064\063\062\070\067\061\033\060\031\006\003\125 -\004\012\023\022\101\103\040\103\141\155\145\162\146\151\162\155 -\141\040\123\056\101\056\061\051\060\047\006\003\125\004\003\023 -\040\103\150\141\155\142\145\162\163\040\157\146\040\103\157\155 -\155\145\162\143\145\040\122\157\157\164\040\055\040\062\060\060 -\070 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\011\000\243\332\102\176\244\261\256\332 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\007\117\060\202\005\067\240\003\002\001\002\002\011\000 -\243\332\102\176\244\261\256\332\060\015\006\011\052\206\110\206 -\367\015\001\001\005\005\000\060\201\256\061\013\060\011\006\003 -\125\004\006\023\002\105\125\061\103\060\101\006\003\125\004\007 -\023\072\115\141\144\162\151\144\040\050\163\145\145\040\143\165 -\162\162\145\156\164\040\141\144\144\162\145\163\163\040\141\164 -\040\167\167\167\056\143\141\155\145\162\146\151\162\155\141\056 -\143\157\155\057\141\144\144\162\145\163\163\051\061\022\060\020 -\006\003\125\004\005\023\011\101\070\062\067\064\063\062\070\067 -\061\033\060\031\006\003\125\004\012\023\022\101\103\040\103\141 -\155\145\162\146\151\162\155\141\040\123\056\101\056\061\051\060 -\047\006\003\125\004\003\023\040\103\150\141\155\142\145\162\163 -\040\157\146\040\103\157\155\155\145\162\143\145\040\122\157\157 -\164\040\055\040\062\060\060\070\060\036\027\015\060\070\060\070 -\060\061\061\062\062\071\065\060\132\027\015\063\070\060\067\063 -\061\061\062\062\071\065\060\132\060\201\256\061\013\060\011\006 -\003\125\004\006\023\002\105\125\061\103\060\101\006\003\125\004 -\007\023\072\115\141\144\162\151\144\040\050\163\145\145\040\143 -\165\162\162\145\156\164\040\141\144\144\162\145\163\163\040\141 -\164\040\167\167\167\056\143\141\155\145\162\146\151\162\155\141 -\056\143\157\155\057\141\144\144\162\145\163\163\051\061\022\060 -\020\006\003\125\004\005\023\011\101\070\062\067\064\063\062\070 -\067\061\033\060\031\006\003\125\004\012\023\022\101\103\040\103 -\141\155\145\162\146\151\162\155\141\040\123\056\101\056\061\051 -\060\047\006\003\125\004\003\023\040\103\150\141\155\142\145\162 -\163\040\157\146\040\103\157\155\155\145\162\143\145\040\122\157 -\157\164\040\055\040\062\060\060\070\060\202\002\042\060\015\006 -\011\052\206\110\206\367\015\001\001\001\005\000\003\202\002\017 -\000\060\202\002\012\002\202\002\001\000\257\000\313\160\067\053 -\200\132\112\072\154\170\224\175\243\177\032\037\366\065\325\275 -\333\313\015\104\162\076\046\262\220\122\272\143\073\050\130\157 -\245\263\155\224\246\363\335\144\014\125\366\366\347\362\042\042 -\200\136\341\142\306\266\051\341\201\154\362\277\345\175\062\152 -\124\240\062\031\131\376\037\213\327\075\140\206\205\044\157\343 -\021\263\167\076\040\226\065\041\153\263\010\331\160\056\144\367 -\204\222\123\326\016\260\220\212\212\343\207\215\006\323\275\220 -\016\342\231\241\033\206\016\332\232\012\273\013\141\120\006\122 -\361\236\177\166\354\313\017\320\036\015\317\231\060\075\034\304 -\105\020\130\254\326\323\350\327\345\352\305\001\007\167\326\121 -\346\003\177\212\110\245\115\150\165\271\351\274\236\116\031\161 -\365\062\113\234\155\140\031\013\373\314\235\165\334\277\046\315 -\217\223\170\071\171\163\136\045\016\312\134\353\167\022\007\313 -\144\101\107\162\223\253\120\303\353\011\166\144\064\322\071\267 -\166\021\011\015\166\105\304\251\256\075\152\257\265\175\145\057 -\224\130\020\354\134\174\257\176\342\266\030\331\320\233\116\132 -\111\337\251\146\013\314\074\306\170\174\247\234\035\343\316\216 -\123\276\005\336\140\017\153\345\032\333\077\343\341\041\311\051 -\301\361\353\007\234\122\033\001\104\121\074\173\045\327\304\345 -\122\124\135\045\007\312\026\040\270\255\344\101\356\172\010\376 -\231\157\203\246\221\002\260\154\066\125\152\347\175\365\226\346 -\312\201\326\227\361\224\203\351\355\260\261\153\022\151\036\254 -\373\135\251\305\230\351\264\133\130\172\276\075\242\104\072\143 -\131\324\013\045\336\033\117\275\345\001\236\315\322\051\325\237 -\027\031\012\157\277\014\220\323\011\137\331\343\212\065\314\171 -\132\115\031\067\222\267\304\301\255\257\364\171\044\232\262\001 -\013\261\257\134\226\363\200\062\373\134\075\230\361\240\077\112 -\336\276\257\224\056\331\125\232\027\156\140\235\143\154\270\143 -\311\256\201\134\030\065\340\220\273\276\074\117\067\042\271\176 -\353\317\236\167\041\246\075\070\201\373\110\332\061\075\053\343 -\211\365\320\265\275\176\340\120\304\022\211\263\043\232\020\061 -\205\333\256\157\357\070\063\030\166\021\002\003\001\000\001\243 -\202\001\154\060\202\001\150\060\022\006\003\125\035\023\001\001 -\377\004\010\060\006\001\001\377\002\001\014\060\035\006\003\125 -\035\016\004\026\004\024\371\044\254\017\262\265\370\171\300\372 -\140\210\033\304\331\115\002\236\027\031\060\201\343\006\003\125 -\035\043\004\201\333\060\201\330\200\024\371\044\254\017\262\265 -\370\171\300\372\140\210\033\304\331\115\002\236\027\031\241\201 -\264\244\201\261\060\201\256\061\013\060\011\006\003\125\004\006 -\023\002\105\125\061\103\060\101\006\003\125\004\007\023\072\115 -\141\144\162\151\144\040\050\163\145\145\040\143\165\162\162\145 -\156\164\040\141\144\144\162\145\163\163\040\141\164\040\167\167 -\167\056\143\141\155\145\162\146\151\162\155\141\056\143\157\155 -\057\141\144\144\162\145\163\163\051\061\022\060\020\006\003\125 -\004\005\023\011\101\070\062\067\064\063\062\070\067\061\033\060 -\031\006\003\125\004\012\023\022\101\103\040\103\141\155\145\162 -\146\151\162\155\141\040\123\056\101\056\061\051\060\047\006\003 -\125\004\003\023\040\103\150\141\155\142\145\162\163\040\157\146 -\040\103\157\155\155\145\162\143\145\040\122\157\157\164\040\055 -\040\062\060\060\070\202\011\000\243\332\102\176\244\261\256\332 -\060\016\006\003\125\035\017\001\001\377\004\004\003\002\001\006 -\060\075\006\003\125\035\040\004\066\060\064\060\062\006\004\125 -\035\040\000\060\052\060\050\006\010\053\006\001\005\005\007\002 -\001\026\034\150\164\164\160\072\057\057\160\157\154\151\143\171 -\056\143\141\155\145\162\146\151\162\155\141\056\143\157\155\060 -\015\006\011\052\206\110\206\367\015\001\001\005\005\000\003\202 -\002\001\000\220\022\257\042\065\302\243\071\360\056\336\351\265 -\351\170\174\110\276\077\175\105\222\136\351\332\261\031\374\026 -\074\237\264\133\146\236\152\347\303\271\135\210\350\017\255\317 -\043\017\336\045\072\136\314\117\245\301\265\055\254\044\322\130 -\007\336\242\317\151\204\140\063\350\020\015\023\251\043\320\205 -\345\216\173\246\236\075\162\023\162\063\365\252\175\306\143\037 -\010\364\376\001\177\044\317\053\054\124\011\336\342\053\155\222 -\306\071\117\026\352\074\176\172\106\324\105\152\106\250\353\165 -\202\126\247\253\240\174\150\023\063\366\235\060\360\157\047\071 -\044\043\052\220\375\220\051\065\362\223\337\064\245\306\367\370 -\357\214\017\142\112\174\256\323\365\124\370\215\266\232\126\207 -\026\202\072\063\253\132\042\010\367\202\272\352\056\340\107\232 -\264\265\105\243\005\073\331\334\056\105\100\073\352\334\177\350 -\073\353\321\354\046\330\065\244\060\305\072\254\127\236\263\166 -\245\040\173\371\036\112\005\142\001\246\050\165\140\227\222\015 -\156\076\115\067\103\015\222\025\234\030\042\315\121\231\240\051 -\032\074\137\212\062\063\133\060\307\211\057\107\230\017\243\003 -\306\366\361\254\337\062\360\331\201\032\344\234\275\366\200\024 -\360\321\054\271\205\365\330\243\261\310\245\041\345\034\023\227 -\356\016\275\337\051\251\357\064\123\133\323\344\152\023\204\006 -\266\062\002\304\122\256\042\322\334\262\041\102\032\332\100\360 -\051\311\354\012\014\134\342\320\272\314\110\323\067\012\314\022 -\012\212\171\260\075\003\177\151\113\364\064\040\175\263\064\352 -\216\113\144\365\076\375\263\043\147\025\015\004\270\360\055\301 -\011\121\074\262\154\025\360\245\043\327\203\164\344\345\056\311 -\376\230\047\102\306\253\306\236\260\320\133\070\245\233\120\336 -\176\030\230\265\105\073\366\171\264\350\367\032\173\006\203\373 -\320\213\332\273\307\275\030\253\010\157\074\200\153\100\077\031 -\031\272\145\212\346\276\325\134\323\066\327\357\100\122\044\140 -\070\147\004\061\354\217\363\202\306\336\271\125\363\073\061\221 -\132\334\265\010\025\255\166\045\012\015\173\056\207\342\014\246 -\006\274\046\020\155\067\235\354\335\170\214\174\200\305\360\331 -\167\110\320 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE -CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE - -# Trust for "Chambers of Commerce Root - 2008" -# Issuer: CN=Chambers of Commerce Root - 2008,O=AC Camerfirma S.A.,serialNumber=A82743287,L=Madrid (see current address at www.camerfirma.com/address),C=EU -# Serial Number:00:a3:da:42:7e:a4:b1:ae:da -# Subject: CN=Chambers of Commerce Root - 2008,O=AC Camerfirma S.A.,serialNumber=A82743287,L=Madrid (see current address at www.camerfirma.com/address),C=EU -# Not Valid Before: Fri Aug 01 12:29:50 2008 -# Not Valid After : Sat Jul 31 12:29:50 2038 -# Fingerprint (SHA-256): 06:3E:4A:FA:C4:91:DF:D3:32:F3:08:9B:85:42:E9:46:17:D8:93:D7:FE:94:4E:10:A7:93:7E:E2:9D:96:93:C0 -# Fingerprint (SHA1): 78:6A:74:AC:76:AB:14:7F:9C:6A:30:50:BA:9E:A8:7E:FE:9A:CE:3C -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Chambers of Commerce Root - 2008" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\170\152\164\254\166\253\024\177\234\152\060\120\272\236\250\176 -\376\232\316\074 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\136\200\236\204\132\016\145\013\027\002\363\125\030\052\076\327 -END -CKA_ISSUER MULTILINE_OCTAL -\060\201\256\061\013\060\011\006\003\125\004\006\023\002\105\125 -\061\103\060\101\006\003\125\004\007\023\072\115\141\144\162\151 -\144\040\050\163\145\145\040\143\165\162\162\145\156\164\040\141 -\144\144\162\145\163\163\040\141\164\040\167\167\167\056\143\141 -\155\145\162\146\151\162\155\141\056\143\157\155\057\141\144\144 -\162\145\163\163\051\061\022\060\020\006\003\125\004\005\023\011 -\101\070\062\067\064\063\062\070\067\061\033\060\031\006\003\125 -\004\012\023\022\101\103\040\103\141\155\145\162\146\151\162\155 -\141\040\123\056\101\056\061\051\060\047\006\003\125\004\003\023 -\040\103\150\141\155\142\145\162\163\040\157\146\040\103\157\155 -\155\145\162\143\145\040\122\157\157\164\040\055\040\062\060\060 -\070 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\011\000\243\332\102\176\244\261\256\332 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - -# -# Certificate "Global Chambersign Root - 2008" -# -# Issuer: CN=Global Chambersign Root - 2008,O=AC Camerfirma S.A.,serialNumber=A82743287,L=Madrid (see current address at www.camerfirma.com/address),C=EU -# Serial Number:00:c9:cd:d3:e9:d5:7d:23:ce -# Subject: CN=Global Chambersign Root - 2008,O=AC Camerfirma S.A.,serialNumber=A82743287,L=Madrid (see current address at www.camerfirma.com/address),C=EU -# Not Valid Before: Fri Aug 01 12:31:40 2008 -# Not Valid After : Sat Jul 31 12:31:40 2038 -# Fingerprint (SHA-256): 13:63:35:43:93:34:A7:69:80:16:A0:D3:24:DE:72:28:4E:07:9D:7B:52:20:BB:8F:BD:74:78:16:EE:BE:BA:CA -# Fingerprint (SHA1): 4A:BD:EE:EC:95:0D:35:9C:89:AE:C7:52:A1:2C:5B:29:F6:D6:AA:0C -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Global Chambersign Root - 2008" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\201\254\061\013\060\011\006\003\125\004\006\023\002\105\125 -\061\103\060\101\006\003\125\004\007\023\072\115\141\144\162\151 -\144\040\050\163\145\145\040\143\165\162\162\145\156\164\040\141 -\144\144\162\145\163\163\040\141\164\040\167\167\167\056\143\141 -\155\145\162\146\151\162\155\141\056\143\157\155\057\141\144\144 -\162\145\163\163\051\061\022\060\020\006\003\125\004\005\023\011 -\101\070\062\067\064\063\062\070\067\061\033\060\031\006\003\125 -\004\012\023\022\101\103\040\103\141\155\145\162\146\151\162\155 -\141\040\123\056\101\056\061\047\060\045\006\003\125\004\003\023 -\036\107\154\157\142\141\154\040\103\150\141\155\142\145\162\163 -\151\147\156\040\122\157\157\164\040\055\040\062\060\060\070 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\201\254\061\013\060\011\006\003\125\004\006\023\002\105\125 -\061\103\060\101\006\003\125\004\007\023\072\115\141\144\162\151 -\144\040\050\163\145\145\040\143\165\162\162\145\156\164\040\141 -\144\144\162\145\163\163\040\141\164\040\167\167\167\056\143\141 -\155\145\162\146\151\162\155\141\056\143\157\155\057\141\144\144 -\162\145\163\163\051\061\022\060\020\006\003\125\004\005\023\011 -\101\070\062\067\064\063\062\070\067\061\033\060\031\006\003\125 -\004\012\023\022\101\103\040\103\141\155\145\162\146\151\162\155 -\141\040\123\056\101\056\061\047\060\045\006\003\125\004\003\023 -\036\107\154\157\142\141\154\040\103\150\141\155\142\145\162\163 -\151\147\156\040\122\157\157\164\040\055\040\062\060\060\070 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\011\000\311\315\323\351\325\175\043\316 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\007\111\060\202\005\061\240\003\002\001\002\002\011\000 -\311\315\323\351\325\175\043\316\060\015\006\011\052\206\110\206 -\367\015\001\001\005\005\000\060\201\254\061\013\060\011\006\003 -\125\004\006\023\002\105\125\061\103\060\101\006\003\125\004\007 -\023\072\115\141\144\162\151\144\040\050\163\145\145\040\143\165 -\162\162\145\156\164\040\141\144\144\162\145\163\163\040\141\164 -\040\167\167\167\056\143\141\155\145\162\146\151\162\155\141\056 -\143\157\155\057\141\144\144\162\145\163\163\051\061\022\060\020 -\006\003\125\004\005\023\011\101\070\062\067\064\063\062\070\067 -\061\033\060\031\006\003\125\004\012\023\022\101\103\040\103\141 -\155\145\162\146\151\162\155\141\040\123\056\101\056\061\047\060 -\045\006\003\125\004\003\023\036\107\154\157\142\141\154\040\103 -\150\141\155\142\145\162\163\151\147\156\040\122\157\157\164\040 -\055\040\062\060\060\070\060\036\027\015\060\070\060\070\060\061 -\061\062\063\061\064\060\132\027\015\063\070\060\067\063\061\061 -\062\063\061\064\060\132\060\201\254\061\013\060\011\006\003\125 -\004\006\023\002\105\125\061\103\060\101\006\003\125\004\007\023 -\072\115\141\144\162\151\144\040\050\163\145\145\040\143\165\162 -\162\145\156\164\040\141\144\144\162\145\163\163\040\141\164\040 -\167\167\167\056\143\141\155\145\162\146\151\162\155\141\056\143 -\157\155\057\141\144\144\162\145\163\163\051\061\022\060\020\006 -\003\125\004\005\023\011\101\070\062\067\064\063\062\070\067\061 -\033\060\031\006\003\125\004\012\023\022\101\103\040\103\141\155 -\145\162\146\151\162\155\141\040\123\056\101\056\061\047\060\045 -\006\003\125\004\003\023\036\107\154\157\142\141\154\040\103\150 -\141\155\142\145\162\163\151\147\156\040\122\157\157\164\040\055 -\040\062\060\060\070\060\202\002\042\060\015\006\011\052\206\110 -\206\367\015\001\001\001\005\000\003\202\002\017\000\060\202\002 -\012\002\202\002\001\000\300\337\126\323\344\072\233\166\105\264 -\023\333\377\301\266\031\213\067\101\030\225\122\107\353\027\235 -\051\210\216\065\154\006\062\056\107\142\363\111\004\277\175\104 -\066\261\161\314\275\132\011\163\325\331\205\104\377\221\127\045 -\337\136\066\216\160\321\134\161\103\035\331\332\357\134\322\373 -\033\275\072\265\313\255\243\314\104\247\015\256\041\025\077\271 -\172\133\222\165\330\244\022\070\211\031\212\267\200\322\342\062 -\157\126\234\221\326\210\020\013\263\164\144\222\164\140\363\366 -\317\030\117\140\262\043\320\307\073\316\141\113\231\217\302\014 -\320\100\262\230\334\015\250\116\243\271\012\256\140\240\255\105 -\122\143\272\146\275\150\340\371\276\032\250\201\273\036\101\170 -\165\323\301\376\000\125\260\207\124\350\047\220\065\035\114\063 -\255\227\374\227\056\230\204\277\054\311\243\277\321\230\021\024 -\355\143\370\312\230\210\130\027\231\355\105\003\227\176\074\206 -\036\210\214\276\362\221\204\217\145\064\330\000\114\175\267\061 -\027\132\051\172\012\030\044\060\243\067\265\172\251\001\175\046 -\326\371\016\216\131\361\375\033\063\265\051\073\027\073\101\266 -\041\335\324\300\075\245\237\237\037\103\120\311\273\274\154\172 -\227\230\356\315\214\037\373\234\121\256\213\160\275\047\237\161 -\300\153\254\175\220\146\350\327\135\072\015\260\325\302\215\325 -\310\235\235\301\155\320\320\277\121\344\343\370\303\070\066\256 -\326\247\165\346\257\204\103\135\223\222\014\152\007\336\073\035 -\230\042\326\254\301\065\333\243\240\045\377\162\265\166\035\336 -\155\351\054\146\054\122\204\320\105\222\316\034\345\345\063\035 -\334\007\123\124\243\252\202\073\232\067\057\334\335\240\144\351 -\346\335\275\256\374\144\205\035\074\247\311\006\336\204\377\153 -\350\153\032\074\305\242\263\102\373\213\011\076\137\010\122\307 -\142\304\324\005\161\277\304\144\344\370\241\203\350\076\022\233 -\250\036\324\066\115\057\161\366\215\050\366\203\251\023\322\141 -\301\221\273\110\300\064\217\101\214\113\114\333\151\022\377\120 -\224\234\040\203\131\163\355\174\241\362\361\375\335\367\111\323 -\103\130\240\126\143\312\075\075\345\065\126\131\351\016\312\040 -\314\053\113\223\051\017\002\003\001\000\001\243\202\001\152\060 -\202\001\146\060\022\006\003\125\035\023\001\001\377\004\010\060 -\006\001\001\377\002\001\014\060\035\006\003\125\035\016\004\026 -\004\024\271\011\312\234\036\333\323\154\072\153\256\355\124\361 -\133\223\006\065\056\136\060\201\341\006\003\125\035\043\004\201 -\331\060\201\326\200\024\271\011\312\234\036\333\323\154\072\153 -\256\355\124\361\133\223\006\065\056\136\241\201\262\244\201\257 -\060\201\254\061\013\060\011\006\003\125\004\006\023\002\105\125 -\061\103\060\101\006\003\125\004\007\023\072\115\141\144\162\151 -\144\040\050\163\145\145\040\143\165\162\162\145\156\164\040\141 -\144\144\162\145\163\163\040\141\164\040\167\167\167\056\143\141 -\155\145\162\146\151\162\155\141\056\143\157\155\057\141\144\144 -\162\145\163\163\051\061\022\060\020\006\003\125\004\005\023\011 -\101\070\062\067\064\063\062\070\067\061\033\060\031\006\003\125 -\004\012\023\022\101\103\040\103\141\155\145\162\146\151\162\155 -\141\040\123\056\101\056\061\047\060\045\006\003\125\004\003\023 -\036\107\154\157\142\141\154\040\103\150\141\155\142\145\162\163 -\151\147\156\040\122\157\157\164\040\055\040\062\060\060\070\202 -\011\000\311\315\323\351\325\175\043\316\060\016\006\003\125\035 -\017\001\001\377\004\004\003\002\001\006\060\075\006\003\125\035 -\040\004\066\060\064\060\062\006\004\125\035\040\000\060\052\060 -\050\006\010\053\006\001\005\005\007\002\001\026\034\150\164\164 -\160\072\057\057\160\157\154\151\143\171\056\143\141\155\145\162 -\146\151\162\155\141\056\143\157\155\060\015\006\011\052\206\110 -\206\367\015\001\001\005\005\000\003\202\002\001\000\200\210\177 -\160\336\222\050\331\005\224\106\377\220\127\251\361\057\337\032 -\015\153\372\174\016\034\111\044\171\047\330\106\252\157\051\131 -\122\210\160\022\352\335\075\365\233\123\124\157\341\140\242\250 -\011\271\354\353\131\174\306\065\361\334\030\351\361\147\345\257 -\272\105\340\011\336\312\104\017\302\027\016\167\221\105\172\063 -\137\137\226\054\150\213\301\107\217\230\233\075\300\354\313\365 -\325\202\222\204\065\321\276\066\070\126\162\061\133\107\055\252 -\027\244\143\121\353\012\001\255\177\354\165\236\313\241\037\361 -\177\022\261\271\344\144\177\147\326\043\052\364\270\071\135\230 -\350\041\247\341\275\075\102\032\164\232\160\257\150\154\120\135 -\111\317\377\373\016\135\346\054\107\327\201\072\131\000\265\163 -\153\143\040\366\061\105\010\071\016\364\160\176\100\160\132\077 -\320\153\102\251\164\075\050\057\002\155\165\162\225\011\215\110 -\143\306\306\043\127\222\223\136\065\301\215\371\012\367\054\235 -\142\034\366\255\174\335\246\061\036\266\261\307\176\205\046\372 -\244\152\265\332\143\060\321\357\223\067\262\146\057\175\005\367 -\347\267\113\230\224\065\300\331\072\051\301\235\262\120\063\035 -\112\251\132\246\311\003\357\355\364\347\250\156\212\264\127\204 -\353\244\077\320\356\252\252\207\133\143\350\223\342\153\250\324 -\270\162\170\153\033\355\071\344\135\313\233\252\207\325\117\116 -\000\376\331\152\237\074\061\017\050\002\001\175\230\350\247\260 -\242\144\236\171\370\110\362\025\251\314\346\310\104\353\077\170 -\231\362\173\161\076\074\361\230\247\305\030\022\077\346\273\050 -\063\102\351\105\012\174\155\362\206\171\057\305\202\031\175\011 -\211\174\262\124\166\210\256\336\301\363\314\341\156\333\061\326 -\223\256\231\240\357\045\152\163\230\211\133\072\056\023\210\036 -\277\300\222\224\064\033\343\047\267\213\036\157\102\377\347\351 -\067\233\120\035\055\242\371\002\356\313\130\130\072\161\274\150 -\343\252\301\257\034\050\037\242\334\043\145\077\201\352\256\231 -\323\330\060\317\023\015\117\025\311\204\274\247\110\055\370\060 -\043\167\330\106\113\171\155\366\214\355\072\177\140\021\170\364 -\351\233\256\325\124\300\164\200\321\013\102\237\301 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE -CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE - -# Trust for "Global Chambersign Root - 2008" -# Issuer: CN=Global Chambersign Root - 2008,O=AC Camerfirma S.A.,serialNumber=A82743287,L=Madrid (see current address at www.camerfirma.com/address),C=EU -# Serial Number:00:c9:cd:d3:e9:d5:7d:23:ce -# Subject: CN=Global Chambersign Root - 2008,O=AC Camerfirma S.A.,serialNumber=A82743287,L=Madrid (see current address at www.camerfirma.com/address),C=EU -# Not Valid Before: Fri Aug 01 12:31:40 2008 -# Not Valid After : Sat Jul 31 12:31:40 2038 -# Fingerprint (SHA-256): 13:63:35:43:93:34:A7:69:80:16:A0:D3:24:DE:72:28:4E:07:9D:7B:52:20:BB:8F:BD:74:78:16:EE:BE:BA:CA -# Fingerprint (SHA1): 4A:BD:EE:EC:95:0D:35:9C:89:AE:C7:52:A1:2C:5B:29:F6:D6:AA:0C -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Global Chambersign Root - 2008" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\112\275\356\354\225\015\065\234\211\256\307\122\241\054\133\051 -\366\326\252\014 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\236\200\377\170\001\014\056\301\066\275\376\226\220\156\010\363 -END -CKA_ISSUER MULTILINE_OCTAL -\060\201\254\061\013\060\011\006\003\125\004\006\023\002\105\125 -\061\103\060\101\006\003\125\004\007\023\072\115\141\144\162\151 -\144\040\050\163\145\145\040\143\165\162\162\145\156\164\040\141 -\144\144\162\145\163\163\040\141\164\040\167\167\167\056\143\141 -\155\145\162\146\151\162\155\141\056\143\157\155\057\141\144\144 -\162\145\163\163\051\061\022\060\020\006\003\125\004\005\023\011 -\101\070\062\067\064\063\062\070\067\061\033\060\031\006\003\125 -\004\012\023\022\101\103\040\103\141\155\145\162\146\151\162\155 -\141\040\123\056\101\056\061\047\060\045\006\003\125\004\003\023 -\036\107\154\157\142\141\154\040\103\150\141\155\142\145\162\163 -\151\147\156\040\122\157\157\164\040\055\040\062\060\060\070 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\011\000\311\315\323\351\325\175\043\316 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - # # Certificate "Go Daddy Root Certificate Authority - G2" # @@ -13316,324 +12376,6 @@ CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE -# -# Certificate "Symantec Class 1 Public Primary Certification Authority - G6" -# -# Issuer: CN=Symantec Class 1 Public Primary Certification Authority - G6,OU=Symantec Trust Network,O=Symantec Corporation,C=US -# Serial Number:24:32:75:f2:1d:2f:d2:09:33:f7:b4:6a:ca:d0:f3:98 -# Subject: CN=Symantec Class 1 Public Primary Certification Authority - G6,OU=Symantec Trust Network,O=Symantec Corporation,C=US -# Not Valid Before: Tue Oct 18 00:00:00 2011 -# Not Valid After : Tue Dec 01 23:59:59 2037 -# Fingerprint (SHA-256): 9D:19:0B:2E:31:45:66:68:5B:E8:A8:89:E2:7A:A8:C7:D7:AE:1D:8A:AD:DB:A3:C1:EC:F9:D2:48:63:CD:34:B9 -# Fingerprint (SHA1): 51:7F:61:1E:29:91:6B:53:82:FB:72:E7:44:D9:8D:C3:CC:53:6D:64 -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Symantec Class 1 Public Primary Certification Authority - G6" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\201\224\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\035\060\033\006\003\125\004\012\023\024\123\171\155\141\156 -\164\145\143\040\103\157\162\160\157\162\141\164\151\157\156\061 -\037\060\035\006\003\125\004\013\023\026\123\171\155\141\156\164 -\145\143\040\124\162\165\163\164\040\116\145\164\167\157\162\153 -\061\105\060\103\006\003\125\004\003\023\074\123\171\155\141\156 -\164\145\143\040\103\154\141\163\163\040\061\040\120\165\142\154 -\151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 -\146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 -\164\171\040\055\040\107\066 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\201\224\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\035\060\033\006\003\125\004\012\023\024\123\171\155\141\156 -\164\145\143\040\103\157\162\160\157\162\141\164\151\157\156\061 -\037\060\035\006\003\125\004\013\023\026\123\171\155\141\156\164 -\145\143\040\124\162\165\163\164\040\116\145\164\167\157\162\153 -\061\105\060\103\006\003\125\004\003\023\074\123\171\155\141\156 -\164\145\143\040\103\154\141\163\163\040\061\040\120\165\142\154 -\151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 -\146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 -\164\171\040\055\040\107\066 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\020\044\062\165\362\035\057\322\011\063\367\264\152\312\320 -\363\230 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\003\366\060\202\002\336\240\003\002\001\002\002\020\044 -\062\165\362\035\057\322\011\063\367\264\152\312\320\363\230\060 -\015\006\011\052\206\110\206\367\015\001\001\013\005\000\060\201 -\224\061\013\060\011\006\003\125\004\006\023\002\125\123\061\035 -\060\033\006\003\125\004\012\023\024\123\171\155\141\156\164\145 -\143\040\103\157\162\160\157\162\141\164\151\157\156\061\037\060 -\035\006\003\125\004\013\023\026\123\171\155\141\156\164\145\143 -\040\124\162\165\163\164\040\116\145\164\167\157\162\153\061\105 -\060\103\006\003\125\004\003\023\074\123\171\155\141\156\164\145 -\143\040\103\154\141\163\163\040\061\040\120\165\142\154\151\143 -\040\120\162\151\155\141\162\171\040\103\145\162\164\151\146\151 -\143\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171 -\040\055\040\107\066\060\036\027\015\061\061\061\060\061\070\060 -\060\060\060\060\060\132\027\015\063\067\061\062\060\061\062\063 -\065\071\065\071\132\060\201\224\061\013\060\011\006\003\125\004 -\006\023\002\125\123\061\035\060\033\006\003\125\004\012\023\024 -\123\171\155\141\156\164\145\143\040\103\157\162\160\157\162\141 -\164\151\157\156\061\037\060\035\006\003\125\004\013\023\026\123 -\171\155\141\156\164\145\143\040\124\162\165\163\164\040\116\145 -\164\167\157\162\153\061\105\060\103\006\003\125\004\003\023\074 -\123\171\155\141\156\164\145\143\040\103\154\141\163\163\040\061 -\040\120\165\142\154\151\143\040\120\162\151\155\141\162\171\040 -\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101\165 -\164\150\157\162\151\164\171\040\055\040\107\066\060\202\001\042 -\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000\003 -\202\001\017\000\060\202\001\012\002\202\001\001\000\307\071\327 -\111\144\251\231\202\042\114\352\105\331\007\026\343\173\364\203 -\350\231\163\372\153\261\066\340\232\167\240\100\302\201\215\001 -\307\314\214\275\217\175\367\171\343\172\114\003\115\331\373\375 -\207\070\050\054\335\232\213\124\010\333\147\373\033\214\376\050 -\222\057\276\267\262\110\247\201\241\330\136\210\303\314\071\100 -\101\132\321\334\345\332\020\237\057\332\001\115\375\056\106\174 -\371\056\047\012\151\067\356\221\243\033\152\314\104\277\033\307 -\303\324\021\262\120\140\227\011\275\056\042\365\101\204\146\237 -\315\100\246\251\000\200\301\037\225\222\237\336\363\110\357\333 -\035\167\141\374\177\337\356\226\244\162\320\266\076\377\170\047 -\257\313\222\025\151\010\333\143\020\342\346\227\254\156\334\254 -\366\242\316\036\107\231\271\211\267\022\346\241\324\315\131\021 -\147\303\157\205\330\102\116\050\276\131\125\131\004\225\253\217 -\067\200\277\015\360\374\037\072\144\061\130\201\170\327\342\065 -\366\040\077\051\270\217\026\156\076\110\334\265\114\007\341\362 -\032\352\176\012\171\326\250\275\353\135\206\053\115\002\003\001 -\000\001\243\102\060\100\060\016\006\003\125\035\017\001\001\377 -\004\004\003\002\001\006\060\017\006\003\125\035\023\001\001\377 -\004\005\060\003\001\001\377\060\035\006\003\125\035\016\004\026 -\004\024\063\101\350\310\071\022\025\223\110\362\226\062\056\132 -\365\332\224\137\123\140\060\015\006\011\052\206\110\206\367\015 -\001\001\013\005\000\003\202\001\001\000\025\343\163\127\261\027 -\266\137\111\151\104\246\366\136\172\147\254\322\336\165\111\253 -\376\045\125\307\072\311\104\025\020\156\277\061\153\313\331\007 -\223\177\034\205\143\000\343\062\022\340\314\313\373\071\154\217 -\342\123\342\074\100\063\331\244\214\107\346\255\130\373\211\257 -\343\336\206\051\126\064\054\105\270\022\372\104\211\156\055\024 -\045\050\044\001\145\326\352\122\254\005\156\126\022\011\075\320 -\164\364\327\275\006\312\250\072\215\126\102\372\215\162\076\164 -\361\003\162\337\207\033\136\016\172\125\226\054\070\267\230\205 -\315\115\063\104\311\224\217\132\061\060\067\113\243\072\022\263 -\347\066\321\041\150\113\055\070\346\123\256\034\045\126\010\126 -\003\147\204\235\306\303\316\044\142\307\114\066\317\260\006\104 -\267\365\137\002\335\331\124\351\057\220\116\172\310\116\203\100 -\014\232\227\074\067\277\277\354\366\360\264\205\167\050\301\013 -\310\147\202\020\027\070\242\267\006\352\233\277\072\370\351\043 -\007\277\164\340\230\070\025\125\170\356\162\000\134\031\243\364 -\322\063\340\377\275\321\124\071\051\017 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE -# For Email Distrust After: Wed Aug 31 00:00:00 2022 -CKA_NSS_EMAIL_DISTRUST_AFTER MULTILINE_OCTAL -\062\062\060\070\063\061\060\060\060\060\060\060\132 -END - -# Trust for "Symantec Class 1 Public Primary Certification Authority - G6" -# Issuer: CN=Symantec Class 1 Public Primary Certification Authority - G6,OU=Symantec Trust Network,O=Symantec Corporation,C=US -# Serial Number:24:32:75:f2:1d:2f:d2:09:33:f7:b4:6a:ca:d0:f3:98 -# Subject: CN=Symantec Class 1 Public Primary Certification Authority - G6,OU=Symantec Trust Network,O=Symantec Corporation,C=US -# Not Valid Before: Tue Oct 18 00:00:00 2011 -# Not Valid After : Tue Dec 01 23:59:59 2037 -# Fingerprint (SHA-256): 9D:19:0B:2E:31:45:66:68:5B:E8:A8:89:E2:7A:A8:C7:D7:AE:1D:8A:AD:DB:A3:C1:EC:F9:D2:48:63:CD:34:B9 -# Fingerprint (SHA1): 51:7F:61:1E:29:91:6B:53:82:FB:72:E7:44:D9:8D:C3:CC:53:6D:64 -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Symantec Class 1 Public Primary Certification Authority - G6" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\121\177\141\036\051\221\153\123\202\373\162\347\104\331\215\303 -\314\123\155\144 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\057\250\264\332\366\144\113\036\202\371\106\075\124\032\174\260 -END -CKA_ISSUER MULTILINE_OCTAL -\060\201\224\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\035\060\033\006\003\125\004\012\023\024\123\171\155\141\156 -\164\145\143\040\103\157\162\160\157\162\141\164\151\157\156\061 -\037\060\035\006\003\125\004\013\023\026\123\171\155\141\156\164 -\145\143\040\124\162\165\163\164\040\116\145\164\167\157\162\153 -\061\105\060\103\006\003\125\004\003\023\074\123\171\155\141\156 -\164\145\143\040\103\154\141\163\163\040\061\040\120\165\142\154 -\151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 -\146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 -\164\171\040\055\040\107\066 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\020\044\062\165\362\035\057\322\011\063\367\264\152\312\320 -\363\230 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - -# -# Certificate "Symantec Class 2 Public Primary Certification Authority - G6" -# -# Issuer: CN=Symantec Class 2 Public Primary Certification Authority - G6,OU=Symantec Trust Network,O=Symantec Corporation,C=US -# Serial Number:64:82:9e:fc:37:1e:74:5d:fc:97:ff:97:c8:b1:ff:41 -# Subject: CN=Symantec Class 2 Public Primary Certification Authority - G6,OU=Symantec Trust Network,O=Symantec Corporation,C=US -# Not Valid Before: Tue Oct 18 00:00:00 2011 -# Not Valid After : Tue Dec 01 23:59:59 2037 -# Fingerprint (SHA-256): CB:62:7D:18:B5:8A:D5:6D:DE:33:1A:30:45:6B:C6:5C:60:1A:4E:9B:18:DE:DC:EA:08:E7:DA:AA:07:81:5F:F0 -# Fingerprint (SHA1): 40:B3:31:A0:E9:BF:E8:55:BC:39:93:CA:70:4F:4E:C2:51:D4:1D:8F -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Symantec Class 2 Public Primary Certification Authority - G6" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\201\224\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\035\060\033\006\003\125\004\012\023\024\123\171\155\141\156 -\164\145\143\040\103\157\162\160\157\162\141\164\151\157\156\061 -\037\060\035\006\003\125\004\013\023\026\123\171\155\141\156\164 -\145\143\040\124\162\165\163\164\040\116\145\164\167\157\162\153 -\061\105\060\103\006\003\125\004\003\023\074\123\171\155\141\156 -\164\145\143\040\103\154\141\163\163\040\062\040\120\165\142\154 -\151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 -\146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 -\164\171\040\055\040\107\066 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\201\224\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\035\060\033\006\003\125\004\012\023\024\123\171\155\141\156 -\164\145\143\040\103\157\162\160\157\162\141\164\151\157\156\061 -\037\060\035\006\003\125\004\013\023\026\123\171\155\141\156\164 -\145\143\040\124\162\165\163\164\040\116\145\164\167\157\162\153 -\061\105\060\103\006\003\125\004\003\023\074\123\171\155\141\156 -\164\145\143\040\103\154\141\163\163\040\062\040\120\165\142\154 -\151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 -\146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 -\164\171\040\055\040\107\066 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\020\144\202\236\374\067\036\164\135\374\227\377\227\310\261 -\377\101 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\003\366\060\202\002\336\240\003\002\001\002\002\020\144 -\202\236\374\067\036\164\135\374\227\377\227\310\261\377\101\060 -\015\006\011\052\206\110\206\367\015\001\001\013\005\000\060\201 -\224\061\013\060\011\006\003\125\004\006\023\002\125\123\061\035 -\060\033\006\003\125\004\012\023\024\123\171\155\141\156\164\145 -\143\040\103\157\162\160\157\162\141\164\151\157\156\061\037\060 -\035\006\003\125\004\013\023\026\123\171\155\141\156\164\145\143 -\040\124\162\165\163\164\040\116\145\164\167\157\162\153\061\105 -\060\103\006\003\125\004\003\023\074\123\171\155\141\156\164\145 -\143\040\103\154\141\163\163\040\062\040\120\165\142\154\151\143 -\040\120\162\151\155\141\162\171\040\103\145\162\164\151\146\151 -\143\141\164\151\157\156\040\101\165\164\150\157\162\151\164\171 -\040\055\040\107\066\060\036\027\015\061\061\061\060\061\070\060 -\060\060\060\060\060\132\027\015\063\067\061\062\060\061\062\063 -\065\071\065\071\132\060\201\224\061\013\060\011\006\003\125\004 -\006\023\002\125\123\061\035\060\033\006\003\125\004\012\023\024 -\123\171\155\141\156\164\145\143\040\103\157\162\160\157\162\141 -\164\151\157\156\061\037\060\035\006\003\125\004\013\023\026\123 -\171\155\141\156\164\145\143\040\124\162\165\163\164\040\116\145 -\164\167\157\162\153\061\105\060\103\006\003\125\004\003\023\074 -\123\171\155\141\156\164\145\143\040\103\154\141\163\163\040\062 -\040\120\165\142\154\151\143\040\120\162\151\155\141\162\171\040 -\103\145\162\164\151\146\151\143\141\164\151\157\156\040\101\165 -\164\150\157\162\151\164\171\040\055\040\107\066\060\202\001\042 -\060\015\006\011\052\206\110\206\367\015\001\001\001\005\000\003 -\202\001\017\000\060\202\001\012\002\202\001\001\000\315\314\351 -\005\310\143\205\313\077\100\143\027\275\030\372\065\346\004\147 -\127\145\230\051\244\117\311\134\217\017\064\322\370\332\250\023 -\142\252\270\036\120\147\170\260\026\114\240\071\251\025\172\256 -\355\322\242\300\360\220\067\051\030\046\134\350\015\074\266\154 -\111\077\301\340\334\331\113\266\024\031\013\246\323\226\341\326 -\011\343\031\046\034\371\037\145\113\371\032\103\034\000\203\326 -\320\252\111\242\324\333\346\142\070\272\120\024\103\155\371\061 -\370\126\026\331\070\002\221\317\353\154\335\273\071\116\231\341 -\060\147\105\361\324\360\215\303\337\376\362\070\007\041\175\000 -\136\126\104\263\344\140\275\221\053\234\253\133\004\162\017\262 -\050\331\162\253\005\040\102\045\251\133\003\152\040\020\314\061 -\360\053\332\065\054\320\373\232\227\116\360\202\113\053\330\137 -\066\243\013\055\257\143\015\035\045\177\241\156\134\142\241\215 -\050\076\241\374\034\040\370\001\057\272\125\232\021\260\031\322 -\310\120\171\153\016\152\005\327\252\004\066\262\243\362\341\137 -\167\247\167\234\345\036\334\351\337\152\301\145\135\002\003\001 -\000\001\243\102\060\100\060\016\006\003\125\035\017\001\001\377 -\004\004\003\002\001\006\060\017\006\003\125\035\023\001\001\377 -\004\005\060\003\001\001\377\060\035\006\003\125\035\016\004\026 -\004\024\207\214\040\225\310\230\112\321\326\200\006\112\220\064 -\104\337\034\115\277\260\060\015\006\011\052\206\110\206\367\015 -\001\001\013\005\000\003\202\001\001\000\201\216\262\245\146\226 -\267\041\245\266\357\157\043\132\137\333\201\305\102\245\170\301 -\151\375\364\074\327\371\134\153\160\162\032\374\132\227\115\000 -\200\210\210\202\212\303\161\015\216\305\211\233\054\355\215\013 -\322\162\124\365\175\324\134\103\127\351\363\256\245\002\021\366 -\166\053\201\127\335\175\332\164\060\375\124\107\366\340\026\156 -\246\264\012\110\346\347\165\007\017\051\031\071\316\171\364\266 -\154\305\137\231\325\037\113\372\337\155\054\074\015\124\200\160 -\360\210\013\200\317\306\150\242\270\035\160\331\166\214\374\356 -\245\311\317\255\035\317\231\045\127\132\142\105\313\026\153\275 -\111\315\245\243\214\151\171\045\256\270\114\154\213\100\146\113 -\026\077\317\002\032\335\341\154\153\007\141\152\166\025\051\231 -\177\033\335\210\200\301\277\265\217\163\305\246\226\043\204\246 -\050\206\044\063\152\001\056\127\163\045\266\136\277\217\346\035 -\141\250\100\051\147\035\207\233\035\177\233\237\231\315\061\326 -\124\276\142\273\071\254\150\022\110\221\040\245\313\261\335\376 -\157\374\132\344\202\125\131\257\061\251 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE -# For Email Distrust After: Wed Aug 31 00:00:00 2022 -CKA_NSS_EMAIL_DISTRUST_AFTER MULTILINE_OCTAL -\062\062\060\070\063\061\060\060\060\060\060\060\132 -END - -# Trust for "Symantec Class 2 Public Primary Certification Authority - G6" -# Issuer: CN=Symantec Class 2 Public Primary Certification Authority - G6,OU=Symantec Trust Network,O=Symantec Corporation,C=US -# Serial Number:64:82:9e:fc:37:1e:74:5d:fc:97:ff:97:c8:b1:ff:41 -# Subject: CN=Symantec Class 2 Public Primary Certification Authority - G6,OU=Symantec Trust Network,O=Symantec Corporation,C=US -# Not Valid Before: Tue Oct 18 00:00:00 2011 -# Not Valid After : Tue Dec 01 23:59:59 2037 -# Fingerprint (SHA-256): CB:62:7D:18:B5:8A:D5:6D:DE:33:1A:30:45:6B:C6:5C:60:1A:4E:9B:18:DE:DC:EA:08:E7:DA:AA:07:81:5F:F0 -# Fingerprint (SHA1): 40:B3:31:A0:E9:BF:E8:55:BC:39:93:CA:70:4F:4E:C2:51:D4:1D:8F -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "Symantec Class 2 Public Primary Certification Authority - G6" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\100\263\061\240\351\277\350\125\274\071\223\312\160\117\116\302 -\121\324\035\217 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\175\013\203\345\373\174\255\007\117\040\251\265\337\143\355\171 -END -CKA_ISSUER MULTILINE_OCTAL -\060\201\224\061\013\060\011\006\003\125\004\006\023\002\125\123 -\061\035\060\033\006\003\125\004\012\023\024\123\171\155\141\156 -\164\145\143\040\103\157\162\160\157\162\141\164\151\157\156\061 -\037\060\035\006\003\125\004\013\023\026\123\171\155\141\156\164 -\145\143\040\124\162\165\163\164\040\116\145\164\167\157\162\153 -\061\105\060\103\006\003\125\004\003\023\074\123\171\155\141\156 -\164\145\143\040\103\154\141\163\163\040\062\040\120\165\142\154 -\151\143\040\120\162\151\155\141\162\171\040\103\145\162\164\151 -\146\151\143\141\164\151\157\156\040\101\165\164\150\157\162\151 -\164\171\040\055\040\107\066 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\020\144\202\236\374\067\036\164\135\374\227\377\227\310\261 -\377\101 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - # # Certificate "D-TRUST Root CA 3 2013" # @@ -14108,543 +12850,13 @@ CKA_ISSUER MULTILINE_OCTAL \040\101\125\124\110\117\122\111\124\131\040\103\117\056\054\114 \124\104\056\061\037\060\035\006\003\125\004\003\014\026\107\104 \103\101\040\124\162\165\163\164\101\125\124\110\040\122\065\040 -\122\117\117\124 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\010\175\011\227\376\360\107\352\172 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - -# -# Certificate "TrustCor RootCert CA-1" -# -# Issuer: CN=TrustCor RootCert CA-1,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Serial Number:00:da:9b:ec:71:f3:03:b0:19 -# Subject: CN=TrustCor RootCert CA-1,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Not Valid Before: Thu Feb 04 12:32:16 2016 -# Not Valid After : Mon Dec 31 17:23:16 2029 -# Fingerprint (SHA-256): D4:0E:9C:86:CD:8F:E4:68:C1:77:69:59:F4:9E:A7:74:FA:54:86:84:B6:C4:06:F3:90:92:61:F4:DC:E2:57:5C -# Fingerprint (SHA1): FF:BD:CD:E7:82:C8:43:5E:3C:6F:26:86:5C:CA:A8:3A:45:5B:C3:0A -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "TrustCor RootCert CA-1" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\201\244\061\013\060\011\006\003\125\004\006\023\002\120\101 -\061\017\060\015\006\003\125\004\010\014\006\120\141\156\141\155 -\141\061\024\060\022\006\003\125\004\007\014\013\120\141\156\141 -\155\141\040\103\151\164\171\061\044\060\042\006\003\125\004\012 -\014\033\124\162\165\163\164\103\157\162\040\123\171\163\164\145 -\155\163\040\123\056\040\144\145\040\122\056\114\056\061\047\060 -\045\006\003\125\004\013\014\036\124\162\165\163\164\103\157\162 -\040\103\145\162\164\151\146\151\143\141\164\145\040\101\165\164 -\150\157\162\151\164\171\061\037\060\035\006\003\125\004\003\014 -\026\124\162\165\163\164\103\157\162\040\122\157\157\164\103\145 -\162\164\040\103\101\055\061 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\201\244\061\013\060\011\006\003\125\004\006\023\002\120\101 -\061\017\060\015\006\003\125\004\010\014\006\120\141\156\141\155 -\141\061\024\060\022\006\003\125\004\007\014\013\120\141\156\141 -\155\141\040\103\151\164\171\061\044\060\042\006\003\125\004\012 -\014\033\124\162\165\163\164\103\157\162\040\123\171\163\164\145 -\155\163\040\123\056\040\144\145\040\122\056\114\056\061\047\060 -\045\006\003\125\004\013\014\036\124\162\165\163\164\103\157\162 -\040\103\145\162\164\151\146\151\143\141\164\145\040\101\165\164 -\150\157\162\151\164\171\061\037\060\035\006\003\125\004\003\014 -\026\124\162\165\163\164\103\157\162\040\122\157\157\164\103\145 -\162\164\040\103\101\055\061 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\011\000\332\233\354\161\363\003\260\031 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\004\060\060\202\003\030\240\003\002\001\002\002\011\000 -\332\233\354\161\363\003\260\031\060\015\006\011\052\206\110\206 -\367\015\001\001\013\005\000\060\201\244\061\013\060\011\006\003 -\125\004\006\023\002\120\101\061\017\060\015\006\003\125\004\010 -\014\006\120\141\156\141\155\141\061\024\060\022\006\003\125\004 -\007\014\013\120\141\156\141\155\141\040\103\151\164\171\061\044 -\060\042\006\003\125\004\012\014\033\124\162\165\163\164\103\157 -\162\040\123\171\163\164\145\155\163\040\123\056\040\144\145\040 -\122\056\114\056\061\047\060\045\006\003\125\004\013\014\036\124 -\162\165\163\164\103\157\162\040\103\145\162\164\151\146\151\143 -\141\164\145\040\101\165\164\150\157\162\151\164\171\061\037\060 -\035\006\003\125\004\003\014\026\124\162\165\163\164\103\157\162 -\040\122\157\157\164\103\145\162\164\040\103\101\055\061\060\036 -\027\015\061\066\060\062\060\064\061\062\063\062\061\066\132\027 -\015\062\071\061\062\063\061\061\067\062\063\061\066\132\060\201 -\244\061\013\060\011\006\003\125\004\006\023\002\120\101\061\017 -\060\015\006\003\125\004\010\014\006\120\141\156\141\155\141\061 -\024\060\022\006\003\125\004\007\014\013\120\141\156\141\155\141 -\040\103\151\164\171\061\044\060\042\006\003\125\004\012\014\033 -\124\162\165\163\164\103\157\162\040\123\171\163\164\145\155\163 -\040\123\056\040\144\145\040\122\056\114\056\061\047\060\045\006 -\003\125\004\013\014\036\124\162\165\163\164\103\157\162\040\103 -\145\162\164\151\146\151\143\141\164\145\040\101\165\164\150\157 -\162\151\164\171\061\037\060\035\006\003\125\004\003\014\026\124 -\162\165\163\164\103\157\162\040\122\157\157\164\103\145\162\164 -\040\103\101\055\061\060\202\001\042\060\015\006\011\052\206\110 -\206\367\015\001\001\001\005\000\003\202\001\017\000\060\202\001 -\012\002\202\001\001\000\277\216\267\225\342\302\046\022\153\063 -\031\307\100\130\012\253\131\252\215\000\243\374\200\307\120\173 -\216\324\040\046\272\062\022\330\043\124\111\045\020\042\230\235 -\106\322\301\311\236\116\033\056\054\016\070\363\032\045\150\034 -\246\132\005\346\036\213\110\277\230\226\164\076\151\312\351\265 -\170\245\006\274\325\000\136\011\012\362\047\172\122\374\055\325 -\261\352\264\211\141\044\363\032\023\333\251\317\122\355\014\044 -\272\271\236\354\176\000\164\372\223\255\154\051\222\256\121\264 -\273\323\127\277\263\363\250\215\234\364\044\113\052\326\231\236 -\364\236\376\300\176\102\072\347\013\225\123\332\267\150\016\220 -\114\373\160\077\217\112\054\224\363\046\335\143\151\251\224\330 -\020\116\305\107\010\220\231\033\027\115\271\154\156\357\140\225 -\021\216\041\200\265\275\240\163\330\320\262\167\304\105\352\132 -\046\373\146\166\166\370\006\037\141\155\017\125\305\203\267\020 -\126\162\006\007\245\363\261\032\003\005\144\016\235\132\212\326 -\206\160\033\044\336\376\050\212\053\320\152\260\374\172\242\334 -\262\171\016\213\145\017\002\003\001\000\001\243\143\060\141\060 -\035\006\003\125\035\016\004\026\004\024\356\153\111\074\172\077 -\015\343\261\011\267\212\310\253\031\237\163\063\120\347\060\037 -\006\003\125\035\043\004\030\060\026\200\024\356\153\111\074\172 -\077\015\343\261\011\267\212\310\253\031\237\163\063\120\347\060 -\017\006\003\125\035\023\001\001\377\004\005\060\003\001\001\377 -\060\016\006\003\125\035\017\001\001\377\004\004\003\002\001\206 -\060\015\006\011\052\206\110\206\367\015\001\001\013\005\000\003 -\202\001\001\000\045\030\324\221\217\023\356\217\036\035\021\123 -\332\055\104\051\031\240\036\153\061\236\115\016\236\255\075\134 -\101\157\225\053\044\241\171\230\072\070\066\373\273\146\236\110 -\377\220\220\357\075\324\270\233\264\207\165\077\040\233\316\162 -\317\241\125\301\115\144\242\031\006\241\007\063\014\013\051\345 -\361\352\253\243\354\265\012\164\220\307\175\162\362\327\134\237 -\221\357\221\213\267\334\355\146\242\317\216\146\073\274\237\072 -\002\340\047\335\026\230\300\225\324\012\244\344\201\232\165\224 -\065\234\220\137\210\067\006\255\131\225\012\260\321\147\323\031 -\312\211\347\062\132\066\034\076\202\250\132\223\276\306\320\144 -\221\266\317\331\266\030\317\333\176\322\145\243\246\304\216\027 -\061\301\373\176\166\333\323\205\343\130\262\167\172\166\073\154 -\057\120\034\347\333\366\147\171\037\365\202\225\232\007\247\024 -\257\217\334\050\041\147\011\322\326\115\132\034\031\034\216\167 -\134\303\224\044\075\062\153\113\176\324\170\224\203\276\067\115 -\316\137\307\036\116\074\340\211\063\225\013\017\245\062\326\074 -\132\171\054\031 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -# For Server Distrust After: Wed Nov 30 00:00:00 2022 -CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL -\062\062\061\061\063\060\060\060\060\060\060\060\132 -END -# For Email Distrust After: Wed Nov 30 00:00:00 2022 -CKA_NSS_EMAIL_DISTRUST_AFTER MULTILINE_OCTAL -\062\062\061\061\063\060\060\060\060\060\060\060\132 -END - -# Trust for "TrustCor RootCert CA-1" -# Issuer: CN=TrustCor RootCert CA-1,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Serial Number:00:da:9b:ec:71:f3:03:b0:19 -# Subject: CN=TrustCor RootCert CA-1,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Not Valid Before: Thu Feb 04 12:32:16 2016 -# Not Valid After : Mon Dec 31 17:23:16 2029 -# Fingerprint (SHA-256): D4:0E:9C:86:CD:8F:E4:68:C1:77:69:59:F4:9E:A7:74:FA:54:86:84:B6:C4:06:F3:90:92:61:F4:DC:E2:57:5C -# Fingerprint (SHA1): FF:BD:CD:E7:82:C8:43:5E:3C:6F:26:86:5C:CA:A8:3A:45:5B:C3:0A -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "TrustCor RootCert CA-1" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\377\275\315\347\202\310\103\136\074\157\046\206\134\312\250\072 -\105\133\303\012 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\156\205\361\334\032\000\323\042\325\262\262\254\153\067\005\105 -END -CKA_ISSUER MULTILINE_OCTAL -\060\201\244\061\013\060\011\006\003\125\004\006\023\002\120\101 -\061\017\060\015\006\003\125\004\010\014\006\120\141\156\141\155 -\141\061\024\060\022\006\003\125\004\007\014\013\120\141\156\141 -\155\141\040\103\151\164\171\061\044\060\042\006\003\125\004\012 -\014\033\124\162\165\163\164\103\157\162\040\123\171\163\164\145 -\155\163\040\123\056\040\144\145\040\122\056\114\056\061\047\060 -\045\006\003\125\004\013\014\036\124\162\165\163\164\103\157\162 -\040\103\145\162\164\151\146\151\143\141\164\145\040\101\165\164 -\150\157\162\151\164\171\061\037\060\035\006\003\125\004\003\014 -\026\124\162\165\163\164\103\157\162\040\122\157\157\164\103\145 -\162\164\040\103\101\055\061 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\011\000\332\233\354\161\363\003\260\031 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - -# -# Certificate "TrustCor RootCert CA-2" -# -# Issuer: CN=TrustCor RootCert CA-2,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Serial Number:25:a1:df:ca:33:cb:59:02 -# Subject: CN=TrustCor RootCert CA-2,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Not Valid Before: Thu Feb 04 12:32:23 2016 -# Not Valid After : Sun Dec 31 17:26:39 2034 -# Fingerprint (SHA-256): 07:53:E9:40:37:8C:1B:D5:E3:83:6E:39:5D:AE:A5:CB:83:9E:50:46:F1:BD:0E:AE:19:51:CF:10:FE:C7:C9:65 -# Fingerprint (SHA1): B8:BE:6D:CB:56:F1:55:B9:63:D4:12:CA:4E:06:34:C7:94:B2:1C:C0 -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "TrustCor RootCert CA-2" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\201\244\061\013\060\011\006\003\125\004\006\023\002\120\101 -\061\017\060\015\006\003\125\004\010\014\006\120\141\156\141\155 -\141\061\024\060\022\006\003\125\004\007\014\013\120\141\156\141 -\155\141\040\103\151\164\171\061\044\060\042\006\003\125\004\012 -\014\033\124\162\165\163\164\103\157\162\040\123\171\163\164\145 -\155\163\040\123\056\040\144\145\040\122\056\114\056\061\047\060 -\045\006\003\125\004\013\014\036\124\162\165\163\164\103\157\162 -\040\103\145\162\164\151\146\151\143\141\164\145\040\101\165\164 -\150\157\162\151\164\171\061\037\060\035\006\003\125\004\003\014 -\026\124\162\165\163\164\103\157\162\040\122\157\157\164\103\145 -\162\164\040\103\101\055\062 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\201\244\061\013\060\011\006\003\125\004\006\023\002\120\101 -\061\017\060\015\006\003\125\004\010\014\006\120\141\156\141\155 -\141\061\024\060\022\006\003\125\004\007\014\013\120\141\156\141 -\155\141\040\103\151\164\171\061\044\060\042\006\003\125\004\012 -\014\033\124\162\165\163\164\103\157\162\040\123\171\163\164\145 -\155\163\040\123\056\040\144\145\040\122\056\114\056\061\047\060 -\045\006\003\125\004\013\014\036\124\162\165\163\164\103\157\162 -\040\103\145\162\164\151\146\151\143\141\164\145\040\101\165\164 -\150\157\162\151\164\171\061\037\060\035\006\003\125\004\003\014 -\026\124\162\165\163\164\103\157\162\040\122\157\157\164\103\145 -\162\164\040\103\101\055\062 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\010\045\241\337\312\063\313\131\002 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\006\057\060\202\004\027\240\003\002\001\002\002\010\045 -\241\337\312\063\313\131\002\060\015\006\011\052\206\110\206\367 -\015\001\001\013\005\000\060\201\244\061\013\060\011\006\003\125 -\004\006\023\002\120\101\061\017\060\015\006\003\125\004\010\014 -\006\120\141\156\141\155\141\061\024\060\022\006\003\125\004\007 -\014\013\120\141\156\141\155\141\040\103\151\164\171\061\044\060 -\042\006\003\125\004\012\014\033\124\162\165\163\164\103\157\162 -\040\123\171\163\164\145\155\163\040\123\056\040\144\145\040\122 -\056\114\056\061\047\060\045\006\003\125\004\013\014\036\124\162 -\165\163\164\103\157\162\040\103\145\162\164\151\146\151\143\141 -\164\145\040\101\165\164\150\157\162\151\164\171\061\037\060\035 -\006\003\125\004\003\014\026\124\162\165\163\164\103\157\162\040 -\122\157\157\164\103\145\162\164\040\103\101\055\062\060\036\027 -\015\061\066\060\062\060\064\061\062\063\062\062\063\132\027\015 -\063\064\061\062\063\061\061\067\062\066\063\071\132\060\201\244 -\061\013\060\011\006\003\125\004\006\023\002\120\101\061\017\060 -\015\006\003\125\004\010\014\006\120\141\156\141\155\141\061\024 -\060\022\006\003\125\004\007\014\013\120\141\156\141\155\141\040 -\103\151\164\171\061\044\060\042\006\003\125\004\012\014\033\124 -\162\165\163\164\103\157\162\040\123\171\163\164\145\155\163\040 -\123\056\040\144\145\040\122\056\114\056\061\047\060\045\006\003 -\125\004\013\014\036\124\162\165\163\164\103\157\162\040\103\145 -\162\164\151\146\151\143\141\164\145\040\101\165\164\150\157\162 -\151\164\171\061\037\060\035\006\003\125\004\003\014\026\124\162 -\165\163\164\103\157\162\040\122\157\157\164\103\145\162\164\040 -\103\101\055\062\060\202\002\042\060\015\006\011\052\206\110\206 -\367\015\001\001\001\005\000\003\202\002\017\000\060\202\002\012 -\002\202\002\001\000\247\040\156\302\052\242\142\044\225\220\166 -\310\070\176\200\322\253\301\233\145\005\224\364\301\012\020\325 -\002\254\355\237\223\307\207\310\260\047\053\102\014\075\012\076 -\101\132\236\165\335\215\312\340\233\354\150\062\244\151\222\150 -\214\013\201\016\126\240\076\032\335\054\045\024\202\057\227\323 -\144\106\364\124\251\334\072\124\055\061\053\231\202\362\331\052 -\327\357\161\000\270\061\244\276\172\044\007\303\102\040\362\212 -\324\222\004\033\145\126\114\154\324\373\266\141\132\107\043\264 -\330\151\264\267\072\320\164\074\014\165\241\214\116\166\241\351 -\333\052\245\073\372\316\260\377\176\152\050\375\047\034\310\261 -\351\051\361\127\156\144\264\320\301\025\155\016\276\056\016\106 -\310\136\364\121\376\357\016\143\072\073\161\272\317\157\131\312 -\014\343\233\135\111\270\114\342\127\261\230\212\102\127\234\166 -\357\357\275\321\150\250\322\364\011\273\167\065\276\045\202\010 -\304\026\054\104\040\126\251\104\021\167\357\135\264\035\252\136 -\153\076\213\062\366\007\057\127\004\222\312\365\376\235\302\351 -\350\263\216\114\113\002\061\331\344\074\110\202\047\367\030\202 -\166\110\072\161\261\023\241\071\325\056\305\064\302\035\142\205 -\337\003\376\115\364\257\075\337\134\133\215\372\160\341\245\176 -\047\307\206\056\152\217\022\306\204\136\103\121\120\234\031\233 -\170\346\374\366\355\107\176\173\075\146\357\023\023\210\137\074 -\241\143\373\371\254\207\065\237\363\202\236\244\077\012\234\061 -\151\213\231\244\210\112\216\156\146\115\357\026\304\017\171\050 -\041\140\015\205\026\175\327\124\070\361\222\126\375\265\063\114 -\203\334\327\020\237\113\375\306\370\102\275\272\174\163\002\340 -\377\175\315\133\341\324\254\141\173\127\325\112\173\133\324\205 -\130\047\135\277\370\053\140\254\240\046\256\024\041\047\306\167 -\232\063\200\074\136\106\077\367\303\261\243\206\063\306\350\136 -\015\271\065\054\252\106\301\205\002\165\200\240\353\044\373\025 -\252\344\147\177\156\167\077\364\004\212\057\174\173\343\027\141 -\360\335\011\251\040\310\276\011\244\320\176\104\303\262\060\112 -\070\252\251\354\030\232\007\202\053\333\270\234\030\255\332\340 -\106\027\254\317\135\002\003\001\000\001\243\143\060\141\060\035 -\006\003\125\035\016\004\026\004\024\331\376\041\100\156\224\236 -\274\233\075\234\175\230\040\031\345\214\060\142\262\060\037\006 -\003\125\035\043\004\030\060\026\200\024\331\376\041\100\156\224 -\236\274\233\075\234\175\230\040\031\345\214\060\142\262\060\017 -\006\003\125\035\023\001\001\377\004\005\060\003\001\001\377\060 -\016\006\003\125\035\017\001\001\377\004\004\003\002\001\206\060 -\015\006\011\052\206\110\206\367\015\001\001\013\005\000\003\202 -\002\001\000\236\105\236\014\073\266\357\341\072\310\174\321\000 -\075\317\342\352\006\265\262\072\273\006\113\150\172\320\043\227 -\164\247\054\360\010\330\171\132\327\132\204\212\330\022\232\033 -\331\175\134\115\160\305\245\371\253\345\243\211\211\335\001\372 -\354\335\371\351\222\227\333\260\106\102\363\323\142\252\225\376 -\061\147\024\151\130\220\012\252\013\356\067\043\307\120\121\264 -\365\176\236\343\173\367\344\314\102\062\055\111\014\313\377\111 -\014\233\036\064\375\156\156\226\212\171\003\266\157\333\011\313 -\375\137\145\024\067\341\070\365\363\141\026\130\344\265\155\015 -\013\004\033\077\120\055\177\263\307\172\032\026\200\140\370\212 -\037\351\033\052\306\371\272\001\032\151\277\322\130\307\124\127 -\010\217\341\071\140\167\113\254\131\204\032\210\361\335\313\117 -\170\327\347\341\063\055\374\356\101\372\040\260\276\313\367\070 -\224\300\341\320\205\017\273\355\054\163\253\355\376\222\166\032 -\144\177\133\015\063\011\007\063\173\006\077\021\244\134\160\074 -\205\300\317\343\220\250\203\167\372\333\346\305\214\150\147\020 -\147\245\122\055\360\304\231\217\177\277\321\153\342\265\107\326 -\331\320\205\231\115\224\233\017\113\215\356\000\132\107\035\021 -\003\254\101\030\257\207\267\157\014\072\217\312\317\334\003\301 -\242\011\310\345\375\200\136\310\140\102\001\033\032\123\132\273 -\067\246\267\274\272\204\351\036\154\032\324\144\332\324\103\376 -\223\213\113\362\054\171\026\020\324\223\013\210\217\241\330\206 -\024\106\221\107\233\050\044\357\127\122\116\134\102\234\252\367 -\111\354\047\350\100\036\263\246\211\042\162\234\365\015\063\264 -\130\243\060\073\335\324\152\124\223\276\032\115\363\223\224\367 -\374\204\013\077\204\040\134\064\003\104\305\332\255\274\012\301 -\002\317\036\345\224\331\363\216\133\330\114\360\235\354\141\027 -\273\024\062\124\014\002\051\223\036\222\206\366\177\357\347\222 -\005\016\131\335\231\010\056\056\372\234\000\122\323\305\146\051 -\344\247\227\104\244\016\050\201\023\065\305\366\157\144\346\101 -\304\325\057\314\064\105\045\317\101\000\226\075\112\056\302\226 -\230\117\116\112\234\227\267\333\037\222\062\310\377\017\121\156 -\326\354\011 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -# For Server Distrust After: Wed Nov 30 00:00:00 2022 -CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL -\062\062\061\061\063\060\060\060\060\060\060\060\132 -END -# For Email Distrust After: Wed Nov 30 00:00:00 2022 -CKA_NSS_EMAIL_DISTRUST_AFTER MULTILINE_OCTAL -\062\062\061\061\063\060\060\060\060\060\060\060\132 -END - - -# Trust for "TrustCor RootCert CA-2" -# Issuer: CN=TrustCor RootCert CA-2,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Serial Number:25:a1:df:ca:33:cb:59:02 -# Subject: CN=TrustCor RootCert CA-2,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Not Valid Before: Thu Feb 04 12:32:23 2016 -# Not Valid After : Sun Dec 31 17:26:39 2034 -# Fingerprint (SHA-256): 07:53:E9:40:37:8C:1B:D5:E3:83:6E:39:5D:AE:A5:CB:83:9E:50:46:F1:BD:0E:AE:19:51:CF:10:FE:C7:C9:65 -# Fingerprint (SHA1): B8:BE:6D:CB:56:F1:55:B9:63:D4:12:CA:4E:06:34:C7:94:B2:1C:C0 -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "TrustCor RootCert CA-2" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\270\276\155\313\126\361\125\271\143\324\022\312\116\006\064\307 -\224\262\034\300 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\242\341\370\030\013\272\105\325\307\101\052\273\067\122\105\144 -END -CKA_ISSUER MULTILINE_OCTAL -\060\201\244\061\013\060\011\006\003\125\004\006\023\002\120\101 -\061\017\060\015\006\003\125\004\010\014\006\120\141\156\141\155 -\141\061\024\060\022\006\003\125\004\007\014\013\120\141\156\141 -\155\141\040\103\151\164\171\061\044\060\042\006\003\125\004\012 -\014\033\124\162\165\163\164\103\157\162\040\123\171\163\164\145 -\155\163\040\123\056\040\144\145\040\122\056\114\056\061\047\060 -\045\006\003\125\004\013\014\036\124\162\165\163\164\103\157\162 -\040\103\145\162\164\151\146\151\143\141\164\145\040\101\165\164 -\150\157\162\151\164\171\061\037\060\035\006\003\125\004\003\014 -\026\124\162\165\163\164\103\157\162\040\122\157\157\164\103\145 -\162\164\040\103\101\055\062 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\010\045\241\337\312\063\313\131\002 -END -CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST -CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE - -# -# Certificate "TrustCor ECA-1" -# -# Issuer: CN=TrustCor ECA-1,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Serial Number:00:84:82:2c:5f:1c:62:d0:40 -# Subject: CN=TrustCor ECA-1,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Not Valid Before: Thu Feb 04 12:32:33 2016 -# Not Valid After : Mon Dec 31 17:28:07 2029 -# Fingerprint (SHA-256): 5A:88:5D:B1:9C:01:D9:12:C5:75:93:88:93:8C:AF:BB:DF:03:1A:B2:D4:8E:91:EE:15:58:9B:42:97:1D:03:9C -# Fingerprint (SHA1): 58:D1:DF:95:95:67:6B:63:C0:F0:5B:1C:17:4D:8B:84:0B:C8:78:BD -CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "TrustCor ECA-1" -CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 -CKA_SUBJECT MULTILINE_OCTAL -\060\201\234\061\013\060\011\006\003\125\004\006\023\002\120\101 -\061\017\060\015\006\003\125\004\010\014\006\120\141\156\141\155 -\141\061\024\060\022\006\003\125\004\007\014\013\120\141\156\141 -\155\141\040\103\151\164\171\061\044\060\042\006\003\125\004\012 -\014\033\124\162\165\163\164\103\157\162\040\123\171\163\164\145 -\155\163\040\123\056\040\144\145\040\122\056\114\056\061\047\060 -\045\006\003\125\004\013\014\036\124\162\165\163\164\103\157\162 -\040\103\145\162\164\151\146\151\143\141\164\145\040\101\165\164 -\150\157\162\151\164\171\061\027\060\025\006\003\125\004\003\014 -\016\124\162\165\163\164\103\157\162\040\105\103\101\055\061 -END -CKA_ID UTF8 "0" -CKA_ISSUER MULTILINE_OCTAL -\060\201\234\061\013\060\011\006\003\125\004\006\023\002\120\101 -\061\017\060\015\006\003\125\004\010\014\006\120\141\156\141\155 -\141\061\024\060\022\006\003\125\004\007\014\013\120\141\156\141 -\155\141\040\103\151\164\171\061\044\060\042\006\003\125\004\012 -\014\033\124\162\165\163\164\103\157\162\040\123\171\163\164\145 -\155\163\040\123\056\040\144\145\040\122\056\114\056\061\047\060 -\045\006\003\125\004\013\014\036\124\162\165\163\164\103\157\162 -\040\103\145\162\164\151\146\151\143\141\164\145\040\101\165\164 -\150\157\162\151\164\171\061\027\060\025\006\003\125\004\003\014 -\016\124\162\165\163\164\103\157\162\040\105\103\101\055\061 -END -CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\011\000\204\202\054\137\034\142\320\100 -END -CKA_VALUE MULTILINE_OCTAL -\060\202\004\040\060\202\003\010\240\003\002\001\002\002\011\000 -\204\202\054\137\034\142\320\100\060\015\006\011\052\206\110\206 -\367\015\001\001\013\005\000\060\201\234\061\013\060\011\006\003 -\125\004\006\023\002\120\101\061\017\060\015\006\003\125\004\010 -\014\006\120\141\156\141\155\141\061\024\060\022\006\003\125\004 -\007\014\013\120\141\156\141\155\141\040\103\151\164\171\061\044 -\060\042\006\003\125\004\012\014\033\124\162\165\163\164\103\157 -\162\040\123\171\163\164\145\155\163\040\123\056\040\144\145\040 -\122\056\114\056\061\047\060\045\006\003\125\004\013\014\036\124 -\162\165\163\164\103\157\162\040\103\145\162\164\151\146\151\143 -\141\164\145\040\101\165\164\150\157\162\151\164\171\061\027\060 -\025\006\003\125\004\003\014\016\124\162\165\163\164\103\157\162 -\040\105\103\101\055\061\060\036\027\015\061\066\060\062\060\064 -\061\062\063\062\063\063\132\027\015\062\071\061\062\063\061\061 -\067\062\070\060\067\132\060\201\234\061\013\060\011\006\003\125 -\004\006\023\002\120\101\061\017\060\015\006\003\125\004\010\014 -\006\120\141\156\141\155\141\061\024\060\022\006\003\125\004\007 -\014\013\120\141\156\141\155\141\040\103\151\164\171\061\044\060 -\042\006\003\125\004\012\014\033\124\162\165\163\164\103\157\162 -\040\123\171\163\164\145\155\163\040\123\056\040\144\145\040\122 -\056\114\056\061\047\060\045\006\003\125\004\013\014\036\124\162 -\165\163\164\103\157\162\040\103\145\162\164\151\146\151\143\141 -\164\145\040\101\165\164\150\157\162\151\164\171\061\027\060\025 -\006\003\125\004\003\014\016\124\162\165\163\164\103\157\162\040 -\105\103\101\055\061\060\202\001\042\060\015\006\011\052\206\110 -\206\367\015\001\001\001\005\000\003\202\001\017\000\060\202\001 -\012\002\202\001\001\000\317\217\340\021\265\237\250\166\166\333 -\337\017\124\357\163\143\051\202\255\107\306\243\153\355\376\137 -\063\370\103\121\351\032\063\221\061\027\240\164\304\324\247\001 -\346\262\222\076\152\235\355\016\371\164\230\100\323\077\003\200 -\006\202\100\350\261\342\247\121\247\035\203\046\153\253\336\372 -\027\221\053\330\306\254\036\261\236\031\001\325\227\246\352\015 -\267\304\125\037\047\174\322\010\325\166\037\051\025\207\100\071 -\335\070\105\021\165\320\232\247\064\340\277\315\310\122\035\271 -\107\176\015\270\273\306\014\366\163\127\026\132\176\103\221\037 -\125\072\306\155\104\004\252\234\251\234\247\114\211\027\203\256 -\243\004\136\122\200\213\036\022\045\021\031\327\014\175\175\061 -\104\101\352\333\257\260\034\357\201\320\054\305\232\041\233\075 -\355\102\073\120\046\362\354\316\161\141\006\142\041\124\116\177 -\301\235\076\177\040\214\200\313\052\330\227\142\310\203\063\221 -\175\260\242\132\017\127\350\073\314\362\045\262\324\174\057\354 -\115\306\241\072\025\172\347\266\135\065\365\366\110\112\066\105 -\146\324\272\230\130\301\002\003\001\000\001\243\143\060\141\060 -\035\006\003\125\035\016\004\026\004\024\104\236\110\365\314\155 -\110\324\240\113\177\376\131\044\057\203\227\231\232\206\060\037 -\006\003\125\035\043\004\030\060\026\200\024\104\236\110\365\314 -\155\110\324\240\113\177\376\131\044\057\203\227\231\232\206\060 -\017\006\003\125\035\023\001\001\377\004\005\060\003\001\001\377 -\060\016\006\003\125\035\017\001\001\377\004\004\003\002\001\206 -\060\015\006\011\052\206\110\206\367\015\001\001\013\005\000\003 -\202\001\001\000\005\076\065\134\025\160\233\311\307\163\141\157 -\162\053\324\302\217\362\103\135\002\316\304\224\271\224\021\203 -\147\135\342\147\154\165\166\277\273\014\252\066\306\255\107\223 -\143\334\036\176\326\336\056\376\351\031\062\070\003\177\024\366 -\000\163\054\131\261\041\006\341\373\254\030\225\014\243\377\231 -\226\367\053\047\233\325\044\314\035\335\301\072\340\230\104\260 -\304\344\076\167\261\163\251\144\054\366\034\001\174\077\135\105 -\205\300\205\347\045\217\225\334\027\363\074\237\032\156\260\312 -\343\035\052\351\114\143\372\044\141\142\326\332\176\266\034\154 -\365\002\035\324\052\335\125\220\353\052\021\107\074\056\136\164 -\262\202\042\245\175\123\037\105\354\047\221\175\347\042\026\350 -\300\150\066\330\306\361\117\200\104\062\371\341\321\321\035\252 -\336\250\253\234\004\257\255\040\016\144\230\115\245\153\300\110 -\130\226\151\115\334\007\214\121\223\242\337\237\017\075\213\140 -\264\202\215\252\010\116\142\105\340\371\013\322\340\340\074\133 -\336\134\161\047\045\302\346\003\201\213\020\123\343\307\125\242 -\264\237\327\346 -END -CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE -# For Server Distrust After: Wed Nov 30 00:00:00 2022 -CKA_NSS_SERVER_DISTRUST_AFTER MULTILINE_OCTAL -\062\062\061\061\063\060\060\060\060\060\060\060\132 -END -# For Email Distrust After: Wed Nov 30 00:00:00 2022 -CKA_NSS_EMAIL_DISTRUST_AFTER MULTILINE_OCTAL -\062\062\061\061\063\060\060\060\060\060\060\060\132 -END - -# Trust for "TrustCor ECA-1" -# Issuer: CN=TrustCor ECA-1,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Serial Number:00:84:82:2c:5f:1c:62:d0:40 -# Subject: CN=TrustCor ECA-1,OU=TrustCor Certificate Authority,O=TrustCor Systems S. de R.L.,L=Panama City,ST=Panama,C=PA -# Not Valid Before: Thu Feb 04 12:32:33 2016 -# Not Valid After : Mon Dec 31 17:28:07 2029 -# Fingerprint (SHA-256): 5A:88:5D:B1:9C:01:D9:12:C5:75:93:88:93:8C:AF:BB:DF:03:1A:B2:D4:8E:91:EE:15:58:9B:42:97:1D:03:9C -# Fingerprint (SHA1): 58:D1:DF:95:95:67:6B:63:C0:F0:5B:1C:17:4D:8B:84:0B:C8:78:BD -CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST -CKA_TOKEN CK_BBOOL CK_TRUE -CKA_PRIVATE CK_BBOOL CK_FALSE -CKA_MODIFIABLE CK_BBOOL CK_FALSE -CKA_LABEL UTF8 "TrustCor ECA-1" -CKA_CERT_SHA1_HASH MULTILINE_OCTAL -\130\321\337\225\225\147\153\143\300\360\133\034\027\115\213\204 -\013\310\170\275 -END -CKA_CERT_MD5_HASH MULTILINE_OCTAL -\047\222\043\035\012\365\100\174\351\346\153\235\330\365\347\154 -END -CKA_ISSUER MULTILINE_OCTAL -\060\201\234\061\013\060\011\006\003\125\004\006\023\002\120\101 -\061\017\060\015\006\003\125\004\010\014\006\120\141\156\141\155 -\141\061\024\060\022\006\003\125\004\007\014\013\120\141\156\141 -\155\141\040\103\151\164\171\061\044\060\042\006\003\125\004\012 -\014\033\124\162\165\163\164\103\157\162\040\123\171\163\164\145 -\155\163\040\123\056\040\144\145\040\122\056\114\056\061\047\060 -\045\006\003\125\004\013\014\036\124\162\165\163\164\103\157\162 -\040\103\145\162\164\151\146\151\143\141\164\145\040\101\165\164 -\150\157\162\151\164\171\061\027\060\025\006\003\125\004\003\014 -\016\124\162\165\163\164\103\157\162\040\105\103\101\055\061 +\122\117\117\124 END CKA_SERIAL_NUMBER MULTILINE_OCTAL -\002\011\000\204\202\054\137\034\142\320\100 +\002\010\175\011\227\376\360\107\352\172 END CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR +CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE @@ -20408,7 +18620,7 @@ CKA_SERIAL_NUMBER MULTILINE_OCTAL \002\010\033\160\351\322\377\256\154\161 END CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR -CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR +CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE @@ -25565,3 +23777,843 @@ CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + +# +# Certificate "TrustAsia Global Root CA G3" +# +# Issuer: CN=TrustAsia Global Root CA G3,O="TrustAsia Technologies, Inc.",C=CN +# Serial Number:64:f6:0e:65:77:61:6a:ab:3b:b4:ea:85:84:bb:b1:89:b8:71:93:0f +# Subject: CN=TrustAsia Global Root CA G3,O="TrustAsia Technologies, Inc.",C=CN +# Not Valid Before: Thu May 20 02:10:19 2021 +# Not Valid After : Sat May 19 02:10:19 2046 +# Fingerprint (SHA-256): E0:D3:22:6A:EB:11:63:C2:E4:8F:F9:BE:3B:50:B4:C6:43:1B:E7:BB:1E:AC:C5:C3:6B:5D:5E:C5:09:03:9A:08 +# Fingerprint (SHA1): 63:CF:B6:C1:27:2B:56:E4:88:8E:1C:23:9A:B6:2E:81:47:24:C3:C7 +CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "TrustAsia Global Root CA G3" +CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 +CKA_SUBJECT MULTILINE_OCTAL +\060\132\061\013\060\011\006\003\125\004\006\023\002\103\116\061 +\045\060\043\006\003\125\004\012\014\034\124\162\165\163\164\101 +\163\151\141\040\124\145\143\150\156\157\154\157\147\151\145\163 +\054\040\111\156\143\056\061\044\060\042\006\003\125\004\003\014 +\033\124\162\165\163\164\101\163\151\141\040\107\154\157\142\141 +\154\040\122\157\157\164\040\103\101\040\107\063 +END +CKA_ID UTF8 "0" +CKA_ISSUER MULTILINE_OCTAL +\060\132\061\013\060\011\006\003\125\004\006\023\002\103\116\061 +\045\060\043\006\003\125\004\012\014\034\124\162\165\163\164\101 +\163\151\141\040\124\145\143\150\156\157\154\157\147\151\145\163 +\054\040\111\156\143\056\061\044\060\042\006\003\125\004\003\014 +\033\124\162\165\163\164\101\163\151\141\040\107\154\157\142\141 +\154\040\122\157\157\164\040\103\101\040\107\063 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\144\366\016\145\167\141\152\253\073\264\352\205\204\273 +\261\211\270\161\223\017 +END +CKA_VALUE MULTILINE_OCTAL +\060\202\005\245\060\202\003\215\240\003\002\001\002\002\024\144 +\366\016\145\167\141\152\253\073\264\352\205\204\273\261\211\270 +\161\223\017\060\015\006\011\052\206\110\206\367\015\001\001\014 +\005\000\060\132\061\013\060\011\006\003\125\004\006\023\002\103 +\116\061\045\060\043\006\003\125\004\012\014\034\124\162\165\163 +\164\101\163\151\141\040\124\145\143\150\156\157\154\157\147\151 +\145\163\054\040\111\156\143\056\061\044\060\042\006\003\125\004 +\003\014\033\124\162\165\163\164\101\163\151\141\040\107\154\157 +\142\141\154\040\122\157\157\164\040\103\101\040\107\063\060\036 +\027\015\062\061\060\065\062\060\060\062\061\060\061\071\132\027 +\015\064\066\060\065\061\071\060\062\061\060\061\071\132\060\132 +\061\013\060\011\006\003\125\004\006\023\002\103\116\061\045\060 +\043\006\003\125\004\012\014\034\124\162\165\163\164\101\163\151 +\141\040\124\145\143\150\156\157\154\157\147\151\145\163\054\040 +\111\156\143\056\061\044\060\042\006\003\125\004\003\014\033\124 +\162\165\163\164\101\163\151\141\040\107\154\157\142\141\154\040 +\122\157\157\164\040\103\101\040\107\063\060\202\002\042\060\015 +\006\011\052\206\110\206\367\015\001\001\001\005\000\003\202\002 +\017\000\060\202\002\012\002\202\002\001\000\300\061\202\141\222 +\344\224\033\012\052\145\320\276\006\251\207\073\121\022\352\160 +\101\256\342\373\164\352\012\215\271\263\114\334\217\267\023\122 +\117\124\030\341\054\163\225\221\305\146\073\152\317\254\143\155 +\207\123\360\367\361\071\267\240\103\143\260\304\003\135\127\251 +\347\104\316\304\241\203\145\366\120\076\261\176\026\270\072\212 +\002\320\226\037\000\315\005\041\357\006\155\335\041\234\031\103 +\105\241\305\350\200\312\302\255\100\142\027\006\306\252\274\363 +\326\346\374\120\176\146\102\037\074\213\246\171\171\206\100\065 +\237\040\357\077\353\213\107\037\217\216\305\324\216\266\054\311 +\104\004\343\324\103\165\077\325\077\257\034\314\176\106\137\254 +\337\144\020\212\357\106\360\220\360\017\055\364\210\013\261\051 +\252\257\205\252\111\130\250\277\143\240\070\221\346\263\346\167 +\150\304\371\052\031\204\273\016\341\365\257\211\354\245\057\120 +\040\164\036\022\101\163\036\044\331\312\316\054\241\131\065\300 +\310\035\106\047\141\132\217\371\115\323\162\171\146\036\237\025 +\220\041\055\375\355\213\126\160\003\112\111\076\177\151\061\022 +\151\307\036\134\312\172\023\213\350\346\365\140\017\314\223\054 +\204\177\361\374\152\374\233\107\235\333\255\210\075\363\166\165 +\063\327\113\244\310\213\371\365\103\130\117\313\310\003\124\217 +\245\205\170\004\032\363\163\362\327\207\035\101\237\347\330\027 +\316\032\234\017\112\374\334\104\150\124\150\342\101\074\376\054 +\204\206\067\074\315\077\057\242\333\347\367\124\003\137\131\323 +\367\221\170\307\213\167\152\026\345\111\205\220\105\162\160\057 +\221\135\370\076\145\100\013\031\231\311\046\040\132\150\301\065 +\277\117\247\121\361\330\021\053\133\340\232\236\050\073\012\072 +\012\037\301\201\345\056\360\246\271\151\245\210\224\346\153\023 +\177\321\144\077\075\234\160\106\345\242\205\173\130\204\047\334 +\304\200\076\147\232\232\307\232\061\016\060\354\346\027\100\225 +\331\105\355\001\226\252\277\014\363\113\321\143\367\023\130\300 +\270\363\372\147\335\233\175\155\112\377\062\114\265\045\073\377 +\034\147\017\205\042\131\005\221\221\101\167\201\320\205\114\207 +\020\161\377\236\103\033\256\225\165\055\201\002\003\001\000\001 +\243\143\060\141\060\017\006\003\125\035\023\001\001\377\004\005 +\060\003\001\001\377\060\037\006\003\125\035\043\004\030\060\026 +\200\024\100\344\344\362\043\357\070\312\260\256\127\177\362\041 +\060\026\064\333\274\222\060\035\006\003\125\035\016\004\026\004 +\024\100\344\344\362\043\357\070\312\260\256\127\177\362\041\060 +\026\064\333\274\222\060\016\006\003\125\035\017\001\001\377\004 +\004\003\002\001\006\060\015\006\011\052\206\110\206\367\015\001 +\001\014\005\000\003\202\002\001\000\046\073\121\341\115\070\363 +\062\030\264\264\136\341\145\136\304\224\117\324\247\141\243\370 +\300\317\063\001\002\351\303\252\065\017\361\224\023\167\167\065 +\236\055\126\121\104\156\341\306\056\050\036\377\332\354\107\315 +\227\104\027\367\340\114\302\341\174\174\062\172\146\310\132\266 +\134\123\105\127\132\105\324\005\231\057\056\043\125\356\143\150 +\337\323\033\170\247\022\224\006\000\165\015\162\204\351\056\274 +\132\152\325\336\057\131\307\243\354\322\207\146\333\267\124\265 +\044\253\364\103\170\333\113\004\304\157\335\346\076\146\076\051 +\362\113\150\161\042\207\240\370\261\063\143\166\343\015\205\162 +\104\042\125\077\034\174\351\374\270\025\350\122\372\252\076\243 +\041\071\065\164\211\246\152\302\071\372\170\317\266\254\347\347 +\326\126\377\043\222\056\120\013\251\265\007\063\364\070\137\244 +\111\246\313\145\160\166\350\012\205\200\113\066\075\063\367\225 +\124\165\045\332\254\304\163\202\145\351\122\365\134\375\070\225 +\002\152\151\060\305\034\012\127\007\256\042\244\054\371\305\101 +\267\270\354\237\117\110\000\371\001\004\125\314\254\371\062\061 +\304\165\225\006\240\177\321\215\047\335\263\251\244\162\207\376 +\131\213\232\172\164\026\335\026\245\142\051\353\072\226\334\213 +\247\150\131\323\353\167\221\071\370\327\313\331\217\137\132\047 +\001\175\135\150\031\142\330\310\315\364\267\162\107\276\133\227 +\316\362\255\242\231\223\255\224\313\223\366\022\011\225\266\253 +\327\073\320\077\021\313\060\026\056\171\200\344\147\201\055\135 +\355\160\170\266\140\131\254\341\135\105\143\217\310\337\162\150 +\133\352\035\270\001\361\176\373\347\212\263\343\124\240\070\011 +\340\074\336\102\362\302\355\056\233\363\037\065\266\066\330\343 +\200\241\213\315\231\144\017\302\252\253\261\312\365\157\236\103 +\215\204\124\231\263\156\300\022\146\330\160\020\361\006\065\063 +\103\250\234\056\272\024\061\316\020\177\034\206\343\217\322\325 +\370\167\354\233\253\361\057\143\331\102\137\340\147\201\144\221 +\361\227\057\374\156\046\366\063\370\323\265\370\304\142\253\061 +\121\045\002\172\370\335\153\145\325\155\115\060\310\145\272\150 +\024\145\254\047\013\164\212\362\207 +END +CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE +CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE + +# Trust for "TrustAsia Global Root CA G3" +# Issuer: CN=TrustAsia Global Root CA G3,O="TrustAsia Technologies, Inc.",C=CN +# Serial Number:64:f6:0e:65:77:61:6a:ab:3b:b4:ea:85:84:bb:b1:89:b8:71:93:0f +# Subject: CN=TrustAsia Global Root CA G3,O="TrustAsia Technologies, Inc.",C=CN +# Not Valid Before: Thu May 20 02:10:19 2021 +# Not Valid After : Sat May 19 02:10:19 2046 +# Fingerprint (SHA-256): E0:D3:22:6A:EB:11:63:C2:E4:8F:F9:BE:3B:50:B4:C6:43:1B:E7:BB:1E:AC:C5:C3:6B:5D:5E:C5:09:03:9A:08 +# Fingerprint (SHA1): 63:CF:B6:C1:27:2B:56:E4:88:8E:1C:23:9A:B6:2E:81:47:24:C3:C7 +CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "TrustAsia Global Root CA G3" +CKA_CERT_SHA1_HASH MULTILINE_OCTAL +\143\317\266\301\047\053\126\344\210\216\034\043\232\266\056\201 +\107\044\303\307 +END +CKA_CERT_MD5_HASH MULTILINE_OCTAL +\060\102\033\267\273\201\165\065\344\026\117\123\322\224\336\004 +END +CKA_ISSUER MULTILINE_OCTAL +\060\132\061\013\060\011\006\003\125\004\006\023\002\103\116\061 +\045\060\043\006\003\125\004\012\014\034\124\162\165\163\164\101 +\163\151\141\040\124\145\143\150\156\157\154\157\147\151\145\163 +\054\040\111\156\143\056\061\044\060\042\006\003\125\004\003\014 +\033\124\162\165\163\164\101\163\151\141\040\107\154\157\142\141 +\154\040\122\157\157\164\040\103\101\040\107\063 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\144\366\016\145\167\141\152\253\073\264\352\205\204\273 +\261\211\270\161\223\017 +END +CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR +CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR +CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST +CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + +# +# Certificate "TrustAsia Global Root CA G4" +# +# Issuer: CN=TrustAsia Global Root CA G4,O="TrustAsia Technologies, Inc.",C=CN +# Serial Number:4f:23:64:b8:8e:97:63:9e:c6:53:81:c1:76:4e:cb:2a:74:15:d6:d7 +# Subject: CN=TrustAsia Global Root CA G4,O="TrustAsia Technologies, Inc.",C=CN +# Not Valid Before: Thu May 20 02:10:22 2021 +# Not Valid After : Sat May 19 02:10:22 2046 +# Fingerprint (SHA-256): BE:4B:56:CB:50:56:C0:13:6A:52:6D:F4:44:50:8D:AA:36:A0:B5:4F:42:E4:AC:38:F7:2A:F4:70:E4:79:65:4C +# Fingerprint (SHA1): 57:73:A5:61:5D:80:B2:E6:AC:38:82:FC:68:07:31:AC:9F:B5:92:5A +CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "TrustAsia Global Root CA G4" +CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 +CKA_SUBJECT MULTILINE_OCTAL +\060\132\061\013\060\011\006\003\125\004\006\023\002\103\116\061 +\045\060\043\006\003\125\004\012\014\034\124\162\165\163\164\101 +\163\151\141\040\124\145\143\150\156\157\154\157\147\151\145\163 +\054\040\111\156\143\056\061\044\060\042\006\003\125\004\003\014 +\033\124\162\165\163\164\101\163\151\141\040\107\154\157\142\141 +\154\040\122\157\157\164\040\103\101\040\107\064 +END +CKA_ID UTF8 "0" +CKA_ISSUER MULTILINE_OCTAL +\060\132\061\013\060\011\006\003\125\004\006\023\002\103\116\061 +\045\060\043\006\003\125\004\012\014\034\124\162\165\163\164\101 +\163\151\141\040\124\145\143\150\156\157\154\157\147\151\145\163 +\054\040\111\156\143\056\061\044\060\042\006\003\125\004\003\014 +\033\124\162\165\163\164\101\163\151\141\040\107\154\157\142\141 +\154\040\122\157\157\164\040\103\101\040\107\064 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\117\043\144\270\216\227\143\236\306\123\201\301\166\116 +\313\052\164\025\326\327 +END +CKA_VALUE MULTILINE_OCTAL +\060\202\002\125\060\202\001\334\240\003\002\001\002\002\024\117 +\043\144\270\216\227\143\236\306\123\201\301\166\116\313\052\164 +\025\326\327\060\012\006\010\052\206\110\316\075\004\003\003\060 +\132\061\013\060\011\006\003\125\004\006\023\002\103\116\061\045 +\060\043\006\003\125\004\012\014\034\124\162\165\163\164\101\163 +\151\141\040\124\145\143\150\156\157\154\157\147\151\145\163\054 +\040\111\156\143\056\061\044\060\042\006\003\125\004\003\014\033 +\124\162\165\163\164\101\163\151\141\040\107\154\157\142\141\154 +\040\122\157\157\164\040\103\101\040\107\064\060\036\027\015\062 +\061\060\065\062\060\060\062\061\060\062\062\132\027\015\064\066 +\060\065\061\071\060\062\061\060\062\062\132\060\132\061\013\060 +\011\006\003\125\004\006\023\002\103\116\061\045\060\043\006\003 +\125\004\012\014\034\124\162\165\163\164\101\163\151\141\040\124 +\145\143\150\156\157\154\157\147\151\145\163\054\040\111\156\143 +\056\061\044\060\042\006\003\125\004\003\014\033\124\162\165\163 +\164\101\163\151\141\040\107\154\157\142\141\154\040\122\157\157 +\164\040\103\101\040\107\064\060\166\060\020\006\007\052\206\110 +\316\075\002\001\006\005\053\201\004\000\042\003\142\000\004\361 +\263\315\070\344\045\103\345\336\031\011\273\201\171\242\025\137 +\025\143\001\336\302\253\335\263\246\033\147\113\200\203\257\231 +\313\254\027\333\053\226\312\174\122\125\342\032\341\075\126\360 +\057\026\010\372\025\274\233\273\107\346\077\356\250\341\114\214 +\365\323\066\371\070\135\253\160\232\107\015\342\201\101\006\353 +\111\371\260\051\335\063\354\120\245\177\171\051\270\040\230\243 +\143\060\141\060\017\006\003\125\035\023\001\001\377\004\005\060 +\003\001\001\377\060\037\006\003\125\035\043\004\030\060\026\200 +\024\245\273\112\227\316\263\053\177\244\061\336\227\203\131\203 +\246\157\161\313\336\060\035\006\003\125\035\016\004\026\004\024 +\245\273\112\227\316\263\053\177\244\061\336\227\203\131\203\246 +\157\161\313\336\060\016\006\003\125\035\017\001\001\377\004\004 +\003\002\001\006\060\012\006\010\052\206\110\316\075\004\003\003 +\003\147\000\060\144\002\060\136\362\353\006\314\111\061\237\100 +\000\155\267\176\066\360\115\021\117\363\313\211\072\054\170\221 +\120\243\133\300\312\165\046\362\277\220\135\013\202\214\140\050 +\237\306\160\232\150\344\361\002\060\134\130\016\126\166\317\130 +\303\327\020\214\272\216\256\343\274\144\165\107\305\125\220\343 +\375\272\125\353\007\304\123\253\067\251\356\041\262\041\133\140 +\217\075\062\361\325\043\224\326\130 +END +CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE +CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE + +# Trust for "TrustAsia Global Root CA G4" +# Issuer: CN=TrustAsia Global Root CA G4,O="TrustAsia Technologies, Inc.",C=CN +# Serial Number:4f:23:64:b8:8e:97:63:9e:c6:53:81:c1:76:4e:cb:2a:74:15:d6:d7 +# Subject: CN=TrustAsia Global Root CA G4,O="TrustAsia Technologies, Inc.",C=CN +# Not Valid Before: Thu May 20 02:10:22 2021 +# Not Valid After : Sat May 19 02:10:22 2046 +# Fingerprint (SHA-256): BE:4B:56:CB:50:56:C0:13:6A:52:6D:F4:44:50:8D:AA:36:A0:B5:4F:42:E4:AC:38:F7:2A:F4:70:E4:79:65:4C +# Fingerprint (SHA1): 57:73:A5:61:5D:80:B2:E6:AC:38:82:FC:68:07:31:AC:9F:B5:92:5A +CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "TrustAsia Global Root CA G4" +CKA_CERT_SHA1_HASH MULTILINE_OCTAL +\127\163\245\141\135\200\262\346\254\070\202\374\150\007\061\254 +\237\265\222\132 +END +CKA_CERT_MD5_HASH MULTILINE_OCTAL +\124\335\262\327\137\330\076\355\174\340\013\056\314\355\353\353 +END +CKA_ISSUER MULTILINE_OCTAL +\060\132\061\013\060\011\006\003\125\004\006\023\002\103\116\061 +\045\060\043\006\003\125\004\012\014\034\124\162\165\163\164\101 +\163\151\141\040\124\145\143\150\156\157\154\157\147\151\145\163 +\054\040\111\156\143\056\061\044\060\042\006\003\125\004\003\014 +\033\124\162\165\163\164\101\163\151\141\040\107\154\157\142\141 +\154\040\122\157\157\164\040\103\101\040\107\064 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\117\043\144\270\216\227\143\236\306\123\201\301\166\116 +\313\052\164\025\326\327 +END +CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR +CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_TRUSTED_DELEGATOR +CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST +CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + +# +# Certificate "CommScope Public Trust ECC Root-01" +# +# Issuer: CN=CommScope Public Trust ECC Root-01,O=CommScope,C=US +# Serial Number:43:70:82:77:cf:4d:5d:34:f1:ca:ae:32:2f:37:f7:f4:7f:75:a0:9e +# Subject: CN=CommScope Public Trust ECC Root-01,O=CommScope,C=US +# Not Valid Before: Wed Apr 28 17:35:43 2021 +# Not Valid After : Sat Apr 28 17:35:42 2046 +# Fingerprint (SHA-256): 11:43:7C:DA:7B:B4:5E:41:36:5F:45:B3:9A:38:98:6B:0D:E0:0D:EF:34:8E:0C:7B:B0:87:36:33:80:0B:C3:8B +# Fingerprint (SHA1): 07:86:C0:D8:DD:8E:C0:80:98:06:98:D0:58:7A:EF:DE:A6:CC:A2:5D +CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "CommScope Public Trust ECC Root-01" +CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 +CKA_SUBJECT MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\105\103\103\040\122\157\157\164\055\060\061 +END +CKA_ID UTF8 "0" +CKA_ISSUER MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\105\103\103\040\122\157\157\164\055\060\061 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\103\160\202\167\317\115\135\064\361\312\256\062\057\067 +\367\364\177\165\240\236 +END +CKA_VALUE MULTILINE_OCTAL +\060\202\002\035\060\202\001\243\240\003\002\001\002\002\024\103 +\160\202\167\317\115\135\064\361\312\256\062\057\067\367\364\177 +\165\240\236\060\012\006\010\052\206\110\316\075\004\003\003\060 +\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061\022 +\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143\157 +\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157\155 +\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124\162 +\165\163\164\040\105\103\103\040\122\157\157\164\055\060\061\060 +\036\027\015\062\061\060\064\062\070\061\067\063\065\064\063\132 +\027\015\064\066\060\064\062\070\061\067\063\065\064\062\132\060 +\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061\022 +\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143\157 +\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157\155 +\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124\162 +\165\163\164\040\105\103\103\040\122\157\157\164\055\060\061\060 +\166\060\020\006\007\052\206\110\316\075\002\001\006\005\053\201 +\004\000\042\003\142\000\004\113\066\351\256\127\136\250\160\327 +\320\217\164\142\167\303\136\172\252\345\266\242\361\170\375\002 +\176\127\335\221\171\234\154\271\122\210\124\274\057\004\276\270 +\315\366\020\321\051\354\265\320\240\303\360\211\160\031\273\121 +\145\305\103\234\303\233\143\235\040\203\076\006\013\246\102\104 +\205\021\247\112\072\055\351\326\150\057\110\116\123\053\007\077 +\115\275\271\254\167\071\127\243\102\060\100\060\017\006\003\125 +\035\023\001\001\377\004\005\060\003\001\001\377\060\016\006\003 +\125\035\017\001\001\377\004\004\003\002\001\006\060\035\006\003 +\125\035\016\004\026\004\024\216\007\142\300\120\335\306\031\006 +\000\106\164\004\367\363\256\175\165\115\060\060\012\006\010\052 +\206\110\316\075\004\003\003\003\150\000\060\145\002\061\000\234 +\063\337\101\343\043\250\102\066\046\227\065\134\173\353\333\113 +\370\252\213\163\125\025\134\254\170\051\017\272\041\330\304\240 +\330\321\003\335\155\321\071\075\304\223\140\322\343\162\262\002 +\060\174\305\176\210\323\120\365\036\045\350\372\116\165\346\130 +\226\244\065\137\033\145\352\141\232\160\043\265\015\243\233\222 +\122\157\151\240\214\215\112\320\356\213\016\313\107\216\320\215 +\021 +END +CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE +CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE + +# Trust for "CommScope Public Trust ECC Root-01" +# Issuer: CN=CommScope Public Trust ECC Root-01,O=CommScope,C=US +# Serial Number:43:70:82:77:cf:4d:5d:34:f1:ca:ae:32:2f:37:f7:f4:7f:75:a0:9e +# Subject: CN=CommScope Public Trust ECC Root-01,O=CommScope,C=US +# Not Valid Before: Wed Apr 28 17:35:43 2021 +# Not Valid After : Sat Apr 28 17:35:42 2046 +# Fingerprint (SHA-256): 11:43:7C:DA:7B:B4:5E:41:36:5F:45:B3:9A:38:98:6B:0D:E0:0D:EF:34:8E:0C:7B:B0:87:36:33:80:0B:C3:8B +# Fingerprint (SHA1): 07:86:C0:D8:DD:8E:C0:80:98:06:98:D0:58:7A:EF:DE:A6:CC:A2:5D +CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "CommScope Public Trust ECC Root-01" +CKA_CERT_SHA1_HASH MULTILINE_OCTAL +\007\206\300\330\335\216\300\200\230\006\230\320\130\172\357\336 +\246\314\242\135 +END +CKA_CERT_MD5_HASH MULTILINE_OCTAL +\072\100\247\374\003\214\234\070\171\057\072\242\154\266\012\026 +END +CKA_ISSUER MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\105\103\103\040\122\157\157\164\055\060\061 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\103\160\202\167\317\115\135\064\361\312\256\062\057\067 +\367\364\177\165\240\236 +END +CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR +CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST +CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST +CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + +# +# Certificate "CommScope Public Trust ECC Root-02" +# +# Issuer: CN=CommScope Public Trust ECC Root-02,O=CommScope,C=US +# Serial Number:28:fd:99:60:41:47:a6:01:3a:ca:14:7b:1f:ef:f9:68:08:83:5d:7d +# Subject: CN=CommScope Public Trust ECC Root-02,O=CommScope,C=US +# Not Valid Before: Wed Apr 28 17:44:54 2021 +# Not Valid After : Sat Apr 28 17:44:53 2046 +# Fingerprint (SHA-256): 2F:FB:7F:81:3B:BB:B3:C8:9A:B4:E8:16:2D:0F:16:D7:15:09:A8:30:CC:9D:73:C2:62:E5:14:08:75:D1:AD:4A +# Fingerprint (SHA1): 3C:3F:EF:57:0F:FE:65:93:86:9E:A0:FE:B0:F6:ED:8E:D1:13:C7:E5 +CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "CommScope Public Trust ECC Root-02" +CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 +CKA_SUBJECT MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\105\103\103\040\122\157\157\164\055\060\062 +END +CKA_ID UTF8 "0" +CKA_ISSUER MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\105\103\103\040\122\157\157\164\055\060\062 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\050\375\231\140\101\107\246\001\072\312\024\173\037\357 +\371\150\010\203\135\175 +END +CKA_VALUE MULTILINE_OCTAL +\060\202\002\034\060\202\001\243\240\003\002\001\002\002\024\050 +\375\231\140\101\107\246\001\072\312\024\173\037\357\371\150\010 +\203\135\175\060\012\006\010\052\206\110\316\075\004\003\003\060 +\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061\022 +\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143\157 +\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157\155 +\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124\162 +\165\163\164\040\105\103\103\040\122\157\157\164\055\060\062\060 +\036\027\015\062\061\060\064\062\070\061\067\064\064\065\064\132 +\027\015\064\066\060\064\062\070\061\067\064\064\065\063\132\060 +\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061\022 +\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143\157 +\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157\155 +\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124\162 +\165\163\164\040\105\103\103\040\122\157\157\164\055\060\062\060 +\166\060\020\006\007\052\206\110\316\075\002\001\006\005\053\201 +\004\000\042\003\142\000\004\170\060\201\350\143\036\345\353\161 +\121\017\367\007\007\312\071\231\174\116\325\017\314\060\060\013 +\217\146\223\076\317\275\305\206\275\371\261\267\264\076\264\007 +\310\363\226\061\363\355\244\117\370\243\116\215\051\025\130\270 +\325\157\177\356\154\042\265\260\257\110\105\012\275\250\111\224 +\277\204\103\260\333\204\112\003\043\031\147\152\157\301\156\274 +\006\071\067\321\210\042\367\243\102\060\100\060\017\006\003\125 +\035\023\001\001\377\004\005\060\003\001\001\377\060\016\006\003 +\125\035\017\001\001\377\004\004\003\002\001\006\060\035\006\003 +\125\035\016\004\026\004\024\346\030\165\377\357\140\336\204\244 +\365\106\307\336\112\125\343\062\066\171\365\060\012\006\010\052 +\206\110\316\075\004\003\003\003\147\000\060\144\002\060\046\163 +\111\172\266\253\346\111\364\175\122\077\324\101\004\256\200\103 +\203\145\165\271\205\200\070\073\326\157\344\223\206\253\217\347 +\211\310\177\233\176\153\012\022\125\141\252\021\340\171\002\060 +\167\350\061\161\254\074\161\003\326\204\046\036\024\270\363\073 +\073\336\355\131\374\153\114\060\177\131\316\105\351\163\140\025 +\232\114\360\346\136\045\042\025\155\302\207\131\320\262\216\152 +END +CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE +CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE + +# Trust for "CommScope Public Trust ECC Root-02" +# Issuer: CN=CommScope Public Trust ECC Root-02,O=CommScope,C=US +# Serial Number:28:fd:99:60:41:47:a6:01:3a:ca:14:7b:1f:ef:f9:68:08:83:5d:7d +# Subject: CN=CommScope Public Trust ECC Root-02,O=CommScope,C=US +# Not Valid Before: Wed Apr 28 17:44:54 2021 +# Not Valid After : Sat Apr 28 17:44:53 2046 +# Fingerprint (SHA-256): 2F:FB:7F:81:3B:BB:B3:C8:9A:B4:E8:16:2D:0F:16:D7:15:09:A8:30:CC:9D:73:C2:62:E5:14:08:75:D1:AD:4A +# Fingerprint (SHA1): 3C:3F:EF:57:0F:FE:65:93:86:9E:A0:FE:B0:F6:ED:8E:D1:13:C7:E5 +CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "CommScope Public Trust ECC Root-02" +CKA_CERT_SHA1_HASH MULTILINE_OCTAL +\074\077\357\127\017\376\145\223\206\236\240\376\260\366\355\216 +\321\023\307\345 +END +CKA_CERT_MD5_HASH MULTILINE_OCTAL +\131\260\104\325\145\115\270\134\125\031\222\002\266\321\224\262 +END +CKA_ISSUER MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\105\103\103\040\122\157\157\164\055\060\062 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\050\375\231\140\101\107\246\001\072\312\024\173\037\357 +\371\150\010\203\135\175 +END +CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR +CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST +CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST +CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + +# +# Certificate "CommScope Public Trust RSA Root-01" +# +# Issuer: CN=CommScope Public Trust RSA Root-01,O=CommScope,C=US +# Serial Number:3e:03:49:81:75:16:74:31:8e:4c:ab:d5:c5:90:29:96:c5:39:10:dd +# Subject: CN=CommScope Public Trust RSA Root-01,O=CommScope,C=US +# Not Valid Before: Wed Apr 28 16:45:54 2021 +# Not Valid After : Sat Apr 28 16:45:53 2046 +# Fingerprint (SHA-256): 02:BD:F9:6E:2A:45:DD:9B:F1:8F:C7:E1:DB:DF:21:A0:37:9B:A3:C9:C2:61:03:44:CF:D8:D6:06:FE:C1:ED:81 +# Fingerprint (SHA1): 6D:0A:5F:F7:B4:23:06:B4:85:B3:B7:97:64:FC:AC:75:F5:33:F2:93 +CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "CommScope Public Trust RSA Root-01" +CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 +CKA_SUBJECT MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\122\123\101\040\122\157\157\164\055\060\061 +END +CKA_ID UTF8 "0" +CKA_ISSUER MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\122\123\101\040\122\157\157\164\055\060\061 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\076\003\111\201\165\026\164\061\216\114\253\325\305\220 +\051\226\305\071\020\335 +END +CKA_VALUE MULTILINE_OCTAL +\060\202\005\154\060\202\003\124\240\003\002\001\002\002\024\076 +\003\111\201\165\026\164\061\216\114\253\325\305\220\051\226\305 +\071\020\335\060\015\006\011\052\206\110\206\367\015\001\001\013 +\005\000\060\116\061\013\060\011\006\003\125\004\006\023\002\125 +\123\061\022\060\020\006\003\125\004\012\014\011\103\157\155\155 +\123\143\157\160\145\061\053\060\051\006\003\125\004\003\014\042 +\103\157\155\155\123\143\157\160\145\040\120\165\142\154\151\143 +\040\124\162\165\163\164\040\122\123\101\040\122\157\157\164\055 +\060\061\060\036\027\015\062\061\060\064\062\070\061\066\064\065 +\065\064\132\027\015\064\066\060\064\062\070\061\066\064\065\065 +\063\132\060\116\061\013\060\011\006\003\125\004\006\023\002\125 +\123\061\022\060\020\006\003\125\004\012\014\011\103\157\155\155 +\123\143\157\160\145\061\053\060\051\006\003\125\004\003\014\042 +\103\157\155\155\123\143\157\160\145\040\120\165\142\154\151\143 +\040\124\162\165\163\164\040\122\123\101\040\122\157\157\164\055 +\060\061\060\202\002\042\060\015\006\011\052\206\110\206\367\015 +\001\001\001\005\000\003\202\002\017\000\060\202\002\012\002\202 +\002\001\000\260\110\145\243\015\035\102\343\221\155\235\204\244 +\141\226\022\302\355\303\332\043\064\031\166\366\352\375\125\132 +\366\125\001\123\017\362\314\214\227\117\271\120\313\263\001\104 +\126\226\375\233\050\354\173\164\013\347\102\153\125\316\311\141 +\262\350\255\100\074\272\271\101\012\005\117\033\046\205\217\103 +\265\100\265\205\321\324\161\334\203\101\363\366\105\307\200\242 +\204\120\227\106\316\240\014\304\140\126\004\035\007\133\106\245 +\016\262\113\244\016\245\174\356\370\324\142\003\271\223\152\212 +\024\270\160\370\056\202\106\070\043\016\164\307\153\101\267\320 +\051\243\235\200\260\176\167\223\143\102\373\064\203\073\163\243 +\132\041\066\353\107\372\030\027\331\272\146\302\223\244\217\374 +\135\244\255\374\120\152\225\254\274\044\063\321\275\210\177\206 +\365\365\262\163\052\217\174\257\010\362\032\230\077\251\201\145 +\077\301\214\211\305\226\060\232\012\317\364\324\310\064\355\235 +\057\274\215\070\206\123\356\227\237\251\262\143\224\027\215\017 +\334\146\052\174\122\121\165\313\231\216\350\075\134\277\236\073 +\050\215\203\002\017\251\237\162\342\054\053\263\334\146\227\000 +\100\320\244\124\216\233\135\173\105\066\046\326\162\103\353\317 +\300\352\015\334\316\022\346\175\070\237\005\047\250\227\076\351 +\121\306\154\005\050\301\002\017\351\030\155\354\275\234\006\324 +\247\111\364\124\005\153\154\060\361\353\003\325\352\075\152\166 +\302\313\032\050\111\115\177\144\340\372\053\332\163\203\201\377 +\221\003\275\224\273\344\270\216\234\062\143\315\237\273\150\201 +\261\204\133\257\066\277\167\356\035\177\367\111\233\122\354\322 +\167\132\175\221\235\115\302\071\055\344\272\202\370\157\362\116 +\036\017\116\346\077\131\245\043\334\075\207\250\050\130\050\321 +\361\033\066\333\117\304\377\341\214\133\162\214\307\046\003\047 +\243\071\012\001\252\300\262\061\140\203\042\241\117\022\011\001 +\021\257\064\324\317\327\256\142\323\005\007\264\061\165\340\015 +\155\127\117\151\207\371\127\251\272\025\366\310\122\155\241\313 +\234\037\345\374\170\250\065\232\237\101\024\316\245\264\316\224 +\010\034\011\255\126\345\332\266\111\232\112\352\143\030\123\234 +\054\056\303\002\003\001\000\001\243\102\060\100\060\017\006\003 +\125\035\023\001\001\377\004\005\060\003\001\001\377\060\016\006 +\003\125\035\017\001\001\377\004\004\003\002\001\006\060\035\006 +\003\125\035\016\004\026\004\024\067\135\246\232\164\062\302\302 +\371\307\246\025\020\131\270\344\375\345\270\155\060\015\006\011 +\052\206\110\206\367\015\001\001\013\005\000\003\202\002\001\000 +\257\247\317\336\377\340\275\102\215\115\345\042\226\337\150\352 +\175\115\052\175\320\255\075\026\134\103\347\175\300\206\350\172 +\065\143\361\314\201\310\306\013\350\056\122\065\244\246\111\220 +\143\121\254\064\254\005\073\127\000\351\323\142\323\331\051\325 +\124\276\034\020\221\234\262\155\376\131\375\171\367\352\126\320 +\236\150\124\102\217\046\122\342\114\337\057\227\246\057\322\007 +\230\250\363\140\135\113\232\130\127\210\357\202\345\372\257\154 +\201\113\222\217\100\232\223\106\131\313\137\170\026\261\147\076 +\102\013\337\050\331\260\255\230\040\276\103\174\321\136\032\011 +\027\044\215\173\135\225\351\253\301\140\253\133\030\144\200\373 +\255\340\006\175\035\312\131\270\363\170\051\147\306\126\035\257 +\266\265\164\052\166\241\077\373\165\060\237\224\136\073\245\140 +\363\313\134\014\342\016\311\140\370\311\037\026\212\046\335\347 +\047\177\353\045\246\212\275\270\055\066\020\232\261\130\115\232 +\150\117\140\124\345\366\106\023\216\210\254\274\041\102\022\255 +\306\112\211\175\233\301\330\055\351\226\003\364\242\164\014\274 +\000\035\277\326\067\045\147\264\162\213\257\205\275\352\052\003 +\217\314\373\074\104\044\202\342\001\245\013\131\266\064\215\062 +\013\022\015\353\047\302\375\101\327\100\074\162\106\051\300\214 +\352\272\017\361\006\223\056\367\234\250\364\140\076\243\361\070 +\136\216\023\301\263\072\227\207\077\222\312\170\251\034\257\320 +\260\033\046\036\276\160\354\172\365\063\230\352\134\377\053\013 +\004\116\103\335\143\176\016\247\116\170\003\225\076\324\055\060 +\225\021\020\050\056\277\240\002\076\377\136\131\323\005\016\225 +\137\123\105\357\153\207\325\110\315\026\246\226\203\341\337\263 +\006\363\301\024\333\247\354\034\213\135\220\220\015\162\121\347 +\141\371\024\312\257\203\217\277\257\261\012\131\135\334\134\327 +\344\226\255\133\140\035\332\256\227\262\071\331\006\365\166\000 +\023\370\150\114\041\260\065\304\334\125\262\311\301\101\132\034 +\211\300\214\157\164\240\153\063\115\265\001\050\375\255\255\211 +\027\073\246\232\204\274\353\214\352\304\161\044\250\272\051\371 +\010\262\047\126\065\062\137\352\071\373\061\232\325\031\314\360 +END +CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE +CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE + +# Trust for "CommScope Public Trust RSA Root-01" +# Issuer: CN=CommScope Public Trust RSA Root-01,O=CommScope,C=US +# Serial Number:3e:03:49:81:75:16:74:31:8e:4c:ab:d5:c5:90:29:96:c5:39:10:dd +# Subject: CN=CommScope Public Trust RSA Root-01,O=CommScope,C=US +# Not Valid Before: Wed Apr 28 16:45:54 2021 +# Not Valid After : Sat Apr 28 16:45:53 2046 +# Fingerprint (SHA-256): 02:BD:F9:6E:2A:45:DD:9B:F1:8F:C7:E1:DB:DF:21:A0:37:9B:A3:C9:C2:61:03:44:CF:D8:D6:06:FE:C1:ED:81 +# Fingerprint (SHA1): 6D:0A:5F:F7:B4:23:06:B4:85:B3:B7:97:64:FC:AC:75:F5:33:F2:93 +CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "CommScope Public Trust RSA Root-01" +CKA_CERT_SHA1_HASH MULTILINE_OCTAL +\155\012\137\367\264\043\006\264\205\263\267\227\144\374\254\165 +\365\063\362\223 +END +CKA_CERT_MD5_HASH MULTILINE_OCTAL +\016\264\025\274\207\143\135\135\002\163\324\046\070\150\163\330 +END +CKA_ISSUER MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\122\123\101\040\122\157\157\164\055\060\061 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\076\003\111\201\165\026\164\061\216\114\253\325\305\220 +\051\226\305\071\020\335 +END +CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR +CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST +CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST +CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE + +# +# Certificate "CommScope Public Trust RSA Root-02" +# +# Issuer: CN=CommScope Public Trust RSA Root-02,O=CommScope,C=US +# Serial Number:54:16:bf:3b:7e:39:95:71:8d:d1:aa:00:a5:86:0d:2b:8f:7a:05:4e +# Subject: CN=CommScope Public Trust RSA Root-02,O=CommScope,C=US +# Not Valid Before: Wed Apr 28 17:16:43 2021 +# Not Valid After : Sat Apr 28 17:16:42 2046 +# Fingerprint (SHA-256): FF:E9:43:D7:93:42:4B:4F:7C:44:0C:1C:3D:64:8D:53:63:F3:4B:82:DC:87:AA:7A:9F:11:8F:C5:DE:E1:01:F1 +# Fingerprint (SHA1): EA:B0:E2:52:1B:89:93:4C:11:68:F2:D8:9A:AC:22:4C:A3:8A:57:AE +CKA_CLASS CK_OBJECT_CLASS CKO_CERTIFICATE +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "CommScope Public Trust RSA Root-02" +CKA_CERTIFICATE_TYPE CK_CERTIFICATE_TYPE CKC_X_509 +CKA_SUBJECT MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\122\123\101\040\122\157\157\164\055\060\062 +END +CKA_ID UTF8 "0" +CKA_ISSUER MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\122\123\101\040\122\157\157\164\055\060\062 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\124\026\277\073\176\071\225\161\215\321\252\000\245\206 +\015\053\217\172\005\116 +END +CKA_VALUE MULTILINE_OCTAL +\060\202\005\154\060\202\003\124\240\003\002\001\002\002\024\124 +\026\277\073\176\071\225\161\215\321\252\000\245\206\015\053\217 +\172\005\116\060\015\006\011\052\206\110\206\367\015\001\001\013 +\005\000\060\116\061\013\060\011\006\003\125\004\006\023\002\125 +\123\061\022\060\020\006\003\125\004\012\014\011\103\157\155\155 +\123\143\157\160\145\061\053\060\051\006\003\125\004\003\014\042 +\103\157\155\155\123\143\157\160\145\040\120\165\142\154\151\143 +\040\124\162\165\163\164\040\122\123\101\040\122\157\157\164\055 +\060\062\060\036\027\015\062\061\060\064\062\070\061\067\061\066 +\064\063\132\027\015\064\066\060\064\062\070\061\067\061\066\064 +\062\132\060\116\061\013\060\011\006\003\125\004\006\023\002\125 +\123\061\022\060\020\006\003\125\004\012\014\011\103\157\155\155 +\123\143\157\160\145\061\053\060\051\006\003\125\004\003\014\042 +\103\157\155\155\123\143\157\160\145\040\120\165\142\154\151\143 +\040\124\162\165\163\164\040\122\123\101\040\122\157\157\164\055 +\060\062\060\202\002\042\060\015\006\011\052\206\110\206\367\015 +\001\001\001\005\000\003\202\002\017\000\060\202\002\012\002\202 +\002\001\000\341\372\016\373\150\000\022\310\115\325\254\042\304 +\065\001\073\305\124\345\131\166\143\245\177\353\301\304\152\230 +\275\062\215\027\200\353\135\272\321\142\075\045\043\031\065\024 +\351\177\211\247\033\142\074\326\120\347\064\225\003\062\261\264 +\223\042\075\247\342\261\355\346\173\116\056\207\233\015\063\165 +\012\336\252\065\347\176\345\066\230\242\256\045\236\225\263\062 +\226\244\053\130\036\357\077\376\142\064\110\121\321\264\215\102 +\255\140\332\111\152\225\160\335\322\000\342\314\127\143\002\173 +\226\335\111\227\133\222\116\225\323\371\313\051\037\030\112\370 +\001\052\322\143\011\156\044\351\211\322\345\307\042\114\334\163 +\206\107\000\252\015\210\216\256\205\175\112\351\273\063\117\016 +\122\160\235\225\343\174\155\226\133\055\075\137\241\203\106\135 +\266\343\045\270\174\247\031\200\034\352\145\103\334\221\171\066 +\054\164\174\362\147\006\311\211\311\333\277\332\150\277\043\355 +\334\153\255\050\203\171\057\354\070\245\015\067\001\147\047\232 +\351\063\331\063\137\067\241\305\360\253\075\372\170\260\347\054 +\237\366\076\237\140\340\357\110\351\220\105\036\005\121\170\032 +\054\022\054\134\050\254\015\242\043\236\064\217\005\346\242\063 +\316\021\167\023\324\016\244\036\102\037\206\315\160\376\331\056 +\025\075\035\273\270\362\123\127\333\314\306\164\051\234\030\263 +\066\165\070\056\017\124\241\370\222\037\211\226\117\273\324\356 +\235\351\073\066\102\265\012\073\052\324\144\171\066\020\341\371 +\221\003\053\173\040\124\315\015\031\032\310\101\062\064\321\260 +\231\341\220\036\001\100\066\265\267\372\251\345\167\165\244\042 +\201\135\260\213\344\047\022\017\124\210\306\333\205\164\346\267 +\300\327\246\051\372\333\336\363\223\227\047\004\125\057\012\157 +\067\305\075\023\257\012\000\251\054\213\034\201\050\327\357\206 +\061\251\256\362\156\270\312\152\054\124\107\330\052\210\056\257 +\301\007\020\170\254\021\242\057\102\360\067\305\362\270\126\335 +\016\142\055\316\055\126\176\125\362\247\104\366\053\062\364\043 +\250\107\350\324\052\001\170\317\152\303\067\250\236\145\322\054 +\345\372\272\063\301\006\104\366\346\317\245\015\247\146\010\064 +\212\054\363\002\003\001\000\001\243\102\060\100\060\017\006\003 +\125\035\023\001\001\377\004\005\060\003\001\001\377\060\016\006 +\003\125\035\017\001\001\377\004\004\003\002\001\006\060\035\006 +\003\125\035\016\004\026\004\024\107\320\347\261\042\377\235\054 +\365\331\127\140\263\261\261\160\225\357\141\172\060\015\006\011 +\052\206\110\206\367\015\001\001\013\005\000\003\202\002\001\000 +\206\151\261\115\057\351\237\117\042\223\150\216\344\041\231\243 +\316\105\123\033\163\104\123\000\201\141\315\061\343\010\272\201 +\050\050\172\222\271\266\250\310\103\236\307\023\046\115\302\330 +\345\125\234\222\135\120\330\302\053\333\376\346\250\227\317\122 +\072\044\303\145\144\134\107\061\243\145\065\023\303\223\271\367 +\371\121\227\273\244\360\142\207\305\326\006\323\227\203\040\251 +\176\273\266\041\302\245\015\204\000\341\362\047\020\203\272\335 +\003\201\325\335\150\303\146\020\310\321\166\264\263\157\051\236 +\000\371\302\051\365\261\223\031\122\151\032\054\114\240\213\340 +\025\232\061\057\323\210\225\131\156\345\304\263\120\310\024\010 +\112\233\213\023\203\261\244\162\262\073\166\063\101\334\334\252 +\246\007\157\035\044\022\237\310\166\275\057\331\216\364\054\356 +\267\322\070\020\044\066\121\057\343\134\135\201\041\247\332\273 +\116\377\346\007\250\376\271\015\047\154\273\160\132\125\172\023 +\351\361\052\111\151\307\137\207\127\114\103\171\155\072\145\351 +\060\134\101\356\353\167\245\163\022\210\350\277\175\256\345\304 +\250\037\015\216\034\155\120\002\117\046\030\103\336\217\125\205 +\261\013\067\005\140\311\125\071\022\004\241\052\317\161\026\237 +\066\121\111\277\160\073\236\147\234\373\173\171\311\071\034\170 +\254\167\221\124\232\270\165\012\201\122\227\343\146\141\153\355 +\076\070\036\226\141\125\341\221\124\214\355\214\044\037\201\311 +\020\232\163\231\053\026\116\162\000\077\124\033\370\215\272\213 +\347\024\326\266\105\117\140\354\226\256\303\057\002\116\135\235 +\226\111\162\000\262\253\165\134\017\150\133\035\145\302\137\063 +\017\036\017\360\073\206\365\260\116\273\234\367\352\045\005\334 +\255\242\233\113\027\001\276\102\337\065\041\035\255\253\256\364 +\277\256\037\033\323\342\073\374\263\162\163\034\233\050\220\211 +\023\075\035\301\000\107\011\226\232\070\033\335\261\317\015\302 +\264\104\363\226\225\316\062\072\217\064\234\340\027\307\136\316 +\256\015\333\207\070\345\077\133\375\233\031\341\061\101\172\160 +\252\043\153\001\341\105\114\315\224\316\073\236\055\347\210\002 +\042\364\156\350\310\354\326\074\363\271\262\327\167\172\254\173 +END +CKA_NSS_MOZILLA_CA_POLICY CK_BBOOL CK_TRUE +CKA_NSS_SERVER_DISTRUST_AFTER CK_BBOOL CK_FALSE +CKA_NSS_EMAIL_DISTRUST_AFTER CK_BBOOL CK_FALSE + +# Trust for "CommScope Public Trust RSA Root-02" +# Issuer: CN=CommScope Public Trust RSA Root-02,O=CommScope,C=US +# Serial Number:54:16:bf:3b:7e:39:95:71:8d:d1:aa:00:a5:86:0d:2b:8f:7a:05:4e +# Subject: CN=CommScope Public Trust RSA Root-02,O=CommScope,C=US +# Not Valid Before: Wed Apr 28 17:16:43 2021 +# Not Valid After : Sat Apr 28 17:16:42 2046 +# Fingerprint (SHA-256): FF:E9:43:D7:93:42:4B:4F:7C:44:0C:1C:3D:64:8D:53:63:F3:4B:82:DC:87:AA:7A:9F:11:8F:C5:DE:E1:01:F1 +# Fingerprint (SHA1): EA:B0:E2:52:1B:89:93:4C:11:68:F2:D8:9A:AC:22:4C:A3:8A:57:AE +CKA_CLASS CK_OBJECT_CLASS CKO_NSS_TRUST +CKA_TOKEN CK_BBOOL CK_TRUE +CKA_PRIVATE CK_BBOOL CK_FALSE +CKA_MODIFIABLE CK_BBOOL CK_FALSE +CKA_LABEL UTF8 "CommScope Public Trust RSA Root-02" +CKA_CERT_SHA1_HASH MULTILINE_OCTAL +\352\260\342\122\033\211\223\114\021\150\362\330\232\254\042\114 +\243\212\127\256 +END +CKA_CERT_MD5_HASH MULTILINE_OCTAL +\341\051\371\142\173\166\342\226\155\363\324\327\017\256\037\252 +END +CKA_ISSUER MULTILINE_OCTAL +\060\116\061\013\060\011\006\003\125\004\006\023\002\125\123\061 +\022\060\020\006\003\125\004\012\014\011\103\157\155\155\123\143 +\157\160\145\061\053\060\051\006\003\125\004\003\014\042\103\157 +\155\155\123\143\157\160\145\040\120\165\142\154\151\143\040\124 +\162\165\163\164\040\122\123\101\040\122\157\157\164\055\060\062 +END +CKA_SERIAL_NUMBER MULTILINE_OCTAL +\002\024\124\026\277\073\176\071\225\161\215\321\252\000\245\206 +\015\053\217\172\005\116 +END +CKA_TRUST_SERVER_AUTH CK_TRUST CKT_NSS_TRUSTED_DELEGATOR +CKA_TRUST_EMAIL_PROTECTION CK_TRUST CKT_NSS_MUST_VERIFY_TRUST +CKA_TRUST_CODE_SIGNING CK_TRUST CKT_NSS_MUST_VERIFY_TRUST +CKA_TRUST_STEP_UP_APPROVED CK_BBOOL CK_FALSE diff --git a/tools/dep_updaters/update-acorn-walk.sh b/tools/dep_updaters/update-acorn-walk.sh index 844380305d0fe3..9967d63f0c6e2c 100755 --- a/tools/dep_updaters/update-acorn-walk.sh +++ b/tools/dep_updaters/update-acorn-walk.sh @@ -17,7 +17,7 @@ DEPS_DIR="$BASE_DIR/deps" . "$BASE_DIR/tools/dep_updaters/utils.sh" NEW_VERSION=$("$NODE" "$NPM" view acorn-walk dist-tags.latest) -CURRENT_VERSION=$("$NODE" "$NPM" --prefix './deps/acorn/acorn-walk/' pkg get version) +CURRENT_VERSION=$("$NODE" -p "require('./deps/acorn/acorn-walk/package.json').version") # This function exit with 0 if new version and current version are the same compare_dependency_version "acorn-walk" "$NEW_VERSION" "$CURRENT_VERSION" diff --git a/tools/dep_updaters/update-acorn.sh b/tools/dep_updaters/update-acorn.sh index 6c0f54a5447100..52c6974505beb0 100755 --- a/tools/dep_updaters/update-acorn.sh +++ b/tools/dep_updaters/update-acorn.sh @@ -17,7 +17,7 @@ DEPS_DIR="$BASE_DIR/deps" . "$BASE_DIR/tools/dep_updaters/utils.sh" NEW_VERSION=$("$NODE" "$NPM" view acorn dist-tags.latest) -CURRENT_VERSION=$("$NODE" "$NPM" --prefix './deps/acorn/acorn/' pkg get version) +CURRENT_VERSION=$("$NODE" -p "require('./deps/acorn/acorn/package.json').version") # This function exit with 0 if new version and current version are the same compare_dependency_version "acorn" "$NEW_VERSION" "$CURRENT_VERSION" diff --git a/tools/dep_updaters/update-ada.sh b/tools/dep_updaters/update-ada.sh index a6fa2464728b97..9f4f779b6ae02b 100755 --- a/tools/dep_updaters/update-ada.sh +++ b/tools/dep_updaters/update-ada.sh @@ -54,8 +54,8 @@ rm "$ADA_ZIP" curl -sL -o "$ADA_LICENSE" "https://raw.githubusercontent.com/ada-url/ada/HEAD/LICENSE-MIT" -echo "Replacing existing ada (except GYP build files)" -mv "$DEPS_DIR/ada/"*.gyp "$DEPS_DIR/ada/README.md" "$WORKSPACE/" +echo "Replacing existing ada (except GYP and GN build files)" +mv "$DEPS_DIR/ada/"*.gyp "$DEPS_DIR/ada/"*.gn "$DEPS_DIR/ada/"*.gni "$DEPS_DIR/ada/README.md" "$WORKSPACE/" rm -rf "$DEPS_DIR/ada" mv "$WORKSPACE" "$DEPS_DIR/ada" diff --git a/tools/dep_updaters/update-brotli.sh b/tools/dep_updaters/update-brotli.sh index c7e8979d178526..90b65ed31a284b 100755 --- a/tools/dep_updaters/update-brotli.sh +++ b/tools/dep_updaters/update-brotli.sh @@ -60,12 +60,15 @@ mv "brotli-$NEW_VERSION" "brotli" echo "Copying existing gyp file" cp "$DEPS_DIR/brotli/brotli.gyp" "$WORKSPACE/brotli" +echo "Copying existing GN files" +cp "$DEPS_DIR/brotli/"*.gn "$DEPS_DIR/brotli/"*.gni "$WORKSPACE/brotli" + echo "Deleting existing brotli" rm -rf "$DEPS_DIR/brotli" mkdir "$DEPS_DIR/brotli" echo "Update c and LICENSE" -mv "$WORKSPACE/brotli/c" "$WORKSPACE/brotli/LICENSE" "$WORKSPACE/brotli/brotli.gyp" "$DEPS_DIR/brotli" +mv "$WORKSPACE/brotli/"*.gn "$WORKSPACE/brotli/"*.gni "$WORKSPACE/brotli/c" "$WORKSPACE/brotli/LICENSE" "$WORKSPACE/brotli/brotli.gyp" "$DEPS_DIR/brotli" # Update the version number on maintaining-dependencies.md # and print the new version as the last line of the script as we need diff --git a/tools/dep_updaters/update-c-ares.sh b/tools/dep_updaters/update-c-ares.sh index 4a679105405c2d..5081a74545dbf2 100755 --- a/tools/dep_updaters/update-c-ares.sh +++ b/tools/dep_updaters/update-c-ares.sh @@ -56,10 +56,11 @@ mv "c-ares-$NEW_VERSION" cares echo "Removing tests" rm -rf "$WORKSPACE/cares/test" -echo "Copying existing .gitignore, config and gyp files" +echo "Copying existing .gitignore, config, gyp and gn files" cp -R "$DEPS_DIR/cares/config" "$WORKSPACE/cares" cp "$DEPS_DIR/cares/.gitignore" "$WORKSPACE/cares" cp "$DEPS_DIR/cares/cares.gyp" "$WORKSPACE/cares" +cp "$DEPS_DIR/cares/"*.gn "$DEPS_DIR/cares/"*.gni "$WORKSPACE/cares" echo "Replacing existing c-ares" rm -rf "$DEPS_DIR/cares" diff --git a/tools/dep_updaters/update-libuv.sh b/tools/dep_updaters/update-libuv.sh index 83c285ecaa2000..c2524ddbf0dd66 100755 --- a/tools/dep_updaters/update-libuv.sh +++ b/tools/dep_updaters/update-libuv.sh @@ -59,8 +59,8 @@ gzip -dc "$LIBUV_TARBALL" | tar xf - rm "$LIBUV_TARBALL" mv libuv-libuv-* uv -echo "Replacing existing libuv (except GYP build files)" -mv "$DEPS_DIR/uv/"*.gyp "$DEPS_DIR/uv/"*.gypi "$WORKSPACE/uv/" +echo "Replacing existing libuv (except GYP and GN build files)" +mv "$DEPS_DIR/uv/"*.gyp "$DEPS_DIR/uv/"*.gypi "$DEPS_DIR/uv/"*.gn "$DEPS_DIR/uv/"*.gni "$WORKSPACE/uv/" rm -rf "$DEPS_DIR/uv" mv "$WORKSPACE/uv" "$DEPS_DIR/" diff --git a/tools/dep_updaters/update-llhttp.sh b/tools/dep_updaters/update-llhttp.sh index c9462748775287..739819e1a45b69 100755 --- a/tools/dep_updaters/update-llhttp.sh +++ b/tools/dep_updaters/update-llhttp.sh @@ -45,6 +45,9 @@ trap cleanup INT TERM EXIT cd "$WORKSPACE" +echo "Replacing existing llhttp (except GYP and GN build files)" +mv "$DEPS_DIR/llhttp/"*.gn "$DEPS_DIR/llhttp/"*.gni "$WORKSPACE/" + if echo "$NEW_VERSION" | grep -qs "/" ; then # Download a release REPO="git@github.com:$NEW_VERSION.git" BRANCH=$2 @@ -74,6 +77,8 @@ else cp -a "llhttp-release-v$NEW_VERSION" "$DEPS_DIR/llhttp" fi +mv "$WORKSPACE/"*.gn "$WORKSPACE/"*.gni "$DEPS_DIR/llhttp" + # Update the version number on maintaining-dependencies.md # and print the new version as the last line of the script as we need # to add it to $GITHUB_ENV variable diff --git a/tools/dep_updaters/update-minimatch.sh b/tools/dep_updaters/update-minimatch.sh index 3ee91d374d5521..2e6fdd0c11890b 100755 --- a/tools/dep_updaters/update-minimatch.sh +++ b/tools/dep_updaters/update-minimatch.sh @@ -7,43 +7,68 @@ set -ex -ROOT=$(cd "$(dirname "$0")/../.." && pwd) -[ -z "$NODE" ] && NODE="$ROOT/out/Release/node" +BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd) +[ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" [ -x "$NODE" ] || NODE=$(command -v node) -NPM="$ROOT/deps/npm/bin/npm-cli.js" +DEPS_DIR="$BASE_DIR/deps" +NPM="$DEPS_DIR/npm/bin/npm-cli.js" # shellcheck disable=SC1091 -. "$ROOT/tools/dep_updaters/utils.sh" +. "$BASE_DIR/tools/dep_updaters/utils.sh" NEW_VERSION=$("$NODE" "$NPM" view minimatch dist-tags.latest) -CURRENT_VERSION=$("$NODE" -p "require('./deps/minimatch/src/package.json').version") +CURRENT_VERSION=$("$NODE" -p "require('./deps/minimatch/package.json').version") # This function exit with 0 if new version and current version are the same compare_dependency_version "minimatch" "$NEW_VERSION" "$CURRENT_VERSION" cd "$( dirname "$0" )/../.." || exit -rm -rf deps/minimatch/src -rm -rf deps/minimatch/index.js +echo "Making temporary workspace..." -( - rm -rf minimatch-tmp - mkdir minimatch-tmp - cd minimatch-tmp || exit +WORKSPACE=$(mktemp -d 2> /dev/null || mktemp -d -t 'tmp') - "$NODE" "$NPM" init --yes +cleanup () { + EXIT_CODE=$? + [ -d "$WORKSPACE" ] && rm -rf "$WORKSPACE" + exit $EXIT_CODE +} - "$NODE" "$NPM" install --global-style --no-bin-links --ignore-scripts "minimatch@$NEW_VERSION" - cd node_modules/minimatch - "$NODE" "$NPM" exec --package=esbuild@0.17.15 --yes -- esbuild ./dist/cjs/index.js --bundle --platform=node --outfile=minimatch.js -) +trap cleanup INT TERM EXIT -ls -l minimatch-tmp -mv minimatch-tmp/node_modules/minimatch deps/minimatch/src -mv deps/minimatch/src/minimatch.js deps/minimatch/index.js -cp deps/minimatch/src/LICENSE deps/minimatch/LICENSE +cd "$WORKSPACE" -rm -rf minimatch-tmp/ +echo "Fetching minimatch source archive..." + +"$NODE" "$NPM" pack "minimatch@$NEW_VERSION" + +MINIMATCH_TGZ="minimatch-$NEW_VERSION.tgz" + +log_and_verify_sha256sum "minimatch" "$MINIMATCH_TGZ" + +rm -r "$DEPS_DIR/minimatch"/* + +tar -xf "$MINIMATCH_TGZ" + +cd package + +"$NODE" "$NPM" install esbuild --save-dev + +"$NODE" "$NPM" pkg set scripts.node-build="esbuild ./dist/cjs/index.js --bundle --platform=node --outfile=index.js" + +"$NODE" "$NPM" run node-build + +rm -rf node_modules + +mv ./* "$DEPS_DIR/minimatch" + +echo "All done!" +echo "" +echo "Please git add minimatch, commit the new version:" +echo "" +echo "$ git add -A deps/minimatch" +echo "$ git commit -m \"deps: update minimatch to $NEW_VERSION\"" +echo "" # Update the version number on maintaining-dependencies.md # and print the new version as the last line of the script as we need diff --git a/tools/dep_updaters/update-nghttp2.sh b/tools/dep_updaters/update-nghttp2.sh index 4c375c979691f6..ccb36caae13d4d 100755 --- a/tools/dep_updaters/update-nghttp2.sh +++ b/tools/dep_updaters/update-nghttp2.sh @@ -73,6 +73,9 @@ cp "$DEPS_DIR/nghttp2/lib/includes/config.h" "$WORKSPACE/nghttp2/lib/includes" echo "Copying existing gyp files" cp "$DEPS_DIR/nghttp2/nghttp2.gyp" "$WORKSPACE/nghttp2" +echo "Copying existing GN files" +cp "$DEPS_DIR/nghttp2/"*.gn "$DEPS_DIR/nghttp2/"*.gni "$WORKSPACE/nghttp2" + echo "Replacing existing nghttp2" rm -rf "$DEPS_DIR/nghttp2" mv "$WORKSPACE/nghttp2" "$DEPS_DIR/" diff --git a/tools/dep_updaters/update-postject.sh b/tools/dep_updaters/update-postject.sh index 55c0de21a7f1b1..671bcd5a3a9ef6 100755 --- a/tools/dep_updaters/update-postject.sh +++ b/tools/dep_updaters/update-postject.sh @@ -7,13 +7,14 @@ set -ex -ROOT=$(cd "$(dirname "$0")/../.." && pwd) -[ -z "$NODE" ] && NODE="$ROOT/out/Release/node" +BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd) +DEPS_DIR="$BASE_DIR/deps" +[ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" [ -x "$NODE" ] || NODE=$(command -v node) -NPM="$ROOT/deps/npm/bin/npm-cli.js" +NPM="$BASE_DIR/deps/npm/bin/npm-cli.js" # shellcheck disable=SC1091 -. "$ROOT/tools/dep_updaters/utils.sh" +. "$BASE_DIR/tools/dep_updaters/utils.sh" NEW_VERSION=$("$NODE" "$NPM" view postject dist-tags.latest) CURRENT_VERSION=$("$NODE" -p "require('./test/fixtures/postject-copy/node_modules/postject/package.json').version") @@ -21,21 +22,34 @@ CURRENT_VERSION=$("$NODE" -p "require('./test/fixtures/postject-copy/node_module # This function exit with 0 if new version and current version are the same compare_dependency_version "postject" "$NEW_VERSION" "$CURRENT_VERSION" -cd "$( dirname "$0" )/../.." || exit -rm -rf test/fixtures/postject-copy -mkdir test/fixtures/postject-copy -cd test/fixtures/postject-copy || exit +echo "Making temporary workspace..." + +WORKSPACE=$(mktemp -d 2> /dev/null || mktemp -d -t 'tmp') + +cleanup () { + EXIT_CODE=$? + [ -d "$WORKSPACE" ] && rm -rf "$WORKSPACE" + exit $EXIT_CODE +} + +trap cleanup INT TERM EXIT + +cd "$WORKSPACE" + +echo "Installing postject npm package..." "$NODE" "$NPM" init --yes "$NODE" "$NPM" install --no-bin-links --ignore-scripts "postject@$NEW_VERSION" -# TODO(RaisinTen): Replace following with $WORKSPACE -cd ../../.. -rm -rf deps/postject -mkdir deps/postject -cp test/fixtures/postject-copy/node_modules/postject/LICENSE deps/postject -cp test/fixtures/postject-copy/node_modules/postject/dist/postject-api.h deps/postject +echo "Replacing existing postject (except GN build files)" + +mv "$DEPS_DIR/postject/"*.gn "$DEPS_DIR/postject/"*.gni "$WORKSPACE/" +rm -rf "$DEPS_DIR/postject" +mkdir "$DEPS_DIR/postject" +mv "$WORKSPACE/"*.gn "$WORKSPACE/"*.gni "$DEPS_DIR/postject" +mv "$WORKSPACE/node_modules/postject/LICENSE" "$DEPS_DIR/postject" +mv "$WORKSPACE/node_modules/postject/dist/postject-api.h" "$DEPS_DIR/postject" # Update the version number on maintaining-dependencies.md # and print the new version as the last line of the script as we need diff --git a/tools/dep_updaters/update-simdjson.sh b/tools/dep_updaters/update-simdjson.sh new file mode 100755 index 00000000000000..3aa0e06eff0fcf --- /dev/null +++ b/tools/dep_updaters/update-simdjson.sh @@ -0,0 +1,55 @@ +#!/bin/sh +set -e +# Shell script to update simdjson in the source tree to a specific version + +BASE_DIR=$(cd "$(dirname "$0")/../.." && pwd) +DEPS_DIR="$BASE_DIR/deps" +[ -z "$NODE" ] && NODE="$BASE_DIR/out/Release/node" +[ -x "$NODE" ] || NODE=$(command -v node) + +# shellcheck disable=SC1091 +. "$BASE_DIR/tools/dep_updaters/utils.sh" + +NEW_VERSION="$("$NODE" --input-type=module <<'EOF' +const res = await fetch('https://api.github.com/repos/simdjson/simdjson/releases/latest'); +if (!res.ok) throw new Error(`FetchError: ${res.status} ${res.statusText}`, { cause: res }); +const { tag_name } = await res.json(); +console.log(tag_name.replace('v', '')); +EOF +)" +CURRENT_VERSION=$(grep "#define SIMDJSON_VERSION" "$DEPS_DIR/simdjson/simdjson.h" | sed -n "s/^.*VERSION \"\(.*\)\"/\1/p") + +if [ "$NEW_VERSION" = "$CURRENT_VERSION" ]; then + echo "Skipped because simdjson is on the latest version." + exit 0 +fi + +echo "Making temporary workspace..." + +WORKSPACE=$(mktemp -d 2> /dev/null || mktemp -d -t 'tmp') + +cleanup () { + EXIT_CODE=$? + [ -d "$WORKSPACE" ] && rm -rf "$WORKSPACE" + exit $EXIT_CODE +} + +trap cleanup INT TERM EXIT + +SIMDJSON_REF="v$NEW_VERSION" +SIMDJSON_ZIP="simdjson-$NEW_VERSION.zip" + +cd "$WORKSPACE" + +echo "Fetching simdjson source archive..." +curl -sL -o "$SIMDJSON_ZIP" "https://github.com/simdjson/simdjson/archive/refs/tags/$SIMDJSON_REF.zip" +unzip "$SIMDJSON_ZIP" +cd "simdjson-$NEW_VERSION" +mv "singleheader/simdjson.h" "$DEPS_DIR/simdjson" +mv "singleheader/simdjson.cpp" "$DEPS_DIR/simdjson" +mv "LICENSE" "$DEPS_DIR/simdjson" + +# Update the version number on maintaining-dependencies.md +# and print the new version as the last line of the script as we need +# to add it to $GITHUB_ENV variable +finalize_version_update "simdjson" "$NEW_VERSION" diff --git a/tools/dep_updaters/update-simdutf.sh b/tools/dep_updaters/update-simdutf.sh index ce22798006e546..bb4ea276548ed1 100755 --- a/tools/dep_updaters/update-simdutf.sh +++ b/tools/dep_updaters/update-simdutf.sh @@ -54,8 +54,8 @@ rm ./*_demo.cpp curl -sL -o "$SIMDUTF_LICENSE" "https://raw.githubusercontent.com/simdutf/simdutf/HEAD/LICENSE-MIT" -echo "Replacing existing simdutf (except GYP build files)" -mv "$DEPS_DIR/simdutf/"*.gyp "$DEPS_DIR/simdutf/README.md" "$WORKSPACE/" +echo "Replacing existing simdutf (except GYP and GN build files)" +mv "$DEPS_DIR/simdutf/"*.gyp "$DEPS_DIR/simdutf/"*.gn "$DEPS_DIR/simdutf/"*.gni "$DEPS_DIR/simdutf/README.md" "$WORKSPACE/" rm -rf "$DEPS_DIR/simdutf" mv "$WORKSPACE" "$DEPS_DIR/simdutf" diff --git a/tools/dep_updaters/update-uvwasi.sh b/tools/dep_updaters/update-uvwasi.sh index c36a7377bf44bc..8b4070cb336565 100755 --- a/tools/dep_updaters/update-uvwasi.sh +++ b/tools/dep_updaters/update-uvwasi.sh @@ -54,13 +54,17 @@ log_and_verify_sha256sum "uvwasi" "$UVWASI_ZIP.zip" echo "Moving existing GYP build file" mv "$DEPS_DIR/uvwasi/"*.gyp "$WORKSPACE/" + +echo "Moving existing GN build file" +mv "$DEPS_DIR/uvwasi/"*.gn "$DEPS_DIR/uvwasi/"*.gni "$WORKSPACE/" + rm -rf "$DEPS_DIR/uvwasi/" echo "Unzipping..." unzip "$UVWASI_ZIP.zip" -d "$DEPS_DIR/uvwasi/" rm "$UVWASI_ZIP.zip" -mv "$WORKSPACE/"*.gyp "$DEPS_DIR/uvwasi/" +mv "$WORKSPACE/"*.gyp "$WORKSPACE/"*.gn "$WORKSPACE/"*.gni "$DEPS_DIR/uvwasi/" cd "$DEPS_DIR/uvwasi/" echo "Copying new files to deps folder" diff --git a/tools/doc/package-lock.json b/tools/doc/package-lock.json index 59e4608d3e1c1c..a7c2088abd3ad5 100644 --- a/tools/doc/package-lock.json +++ b/tools/doc/package-lock.json @@ -11,7 +11,7 @@ "node-doc-generator": "generate.js" }, "devDependencies": { - "highlight.js": "^11.8.0", + "highlight.js": "^11.9.0", "js-yaml": "^4.1.0", "rehype-raw": "^7.0.0", "rehype-stringify": "^10.0.0", @@ -21,8 +21,8 @@ "remark-parse": "^10.0.2", "remark-rehype": "^10.1.0", "to-vfile": "^8.0.0", - "unified": "^11.0.2", - "unist-util-select": "^5.0.0", + "unified": "^11.0.4", + "unist-util-select": "^5.1.0", "unist-util-visit": "^5.0.0" }, "engines": { @@ -30,36 +30,36 @@ } }, "node_modules/@types/debug": { - "version": "4.1.8", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.8.tgz", - "integrity": "sha512-/vPO1EPOs306Cvhwv7KfVfYvOJqA/S/AXjaHQiJboCZzcNDb+TIJFN9/2C9DZ//ijSKWioNyUxD792QmDJ+HKQ==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", "dev": true, "dependencies": { "@types/ms": "*" } }, "node_modules/@types/hast": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.0.tgz", - "integrity": "sha512-SoytUJRuf68HXYqcXicQIhCrLQjqeYU2anikr4G3p3Iz+OZO5QDQpDj++gv+RenHsnUBwNZ2dumBArF8VLSk2Q==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-3.0.3.tgz", + "integrity": "sha512-2fYGlaDy/qyLlhidX42wAH0KBi2TCjKMH8CHmBXgRlJ3Y+OXTiqsPQ6IWarZKwF1JoUcAJdPogv1d4b0COTpmQ==", "dev": true, "dependencies": { "@types/unist": "*" } }, "node_modules/@types/mdast": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.0.tgz", - "integrity": "sha512-YLeG8CujC9adtj/kuDzq1N4tCDYKoZ5l/bnjq8d74+t/3q/tHquJOJKUQXJrLCflOHpKjXgcI/a929gpmLOEng==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.3.tgz", + "integrity": "sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==", "dev": true, "dependencies": { "@types/unist": "*" } }, "node_modules/@types/ms": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", - "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==", "dev": true }, "node_modules/@types/parse5": { @@ -69,9 +69,9 @@ "dev": true }, "node_modules/@types/unist": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.0.tgz", - "integrity": "sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==", "dev": true }, "node_modules/@ungap/structured-clone": { @@ -153,9 +153,9 @@ } }, "node_modules/css-selector-parser": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-2.3.2.tgz", - "integrity": "sha512-JjnG6/pdLJh3iqipq7kteNVtbIczsU2A1cNxb+VAiniSuNmrB/NI3us4rSCfArvlwRXYly+jZhUUfEoInSH9Qg==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/css-selector-parser/-/css-selector-parser-3.0.3.tgz", + "integrity": "sha512-HAcgYSBFKo1jnglINdHeBPIscPOCOh8vCDCaOV5xkwMSlGPEnfdynxBuWkgZMwXltMKgFbDcr4EPmDpSWi34MA==", "dev": true, "funding": [ { @@ -353,18 +353,18 @@ } }, "node_modules/hast-util-sanitize/node_modules/@types/hast": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.5.tgz", - "integrity": "sha512-SvQi0L/lNpThgPoleH53cdjB3y9zpLlVjRbqB3rH8hx1jiRSBGAhyjV3H+URFjNVRqt2EdYNrbZE5IsGlNfpRg==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.8.tgz", + "integrity": "sha512-aMIqAlFd2wTIDZuvLbhUT+TGvMxrNC8ECUIVtH6xxy0sQLs3iu6NO8Kp/VT5je7i5ufnebXzdV1dNDMnvaH6IQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/hast-util-sanitize/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/hast-util-to-html": { @@ -441,9 +441,9 @@ } }, "node_modules/highlight.js": { - "version": "11.8.0", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.8.0.tgz", - "integrity": "sha512-MedQhoqVdr0U6SSnWPzfiadUcDHfN/Wzq25AkXiQv9oiOO/sG0S7XkvpFIqWBl9Yq1UYyYOOVORs5UW2XlPyzg==", + "version": "11.9.0", + "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.9.0.tgz", + "integrity": "sha512-fJ7cW7fQGCYAkgv4CPfwFHrfd/cLS4Hau96JuJ+ZTOWhjnhoeN1ub1tFmALm/+lW5z4WCAuAV9bm05AP0mS6Gw==", "dev": true, "engines": { "node": ">=12.0.0" @@ -551,20 +551,33 @@ } }, "node_modules/mdast-util-definitions/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-definitions/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, + "node_modules/mdast-util-definitions/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-definitions/node_modules/unist-util-visit": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", @@ -580,6 +593,20 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-definitions/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-find-and-replace": { "version": "2.2.2", "resolved": "https://registry.npmjs.org/mdast-util-find-and-replace/-/mdast-util-find-and-replace-2.2.2.tgz", @@ -597,20 +624,47 @@ } }, "node_modules/mdast-util-find-and-replace/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-find-and-replace/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, + "node_modules/mdast-util-find-and-replace/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/mdast-util-find-and-replace/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-from-markdown": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-1.3.1.tgz", @@ -636,18 +690,18 @@ } }, "node_modules/mdast-util-from-markdown/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-from-markdown/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/mdast-util-from-markdown/node_modules/micromark-util-symbol": { @@ -682,6 +736,19 @@ } ] }, + "node_modules/mdast-util-from-markdown/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-frontmatter": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/mdast-util-frontmatter/-/mdast-util-frontmatter-1.0.1.tgz", @@ -698,18 +765,18 @@ } }, "node_modules/mdast-util-frontmatter/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-frontmatter/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/mdast-util-gfm": { @@ -748,18 +815,18 @@ } }, "node_modules/mdast-util-gfm-autolink-literal/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-gfm-autolink-literal/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/mdast-util-gfm-autolink-literal/node_modules/micromark-util-character": { @@ -830,18 +897,18 @@ } }, "node_modules/mdast-util-gfm-footnote/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-gfm-footnote/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/mdast-util-gfm-strikethrough": { @@ -859,18 +926,18 @@ } }, "node_modules/mdast-util-gfm-strikethrough/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-gfm-strikethrough/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/mdast-util-gfm-table": { @@ -890,18 +957,18 @@ } }, "node_modules/mdast-util-gfm-table/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-gfm-table/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/mdast-util-gfm-task-list-item": { @@ -919,18 +986,18 @@ } }, "node_modules/mdast-util-gfm-task-list-item/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-gfm-task-list-item/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/mdast-util-phrasing": { @@ -948,20 +1015,33 @@ } }, "node_modules/mdast-util-phrasing/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-phrasing/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, + "node_modules/mdast-util-phrasing/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-to-hast": { "version": "13.0.2", "resolved": "https://registry.npmjs.org/mdast-util-to-hast/-/mdast-util-to-hast-13.0.2.tgz", @@ -1003,20 +1083,33 @@ } }, "node_modules/mdast-util-to-markdown/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-to-markdown/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, + "node_modules/mdast-util-to-markdown/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-to-markdown/node_modules/unist-util-visit": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", @@ -1032,6 +1125,20 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/mdast-util-to-markdown/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/mdast-util-to-string": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/mdast-util-to-string/-/mdast-util-to-string-3.2.0.tgz", @@ -1046,18 +1153,18 @@ } }, "node_modules/mdast-util-to-string/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-to-string/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/micromark": { @@ -2694,9 +2801,9 @@ } }, "node_modules/property-information": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.3.0.tgz", - "integrity": "sha512-gVNZ74nqhRMiIUYWGQdosYetaKc83x8oT41a0LlV3AAFCAZwCpg4vmGkq8t34+cUhp3cnM4XDiU/7xlgK7HGrg==", + "version": "6.4.0", + "resolved": "https://registry.npmjs.org/property-information/-/property-information-6.4.0.tgz", + "integrity": "sha512-9t5qARVofg2xQqKtytzt+lZ4d1Qvj8t5B8fEwXK6qOfgRLgH/b13QlgEyDh033NOS31nXeFbYv7CLUDG1CeifQ==", "dev": true, "funding": { "type": "github", @@ -2750,18 +2857,18 @@ } }, "node_modules/remark-frontmatter/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-frontmatter/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/remark-frontmatter/node_modules/unified": { @@ -2783,6 +2890,19 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-frontmatter/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-frontmatter/node_modules/vfile": { "version": "5.3.7", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", @@ -2830,18 +2950,18 @@ } }, "node_modules/remark-gfm/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-gfm/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/remark-gfm/node_modules/unified": { @@ -2863,6 +2983,19 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-gfm/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-gfm/node_modules/vfile": { "version": "5.3.7", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", @@ -2911,27 +3044,27 @@ } }, "node_modules/remark-html/node_modules/@types/hast": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.5.tgz", - "integrity": "sha512-SvQi0L/lNpThgPoleH53cdjB3y9zpLlVjRbqB3rH8hx1jiRSBGAhyjV3H+URFjNVRqt2EdYNrbZE5IsGlNfpRg==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.8.tgz", + "integrity": "sha512-aMIqAlFd2wTIDZuvLbhUT+TGvMxrNC8ECUIVtH6xxy0sQLs3iu6NO8Kp/VT5je7i5ufnebXzdV1dNDMnvaH6IQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-html/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-html/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/remark-html/node_modules/hast-util-from-parse5": { @@ -3201,6 +3334,19 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-html/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-html/node_modules/unist-util-position": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", @@ -3214,6 +3360,19 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-html/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-html/node_modules/unist-util-visit": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", @@ -3229,6 +3388,20 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-html/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-html/node_modules/vfile": { "version": "5.3.7", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", @@ -3289,18 +3462,18 @@ } }, "node_modules/remark-parse/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-parse/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/remark-parse/node_modules/unified": { @@ -3322,6 +3495,19 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-parse/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-parse/node_modules/vfile": { "version": "5.3.7", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", @@ -3369,27 +3555,27 @@ } }, "node_modules/remark-rehype/node_modules/@types/hast": { - "version": "2.3.5", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.5.tgz", - "integrity": "sha512-SvQi0L/lNpThgPoleH53cdjB3y9zpLlVjRbqB3rH8hx1jiRSBGAhyjV3H+URFjNVRqt2EdYNrbZE5IsGlNfpRg==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.8.tgz", + "integrity": "sha512-aMIqAlFd2wTIDZuvLbhUT+TGvMxrNC8ECUIVtH6xxy0sQLs3iu6NO8Kp/VT5je7i5ufnebXzdV1dNDMnvaH6IQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-rehype/node_modules/@types/mdast": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.12.tgz", - "integrity": "sha512-DT+iNIRNX884cx0/Q1ja7NyUPpZuv0KPyL5rGNxm1WC1OtHstl7n4Jb7nk+xacNShQMbczJjt8uFzznpp6kYBg==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dev": true, "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-rehype/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==", "dev": true }, "node_modules/remark-rehype/node_modules/mdast-util-to-hast": { @@ -3520,6 +3706,19 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-rehype/node_modules/unist-util-is": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", + "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-rehype/node_modules/unist-util-position": { "version": "4.0.4", "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-4.0.4.tgz", @@ -3533,6 +3732,19 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-rehype/node_modules/unist-util-stringify-position": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", + "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-rehype/node_modules/unist-util-visit": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-4.1.2.tgz", @@ -3548,6 +3760,20 @@ "url": "https://opencollective.com/unified" } }, + "node_modules/remark-rehype/node_modules/unist-util-visit-parents": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", + "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", + "dev": true, + "dependencies": { + "@types/unist": "^2.0.0", + "unist-util-is": "^5.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/remark-rehype/node_modules/vfile": { "version": "5.3.7", "resolved": "https://registry.npmjs.org/vfile/-/vfile-5.3.7.tgz", @@ -3648,15 +3874,15 @@ } }, "node_modules/unified": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.2.tgz", - "integrity": "sha512-Zta++onvS/dJ6xUvXQOR5q8XJZOkiMCE5wQ8Yv9mLR25pxRS567EX0GO6HZRxxNV/lznwfsvRZ/1pqe9K9QLeQ==", + "version": "11.0.4", + "resolved": "https://registry.npmjs.org/unified/-/unified-11.0.4.tgz", + "integrity": "sha512-apMPnyLjAX+ty4OrNap7yumyVAMlKx5IWU2wlzzUdYJO9A8f1p9m/gywF/GM2ZDFcjQPrx59Mc90KwmxsoklxQ==", "dev": true, "dependencies": { "@types/unist": "^3.0.0", - "@ungap/structured-clone": "^1.0.0", "bail": "^2.0.0", "devlop": "^1.0.0", + "extend": "^3.0.0", "is-plain-obj": "^4.0.0", "trough": "^2.0.0", "vfile": "^6.0.0" @@ -3677,24 +3903,18 @@ } }, "node_modules/unist-util-is": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-5.2.1.tgz", - "integrity": "sha512-u9njyyfEh43npf1M+yGKDGVPbY/JWEemg5nH05ncKPfi+kBbKBJoTdsogMu33uhytuLlv9y0O7GH7fEdwLdLQw==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", + "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", "dev": true, "dependencies": { - "@types/unist": "^2.0.0" + "@types/unist": "^3.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, - "node_modules/unist-util-is/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", - "dev": true - }, "node_modules/unist-util-position": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/unist-util-position/-/unist-util-position-5.0.0.tgz", @@ -3709,13 +3929,13 @@ } }, "node_modules/unist-util-select": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-5.0.0.tgz", - "integrity": "sha512-xhX135nwV6kdOm3EuzO01aNYBgyAe6aC84j6Hj+RI5DIaV6W5B4BH9U92W3jvU3cw3D2NWx4hTcrusdcGKi8Uw==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/unist-util-select/-/unist-util-select-5.1.0.tgz", + "integrity": "sha512-4A5mfokSHG/rNQ4g7gSbdEs+H586xyd24sdJqF1IWamqrLHvYb+DH48fzxowyOhOfK7YSqX+XlCojAyuuyyT2A==", "dev": true, "dependencies": { "@types/unist": "^3.0.0", - "css-selector-parser": "^2.0.0", + "css-selector-parser": "^3.0.0", "devlop": "^1.1.0", "nth-check": "^2.0.0", "zwitch": "^2.0.0" @@ -3726,24 +3946,18 @@ } }, "node_modules/unist-util-stringify-position": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-3.0.3.tgz", - "integrity": "sha512-k5GzIBZ/QatR8N5X2y+drfpWG8IDBzdnVj6OInRNWm1oXrzydiaAT2OQiA8DPRRZyAKb9b6I2a6PxYklZD0gKg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", + "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", "dev": true, "dependencies": { - "@types/unist": "^2.0.0" + "@types/unist": "^3.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, - "node_modules/unist-util-stringify-position/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", - "dev": true - }, "node_modules/unist-util-visit": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", @@ -3760,39 +3974,6 @@ } }, "node_modules/unist-util-visit-parents": { - "version": "5.1.3", - "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-5.1.3.tgz", - "integrity": "sha512-x6+y8g7wWMyQhL1iZfhIPhDAs7Xwbn9nRosDXl7qoPTSCy0yNxnKc+hWokFifWQIDGi154rdUqKvbCa4+1kLhg==", - "dev": true, - "dependencies": { - "@types/unist": "^2.0.0", - "unist-util-is": "^5.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit-parents/node_modules/@types/unist": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.8.tgz", - "integrity": "sha512-d0XxK3YTObnWVp6rZuev3c49+j4Lo8g4L1ZRm9z5L0xpoZycUPshHgczK5gsUMaZOstjVYYi09p5gYvUtfChYw==", - "dev": true - }, - "node_modules/unist-util-visit/node_modules/unist-util-is": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", - "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", - "dev": true, - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/unist-util-visit/node_modules/unist-util-visit-parents": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", @@ -3867,32 +4048,6 @@ "url": "https://opencollective.com/unified" } }, - "node_modules/vfile-message/node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dev": true, - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, - "node_modules/vfile/node_modules/unist-util-stringify-position": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/unist-util-stringify-position/-/unist-util-stringify-position-4.0.0.tgz", - "integrity": "sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==", - "dev": true, - "dependencies": { - "@types/unist": "^3.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/unified" - } - }, "node_modules/web-namespaces": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/web-namespaces/-/web-namespaces-2.0.1.tgz", diff --git a/tools/doc/package.json b/tools/doc/package.json index 3d49c92208b7ac..d27ce6ca5102f9 100644 --- a/tools/doc/package.json +++ b/tools/doc/package.json @@ -7,7 +7,7 @@ "node": ">=14.8.0" }, "devDependencies": { - "highlight.js": "^11.8.0", + "highlight.js": "^11.9.0", "js-yaml": "^4.1.0", "rehype-raw": "^7.0.0", "rehype-stringify": "^10.0.0", @@ -17,8 +17,8 @@ "remark-parse": "^10.0.2", "remark-rehype": "^10.1.0", "to-vfile": "^8.0.0", - "unified": "^11.0.2", - "unist-util-select": "^5.0.0", + "unified": "^11.0.4", + "unist-util-select": "^5.1.0", "unist-util-visit": "^5.0.0" }, "bin": { diff --git a/tools/generate_config_gypi.py b/tools/generate_config_gypi.py new file mode 100755 index 00000000000000..948a740529ec34 --- /dev/null +++ b/tools/generate_config_gypi.py @@ -0,0 +1,139 @@ +#!/usr/bin/env python3 +# Copyright (c) 2013-2019 GitHub Inc. +# Copyright 2019 the V8 project authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This script reads the configurations of GN and outputs a config.gypi file that +# will be used to populate process.config.variables. + +import argparse +import re +import os +import subprocess +import sys + +sys.path.append(os.path.dirname(__file__)) +import getnapibuildversion + +# The defines bellow must include all things from the external_v8_defines list +# in v8/BUILD.gn. +# TODO(zcbenz): Import from v8_features.json once this change gets into Node: +# https://chromium-review.googlesource.com/c/v8/v8/+/5040612 +V8_FEATURE_DEFINES = { + 'v8_enable_v8_checks': 'V8_ENABLE_CHECKS', + 'v8_enable_pointer_compression': 'V8_COMPRESS_POINTERS', + 'v8_enable_pointer_compression_shared_cage': 'V8_COMPRESS_POINTERS_IN_SHARED_CAGE', + 'v8_enable_31bit_smis_on_64bit_arch': 'V8_31BIT_SMIS_ON_64BIT_ARCH', + 'v8_enable_zone_compression': 'V8_COMPRESS_ZONES', + 'v8_enable_sandbox': 'V8_ENABLE_SANDBOX', + 'v8_deprecation_warnings': 'V8_DEPRECATION_WARNINGS', + 'v8_imminent_deprecation_warnings': 'V8_IMMINENT_DEPRECATION_WARNINGS', + 'v8_use_perfetto': 'V8_USE_PERFETTO', + 'v8_enable_map_packing': 'V8_MAP_PACKING', + 'tsan': 'V8_IS_TSAN', + 'v8_enable_conservative_stack_scanning': 'V8_ENABLE_CONSERVATIVE_STACK_SCANNING', + 'v8_enable_direct_local': 'V8_ENABLE_DIRECT_LOCAL', +} + +# Regex used for parsing results of "gn args". +GN_RE = re.compile(r'(\w+)\s+=\s+(.*?)$', re.MULTILINE) + +if sys.platform == 'win32': + GN = 'gn.exe' +else: + GN = 'gn' + +def bool_to_number(v): + return 1 if v else 0 + +def bool_string_to_number(v): + return bool_to_number(v == 'true') + +def get_gn_config(out_dir): + # Read args from GN configurations. + gn_args = subprocess.check_output( + [GN, 'args', '--list', '--short', '-C', out_dir]) + config = dict(re.findall(GN_RE, gn_args.decode())) + # Get napi_build_version from Node, which is not part of GN args. + config['napi_build_version'] = getnapibuildversion.get_napi_version() + return config + +def get_v8_config(out_dir, node_gn_path): + # For args that have default values in V8's GN configurations, we can not rely + # on the values printed by "gn args", because most of them would be empty + # strings, and the actual value would depend on the logics in v8/BUILD.gn. + # So we print out the defines and deduce the feature from them instead. + node_defines = subprocess.check_output( + [GN, 'desc', '-C', out_dir, node_gn_path + ":libnode", 'defines']).decode().split('\n') + v8_config = {} + for feature, define in V8_FEATURE_DEFINES.items(): + v8_config[feature] = bool_to_number(define in node_defines) + return v8_config + +def translate_config(out_dir, config, v8_config): + config_gypi = { + 'target_defaults': { + 'default_configuration': + 'Debug' if config['is_debug'] == 'true' else 'Release', + }, + 'variables': { + 'asan': bool_string_to_number(config['is_asan']), + 'enable_lto': config['use_thin_lto'], + 'is_debug': bool_string_to_number(config['is_debug']), + 'llvm_version': 13, + 'napi_build_version': config['napi_build_version'], + 'node_builtin_shareable_builtins': + eval(config['node_builtin_shareable_builtins']), + 'node_module_version': int(config['node_module_version']), + 'node_use_openssl': config['node_use_openssl'], + 'node_use_node_code_cache': config['node_use_node_code_cache'], + 'node_use_node_snapshot': config['node_use_node_snapshot'], + 'v8_enable_i18n_support': + bool_string_to_number(config['v8_enable_i18n_support']), + 'v8_enable_inspector': # this is actually a node misnomer + bool_string_to_number(config['node_enable_inspector']), + 'shlib_suffix': 'dylib' if sys.platform == 'darwin' else 'so', + 'tsan': bool_string_to_number(config['is_tsan']), + # TODO(zcbenz): Shared components are not supported in GN config yet. + 'node_shared': 'false', + 'node_shared_brotli': 'false', + 'node_shared_cares': 'false', + 'node_shared_http_parser': 'false', + 'node_shared_libuv': 'false', + 'node_shared_nghttp2': 'false', + 'node_shared_nghttp3': 'false', + 'node_shared_ngtcp2': 'false', + 'node_shared_openssl': 'false', + 'node_shared_zlib': 'false', + } + } + config_gypi['variables'].update(v8_config) + return config_gypi + +def main(): + parser = argparse.ArgumentParser( + description='Generate config.gypi file from GN configurations') + parser.add_argument('target', help='path to generated config.gypi file') + parser.add_argument('--out-dir', help='path to the output directory', + default='out/Release') + parser.add_argument('--node-gn-path', help='path of the node target in GN', + default='//node') + parser.add_argument('--dep-file', help='path to an optional dep file', + default=None) + args, unknown_args = parser.parse_known_args() + + config = get_gn_config(args.out_dir) + v8_config = get_v8_config(args.out_dir, args.node_gn_path) + + # Write output. + with open(args.target, 'w') as f: + f.write(repr(translate_config(args.out_dir, config, v8_config))) + + # Write depfile. Force regenerating config.gypi when GN configs change. + if args.dep_file: + with open(args.dep_file, 'w') as f: + f.write('%s: %s '%(args.target, 'build.ninja')) + +if __name__ == '__main__': + main() diff --git a/tools/gypi_to_gn.py b/tools/gypi_to_gn.py new file mode 100755 index 00000000000000..47182d8017bfc2 --- /dev/null +++ b/tools/gypi_to_gn.py @@ -0,0 +1,219 @@ +#!/usr/bin/env python3 +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +# Deleted from Chromium in https://crrev.com/097f64c631. + +"""Converts a given gypi file to a python scope and writes the result to stdout. +USING THIS SCRIPT IN CHROMIUM +Forking Python to run this script in the middle of GN is slow, especially on +Windows, and it makes both the GYP and GN files harder to follow. You can't +use "git grep" to find files in the GN build any more, and tracking everything +in GYP down requires a level of indirection. Any calls will have to be removed +and cleaned up once the GYP-to-GN transition is complete. +As a result, we only use this script when the list of files is large and +frequently-changing. In these cases, having one canonical list outweights the +downsides. +As of this writing, the GN build is basically complete. It's likely that all +large and frequently changing targets where this is appropriate use this +mechanism already. And since we hope to turn down the GYP build soon, the time +horizon is also relatively short. As a result, it is likely that no additional +uses of this script should every be added to the build. During this later part +of the transition period, we should be focusing more and more on the absolute +readability of the GN build. +HOW TO USE +It is assumed that the file contains a toplevel dictionary, and this script +will return that dictionary as a GN "scope" (see example below). This script +does not know anything about GYP and it will not expand variables or execute +conditions. +It will strip conditions blocks. +A variables block at the top level will be flattened so that the variables +appear in the root dictionary. This way they can be returned to the GN code. +Say your_file.gypi looked like this: + { + 'sources': [ 'a.cc', 'b.cc' ], + 'defines': [ 'ENABLE_DOOM_MELON' ], + } +You would call it like this: + gypi_values = exec_script("//build/gypi_to_gn.py", + [ rebase_path("your_file.gypi") ], + "scope", + [ "your_file.gypi" ]) +Notes: + - The rebase_path call converts the gypi file from being relative to the + current build file to being system absolute for calling the script, which + will have a different current directory than this file. + - The "scope" parameter tells GN to interpret the result as a series of GN + variable assignments. + - The last file argument to exec_script tells GN that the given file is a + dependency of the build so Ninja can automatically re-run GN if the file + changes. +Read the values into a target like this: + component("mycomponent") { + sources = gypi_values.sources + defines = gypi_values.defines + } +Sometimes your .gypi file will include paths relative to a different +directory than the current .gn file. In this case, you can rebase them to +be relative to the current directory. + sources = rebase_path(gypi_values.sources, ".", + "//path/gypi/input/values/are/relative/to") +This script will tolerate a 'variables' in the toplevel dictionary or not. If +the toplevel dictionary just contains one item called 'variables', it will be +collapsed away and the result will be the contents of that dictinoary. Some +.gypi files are written with or without this, depending on how they expect to +be embedded into a .gyp file. +This script also has the ability to replace certain substrings in the input. +Generally this is used to emulate GYP variable expansion. If you passed the +argument "--replace=<(foo)=bar" then all instances of "<(foo)" in strings in +the input will be replaced with "bar": + gypi_values = exec_script("//build/gypi_to_gn.py", + [ rebase_path("your_file.gypi"), + "--replace=<(foo)=bar"], + "scope", + [ "your_file.gypi" ]) +""" + +from __future__ import absolute_import +from __future__ import print_function +from optparse import OptionParser +import os +import sys + + +# Look for standalone GN distribution. +def FindGNPath(): + for i in os.environ['PATH'].split(os.pathsep): + if i.rstrip(os.sep).endswith('gn'): + return i + return None + + +try: + # May already be in the import path. + import gn_helpers +except ImportError: + # Add src/build to import path. + src_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), + os.pardir, os.pardir)) + sys.path.append(os.path.join(src_dir, 'build')) + if FindGNPath(): + sys.path.append(os.path.join(FindGNPath(), 'build')) + import gn_helpers + + +def LoadPythonDictionary(path): + file_string = open(path).read() + try: + file_data = eval(file_string, {'__builtins__': None}, None) + except SyntaxError as e: + e.filename = path + raise + except Exception as e: + raise Exception("Unexpected error while reading %s: %s" % (path, str(e))) + + assert isinstance(file_data, dict), "%s does not eval to a dictionary" % path + + # Flatten any variables to the top level. + if 'variables' in file_data: + file_data.update(file_data['variables']) + del file_data['variables'] + + # Strip all elements that this script can't process. + elements_to_strip = [ + 'conditions', + 'direct_dependent_settings', + 'target_conditions', + 'target_defaults', + 'targets', + 'includes', + 'actions', + ] + for element in elements_to_strip: + if element in file_data: + del file_data[element] + + return file_data + + +def ReplaceSubstrings(values, search_for, replace_with): + """Recursively replaces substrings in a value. + Replaces all substrings of the "search_for" with "repace_with" for all + strings occurring in "values". This is done by recursively iterating into + lists as well as the keys and values of dictionaries.""" + if isinstance(values, str): + return values.replace(search_for, replace_with) + + if isinstance(values, list): + result = [] + for v in values: + # Remove the item from list for complete match. + if v == search_for and replace_with == '': + continue + result.append(ReplaceSubstrings(v, search_for, replace_with)) + return result + + if isinstance(values, dict): + # For dictionaries, do the search for both the key and values. + result = {} + for key, value in values.items(): + new_key = ReplaceSubstrings(key, search_for, replace_with) + new_value = ReplaceSubstrings(value, search_for, replace_with) + result[new_key] = new_value + return result + + # Assume everything else is unchanged. + return values + + +def DeduplicateLists(values): + """Recursively remove duplicate values in lists.""" + if isinstance(values, list): + return sorted(list(set(values))) + + if isinstance(values, dict): + for key in values: + values[key] = DeduplicateLists(values[key]) + return values + + +def main(): + parser = OptionParser() + parser.add_option("-r", "--replace", action="append", + help="Replaces substrings. If passed a=b, replaces all substrs a with b.") + (options, args) = parser.parse_args() + + if len(args) != 1: + raise Exception("Need one argument which is the .gypi file to read.") + + data = LoadPythonDictionary(args[0]) + if options.replace: + # Do replacements for all specified patterns. + for replace in options.replace: + split = replace.split('=') + # Allow "foo=" to replace with nothing. + if len(split) == 1: + split.append('') + assert len(split) == 2, "Replacement must be of the form 'key=value'." + data = ReplaceSubstrings(data, split[0], split[1]) + + gn_dict = {} + for key in data: + gn_key = key.replace('-', '_') + # Sometimes .gypi files use the GYP syntax with percents at the end of the + # variable name (to indicate not to overwrite a previously-defined value): + # 'foo%': 'bar', + # Convert these to regular variables. + if len(key) > 1 and key[len(key) - 1] == '%': + gn_dict[gn_key[:-1]] = data[key] + else: + gn_dict[gn_key] = data[key] + + print(gn_helpers.ToGNString(DeduplicateLists(gn_dict))) + +if __name__ == '__main__': + try: + main() + except Exception as e: + print(str(e)) + sys.exit(1) diff --git a/tools/icu/current_ver.dep b/tools/icu/current_ver.dep index 4d94f1562f7255..e7a01203021fee 100644 --- a/tools/icu/current_ver.dep +++ b/tools/icu/current_ver.dep @@ -1,6 +1,6 @@ [ { - "url": "https://github.com/unicode-org/icu/releases/download/release-73-2/icu4c-73_2-src.tgz", - "md5": "b8a4b8cf77f2e2f6e1341eac0aab2fc4" + "url": "https://github.com/unicode-org/icu/releases/download/release-74-1/icu4c-74_1-src.tgz", + "md5": "71e60b22697c4f35820a1897417dbab4" } ] diff --git a/tools/license-builder.sh b/tools/license-builder.sh index 10b894262946ea..00babe6006ce00 100755 --- a/tools/license-builder.sh +++ b/tools/license-builder.sh @@ -79,6 +79,8 @@ licenseText="$(sed -e '/You should have received a copy of the CC0/,$d' -e 's/^\ addlicense "SipHash" "deps/v8/src/third_party/siphash" "$licenseText" licenseText="$(sed -e '/The data format used by the zlib library/,$d' -e 's/^\/\* *//' -e 's/^ *//' "${rootdir}/deps/zlib/zlib.h")" addlicense "zlib" "deps/zlib" "$licenseText" +licenseText="$(cat "${rootdir}/deps/simdjson/LICENSE")" +addlicense "simdjson" "deps/simdjson" "$licenseText" licenseText="$(cat "${rootdir}/deps/simdutf/LICENSE-MIT")" addlicense "simdutf" "deps/simdutf" "$licenseText" licenseText="$(curl -sL https://raw.githubusercontent.com/ada-url/ada/HEAD/LICENSE-MIT)" diff --git a/tools/lint-md/package-lock.json b/tools/lint-md/package-lock.json index 89b85c81f81a49..0a17b1a9bcf40d 100644 --- a/tools/lint-md/package-lock.json +++ b/tools/lint-md/package-lock.json @@ -18,7 +18,7 @@ "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-node-resolve": "^15.2.3", - "rollup": "^4.3.0", + "rollup": "^4.6.1", "rollup-plugin-cleanup": "^3.2.1" } }, @@ -79,9 +79,9 @@ } }, "node_modules/@rollup/pluginutils": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.0.5.tgz", - "integrity": "sha512-6aEYR910NyP73oHiJglti74iRyOwgFU4x3meH/H8OJx6Ry0j6cOVZ5X/wTvub7G7Ao6qaHBEaNsV3GLJkSsF+Q==", + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz", + "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==", "dev": true, "dependencies": { "@types/estree": "^1.0.0", @@ -101,9 +101,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.3.0.tgz", - "integrity": "sha512-/4pns6BYi8MXdwnXM44yoGAcFYVHL/BYlB2q1HXZ6AzH++LaiEVWFpBWQ/glXhbMbv3E3o09igrHFbP/snhAvA==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.6.1.tgz", + "integrity": "sha512-0WQ0ouLejaUCRsL93GD4uft3rOmB8qoQMU05Kb8CmMtMBe7XUDLAltxVZI1q6byNqEtU7N1ZX1Vw5lIpgulLQA==", "cpu": [ "arm" ], @@ -114,9 +114,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.3.0.tgz", - "integrity": "sha512-nLO/JsL9idr416vzi3lHm3Xm+QZh4qHij8k3Er13kZr5YhL7/+kBAx84kDmPc7HMexLmwisjDCeDIKNFp8mDlQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.6.1.tgz", + "integrity": "sha512-1TKm25Rn20vr5aTGGZqo6E4mzPicCUD79k17EgTLAsXc1zysyi4xXKACfUbwyANEPAEIxkzwue6JZ+stYzWUTA==", "cpu": [ "arm64" ], @@ -127,9 +127,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.3.0.tgz", - "integrity": "sha512-dGhVBlllt4iHwTGy21IEoMOTN5wZoid19zEIxsdY29xcEiOEHqzDa7Sqrkh5OE7LKCowL61eFJXxYe/+pYa7ZQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.6.1.tgz", + "integrity": "sha512-cEXJQY/ZqMACb+nxzDeX9IPLAg7S94xouJJCNVE5BJM8JUEP4HeTF+ti3cmxWeSJo+5D+o8Tc0UAWUkfENdeyw==", "cpu": [ "arm64" ], @@ -140,9 +140,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.3.0.tgz", - "integrity": "sha512-h8wRfHeLEbU3NzaP1Oku7BYXCJQiTRr+8U0lklyOQXxXiEpHLL8tk1hFl+tezoRKLcPJD7joKaK74ASsqt3Ekg==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.6.1.tgz", + "integrity": "sha512-LoSU9Xu56isrkV2jLldcKspJ7sSXmZWkAxg7sW/RfF7GS4F5/v4EiqKSMCFbZtDu2Nc1gxxFdQdKwkKS4rwxNg==", "cpu": [ "x64" ], @@ -153,9 +153,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.3.0.tgz", - "integrity": "sha512-wP4VgR/gfV18sylTuym3sxRTkAgUR2vh6YLeX/GEznk5jCYcYSlx585XlcUcl0c8UffIZlRJ09raWSX3JDb4GA==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.6.1.tgz", + "integrity": "sha512-EfI3hzYAy5vFNDqpXsNxXcgRDcFHUWSx5nnRSCKwXuQlI5J9dD84g2Usw81n3FLBNsGCegKGwwTVsSKK9cooSQ==", "cpu": [ "arm" ], @@ -166,9 +166,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.3.0.tgz", - "integrity": "sha512-v/14JCYVkqRSJeQbxFx4oUkwVQQw6lFMN7bd4vuARBc3X2lmomkxBsc+BFiIDL/BK+CTx5AOh/k9XmqDnKWRVg==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.6.1.tgz", + "integrity": "sha512-9lhc4UZstsegbNLhH0Zu6TqvDfmhGzuCWtcTFXY10VjLLUe4Mr0Ye2L3rrtHaDd/J5+tFMEuo5LTCSCMXWfUKw==", "cpu": [ "arm64" ], @@ -179,9 +179,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.3.0.tgz", - "integrity": "sha512-tNhfYqFH5OxtRzfkTOKdgFYlPSZnlDLNW4+leNEvQZhwTJxoTwsZAAhR97l3qVry/kkLyJPBK+Q8EAJLPinDIg==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.6.1.tgz", + "integrity": "sha512-FfoOK1yP5ksX3wwZ4Zk1NgyGHZyuRhf99j64I5oEmirV8EFT7+OhUZEnP+x17lcP/QHJNWGsoJwrz4PJ9fBEXw==", "cpu": [ "arm64" ], @@ -192,9 +192,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.3.0.tgz", - "integrity": "sha512-pw77m8QywdsoFdFOgmc8roF1inBI0rciqzO8ffRUgLoq7+ee9o5eFqtEcS6hHOOplgifAUUisP8cAnwl9nUYPw==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.6.1.tgz", + "integrity": "sha512-DNGZvZDO5YF7jN5fX8ZqmGLjZEXIJRdJEdTFMhiyXqyXubBa0WVLDWSNlQ5JR2PNgDbEV1VQowhVRUh+74D+RA==", "cpu": [ "x64" ], @@ -205,9 +205,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.3.0.tgz", - "integrity": "sha512-tJs7v2MnV2F8w6X1UpPHl/43OfxjUy9SuJ2ZPoxn79v9vYteChVYO/ueLHCpRMmyTUIVML3N9z4azl9ENH8Xxg==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.6.1.tgz", + "integrity": "sha512-RkJVNVRM+piYy87HrKmhbexCHg3A6Z6MU0W9GHnJwBQNBeyhCJG9KDce4SAMdicQnpURggSvtbGo9xAWOfSvIQ==", "cpu": [ "x64" ], @@ -218,9 +218,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.3.0.tgz", - "integrity": "sha512-OKGxp6kATQdTyI2DF+e9s+hB3/QZB45b6e+dzcfW1SUqiF6CviWyevhmT4USsMEdP3mlpC9zxLz3Oh+WaTMOSw==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.6.1.tgz", + "integrity": "sha512-v2FVT6xfnnmTe3W9bJXl6r5KwJglMK/iRlkKiIFfO6ysKs0rDgz7Cwwf3tjldxQUrHL9INT/1r4VA0n9L/F1vQ==", "cpu": [ "arm64" ], @@ -231,9 +231,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.3.0.tgz", - "integrity": "sha512-DDZ5AH68JJ2ClQFEA1aNnfA7Ybqyeh0644rGbrLOdNehTmzfICHiWSn0OprzYi9HAshTPQvlwrM+bi2kuaIOjQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.6.1.tgz", + "integrity": "sha512-YEeOjxRyEjqcWphH9dyLbzgkF8wZSKAKUkldRY6dgNR5oKs2LZazqGB41cWJ4Iqqcy9/zqYgmzBkRoVz3Q9MLw==", "cpu": [ "ia32" ], @@ -244,9 +244,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.3.0.tgz", - "integrity": "sha512-dMvGV8p92GQ8jhNlGIKpyhVZPzJlT258pPrM5q2F8lKcc9Iv9BbfdnhX1OfinYWnb9ms5zLw6MlaMnqLfUkKnQ==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.6.1.tgz", + "integrity": "sha512-0zfTlFAIhgz8V2G8STq8toAjsYYA6eci1hnXuyOTUFnymrtJwnS6uGKiv3v5UrPZkBlamLvrLV2iiaeqCKzb0A==", "cpu": [ "x64" ], @@ -257,51 +257,51 @@ ] }, "node_modules/@types/debug": { - "version": "4.1.10", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.10.tgz", - "integrity": "sha512-tOSCru6s732pofZ+sMv9o4o3Zc+Sa8l3bxd/tweTQudFn06vAzb13ZX46Zi6m6EJ+RUbRTHvgQJ1gBtSgkaUYA==", + "version": "4.1.12", + "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.12.tgz", + "integrity": "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==", "dependencies": { "@types/ms": "*" } }, "node_modules/@types/estree": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.4.tgz", - "integrity": "sha512-2JwWnHK9H+wUZNorf2Zr6ves96WHoWDJIftkcxPKsS7Djta6Zu519LarhRNljPXkpsZR2ZMwNCPeW7omW07BJw==" + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz", + "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==" }, "node_modules/@types/estree-jsx": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.2.tgz", - "integrity": "sha512-GNBWlGBMjiiiL5TSkvPtOteuXsiVitw5MYGY1UYlrAq0SKyczsls6sCD7TZ8fsjRsvCVxml7EbyjJezPb3DrSA==", + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/@types/estree-jsx/-/estree-jsx-1.0.3.tgz", + "integrity": "sha512-pvQ+TKeRHeiUGRhvYwRrQ/ISnohKkSJR14fT2yqyZ4e9K5vqc7hrtY2Y1Dw0ZwAzQ6DQsxsaCUuSIIi8v0Cq6w==", "dependencies": { "@types/estree": "*" } }, "node_modules/@types/hast": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.7.tgz", - "integrity": "sha512-EVLigw5zInURhzfXUM65eixfadfsHKomGKUakToXo84t8gGIJuTcD2xooM2See7GyQ7DRtYjhCHnSUQez8JaLw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/@types/hast/-/hast-2.3.8.tgz", + "integrity": "sha512-aMIqAlFd2wTIDZuvLbhUT+TGvMxrNC8ECUIVtH6xxy0sQLs3iu6NO8Kp/VT5je7i5ufnebXzdV1dNDMnvaH6IQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/@types/hast/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/@types/mdast": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.2.tgz", - "integrity": "sha512-tYR83EignvhYO9iU3kDg8V28M0jqyh9zzp5GV+EO+AYnyUl3P5ltkTeJuTiFZQFz670FSb3EwT/6LQdX+UdKfw==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-4.0.3.tgz", + "integrity": "sha512-LsjtqsyF+d2/yFOYaN22dHZI1Cpwkrj+g06G8+qtUKlhovPW89YhqSnfKtMbkgmEtYpH2gydRNULd6y8mciAFg==", "dependencies": { "@types/unist": "*" } }, "node_modules/@types/ms": { - "version": "0.7.33", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.33.tgz", - "integrity": "sha512-AuHIyzR5Hea7ij0P9q7vx7xu4z0C28ucwjAZC0ja7JhINyCnOw8/DnvAPQQ9TfOlCtZAmCERKQX9+o1mgQhuOQ==" + "version": "0.7.34", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.34.tgz", + "integrity": "sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==" }, "node_modules/@types/resolve": { "version": "1.20.2", @@ -310,14 +310,14 @@ "dev": true }, "node_modules/@types/supports-color": { - "version": "8.1.2", - "resolved": "https://registry.npmjs.org/@types/supports-color/-/supports-color-8.1.2.tgz", - "integrity": "sha512-nhs1D8NjNueBqRBhBTsc81g90g7VBD4wnMTMy9oP+QIldHuJkE655QTL2D1jkj3LyCd+Q5Y69oOpfxN1l0eCMA==" + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/@types/supports-color/-/supports-color-8.1.3.tgz", + "integrity": "sha512-Hy6UMpxhE3j1tLpl27exp1XqHD7n8chAiNPzWfz16LPZoMMoSc4dzLl6w9qijkEb/r5O1ozdu1CWGA2L83ZeZg==" }, "node_modules/@types/unist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.1.tgz", - "integrity": "sha512-ue/hDUpPjC85m+PM9OQDMZr3LywT+CT6mPsQq8OJtCLiERkGRcQUFvu9XASF5XWqyZFXbf15lvb3JFJ4dRLWPg==" + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", + "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" }, "node_modules/ansi-regex": { "version": "6.0.1", @@ -745,17 +745,17 @@ } }, "node_modules/mdast-comment-marker/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-comment-marker/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/mdast-util-find-and-replace": { "version": "3.0.1", @@ -903,17 +903,17 @@ } }, "node_modules/mdast-util-heading-style/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-heading-style/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/mdast-util-mdx-expression": { "version": "1.3.2", @@ -932,17 +932,17 @@ } }, "node_modules/mdast-util-mdx-expression/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/mdast-util-mdx-expression/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/mdast-util-mdx-expression/node_modules/mdast-util-from-markdown": { "version": "1.3.1", @@ -2181,17 +2181,17 @@ } }, "node_modules/remark-lint-blockquote-indentation/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-blockquote-indentation/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-blockquote-indentation/node_modules/unified": { "version": "10.1.2", @@ -2267,17 +2267,17 @@ } }, "node_modules/remark-lint-checkbox-character-style/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-checkbox-character-style/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-checkbox-character-style/node_modules/unified": { "version": "10.1.2", @@ -2354,17 +2354,17 @@ } }, "node_modules/remark-lint-checkbox-content-indent/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-checkbox-content-indent/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-checkbox-content-indent/node_modules/unified": { "version": "10.1.2", @@ -2441,17 +2441,17 @@ } }, "node_modules/remark-lint-code-block-style/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-code-block-style/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-code-block-style/node_modules/unified": { "version": "10.1.2", @@ -2527,17 +2527,17 @@ } }, "node_modules/remark-lint-definition-spacing/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-definition-spacing/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-definition-spacing/node_modules/unified": { "version": "10.1.2", @@ -2614,17 +2614,17 @@ } }, "node_modules/remark-lint-fenced-code-flag/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-fenced-code-flag/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-fenced-code-flag/node_modules/unified": { "version": "10.1.2", @@ -2700,17 +2700,17 @@ } }, "node_modules/remark-lint-fenced-code-marker/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-fenced-code-marker/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-fenced-code-marker/node_modules/unified": { "version": "10.1.2", @@ -2784,17 +2784,17 @@ } }, "node_modules/remark-lint-file-extension/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-file-extension/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-file-extension/node_modules/unified": { "version": "10.1.2", @@ -2832,17 +2832,17 @@ } }, "node_modules/remark-lint-final-definition/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-final-definition/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-final-definition/node_modules/unified": { "version": "10.1.2", @@ -2916,17 +2916,17 @@ } }, "node_modules/remark-lint-final-newline/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-final-newline/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-final-newline/node_modules/unified": { "version": "10.1.2", @@ -2963,17 +2963,17 @@ } }, "node_modules/remark-lint-first-heading-level/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-first-heading-level/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-first-heading-level/node_modules/unified": { "version": "10.1.2", @@ -3050,17 +3050,17 @@ } }, "node_modules/remark-lint-hard-break-spaces/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-hard-break-spaces/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-hard-break-spaces/node_modules/unified": { "version": "10.1.2", @@ -3137,17 +3137,17 @@ } }, "node_modules/remark-lint-heading-style/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-heading-style/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-heading-style/node_modules/unified": { "version": "10.1.2", @@ -3223,17 +3223,17 @@ } }, "node_modules/remark-lint-list-item-bullet-indent/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-list-item-bullet-indent/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-list-item-bullet-indent/node_modules/unified": { "version": "10.1.2", @@ -3311,17 +3311,17 @@ } }, "node_modules/remark-lint-list-item-indent/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-list-item-indent/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-list-item-indent/node_modules/unified": { "version": "10.1.2", @@ -3398,17 +3398,17 @@ } }, "node_modules/remark-lint-maximum-line-length/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-maximum-line-length/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-maximum-line-length/node_modules/unified": { "version": "10.1.2", @@ -3486,17 +3486,17 @@ } }, "node_modules/remark-lint-no-blockquote-without-marker/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-blockquote-without-marker/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-blockquote-without-marker/node_modules/unified": { "version": "10.1.2", @@ -3575,17 +3575,17 @@ } }, "node_modules/remark-lint-no-consecutive-blank-lines/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-consecutive-blank-lines/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-consecutive-blank-lines/node_modules/unified": { "version": "10.1.2", @@ -3663,17 +3663,17 @@ } }, "node_modules/remark-lint-no-duplicate-definitions/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-duplicate-definitions/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-duplicate-definitions/node_modules/unified": { "version": "10.1.2", @@ -3759,17 +3759,17 @@ } }, "node_modules/remark-lint-no-file-name-articles/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-file-name-articles/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-file-name-articles/node_modules/unified": { "version": "10.1.2", @@ -3804,17 +3804,17 @@ } }, "node_modules/remark-lint-no-file-name-consecutive-dashes/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-file-name-consecutive-dashes/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-file-name-consecutive-dashes/node_modules/unified": { "version": "10.1.2", @@ -3849,17 +3849,17 @@ } }, "node_modules/remark-lint-no-file-name-outer-dashes/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-file-name-outer-dashes/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-file-name-outer-dashes/node_modules/unified": { "version": "10.1.2", @@ -3899,17 +3899,17 @@ } }, "node_modules/remark-lint-no-heading-content-indent/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-heading-content-indent/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-heading-content-indent/node_modules/unified": { "version": "10.1.2", @@ -3987,17 +3987,17 @@ } }, "node_modules/remark-lint-no-heading-indent/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-heading-indent/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-heading-indent/node_modules/unified": { "version": "10.1.2", @@ -4074,17 +4074,17 @@ } }, "node_modules/remark-lint-no-inline-padding/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-inline-padding/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-inline-padding/node_modules/mdast-util-to-string": { "version": "3.2.0", @@ -4174,17 +4174,17 @@ } }, "node_modules/remark-lint-no-literal-urls/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-literal-urls/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-literal-urls/node_modules/mdast-util-to-string": { "version": "3.2.0", @@ -4274,17 +4274,17 @@ } }, "node_modules/remark-lint-no-multiple-toplevel-headings/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-multiple-toplevel-headings/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-multiple-toplevel-headings/node_modules/unified": { "version": "10.1.2", @@ -4372,17 +4372,17 @@ } }, "node_modules/remark-lint-no-shell-dollars/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-shell-dollars/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-shell-dollars/node_modules/unified": { "version": "10.1.2", @@ -4458,17 +4458,17 @@ } }, "node_modules/remark-lint-no-shortcut-reference-image/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-shortcut-reference-image/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-shortcut-reference-image/node_modules/unified": { "version": "10.1.2", @@ -4544,17 +4544,17 @@ } }, "node_modules/remark-lint-no-shortcut-reference-link/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-shortcut-reference-link/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-shortcut-reference-link/node_modules/unified": { "version": "10.1.2", @@ -4631,17 +4631,17 @@ } }, "node_modules/remark-lint-no-table-indentation/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-table-indentation/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-table-indentation/node_modules/unified": { "version": "10.1.2", @@ -4716,17 +4716,17 @@ } }, "node_modules/remark-lint-no-tabs/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-tabs/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-tabs/node_modules/unified": { "version": "10.1.2", @@ -4786,17 +4786,17 @@ } }, "node_modules/remark-lint-no-undefined-references/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-undefined-references/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-undefined-references/node_modules/micromark-util-normalize-identifier": { "version": "1.1.0", @@ -4905,17 +4905,17 @@ } }, "node_modules/remark-lint-no-unused-definitions/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-no-unused-definitions/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-no-unused-definitions/node_modules/unified": { "version": "10.1.2", @@ -4992,17 +4992,17 @@ } }, "node_modules/remark-lint-ordered-list-marker-style/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-ordered-list-marker-style/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-ordered-list-marker-style/node_modules/unified": { "version": "10.1.2", @@ -5074,9 +5074,9 @@ } }, "node_modules/remark-lint-prohibited-strings/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-prohibited-strings/node_modules/unist-util-is": { "version": "5.2.1", @@ -5134,17 +5134,17 @@ } }, "node_modules/remark-lint-rule-style/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-rule-style/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-rule-style/node_modules/unified": { "version": "10.1.2", @@ -5220,17 +5220,17 @@ } }, "node_modules/remark-lint-strong-marker/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-strong-marker/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-strong-marker/node_modules/unified": { "version": "10.1.2", @@ -5307,17 +5307,17 @@ } }, "node_modules/remark-lint-table-cell-padding/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-table-cell-padding/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-table-cell-padding/node_modules/unified": { "version": "10.1.2", @@ -5393,17 +5393,17 @@ } }, "node_modules/remark-lint-table-pipes/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-table-pipes/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-table-pipes/node_modules/unified": { "version": "10.1.2", @@ -5480,17 +5480,17 @@ } }, "node_modules/remark-lint-unordered-list-marker-style/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint-unordered-list-marker-style/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint-unordered-list-marker-style/node_modules/unified": { "version": "10.1.2", @@ -5550,17 +5550,17 @@ } }, "node_modules/remark-lint/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-lint/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-lint/node_modules/unified": { "version": "10.1.2", @@ -5597,17 +5597,17 @@ } }, "node_modules/remark-message-control/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-message-control/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-message-control/node_modules/unified": { "version": "10.1.2", @@ -5716,17 +5716,17 @@ } }, "node_modules/remark-preset-lint-recommended/node_modules/@types/mdast": { - "version": "3.0.14", - "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.14.tgz", - "integrity": "sha512-gVZ04PGgw1qLZKsnWnyFv4ORnaJ+DXLdHTVSFbU8yX6xZ34Bjg4Q32yPkmveUP1yItXReKfB0Aknlh/3zxTKAw==", + "version": "3.0.15", + "resolved": "https://registry.npmjs.org/@types/mdast/-/mdast-3.0.15.tgz", + "integrity": "sha512-LnwD+mUEfxWMa1QpDraczIn6k0Ee3SMicuYSSzS6ZYl2gKS09EClnJYGd8Du6rfc5r/GZEk5o1mRb8TaTj03sQ==", "dependencies": { "@types/unist": "^2" } }, "node_modules/remark-preset-lint-recommended/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/remark-preset-lint-recommended/node_modules/unified": { "version": "10.1.2", @@ -5778,9 +5778,9 @@ } }, "node_modules/rollup": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.3.0.tgz", - "integrity": "sha512-scIi1NrKLDIYSPK66jjECtII7vIgdAMFmFo8h6qm++I6nN9qDSV35Ku6erzGVqYjx+lj+j5wkusRMr++8SyDZg==", + "version": "4.6.1", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.6.1.tgz", + "integrity": "sha512-jZHaZotEHQaHLgKr8JnQiDT1rmatjgKlMekyksz+yk9jt/8z9quNjnKNRoaM0wd9DC2QKXjmWWuDYtM3jfF8pQ==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -5790,18 +5790,18 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.3.0", - "@rollup/rollup-android-arm64": "4.3.0", - "@rollup/rollup-darwin-arm64": "4.3.0", - "@rollup/rollup-darwin-x64": "4.3.0", - "@rollup/rollup-linux-arm-gnueabihf": "4.3.0", - "@rollup/rollup-linux-arm64-gnu": "4.3.0", - "@rollup/rollup-linux-arm64-musl": "4.3.0", - "@rollup/rollup-linux-x64-gnu": "4.3.0", - "@rollup/rollup-linux-x64-musl": "4.3.0", - "@rollup/rollup-win32-arm64-msvc": "4.3.0", - "@rollup/rollup-win32-ia32-msvc": "4.3.0", - "@rollup/rollup-win32-x64-msvc": "4.3.0", + "@rollup/rollup-android-arm-eabi": "4.6.1", + "@rollup/rollup-android-arm64": "4.6.1", + "@rollup/rollup-darwin-arm64": "4.6.1", + "@rollup/rollup-darwin-x64": "4.6.1", + "@rollup/rollup-linux-arm-gnueabihf": "4.6.1", + "@rollup/rollup-linux-arm64-gnu": "4.6.1", + "@rollup/rollup-linux-arm64-musl": "4.6.1", + "@rollup/rollup-linux-x64-gnu": "4.6.1", + "@rollup/rollup-linux-x64-musl": "4.6.1", + "@rollup/rollup-win32-arm64-msvc": "4.6.1", + "@rollup/rollup-win32-ia32-msvc": "4.6.1", + "@rollup/rollup-win32-x64-msvc": "4.6.1", "fsevents": "~2.3.2" } }, @@ -6017,9 +6017,9 @@ } }, "node_modules/unified-lint-rule/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/unified-lint-rule/node_modules/unified": { "version": "10.1.2", @@ -6057,9 +6057,9 @@ } }, "node_modules/unified-message-control/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/unified-message-control/node_modules/unist-util-is": { "version": "5.2.1", @@ -6161,9 +6161,9 @@ } }, "node_modules/unist-util-position/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/unist-util-stringify-position": { "version": "4.0.0", @@ -6250,9 +6250,9 @@ } }, "node_modules/vfile-location/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/vfile-message": { "version": "3.1.4", @@ -6268,9 +6268,9 @@ } }, "node_modules/vfile-message/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/vfile-message/node_modules/unist-util-stringify-position": { "version": "3.0.3", @@ -6411,9 +6411,9 @@ } }, "node_modules/vfile/node_modules/@types/unist": { - "version": "2.0.9", - "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.9.tgz", - "integrity": "sha512-zC0iXxAv1C1ERURduJueYzkzZ2zaGyc+P2c95hgkikHPr3z8EdUZOlgEQ5X0DRmwDZn+hekycQnoeiiRVrmilQ==" + "version": "2.0.10", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-2.0.10.tgz", + "integrity": "sha512-IfYcSBWE3hLpBg8+X2SEa8LVkJdJEkT2Ese2aaLs3ptGdVtABxndrMaxuFlQ1qdFf9Q5rDvDpxI3WwgvKFAsQA==" }, "node_modules/vfile/node_modules/unist-util-stringify-position": { "version": "3.0.3", diff --git a/tools/lint-md/package.json b/tools/lint-md/package.json index a938116e7e4c08..0292176c3ed45b 100644 --- a/tools/lint-md/package.json +++ b/tools/lint-md/package.json @@ -16,7 +16,7 @@ "devDependencies": { "@rollup/plugin-commonjs": "^25.0.7", "@rollup/plugin-node-resolve": "^15.2.3", - "rollup": "^4.3.0", + "rollup": "^4.6.1", "rollup-plugin-cleanup": "^3.2.1" } } diff --git a/tools/node_modules/eslint/lib/cli-engine/lint-result-cache.js b/tools/node_modules/eslint/lib/cli-engine/lint-result-cache.js index e36eb74badaad7..97d2ee40b39955 100644 --- a/tools/node_modules/eslint/lib/cli-engine/lint-result-cache.js +++ b/tools/node_modules/eslint/lib/cli-engine/lint-result-cache.js @@ -128,16 +128,28 @@ class LintResultCache { return null; } + const cachedResults = fileDescriptor.meta.results; + + // Just in case, not sure if this can ever happen. + if (!cachedResults) { + return cachedResults; + } + + /* + * Shallow clone the object to ensure that any properties added or modified afterwards + * will not be accidentally stored in the cache file when `reconcile()` is called. + * https://github.com/eslint/eslint/issues/13507 + * All intentional changes to the cache file must be done through `setCachedLintResults()`. + */ + const results = { ...cachedResults }; + // If source is present but null, need to reread the file from the filesystem. - if ( - fileDescriptor.meta.results && - fileDescriptor.meta.results.source === null - ) { + if (results.source === null) { debug(`Rereading cached result source from filesystem: ${filePath}`); - fileDescriptor.meta.results.source = fs.readFileSync(filePath, "utf-8"); + results.source = fs.readFileSync(filePath, "utf-8"); } - return fileDescriptor.meta.results; + return results; } /** diff --git a/tools/node_modules/eslint/lib/linter/linter.js b/tools/node_modules/eslint/lib/linter/linter.js index e195812e513a21..9f29933cee414e 100644 --- a/tools/node_modules/eslint/lib/linter/linter.js +++ b/tools/node_modules/eslint/lib/linter/linter.js @@ -1422,7 +1422,7 @@ class Linter { verify(textOrSourceCode, config, filenameOrOptions) { debug("Verify"); - const { configType } = internalSlotsMap.get(this); + const { configType, cwd } = internalSlotsMap.get(this); const options = typeof filenameOrOptions === "string" ? { filename: filenameOrOptions } @@ -1441,7 +1441,7 @@ class Linter { let configArray = config; if (!Array.isArray(config) || typeof config.getConfig !== "function") { - configArray = new FlatConfigArray(config); + configArray = new FlatConfigArray(config, { basePath: cwd }); configArray.normalizeSync(); } diff --git a/tools/node_modules/eslint/lib/rules/for-direction.js b/tools/node_modules/eslint/lib/rules/for-direction.js index 3f2ad9df645072..69198d11ad221f 100644 --- a/tools/node_modules/eslint/lib/rules/for-direction.js +++ b/tools/node_modules/eslint/lib/rules/for-direction.js @@ -101,30 +101,37 @@ module.exports = { } return 0; } + return { ForStatement(node) { - if (node.test && node.test.type === "BinaryExpression" && node.test.left.type === "Identifier" && node.update) { - const counter = node.test.left.name; - const operator = node.test.operator; - const update = node.update; + if (node.test && node.test.type === "BinaryExpression" && node.update) { + for (const counterPosition of ["left", "right"]) { + if (node.test[counterPosition].type !== "Identifier") { + continue; + } - let wrongDirection; + const counter = node.test[counterPosition].name; + const operator = node.test.operator; + const update = node.update; - if (operator === "<" || operator === "<=") { - wrongDirection = -1; - } else if (operator === ">" || operator === ">=") { - wrongDirection = 1; - } else { - return; - } + let wrongDirection; + + if (operator === "<" || operator === "<=") { + wrongDirection = counterPosition === "left" ? -1 : 1; + } else if (operator === ">" || operator === ">=") { + wrongDirection = counterPosition === "left" ? 1 : -1; + } else { + return; + } - if (update.type === "UpdateExpression") { - if (getUpdateDirection(update, counter) === wrongDirection) { + if (update.type === "UpdateExpression") { + if (getUpdateDirection(update, counter) === wrongDirection) { + report(node); + } + } else if (update.type === "AssignmentExpression" && getAssignmentDirection(update, counter) === wrongDirection) { report(node); } - } else if (update.type === "AssignmentExpression" && getAssignmentDirection(update, counter) === wrongDirection) { - report(node); } } } diff --git a/tools/node_modules/eslint/lib/rules/no-array-constructor.js b/tools/node_modules/eslint/lib/rules/no-array-constructor.js index b5399264118352..f56b6876674ccf 100644 --- a/tools/node_modules/eslint/lib/rules/no-array-constructor.js +++ b/tools/node_modules/eslint/lib/rules/no-array-constructor.js @@ -5,6 +5,18 @@ "use strict"; +//------------------------------------------------------------------------------ +// Requirements +//------------------------------------------------------------------------------ + +const { + getVariableByName, + isClosingParenToken, + isOpeningParenToken, + isStartOfExpressionStatement, + needsPrecedingSemicolon +} = require("./utils/ast-utils"); + //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ @@ -20,15 +32,45 @@ module.exports = { url: "https://eslint.org/docs/latest/rules/no-array-constructor" }, + hasSuggestions: true, + schema: [], messages: { - preferLiteral: "The array literal notation [] is preferable." + preferLiteral: "The array literal notation [] is preferable.", + useLiteral: "Replace with an array literal.", + useLiteralAfterSemicolon: "Replace with an array literal, add preceding semicolon." } }, create(context) { + const sourceCode = context.sourceCode; + + /** + * Gets the text between the calling parentheses of a CallExpression or NewExpression. + * @param {ASTNode} node A CallExpression or NewExpression node. + * @returns {string} The text between the calling parentheses, or an empty string if there are none. + */ + function getArgumentsText(node) { + const lastToken = sourceCode.getLastToken(node); + + if (!isClosingParenToken(lastToken)) { + return ""; + } + + let firstToken = node.callee; + + do { + firstToken = sourceCode.getTokenAfter(firstToken); + if (!firstToken || firstToken === lastToken) { + return ""; + } + } while (!isOpeningParenToken(firstToken)); + + return sourceCode.text.slice(firstToken.range[1], lastToken.range[0]); + } + /** * Disallow construction of dense arrays using the Array constructor * @param {ASTNode} node node to evaluate @@ -37,11 +79,48 @@ module.exports = { */ function check(node) { if ( - node.arguments.length !== 1 && - node.callee.type === "Identifier" && - node.callee.name === "Array" - ) { - context.report({ node, messageId: "preferLiteral" }); + node.callee.type !== "Identifier" || + node.callee.name !== "Array" || + node.arguments.length === 1 && + node.arguments[0].type !== "SpreadElement") { + return; + } + + const variable = getVariableByName(sourceCode.getScope(node), "Array"); + + /* + * Check if `Array` is a predefined global variable: predefined globals have no declarations, + * meaning that the `identifiers` list of the variable object is empty. + */ + if (variable && variable.identifiers.length === 0) { + const argsText = getArgumentsText(node); + let fixText; + let messageId; + + /* + * Check if the suggested change should include a preceding semicolon or not. + * Due to JavaScript's ASI rules, a missing semicolon may be inserted automatically + * before an expression like `Array()` or `new Array()`, but not when the expression + * is changed into an array literal like `[]`. + */ + if (isStartOfExpressionStatement(node) && needsPrecedingSemicolon(sourceCode, node)) { + fixText = `;[${argsText}]`; + messageId = "useLiteralAfterSemicolon"; + } else { + fixText = `[${argsText}]`; + messageId = "useLiteral"; + } + + context.report({ + node, + messageId: "preferLiteral", + suggest: [ + { + messageId, + fix: fixer => fixer.replaceText(node, fixText) + } + ] + }); } } diff --git a/tools/node_modules/eslint/lib/rules/no-console.js b/tools/node_modules/eslint/lib/rules/no-console.js index f257098d38b0de..d20477c5d9a832 100644 --- a/tools/node_modules/eslint/lib/rules/no-console.js +++ b/tools/node_modules/eslint/lib/rules/no-console.js @@ -43,8 +43,11 @@ module.exports = { } ], + hasSuggestions: true, + messages: { - unexpected: "Unexpected console statement." + unexpected: "Unexpected console statement.", + removeConsole: "Remove the console.{{ propertyName }}()." } }, @@ -94,6 +97,64 @@ module.exports = { ); } + /** + * Checks if removing the ExpressionStatement node will cause ASI to + * break. + * eg. + * foo() + * console.log(); + * [1, 2, 3].forEach(a => doSomething(a)) + * + * Removing the console.log(); statement should leave two statements, but + * here the two statements will become one because [ causes continuation after + * foo(). + * @param {ASTNode} node The ExpressionStatement node to check. + * @returns {boolean} `true` if ASI will break after removing the ExpressionStatement + * node. + */ + function maybeAsiHazard(node) { + const SAFE_TOKENS_BEFORE = /^[:;{]$/u; // One of :;{ + const UNSAFE_CHARS_AFTER = /^[-[(/+`]/u; // One of [(/+-` + + const tokenBefore = sourceCode.getTokenBefore(node); + const tokenAfter = sourceCode.getTokenAfter(node); + + return ( + Boolean(tokenAfter) && + UNSAFE_CHARS_AFTER.test(tokenAfter.value) && + tokenAfter.value !== "++" && + tokenAfter.value !== "--" && + Boolean(tokenBefore) && + !SAFE_TOKENS_BEFORE.test(tokenBefore.value) + ); + } + + /** + * Checks if the MemberExpression node's parent.parent.parent is a + * Program, BlockStatement, StaticBlock, or SwitchCase node. This check + * is necessary to avoid providing a suggestion that might cause a syntax error. + * + * eg. if (a) console.log(b), removing console.log() here will lead to a + * syntax error. + * if (a) { console.log(b) }, removing console.log() here is acceptable. + * + * Additionally, it checks if the callee of the CallExpression node is + * the node itself. + * + * eg. foo(console.log), cannot provide a suggestion here. + * @param {ASTNode} node The MemberExpression node to check. + * @returns {boolean} `true` if a suggestion can be provided for a node. + */ + function canProvideSuggestions(node) { + return ( + node.parent.type === "CallExpression" && + node.parent.callee === node && + node.parent.parent.type === "ExpressionStatement" && + astUtils.STATEMENT_LIST_PARENTS.has(node.parent.parent.parent.type) && + !maybeAsiHazard(node.parent.parent) + ); + } + /** * Reports the given reference as a violation. * @param {eslint-scope.Reference} reference The reference to report. @@ -102,10 +163,21 @@ module.exports = { function report(reference) { const node = reference.identifier.parent; + const propertyName = astUtils.getStaticPropertyName(node); + context.report({ node, loc: node.loc, - messageId: "unexpected" + messageId: "unexpected", + suggest: canProvideSuggestions(node) + ? [{ + messageId: "removeConsole", + data: { propertyName }, + fix(fixer) { + return fixer.remove(node.parent.parent); + } + }] + : [] }); } diff --git a/tools/node_modules/eslint/lib/rules/no-object-constructor.js b/tools/node_modules/eslint/lib/rules/no-object-constructor.js index e3ac20957348f3..8875ec2124b174 100644 --- a/tools/node_modules/eslint/lib/rules/no-object-constructor.js +++ b/tools/node_modules/eslint/lib/rules/no-object-constructor.js @@ -9,67 +9,12 @@ // Requirements //------------------------------------------------------------------------------ -const { getVariableByName, isArrowToken, isClosingBraceToken, isClosingParenToken } = require("./utils/ast-utils"); - -//------------------------------------------------------------------------------ -// Helpers -//------------------------------------------------------------------------------ - -const BREAK_OR_CONTINUE = new Set(["BreakStatement", "ContinueStatement"]); - -// Declaration types that must contain a string Literal node at the end. -const DECLARATIONS = new Set(["ExportAllDeclaration", "ExportNamedDeclaration", "ImportDeclaration"]); - -const IDENTIFIER_OR_KEYWORD = new Set(["Identifier", "Keyword"]); - -// Keywords that can immediately precede an ExpressionStatement node, mapped to the their node types. -const NODE_TYPES_BY_KEYWORD = { - __proto__: null, - break: "BreakStatement", - continue: "ContinueStatement", - debugger: "DebuggerStatement", - do: "DoWhileStatement", - else: "IfStatement", - return: "ReturnStatement", - yield: "YieldExpression" -}; - -/* - * Before an opening parenthesis, postfix `++` and `--` always trigger ASI; - * the tokens `:`, `;`, `{` and `=>` don't expect a semicolon, as that would count as an empty statement. - */ -const PUNCTUATORS = new Set([":", ";", "{", "=>", "++", "--"]); - -/* - * Statements that can contain an `ExpressionStatement` after a closing parenthesis. - * DoWhileStatement is an exception in that it always triggers ASI after the closing parenthesis. - */ -const STATEMENTS = new Set([ - "DoWhileStatement", - "ForInStatement", - "ForOfStatement", - "ForStatement", - "IfStatement", - "WhileStatement", - "WithStatement" -]); - -/** - * Tests if a node appears at the beginning of an ancestor ExpressionStatement node. - * @param {ASTNode} node The node to check. - * @returns {boolean} Whether the node appears at the beginning of an ancestor ExpressionStatement node. - */ -function isStartOfExpressionStatement(node) { - const start = node.range[0]; - let ancestor = node; - - while ((ancestor = ancestor.parent) && ancestor.range[0] === start) { - if (ancestor.type === "ExpressionStatement") { - return true; - } - } - return false; -} +const { + getVariableByName, + isArrowToken, + isStartOfExpressionStatement, + needsPrecedingSemicolon +} = require("./utils/ast-utils"); //------------------------------------------------------------------------------ // Rule Definition @@ -120,50 +65,6 @@ module.exports = { return false; } - /** - * Determines whether a parenthesized object literal that replaces a specified node needs to be preceded by a semicolon. - * @param {ASTNode} node The node to be replaced. This node should be at the start of an `ExpressionStatement` or at the start of the body of an `ArrowFunctionExpression`. - * @returns {boolean} Whether a semicolon is required before the parenthesized object literal. - */ - function needsSemicolon(node) { - const prevToken = sourceCode.getTokenBefore(node); - - if (!prevToken || prevToken.type === "Punctuator" && PUNCTUATORS.has(prevToken.value)) { - return false; - } - - const prevNode = sourceCode.getNodeByRangeIndex(prevToken.range[0]); - - if (isClosingParenToken(prevToken)) { - return !STATEMENTS.has(prevNode.type); - } - - if (isClosingBraceToken(prevToken)) { - return ( - prevNode.type === "BlockStatement" && prevNode.parent.type === "FunctionExpression" || - prevNode.type === "ClassBody" && prevNode.parent.type === "ClassExpression" || - prevNode.type === "ObjectExpression" - ); - } - - if (IDENTIFIER_OR_KEYWORD.has(prevToken.type)) { - if (BREAK_OR_CONTINUE.has(prevNode.parent.type)) { - return false; - } - - const keyword = prevToken.value; - const nodeType = NODE_TYPES_BY_KEYWORD[keyword]; - - return prevNode.type !== nodeType; - } - - if (prevToken.type === "String") { - return !DECLARATIONS.has(prevNode.parent.type); - } - - return true; - } - /** * Reports on nodes where the `Object` constructor is called without arguments. * @param {ASTNode} node The node to evaluate. @@ -183,7 +84,7 @@ module.exports = { if (needsParentheses(node)) { replacement = "({})"; - if (needsSemicolon(node)) { + if (needsPrecedingSemicolon(sourceCode, node)) { fixText = ";({})"; messageId = "useLiteralAfterSemicolon"; } else { diff --git a/tools/node_modules/eslint/lib/rules/no-restricted-imports.js b/tools/node_modules/eslint/lib/rules/no-restricted-imports.js index 6abfcacae137b1..eb59f4c23a9b56 100644 --- a/tools/node_modules/eslint/lib/rules/no-restricted-imports.js +++ b/tools/node_modules/eslint/lib/rules/no-restricted-imports.js @@ -74,6 +74,9 @@ const arrayOfStringsOrObjectPatterns = { minItems: 1, uniqueItems: true }, + importNamePattern: { + type: "string" + }, message: { type: "string", minLength: 1 @@ -115,8 +118,12 @@ module.exports = { patternAndImportNameWithCustomMessage: "'{{importName}}' import from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}", patternAndEverything: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern.", + + patternAndEverythingWithRegexImportName: "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used.", // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period patternAndEverythingWithCustomMessage: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted from being used by a pattern. {{customMessage}}", + // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period + patternAndEverythingWithRegexImportNameAndCustomMessage: "* import is invalid because import name matching '{{importNames}}' pattern from '{{importSource}}' is restricted from being used. {{customMessage}}", everything: "* import is invalid because '{{importNames}}' from '{{importSource}}' is restricted.", // eslint-disable-next-line eslint-plugin/report-message-format -- Custom message might not end in a period @@ -175,10 +182,11 @@ module.exports = { } // relative paths are supported for this rule - const restrictedPatternGroups = restrictedPatterns.map(({ group, message, caseSensitive, importNames }) => ({ + const restrictedPatternGroups = restrictedPatterns.map(({ group, message, caseSensitive, importNames, importNamePattern }) => ({ matcher: ignore({ allowRelativePaths: true, ignorecase: !caseSensitive }).add(group), customMessage: message, - importNames + importNames, + importNamePattern })); // if no imports are restricted we don't need to check @@ -262,12 +270,13 @@ module.exports = { const customMessage = group.customMessage; const restrictedImportNames = group.importNames; + const restrictedImportNamePattern = group.importNamePattern ? new RegExp(group.importNamePattern, "u") : null; /* * If we are not restricting to any specific import names and just the pattern itself, * report the error and move on */ - if (!restrictedImportNames) { + if (!restrictedImportNames && !restrictedImportNamePattern) { context.report({ node, messageId: customMessage ? "patternWithCustomMessage" : "patterns", @@ -279,40 +288,54 @@ module.exports = { return; } - if (importNames.has("*")) { - const specifierData = importNames.get("*")[0]; - - context.report({ - node, - messageId: customMessage ? "patternAndEverythingWithCustomMessage" : "patternAndEverything", - loc: specifierData.loc, - data: { - importSource, - importNames: restrictedImportNames, - customMessage + importNames.forEach((specifiers, importName) => { + if (importName === "*") { + const [specifier] = specifiers; + + if (restrictedImportNames) { + context.report({ + node, + messageId: customMessage ? "patternAndEverythingWithCustomMessage" : "patternAndEverything", + loc: specifier.loc, + data: { + importSource, + importNames: restrictedImportNames, + customMessage + } + }); + } else { + context.report({ + node, + messageId: customMessage ? "patternAndEverythingWithRegexImportNameAndCustomMessage" : "patternAndEverythingWithRegexImportName", + loc: specifier.loc, + data: { + importSource, + importNames: restrictedImportNamePattern, + customMessage + } + }); } - }); - } - restrictedImportNames.forEach(importName => { - if (!importNames.has(importName)) { return; } - const specifiers = importNames.get(importName); - - specifiers.forEach(specifier => { - context.report({ - node, - messageId: customMessage ? "patternAndImportNameWithCustomMessage" : "patternAndImportName", - loc: specifier.loc, - data: { - importSource, - customMessage, - importName - } + if ( + (restrictedImportNames && restrictedImportNames.includes(importName)) || + (restrictedImportNamePattern && restrictedImportNamePattern.test(importName)) + ) { + specifiers.forEach(specifier => { + context.report({ + node, + messageId: customMessage ? "patternAndImportNameWithCustomMessage" : "patternAndImportName", + loc: specifier.loc, + data: { + importSource, + customMessage, + importName + } + }); }); - }); + } }); } diff --git a/tools/node_modules/eslint/lib/rules/utils/ast-utils.js b/tools/node_modules/eslint/lib/rules/utils/ast-utils.js index bebb4d5168b30b..962bdde0af1b44 100644 --- a/tools/node_modules/eslint/lib/rules/utils/ast-utils.js +++ b/tools/node_modules/eslint/lib/rules/utils/ast-utils.js @@ -1015,6 +1015,114 @@ function isDirective(node) { return node.type === "ExpressionStatement" && typeof node.directive === "string"; } +/** + * Tests if a node appears at the beginning of an ancestor ExpressionStatement node. + * @param {ASTNode} node The node to check. + * @returns {boolean} Whether the node appears at the beginning of an ancestor ExpressionStatement node. + */ +function isStartOfExpressionStatement(node) { + const start = node.range[0]; + let ancestor = node; + + while ((ancestor = ancestor.parent) && ancestor.range[0] === start) { + if (ancestor.type === "ExpressionStatement") { + return true; + } + } + return false; +} + +/** + * Determines whether an opening parenthesis `(`, bracket `[` or backtick ``` ` ``` needs to be preceded by a semicolon. + * This opening parenthesis or bracket should be at the start of an `ExpressionStatement` or at the start of the body of an `ArrowFunctionExpression`. + * @type {(sourceCode: SourceCode, node: ASTNode) => boolean} + * @param {SourceCode} sourceCode The source code object. + * @param {ASTNode} node A node at the position where an opening parenthesis or bracket will be inserted. + * @returns {boolean} Whether a semicolon is required before the opening parenthesis or braket. + */ +let needsPrecedingSemicolon; + +{ + const BREAK_OR_CONTINUE = new Set(["BreakStatement", "ContinueStatement"]); + + // Declaration types that must contain a string Literal node at the end. + const DECLARATIONS = new Set(["ExportAllDeclaration", "ExportNamedDeclaration", "ImportDeclaration"]); + + const IDENTIFIER_OR_KEYWORD = new Set(["Identifier", "Keyword"]); + + // Keywords that can immediately precede an ExpressionStatement node, mapped to the their node types. + const NODE_TYPES_BY_KEYWORD = { + __proto__: null, + break: "BreakStatement", + continue: "ContinueStatement", + debugger: "DebuggerStatement", + do: "DoWhileStatement", + else: "IfStatement", + return: "ReturnStatement", + yield: "YieldExpression" + }; + + /* + * Before an opening parenthesis, postfix `++` and `--` always trigger ASI; + * the tokens `:`, `;`, `{` and `=>` don't expect a semicolon, as that would count as an empty statement. + */ + const PUNCTUATORS = new Set([":", ";", "{", "=>", "++", "--"]); + + /* + * Statements that can contain an `ExpressionStatement` after a closing parenthesis. + * DoWhileStatement is an exception in that it always triggers ASI after the closing parenthesis. + */ + const STATEMENTS = new Set([ + "DoWhileStatement", + "ForInStatement", + "ForOfStatement", + "ForStatement", + "IfStatement", + "WhileStatement", + "WithStatement" + ]); + + needsPrecedingSemicolon = + function(sourceCode, node) { + const prevToken = sourceCode.getTokenBefore(node); + + if (!prevToken || prevToken.type === "Punctuator" && PUNCTUATORS.has(prevToken.value)) { + return false; + } + + const prevNode = sourceCode.getNodeByRangeIndex(prevToken.range[0]); + + if (isClosingParenToken(prevToken)) { + return !STATEMENTS.has(prevNode.type); + } + + if (isClosingBraceToken(prevToken)) { + return ( + prevNode.type === "BlockStatement" && prevNode.parent.type === "FunctionExpression" || + prevNode.type === "ClassBody" && prevNode.parent.type === "ClassExpression" || + prevNode.type === "ObjectExpression" + ); + } + + if (IDENTIFIER_OR_KEYWORD.has(prevToken.type)) { + if (BREAK_OR_CONTINUE.has(prevNode.parent.type)) { + return false; + } + + const keyword = prevToken.value; + const nodeType = NODE_TYPES_BY_KEYWORD[keyword]; + + return prevNode.type !== nodeType; + } + + if (prevToken.type === "String") { + return !DECLARATIONS.has(prevNode.parent.type); + } + + return true; + }; +} + //------------------------------------------------------------------------------ // Public Interface //------------------------------------------------------------------------------ @@ -2168,5 +2276,7 @@ module.exports = { getModuleExportName, isConstant, isTopLevelExpressionStatement, - isDirective + isDirective, + isStartOfExpressionStatement, + needsPrecedingSemicolon }; diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js index 74495b0d852b72..2f900ebacdc6cd 100644 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/code-frame/lib/index.js @@ -7,8 +7,8 @@ exports.codeFrameColumns = codeFrameColumns; exports.default = _default; var _highlight = require("@babel/highlight"); var _chalk = _interopRequireWildcard(require("chalk"), true); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } let chalkWithForcedColor = undefined; function getChalk(forceColor) { if (forceColor) { diff --git a/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json b/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json index c3afdc1557675c..46a9ba9db12f07 100644 --- a/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/code-frame/package.json @@ -1,6 +1,6 @@ { "name": "@babel/code-frame", - "version": "7.22.13", + "version": "7.23.5", "description": "Generate errors that contain a code frame that point to source locations.", "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-code-frame", @@ -16,11 +16,11 @@ }, "main": "./lib/index.js", "dependencies": { - "@babel/highlight": "^7.22.13", + "@babel/highlight": "^7.23.4", "chalk": "^2.4.2" }, "devDependencies": { - "import-meta-resolve": "^3.0.0", + "import-meta-resolve": "^4.0.0", "strip-ansi": "^4.0.0" }, "engines": { diff --git a/tools/node_modules/eslint/node_modules/@babel/compat-data/data/overlapping-plugins.json b/tools/node_modules/eslint/node_modules/@babel/compat-data/data/overlapping-plugins.json index 94fda05db6b8e6..8b34821145db7a 100644 --- a/tools/node_modules/eslint/node_modules/@babel/compat-data/data/overlapping-plugins.json +++ b/tools/node_modules/eslint/node_modules/@babel/compat-data/data/overlapping-plugins.json @@ -21,5 +21,11 @@ ], "proposal-optional-chaining": [ "bugfix/transform-v8-spread-parameters-in-optional-chaining" + ], + "transform-class-properties": [ + "bugfix/transform-v8-static-class-fields-redefine-readonly" + ], + "proposal-class-properties": [ + "bugfix/transform-v8-static-class-fields-redefine-readonly" ] } diff --git a/tools/node_modules/eslint/node_modules/@babel/compat-data/data/plugins.json b/tools/node_modules/eslint/node_modules/@babel/compat-data/data/plugins.json index 266426827131f0..dcf37fdf9447b9 100644 --- a/tools/node_modules/eslint/node_modules/@babel/compat-data/data/plugins.json +++ b/tools/node_modules/eslint/node_modules/@babel/compat-data/data/plugins.json @@ -10,6 +10,19 @@ "opera_mobile": "75", "electron": "24.0" }, + "bugfix/transform-v8-static-class-fields-redefine-readonly": { + "chrome": "98", + "opera": "84", + "edge": "98", + "firefox": "95", + "safari": "15", + "node": "12", + "deno": "1.18", + "ios": "15", + "samsung": "11", + "opera_mobile": "52", + "electron": "17.0" + }, "transform-class-static-block": { "chrome": "94", "opera": "80", diff --git a/tools/node_modules/eslint/node_modules/@babel/compat-data/package.json b/tools/node_modules/eslint/node_modules/@babel/compat-data/package.json index 94f8b94ab078cf..a3d3f20c927047 100644 --- a/tools/node_modules/eslint/node_modules/@babel/compat-data/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/compat-data/package.json @@ -1,6 +1,6 @@ { "name": "@babel/compat-data", - "version": "7.23.2", + "version": "7.23.5", "author": "The Babel Team (https://babel.dev/team)", "license": "MIT", "description": "", diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/config-chain.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/config-chain.js index cda396fe6d1340..59292a7ee44153 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/config-chain.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/config-chain.js @@ -39,14 +39,13 @@ function* buildPresetChain(arg, context) { files: new Set() }; } -const buildPresetChainWalker = makeChainWalker({ +const buildPresetChainWalker = exports.buildPresetChainWalker = makeChainWalker({ root: preset => loadPresetDescriptors(preset), env: (preset, envName) => loadPresetEnvDescriptors(preset)(envName), overrides: (preset, index) => loadPresetOverridesDescriptors(preset)(index), overridesEnv: (preset, index, envName) => loadPresetOverridesEnvDescriptors(preset)(index)(envName), createLogger: () => () => {} }); -exports.buildPresetChainWalker = buildPresetChainWalker; const loadPresetDescriptors = (0, _caching.makeWeakCacheSync)(preset => buildRootDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors)); const loadPresetEnvDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(envName => buildEnvDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, envName))); const loadPresetOverridesDescriptors = (0, _caching.makeWeakCacheSync)(preset => (0, _caching.makeStrongCacheSync)(index => buildOverrideDescriptors(preset, preset.alias, _configDescriptors.createUncachedDescriptors, index))); @@ -190,7 +189,7 @@ const loadFileChainWalker = makeChainWalker({ }); function* loadFileChain(input, context, files, baseLogger) { const chain = yield* loadFileChainWalker(input, context, files, baseLogger); - chain == null ? void 0 : chain.files.add(input.filepath); + chain == null || chain.files.add(input.filepath); return chain; } const loadFileDescriptors = (0, _caching.makeWeakCacheSync)(file => buildRootDescriptors(file, file.filepath, _configDescriptors.createUncachedDescriptors)); diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/configuration.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/configuration.js index 34327ee52c46f5..50adfd86dea6d6 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/configuration.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/configuration.js @@ -53,8 +53,7 @@ var _configError = require("../../errors/config-error.js"); var fs = require("../../gensync-utils/fs.js"); var _rewriteStackTrace = require("../../errors/rewrite-stack-trace.js"); const debug = _debug()("babel:config:loading:files:configuration"); -const ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json", "babel.config.cts"]; -exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES; +const ROOT_CONFIG_FILENAMES = exports.ROOT_CONFIG_FILENAMES = ["babel.config.js", "babel.config.cjs", "babel.config.mjs", "babel.config.json", "babel.config.cts"]; const RELATIVE_CONFIG_FILENAMES = [".babelrc", ".babelrc.js", ".babelrc.cjs", ".babelrc.mjs", ".babelrc.json", ".babelrc.cts"]; const BABELIGNORE_FILENAME = ".babelignore"; const runConfig = (0, _caching.makeWeakCache)(function* runConfig(options, cache) { @@ -78,7 +77,7 @@ function* readConfigCode(filepath, data) { throw new _configError.default(`Configuration should be an exported JavaScript object.`, filepath); } if (typeof options.then === "function") { - options.catch == null ? void 0 : options.catch(() => {}); + options.catch == null || options.catch(() => {}); throw new _configError.default(`You appear to be using an async configuration, ` + `which your current version of Babel does not support. ` + `We may add support for this in the future, ` + `but if you're on the most recent version of @babel/core and still ` + `seeing this error, then you'll need to synchronously return your config.`, filepath); } if (cacheNeedsConfiguration) throwConfigError(filepath); diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/index-browser.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/index-browser.js index 903b795735e03d..d8ba7dbc8d7e96 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/index-browser.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/index-browser.js @@ -40,8 +40,7 @@ function* loadConfig(name, dirname, envName, caller) { function* resolveShowConfigPath(dirname) { return null; } -const ROOT_CONFIG_FILENAMES = []; -exports.ROOT_CONFIG_FILENAMES = ROOT_CONFIG_FILENAMES; +const ROOT_CONFIG_FILENAMES = exports.ROOT_CONFIG_FILENAMES = []; function resolvePlugin(name, dirname) { return null; } diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/module-types.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/module-types.js index 473100e77f4160..e27f442923beb4 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/module-types.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/module-types.js @@ -44,8 +44,7 @@ let import_; try { import_ = require("./import.cjs"); } catch (_unused) {} -const supportsESM = _semver().satisfies(process.versions.node, "^12.17 || >=13.2"); -exports.supportsESM = supportsESM; +const supportsESM = exports.supportsESM = _semver().satisfies(process.versions.node, "^12.17 || >=13.2"); function* loadCodeDefault(filepath, asyncError) { switch (_path().extname(filepath)) { case ".cjs": diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/plugins.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/plugins.js index 6fbe8db19cc975..25435ae424af77 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/plugins.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/files/plugins.js @@ -30,6 +30,13 @@ function _url() { return data; } var _importMetaResolve = require("../../vendor/import-meta-resolve.js"); +function _fs() { + const data = require("fs"); + _fs = function () { + return data; + }; + return data; +} const debug = _debug()("babel:config:loading:files:plugins"); const EXACT_RE = /^module:/; const BABEL_PLUGIN_PREFIX_RE = /^(?!@|module:|[^/]+\/|babel-plugin-)/; @@ -39,10 +46,8 @@ const BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/; const OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-plugin(?:-|\/|$)|[^/]+\/)/; const OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?![^/]*babel-preset(?:-|\/|$)|[^/]+\/)/; const OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/; -const resolvePlugin = resolveStandardizedName.bind(null, "plugin"); -exports.resolvePlugin = resolvePlugin; -const resolvePreset = resolveStandardizedName.bind(null, "preset"); -exports.resolvePreset = resolvePreset; +const resolvePlugin = exports.resolvePlugin = resolveStandardizedName.bind(null, "plugin"); +const resolvePreset = exports.resolvePreset = resolveStandardizedName.bind(null, "preset"); function* loadPlugin(name, dirname) { const filepath = resolvePlugin(name, dirname, yield* (0, _async.isAsync)()); const value = yield* requireModule("plugin", filepath); @@ -165,7 +170,13 @@ function resolveStandardizedName(type, name, dirname, resolveESM) { return resolveStandardizedNameForRequire(type, name, dirname); } try { - return resolveStandardizedNameForImport(type, name, dirname); + const resolved = resolveStandardizedNameForImport(type, name, dirname); + if (!(0, _fs().existsSync)(resolved)) { + throw Object.assign(new Error(`Could not resolve "${name}" in file ${dirname}.`), { + type: "MODULE_NOT_FOUND" + }); + } + return resolved; } catch (e) { try { return resolveStandardizedNameForRequire(type, name, dirname); diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/full.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/full.js index 3c1e6f7813244d..6b8c2959dea179 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/full.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/full.js @@ -31,7 +31,7 @@ var _plugins = require("./validation/plugins.js"); var _configApi = require("./helpers/config-api.js"); var _partial = require("./partial.js"); var _configError = require("../errors/config-error.js"); -var _default = _gensync()(function* loadFullConfig(inputOpts) { +var _default = exports.default = _gensync()(function* loadFullConfig(inputOpts) { var _opts$assumptions; const result = yield* (0, _partial.default)(inputOpts); if (!result) { @@ -150,7 +150,6 @@ var _default = _gensync()(function* loadFullConfig(inputOpts) { externalDependencies: (0, _deepArray.finalize)(externalDependencies) }; }); -exports.default = _default; function enhanceError(context, fn) { return function* (arg1, arg2) { try { @@ -273,7 +272,7 @@ const validatePreset = (preset, context, descriptor) => { options } = preset; validateIfOptionNeedsFilename(options, descriptor); - (_options$overrides = options.overrides) == null ? void 0 : _options$overrides.forEach(overrideOptions => validateIfOptionNeedsFilename(overrideOptions, descriptor)); + (_options$overrides = options.overrides) == null || _options$overrides.forEach(overrideOptions => validateIfOptionNeedsFilename(overrideOptions, descriptor)); } }; const instantiatePreset = (0, _caching.makeWeakCacheSync)(({ diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/helpers/config-api.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/helpers/config-api.js index c59bb59442dd18..c3d55ceabefb2a 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/helpers/config-api.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/helpers/config-api.js @@ -64,7 +64,6 @@ function assertVersion(range) { if (typeof range !== "string") { throw new Error("Expected string or integer value."); } - ; if (_semver().satisfies(_index.version, range)) return; const limit = Error.stackTraceLimit; if (typeof limit === "number" && limit < 25) { diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/printer.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/printer.js index 3fb9ced37878d5..3ac2c0753db363 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/printer.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/printer.js @@ -11,11 +11,10 @@ function _gensync() { }; return data; } -const ChainFormatter = { +const ChainFormatter = exports.ChainFormatter = { Programmatic: 0, Config: 1 }; -exports.ChainFormatter = ChainFormatter; const Formatter = { title(type, callerName, filepath) { let title = ""; diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/option-assertions.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/option-assertions.js index db245b451a681e..4cecb99ca4b0c3 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/option-assertions.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/option-assertions.js @@ -132,7 +132,7 @@ function assertArray(loc, value) { } function assertIgnoreList(loc, value) { const arr = assertArray(loc, value); - arr == null ? void 0 : arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item)); + arr == null || arr.forEach((item, i) => assertIgnoreItem(access(loc, i), item)); return arr; } function assertIgnoreItem(loc, value) { diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/options.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/options.js index f8f17039ff0d14..e8af7f23ae99bd 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/options.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/options.js @@ -71,8 +71,7 @@ const COMMON_VALIDATORS = { }); } const knownAssumptions = ["arrayLikeIsIterable", "constantReexports", "constantSuper", "enumerableModuleMeta", "ignoreFunctionLength", "ignoreToPrimitiveHint", "iterableIsArray", "mutableTemplateObject", "noClassCalls", "noDocumentAll", "noIncompleteNsImportDetection", "noNewArrows", "objectRestNoSymbols", "privateFieldsAsSymbols", "privateFieldsAsProperties", "pureGetters", "setClassMethods", "setComputedProperties", "setPublicClassFields", "setSpreadProperties", "skipForOfIteratorClosing", "superIsCallableConstructor"]; -const assumptionsNames = new Set(knownAssumptions); -exports.assumptionsNames = assumptionsNames; +const assumptionsNames = exports.assumptionsNames = new Set(knownAssumptions); function getSource(loc) { return loc.type === "root" ? loc.source : getSource(loc.parent); } diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/removed.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/removed.js index 57270ea93b3bf4..9bd436e88cd92b 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/removed.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/config/validation/removed.js @@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.default = void 0; -var _default = { +var _default = exports.default = { auxiliaryComment: { message: "Use `auxiliaryCommentBefore` or `auxiliaryCommentAfter`" }, @@ -63,7 +63,6 @@ var _default = { message: "The `sourceMapTarget` option has been removed because it makes more sense for the tooling " + "that calls Babel to assign `map.file` themselves." } }; -exports.default = _default; 0 && 0; //# sourceMappingURL=removed.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/gensync-utils/async.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/gensync-utils/async.js index 9cbe3dc3ef176e..9e00fde8b5f47e 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/gensync-utils/async.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/gensync-utils/async.js @@ -20,11 +20,10 @@ function _asyncToGenerator(fn) { return function () { var self = this, args = ar const runGenerator = _gensync()(function* (item) { return yield* item; }); -const isAsync = _gensync()({ +const isAsync = exports.isAsync = _gensync()({ sync: () => false, errback: cb => cb(null, true) }); -exports.isAsync = isAsync; function maybeAsync(fn, message) { return _gensync()({ sync(...args) { @@ -55,7 +54,7 @@ function forwardAsync(action, cb) { return cb(adapted); }); } -const onFirstPause = _gensync()({ +const onFirstPause = exports.onFirstPause = _gensync()({ name: "onFirstPause", arity: 2, sync: function (item) { @@ -72,8 +71,7 @@ const onFirstPause = _gensync()({ } } }); -exports.onFirstPause = onFirstPause; -const waitFor = _gensync()({ +const waitFor = exports.waitFor = _gensync()({ sync: x => x, async: function () { var _ref2 = _asyncToGenerator(function* (x) { @@ -84,7 +82,6 @@ const waitFor = _gensync()({ }; }() }); -exports.waitFor = waitFor; function isThenable(val) { return !!val && (typeof val === "object" || typeof val === "function") && !!val.then && typeof val.then === "function"; } diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/gensync-utils/fs.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/gensync-utils/fs.js index db7f3d1d39db7b..b842df84d9d815 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/gensync-utils/fs.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/gensync-utils/fs.js @@ -18,16 +18,14 @@ function _gensync() { }; return data; } -const readFile = _gensync()({ +const readFile = exports.readFile = _gensync()({ sync: _fs().readFileSync, errback: _fs().readFile }); -exports.readFile = readFile; -const stat = _gensync()({ +const stat = exports.stat = _gensync()({ sync: _fs().statSync, errback: _fs().stat }); -exports.stat = stat; 0 && 0; //# sourceMappingURL=fs.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/index.js index 64ff8344f6280d..55d2a9586d82af 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/index.js @@ -224,10 +224,8 @@ var _transformAst = require("./transform-ast.js"); var _parse = require("./parse.js"); var thisFile = require("./index.js"); ; -const version = "7.23.2"; -exports.version = version; -const DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]); -exports.DEFAULT_EXTENSIONS = DEFAULT_EXTENSIONS; +const version = exports.version = "7.23.5"; +const DEFAULT_EXTENSIONS = exports.DEFAULT_EXTENSIONS = Object.freeze([".js", ".jsx", ".es6", ".es", ".mjs", ".cjs"]); ; { exports.OptionManager = class OptionManager { diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/parse.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/parse.js index 0aaa535e1f1c08..7e4114245f7cd2 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/parse.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/parse.js @@ -24,7 +24,7 @@ const parseRunner = _gensync()(function* parse(code, opts) { } return yield* (0, _index2.default)(config.passes, (0, _normalizeOpts.default)(config), code); }); -const parse = function parse(code, opts, callback) { +const parse = exports.parse = function parse(code, opts, callback) { if (typeof opts === "function") { callback = opts; opts = undefined; @@ -36,7 +36,6 @@ const parse = function parse(code, opts, callback) { } (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.errback)(code, opts, callback); }; -exports.parse = parse; function parseSync(...args) { return (0, _rewriteStackTrace.beginHiddenCallStack)(parseRunner.sync)(...args); } diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/transform-ast.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/transform-ast.js index 0aad935167e983..0a86cd10d4dd93 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/transform-ast.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/transform-ast.js @@ -22,7 +22,7 @@ const transformFromAstRunner = _gensync()(function* (ast, code, opts) { if (!ast) throw new Error("No AST given"); return yield* (0, _index2.run)(config, code, ast); }); -const transformFromAst = function transformFromAst(ast, code, optsOrCallback, maybeCallback) { +const transformFromAst = exports.transformFromAst = function transformFromAst(ast, code, optsOrCallback, maybeCallback) { let opts; let callback; if (typeof optsOrCallback === "function") { @@ -39,7 +39,6 @@ const transformFromAst = function transformFromAst(ast, code, optsOrCallback, ma } (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.errback)(ast, code, opts, callback); }; -exports.transformFromAst = transformFromAst; function transformFromAstSync(...args) { return (0, _rewriteStackTrace.beginHiddenCallStack)(transformFromAstRunner.sync)(...args); } diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/transform-file-browser.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/transform-file-browser.js index f81925ad2b52e3..85768097927851 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/transform-file-browser.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/transform-file-browser.js @@ -6,13 +6,12 @@ Object.defineProperty(exports, "__esModule", { exports.transformFile = void 0; exports.transformFileAsync = transformFileAsync; exports.transformFileSync = transformFileSync; -const transformFile = function transformFile(filename, opts, callback) { +const transformFile = exports.transformFile = function transformFile(filename, opts, callback) { if (typeof opts === "function") { callback = opts; } callback(new Error("Transforming files is not supported in browsers"), null); }; -exports.transformFile = transformFile; function transformFileSync() { throw new Error("Transforming files is not supported in browsers"); } diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/transform.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/transform.js index bc1a2c076d01df..be5570553dac22 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/transform.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/transform.js @@ -21,7 +21,7 @@ const transformRunner = _gensync()(function* transform(code, opts) { if (config === null) return null; return yield* (0, _index2.run)(config, code); }); -const transform = function transform(code, optsOrCallback, maybeCallback) { +const transform = exports.transform = function transform(code, optsOrCallback, maybeCallback) { let opts; let callback; if (typeof optsOrCallback === "function") { @@ -38,7 +38,6 @@ const transform = function transform(code, optsOrCallback, maybeCallback) { } (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.errback)(code, opts, callback); }; -exports.transform = transform; function transformSync(...args) { return (0, _rewriteStackTrace.beginHiddenCallStack)(transformRunner.sync)(...args); } diff --git a/tools/node_modules/eslint/node_modules/@babel/core/lib/vendor/import-meta-resolve.js b/tools/node_modules/eslint/node_modules/@babel/core/lib/vendor/import-meta-resolve.js index 52d20975920428..eae3148cef362e 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/lib/vendor/import-meta-resolve.js +++ b/tools/node_modules/eslint/node_modules/@babel/core/lib/vendor/import-meta-resolve.js @@ -61,9 +61,8 @@ function _util() { }; return data; } -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } -const isWindows = _process().platform === 'win32'; +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } const own$1 = {}.hasOwnProperty; const classRegExp = /^([A-Z][a-z\d]*)+$/; const kTypes = new Set(['string', 'function', 'number', 'object', 'Function', 'Object', 'boolean', 'bigint', 'symbol']); @@ -141,8 +140,8 @@ codes.ERR_INVALID_PACKAGE_TARGET = createError('ERR_INVALID_PACKAGE_TARGET', (pk } return `Invalid "${isImport ? 'imports' : 'exports'}" target ${JSON.stringify(target)} defined for '${key}' in the package config ${pkgPath}package.json${base ? ` imported from ${base}` : ''}${relError ? '; targets must start with "./"' : ''}`; }, Error); -codes.ERR_MODULE_NOT_FOUND = createError('ERR_MODULE_NOT_FOUND', (path, base, type = 'package') => { - return `Cannot find ${type} '${path}' imported from ${base}`; +codes.ERR_MODULE_NOT_FOUND = createError('ERR_MODULE_NOT_FOUND', (path, base, exactUrl = false) => { + return `Cannot find ${exactUrl ? 'module' : 'package'} '${path}' imported from ${base}`; }, Error); codes.ERR_NETWORK_IMPORT_DISALLOWED = createError('ERR_NETWORK_IMPORT_DISALLOWED', "import of '%s' by %s is not supported: %s", Error); codes.ERR_PACKAGE_IMPORT_NOT_DEFINED = createError('ERR_PACKAGE_IMPORT_NOT_DEFINED', (specifier, packagePath, base) => { @@ -164,14 +163,6 @@ codes.ERR_INVALID_ARG_VALUE = createError('ERR_INVALID_ARG_VALUE', (name, value, const type = name.includes('.') ? 'property' : 'argument'; return `The ${type} '${name}' ${reason}. Received ${inspected}`; }, TypeError); -codes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError('ERR_UNSUPPORTED_ESM_URL_SCHEME', (url, supported) => { - let message = `Only URLs with a scheme in: ${formatList(supported)} are supported by the default ESM loader`; - if (isWindows && url.protocol.length === 2) { - message += '. On Windows, absolute paths must be valid file:// URLs'; - } - message += `. Received protocol '${url.protocol}'`; - return message; -}, Error); function createError(sym, value, def) { messages.set(sym, value); return makeNodeErrorWithCode(def, sym); @@ -272,89 +263,93 @@ function determineSpecificType(value) { } return `type ${typeof value} (${inspected})`; } +const hasOwnProperty$1 = {}.hasOwnProperty; +const { + ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 +} = codes; +const cache = new Map(); const reader = { read }; var packageJsonReader = reader; -function read(jsonPath) { - try { - const string = _fs().default.readFileSync(_path().toNamespacedPath(_path().join(_path().dirname(jsonPath), 'package.json')), 'utf8'); - return { - string - }; - } catch (error) { - const exception = error; - if (exception.code === 'ENOENT') { - return { - string: undefined - }; - } - throw exception; - } -} -const { - ERR_INVALID_PACKAGE_CONFIG: ERR_INVALID_PACKAGE_CONFIG$1 -} = codes; -const packageJsonCache = new Map(); -function getPackageConfig(path, specifier, base) { - const existing = packageJsonCache.get(path); - if (existing !== undefined) { +function read(jsonPath, { + base, + specifier +}) { + const existing = cache.get(jsonPath); + if (existing) { return existing; } - const source = packageJsonReader.read(path).string; - if (source === undefined) { - const packageConfig = { - pjsonPath: path, - exists: false, - main: undefined, - name: undefined, - type: 'none', - exports: undefined, - imports: undefined - }; - packageJsonCache.set(path, packageConfig); - return packageConfig; - } - let packageJson; + let string; try { - packageJson = JSON.parse(source); + string = _fs().default.readFileSync(_path().toNamespacedPath(jsonPath), 'utf8'); } catch (error) { const exception = error; - throw new ERR_INVALID_PACKAGE_CONFIG$1(path, (base ? `"${specifier}" from ` : '') + (0, _url().fileURLToPath)(base || specifier), exception.message); + if (exception.code !== 'ENOENT') { + throw exception; + } } - const { - exports, - imports, - main, - name, - type - } = packageJson; - const packageConfig = { - pjsonPath: path, - exists: true, - main: typeof main === 'string' ? main : undefined, - name: typeof name === 'string' ? name : undefined, - type: type === 'module' || type === 'commonjs' ? type : 'none', - exports, - imports: imports && typeof imports === 'object' ? imports : undefined + const result = { + exists: false, + pjsonPath: jsonPath, + main: undefined, + name: undefined, + type: 'none', + exports: undefined, + imports: undefined }; - packageJsonCache.set(path, packageConfig); - return packageConfig; + if (string !== undefined) { + let parsed; + try { + parsed = JSON.parse(string); + } catch (error_) { + const cause = error_; + const error = new ERR_INVALID_PACKAGE_CONFIG$1(jsonPath, (base ? `"${specifier}" from ` : '') + (0, _url().fileURLToPath)(base || specifier), cause.message); + error.cause = cause; + throw error; + } + result.exists = true; + if (hasOwnProperty$1.call(parsed, 'name') && typeof parsed.name === 'string') { + result.name = parsed.name; + } + if (hasOwnProperty$1.call(parsed, 'main') && typeof parsed.main === 'string') { + result.main = parsed.main; + } + if (hasOwnProperty$1.call(parsed, 'exports')) { + result.exports = parsed.exports; + } + if (hasOwnProperty$1.call(parsed, 'imports')) { + result.imports = parsed.imports; + } + if (hasOwnProperty$1.call(parsed, 'type') && (parsed.type === 'commonjs' || parsed.type === 'module')) { + result.type = parsed.type; + } + } + cache.set(jsonPath, result); + return result; } function getPackageScopeConfig(resolved) { - let packageJsonUrl = new (_url().URL)('package.json', resolved); + let packageJSONUrl = new (_url().URL)('package.json', resolved); while (true) { - const packageJsonPath = packageJsonUrl.pathname; - if (packageJsonPath.endsWith('node_modules/package.json')) break; - const packageConfig = getPackageConfig((0, _url().fileURLToPath)(packageJsonUrl), resolved); - if (packageConfig.exists) return packageConfig; - const lastPackageJsonUrl = packageJsonUrl; - packageJsonUrl = new (_url().URL)('../package.json', packageJsonUrl); - if (packageJsonUrl.pathname === lastPackageJsonUrl.pathname) break; - } - const packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl); - const packageConfig = { - pjsonPath: packageJsonPath, + const packageJSONPath = packageJSONUrl.pathname; + if (packageJSONPath.endsWith('node_modules/package.json')) { + break; + } + const packageConfig = packageJsonReader.read((0, _url().fileURLToPath)(packageJSONUrl), { + specifier: resolved + }); + if (packageConfig.exists) { + return packageConfig; + } + const lastPackageJSONUrl = packageJSONUrl; + packageJSONUrl = new (_url().URL)('../package.json', packageJSONUrl); + if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) { + break; + } + } + const packageJSONPath = (0, _url().fileURLToPath)(packageJSONUrl); + return { + pjsonPath: packageJSONPath, exists: false, main: undefined, name: undefined, @@ -362,8 +357,6 @@ function getPackageScopeConfig(resolved) { exports: undefined, imports: undefined }; - packageJsonCache.set(packageJsonPath, packageConfig); - return packageConfig; } function getPackageType(url) { const packageConfig = getPackageScopeConfig(url); @@ -418,7 +411,18 @@ function extname(url) { function getFileProtocolModuleFormat(url, _context, ignoreErrors) { const ext = extname(url); if (ext === '.js') { - return getPackageType(url) === 'module' ? 'module' : 'commonjs'; + const packageType = getPackageType(url); + if (packageType !== 'none') { + return packageType; + } + return 'commonjs'; + } + if (ext === '') { + const packageType = getPackageType(url); + if (packageType === 'none' || packageType === 'commonjs') { + return 'commonjs'; + } + return 'module'; } const format = extensionFormatMap[ext]; if (format) return format; @@ -430,10 +434,11 @@ function getFileProtocolModuleFormat(url, _context, ignoreErrors) { } function getHttpProtocolModuleFormat() {} function defaultGetFormatWithoutErrors(url, context) { - if (!hasOwnProperty.call(protocolHandlers, url.protocol)) { + const protocol = url.protocol; + if (!hasOwnProperty.call(protocolHandlers, protocol)) { return null; } - return protocolHandlers[url.protocol](url, context, true) || null; + return protocolHandlers[protocol](url, context, true) || null; } const { ERR_INVALID_ARG_VALUE @@ -456,7 +461,6 @@ function getConditionsSet(conditions) { return getDefaultConditionsSet(); } const RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace]; -const experimentalNetworkImports = false; const { ERR_NETWORK_IMPORT_DISALLOWED, ERR_INVALID_MODULE_SPECIFIER, @@ -465,8 +469,7 @@ const { ERR_MODULE_NOT_FOUND, ERR_PACKAGE_IMPORT_NOT_DEFINED, ERR_PACKAGE_PATH_NOT_EXPORTED, - ERR_UNSUPPORTED_DIR_IMPORT, - ERR_UNSUPPORTED_ESM_URL_SCHEME + ERR_UNSUPPORTED_DIR_IMPORT } = codes; const own = {}.hasOwnProperty; const invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i; @@ -477,19 +480,29 @@ const encodedSepRegEx = /%2f|%5c/i; const emittedPackageWarnings = new Set(); const doubleSlashRegEx = /[/\\]{2}/; function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) { + if (_process().noDeprecation) { + return; + } const pjsonPath = (0, _url().fileURLToPath)(packageJsonUrl); const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null; _process().emitWarning(`Use of deprecated ${double ? 'double slash' : 'leading or trailing slash matching'} resolving "${target}" for module ` + `request "${request}" ${request === match ? '' : `matched to "${match}" `}in the "${internal ? 'imports' : 'exports'}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${(0, _url().fileURLToPath)(base)}` : ''}.`, 'DeprecationWarning', 'DEP0166'); } function emitLegacyIndexDeprecation(url, packageJsonUrl, base, main) { + if (_process().noDeprecation) { + return; + } const format = defaultGetFormatWithoutErrors(url, { parentURL: base.href }); if (format !== 'module') return; - const path = (0, _url().fileURLToPath)(url.href); + const urlPath = (0, _url().fileURLToPath)(url.href); const pkgPath = (0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)); const basePath = (0, _url().fileURLToPath)(base); - if (main) _process().emitWarning(`Package ${pkgPath} has a "main" field set to ${JSON.stringify(main)}, ` + `excluding the full filename and extension to the resolved file at "${path.slice(pkgPath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is` + 'deprecated for ES modules.', 'DeprecationWarning', 'DEP0151');else _process().emitWarning(`No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${path.slice(pkgPath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, 'DeprecationWarning', 'DEP0151'); + if (!main) { + _process().emitWarning(`No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${urlPath.slice(pkgPath.length)}", imported from ${basePath}.\nDefault "index" lookups for the main are deprecated for ES modules.`, 'DeprecationWarning', 'DEP0151'); + } else if (_path().resolve(pkgPath, main) !== urlPath) { + _process().emitWarning(`Package ${pkgPath} has a "main" field set to "${main}", ` + `excluding the full filename and extension to the resolved file at "${urlPath.slice(pkgPath.length)}", imported from ${basePath}.\n Automatic extension resolution of the "main" field is ` + 'deprecated for ES modules.', 'DeprecationWarning', 'DEP0151'); + } } function tryStatSync(path) { try { @@ -536,8 +549,22 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) { throw new ERR_MODULE_NOT_FOUND((0, _url().fileURLToPath)(new (_url().URL)('.', packageJsonUrl)), (0, _url().fileURLToPath)(base)); } function finalizeResolution(resolved, base, preserveSymlinks) { - if (encodedSepRegEx.exec(resolved.pathname) !== null) throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, 'must not include encoded "/" or "\\" characters', (0, _url().fileURLToPath)(base)); - const filePath = (0, _url().fileURLToPath)(resolved); + if (encodedSepRegEx.exec(resolved.pathname) !== null) { + throw new ERR_INVALID_MODULE_SPECIFIER(resolved.pathname, 'must not include encoded "/" or "\\" characters', (0, _url().fileURLToPath)(base)); + } + let filePath; + try { + filePath = (0, _url().fileURLToPath)(resolved); + } catch (error) { + const cause = error; + Object.defineProperty(cause, 'input', { + value: String(resolved) + }); + Object.defineProperty(cause, 'module', { + value: String(base) + }); + throw cause; + } const stats = tryStatSync(filePath.endsWith('/') ? filePath.slice(-1) : filePath); if (stats.isDirectory()) { const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, (0, _url().fileURLToPath)(base)); @@ -545,7 +572,9 @@ function finalizeResolution(resolved, base, preserveSymlinks) { throw error; } if (!stats.isFile()) { - throw new ERR_MODULE_NOT_FOUND(filePath || resolved.pathname, base && (0, _url().fileURLToPath)(base), 'module'); + const error = new ERR_MODULE_NOT_FOUND(filePath || resolved.pathname, base && (0, _url().fileURLToPath)(base), true); + error.url = String(resolved); + throw error; } if (!preserveSymlinks) { const real = (0, _fs().realpathSync)(filePath); @@ -703,6 +732,9 @@ function isConditionalExportsMainSugar(exports, packageJsonUrl, base) { return isConditionalSugar; } function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) { + if (_process().noDeprecation) { + return; + } const pjsonPath = (0, _url().fileURLToPath)(pjsonUrl); if (emittedPackageWarnings.has(pjsonPath + '|' + match)) return; emittedPackageWarnings.add(pjsonPath + '|' + match); @@ -861,7 +893,10 @@ function packageResolve(specifier, base, conditions) { packageJsonPath = (0, _url().fileURLToPath)(packageJsonUrl); continue; } - const packageConfig = getPackageConfig(packageJsonPath, specifier, base); + const packageConfig = packageJsonReader.read(packageJsonPath, { + base, + specifier + }); if (packageConfig.exports !== undefined && packageConfig.exports !== null) { return packageExportsResolve(packageJsonUrl, packageSubpath, packageConfig, base, conditions); } @@ -870,7 +905,7 @@ function packageResolve(specifier, base, conditions) { } return new (_url().URL)(packageSubpath, packageJsonUrl); } while (packageJsonPath.length !== lastPath.length); - throw new ERR_MODULE_NOT_FOUND(packageName, (0, _url().fileURLToPath)(base)); + throw new ERR_MODULE_NOT_FOUND(packageName, (0, _url().fileURLToPath)(base), false); } function isRelativeSpecifier(specifier) { if (specifier[0] === '.') { @@ -940,18 +975,6 @@ function throwIfInvalidParentURL(parentURL) { throw new codes.ERR_INVALID_ARG_TYPE('parentURL', ['string', 'URL'], parentURL); } } -function throwIfUnsupportedURLProtocol(url) { - const protocol = url.protocol; - if (protocol !== 'file:' && protocol !== 'data:' && protocol !== 'node:') { - throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(url); - } -} -function throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports) { - const protocol = parsed == null ? void 0 : parsed.protocol; - if (protocol && protocol !== 'file:' && protocol !== 'data:' && (!experimentalNetworkImports || protocol !== 'https:' && protocol !== 'http:')) { - throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(parsed, ['file', 'data'].concat(experimentalNetworkImports ? ['https', 'http'] : [])); - } -} function defaultResolve(specifier, context = {}) { const { parentURL @@ -968,7 +991,7 @@ function defaultResolve(specifier, context = {}) { try { parsed = shouldBeTreatedAsRelativeOrAbsolutePath(specifier) ? new (_url().URL)(specifier, parsedParentURL) : new (_url().URL)(specifier); const protocol = parsed.protocol; - if (protocol === 'data:' || experimentalNetworkImports && (protocol === 'https:' || protocol === 'http:')) { + if (protocol === 'data:') { return { url: parsed.href, format: null @@ -980,10 +1003,8 @@ function defaultResolve(specifier, context = {}) { if (parsed && parsed.protocol === 'node:') return { url: specifier }; - throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports); const conditions = getConditionsSet(context.conditions); const url = moduleResolve(specifier, new (_url().URL)(parentURL), conditions, false); - throwIfUnsupportedURLProtocol(url); return { url: url.href, format: defaultGetFormatWithoutErrors(url, { @@ -1001,7 +1022,7 @@ function resolve(specifier, parent) { }).url; } catch (error) { const exception = error; - if (exception.code === 'ERR_UNSUPPORTED_DIR_IMPORT' && typeof exception.url === 'string') { + if ((exception.code === 'ERR_UNSUPPORTED_DIR_IMPORT' || exception.code === 'ERR_MODULE_NOT_FOUND') && typeof exception.url === 'string') { return exception.url; } throw error; diff --git a/tools/node_modules/eslint/node_modules/@babel/core/package.json b/tools/node_modules/eslint/node_modules/@babel/core/package.json index bd8a01027a2d1c..aa2e37e28e29f1 100644 --- a/tools/node_modules/eslint/node_modules/@babel/core/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/core/package.json @@ -1,6 +1,6 @@ { "name": "@babel/core", - "version": "7.23.2", + "version": "7.23.5", "description": "Babel compiler core.", "main": "./lib/index.js", "author": "The Babel Team (https://babel.dev/team)", @@ -47,15 +47,15 @@ }, "dependencies": { "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", "@babel/helper-compilation-targets": "^7.22.15", - "@babel/helper-module-transforms": "^7.23.0", - "@babel/helpers": "^7.23.2", - "@babel/parser": "^7.23.0", + "@babel/helper-module-transforms": "^7.23.3", + "@babel/helpers": "^7.23.5", + "@babel/parser": "^7.23.5", "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0", + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -64,11 +64,11 @@ }, "devDependencies": { "@babel/helper-transform-fixture-test-runner": "^7.22.19", - "@babel/plugin-syntax-flow": "^7.22.5", - "@babel/plugin-transform-flow-strip-types": "^7.22.5", - "@babel/plugin-transform-modules-commonjs": "^7.23.0", - "@babel/preset-env": "^7.23.2", - "@babel/preset-typescript": "^7.23.2", + "@babel/plugin-syntax-flow": "^7.23.3", + "@babel/plugin-transform-flow-strip-types": "^7.23.3", + "@babel/plugin-transform-modules-commonjs": "^7.23.3", + "@babel/preset-env": "^7.23.5", + "@babel/preset-typescript": "^7.23.3", "@jridgewell/trace-mapping": "^0.3.17", "@types/convert-source-map": "^2.0.0", "@types/debug": "^4.1.0", diff --git a/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/experimental-worker.cjs b/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/experimental-worker.cjs index 00bcd0cbfdd6f0..dd586f59ce450f 100644 --- a/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/experimental-worker.cjs +++ b/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/experimental-worker.cjs @@ -13,7 +13,7 @@ const { const client = new WorkerClient(); exports.meta = { name: "@babel/eslint-parser/experimental-worker", - version: "7.22.15" + version: "7.23.3" }; exports.parseForESLint = function (code, options = {}) { const normalizedOptions = normalizeESLintConfig(options); diff --git a/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/index.cjs b/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/index.cjs index 08da6a3a48b3c6..addf84100311d5 100644 --- a/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/index.cjs +++ b/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/index.cjs @@ -10,7 +10,7 @@ const { const client = new LocalClient(); exports.meta = { name: "@babel/eslint-parser", - version: "7.22.15" + version: "7.23.3" }; exports.parse = function (code, options = {}) { return baseParse(code, normalizeESLintConfig(options), client); diff --git a/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/parse.cjs b/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/parse.cjs index f91eb4d0670e7e..3aa0973930af93 100644 --- a/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/parse.cjs +++ b/tools/node_modules/eslint/node_modules/@babel/eslint-parser/lib/parse.cjs @@ -15,13 +15,12 @@ const babelParser = require((((v, w) => (v = v.split("."), w = w.split("."), +v[ })); let isRunningMinSupportedCoreVersion = null; module.exports = function parse(code, options, client) { - let minSupportedCoreVersion = ">=7.2.0"; - ; + const minSupportedCoreVersion = ">=7.2.0"; if (typeof isRunningMinSupportedCoreVersion !== "boolean") { isRunningMinSupportedCoreVersion = semver.satisfies(client.getVersion(), minSupportedCoreVersion); } if (!isRunningMinSupportedCoreVersion) { - throw new Error(`@babel/eslint-parser@${"7.22.15"} does not support @babel/core@${client.getVersion()}. Please upgrade to @babel/core@${minSupportedCoreVersion}.`); + throw new Error(`@babel/eslint-parser@${"7.23.3"} does not support @babel/core@${client.getVersion()}. Please upgrade to @babel/core@${minSupportedCoreVersion}.`); } const { ast, diff --git a/tools/node_modules/eslint/node_modules/@babel/eslint-parser/package.json b/tools/node_modules/eslint/node_modules/@babel/eslint-parser/package.json index 460ddff14f2019..65d772facbecda 100644 --- a/tools/node_modules/eslint/node_modules/@babel/eslint-parser/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/eslint-parser/package.json @@ -1,6 +1,6 @@ { "name": "@babel/eslint-parser", - "version": "7.22.15", + "version": "7.23.3", "description": "ESLint parser that allows for linting of experimental syntax transformed by Babel", "author": "The Babel Team (https://babel.dev/team)", "license": "MIT", @@ -36,7 +36,7 @@ "semver": "^6.3.1" }, "devDependencies": { - "@babel/core": "^7.22.15", + "@babel/core": "^7.23.3", "dedent": "^0.7.0", "eslint": "^8.22.0" } diff --git a/tools/node_modules/eslint/node_modules/@babel/generator/lib/buffer.js b/tools/node_modules/eslint/node_modules/@babel/generator/lib/buffer.js index b9574f87de8869..aad6c0bf36cbac 100644 --- a/tools/node_modules/eslint/node_modules/@babel/generator/lib/buffer.js +++ b/tools/node_modules/eslint/node_modules/@babel/generator/lib/buffer.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; class Buffer { - constructor(map) { + constructor(map, indentChar) { this._map = null; this._buf = ""; this._str = ""; @@ -14,6 +14,8 @@ class Buffer { this._queue = []; this._queueCursor = 0; this._canMarkIdName = true; + this._indentChar = ""; + this._fastIndentations = []; this._position = { line: 1, column: 0 @@ -26,6 +28,10 @@ class Buffer { filename: undefined }; this._map = map; + this._indentChar = indentChar; + for (let i = 0; i < 64; i++) { + this._fastIndentations.push(indentChar.repeat(i)); + } this._allocQueue(); } _allocQueue() { @@ -116,8 +122,9 @@ class Buffer { const sourcePosition = this._sourcePosition; this._pushQueue(char, 1, sourcePosition.line, sourcePosition.column, sourcePosition.filename); } - queueIndentation(char, repeat) { - this._pushQueue(char, repeat, undefined, undefined, undefined); + queueIndentation(repeat) { + if (repeat === 0) return; + this._pushQueue(-1, repeat, undefined, undefined, undefined); } _flush() { const queueCursor = this._queueCursor; @@ -130,7 +137,16 @@ class Buffer { } _appendChar(char, repeat, sourcePos) { this._last = char; - this._str += repeat > 1 ? String.fromCharCode(char).repeat(repeat) : String.fromCharCode(char); + if (char === -1) { + const fastIndentation = this._fastIndentations[repeat]; + if (fastIndentation !== undefined) { + this._str += fastIndentation; + } else { + this._str += repeat > 1 ? this._indentChar.repeat(repeat) : this._indentChar; + } + } else { + this._str += repeat > 1 ? String.fromCharCode(char).repeat(repeat) : String.fromCharCode(char); + } if (char !== 10) { this._mark(sourcePos.line, sourcePos.column, sourcePos.identifierName, sourcePos.identifierNamePos, sourcePos.filename); this._position.column += repeat; @@ -188,7 +204,7 @@ class Buffer { } _mark(line, column, identifierName, identifierNamePos, filename) { var _this$_map; - (_this$_map = this._map) == null ? void 0 : _this$_map.mark(this._position, line, column, identifierName, identifierNamePos, filename); + (_this$_map = this._map) == null || _this$_map.mark(this._position, line, column, identifierName, identifierNamePos, filename); } removeTrailingNewline() { const queueCursor = this._queueCursor; diff --git a/tools/node_modules/eslint/node_modules/@babel/generator/lib/generators/statements.js b/tools/node_modules/eslint/node_modules/@babel/generator/lib/generators/statements.js index dee0ad812e0d7c..4364c95100e232 100644 --- a/tools/node_modules/eslint/node_modules/@babel/generator/lib/generators/statements.js +++ b/tools/node_modules/eslint/node_modules/@babel/generator/lib/generators/statements.js @@ -117,10 +117,8 @@ function ForXStatement(node) { this.tokenChar(41); this.printBlock(node); } -const ForInStatement = ForXStatement; -exports.ForInStatement = ForInStatement; -const ForOfStatement = ForXStatement; -exports.ForOfStatement = ForOfStatement; +const ForInStatement = exports.ForInStatement = ForXStatement; +const ForOfStatement = exports.ForOfStatement = ForXStatement; function DoWhileStatement(node) { this.word("do"); this.space(); diff --git a/tools/node_modules/eslint/node_modules/@babel/generator/lib/generators/types.js b/tools/node_modules/eslint/node_modules/@babel/generator/lib/generators/types.js index a9ddea2ff1706a..191db56c79538f 100644 --- a/tools/node_modules/eslint/node_modules/@babel/generator/lib/generators/types.js +++ b/tools/node_modules/eslint/node_modules/@babel/generator/lib/generators/types.js @@ -158,15 +158,16 @@ function NullLiteral() { function NumericLiteral(node) { const raw = this.getPossibleRaw(node); const opts = this.format.jsescOption; - const value = node.value + ""; + const value = node.value; + const str = value + ""; if (opts.numbers) { - this.number(_jsesc(node.value, opts)); + this.number(_jsesc(value, opts), value); } else if (raw == null) { - this.number(value); + this.number(str, value); } else if (this.format.minified) { - this.number(raw.length < value.length ? raw : value); + this.number(raw.length < str.length ? raw : str, value); } else { - this.number(raw); + this.number(raw, value); } } function StringLiteral(node) { diff --git a/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/index.js b/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/index.js index 70106ba099b403..385a7ad15f2dc6 100644 --- a/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/index.js @@ -18,13 +18,13 @@ const { isNewExpression } = _t; function expandAliases(obj) { - const newObj = {}; + const map = new Map(); function add(type, func) { - const fn = newObj[type]; - newObj[type] = fn ? function (node, parent, stack) { - const result = fn(node, parent, stack); - return result == null ? func(node, parent, stack) : result; - } : func; + const fn = map.get(type); + map.set(type, fn ? function (node, parent, stack) { + var _fn; + return (_fn = fn(node, parent, stack)) != null ? _fn : func(node, parent, stack); + } : func); } for (const type of Object.keys(obj)) { const aliases = FLIPPED_ALIAS_KEYS[type]; @@ -36,14 +36,10 @@ function expandAliases(obj) { add(type, obj[type]); } } - return newObj; + return map; } const expandedParens = expandAliases(parens); const expandedWhitespaceNodes = expandAliases(whitespace.nodes); -function find(obj, node, parent, printStack) { - const fn = obj[node.type]; - return fn ? fn(node, parent, printStack) : null; -} function isOrHasCallExpression(node) { if (isCallExpression(node)) { return true; @@ -51,11 +47,12 @@ function isOrHasCallExpression(node) { return isMemberExpression(node) && isOrHasCallExpression(node.object); } function needsWhitespace(node, parent, type) { + var _expandedWhitespaceNo; if (!node) return false; if (isExpressionStatement(node)) { node = node.expression; } - const flag = find(expandedWhitespaceNodes, node, parent); + const flag = (_expandedWhitespaceNo = expandedWhitespaceNodes.get(node.type)) == null ? void 0 : _expandedWhitespaceNo(node, parent); if (typeof flag === "number") { return (flag & type) !== 0; } @@ -68,11 +65,12 @@ function needsWhitespaceAfter(node, parent) { return needsWhitespace(node, parent, 2); } function needsParens(node, parent, printStack) { + var _expandedParens$get; if (!parent) return false; if (isNewExpression(parent) && parent.callee === node) { if (isOrHasCallExpression(node)) return true; } - return find(expandedParens, node, parent, printStack); + return (_expandedParens$get = expandedParens.get(node.type)) == null ? void 0 : _expandedParens$get(node, parent, printStack); } //# sourceMappingURL=index.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/parentheses.js b/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/parentheses.js index 4656a67ce77f07..475e33acc6e530 100644 --- a/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/parentheses.js +++ b/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/parentheses.js @@ -31,97 +31,35 @@ var _t = require("@babel/types"); const { isArrayTypeAnnotation, isArrowFunctionExpression, - isAssignmentExpression, - isAwaitExpression, - isBinary, isBinaryExpression, - isUpdateExpression, isCallExpression, - isClass, - isClassExpression, - isConditional, - isConditionalExpression, isExportDeclaration, - isExportDefaultDeclaration, - isExpressionStatement, - isFor, - isForInStatement, isForOfStatement, - isForStatement, - isFunctionExpression, - isIfStatement, isIndexedAccessType, - isIntersectionTypeAnnotation, - isLogicalExpression, isMemberExpression, - isNewExpression, - isNullableTypeAnnotation, isObjectPattern, - isOptionalCallExpression, isOptionalMemberExpression, - isReturnStatement, - isSequenceExpression, - isSwitchStatement, - isTSArrayType, - isTSAsExpression, - isTSInstantiationExpression, - isTSIntersectionType, - isTSNonNullExpression, - isTSOptionalType, - isTSRestType, - isTSTypeAssertion, - isTSUnionType, - isTaggedTemplateExpression, - isThrowStatement, - isTypeAnnotation, - isUnaryLike, - isUnionTypeAnnotation, - isVariableDeclarator, - isWhileStatement, - isYieldExpression, - isTSSatisfiesExpression + isYieldExpression } = _t; -const PRECEDENCE = { - "||": 0, - "??": 0, - "|>": 0, - "&&": 1, - "|": 2, - "^": 3, - "&": 4, - "==": 5, - "===": 5, - "!=": 5, - "!==": 5, - "<": 6, - ">": 6, - "<=": 6, - ">=": 6, - in: 6, - instanceof: 6, - ">>": 7, - "<<": 7, - ">>>": 7, - "+": 8, - "-": 8, - "*": 9, - "/": 9, - "%": 9, - "**": 10 -}; -function isTSTypeExpression(node) { - return isTSAsExpression(node) || isTSSatisfiesExpression(node) || isTSTypeAssertion(node); +const PRECEDENCE = new Map([["||", 0], ["??", 0], ["|>", 0], ["&&", 1], ["|", 2], ["^", 3], ["&", 4], ["==", 5], ["===", 5], ["!=", 5], ["!==", 5], ["<", 6], [">", 6], ["<=", 6], [">=", 6], ["in", 6], ["instanceof", 6], [">>", 7], ["<<", 7], [">>>", 7], ["+", 8], ["-", 8], ["*", 9], ["/", 9], ["%", 9], ["**", 10]]); +function isTSTypeExpression(nodeType) { + return nodeType === "TSAsExpression" || nodeType === "TSSatisfiesExpression" || nodeType === "TSTypeAssertion"; } -const isClassExtendsClause = (node, parent) => isClass(parent, { - superClass: node -}); -const hasPostfixPart = (node, parent) => (isMemberExpression(parent) || isOptionalMemberExpression(parent)) && parent.object === node || (isCallExpression(parent) || isOptionalCallExpression(parent) || isNewExpression(parent)) && parent.callee === node || isTaggedTemplateExpression(parent) && parent.tag === node || isTSNonNullExpression(parent); +const isClassExtendsClause = (node, parent) => { + const parentType = parent.type; + return (parentType === "ClassDeclaration" || parentType === "ClassExpression") && parent.superClass === node; +}; +const hasPostfixPart = (node, parent) => { + const parentType = parent.type; + return (parentType === "MemberExpression" || parentType === "OptionalMemberExpression") && parent.object === node || (parentType === "CallExpression" || parentType === "OptionalCallExpression" || parentType === "NewExpression") && parent.callee === node || parentType === "TaggedTemplateExpression" && parent.tag === node || parentType === "TSNonNullExpression"; +}; function NullableTypeAnnotation(node, parent) { return isArrayTypeAnnotation(parent); } function FunctionTypeAnnotation(node, parent, printStack) { if (printStack.length < 3) return; - return isUnionTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isArrayTypeAnnotation(parent) || isTypeAnnotation(parent) && isArrowFunctionExpression(printStack[printStack.length - 3]); + const parentType = parent.type; + return parentType === "UnionTypeAnnotation" || parentType === "IntersectionTypeAnnotation" || parentType === "ArrayTypeAnnotation" || parentType === "TypeAnnotation" && isArrowFunctionExpression(printStack[printStack.length - 3]); } function UpdateExpression(node, parent) { return hasPostfixPart(node, parent) || isClassExtendsClause(node, parent); @@ -133,67 +71,70 @@ function DoExpression(node, parent, printStack) { return !node.async && isFirstInContext(printStack, 1); } function Binary(node, parent) { - if (node.operator === "**" && isBinaryExpression(parent, { - operator: "**" - })) { + const parentType = parent.type; + if (node.operator === "**" && parentType === "BinaryExpression" && parent.operator === "**") { return parent.left === node; } if (isClassExtendsClause(node, parent)) { return true; } - if (hasPostfixPart(node, parent) || isUnaryLike(parent) || isAwaitExpression(parent)) { + if (hasPostfixPart(node, parent) || parentType === "UnaryExpression" || parentType === "SpreadElement" || parentType === "AwaitExpression") { return true; } - if (isBinary(parent)) { - const parentOp = parent.operator; - const parentPos = PRECEDENCE[parentOp]; - const nodeOp = node.operator; - const nodePos = PRECEDENCE[nodeOp]; - if (parentPos === nodePos && parent.right === node && !isLogicalExpression(parent) || parentPos > nodePos) { + if (parentType === "BinaryExpression" || parentType === "LogicalExpression") { + const parentPos = PRECEDENCE.get(parent.operator); + const nodePos = PRECEDENCE.get(node.operator); + if (parentPos === nodePos && parent.right === node && parentType !== "LogicalExpression" || parentPos > nodePos) { return true; } } + return undefined; } function UnionTypeAnnotation(node, parent) { - return isArrayTypeAnnotation(parent) || isNullableTypeAnnotation(parent) || isIntersectionTypeAnnotation(parent) || isUnionTypeAnnotation(parent); + const parentType = parent.type; + return parentType === "ArrayTypeAnnotation" || parentType === "NullableTypeAnnotation" || parentType === "IntersectionTypeAnnotation" || parentType === "UnionTypeAnnotation"; } function OptionalIndexedAccessType(node, parent) { - return isIndexedAccessType(parent, { - objectType: node - }); + return isIndexedAccessType(parent) && parent.objectType === node; } function TSAsExpression() { return true; } function TSUnionType(node, parent) { - return isTSArrayType(parent) || isTSOptionalType(parent) || isTSIntersectionType(parent) || isTSUnionType(parent) || isTSRestType(parent); + const parentType = parent.type; + return parentType === "TSArrayType" || parentType === "TSOptionalType" || parentType === "TSIntersectionType" || parentType === "TSUnionType" || parentType === "TSRestType"; } function TSInferType(node, parent) { - return isTSArrayType(parent) || isTSOptionalType(parent); + const parentType = parent.type; + return parentType === "TSArrayType" || parentType === "TSOptionalType"; } function TSInstantiationExpression(node, parent) { - return (isCallExpression(parent) || isOptionalCallExpression(parent) || isNewExpression(parent) || isTSInstantiationExpression(parent)) && !!parent.typeParameters; + const parentType = parent.type; + return (parentType === "CallExpression" || parentType === "OptionalCallExpression" || parentType === "NewExpression" || parentType === "TSInstantiationExpression") && !!parent.typeParameters; } function BinaryExpression(node, parent) { - return node.operator === "in" && (isVariableDeclarator(parent) || isFor(parent)); + if (node.operator === "in") { + const parentType = parent.type; + return parentType === "VariableDeclarator" || parentType === "ForStatement" || parentType === "ForInStatement" || parentType === "ForOfStatement"; + } + return false; } function SequenceExpression(node, parent) { - if (isForStatement(parent) || isThrowStatement(parent) || isReturnStatement(parent) || isIfStatement(parent) && parent.test === node || isWhileStatement(parent) && parent.test === node || isForInStatement(parent) && parent.right === node || isSwitchStatement(parent) && parent.discriminant === node || isExpressionStatement(parent) && parent.expression === node) { + const parentType = parent.type; + if (parentType === "ForStatement" || parentType === "ThrowStatement" || parentType === "ReturnStatement" || parentType === "IfStatement" && parent.test === node || parentType === "WhileStatement" && parent.test === node || parentType === "ForInStatement" && parent.right === node || parentType === "SwitchStatement" && parent.discriminant === node || parentType === "ExpressionStatement" && parent.expression === node) { return false; } return true; } function YieldExpression(node, parent) { - return isBinary(parent) || isUnaryLike(parent) || hasPostfixPart(node, parent) || isAwaitExpression(parent) && isYieldExpression(node) || isConditionalExpression(parent) && node === parent.test || isClassExtendsClause(node, parent); + const parentType = parent.type; + return parentType === "BinaryExpression" || parentType === "LogicalExpression" || parentType === "UnaryExpression" || parentType === "SpreadElement" || hasPostfixPart(node, parent) || parentType === "AwaitExpression" && isYieldExpression(node) || parentType === "ConditionalExpression" && node === parent.test || isClassExtendsClause(node, parent); } function ClassExpression(node, parent, printStack) { return isFirstInContext(printStack, 1 | 4); } function UnaryLike(node, parent) { - return hasPostfixPart(node, parent) || isBinaryExpression(parent, { - operator: "**", - left: node - }) || isClassExtendsClause(node, parent); + return hasPostfixPart(node, parent) || isBinaryExpression(parent) && parent.operator === "**" && parent.left === node || isClassExtendsClause(node, parent); } function FunctionExpression(node, parent, printStack) { return isFirstInContext(printStack, 1 | 4); @@ -202,19 +143,14 @@ function ArrowFunctionExpression(node, parent) { return isExportDeclaration(parent) || ConditionalExpression(node, parent); } function ConditionalExpression(node, parent) { - if (isUnaryLike(parent) || isBinary(parent) || isConditionalExpression(parent, { - test: node - }) || isAwaitExpression(parent) || isTSTypeExpression(parent)) { + const parentType = parent.type; + if (parentType === "UnaryExpression" || parentType === "SpreadElement" || parentType === "BinaryExpression" || parentType === "LogicalExpression" || parentType === "ConditionalExpression" && parent.test === node || parentType === "AwaitExpression" || isTSTypeExpression(parentType)) { return true; } return UnaryLike(node, parent); } function OptionalMemberExpression(node, parent) { - return isCallExpression(parent, { - callee: node - }) || isMemberExpression(parent, { - object: node - }); + return isCallExpression(parent) && parent.callee === node || isMemberExpression(parent) && parent.object === node; } function AssignmentExpression(node, parent) { if (isObjectPattern(node.left)) { @@ -224,25 +160,26 @@ function AssignmentExpression(node, parent) { } } function LogicalExpression(node, parent) { - if (isTSTypeExpression(parent)) return true; + const parentType = parent.type; + if (isTSTypeExpression(parentType)) return true; + if (parentType !== "LogicalExpression") return false; switch (node.operator) { case "||": - if (!isLogicalExpression(parent)) return false; return parent.operator === "??" || parent.operator === "&&"; case "&&": - return isLogicalExpression(parent, { - operator: "??" - }); + return parent.operator === "??"; case "??": - return isLogicalExpression(parent) && parent.operator !== "??"; + return parent.operator !== "??"; } } function Identifier(node, parent, printStack) { var _node$extra; - if ((_node$extra = node.extra) != null && _node$extra.parenthesized && isAssignmentExpression(parent, { - left: node - }) && (isFunctionExpression(parent.right) || isClassExpression(parent.right)) && parent.right.id == null) { - return true; + const parentType = parent.type; + if ((_node$extra = node.extra) != null && _node$extra.parenthesized && parentType === "AssignmentExpression" && parent.left === node) { + const rightType = parent.right.type; + if ((rightType === "FunctionExpression" || rightType === "ClassExpression") && parent.right.id == null) { + return true; + } } if (node.name === "let") { const isFollowedByBracket = isMemberExpression(parent, { @@ -270,28 +207,11 @@ function isFirstInContext(printStack, checkParam) { i--; let parent = printStack[i]; while (i >= 0) { - if (expressionStatement && isExpressionStatement(parent, { - expression: node - }) || exportDefault && isExportDefaultDeclaration(parent, { - declaration: node - }) || arrowBody && isArrowFunctionExpression(parent, { - body: node - }) || forHead && isForStatement(parent, { - init: node - }) || forInHead && isForInStatement(parent, { - left: node - }) || forOfHead && isForOfStatement(parent, { - left: node - })) { + const parentType = parent.type; + if (expressionStatement && parentType === "ExpressionStatement" && parent.expression === node || exportDefault && parentType === "ExportDefaultDeclaration" && node === parent.declaration || arrowBody && parentType === "ArrowFunctionExpression" && parent.body === node || forHead && parentType === "ForStatement" && parent.init === node || forInHead && parentType === "ForInStatement" && parent.left === node || forOfHead && parentType === "ForOfStatement" && parent.left === node) { return true; } - if (i > 0 && (hasPostfixPart(node, parent) && !isNewExpression(parent) || isSequenceExpression(parent) && parent.expressions[0] === node || isUpdateExpression(parent) && !parent.prefix || isConditional(parent, { - test: node - }) || isBinary(parent, { - left: node - }) || isAssignmentExpression(parent, { - left: node - }))) { + if (i > 0 && (hasPostfixPart(node, parent) && parentType !== "NewExpression" || parentType === "SequenceExpression" && parent.expressions[0] === node || parentType === "UpdateExpression" && !parent.prefix || parentType === "ConditionalExpression" && parent.test === node || (parentType === "BinaryExpression" || parentType === "LogicalExpression") && parent.left === node || parentType === "AssignmentExpression" && parent.left === node)) { node = parent; i--; parent = printStack[i]; diff --git a/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/whitespace.js b/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/whitespace.js index 17daf359e42611..181b9566099e13 100644 --- a/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/whitespace.js +++ b/tools/node_modules/eslint/node_modules/@babel/generator/lib/node/whitespace.js @@ -63,7 +63,7 @@ function isHelper(node) { function isType(node) { return isLiteral(node) || isObjectExpression(node) || isArrayExpression(node) || isIdentifier(node) || isMemberExpression(node); } -const nodes = { +const nodes = exports.nodes = { AssignmentExpression(node) { const state = crawl(node.right); if (state.hasCall && state.hasHelper || state.hasFunction) { @@ -112,7 +112,6 @@ const nodes = { } } }; -exports.nodes = nodes; nodes.ObjectProperty = nodes.ObjectTypeProperty = nodes.ObjectMethod = function (node, parent) { if (parent.properties[0] === node) { return 1; diff --git a/tools/node_modules/eslint/node_modules/@babel/generator/lib/printer.js b/tools/node_modules/eslint/node_modules/@babel/generator/lib/printer.js index cc2faeb07c1182..848b3d24beea11 100644 --- a/tools/node_modules/eslint/node_modules/@babel/generator/lib/printer.js +++ b/tools/node_modules/eslint/node_modules/@babel/generator/lib/printer.js @@ -17,10 +17,8 @@ const { } = _t; const SCIENTIFIC_NOTATION = /e/i; const ZERO_DECIMAL_INTEGER = /\.0+$/; -const NON_DECIMAL_LITERAL = /^0[box]/; -const PURE_ANNOTATION_RE = /^\s*[@#]__PURE__\s*$/; const HAS_NEWLINE = /[\n\r\u2028\u2029]/; -const HAS_BlOCK_COMMENT_END = /\*\//; +const HAS_NEWLINE_OR_BlOCK_COMMENT_END = /[\n\r\u2028\u2029]|\*\//; const { needsParens } = n; @@ -29,7 +27,6 @@ class Printer { this.inForStatementInitCounter = 0; this._printStack = []; this._indent = 0; - this._indentChar = 0; this._indentRepeat = 0; this._insideAux = false; this._parenPushNewlineState = null; @@ -42,10 +39,9 @@ class Printer { this._endsWithInnerRaw = false; this._indentInnerComments = true; this.format = format; - this._buf = new _buffer.default(map); - this._indentChar = format.indent.style.charCodeAt(0); this._indentRepeat = format.indent.style.length; this._inputMap = map == null ? void 0 : map._inputMap; + this._buf = new _buffer.default(map, format.indent.style[0]); } generate(ast) { this.print(ast); @@ -101,9 +97,16 @@ class Printer { this._endsWithWord = true; this._noLineTerminator = noLineTerminatorAfter; } - number(str) { + number(str, number) { + function isNonDecimalLiteral(str) { + if (str.length > 2 && str.charCodeAt(0) === 48) { + const secondChar = str.charCodeAt(1); + return secondChar === 98 || secondChar === 111 || secondChar === 120; + } + return false; + } this.word(str); - this._endsWithInteger = Number.isInteger(+str) && !NON_DECIMAL_LITERAL.test(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str.charCodeAt(str.length - 1) !== 46; + this._endsWithInteger = Number.isInteger(number) && !isNonDecimalLiteral(str) && !SCIENTIFIC_NOTATION.test(str) && !ZERO_DECIMAL_INTEGER.test(str) && str.charCodeAt(str.length - 1) !== 46; } token(str, maybeNewline = false) { this._maybePrintInnerComments(); @@ -215,7 +218,7 @@ class Printer { } _maybeIndent(firstChar) { if (this._indent && firstChar !== 10 && this.endsWith(10)) { - this._buf.queueIndentation(this._indentChar, this._getIndent()); + this._buf.queueIndentation(this._getIndent()); } } _shouldIndent(firstChar) { @@ -254,9 +257,7 @@ class Printer { } const chaPost = str.charCodeAt(i + 1); if (chaPost === 42) { - if (PURE_ANNOTATION_RE.test(str.slice(i + 2, len - 2))) { - return; - } + return; } else if (chaPost !== 47) { this._parenPushNewlineState = null; return; @@ -305,7 +306,7 @@ class Printer { } } print(node, parent, noLineTerminatorAfter, trailingCommentsLineOffset, forceParens) { - var _node$extra; + var _node$extra, _node$leadingComments; if (!node) return; this._endsWithInnerRaw = false; const nodeType = node.type; @@ -322,7 +323,24 @@ class Printer { const oldInAux = this._insideAux; this._insideAux = node.loc == undefined; this._maybeAddAuxComment(this._insideAux && !oldInAux); - const shouldPrintParens = forceParens || format.retainFunctionParens && nodeType === "FunctionExpression" && ((_node$extra = node.extra) == null ? void 0 : _node$extra.parenthesized) || needsParens(node, parent, this._printStack); + const parenthesized = (_node$extra = node.extra) == null ? void 0 : _node$extra.parenthesized; + let shouldPrintParens = forceParens || parenthesized && format.retainFunctionParens && nodeType === "FunctionExpression" || needsParens(node, parent, this._printStack); + if (!shouldPrintParens && parenthesized && (_node$leadingComments = node.leadingComments) != null && _node$leadingComments.length && node.leadingComments[0].type === "CommentBlock") { + const parentType = parent == null ? void 0 : parent.type; + switch (parentType) { + case "ExpressionStatement": + case "VariableDeclarator": + case "AssignmentExpression": + case "ReturnStatement": + break; + case "CallExpression": + case "OptionalCallExpression": + case "NewExpression": + if (parent.callee !== node) break; + default: + shouldPrintParens = true; + } + } if (shouldPrintParens) { this.tokenChar(40); this._endsWithInnerRaw = false; @@ -402,9 +420,13 @@ class Printer { if (!node) continue; if (opts.statement) this._printNewline(i === 0, newlineOpts); this.print(node, parent, undefined, opts.trailingCommentsLineOffset || 0); - opts.iterator == null ? void 0 : opts.iterator(node, i); - if (i < len - 1) separator == null ? void 0 : separator(); + opts.iterator == null || opts.iterator(node, i); + if (i < len - 1) separator == null || separator(); if (opts.statement) { + var _node$trailingComment; + if (!((_node$trailingComment = node.trailingComments) != null && _node$trailingComment.length)) { + this._lastCommentLine = 0; + } if (i + 1 === len) { this.newline(1); } else { @@ -507,7 +529,7 @@ class Printer { _shouldPrintComment(comment) { if (comment.ignore) return 0; if (this._printedComments.has(comment)) return 0; - if (this._noLineTerminator && (HAS_NEWLINE.test(comment.value) || HAS_BlOCK_COMMENT_END.test(comment.value))) { + if (this._noLineTerminator && HAS_NEWLINE_OR_BlOCK_COMMENT_END.test(comment.value)) { return 2; } this._printedComments.add(comment); @@ -529,6 +551,13 @@ class Printer { } let val; if (isBlockComment) { + const { + _parenPushNewlineState + } = this; + if ((_parenPushNewlineState == null ? void 0 : _parenPushNewlineState.printed) === false && HAS_NEWLINE.test(comment.value)) { + this.tokenChar(40); + _parenPushNewlineState.printed = true; + } val = `/*${comment.value}*/`; if (this.format.indent.adjustMultilineComment) { var _comment$loc; @@ -537,11 +566,15 @@ class Printer { const newlineRegex = new RegExp("\\n\\s{1," + offset + "}", "g"); val = val.replace(newlineRegex, "\n"); } - let indentSize = this.format.retainLines ? 0 : this._buf.getCurrentColumn(); - if (this._shouldIndent(47) || this.format.retainLines) { - indentSize += this._getIndent(); + if (this.format.concise) { + val = val.replace(/\n(?!$)/g, `\n`); + } else { + let indentSize = this.format.retainLines ? 0 : this._buf.getCurrentColumn(); + if (this._shouldIndent(47) || this.format.retainLines) { + indentSize += this._getIndent(); + } + val = val.replace(/\n(?!$)/g, `\n${" ".repeat(indentSize)}`); } - val = val.replace(/\n(?!$)/g, `\n${" ".repeat(indentSize)}`); } } else if (!noLineTerminator) { val = `//${comment.value}`; @@ -641,8 +674,7 @@ Object.assign(Printer.prototype, generatorFunctions); { Printer.prototype.Noop = function Noop() {}; } -var _default = Printer; -exports.default = _default; +var _default = exports.default = Printer; function commaSeparator() { this.tokenChar(44); this.space(); diff --git a/tools/node_modules/eslint/node_modules/@babel/generator/package.json b/tools/node_modules/eslint/node_modules/@babel/generator/package.json index b4c036e9e5dd36..04061c6322f89b 100644 --- a/tools/node_modules/eslint/node_modules/@babel/generator/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/generator/package.json @@ -1,6 +1,6 @@ { "name": "@babel/generator", - "version": "7.23.0", + "version": "7.23.5", "description": "Turns an AST into code.", "author": "The Babel Team (https://babel.dev/team)", "license": "MIT", @@ -19,14 +19,14 @@ "lib" ], "dependencies": { - "@babel/types": "^7.23.0", + "@babel/types": "^7.23.5", "@jridgewell/gen-mapping": "^0.3.2", "@jridgewell/trace-mapping": "^0.3.17", "jsesc": "^2.5.1" }, "devDependencies": { - "@babel/helper-fixtures": "^7.22.19", - "@babel/parser": "^7.23.0", + "@babel/helper-fixtures": "^7.23.4", + "@babel/parser": "^7.23.5", "@jridgewell/sourcemap-codec": "^1.4.15", "@types/jsesc": "^2.5.0", "charcodes": "^0.2.0" diff --git a/tools/node_modules/eslint/node_modules/@babel/helper-module-transforms/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/helper-module-transforms/lib/index.js index e002e265d1c2cd..35a44be5890fb5 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helper-module-transforms/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/helper-module-transforms/lib/index.js @@ -353,7 +353,8 @@ function buildExportInitializationStatements(programPath, metadata, wrapReferenc } const InitTemplate = { computed: _core.template.expression`EXPORTS["NAME"] = VALUE`, - default: _core.template.expression`EXPORTS.NAME = VALUE` + default: _core.template.expression`EXPORTS.NAME = VALUE`, + define: _core.template.expression`Object.defineProperty(EXPORTS, "NAME", { enumerable:true, value: void 0, writable: true })["NAME"] = VALUE` }; function buildInitStatement(metadata, exportNames, initExpr) { const { @@ -366,11 +367,13 @@ function buildInitStatement(metadata, exportNames, initExpr) { NAME: exportName, VALUE: acc }; + if (exportName === "__proto__") { + return InitTemplate.define(params); + } if (stringSpecifiers.has(exportName)) { return InitTemplate.computed(params); - } else { - return InitTemplate.default(params); } + return InitTemplate.default(params); }, initExpr)); } diff --git a/tools/node_modules/eslint/node_modules/@babel/helper-module-transforms/package.json b/tools/node_modules/eslint/node_modules/@babel/helper-module-transforms/package.json index 63f51e03bc25d5..895e0ddab9b7f6 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helper-module-transforms/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/helper-module-transforms/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helper-module-transforms", - "version": "7.23.0", + "version": "7.23.3", "description": "Babel helper functions for implementing ES6 module transformations", "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-helper-module-transforms", @@ -22,8 +22,8 @@ "@babel/helper-validator-identifier": "^7.22.20" }, "devDependencies": { - "@babel/core": "^7.23.0", - "@babel/traverse": "^7.23.0" + "@babel/core": "^7.23.3", + "@babel/traverse": "^7.23.3" }, "peerDependencies": { "@babel/core": "^7.0.0" diff --git a/tools/node_modules/eslint/node_modules/@babel/helper-string-parser/package.json b/tools/node_modules/eslint/node_modules/@babel/helper-string-parser/package.json index a977dea9b17d39..f05afe5b87664e 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helper-string-parser/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/helper-string-parser/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helper-string-parser", - "version": "7.22.5", + "version": "7.23.4", "description": "A utility package to parse strings", "repository": { "type": "git", diff --git a/tools/node_modules/eslint/node_modules/@babel/helper-validator-option/package.json b/tools/node_modules/eslint/node_modules/@babel/helper-validator-option/package.json index c6ed03172f2ce8..8e58a9c2222287 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helper-validator-option/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/helper-validator-option/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helper-validator-option", - "version": "7.22.15", + "version": "7.23.5", "description": "Validate plugin/preset options", "repository": { "type": "git", diff --git a/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers-generated.js b/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers-generated.js index d06e9b31291a06..9e97850870319d 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers-generated.js +++ b/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers-generated.js @@ -13,14 +13,14 @@ function helper(minVersion, source) { }) }); } -var _default = Object.freeze({ +var _default = exports.default = Object.freeze({ AsyncGenerator: helper("7.0.0-beta.0", 'import OverloadYield from"OverloadYield";export default function AsyncGenerator(e){var r,t;function resume(r,t){try{var n=e[r](t),o=n.value,u=o instanceof OverloadYield;Promise.resolve(u?o.v:o).then((function(t){if(u){var i="return"===r?"return":"next";if(!o.k||t.done)return resume(i,t);t=e[i](t).value}settle(n.done?"return":"normal",t)}),(function(e){resume("throw",e)}))}catch(e){settle("throw",e)}}function settle(e,n){switch(e){case"return":r.resolve({value:n,done:!0});break;case"throw":r.reject(n);break;default:r.resolve({value:n,done:!1})}(r=r.next)?resume(r.key,r.arg):t=null}this._invoke=function(e,n){return new Promise((function(o,u){var i={key:e,arg:n,resolve:o,reject:u,next:null};t?t=t.next=i:(r=t=i,resume(e,n))}))},"function"!=typeof e.return&&(this.return=void 0)}AsyncGenerator.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},AsyncGenerator.prototype.next=function(e){return this._invoke("next",e)},AsyncGenerator.prototype.throw=function(e){return this._invoke("throw",e)},AsyncGenerator.prototype.return=function(e){return this._invoke("return",e)};'), OverloadYield: helper("7.18.14", "export default function _OverloadYield(t,e){this.v=t,this.k=e}"), applyDecs: helper("7.17.8", 'function old_createMetadataMethodsForProperty(e,t,a,r){return{getMetadata:function(o){old_assertNotFinished(r,"getMetadata"),old_assertMetadataKey(o);var i=e[o];if(void 0!==i)if(1===t){var n=i.public;if(void 0!==n)return n[a]}else if(2===t){var l=i.private;if(void 0!==l)return l.get(a)}else if(Object.hasOwnProperty.call(i,"constructor"))return i.constructor},setMetadata:function(o,i){old_assertNotFinished(r,"setMetadata"),old_assertMetadataKey(o);var n=e[o];if(void 0===n&&(n=e[o]={}),1===t){var l=n.public;void 0===l&&(l=n.public={}),l[a]=i}else if(2===t){var s=n.priv;void 0===s&&(s=n.private=new Map),s.set(a,i)}else n.constructor=i}}}function old_convertMetadataMapToFinal(e,t){var a=e[Symbol.metadata||Symbol.for("Symbol.metadata")],r=Object.getOwnPropertySymbols(t);if(0!==r.length){for(var o=0;o=0;y--){var b;if(void 0!==(f=old_memberDec(h[y],r,c,l,s,o,i,n,u)))old_assertValidReturnValue(o,f),0===o?b=f:1===o?(b=old_getInit(f),p=f.get||u.get,v=f.set||u.set,u={get:p,set:v}):u=f,void 0!==b&&(void 0===d?d=b:"function"==typeof d?d=[d,b]:d.push(b))}if(0===o||1===o){if(void 0===d)d=function(e,t){return t};else if("function"!=typeof d){var g=d;d=function(e,t){for(var a=t,r=0;r3,b=v>=5;if(b?(u=t,f=r,0!==(v-=5)&&(p=n=n||[])):(u=t.prototype,f=a,0!==v&&(p=i=i||[])),0!==v&&!y){var g=b?s:l,m=g.get(h)||0;if(!0===m||3===m&&4!==v||4===m&&3!==v)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+h);!m&&v>2?g.set(h,v):g.set(h,!0)}old_applyMemberDec(e,u,d,h,v,b,y,f,p)}}old_pushInitializers(e,i),old_pushInitializers(e,n)}function old_pushInitializers(e,t){t&&e.push((function(e){for(var a=0;a0){for(var o=[],i=t,n=t.name,l=r.length-1;l>=0;l--){var s={v:!1};try{var c=Object.assign({kind:"class",name:n,addInitializer:old_createAddInitializerMethod(o,s)},old_createMetadataMethodsForProperty(a,0,n,s)),d=r[l](i,c)}finally{s.v=!0}void 0!==d&&(old_assertValidReturnValue(10,d),i=d)}e.push(i,(function(){for(var e=0;e=0;v--){var g;if(void 0!==(f=memberDec(h[v],a,c,o,n,i,s,u)))assertValidReturnValue(n,f),0===n?g=f:1===n?(g=f.init,p=f.get||u.get,d=f.set||u.set,u={get:p,set:d}):u=f,void 0!==g&&(void 0===l?l=g:"function"==typeof l?l=[l,g]:l.push(g))}if(0===n||1===n){if(void 0===l)l=function(e,t){return t};else if("function"!=typeof l){var y=l;l=function(e,t){for(var r=t,a=0;a3,h=f>=5;if(h?(l=t,0!=(f-=5)&&(u=n=n||[])):(l=t.prototype,0!==f&&(u=a=a||[])),0!==f&&!d){var v=h?s:i,g=v.get(p)||0;if(!0===g||3===g&&4!==f||4===g&&3!==f)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+p);!g&&f>2?v.set(p,f):v.set(p,!0)}applyMemberDec(e,l,c,p,f,h,d,u)}}pushInitializers(e,a),pushInitializers(e,n)}(a,e,t),function(e,t,r){if(r.length>0){for(var a=[],n=t,i=t.name,s=r.length-1;s>=0;s--){var o={v:!1};try{var c=r[s](n,{kind:"class",name:i,addInitializer:createAddInitializerMethod(a,o)})}finally{o.v=!0}void 0!==c&&(assertValidReturnValue(10,c),n=c)}e.push(n,(function(){for(var e=0;e=0;v--){var g;if(void 0!==(f=memberDec(h[v],n,c,o,a,i,s,u)))assertValidReturnValue(a,f),0===a?g=f:1===a?(g=f.init,p=f.get||u.get,d=f.set||u.set,u={get:p,set:d}):u=f,void 0!==g&&(void 0===l?l=g:"function"==typeof l?l=[l,g]:l.push(g))}if(0===a||1===a){if(void 0===l)l=function(e,t){return t};else if("function"!=typeof l){var y=l;l=function(e,t){for(var r=t,n=0;n3,h=f>=5;if(h?(l=e,0!==(f-=5)&&(u=n=n||[])):(l=e.prototype,0!==f&&(u=r=r||[])),0!==f&&!d){var v=h?s:i,g=v.get(p)||0;if(!0===g||3===g&&4!==f||4===g&&3!==f)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+p);!g&&f>2?v.set(p,f):v.set(p,!0)}applyMemberDec(a,l,c,p,f,h,d,u)}}return pushInitializers(a,r),pushInitializers(a,n),a}function pushInitializers(e,t){t&&e.push((function(e){for(var r=0;r0){for(var r=[],n=e,a=e.name,i=t.length-1;i>=0;i--){var s={v:!1};try{var o=t[i](n,{kind:"class",name:a,addInitializer:createAddInitializerMethod(r,s)})}finally{s.v=!0}void 0!==o&&(assertValidReturnValue(10,o),n=o)}return[n,function(){for(var e=0;e=0;y--){var m;if(void 0!==(d=memberDec(g[y],n,u,o,a,i,s,f,c)))assertValidReturnValue(a,d),0===a?m=d:1===a?(m=d.init,h=d.get||f.get,v=d.set||f.set,f={get:h,set:v}):f=d,void 0!==m&&(void 0===l?l=m:"function"==typeof l?l=[l,m]:l.push(m))}if(0===a||1===a){if(void 0===l)l=function(e,t){return t};else if("function"!=typeof l){var b=l;l=function(e,t){for(var r=t,n=0;n3,g=d>=5,y=r;if(g?(f=e,0!==(d-=5)&&(p=a=a||[]),v&&!i&&(i=function(t){return checkInRHS(t)===e}),y=i):(f=e.prototype,0!==d&&(p=n=n||[])),0!==d&&!v){var m=g?c:o,b=m.get(h)||0;if(!0===b||3===b&&4!==d||4===b&&3!==d)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+h);!b&&d>2?m.set(h,d):m.set(h,!0)}applyMemberDec(s,f,l,h,d,g,v,p,y)}}return pushInitializers(s,n),pushInitializers(s,a),s}function pushInitializers(e,t){t&&e.push((function(e){for(var r=0;r0){for(var r=[],n=e,a=e.name,i=t.length-1;i>=0;i--){var s={v:!1};try{var o=t[i](n,{kind:"class",name:a,addInitializer:createAddInitializerMethod(r,s)})}finally{s.v=!0}void 0!==o&&(assertValidReturnValue(10,o),n=o)}return[n,function(){for(var e=0;e=0;b-=g){var I;if(void 0!==(h=memberDec(m[b],a?m[b-1]:void 0,n,f,c,i,s,o,p,l,u)))assertValidReturnValue(i,h),0===i?I=h:1===i?(I=h.init,v=h.get||p.get,y=h.set||p.set,p={get:v,set:y}):p=h,void 0!==I&&(void 0===d?d=I:"function"==typeof d?d=[d,I]:d.push(I))}if(0===i||1===i){if(void 0===d)d=function(e,t){return t};else if("function"!=typeof d){var w=d;d=function(e,t){for(var r=t,a=w.length-1;a>=0;a--)r=w[a].call(e,r);return r}}else{var M=d;d=function(e,t){return M.call(e,t)}}e.push(d)}0!==i&&(1===i?(f.get=p.get,f.set=p.set):2===i?f.value=p:3===i?f.get=p:4===i&&(f.set=p),o?1===i?(e.push((function(e,t){return p.get.call(e,t)})),e.push((function(e,t){return p.set.call(e,t)}))):2===i?e.push(p):e.push((function(e,t){return p.call(e,t)})):Object.defineProperty(t,n,f))}function applyMemberDecs(e,t,r,a){for(var n,i,s,o=[],c=new Map,l=new Map,u=0;u3,m=16&h,g=!!(8&h),b=r;if(h&=7,g?(d=e,0!==h&&(p=i=i||[]),y&&!s&&(s=function(t){return checkInRHS(t)===e}),b=s):(d=e.prototype,0!==h&&(p=n=n||[])),0!==h&&!y){var I=g?l:c,w=I.get(v)||0;if(!0===w||3===w&&4!==h||4===w&&3!==h)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+v);I.set(v,!(!w&&h>2)||h)}applyMemberDec(o,d,f,m,v,h,g,y,p,b,a)}}return pushInitializers(o,n),pushInitializers(o,i),o}function pushInitializers(e,t){t&&e.push((function(e){for(var r=0;r=0;c-=o){var l={v:!1};try{var u=t[c].call(r?t[c-1]:void 0,i,{kind:"class",name:s,addInitializer:createAddInitializerMethod(n,l),metadata:a})}finally{l.v=!0}void 0!==u&&(assertValidReturnValue(5,u),i=u)}return[defineMetadata(i,a),function(){for(var e=0;e=6)var s=i[Symbol.metadata||Symbol.for("Symbol.metadata")];var o=Object.create(void 0===s?null:s),c=applyMemberDecs(e,t,n,o);return r.length||defineMetadata(e,o),{e:c,get c(){return applyClassDecs(e,r,a,o)}}}'), + applyDecs2305: helper("7.21.0", 'import checkInRHS from"checkInRHS";function _bindPropCall(e,t){return function(r,a){return e[t].call(r,a)}}function createAddInitializerMethod(e,t){return function(r){if(t.v)throw new Error("attempted to call addInitializer after decoration was finished");assertCallable(r,"An initializer",!0),e.push(r)}}function memberDec(e,t,r,a,n,i,o,s,l,c,u){function assertInstanceIfPrivate(e){return function(t,r){if(!c(t))throw new TypeError("Attempted to access private element on non-instance");return e(t,r)}}var f,d,p={v:!1},v={kind:["field","accessor","method","getter","setter","field"][i],name:s?"#"+r:r,static:o,private:s,metadata:u,addInitializer:createAddInitializerMethod(n,p)};if(s||0!==i&&2!==i)if(2===i)f=assertInstanceIfPrivate((function(){return a.value}));else{var h=0===i||1===i;(h||3===i)&&(f=_bindPropCall(a,"get"),s&&(f=assertInstanceIfPrivate(f))),(h||4===i)&&(d=_bindPropCall(a,"set"),s&&(d=assertInstanceIfPrivate(d)))}else f=function(e){return e[r]},0===i&&(d=function(e,t){e[r]=t});var m=s?c.bind():function(e){return r in e},b=v.access={has:m};f&&(b.get=f),d&&(b.set=d);try{return e.call(t,l,v)}finally{p.v=!0}}function assertCallable(e,t,r){if("function"!=typeof e&&(r||void 0!==e))throw new TypeError(t+" must be a function")}function assertValidReturnValue(e,t){var r=typeof t;if(1===e){if("object"!==r||!t)throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0");assertCallable(t.get,"accessor.get"),assertCallable(t.set,"accessor.set"),assertCallable(t.init,"accessor.init")}else if("function"!==r)throw new TypeError((0===e?"field":5===e?"class":"method")+" decorators must return a function or void 0")}function applyMemberDec(e,t,r,a,n,i,o,s,l,c,u){var f,d,p,v,h=r[0],m=r[3];a||Array.isArray(h)||(h=[h]),s?f=0===i||1===i?{get:function(){return m(this)},set:function(e){r[4](this,e)}}:3===i?{get:m}:4===i?{set:m}:{value:m}:0!==i&&(f=Object.getOwnPropertyDescriptor(t,n)),1===i?p={get:f.get,set:f.set}:2===i?p=f.value:3===i?p=f.get:4===i&&(p=f.set);for(var b=a?2:1,y=h.length-1;y>=0;y-=b){var g;if(void 0!==(v=memberDec(h[y],a?h[y-1]:void 0,n,f,l,i,o,s,p,c,u)))assertValidReturnValue(i,v),0===i?g=v:1===i?(g=v.init,p={get:v.get||p.get,set:v.set||p.set}):p=v,void 0!==g&&(void 0===d?d=g:"function"==typeof d?d=[d,g]:d.push(g))}if(0===i||1===i){if(void 0===d)d=function(e,t){return t};else if("function"!=typeof d){var I=d;d=function(e,t){for(var r=t,a=I.length-1;a>=0;a--)r=I[a].call(e,r);return r}}else{var w=d;d=d.call.bind(w)}e.push(d)}0!==i&&(1===i?(f.get=p.get,f.set=p.set):2===i?f.value=p:3===i?f.get=p:4===i&&(f.set=p),s?1===i?e.push(_bindPropCall(f,"get"),_bindPropCall(f,"set")):e.push(2===i?p:Function.call.bind(p)):Object.defineProperty(t,n,f))}function applyMemberDecs(e,t,r,a){var n,i,o,s=[],l=new Map,c=new Map;function pushInitializers(e){e&&s.push((function(t){for(var r=0;r3,b=16&v,y=!!(8&v),g=r;if(v&=7,y?(d=e,p=i=i||[],m&&!o&&(o=function(t){return checkInRHS(t)===e}),g=o):(d=e.prototype,p=n=n||[]),0!==v&&!m){var I=y?c:l,w=I.get(h)||0;if(!0===w||3===w&&4!==v||4===w&&3!==v)throw new Error("Attempted to decorate a public method/accessor that has the same name as a previously decorated public method/accessor. This is not currently supported by the decorators plugin. Property name was: "+h);I.set(h,!(!w&&v>2)||v)}applyMemberDec(s,d,f,b,h,v,y,m,p,g,a)}}return pushInitializers(n),pushInitializers(i),s}function applyClassDecs(e,t,r,a){if(t.length){for(var n=[],i=e,o=e.name,s=r?2:1,l=t.length-1;l>=0;l-=s){var c={v:!1};try{var u=t[l].call(r?t[l-1]:void 0,i,{kind:"class",name:o,addInitializer:createAddInitializerMethod(n,c),metadata:a})}finally{c.v=!0}void 0!==u&&(assertValidReturnValue(5,u),i=u)}return[defineMetadata(i,a),function(){for(var e=0;e=6)var o=i[Symbol.metadata||Symbol.for("Symbol.metadata")];var s=Object.create(void 0===o?null:o),l=applyMemberDecs(e,t,n,s);return r.length||defineMetadata(e,s),{e:l,get c(){return applyClassDecs(e,r,a,s)}}}'), asyncGeneratorDelegate: helper("7.0.0-beta.0", 'import OverloadYield from"OverloadYield";export default function _asyncGeneratorDelegate(t){var e={},n=!1;function pump(e,r){return n=!0,r=new Promise((function(n){n(t[e](r))})),{done:!1,value:new OverloadYield(r,1)}}return e["undefined"!=typeof Symbol&&Symbol.iterator||"@@iterator"]=function(){return this},e.next=function(t){return n?(n=!1,t):pump("next",t)},"function"==typeof t.throw&&(e.throw=function(t){if(n)throw n=!1,t;return pump("throw",t)}),"function"==typeof t.return&&(e.return=function(t){return n?(n=!1,t):pump("return",t)}),e}'), asyncIterator: helper("7.15.9", 'export default function _asyncIterator(r){var n,t,o,e=2;for("undefined"!=typeof Symbol&&(t=Symbol.asyncIterator,o=Symbol.iterator);e--;){if(t&&null!=(n=r[t]))return n.call(r);if(o&&null!=(n=r[o]))return new AsyncFromSyncIterator(n.call(r));t="@@asyncIterator",o="@@iterator"}throw new TypeError("Object is not async iterable")}function AsyncFromSyncIterator(r){function AsyncFromSyncIteratorContinuation(r){if(Object(r)!==r)return Promise.reject(new TypeError(r+" is not an object."));var n=r.done;return Promise.resolve(r.value).then((function(r){return{value:r,done:n}}))}return AsyncFromSyncIterator=function(r){this.s=r,this.n=r.next},AsyncFromSyncIterator.prototype={s:null,n:null,next:function(){return AsyncFromSyncIteratorContinuation(this.n.apply(this.s,arguments))},return:function(r){var n=this.s.return;return void 0===n?Promise.resolve({value:r,done:!0}):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments))},throw:function(r){var n=this.s.return;return void 0===n?Promise.reject(r):AsyncFromSyncIteratorContinuation(n.apply(this.s,arguments))}},new AsyncFromSyncIterator(r)}'), awaitAsyncGenerator: helper("7.0.0-beta.0", 'import OverloadYield from"OverloadYield";export default function _awaitAsyncGenerator(e){return new OverloadYield(e,0)}'), @@ -38,6 +38,5 @@ var _default = Object.freeze({ using: helper("7.22.0", 'export default function _using(o,e,n){if(null==e)return e;if("object"!=typeof e)throw new TypeError("using declarations can only be used with objects, null, or undefined.");if(n)var r=e[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(null==r&&(r=e[Symbol.dispose||Symbol.for("Symbol.dispose")]),"function"!=typeof r)throw new TypeError("Property [Symbol.dispose] is not a function.");return o.push({v:e,d:r,a:n}),e}'), wrapRegExp: helper("7.19.0", 'import setPrototypeOf from"setPrototypeOf";import inherits from"inherits";export default function _wrapRegExp(){_wrapRegExp=function(e,r){return new BabelRegExp(e,void 0,r)};var e=RegExp.prototype,r=new WeakMap;function BabelRegExp(e,t,p){var o=new RegExp(e,t);return r.set(o,p||r.get(e)),setPrototypeOf(o,BabelRegExp.prototype)}function buildGroups(e,t){var p=r.get(t);return Object.keys(p).reduce((function(r,t){var o=p[t];if("number"==typeof o)r[t]=e[o];else{for(var i=0;void 0===e[o[i]]&&i+1]+)>/g,(function(e,r){var t=o[r];return"$"+(Array.isArray(t)?t.join("$"):t)})))}if("function"==typeof p){var i=this;return e[Symbol.replace].call(this,t,(function(){var e=arguments;return"object"!=typeof e[e.length-1]&&(e=[].slice.call(e)).push(buildGroups(e,i)),p.apply(this,e)}))}return e[Symbol.replace].call(this,t,p)},_wrapRegExp.apply(this,arguments)}') }); -exports.default = _default; //# sourceMappingURL=helpers-generated.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers.js b/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers.js index d23e0325664ca5..6a9e81e6f0b58b 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers.js +++ b/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers.js @@ -9,8 +9,7 @@ var _helpersGenerated = require("./helpers-generated.js"); const helpers = Object.assign({ __proto__: null }, _helpersGenerated.default); -var _default = helpers; -exports.default = _default; +var _default = exports.default = helpers; const helper = minVersion => tpl => ({ minVersion, ast: () => _template.default.program.ast(tpl) diff --git a/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers/applyDecs2305.js b/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers/applyDecs2305.js index 35ad119c41b6e5..a471bbce0f1290 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers/applyDecs2305.js +++ b/tools/node_modules/eslint/node_modules/@babel/helpers/lib/helpers/applyDecs2305.js @@ -5,49 +5,40 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = applyDecs2305; var _checkInRHS = require("checkInRHS"); +function _bindPropCall(obj, name) { + return function (_this, value) { + return obj[name].call(_this, value); + }; +} function createAddInitializerMethod(initializers, decoratorFinishedRef) { return function addInitializer(initializer) { - assertNotFinished(decoratorFinishedRef, "addInitializer"); - assertCallable(initializer, "An initializer"); + if (decoratorFinishedRef.v) { + throw new Error("attempted to call addInitializer after decoration was finished"); + } + assertCallable(initializer, "An initializer", true); initializers.push(initializer); }; } -function assertInstanceIfPrivate(has, target) { - if (!has(target)) { - throw new TypeError("Attempted to access private element on non-instance"); - } -} function memberDec(dec, thisArg, name, desc, initializers, kind, isStatic, isPrivate, value, hasPrivateBrand, metadata) { - var kindStr; - switch (kind) { - case 1: - kindStr = "accessor"; - break; - case 2: - kindStr = "method"; - break; - case 3: - kindStr = "getter"; - break; - case 4: - kindStr = "setter"; - break; - default: - kindStr = "field"; + function assertInstanceIfPrivate(callback) { + return function (target, value) { + if (!hasPrivateBrand(target)) { + throw new TypeError("Attempted to access private element on non-instance"); + } + return callback(target, value); + }; } + var decoratorFinishedRef = { + v: false + }; var ctx = { - kind: kindStr, + kind: ["field", "accessor", "method", "getter", "setter", "field"][kind], name: isPrivate ? "#" + name : name, static: isStatic, private: isPrivate, - metadata: metadata + metadata: metadata, + addInitializer: createAddInitializerMethod(initializers, decoratorFinishedRef) }; - var decoratorFinishedRef = { - v: false - }; - if (kind !== 0) { - ctx.addInitializer = createAddInitializerMethod(initializers, decoratorFinishedRef); - } var get, set; if (!isPrivate && (kind === 0 || kind === 2)) { get = function (target) { @@ -59,106 +50,61 @@ function memberDec(dec, thisArg, name, desc, initializers, kind, isStatic, isPri }; } } else if (kind === 2) { - get = function (target) { - assertInstanceIfPrivate(hasPrivateBrand, target); + get = assertInstanceIfPrivate(function () { return desc.value; - }; + }); } else { var t = kind === 0 || kind === 1; if (t || kind === 3) { + get = _bindPropCall(desc, "get"); if (isPrivate) { - get = function (target) { - assertInstanceIfPrivate(hasPrivateBrand, target); - return desc.get.call(target); - }; - } else { - get = function (target) { - return desc.get.call(target); - }; + get = assertInstanceIfPrivate(get); } } if (t || kind === 4) { + set = _bindPropCall(desc, "set"); if (isPrivate) { - set = function (target, value) { - assertInstanceIfPrivate(hasPrivateBrand, target); - desc.set.call(target, value); - }; - } else { - set = function (target, value) { - desc.set.call(target, value); - }; + set = assertInstanceIfPrivate(set); } } } var has = isPrivate ? hasPrivateBrand.bind() : function (target) { return name in target; }; - ctx.access = get && set ? { - get: get, - set: set, - has: has - } : get ? { - get: get, - has: has - } : { - set: set, + var access = ctx.access = { has: has }; + if (get) access.get = get; + if (set) access.set = set; try { return dec.call(thisArg, value, ctx); } finally { decoratorFinishedRef.v = true; } } -function assertNotFinished(decoratorFinishedRef, fnName) { - if (decoratorFinishedRef.v) { - throw new Error("attempted to call " + fnName + " after decoration was finished"); - } -} -function assertCallable(fn, hint) { +function assertCallable(fn, hint, throwUndefined) { if (typeof fn !== "function") { - throw new TypeError(hint + " must be a function"); + if (throwUndefined || fn !== void 0) { + throw new TypeError(hint + " must be a function"); + } } } function assertValidReturnValue(kind, value) { var type = typeof value; if (kind === 1) { - if (type !== "object" || value === null) { + if (type !== "object" || !value) { throw new TypeError("accessor decorators must return an object with get, set, or init properties or void 0"); } - if (value.get !== undefined) { - assertCallable(value.get, "accessor.get"); - } - if (value.set !== undefined) { - assertCallable(value.set, "accessor.set"); - } - if (value.init !== undefined) { - assertCallable(value.init, "accessor.init"); - } + assertCallable(value.get, "accessor.get"); + assertCallable(value.set, "accessor.set"); + assertCallable(value.init, "accessor.init"); } else if (type !== "function") { - var hint; - if (kind === 0) { - hint = "field"; - } else if (kind === 5) { - hint = "class"; - } else { - hint = "method"; - } - throw new TypeError(hint + " decorators must return a function or void 0"); + throw new TypeError((kind === 0 ? "field" : kind === 5 ? "class" : "method") + " decorators must return a function or void 0"); } } -function curryThis1(fn) { - return function () { - return fn(this); - }; -} -function curryThis2(fn) { - return function (value) { - fn(this, value); - }; -} function applyMemberDec(ret, base, decInfo, decoratorsHaveThis, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand, metadata) { - var decs = decInfo[0]; + var decs = decInfo[0], + decVal = decInfo[3]; if (!decoratorsHaveThis && !Array.isArray(decs)) { decs = [decs]; } @@ -166,21 +112,25 @@ function applyMemberDec(ret, base, decInfo, decoratorsHaveThis, name, kind, isSt if (isPrivate) { if (kind === 0 || kind === 1) { desc = { - get: curryThis1(decInfo[3]), - set: curryThis2(decInfo[4]) + get: function () { + return decVal(this); + }, + set: function (value) { + decInfo[4](this, value); + } }; } else { if (kind === 3) { desc = { - get: decInfo[3] + get: decVal }; } else if (kind === 4) { desc = { - set: decInfo[3] + set: decVal }; } else { desc = { - value: decInfo[3] + value: decVal }; } } @@ -247,9 +197,7 @@ function applyMemberDec(ret, base, decInfo, decoratorsHaveThis, name, kind, isSt }; } else { var originalInitializer = init; - init = function (instance, init) { - return originalInitializer.call(instance, init); - }; + init = init.call.bind(originalInitializer); } ret.push(init); } @@ -266,18 +214,9 @@ function applyMemberDec(ret, base, decInfo, decoratorsHaveThis, name, kind, isSt } if (isPrivate) { if (kind === 1) { - ret.push(function (instance, args) { - return value.get.call(instance, args); - }); - ret.push(function (instance, args) { - return value.set.call(instance, args); - }); - } else if (kind === 2) { - ret.push(value); + ret.push(_bindPropCall(desc, "get"), _bindPropCall(desc, "set")); } else { - ret.push(function (instance, args) { - return value.call(instance, args); - }); + ret.push(kind === 2 ? value : Function.call.bind(value)); } } else { Object.defineProperty(base, name, desc); @@ -291,6 +230,16 @@ function applyMemberDecs(Class, decInfos, instanceBrand, metadata) { var staticBrand; var existingProtoNonFields = new Map(); var existingStaticNonFields = new Map(); + function pushInitializers(initializers) { + if (initializers) { + ret.push(function (instance) { + for (var i = 0; i < initializers.length; i++) { + initializers[i].call(instance); + } + return instance; + }); + } + } for (var i = 0; i < decInfos.length; i++) { var decInfo = decInfos[i]; if (!Array.isArray(decInfo)) continue; @@ -305,10 +254,8 @@ function applyMemberDecs(Class, decInfos, instanceBrand, metadata) { kind &= 7; if (isStatic) { base = Class; - if (kind !== 0) { - staticInitializers = staticInitializers || []; - initializers = staticInitializers; - } + staticInitializers = staticInitializers || []; + initializers = staticInitializers; if (isPrivate && !staticBrand) { staticBrand = function (_) { return _checkInRHS(_) === Class; @@ -317,10 +264,8 @@ function applyMemberDecs(Class, decInfos, instanceBrand, metadata) { hasPrivateBrand = staticBrand; } else { base = Class.prototype; - if (kind !== 0) { - protoInitializers = protoInitializers || []; - initializers = protoInitializers; - } + protoInitializers = protoInitializers || []; + initializers = protoInitializers; } if (kind !== 0 && !isPrivate) { var existingNonFields = isStatic ? existingStaticNonFields : existingProtoNonFields; @@ -332,20 +277,10 @@ function applyMemberDecs(Class, decInfos, instanceBrand, metadata) { } applyMemberDec(ret, base, decInfo, decoratorsHaveThis, name, kind, isStatic, isPrivate, initializers, hasPrivateBrand, metadata); } - pushInitializers(ret, protoInitializers); - pushInitializers(ret, staticInitializers); + pushInitializers(protoInitializers); + pushInitializers(staticInitializers); return ret; } -function pushInitializers(ret, initializers) { - if (initializers) { - ret.push(function (instance) { - for (var i = 0; i < initializers.length; i++) { - initializers[i].call(instance); - } - return instance; - }); - } -} function applyClassDecs(targetClass, classDecs, decoratorsHaveThis, metadata) { if (classDecs.length) { var initializers = []; diff --git a/tools/node_modules/eslint/node_modules/@babel/helpers/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/helpers/lib/index.js index a6e1c96d084149..711eb5f3dcf7c9 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helpers/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/helpers/lib/index.js @@ -134,6 +134,7 @@ function permuteHelperAST(file, metadata, id, localBindings, getDependency) { }); const toRename = {}; const bindings = new Set(localBindings || []); + if (id.type === "Identifier") bindings.add(id.name); localBindingNames.forEach(name => { let newName = name; while (bindings.has(newName)) newName = "_" + newName; @@ -234,9 +235,7 @@ function ensure(name, newFileClass) { FileClass || (FileClass = newFileClass); loadHelper(name); } -const list = Object.keys(_helpers.default).map(name => name.replace(/^_/, "")); -exports.list = list; -var _default = get; -exports.default = _default; +const list = exports.list = Object.keys(_helpers.default).map(name => name.replace(/^_/, "")); +var _default = exports.default = get; //# sourceMappingURL=index.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/helpers/package.json b/tools/node_modules/eslint/node_modules/@babel/helpers/package.json index 794abfc00d04e5..f3a9107682c040 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helpers/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/helpers/package.json @@ -1,6 +1,6 @@ { "name": "@babel/helpers", - "version": "7.23.2", + "version": "7.23.5", "description": "Collection of helper functions used by Babel transforms.", "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-helpers", @@ -16,15 +16,14 @@ "main": "./lib/index.js", "dependencies": { "@babel/template": "^7.22.15", - "@babel/traverse": "^7.23.2", - "@babel/types": "^7.23.0" + "@babel/traverse": "^7.23.5", + "@babel/types": "^7.23.5" }, "devDependencies": { - "@babel/generator": "^7.23.0", + "@babel/generator": "^7.23.5", "@babel/helper-plugin-test-runner": "^7.22.5", - "@babel/parser": "^7.23.0", - "regenerator-runtime": "^0.14.0", - "terser": "^5.19.2" + "@babel/parser": "^7.23.5", + "regenerator-runtime": "^0.14.0" }, "engines": { "node": ">=6.9.0" diff --git a/tools/node_modules/eslint/node_modules/@babel/helpers/scripts/generate-helpers.js b/tools/node_modules/eslint/node_modules/@babel/helpers/scripts/generate-helpers.js index e2a318865937e3..31c5c6cf970500 100644 --- a/tools/node_modules/eslint/node_modules/@babel/helpers/scripts/generate-helpers.js +++ b/tools/node_modules/eslint/node_modules/@babel/helpers/scripts/generate-helpers.js @@ -1,7 +1,10 @@ +/* eslint-disable import/no-extraneous-dependencies */ import fs from "fs"; import { join } from "path"; import { URL, fileURLToPath } from "url"; -import { minify } from "terser"; // eslint-disable-line import/no-extraneous-dependencies +import { minify } from "terser"; +import { transformSync } from "@babel/core"; +import presetTypescript from "@babel/preset-typescript"; const HELPERS_FOLDER = new URL("../src/helpers", import.meta.url); const IGNORED_FILES = new Set(["package.json"]); @@ -30,14 +33,16 @@ export default Object.freeze({ const [helperName] = file.split("."); + const isTs = file.endsWith(".ts"); + const filePath = join(fileURLToPath(HELPERS_FOLDER), file); - if (!file.endsWith(".js")) { + if (!file.endsWith(".js") && !isTs) { console.error("ignoring", filePath); continue; } - const fileContents = await fs.promises.readFile(filePath, "utf8"); - const minVersionMatch = fileContents.match( + let code = await fs.promises.readFile(filePath, "utf8"); + const minVersionMatch = code.match( /^\s*\/\*\s*@minVersion\s+(?\S+)\s*\*\/\s*$/m ); if (!minVersionMatch) { @@ -45,16 +50,35 @@ export default Object.freeze({ } const { minVersion } = minVersionMatch.groups; - const source = await minify(fileContents, { - mangle: { keep_fnames: true }, - // The _typeof helper has a custom directive that we must keep - compress: { directives: false }, - }); + if (isTs) { + code = transformSync(code, { + configFile: false, + babelrc: false, + filename: filePath, + presets: [ + [ + presetTypescript, + { + onlyRemoveTypeImports: true, + optimizeConstEnums: true, + }, + ], + ], + }).code; + } + + code = ( + await minify(code, { + mangle: { keep_fnames: true }, + // The _typeof helper has a custom directive that we must keep + compress: { directives: false }, + }) + ).code; output += `\ ${JSON.stringify(helperName)}: helper( ${JSON.stringify(minVersion)}, - ${JSON.stringify(source.code)}, + ${JSON.stringify(code)}, ), `; } diff --git a/tools/node_modules/eslint/node_modules/@babel/highlight/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/highlight/lib/index.js index cb718afd154ce0..a45bc5a8805500 100644 --- a/tools/node_modules/eslint/node_modules/@babel/highlight/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/highlight/lib/index.js @@ -8,8 +8,8 @@ exports.shouldHighlight = shouldHighlight; var _jsTokens = require("js-tokens"); var _helperValidatorIdentifier = require("@babel/helper-validator-identifier"); var _chalk = _interopRequireWildcard(require("chalk"), true); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } const sometimesKeywords = new Set(["as", "async", "from", "get", "of", "set"]); function getDefs(chalk) { return { diff --git a/tools/node_modules/eslint/node_modules/@babel/highlight/package.json b/tools/node_modules/eslint/node_modules/@babel/highlight/package.json index d88c972268588e..640f8366199981 100644 --- a/tools/node_modules/eslint/node_modules/@babel/highlight/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/highlight/package.json @@ -1,6 +1,6 @@ { "name": "@babel/highlight", - "version": "7.22.20", + "version": "7.23.4", "description": "Syntax highlight JavaScript strings for output in terminals.", "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-highlight", diff --git a/tools/node_modules/eslint/node_modules/@babel/parser/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/parser/lib/index.js index bcf69004cd8aa6..68ee00ca9ece2e 100644 --- a/tools/node_modules/eslint/node_modules/@babel/parser/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/parser/lib/index.js @@ -3488,11 +3488,6 @@ function newAsyncArrowScope() { function newExpressionScope() { return new ExpressionScope(); } -const PARAM = 0b0000, - PARAM_YIELD = 0b0001, - PARAM_AWAIT = 0b0010, - PARAM_RETURN = 0b0100, - PARAM_IN = 0b1000; class ProductionParameterHandler { constructor() { this.stacks = []; @@ -3507,20 +3502,20 @@ class ProductionParameterHandler { return this.stacks[this.stacks.length - 1]; } get hasAwait() { - return (this.currentFlags() & PARAM_AWAIT) > 0; + return (this.currentFlags() & 2) > 0; } get hasYield() { - return (this.currentFlags() & PARAM_YIELD) > 0; + return (this.currentFlags() & 1) > 0; } get hasReturn() { - return (this.currentFlags() & PARAM_RETURN) > 0; + return (this.currentFlags() & 4) > 0; } get hasIn() { - return (this.currentFlags() & PARAM_IN) > 0; + return (this.currentFlags() & 8) > 0; } } function functionFlags(isAsync, isGenerator) { - return (isAsync ? PARAM_AWAIT : 0) | (isGenerator ? PARAM_YIELD : 0); + return (isAsync ? 2 : 0) | (isGenerator ? 1 : 0); } class UtilParser extends Tokenizer { addExtra(node, key, value, enumerable = true) { @@ -3717,9 +3712,9 @@ class UtilParser extends Tokenizer { }; } enterInitialScopes() { - let paramFlags = PARAM; + let paramFlags = 0; if (this.inModule) { - paramFlags |= PARAM_AWAIT; + paramFlags |= 2; } this.scope.enter(1); this.prodParam.enter(paramFlags); @@ -8762,7 +8757,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { node.body = inner; } else { this.scope.enter(256); - this.prodParam.enter(PARAM); + this.prodParam.enter(0); node.body = this.tsParseModuleBlock(); this.prodParam.exit(); this.scope.exit(); @@ -8780,7 +8775,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { } if (this.match(5)) { this.scope.enter(256); - this.prodParam.enter(PARAM); + this.prodParam.enter(0); node.body = this.tsParseModuleBlock(); this.prodParam.exit(); this.scope.exit(); @@ -8907,7 +8902,7 @@ var typescript = superClass => class TypeScriptParserMixin extends superClass { case "global": if (this.match(5)) { this.scope.enter(256); - this.prodParam.enter(PARAM); + this.prodParam.enter(0); const mod = node; mod.global = true; mod.id = expr; @@ -11338,7 +11333,7 @@ class ExpressionParser extends LValParser { const oldLabels = this.state.labels; this.state.labels = []; if (isAsync) { - this.prodParam.enter(PARAM_AWAIT); + this.prodParam.enter(2); node.body = this.parseBlock(); this.prodParam.exit(); } else { @@ -11902,7 +11897,7 @@ class ExpressionParser extends LValParser { this.scope.enter(2 | 4); let flags = functionFlags(isAsync, false); if (!this.match(5) && this.prodParam.hasIn) { - flags |= PARAM_IN; + flags |= 8; } this.prodParam.enter(flags); this.initFunction(node, isAsync); @@ -11936,7 +11931,7 @@ class ExpressionParser extends LValParser { const oldStrict = this.state.strict; const oldLabels = this.state.labels; this.state.labels = []; - this.prodParam.enter(this.prodParam.currentFlags() | PARAM_RETURN); + this.prodParam.enter(this.prodParam.currentFlags() | 4); node.body = this.parseBlock(true, false, hasStrictModeDirective => { const nonSimple = !this.isSimpleParamList(node.params); if (hasStrictModeDirective && nonSimple) { @@ -12277,9 +12272,9 @@ class ExpressionParser extends LValParser { } allowInAnd(callback) { const flags = this.prodParam.currentFlags(); - const prodParamToSet = PARAM_IN & ~flags; + const prodParamToSet = 8 & ~flags; if (prodParamToSet) { - this.prodParam.enter(flags | PARAM_IN); + this.prodParam.enter(flags | 8); try { return callback(); } finally { @@ -12290,9 +12285,9 @@ class ExpressionParser extends LValParser { } disallowInAnd(callback) { const flags = this.prodParam.currentFlags(); - const prodParamToClear = PARAM_IN & flags; + const prodParamToClear = 8 & flags; if (prodParamToClear) { - this.prodParam.enter(flags & ~PARAM_IN); + this.prodParam.enter(flags & ~8); try { return callback(); } finally { @@ -13207,7 +13202,7 @@ class StatementParser extends ExpressionParser { } body.push(stmt); } - afterBlockParse == null ? void 0 : afterBlockParse.call(this, hasStrictModeDirective); + afterBlockParse == null || afterBlockParse.call(this, hasStrictModeDirective); if (!oldStrict) { this.setStrict(false); } @@ -13583,7 +13578,7 @@ class StatementParser extends ExpressionParser { this.scope.enter(64 | 128 | 16); const oldLabels = this.state.labels; this.state.labels = []; - this.prodParam.enter(PARAM); + this.prodParam.enter(0); const body = member.body = []; this.parseBlockOrModuleBlockBody(body, undefined, false, 8); this.prodParam.exit(); @@ -13655,7 +13650,7 @@ class StatementParser extends ExpressionParser { parseInitializer(node) { this.scope.enter(64 | 16); this.expressionScope.enter(newExpressionScope()); - this.prodParam.enter(PARAM); + this.prodParam.enter(0); node.value = this.eat(29) ? this.parseMaybeAssignAllowIn() : null; this.expressionScope.exit(); this.prodParam.exit(); diff --git a/tools/node_modules/eslint/node_modules/@babel/parser/package.json b/tools/node_modules/eslint/node_modules/@babel/parser/package.json index 768f887baf9b6f..cbe3a52a86ca12 100644 --- a/tools/node_modules/eslint/node_modules/@babel/parser/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/parser/package.json @@ -1,6 +1,6 @@ { "name": "@babel/parser", - "version": "7.23.0", + "version": "7.23.5", "description": "A JavaScript parser", "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-parser", @@ -34,10 +34,10 @@ "node": ">=6.0.0" }, "devDependencies": { - "@babel/code-frame": "^7.22.13", + "@babel/code-frame": "^7.23.5", "@babel/helper-check-duplicate-nodes": "^7.22.5", - "@babel/helper-fixtures": "^7.22.19", - "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-fixtures": "^7.23.4", + "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", "charcodes": "^0.2.0" }, diff --git a/tools/node_modules/eslint/node_modules/@babel/plugin-syntax-import-attributes/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/plugin-syntax-import-attributes/lib/index.js index 6e78b9a07c3ee6..dd591457c65a81 100644 --- a/tools/node_modules/eslint/node_modules/@babel/plugin-syntax-import-attributes/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/plugin-syntax-import-attributes/lib/index.js @@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; var _helperPluginUtils = require("@babel/helper-plugin-utils"); -var _default = (0, _helperPluginUtils.declare)((api, { +var _default = exports.default = (0, _helperPluginUtils.declare)((api, { deprecatedAssertSyntax }) => { api.assertVersion("^7.22.0"); @@ -26,6 +26,5 @@ var _default = (0, _helperPluginUtils.declare)((api, { } }; }); -exports.default = _default; //# sourceMappingURL=index.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/plugin-syntax-import-attributes/package.json b/tools/node_modules/eslint/node_modules/@babel/plugin-syntax-import-attributes/package.json index 2239fa8e4c9859..d932acdd7d5344 100644 --- a/tools/node_modules/eslint/node_modules/@babel/plugin-syntax-import-attributes/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/plugin-syntax-import-attributes/package.json @@ -1,6 +1,6 @@ { "name": "@babel/plugin-syntax-import-attributes", - "version": "7.22.5", + "version": "7.23.3", "description": "Allow parsing of the module attributes in the import statement", "repository": { "type": "git", @@ -22,7 +22,7 @@ "@babel/core": "^7.0.0-0" }, "devDependencies": { - "@babel/core": "^7.22.5" + "@babel/core": "^7.23.3" }, "engines": { "node": ">=6.9.0" diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/cache.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/cache.js index 0455cfa03a42a0..79a41b9cf9bc42 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/cache.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/cache.js @@ -9,10 +9,8 @@ exports.clearScope = clearScope; exports.getCachedPaths = getCachedPaths; exports.getOrCreateCachedPaths = getOrCreateCachedPaths; exports.scope = exports.path = void 0; -let pathsCache = new WeakMap(); -exports.path = pathsCache; -let scope = new WeakMap(); -exports.scope = scope; +let pathsCache = exports.path = new WeakMap(); +let scope = exports.scope = new WeakMap(); function clear() { clearPath(); clearScope(); diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/index.js index 38255007ece047..566296c0092103 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/index.js @@ -51,8 +51,7 @@ function traverse(parent, opts = {}, scope, state, parentPath, visitSelf) { visitors.explode(opts); (0, _traverseNode.traverseNode)(parent, opts, scope, state, parentPath, null, visitSelf); } -var _default = traverse; -exports.default = _default; +var _default = exports.default = traverse; traverse.visitors = visitors; traverse.verify = visitors.verify; traverse.explode = visitors.explode; diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/comments.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/comments.js index 0a4eed6fac94ff..43b3b72acdd502 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/comments.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/comments.js @@ -36,12 +36,10 @@ function shareCommentsWithSiblings() { } } function removeIfExisting(list, toRemove) { - if (!toRemove) return list; - let lastFoundIndex = -1; + if (!(toRemove != null && toRemove.length)) return list; + const set = new Set(toRemove); return list.filter(el => { - const i = toRemove.indexOf(el, lastFoundIndex); - if (i === -1) return true; - lastFoundIndex = i; + return !set.has(el); }); } function addComment(type, content, line) { diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/context.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/context.js index e197836c111d3c..7b52a6582138a5 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/context.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/context.js @@ -117,7 +117,7 @@ function setScope() { path = path.parentPath; } this.scope = this.getScope(target); - (_this$scope = this.scope) == null ? void 0 : _this$scope.init(); + (_this$scope = this.scope) == null || _this$scope.init(); } function setContext(context) { if (this.skipKeys != null) { diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/index.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/index.js index 640d758e895a24..c835fdc0371939 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/index.js @@ -28,12 +28,9 @@ const { validate } = _t; const debug = _debug("babel"); -const REMOVED = 1 << 0; -exports.REMOVED = REMOVED; -const SHOULD_STOP = 1 << 1; -exports.SHOULD_STOP = SHOULD_STOP; -const SHOULD_SKIP = 1 << 2; -exports.SHOULD_SKIP = SHOULD_SKIP; +const REMOVED = exports.REMOVED = 1 << 0; +const SHOULD_STOP = exports.SHOULD_STOP = 1 << 1; +const SHOULD_SKIP = exports.SHOULD_SKIP = 1 << 2; class NodePath { constructor(hub, parent) { this.contexts = []; @@ -187,7 +184,6 @@ for (const type of Object.keys(virtualTypes)) { if (type[0] === "_") continue; if (!t.TYPES.includes(type)) t.TYPES.push(type); } -var _default = NodePath; -exports.default = _default; +var _default = exports.default = NodePath; //# sourceMappingURL=index.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/introspection.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/introspection.js index 524702225d5abe..b83b717d77842e 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/introspection.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/introspection.js @@ -48,8 +48,7 @@ function has(key) { function isStatic() { return this.scope.isStatic(this.node); } -const is = has; -exports.is = is; +const is = exports.is = has; function isnt(key) { return !this.has(key); } diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js index f2e3173ede1072..2d42536796dd21 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/lib/removal-hooks.js @@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.hooks = void 0; -const hooks = [function (self, parent) { +const hooks = exports.hooks = [function (self, parent) { const removeParent = self.key === "test" && (parent.isWhile() || parent.isSwitchCase()) || self.key === "declaration" && parent.isExportDeclaration() || self.key === "body" && parent.isLabeledStatement() || self.listKey === "declarations" && parent.isVariableDeclaration() && parent.node.declarations.length === 1 || self.key === "expression" && parent.isExpressionStatement(); if (removeParent) { parent.remove(); @@ -33,6 +33,5 @@ const hooks = [function (self, parent) { return true; } }]; -exports.hooks = hooks; //# sourceMappingURL=removal-hooks.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js index 4b8eaf00e33b86..0322f091f973df 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/lib/virtual-types.js @@ -4,41 +4,23 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.Var = exports.User = exports.Statement = exports.SpreadProperty = exports.Scope = exports.RestProperty = exports.ReferencedMemberExpression = exports.ReferencedIdentifier = exports.Referenced = exports.Pure = exports.NumericLiteralTypeAnnotation = exports.Generated = exports.ForAwaitStatement = exports.Flow = exports.Expression = exports.ExistentialTypeParam = exports.BlockScoped = exports.BindingIdentifier = void 0; -const ReferencedIdentifier = ["Identifier", "JSXIdentifier"]; -exports.ReferencedIdentifier = ReferencedIdentifier; -const ReferencedMemberExpression = ["MemberExpression"]; -exports.ReferencedMemberExpression = ReferencedMemberExpression; -const BindingIdentifier = ["Identifier"]; -exports.BindingIdentifier = BindingIdentifier; -const Statement = ["Statement"]; -exports.Statement = Statement; -const Expression = ["Expression"]; -exports.Expression = Expression; -const Scope = ["Scopable", "Pattern"]; -exports.Scope = Scope; -const Referenced = null; -exports.Referenced = Referenced; -const BlockScoped = null; -exports.BlockScoped = BlockScoped; -const Var = ["VariableDeclaration"]; -exports.Var = Var; -const User = null; -exports.User = User; -const Generated = null; -exports.Generated = Generated; -const Pure = null; -exports.Pure = Pure; -const Flow = ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"]; -exports.Flow = Flow; -const RestProperty = ["RestElement"]; -exports.RestProperty = RestProperty; -const SpreadProperty = ["RestElement"]; -exports.SpreadProperty = SpreadProperty; -const ExistentialTypeParam = ["ExistsTypeAnnotation"]; -exports.ExistentialTypeParam = ExistentialTypeParam; -const NumericLiteralTypeAnnotation = ["NumberLiteralTypeAnnotation"]; -exports.NumericLiteralTypeAnnotation = NumericLiteralTypeAnnotation; -const ForAwaitStatement = ["ForOfStatement"]; -exports.ForAwaitStatement = ForAwaitStatement; +const ReferencedIdentifier = exports.ReferencedIdentifier = ["Identifier", "JSXIdentifier"]; +const ReferencedMemberExpression = exports.ReferencedMemberExpression = ["MemberExpression"]; +const BindingIdentifier = exports.BindingIdentifier = ["Identifier"]; +const Statement = exports.Statement = ["Statement"]; +const Expression = exports.Expression = ["Expression"]; +const Scope = exports.Scope = ["Scopable", "Pattern"]; +const Referenced = exports.Referenced = null; +const BlockScoped = exports.BlockScoped = null; +const Var = exports.Var = ["VariableDeclaration"]; +const User = exports.User = null; +const Generated = exports.Generated = null; +const Pure = exports.Pure = null; +const Flow = exports.Flow = ["Flow", "ImportDeclaration", "ExportDeclaration", "ImportSpecifier"]; +const RestProperty = exports.RestProperty = ["RestElement"]; +const SpreadProperty = exports.SpreadProperty = ["RestElement"]; +const ExistentialTypeParam = exports.ExistentialTypeParam = ["ExistsTypeAnnotation"]; +const NumericLiteralTypeAnnotation = exports.NumericLiteralTypeAnnotation = ["NumberLiteralTypeAnnotation"]; +const ForAwaitStatement = exports.ForAwaitStatement = ["ForOfStatement"]; //# sourceMappingURL=virtual-types.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/removal.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/removal.js index 220cdc946fbeb2..7b1ce871f55553 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/removal.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/removal.js @@ -12,6 +12,10 @@ exports.remove = remove; var _removalHooks = require("./lib/removal-hooks.js"); var _cache = require("../cache.js"); var _index = require("./index.js"); +var _t = require("@babel/types"); +const { + getBindingIdentifiers +} = _t; function remove() { var _this$opts; this._assertUnremoved(); @@ -28,7 +32,7 @@ function remove() { this._markRemoved(); } function _removeFromScope() { - const bindings = this.getBindingIdentifiers(); + const bindings = getBindingIdentifiers(this.node, false, false, true); Object.keys(bindings).forEach(name => this.scope.removeBinding(name)); } function _callRemovalHooks() { diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/replacement.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/replacement.js index dd3df51aa040b1..cca66d0f7c2eef 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/replacement.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/path/replacement.js @@ -22,19 +22,27 @@ const { assignmentExpression, awaitExpression, blockStatement, + buildUndefinedNode, callExpression, cloneNode, + conditionalExpression, expressionStatement, + getBindingIdentifiers, identifier, inheritLeadingComments, inheritTrailingComments, inheritsComments, + isBlockStatement, + isEmptyStatement, isExpression, + isExpressionStatement, + isIfStatement, isProgram, isStatement, + isVariableDeclaration, removeComments, returnStatement, - toSequenceExpression, + sequenceExpression, validate, yieldExpression } = _t; @@ -44,7 +52,7 @@ function replaceWithMultiple(nodes) { nodes = this._verifyNodeList(nodes); inheritLeadingComments(nodes[0], this.node); inheritTrailingComments(nodes[nodes.length - 1], this.node); - (_getCachedPaths = (0, _cache.getCachedPaths)(this.hub, this.parent)) == null ? void 0 : _getCachedPaths.delete(this.node); + (_getCachedPaths = (0, _cache.getCachedPaths)(this.hub, this.parent)) == null || _getCachedPaths.delete(this.node); this.node = this.container[this.key] = null; const paths = this.insertAfter(nodes); if (this.node) { @@ -132,14 +140,18 @@ function _replaceWith(node) { validate(this.parent, this.key, node); } this.debug(`Replace with ${node == null ? void 0 : node.type}`); - (_getCachedPaths2 = (0, _cache.getCachedPaths)(this.hub, this.parent)) == null ? void 0 : _getCachedPaths2.set(node, this).delete(this.node); + (_getCachedPaths2 = (0, _cache.getCachedPaths)(this.hub, this.parent)) == null || _getCachedPaths2.set(node, this).delete(this.node); this.node = this.container[this.key] = node; } function replaceExpressionWithStatements(nodes) { this.resync(); - const nodesAsSequenceExpression = toSequenceExpression(nodes, this.scope); - if (nodesAsSequenceExpression) { - return this.replaceWith(nodesAsSequenceExpression)[0].get("expressions"); + const declars = []; + const nodesAsSingleExpression = gatherSequenceExpressions(nodes, declars); + if (nodesAsSingleExpression) { + for (const id of declars) this.scope.push({ + id + }); + return this.replaceWith(nodesAsSingleExpression)[0].get("expressions"); } const functionParent = this.getFunctionParent(); const isParentAsync = functionParent == null ? void 0 : functionParent.is("async"); @@ -186,6 +198,53 @@ function replaceExpressionWithStatements(nodes) { } return newCallee.get("body.body"); } +function gatherSequenceExpressions(nodes, declars) { + const exprs = []; + let ensureLastUndefined = true; + for (const node of nodes) { + if (!isEmptyStatement(node)) { + ensureLastUndefined = false; + } + if (isExpression(node)) { + exprs.push(node); + } else if (isExpressionStatement(node)) { + exprs.push(node.expression); + } else if (isVariableDeclaration(node)) { + if (node.kind !== "var") return; + for (const declar of node.declarations) { + const bindings = getBindingIdentifiers(declar); + for (const key of Object.keys(bindings)) { + declars.push(cloneNode(bindings[key])); + } + if (declar.init) { + exprs.push(assignmentExpression("=", declar.id, declar.init)); + } + } + ensureLastUndefined = true; + } else if (isIfStatement(node)) { + const consequent = node.consequent ? gatherSequenceExpressions([node.consequent], declars) : buildUndefinedNode(); + const alternate = node.alternate ? gatherSequenceExpressions([node.alternate], declars) : buildUndefinedNode(); + if (!consequent || !alternate) return; + exprs.push(conditionalExpression(node.test, consequent, alternate)); + } else if (isBlockStatement(node)) { + const body = gatherSequenceExpressions(node.body, declars); + if (!body) return; + exprs.push(body); + } else if (isEmptyStatement(node)) { + if (nodes.indexOf(node) === 0) { + ensureLastUndefined = true; + } + } else { + return; + } + } + if (ensureLastUndefined) exprs.push(buildUndefinedNode()); + if (exprs.length === 1) { + return exprs[0]; + } else { + return sequenceExpression(exprs); + } +} function replaceInline(nodes) { this.resync(); if (Array.isArray(nodes)) { diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/scope/index.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/scope/index.js index 0f087c6aa76fb4..ed90029fbb64a8 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/scope/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/scope/index.js @@ -222,12 +222,12 @@ const collectorVisitor = { const id = declar.id; if (!id) return; const binding = scope.getBinding(id.name); - binding == null ? void 0 : binding.reference(path); + binding == null || binding.reference(path); } else if (isVariableDeclaration(declar)) { for (const decl of declar.declarations) { for (const name of Object.keys(getBindingIdentifiers(decl))) { const binding = scope.getBinding(name); - binding == null ? void 0 : binding.reference(path); + binding == null || binding.reference(path); } } } @@ -512,7 +512,7 @@ class Scope { const ids = path.getBindingIdentifiers(); for (const name of Object.keys(ids)) { var _this$getBinding; - (_this$getBinding = this.getBinding(name)) == null ? void 0 : _this$getBinding.reassign(path); + (_this$getBinding = this.getBinding(name)) == null || _this$getBinding.reassign(path); } } registerBinding(kind, path, bindingPath = path) { @@ -872,7 +872,7 @@ class Scope { } removeBinding(name) { var _this$getBinding3; - (_this$getBinding3 = this.getBinding(name)) == null ? void 0 : _this$getBinding3.scope.removeOwnBinding(name); + (_this$getBinding3 = this.getBinding(name)) == null || _this$getBinding3.scope.removeOwnBinding(name); let scope = this; do { if (scope.uids[name]) { diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/visitors.js b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/visitors.js index a2b9d81d02cf0b..cb06c80c9f5474 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/lib/visitors.js +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/lib/visitors.js @@ -8,6 +8,7 @@ exports.isExplodedVisitor = isExplodedVisitor; exports.merge = merge; exports.verify = verify; var virtualTypes = require("./path/lib/virtual-types.js"); +var virtualTypesValidators = require("./path/lib/virtual-types-validator.js"); var _t = require("@babel/types"); const { DEPRECATED_KEYS, @@ -187,8 +188,10 @@ function ensureCallbackArrays(obj) { if (obj.exit && !Array.isArray(obj.exit)) obj.exit = [obj.exit]; } function wrapCheck(nodeType, fn) { + const fnKey = `is${nodeType}`; + const validator = virtualTypesValidators[fnKey]; const newFn = function (path) { - if (path[`is${nodeType}`]()) { + if (validator.call(path)) { return fn.apply(this, arguments); } }; diff --git a/tools/node_modules/eslint/node_modules/@babel/traverse/package.json b/tools/node_modules/eslint/node_modules/@babel/traverse/package.json index a80ac80fd2e1a8..0fabd752426218 100644 --- a/tools/node_modules/eslint/node_modules/@babel/traverse/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/traverse/package.json @@ -1,6 +1,6 @@ { "name": "@babel/traverse", - "version": "7.23.2", + "version": "7.23.5", "description": "The Babel Traverse module maintains the overall tree state, and is responsible for replacing, removing, and adding nodes", "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-traverse", @@ -16,19 +16,19 @@ }, "main": "./lib/index.js", "dependencies": { - "@babel/code-frame": "^7.22.13", - "@babel/generator": "^7.23.0", + "@babel/code-frame": "^7.23.5", + "@babel/generator": "^7.23.5", "@babel/helper-environment-visitor": "^7.22.20", "@babel/helper-function-name": "^7.23.0", "@babel/helper-hoist-variables": "^7.22.5", "@babel/helper-split-export-declaration": "^7.22.6", - "@babel/parser": "^7.23.0", - "@babel/types": "^7.23.0", + "@babel/parser": "^7.23.5", + "@babel/types": "^7.23.5", "debug": "^4.1.0", "globals": "^11.1.0" }, "devDependencies": { - "@babel/core": "^7.23.0", + "@babel/core": "^7.23.5", "@babel/helper-plugin-test-runner": "^7.22.5" }, "engines": { diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js index 8b1917c43e6fe5..79d58becbb40e6 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js @@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; var _index = require("../generated/index.js"); -var _default = createTypeAnnotationBasedOnTypeof; -exports.default = _default; +var _default = exports.default = createTypeAnnotationBasedOnTypeof; function createTypeAnnotationBasedOnTypeof(type) { switch (type) { case "string": diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/constants/generated/index.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/constants/generated/index.js index 50c8179583b75b..9dbb33214b864f 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/constants/generated/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/constants/generated/index.js @@ -5,105 +5,55 @@ Object.defineProperty(exports, "__esModule", { }); exports.WHILE_TYPES = exports.USERWHITESPACABLE_TYPES = exports.UNARYLIKE_TYPES = exports.TYPESCRIPT_TYPES = exports.TSTYPE_TYPES = exports.TSTYPEELEMENT_TYPES = exports.TSENTITYNAME_TYPES = exports.TSBASETYPE_TYPES = exports.TERMINATORLESS_TYPES = exports.STATEMENT_TYPES = exports.STANDARDIZED_TYPES = exports.SCOPABLE_TYPES = exports.PUREISH_TYPES = exports.PROPERTY_TYPES = exports.PRIVATE_TYPES = exports.PATTERN_TYPES = exports.PATTERNLIKE_TYPES = exports.OBJECTMEMBER_TYPES = exports.MODULESPECIFIER_TYPES = exports.MODULEDECLARATION_TYPES = exports.MISCELLANEOUS_TYPES = exports.METHOD_TYPES = exports.LVAL_TYPES = exports.LOOP_TYPES = exports.LITERAL_TYPES = exports.JSX_TYPES = exports.IMPORTOREXPORTDECLARATION_TYPES = exports.IMMUTABLE_TYPES = exports.FUNCTION_TYPES = exports.FUNCTIONPARENT_TYPES = exports.FOR_TYPES = exports.FORXSTATEMENT_TYPES = exports.FLOW_TYPES = exports.FLOWTYPE_TYPES = exports.FLOWPREDICATE_TYPES = exports.FLOWDECLARATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = exports.EXPRESSION_TYPES = exports.EXPRESSIONWRAPPER_TYPES = exports.EXPORTDECLARATION_TYPES = exports.ENUMMEMBER_TYPES = exports.ENUMBODY_TYPES = exports.DECLARATION_TYPES = exports.CONDITIONAL_TYPES = exports.COMPLETIONSTATEMENT_TYPES = exports.CLASS_TYPES = exports.BLOCK_TYPES = exports.BLOCKPARENT_TYPES = exports.BINARY_TYPES = exports.ACCESSOR_TYPES = void 0; var _index = require("../../definitions/index.js"); -const STANDARDIZED_TYPES = _index.FLIPPED_ALIAS_KEYS["Standardized"]; -exports.STANDARDIZED_TYPES = STANDARDIZED_TYPES; -const EXPRESSION_TYPES = _index.FLIPPED_ALIAS_KEYS["Expression"]; -exports.EXPRESSION_TYPES = EXPRESSION_TYPES; -const BINARY_TYPES = _index.FLIPPED_ALIAS_KEYS["Binary"]; -exports.BINARY_TYPES = BINARY_TYPES; -const SCOPABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["Scopable"]; -exports.SCOPABLE_TYPES = SCOPABLE_TYPES; -const BLOCKPARENT_TYPES = _index.FLIPPED_ALIAS_KEYS["BlockParent"]; -exports.BLOCKPARENT_TYPES = BLOCKPARENT_TYPES; -const BLOCK_TYPES = _index.FLIPPED_ALIAS_KEYS["Block"]; -exports.BLOCK_TYPES = BLOCK_TYPES; -const STATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["Statement"]; -exports.STATEMENT_TYPES = STATEMENT_TYPES; -const TERMINATORLESS_TYPES = _index.FLIPPED_ALIAS_KEYS["Terminatorless"]; -exports.TERMINATORLESS_TYPES = TERMINATORLESS_TYPES; -const COMPLETIONSTATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["CompletionStatement"]; -exports.COMPLETIONSTATEMENT_TYPES = COMPLETIONSTATEMENT_TYPES; -const CONDITIONAL_TYPES = _index.FLIPPED_ALIAS_KEYS["Conditional"]; -exports.CONDITIONAL_TYPES = CONDITIONAL_TYPES; -const LOOP_TYPES = _index.FLIPPED_ALIAS_KEYS["Loop"]; -exports.LOOP_TYPES = LOOP_TYPES; -const WHILE_TYPES = _index.FLIPPED_ALIAS_KEYS["While"]; -exports.WHILE_TYPES = WHILE_TYPES; -const EXPRESSIONWRAPPER_TYPES = _index.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; -exports.EXPRESSIONWRAPPER_TYPES = EXPRESSIONWRAPPER_TYPES; -const FOR_TYPES = _index.FLIPPED_ALIAS_KEYS["For"]; -exports.FOR_TYPES = FOR_TYPES; -const FORXSTATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["ForXStatement"]; -exports.FORXSTATEMENT_TYPES = FORXSTATEMENT_TYPES; -const FUNCTION_TYPES = _index.FLIPPED_ALIAS_KEYS["Function"]; -exports.FUNCTION_TYPES = FUNCTION_TYPES; -const FUNCTIONPARENT_TYPES = _index.FLIPPED_ALIAS_KEYS["FunctionParent"]; -exports.FUNCTIONPARENT_TYPES = FUNCTIONPARENT_TYPES; -const PUREISH_TYPES = _index.FLIPPED_ALIAS_KEYS["Pureish"]; -exports.PUREISH_TYPES = PUREISH_TYPES; -const DECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["Declaration"]; -exports.DECLARATION_TYPES = DECLARATION_TYPES; -const PATTERNLIKE_TYPES = _index.FLIPPED_ALIAS_KEYS["PatternLike"]; -exports.PATTERNLIKE_TYPES = PATTERNLIKE_TYPES; -const LVAL_TYPES = _index.FLIPPED_ALIAS_KEYS["LVal"]; -exports.LVAL_TYPES = LVAL_TYPES; -const TSENTITYNAME_TYPES = _index.FLIPPED_ALIAS_KEYS["TSEntityName"]; -exports.TSENTITYNAME_TYPES = TSENTITYNAME_TYPES; -const LITERAL_TYPES = _index.FLIPPED_ALIAS_KEYS["Literal"]; -exports.LITERAL_TYPES = LITERAL_TYPES; -const IMMUTABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["Immutable"]; -exports.IMMUTABLE_TYPES = IMMUTABLE_TYPES; -const USERWHITESPACABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; -exports.USERWHITESPACABLE_TYPES = USERWHITESPACABLE_TYPES; -const METHOD_TYPES = _index.FLIPPED_ALIAS_KEYS["Method"]; -exports.METHOD_TYPES = METHOD_TYPES; -const OBJECTMEMBER_TYPES = _index.FLIPPED_ALIAS_KEYS["ObjectMember"]; -exports.OBJECTMEMBER_TYPES = OBJECTMEMBER_TYPES; -const PROPERTY_TYPES = _index.FLIPPED_ALIAS_KEYS["Property"]; -exports.PROPERTY_TYPES = PROPERTY_TYPES; -const UNARYLIKE_TYPES = _index.FLIPPED_ALIAS_KEYS["UnaryLike"]; -exports.UNARYLIKE_TYPES = UNARYLIKE_TYPES; -const PATTERN_TYPES = _index.FLIPPED_ALIAS_KEYS["Pattern"]; -exports.PATTERN_TYPES = PATTERN_TYPES; -const CLASS_TYPES = _index.FLIPPED_ALIAS_KEYS["Class"]; -exports.CLASS_TYPES = CLASS_TYPES; -const IMPORTOREXPORTDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["ImportOrExportDeclaration"]; -exports.IMPORTOREXPORTDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES; -const EXPORTDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; -exports.EXPORTDECLARATION_TYPES = EXPORTDECLARATION_TYPES; -const MODULESPECIFIER_TYPES = _index.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; -exports.MODULESPECIFIER_TYPES = MODULESPECIFIER_TYPES; -const ACCESSOR_TYPES = _index.FLIPPED_ALIAS_KEYS["Accessor"]; -exports.ACCESSOR_TYPES = ACCESSOR_TYPES; -const PRIVATE_TYPES = _index.FLIPPED_ALIAS_KEYS["Private"]; -exports.PRIVATE_TYPES = PRIVATE_TYPES; -const FLOW_TYPES = _index.FLIPPED_ALIAS_KEYS["Flow"]; -exports.FLOW_TYPES = FLOW_TYPES; -const FLOWTYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowType"]; -exports.FLOWTYPE_TYPES = FLOWTYPE_TYPES; -const FLOWBASEANNOTATION_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; -exports.FLOWBASEANNOTATION_TYPES = FLOWBASEANNOTATION_TYPES; -const FLOWDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; -exports.FLOWDECLARATION_TYPES = FLOWDECLARATION_TYPES; -const FLOWPREDICATE_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowPredicate"]; -exports.FLOWPREDICATE_TYPES = FLOWPREDICATE_TYPES; -const ENUMBODY_TYPES = _index.FLIPPED_ALIAS_KEYS["EnumBody"]; -exports.ENUMBODY_TYPES = ENUMBODY_TYPES; -const ENUMMEMBER_TYPES = _index.FLIPPED_ALIAS_KEYS["EnumMember"]; -exports.ENUMMEMBER_TYPES = ENUMMEMBER_TYPES; -const JSX_TYPES = _index.FLIPPED_ALIAS_KEYS["JSX"]; -exports.JSX_TYPES = JSX_TYPES; -const MISCELLANEOUS_TYPES = _index.FLIPPED_ALIAS_KEYS["Miscellaneous"]; -exports.MISCELLANEOUS_TYPES = MISCELLANEOUS_TYPES; -const TYPESCRIPT_TYPES = _index.FLIPPED_ALIAS_KEYS["TypeScript"]; -exports.TYPESCRIPT_TYPES = TYPESCRIPT_TYPES; -const TSTYPEELEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["TSTypeElement"]; -exports.TSTYPEELEMENT_TYPES = TSTYPEELEMENT_TYPES; -const TSTYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["TSType"]; -exports.TSTYPE_TYPES = TSTYPE_TYPES; -const TSBASETYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["TSBaseType"]; -exports.TSBASETYPE_TYPES = TSBASETYPE_TYPES; -const MODULEDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES; -exports.MODULEDECLARATION_TYPES = MODULEDECLARATION_TYPES; +const STANDARDIZED_TYPES = exports.STANDARDIZED_TYPES = _index.FLIPPED_ALIAS_KEYS["Standardized"]; +const EXPRESSION_TYPES = exports.EXPRESSION_TYPES = _index.FLIPPED_ALIAS_KEYS["Expression"]; +const BINARY_TYPES = exports.BINARY_TYPES = _index.FLIPPED_ALIAS_KEYS["Binary"]; +const SCOPABLE_TYPES = exports.SCOPABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["Scopable"]; +const BLOCKPARENT_TYPES = exports.BLOCKPARENT_TYPES = _index.FLIPPED_ALIAS_KEYS["BlockParent"]; +const BLOCK_TYPES = exports.BLOCK_TYPES = _index.FLIPPED_ALIAS_KEYS["Block"]; +const STATEMENT_TYPES = exports.STATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["Statement"]; +const TERMINATORLESS_TYPES = exports.TERMINATORLESS_TYPES = _index.FLIPPED_ALIAS_KEYS["Terminatorless"]; +const COMPLETIONSTATEMENT_TYPES = exports.COMPLETIONSTATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["CompletionStatement"]; +const CONDITIONAL_TYPES = exports.CONDITIONAL_TYPES = _index.FLIPPED_ALIAS_KEYS["Conditional"]; +const LOOP_TYPES = exports.LOOP_TYPES = _index.FLIPPED_ALIAS_KEYS["Loop"]; +const WHILE_TYPES = exports.WHILE_TYPES = _index.FLIPPED_ALIAS_KEYS["While"]; +const EXPRESSIONWRAPPER_TYPES = exports.EXPRESSIONWRAPPER_TYPES = _index.FLIPPED_ALIAS_KEYS["ExpressionWrapper"]; +const FOR_TYPES = exports.FOR_TYPES = _index.FLIPPED_ALIAS_KEYS["For"]; +const FORXSTATEMENT_TYPES = exports.FORXSTATEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["ForXStatement"]; +const FUNCTION_TYPES = exports.FUNCTION_TYPES = _index.FLIPPED_ALIAS_KEYS["Function"]; +const FUNCTIONPARENT_TYPES = exports.FUNCTIONPARENT_TYPES = _index.FLIPPED_ALIAS_KEYS["FunctionParent"]; +const PUREISH_TYPES = exports.PUREISH_TYPES = _index.FLIPPED_ALIAS_KEYS["Pureish"]; +const DECLARATION_TYPES = exports.DECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["Declaration"]; +const PATTERNLIKE_TYPES = exports.PATTERNLIKE_TYPES = _index.FLIPPED_ALIAS_KEYS["PatternLike"]; +const LVAL_TYPES = exports.LVAL_TYPES = _index.FLIPPED_ALIAS_KEYS["LVal"]; +const TSENTITYNAME_TYPES = exports.TSENTITYNAME_TYPES = _index.FLIPPED_ALIAS_KEYS["TSEntityName"]; +const LITERAL_TYPES = exports.LITERAL_TYPES = _index.FLIPPED_ALIAS_KEYS["Literal"]; +const IMMUTABLE_TYPES = exports.IMMUTABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["Immutable"]; +const USERWHITESPACABLE_TYPES = exports.USERWHITESPACABLE_TYPES = _index.FLIPPED_ALIAS_KEYS["UserWhitespacable"]; +const METHOD_TYPES = exports.METHOD_TYPES = _index.FLIPPED_ALIAS_KEYS["Method"]; +const OBJECTMEMBER_TYPES = exports.OBJECTMEMBER_TYPES = _index.FLIPPED_ALIAS_KEYS["ObjectMember"]; +const PROPERTY_TYPES = exports.PROPERTY_TYPES = _index.FLIPPED_ALIAS_KEYS["Property"]; +const UNARYLIKE_TYPES = exports.UNARYLIKE_TYPES = _index.FLIPPED_ALIAS_KEYS["UnaryLike"]; +const PATTERN_TYPES = exports.PATTERN_TYPES = _index.FLIPPED_ALIAS_KEYS["Pattern"]; +const CLASS_TYPES = exports.CLASS_TYPES = _index.FLIPPED_ALIAS_KEYS["Class"]; +const IMPORTOREXPORTDECLARATION_TYPES = exports.IMPORTOREXPORTDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["ImportOrExportDeclaration"]; +const EXPORTDECLARATION_TYPES = exports.EXPORTDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["ExportDeclaration"]; +const MODULESPECIFIER_TYPES = exports.MODULESPECIFIER_TYPES = _index.FLIPPED_ALIAS_KEYS["ModuleSpecifier"]; +const ACCESSOR_TYPES = exports.ACCESSOR_TYPES = _index.FLIPPED_ALIAS_KEYS["Accessor"]; +const PRIVATE_TYPES = exports.PRIVATE_TYPES = _index.FLIPPED_ALIAS_KEYS["Private"]; +const FLOW_TYPES = exports.FLOW_TYPES = _index.FLIPPED_ALIAS_KEYS["Flow"]; +const FLOWTYPE_TYPES = exports.FLOWTYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowType"]; +const FLOWBASEANNOTATION_TYPES = exports.FLOWBASEANNOTATION_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowBaseAnnotation"]; +const FLOWDECLARATION_TYPES = exports.FLOWDECLARATION_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowDeclaration"]; +const FLOWPREDICATE_TYPES = exports.FLOWPREDICATE_TYPES = _index.FLIPPED_ALIAS_KEYS["FlowPredicate"]; +const ENUMBODY_TYPES = exports.ENUMBODY_TYPES = _index.FLIPPED_ALIAS_KEYS["EnumBody"]; +const ENUMMEMBER_TYPES = exports.ENUMMEMBER_TYPES = _index.FLIPPED_ALIAS_KEYS["EnumMember"]; +const JSX_TYPES = exports.JSX_TYPES = _index.FLIPPED_ALIAS_KEYS["JSX"]; +const MISCELLANEOUS_TYPES = exports.MISCELLANEOUS_TYPES = _index.FLIPPED_ALIAS_KEYS["Miscellaneous"]; +const TYPESCRIPT_TYPES = exports.TYPESCRIPT_TYPES = _index.FLIPPED_ALIAS_KEYS["TypeScript"]; +const TSTYPEELEMENT_TYPES = exports.TSTYPEELEMENT_TYPES = _index.FLIPPED_ALIAS_KEYS["TSTypeElement"]; +const TSTYPE_TYPES = exports.TSTYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["TSType"]; +const TSBASETYPE_TYPES = exports.TSBASETYPE_TYPES = _index.FLIPPED_ALIAS_KEYS["TSBaseType"]; +const MODULEDECLARATION_TYPES = exports.MODULEDECLARATION_TYPES = IMPORTOREXPORTDECLARATION_TYPES; //# sourceMappingURL=index.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/constants/index.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/constants/index.js index 92484441d41962..5045d01d2dcb0b 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/constants/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/constants/index.js @@ -4,48 +4,28 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.UPDATE_OPERATORS = exports.UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = exports.STATEMENT_OR_BLOCK_KEYS = exports.NUMBER_UNARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = exports.NOT_LOCAL_BINDING = exports.LOGICAL_OPERATORS = exports.INHERIT_KEYS = exports.FOR_INIT_KEYS = exports.FLATTENABLE_KEYS = exports.EQUALITY_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = exports.COMMENT_KEYS = exports.BOOLEAN_UNARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = exports.BLOCK_SCOPED_SYMBOL = exports.BINARY_OPERATORS = exports.ASSIGNMENT_OPERATORS = void 0; -const STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; -exports.STATEMENT_OR_BLOCK_KEYS = STATEMENT_OR_BLOCK_KEYS; -const FLATTENABLE_KEYS = ["body", "expressions"]; -exports.FLATTENABLE_KEYS = FLATTENABLE_KEYS; -const FOR_INIT_KEYS = ["left", "init"]; -exports.FOR_INIT_KEYS = FOR_INIT_KEYS; -const COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; -exports.COMMENT_KEYS = COMMENT_KEYS; -const LOGICAL_OPERATORS = ["||", "&&", "??"]; -exports.LOGICAL_OPERATORS = LOGICAL_OPERATORS; -const UPDATE_OPERATORS = ["++", "--"]; -exports.UPDATE_OPERATORS = UPDATE_OPERATORS; -const BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; -exports.BOOLEAN_NUMBER_BINARY_OPERATORS = BOOLEAN_NUMBER_BINARY_OPERATORS; -const EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; -exports.EQUALITY_BINARY_OPERATORS = EQUALITY_BINARY_OPERATORS; -const COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"]; -exports.COMPARISON_BINARY_OPERATORS = COMPARISON_BINARY_OPERATORS; -const BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS]; -exports.BOOLEAN_BINARY_OPERATORS = BOOLEAN_BINARY_OPERATORS; -const NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; -exports.NUMBER_BINARY_OPERATORS = NUMBER_BINARY_OPERATORS; -const BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS, "|>"]; -exports.BINARY_OPERATORS = BINARY_OPERATORS; -const ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map(op => op + "="), ...LOGICAL_OPERATORS.map(op => op + "=")]; -exports.ASSIGNMENT_OPERATORS = ASSIGNMENT_OPERATORS; -const BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; -exports.BOOLEAN_UNARY_OPERATORS = BOOLEAN_UNARY_OPERATORS; -const NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; -exports.NUMBER_UNARY_OPERATORS = NUMBER_UNARY_OPERATORS; -const STRING_UNARY_OPERATORS = ["typeof"]; -exports.STRING_UNARY_OPERATORS = STRING_UNARY_OPERATORS; -const UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS]; -exports.UNARY_OPERATORS = UNARY_OPERATORS; -const INHERIT_KEYS = { +const STATEMENT_OR_BLOCK_KEYS = exports.STATEMENT_OR_BLOCK_KEYS = ["consequent", "body", "alternate"]; +const FLATTENABLE_KEYS = exports.FLATTENABLE_KEYS = ["body", "expressions"]; +const FOR_INIT_KEYS = exports.FOR_INIT_KEYS = ["left", "init"]; +const COMMENT_KEYS = exports.COMMENT_KEYS = ["leadingComments", "trailingComments", "innerComments"]; +const LOGICAL_OPERATORS = exports.LOGICAL_OPERATORS = ["||", "&&", "??"]; +const UPDATE_OPERATORS = exports.UPDATE_OPERATORS = ["++", "--"]; +const BOOLEAN_NUMBER_BINARY_OPERATORS = exports.BOOLEAN_NUMBER_BINARY_OPERATORS = [">", "<", ">=", "<="]; +const EQUALITY_BINARY_OPERATORS = exports.EQUALITY_BINARY_OPERATORS = ["==", "===", "!=", "!=="]; +const COMPARISON_BINARY_OPERATORS = exports.COMPARISON_BINARY_OPERATORS = [...EQUALITY_BINARY_OPERATORS, "in", "instanceof"]; +const BOOLEAN_BINARY_OPERATORS = exports.BOOLEAN_BINARY_OPERATORS = [...COMPARISON_BINARY_OPERATORS, ...BOOLEAN_NUMBER_BINARY_OPERATORS]; +const NUMBER_BINARY_OPERATORS = exports.NUMBER_BINARY_OPERATORS = ["-", "/", "%", "*", "**", "&", "|", ">>", ">>>", "<<", "^"]; +const BINARY_OPERATORS = exports.BINARY_OPERATORS = ["+", ...NUMBER_BINARY_OPERATORS, ...BOOLEAN_BINARY_OPERATORS, "|>"]; +const ASSIGNMENT_OPERATORS = exports.ASSIGNMENT_OPERATORS = ["=", "+=", ...NUMBER_BINARY_OPERATORS.map(op => op + "="), ...LOGICAL_OPERATORS.map(op => op + "=")]; +const BOOLEAN_UNARY_OPERATORS = exports.BOOLEAN_UNARY_OPERATORS = ["delete", "!"]; +const NUMBER_UNARY_OPERATORS = exports.NUMBER_UNARY_OPERATORS = ["+", "-", "~"]; +const STRING_UNARY_OPERATORS = exports.STRING_UNARY_OPERATORS = ["typeof"]; +const UNARY_OPERATORS = exports.UNARY_OPERATORS = ["void", "throw", ...BOOLEAN_UNARY_OPERATORS, ...NUMBER_UNARY_OPERATORS, ...STRING_UNARY_OPERATORS]; +const INHERIT_KEYS = exports.INHERIT_KEYS = { optional: ["typeAnnotation", "typeParameters", "returnType"], force: ["start", "loc", "end"] }; -exports.INHERIT_KEYS = INHERIT_KEYS; -const BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); -exports.BLOCK_SCOPED_SYMBOL = BLOCK_SCOPED_SYMBOL; -const NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); -exports.NOT_LOCAL_BINDING = NOT_LOCAL_BINDING; +const BLOCK_SCOPED_SYMBOL = exports.BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped"); +const NOT_LOCAL_BINDING = exports.NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding"); //# sourceMappingURL=index.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js index aa212fdcb02910..05c311a276a3b9 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js @@ -8,6 +8,7 @@ var _getBindingIdentifiers = require("../retrievers/getBindingIdentifiers.js"); var _index = require("../validators/generated/index.js"); var _index2 = require("../builders/generated/index.js"); var _cloneNode = require("../clone/cloneNode.js"); +; function gatherSequenceExpressions(nodes, scope, declars) { const exprs = []; let ensureLastUndefined = true; diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toExpression.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toExpression.js index 6628365712d998..bcb576fe2f057b 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toExpression.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toExpression.js @@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; var _index = require("../validators/generated/index.js"); -var _default = toExpression; -exports.default = _default; +var _default = exports.default = toExpression; function toExpression(node) { if ((0, _index.isExpressionStatement)(node)) { node = node.expression; diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toSequenceExpression.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toSequenceExpression.js index 110feb5db5f90b..7a4322f80ef82e 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toSequenceExpression.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toSequenceExpression.js @@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = toSequenceExpression; var _gatherSequenceExpressions = require("./gatherSequenceExpressions.js"); +; function toSequenceExpression(nodes, scope) { if (!(nodes != null && nodes.length)) return; const declars = []; diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toStatement.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toStatement.js index 9b3962eb3e6dbd..92cfd96033aa69 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toStatement.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/toStatement.js @@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _index = require("../validators/generated/index.js"); var _index2 = require("../builders/generated/index.js"); -var _default = toStatement; -exports.default = _default; +var _default = exports.default = toStatement; function toStatement(node, ignore) { if ((0, _index.isStatement)(node)) { return node; diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/valueToNode.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/valueToNode.js index 17b35edadc3113..e0ed95225d54f1 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/valueToNode.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/converters/valueToNode.js @@ -6,8 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _isValidIdentifier = require("../validators/isValidIdentifier.js"); var _index = require("../builders/generated/index.js"); -var _default = valueToNode; -exports.default = _default; +var _default = exports.default = valueToNode; const objectToString = Function.call.bind(Object.prototype.toString); function isRegExp(value) { return objectToString(value) === "[object RegExp]"; diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/deprecated-aliases.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/deprecated-aliases.js index 6c04ed6166d9b3..03a375173239da 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/deprecated-aliases.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/deprecated-aliases.js @@ -4,9 +4,8 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.DEPRECATED_ALIASES = void 0; -const DEPRECATED_ALIASES = { +const DEPRECATED_ALIASES = exports.DEPRECATED_ALIASES = { ModuleDeclaration: "ImportOrExportDeclaration" }; -exports.DEPRECATED_ALIASES = DEPRECATED_ALIASES; //# sourceMappingURL=deprecated-aliases.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/index.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/index.js index da75ae9b66dba3..1f9b95ca358416 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/index.js @@ -91,7 +91,6 @@ _toFastProperties(_utils.BUILDER_KEYS); _toFastProperties(_utils.DEPRECATED_KEYS); _toFastProperties(_placeholders.PLACEHOLDERS_ALIAS); _toFastProperties(_placeholders.PLACEHOLDERS_FLIPPED_ALIAS); -const TYPES = [].concat(Object.keys(_utils.VISITOR_KEYS), Object.keys(_utils.FLIPPED_ALIAS_KEYS), Object.keys(_utils.DEPRECATED_KEYS)); -exports.TYPES = TYPES; +const TYPES = exports.TYPES = [].concat(Object.keys(_utils.VISITOR_KEYS), Object.keys(_utils.FLIPPED_ALIAS_KEYS), Object.keys(_utils.DEPRECATED_KEYS)); //# sourceMappingURL=index.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/placeholders.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/placeholders.js index 3b96a0ea39acff..6c2e514f3d5df3 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/placeholders.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/placeholders.js @@ -5,19 +5,16 @@ Object.defineProperty(exports, "__esModule", { }); exports.PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS = void 0; var _utils = require("./utils.js"); -const PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; -exports.PLACEHOLDERS = PLACEHOLDERS; -const PLACEHOLDERS_ALIAS = { +const PLACEHOLDERS = exports.PLACEHOLDERS = ["Identifier", "StringLiteral", "Expression", "Statement", "Declaration", "BlockStatement", "ClassBody", "Pattern"]; +const PLACEHOLDERS_ALIAS = exports.PLACEHOLDERS_ALIAS = { Declaration: ["Statement"], Pattern: ["PatternLike", "LVal"] }; -exports.PLACEHOLDERS_ALIAS = PLACEHOLDERS_ALIAS; for (const type of PLACEHOLDERS) { const alias = _utils.ALIAS_KEYS[type]; if (alias != null && alias.length) PLACEHOLDERS_ALIAS[type] = alias; } -const PLACEHOLDERS_FLIPPED_ALIAS = {}; -exports.PLACEHOLDERS_FLIPPED_ALIAS = PLACEHOLDERS_FLIPPED_ALIAS; +const PLACEHOLDERS_FLIPPED_ALIAS = exports.PLACEHOLDERS_FLIPPED_ALIAS = {}; Object.keys(PLACEHOLDERS_ALIAS).forEach(type => { PLACEHOLDERS_ALIAS[type].forEach(alias => { if (!Object.hasOwnProperty.call(PLACEHOLDERS_FLIPPED_ALIAS, alias)) { diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/utils.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/utils.js index b5b043519ac06f..33d7cda690d251 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/utils.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/definitions/utils.js @@ -24,20 +24,13 @@ exports.validateOptionalType = validateOptionalType; exports.validateType = validateType; var _is = require("../validators/is.js"); var _validate = require("../validators/validate.js"); -const VISITOR_KEYS = {}; -exports.VISITOR_KEYS = VISITOR_KEYS; -const ALIAS_KEYS = {}; -exports.ALIAS_KEYS = ALIAS_KEYS; -const FLIPPED_ALIAS_KEYS = {}; -exports.FLIPPED_ALIAS_KEYS = FLIPPED_ALIAS_KEYS; -const NODE_FIELDS = {}; -exports.NODE_FIELDS = NODE_FIELDS; -const BUILDER_KEYS = {}; -exports.BUILDER_KEYS = BUILDER_KEYS; -const DEPRECATED_KEYS = {}; -exports.DEPRECATED_KEYS = DEPRECATED_KEYS; -const NODE_PARENT_VALIDATIONS = {}; -exports.NODE_PARENT_VALIDATIONS = NODE_PARENT_VALIDATIONS; +const VISITOR_KEYS = exports.VISITOR_KEYS = {}; +const ALIAS_KEYS = exports.ALIAS_KEYS = {}; +const FLIPPED_ALIAS_KEYS = exports.FLIPPED_ALIAS_KEYS = {}; +const NODE_FIELDS = exports.NODE_FIELDS = {}; +const BUILDER_KEYS = exports.BUILDER_KEYS = {}; +const DEPRECATED_KEYS = exports.DEPRECATED_KEYS = {}; +const NODE_PARENT_VALIDATIONS = exports.NODE_PARENT_VALIDATIONS = {}; function getType(val) { if (Array.isArray(val)) { return "array"; diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/index.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/index.js index 33df87ac129be6..84b756f0526f2e 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/index.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/index.js @@ -29,7 +29,6 @@ var _exportNames = { toExpression: true, toIdentifier: true, toKeyAlias: true, - toSequenceExpression: true, toStatement: true, valueToNode: true, appendToMemberExpression: true, @@ -370,12 +369,6 @@ Object.defineProperty(exports, "toKeyAlias", { return _toKeyAlias.default; } }); -Object.defineProperty(exports, "toSequenceExpression", { - enumerable: true, - get: function () { - return _toSequenceExpression.default; - } -}); Object.defineProperty(exports, "toStatement", { enumerable: true, get: function () { @@ -504,7 +497,6 @@ var _toComputedKey = require("./converters/toComputedKey.js"); var _toExpression = require("./converters/toExpression.js"); var _toIdentifier = require("./converters/toIdentifier.js"); var _toKeyAlias = require("./converters/toKeyAlias.js"); -var _toSequenceExpression = require("./converters/toSequenceExpression.js"); var _toStatement = require("./converters/toStatement.js"); var _valueToNode = require("./converters/valueToNode.js"); var _index5 = require("./definitions/index.js"); @@ -572,11 +564,13 @@ Object.keys(_index6).forEach(function (key) { }); }); var _deprecationWarning = require("./utils/deprecationWarning.js"); -const react = { +const react = exports.react = { isReactComponent: _isReactComponent.default, isCompatTag: _isCompatTag.default, buildChildren: _buildChildren.default }; -exports.react = react; +{ + exports.toSequenceExpression = require("./converters/toSequenceExpression.js").default; +} //# sourceMappingURL=index.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js index dc90bdb35be202..86b4d1d2e4e280 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js @@ -5,12 +5,15 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = getBindingIdentifiers; var _index = require("../validators/generated/index.js"); -function getBindingIdentifiers(node, duplicates, outerOnly) { +function getBindingIdentifiers(node, duplicates, outerOnly, newBindingsOnly) { const search = [].concat(node); const ids = Object.create(null); while (search.length) { const id = search.shift(); if (!id) continue; + if (newBindingsOnly && ((0, _index.isAssignmentExpression)(id) || (0, _index.isUnaryExpression)(id))) { + continue; + } const keys = getBindingIdentifiers.keys[id.type]; if ((0, _index.isIdentifier)(id)) { if (duplicates) { diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js index 42425626d7c49c..f51c47b5f89fea 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js @@ -5,8 +5,7 @@ Object.defineProperty(exports, "__esModule", { }); exports.default = void 0; var _getBindingIdentifiers = require("./getBindingIdentifiers.js"); -var _default = getOuterBindingIdentifiers; -exports.default = _default; +var _default = exports.default = getOuterBindingIdentifiers; function getOuterBindingIdentifiers(node, duplicates) { return (0, _getBindingIdentifiers.default)(node, duplicates, true); } diff --git a/tools/node_modules/eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js b/tools/node_modules/eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js index 63f878a214767f..34b3467250c1e5 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js +++ b/tools/node_modules/eslint/node_modules/@babel/types/lib/validators/react/isReactComponent.js @@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _buildMatchMemberExpression = require("../buildMatchMemberExpression.js"); const isReactComponent = (0, _buildMatchMemberExpression.default)("React.Component"); -var _default = isReactComponent; -exports.default = _default; +var _default = exports.default = isReactComponent; //# sourceMappingURL=isReactComponent.js.map diff --git a/tools/node_modules/eslint/node_modules/@babel/types/package.json b/tools/node_modules/eslint/node_modules/@babel/types/package.json index 4acb0bf1799da6..0fd8968dde92ee 100644 --- a/tools/node_modules/eslint/node_modules/@babel/types/package.json +++ b/tools/node_modules/eslint/node_modules/@babel/types/package.json @@ -1,6 +1,6 @@ { "name": "@babel/types", - "version": "7.23.0", + "version": "7.23.5", "description": "Babel Types is a Lodash-esque utility library for AST nodes", "author": "The Babel Team (https://babel.dev/team)", "homepage": "https://babel.dev/docs/en/next/babel-types", @@ -24,13 +24,13 @@ } }, "dependencies": { - "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-string-parser": "^7.23.4", "@babel/helper-validator-identifier": "^7.22.20", "to-fast-properties": "^2.0.0" }, "devDependencies": { - "@babel/generator": "^7.23.0", - "@babel/parser": "^7.23.0", + "@babel/generator": "^7.23.5", + "@babel/parser": "^7.23.5", "glob": "^7.2.0" }, "engines": { diff --git a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/dist/index.cjs.cjs b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/dist/index.cjs.cjs index 94a1ead65b78cc..73c4d0734daabe 100644 --- a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/dist/index.cjs.cjs +++ b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/dist/index.cjs.cjs @@ -258,6 +258,7 @@ const commentParserToESTree = (jsdoc, mode, { return; } const { + // eslint-disable-next-line no-unused-vars -- Discarding end: ed, delimiter: de, postDelimiter: pd, @@ -472,11 +473,9 @@ function parseDescription(description) { // This could have been expressed in a single pattern, // but having two avoids a potentially exponential time regex. - // eslint-disable-next-line prefer-regex-literals -- Need 'd' (indices) flag const prefixedTextPattern = new RegExp(/(?:\[(?[^\]]+)\])\{@(?[^}\s]+)\s?(?[^}\s|]*)\}/gu, 'gud'); // The pattern used to match for text after tag uses a negative lookbehind // on the ']' char to avoid matching the prefixed case too. - // eslint-disable-next-line prefer-regex-literals -- Need 'd' (indices) flag const suffixedAfterPattern = new RegExp(/(?[^}\s]+)\s?(?[^}\s|]*)\s*(?[\s|])?\s*(?[^}]*)\}/gu, 'gud'); const matches = [...description.matchAll(prefixedTextPattern), ...description.matchAll(suffixedAfterPattern)]; for (const mtch of matches) { @@ -913,6 +912,7 @@ const getReducedASTNode = function (node, sourceCode) { * @private */ const findJSDocComment = (astNode, sourceCode, settings) => { + var _parenthesisToken, _parenthesisToken2; const { minLines, maxLines @@ -921,6 +921,7 @@ const findJSDocComment = (astNode, sourceCode, settings) => { /** @type {import('eslint').Rule.Node|import('estree').Comment} */ let currentNode = astNode; let tokenBefore = null; + let parenthesisToken = null; while (currentNode) { const decorator = getDecorator(currentNode); if (decorator) { @@ -931,6 +932,7 @@ const findJSDocComment = (astNode, sourceCode, settings) => { includeComments: true }); if (tokenBefore && tokenBefore.type === 'Punctuator' && tokenBefore.value === '(') { + parenthesisToken = tokenBefore; [tokenBefore] = sourceCode.getTokensBefore(currentNode, { count: 2, includeComments: true @@ -950,7 +952,7 @@ const findJSDocComment = (astNode, sourceCode, settings) => { if (!tokenBefore || !currentNode.loc || !tokenBefore.loc) { return null; } - if (tokenBefore.type === 'Block' && /^\*\s/u.test(tokenBefore.value) && currentNode.loc.start.line - tokenBefore.loc.end.line >= minLines && currentNode.loc.start.line - tokenBefore.loc.end.line <= maxLines) { + if (tokenBefore.type === 'Block' && /^\*\s/u.test(tokenBefore.value) && currentNode.loc.start.line - ( /** @type {import('eslint').AST.Token} */(_parenthesisToken = parenthesisToken) !== null && _parenthesisToken !== void 0 ? _parenthesisToken : tokenBefore).loc.end.line >= minLines && currentNode.loc.start.line - ( /** @type {import('eslint').AST.Token} */(_parenthesisToken2 = parenthesisToken) !== null && _parenthesisToken2 !== void 0 ? _parenthesisToken2 : tokenBefore).loc.end.line <= maxLines) { return tokenBefore; } return null; diff --git a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/package.json b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/package.json index 97b61ec54c99ea..c38c09f992a210 100644 --- a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/package.json +++ b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/package.json @@ -1,6 +1,6 @@ { "name": "@es-joy/jsdoccomment", - "version": "0.40.1", + "version": "0.41.0", "author": "Brett Zamir ", "contributors": [], "description": "Maintained replacement for ESLint's deprecated SourceCode#getJSDocComment along with other jsdoc utilities", @@ -31,6 +31,18 @@ "browserslist": [ "cover 100%" ], + "scripts": { + "tsc": "tsc", + "open": "open ./coverage/lcov-report/index.html", + "prepublishOnly": "pnpm i && npm run build", + "build": "npm run rollup && tsc -p tsconfig-prod.json", + "rollup": "rollup -c", + "eslint": "eslint --ext=js,cjs,md,html .", + "lint": "npm run eslint --", + "mocha": "mocha --require chai/register-expect.js", + "c8": "c8 npm run mocha", + "test": "npm run lint && npm run build && npm run c8" + }, "repository": { "type": "git", "url": "git+https://github.com/es-joy/jsdoccomment.git" @@ -43,56 +55,45 @@ "node": ">=16" }, "dependencies": { - "comment-parser": "1.4.0", + "comment-parser": "1.4.1", "esquery": "^1.5.0", "jsdoc-type-pratt-parser": "~4.0.0" }, "devDependencies": { - "@babel/core": "^7.22.9", + "@babel/core": "^7.23.3", "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/preset-env": "^7.22.9", + "@babel/preset-env": "^7.23.3", "@brettz9/eslint-plugin": "^1.0.4", - "@rollup/plugin-babel": "^6.0.3", - "@types/chai": "^4.3.5", - "@types/eslint": "^8.44.1", - "@types/esquery": "^1.5.0", - "@types/estraverse": "^5.1.2", - "@types/estree": "^1.0.1", - "@types/mocha": "^10.0.1", - "@typescript-eslint/types": "^6.2.1", + "@rollup/plugin-babel": "^6.0.4", + "@types/chai": "^4.3.10", + "@types/eslint": "^8.44.7", + "@types/esquery": "^1.5.3", + "@types/estraverse": "^5.1.6", + "@types/estree": "^1.0.5", + "@types/mocha": "^10.0.4", + "@typescript-eslint/types": "^6.10.0", "c8": "^8.0.1", - "chai": "^4.3.7", - "eslint": "^8.46.0", - "eslint-config-ash-nazg": "34.15.0", + "chai": "^4.3.10", + "eslint": "^8.53.0", + "eslint-config-ash-nazg": "35.1.0", "eslint-config-standard": "^17.1.0", - "eslint-plugin-array-func": "^3.1.8", - "eslint-plugin-compat": "^4.1.4", + "eslint-plugin-array-func": "^4.0.0", + "eslint-plugin-compat": "^4.2.0", "eslint-plugin-eslint-comments": "^3.2.0", "eslint-plugin-html": "^7.1.0", - "eslint-plugin-import": "^2.28.0", - "eslint-plugin-jsdoc": "^46.4.5", + "eslint-plugin-import": "^2.29.0", + "eslint-plugin-jsdoc": "^46.8.2", "eslint-plugin-markdown": "^3.0.1", - "eslint-plugin-n": "^16.0.1", + "eslint-plugin-n": "^16.3.0", "eslint-plugin-no-unsanitized": "^4.0.2", "eslint-plugin-no-use-extend-native": "^0.5.0", "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-sonarjs": "^0.20.0", - "eslint-plugin-unicorn": "^48.0.1", + "eslint-plugin-sonarjs": "^0.23.0", + "eslint-plugin-unicorn": "^49.0.0", "espree": "^9.6.1", "estraverse": "^5.3.0", "mocha": "^10.2.0", - "rollup": "^3.27.2", - "typescript": "^5.1.6" - }, - "scripts": { - "tsc": "tsc", - "open": "open ./coverage/lcov-report/index.html", - "build": "npm run rollup && tsc -p tsconfig-prod.json", - "rollup": "rollup -c", - "eslint": "eslint --ext=js,cjs,md,html .", - "lint": "npm run eslint --", - "mocha": "mocha --require chai/register-expect.js", - "c8": "c8 npm run mocha", - "test": "npm run lint && npm run build && npm run c8" + "rollup": "^4.3.0", + "typescript": "^5.2.2" } -} \ No newline at end of file +} diff --git a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/commentParserToESTree.js b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/commentParserToESTree.js index e5c4a2f4a8f96c..53bb44cb56974f 100644 --- a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/commentParserToESTree.js +++ b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/commentParserToESTree.js @@ -268,6 +268,7 @@ const commentParserToESTree = (jsdoc, mode, { } const { + // eslint-disable-next-line no-unused-vars -- Discarding end: ed, delimiter: de, postDelimiter: pd, diff --git a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/jsdoccomment.js b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/jsdoccomment.js index 0aec40eaea45ba..b497e8c404f639 100644 --- a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/jsdoccomment.js +++ b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/jsdoccomment.js @@ -286,6 +286,7 @@ const findJSDocComment = (astNode, sourceCode, settings) => { /** @type {import('eslint').Rule.Node|import('estree').Comment} */ let currentNode = astNode; let tokenBefore = null; + let parenthesisToken = null; while (currentNode) { const decorator = getDecorator(currentNode); @@ -300,6 +301,7 @@ const findJSDocComment = (astNode, sourceCode, settings) => { tokenBefore && tokenBefore.type === 'Punctuator' && tokenBefore.value === '(' ) { + parenthesisToken = tokenBefore; [tokenBefore] = sourceCode.getTokensBefore(currentNode, { count: 2, includeComments: true @@ -323,8 +325,14 @@ const findJSDocComment = (astNode, sourceCode, settings) => { if ( tokenBefore.type === 'Block' && (/^\*\s/u).test(tokenBefore.value) && - currentNode.loc.start.line - tokenBefore.loc.end.line >= minLines && - currentNode.loc.start.line - tokenBefore.loc.end.line <= maxLines + currentNode.loc.start.line - ( + /** @type {import('eslint').AST.Token} */ + (parenthesisToken ?? tokenBefore) + ).loc.end.line >= minLines && + currentNode.loc.start.line - ( + /** @type {import('eslint').AST.Token} */ + (parenthesisToken ?? tokenBefore) + ).loc.end.line <= maxLines ) { return tokenBefore; } diff --git a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/parseInlineTags.js b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/parseInlineTags.js index db374b65b150b7..45c2d985e25053 100644 --- a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/parseInlineTags.js +++ b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/src/parseInlineTags.js @@ -39,11 +39,9 @@ function parseDescription (description) { // This could have been expressed in a single pattern, // but having two avoids a potentially exponential time regex. - // eslint-disable-next-line prefer-regex-literals -- Need 'd' (indices) flag const prefixedTextPattern = new RegExp(/(?:\[(?[^\]]+)\])\{@(?[^}\s]+)\s?(?[^}\s|]*)\}/gu, 'gud'); // The pattern used to match for text after tag uses a negative lookbehind // on the ']' char to avoid matching the prefixed case too. - // eslint-disable-next-line prefer-regex-literals -- Need 'd' (indices) flag const suffixedAfterPattern = new RegExp(/(?[^}\s]+)\s?(?[^}\s|]*)\s*(?[\s|])?\s*(?[^}]*)\}/gu, 'gud'); const matches = [ diff --git a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/tsconfig-prod.json b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/tsconfig-prod.json index e082c2155f9745..67d3d18f4a09bd 100644 --- a/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/tsconfig-prod.json +++ b/tools/node_modules/eslint/node_modules/@es-joy/jsdoccomment/tsconfig-prod.json @@ -11,8 +11,7 @@ "declarationMap": true, "strict": true, "target": "es6", - "outDir": "dist", - "allowSyntheticDefaultImports": true + "outDir": "dist" }, "include": ["src/**/*.js"], "exclude": ["node_modules"] diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs index 9902a90e7ee453..eb2ed8d37ffef4 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/dist/eslintrc.cjs @@ -941,6 +941,7 @@ class ConfigDependency { * Initialize this instance. * @param {Object} data The dependency data. * @param {T} [data.definition] The dependency if the loading succeeded. + * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded. * @param {Error} [data.error] The error object if the loading failed. * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded. * @param {string} data.id The ID of this dependency. @@ -949,6 +950,7 @@ class ConfigDependency { */ constructor({ definition = null, + original = null, error = null, filePath = null, id, @@ -962,6 +964,12 @@ class ConfigDependency { */ this.definition = definition; + /** + * The original dependency as loaded directly from disk if the loading succeeded. + * @type {T|null} + */ + this.original = original; + /** * The error object if the loading failed. * @type {Error|null} @@ -1014,7 +1022,8 @@ class ConfigDependency { */ [util__default["default"].inspect.custom]() { const { - definition: _ignore, // eslint-disable-line no-unused-vars + definition: _ignore1, // eslint-disable-line no-unused-vars + original: _ignore2, // eslint-disable-line no-unused-vars ...obj } = this; @@ -3390,6 +3399,7 @@ class ConfigArrayFactory { if (plugin) { return new ConfigDependency({ definition: normalizePlugin(plugin), + original: plugin, filePath: "", // It's unknown where the plugin came from. id, importerName: ctx.name, @@ -3426,6 +3436,7 @@ class ConfigArrayFactory { return new ConfigDependency({ definition: normalizePlugin(pluginDefinition), + original: pluginDefinition, filePath, id, importerName: ctx.name, @@ -4117,7 +4128,7 @@ function translateESLintRC(eslintrcConfig, { debug(`Translating plugin: ${pluginName}`); debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`); - const { definition: plugin, error } = eslintrcConfig.plugins[pluginName]; + const { original: plugin, error } = eslintrcConfig.plugins[pluginName]; if (error) { throw error; diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js index 99851e15f9d791..58c1e808beb94c 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array-factory.js @@ -1053,6 +1053,7 @@ class ConfigArrayFactory { if (plugin) { return new ConfigDependency({ definition: normalizePlugin(plugin), + original: plugin, filePath: "", // It's unknown where the plugin came from. id, importerName: ctx.name, @@ -1089,6 +1090,7 @@ class ConfigArrayFactory { return new ConfigDependency({ definition: normalizePlugin(pluginDefinition), + original: pluginDefinition, filePath, id, importerName: ctx.name, diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js index 2883c3a2a703d6..080e6405e9ba2c 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/config-array/config-dependency.js @@ -28,6 +28,7 @@ class ConfigDependency { * Initialize this instance. * @param {Object} data The dependency data. * @param {T} [data.definition] The dependency if the loading succeeded. + * @param {T} [data.original] The original, non-normalized dependency if the loading succeeded. * @param {Error} [data.error] The error object if the loading failed. * @param {string} [data.filePath] The actual path to the dependency if the loading succeeded. * @param {string} data.id The ID of this dependency. @@ -36,6 +37,7 @@ class ConfigDependency { */ constructor({ definition = null, + original = null, error = null, filePath = null, id, @@ -49,6 +51,12 @@ class ConfigDependency { */ this.definition = definition; + /** + * The original dependency as loaded directly from disk if the loading succeeded. + * @type {T|null} + */ + this.original = original; + /** * The error object if the loading failed. * @type {Error|null} @@ -101,7 +109,8 @@ class ConfigDependency { */ [util.inspect.custom]() { const { - definition: _ignore, // eslint-disable-line no-unused-vars + definition: _ignore1, // eslint-disable-line no-unused-vars + original: _ignore2, // eslint-disable-line no-unused-vars ...obj } = this; diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/flat-compat.js b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/flat-compat.js index e0d7ab6699b549..6c307a99246ae0 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/flat-compat.js +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/lib/flat-compat.js @@ -132,7 +132,7 @@ function translateESLintRC(eslintrcConfig, { debug(`Translating plugin: ${pluginName}`); debug(`Resolving plugin '${pluginName} relative to ${resolvePluginsRelativeTo}`); - const { definition: plugin, error } = eslintrcConfig.plugins[pluginName]; + const { original: plugin, error } = eslintrcConfig.plugins[pluginName]; if (error) { throw error; diff --git a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json index 6f148ac71ffec5..aa43e7563bb912 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json +++ b/tools/node_modules/eslint/node_modules/@eslint/eslintrc/package.json @@ -1,6 +1,6 @@ { "name": "@eslint/eslintrc", - "version": "2.1.3", + "version": "2.1.4", "description": "The legacy ESLintRC config file format for ESLint", "type": "module", "main": "./dist/eslintrc.cjs", diff --git a/tools/node_modules/eslint/node_modules/@eslint/js/package.json b/tools/node_modules/eslint/node_modules/@eslint/js/package.json index 529c630dd996c2..2c7aacae88a39e 100644 --- a/tools/node_modules/eslint/node_modules/@eslint/js/package.json +++ b/tools/node_modules/eslint/node_modules/@eslint/js/package.json @@ -1,6 +1,6 @@ { "name": "@eslint/js", - "version": "8.53.0", + "version": "8.55.0", "description": "ESLint JavaScript language implementation", "main": "./src/index.js", "scripts": {}, diff --git a/tools/node_modules/eslint/node_modules/@types/mdast/package.json b/tools/node_modules/eslint/node_modules/@types/mdast/package.json index b26e2e31793951..89b4c99fb2c643 100644 --- a/tools/node_modules/eslint/node_modules/@types/mdast/package.json +++ b/tools/node_modules/eslint/node_modules/@types/mdast/package.json @@ -1,6 +1,6 @@ { "name": "@types/mdast", - "version": "3.0.14", + "version": "3.0.15", "description": "TypeScript definitions for mdast", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/mdast", "license": "MIT", @@ -37,6 +37,6 @@ "dependencies": { "@types/unist": "^2" }, - "typesPublisherContentHash": "97a041b9ee73bda62fd42374f55c4838d7b79f4ce91051cfccd9ed428681f55a", + "typesPublisherContentHash": "856cf2bf5ad8e053a42747d48af6b089fac3bd7f568451deb8053f84dfac225d", "typeScriptVersion": "4.5" } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/@types/unist/package.json b/tools/node_modules/eslint/node_modules/@types/unist/package.json index 5f75b1f193d8d7..eff0fce8f6b8cd 100644 --- a/tools/node_modules/eslint/node_modules/@types/unist/package.json +++ b/tools/node_modules/eslint/node_modules/@types/unist/package.json @@ -1,6 +1,6 @@ { "name": "@types/unist", - "version": "2.0.9", + "version": "2.0.10", "description": "TypeScript definitions for unist", "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/unist", "license": "MIT", @@ -50,7 +50,7 @@ }, "scripts": {}, "dependencies": {}, - "typesPublisherContentHash": "bba7aef6ce06ea8d0fda589e0679b537ed7a3c614a5009dfc858d69a2fe9439f", + "typesPublisherContentHash": "65c419f7bf5fb4a8b58da16b61b8cfc2629fb81d70dff861467e0292b2ed70ea", "typeScriptVersion": "4.5", "nonNpm": true } \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/agents.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/agents.js index b34f928c64e7c5..0759871725b96a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/agents.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/agents.js @@ -1 +1 @@ -module.exports={A:{A:{J:0,E:0,F:0.0126987,G:0.0634934,A:0,B:0.368262,PC:0},B:"ms",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","PC","J","E","F","G","A","B","","",""],E:"IE",F:{PC:962323200,J:998870400,E:1161129600,F:1237420800,G:1300060800,A:1346716800,B:1381968000}},B:{A:{"0":0.100804,"1":0.02291,"2":0.036656,"3":0.041238,"4":0.109968,"5":2.53385,"6":2.08939,C:0.009164,K:0.009164,L:0.009164,H:0.009164,M:0,N:0.004582,O:0.013746,P:0,Q:0.009164,R:0.009164,S:0.009164,T:0.009164,U:0.004582,V:0.009164,W:0.041238,X:0.004582,Y:0.004582,Z:0.009164,a:0,b:0.013746,c:0,d:0,e:0,f:0,g:0,h:0,i:0.018328,j:0,k:0,l:0,m:0,s:0,t:0,u:0,v:0.009164,w:0.009164,x:0.073312,y:0.013746,z:0.100804,D:0.009164},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","C","K","L","H","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","D","","",""],E:"Edge",F:{"0":1680825600,"1":1683158400,"2":1685664000,"3":1689897600,"4":1692576000,"5":1694649600,"6":1697155200,C:1438128000,K:1447286400,L:1470096000,H:1491868800,M:1508198400,N:1525046400,O:1542067200,P:1579046400,Q:1581033600,R:1586736000,S:1590019200,T:1594857600,U:1598486400,V:1602201600,W:1605830400,X:1611360000,Y:1614816000,Z:1618358400,a:1622073600,b:1626912000,c:1630627200,d:1632441600,e:1634774400,f:1637539200,g:1641427200,h:1643932800,i:1646265600,j:1649635200,k:1651190400,l:1653955200,m:1655942400,s:1659657600,t:1661990400,u:1664755200,v:1666915200,w:1670198400,x:1673481600,y:1675900800,z:1678665600,D:1698969600},D:{C:"ms",K:"ms",L:"ms",H:"ms",M:"ms",N:"ms",O:"ms"}},C:{A:{"0":0.009164,"1":0.013746,"2":0.013746,"3":0.339068,"4":0.02291,"5":0.096222,"6":1.49831,"7":0,"8":0,"9":0,QC:0,"4B":0,I:0,J:0,E:0,F:0,G:0,A:0,B:0.009164,C:0,K:0,L:0,H:0,M:0,N:0,O:0,n:0,o:0,p:0,q:0,AB:0,BB:0,CB:0,DB:0,EB:0,FB:0,GB:0,HB:0,IB:0,JB:0,KB:0,LB:0,MB:0,NB:0,OB:0,PB:0,QB:0,RB:0,SB:0,TB:0.004582,UB:0,VB:0,WB:0,XB:0.02291,YB:0,ZB:0.013746,aB:0,bB:0.054984,cB:0.004582,dB:0.013746,eB:0.004582,fB:0.018328,gB:0,hB:0,"5B":0.009164,iB:0,"6B":0,jB:0,kB:0.004582,lB:0,mB:0,nB:0,oB:0,pB:0,qB:0,rB:0,sB:0,tB:0,r:0,uB:0,vB:0,wB:0,xB:0,yB:0.036656,P:0,Q:0,R:0,"7B":0,S:0.004582,T:0,U:0,V:0,W:0,X:0.004582,Y:0,Z:0,a:0.004582,b:0,c:0,d:0.004582,e:0,f:0,g:0,h:0,i:0,j:0,k:0,l:0.050402,m:0.036656,s:0,t:0.004582,u:0,v:0.004582,w:0.009164,x:0.009164,y:0.009164,z:0.009164,D:0.27492,"8B":0,"9B":0,AC:0,RC:0,SC:0},B:"moz",C:["QC","4B","RC","SC","I","7","J","E","F","G","A","B","C","K","L","H","M","N","O","8","n","o","p","q","9","AB","BB","CB","DB","EB","FB","GB","HB","IB","JB","KB","LB","MB","NB","OB","PB","QB","RB","SB","TB","UB","VB","WB","XB","YB","ZB","aB","bB","cB","dB","eB","fB","gB","hB","5B","iB","6B","jB","kB","lB","mB","nB","oB","pB","qB","rB","sB","tB","r","uB","vB","wB","xB","yB","P","Q","R","7B","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","D","8B","9B","AC"],E:"Firefox",F:{"0":1681171200,"1":1683590400,"2":1686009600,"3":1688428800,"4":1690848000,"5":1693267200,"6":1695686400,"7":1308614400,"8":1357603200,"9":1375747200,QC:1161648000,"4B":1213660800,RC:1246320000,SC:1264032000,I:1300752000,J:1313452800,E:1317081600,F:1317081600,G:1320710400,A:1324339200,B:1327968000,C:1331596800,K:1335225600,L:1338854400,H:1342483200,M:1346112000,N:1349740800,O:1353628800,n:1361232000,o:1364860800,p:1368489600,q:1372118400,AB:1379376000,BB:1386633600,CB:1391472000,DB:1395100800,EB:1398729600,FB:1402358400,GB:1405987200,HB:1409616000,IB:1413244800,JB:1417392000,KB:1421107200,LB:1424736000,MB:1428278400,NB:1431475200,OB:1435881600,PB:1439251200,QB:1442880000,RB:1446508800,SB:1450137600,TB:1453852800,UB:1457395200,VB:1461628800,WB:1465257600,XB:1470096000,YB:1474329600,ZB:1479168000,aB:1485216000,bB:1488844800,cB:1492560000,dB:1497312000,eB:1502150400,fB:1506556800,gB:1510617600,hB:1516665600,"5B":1520985600,iB:1525824000,"6B":1529971200,jB:1536105600,kB:1540252800,lB:1544486400,mB:1548720000,nB:1552953600,oB:1558396800,pB:1562630400,qB:1567468800,rB:1571788800,sB:1575331200,tB:1578355200,r:1581379200,uB:1583798400,vB:1586304000,wB:1588636800,xB:1591056000,yB:1593475200,P:1595894400,Q:1598313600,R:1600732800,"7B":1603152000,S:1605571200,T:1607990400,U:1611619200,V:1614038400,W:1616457600,X:1618790400,Y:1622505600,Z:1626134400,a:1628553600,b:1630972800,c:1633392000,d:1635811200,e:1638835200,f:1641859200,g:1644364800,h:1646697600,i:1649116800,j:1651536000,k:1653955200,l:1656374400,m:1658793600,s:1661212800,t:1663632000,u:1666051200,v:1668470400,w:1670889600,x:1673913600,y:1676332800,z:1678752000,D:1698105600,"8B":null,"9B":null,AC:null}},D:{A:{"0":0.187862,"1":0.169534,"2":0.522348,"3":0.361978,"4":1.46624,"5":9.96127,"6":9.54889,"7":0,"8":0,"9":0,I:0,J:0,E:0,F:0,G:0,A:0,B:0,C:0,K:0,L:0,H:0,M:0,N:0,O:0,n:0,o:0,p:0,q:0,AB:0,BB:0,CB:0,DB:0,EB:0,FB:0,GB:0,HB:0,IB:0,JB:0.004582,KB:0,LB:0,MB:0,NB:0.013746,OB:0,PB:0,QB:0.004582,RB:0,SB:0,TB:0,UB:0.009164,VB:0,WB:0.009164,XB:0.018328,YB:0.041238,ZB:0.009164,aB:0,bB:0,cB:0.009164,dB:0,eB:0.009164,fB:0.018328,gB:0.009164,hB:0.004582,"5B":0,iB:0.032074,"6B":0.004582,jB:0,kB:0.009164,lB:0,mB:0.013746,nB:0.02291,oB:0.009164,pB:0.032074,qB:0.064148,rB:0.16037,sB:0.02291,tB:0.032074,r:0.041238,uB:0.036656,vB:0.036656,wB:0.109968,xB:0.032074,yB:0.041238,P:0.169534,Q:0.087058,R:0.059566,S:0.073312,T:0.036656,U:0.082476,V:0.087058,W:0.100804,X:0.054984,Y:0.04582,Z:0.054984,a:0.082476,b:0.04582,c:0.142042,d:0.041238,e:0.013746,f:0.018328,g:0.02291,h:0.06873,i:0.036656,j:0.036656,k:0.04582,l:0.036656,m:0.233682,s:0.050402,t:0.036656,u:0.059566,v:0.13746,w:0.178698,x:1.69534,y:0.155788,z:0.265756,D:0.027492,"8B":0.013746,"9B":0,AC:0},B:"webkit",C:["","","","","","I","7","J","E","F","G","A","B","C","K","L","H","M","N","O","8","n","o","p","q","9","AB","BB","CB","DB","EB","FB","GB","HB","IB","JB","KB","LB","MB","NB","OB","PB","QB","RB","SB","TB","UB","VB","WB","XB","YB","ZB","aB","bB","cB","dB","eB","fB","gB","hB","5B","iB","6B","jB","kB","lB","mB","nB","oB","pB","qB","rB","sB","tB","r","uB","vB","wB","xB","yB","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","s","t","u","v","w","x","y","z","0","1","2","3","4","5","6","D","8B","9B","AC"],E:"Chrome",F:{"0":1680566400,"1":1682985600,"2":1685404800,"3":1689724800,"4":1692057600,"5":1694476800,"6":1696896000,"7":1274745600,"8":1332892800,"9":1352246400,I:1264377600,J:1283385600,E:1287619200,F:1291248000,G:1296777600,A:1299542400,B:1303862400,C:1307404800,K:1312243200,L:1316131200,H:1316131200,M:1319500800,N:1323734400,O:1328659200,n:1337040000,o:1340668800,p:1343692800,q:1348531200,AB:1357862400,BB:1361404800,CB:1364428800,DB:1369094400,EB:1374105600,FB:1376956800,GB:1384214400,HB:1389657600,IB:1392940800,JB:1397001600,KB:1400544000,LB:1405468800,MB:1409011200,NB:1412640000,OB:1416268800,PB:1421798400,QB:1425513600,RB:1429401600,SB:1432080000,TB:1437523200,UB:1441152000,VB:1444780800,WB:1449014400,XB:1453248000,YB:1456963200,ZB:1460592000,aB:1464134400,bB:1469059200,cB:1472601600,dB:1476230400,eB:1480550400,fB:1485302400,gB:1489017600,hB:1492560000,"5B":1496707200,iB:1500940800,"6B":1504569600,jB:1508198400,kB:1512518400,lB:1516752000,mB:1520294400,nB:1523923200,oB:1527552000,pB:1532390400,qB:1536019200,rB:1539648000,sB:1543968000,tB:1548720000,r:1552348800,uB:1555977600,vB:1559606400,wB:1564444800,xB:1568073600,yB:1571702400,P:1575936000,Q:1580860800,R:1586304000,S:1589846400,T:1594684800,U:1598313600,V:1601942400,W:1605571200,X:1611014400,Y:1614556800,Z:1618272000,a:1621987200,b:1626739200,c:1630368000,d:1632268800,e:1634601600,f:1637020800,g:1641340800,h:1643673600,i:1646092800,j:1648512000,k:1650931200,l:1653350400,m:1655769600,s:1659398400,t:1661817600,u:1664236800,v:1666656000,w:1669680000,x:1673308800,y:1675728000,z:1678147200,D:1698710400,"8B":null,"9B":null,AC:null}},E:{A:{"7":0,I:0,J:0,E:0,F:0,G:0,A:0,B:0,C:0.004582,K:0.02291,L:0.096222,H:0.018328,TC:0,BC:0,UC:0.004582,VC:0,WC:0,XC:0.164952,CC:0,zB:0.009164,"0B":0.027492,DC:0.128296,YC:0.233682,ZC:0.041238,EC:0.032074,FC:0.06873,"1B":0.109968,aC:0.536094,"2B":0.064148,GC:0.16037,HC:0.146624,IC:0.34365,JC:0.146624,KC:0.398634,bC:2.1902,"3B":0.613988,LC:0.041238,MC:0,cC:0},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","TC","BC","I","7","UC","J","VC","E","WC","F","G","XC","A","CC","B","zB","C","0B","K","DC","L","YC","H","ZC","EC","FC","1B","aC","2B","GC","HC","IC","JC","KC","bC","3B","LC","MC","cC",""],E:"Safari",F:{"7":1275868800,TC:1205798400,BC:1226534400,I:1244419200,UC:1311120000,J:1343174400,VC:1382400000,E:1382400000,WC:1410998400,F:1413417600,G:1443657600,XC:1458518400,A:1474329600,CC:1490572800,B:1505779200,zB:1522281600,C:1537142400,"0B":1553472000,K:1568851200,DC:1585008000,L:1600214400,YC:1619395200,H:1632096000,ZC:1635292800,EC:1639353600,FC:1647216000,"1B":1652745600,aC:1658275200,"2B":1662940800,GC:1666569600,HC:1670889600,IC:1674432000,JC:1679875200,KC:1684368000,bC:1690156800,"3B":1695686400,LC:1698192000,MC:null,cC:null}},F:{A:{"8":0,"9":0,G:0,B:0,C:0,H:0,M:0,N:0,O:0,n:0,o:0,p:0,q:0,AB:0,BB:0,CB:0,DB:0.004582,EB:0,FB:0,GB:0,HB:0,IB:0,JB:0,KB:0,LB:0,MB:0,NB:0,OB:0,PB:0,QB:0,RB:0,SB:0,TB:0,UB:0,VB:0.013746,WB:0,XB:0,YB:0,ZB:0,aB:0,bB:0,cB:0,dB:0.004582,eB:0.004582,fB:0,gB:0,hB:0,iB:0,jB:0,kB:0,lB:0,mB:0,nB:0,oB:0,pB:0,qB:0,rB:0,sB:0,tB:0,r:0,uB:0,vB:0,wB:0,xB:0,yB:0,P:0,Q:0,R:0,"7B":0,S:0,T:0,U:0,V:0,W:0,X:0,Y:0,Z:0,a:0,b:0,c:0,d:0,e:0.050402,f:0,g:0.09164,h:0,i:0.009164,j:0.009164,k:0.013746,l:1.61745,m:0.25201,dC:0,eC:0,fC:0,gC:0,zB:0,NC:0,hC:0,"0B":0},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","G","dC","eC","fC","gC","B","zB","NC","hC","C","0B","H","M","N","O","8","n","o","p","q","9","AB","BB","CB","DB","EB","FB","GB","HB","IB","JB","KB","LB","MB","NB","OB","PB","QB","RB","SB","TB","UB","VB","WB","XB","YB","ZB","aB","bB","cB","dB","eB","fB","gB","hB","iB","jB","kB","lB","mB","nB","oB","pB","qB","rB","sB","tB","r","uB","vB","wB","xB","yB","P","Q","R","7B","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","","",""],E:"Opera",F:{"8":1390867200,"9":1409616000,G:1150761600,dC:1223424000,eC:1251763200,fC:1267488000,gC:1277942400,B:1292457600,zB:1302566400,NC:1309219200,hC:1323129600,C:1323129600,"0B":1352073600,H:1372723200,M:1377561600,N:1381104000,O:1386288000,n:1393891200,o:1399334400,p:1401753600,q:1405987200,AB:1413331200,BB:1417132800,CB:1422316800,DB:1425945600,EB:1430179200,FB:1433808000,GB:1438646400,HB:1442448000,IB:1445904000,JB:1449100800,KB:1454371200,LB:1457308800,MB:1462320000,NB:1465344000,OB:1470096000,PB:1474329600,QB:1477267200,RB:1481587200,SB:1486425600,TB:1490054400,UB:1494374400,VB:1498003200,WB:1502236800,XB:1506470400,YB:1510099200,ZB:1515024000,aB:1517961600,bB:1521676800,cB:1525910400,dB:1530144000,eB:1534982400,fB:1537833600,gB:1543363200,hB:1548201600,iB:1554768000,jB:1561593600,kB:1566259200,lB:1570406400,mB:1573689600,nB:1578441600,oB:1583971200,pB:1587513600,qB:1592956800,rB:1595894400,sB:1600128000,tB:1603238400,r:1613520000,uB:1612224000,vB:1616544000,wB:1619568000,xB:1623715200,yB:1627948800,P:1631577600,Q:1633392000,R:1635984000,"7B":1638403200,S:1642550400,T:1644969600,U:1647993600,V:1650412800,W:1652745600,X:1654646400,Y:1657152000,Z:1660780800,a:1663113600,b:1668816000,c:1668643200,d:1671062400,e:1675209600,f:1677024000,g:1679529600,h:1681948800,i:1684195200,j:1687219200,k:1690329600,l:1692748800,m:1696204800},D:{G:"o",B:"o",C:"o",dC:"o",eC:"o",fC:"o",gC:"o",zB:"o",NC:"o",hC:"o","0B":"o"}},G:{A:{F:0,BC:0,iC:0,OC:0.0027735,jC:0.00138675,kC:0.00416026,lC:0.00970726,mC:0.00138675,nC:0.00970726,oC:0.033282,pC:0.00138675,qC:0.0485363,rC:0.0457628,sC:0.016641,tC:0.0124808,uC:0.220494,vC:0.00693376,wC:0.0374423,xC:0.0138675,yC:0.0443761,zC:0.122034,"0C":0.196919,"1C":0.0776581,EC:0.0887521,FC:0.0984594,"1B":0.140062,"2C":0.96934,"2B":0.357782,GC:0.685055,HC:0.334207,IC:0.619878,JC:0.137288,KC:0.355009,"3C":6.64254,"3B":2.36719,LC:0.142835,MC:0.00416026},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","BC","iC","OC","jC","kC","lC","F","mC","nC","oC","pC","qC","rC","sC","tC","uC","vC","wC","xC","yC","zC","0C","1C","EC","FC","1B","2C","2B","GC","HC","IC","JC","KC","3C","3B","LC","MC","",""],E:"Safari on iOS",F:{BC:1270252800,iC:1283904000,OC:1299628800,jC:1331078400,kC:1359331200,lC:1394409600,F:1410912000,mC:1413763200,nC:1442361600,oC:1458518400,pC:1473724800,qC:1490572800,rC:1505779200,sC:1522281600,tC:1537142400,uC:1553472000,vC:1568851200,wC:1572220800,xC:1580169600,yC:1585008000,zC:1600214400,"0C":1619395200,"1C":1632096000,EC:1639353600,FC:1647216000,"1B":1652659200,"2C":1658275200,"2B":1662940800,GC:1666569600,HC:1670889600,IC:1674432000,JC:1679875200,KC:1684368000,"3C":1690156800,"3B":1694995200,LC:1698192000,MC:null}},H:{A:{"4C":0.06},B:"o",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","4C","","",""],E:"Opera Mini",F:{"4C":1426464000}},I:{A:{"4B":0,I:0.000123508,D:0.61445,"5C":0,"6C":0.000185261,"7C":0,"8C":0.000123508,OC:0.000432277,"9C":0,AD:0.00185261},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","5C","6C","7C","4B","I","8C","OC","9C","AD","D","","",""],E:"Android Browser",F:{"5C":1256515200,"6C":1274313600,"7C":1291593600,"4B":1298332800,I:1318896000,"8C":1341792000,OC:1374624000,"9C":1386547200,AD:1401667200,D:1698710400}},J:{A:{E:0,A:0},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","E","A","","",""],E:"Blackberry Browser",F:{E:1325376000,A:1359504000}},K:{A:{A:0,B:0,C:0,r:1.00715,zB:0,NC:0,"0B":0},B:"o",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A","B","zB","NC","C","0B","r","","",""],E:"Opera Mobile",F:{A:1287100800,B:1300752000,zB:1314835200,NC:1318291200,C:1330300800,"0B":1349740800,r:1673827200},D:{r:"webkit"}},L:{A:{D:35.8038},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","D","","",""],E:"Chrome for Android",F:{D:1698710400}},M:{A:{D:0.276267},B:"moz",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","D","","",""],E:"Firefox for Android",F:{D:1698105600}},N:{A:{A:0,B:0},B:"ms",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A","B","","",""],E:"IE Mobile",F:{A:1340150400,B:1353456000}},O:{A:{"1B":0.785465},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","1B","","",""],E:"UC Browser for Android",F:{"1B":1687132800},D:{"1B":"webkit"}},P:{A:{I:0.0977276,n:0.0542931,o:0.108586,p:1.60708,q:0.347476,BD:0,CD:0,DD:0.0325759,ED:0,FD:0,CC:0,GD:0.0108586,HD:0,ID:0.0108586,JD:0,KD:0,"2B":0.0217172,"3B":0.0325759,LD:0.0217172,MD:0.0434345},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","I","BD","CD","DD","ED","FD","CC","GD","HD","ID","JD","KD","2B","3B","LD","MD","n","o","p","q","","",""],E:"Samsung Internet",F:{I:1461024000,BD:1481846400,CD:1509408000,DD:1528329600,ED:1546128000,FD:1554163200,CC:1567900800,GD:1582588800,HD:1593475200,ID:1605657600,JD:1618531200,KD:1629072000,"2B":1640736000,"3B":1651708800,LD:1659657600,MD:1667260800,n:1677369600,o:1684454400,p:1689292800,q:1697587200}},Q:{A:{DC:0.151676},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","DC","","",""],E:"QQ Browser",F:{DC:1663718400}},R:{A:{ND:0},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","ND","","",""],E:"Baidu Browser",F:{ND:1663027200}},S:{A:{OD:0.059587,PD:0},B:"moz",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","OD","PD","","",""],E:"KaiOS Browser",F:{OD:1527811200,PD:1631664000}}}; +module.exports={A:{A:{J:0,E:0,F:0.0126987,G:0.0634934,A:0,B:0.368262,PC:0},B:"ms",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","PC","J","E","F","G","A","B","","",""],E:"IE",F:{PC:962323200,J:998870400,E:1161129600,F:1237420800,G:1300060800,A:1346716800,B:1381968000}},B:{A:{"0":0.100804,"1":0.02291,"2":0.036656,"3":0.041238,"4":0.109968,"5":2.53385,"6":2.08939,C:0.009164,K:0.009164,L:0.009164,H:0.009164,M:0,N:0.004582,O:0.013746,P:0,Q:0.009164,R:0.009164,S:0.009164,T:0.009164,U:0.004582,V:0.009164,W:0.041238,X:0.004582,Y:0.004582,Z:0.009164,a:0,b:0.013746,c:0,d:0,e:0,f:0,g:0,h:0,i:0.018328,j:0,k:0,l:0,m:0,n:0,t:0,u:0,v:0.009164,w:0.009164,x:0.073312,y:0.013746,z:0.100804,D:0.009164},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","C","K","L","H","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","t","u","v","w","x","y","z","0","1","2","3","4","5","6","D","","",""],E:"Edge",F:{"0":1680825600,"1":1683158400,"2":1685664000,"3":1689897600,"4":1692576000,"5":1694649600,"6":1697155200,C:1438128000,K:1447286400,L:1470096000,H:1491868800,M:1508198400,N:1525046400,O:1542067200,P:1579046400,Q:1581033600,R:1586736000,S:1590019200,T:1594857600,U:1598486400,V:1602201600,W:1605830400,X:1611360000,Y:1614816000,Z:1618358400,a:1622073600,b:1626912000,c:1630627200,d:1632441600,e:1634774400,f:1637539200,g:1641427200,h:1643932800,i:1646265600,j:1649635200,k:1651190400,l:1653955200,m:1655942400,n:1659657600,t:1661990400,u:1664755200,v:1666915200,w:1670198400,x:1673481600,y:1675900800,z:1678665600,D:1698969600},D:{C:"ms",K:"ms",L:"ms",H:"ms",M:"ms",N:"ms",O:"ms"}},C:{A:{"0":0.009164,"1":0.013746,"2":0.013746,"3":0.339068,"4":0.02291,"5":0.096222,"6":1.49831,"7":0,"8":0,"9":0,QC:0,"4B":0,I:0,J:0,E:0,F:0,G:0,A:0,B:0.009164,C:0,K:0,L:0,H:0,M:0,N:0,O:0,o:0,p:0,q:0,r:0,AB:0,BB:0,CB:0,DB:0,EB:0,FB:0,GB:0,HB:0,IB:0,JB:0,KB:0,LB:0,MB:0,NB:0,OB:0,PB:0,QB:0,RB:0,SB:0,TB:0.004582,UB:0,VB:0,WB:0,XB:0.02291,YB:0,ZB:0.013746,aB:0,bB:0.054984,cB:0.004582,dB:0.013746,eB:0.004582,fB:0.018328,gB:0,hB:0,"5B":0.009164,iB:0,"6B":0,jB:0,kB:0.004582,lB:0,mB:0,nB:0,oB:0,pB:0,qB:0,rB:0,sB:0,tB:0,s:0,uB:0,vB:0,wB:0,xB:0,yB:0.036656,P:0,Q:0,R:0,"7B":0,S:0.004582,T:0,U:0,V:0,W:0,X:0.004582,Y:0,Z:0,a:0.004582,b:0,c:0,d:0.004582,e:0,f:0,g:0,h:0,i:0,j:0,k:0,l:0.050402,m:0.036656,n:0,t:0.004582,u:0,v:0.004582,w:0.009164,x:0.009164,y:0.009164,z:0.009164,D:0.27492,"8B":0,"9B":0,AC:0,RC:0,SC:0,TC:0},B:"moz",C:["QC","4B","SC","TC","I","7","J","E","F","G","A","B","C","K","L","H","M","N","O","8","o","p","q","r","9","AB","BB","CB","DB","EB","FB","GB","HB","IB","JB","KB","LB","MB","NB","OB","PB","QB","RB","SB","TB","UB","VB","WB","XB","YB","ZB","aB","bB","cB","dB","eB","fB","gB","hB","5B","iB","6B","jB","kB","lB","mB","nB","oB","pB","qB","rB","sB","tB","s","uB","vB","wB","xB","yB","P","Q","R","7B","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","t","u","v","w","x","y","z","0","1","2","3","4","5","6","D","8B","9B","AC","RC"],E:"Firefox",F:{"0":1681171200,"1":1683590400,"2":1686009600,"3":1688428800,"4":1690848000,"5":1693267200,"6":1695686400,"7":1308614400,"8":1357603200,"9":1375747200,QC:1161648000,"4B":1213660800,SC:1246320000,TC:1264032000,I:1300752000,J:1313452800,E:1317081600,F:1317081600,G:1320710400,A:1324339200,B:1327968000,C:1331596800,K:1335225600,L:1338854400,H:1342483200,M:1346112000,N:1349740800,O:1353628800,o:1361232000,p:1364860800,q:1368489600,r:1372118400,AB:1379376000,BB:1386633600,CB:1391472000,DB:1395100800,EB:1398729600,FB:1402358400,GB:1405987200,HB:1409616000,IB:1413244800,JB:1417392000,KB:1421107200,LB:1424736000,MB:1428278400,NB:1431475200,OB:1435881600,PB:1439251200,QB:1442880000,RB:1446508800,SB:1450137600,TB:1453852800,UB:1457395200,VB:1461628800,WB:1465257600,XB:1470096000,YB:1474329600,ZB:1479168000,aB:1485216000,bB:1488844800,cB:1492560000,dB:1497312000,eB:1502150400,fB:1506556800,gB:1510617600,hB:1516665600,"5B":1520985600,iB:1525824000,"6B":1529971200,jB:1536105600,kB:1540252800,lB:1544486400,mB:1548720000,nB:1552953600,oB:1558396800,pB:1562630400,qB:1567468800,rB:1571788800,sB:1575331200,tB:1578355200,s:1581379200,uB:1583798400,vB:1586304000,wB:1588636800,xB:1591056000,yB:1593475200,P:1595894400,Q:1598313600,R:1600732800,"7B":1603152000,S:1605571200,T:1607990400,U:1611619200,V:1614038400,W:1616457600,X:1618790400,Y:1622505600,Z:1626134400,a:1628553600,b:1630972800,c:1633392000,d:1635811200,e:1638835200,f:1641859200,g:1644364800,h:1646697600,i:1649116800,j:1651536000,k:1653955200,l:1656374400,m:1658793600,n:1661212800,t:1663632000,u:1666051200,v:1668470400,w:1670889600,x:1673913600,y:1676332800,z:1678752000,D:1698105600,"8B":1700524800,"9B":null,AC:null,RC:null}},D:{A:{"0":0.187862,"1":0.169534,"2":0.522348,"3":0.361978,"4":1.46624,"5":9.96127,"6":9.54889,"7":0,"8":0,"9":0,I:0,J:0,E:0,F:0,G:0,A:0,B:0,C:0,K:0,L:0,H:0,M:0,N:0,O:0,o:0,p:0,q:0,r:0,AB:0,BB:0,CB:0,DB:0,EB:0,FB:0,GB:0,HB:0,IB:0,JB:0.004582,KB:0,LB:0,MB:0,NB:0.013746,OB:0,PB:0,QB:0.004582,RB:0,SB:0,TB:0,UB:0.009164,VB:0,WB:0.009164,XB:0.018328,YB:0.041238,ZB:0.009164,aB:0,bB:0,cB:0.009164,dB:0,eB:0.009164,fB:0.018328,gB:0.009164,hB:0.004582,"5B":0,iB:0.032074,"6B":0.004582,jB:0,kB:0.009164,lB:0,mB:0.013746,nB:0.02291,oB:0.009164,pB:0.032074,qB:0.064148,rB:0.16037,sB:0.02291,tB:0.032074,s:0.041238,uB:0.036656,vB:0.036656,wB:0.109968,xB:0.032074,yB:0.041238,P:0.169534,Q:0.087058,R:0.059566,S:0.073312,T:0.036656,U:0.082476,V:0.087058,W:0.100804,X:0.054984,Y:0.04582,Z:0.054984,a:0.082476,b:0.04582,c:0.142042,d:0.041238,e:0.013746,f:0.018328,g:0.02291,h:0.06873,i:0.036656,j:0.036656,k:0.04582,l:0.036656,m:0.233682,n:0.050402,t:0.036656,u:0.059566,v:0.13746,w:0.178698,x:1.69534,y:0.155788,z:0.265756,D:0.027492,"8B":0.013746,"9B":0,AC:0},B:"webkit",C:["","","","","","","I","7","J","E","F","G","A","B","C","K","L","H","M","N","O","8","o","p","q","r","9","AB","BB","CB","DB","EB","FB","GB","HB","IB","JB","KB","LB","MB","NB","OB","PB","QB","RB","SB","TB","UB","VB","WB","XB","YB","ZB","aB","bB","cB","dB","eB","fB","gB","hB","5B","iB","6B","jB","kB","lB","mB","nB","oB","pB","qB","rB","sB","tB","s","uB","vB","wB","xB","yB","P","Q","R","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","t","u","v","w","x","y","z","0","1","2","3","4","5","6","D","8B","9B","AC"],E:"Chrome",F:{"0":1680566400,"1":1682985600,"2":1685404800,"3":1689724800,"4":1692057600,"5":1694476800,"6":1696896000,"7":1274745600,"8":1332892800,"9":1352246400,I:1264377600,J:1283385600,E:1287619200,F:1291248000,G:1296777600,A:1299542400,B:1303862400,C:1307404800,K:1312243200,L:1316131200,H:1316131200,M:1319500800,N:1323734400,O:1328659200,o:1337040000,p:1340668800,q:1343692800,r:1348531200,AB:1357862400,BB:1361404800,CB:1364428800,DB:1369094400,EB:1374105600,FB:1376956800,GB:1384214400,HB:1389657600,IB:1392940800,JB:1397001600,KB:1400544000,LB:1405468800,MB:1409011200,NB:1412640000,OB:1416268800,PB:1421798400,QB:1425513600,RB:1429401600,SB:1432080000,TB:1437523200,UB:1441152000,VB:1444780800,WB:1449014400,XB:1453248000,YB:1456963200,ZB:1460592000,aB:1464134400,bB:1469059200,cB:1472601600,dB:1476230400,eB:1480550400,fB:1485302400,gB:1489017600,hB:1492560000,"5B":1496707200,iB:1500940800,"6B":1504569600,jB:1508198400,kB:1512518400,lB:1516752000,mB:1520294400,nB:1523923200,oB:1527552000,pB:1532390400,qB:1536019200,rB:1539648000,sB:1543968000,tB:1548720000,s:1552348800,uB:1555977600,vB:1559606400,wB:1564444800,xB:1568073600,yB:1571702400,P:1575936000,Q:1580860800,R:1586304000,S:1589846400,T:1594684800,U:1598313600,V:1601942400,W:1605571200,X:1611014400,Y:1614556800,Z:1618272000,a:1621987200,b:1626739200,c:1630368000,d:1632268800,e:1634601600,f:1637020800,g:1641340800,h:1643673600,i:1646092800,j:1648512000,k:1650931200,l:1653350400,m:1655769600,n:1659398400,t:1661817600,u:1664236800,v:1666656000,w:1669680000,x:1673308800,y:1675728000,z:1678147200,D:1698710400,"8B":null,"9B":null,AC:null}},E:{A:{"7":0,I:0,J:0,E:0,F:0,G:0,A:0,B:0,C:0.004582,K:0.02291,L:0.096222,H:0.018328,UC:0,BC:0,VC:0.004582,WC:0,XC:0,YC:0.164952,CC:0,zB:0.009164,"0B":0.027492,DC:0.128296,ZC:0.233682,aC:0.041238,EC:0.032074,FC:0.06873,"1B":0.109968,bC:0.536094,"2B":0.064148,GC:0.16037,HC:0.146624,IC:0.34365,JC:0.146624,KC:0.398634,cC:2.1902,"3B":0.613988,LC:0.041238,MC:0,dC:0},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","UC","BC","I","7","VC","J","WC","E","XC","F","G","YC","A","CC","B","zB","C","0B","K","DC","L","ZC","H","aC","EC","FC","1B","bC","2B","GC","HC","IC","JC","KC","cC","3B","LC","MC","dC",""],E:"Safari",F:{"7":1275868800,UC:1205798400,BC:1226534400,I:1244419200,VC:1311120000,J:1343174400,WC:1382400000,E:1382400000,XC:1410998400,F:1413417600,G:1443657600,YC:1458518400,A:1474329600,CC:1490572800,B:1505779200,zB:1522281600,C:1537142400,"0B":1553472000,K:1568851200,DC:1585008000,L:1600214400,ZC:1619395200,H:1632096000,aC:1635292800,EC:1639353600,FC:1647216000,"1B":1652745600,bC:1658275200,"2B":1662940800,GC:1666569600,HC:1670889600,IC:1674432000,JC:1679875200,KC:1684368000,cC:1690156800,"3B":1695686400,LC:1698192000,MC:null,dC:null}},F:{A:{"8":0,"9":0,G:0,B:0,C:0,H:0,M:0,N:0,O:0,o:0,p:0,q:0,r:0,AB:0,BB:0,CB:0,DB:0.004582,EB:0,FB:0,GB:0,HB:0,IB:0,JB:0,KB:0,LB:0,MB:0,NB:0,OB:0,PB:0,QB:0,RB:0,SB:0,TB:0,UB:0,VB:0.013746,WB:0,XB:0,YB:0,ZB:0,aB:0,bB:0,cB:0,dB:0.004582,eB:0.004582,fB:0,gB:0,hB:0,iB:0,jB:0,kB:0,lB:0,mB:0,nB:0,oB:0,pB:0,qB:0,rB:0,sB:0,tB:0,s:0,uB:0,vB:0,wB:0,xB:0,yB:0,P:0,Q:0,R:0,"7B":0,S:0,T:0,U:0,V:0,W:0,X:0,Y:0,Z:0,a:0,b:0,c:0,d:0,e:0.050402,f:0,g:0.09164,h:0,i:0.009164,j:0.009164,k:0.013746,l:1.61745,m:0.25201,n:0,eC:0,fC:0,gC:0,hC:0,zB:0,NC:0,iC:0,"0B":0},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","G","eC","fC","gC","hC","B","zB","NC","iC","C","0B","H","M","N","O","8","o","p","q","r","9","AB","BB","CB","DB","EB","FB","GB","HB","IB","JB","KB","LB","MB","NB","OB","PB","QB","RB","SB","TB","UB","VB","WB","XB","YB","ZB","aB","bB","cB","dB","eB","fB","gB","hB","iB","jB","kB","lB","mB","nB","oB","pB","qB","rB","sB","tB","s","uB","vB","wB","xB","yB","P","Q","R","7B","S","T","U","V","W","X","Y","Z","a","b","c","d","e","f","g","h","i","j","k","l","m","n","","",""],E:"Opera",F:{"8":1390867200,"9":1409616000,G:1150761600,eC:1223424000,fC:1251763200,gC:1267488000,hC:1277942400,B:1292457600,zB:1302566400,NC:1309219200,iC:1323129600,C:1323129600,"0B":1352073600,H:1372723200,M:1377561600,N:1381104000,O:1386288000,o:1393891200,p:1399334400,q:1401753600,r:1405987200,AB:1413331200,BB:1417132800,CB:1422316800,DB:1425945600,EB:1430179200,FB:1433808000,GB:1438646400,HB:1442448000,IB:1445904000,JB:1449100800,KB:1454371200,LB:1457308800,MB:1462320000,NB:1465344000,OB:1470096000,PB:1474329600,QB:1477267200,RB:1481587200,SB:1486425600,TB:1490054400,UB:1494374400,VB:1498003200,WB:1502236800,XB:1506470400,YB:1510099200,ZB:1515024000,aB:1517961600,bB:1521676800,cB:1525910400,dB:1530144000,eB:1534982400,fB:1537833600,gB:1543363200,hB:1548201600,iB:1554768000,jB:1561593600,kB:1566259200,lB:1570406400,mB:1573689600,nB:1578441600,oB:1583971200,pB:1587513600,qB:1592956800,rB:1595894400,sB:1600128000,tB:1603238400,s:1613520000,uB:1612224000,vB:1616544000,wB:1619568000,xB:1623715200,yB:1627948800,P:1631577600,Q:1633392000,R:1635984000,"7B":1638403200,S:1642550400,T:1644969600,U:1647993600,V:1650412800,W:1652745600,X:1654646400,Y:1657152000,Z:1660780800,a:1663113600,b:1668816000,c:1668643200,d:1671062400,e:1675209600,f:1677024000,g:1679529600,h:1681948800,i:1684195200,j:1687219200,k:1690329600,l:1692748800,m:1696204800,n:1699920000},D:{G:"o",B:"o",C:"o",eC:"o",fC:"o",gC:"o",hC:"o",zB:"o",NC:"o",iC:"o","0B":"o"}},G:{A:{F:0,BC:0,jC:0,OC:0.0027735,kC:0.00138675,lC:0.00416026,mC:0.00970726,nC:0.00138675,oC:0.00970726,pC:0.033282,qC:0.00138675,rC:0.0485363,sC:0.0457628,tC:0.016641,uC:0.0124808,vC:0.220494,wC:0.00693376,xC:0.0374423,yC:0.0138675,zC:0.0443761,"0C":0.122034,"1C":0.196919,"2C":0.0776581,EC:0.0887521,FC:0.0984594,"1B":0.140062,"3C":0.96934,"2B":0.357782,GC:0.685055,HC:0.334207,IC:0.619878,JC:0.137288,KC:0.355009,"4C":6.64254,"3B":2.36719,LC:0.142835,MC:0.00416026},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","BC","jC","OC","kC","lC","mC","F","nC","oC","pC","qC","rC","sC","tC","uC","vC","wC","xC","yC","zC","0C","1C","2C","EC","FC","1B","3C","2B","GC","HC","IC","JC","KC","4C","3B","LC","MC","",""],E:"Safari on iOS",F:{BC:1270252800,jC:1283904000,OC:1299628800,kC:1331078400,lC:1359331200,mC:1394409600,F:1410912000,nC:1413763200,oC:1442361600,pC:1458518400,qC:1473724800,rC:1490572800,sC:1505779200,tC:1522281600,uC:1537142400,vC:1553472000,wC:1568851200,xC:1572220800,yC:1580169600,zC:1585008000,"0C":1600214400,"1C":1619395200,"2C":1632096000,EC:1639353600,FC:1647216000,"1B":1652659200,"3C":1658275200,"2B":1662940800,GC:1666569600,HC:1670889600,IC:1674432000,JC:1679875200,KC:1684368000,"4C":1690156800,"3B":1694995200,LC:1698192000,MC:null}},H:{A:{"5C":0.06},B:"o",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","5C","","",""],E:"Opera Mini",F:{"5C":1426464000}},I:{A:{"4B":0,I:0.000123508,D:0.61445,"6C":0,"7C":0.000185261,"8C":0,"9C":0.000123508,OC:0.000432277,AD:0,BD:0.00185261},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","6C","7C","8C","4B","I","9C","OC","AD","BD","D","","",""],E:"Android Browser",F:{"6C":1256515200,"7C":1274313600,"8C":1291593600,"4B":1298332800,I:1318896000,"9C":1341792000,OC:1374624000,AD:1386547200,BD:1401667200,D:1698710400}},J:{A:{E:0,A:0},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","E","A","","",""],E:"Blackberry Browser",F:{E:1325376000,A:1359504000}},K:{A:{A:0,B:0,C:0,s:1.00715,zB:0,NC:0,"0B":0},B:"o",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A","B","zB","NC","C","0B","s","","",""],E:"Opera Mobile",F:{A:1287100800,B:1300752000,zB:1314835200,NC:1318291200,C:1330300800,"0B":1349740800,s:1673827200},D:{s:"webkit"}},L:{A:{D:35.8038},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","D","","",""],E:"Chrome for Android",F:{D:1698710400}},M:{A:{D:0.276267},B:"moz",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","D","","",""],E:"Firefox for Android",F:{D:1698105600}},N:{A:{A:0,B:0},B:"ms",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","A","B","","",""],E:"IE Mobile",F:{A:1340150400,B:1353456000}},O:{A:{"1B":0.785465},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","1B","","",""],E:"UC Browser for Android",F:{"1B":1687132800},D:{"1B":"webkit"}},P:{A:{I:0.0977276,o:0.0542931,p:0.108586,q:1.60708,r:0.347476,CD:0,DD:0,ED:0.0325759,FD:0,GD:0,CC:0,HD:0.0108586,ID:0,JD:0.0108586,KD:0,LD:0,"2B":0.0217172,"3B":0.0325759,MD:0.0217172,ND:0.0434345},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","I","CD","DD","ED","FD","GD","CC","HD","ID","JD","KD","LD","2B","3B","MD","ND","o","p","q","r","","",""],E:"Samsung Internet",F:{I:1461024000,CD:1481846400,DD:1509408000,ED:1528329600,FD:1546128000,GD:1554163200,CC:1567900800,HD:1582588800,ID:1593475200,JD:1605657600,KD:1618531200,LD:1629072000,"2B":1640736000,"3B":1651708800,MD:1659657600,ND:1667260800,o:1677369600,p:1684454400,q:1689292800,r:1697587200}},Q:{A:{DC:0.151676},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","DC","","",""],E:"QQ Browser",F:{DC:1663718400}},R:{A:{OD:0},B:"webkit",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","OD","","",""],E:"Baidu Browser",F:{OD:1663027200}},S:{A:{PD:0.059587,QD:0},B:"moz",C:["","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","","PD","QD","","",""],E:"KaiOS Browser",F:{PD:1527811200,QD:1631664000}}}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/browserVersions.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/browserVersions.js index 8bdc255845d0f0..b01d963e06e114 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/browserVersions.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/browserVersions.js @@ -1 +1 @@ -module.exports={"0":"112","1":"113","2":"114","3":"115","4":"116","5":"117","6":"118","7":"5","8":"19","9":"24",A:"10",B:"11",C:"12",D:"119",E:"7",F:"8",G:"9",H:"15",I:"4",J:"6",K:"13",L:"14",M:"16",N:"17",O:"18",P:"79",Q:"80",R:"81",S:"83",T:"84",U:"85",V:"86",W:"87",X:"88",Y:"89",Z:"90",a:"91",b:"92",c:"93",d:"94",e:"95",f:"96",g:"97",h:"98",i:"99",j:"100",k:"101",l:"102",m:"103",n:"20",o:"21",p:"22",q:"23",r:"73",s:"104",t:"105",u:"106",v:"107",w:"108",x:"109",y:"110",z:"111",AB:"25",BB:"26",CB:"27",DB:"28",EB:"29",FB:"30",GB:"31",HB:"32",IB:"33",JB:"34",KB:"35",LB:"36",MB:"37",NB:"38",OB:"39",PB:"40",QB:"41",RB:"42",SB:"43",TB:"44",UB:"45",VB:"46",WB:"47",XB:"48",YB:"49",ZB:"50",aB:"51",bB:"52",cB:"53",dB:"54",eB:"55",fB:"56",gB:"57",hB:"58",iB:"60",jB:"62",kB:"63",lB:"64",mB:"65",nB:"66",oB:"67",pB:"68",qB:"69",rB:"70",sB:"71",tB:"72",uB:"74",vB:"75",wB:"76",xB:"77",yB:"78",zB:"11.1","0B":"12.1","1B":"15.5","2B":"16.0","3B":"17.0","4B":"3","5B":"59","6B":"61","7B":"82","8B":"120","9B":"121",AC:"122",BC:"3.2",CC:"10.1",DC:"13.1",EC:"15.2-15.3",FC:"15.4",GC:"16.1",HC:"16.2",IC:"16.3",JC:"16.4",KC:"16.5",LC:"17.1",MC:"17.2",NC:"11.5",OC:"4.2-4.3",PC:"5.5",QC:"2",RC:"3.5",SC:"3.6",TC:"3.1",UC:"5.1",VC:"6.1",WC:"7.1",XC:"9.1",YC:"14.1",ZC:"15.1",aC:"15.6",bC:"16.6",cC:"TP",dC:"9.5-9.6",eC:"10.0-10.1",fC:"10.5",gC:"10.6",hC:"11.6",iC:"4.0-4.1",jC:"5.0-5.1",kC:"6.0-6.1",lC:"7.0-7.1",mC:"8.1-8.4",nC:"9.0-9.2",oC:"9.3",pC:"10.0-10.2",qC:"10.3",rC:"11.0-11.2",sC:"11.3-11.4",tC:"12.0-12.1",uC:"12.2-12.5",vC:"13.0-13.1",wC:"13.2",xC:"13.3",yC:"13.4-13.7",zC:"14.0-14.4","0C":"14.5-14.8","1C":"15.0-15.1","2C":"15.6-15.7","3C":"16.6-16.7","4C":"all","5C":"2.1","6C":"2.2","7C":"2.3","8C":"4.1","9C":"4.4",AD:"4.4.3-4.4.4",BD:"5.0-5.4",CD:"6.2-6.4",DD:"7.2-7.4",ED:"8.2",FD:"9.2",GD:"11.1-11.2",HD:"12.0",ID:"13.0",JD:"14.0",KD:"15.0",LD:"18.0",MD:"19.0",ND:"13.18",OD:"2.5",PD:"3.0-3.1"}; +module.exports={"0":"112","1":"113","2":"114","3":"115","4":"116","5":"117","6":"118","7":"5","8":"19","9":"24",A:"10",B:"11",C:"12",D:"119",E:"7",F:"8",G:"9",H:"15",I:"4",J:"6",K:"13",L:"14",M:"16",N:"17",O:"18",P:"79",Q:"80",R:"81",S:"83",T:"84",U:"85",V:"86",W:"87",X:"88",Y:"89",Z:"90",a:"91",b:"92",c:"93",d:"94",e:"95",f:"96",g:"97",h:"98",i:"99",j:"100",k:"101",l:"102",m:"103",n:"104",o:"20",p:"21",q:"22",r:"23",s:"73",t:"105",u:"106",v:"107",w:"108",x:"109",y:"110",z:"111",AB:"25",BB:"26",CB:"27",DB:"28",EB:"29",FB:"30",GB:"31",HB:"32",IB:"33",JB:"34",KB:"35",LB:"36",MB:"37",NB:"38",OB:"39",PB:"40",QB:"41",RB:"42",SB:"43",TB:"44",UB:"45",VB:"46",WB:"47",XB:"48",YB:"49",ZB:"50",aB:"51",bB:"52",cB:"53",dB:"54",eB:"55",fB:"56",gB:"57",hB:"58",iB:"60",jB:"62",kB:"63",lB:"64",mB:"65",nB:"66",oB:"67",pB:"68",qB:"69",rB:"70",sB:"71",tB:"72",uB:"74",vB:"75",wB:"76",xB:"77",yB:"78",zB:"11.1","0B":"12.1","1B":"15.5","2B":"16.0","3B":"17.0","4B":"3","5B":"59","6B":"61","7B":"82","8B":"120","9B":"121",AC:"122",BC:"3.2",CC:"10.1",DC:"13.1",EC:"15.2-15.3",FC:"15.4",GC:"16.1",HC:"16.2",IC:"16.3",JC:"16.4",KC:"16.5",LC:"17.1",MC:"17.2",NC:"11.5",OC:"4.2-4.3",PC:"5.5",QC:"2",RC:"123",SC:"3.5",TC:"3.6",UC:"3.1",VC:"5.1",WC:"6.1",XC:"7.1",YC:"9.1",ZC:"14.1",aC:"15.1",bC:"15.6",cC:"16.6",dC:"TP",eC:"9.5-9.6",fC:"10.0-10.1",gC:"10.5",hC:"10.6",iC:"11.6",jC:"4.0-4.1",kC:"5.0-5.1",lC:"6.0-6.1",mC:"7.0-7.1",nC:"8.1-8.4",oC:"9.0-9.2",pC:"9.3",qC:"10.0-10.2",rC:"10.3",sC:"11.0-11.2",tC:"11.3-11.4",uC:"12.0-12.1",vC:"12.2-12.5",wC:"13.0-13.1",xC:"13.2",yC:"13.3",zC:"13.4-13.7","0C":"14.0-14.4","1C":"14.5-14.8","2C":"15.0-15.1","3C":"15.6-15.7","4C":"16.6-16.7","5C":"all","6C":"2.1","7C":"2.2","8C":"2.3","9C":"4.1",AD:"4.4",BD:"4.4.3-4.4.4",CD:"5.0-5.4",DD:"6.2-6.4",ED:"7.2-7.4",FD:"8.2",GD:"9.2",HD:"11.1-11.2",ID:"12.0",JD:"13.0",KD:"14.0",LD:"15.0",MD:"18.0",ND:"19.0",OD:"13.18",PD:"2.5",QD:"3.0-3.1"}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/aac.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/aac.js index a76bff8d56605d..1c02179b33dd94 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/aac.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/aac.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 QC 4B I J E F G A B C K L H M N O n o RC SC","132":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 8 9 C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G","16":"A B"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"2":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"132":"D"},N:{"1":"A","2":"B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"132":"OD PD"}},B:6,C:"AAC audio file format",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 QC 4B I J E F G A B C K L H M N O o p SC TC","132":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 8 9 C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G","16":"A B"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"2":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"132":"D"},N:{"1":"A","2":"B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"132":"PD QD"}},B:6,C:"AAC audio file format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/abortcontroller.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/abortcontroller.js index c5f0c9a113020a..90bee2aa5365a4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/abortcontroller.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/abortcontroller.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H"},C:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB RC SC"},D:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB"},E:{"1":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC","130":"C zB"},F:{"1":"cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB dC eC fC gC zB NC hC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:1,C:"AbortController & AbortSignal",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H"},C:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB SC TC"},D:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB"},E:{"1":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC","130":"C zB"},F:{"1":"cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB eC fC gC hC zB NC iC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:1,C:"AbortController & AbortSignal",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ac3-ec3.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ac3-ec3.js index 751613a2e42ec4..aedda573ecd294 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ac3-ec3.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ac3-ec3.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC","132":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","132":"A"},K:{"2":"A B C r zB NC","132":"0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"AC-3 (Dolby Digital) and EC-3 (Dolby Digital Plus) codecs",D:false}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC","132":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E","132":"A"},K:{"2":"A B C s zB NC","132":"0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"AC-3 (Dolby Digital) and EC-3 (Dolby Digital Plus) codecs",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/accelerometer.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/accelerometer.js index 8b17820dba7e4b..0b829419f670cf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/accelerometer.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/accelerometer.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","194":"hB 5B iB 6B jB kB lB mB nB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:4,C:"Accelerometer",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","194":"hB 5B iB 6B jB kB lB mB nB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:4,C:"Accelerometer",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/addeventlistener.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/addeventlistener.js index 22a78df41ebfeb..90a63839c17c51 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/addeventlistener.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/addeventlistener.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","130":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","257":"7 QC 4B I J RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"EventTarget.addEventListener()",D:true}; +module.exports={A:{A:{"1":"G A B","130":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","257":"7 QC 4B I J SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"EventTarget.addEventListener()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/alternate-stylesheet.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/alternate-stylesheet.js index fddb33dcd662f1..c8f19059d914cc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/alternate-stylesheet.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/alternate-stylesheet.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"F G A B","2":"J E PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"G B C dC eC fC gC zB NC hC 0B","16":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"16":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"16":"E A"},K:{"2":"r","16":"A B C zB NC 0B"},L:{"16":"D"},M:{"16":"D"},N:{"16":"A B"},O:{"16":"1B"},P:{"16":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"16":"ND"},S:{"1":"OD PD"}},B:1,C:"Alternate stylesheet",D:false}; +module.exports={A:{A:{"1":"F G A B","2":"J E PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"G B C eC fC gC hC zB NC iC 0B","16":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"16":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"16":"E A"},K:{"2":"s","16":"A B C zB NC 0B"},L:{"16":"D"},M:{"16":"D"},N:{"16":"A B"},O:{"16":"1B"},P:{"16":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"16":"OD"},S:{"1":"PD QD"}},B:1,C:"Alternate stylesheet",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ambient-light.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ambient-light.js index 125097bc5d9f85..4b266f0a7e2be7 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ambient-light.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ambient-light.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K","132":"L H M N O","322":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 QC 4B I J E F G A B C K L H M N O n o RC SC","132":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","194":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","322":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB dC eC fC gC zB NC hC 0B","322":"r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"132":"OD PD"}},B:4,C:"Ambient Light Sensor",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K","132":"L H M N O","322":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 QC 4B I J E F G A B C K L H M N O o p SC TC","132":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","194":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","322":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB eC fC gC hC zB NC iC 0B","322":"s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"132":"PD QD"}},B:4,C:"Ambient Light Sensor",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/apng.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/apng.js index 73f76c961f2a26..161bd8647eaf1d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/apng.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/apng.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC"},D:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB"},E:{"1":"F G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC WC"},F:{"1":"B C VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"8 9 G H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Animated PNG (APNG)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC"},D:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB"},E:{"1":"F G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC XC"},F:{"1":"B C VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"8 9 G H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Animated PNG (APNG)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-find-index.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-find-index.js index 9ec8e308ebe1f0..623f38b5e7e9f3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-find-index.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-find-index.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q RC SC"},D:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB"},E:{"1":"F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC"},F:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB dC eC fC gC zB NC hC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","16":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Array.prototype.findIndex",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r SC TC"},D:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB"},E:{"1":"F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC"},F:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB eC fC gC hC zB NC iC 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E","16":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Array.prototype.findIndex",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-find.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-find.js index df18594384a168..75e04f5eeabd76 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-find.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-find.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","16":"C K L"},C:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q RC SC"},D:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB"},E:{"1":"F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC"},F:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB dC eC fC gC zB NC hC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","16":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Array.prototype.find",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","16":"C K L"},C:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r SC TC"},D:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB"},E:{"1":"F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC"},F:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB eC fC gC hC zB NC iC 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E","16":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Array.prototype.find",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-flat.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-flat.js index f99848ef387123..5f2f328af6fc06 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-flat.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-flat.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B RC SC"},D:{"1":"0 1 2 3 4 5 6 qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB"},E:{"1":"C K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC zB"},F:{"1":"fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB dC eC fC gC zB NC hC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:6,C:"flat & flatMap array methods",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B SC TC"},D:{"1":"0 1 2 3 4 5 6 qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB"},E:{"1":"C K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC zB"},F:{"1":"fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB eC fC gC hC zB NC iC 0B"},G:{"1":"uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:6,C:"flat & flatMap array methods",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-includes.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-includes.js index 1a6ef6c41fded4..5fbf16186b8534 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-includes.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/array-includes.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB RC SC"},D:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB dC eC fC gC zB NC hC 0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Array.prototype.includes",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SC TC"},D:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB eC fC gC hC zB NC iC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Array.prototype.includes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/arrow-functions.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/arrow-functions.js index c0b02dc7301346..1ceb0ac6ec9212 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/arrow-functions.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/arrow-functions.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n o RC SC"},D:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB dC eC fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Arrow functions",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o p SC TC"},D:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB eC fC gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Arrow functions",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/asmjs.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/asmjs.js index 782ca79dba519f..b7f7594d3baf58 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/asmjs.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/asmjs.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"K L H M N O","132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","322":"C"},C:{"1":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n o RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB","132":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","132":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","132":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","132":"r"},L:{"132":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"132":"1B"},P:{"2":"I","132":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"132":"DC"},R:{"132":"ND"},S:{"1":"OD PD"}},B:6,C:"asm.js",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"K L H M N O","132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","322":"C"},C:{"1":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o p SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB","132":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","132":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","132":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","132":"s"},L:{"132":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"132":"1B"},P:{"2":"I","132":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"132":"DC"},R:{"132":"OD"},S:{"1":"PD QD"}},B:6,C:"asm.js",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/async-clipboard.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/async-clipboard.js index df303e64763d0d..16afe4ddf12d4d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/async-clipboard.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/async-clipboard.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB RC SC","132":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","66":"hB 5B iB 6B"},E:{"1":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K TC BC UC VC WC XC CC zB 0B"},F:{"1":"YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC","260":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","260":"D"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"132":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I BD CD DD ED","260":"n o p q FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD","132":"PD"}},B:5,C:"Asynchronous Clipboard API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB SC TC","132":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","66":"hB 5B iB 6B"},E:{"1":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K UC BC VC WC XC YC CC zB 0B"},F:{"1":"YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC","260":"0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","260":"D"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"132":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I CD DD ED FD","260":"o p q r GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD","132":"QD"}},B:5,C:"Asynchronous Clipboard API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/async-functions.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/async-functions.js index cf243486abca15..91d1563c16dd57 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/async-functions.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/async-functions.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K","194":"L"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB RC SC"},D:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC","258":"CC"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB dC eC fC gC zB NC hC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC","258":"qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:6,C:"Async functions",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K","194":"L"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB SC TC"},D:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC","258":"CC"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB eC fC gC hC zB NC iC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC","258":"rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:6,C:"Async functions",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/atob-btoa.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/atob-btoa.js index acc97574925956..f33ff2a3d6f88e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/atob-btoa.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/atob-btoa.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m gC zB NC hC 0B","2":"G dC eC","16":"fC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","16":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Base64 encoding and decoding",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n hC zB NC iC 0B","2":"G eC fC","16":"gC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","16":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Base64 encoding and decoding",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audio-api.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audio-api.js index 6a33075219b00e..cf6c59af78f55d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audio-api.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audio-api.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q RC SC"},D:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K","33":"8 9 L H M N O n o p q AB BB CB DB EB FB GB HB IB"},E:{"1":"H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","33":"J E F G A B C K L VC WC XC CC zB 0B DC"},F:{"1":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","33":"8 H M N O n o"},G:{"1":"0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","33":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"Web Audio API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r SC TC"},D:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K","33":"8 9 L H M N O o p q r AB BB CB DB EB FB GB HB IB"},E:{"1":"H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","33":"J E F G A B C K L WC XC YC CC zB 0B DC"},F:{"1":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","33":"8 H M N O o p"},G:{"1":"1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","33":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"Web Audio API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audio.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audio.js index 6509679d93d994..fa4fcaf60afa54 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audio.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audio.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","132":"7 8 I J E F G A B C K L H M N O RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G","4":"dC eC"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","2":"5C 6C"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Audio element",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","132":"7 8 I J E F G A B C K L H M N O SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G","4":"eC fC"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","2":"6C 7C"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Audio element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audiotracks.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audiotracks.js index c1fe3c8d42bd3f..96a1dcff4ad91b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audiotracks.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/audiotracks.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"C K L H M N O","322":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB RC SC","194":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB","322":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB dC eC fC gC zB NC hC 0B","322":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","322":"r"},L:{"322":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"322":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"322":"DC"},R:{"322":"ND"},S:{"194":"OD PD"}},B:1,C:"Audio Tracks",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"C K L H M N O","322":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB SC TC","194":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB","322":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB eC fC gC hC zB NC iC 0B","322":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","322":"s"},L:{"322":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"322":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"322":"DC"},R:{"322":"OD"},S:{"194":"PD QD"}},B:1,C:"Audio Tracks",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/autofocus.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/autofocus.js index c995fdaa0ecc78..543a4b1ab87791 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/autofocus.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/autofocus.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"I"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:1,C:"Autofocus attribute",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"I"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:1,C:"Autofocus attribute",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/auxclick.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/auxclick.js index 58e31dca73b2ff..b2fd553ae345cc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/auxclick.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/auxclick.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB RC SC","129":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:5,C:"Auxclick",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB SC TC","129":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:5,C:"Auxclick",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/av1.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/av1.js index a714cebe937348..4755d0b00999bf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/av1.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/av1.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"4 5 6 C K L H M N D","194":"0 1 2 3 O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z"},C:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB RC SC","66":"eB fB gB hB 5B iB 6B jB kB lB","260":"mB","516":"nB"},D:{"1":"0 1 2 3 4 5 6 rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB","66":"oB pB qB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC","1028":"3B LC MC cC"},F:{"1":"gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C","1028":"3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:6,C:"AV1 video format",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"4 5 6 C K L H M N D","194":"0 1 2 3 O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z"},C:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB SC TC","66":"eB fB gB hB 5B iB 6B jB kB lB","260":"mB","516":"nB"},D:{"1":"0 1 2 3 4 5 6 rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB","66":"oB pB qB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC","1028":"3B LC MC dC"},F:{"1":"gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C","1028":"3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:6,C:"AV1 video format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/avif.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/avif.js index b40c13867140d9..df978d711b708e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/avif.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/avif.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","4162":"2 3 4 5"},C:{"1":"1 2 3 4 5 6 D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB RC SC","194":"xB yB P Q R 7B S T U V W X Y Z a b","257":"c d e f g h i j k l m s t u v w x y","2049":"0 z"},D:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T"},E:{"1":"JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B","1796":"GC HC IC"},F:{"1":"sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C","257":"JC KC 3C 3B LC MC","1281":"2B GC HC IC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:6,C:"AVIF image format",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","4162":"2 3 4 5"},C:{"1":"1 2 3 4 5 6 D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB SC TC","194":"xB yB P Q R 7B S T U V W X Y Z a b","257":"c d e f g h i j k l m n t u v w x y","2049":"0 z"},D:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T"},E:{"1":"JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B","1796":"GC HC IC"},F:{"1":"sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C","257":"JC KC 4C 3B LC MC","1281":"2B GC HC IC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:6,C:"AVIF image format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-attachment.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-attachment.js index 4f3e1fbc59d106..a151cb6a905f65 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-attachment.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-attachment.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","132":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C UC VC WC XC CC zB 0B FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","132":"I K TC BC DC","2050":"L H YC ZC EC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","132":"G dC eC"},G:{"2":"BC iC OC","772":"F jC kC lC mC nC oC pC qC rC sC tC uC","2050":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 9C AD","132":"8C OC"},J:{"260":"E A"},K:{"1":"B C r zB NC 0B","132":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"2":"I","1028":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS background-attachment",D:true}; +module.exports={A:{A:{"1":"G A B","132":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","132":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C VC WC XC YC CC zB 0B FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","132":"I K UC BC DC","2050":"L H ZC aC EC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","132":"G eC fC"},G:{"2":"BC jC OC","772":"F kC lC mC nC oC pC qC rC sC tC uC vC","2050":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C AD BD","132":"9C OC"},J:{"260":"E A"},K:{"1":"B C s zB NC 0B","132":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"2":"I","1028":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS background-attachment",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-clip-text.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-clip-text.js index 598d06335afb89..6154d66bdad893 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-clip-text.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-clip-text.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"H M N O","33":"0 1 2 3 4 5 6 C K L P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB RC SC"},D:{"33":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"L H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC BC","33":"7 I J E F G A B C K UC VC WC XC CC zB 0B DC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC jC","33":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"2":"4C"},I:{"16":"4B 5C 6C 7C","33":"I D 8C OC 9C AD"},J:{"33":"E A"},K:{"16":"A B C zB NC 0B","33":"r"},L:{"33":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"33":"1B"},P:{"33":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"33":"DC"},R:{"33":"ND"},S:{"1":"OD PD"}},B:7,C:"Background-clip: text",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"H M N O","33":"C K L","164":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB SC TC"},D:{"132":"8B 9B AC","164":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},E:{"16":"UC BC","132":"1B bC 2B GC HC IC JC KC cC 3B LC MC dC","388":"L H ZC aC EC FC","420":"7 I J E F G A B C K VC WC XC YC CC zB 0B DC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","164":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"16":"BC jC OC kC","132":"1B 3C 2B GC HC IC JC KC 4C 3B LC MC","388":"0C 1C 2C EC FC","420":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC"},H:{"2":"5C"},I:{"16":"4B 6C 7C 8C","164":"I D 9C OC AD BD"},J:{"164":"E A"},K:{"16":"A B C zB NC 0B","164":"s"},L:{"164":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"164":"1B"},P:{"164":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"164":"DC"},R:{"164":"OD"},S:{"1":"PD QD"}},B:7,C:"Background-clip: text",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-img-opts.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-img-opts.js index 913c857c2d68e1..1d8030e5a2b28a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-img-opts.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-img-opts.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC","36":"SC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","516":"7 I J E F G A B C K L"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","772":"7 I J TC BC UC VC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC","36":"eC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","4":"BC iC OC kC","516":"jC"},H:{"132":"4C"},I:{"1":"D 9C AD","36":"5C","516":"4B I 8C OC","548":"6C 7C"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS3 Background-image options",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC","36":"TC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","516":"7 I J E F G A B C K L"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","772":"7 I J UC BC VC WC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC","36":"fC"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","4":"BC jC OC lC","516":"kC"},H:{"132":"5C"},I:{"1":"D AD BD","36":"6C","516":"4B I 9C OC","548":"7C 8C"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS3 Background-image options",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-position-x-y.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-position-x-y.js index b1a7b6628f6483..6e0cf9a393049f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-position-x-y.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-position-x-y.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:7,C:"background-position-x & background-position-y",D:true}; +module.exports={A:{A:{"1":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:7,C:"background-position-x & background-position-y",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-repeat-round-space.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-repeat-round-space.js index 19888709c3a953..d25424b1ac9654 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-repeat-round-space.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-repeat-round-space.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F PC","132":"G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB RC SC"},D:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC VC"},F:{"1":"8 9 B C n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G H M N O dC eC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:4,C:"CSS background-repeat round and space",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F PC","132":"G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB SC TC"},D:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC WC"},F:{"1":"8 9 B C o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G H M N O eC fC"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:4,C:"CSS background-repeat round and space",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-sync.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-sync.js index 1100ee9db7753d..e40693a5c46cab 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-sync.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/background-sync.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D RC SC","16":"8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"Background Sync API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B SC TC","16":"9B AC RC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"Background Sync API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/battery-status.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/battery-status.js index 50c87e97f32fee..8f7531d1d3130f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/battery-status.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/battery-status.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"SB TB UB VB WB XB YB ZB aB","2":"0 1 2 3 4 5 6 7 QC 4B I J E F G bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","132":"8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","164":"A B C K L H"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB","66":"MB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD","2":"PD"}},B:4,C:"Battery Status API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"SB TB UB VB WB XB YB ZB aB","2":"0 1 2 3 4 5 6 7 QC 4B I J E F G bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","132":"8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","164":"A B C K L H"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB","66":"MB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD","2":"QD"}},B:4,C:"Battery Status API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/beacon.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/beacon.js index ff336660ea8881..80edfcdee837b6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/beacon.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/beacon.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB RC SC"},D:{"1":"0 1 2 3 4 5 6 OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC"},F:{"1":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB dC eC fC gC zB NC hC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"Beacon API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB SC TC"},D:{"1":"0 1 2 3 4 5 6 OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC"},F:{"1":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB eC fC gC hC zB NC iC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"Beacon API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/beforeafterprint.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/beforeafterprint.js index 7e92cd13a489b5..a6fc587891160c 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/beforeafterprint.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/beforeafterprint.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC"},D:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB"},E:{"1":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB 0B"},F:{"1":"ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB dC eC fC gC zB NC hC 0B"},G:{"1":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"16":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"16":"A B"},O:{"1":"1B"},P:{"2":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","16":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Printing Events",D:true}; +module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC"},D:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB"},E:{"1":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB 0B"},F:{"1":"ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB eC fC gC hC zB NC iC 0B"},G:{"1":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"16":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"16":"A B"},O:{"1":"1B"},P:{"2":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","16":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Printing Events",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/bigint.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/bigint.js index b91e32c51a666a..88c9cf2bba9459 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/bigint.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/bigint.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB RC SC","194":"mB nB oB"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB"},E:{"1":"L H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K TC BC UC VC WC XC CC zB 0B DC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dC eC fC gC zB NC hC 0B"},G:{"1":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:6,C:"BigInt",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB SC TC","194":"mB nB oB"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB"},E:{"1":"L H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K UC BC VC WC XC YC CC zB 0B DC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB eC fC gC hC zB NC iC 0B"},G:{"1":"0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:6,C:"BigInt",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/blobbuilder.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/blobbuilder.js index 8655ed1e4f089c..687f3b4ca1cc50 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/blobbuilder.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/blobbuilder.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC","36":"J E F G A B C"},D:{"1":"0 1 2 3 4 5 6 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E","36":"8 F G A B C K L H M N O"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B C dC eC fC gC zB NC hC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC"},H:{"2":"4C"},I:{"1":"D","2":"5C 6C 7C","36":"4B I 8C OC 9C AD"},J:{"1":"A","2":"E"},K:{"1":"r 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Blob constructing",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC","36":"J E F G A B C"},D:{"1":"0 1 2 3 4 5 6 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E","36":"8 F G A B C K L H M N O"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B C eC fC gC hC zB NC iC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC"},H:{"2":"5C"},I:{"1":"D","2":"6C 7C 8C","36":"4B I 9C OC AD BD"},J:{"1":"A","2":"E"},K:{"1":"s 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Blob constructing",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/bloburls.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/bloburls.js index 259cca61501c24..156651e09fe3ae 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/bloburls.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/bloburls.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","129":"A B"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","129":"C K L"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E","33":"8 F G A B C K L H M N O n o p"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","33":"J"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","33":"kC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B 5C 6C 7C","33":"I 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Blob URLs",D:true}; +module.exports={A:{A:{"2":"J E F G PC","129":"A B"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","129":"C K L"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E","33":"8 F G A B C K L H M N O o p q"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","33":"J"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","33":"lC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B 6C 7C 8C","33":"I 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Blob URLs",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/border-image.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/border-image.js index 684d627ea218bc..681b51a5e68db7 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/border-image.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/border-image.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","129":"C K"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","260":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","804":"7 I J E F G A B C K L RC SC"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","260":"aB bB cB dB eB","388":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","1412":"8 9 H M N O n o p q AB BB CB DB EB","1956":"7 I J E F G A B C K L"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","129":"A B C K L H XC CC zB 0B DC YC ZC EC","1412":"J E F G VC WC","1956":"7 I TC BC UC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G dC eC","260":"NB OB PB QB RB","388":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB","1796":"fC gC","1828":"B C zB NC hC 0B"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","129":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC","1412":"F kC lC mC nC","1956":"BC iC OC jC"},H:{"1828":"4C"},I:{"1":"D","388":"9C AD","1956":"4B I 5C 6C 7C 8C OC"},J:{"1412":"A","1924":"E"},K:{"1":"r","2":"A","1828":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","260":"BD CD","388":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","260":"OD"}},B:4,C:"CSS3 Border images",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","129":"C K"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","260":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","804":"7 I J E F G A B C K L SC TC"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","260":"aB bB cB dB eB","388":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","1412":"8 9 H M N O o p q r AB BB CB DB EB","1956":"7 I J E F G A B C K L"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","129":"A B C K L H YC CC zB 0B DC ZC aC EC","1412":"J E F G WC XC","1956":"7 I UC BC VC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G eC fC","260":"NB OB PB QB RB","388":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB","1796":"gC hC","1828":"B C zB NC iC 0B"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","129":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC","1412":"F lC mC nC oC","1956":"BC jC OC kC"},H:{"1828":"5C"},I:{"1":"D","388":"AD BD","1956":"4B I 6C 7C 8C 9C OC"},J:{"1412":"A","1924":"E"},K:{"1":"s","2":"A","1828":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","260":"CD DD","388":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","260":"PD"}},B:4,C:"CSS3 Border images",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/border-radius.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/border-radius.js index 8b904730b1ba80..fabb3fcdd7fcf1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/border-radius.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/border-radius.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","257":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","289":"4B RC SC","292":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"I"},E:{"1":"7 E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","33":"I TC BC","129":"J UC VC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC eC"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","33":"BC"},H:{"2":"4C"},I:{"1":"4B I D 6C 7C 8C OC 9C AD","33":"5C"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","257":"OD"}},B:4,C:"CSS3 Border-radius (rounded corners)",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","257":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","289":"4B SC TC","292":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"I"},E:{"1":"7 E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","33":"I UC BC","129":"J VC WC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC fC"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","33":"BC"},H:{"2":"5C"},I:{"1":"4B I D 7C 8C 9C OC AD BD","33":"6C"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","257":"PD"}},B:4,C:"CSS3 Border-radius (rounded corners)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/broadcastchannel.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/broadcastchannel.js index 1871a66e30f016..0a46e63f9b1750 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/broadcastchannel.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/broadcastchannel.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB RC SC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC"},F:{"1":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB dC eC fC gC zB NC hC 0B"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"BroadcastChannel",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB SC TC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC"},F:{"1":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB eC fC gC hC zB NC iC 0B"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"BroadcastChannel",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/brotli.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/brotli.js index 5f04b3235dc8b5..0b91feaed0e158 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/brotli.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/brotli.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB RC SC"},D:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB","194":"YB","257":"ZB"},E:{"1":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC","513":"B C zB 0B"},F:{"1":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB dC eC fC gC zB NC hC 0B","194":"LB MB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Brotli Accept-Encoding/Content-Encoding",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB SC TC"},D:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB","194":"YB","257":"ZB"},E:{"1":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC","513":"B C zB 0B"},F:{"1":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB eC fC gC hC zB NC iC 0B","194":"LB MB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Brotli Accept-Encoding/Content-Encoding",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/calc.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/calc.js index a5676dcb70b82a..bdbca2c454bf9a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/calc.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/calc.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","260":"G","516":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","33":"7 I J E F G A B C K L H"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N O","33":"8 9 n o p q AB"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","33":"J"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","33":"kC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC","132":"9C AD"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"calc() as CSS unit value",D:true}; +module.exports={A:{A:{"2":"J E F PC","260":"G","516":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","33":"7 I J E F G A B C K L H"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N O","33":"8 9 o p q r AB"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","33":"J"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","33":"lC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC","132":"AD BD"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"calc() as CSS unit value",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas-blending.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas-blending.js index 48955c2c6d130f..31ffd0ebba4d27 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas-blending.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas-blending.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O RC SC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC"},F:{"1":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C H M dC eC fC gC zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"Canvas blend modes",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O SC TC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC"},F:{"1":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C H M eC fC gC hC zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"Canvas blend modes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas-text.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas-text.js index 0e409eee8501da..37d698f8c6257e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas-text.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas-text.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","8":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","8":"G dC eC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","8":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Text API for Canvas",D:true}; +module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","8":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","8":"G eC fC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","8":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Text API for Canvas",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas.js index e56c87bd91f0cf..d1e051bdb747b4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/canvas.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC SC","132":"QC 4B RC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","132":"TC BC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"260":"4C"},I:{"1":"4B I D 8C OC 9C AD","132":"5C 6C 7C"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Canvas (basic support)",D:true}; +module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC TC","132":"QC 4B SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","132":"UC BC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"260":"5C"},I:{"1":"4B I D 9C OC AD BD","132":"6C 7C 8C"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Canvas (basic support)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ch-unit.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ch-unit.js index cc50e12ee176c7..1c3f19acb3c75c 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ch-unit.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ch-unit.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","132":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC VC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"ch (character) unit",D:true}; +module.exports={A:{A:{"2":"J E F PC","132":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC WC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"ch (character) unit",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/chacha20-poly1305.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/chacha20-poly1305.js index ddd3e9fe3c3ced..18ae49e38d1b0d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/chacha20-poly1305.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/chacha20-poly1305.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB RC SC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB","129":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB dC eC fC gC zB NC hC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C","16":"AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"ChaCha20-Poly1305 cipher suites for TLS",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB SC TC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB","129":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB eC fC gC hC zB NC iC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD","16":"BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"ChaCha20-Poly1305 cipher suites for TLS",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/channel-messaging.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/channel-messaging.js index 1e19a34a16c823..94f98a8ea8e983 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/channel-messaging.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/channel-messaging.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB RC SC","194":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m gC zB NC hC 0B","2":"G dC eC","16":"fC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Channel messaging",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB SC TC","194":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n hC zB NC iC 0B","2":"G eC fC","16":"gC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Channel messaging",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/childnode-remove.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/childnode-remove.js index 4fc44a8c0a8d8e..dbc6dc3a806722 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/childnode-remove.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/childnode-remove.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","16":"C"},C:{"1":"0 1 2 3 4 5 6 9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n o p RC SC"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n o p q"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","16":"J"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"ChildNode.remove()",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","16":"C"},C:{"1":"0 1 2 3 4 5 6 9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o p q SC TC"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o p q r"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","16":"J"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"ChildNode.remove()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/classlist.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/classlist.js index 815a2d7a4e0e17..df8e3f12dac0f8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/classlist.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/classlist.js @@ -1 +1 @@ -module.exports={A:{A:{"8":"J E F G PC","1924":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"QC 4B RC","516":"9 AB","772":"7 8 I J E F G A B C K L H M N O n o p q SC"},D:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"7 I J E","516":"9 AB BB CB","772":"q","900":"8 F G A B C K L H M N O n o p"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"7 I TC BC","900":"J UC VC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","8":"G B dC eC fC gC zB","900":"C NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","8":"BC iC OC","900":"jC kC"},H:{"900":"4C"},I:{"1":"D 9C AD","8":"5C 6C 7C","900":"4B I 8C OC"},J:{"1":"A","900":"E"},K:{"1":"r","8":"A B","900":"C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"900":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"classList (DOMTokenList)",D:true}; +module.exports={A:{A:{"8":"J E F G PC","1924":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","8":"QC 4B SC","516":"9 AB","772":"7 8 I J E F G A B C K L H M N O o p q r TC"},D:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","8":"7 I J E","516":"9 AB BB CB","772":"r","900":"8 F G A B C K L H M N O o p q"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"7 I UC BC","900":"J VC WC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","8":"G B eC fC gC hC zB","900":"C NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","8":"BC jC OC","900":"kC lC"},H:{"900":"5C"},I:{"1":"D AD BD","8":"6C 7C 8C","900":"4B I 9C OC"},J:{"1":"A","900":"E"},K:{"1":"s","8":"A B","900":"C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"900":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"classList (DOMTokenList)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js index 5d6d0f9bf0df23..c07355c070ad14 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/client-hints-dpr-width-viewport.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:6,C:"Client Hints: DPR, Width, Viewport-Width",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:6,C:"Client Hints: DPR, Width, Viewport-Width",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/clipboard.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/clipboard.js index c7181fea7de9c2..773f1940b6a3fc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/clipboard.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/clipboard.js @@ -1 +1 @@ -module.exports={A:{A:{"2436":"J E F G A B PC"},B:{"260":"N O","2436":"C K L H M","8196":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 QC 4B I J E F G A B C K L H M N O n o RC SC","772":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","4100":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 I J E F G A B C","2564":"8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","8196":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","10244":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB"},E:{"1":"C K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC BC","2308":"A B CC zB","2820":"7 I J E F G UC VC WC XC"},F:{"2":"G B dC eC fC gC zB NC hC","16":"C","516":"0B","2564":"8 9 H M N O n o p q AB BB CB DB EB","8196":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","10244":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB"},G:{"1":"tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC","2820":"F jC kC lC mC nC oC pC qC rC sC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC","260":"D","2308":"9C AD"},J:{"2":"E","2308":"A"},K:{"2":"A B C zB NC","16":"0B","8196":"r"},L:{"8196":"D"},M:{"1028":"D"},N:{"2":"A B"},O:{"8196":"1B"},P:{"2052":"BD CD","2308":"I","8196":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"8196":"DC"},R:{"8196":"ND"},S:{"4100":"OD PD"}},B:5,C:"Synchronous Clipboard API",D:true}; +module.exports={A:{A:{"2436":"J E F G A B PC"},B:{"260":"N O","2436":"C K L H M","8196":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 QC 4B I J E F G A B C K L H M N O o p SC TC","772":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","4100":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 I J E F G A B C","2564":"8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","8196":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","10244":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB"},E:{"1":"C K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC BC","2308":"A B CC zB","2820":"7 I J E F G VC WC XC YC"},F:{"2":"G B eC fC gC hC zB NC iC","16":"C","516":"0B","2564":"8 9 H M N O o p q r AB BB CB DB EB","8196":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","10244":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB"},G:{"1":"uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC","2820":"F kC lC mC nC oC pC qC rC sC tC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC","260":"D","2308":"AD BD"},J:{"2":"E","2308":"A"},K:{"2":"A B C zB NC","16":"0B","8196":"s"},L:{"8196":"D"},M:{"1028":"D"},N:{"2":"A B"},O:{"8196":"1B"},P:{"2052":"CD DD","2308":"I","8196":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"8196":"DC"},R:{"8196":"OD"},S:{"4100":"PD QD"}},B:5,C:"Synchronous Clipboard API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/colr-v1.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/colr-v1.js index cf78829f470b38..dadb84605a6708 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/colr-v1.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/colr-v1.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 h i j k l m s t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g"},C:{"1":"0 1 2 3 4 5 6 v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g RC SC","258":"h i j k l m s","578":"t u"},D:{"1":"0 1 2 3 4 5 6 h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y","194":"Z a b c d e f g"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"16":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"16":"A B"},O:{"1":"1B"},P:{"1":"n o p q LD MD","2":"I BD CD DD ED FD CC GD HD ID JD KD 2B 3B"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"COLR/CPAL(v1) Font Formats",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 h i j k l m n t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g"},C:{"1":"0 1 2 3 4 5 6 v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g SC TC","258":"h i j k l m n","578":"t u"},D:{"1":"0 1 2 3 4 5 6 h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y","194":"Z a b c d e f g"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"16":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"16":"A B"},O:{"1":"1B"},P:{"1":"o p q r MD ND","2":"I CD DD ED FD GD CC HD ID JD KD LD 2B 3B"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"COLR/CPAL(v1) Font Formats",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/colr.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/colr.js index d4ecd51dcdb90a..6333a87eccb37d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/colr.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/colr.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","257":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O y z D","513":"P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x"},C:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB RC SC"},D:{"1":"0 1 2 3 4 5 6 y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB","513":"sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x"},E:{"1":"L H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC","2":"7 I J E F G A TC BC UC VC WC XC CC","129":"B C K zB 0B DC","1026":"3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB dC eC fC gC zB NC hC 0B","513":"hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C","2":"F BC iC OC jC kC lC mC nC oC pC qC","1026":"3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"16":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"16":"A B"},O:{"1":"1B"},P:{"1":"n o p q CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"COLR/CPAL(v0) Font Formats",D:true}; +module.exports={A:{A:{"2":"J E F PC","257":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O y z D","513":"P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x"},C:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB SC TC"},D:{"1":"0 1 2 3 4 5 6 y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB","513":"sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x"},E:{"1":"L H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC","2":"7 I J E F G A UC BC VC WC XC YC CC","129":"B C K zB 0B DC","1026":"3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB eC fC gC hC zB NC iC 0B","513":"hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C","2":"F BC jC OC kC lC mC nC oC pC qC rC","1026":"3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"16":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"16":"A B"},O:{"1":"1B"},P:{"1":"o p q r CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"COLR/CPAL(v0) Font Formats",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/comparedocumentposition.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/comparedocumentposition.js index d1d0e10ab31274..c058f27780767a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/comparedocumentposition.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/comparedocumentposition.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","132":"8 9 H M N O n o p q AB BB CB DB EB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I J TC BC","132":"E F G VC WC XC","260":"UC"},F:{"1":"8 9 C N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","16":"G B dC eC fC gC zB NC","132":"H M"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC","132":"F iC OC jC kC lC mC nC oC"},H:{"1":"4C"},I:{"1":"D 9C AD","16":"5C 6C","132":"4B I 7C 8C OC"},J:{"132":"E A"},K:{"1":"C r 0B","16":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Node.compareDocumentPosition()",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","16":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","132":"8 9 H M N O o p q r AB BB CB DB EB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I J UC BC","132":"E F G WC XC YC","260":"VC"},F:{"1":"8 9 C N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","16":"G B eC fC gC hC zB NC","132":"H M"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC","132":"F jC OC kC lC mC nC oC pC"},H:{"1":"5C"},I:{"1":"D AD BD","16":"6C 7C","132":"4B I 8C 9C OC"},J:{"132":"E A"},K:{"1":"C s 0B","16":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Node.compareDocumentPosition()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/console-basic.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/console-basic.js index 5f64de38011f69..6ab85a4c71d14e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/console-basic.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/console-basic.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E PC","132":"F G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","2":"G dC eC fC gC"},G:{"1":"BC iC OC jC","513":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"4097":"4C"},I:{"1025":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"258":"E A"},K:{"2":"A","258":"B C zB NC 0B","1025":"r"},L:{"1025":"D"},M:{"2049":"D"},N:{"258":"A B"},O:{"258":"1B"},P:{"1025":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1025":"ND"},S:{"1":"OD PD"}},B:1,C:"Basic console logging functions",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E PC","132":"F G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","2":"G eC fC gC hC"},G:{"1":"BC jC OC kC","513":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"4097":"5C"},I:{"1025":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"258":"E A"},K:{"2":"A","258":"B C zB NC 0B","1025":"s"},L:{"1025":"D"},M:{"2049":"D"},N:{"258":"A B"},O:{"258":"1B"},P:{"1025":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1025":"OD"},S:{"1":"PD QD"}},B:1,C:"Basic console logging functions",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/console-time.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/console-time.js index bd72386cbb7678..b5e7b9388ccd71 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/console-time.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/console-time.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","2":"G dC eC fC gC","16":"B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"r","16":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"console.time and console.timeEnd",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","2":"G eC fC gC hC","16":"B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"s","16":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"console.time and console.timeEnd",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/const.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/const.js index d3bb3b2e6772aa..4b7712995a8806 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/const.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/const.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","2052":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 QC 4B I J E F G A B C RC SC","260":"8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","260":"7 8 I J E F G A B C K L H M N O n","772":"9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","1028":"QB RB SB TB UB VB WB XB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","260":"7 I A TC BC CC","772":"J E F G UC VC WC XC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G dC","132":"B eC fC gC zB NC","644":"C hC 0B","772":"8 9 H M N O n o p q AB BB CB","1028":"DB EB FB GB HB IB JB KB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","260":"BC iC OC pC qC","772":"F jC kC lC mC nC oC"},H:{"644":"4C"},I:{"1":"D","16":"5C 6C","260":"7C","772":"4B I 8C OC 9C AD"},J:{"772":"E A"},K:{"1":"r","132":"A B zB NC","644":"C 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","1028":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"const",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","2052":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","132":"7 QC 4B I J E F G A B C SC TC","260":"8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","260":"7 8 I J E F G A B C K L H M N O o","772":"9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","1028":"QB RB SB TB UB VB WB XB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","260":"7 I A UC BC CC","772":"J E F G VC WC XC YC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G eC","132":"B fC gC hC zB NC","644":"C iC 0B","772":"8 9 H M N O o p q r AB BB CB","1028":"DB EB FB GB HB IB JB KB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","260":"BC jC OC qC rC","772":"F kC lC mC nC oC pC"},H:{"644":"5C"},I:{"1":"D","16":"6C 7C","260":"8C","772":"4B I 9C OC AD BD"},J:{"772":"E A"},K:{"1":"s","132":"A B zB NC","644":"C 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","1028":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"const",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/constraint-validation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/constraint-validation.js index f51d1c87cb8bcb..ddc7134aa0e89e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/constraint-validation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/constraint-validation.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","900":"A B"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","388":"L H M","900":"C K"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","260":"YB ZB","388":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB","900":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB"},D:{"1":"0 1 2 3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","388":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB","900":"8 9 H M N O n o p q"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I TC BC","388":"F G WC XC","900":"J E UC VC"},F:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G B dC eC fC gC zB NC","388":"8 9 H M N O n o p q AB BB","900":"C hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC","388":"F lC mC nC oC","900":"jC kC"},H:{"2":"4C"},I:{"1":"D","16":"4B 5C 6C 7C","388":"9C AD","900":"I 8C OC"},J:{"16":"E","388":"A"},K:{"1":"r","16":"A B zB NC","900":"C 0B"},L:{"1":"D"},M:{"1":"D"},N:{"900":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","388":"OD"}},B:1,C:"Constraint Validation API",D:true}; +module.exports={A:{A:{"2":"J E F G PC","900":"A B"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","388":"L H M","900":"C K"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","260":"YB ZB","388":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB","900":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB"},D:{"1":"0 1 2 3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","388":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB","900":"8 9 H M N O o p q r"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I UC BC","388":"F G XC YC","900":"J E VC WC"},F:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G B eC fC gC hC zB NC","388":"8 9 H M N O o p q r AB BB","900":"C iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC","388":"F mC nC oC pC","900":"kC lC"},H:{"2":"5C"},I:{"1":"D","16":"4B 6C 7C 8C","388":"AD BD","900":"I 9C OC"},J:{"16":"E","388":"A"},K:{"1":"s","16":"A B zB NC","900":"C 0B"},L:{"1":"D"},M:{"1":"D"},N:{"900":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","388":"PD"}},B:1,C:"Constraint Validation API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contenteditable.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contenteditable.js index 0241f22d57fe9d..075db67843d6ad 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contenteditable.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contenteditable.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC","4":"4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"2":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"E A"},K:{"1":"r 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"contenteditable attribute (basic support)",D:true}; +module.exports={A:{A:{"1":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC","4":"4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"2":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"E A"},K:{"1":"s 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"contenteditable attribute (basic support)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js index e8376bb3dcf3f3..59d3d10cbaf9d2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contentsecuritypolicy.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","129":"7 8 I J E F G A B C K L H M N O n o p"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K","257":"8 9 L H M N O n o p q"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC","257":"J VC","260":"UC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC","257":"kC","260":"jC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E","257":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"Content Security Policy 1.0",D:true}; +module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","129":"7 8 I J E F G A B C K L H M N O o p q"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K","257":"8 9 L H M N O o p q r"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC","257":"J WC","260":"VC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC","257":"lC","260":"kC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E","257":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"Content Security Policy 1.0",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js index 6af15fbe0d3a88..f2a2e6a2ff4bcc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/contentsecuritypolicy2.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L","4100":"H M N O"},C:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB RC SC","132":"GB HB IB JB","260":"KB","516":"LB MB NB OB PB QB RB SB TB"},D:{"1":"0 1 2 3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB","1028":"LB MB NB","2052":"OB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o p dC eC fC gC zB NC hC 0B","1028":"9 q AB","2052":"BB"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"Content Security Policy Level 2",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L","4100":"H M N O"},C:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB SC TC","132":"GB HB IB JB","260":"KB","516":"LB MB NB OB PB QB RB SB TB"},D:{"1":"0 1 2 3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB","1028":"LB MB NB","2052":"OB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p q eC fC gC hC zB NC iC 0B","1028":"9 r AB","2052":"BB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"Content Security Policy Level 2",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cookie-store-api.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cookie-store-api.js index 20d934f31f1b0f..82672698e5c372 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cookie-store-api.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cookie-store-api.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O","194":"P Q R S T U V"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB","194":"lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB dC eC fC gC zB NC hC 0B","194":"aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"Cookie Store API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O","194":"P Q R S T U V"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB","194":"lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB eC fC gC hC zB NC iC 0B","194":"aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"Cookie Store API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cors.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cors.js index a57642f8ba4d6d..baaf9691cafac4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cors.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cors.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E PC","132":"A","260":"F G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC 4B","1025":"6B jB kB lB mB nB oB pB qB rB"},D:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 I J E F G A B C"},E:{"2":"TC BC","513":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","644":"7 I UC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B dC eC fC gC zB NC hC"},G:{"513":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","644":"BC iC OC jC"},H:{"2":"4C"},I:{"1":"D 9C AD","132":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","132":"E"},K:{"1":"C r 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","132":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Cross-Origin Resource Sharing",D:true}; +module.exports={A:{A:{"1":"B","2":"J E PC","132":"A","260":"F G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC 4B","1025":"6B jB kB lB mB nB oB pB qB rB"},D:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","132":"7 I J E F G A B C"},E:{"2":"UC BC","513":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","644":"7 I VC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B eC fC gC hC zB NC iC"},G:{"513":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","644":"BC jC OC kC"},H:{"2":"5C"},I:{"1":"D AD BD","132":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","132":"E"},K:{"1":"C s 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","132":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Cross-Origin Resource Sharing",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/createimagebitmap.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/createimagebitmap.js index 31286966238040..cacbf75cd45911 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/createimagebitmap.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/createimagebitmap.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RC SC","1028":"c d e f g","3076":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b","8196":"0 1 2 3 4 5 6 h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","132":"ZB aB","260":"bB cB","516":"dB eB fB gB hB"},E:{"2":"7 I J E F G A B C K L TC BC UC VC WC XC CC zB 0B DC YC","4100":"H ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB dC eC fC gC zB NC hC 0B","132":"MB NB","260":"OB PB","516":"QB RB SB TB UB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C","4100":"1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"8196":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","16":"I BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"3076":"OD PD"}},B:1,C:"createImageBitmap",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB SC TC","1028":"c d e f g","3076":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b","8196":"0 1 2 3 4 5 6 h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","132":"ZB aB","260":"bB cB","516":"dB eB fB gB hB"},E:{"2":"7 I J E F G A B C K L UC BC VC WC XC YC CC zB 0B DC ZC","4100":"H aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB eC fC gC hC zB NC iC 0B","132":"MB NB","260":"OB PB","516":"QB RB SB TB UB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C","4100":"2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"8196":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","16":"I CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"3076":"PD QD"}},B:1,C:"createImageBitmap",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/credential-management.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/credential-management.js index 4bdb11aba9c4da..a04c6cea986048 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/credential-management.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/credential-management.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB","66":"XB YB ZB","129":"aB bB cB dB eB fB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB dC eC fC gC zB NC hC 0B"},G:{"1":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:5,C:"Credential Management API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB","66":"XB YB ZB","129":"aB bB cB dB eB fB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB eC fC gC hC zB NC iC 0B"},G:{"1":"0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:5,C:"Credential Management API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cryptography.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cryptography.js index 4f5adad2058773..447ebf3155c4df 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cryptography.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/cryptography.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"PC","8":"J E F G A","164":"B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","513":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB RC SC","66":"HB IB"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"7 I J E TC BC UC VC","289":"F G A WC XC CC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","8":"8 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","8":"BC iC OC jC kC lC","289":"F mC nC oC pC qC"},H:{"2":"4C"},I:{"1":"D","8":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"8":"E A"},K:{"1":"r","8":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A","164":"B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"Web Cryptography",D:true}; +module.exports={A:{A:{"2":"PC","8":"J E F G A","164":"B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","513":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","8":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB SC TC","66":"HB IB"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","8":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"7 I J E UC BC VC WC","289":"F G A XC YC CC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","8":"8 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","8":"BC jC OC kC lC mC","289":"F nC oC pC qC rC"},H:{"2":"5C"},I:{"1":"D","8":"4B I 6C 7C 8C 9C OC AD BD"},J:{"8":"E A"},K:{"1":"s","8":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A","164":"B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"Web Cryptography",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-all.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-all.js index e97f1f5ff05e82..6610ac2bc1133a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-all.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-all.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB RC SC"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC"},H:{"2":"4C"},I:{"1":"D AD","2":"4B I 5C 6C 7C 8C OC 9C"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS all property",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB SC TC"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC"},H:{"2":"5C"},I:{"1":"D BD","2":"4B I 6C 7C 8C 9C OC AD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS all property",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-anchor-positioning.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-anchor-positioning.js index e1c0dff15052fe..62f586b4ef3fcf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-anchor-positioning.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-anchor-positioning.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","194":"5 6 D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS Anchor Positioning",D:false}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","194":"5 6 D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS Anchor Positioning",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-animation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-animation.js index e2fce5a0816efe..6a76e3687e5e3e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-animation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-animation.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B I RC SC","33":"7 J E F G A B C K L H"},D:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC","33":"J E F UC VC WC","292":"7 I"},F:{"1":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B dC eC fC gC zB NC hC","33":"8 9 C H M N O n o p q AB BB CB DB EB"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","33":"F kC lC mC","164":"BC iC OC jC"},H:{"2":"4C"},I:{"1":"D","33":"I 8C OC 9C AD","164":"4B 5C 6C 7C"},J:{"33":"E A"},K:{"1":"r 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"CSS Animation",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B I SC TC","33":"7 J E F G A B C K L H"},D:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC","33":"J E F VC WC XC","292":"7 I"},F:{"1":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B eC fC gC hC zB NC iC","33":"8 9 C H M N O o p q r AB BB CB DB EB"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","33":"F lC mC nC","164":"BC jC OC kC"},H:{"2":"5C"},I:{"1":"D","33":"I 9C OC AD BD","164":"4B 6C 7C 8C"},J:{"33":"E A"},K:{"1":"s 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"CSS Animation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-any-link.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-any-link.js index 26855268409d59..af0c4786395443 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-any-link.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-any-link.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"QC","33":"7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB RC SC"},D:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I J TC BC UC","33":"E F VC WC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC jC","33":"F kC lC mC"},H:{"2":"4C"},I:{"1":"D","16":"4B I 5C 6C 7C 8C OC","33":"9C AD"},J:{"16":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q FD CC GD HD ID JD KD 2B 3B LD MD","16":"I","33":"BD CD DD ED"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","33":"OD"}},B:5,C:"CSS :any-link selector",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","16":"QC","33":"7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB SC TC"},D:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I J UC BC VC","33":"E F WC XC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC kC","33":"F lC mC nC"},H:{"2":"5C"},I:{"1":"D","16":"4B I 6C 7C 8C 9C OC","33":"AD BD"},J:{"16":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r GD CC HD ID JD KD LD 2B 3B MD ND","16":"I","33":"CD DD ED FD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","33":"PD"}},B:5,C:"CSS :any-link selector",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-appearance.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-appearance.js index dd46bb3ce7670c..3715881ebd85d6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-appearance.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-appearance.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","33":"S","164":"P Q R","388":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","164":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P","676":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB RC SC"},D:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"S","164":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","164":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC"},F:{"1":"r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","33":"rB sB tB","164":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","164":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},H:{"2":"4C"},I:{"1":"D","164":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"164":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A","388":"B"},O:{"1":"1B"},P:{"164":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"164":"DC"},R:{"1":"ND"},S:{"1":"PD","164":"OD"}},B:5,C:"CSS Appearance",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","33":"S","164":"P Q R","388":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","164":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P","676":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB SC TC"},D:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"S","164":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","164":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC"},F:{"1":"s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","33":"rB sB tB","164":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","164":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},H:{"2":"5C"},I:{"1":"D","164":"4B I 6C 7C 8C 9C OC AD BD"},J:{"164":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A","388":"B"},O:{"1":"1B"},P:{"164":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"164":"DC"},R:{"1":"OD"},S:{"1":"QD","164":"PD"}},B:5,C:"CSS Appearance",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-at-counter-style.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-at-counter-style.js index 988c5b73ae0301..21d2ea70f5f154 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-at-counter-style.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-at-counter-style.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y Z","132":"0 1 2 3 4 5 6 a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB RC SC","132":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z","132":"0 1 2 3 4 5 6 a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC","4":"3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB dC eC fC gC zB NC hC 0B","132":"xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C","4":"3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","132":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","132":"r"},L:{"132":"D"},M:{"132":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I BD CD DD ED FD CC GD HD ID JD KD","132":"n o p q 2B 3B LD MD"},Q:{"2":"DC"},R:{"132":"ND"},S:{"132":"OD PD"}},B:4,C:"CSS Counter Styles",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y Z","132":"0 1 2 3 4 5 6 a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB SC TC","132":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z","132":"0 1 2 3 4 5 6 a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC","4":"3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB eC fC gC hC zB NC iC 0B","132":"xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C","4":"3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","132":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","132":"s"},L:{"132":"D"},M:{"132":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I CD DD ED FD GD CC HD ID JD KD LD","132":"o p q r 2B 3B MD ND"},Q:{"2":"DC"},R:{"132":"OD"},S:{"132":"PD QD"}},B:4,C:"CSS Counter Styles",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-autofill.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-autofill.js index 56e60797bb94c7..7c639fd9e399eb 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-autofill.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-autofill.js @@ -1 +1 @@ -module.exports={A:{D:{"33":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},L:{"33":"D"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U RC SC"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},K:{"2":"A B C zB NC 0B","33":"r"},E:{"1":"H ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC","2":"cC","33":"7 I J E F G A B C K L TC BC UC VC WC XC CC zB 0B DC YC"},G:{"1":"1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","33":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C"},P:{"33":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},I:{"2":"4B I 5C 6C 7C 8C OC","33":"D 9C AD"}},B:6,C:":autofill CSS pseudo-class",D:undefined}; +module.exports={A:{D:{"33":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},L:{"33":"D"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U SC TC"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},K:{"2":"A B C zB NC 0B","33":"s"},E:{"1":"H aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC","2":"dC","33":"7 I J E F G A B C K L UC BC VC WC XC YC CC zB 0B DC ZC"},G:{"1":"2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","33":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C"},P:{"33":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},I:{"2":"4B I 6C 7C 8C 9C OC","33":"D AD BD"}},B:6,C:":autofill CSS pseudo-class",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-backdrop-filter.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-backdrop-filter.js index 4a758157e25f3f..9008a478a4d904 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-backdrop-filter.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-backdrop-filter.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M","257":"N O"},C:{"1":"0 1 2 3 4 5 6 m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB RC SC","578":"rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l"},D:{"1":"0 1 2 3 4 5 6 wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB","194":"WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB"},E:{"2":"7 I J E F TC BC UC VC WC","33":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB dC eC fC gC zB NC hC 0B","194":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB"},G:{"2":"F BC iC OC jC kC lC mC","33":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q HD ID JD KD 2B 3B LD MD","2":"I","194":"BD CD DD ED FD CC GD"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"CSS Backdrop Filter",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M","257":"N O"},C:{"1":"0 1 2 3 4 5 6 m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB SC TC","578":"rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l"},D:{"1":"0 1 2 3 4 5 6 wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB","194":"WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB"},E:{"2":"7 I J E F UC BC VC WC XC","33":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB eC fC gC hC zB NC iC 0B","194":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB"},G:{"2":"F BC jC OC kC lC mC nC","33":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ID JD KD LD 2B 3B MD ND","2":"I","194":"CD DD ED FD GD CC HD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"CSS Backdrop Filter",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-background-offsets.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-background-offsets.js index ffc7c36cff1083..8f1c716e141076 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-background-offsets.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-background-offsets.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C RC SC"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC VC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC eC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS background-position edge offsets",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C SC TC"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC WC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC fC"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS background-position edge offsets",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js index 870fd15af5df47..bdd9513aae267d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-backgroundblendmode.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB RC SC"},D:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB","260":"VB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC","132":"F G A WC XC"},F:{"1":"9 p q AB BB CB DB EB FB GB HB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o dC eC fC gC zB NC hC 0B","260":"IB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC","132":"F mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS background-blend-mode",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB SC TC"},D:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB","260":"VB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC","132":"F G A XC YC"},F:{"1":"9 q r AB BB CB DB EB FB GB HB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p eC fC gC hC zB NC iC 0B","260":"IB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC","132":"F nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS background-blend-mode",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js index 49a9ae36a7e3ff..4e7f2da82e9bad 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-boxdecorationbreak.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","164":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB RC SC"},D:{"2":"7 8 I J E F G A B C K L H M N O n o","164":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J TC BC UC","164":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G dC eC fC gC","129":"B C zB NC hC 0B","164":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"BC iC OC jC kC","164":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"132":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC","164":"D 9C AD"},J:{"2":"E","164":"A"},K:{"2":"A","129":"B C zB NC 0B","164":"r"},L:{"164":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"164":"1B"},P:{"164":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"164":"DC"},R:{"164":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS box-decoration-break",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","164":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB SC TC"},D:{"2":"7 8 I J E F G A B C K L H M N O o p","164":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J UC BC VC","164":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G eC fC gC hC","129":"B C zB NC iC 0B","164":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"BC jC OC kC lC","164":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"132":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC","164":"D AD BD"},J:{"2":"E","164":"A"},K:{"2":"A","129":"B C zB NC 0B","164":"s"},L:{"164":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"164":"1B"},P:{"164":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"164":"DC"},R:{"164":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS box-decoration-break",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-boxshadow.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-boxshadow.js index 4a094514bbd61f..222d9e15fc7f52 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-boxshadow.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-boxshadow.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","33":"RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 I J E F G"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","33":"7","164":"I TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC eC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","33":"iC OC","164":"BC"},H:{"2":"4C"},I:{"1":"I D 8C OC 9C AD","164":"4B 5C 6C 7C"},J:{"1":"A","33":"E"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS3 Box-shadow",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","33":"SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"7 I J E F G"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","33":"7","164":"I UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC fC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","33":"jC OC","164":"BC"},H:{"2":"5C"},I:{"1":"I D 9C OC AD BD","164":"4B 6C 7C 8C"},J:{"1":"A","33":"E"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS3 Box-shadow",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-canvas.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-canvas.js index f2b8b084b1aa62..47add1562ce858 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-canvas.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-canvas.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},E:{"2":"TC BC","33":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB"},G:{"33":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"D","33":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"33":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","33":"I"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"CSS Canvas Drawings",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},E:{"2":"UC BC","33":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB"},G:{"33":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"D","33":"4B I 6C 7C 8C 9C OC AD BD"},J:{"33":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","33":"I"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"CSS Canvas Drawings",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-caret-color.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-caret-color.js index c2f22613c1d3f3..b0c74dc154680f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-caret-color.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-caret-color.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB RC SC"},D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB dC eC fC gC zB NC hC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:2,C:"CSS caret-color",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB SC TC"},D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB eC fC gC hC zB NC iC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:2,C:"CSS caret-color",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cascade-layers.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cascade-layers.js index b7e4e7bf9afaee..5b336bb9f1e4ff 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cascade-layers.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cascade-layers.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 i j k l m s t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e","322":"f g h"},C:{"1":"0 1 2 3 4 5 6 g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c RC SC","194":"d e f"},D:{"1":"0 1 2 3 4 5 6 i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e","322":"f g h"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC"},F:{"1":"V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U dC eC fC gC zB NC hC 0B"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q LD MD","2":"I BD CD DD ED FD CC GD HD ID JD KD 2B 3B"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:4,C:"CSS Cascade Layers",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 i j k l m n t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e","322":"f g h"},C:{"1":"0 1 2 3 4 5 6 g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c SC TC","194":"d e f"},D:{"1":"0 1 2 3 4 5 6 i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e","322":"f g h"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC"},F:{"1":"V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U eC fC gC hC zB NC iC 0B"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r MD ND","2":"I CD DD ED FD GD CC HD ID JD KD LD 2B 3B"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:4,C:"CSS Cascade Layers",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cascade-scope.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cascade-scope.js index 1ae551bd7c41e9..419408a6f9e509 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cascade-scope.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cascade-scope.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"6 D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m","194":"0 1 2 3 4 5 s t u v w x y z"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"6 D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m","194":"0 1 2 3 4 5 s t u v w x y z"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y dC eC fC gC zB NC hC 0B","194":"Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Scoped Styles: the @scope rule",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"6 D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m","194":"0 1 2 3 4 5 n t u v w x y z"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"6 D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m","194":"0 1 2 3 4 5 n t u v w x y z"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y eC fC gC hC zB NC iC 0B","194":"Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Scoped Styles: the @scope rule",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-case-insensitive.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-case-insensitive.js index da51043fb4fe0e..52b72479f914e2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-case-insensitive.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-case-insensitive.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB RC SC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB dC eC fC gC zB NC hC 0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Case-insensitive CSS attribute selectors",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB SC TC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB eC fC gC hC zB NC iC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Case-insensitive CSS attribute selectors",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-clip-path.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-clip-path.js index 4d9a9888aa7dbe..b01851ba04c634 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-clip-path.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-clip-path.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N","260":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","3138":"O"},C:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","132":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB RC SC","644":"WB XB YB ZB aB bB cB"},D:{"2":"7 8 I J E F G A B C K L H M N O n o p q","260":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","292":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},E:{"2":"7 I J TC BC UC VC","260":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","292":"E F G A B C K WC XC CC zB 0B"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","260":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","292":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB"},G:{"2":"BC iC OC jC kC","260":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","292":"F lC mC nC oC pC qC rC sC tC uC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC","260":"D","292":"9C AD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","260":"r"},L:{"260":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"260":"1B"},P:{"292":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"260":"DC"},R:{"260":"ND"},S:{"1":"PD","644":"OD"}},B:4,C:"CSS clip-path property (for HTML)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N","260":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","3138":"O"},C:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","132":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB SC TC","644":"WB XB YB ZB aB bB cB"},D:{"2":"7 8 I J E F G A B C K L H M N O o p q r","260":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","292":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},E:{"2":"7 I J UC BC VC WC","260":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","292":"E F G A B C K XC YC CC zB 0B"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","260":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","292":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB"},G:{"2":"BC jC OC kC lC","260":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","292":"F mC nC oC pC qC rC sC tC uC vC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC","260":"D","292":"AD BD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","260":"s"},L:{"260":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"260":"1B"},P:{"292":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"260":"DC"},R:{"260":"OD"},S:{"1":"QD","644":"PD"}},B:4,C:"CSS clip-path property (for HTML)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-color-adjust.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-color-adjust.js index 8d90dab39d2fd7..a7faa38c800d92 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-color-adjust.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-color-adjust.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB RC SC"},D:{"16":"7 I J E F G A B C K L H M N O","33":"0 1 2 3 4 5 6 8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","33":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},H:{"2":"4C"},I:{"16":"4B I 5C 6C 7C 8C OC 9C AD","33":"D"},J:{"16":"E A"},K:{"2":"A B C zB NC 0B","33":"r"},L:{"16":"D"},M:{"1":"D"},N:{"16":"A B"},O:{"16":"1B"},P:{"16":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"33":"DC"},R:{"16":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS print-color-adjust",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB SC TC"},D:{"16":"7 I J E F G A B C K L H M N O","33":"0 1 2 3 4 5 6 8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","33":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},H:{"2":"5C"},I:{"16":"4B I 6C 7C 8C 9C OC AD BD","33":"D"},J:{"16":"E A"},K:{"2":"A B C zB NC 0B","33":"s"},L:{"16":"D"},M:{"1":"D"},N:{"16":"A B"},O:{"16":"1B"},P:{"16":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"33":"DC"},R:{"16":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS print-color-adjust",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-color-function.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-color-function.js index e6d7c243b26aab..685f01875390e0 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-color-function.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-color-function.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v","322":"w x y"},C:{"1":"1 2 3 4 5 6 D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y RC SC","578":"0 z"},D:{"1":"0 1 2 3 4 5 6 z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v","322":"w x y"},E:{"1":"H ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC","132":"B C K L CC zB 0B DC YC"},F:{"1":"h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d dC eC fC gC zB NC hC 0B","322":"e f g"},G:{"1":"1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC","132":"qC rC sC tC uC vC wC xC yC zC 0C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"p q","2":"I n o BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:4,C:"CSS color() function",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v","322":"w x y"},C:{"1":"1 2 3 4 5 6 D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y SC TC","578":"0 z"},D:{"1":"0 1 2 3 4 5 6 z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v","322":"w x y"},E:{"1":"H aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC","132":"B C K L CC zB 0B DC ZC"},F:{"1":"h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d eC fC gC hC zB NC iC 0B","322":"e f g"},G:{"1":"2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC","132":"rC sC tC uC vC wC xC yC zC 0C 1C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"q r","2":"I o p CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:4,C:"CSS color() function",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-conic-gradients.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-conic-gradients.js index f98aa8454e190d..d43bec58933550 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-conic-gradients.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-conic-gradients.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB RC SC","578":"vB wB xB yB P Q R 7B"},D:{"1":"0 1 2 3 4 5 6 sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB","257":"qB rB","450":"5B iB 6B jB kB lB mB nB oB pB"},E:{"1":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB"},F:{"1":"hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB dC eC fC gC zB NC hC 0B","257":"fB gB","450":"VB WB XB YB ZB aB bB cB dB eB"},G:{"1":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"CSS Conical Gradients",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB SC TC","578":"vB wB xB yB P Q R 7B"},D:{"1":"0 1 2 3 4 5 6 sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB","257":"qB rB","450":"5B iB 6B jB kB lB mB nB oB pB"},E:{"1":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB"},F:{"1":"hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB eC fC gC hC zB NC iC 0B","257":"fB gB","450":"VB WB XB YB ZB aB bB cB dB eB"},G:{"1":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"CSS Conical Gradients",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-queries-style.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-queries-style.js index cee69580eb7a2e..7b0554fa843e5a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-queries-style.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-queries-style.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u","194":"v w x y","260":"0 1 2 3 4 5 6 z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u","194":"v w x y","260":"0 1 2 3 4 5 6 z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b dC eC fC gC zB NC hC 0B","194":"c d e f g","260":"h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","260":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","194":"r"},L:{"260":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","260":"p q"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS Container Style Queries",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u","194":"v w x y","260":"0 1 2 3 4 5 6 z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u","194":"v w x y","260":"0 1 2 3 4 5 6 z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b eC fC gC hC zB NC iC 0B","194":"c d e f g","260":"h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","260":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","194":"s"},L:{"260":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","260":"q r"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS Container Style Queries",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-queries.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-queries.js index 9ef03d91e99f45..54e692f6be221c 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-queries.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-queries.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s","516":"t"},C:{"1":"0 1 2 3 4 5 6 y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x RC SC"},D:{"1":"0 1 2 3 4 5 6 u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a","194":"c d e f g h i j k l m s","450":"b","516":"t"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC"},F:{"1":"d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB dC eC fC gC zB NC hC 0B","194":"P Q R 7B S T U V W X Y Z","516":"a b c"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q","2":"I BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS Container Queries (Size)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n","516":"t"},C:{"1":"0 1 2 3 4 5 6 y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x SC TC"},D:{"1":"0 1 2 3 4 5 6 u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a","194":"c d e f g h i j k l m n","450":"b","516":"t"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC"},F:{"1":"d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB eC fC gC hC zB NC iC 0B","194":"P Q R 7B S T U V W X Y Z","516":"a b c"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r","2":"I CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS Container Queries (Size)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-query-units.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-query-units.js index 2f3923a59bed2a..f9341052d5cfb0 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-query-units.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-container-query-units.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s"},C:{"1":"0 1 2 3 4 5 6 y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x RC SC"},D:{"1":"0 1 2 3 4 5 6 t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b","194":"k l m s","450":"c d e f g h i j"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC"},F:{"1":"a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB dC eC fC gC zB NC hC 0B","194":"P Q R 7B S T U V W X Y Z"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q","2":"I BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS Container Query Units",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n"},C:{"1":"0 1 2 3 4 5 6 y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x SC TC"},D:{"1":"0 1 2 3 4 5 6 t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b","194":"k l m n","450":"c d e f g h i j"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC"},F:{"1":"a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB eC fC gC hC zB NC iC 0B","194":"P Q R 7B S T U V W X Y Z"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r","2":"I CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS Container Query Units",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-containment.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-containment.js index a6415f046be81f..116d473e09850b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-containment.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-containment.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB RC SC","194":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB"},D:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","66":"aB"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC"},F:{"1":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB dC eC fC gC zB NC hC 0B","66":"NB OB"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","194":"OD"}},B:2,C:"CSS Containment",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB SC TC","194":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB"},D:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","66":"aB"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC"},F:{"1":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB eC fC gC hC zB NC iC 0B","66":"NB OB"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","194":"PD"}},B:2,C:"CSS Containment",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-content-visibility.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-content-visibility.js index 2d89032e401ff4..e9c1241447a342 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-content-visibility.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-content-visibility.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O P Q R S T"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w RC SC","194":"0 1 2 3 4 5 6 x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T"},E:{"1":"cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC"},F:{"1":"sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS content-visibility",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O P Q R S T"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w SC TC","194":"0 1 2 3 4 5 6 x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T"},E:{"1":"dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC"},F:{"1":"sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS content-visibility",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-counters.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-counters.js index 4442e95e9be3d6..b97c219ea72de4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-counters.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-counters.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"F G A B","2":"J E PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS Counters",D:true}; +module.exports={A:{A:{"1":"F G A B","2":"J E PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS Counters",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-crisp-edges.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-crisp-edges.js index 4d8b0d63869e2f..4ab7c0fd47f450 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-crisp-edges.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-crisp-edges.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J PC","2340":"E F G A B"},B:{"2":"C K L H M N O","1025":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC","513":"mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b","545":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","1025":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","164":"J","4644":"E F G VC WC XC"},F:{"2":"8 9 G B H M N O n o p q AB BB CB dC eC fC gC zB NC","545":"C hC 0B","1025":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC","4260":"jC kC","4644":"F lC mC nC oC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","1025":"D"},J:{"2":"E","4260":"A"},K:{"2":"A B zB NC","545":"C 0B","1025":"r"},L:{"1025":"D"},M:{"1":"D"},N:{"2340":"A B"},O:{"1025":"1B"},P:{"1025":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1025":"DC"},R:{"1025":"ND"},S:{"1":"PD","4097":"OD"}},B:4,C:"Crisp edges/pixelated images",D:true}; +module.exports={A:{A:{"2":"J PC","2340":"E F G A B"},B:{"2":"C K L H M N O","1025":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC","513":"mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b","545":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","1025":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","164":"J","4644":"E F G WC XC YC"},F:{"2":"8 9 G B H M N O o p q r AB BB CB eC fC gC hC zB NC","545":"C iC 0B","1025":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC","4260":"kC lC","4644":"F mC nC oC pC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","1025":"D"},J:{"2":"E","4260":"A"},K:{"2":"A B zB NC","545":"C 0B","1025":"s"},L:{"1025":"D"},M:{"1":"D"},N:{"2340":"A B"},O:{"1025":"1B"},P:{"1025":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1025":"DC"},R:{"1025":"OD"},S:{"1":"QD","4097":"PD"}},B:4,C:"Crisp edges/pixelated images",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cross-fade.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cross-fade.js index 7f3e5f83d3480e..8dfaad47b45c59 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cross-fade.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-cross-fade.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 I J E F G A B C K L H M","33":"0 1 2 3 4 5 6 8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC","33":"J E F G UC VC WC XC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC","33":"F jC kC lC mC nC oC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC","33":"D 9C AD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","33":"r"},L:{"33":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"33":"1B"},P:{"33":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"33":"DC"},R:{"33":"ND"},S:{"2":"OD PD"}},B:4,C:"CSS Cross-Fade Function",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 I J E F G A B C K L H M","33":"0 1 2 3 4 5 6 8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC","33":"J E F G VC WC XC YC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC","33":"F kC lC mC nC oC pC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC","33":"D AD BD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","33":"s"},L:{"33":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"33":"1B"},P:{"33":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"33":"DC"},R:{"33":"OD"},S:{"2":"PD QD"}},B:4,C:"CSS Cross-Fade Function",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-default-pseudo.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-default-pseudo.js index 0e3e1e2dc65cd6..77fa1c6181fd4f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-default-pseudo.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-default-pseudo.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","132":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I TC BC","132":"J E F G A UC VC WC XC"},F:{"1":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G B dC eC fC gC zB NC","132":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB","260":"C hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC jC kC","132":"F lC mC nC oC pC"},H:{"260":"4C"},I:{"1":"D","16":"4B 5C 6C 7C","132":"I 8C OC 9C AD"},J:{"16":"E","132":"A"},K:{"1":"r","16":"A B C zB NC","260":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","132":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:":default CSS pseudo-class",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","16":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","132":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I UC BC","132":"J E F G A VC WC XC YC"},F:{"1":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G B eC fC gC hC zB NC","132":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB","260":"C iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC kC lC","132":"F mC nC oC pC qC"},H:{"260":"5C"},I:{"1":"D","16":"4B 6C 7C 8C","132":"I 9C OC AD BD"},J:{"16":"E","132":"A"},K:{"1":"s","16":"A B C zB NC","260":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","132":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:":default CSS pseudo-class",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js index 7c584bba68b4e6..ee248c6641a978 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-descendant-gtgt.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","16":"P"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"B","2":"7 I J E F G A C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Explicit descendant combinator >>",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","16":"P"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"B","2":"7 I J E F G A C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Explicit descendant combinator >>",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-deviceadaptation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-deviceadaptation.js index d2292e5801f3a0..a3d61ec23dcbb1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-deviceadaptation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-deviceadaptation.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","164":"A B"},B:{"66":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","164":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB","66":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB dC eC fC gC zB NC hC 0B","66":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"292":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A r","292":"B C zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"164":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"66":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS Device Adaptation",D:true}; +module.exports={A:{A:{"2":"J E F G PC","164":"A B"},B:{"66":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","164":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB","66":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB eC fC gC hC zB NC iC 0B","66":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"292":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A s","292":"B C zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"164":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"66":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS Device Adaptation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-dir-pseudo.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-dir-pseudo.js index af36d5bb2ceeac..aa7d0e91ee4a22 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-dir-pseudo.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-dir-pseudo.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s","194":"0 1 2 3 4 5 6 t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M RC SC","33":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},D:{"1":"8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z","194":"0 1 2 3 4 5 6 a b c d e f g h i j k l m s t u v w x y z D"},E:{"1":"JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z dC eC fC gC zB NC hC 0B","194":"a b c d e f g h i j k l m"},G:{"1":"JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"1":"PD","33":"OD"}},B:5,C:":dir() CSS pseudo-class",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n","194":"0 1 2 3 4 5 6 t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M SC TC","33":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},D:{"1":"8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z","194":"0 1 2 3 4 5 6 a b c d e f g h i j k l m n t u v w x y z D"},E:{"1":"JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z eC fC gC hC zB NC iC 0B","194":"a b c d e f g h i j k l m n"},G:{"1":"JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"1":"QD","33":"PD"}},B:5,C:":dir() CSS pseudo-class",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-display-contents.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-display-contents.js index 711c82fb888f9f..3cd803502db4a4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-display-contents.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-display-contents.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","132":"P Q R S T U V W X","260":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB RC SC","132":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B","260":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","132":"mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X","194":"hB 5B iB 6B jB kB lB","260":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B TC BC UC VC WC XC CC","132":"C K L H zB 0B DC YC ZC EC FC 1B aC","260":"3B LC MC cC","772":"2B GC HC IC JC KC bC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB dC eC fC gC zB NC hC 0B","132":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB","260":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC","132":"sC tC uC vC wC xC","260":"yC zC 0C 1C EC FC 1B 2C","516":"GC HC IC JC KC 3C","772":"2B"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","260":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","260":"r"},L:{"260":"D"},M:{"260":"D"},N:{"2":"A B"},O:{"132":"1B"},P:{"2":"I BD CD DD ED","132":"FD CC GD HD ID JD","260":"n o p q KD 2B 3B LD MD"},Q:{"132":"DC"},R:{"260":"ND"},S:{"132":"OD","260":"PD"}},B:4,C:"CSS display: contents",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","132":"P Q R S T U V W X","260":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB SC TC","132":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B","260":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","132":"mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X","194":"hB 5B iB 6B jB kB lB","260":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B UC BC VC WC XC YC CC","132":"C K L H zB 0B DC ZC aC EC FC 1B bC","260":"3B LC MC dC","772":"2B GC HC IC JC KC cC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB eC fC gC hC zB NC iC 0B","132":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB","260":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC","132":"tC uC vC wC xC yC","260":"zC 0C 1C 2C EC FC 1B 3C","516":"GC HC IC JC KC 4C","772":"2B"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","260":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","260":"s"},L:{"260":"D"},M:{"260":"D"},N:{"2":"A B"},O:{"132":"1B"},P:{"2":"I CD DD ED FD","132":"GD CC HD ID JD KD","260":"o p q r LD 2B 3B MD ND"},Q:{"132":"DC"},R:{"260":"OD"},S:{"132":"PD","260":"QD"}},B:4,C:"CSS display: contents",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-element-function.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-element-function.js index 8397f9f6a7db15..4d0f270eb4cf38 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-element-function.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-element-function.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"33":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","164":"QC 4B RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"33":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"33":"OD PD"}},B:5,C:"CSS element() function",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"33":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","164":"QC 4B SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"33":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"33":"PD QD"}},B:5,C:"CSS element() function",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-env-function.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-env-function.js index df3748aa0fdeb5..53b0ca83eb3b91 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-env-function.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-env-function.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB RC SC"},D:{"1":"0 1 2 3 4 5 6 qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC","132":"B"},F:{"1":"fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB dC eC fC gC zB NC hC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC","132":"rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:7,C:"CSS Environment Variables env()",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB SC TC"},D:{"1":"0 1 2 3 4 5 6 qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC","132":"B"},F:{"1":"fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB eC fC gC hC zB NC iC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC","132":"sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:7,C:"CSS Environment Variables env()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-exclusions.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-exclusions.js index 61750f59ed051e..6671d5c805598e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-exclusions.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-exclusions.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","33":"A B"},B:{"2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","33":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"33":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS Exclusions Level 1",D:true}; +module.exports={A:{A:{"2":"J E F G PC","33":"A B"},B:{"2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","33":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"33":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS Exclusions Level 1",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-featurequeries.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-featurequeries.js index c75423340fea23..6d349e6b63e253 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-featurequeries.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-featurequeries.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n o RC SC"},D:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B C dC eC fC gC zB NC hC"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS Feature Queries",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o p SC TC"},D:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B C eC fC gC hC zB NC iC"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS Feature Queries",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-file-selector-button.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-file-selector-button.js index de4ecd38e71c94..3933c68860c3e8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-file-selector-button.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-file-selector-button.js @@ -1 +1 @@ -module.exports={A:{D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D","33":"C K L H M N O P Q R S T U V W X"},C:{"1":"0 1 2 3 4 5 6 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R RC SC"},M:{"1":"D"},A:{"2":"J E F G PC","33":"A B"},F:{"1":"vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB"},K:{"1":"r","2":"A B C zB NC 0B"},E:{"1":"H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC","2":"cC","33":"7 I J E F G A B C K L TC BC UC VC WC XC CC zB 0B DC"},G:{"1":"0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","33":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC"},P:{"1":"n o p q KD 2B 3B LD MD","33":"I BD CD DD ED FD CC GD HD ID JD"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC","33":"9C AD"}},B:6,C:"::file-selector-button CSS pseudo-element",D:undefined}; +module.exports={A:{D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D","33":"C K L H M N O P Q R S T U V W X"},C:{"1":"0 1 2 3 4 5 6 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R SC TC"},M:{"1":"D"},A:{"2":"J E F G PC","33":"A B"},F:{"1":"vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB"},K:{"1":"s","2":"A B C zB NC 0B"},E:{"1":"H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC","2":"dC","33":"7 I J E F G A B C K L UC BC VC WC XC YC CC zB 0B DC"},G:{"1":"1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","33":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C"},P:{"1":"o p q r LD 2B 3B MD ND","33":"I CD DD ED FD GD CC HD ID JD KD"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC","33":"AD BD"}},B:6,C:"::file-selector-button CSS pseudo-element",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-filter-function.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-filter-function.js index a8cda86beef69a..49696330e0f3d7 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-filter-function.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-filter-function.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC","33":"G"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC","33":"nC oC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS filter() function",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC","33":"G"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC","33":"oC pC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS filter() function",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-filters.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-filters.js index 0dc5a73cea1095..6028363e783835 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-filters.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-filters.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","1028":"K L H M N O","1346":"C"},C:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC","196":"JB","516":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB SC"},D:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N","33":"8 9 O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","33":"J E F G VC WC"},F:{"1":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","33":"F kC lC mC nC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC","33":"9C AD"},J:{"2":"E","33":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","33":"I BD CD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"CSS Filter Effects",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","1028":"K L H M N O","1346":"C"},C:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC","196":"JB","516":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB TC"},D:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N","33":"8 9 O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","33":"J E F G WC XC"},F:{"1":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","33":"F lC mC nC oC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC","33":"AD BD"},J:{"2":"E","33":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","33":"I CD DD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"CSS Filter Effects",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-first-letter.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-first-letter.js index c3e28c28ffe862..2d3aa5ae186546 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-first-letter.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-first-letter.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","16":"PC","516":"F","1540":"J E"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","132":"4B","260":"QC"},D:{"1":"0 1 2 3 4 5 6 8 9 G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 J E F","132":"I"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 TC","132":"I BC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","16":"G dC","260":"B eC fC gC zB NC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC"},H:{"1":"4C"},I:{"1":"4B I D 8C OC 9C AD","16":"5C 6C","132":"7C"},J:{"1":"E A"},K:{"1":"C r 0B","260":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"::first-letter CSS pseudo-element selector",D:true}; +module.exports={A:{A:{"1":"G A B","16":"PC","516":"F","1540":"J E"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","132":"4B","260":"QC"},D:{"1":"0 1 2 3 4 5 6 8 9 G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 J E F","132":"I"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 UC","132":"I BC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","16":"G eC","260":"B fC gC hC zB NC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC"},H:{"1":"5C"},I:{"1":"4B I D 9C OC AD BD","16":"6C 7C","132":"8C"},J:{"1":"E A"},K:{"1":"C s 0B","260":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"::first-letter CSS pseudo-element selector",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-first-line.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-first-line.js index fe73252e220096..b3c95fbf67bd2d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-first-line.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-first-line.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","132":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS first-line pseudo-element",D:true}; +module.exports={A:{A:{"1":"G A B","132":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS first-line pseudo-element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-fixed.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-fixed.js index 6efb755e25e848..f9d48f4fc5a54c 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-fixed.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-fixed.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"E F G A B","2":"PC","8":"J"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","1025":"XC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC","132":"jC kC lC"},H:{"2":"4C"},I:{"1":"4B D 9C AD","260":"5C 6C 7C","513":"I 8C OC"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS position:fixed",D:true}; +module.exports={A:{A:{"1":"E F G A B","2":"PC","8":"J"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","1025":"YC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC","132":"kC lC mC"},H:{"2":"5C"},I:{"1":"4B D AD BD","260":"6C 7C 8C","513":"I 9C OC"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS position:fixed",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-focus-visible.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-focus-visible.js index 2c6e563fc491de..8f584a089b32ee 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-focus-visible.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-focus-visible.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O","328":"P Q R S T U"},C:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","161":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T"},D:{"1":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB","328":"oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L TC BC UC VC WC XC CC zB 0B DC YC","578":"H ZC EC"},F:{"1":"tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB dC eC fC gC zB NC hC 0B","328":"nB oB pB qB rB sB"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C","578":"1C EC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID"},Q:{"2":"DC"},R:{"1":"ND"},S:{"161":"OD PD"}},B:5,C:":focus-visible CSS pseudo-class",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O","328":"P Q R S T U"},C:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","161":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T"},D:{"1":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB","328":"oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L UC BC VC WC XC YC CC zB 0B DC ZC","578":"H aC EC"},F:{"1":"tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB eC fC gC hC zB NC iC 0B","328":"nB oB pB qB rB sB"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C","578":"2C EC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"161":"PD QD"}},B:5,C:":focus-visible CSS pseudo-class",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-focus-within.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-focus-within.js index 1ef8044ac2a303..368ba71616a022 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-focus-within.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-focus-within.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB RC SC"},D:{"1":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB","194":"5B"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB dC eC fC gC zB NC hC 0B","194":"VB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:7,C:":focus-within CSS pseudo-class",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB SC TC"},D:{"1":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB","194":"5B"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB eC fC gC hC zB NC iC 0B","194":"VB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:7,C:":focus-within CSS pseudo-class",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-palette.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-palette.js index 864ee98c09add3..18330f70854ad4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-palette.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-palette.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s"},C:{"1":"0 1 2 3 4 5 6 v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u RC SC"},D:{"1":"0 1 2 3 4 5 6 k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC"},F:{"1":"W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V dC eC fC gC zB NC hC 0B"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q MD","2":"I BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS font-palette",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n"},C:{"1":"0 1 2 3 4 5 6 v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u SC TC"},D:{"1":"0 1 2 3 4 5 6 k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC"},F:{"1":"W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V eC fC gC hC zB NC iC 0B"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r ND","2":"I CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS font-palette",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js index cce601d1b75b02..8e68b143e9c18f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-rendering-controls.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB RC SC","194":"VB WB XB YB ZB aB bB cB dB eB fB gB"},D:{"1":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB","66":"YB ZB aB bB cB dB eB fB gB hB 5B"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC"},F:{"1":"WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB dC eC fC gC zB NC hC 0B","66":"LB MB NB OB PB QB RB SB TB UB VB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I","66":"BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","194":"OD"}},B:5,C:"CSS font-display",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB SC TC","194":"VB WB XB YB ZB aB bB cB dB eB fB gB"},D:{"1":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB","66":"YB ZB aB bB cB dB eB fB gB hB 5B"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC"},F:{"1":"WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB eC fC gC hC zB NC iC 0B","66":"LB MB NB OB PB QB RB SB TB UB VB"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I","66":"CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","194":"PD"}},B:5,C:"CSS font-display",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-stretch.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-stretch.js index 2a9b51177683d0..7f91511b0c328b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-stretch.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-font-stretch.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F RC SC"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB dC eC fC gC zB NC hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS font-stretch",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F SC TC"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB eC fC gC hC zB NC iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS font-stretch",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-gencontent.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-gencontent.js index 5288c9da5914ed..c8b55e95c463cc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-gencontent.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-gencontent.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E PC","132":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS Generated content for pseudo-elements",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E PC","132":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS Generated content for pseudo-elements",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-gradients.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-gradients.js index ea70bbe51c8141..b453311aee2e77 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-gradients.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-gradients.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC","260":"8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB","292":"7 I J E F G A B C K L H SC"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"8 9 A B C K L H M N O n o p q AB","548":"7 I J E F G"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC","260":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC","292":"J UC","804":"7 I"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B dC eC fC gC","33":"C hC","164":"zB NC"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","260":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC","292":"jC kC","804":"BC iC OC"},H:{"2":"4C"},I:{"1":"D 9C AD","33":"I 8C OC","548":"4B 5C 6C 7C"},J:{"1":"A","548":"E"},K:{"1":"r 0B","2":"A B","33":"C","164":"zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS Gradients",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC","260":"8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB","292":"7 I J E F G A B C K L H TC"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"8 9 A B C K L H M N O o p q r AB","548":"7 I J E F G"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC","260":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC","292":"J VC","804":"7 I"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B eC fC gC hC","33":"C iC","164":"zB NC"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","260":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC","292":"kC lC","804":"BC jC OC"},H:{"2":"5C"},I:{"1":"D AD BD","33":"I 9C OC","548":"4B 6C 7C 8C"},J:{"1":"A","548":"E"},K:{"1":"s 0B","2":"A B","33":"C","164":"zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS Gradients",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-grid-animation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-grid-animation.js index 25580fa3da1790..0d24cab2342499 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-grid-animation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-grid-animation.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"1":"PD","2":"OD"}},B:4,C:"CSS Grid animation",D:false}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"1":"QD","2":"PD"}},B:4,C:"CSS Grid animation",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-grid.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-grid.js index d75a0bcb037dc0..8f8c8511d90df7 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-grid.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-grid.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","8":"G","292":"A B"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","292":"C K L H"},C:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M N O RC SC","8":"8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB","584":"PB QB RB SB TB UB VB WB XB YB ZB aB","1025":"bB cB"},D:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q","8":"AB BB CB DB","200":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB","1025":"gB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","8":"J E F G A VC WC XC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB dC eC fC gC zB NC hC 0B","200":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","8":"F kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C","8":"OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"292":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"BD","8":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS Grid Layout (level 1)",D:true}; +module.exports={A:{A:{"2":"J E F PC","8":"G","292":"A B"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","292":"C K L H"},C:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M N O SC TC","8":"8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB","584":"PB QB RB SB TB UB VB WB XB YB ZB aB","1025":"bB cB"},D:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r","8":"AB BB CB DB","200":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB","1025":"gB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","8":"J E F G A WC XC YC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB eC fC gC hC zB NC iC 0B","200":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","8":"F lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C","8":"OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"292":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"CD","8":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS Grid Layout (level 1)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js index 91d106f5141138..36cf2ab8a16dd0 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-hanging-punctuation.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:4,C:"CSS hanging-punctuation",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:4,C:"CSS hanging-punctuation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-has.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-has.js index f633d6458f159a..f715862ab6e0b8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-has.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-has.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s"},C:{"1":"9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l RC SC","322":"0 1 2 3 4 5 6 m s t u v w x y z D 8B"},D:{"1":"0 1 2 3 4 5 6 t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j","194":"k l m s"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC"},F:{"1":"a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z dC eC fC gC zB NC hC 0B"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q","2":"I BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:":has() CSS relational pseudo-class",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n"},C:{"1":"9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l SC TC","322":"0 1 2 3 4 5 6 m n t u v w x y z D 8B"},D:{"1":"0 1 2 3 4 5 6 t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j","194":"k l m n"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC"},F:{"1":"a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z eC fC gC hC zB NC iC 0B"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r","2":"I CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:":has() CSS relational pseudo-class",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-hyphens.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-hyphens.js index e60aef764cd016..0ebb0f77ca7a7d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-hyphens.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-hyphens.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","33":"A B"},B:{"1":"0 1 2 3 4 5 6 t u v w x y z D","33":"C K L H M N O","132":"P Q R S T U V W","260":"X Y Z a b c d e f g h i j k l m s"},C:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC","33":"8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},D:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB","132":"eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W"},E:{"1":"3B LC MC cC","2":"7 I TC BC","33":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC"},F:{"1":"a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB dC eC fC gC zB NC hC 0B","132":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z"},G:{"1":"3B LC MC","2":"BC iC","33":"F OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I","132":"BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS Hyphenation",D:true}; +module.exports={A:{A:{"2":"J E F G PC","33":"A B"},B:{"1":"0 1 2 3 4 5 6 t u v w x y z D","33":"C K L H M N O","132":"P Q R S T U V W","260":"X Y Z a b c d e f g h i j k l m n"},C:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC","33":"8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},D:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB","132":"eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W"},E:{"1":"3B LC MC dC","2":"7 I UC BC","33":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC"},F:{"1":"a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB eC fC gC hC zB NC iC 0B","132":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z"},G:{"1":"3B LC MC","2":"BC jC","33":"F OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I","132":"CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS Hyphenation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-image-orientation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-image-orientation.js index f18278ff5f67a3..00f6b22330a3c4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-image-orientation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-image-orientation.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O P Q","257":"R S T U V W X"},C:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB RC SC"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q","257":"R S T U V W X"},E:{"1":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K TC BC UC VC WC XC CC zB 0B"},F:{"1":"xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB dC eC fC gC zB NC hC 0B","257":"pB qB rB sB tB r uB vB wB"},G:{"1":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","132":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD","257":"ID JD"},Q:{"2":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS3 image-orientation",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O P Q","257":"R S T U V W X"},C:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB SC TC"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q","257":"R S T U V W X"},E:{"1":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K UC BC VC WC XC YC CC zB 0B"},F:{"1":"xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB eC fC gC hC zB NC iC 0B","257":"pB qB rB sB tB s uB vB wB"},G:{"1":"0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","132":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID","257":"JD KD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS3 image-orientation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-image-set.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-image-set.js index 6a3569439a71d2..cd02951cd73b57 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-image-set.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-image-set.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"2 3 4 5 6 D","2":"C K L H M N O","164":"0 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","2049":"1"},C:{"1":"1 2 3 4 5 6 D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U RC SC","66":"V W","2305":"0 Y Z a b c d e f g h i j k l m s t u v w x y z","2820":"X"},D:{"1":"2 3 4 5 6 D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n","164":"0 9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","2049":"1"},E:{"1":"3B LC MC cC","2":"7 I TC BC UC","132":"A B C K CC zB 0B DC","164":"J E F G VC WC XC","1540":"L H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC"},F:{"1":"j k l m","2":"G B C dC eC fC gC zB NC hC 0B","164":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h","2049":"i"},G:{"1":"3B LC MC","2":"BC iC OC jC","132":"pC qC rC sC tC uC vC wC xC yC","164":"F kC lC mC nC oC","1540":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC","164":"9C AD"},J:{"2":"E","164":"A"},K:{"2":"A B C zB NC 0B","164":"r"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"164":"1B"},P:{"164":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"164":"DC"},R:{"164":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS image-set",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"2 3 4 5 6 D","2":"C K L H M N O","164":"0 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","2049":"1"},C:{"1":"1 2 3 4 5 6 D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U SC TC","66":"V W","2305":"0 Y Z a b c d e f g h i j k l m n t u v w x y z","2820":"X"},D:{"1":"2 3 4 5 6 D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o","164":"0 9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","2049":"1"},E:{"1":"3B LC MC dC","2":"7 I UC BC VC","132":"A B C K CC zB 0B DC","164":"J E F G WC XC YC","1540":"L H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC"},F:{"1":"j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","164":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h","2049":"i"},G:{"1":"3B LC MC","2":"BC jC OC kC","132":"qC rC sC tC uC vC wC xC yC zC","164":"F lC mC nC oC pC","1540":"0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC","164":"AD BD"},J:{"2":"E","164":"A"},K:{"2":"A B C zB NC 0B","164":"s"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"164":"1B"},P:{"164":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"164":"DC"},R:{"164":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS image-set",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-in-out-of-range.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-in-out-of-range.js index b00c47afaaec71..efb3f26328957f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-in-out-of-range.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-in-out-of-range.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C","260":"K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC","516":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},D:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"I","16":"7 J E F G A B C K L","260":"bB","772":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","16":"7","772":"J E F G A UC VC WC XC"},F:{"1":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G dC","260":"B C OB eC fC gC zB NC hC 0B","772":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC","772":"F jC kC lC mC nC oC pC"},H:{"132":"4C"},I:{"1":"D","2":"4B 5C 6C 7C","260":"I 8C OC 9C AD"},J:{"2":"E","260":"A"},K:{"1":"r","260":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","260":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","516":"OD"}},B:5,C:":in-range and :out-of-range CSS pseudo-classes",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C","260":"K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC","516":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},D:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"I","16":"7 J E F G A B C K L","260":"bB","772":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","16":"7","772":"J E F G A VC WC XC YC"},F:{"1":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G eC","260":"B C OB fC gC hC zB NC iC 0B","772":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC","772":"F kC lC mC nC oC pC qC"},H:{"132":"5C"},I:{"1":"D","2":"4B 6C 7C 8C","260":"I 9C OC AD BD"},J:{"2":"E","260":"A"},K:{"1":"s","260":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","260":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","516":"PD"}},B:5,C:":in-range and :out-of-range CSS pseudo-classes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js index b5c05f4d20354e..71e9bde180c59a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-indeterminate-pseudo.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","132":"A B","388":"G"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","132":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"QC 4B RC SC","132":"8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","388":"7 I"},D:{"1":"0 1 2 3 4 5 6 OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","132":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I J TC BC","132":"E F G A VC WC XC","388":"UC"},F:{"1":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G B dC eC fC gC zB NC","132":"8 9 H M N O n o p q AB","516":"C hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC jC kC","132":"F lC mC nC oC pC"},H:{"516":"4C"},I:{"1":"D","16":"4B 5C 6C 7C AD","132":"9C","388":"I 8C OC"},J:{"16":"E","132":"A"},K:{"1":"r","16":"A B C zB NC","516":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","132":"OD"}},B:5,C:":indeterminate CSS pseudo-class",D:true}; +module.exports={A:{A:{"2":"J E F PC","132":"A B","388":"G"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","132":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","16":"QC 4B SC TC","132":"8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","388":"7 I"},D:{"1":"0 1 2 3 4 5 6 OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","132":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I J UC BC","132":"E F G A WC XC YC","388":"VC"},F:{"1":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G B eC fC gC hC zB NC","132":"8 9 H M N O o p q r AB","516":"C iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC kC lC","132":"F mC nC oC pC qC"},H:{"516":"5C"},I:{"1":"D","16":"4B 6C 7C 8C BD","132":"AD","388":"I 9C OC"},J:{"16":"E","132":"A"},K:{"1":"s","16":"A B C zB NC","516":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","132":"PD"}},B:5,C:":indeterminate CSS pseudo-class",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-initial-letter.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-initial-letter.js index 2bf90692492f3b..e54a85cd009977 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-initial-letter.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-initial-letter.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x","260":"0 1 2 3 4 5 6 y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x","260":"0 1 2 3 4 5 6 y z D 8B 9B AC"},E:{"2":"7 I J E F TC BC UC VC WC","4":"G","164":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g dC eC fC gC zB NC hC 0B","260":"h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC","164":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"260":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q","2":"I n BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS Initial Letter",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x","260":"0 1 2 3 4 5 6 y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x","260":"0 1 2 3 4 5 6 y z D 8B 9B AC"},E:{"2":"7 I J E F UC BC VC WC XC","4":"G","164":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g eC fC gC hC zB NC iC 0B","260":"h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC","164":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"260":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"p q r","2":"I o CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS Initial Letter",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-initial-value.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-initial-value.js index f4709ef35f7bc7..13a284901634e0 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-initial-value.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-initial-value.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 I J E F G A B C K L H M N O RC SC","164":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS initial value",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","33":"7 I J E F G A B C K L H M N O SC TC","164":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS initial value",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-lch-lab.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-lch-lab.js index 9f17430e1f46f0..668c0347e5d48f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-lch-lab.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-lch-lab.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x","322":"y"},C:{"1":"1 2 3 4 5 6 D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y RC SC","194":"0 z"},D:{"1":"0 1 2 3 4 5 6 z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x","322":"y"},E:{"1":"H ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L TC BC UC VC WC XC CC zB 0B DC YC"},F:{"1":"h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g dC eC fC gC zB NC hC 0B"},G:{"1":"1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"p q","2":"I n o BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:4,C:"LCH and Lab color values",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x","322":"y"},C:{"1":"1 2 3 4 5 6 D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y SC TC","194":"0 z"},D:{"1":"0 1 2 3 4 5 6 z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x","322":"y"},E:{"1":"H aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L UC BC VC WC XC YC CC zB 0B DC ZC"},F:{"1":"h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g eC fC gC hC zB NC iC 0B"},G:{"1":"2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"q r","2":"I o p CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:4,C:"LCH and Lab color values",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-letter-spacing.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-letter-spacing.js index 64dcdfa6161e01..13d466068ffb9c 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-letter-spacing.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-letter-spacing.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","16":"PC","132":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC","132":"7 I J BC UC"},F:{"1":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G dC","132":"B C H M eC fC gC zB NC hC 0B"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"2":"4C"},I:{"1":"D 9C AD","16":"5C 6C","132":"4B I 7C 8C OC"},J:{"132":"E A"},K:{"1":"r","132":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"letter-spacing CSS property",D:true}; +module.exports={A:{A:{"1":"G A B","16":"PC","132":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","132":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC","132":"7 I J BC VC"},F:{"1":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G eC","132":"B C H M fC gC hC zB NC iC 0B"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"2":"5C"},I:{"1":"D AD BD","16":"6C 7C","132":"4B I 8C 9C OC"},J:{"132":"E A"},K:{"1":"s","132":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"letter-spacing CSS property",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-line-clamp.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-line-clamp.js index f2278dcee64c6c..63149c6649a764 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-line-clamp.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-line-clamp.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","129":"N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB RC SC","33":"0 1 2 3 4 5 6 pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"16":"7 I J E F G A B C K","33":"0 1 2 3 4 5 6 8 9 L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"I TC BC","33":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"BC iC OC","33":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"16":"5C 6C","33":"4B I D 7C 8C OC 9C AD"},J:{"33":"E A"},K:{"2":"A B C zB NC 0B","33":"r"},L:{"33":"D"},M:{"33":"D"},N:{"2":"A B"},O:{"33":"1B"},P:{"33":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"33":"DC"},R:{"33":"ND"},S:{"2":"OD","33":"PD"}},B:5,C:"CSS line-clamp",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","129":"N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB SC TC","33":"0 1 2 3 4 5 6 pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"16":"7 I J E F G A B C K","33":"0 1 2 3 4 5 6 8 9 L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"I UC BC","33":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"BC jC OC","33":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"16":"6C 7C","33":"4B I D 8C 9C OC AD BD"},J:{"33":"E A"},K:{"2":"A B C zB NC 0B","33":"s"},L:{"33":"D"},M:{"33":"D"},N:{"2":"A B"},O:{"33":"1B"},P:{"33":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"33":"DC"},R:{"33":"OD"},S:{"2":"PD","33":"QD"}},B:5,C:"CSS line-clamp",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-logical-props.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-logical-props.js index 1d6198a05e38bd..019bef50d17f9f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-logical-props.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-logical-props.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O","1028":"W X","1540":"P Q R S T U V"},C:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC","164":"7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB RC SC","1540":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","292":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB","1028":"W X","1540":"qB rB sB tB r uB vB wB xB yB P Q R S T U V"},E:{"1":"H ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","292":"7 I J E F G A B C TC BC UC VC WC XC CC zB","1540":"K L 0B DC","3076":"YC"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","292":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB","1028":"uB vB","1540":"fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r"},G:{"1":"1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","292":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC","1540":"uC vC wC xC yC zC","3076":"0C"},H:{"2":"4C"},I:{"1":"D","292":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"292":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q KD 2B 3B LD MD","292":"I BD CD DD ED FD","1540":"CC GD HD ID JD"},Q:{"1540":"DC"},R:{"1":"ND"},S:{"1":"PD","1540":"OD"}},B:5,C:"CSS Logical Properties",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O","1028":"W X","1540":"P Q R S T U V"},C:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC","164":"7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB SC TC","1540":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","292":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB","1028":"W X","1540":"qB rB sB tB s uB vB wB xB yB P Q R S T U V"},E:{"1":"H aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","292":"7 I J E F G A B C UC BC VC WC XC YC CC zB","1540":"K L 0B DC","3076":"ZC"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","292":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB","1028":"uB vB","1540":"fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s"},G:{"1":"2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","292":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC","1540":"vC wC xC yC zC 0C","3076":"1C"},H:{"2":"5C"},I:{"1":"D","292":"4B I 6C 7C 8C 9C OC AD BD"},J:{"292":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r LD 2B 3B MD ND","292":"I CD DD ED FD GD","1540":"CC HD ID JD KD"},Q:{"1540":"DC"},R:{"1":"OD"},S:{"1":"QD","1540":"PD"}},B:5,C:"CSS Logical Properties",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-marker-pseudo.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-marker-pseudo.js index 746f80398cc469..df69fd21890814 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-marker-pseudo.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-marker-pseudo.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O P Q R S T U"},C:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB RC SC"},D:{"1":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U"},E:{"1":"cC","2":"7 I J E F G A B TC BC UC VC WC XC CC","129":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC"},F:{"1":"tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB dC eC fC gC zB NC hC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID"},Q:{"2":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"CSS ::marker pseudo-element",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O P Q R S T U"},C:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB SC TC"},D:{"1":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U"},E:{"1":"dC","2":"7 I J E F G A B UC BC VC WC XC YC CC","129":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC"},F:{"1":"tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB eC fC gC hC zB NC iC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"CSS ::marker pseudo-element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-masks.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-masks.js index 1f4f813feeed37..c86ee556f1c9dc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-masks.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-masks.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M","164":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","3138":"N","12292":"O"},C:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","260":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB RC SC"},D:{"1":"8B 9B AC","164":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC","164":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","164":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","164":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},H:{"2":"4C"},I:{"164":"D 9C AD","676":"4B I 5C 6C 7C 8C OC"},J:{"164":"E A"},K:{"2":"A B C zB NC 0B","164":"r"},L:{"164":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"164":"1B"},P:{"164":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"164":"DC"},R:{"164":"ND"},S:{"1":"PD","260":"OD"}},B:4,C:"CSS Masks",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M","164":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","3138":"N","12292":"O"},C:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","260":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB SC TC"},D:{"1":"8B 9B AC","164":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC","164":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","164":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","164":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},H:{"2":"5C"},I:{"164":"D AD BD","676":"4B I 6C 7C 8C 9C OC"},J:{"164":"E A"},K:{"2":"A B C zB NC 0B","164":"s"},L:{"164":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"164":"1B"},P:{"164":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"164":"DC"},R:{"164":"OD"},S:{"1":"QD","260":"PD"}},B:4,C:"CSS Masks",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-matches-pseudo.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-matches-pseudo.js index 7e0567c42017db..20a00e86d6244b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-matches-pseudo.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-matches-pseudo.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O","1220":"P Q R S T U V W"},C:{"1":"0 1 2 3 4 5 6 yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"QC 4B RC SC","548":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB"},D:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","164":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB","196":"mB nB oB","1220":"pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W"},E:{"1":"L H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","16":"7","164":"J E F UC VC WC","260":"G A B C K XC CC zB 0B DC"},F:{"1":"vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","164":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","196":"bB cB dB","1220":"eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB"},G:{"1":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC jC kC","164":"F lC mC","260":"nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"2":"4C"},I:{"1":"D","16":"4B 5C 6C 7C","164":"I 8C OC 9C AD"},J:{"16":"E","164":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q KD 2B 3B LD MD","164":"I BD CD DD ED FD CC GD HD ID JD"},Q:{"1220":"DC"},R:{"1":"ND"},S:{"1":"PD","548":"OD"}},B:5,C:":is() CSS pseudo-class",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O","1220":"P Q R S T U V W"},C:{"1":"0 1 2 3 4 5 6 yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","16":"QC 4B SC TC","548":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB"},D:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","164":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB","196":"mB nB oB","1220":"pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W"},E:{"1":"L H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","16":"7","164":"J E F VC WC XC","260":"G A B C K YC CC zB 0B DC"},F:{"1":"vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","164":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","196":"bB cB dB","1220":"eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB"},G:{"1":"0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC kC lC","164":"F mC nC","260":"oC pC qC rC sC tC uC vC wC xC yC zC"},H:{"2":"5C"},I:{"1":"D","16":"4B 6C 7C 8C","164":"I 9C OC AD BD"},J:{"16":"E","164":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r LD 2B 3B MD ND","164":"I CD DD ED FD GD CC HD ID JD KD"},Q:{"1220":"DC"},R:{"1":"OD"},S:{"1":"QD","548":"PD"}},B:5,C:":is() CSS pseudo-class",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-math-functions.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-math-functions.js index 21686da5734dc6..962517f87a76e8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-math-functions.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-math-functions.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB RC SC"},D:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB"},E:{"1":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC","132":"C K zB 0B"},F:{"1":"nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB dC eC fC gC zB NC hC 0B"},G:{"1":"yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC","132":"sC tC uC vC wC xC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD"},Q:{"2":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"CSS math functions min(), max() and clamp()",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB SC TC"},D:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB"},E:{"1":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC","132":"C K zB 0B"},F:{"1":"nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB eC fC gC hC zB NC iC 0B"},G:{"1":"zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC","132":"tC uC vC wC xC yC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"CSS math functions min(), max() and clamp()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-interaction.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-interaction.js index 2b432f264bf909..18bfd713958502 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-interaction.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-interaction.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB RC SC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB dC eC fC gC zB NC hC 0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:4,C:"Media Queries: interaction media features",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB SC TC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB eC fC gC hC zB NC iC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:4,C:"Media Queries: interaction media features",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-range-syntax.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-range-syntax.js index eeebe0963f2ea3..66dd33d83152a8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-range-syntax.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-range-syntax.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 s t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB RC SC"},D:{"1":"0 1 2 3 4 5 6 s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m"},E:{"1":"JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC"},F:{"1":"a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z dC eC fC gC zB NC hC 0B"},G:{"1":"JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q","2":"I BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"1":"PD","2":"OD"}},B:4,C:"Media Queries: Range Syntax",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 n t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB SC TC"},D:{"1":"0 1 2 3 4 5 6 n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m"},E:{"1":"JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC"},F:{"1":"a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z eC fC gC hC zB NC iC 0B"},G:{"1":"JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r","2":"I CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"1":"QD","2":"PD"}},B:4,C:"Media Queries: Range Syntax",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-resolution.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-resolution.js index 3fd493b0c395bd..c8e04215c9fc63 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-resolution.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-resolution.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","132":"G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","1028":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","260":"7 I J E F G A B C K L H RC SC","1028":"8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B"},D:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","548":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB","1028":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC","548":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC"},F:{"1":"eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G","548":"B C dC eC fC gC zB NC hC","1028":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","16":"BC","548":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"132":"4C"},I:{"1":"D","16":"5C 6C","548":"4B I 7C 8C OC","1028":"9C AD"},J:{"548":"E A"},K:{"1":"r 0B","548":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"n o p q CC GD HD ID JD KD 2B 3B LD MD","1028":"I BD CD DD ED FD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"Media Queries: resolution feature",D:true}; +module.exports={A:{A:{"2":"J E F PC","132":"G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","1028":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","260":"7 I J E F G A B C K L H SC TC","1028":"8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B"},D:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","548":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB","1028":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC","548":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC"},F:{"1":"eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G","548":"B C eC fC gC hC zB NC iC","1028":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","16":"BC","548":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"132":"5C"},I:{"1":"D","16":"6C 7C","548":"4B I 8C 9C OC","1028":"AD BD"},J:{"548":"E A"},K:{"1":"s 0B","548":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"o p q r CC HD ID JD KD LD 2B 3B MD ND","1028":"I CD DD ED FD GD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"Media Queries: resolution feature",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-scripting.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-scripting.js index 79a96e69ab6ed4..d6784ece498232 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-scripting.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-media-scripting.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"Media Queries: scripting media feature",D:false}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"Media Queries: scripting media feature",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-mediaqueries.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-mediaqueries.js index 1caf50df4c7733..bda01685d7d1b8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-mediaqueries.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-mediaqueries.js @@ -1 +1 @@ -module.exports={A:{A:{"8":"J E F PC","129":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","129":"7 8 9 I J E F G A B C K L H M N O n o p q AB"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","129":"7 I J UC","388":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","129":"BC iC OC jC kC"},H:{"1":"4C"},I:{"1":"D 9C AD","129":"4B I 5C 6C 7C 8C OC"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"129":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS3 Media Queries",D:true}; +module.exports={A:{A:{"8":"J E F PC","129":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","129":"7 8 9 I J E F G A B C K L H M N O o p q r AB"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","129":"7 I J VC","388":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","129":"BC jC OC kC lC"},H:{"1":"5C"},I:{"1":"D AD BD","129":"4B I 6C 7C 8C 9C OC"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"129":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS3 Media Queries",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-mixblendmode.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-mixblendmode.js index 094c5109cce001..a2519a9acb7fa6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-mixblendmode.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-mixblendmode.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB RC SC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB","194":"EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"2":"7 I J E TC BC UC VC","260":"F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB dC eC fC gC zB NC hC 0B"},G:{"2":"BC iC OC jC kC lC","260":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"Blending of HTML/SVG elements",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB SC TC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB","194":"EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"2":"7 I J E UC BC VC WC","260":"F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB eC fC gC hC zB NC iC 0B"},G:{"2":"BC jC OC kC lC mC","260":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"Blending of HTML/SVG elements",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-motion-paths.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-motion-paths.js index b475e453b0f1d5..422d025dc90097 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-motion-paths.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-motion-paths.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB RC SC"},D:{"1":"0 1 2 3 4 5 6 VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","194":"SB TB UB"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC"},F:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB dC eC fC gC zB NC hC 0B","194":"FB GB HB"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"CSS Motion Path",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB SC TC"},D:{"1":"0 1 2 3 4 5 6 VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","194":"SB TB UB"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC"},F:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB eC fC gC hC zB NC iC 0B","194":"FB GB HB"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"CSS Motion Path",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-namespaces.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-namespaces.js index e6ac77460c0de0..6968d457c88c51 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-namespaces.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-namespaces.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC BC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS namespaces",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC BC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS namespaces",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-nesting.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-nesting.js index e3a8046f06f2f1..ce1e58103dcbfa 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-nesting.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-nesting.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w","194":"x y z","516":"0 1 2 3 4 5 6 D"},C:{"1":"5 6 D 8B 9B AC","2":"0 1 2 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z RC SC","322":"3 4"},D:{"1":"8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w","194":"x y z","516":"0 1 2 3 4 5 6 D"},E:{"1":"MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC","516":"KC bC 3B LC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d dC eC fC gC zB NC hC 0B","194":"e f g","516":"h i j k l m"},G:{"1":"MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC","516":"KC 3C 3B LC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","516":"D"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"516":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS Nesting",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w","194":"x y z","516":"0 1 2 3 4 5 6 D"},C:{"1":"5 6 D 8B 9B AC RC","2":"0 1 2 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z SC TC","322":"3 4"},D:{"1":"8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w","194":"x y z","516":"0 1 2 3 4 5 6 D"},E:{"1":"MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC","516":"KC cC 3B LC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d eC fC gC hC zB NC iC 0B","194":"e f g","516":"h i j k l m n"},G:{"1":"MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC","516":"KC 4C 3B LC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","516":"D"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"516":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS Nesting",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-not-sel-list.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-not-sel-list.js index 1bfd4dcc57f7ae..e362681e5b740b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-not-sel-list.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-not-sel-list.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O Q R S T U V W","16":"P"},C:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S RC SC"},D:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB dC eC fC gC zB NC hC 0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID JD"},Q:{"2":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"selector list argument of :not()",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O Q R S T U V W","16":"P"},C:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S SC TC"},D:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB eC fC gC hC zB NC iC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD KD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"selector list argument of :not()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-nth-child-of.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-nth-child-of.js index 28be7e70c28621..e23d0592bcbf0c 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-nth-child-of.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-nth-child-of.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y"},C:{"1":"1 2 3 4 5 6 D 8B 9B AC","2":"0 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z RC SC"},D:{"1":"0 1 2 3 4 5 6 z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g dC eC fC gC zB NC hC 0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"p q","2":"I n o BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"selector list argument of :nth-child and :nth-last-child CSS pseudo-classes",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y"},C:{"1":"1 2 3 4 5 6 D 8B 9B AC RC","2":"0 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z SC TC"},D:{"1":"0 1 2 3 4 5 6 z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g eC fC gC hC zB NC iC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"q r","2":"I o p CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"selector list argument of :nth-child and :nth-last-child CSS pseudo-classes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-opacity.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-opacity.js index 81148c4d3e8014..135f3608d369af 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-opacity.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-opacity.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","4":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS3 Opacity",D:true}; +module.exports={A:{A:{"1":"G A B","4":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS3 Opacity",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-optional-pseudo.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-optional-pseudo.js index 6d9ccdd6c00c2d..71551674ead0f4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-optional-pseudo.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-optional-pseudo.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G dC","132":"B C eC fC gC zB NC hC 0B"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"132":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"r","132":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:":optional CSS pseudo-class",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G eC","132":"B C fC gC hC zB NC iC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"132":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"s","132":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:":optional CSS pseudo-class",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow-anchor.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow-anchor.js index 6a7dd0215c9a12..9db1a06c126e31 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow-anchor.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow-anchor.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB RC SC"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"CSS overflow-anchor (Scroll Anchoring)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB SC TC"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"CSS overflow-anchor (Scroll Anchoring)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow-overlay.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow-overlay.js index 115f75079951a7..b8e04349a31101 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow-overlay.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow-overlay.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","2":"C K L H M N O","130":"2 3 4 5 6 D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","16":"7 I J E F G A B C K L","130":"2 3 4 5 6 D 8B 9B AC"},E:{"1":"7 I J E F G A B UC VC WC XC CC zB","16":"TC BC","130":"C K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i","2":"G B C dC eC fC gC zB NC hC 0B","130":"j k l m"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC","16":"BC","130":"tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I 5C 6C 7C 8C OC 9C AD","130":"D"},J:{"16":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"130":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"CSS overflow: overlay",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","2":"C K L H M N O","130":"2 3 4 5 6 D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","16":"7 I J E F G A B C K L","130":"2 3 4 5 6 D 8B 9B AC"},E:{"1":"7 I J E F G A B VC WC XC YC CC zB","16":"UC BC","130":"C K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i","2":"G B C eC fC gC hC zB NC iC 0B","130":"j k l m n"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC","16":"BC","130":"uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I 6C 7C 8C 9C OC AD BD","130":"D"},J:{"16":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"130":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"CSS overflow: overlay",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow.js index 4c2c5135040a2e..6f41eec8716edf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overflow.js @@ -1 +1 @@ -module.exports={A:{A:{"388":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m s t u v w x y z D","260":"P Q R S T U V W X Y","388":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","260":"6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q","388":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB RC SC"},D:{"1":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","260":"pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y","388":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","260":"L H DC YC ZC EC FC 1B aC","388":"7 I J E F G A B C K TC BC UC VC WC XC CC zB 0B"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","260":"eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB","388":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB dC eC fC gC zB NC hC 0B"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","260":"yC zC 0C 1C EC FC 1B 2C","388":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC"},H:{"388":"4C"},I:{"1":"D","388":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"388":"E A"},K:{"1":"r","388":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"388":"A B"},O:{"388":"1B"},P:{"1":"n o p q KD 2B 3B LD MD","388":"I BD CD DD ED FD CC GD HD ID JD"},Q:{"388":"DC"},R:{"1":"ND"},S:{"1":"PD","388":"OD"}},B:5,C:"CSS overflow property",D:true}; +module.exports={A:{A:{"388":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m n t u v w x y z D","260":"P Q R S T U V W X Y","388":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","260":"6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q","388":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB SC TC"},D:{"1":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","260":"pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y","388":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","260":"L H DC ZC aC EC FC 1B bC","388":"7 I J E F G A B C K UC BC VC WC XC YC CC zB 0B"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","260":"eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB","388":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eC fC gC hC zB NC iC 0B"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","260":"zC 0C 1C 2C EC FC 1B 3C","388":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"388":"5C"},I:{"1":"D","388":"4B I 6C 7C 8C 9C OC AD BD"},J:{"388":"E A"},K:{"1":"s","388":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"388":"A B"},O:{"388":"1B"},P:{"1":"o p q r LD 2B 3B MD ND","388":"I CD DD ED FD GD CC HD ID JD KD"},Q:{"388":"DC"},R:{"1":"OD"},S:{"1":"QD","388":"PD"}},B:5,C:"CSS overflow property",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js index 5a200d3ad63968..b8eaf9b464e2e9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-overscroll-behavior.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","132":"C K L H M N","516":"O"},C:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB RC SC"},D:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB","260":"kB lB"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L TC BC UC VC WC XC CC zB 0B DC","1090":"H YC ZC EC FC 1B aC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB dC eC fC gC zB NC hC 0B","260":"ZB aB"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC","1090":"0C 1C EC FC 1B 2C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"CSS overscroll-behavior",D:true}; +module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","132":"C K L H M N","516":"O"},C:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB SC TC"},D:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB","260":"kB lB"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L UC BC VC WC XC YC CC zB 0B DC","1090":"H ZC aC EC FC 1B bC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB eC fC gC hC zB NC iC 0B","260":"ZB aB"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C","1090":"1C 2C EC FC 1B 3C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"CSS overscroll-behavior",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-page-break.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-page-break.js index f26a8d64d6f8e8..a9df4c0d367c21 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-page-break.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-page-break.js @@ -1 +1 @@ -module.exports={A:{A:{"388":"A B","900":"J E F G PC"},B:{"388":"C K L H M N O","900":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"772":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","900":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB RC SC"},D:{"900":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"772":"A","900":"7 I J E F G B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"16":"G dC","129":"B C eC fC gC zB NC hC 0B","900":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"900":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"129":"4C"},I:{"900":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"900":"E A"},K:{"129":"A B C zB NC 0B","900":"r"},L:{"900":"D"},M:{"772":"D"},N:{"388":"A B"},O:{"900":"1B"},P:{"900":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"900":"DC"},R:{"900":"ND"},S:{"772":"PD","900":"OD"}},B:2,C:"CSS page-break properties",D:true}; +module.exports={A:{A:{"388":"A B","900":"J E F G PC"},B:{"388":"C K L H M N O","900":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"772":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","900":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB SC TC"},D:{"900":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"772":"A","900":"7 I J E F G B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"16":"G eC","129":"B C fC gC hC zB NC iC 0B","900":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"900":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"129":"5C"},I:{"900":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"900":"E A"},K:{"129":"A B C zB NC 0B","900":"s"},L:{"900":"D"},M:{"772":"D"},N:{"388":"A B"},O:{"900":"1B"},P:{"900":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"900":"DC"},R:{"900":"OD"},S:{"772":"QD","900":"PD"}},B:2,C:"CSS page-break properties",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-paged-media.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-paged-media.js index d0cccebaef8895..f2dc9d05d380de 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-paged-media.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-paged-media.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E PC","132":"F G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","132":"C K L H M N O"},C:{"2":"7 QC 4B I J E F G A B C K L H M N O RC SC","132":"0 1 2 3 4 5 6 8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","132":"G B C dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"16":"4C"},I:{"16":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"16":"E A"},K:{"1":"r","16":"A B C zB NC 0B"},L:{"1":"D"},M:{"132":"D"},N:{"258":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"132":"OD PD"}},B:5,C:"CSS Paged Media (@page)",D:true}; +module.exports={A:{A:{"2":"J E PC","132":"F G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","132":"C K L H M N O"},C:{"2":"7 QC 4B I J E F G A B C K L H M N O SC TC","132":"0 1 2 3 4 5 6 8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","132":"G B C eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"16":"5C"},I:{"16":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"16":"E A"},K:{"1":"s","16":"A B C zB NC 0B"},L:{"1":"D"},M:{"132":"D"},N:{"258":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"132":"PD QD"}},B:5,C:"CSS Paged Media (@page)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-paint-api.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-paint-api.js index 2a164e251ff091..1262e9844ae2fc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-paint-api.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-paint-api.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB"},E:{"2":"7 I J E F G A B C TC BC UC VC WC XC CC zB","194":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:4,C:"CSS Painting API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB"},E:{"2":"7 I J E F G A B C UC BC VC WC XC YC CC zB","194":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:4,C:"CSS Painting API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-placeholder-shown.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-placeholder-shown.js index 1cf5be8e0c5602..e8bbc348a86fd9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-placeholder-shown.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-placeholder-shown.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","292":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","164":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB"},D:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB dC eC fC gC zB NC hC 0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","164":"OD"}},B:5,C:":placeholder-shown CSS pseudo-class",D:true}; +module.exports={A:{A:{"2":"J E F G PC","292":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","164":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB"},D:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB eC fC gC hC zB NC iC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","164":"PD"}},B:5,C:":placeholder-shown CSS pseudo-class",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-placeholder.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-placeholder.js index 693340f52dab83..02c16914abcad5 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-placeholder.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-placeholder.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","36":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","130":"7 QC 4B I J E F G A B C K L H M N O RC SC"},D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","36":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","36":"7 J E F G A UC VC WC XC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","36":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC","36":"F OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","36":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"36":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"36":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","36":"I BD CD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","33":"OD"}},B:5,C:"::placeholder CSS pseudo-element",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","36":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","33":"8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","130":"7 QC 4B I J E F G A B C K L H M N O SC TC"},D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","36":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","36":"7 J E F G A VC WC XC YC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","36":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC","36":"F OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","36":"4B I 6C 7C 8C 9C OC AD BD"},J:{"36":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"36":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","36":"I CD DD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","33":"PD"}},B:5,C:"::placeholder CSS pseudo-element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-print-color-adjust.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-print-color-adjust.js index 8f1a72b4f7bfaf..6e845e1196f3af 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-print-color-adjust.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-print-color-adjust.js @@ -1 +1 @@ -module.exports={A:{D:{"2":"7 I J E F G A B C K L H M","33":"0 1 2 3 4 5 6 8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},L:{"33":"D"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB RC SC","33":"XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},K:{"2":"A B C zB NC 0B","33":"r"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC","2":"7 I TC BC UC cC","33":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","33":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},P:{"33":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},I:{"2":"4B I 5C 6C 7C 8C OC","33":"D 9C AD"}},B:6,C:"print-color-adjust property",D:undefined}; +module.exports={A:{D:{"2":"7 I J E F G A B C K L H M","33":"0 1 2 3 4 5 6 8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},L:{"33":"D"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB SC TC","33":"XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},K:{"2":"A B C zB NC 0B","33":"s"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC","2":"7 I UC BC VC dC","33":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","33":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},P:{"33":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},I:{"2":"4B I 6C 7C 8C 9C OC","33":"D AD BD"}},B:6,C:"print-color-adjust property",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-read-only-write.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-read-only-write.js index 7c85bdf841c0e4..372243438d9582 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-read-only-write.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-read-only-write.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"QC","33":"7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB RC SC"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","132":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC BC","132":"7 I J E F UC VC WC"},F:{"1":"9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G B dC eC fC gC zB","132":"8 C H M N O n o p NC hC 0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC","132":"F OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","16":"5C 6C","132":"4B I 7C 8C OC 9C AD"},J:{"1":"A","132":"E"},K:{"1":"r","2":"A B zB","132":"C NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","33":"OD"}},B:1,C:"CSS :read-only and :read-write selectors",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","16":"QC","33":"7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB SC TC"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","132":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC BC","132":"7 I J E F VC WC XC"},F:{"1":"9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G B eC fC gC hC zB","132":"8 C H M N O o p q NC iC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC","132":"F OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","16":"6C 7C","132":"4B I 8C 9C OC AD BD"},J:{"1":"A","132":"E"},K:{"1":"s","2":"A B zB","132":"C NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","33":"PD"}},B:1,C:"CSS :read-only and :read-write selectors",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-rebeccapurple.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-rebeccapurple.js index b1fdefe66f993c..63e48f52953de8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-rebeccapurple.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-rebeccapurple.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB RC SC"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC","16":"VC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"Rebeccapurple color",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB SC TC"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC","16":"WC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"Rebeccapurple color",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-reflections.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-reflections.js index f2ba937fdc55e3..d26b02c38b145b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-reflections.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-reflections.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"33":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"TC BC","33":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"33":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"33":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"33":"E A"},K:{"2":"A B C zB NC 0B","33":"r"},L:{"33":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"33":"1B"},P:{"33":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"33":"DC"},R:{"33":"ND"},S:{"2":"OD PD"}},B:7,C:"CSS Reflections",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"33":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"UC BC","33":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"33":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"33":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"33":"E A"},K:{"2":"A B C zB NC 0B","33":"s"},L:{"33":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"33":"1B"},P:{"33":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"33":"DC"},R:{"33":"OD"},S:{"2":"PD QD"}},B:7,C:"CSS Reflections",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-regions.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-regions.js index 4ed6e3f02033dc..150d10d33aabca 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-regions.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-regions.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","420":"A B"},B:{"2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","420":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 I J E F G A B C K L KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","36":"H M N O","66":"8 9 n o p q AB BB CB DB EB FB GB HB IB JB"},E:{"2":"7 I J C K L H TC BC UC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","33":"E F G A B VC WC XC CC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"BC iC OC jC kC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","33":"F lC mC nC oC pC qC rC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"420":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS Regions",D:true}; +module.exports={A:{A:{"2":"J E F G PC","420":"A B"},B:{"2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","420":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 I J E F G A B C K L KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","36":"H M N O","66":"8 9 o p q r AB BB CB DB EB FB GB HB IB JB"},E:{"2":"7 I J C K L H UC BC VC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","33":"E F G A B WC XC YC CC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"BC jC OC kC lC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","33":"F mC nC oC pC qC rC sC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"420":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS Regions",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-relative-colors.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-relative-colors.js index 07ab17ae160a19..b8755e65a8f9be 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-relative-colors.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-relative-colors.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"D","2":"0 1 2 3 4 5 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","194":"6"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"D 8B 9B AC","2":"0 1 2 3 4 5 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","194":"6"},E:{"1":"JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS Relative colors",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"D","2":"0 1 2 3 4 5 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","194":"6"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"D 8B 9B AC","2":"0 1 2 3 4 5 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","194":"6"},E:{"1":"JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS Relative colors",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-repeating-gradients.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-repeating-gradients.js index 7a67a29a29a8e7..fa27b54f0be0bd 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-repeating-gradients.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-repeating-gradients.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC","33":"7 I J E F G A B C K L H SC"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G","33":"8 9 A B C K L H M N O n o p q AB"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC","33":"J UC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B dC eC fC gC","33":"C hC","36":"zB NC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC","33":"jC kC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B 5C 6C 7C","33":"I 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r 0B","2":"A B","33":"C","36":"zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS Repeating Gradients",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC","33":"7 I J E F G A B C K L H TC"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G","33":"8 9 A B C K L H M N O o p q r AB"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC","33":"J VC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B eC fC gC hC","33":"C iC","36":"zB NC"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC","33":"kC lC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B 6C 7C 8C","33":"I 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s 0B","2":"A B","33":"C","36":"zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS Repeating Gradients",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-resize.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-resize.js index 092b75d9c269ca..192448775057c9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-resize.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-resize.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","33":"I"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC","132":"0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:2,C:"CSS resize property",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","33":"I"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC","132":"0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:2,C:"CSS resize property",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-revert-value.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-revert-value.js index cc8a6aca2df558..e4b05b10aed9ef 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-revert-value.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-revert-value.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O P Q R S"},C:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB RC SC"},D:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC"},F:{"1":"r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB dC eC fC gC zB NC hC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID"},Q:{"2":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:4,C:"CSS revert value",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O P Q R S"},C:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB SC TC"},D:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC"},F:{"1":"s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB eC fC gC hC zB NC iC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:4,C:"CSS revert value",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-rrggbbaa.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-rrggbbaa.js index 056bb9d51dcd22..67f3a519586a43 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-rrggbbaa.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-rrggbbaa.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB RC SC"},D:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","194":"bB cB dB eB fB gB hB 5B iB 6B"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB dC eC fC gC zB NC hC 0B","194":"OB PB QB RB SB TB UB VB WB XB YB ZB aB"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I","194":"BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:4,C:"#rrggbbaa hex color notation",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB SC TC"},D:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","194":"bB cB dB eB fB gB hB 5B iB 6B"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB eC fC gC hC zB NC iC 0B","194":"OB PB QB RB SB TB UB VB WB XB YB ZB aB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I","194":"CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:4,C:"#rrggbbaa hex color notation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scroll-behavior.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scroll-behavior.js index 71adfef18607a0..4d4e3b68ba08ee 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scroll-behavior.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scroll-behavior.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","129":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","129":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","450":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K TC BC UC VC WC XC CC zB 0B DC","578":"L H YC ZC EC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB dC eC fC gC zB NC hC 0B","129":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","450":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC","578":"0C 1C EC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"129":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD"},Q:{"129":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"CSS Scroll-behavior",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","129":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","129":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","450":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K UC BC VC WC XC YC CC zB 0B DC","578":"L H ZC aC EC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB eC fC gC hC zB NC iC 0B","129":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","450":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C","578":"1C 2C EC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"129":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED"},Q:{"129":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"CSS Scroll-behavior",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scroll-timeline.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scroll-timeline.js index 45abee26b3002b..73f3c8c5e2085b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scroll-timeline.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scroll-timeline.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y","194":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T","194":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","322":"U V W"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB dC eC fC gC zB NC hC 0B","194":"vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","322":"r uB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"CSS @scroll-timeline",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T U V W X Y","194":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T","194":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","322":"U V W"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB eC fC gC hC zB NC iC 0B","194":"vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","322":"s uB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"CSS @scroll-timeline",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scrollbar.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scrollbar.js index 3d84a385309b92..598e98c7f6f4fe 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scrollbar.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-scrollbar.js @@ -1 +1 @@ -module.exports={A:{A:{"132":"J E F G A B PC"},B:{"2":"C K L H M N O","292":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB RC SC","3138":"kB"},D:{"292":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"16":"7 I TC BC","292":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","292":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC jC kC","292":"lC","804":"F mC nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"2":"4C"},I:{"16":"5C 6C","292":"4B I D 7C 8C OC 9C AD"},J:{"292":"E A"},K:{"2":"A B C zB NC 0B","292":"r"},L:{"292":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"292":"1B"},P:{"292":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"292":"DC"},R:{"292":"ND"},S:{"2":"OD PD"}},B:4,C:"CSS scrollbar styling",D:true}; +module.exports={A:{A:{"132":"J E F G A B PC"},B:{"2":"C K L H M N O","292":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB SC TC","3138":"kB"},D:{"292":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"16":"7 I UC BC","292":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","292":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC kC lC","292":"mC","804":"F nC oC pC qC rC sC tC uC vC wC xC yC zC"},H:{"2":"5C"},I:{"16":"6C 7C","292":"4B I D 8C 9C OC AD BD"},J:{"292":"E A"},K:{"2":"A B C zB NC 0B","292":"s"},L:{"292":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"292":"1B"},P:{"292":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"292":"DC"},R:{"292":"OD"},S:{"2":"PD QD"}},B:4,C:"CSS scrollbar styling",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sel2.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sel2.js index 8470bf905154f7..3496ddc7a922e6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sel2.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sel2.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"E F G A B","2":"PC","8":"J"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS 2.1 selectors",D:true}; +module.exports={A:{A:{"1":"E F G A B","2":"PC","8":"J"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS 2.1 selectors",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sel3.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sel3.js index 355e6d425a611d..e5455c039f2594 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sel3.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sel3.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"PC","8":"J","132":"E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS3 selectors",D:true}; +module.exports={A:{A:{"1":"G A B","2":"PC","8":"J","132":"E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS3 selectors",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-selection.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-selection.js index 253f9dd90876a9..f7a3f92d0d2b37 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-selection.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-selection.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"C r NC 0B","16":"A B zB"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","33":"OD"}},B:5,C:"::selection CSS pseudo-element",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","33":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"C s NC 0B","16":"A B zB"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","33":"PD"}},B:5,C:"::selection CSS pseudo-element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-shapes.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-shapes.js index d49e6223d369ce..c08a1fe1641fa9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-shapes.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-shapes.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB RC SC","322":"aB bB cB dB eB fB gB hB 5B iB 6B"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB","194":"JB KB LB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC","33":"F G A WC XC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC","33":"F mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:4,C:"CSS Shapes Level 1",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB SC TC","322":"aB bB cB dB eB fB gB hB 5B iB 6B"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB","194":"JB KB LB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC","33":"F G A XC YC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC","33":"F nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:4,C:"CSS Shapes Level 1",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-snappoints.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-snappoints.js index b7a18275a8b0fe..a76b8de66435cf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-snappoints.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-snappoints.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","6308":"A","6436":"B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","6436":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB RC SC","2052":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB"},D:{"1":"0 1 2 3 4 5 6 qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB","8258":"nB oB pB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC","3108":"G A XC CC"},F:{"1":"lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dC eC fC gC zB NC hC 0B","8258":"dB eB fB gB hB iB jB kB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC","3108":"nC oC pC qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2052":"OD"}},B:4,C:"CSS Scroll Snap",D:true}; +module.exports={A:{A:{"2":"J E F G PC","6308":"A","6436":"B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","6436":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB SC TC","2052":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB"},D:{"1":"0 1 2 3 4 5 6 qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB","8258":"nB oB pB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC","3108":"G A YC CC"},F:{"1":"lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB eC fC gC hC zB NC iC 0B","8258":"dB eB fB gB hB iB jB kB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC","3108":"oC pC qC rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2052":"PD"}},B:4,C:"CSS Scroll Snap",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sticky.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sticky.js index 36ec0fa0ef3395..7a16e9ca2e30f9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sticky.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-sticky.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H","1028":"P Q R S T U V W X Y Z","4100":"M N O"},C:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB RC SC","194":"BB CB DB EB FB GB","516":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB"},D:{"1":"0 1 2 3 4 5 6 a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n o p MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","322":"9 q AB BB CB DB EB FB GB HB IB JB KB LB bB cB dB eB","1028":"fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z"},E:{"1":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC","33":"F G A B C WC XC CC zB 0B","2084":"E VC"},F:{"1":"yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB dC eC fC gC zB NC hC 0B","322":"OB PB QB","1028":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB"},G:{"1":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","33":"F mC nC oC pC qC rC sC tC uC","2084":"kC lC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD"},Q:{"1028":"DC"},R:{"1":"ND"},S:{"1":"PD","516":"OD"}},B:5,C:"CSS position:sticky",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H","1028":"P Q R S T U V W X Y Z","4100":"M N O"},C:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB SC TC","194":"BB CB DB EB FB GB","516":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB"},D:{"1":"0 1 2 3 4 5 6 a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o p q MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","322":"9 r AB BB CB DB EB FB GB HB IB JB KB LB bB cB dB eB","1028":"fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z"},E:{"1":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC","33":"F G A B C XC YC CC zB 0B","2084":"E WC"},F:{"1":"yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB eC fC gC hC zB NC iC 0B","322":"OB PB QB","1028":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB"},G:{"1":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","33":"F nC oC pC qC rC sC tC uC vC","2084":"lC mC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD"},Q:{"1028":"DC"},R:{"1":"OD"},S:{"1":"QD","516":"PD"}},B:5,C:"CSS position:sticky",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-subgrid.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-subgrid.js index b66c0732654cae..366c68553e6d7e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-subgrid.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-subgrid.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"5 6 D","2":"0 1 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","194":"2 3 4"},C:{"1":"0 1 2 3 4 5 6 sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB RC SC"},D:{"1":"5 6 D 8B 9B AC","2":"0 1 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","194":"2 3 4"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC"},F:{"1":"m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i dC eC fC gC zB NC hC 0B","194":"j k l"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"1":"PD","2":"OD"}},B:4,C:"CSS Subgrid",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"5 6 D","2":"0 1 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","194":"2 3 4"},C:{"1":"0 1 2 3 4 5 6 sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB SC TC"},D:{"1":"5 6 D 8B 9B AC","2":"0 1 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","194":"2 3 4"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC"},F:{"1":"m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i eC fC gC hC zB NC iC 0B","194":"j k l"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"1":"QD","2":"PD"}},B:4,C:"CSS Subgrid",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-supports-api.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-supports-api.js index cd02500b58af18..beaf0b5ba0fcde 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-supports-api.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-supports-api.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O RC SC","66":"n o","260":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB","260":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC","132":"0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"132":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC","132":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS.supports() API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O SC TC","66":"o p","260":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB","260":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC","132":"0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"132":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC","132":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS.supports() API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-table.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-table.js index 556e9f9f38d1b2..4debdb2a371513 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-table.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-table.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"F G A B","2":"J E PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","132":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS Table display",D:true}; +module.exports={A:{A:{"1":"F G A B","2":"J E PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","132":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS Table display",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-align-last.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-align-last.js index 51752da7a2141f..787f4c1d1c18d6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-align-last.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-align-last.js @@ -1 +1 @@ -module.exports={A:{A:{"132":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","4":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B RC SC","33":"8 9 C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},D:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB","322":"KB LB MB NB OB PB QB RB SB TB UB VB"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC"},F:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o dC eC fC gC zB NC hC 0B","578":"9 p q AB BB CB DB EB FB GB HB IB"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","33":"OD"}},B:4,C:"CSS3 text-align-last",D:true}; +module.exports={A:{A:{"132":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","4":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B SC TC","33":"8 9 C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},D:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB","322":"KB LB MB NB OB PB QB RB SB TB UB VB"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC"},F:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p eC fC gC hC zB NC iC 0B","578":"9 q r AB BB CB DB EB FB GB HB IB"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","33":"PD"}},B:4,C:"CSS3 text-align-last",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-box-trim.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-box-trim.js index 680f797b72dc0e..20e8567ffa9796 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-box-trim.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-box-trim.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC","194":"JC KC bC 3B LC MC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC","194":"JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS text-box-trim & text-box-edge",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC","194":"JC KC cC 3B LC MC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC","194":"JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS text-box-trim & text-box-edge",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-indent.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-indent.js index c20402b2f49fc5..cd131c65842a19 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-indent.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-indent.js @@ -1 +1 @@ -module.exports={A:{A:{"132":"J E F G A B PC"},B:{"132":"C K L H M N O","388":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"9B AC","132":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B RC SC"},D:{"132":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB","388":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","132":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC"},F:{"132":"8 9 G B C H M N O n o p q dC eC fC gC zB NC hC 0B","388":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","132":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"132":"4C"},I:{"132":"4B I 5C 6C 7C 8C OC 9C AD","388":"D"},J:{"132":"E A"},K:{"132":"A B C zB NC 0B","388":"r"},L:{"388":"D"},M:{"132":"D"},N:{"132":"A B"},O:{"388":"1B"},P:{"132":"I","388":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"388":"DC"},R:{"388":"ND"},S:{"132":"OD PD"}},B:4,C:"CSS text-indent",D:true}; +module.exports={A:{A:{"132":"J E F G A B PC"},B:{"132":"C K L H M N O","388":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"9B AC RC","132":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B SC TC"},D:{"132":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB","388":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","132":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC"},F:{"132":"8 9 G B C H M N O o p q r eC fC gC hC zB NC iC 0B","388":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","132":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"132":"5C"},I:{"132":"4B I 6C 7C 8C 9C OC AD BD","388":"D"},J:{"132":"E A"},K:{"132":"A B C zB NC 0B","388":"s"},L:{"388":"D"},M:{"132":"D"},N:{"132":"A B"},O:{"388":"1B"},P:{"132":"I","388":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"388":"DC"},R:{"388":"OD"},S:{"132":"PD QD"}},B:4,C:"CSS text-indent",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-justify.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-justify.js index daa605ef25f320..39b947be05546e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-justify.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-justify.js @@ -1 +1 @@ -module.exports={A:{A:{"16":"J E PC","132":"F G A B"},B:{"132":"C K L H M N O","322":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB RC SC","1025":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","1602":"dB"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","322":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB dC eC fC gC zB NC hC 0B","322":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","322":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","322":"r"},L:{"322":"D"},M:{"1025":"D"},N:{"132":"A B"},O:{"322":"1B"},P:{"2":"I","322":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"322":"DC"},R:{"322":"ND"},S:{"2":"OD","1025":"PD"}},B:4,C:"CSS text-justify",D:true}; +module.exports={A:{A:{"16":"J E PC","132":"F G A B"},B:{"132":"C K L H M N O","322":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB SC TC","1025":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","1602":"dB"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","322":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB eC fC gC hC zB NC iC 0B","322":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","322":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","322":"s"},L:{"322":"D"},M:{"1025":"D"},N:{"132":"A B"},O:{"322":"1B"},P:{"2":"I","322":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"322":"DC"},R:{"322":"OD"},S:{"2":"PD","1025":"QD"}},B:4,C:"CSS text-justify",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-orientation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-orientation.js index 6bd2bf1c68b182..e197caf1a4ca2a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-orientation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-orientation.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB RC SC","194":"NB OB PB"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},E:{"1":"L H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC","16":"A","33":"B C K CC zB 0B DC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB dC eC fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS text-orientation",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB SC TC","194":"NB OB PB"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},E:{"1":"L H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC","16":"A","33":"B C K CC zB 0B DC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB eC fC gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS text-orientation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-spacing.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-spacing.js index b4714db6fd5e01..c8c666df7b0d44 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-spacing.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-spacing.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E PC","161":"F G A B"},B:{"2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","161":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"16":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS Text 4 text-spacing",D:false}; +module.exports={A:{A:{"2":"J E PC","161":"F G A B"},B:{"2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","161":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"16":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS Text 4 text-spacing",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js index eb95b6568e1e9d..24bbc22fc789d3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-text-wrap-balance.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"2 3 4 5 6 D","2":"0 1 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z"},C:{"1":"9B AC","2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B RC SC"},D:{"1":"2 3 4 5 6 D 8B 9B AC","2":"0 1 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS text-wrap: balance",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"2 3 4 5 6 D","2":"0 1 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z"},C:{"1":"9B AC RC","2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B SC TC"},D:{"1":"2 3 4 5 6 D 8B 9B AC","2":"0 1 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z"},E:{"1":"dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC"},F:{"1":"i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS text-wrap: balance",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-textshadow.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-textshadow.js index 9560fe907e326b..6367a1614a67e8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-textshadow.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-textshadow.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","129":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","129":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","260":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"4":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"A","4":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"129":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS3 Text-shadow",D:true}; +module.exports={A:{A:{"2":"J E F G PC","129":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","129":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","260":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"4":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"A","4":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"129":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS3 Text-shadow",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-touch-action.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-touch-action.js index f89d8cfa875a1c..7340375619c518 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-touch-action.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-touch-action.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G PC","289":"A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC","194":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","1025":"bB cB dB eB fB"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o p dC eC fC gC zB NC hC 0B"},G:{"1":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC","516":"oC pC qC rC sC tC uC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","289":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","194":"OD"}},B:2,C:"CSS touch-action property",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G PC","289":"A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC","194":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","1025":"bB cB dB eB fB"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p q eC fC gC hC zB NC iC 0B"},G:{"1":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC","516":"pC qC rC sC tC uC vC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","289":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","194":"PD"}},B:2,C:"CSS touch-action property",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-transitions.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-transitions.js index 4c31c962569bf0..6d9ccdcacb1295 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-transitions.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-transitions.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","33":"7 J E F G A B C K L H","164":"I"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O n o p q AB"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","33":"J UC","164":"7 I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G dC eC","33":"C","164":"B fC gC zB NC hC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","33":"kC","164":"BC iC OC jC"},H:{"2":"4C"},I:{"1":"D 9C AD","33":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","33":"E"},K:{"1":"r 0B","33":"C","164":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"CSS3 Transitions",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","33":"7 J E F G A B C K L H","164":"I"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O o p q r AB"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","33":"J VC","164":"7 I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G eC fC","33":"C","164":"B gC hC zB NC iC"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","33":"lC","164":"BC jC OC kC"},H:{"2":"5C"},I:{"1":"D AD BD","33":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","33":"E"},K:{"1":"s 0B","33":"C","164":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"CSS3 Transitions",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-unicode-bidi.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-unicode-bidi.js index 0726b32122e5f1..9c8326410834e9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-unicode-bidi.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-unicode-bidi.js @@ -1 +1 @@ -module.exports={A:{A:{"132":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","132":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","132":"7 QC 4B I J E F G RC SC","292":"A B C K L H M"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 I J E F G A B C K L H M","548":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},E:{"132":"7 I J E F TC BC UC VC WC","548":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"132":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"132":"F BC iC OC jC kC lC mC","548":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"16":"4C"},I:{"1":"D","16":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"16":"E A"},K:{"1":"r","16":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","16":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","33":"OD"}},B:4,C:"CSS unicode-bidi property",D:false}; +module.exports={A:{A:{"132":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","132":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","33":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","132":"7 QC 4B I J E F G SC TC","292":"A B C K L H M"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","132":"7 I J E F G A B C K L H M","548":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},E:{"132":"7 I J E F UC BC VC WC XC","548":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"132":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"132":"F BC jC OC kC lC mC nC","548":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"16":"5C"},I:{"1":"D","16":"4B I 6C 7C 8C 9C OC AD BD"},J:{"16":"E A"},K:{"1":"s","16":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","16":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","33":"PD"}},B:4,C:"CSS unicode-bidi property",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-unset-value.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-unset-value.js index d0689803b43a01..965e018b71fac6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-unset-value.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-unset-value.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB RC SC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC"},F:{"1":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB dC eC fC gC zB NC hC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS unset value",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB SC TC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC"},F:{"1":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB eC fC gC hC zB NC iC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS unset value",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-variables.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-variables.js index de100a322ea550..e6477e3ee78488 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-variables.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-variables.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L","260":"H"},C:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB RC SC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB","194":"XB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC","260":"XC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB dC eC fC gC zB NC hC 0B","194":"KB"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC","260":"oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS Variables (Custom Properties)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L","260":"H"},C:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB SC TC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB","194":"XB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC","260":"YC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB eC fC gC hC zB NC iC 0B","194":"KB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC","260":"pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS Variables (Custom Properties)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-when-else.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-when-else.js index 658a4c4c2b91a6..9c50f095ed1fed 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-when-else.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-when-else.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"CSS @when / @else conditional rules",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"CSS @when / @else conditional rules",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-widows-orphans.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-widows-orphans.js index f87bd0c62bdade..655d9649385bfc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-widows-orphans.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-widows-orphans.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E PC","129":"F G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC VC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","129":"G B dC eC fC gC zB NC hC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:2,C:"CSS widows & orphans",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E PC","129":"F G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC WC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","129":"G B eC fC gC hC zB NC iC"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:2,C:"CSS widows & orphans",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-width-stretch.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-width-stretch.js index f1a042f8af90fe..ad01425766b69d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-width-stretch.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-width-stretch.js @@ -1 +1 @@ -module.exports={A:{D:{"2":"7 8 I J E F G A B C K L H M N O n o","33":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},L:{"33":"D"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"QC","33":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},M:{"33":"D"},A:{"2":"J E F G A B PC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},K:{"2":"A B C zB NC 0B","33":"r"},E:{"2":"7 I J TC BC UC VC cC","33":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC"},G:{"2":"BC iC OC jC kC","33":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},P:{"2":"I","33":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},I:{"2":"4B I 5C 6C 7C 8C OC","33":"D 9C AD"}},B:6,C:"width: stretch property",D:undefined}; +module.exports={A:{D:{"2":"7 8 I J E F G A B C K L H M N O o p","33":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},L:{"33":"D"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"QC","33":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},M:{"33":"D"},A:{"2":"J E F G A B PC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},K:{"2":"A B C zB NC 0B","33":"s"},E:{"2":"7 I J UC BC VC WC dC","33":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC"},G:{"2":"BC jC OC kC lC","33":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},P:{"2":"I","33":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},I:{"2":"4B I 6C 7C 8C 9C OC","33":"D AD BD"}},B:6,C:"width: stretch property",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-writing-mode.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-writing-mode.js index 2656b03cc36745..71e9b07998c95e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-writing-mode.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-writing-mode.js @@ -1 +1 @@ -module.exports={A:{A:{"132":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB RC SC","322":"LB MB NB OB PB"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J","16":"E","33":"8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","16":"7","33":"J E F G A UC VC WC XC CC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC","33":"F jC kC lC mC nC oC pC qC"},H:{"2":"4C"},I:{"1":"D","2":"5C 6C 7C","33":"4B I 8C OC 9C AD"},J:{"33":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"36":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","33":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS writing-mode property",D:true}; +module.exports={A:{A:{"132":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB SC TC","322":"LB MB NB OB PB"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J","16":"E","33":"8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","16":"7","33":"J E F G A VC WC XC YC CC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC","33":"F kC lC mC nC oC pC qC rC"},H:{"2":"5C"},I:{"1":"D","2":"6C 7C 8C","33":"4B I 9C OC AD BD"},J:{"33":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"36":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","33":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS writing-mode property",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-zoom.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-zoom.js index 112c06fcbc2fb8..7d9ab3296c2909 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-zoom.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css-zoom.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E PC","129":"F G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC"},H:{"2":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"129":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"CSS zoom",D:true}; +module.exports={A:{A:{"1":"J E PC","129":"F G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC"},H:{"2":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"129":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"CSS zoom",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-attr.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-attr.js index b8d0a88c3f94c7..40a8ffe5ce0dd2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-attr.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-attr.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"CSS3 attr() function for all properties",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"CSS3 attr() function for all properties",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-boxsizing.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-boxsizing.js index c9def8286b6050..c18117cf979fb1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-boxsizing.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-boxsizing.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"F G A B","8":"J E PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 I J E F G"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","33":"7 I TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","33":"BC iC OC"},H:{"1":"4C"},I:{"1":"I D 8C OC 9C AD","33":"4B 5C 6C 7C"},J:{"1":"A","33":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"CSS3 Box-sizing",D:true}; +module.exports={A:{A:{"1":"F G A B","8":"J E PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","33":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"7 I J E F G"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","33":"7 I UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","33":"BC jC OC"},H:{"1":"5C"},I:{"1":"I D 9C OC AD BD","33":"4B 6C 7C 8C"},J:{"1":"A","33":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"CSS3 Box-sizing",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-colors.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-colors.js index 29c2ad02d314de..b4481333f9f4e2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-colors.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-colors.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","4":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m eC fC gC zB NC hC 0B","2":"G","4":"dC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS3 Colors",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","4":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n fC gC hC zB NC iC 0B","2":"G","4":"eC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS3 Colors",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors-grab.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors-grab.js index 181f26ed9c2eb0..648da2ca9e8239 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors-grab.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors-grab.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L"},C:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB RC SC"},D:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","33":"7 I J E F G A TC BC UC VC WC XC CC"},F:{"1":"C eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G B dC eC fC gC zB NC","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"33":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:2,C:"CSS grab & grabbing cursors",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L"},C:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","33":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB SC TC"},D:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","33":"7 I J E F G A UC BC VC WC XC YC CC"},F:{"1":"C eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G B eC fC gC hC zB NC","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"33":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:2,C:"CSS grab & grabbing cursors",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors-newer.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors-newer.js index 050a80397d3568..5578ec1148fd02 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors-newer.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors-newer.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 QC 4B I J E F G A B C K L H M N O n o p q RC SC"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","33":"7 I J E F TC BC UC VC WC"},F:{"1":"9 C AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G B dC eC fC gC zB NC","33":"8 H M N O n o p q"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"33":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:2,C:"CSS3 Cursors: zoom-in & zoom-out",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","33":"7 8 QC 4B I J E F G A B C K L H M N O o p q r SC TC"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","33":"7 I J E F UC BC VC WC XC"},F:{"1":"9 C AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G B eC fC gC hC zB NC","33":"8 H M N O o p q r"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"33":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:2,C:"CSS3 Cursors: zoom-in & zoom-out",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors.js index ca87197995cd73..fb8216ed55946c 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-cursors.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","132":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"I"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","4":"I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","260":"G B C dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","16":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:2,C:"CSS3 Cursors (original values)",D:true}; +module.exports={A:{A:{"1":"G A B","132":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","4":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","4":"I"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","4":"I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","260":"G B C eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E","16":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:2,C:"CSS3 Cursors (original values)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-tabsize.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-tabsize.js index 0e53f17f8c4aca..20a2ab83098128 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-tabsize.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/css3-tabsize.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","33":"cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z","164":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB"},D:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n","132":"9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB"},E:{"1":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC","132":"E F G A B C K VC WC XC CC zB 0B"},F:{"1":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G dC eC fC","132":"8 9 H M N O n o p q AB BB CB DB","164":"B C gC zB NC hC 0B"},G:{"1":"yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC","132":"F lC mC nC oC pC qC rC sC tC uC vC wC xC"},H:{"164":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC","132":"9C AD"},J:{"132":"E A"},K:{"1":"r","2":"A","164":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"164":"OD PD"}},B:4,C:"CSS3 tab-size",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","33":"cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z","164":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB"},D:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o","132":"9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB"},E:{"1":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC","132":"E F G A B C K WC XC YC CC zB 0B"},F:{"1":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G eC fC gC","132":"8 9 H M N O o p q r AB BB CB DB","164":"B C hC zB NC iC 0B"},G:{"1":"zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC","132":"F mC nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"164":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC","132":"AD BD"},J:{"132":"E A"},K:{"1":"s","2":"A","164":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"164":"PD QD"}},B:4,C:"CSS3 tab-size",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/currentcolor.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/currentcolor.js index 868feb56d495b1..9ff290a105eb28 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/currentcolor.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/currentcolor.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS currentColor value",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS currentColor value",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/custom-elements.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/custom-elements.js index e0f37b9bf8a509..4298975dd860ac 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/custom-elements.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/custom-elements.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","8":"A B"},B:{"1":"P","2":"0 1 2 3 4 5 6 Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","8":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 QC 4B I J E F G A B C K L H M N O n o p 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","66":"9 q AB BB CB DB EB","72":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB"},D:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P","2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","66":"CB DB EB FB GB HB"},E:{"2":"7 I TC BC UC","8":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB","2":"G B C oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","66":"8 H M N O"},G:{"2":"BC iC OC jC kC","8":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"AD","2":"4B I D 5C 6C 7C 8C OC 9C"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I BD CD DD ED FD CC GD HD","2":"n o p q ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"2":"ND"},S:{"2":"PD","72":"OD"}},B:7,C:"Custom Elements (deprecated V0 spec)",D:true}; +module.exports={A:{A:{"2":"J E F G PC","8":"A B"},B:{"1":"P","2":"0 1 2 3 4 5 6 Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","8":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 QC 4B I J E F G A B C K L H M N O o p q 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","66":"9 r AB BB CB DB EB","72":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB"},D:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P","2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","66":"CB DB EB FB GB HB"},E:{"2":"7 I UC BC VC","8":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB","2":"G B C oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","66":"8 H M N O"},G:{"2":"BC jC OC kC lC","8":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"BD","2":"4B I D 6C 7C 8C 9C OC AD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I CD DD ED FD GD CC HD ID","2":"o p q r JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"2":"OD"},S:{"2":"QD","72":"PD"}},B:7,C:"Custom Elements (deprecated V0 spec)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/custom-elementsv1.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/custom-elementsv1.js index 415c5565a28655..ad0600f1e6ae1e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/custom-elementsv1.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/custom-elementsv1.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","8":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","8":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB RC SC","8":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","456":"ZB aB bB cB dB eB fB gB hB","712":"5B iB 6B jB"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","8":"bB cB","132":"dB eB fB gB hB 5B iB 6B jB kB lB mB nB"},E:{"2":"7 I J E TC BC UC VC WC","8":"F G A XC","132":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB dC eC fC gC zB NC hC 0B","132":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC","132":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I","132":"BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","8":"OD"}},B:1,C:"Custom Elements (V1)",D:true}; +module.exports={A:{A:{"2":"J E F G PC","8":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","8":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB SC TC","8":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","456":"ZB aB bB cB dB eB fB gB hB","712":"5B iB 6B jB"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","8":"bB cB","132":"dB eB fB gB hB 5B iB 6B jB kB lB mB nB"},E:{"2":"7 I J E UC BC VC WC XC","8":"F G A YC","132":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB eC fC gC hC zB NC iC 0B","132":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC","132":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I","132":"CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","8":"PD"}},B:1,C:"Custom Elements (V1)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/customevent.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/customevent.js index 7801c61c041cf3..84fe6000abc8af 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/customevent.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/customevent.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","132":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC","132":"J E F G A"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"I","16":"7 J E F K L","388":"G A B C"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","16":"7 J","388":"UC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G dC eC fC gC","132":"B zB NC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"iC","16":"BC OC","388":"jC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"5C 6C 7C","388":"4B I 8C OC"},J:{"1":"A","388":"E"},K:{"1":"C r 0B","2":"A","132":"B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"CustomEvent",D:true}; +module.exports={A:{A:{"2":"J E F PC","132":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC","132":"J E F G A"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"I","16":"7 J E F K L","388":"G A B C"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","16":"7 J","388":"VC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G eC fC gC hC","132":"B zB NC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"jC","16":"BC OC","388":"kC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"6C 7C 8C","388":"4B I 9C OC"},J:{"1":"A","388":"E"},K:{"1":"C s 0B","2":"A","132":"B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"CustomEvent",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/datalist.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/datalist.js index f91a2b373b1a1d..6b756888cca4c2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/datalist.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/datalist.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"PC","8":"J E F G","260":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K L H","1284":"M N O"},C:{"1":"0 1 2 3 4 5 6 y z D 8B 9B AC","8":"QC 4B RC SC","516":"l m s t u v w x","4612":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k"},D:{"1":"0 1 2 3 4 5 6 qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"7 8 I J E F G A B C K L H M N O","132":"9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB"},E:{"1":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"7 I J E F G A B C TC BC UC VC WC XC CC zB"},F:{"1":"G B C lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","132":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB"},G:{"8":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC","2049":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D AD","8":"4B I 5C 6C 7C 8C OC 9C"},J:{"1":"A","8":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:1,C:"Datalist element",D:true}; +module.exports={A:{A:{"2":"PC","8":"J E F G","260":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K L H","1284":"M N O"},C:{"1":"0 1 2 3 4 5 6 y z D 8B 9B AC RC","8":"QC 4B SC TC","516":"l m n t u v w x","4612":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k"},D:{"1":"0 1 2 3 4 5 6 qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","8":"7 8 I J E F G A B C K L H M N O","132":"9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB"},E:{"1":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"7 I J E F G A B C UC BC VC WC XC YC CC zB"},F:{"1":"G B C lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","132":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB"},G:{"8":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC","2049":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D BD","8":"4B I 6C 7C 8C 9C OC AD"},J:{"1":"A","8":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:1,C:"Datalist element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dataset.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dataset.js index 3a2b280b230ad5..36d3e5f8a70f4d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dataset.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dataset.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","4":"J E F G A PC"},B:{"1":"C K L H M","129":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","4":"7 QC 4B I RC SC","129":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"UB VB WB XB YB ZB aB bB cB dB","4":"7 I J","129":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"4":"7 I TC BC","129":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"C HB IB JB KB LB MB NB OB PB QB zB NC hC 0B","4":"G B dC eC fC gC","129":"8 9 H M N O n o p q AB BB CB DB EB FB GB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"4":"BC iC OC","129":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"4":"4C"},I:{"4":"5C 6C 7C","129":"4B I D 8C OC 9C AD"},J:{"129":"E A"},K:{"1":"C zB NC 0B","4":"A B","129":"r"},L:{"129":"D"},M:{"129":"D"},N:{"1":"B","4":"A"},O:{"129":"1B"},P:{"129":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"129":"DC"},R:{"129":"ND"},S:{"1":"OD","129":"PD"}},B:1,C:"dataset & data-* attributes",D:true}; +module.exports={A:{A:{"1":"B","4":"J E F G A PC"},B:{"1":"C K L H M","129":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","4":"7 QC 4B I SC TC","129":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"UB VB WB XB YB ZB aB bB cB dB","4":"7 I J","129":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"4":"7 I UC BC","129":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"C HB IB JB KB LB MB NB OB PB QB zB NC iC 0B","4":"G B eC fC gC hC","129":"8 9 H M N O o p q r AB BB CB DB EB FB GB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"4":"BC jC OC","129":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"4":"5C"},I:{"4":"6C 7C 8C","129":"4B I D 9C OC AD BD"},J:{"129":"E A"},K:{"1":"C zB NC 0B","4":"A B","129":"s"},L:{"129":"D"},M:{"129":"D"},N:{"1":"B","4":"A"},O:{"129":"1B"},P:{"129":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"129":"DC"},R:{"129":"OD"},S:{"1":"PD","129":"QD"}},B:1,C:"dataset & data-* attributes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/datauri.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/datauri.js index d276be3614fe0f..f57b5b5f7fd043 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/datauri.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/datauri.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E PC","132":"F","260":"G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K H M N O","772":"L"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"260":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Data URIs",D:true}; +module.exports={A:{A:{"2":"J E PC","132":"F","260":"G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K H M N O","772":"L"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"260":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Data URIs",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js index 93be2d83b7c59d..06507f3cb5a8a5 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/date-tolocaledatestring.js @@ -1 +1 @@ -module.exports={A:{A:{"16":"PC","132":"J E F G A B"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","132":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC","260":"bB cB dB eB","772":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},D:{"1":"0 1 2 3 4 5 6 rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 I J E F G A B C K L H M N O n o p q","260":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB","772":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB"},E:{"1":"C K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I TC BC","132":"J E F G A UC VC WC XC","260":"B CC zB"},F:{"1":"gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G B C dC eC fC gC zB NC hC","132":"0B","260":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB","772":"8 9 H M N O n o p q"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC jC","132":"F kC lC mC nC oC pC"},H:{"132":"4C"},I:{"1":"D","16":"4B 5C 6C 7C","132":"I 8C OC","772":"9C AD"},J:{"132":"E A"},K:{"1":"r","16":"A B C zB NC","132":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"n o p q FD CC GD HD ID JD KD 2B 3B LD MD","260":"I BD CD DD ED"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","132":"OD"}},B:6,C:"Date.prototype.toLocaleDateString",D:true}; +module.exports={A:{A:{"16":"PC","132":"J E F G A B"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","132":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","132":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC","260":"bB cB dB eB","772":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},D:{"1":"0 1 2 3 4 5 6 rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","132":"7 8 I J E F G A B C K L H M N O o p q r","260":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB","772":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB"},E:{"1":"C K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I UC BC","132":"J E F G A VC WC XC YC","260":"B CC zB"},F:{"1":"gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G B C eC fC gC hC zB NC iC","132":"0B","260":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB","772":"8 9 H M N O o p q r"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC kC","132":"F lC mC nC oC pC qC"},H:{"132":"5C"},I:{"1":"D","16":"4B 6C 7C 8C","132":"I 9C OC","772":"AD BD"},J:{"132":"E A"},K:{"1":"s","16":"A B C zB NC","132":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"o p q r GD CC HD ID JD KD LD 2B 3B MD ND","260":"I CD DD ED FD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","132":"PD"}},B:6,C:"Date.prototype.toLocaleDateString",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js index 2b507108260fec..dbfd94968c18a4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/declarative-shadow-dom.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T","66":"U V W X Y"},E:{"1":"JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC"},F:{"1":"xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB dC eC fC gC zB NC hC 0B"},G:{"1":"JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID JD"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"Declarative Shadow DOM",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T","66":"U V W X Y"},E:{"1":"JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC"},F:{"1":"xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB eC fC gC hC zB NC iC 0B"},G:{"1":"JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD KD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"Declarative Shadow DOM",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/decorators.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/decorators.js index 19693538e33008..2c930fd32425dd 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/decorators.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/decorators.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Decorators",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Decorators",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/details.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/details.js index d50ef71cd390e4..3e245d51e2ccbe 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/details.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/details.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"G A B PC","8":"J E F"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC","8":"7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB RC SC","194":"WB XB"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"7 I J E F G A B","257":"8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB","769":"C K L H M N O"},E:{"1":"C K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"7 I TC BC UC","257":"J E F G A VC WC XC","1025":"B CC zB"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"C zB NC hC 0B","8":"G B dC eC fC gC"},G:{"1":"F kC lC mC nC oC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","8":"BC iC OC jC","1025":"pC qC rC"},H:{"8":"4C"},I:{"1":"I D 8C OC 9C AD","8":"4B 5C 6C 7C"},J:{"1":"A","8":"E"},K:{"1":"r","8":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Details & Summary elements",D:true}; +module.exports={A:{A:{"2":"G A B PC","8":"J E F"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC","8":"7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB SC TC","194":"WB XB"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","8":"7 I J E F G A B","257":"8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB","769":"C K L H M N O"},E:{"1":"C K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"7 I UC BC VC","257":"J E F G A WC XC YC","1025":"B CC zB"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"C zB NC iC 0B","8":"G B eC fC gC hC"},G:{"1":"F lC mC nC oC pC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","8":"BC jC OC kC","1025":"qC rC sC"},H:{"8":"5C"},I:{"1":"I D 9C OC AD BD","8":"4B 6C 7C 8C"},J:{"1":"A","8":"E"},K:{"1":"s","8":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Details & Summary elements",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/deviceorientation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/deviceorientation.js index 20b25a1f6ab97e..912adf8e6102c9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/deviceorientation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/deviceorientation.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"C K L H M N O","4":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"QC 4B RC","4":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"7 I SC"},D:{"2":"7 I J","4":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","4":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"BC iC","4":"F OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"5C 6C 7C","4":"4B I D 8C OC 9C AD"},J:{"2":"E","4":"A"},K:{"1":"C 0B","2":"A B zB NC","4":"r"},L:{"4":"D"},M:{"4":"D"},N:{"1":"B","2":"A"},O:{"4":"1B"},P:{"4":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"4":"DC"},R:{"4":"ND"},S:{"4":"OD PD"}},B:4,C:"DeviceOrientation & DeviceMotion events",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"C K L H M N O","4":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"QC 4B SC","4":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","8":"7 I TC"},D:{"2":"7 I J","4":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","4":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"BC jC","4":"F OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"6C 7C 8C","4":"4B I D 9C OC AD BD"},J:{"2":"E","4":"A"},K:{"1":"C 0B","2":"A B zB NC","4":"s"},L:{"4":"D"},M:{"4":"D"},N:{"1":"B","2":"A"},O:{"4":"1B"},P:{"4":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"4":"DC"},R:{"4":"OD"},S:{"4":"PD QD"}},B:4,C:"DeviceOrientation & DeviceMotion events",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/devicepixelratio.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/devicepixelratio.js index 9f113348e63877..840f6ef41a7105 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/devicepixelratio.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/devicepixelratio.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M N RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G B dC eC fC gC zB NC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"C r 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Window.devicePixelRatio",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M N SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G B eC fC gC hC zB NC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"C s 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Window.devicePixelRatio",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dialog.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dialog.js index 16b178dae273e2..1ce04a4a92a8a3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dialog.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dialog.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB RC SC","194":"cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P","1218":"Q R 7B S T U V W X Y Z a b c d e f g"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB","322":"HB IB JB KB LB"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C H M N O dC eC fC gC zB NC hC 0B","578":"8 n o p q"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:1,C:"Dialog element",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB SC TC","194":"cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P","1218":"Q R 7B S T U V W X Y Z a b c d e f g"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB","322":"HB IB JB KB LB"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C H M N O eC fC gC hC zB NC iC 0B","578":"8 o p q r"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:1,C:"Dialog element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dispatchevent.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dispatchevent.js index e7c58084605c98..7e3eecb7604856 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dispatchevent.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dispatchevent.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","16":"PC","129":"G A","130":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","16":"G"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"1":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","129":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"EventTarget.dispatchEvent",D:true}; +module.exports={A:{A:{"1":"B","16":"PC","129":"G A","130":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","16":"G"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"1":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","129":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"EventTarget.dispatchEvent",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dnssec.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dnssec.js index f797e230524342..f05808cf8be274 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dnssec.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dnssec.js @@ -1 +1 @@ -module.exports={A:{A:{"132":"J E F G A B PC"},B:{"132":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"132":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"132":"0 1 2 3 4 5 6 7 I GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","388":"8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB"},E:{"132":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"132":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"132":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"132":"4C"},I:{"132":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"132":"E A"},K:{"132":"A B C r zB NC 0B"},L:{"132":"D"},M:{"132":"D"},N:{"132":"A B"},O:{"132":"1B"},P:{"132":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"132":"DC"},R:{"132":"ND"},S:{"132":"OD PD"}},B:6,C:"DNSSEC and DANE",D:true}; +module.exports={A:{A:{"132":"J E F G A B PC"},B:{"132":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"132":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"132":"0 1 2 3 4 5 6 7 I GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","388":"8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB"},E:{"132":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"132":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"132":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"132":"5C"},I:{"132":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"132":"E A"},K:{"132":"A B C s zB NC 0B"},L:{"132":"D"},M:{"132":"D"},N:{"132":"A B"},O:{"132":"1B"},P:{"132":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"132":"DC"},R:{"132":"OD"},S:{"132":"PD QD"}},B:6,C:"DNSSEC and DANE",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/do-not-track.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/do-not-track.js index 45eceb049a0310..34af44c6570f02 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/do-not-track.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/do-not-track.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","164":"G A","260":"B"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F RC SC","516":"8 9 G A B C K L H M N O n o p q AB BB CB DB EB FB GB"},D:{"1":"0 1 2 3 4 5 6 9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n o p"},E:{"1":"J A B C UC XC CC zB","2":"7 I K L H TC BC 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","1028":"E F G VC WC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B dC eC fC gC zB NC hC"},G:{"1":"nC oC pC qC rC sC tC","2":"BC iC OC jC kC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","1028":"F lC mC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"16":"E","1028":"A"},K:{"1":"r 0B","16":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"164":"A","260":"B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:7,C:"Do Not Track API",D:true}; +module.exports={A:{A:{"2":"J E F PC","164":"G A","260":"B"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F SC TC","516":"8 9 G A B C K L H M N O o p q r AB BB CB DB EB FB GB"},D:{"1":"0 1 2 3 4 5 6 9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o p q"},E:{"1":"J A B C VC YC CC zB","2":"7 I K L H UC BC 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","1028":"E F G WC XC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B eC fC gC hC zB NC iC"},G:{"1":"oC pC qC rC sC tC uC","2":"BC jC OC kC lC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","1028":"F mC nC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"16":"E","1028":"A"},K:{"1":"s 0B","16":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"164":"A","260":"B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:7,C:"Do Not Track API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-currentscript.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-currentscript.js index cf66f19b6ebc79..cef4ca84d77b72 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-currentscript.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-currentscript.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB"},E:{"1":"F G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC WC"},F:{"1":"8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C H dC eC fC gC zB NC hC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"document.currentScript",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB"},E:{"1":"F G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC XC"},F:{"1":"8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C H eC fC gC hC zB NC iC 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"document.currentScript",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js index a2b85f0d146148..74f46f5fe9b7d6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-evaluate-xpath.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","16":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","16":"G"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:7,C:"document.evaluate & XPath",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","16":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","16":"G"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:7,C:"document.evaluate & XPath",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-execcommand.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-execcommand.js index a100d56802d98d..32b2b858a1756f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-execcommand.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-execcommand.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I TC BC UC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m eC fC gC zB NC hC 0B","16":"G dC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC","16":"OC jC kC"},H:{"2":"4C"},I:{"1":"D 8C OC 9C AD","2":"4B I 5C 6C 7C"},J:{"1":"A","2":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:7,C:"Document.execCommand()",D:true}; +module.exports={A:{A:{"1":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I UC BC VC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n fC gC hC zB NC iC 0B","16":"G eC"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC","16":"OC kC lC"},H:{"2":"5C"},I:{"1":"D 9C OC AD BD","2":"4B I 6C 7C 8C"},J:{"1":"A","2":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:7,C:"Document.execCommand()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-policy.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-policy.js index f184b9b131b87a..c675d8e92d728a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-policy.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-policy.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T","132":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T","132":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB dC eC fC gC zB NC hC 0B","132":"sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","132":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","132":"r"},L:{"132":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"132":"ND"},S:{"2":"OD PD"}},B:7,C:"Document Policy",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T","132":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T","132":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB eC fC gC hC zB NC iC 0B","132":"sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","132":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","132":"s"},L:{"132":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"132":"OD"},S:{"2":"PD QD"}},B:7,C:"Document Policy",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-scrollingelement.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-scrollingelement.js index 4c43fb1861e9f6..91876994f276ba 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-scrollingelement.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/document-scrollingelement.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","16":"C K"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB RC SC"},D:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB dC eC fC gC zB NC hC 0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"document.scrollingElement",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","16":"C K"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB SC TC"},D:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB eC fC gC hC zB NC iC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"document.scrollingElement",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/documenthead.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/documenthead.js index 88b4f8e9e82b6e..cf4696aee9ec81 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/documenthead.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/documenthead.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","16":"7"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","2":"G dC eC fC gC"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"1":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"document.head",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","16":"7"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","2":"G eC fC gC hC"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"1":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"document.head",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dom-manip-convenience.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dom-manip-convenience.js index e8e0e29cb35639..7b5245739b2364 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dom-manip-convenience.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dom-manip-convenience.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB RC SC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","194":"bB cB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB dC eC fC gC zB NC hC 0B","194":"PB"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:1,C:"DOM manipulation convenience methods",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB SC TC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","194":"bB cB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB eC fC gC hC zB NC iC 0B","194":"PB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:1,C:"DOM manipulation convenience methods",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dom-range.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dom-range.js index 826f0b42a3e8c5..18e997e4dbf1b4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dom-range.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dom-range.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Document Object Model Range",D:true}; +module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Document Object Model Range",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/domcontentloaded.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/domcontentloaded.js index c197f3d23c00aa..778c69d1b61500 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/domcontentloaded.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/domcontentloaded.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"DOMContentLoaded",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"DOMContentLoaded",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dommatrix.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dommatrix.js index c37a2e5f207ac9..ae3a41a089381d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dommatrix.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dommatrix.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"132":"C K L H M N O","1028":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB RC SC","1028":"0 1 2 3 4 5 6 qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2564":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB","3076":"YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB"},D:{"16":"7 I J E","132":"8 9 G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB","388":"F","1028":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"16":"I TC BC","132":"7 J E F G A UC VC WC XC CC","1028":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","132":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB","1028":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"16":"BC iC OC","132":"F jC kC lC mC nC oC pC qC","1028":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"132":"I 8C OC 9C AD","292":"4B 5C 6C 7C","1028":"D"},J:{"16":"E","132":"A"},K:{"2":"A B C zB NC 0B","1028":"r"},L:{"1028":"D"},M:{"1028":"D"},N:{"132":"A B"},O:{"1028":"1B"},P:{"132":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1028":"DC"},R:{"1028":"ND"},S:{"1028":"PD","2564":"OD"}},B:4,C:"DOMMatrix",D:true}; +module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"132":"C K L H M N O","1028":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB SC TC","1028":"0 1 2 3 4 5 6 qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2564":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB","3076":"YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB"},D:{"16":"7 I J E","132":"8 9 G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB","388":"F","1028":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"16":"I UC BC","132":"7 J E F G A VC WC XC YC CC","1028":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","132":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB","1028":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"16":"BC jC OC","132":"F kC lC mC nC oC pC qC rC","1028":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"132":"I 9C OC AD BD","292":"4B 6C 7C 8C","1028":"D"},J:{"16":"E","132":"A"},K:{"2":"A B C zB NC 0B","1028":"s"},L:{"1028":"D"},M:{"1028":"D"},N:{"132":"A B"},O:{"1028":"1B"},P:{"132":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1028":"DC"},R:{"1028":"OD"},S:{"1028":"QD","2564":"PD"}},B:4,C:"DOMMatrix",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/download.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/download.js index 8a49fa8cb4248a..695d1c7ec18f95 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/download.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/download.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Download attribute",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Download attribute",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dragndrop.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dragndrop.js index 7f8f95f00106e9..546fb32b26a71e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dragndrop.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/dragndrop.js @@ -1 +1 @@ -module.exports={A:{A:{"644":"J E F G PC","772":"A B"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","8":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","8":"G B dC eC fC gC zB NC hC"},G:{"1":"1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","1025":"D"},J:{"2":"E A"},K:{"1":"0B","8":"A B C zB NC","1025":"r"},L:{"1025":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"1025":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:1,C:"Drag and Drop",D:true}; +module.exports={A:{A:{"644":"J E F G PC","772":"A B"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","8":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","8":"G B eC fC gC hC zB NC iC"},G:{"1":"2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","1025":"D"},J:{"2":"E A"},K:{"1":"0B","8":"A B C zB NC","1025":"s"},L:{"1025":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"1025":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:1,C:"Drag and Drop",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-closest.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-closest.js index 01087e248cd02e..6226c876a1cacc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-closest.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-closest.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L"},C:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB RC SC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB dC eC fC gC zB NC hC 0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Element.closest()",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L"},C:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB SC TC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB eC fC gC hC zB NC iC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Element.closest()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-from-point.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-from-point.js index b5c653a37c0e15..7eb78a29ba9420 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-from-point.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-from-point.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","16":"QC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"I TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","16":"G dC eC fC gC"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"1":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"C r 0B","16":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"document.elementFromPoint()",D:true}; +module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","16":"QC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"I UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","16":"G eC fC gC hC"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"1":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"C s 0B","16":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"document.elementFromPoint()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-scroll-methods.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-scroll-methods.js index 123eb9baf524f0..0528cb3551f692 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-scroll-methods.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/element-scroll-methods.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB RC SC"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"1":"L H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC","132":"A B C K CC zB 0B DC"},F:{"1":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB dC eC fC gC zB NC hC 0B"},G:{"1":"0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC","132":"pC qC rC sC tC uC vC wC xC yC zC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Scroll methods on elements (scroll, scrollTo, scrollBy)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB SC TC"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"1":"L H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC","132":"A B C K CC zB 0B DC"},F:{"1":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB eC fC gC hC zB NC iC 0B"},G:{"1":"1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC","132":"qC rC sC tC uC vC wC xC yC zC 0C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Scroll methods on elements (scroll, scrollTo, scrollBy)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eme.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eme.js index ce68634613d17d..5e5bc9cc0a541d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eme.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eme.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","164":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB RC SC"},D:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB","132":"KB LB MB NB OB PB QB"},E:{"1":"C K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC VC","164":"E F G A B WC XC CC zB"},F:{"1":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o dC eC fC gC zB NC hC 0B","132":"9 p q AB BB CB DB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"Encrypted Media Extensions",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","164":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB SC TC"},D:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB","132":"KB LB MB NB OB PB QB"},E:{"1":"C K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC WC","164":"E F G A B XC YC CC zB"},F:{"1":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p eC fC gC hC zB NC iC 0B","132":"9 q r AB BB CB DB"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"Encrypted Media Extensions",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eot.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eot.js index c559d2cbedeca4..cb78cb46673242 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eot.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eot.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B","2":"PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"EOT - Embedded OpenType fonts",D:true}; +module.exports={A:{A:{"1":"J E F G A B","2":"PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"EOT - Embedded OpenType fonts",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es5.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es5.js index e4f42e319d7dea..32ab39fe9211a3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es5.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es5.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E PC","260":"G","1026":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"QC 4B RC SC","132":"7 8 I J E F G A B C K L H M N O n"},D:{"1":"0 1 2 3 4 5 6 9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"7 I J E F G A B C K L H M N O","132":"8 n o p"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","4":"7 I TC BC UC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","4":"G B C dC eC fC gC zB NC hC","132":"0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","4":"BC iC OC jC"},H:{"132":"4C"},I:{"1":"D 9C AD","4":"4B 5C 6C 7C","132":"8C OC","900":"I"},J:{"1":"A","4":"E"},K:{"1":"r","4":"A B C zB NC","132":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"ECMAScript 5",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E PC","260":"G","1026":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","4":"QC 4B SC TC","132":"7 8 I J E F G A B C K L H M N O o"},D:{"1":"0 1 2 3 4 5 6 9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","4":"7 I J E F G A B C K L H M N O","132":"8 o p q"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","4":"7 I UC BC VC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","4":"G B C eC fC gC hC zB NC iC","132":"0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","4":"BC jC OC kC"},H:{"132":"5C"},I:{"1":"D AD BD","4":"4B 6C 7C 8C","132":"9C OC","900":"I"},J:{"1":"A","4":"E"},K:{"1":"s","4":"A B C zB NC","132":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"ECMAScript 5",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-class.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-class.js index 341f6ca2afdd1b..78182aea800658 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-class.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-class.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB RC SC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB","132":"RB SB TB UB VB WB XB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB dC eC fC gC zB NC hC 0B","132":"EB FB GB HB IB JB KB"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"ES6 classes",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB SC TC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB","132":"RB SB TB UB VB WB XB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB eC fC gC hC zB NC iC 0B","132":"EB FB GB HB IB JB KB"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"ES6 classes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-generators.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-generators.js index efb2befc7ef90f..964d2acf61ad8c 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-generators.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-generators.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB RC SC"},D:{"1":"0 1 2 3 4 5 6 OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB dC eC fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"ES6 Generators",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB SC TC"},D:{"1":"0 1 2 3 4 5 6 OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB eC fC gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"ES6 Generators",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js index f2d61816ea7efd..4eb6848c773f39 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-module-dynamic-import.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB RC SC","194":"nB"},D:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC"},F:{"1":"ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB dC eC fC gC zB NC hC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:6,C:"JavaScript modules: dynamic import()",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB SC TC","194":"nB"},D:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC"},F:{"1":"ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB eC fC gC hC zB NC iC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:6,C:"JavaScript modules: dynamic import()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-module.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-module.js index ece8b34de7e8fd..f1b81a28832baa 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-module.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-module.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L","2049":"M N O","2242":"H"},C:{"1":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB RC SC","322":"dB eB fB gB hB 5B"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","194":"iB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC","1540":"CC"},F:{"1":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB dC eC fC gC zB NC hC 0B","194":"WB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC","1540":"qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:1,C:"JavaScript modules via script tag",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L","2049":"M N O","2242":"H"},C:{"1":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB SC TC","322":"dB eB fB gB hB 5B"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","194":"iB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC","1540":"CC"},F:{"1":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB eC fC gC hC zB NC iC 0B","194":"WB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC","1540":"rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:1,C:"JavaScript modules via script tag",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-number.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-number.js index e9cbdf8733d0fe..944cc1e8682080 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-number.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-number.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H RC SC","132":"8 9 M N O n o p q","260":"AB BB CB DB EB FB","516":"GB"},D:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N O","1028":"8 9 n o p q AB BB CB DB EB FB GB HB IB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","1028":"8 H M N O n"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C","1028":"8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"ES6 Number",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H SC TC","132":"8 9 M N O o p q r","260":"AB BB CB DB EB FB","516":"GB"},D:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N O","1028":"8 9 o p q r AB BB CB DB EB FB GB HB IB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","1028":"8 H M N O o"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C","1028":"9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"ES6 Number",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-string-includes.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-string-includes.js index 65ce9b1a3b3a18..43648652c14941 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-string-includes.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6-string-includes.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB RC SC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB dC eC fC gC zB NC hC 0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"String.prototype.includes",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB SC TC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB eC fC gC hC zB NC iC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"String.prototype.includes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6.js index d23aec4c1b3ca8..eab692e2c5a71a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/es6.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","388":"B"},B:{"257":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K L","769":"H M N O"},C:{"2":"7 QC 4B I RC SC","4":"8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB","257":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 I J E F G A B C K L H M N O n","4":"9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","257":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC","4":"F G WC XC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","4":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB","257":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC","4":"F lC mC nC oC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC","4":"9C AD","257":"D"},J:{"2":"E","4":"A"},K:{"2":"A B C zB NC 0B","257":"r"},L:{"257":"D"},M:{"257":"D"},N:{"2":"A","388":"B"},O:{"257":"1B"},P:{"4":"I","257":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"257":"DC"},R:{"257":"ND"},S:{"4":"OD","257":"PD"}},B:6,C:"ECMAScript 2015 (ES6)",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","388":"B"},B:{"257":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K L","769":"H M N O"},C:{"2":"7 QC 4B I SC TC","4":"8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB","257":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 I J E F G A B C K L H M N O o","4":"9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","257":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC","4":"F G XC YC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","4":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB","257":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC","4":"F mC nC oC pC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC","4":"AD BD","257":"D"},J:{"2":"E","4":"A"},K:{"2":"A B C zB NC 0B","257":"s"},L:{"257":"D"},M:{"257":"D"},N:{"2":"A","388":"B"},O:{"257":"1B"},P:{"4":"I","257":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"257":"DC"},R:{"257":"OD"},S:{"4":"PD","257":"QD"}},B:6,C:"ECMAScript 2015 (ES6)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eventsource.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eventsource.js index da57e3476c7d97..74f47daffbbad8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eventsource.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/eventsource.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","4":"G dC eC fC gC"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"E A"},K:{"1":"C r zB NC 0B","4":"A B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Server-sent events",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","4":"G eC fC gC hC"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"E A"},K:{"1":"C s zB NC 0B","4":"A B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Server-sent events",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/extended-system-fonts.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/extended-system-fonts.js index ef65dbee6b3384..9cf1d9f92c51ab 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/extended-system-fonts.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/extended-system-fonts.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K TC BC UC VC WC XC CC zB 0B"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"ui-serif, ui-sans-serif, ui-monospace and ui-rounded values for font-family",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K UC BC VC WC XC YC CC zB 0B"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"ui-serif, ui-sans-serif, ui-monospace and ui-rounded values for font-family",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/feature-policy.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/feature-policy.js index c738c2dcb1ee01..8f4ba91c7e1e4e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/feature-policy.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/feature-policy.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"P Q R S T U V W","2":"C K L H M N O","1025":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r RC SC","260":"0 1 2 3 4 5 6 uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"uB vB wB xB yB P Q R S T U V W","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","132":"iB 6B jB kB lB mB nB oB pB qB rB sB tB r","1025":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B TC BC UC VC WC XC CC","772":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"jB kB lB mB nB oB pB qB rB sB tB r uB","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB dC eC fC gC zB NC hC 0B","132":"WB XB YB ZB aB bB cB dB eB fB gB hB iB","1025":"vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC","772":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","1025":"r"},L:{"1025":"D"},M:{"260":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD","132":"ED FD CC"},Q:{"132":"DC"},R:{"1025":"ND"},S:{"2":"OD","260":"PD"}},B:7,C:"Feature Policy",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"P Q R S T U V W","2":"C K L H M N O","1025":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s SC TC","260":"0 1 2 3 4 5 6 uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"uB vB wB xB yB P Q R S T U V W","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","132":"iB 6B jB kB lB mB nB oB pB qB rB sB tB s","1025":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B UC BC VC WC XC YC CC","772":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"jB kB lB mB nB oB pB qB rB sB tB s uB","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB eC fC gC hC zB NC iC 0B","132":"WB XB YB ZB aB bB cB dB eB fB gB hB iB","1025":"vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC","772":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","1025":"s"},L:{"1025":"D"},M:{"260":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED","132":"FD GD CC"},Q:{"132":"DC"},R:{"1025":"OD"},S:{"2":"PD","260":"QD"}},B:7,C:"Feature Policy",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fetch.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fetch.js index 09cd555c69d660..5dd694f2f55fd5 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fetch.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fetch.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB RC SC","1025":"OB","1218":"JB KB LB MB NB"},D:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB","260":"PB","772":"QB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB dC eC fC gC zB NC hC 0B","260":"CB","772":"DB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Fetch",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB SC TC","1025":"OB","1218":"JB KB LB MB NB"},D:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB","260":"PB","772":"QB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB eC fC gC hC zB NC iC 0B","260":"CB","772":"DB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Fetch",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fieldset-disabled.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fieldset-disabled.js index 30e22513b00c9d..8cdbd68221c147 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fieldset-disabled.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fieldset-disabled.js @@ -1 +1 @@ -module.exports={A:{A:{"16":"PC","132":"F G","388":"J E A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H","16":"8 M N O"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m eC fC gC zB NC hC 0B","16":"G dC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC"},H:{"388":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A","260":"B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"disabled attribute of the fieldset element",D:true}; +module.exports={A:{A:{"16":"PC","132":"F G","388":"J E A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H","16":"8 M N O"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n fC gC hC zB NC iC 0B","16":"G eC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC"},H:{"388":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A","260":"B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"disabled attribute of the fieldset element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fileapi.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fileapi.js index 96a38e5a7fe277..a847abfa7ac7b0 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fileapi.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fileapi.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","260":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC","260":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB SC"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I","260":"8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB","388":"J E F G A B C"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC","260":"J E F G VC WC XC","388":"UC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B dC eC fC gC","260":"8 9 C H M N O n o p q zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","260":"F kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D AD","2":"5C 6C 7C","260":"9C","388":"4B I 8C OC"},J:{"260":"A","388":"E"},K:{"1":"r","2":"A B","260":"C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A","260":"B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"File API",D:true}; +module.exports={A:{A:{"2":"J E F G PC","260":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC","260":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB TC"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I","260":"8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB","388":"J E F G A B C"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC","260":"J E F G WC XC YC","388":"VC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B eC fC gC hC","260":"8 9 C H M N O o p q r zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","260":"F lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D BD","2":"6C 7C 8C","260":"AD","388":"4B I 9C OC"},J:{"260":"A","388":"E"},K:{"1":"s","2":"A B","260":"C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A","260":"B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"File API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filereader.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filereader.js index a152789001747e..b5d14638a20adb 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filereader.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filereader.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC SC","2":"QC 4B RC"},D:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","2":"G B dC eC fC gC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC"},H:{"2":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"A","2":"E"},K:{"1":"C r zB NC 0B","2":"A B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"FileReader API",D:true}; +module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC TC","2":"QC 4B SC"},D:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","2":"G B eC fC gC hC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC"},H:{"2":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"A","2":"E"},K:{"1":"C s zB NC 0B","2":"A B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"FileReader API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filereadersync.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filereadersync.js index 927ed2d925c1b2..83fa91f8019881 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filereadersync.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filereadersync.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G dC eC","16":"B fC gC zB NC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"C r NC 0B","2":"A","16":"B zB"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"FileReaderSync",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G eC fC","16":"B gC hC zB NC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"C s NC 0B","2":"A","16":"B zB"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"FileReaderSync",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filesystem.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filesystem.js index 33bd60a9a38fae..c59ab3f9f96bc7 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filesystem.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/filesystem.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 I J E","33":"0 1 2 3 4 5 6 8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","36":"F G A B C"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","33":"A"},K:{"2":"A B C zB NC 0B","33":"r"},L:{"33":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"33":"1B"},P:{"2":"I","33":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"33":"ND"},S:{"2":"OD PD"}},B:7,C:"Filesystem & FileWriter API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 I J E","33":"0 1 2 3 4 5 6 8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","36":"F G A B C"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E","33":"A"},K:{"2":"A B C zB NC 0B","33":"s"},L:{"33":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"33":"1B"},P:{"2":"I","33":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"33":"OD"},S:{"2":"PD QD"}},B:7,C:"Filesystem & FileWriter API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flac.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flac.js index 1b96701a5fd9ed..2ec55fa359f219 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flac.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flac.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB RC SC"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB","16":"TB UB VB","388":"WB XB YB ZB aB bB cB dB eB"},E:{"1":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC","516":"B C zB 0B"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB dC eC fC gC zB NC hC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC"},H:{"2":"4C"},I:{"1":"D","2":"5C 6C 7C","16":"4B I 8C OC 9C AD"},J:{"1":"A","2":"E"},K:{"1":"r 0B","16":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","129":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:6,C:"FLAC audio format",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB SC TC"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB","16":"TB UB VB","388":"WB XB YB ZB aB bB cB dB eB"},E:{"1":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC","516":"B C zB 0B"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB eC fC gC hC zB NC iC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC"},H:{"2":"5C"},I:{"1":"D","2":"6C 7C 8C","16":"4B I 9C OC AD BD"},J:{"1":"A","2":"E"},K:{"1":"s 0B","16":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","129":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:6,C:"FLAC audio format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flexbox-gap.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flexbox-gap.js index ef4dfb9c79af06..639fe5f51676d4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flexbox-gap.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flexbox-gap.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O P Q R S"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB RC SC"},D:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S"},E:{"1":"H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L TC BC UC VC WC XC CC zB 0B DC"},F:{"1":"rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB dC eC fC gC zB NC hC 0B"},G:{"1":"0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"gap property for Flexbox",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O P Q R S"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB SC TC"},D:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S"},E:{"1":"H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L UC BC VC WC XC YC CC zB 0B DC"},F:{"1":"rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB eC fC gC hC zB NC iC 0B"},G:{"1":"1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"gap property for Flexbox",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flexbox.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flexbox.js index 261369dd604317..74584c9359acbe 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flexbox.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flexbox.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","1028":"B","1316":"A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","164":"7 8 QC 4B I J E F G A B C K L H M N O n o RC SC","516":"9 p q AB BB CB"},D:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"9 o p q AB BB CB DB","164":"7 8 I J E F G A B C K L H M N O n"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","33":"E F VC WC","164":"7 I J TC BC UC"},F:{"1":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B C dC eC fC gC zB NC hC","33":"H M"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","33":"F lC mC","164":"BC iC OC jC kC"},H:{"1":"4C"},I:{"1":"D 9C AD","164":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","164":"E"},K:{"1":"r 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","292":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS Flexible Box Layout Module",D:true}; +module.exports={A:{A:{"2":"J E F G PC","1028":"B","1316":"A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","164":"7 8 QC 4B I J E F G A B C K L H M N O o p SC TC","516":"9 q r AB BB CB"},D:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"9 p q r AB BB CB DB","164":"7 8 I J E F G A B C K L H M N O o"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","33":"E F WC XC","164":"7 I J UC BC VC"},F:{"1":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B C eC fC gC hC zB NC iC","33":"H M"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","33":"F mC nC","164":"BC jC OC kC lC"},H:{"1":"5C"},I:{"1":"D AD BD","164":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","164":"E"},K:{"1":"s 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","292":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS Flexible Box Layout Module",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flow-root.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flow-root.js index 262ed678940493..2bab86a16c1a03 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flow-root.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/flow-root.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB RC SC"},D:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB"},E:{"1":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB 0B"},F:{"1":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB dC eC fC gC zB NC hC 0B"},G:{"1":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:4,C:"display: flow-root",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB SC TC"},D:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB"},E:{"1":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB 0B"},F:{"1":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB eC fC gC hC zB NC iC 0B"},G:{"1":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:4,C:"display: flow-root",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/focusin-focusout-events.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/focusin-focusout-events.js index 22cd07b72d1cde..f968726d826d3e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/focusin-focusout-events.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/focusin-focusout-events.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B","2":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I TC BC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G dC eC fC gC","16":"B zB NC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"2":"4C"},I:{"1":"I D 8C OC 9C AD","2":"5C 6C 7C","16":"4B"},J:{"1":"E A"},K:{"1":"C r 0B","2":"A","16":"B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"focusin & focusout events",D:true}; +module.exports={A:{A:{"1":"J E F G A B","2":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I UC BC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G eC fC gC hC","16":"B zB NC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"2":"5C"},I:{"1":"I D 9C OC AD BD","2":"6C 7C 8C","16":"4B"},J:{"1":"E A"},K:{"1":"C s 0B","2":"A","16":"B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"focusin & focusout events",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-family-system-ui.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-family-system-ui.js index 078a206364b064..93311522126976 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-family-system-ui.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-family-system-ui.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB RC SC","132":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB","260":"cB dB eB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC","16":"G","132":"A XC CC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB dC eC fC gC zB NC hC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC","132":"nC oC pC qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"132":"OD PD"}},B:5,C:"system-ui value for font-family",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SC TC","132":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB","260":"cB dB eB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC","16":"G","132":"A YC CC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB eC fC gC hC zB NC iC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC","132":"oC pC qC rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"132":"PD QD"}},B:5,C:"system-ui value for font-family",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-feature.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-feature.js index bb18afb62b9c2d..82f77c27db729e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-feature.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-feature.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB","164":"7 I J E F G A B C K L"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H","33":"9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB","292":"8 M N O n"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"E F G TC BC VC WC","4":"7 I J UC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F lC mC nC","4":"BC iC OC jC kC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC","33":"9C AD"},J:{"2":"E","33":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","33":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS font-feature-settings",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB","164":"7 I J E F G A B C K L"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H","33":"9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB","292":"8 M N O o"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"E F G UC BC WC XC","4":"7 I J VC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F mC nC oC","4":"BC jC OC kC lC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC","33":"AD BD"},J:{"2":"E","33":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","33":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS font-feature-settings",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-kerning.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-kerning.js index c453d25d761ea0..1ac843b34d6ce7 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-kerning.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-kerning.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n o p q RC SC","194":"9 AB BB CB DB EB FB GB HB IB"},D:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB","33":"EB FB GB HB"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC VC","33":"E F G WC"},F:{"1":"9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C H dC eC fC gC zB NC hC 0B","33":"8 M N O"},G:{"1":"tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC","33":"F mC nC oC pC qC rC sC"},H:{"2":"4C"},I:{"1":"D AD","2":"4B I 5C 6C 7C 8C OC","33":"9C"},J:{"2":"E","33":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS3 font-kerning",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o p q r SC TC","194":"9 AB BB CB DB EB FB GB HB IB"},D:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB","33":"EB FB GB HB"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC WC","33":"E F G XC"},F:{"1":"9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C H eC fC gC hC zB NC iC 0B","33":"8 M N O"},G:{"1":"uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC","33":"F nC oC pC qC rC sC tC"},H:{"2":"5C"},I:{"1":"D BD","2":"4B I 6C 7C 8C 9C OC","33":"AD"},J:{"2":"E","33":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS3 font-kerning",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-loading.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-loading.js index b4f36bafcadfd1..3a8b261e02d238 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-loading.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-loading.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB RC SC","194":"KB LB MB NB OB PB"},D:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o dC eC fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"CSS Font Loading",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB SC TC","194":"KB LB MB NB OB PB"},D:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p eC fC gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"CSS Font Loading",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-size-adjust.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-size-adjust.js index d9038d277f22af..3221d160cc69d4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-size-adjust.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-size-adjust.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","194":"5 6 D","962":"0 1 2 3 4 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z"},C:{"1":"6 D 8B 9B AC","2":"QC","516":"0 1 2 3 4 5 b c d e f g h i j k l m s t u v w x y z","772":"7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","194":"8B 9B AC","962":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},E:{"1":"3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC","772":"JC KC bC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB dC eC fC gC zB NC hC 0B","194":"l m","962":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k"},G:{"1":"3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC","772":"JC KC 3C"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"194":"DC"},R:{"2":"ND"},S:{"2":"OD","516":"PD"}},B:2,C:"CSS font-size-adjust",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","194":"5 6 D","962":"0 1 2 3 4 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z"},C:{"1":"6 D 8B 9B AC RC","2":"QC","516":"0 1 2 3 4 5 b c d e f g h i j k l m n t u v w x y z","772":"7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","194":"8B 9B AC","962":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},E:{"1":"3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC","772":"JC KC cC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB eC fC gC hC zB NC iC 0B","194":"l m n","962":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k"},G:{"1":"3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC","772":"JC KC 4C"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"194":"DC"},R:{"2":"OD"},S:{"2":"PD","516":"QD"}},B:2,C:"CSS font-size-adjust",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-smooth.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-smooth.js index e50c8a632d17d1..057397b95b09a5 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-smooth.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-smooth.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","676":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q RC SC","804":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"I","676":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"TC BC","676":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","676":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"804":"OD PD"}},B:7,C:"CSS font-smooth",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","676":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r SC TC","804":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"I","676":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"UC BC","676":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","676":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"804":"PD QD"}},B:7,C:"CSS font-smooth",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-unicode-range.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-unicode-range.js index e428a2b203ee18..7f0ecd47024cd9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-unicode-range.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-unicode-range.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","4":"G A B"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","4":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB RC SC","194":"LB MB NB OB PB QB RB SB"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","4":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","4":"8 H M N O n o p"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","4":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","4":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","4":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"4":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","4":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"Font unicode-range subsetting",D:true}; +module.exports={A:{A:{"2":"J E F PC","4":"G A B"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","4":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB SC TC","194":"LB MB NB OB PB QB RB SB"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","4":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","4":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","4":"8 H M N O o p q"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","4":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","4":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E","4":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"4":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","4":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"Font unicode-range subsetting",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-variant-alternates.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-variant-alternates.js index 2f4c67f8251153..e77bdeffa8c471 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-variant-alternates.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-variant-alternates.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","130":"A B"},B:{"1":"0 1 2 3 4 5 6 z D","130":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","130":"7 8 I J E F G A B C K L H M N O n o p q","322":"9 AB BB CB DB EB FB GB HB IB"},D:{"1":"0 1 2 3 4 5 6 z D 8B 9B AC","2":"7 I J E F G A B C K L H","130":"8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"E F G TC BC VC WC","130":"7 I J UC"},F:{"1":"h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","130":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC lC mC nC","130":"iC OC jC kC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC","130":"9C AD"},J:{"2":"E","130":"A"},K:{"2":"A B C zB NC 0B","130":"r"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"130":"1B"},P:{"1":"p q","130":"I n o BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"130":"DC"},R:{"130":"ND"},S:{"1":"OD PD"}},B:5,C:"CSS font-variant-alternates",D:true}; +module.exports={A:{A:{"2":"J E F G PC","130":"A B"},B:{"1":"0 1 2 3 4 5 6 z D","130":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","130":"7 8 I J E F G A B C K L H M N O o p q r","322":"9 AB BB CB DB EB FB GB HB IB"},D:{"1":"0 1 2 3 4 5 6 z D 8B 9B AC","2":"7 I J E F G A B C K L H","130":"8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"E F G UC BC WC XC","130":"7 I J VC"},F:{"1":"h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","130":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC mC nC oC","130":"jC OC kC lC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC","130":"AD BD"},J:{"2":"E","130":"A"},K:{"2":"A B C zB NC 0B","130":"s"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"130":"1B"},P:{"1":"q r","130":"I o p CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"130":"DC"},R:{"130":"OD"},S:{"1":"PD QD"}},B:5,C:"CSS font-variant-alternates",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-variant-numeric.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-variant-numeric.js index e7fb194553ae24..19051c9c2179d2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-variant-numeric.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/font-variant-numeric.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB RC SC"},D:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC"},F:{"1":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB dC eC fC gC zB NC hC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","16":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS font-variant-numeric",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB SC TC"},D:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC"},F:{"1":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB eC fC gC hC zB NC iC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E","16":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS font-variant-numeric",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fontface.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fontface.js index 15e974c5f61b0a..15ec93d243e77d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fontface.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fontface.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","132":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m eC fC gC zB NC hC 0B","2":"G dC"},G:{"1":"F OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","260":"BC iC"},H:{"2":"4C"},I:{"1":"I D 8C OC 9C AD","2":"5C","4":"4B 6C 7C"},J:{"1":"A","4":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"@font-face Web fonts",D:true}; +module.exports={A:{A:{"1":"G A B","132":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n fC gC hC zB NC iC 0B","2":"G eC"},G:{"1":"F OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","260":"BC jC"},H:{"2":"5C"},I:{"1":"I D 9C OC AD BD","2":"6C","4":"4B 7C 8C"},J:{"1":"A","4":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"@font-face Web fonts",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-attribute.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-attribute.js index fa335987115c10..40229341dd854f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-attribute.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-attribute.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","16":"7"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"1":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Form attribute",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","16":"7"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"1":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Form attribute",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-submit-attributes.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-submit-attributes.js index 529761fd28d8ec..4d685941c5b816 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-submit-attributes.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-submit-attributes.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m gC zB NC hC 0B","2":"G dC","16":"eC fC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"1":"4C"},I:{"1":"I D 8C OC 9C AD","2":"5C 6C 7C","16":"4B"},J:{"1":"A","2":"E"},K:{"1":"B C r zB NC 0B","16":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Attributes for form submission",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n hC zB NC iC 0B","2":"G eC","16":"fC gC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"1":"5C"},I:{"1":"I D 9C OC AD BD","2":"6C 7C 8C","16":"4B"},J:{"1":"A","2":"E"},K:{"1":"B C s zB NC 0B","16":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Attributes for form submission",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-validation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-validation.js index 057beac8bad86b..8fab69c0a2397e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-validation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/form-validation.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","132":"7 J E F G A UC VC WC XC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m eC fC gC zB NC hC 0B","2":"G dC"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC","132":"F iC OC jC kC lC mC nC oC pC"},H:{"516":"4C"},I:{"1":"D AD","2":"4B 5C 6C 7C","132":"I 8C OC 9C"},J:{"1":"A","132":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"260":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","132":"OD"}},B:1,C:"Form validation",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","132":"7 J E F G A VC WC XC YC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n fC gC hC zB NC iC 0B","2":"G eC"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC","132":"F jC OC kC lC mC nC oC pC qC"},H:{"516":"5C"},I:{"1":"D BD","2":"4B 6C 7C 8C","132":"I 9C OC AD"},J:{"1":"A","132":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"260":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","132":"PD"}},B:1,C:"Form validation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/forms.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/forms.js index b7d4772484a247..dd50ea578d9e88 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/forms.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/forms.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"PC","4":"A B","8":"J E F G"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","4":"C K L H"},C:{"4":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"4":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"TC BC"},F:{"1":"G B C bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","4":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},G:{"2":"BC","4":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC","4":"9C AD"},J:{"2":"E","4":"A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"4":"D"},N:{"4":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","4":"I BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"4":"OD PD"}},B:1,C:"HTML5 form features",D:false}; +module.exports={A:{A:{"2":"PC","4":"A B","8":"J E F G"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","4":"C K L H"},C:{"4":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","8":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","4":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"4":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"UC BC"},F:{"1":"G B C bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","4":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},G:{"2":"BC","4":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC","4":"AD BD"},J:{"2":"E","4":"A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"4":"D"},N:{"4":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","4":"I CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"4":"PD QD"}},B:1,C:"HTML5 form features",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fullscreen.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fullscreen.js index 640182705b0b0b..7a518fc2de17f8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fullscreen.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/fullscreen.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","548":"B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","516":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G RC SC","676":"8 9 A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB","1700":"WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB"},D:{"1":"0 1 2 3 4 5 6 sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L","676":"8 H M N O","804":"9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB"},E:{"1":"JC KC bC 3B LC MC cC","2":"7 I TC BC","548":"FC 1B aC 2B GC HC IC","676":"UC","804":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC"},F:{"1":"lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B C dC eC fC gC zB NC hC","804":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB"},G:{"1":"MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC","2052":"tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","292":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A","548":"B"},O:{"1":"1B"},P:{"1":"n o p q CC GD HD ID JD KD 2B 3B LD MD","804":"I BD CD DD ED FD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Full Screen API",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","548":"B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","516":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G SC TC","676":"8 9 A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB","1700":"WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB"},D:{"1":"0 1 2 3 4 5 6 sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L","676":"8 H M N O","804":"9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB"},E:{"1":"JC KC cC 3B LC MC dC","2":"7 I UC BC","548":"FC 1B bC 2B GC HC IC","676":"VC","804":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC"},F:{"1":"lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B C eC fC gC hC zB NC iC","804":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB"},G:{"1":"MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC","2052":"uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E","292":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A","548":"B"},O:{"1":"1B"},P:{"1":"o p q r CC HD ID JD KD LD 2B 3B MD ND","804":"I CD DD ED FD GD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Full Screen API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/gamepad.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/gamepad.js index 783f27fcefd8e3..c4ee983b58c43e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/gamepad.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/gamepad.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n","33":"9 o p q"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"Gamepad API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o","33":"9 p q r"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"Gamepad API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/geolocation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/geolocation.js index acf08a0881f025..00f006737a1c20 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/geolocation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/geolocation.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E F"},B:{"1":"C K L H M N O","129":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB RC SC","8":"QC 4B","129":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","4":"I","129":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"I TC BC","129":"A"},F:{"1":"8 9 B C M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB gC zB NC hC 0B","2":"G H dC","8":"eC fC","129":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"F BC iC OC jC kC lC mC nC oC","129":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I 5C 6C 7C 8C OC 9C AD","129":"D"},J:{"1":"E A"},K:{"1":"B C zB NC 0B","8":"A","129":"r"},L:{"129":"D"},M:{"129":"D"},N:{"1":"A B"},O:{"129":"1B"},P:{"1":"I","129":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"129":"DC"},R:{"129":"ND"},S:{"1":"OD","129":"PD"}},B:2,C:"Geolocation",D:true}; +module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E F"},B:{"1":"C K L H M N O","129":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB SC TC","8":"QC 4B","129":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","4":"I","129":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"I UC BC","129":"A"},F:{"1":"8 9 B C M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB hC zB NC iC 0B","2":"G H eC","8":"fC gC","129":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"F BC jC OC kC lC mC nC oC pC","129":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I 6C 7C 8C 9C OC AD BD","129":"D"},J:{"1":"E A"},K:{"1":"B C zB NC 0B","8":"A","129":"s"},L:{"129":"D"},M:{"129":"D"},N:{"1":"A B"},O:{"129":"1B"},P:{"1":"I","129":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"129":"DC"},R:{"129":"OD"},S:{"1":"PD","129":"QD"}},B:2,C:"Geolocation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getboundingclientrect.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getboundingclientrect.js index a11ec92104d72f..91f0021c7381f7 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getboundingclientrect.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getboundingclientrect.js @@ -1 +1 @@ -module.exports={A:{A:{"644":"J E PC","2049":"G A B","2692":"F"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2049":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC","260":"7 I J E F G A B","1156":"4B","1284":"RC","1796":"SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m gC zB NC hC 0B","16":"G dC","132":"eC fC"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"1":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","132":"A"},L:{"1":"D"},M:{"1":"D"},N:{"2049":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Element.getBoundingClientRect()",D:true}; +module.exports={A:{A:{"644":"J E PC","2049":"G A B","2692":"F"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2049":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC","260":"7 I J E F G A B","1156":"4B","1284":"SC","1796":"TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n hC zB NC iC 0B","16":"G eC","132":"fC gC"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"1":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","132":"A"},L:{"1":"D"},M:{"1":"D"},N:{"2049":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Element.getBoundingClientRect()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getcomputedstyle.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getcomputedstyle.js index a8c5a77acde602..19f6b4516e0219 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getcomputedstyle.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getcomputedstyle.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC","132":"4B RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","260":"7 I J E F G A"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","260":"I TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m gC zB NC hC 0B","260":"G dC eC fC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","260":"BC iC OC"},H:{"260":"4C"},I:{"1":"I D 8C OC 9C AD","260":"4B 5C 6C 7C"},J:{"1":"A","260":"E"},K:{"1":"B C r zB NC 0B","260":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"getComputedStyle",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC","132":"4B SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","260":"7 I J E F G A"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","260":"I UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n hC zB NC iC 0B","260":"G eC fC gC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","260":"BC jC OC"},H:{"260":"5C"},I:{"1":"I D 9C OC AD BD","260":"4B 6C 7C 8C"},J:{"1":"A","260":"E"},K:{"1":"B C s zB NC 0B","260":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"getComputedStyle",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getelementsbyclassname.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getelementsbyclassname.js index c7010bb176c366..28f6a136ac5a26 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getelementsbyclassname.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getelementsbyclassname.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","8":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"getElementsByClassName",D:true}; +module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","8":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"getElementsByClassName",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getrandomvalues.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getrandomvalues.js index 86e74d7fc9992a..c05b84826c219a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getrandomvalues.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/getrandomvalues.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","33":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A","33":"B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"crypto.getRandomValues()",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","33":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A","33":"B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"crypto.getRandomValues()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/gyroscope.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/gyroscope.js index 5112d52350f40a..6f6b3b0ca773c3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/gyroscope.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/gyroscope.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","194":"hB 5B iB 6B jB kB lB mB nB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:4,C:"Gyroscope",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","194":"hB 5B iB 6B jB kB lB mB nB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:4,C:"Gyroscope",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hardwareconcurrency.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hardwareconcurrency.js index a84de68e595655..c6b261b17ea45a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hardwareconcurrency.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hardwareconcurrency.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB RC SC"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB"},E:{"2":"7 I J E TC BC UC VC WC","129":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","194":"F G A XC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"2":"BC iC OC jC kC lC","129":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","194":"F mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"navigator.hardwareConcurrency",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB SC TC"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB"},E:{"2":"7 I J E UC BC VC WC XC","129":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","194":"F G A YC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"2":"BC jC OC kC lC mC","129":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","194":"F nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"navigator.hardwareConcurrency",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hashchange.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hashchange.js index 3cab2c8d5d0f10..561c0a9d3424a1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hashchange.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hashchange.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"F G A B","8":"J E PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC SC","8":"QC 4B RC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"I"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"I TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m gC zB NC hC 0B","8":"G dC eC fC"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC"},H:{"2":"4C"},I:{"1":"4B I D 6C 7C 8C OC 9C AD","2":"5C"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","8":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Hashchange event",D:true}; +module.exports={A:{A:{"1":"F G A B","8":"J E PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC TC","8":"QC 4B SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","8":"I"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"I UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n hC zB NC iC 0B","8":"G eC fC gC"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC"},H:{"2":"5C"},I:{"1":"4B I D 7C 8C 9C OC AD BD","2":"6C"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","8":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Hashchange event",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/heif.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/heif.js index 720cc61e4100aa..3248b6cf4fa549 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/heif.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/heif.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC","130":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC 3C","130":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"HEIF/HEIC image format",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC","130":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC 4C","130":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"HEIF/HEIC image format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hevc.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hevc.js index 48bb08058ac126..f0c8fcdb45dfbf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hevc.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hevc.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"132":"C K L H M N O","1028":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D RC SC","4162":"8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u","2052":"0 1 2 3 4 5 6 v w x y z D 8B 9B AC"},E:{"1":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC","516":"B C zB 0B"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c dC eC fC gC zB NC hC 0B","2052":"d e f g h i j k l m"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","2052":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","258":"r"},L:{"2052":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q","2":"I","258":"n BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:6,C:"HEVC/H.265 video format",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"132":"C K L H M N O","1028":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D SC TC","4162":"8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u","2052":"0 1 2 3 4 5 6 v w x y z D 8B 9B AC"},E:{"1":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC","516":"B C zB 0B"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c eC fC gC hC zB NC iC 0B","2052":"d e f g h i j k l m n"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","2052":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","258":"s"},L:{"2052":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"p q r","2":"I","258":"o CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:6,C:"HEVC/H.265 video format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hidden.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hidden.js index ccd92efbf294d1..3e714c8132a596 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hidden.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/hidden.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","2":"G B dC eC fC gC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"1":"4C"},I:{"1":"I D 8C OC 9C AD","2":"4B 5C 6C 7C"},J:{"1":"A","2":"E"},K:{"1":"C r zB NC 0B","2":"A B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"hidden attribute",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","2":"G B eC fC gC hC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"1":"5C"},I:{"1":"I D 9C OC AD BD","2":"4B 6C 7C 8C"},J:{"1":"A","2":"E"},K:{"1":"C s zB NC 0B","2":"A B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"hidden attribute",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/high-resolution-time.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/high-resolution-time.js index 017676e678f564..e21c3a8061eda1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/high-resolution-time.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/high-resolution-time.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB","2":"7 QC 4B I J E F G A B C K L RC SC","129":"eB fB gB","769":"hB 5B","1281":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O","33":"n o p q"},E:{"1":"F G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC WC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"High Resolution Time API",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB","2":"7 QC 4B I J E F G A B C K L SC TC","129":"eB fB gB","769":"hB 5B","1281":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O","33":"o p q r"},E:{"1":"F G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC XC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"High Resolution Time API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/history.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/history.js index a3e1eea44d3ffc..d2cc7d99d06e52 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/history.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/history.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"I"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","4":"7 UC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m NC hC 0B","2":"G B dC eC fC gC zB"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC","4":"OC"},H:{"2":"4C"},I:{"1":"D 6C 7C OC 9C AD","2":"4B I 5C 8C"},J:{"1":"E A"},K:{"1":"C r zB NC 0B","2":"A B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Session history management",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"I"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","4":"7 VC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n NC iC 0B","2":"G B eC fC gC hC zB"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC","4":"OC"},H:{"2":"5C"},I:{"1":"D 7C 8C OC AD BD","2":"4B I 6C 9C"},J:{"1":"E A"},K:{"1":"C s zB NC 0B","2":"A B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Session history management",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/html-media-capture.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/html-media-capture.js index ba5d19f5d19fc2..8fd5e032fca31c 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/html-media-capture.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/html-media-capture.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"BC iC OC jC","129":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C","257":"6C 7C"},J:{"1":"A","16":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"516":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"16":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:2,C:"HTML Media Capture",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"BC jC OC kC","129":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C","257":"7C 8C"},J:{"1":"A","16":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"516":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"16":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:2,C:"HTML Media Capture",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/html5semantic.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/html5semantic.js index 085f063bc7204f..ed3d3c691d7e44 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/html5semantic.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/html5semantic.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"PC","8":"J E F","260":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC","132":"4B RC SC","260":"7 8 I J E F G A B C K L H M N O n"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 I","260":"8 9 J E F G A B C K L H M N O n o p q AB"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","132":"I TC BC","260":"7 J UC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","132":"G B dC eC fC gC","260":"C zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","132":"BC","260":"iC OC jC kC"},H:{"132":"4C"},I:{"1":"D 9C AD","132":"5C","260":"4B I 6C 7C 8C OC"},J:{"260":"E A"},K:{"1":"r","132":"A","260":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"260":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"HTML5 semantic elements",D:true}; +module.exports={A:{A:{"2":"PC","8":"J E F","260":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC","132":"4B SC TC","260":"7 8 I J E F G A B C K L H M N O o"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","132":"7 I","260":"8 9 J E F G A B C K L H M N O o p q r AB"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","132":"I UC BC","260":"7 J VC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","132":"G B eC fC gC hC","260":"C zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","132":"BC","260":"jC OC kC lC"},H:{"132":"5C"},I:{"1":"D AD BD","132":"6C","260":"4B I 7C 8C 9C OC"},J:{"260":"E A"},K:{"1":"s","132":"A","260":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"260":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"HTML5 semantic elements",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http-live-streaming.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http-live-streaming.js index 1cfe25c6a468bf..6eb3bdf79e087d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http-live-streaming.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http-live-streaming.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"HTTP Live Streaming (HLS)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"HTTP Live Streaming (HLS)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http2.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http2.js index 5a637dfbc6671d..dcfa40ad2e5c91 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http2.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http2.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"C K L H M N O","513":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB RC SC","513":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"QB RB SB TB UB VB WB XB YB ZB","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","513":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC","260":"G A XC CC"},F:{"1":"DB EB FB GB HB IB JB KB LB MB","2":"8 9 G B C H M N O n o p q AB BB CB dC eC fC gC zB NC hC 0B","513":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","513":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","513":"r"},L:{"513":"D"},M:{"513":"D"},N:{"2":"A B"},O:{"513":"1B"},P:{"1":"I","513":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"513":"DC"},R:{"513":"ND"},S:{"1":"OD","513":"PD"}},B:6,C:"HTTP/2 protocol",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"C K L H M N O","513":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB SC TC","513":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"QB RB SB TB UB VB WB XB YB ZB","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","513":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC","260":"G A YC CC"},F:{"1":"DB EB FB GB HB IB JB KB LB MB","2":"8 9 G B C H M N O o p q r AB BB CB eC fC gC hC zB NC iC 0B","513":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","513":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","513":"s"},L:{"513":"D"},M:{"513":"D"},N:{"2":"A B"},O:{"513":"1B"},P:{"1":"I","513":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"513":"DC"},R:{"513":"OD"},S:{"1":"PD","513":"QD"}},B:6,C:"HTTP/2 protocol",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http3.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http3.js index a29291a6aa6647..baa6a31d0a1faf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http3.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/http3.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O","322":"P Q R S T","578":"U V"},C:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB RC SC","194":"tB r uB vB wB xB yB P Q R 7B S T U V W"},D:{"1":"0 1 2 3 4 5 6 W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB","322":"P Q R S T","578":"U V"},E:{"2":"7 I J E F G A B C K TC BC UC VC WC XC CC zB 0B DC","2052":"JC KC bC 3B LC MC cC","2116":"2B GC HC IC","3140":"L H YC ZC EC FC 1B aC"},F:{"1":"uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB dC eC fC gC zB NC hC 0B","578":"r"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC","2052":"JC KC 3C 3B LC MC","2116":"zC 0C 1C EC FC 1B 2C 2B GC HC IC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:6,C:"HTTP/3 protocol",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O","322":"P Q R S T","578":"U V"},C:{"1":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB SC TC","194":"tB s uB vB wB xB yB P Q R 7B S T U V W"},D:{"1":"0 1 2 3 4 5 6 W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB","322":"P Q R S T","578":"U V"},E:{"2":"7 I J E F G A B C K UC BC VC WC XC YC CC zB 0B DC","2052":"JC KC cC 3B LC MC dC","2116":"2B GC HC IC","3140":"L H ZC aC EC FC 1B bC"},F:{"1":"uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB eC fC gC hC zB NC iC 0B","578":"s"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC","2052":"JC KC 4C 3B LC MC","2116":"0C 1C 2C EC FC 1B 3C 2B GC HC IC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:6,C:"HTTP/3 protocol",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-sandbox.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-sandbox.js index d3a9c8a67d91d2..d786cef2723c10 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-sandbox.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-sandbox.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M RC SC","4":"8 9 N O n o p q AB BB CB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC"},H:{"2":"4C"},I:{"1":"4B I D 6C 7C 8C OC 9C AD","2":"5C"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"sandbox attribute for iframes",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M SC TC","4":"8 9 N O o p q r AB BB CB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC"},H:{"2":"5C"},I:{"1":"4B I D 7C 8C 9C OC AD BD","2":"6C"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"sandbox attribute for iframes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-seamless.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-seamless.js index 1627d09f2c8b7f..9aa9e4704682d8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-seamless.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-seamless.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 I J E F G A B C K L H M N O CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","66":"9 n o p q AB BB"},E:{"2":"7 I J F G A B C K L H TC BC UC VC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","130":"E WC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","130":"lC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"seamless attribute for iframes",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 I J E F G A B C K L H M N O CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","66":"9 o p q r AB BB"},E:{"2":"7 I J F G A B C K L H UC BC VC WC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","130":"E XC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","130":"mC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"seamless attribute for iframes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-srcdoc.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-srcdoc.js index e8fb18c6aa1b81..8f4a05e6866b17 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-srcdoc.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/iframe-srcdoc.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"PC","8":"J E F G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","8":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC","8":"7 8 9 4B I J E F G A B C K L H M N O n o p q RC SC"},D:{"1":"0 1 2 3 4 5 6 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K","8":"8 L H M N O"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC","8":"7 I UC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B dC eC fC gC","8":"C zB NC hC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC","8":"iC OC jC"},H:{"2":"4C"},I:{"1":"D 9C AD","8":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","8":"E"},K:{"1":"r","2":"A B","8":"C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"srcdoc attribute for iframes",D:true}; +module.exports={A:{A:{"2":"PC","8":"J E F G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","8":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC","8":"7 8 9 4B I J E F G A B C K L H M N O o p q r SC TC"},D:{"1":"0 1 2 3 4 5 6 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K","8":"8 L H M N O"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC","8":"7 I VC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B eC fC gC hC","8":"C zB NC iC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC","8":"jC OC kC"},H:{"2":"5C"},I:{"1":"D AD BD","8":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","8":"E"},K:{"1":"s","2":"A B","8":"C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"srcdoc attribute for iframes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/imagecapture.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/imagecapture.js index 0de73d580cd951..b25f6f604a03ad 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/imagecapture.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/imagecapture.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB RC SC","194":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB","322":"cB dB eB fB gB hB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB dC eC fC gC zB NC hC 0B","322":"PB QB RB SB TB UB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"194":"OD PD"}},B:5,C:"ImageCapture API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB SC TC","194":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB","322":"cB dB eB fB gB hB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB eC fC gC hC zB NC iC 0B","322":"PB QB RB SB TB UB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"194":"PD QD"}},B:5,C:"ImageCapture API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ime.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ime.js index bddf7d07d767e9..8249cca441d9ed 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ime.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ime.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","161":"B"},B:{"2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","161":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A","161":"B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Input Method Editor API",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","161":"B"},B:{"2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","161":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A","161":"B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Input Method Editor API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js index 77622a7aa24344..3d1d300b26ce82 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/img-naturalwidth-naturalheight.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"naturalWidth & naturalHeight image properties",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"naturalWidth & naturalHeight image properties",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/import-maps.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/import-maps.js index f9ac7c4ddb255e..7f6f93de6c2586 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/import-maps.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/import-maps.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O","194":"P Q R S T U V W X"},C:{"1":"0 1 2 3 4 5 6 w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k RC SC","322":"l m s t u v"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r","194":"uB vB wB xB yB P Q R S T U V W X"},E:{"1":"JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB dC eC fC gC zB NC hC 0B","194":"jB kB lB mB nB oB pB qB rB sB tB r uB vB"},G:{"1":"JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID JD"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"Import maps",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O","194":"P Q R S T U V W X"},C:{"1":"0 1 2 3 4 5 6 w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k SC TC","322":"l m n t u v"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s","194":"uB vB wB xB yB P Q R S T U V W X"},E:{"1":"JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB eC fC gC hC zB NC iC 0B","194":"jB kB lB mB nB oB pB qB rB sB tB s uB vB"},G:{"1":"JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD KD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"Import maps",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/imports.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/imports.js index b49f3094ce466e..064a6fdef4dae5 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/imports.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/imports.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","8":"A B"},B:{"1":"P","2":"0 1 2 3 4 5 6 Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","8":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB RC SC","8":"0 1 2 3 4 5 6 FB GB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","72":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB"},D:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P","2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","66":"FB GB HB IB JB","72":"KB"},E:{"2":"7 I TC BC UC","8":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB","2":"G B C H M oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","66":"8 N O n o","72":"p"},G:{"2":"BC iC OC jC kC","8":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"8":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I BD CD DD ED FD CC GD HD","2":"n o p q ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"2":"ND"},S:{"1":"OD","8":"PD"}},B:5,C:"HTML Imports",D:true}; +module.exports={A:{A:{"2":"J E F G PC","8":"A B"},B:{"1":"P","2":"0 1 2 3 4 5 6 Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","8":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB SC TC","8":"0 1 2 3 4 5 6 FB GB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","72":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB"},D:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P","2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","66":"FB GB HB IB JB","72":"KB"},E:{"2":"7 I UC BC VC","8":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB","2":"G B C H M oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","66":"8 N O o p","72":"q"},G:{"2":"BC jC OC kC lC","8":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"8":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I CD DD ED FD GD CC HD ID","2":"o p q r JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"2":"OD"},S:{"1":"PD","8":"QD"}},B:5,C:"HTML Imports",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js index 3bb57de3107296..ed154130df9648 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indeterminate-checkbox.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC SC","2":"QC 4B","16":"RC"},D:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G B dC eC fC gC zB NC"},G:{"1":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"indeterminate checkbox",D:true}; +module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC TC","2":"QC 4B","16":"SC"},D:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G B eC fC gC hC zB NC"},G:{"1":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"indeterminate checkbox",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indexeddb.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indexeddb.js index f68dea7ff33760..e7bcf18f394c75 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indexeddb.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indexeddb.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","132":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","33":"A B C K L H","36":"7 I J E F G"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"A","8":"7 I J E F G","33":"q","36":"8 B C K L H M N O n o p"},E:{"1":"A B C K L H CC zB 0B DC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"7 I J E TC BC UC VC","260":"F G WC XC","516":"YC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G dC eC","8":"B C fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","8":"BC iC OC jC kC lC","260":"F mC nC oC","516":"0C"},H:{"2":"4C"},I:{"1":"D 9C AD","8":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","8":"E"},K:{"1":"r","2":"A","8":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"IndexedDB",D:true}; +module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","132":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","33":"A B C K L H","36":"7 I J E F G"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"A","8":"7 I J E F G","33":"r","36":"8 B C K L H M N O o p q"},E:{"1":"A B C K L H CC zB 0B DC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"7 I J E UC BC VC WC","260":"F G XC YC","516":"ZC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G eC fC","8":"B C gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","8":"BC jC OC kC lC mC","260":"F nC oC pC","516":"1C"},H:{"2":"5C"},I:{"1":"D AD BD","8":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","8":"E"},K:{"1":"s","2":"A","8":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"IndexedDB",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indexeddb2.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indexeddb2.js index 0a85110fe95703..40a3af7312222d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indexeddb2.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/indexeddb2.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB RC SC","132":"TB UB VB","260":"WB XB YB ZB"},D:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB","132":"XB YB ZB aB","260":"bB cB dB eB fB gB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB dC eC fC gC zB NC hC 0B","132":"KB LB MB NB","260":"OB PB QB RB SB TB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC","16":"pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I","260":"BD CD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","260":"OD"}},B:2,C:"IndexedDB 2.0",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB SC TC","132":"TB UB VB","260":"WB XB YB ZB"},D:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB","132":"XB YB ZB aB","260":"bB cB dB eB fB gB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB eC fC gC hC zB NC iC 0B","132":"KB LB MB NB","260":"OB PB QB RB SB TB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC","16":"qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I","260":"CD DD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","260":"PD"}},B:2,C:"IndexedDB 2.0",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/inline-block.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/inline-block.js index 841f7e75bd377d..244212890465b5 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/inline-block.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/inline-block.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"F G A B","4":"PC","132":"J E"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","36":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS inline-block",D:true}; +module.exports={A:{A:{"1":"F G A B","4":"PC","132":"J E"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","36":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS inline-block",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/innertext.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/innertext.js index 71c942b63b6371..eac0e8ed8351a1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/innertext.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/innertext.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","16":"G"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"1":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"HTMLElement.innerText",D:true}; +module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","16":"G"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"1":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"HTMLElement.innerText",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js index 0dcc1451758fab..562162071c5c93 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-autocomplete-onoff.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A PC","132":"B"},B:{"132":"C K L H M N O","260":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB RC SC","516":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"8 9 N O n o p q AB BB","2":"7 I J E F G A B C K L H M","132":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB","260":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"J UC VC","2":"7 I TC BC","2052":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"BC iC OC","1025":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1025":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2052":"A B"},O:{"1025":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"260":"DC"},R:{"1":"ND"},S:{"516":"OD PD"}},B:1,C:"autocomplete attribute: on & off values",D:true}; +module.exports={A:{A:{"1":"J E F G A PC","132":"B"},B:{"132":"C K L H M N O","260":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB SC TC","516":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"8 9 N O o p q r AB BB","2":"7 I J E F G A B C K L H M","132":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB","260":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"J VC WC","2":"7 I UC BC","2052":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"BC jC OC","1025":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1025":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2052":"A B"},O:{"1025":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"260":"DC"},R:{"1":"OD"},S:{"516":"PD QD"}},B:1,C:"autocomplete attribute: on & off values",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-color.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-color.js index 47e3482f49e4ef..516006c535d465 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-color.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-color.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC"},D:{"1":"0 1 2 3 4 5 6 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O"},E:{"1":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB"},F:{"1":"8 9 B C N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","2":"G H M dC eC fC gC"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC","129":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:1,C:"Color input type",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC"},D:{"1":"0 1 2 3 4 5 6 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O"},E:{"1":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB"},F:{"1":"8 9 B C N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","2":"G H M eC fC gC hC"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC","129":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:1,C:"Color input type",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-datetime.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-datetime.js index 31dfe7ab11eb06..4e13774db66f45 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-datetime.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-datetime.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","132":"C"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB RC SC","1090":"cB dB eB fB","2052":"gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b","4100":"0 1 2 3 4 5 6 c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O","2052":"9 n o p q"},E:{"2":"7 I J E F G A B C K L TC BC UC VC WC XC CC zB 0B DC","4100":"H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"BC iC OC","260":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B 5C 6C 7C","514":"I 8C OC"},J:{"1":"A","2":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"4100":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2052":"OD PD"}},B:1,C:"Date and time input types",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","132":"C"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB SC TC","1090":"cB dB eB fB","2052":"gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b","4100":"0 1 2 3 4 5 6 c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O","2052":"9 o p q r"},E:{"2":"7 I J E F G A B C K L UC BC VC WC XC YC CC zB 0B DC","4100":"H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"BC jC OC","260":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B 6C 7C 8C","514":"I 9C OC"},J:{"1":"A","2":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"4100":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2052":"PD QD"}},B:1,C:"Date and time input types",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-email-tel-url.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-email-tel-url.js index 9735b4a6862241..378e037a7b2110 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-email-tel-url.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-email-tel-url.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"I"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 8C OC 9C AD","132":"5C 6C 7C"},J:{"1":"A","132":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Email, telephone & URL input types",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"I"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 9C OC AD BD","132":"6C 7C 8C"},J:{"1":"A","132":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Email, telephone & URL input types",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-event.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-event.js index 0b2b92c77ac083..850b8fdc696faf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-event.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-event.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","2561":"A B","2692":"G"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2561":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"QC","1537":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB SC","1796":"4B RC"},D:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","1025":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB","1537":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB"},E:{"1":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I J TC BC","1025":"E F G A B C VC WC XC CC zB","1537":"UC","4097":"K 0B"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","16":"G B C dC eC fC gC zB NC","260":"hC","1025":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","1537":"8 H M N O n o"},G:{"1":"wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC","1025":"F mC nC oC pC qC rC sC tC","1537":"jC kC lC","4097":"uC vC"},H:{"2":"4C"},I:{"16":"5C 6C","1025":"D AD","1537":"4B I 7C 8C OC 9C"},J:{"1025":"A","1537":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2561":"A B"},O:{"1":"1B"},P:{"1025":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","1537":"OD"}},B:1,C:"input event",D:true}; +module.exports={A:{A:{"2":"J E F PC","2561":"A B","2692":"G"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2561":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","16":"QC","1537":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB TC","1796":"4B SC"},D:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L","1025":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB","1537":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB"},E:{"1":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I J UC BC","1025":"E F G A B C WC XC YC CC zB","1537":"VC","4097":"K 0B"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","16":"G B C eC fC gC hC zB NC","260":"iC","1025":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","1537":"8 H M N O o p"},G:{"1":"xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC","1025":"F nC oC pC qC rC sC tC uC","1537":"kC lC mC","4097":"vC wC"},H:{"2":"5C"},I:{"16":"6C 7C","1025":"D BD","1537":"4B I 8C 9C OC AD"},J:{"1025":"A","1537":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2561":"A B"},O:{"1":"1B"},P:{"1025":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","1537":"PD"}},B:1,C:"input event",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-accept.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-accept.js index d6935589b99d44..a88f9965fbae68 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-accept.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-accept.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","132":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"I","16":"7 9 J E F o p q AB","132":"8 G A B C K L H M N O n"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","132":"J E F G A B VC WC XC CC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"2":"kC lC","132":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","514":"BC iC OC jC"},H:{"2":"4C"},I:{"2":"5C 6C 7C","260":"4B I 8C OC","514":"D 9C AD"},J:{"132":"A","260":"E"},K:{"2":"A B C zB NC 0B","514":"r"},L:{"260":"D"},M:{"2":"D"},N:{"514":"A","1028":"B"},O:{"2":"1B"},P:{"260":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"260":"DC"},R:{"260":"ND"},S:{"1":"OD PD"}},B:1,C:"accept attribute for file input",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","132":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"I","16":"7 9 J E F p q r AB","132":"8 G A B C K L H M N O o"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","132":"J E F G A B WC XC YC CC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"2":"lC mC","132":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","514":"BC jC OC kC"},H:{"2":"5C"},I:{"2":"6C 7C 8C","260":"4B I 9C OC","514":"D AD BD"},J:{"132":"A","260":"E"},K:{"2":"A B C zB NC 0B","514":"s"},L:{"260":"D"},M:{"2":"D"},N:{"514":"A","1028":"B"},O:{"2":"1B"},P:{"260":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"260":"DC"},R:{"260":"OD"},S:{"1":"PD QD"}},B:1,C:"accept attribute for file input",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-directory.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-directory.js index c645276e7a6009..785737a1c5f3a4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-directory.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-directory.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB RC SC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC"},F:{"1":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C H M dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Directory selection from file input",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB SC TC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC"},F:{"1":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C H M eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Directory selection from file input",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-multiple.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-multiple.js index d79df26c1052c8..4b0137b7f0a0f3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-multiple.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-file-multiple.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC SC","2":"QC 4B RC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"I"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m gC zB NC hC 0B","2":"G dC eC fC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC"},H:{"130":"4C"},I:{"130":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"130":"A B C r zB NC 0B"},L:{"132":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"130":"1B"},P:{"130":"I","132":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"132":"DC"},R:{"132":"ND"},S:{"1":"PD","2":"OD"}},B:1,C:"Multiple file selection",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC TC","2":"QC 4B SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"I"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n hC zB NC iC 0B","2":"G eC fC gC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC"},H:{"130":"5C"},I:{"130":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"130":"A B C s zB NC 0B"},L:{"132":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"130":"1B"},P:{"130":"I","132":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"132":"DC"},R:{"132":"OD"},S:{"1":"QD","2":"PD"}},B:1,C:"Multiple file selection",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-inputmode.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-inputmode.js index 7407816e1f4548..1da36b7a9790c7 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-inputmode.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-inputmode.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M RC SC","4":"8 N O n","194":"9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d"},D:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB","66":"fB gB hB 5B iB 6B jB kB lB mB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB dC eC fC gC zB NC hC 0B","66":"SB TB UB VB WB XB YB ZB aB bB"},G:{"1":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED"},Q:{"1":"DC"},R:{"1":"ND"},S:{"194":"OD PD"}},B:1,C:"inputmode attribute",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M SC TC","4":"8 N O o","194":"9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d"},D:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB","66":"fB gB hB 5B iB 6B jB kB lB mB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB eC fC gC hC zB NC iC 0B","66":"SB TB UB VB WB XB YB ZB aB bB"},G:{"1":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"194":"PD QD"}},B:1,C:"inputmode attribute",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-minlength.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-minlength.js index 05216c61ecb43f..da9217644f1804 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-minlength.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-minlength.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB RC SC"},D:{"1":"0 1 2 3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB dC eC fC gC zB NC hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:1,C:"Minimum length attribute for input fields",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB SC TC"},D:{"1":"0 1 2 3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB eC fC gC hC zB NC iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:1,C:"Minimum length attribute for input fields",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-number.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-number.js index 4e276d2c5d8be5..4a82b8eb203bf3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-number.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-number.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","129":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","129":"C K","1025":"L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC","513":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"388":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B 5C 6C 7C","388":"I D 8C OC 9C AD"},J:{"2":"E","388":"A"},K:{"1":"A B C zB NC 0B","388":"r"},L:{"388":"D"},M:{"641":"D"},N:{"388":"A B"},O:{"388":"1B"},P:{"388":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"388":"DC"},R:{"388":"ND"},S:{"513":"OD PD"}},B:1,C:"Number input type",D:true}; +module.exports={A:{A:{"2":"J E F G PC","129":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","129":"C K","1025":"L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC","513":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"388":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B 6C 7C 8C","388":"I D 9C OC AD BD"},J:{"2":"E","388":"A"},K:{"1":"A B C zB NC 0B","388":"s"},L:{"388":"D"},M:{"641":"D"},N:{"388":"A B"},O:{"388":"1B"},P:{"388":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"388":"DC"},R:{"388":"OD"},S:{"513":"PD QD"}},B:1,C:"Number input type",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-pattern.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-pattern.js index 055f617a0fef71..c0d9fbab49831b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-pattern.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-pattern.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","16":"7","388":"J E F G A UC VC WC XC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC","388":"F jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D AD","2":"4B I 5C 6C 7C 8C OC 9C"},J:{"1":"A","2":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Pattern attribute for input fields",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","16":"7","388":"J E F G A VC WC XC YC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC","388":"F kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D BD","2":"4B I 6C 7C 8C 9C OC AD"},J:{"1":"A","2":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Pattern attribute for input fields",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-placeholder.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-placeholder.js index 6c9ba7797c7031..96abced3ef0026 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-placeholder.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-placeholder.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","132":"I TC BC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m NC hC 0B","2":"G dC eC fC gC","132":"B zB"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B D 5C 6C 7C OC 9C AD","4":"I 8C"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"input placeholder attribute",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","132":"I UC BC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n NC iC 0B","2":"G eC fC gC hC","132":"B zB"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B D 6C 7C 8C OC AD BD","4":"I 9C"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"input placeholder attribute",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-range.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-range.js index 17f4c378257b6f..2d1f4d8b7576e6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-range.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-range.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n o p RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"2":"4C"},I:{"1":"D OC 9C AD","4":"4B I 5C 6C 7C 8C"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Range input type",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o p q SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"2":"5C"},I:{"1":"D OC AD BD","4":"4B I 6C 7C 8C 9C"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Range input type",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-search.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-search.js index ea1c400c44d8c2..d103e2f8d67b04 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-search.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-search.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","129":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","129":"C K L H M N O"},C:{"2":"QC 4B RC SC","129":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 9 I J E F G A B C K L o p q AB","129":"8 H M N O n"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I TC BC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G dC eC fC gC","16":"B zB NC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC"},H:{"129":"4C"},I:{"1":"D 9C AD","16":"5C 6C","129":"4B I 7C 8C OC"},J:{"1":"E","129":"A"},K:{"1":"C r","2":"A","16":"B zB NC","129":"0B"},L:{"1":"D"},M:{"129":"D"},N:{"129":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"129":"OD PD"}},B:1,C:"Search input type",D:true}; +module.exports={A:{A:{"2":"J E F G PC","129":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","129":"C K L H M N O"},C:{"2":"QC 4B SC TC","129":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 9 I J E F G A B C K L p q r AB","129":"8 H M N O o"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I UC BC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G eC fC gC hC","16":"B zB NC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC"},H:{"129":"5C"},I:{"1":"D AD BD","16":"6C 7C","129":"4B I 8C 9C OC"},J:{"1":"E","129":"A"},K:{"1":"C s","2":"A","16":"B zB NC","129":"0B"},L:{"1":"D"},M:{"129":"D"},N:{"129":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"129":"PD QD"}},B:1,C:"Search input type",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-selection.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-selection.js index ea6693b9bdb7e6..be7c3af783b14f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-selection.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/input-selection.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m gC zB NC hC 0B","16":"G dC eC fC"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"2":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Selection controls for input & textarea",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n hC zB NC iC 0B","16":"G eC fC gC"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"2":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Selection controls for input & textarea",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/insert-adjacent.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/insert-adjacent.js index f7962136e74d9d..b35014d0ca2870 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/insert-adjacent.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/insert-adjacent.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","16":"G"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Element.insertAdjacentElement() & Element.insertAdjacentText()",D:true}; +module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","16":"G"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Element.insertAdjacentElement() & Element.insertAdjacentText()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/insertadjacenthtml.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/insertadjacenthtml.js index a1380522d02aad..da0841abd1271d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/insertadjacenthtml.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/insertadjacenthtml.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","16":"PC","132":"J E F G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m eC fC gC zB NC hC 0B","16":"G dC"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"1":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"Element.insertAdjacentHTML()",D:true}; +module.exports={A:{A:{"1":"A B","16":"PC","132":"J E F G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n fC gC hC zB NC iC 0B","16":"G eC"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"1":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"Element.insertAdjacentHTML()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/internationalization.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/internationalization.js index 8d8dbd27f3d6fb..b87b1f3e1dfc82 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/internationalization.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/internationalization.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n o p q"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:6,C:"Internationalization API",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o p q r"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:6,C:"Internationalization API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js index cc80bb86d9ee83..5e15f1898de0e1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intersectionobserver-v2.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"IntersectionObserver V2",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"IntersectionObserver V2",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intersectionobserver.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intersectionobserver.js index dadcf83cf41d18..c9ede2df7a6e91 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intersectionobserver.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intersectionobserver.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"M N O","2":"C K L","260":"H","513":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB RC SC","194":"bB cB dB"},D:{"1":"hB 5B iB 6B jB kB lB","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","260":"aB bB cB dB eB fB gB","513":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB"},F:{"1":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB dC eC fC gC zB NC hC 0B","260":"NB OB PB QB RB SB TB","513":"lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","513":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","513":"r"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I","260":"BD CD"},Q:{"513":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"IntersectionObserver",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"M N O","2":"C K L","260":"H","513":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB SC TC","194":"bB cB dB"},D:{"1":"hB 5B iB 6B jB kB lB","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","260":"aB bB cB dB eB fB gB","513":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB"},F:{"1":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB eC fC gC hC zB NC iC 0B","260":"NB OB PB QB RB SB TB","513":"lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","513":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","513":"s"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I","260":"CD DD"},Q:{"513":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"IntersectionObserver",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intl-pluralrules.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intl-pluralrules.js index ef84c13c982244..5233938445d4e2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intl-pluralrules.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intl-pluralrules.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N","130":"O"},C:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB RC SC"},D:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB"},E:{"1":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB 0B"},F:{"1":"ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB dC eC fC gC zB NC hC 0B"},G:{"1":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:6,C:"Intl.PluralRules API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N","130":"O"},C:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB SC TC"},D:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB"},E:{"1":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB 0B"},F:{"1":"ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB eC fC gC hC zB NC iC 0B"},G:{"1":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:6,C:"Intl.PluralRules API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intrinsic-width.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intrinsic-width.js index 64e8567ac81767..a08b4b655efea9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intrinsic-width.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/intrinsic-width.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","1025":"0 1 2 3 4 5 6 d e f g h i j k l m s t u v w x y z D","1537":"P Q R S T U V W X Y Z a b c"},C:{"2":"QC","932":"7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB RC SC","2308":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 I J E F G A B C K L H M N O n o","545":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB","1025":"0 1 2 3 4 5 6 d e f g h i j k l m s t u v w x y z D 8B 9B AC","1537":"VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC","516":"B C K L H zB 0B DC YC ZC EC FC 1B aC","548":"G A XC CC","676":"E F VC WC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","513":"JB","545":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB","1025":"e f g h i j k l m","1537":"IB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC","516":"zC 0C 1C EC FC 1B 2C","548":"nC oC pC qC rC sC tC uC vC wC xC yC","676":"F lC mC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC","545":"9C AD","1025":"D"},J:{"2":"E","545":"A"},K:{"2":"A B C zB NC 0B","1025":"r"},L:{"1025":"D"},M:{"2308":"D"},N:{"2":"A B"},O:{"1537":"1B"},P:{"545":"I","1025":"n o p q 3B LD MD","1537":"BD CD DD ED FD CC GD HD ID JD KD 2B"},Q:{"1537":"DC"},R:{"1537":"ND"},S:{"932":"OD","2308":"PD"}},B:5,C:"Intrinsic & Extrinsic Sizing",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","1025":"0 1 2 3 4 5 6 d e f g h i j k l m n t u v w x y z D","1537":"P Q R S T U V W X Y Z a b c"},C:{"2":"QC","932":"7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB SC TC","2308":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 I J E F G A B C K L H M N O o p","545":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB","1025":"0 1 2 3 4 5 6 d e f g h i j k l m n t u v w x y z D 8B 9B AC","1537":"VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC","516":"B C K L H zB 0B DC ZC aC EC FC 1B bC","548":"G A YC CC","676":"E F WC XC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","513":"JB","545":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB","1025":"e f g h i j k l m n","1537":"IB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC","516":"0C 1C 2C EC FC 1B 3C","548":"oC pC qC rC sC tC uC vC wC xC yC zC","676":"F mC nC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC","545":"AD BD","1025":"D"},J:{"2":"E","545":"A"},K:{"2":"A B C zB NC 0B","1025":"s"},L:{"1025":"D"},M:{"2308":"D"},N:{"2":"A B"},O:{"1537":"1B"},P:{"545":"I","1025":"o p q r 3B MD ND","1537":"CD DD ED FD GD CC HD ID JD KD LD 2B"},Q:{"1537":"DC"},R:{"1537":"OD"},S:{"932":"PD","2308":"QD"}},B:5,C:"Intrinsic & Extrinsic Sizing",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpeg2000.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpeg2000.js index c7736a4ceb4489..7fc937c946eac2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpeg2000.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpeg2000.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","129":"7 UC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"JPEG 2000 image format",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","129":"7 VC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"JPEG 2000 image format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpegxl.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpegxl.js index 09cc57070c3899..582cc28ba35c43 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpegxl.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpegxl.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z y z D","578":"a b c d e f g h i j k l m s t u v w x"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y RC SC","322":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z y z D 8B 9B AC","194":"a b c d e f g h i j k l m s t u v w x"},E:{"1":"3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB dC eC fC gC zB NC hC 0B","194":"xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"JPEG XL image format",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z y z D","578":"a b c d e f g h i j k l m n t u v w x"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y SC TC","322":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z y z D 8B 9B AC","194":"a b c d e f g h i j k l m n t u v w x"},E:{"1":"3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB eC fC gC hC zB NC iC 0B","194":"xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"JPEG XL image format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpegxr.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpegxr.js index a18eae82948e7d..925c0eed2a8f7e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpegxr.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/jpegxr.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"JPEG XR image format",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"JPEG XR image format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js index 4d668764f03c35..a83c8285b190fb 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/js-regexp-lookbehind.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB RC SC"},D:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B"},E:{"1":"JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC"},F:{"1":"YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB dC eC fC gC zB NC hC 0B"},G:{"1":"JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:6,C:"Lookbehind in JS regular expressions",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB SC TC"},D:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B"},E:{"1":"JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC"},F:{"1":"YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB eC fC gC hC zB NC iC 0B"},G:{"1":"JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:6,C:"Lookbehind in JS regular expressions",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/json.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/json.js index 8ac301c54245c4..94655fa51670d4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/json.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/json.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E PC","129":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC eC"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"JSON parsing",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E PC","129":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC fC"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"JSON parsing",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js index df4dc45b7f02c2..66ccf48cf0600b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/justify-content-space-evenly.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H","132":"M N O"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB RC SC"},D:{"1":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB","132":"gB hB 5B"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC","132":"CC"},F:{"1":"WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB dC eC fC gC zB NC hC 0B","132":"TB UB VB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC","132":"qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD","132":"DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","132":"OD"}},B:5,C:"CSS justify-content: space-evenly",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H","132":"M N O"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB SC TC"},D:{"1":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB","132":"gB hB 5B"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC","132":"CC"},F:{"1":"WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB eC fC gC hC zB NC iC 0B","132":"TB UB VB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC","132":"rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD","132":"ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","132":"PD"}},B:5,C:"CSS justify-content: space-evenly",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js index c2cbee99f6e6ac..f4cbe21269ee7b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/kerning-pairs-ligatures.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"5C 6C 7C","132":"4B I 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:7,C:"High-quality kerning pairs & ligatures",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"6C 7C 8C","132":"4B I 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:7,C:"High-quality kerning pairs & ligatures",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js index ce66ad77aa4cd3..0833fa58041c0b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-charcode.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","16":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B dC eC fC gC zB NC hC","16":"C"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"r 0B","2":"A B zB NC","16":"C"},L:{"1":"D"},M:{"130":"D"},N:{"130":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:7,C:"KeyboardEvent.charCode",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","16":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B eC fC gC hC zB NC iC","16":"C"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"s 0B","2":"A B zB NC","16":"C"},L:{"1":"D"},M:{"130":"D"},N:{"130":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:7,C:"KeyboardEvent.charCode",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-code.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-code.js index 6dead60c153c8f..8410111405788a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-code.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-code.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB RC SC"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB","194":"RB SB TB UB VB WB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB dC eC fC gC zB NC hC 0B","194":"EB FB GB HB IB JB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"194":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I","194":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"194":"ND"},S:{"1":"OD PD"}},B:5,C:"KeyboardEvent.code",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB SC TC"},D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB","194":"RB SB TB UB VB WB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB eC fC gC hC zB NC iC 0B","194":"EB FB GB HB IB JB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"194":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I","194":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"194":"OD"},S:{"1":"PD QD"}},B:5,C:"KeyboardEvent.code",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js index 95fe43935c6230..a752229e632665 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-getmodifierstate.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L RC SC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B H M dC eC fC gC zB NC hC","16":"C"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r 0B","2":"A B zB NC","16":"C"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"KeyboardEvent.getModifierState()",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L SC TC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B H M eC fC gC hC zB NC iC","16":"C"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s 0B","2":"A B zB NC","16":"C"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"KeyboardEvent.getModifierState()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-key.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-key.js index 27edcb4a883f36..a5df2f8402db60 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-key.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-key.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","260":"G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n o p RC SC","132":"9 q AB BB CB DB"},D:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"8 9 G B H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB dC eC fC gC zB NC hC","16":"C"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"1":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r 0B","2":"A B zB NC","16":"C"},L:{"1":"D"},M:{"1":"D"},N:{"260":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"KeyboardEvent.key",D:true}; +module.exports={A:{A:{"2":"J E F PC","260":"G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o p q SC TC","132":"9 r AB BB CB DB"},D:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"8 9 G B H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB eC fC gC hC zB NC iC","16":"C"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"1":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s 0B","2":"A B zB NC","16":"C"},L:{"1":"D"},M:{"1":"D"},N:{"260":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"KeyboardEvent.key",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-location.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-location.js index 49e2ddfcb69aaa..5793356da71133 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-location.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-location.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L RC SC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"J TC BC","132":"7 I UC"},F:{"1":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B dC eC fC gC zB NC hC","16":"C","132":"H M"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC","132":"jC kC lC"},H:{"2":"4C"},I:{"1":"D 9C AD","16":"5C 6C","132":"4B I 7C 8C OC"},J:{"132":"E A"},K:{"1":"r 0B","2":"A B zB NC","16":"C"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"KeyboardEvent.location",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L SC TC"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","132":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"J UC BC","132":"7 I VC"},F:{"1":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B eC fC gC hC zB NC iC","16":"C","132":"H M"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC","132":"kC lC mC"},H:{"2":"5C"},I:{"1":"D AD BD","16":"6C 7C","132":"4B I 8C 9C OC"},J:{"132":"E A"},K:{"1":"s 0B","2":"A B zB NC","16":"C"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"KeyboardEvent.location",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-which.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-which.js index c53c432bd1de95..0fa6802b679f74 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-which.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/keyboardevent-which.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","16":"7"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m eC fC gC zB NC hC 0B","16":"G dC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC","16":"5C 6C","132":"9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"132":"D"},M:{"132":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"2":"I","132":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"132":"ND"},S:{"1":"OD PD"}},B:7,C:"KeyboardEvent.which",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","16":"7"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n fC gC hC zB NC iC 0B","16":"G eC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC","16":"6C 7C","132":"AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"132":"D"},M:{"132":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"2":"I","132":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"132":"OD"},S:{"1":"PD QD"}},B:7,C:"KeyboardEvent.which",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/lazyload.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/lazyload.js index 01448a2b2823d5..af6da99a375ed2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/lazyload.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/lazyload.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"1":"B","2":"A"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Resource Hints: Lazyload",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"1":"B","2":"A"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Resource Hints: Lazyload",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/let.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/let.js index ff41ff6e4acb67..cedf8e8389bff8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/let.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/let.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","2052":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","194":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB RC SC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N O","322":"8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","516":"QB RB SB TB UB VB WB XB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC","1028":"A CC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","322":"8 9 H M N O n o p q AB BB CB","516":"DB EB FB GB HB IB JB KB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC","1028":"pC qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","516":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"let",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","2052":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","194":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB SC TC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N O","322":"8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","516":"QB RB SB TB UB VB WB XB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC","1028":"A CC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","322":"8 9 H M N O o p q r AB BB CB","516":"DB EB FB GB HB IB JB KB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC","1028":"qC rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","516":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"let",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-icon-png.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-icon-png.js index 849b452f8764f4..ca914f810be74e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-icon-png.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-icon-png.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","130":"F BC iC OC jC kC lC mC nC oC pC qC rC sC"},H:{"130":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E","130":"A"},K:{"1":"r","130":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"130":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"PNG favicons",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","130":"F BC jC OC kC lC mC nC oC pC qC rC sC tC"},H:{"130":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E","130":"A"},K:{"1":"s","130":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"130":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"PNG favicons",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-icon-svg.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-icon-svg.js index 623e05be4b33c0..da7403ba42d461 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-icon-svg.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-icon-svg.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P","1537":"0 1 2 3 4 5 6 Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"QC 4B RC SC","260":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","513":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P","1537":"0 1 2 3 4 5 6 Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB dB eB fB gB hB iB jB kB lB mB nB dC eC fC gC zB NC hC 0B","1537":"oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","130":"F BC iC OC jC kC lC mC nC oC pC qC rC sC"},H:{"130":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","130":"A"},K:{"130":"A B C zB NC 0B","1537":"r"},L:{"1537":"D"},M:{"2":"D"},N:{"130":"A B"},O:{"2":"1B"},P:{"2":"I BD CD DD ED FD CC GD HD","1537":"n o p q ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"1537":"ND"},S:{"513":"OD PD"}},B:1,C:"SVG favicons",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P","1537":"0 1 2 3 4 5 6 Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"QC 4B SC TC","260":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","513":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P","1537":"0 1 2 3 4 5 6 Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB dB eB fB gB hB iB jB kB lB mB nB eC fC gC hC zB NC iC 0B","1537":"oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","130":"F BC jC OC kC lC mC nC oC pC qC rC sC tC"},H:{"130":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E","130":"A"},K:{"130":"A B C zB NC 0B","1537":"s"},L:{"1537":"D"},M:{"2":"D"},N:{"130":"A B"},O:{"2":"1B"},P:{"2":"I CD DD ED FD GD CC HD ID","1537":"o p q r JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"1537":"OD"},S:{"513":"PD QD"}},B:1,C:"SVG favicons",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js index 3203c63534a00d..a6cab0029a32f1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-dns-prefetch.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F PC","132":"G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"QC 4B","260":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"16":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"16":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"16":"E A"},K:{"1":"r","16":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","16":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Resource Hints: dns-prefetch",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F PC","132":"G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"QC 4B","260":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"16":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"16":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"16":"E A"},K:{"1":"s","16":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","16":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Resource Hints: dns-prefetch",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js index fcc68c6b867252..8b25a07e3c7f6f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-modulepreload.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"3 4 5 6 D 8B 9B AC","2":"0 1 2 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z RC SC"},D:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB"},E:{"1":"3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC"},F:{"1":"cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB dC eC fC gC zB NC hC 0B"},G:{"1":"3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:1,C:"Resource Hints: modulepreload",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"3 4 5 6 D 8B 9B AC RC","2":"0 1 2 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z SC TC"},D:{"1":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB"},E:{"1":"3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC"},F:{"1":"cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB eC fC gC hC zB NC iC 0B"},G:{"1":"3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:1,C:"Resource Hints: modulepreload",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-preconnect.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-preconnect.js index 1b90c60f783f70..1411370ba04837 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-preconnect.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-preconnect.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L","260":"H M N O"},C:{"1":"3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB RC SC","129":"OB","514":"0 1 2 sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z"},D:{"1":"0 1 2 3 4 5 6 VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC"},F:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB dC eC fC gC zB NC hC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Resource Hints: preconnect",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L","260":"H M N O"},C:{"1":"3 4 5 6 PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB SC TC","129":"OB","514":"0 1 2 sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z"},D:{"1":"0 1 2 3 4 5 6 VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC"},F:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB eC fC gC hC zB NC iC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Resource Hints: preconnect",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-prefetch.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-prefetch.js index 4e3eb5f821dc41..e567be425cbb47 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-prefetch.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-prefetch.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"2":"7 I J E F G A B C K TC BC UC VC WC XC CC zB 0B","194":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC","194":"yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"I D 9C AD","2":"4B 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Resource Hints: prefetch",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"2":"7 I J E F G A B C K UC BC VC WC XC YC CC zB 0B","194":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC","194":"zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"I D AD BD","2":"4B 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Resource Hints: prefetch",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-preload.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-preload.js index dc54921b9fd7b1..2825355fb0c028 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-preload.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-preload.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M","1028":"N O"},C:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB RC SC","132":"fB","578":"gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T"},D:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC","322":"B"},F:{"1":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB dC eC fC gC zB NC hC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC","322":"rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:4,C:"Resource Hints: preload",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M","1028":"N O"},C:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB SC TC","132":"fB","578":"gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T"},D:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC","322":"B"},F:{"1":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB eC fC gC hC zB NC iC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC","322":"sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:4,C:"Resource Hints: preload",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-prerender.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-prerender.js index 2d81b651022c92..cfced115fd7449 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-prerender.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/link-rel-prerender.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:5,C:"Resource Hints: prerender",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:5,C:"Resource Hints: prerender",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/loading-lazy-attr.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/loading-lazy-attr.js index 88a9e27e5ba2a0..f147f6cc6dd0e3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/loading-lazy-attr.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/loading-lazy-attr.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB RC SC","132":"0 1 2 3 4 5 6 vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B"},D:{"1":"0 1 2 3 4 5 6 xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB","66":"vB wB"},E:{"1":"JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K TC BC UC VC WC XC CC zB 0B","322":"L H DC YC ZC EC","580":"FC 1B aC 2B GC HC IC"},F:{"1":"lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB dC eC fC gC zB NC hC 0B","66":"jB kB"},G:{"1":"JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC","322":"yC zC 0C 1C EC","580":"FC 1B 2C 2B GC HC IC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"132":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD","132":"PD"}},B:1,C:"Lazy loading via attribute for images & iframes",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB SC TC","132":"0 1 2 3 4 5 6 vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B"},D:{"1":"0 1 2 3 4 5 6 xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB","66":"vB wB"},E:{"1":"JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K UC BC VC WC XC YC CC zB 0B","322":"L H DC ZC aC EC","580":"FC 1B bC 2B GC HC IC"},F:{"1":"lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB eC fC gC hC zB NC iC 0B","66":"jB kB"},G:{"1":"JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC","322":"zC 0C 1C 2C EC","580":"FC 1B 3C 2B GC HC IC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"132":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD","132":"QD"}},B:1,C:"Lazy loading via attribute for images & iframes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/localecompare.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/localecompare.js index c2c1654b3bc4ef..3155da1f6686bb 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/localecompare.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/localecompare.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","16":"PC","132":"J E F G A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 I J E F G A B C K L H M N O n o p q"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","132":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G B C dC eC fC gC zB NC hC","132":"0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","132":"F BC iC OC jC kC lC mC nC oC"},H:{"132":"4C"},I:{"1":"D 9C AD","132":"4B I 5C 6C 7C 8C OC"},J:{"132":"E A"},K:{"1":"r","16":"A B C zB NC","132":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","132":"A"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","132":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","4":"OD"}},B:6,C:"localeCompare()",D:true}; +module.exports={A:{A:{"1":"B","16":"PC","132":"J E F G A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","132":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","132":"7 8 I J E F G A B C K L H M N O o p q r"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","132":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G B C eC fC gC hC zB NC iC","132":"0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","132":"F BC jC OC kC lC mC nC oC pC"},H:{"132":"5C"},I:{"1":"D AD BD","132":"4B I 6C 7C 8C 9C OC"},J:{"132":"E A"},K:{"1":"s","16":"A B C zB NC","132":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","132":"A"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","132":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","4":"PD"}},B:6,C:"localeCompare()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/magnetometer.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/magnetometer.js index 1d9c5bed4f6510..4c476b8fc49fef 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/magnetometer.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/magnetometer.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","194":"hB 5B iB 6B jB kB lB mB nB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"194":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:4,C:"Magnetometer",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","194":"hB 5B iB 6B jB kB lB mB nB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"194":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:4,C:"Magnetometer",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/matchesselector.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/matchesselector.js index ce5e51a9430f54..c5557c5df76c17 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/matchesselector.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/matchesselector.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","36":"G A B"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","36":"C K L"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC","36":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB SC"},D:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","36":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB"},E:{"1":"F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","36":"7 J E UC VC"},F:{"1":"9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B dC eC fC gC zB","36":"8 C H M N O n NC hC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC","36":"iC OC jC kC lC"},H:{"2":"4C"},I:{"1":"D","2":"5C","36":"4B I 6C 7C 8C OC 9C AD"},J:{"36":"E A"},K:{"1":"r","2":"A B","36":"C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"36":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","36":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"matches() DOM method",D:true}; +module.exports={A:{A:{"2":"J E F PC","36":"G A B"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","36":"C K L"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC","36":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB TC"},D:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","36":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB"},E:{"1":"F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","36":"7 J E VC WC"},F:{"1":"9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B eC fC gC hC zB","36":"8 C H M N O o NC iC 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC","36":"jC OC kC lC mC"},H:{"2":"5C"},I:{"1":"D","2":"6C","36":"4B I 7C 8C 9C OC AD BD"},J:{"36":"E A"},K:{"1":"s","2":"A B","36":"C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"36":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","36":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"matches() DOM method",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/matchmedia.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/matchmedia.js index 6f0a7cae7708ec..00ef6329745853 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/matchmedia.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/matchmedia.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B C dC eC fC gC zB NC hC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"1":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"A","2":"E"},K:{"1":"r 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"matchMedia",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B C eC fC gC hC zB NC iC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"1":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"A","2":"E"},K:{"1":"s 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"matchMedia",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mathml.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mathml.js index 98e03b7ac39eb6..49dbf36575a560 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mathml.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mathml.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"G A B PC","8":"J E F"},B:{"2":"C K L H M N O","8":"P Q R S T U V W X Y Z a b c d e f","584":"g h i j k l m s t u v w","1025":"0 1 2 3 4 5 6 x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","129":"QC 4B RC SC"},D:{"1":"9","8":"7 8 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f","584":"g h i j k l m s t u v w","1025":"0 1 2 3 4 5 6 x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","260":"7 I J E F G TC BC UC VC WC XC"},F:{"2":"G","8":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B","584":"S T U V W X Y Z a b c d","1025":"e f g h i j k l m","2052":"B C dC eC fC gC zB NC hC 0B"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","8":"BC iC OC"},H:{"8":"4C"},I:{"8":"4B I 5C 6C 7C 8C OC 9C AD","1025":"D"},J:{"1":"A","8":"E"},K:{"8":"A B C r zB NC 0B"},L:{"1025":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"8":"1B"},P:{"1":"o p q","8":"I n BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"8":"DC"},R:{"8":"ND"},S:{"1":"OD PD"}},B:2,C:"MathML",D:true}; +module.exports={A:{A:{"2":"G A B PC","8":"J E F"},B:{"2":"C K L H M N O","8":"P Q R S T U V W X Y Z a b c d e f","584":"g h i j k l m n t u v w","1025":"0 1 2 3 4 5 6 x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","129":"QC 4B SC TC"},D:{"1":"9","8":"7 8 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f","584":"g h i j k l m n t u v w","1025":"0 1 2 3 4 5 6 x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","260":"7 I J E F G UC BC VC WC XC YC"},F:{"2":"G","8":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B","584":"S T U V W X Y Z a b c d","1025":"e f g h i j k l m n","2052":"B C eC fC gC hC zB NC iC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","8":"BC jC OC"},H:{"8":"5C"},I:{"8":"4B I 6C 7C 8C 9C OC AD BD","1025":"D"},J:{"1":"A","8":"E"},K:{"8":"A B C s zB NC 0B"},L:{"1025":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"8":"1B"},P:{"1":"p q r","8":"I o CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"8":"DC"},R:{"8":"OD"},S:{"1":"PD QD"}},B:2,C:"MathML",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/maxlength.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/maxlength.js index 3ab5793c5bdd48..c07347c216e8d8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/maxlength.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/maxlength.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","16":"PC","900":"J E F G"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","1025":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","900":"QC 4B RC SC","1025":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 TC","900":"I BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G","132":"B C dC eC fC gC zB NC hC 0B"},G:{"1":"iC OC jC kC lC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC","2052":"F mC"},H:{"132":"4C"},I:{"1":"4B I 7C 8C OC 9C AD","16":"5C 6C","4097":"D"},J:{"1":"E A"},K:{"132":"A B C zB NC 0B","4097":"r"},L:{"4097":"D"},M:{"4097":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"4097":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1025":"OD PD"}},B:1,C:"maxlength attribute for input and textarea elements",D:true}; +module.exports={A:{A:{"1":"A B","16":"PC","900":"J E F G"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","1025":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","900":"QC 4B SC TC","1025":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 UC","900":"I BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G","132":"B C eC fC gC hC zB NC iC 0B"},G:{"1":"jC OC kC lC mC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC","2052":"F nC"},H:{"132":"5C"},I:{"1":"4B I 8C 9C OC AD BD","16":"6C 7C","4097":"D"},J:{"1":"E A"},K:{"132":"A B C zB NC 0B","4097":"s"},L:{"4097":"D"},M:{"4097":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"4097":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1025":"PD QD"}},B:1,C:"maxlength attribute for input and textarea elements",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js index a61982dd5316a7..d140e844270cd8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-backdrop-pseudo-element.js @@ -1 +1 @@ -module.exports={A:{D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB","33":"HB IB JB KB LB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","33":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB RC SC"},M:{"1":"D"},A:{"2":"J E F G A PC","33":"B"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C H M N O dC eC fC gC zB NC hC 0B","33":"8 n o p q"},K:{"1":"r","2":"A B C zB NC 0B"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC cC"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC","33":"9C AD"}},B:6,C:"CSS ::backdrop pseudo-element",D:undefined}; +module.exports={A:{D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB","33":"HB IB JB KB LB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","33":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB SC TC"},M:{"1":"D"},A:{"2":"J E F G A PC","33":"B"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C H M N O eC fC gC hC zB NC iC 0B","33":"8 o p q r"},K:{"1":"s","2":"A B C zB NC 0B"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC dC"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC","33":"AD BD"}},B:6,C:"CSS ::backdrop pseudo-element",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js index 766f96bd873b9b..a19651f0dc1898 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate-override.js @@ -1 +1 @@ -module.exports={A:{D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M RC SC","33":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB dC eC fC gC zB NC hC 0B"},K:{"1":"r","2":"A B C zB NC 0B"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC","2":"7 I J TC BC UC VC cC","33":"E F G A WC XC CC"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC","33":"F lC mC nC oC pC qC"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"}},B:6,C:"isolate-override from unicode-bidi",D:undefined}; +module.exports={A:{D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M SC TC","33":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB eC fC gC hC zB NC iC 0B"},K:{"1":"s","2":"A B C zB NC 0B"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC","2":"7 I J UC BC VC WC dC","33":"E F G A XC YC CC"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC","33":"F mC nC oC pC qC rC"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"}},B:6,C:"isolate-override from unicode-bidi",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js index b91296e366b49c..7ee372591dd104 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-isolate.js @@ -1 +1 @@ -module.exports={A:{D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H","33":"8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G RC SC","33":"8 9 A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB"},K:{"1":"r","2":"A B C zB NC 0B"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC","2":"7 I TC BC UC cC","33":"J E F G A VC WC XC CC"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","33":"F kC lC mC nC oC pC qC"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"}},B:6,C:"isolate from unicode-bidi",D:undefined}; +module.exports={A:{D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H","33":"8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G SC TC","33":"8 9 A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB"},K:{"1":"s","2":"A B C zB NC 0B"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC","2":"7 I UC BC VC dC","33":"J E F G A WC XC YC CC"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","33":"F lC mC nC oC pC qC rC"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"}},B:6,C:"isolate from unicode-bidi",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js index c3da233486efd0..3847fc5350a3b2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-css-unicode-bidi-plaintext.js @@ -1 +1 @@ -module.exports={A:{D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G RC SC","33":"8 9 A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB dC eC fC gC zB NC hC 0B"},K:{"1":"r","2":"A B C zB NC 0B"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC","2":"7 I TC BC UC cC","33":"J E F G A VC WC XC CC"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","33":"F kC lC mC nC oC pC qC"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"}},B:6,C:"plaintext from unicode-bidi",D:undefined}; +module.exports={A:{D:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G SC TC","33":"8 9 A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB eC fC gC hC zB NC iC 0B"},K:{"1":"s","2":"A B C zB NC 0B"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC","2":"7 I UC BC VC dC","33":"J E F G A WC XC YC CC"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","33":"F lC mC nC oC pC qC rC"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"}},B:6,C:"plaintext from unicode-bidi",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js index c128f0c371f9b8..bd74e366078a9e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-color.js @@ -1 +1 @@ -module.exports={A:{D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC","33":"8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB dC eC fC gC zB NC hC 0B"},K:{"1":"r","2":"A B C zB NC 0B"},E:{"1":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC","2":"7 I J E TC BC UC VC WC cC","33":"F G A B C XC CC zB"},G:{"1":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC","33":"F mC nC oC pC qC rC sC tC"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"}},B:6,C:"text-decoration-color property",D:undefined}; +module.exports={A:{D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC","33":"8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB eC fC gC hC zB NC iC 0B"},K:{"1":"s","2":"A B C zB NC 0B"},E:{"1":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC","2":"7 I J E UC BC VC WC XC dC","33":"F G A B C YC CC zB"},G:{"1":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC","33":"F nC oC pC qC rC sC tC uC"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"}},B:6,C:"text-decoration-color property",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js index 51f928ed837e7f..b7f162a3f6426c 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-line.js @@ -1 +1 @@ -module.exports={A:{D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC","33":"8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB dC eC fC gC zB NC hC 0B"},K:{"1":"r","2":"A B C zB NC 0B"},E:{"1":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC","2":"7 I J E TC BC UC VC WC cC","33":"F G A B C XC CC zB"},G:{"1":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC","33":"F mC nC oC pC qC rC sC tC"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"}},B:6,C:"text-decoration-line property",D:undefined}; +module.exports={A:{D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC","33":"8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB eC fC gC hC zB NC iC 0B"},K:{"1":"s","2":"A B C zB NC 0B"},E:{"1":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC","2":"7 I J E UC BC VC WC XC dC","33":"F G A B C YC CC zB"},G:{"1":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC","33":"F nC oC pC qC rC sC tC uC"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"}},B:6,C:"text-decoration-line property",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js index 68504b6aa01e57..6df345cbe7267b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-shorthand.js @@ -1 +1 @@ -module.exports={A:{D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB dC eC fC gC zB NC hC 0B"},K:{"1":"r","2":"A B C zB NC 0B"},E:{"2":"7 I J E TC BC UC VC WC cC","33":"F G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC"},G:{"2":"BC iC OC jC kC lC","33":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"}},B:6,C:"text-decoration shorthand property",D:undefined}; +module.exports={A:{D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB eC fC gC hC zB NC iC 0B"},K:{"1":"s","2":"A B C zB NC 0B"},E:{"2":"7 I J E UC BC VC WC XC dC","33":"F G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC"},G:{"2":"BC jC OC kC lC mC","33":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"}},B:6,C:"text-decoration shorthand property",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js index 119edbe5f373de..59c560a826989a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mdn-text-decoration-style.js @@ -1 +1 @@ -module.exports={A:{D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC","33":"8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB dC eC fC gC zB NC hC 0B"},K:{"1":"r","2":"A B C zB NC 0B"},E:{"1":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC","2":"7 I J E TC BC UC VC WC cC","33":"F G A B C XC CC zB"},G:{"1":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC","33":"F mC nC oC pC qC rC sC tC"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"}},B:6,C:"text-decoration-style property",D:undefined}; +module.exports={A:{D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},L:{"1":"D"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC","33":"8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},M:{"1":"D"},A:{"2":"J E F G A B PC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB eC fC gC hC zB NC iC 0B"},K:{"1":"s","2":"A B C zB NC 0B"},E:{"1":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC","2":"7 I J E UC BC VC WC XC dC","33":"F G A B C YC CC zB"},G:{"1":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC","33":"F nC oC pC qC rC sC tC uC"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"}},B:6,C:"text-decoration-style property",D:undefined}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/media-fragments.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/media-fragments.js index ae7b755ef7417c..6ee4b4fe5bd1e8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/media-fragments.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/media-fragments.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB RC SC","132":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 I J E F G A B C K L H M N","132":"0 1 2 3 4 5 6 8 9 O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I TC BC UC","132":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","132":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"BC iC OC jC kC lC","132":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC","132":"D 9C AD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","132":"r"},L:{"132":"D"},M:{"132":"D"},N:{"132":"A B"},O:{"132":"1B"},P:{"2":"I BD","132":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"132":"DC"},R:{"132":"ND"},S:{"132":"OD PD"}},B:2,C:"Media Fragments",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB SC TC","132":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 I J E F G A B C K L H M N","132":"0 1 2 3 4 5 6 8 9 O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I UC BC VC","132":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","132":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"BC jC OC kC lC mC","132":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC","132":"D AD BD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","132":"s"},L:{"132":"D"},M:{"132":"D"},N:{"132":"A B"},O:{"132":"1B"},P:{"2":"I CD","132":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"132":"DC"},R:{"132":"OD"},S:{"132":"PD QD"}},B:2,C:"Media Fragments",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js index 1ed383a0698bc8..d55964c305ca50 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediacapture-fromelement.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB RC SC","260":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","324":"aB bB cB dB eB fB gB hB 5B iB 6B"},E:{"2":"7 I J E F G A TC BC UC VC WC XC CC","132":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB dC eC fC gC zB NC hC 0B","324":"LB MB NB OB PB QB RB SB TB UB VB WB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"260":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I","132":"BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"260":"OD PD"}},B:5,C:"Media Capture from DOM Elements API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SC TC","260":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","324":"aB bB cB dB eB fB gB hB 5B iB 6B"},E:{"2":"7 I J E F G A UC BC VC WC XC YC CC","132":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB eC fC gC hC zB NC iC 0B","324":"LB MB NB OB PB QB RB SB TB UB VB WB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"260":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I","132":"CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"260":"PD QD"}},B:5,C:"Media Capture from DOM Elements API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediarecorder.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediarecorder.js index 451cf591725089..808efbcad269c4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediarecorder.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediarecorder.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB","194":"WB XB"},E:{"1":"H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB","322":"K L 0B DC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB dC eC fC gC zB NC hC 0B","194":"JB KB"},G:{"1":"0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC","578":"tC uC vC wC xC yC zC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"MediaRecorder API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB","194":"WB XB"},E:{"1":"H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB","322":"K L 0B DC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB eC fC gC hC zB NC iC 0B","194":"JB KB"},G:{"1":"1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC","578":"uC vC wC xC yC zC 0C"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"MediaRecorder API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediasource.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediasource.js index 4b486bec354571..285fe89b2a938e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediasource.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mediasource.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q RC SC","66":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB"},D:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M","33":"9 q AB BB CB DB EB FB","66":"8 N O n o p"},E:{"1":"F G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC WC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC","260":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D AD","2":"4B I 5C 6C 7C 8C OC 9C"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"n o p q FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"Media Source Extensions",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r SC TC","66":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB"},D:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M","33":"9 r AB BB CB DB EB FB","66":"8 N O o p q"},E:{"1":"F G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC XC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC","260":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D BD","2":"4B I 6C 7C 8C 9C OC AD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"o p q r GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"Media Source Extensions",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/menu.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/menu.js index d72cdb527b70f3..3ca5c0407fa672 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/menu.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/menu.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 QC 4B I J E RC SC","132":"8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T","450":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","66":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","66":"KB LB MB NB OB PB QB RB SB TB UB VB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"450":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Context menu item (menuitem element)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 QC 4B I J E SC TC","132":"8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T","450":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","66":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","66":"KB LB MB NB OB PB QB RB SB TB UB VB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"450":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Context menu item (menuitem element)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/meta-theme-color.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/meta-theme-color.js index cf259368a225f8..4d9925149c938e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/meta-theme-color.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/meta-theme-color.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB","132":"0 1 2 3 4 5 6 r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","258":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB"},E:{"1":"H ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L TC BC UC VC WC XC CC zB 0B DC YC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"513":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I","16":"BD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:1,C:"theme-color Meta Tag",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB","132":"0 1 2 3 4 5 6 s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","258":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB"},E:{"1":"H aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L UC BC VC WC XC YC CC zB 0B DC ZC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"513":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I","16":"CD"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:1,C:"theme-color Meta Tag",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/meter.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/meter.js index 9f3878ea33fac0..c714d68a7cb42e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/meter.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/meter.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","2":"G dC eC fC gC"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"meter element",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","2":"G eC fC gC hC"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"meter element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/midi.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/midi.js index 51fd5948f5204b..c6ab08774251ed 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/midi.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/midi.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v RC SC"},D:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:5,C:"Web MIDI API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v SC TC"},D:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:5,C:"Web MIDI API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/minmaxwh.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/minmaxwh.js index 1768969f5b3676..397d75641d465a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/minmaxwh.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/minmaxwh.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","8":"J PC","129":"E","257":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS min/max-width/height",D:true}; +module.exports={A:{A:{"1":"G A B","8":"J PC","129":"E","257":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS min/max-width/height",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mp3.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mp3.js index 64a3049045e114..1998ae62809a39 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mp3.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mp3.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","132":"7 8 I J E F G A B C K L H M N O n o RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","2":"5C 6C"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"MP3 audio format",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","132":"7 8 I J E F G A B C K L H M N O o p SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","2":"6C 7C"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"MP3 audio format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mpeg-dash.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mpeg-dash.js index 1455efa728e3a3..01c199662d85c8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mpeg-dash.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mpeg-dash.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","386":"o p"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"Dynamic Adaptive Streaming over HTTP (MPEG-DASH)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","386":"p q"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"Dynamic Adaptive Streaming over HTTP (MPEG-DASH)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mpeg4.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mpeg4.js index 481e2314326b53..62380d99f2b7eb 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mpeg4.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mpeg4.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n RC SC","4":"9 o p q AB BB CB DB EB FB GB HB IB JB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D 9C AD","4":"4B I 5C 6C 8C OC","132":"7C"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"260":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"MPEG-4/H.264 video format",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o SC TC","4":"9 p q r AB BB CB DB EB FB GB HB IB JB"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D AD BD","4":"4B I 6C 7C 9C OC","132":"8C"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"260":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"MPEG-4/H.264 video format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/multibackgrounds.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/multibackgrounds.js index ec329648bd4537..61e2ebb342b53e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/multibackgrounds.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/multibackgrounds.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC SC","2":"QC 4B RC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC eC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS3 Multiple backgrounds",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC TC","2":"QC 4B SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC fC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS3 Multiple backgrounds",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/multicolumn.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/multicolumn.js index 2bcd16390dab7b..bbe9774a6ad5bf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/multicolumn.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/multicolumn.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"C K L H M N O","516":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"132":"bB cB dB eB fB gB hB 5B iB 6B jB kB lB","164":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB RC SC","516":"mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a","1028":"0 1 2 3 4 5 6 b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"420":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","516":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","132":"G XC","164":"E F WC","420":"7 I J TC BC UC VC"},F:{"1":"C zB NC hC 0B","2":"G B dC eC fC gC","420":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB","516":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","132":"nC oC","164":"F lC mC","420":"BC iC OC jC kC"},H:{"1":"4C"},I:{"420":"4B I 5C 6C 7C 8C OC 9C AD","516":"D"},J:{"420":"E A"},K:{"1":"C zB NC 0B","2":"A B","516":"r"},L:{"516":"D"},M:{"1028":"D"},N:{"1":"A B"},O:{"516":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","420":"I"},Q:{"516":"DC"},R:{"516":"ND"},S:{"164":"OD PD"}},B:4,C:"CSS3 Multiple column layout",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"C K L H M N O","516":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"132":"bB cB dB eB fB gB hB 5B iB 6B jB kB lB","164":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB SC TC","516":"mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a","1028":"0 1 2 3 4 5 6 b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"420":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","516":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","132":"G YC","164":"E F XC","420":"7 I J UC BC VC WC"},F:{"1":"C zB NC iC 0B","2":"G B eC fC gC hC","420":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB","516":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","132":"oC pC","164":"F mC nC","420":"BC jC OC kC lC"},H:{"1":"5C"},I:{"420":"4B I 6C 7C 8C 9C OC AD BD","516":"D"},J:{"420":"E A"},K:{"1":"C zB NC 0B","2":"A B","516":"s"},L:{"516":"D"},M:{"1028":"D"},N:{"1":"A B"},O:{"516":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","420":"I"},Q:{"516":"DC"},R:{"516":"OD"},S:{"164":"PD QD"}},B:4,C:"CSS3 Multiple column layout",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mutation-events.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mutation-events.js index c251bc18149914..032de210ec828e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mutation-events.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mutation-events.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","260":"G A B"},B:{"132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K L H M N O"},C:{"2":"7 QC 4B I RC SC","260":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"16":"7 I J E F G A B C K L","132":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"16":"TC BC","132":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"C hC 0B","2":"G dC eC fC gC","16":"B zB NC","132":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"16":"BC iC","132":"F OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"16":"5C 6C","132":"4B I D 7C 8C OC 9C AD"},J:{"132":"E A"},K:{"1":"C 0B","2":"A","16":"B zB NC","132":"r"},L:{"132":"D"},M:{"260":"D"},N:{"260":"A B"},O:{"132":"1B"},P:{"132":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"132":"DC"},R:{"132":"ND"},S:{"260":"OD PD"}},B:5,C:"Mutation events",D:true}; +module.exports={A:{A:{"2":"J E F PC","260":"G A B"},B:{"132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K L H M N O"},C:{"2":"7 QC 4B I SC TC","260":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"16":"7 I J E F G A B C K L","132":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"16":"UC BC","132":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"C iC 0B","2":"G eC fC gC hC","16":"B zB NC","132":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"16":"BC jC","132":"F OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"16":"6C 7C","132":"4B I D 8C 9C OC AD BD"},J:{"132":"E A"},K:{"1":"C 0B","2":"A","16":"B zB NC","132":"s"},L:{"132":"D"},M:{"260":"D"},N:{"260":"A B"},O:{"132":"1B"},P:{"132":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"132":"DC"},R:{"132":"OD"},S:{"260":"PD QD"}},B:5,C:"Mutation events",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mutationobserver.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mutationobserver.js index cd141491b0357c..e2615d47c6b876 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mutationobserver.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/mutationobserver.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F PC","8":"G A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K RC SC"},D:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N","33":"8 9 O n o p q AB BB"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","33":"J"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","33":"kC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B 5C 6C 7C","8":"I 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","8":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Mutation Observer",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F PC","8":"G A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K SC TC"},D:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N","33":"8 9 O o p q r AB BB"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","33":"J"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","33":"lC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B 6C 7C 8C","8":"I 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","8":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Mutation Observer",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/namevalue-storage.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/namevalue-storage.js index 905825f32ce6a4..933f1b5dd92a13 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/namevalue-storage.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/namevalue-storage.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"F G A B","2":"PC","8":"J E"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","4":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC eC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Web Storage - name/value pairs",D:true}; +module.exports={A:{A:{"1":"F G A B","2":"PC","8":"J E"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","4":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC fC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Web Storage - name/value pairs",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/native-filesystem-api.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/native-filesystem-api.js index d1807e9e129203..fa6f42b73e58cd 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/native-filesystem-api.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/native-filesystem-api.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","194":"P Q R S T U","260":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y RC SC","516":"0 1 2 3 4 5 6 z D 8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r","194":"uB vB wB xB yB P Q R S T U","260":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC","516":"EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB dC eC fC gC zB NC hC 0B","194":"jB kB lB mB nB oB pB qB rB sB","260":"tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C","516":"EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","516":"D"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"516":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"File System Access API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","194":"P Q R S T U","260":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y SC TC","516":"0 1 2 3 4 5 6 z D 8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s","194":"uB vB wB xB yB P Q R S T U","260":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC","516":"EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB eC fC gC hC zB NC iC 0B","194":"jB kB lB mB nB oB pB qB rB sB","260":"tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C","516":"EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","516":"D"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"516":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"File System Access API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/nav-timing.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/nav-timing.js index e8f1029b5ca6ad..55dc486d7ee1d1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/nav-timing.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/nav-timing.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I","33":"J E F G A B C"},E:{"1":"F G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC WC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"I D 8C OC 9C AD","2":"4B 5C 6C 7C"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"Navigation Timing API",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I","33":"J E F G A B C"},E:{"1":"F G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC XC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"I D 9C OC AD BD","2":"4B 6C 7C 8C"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"Navigation Timing API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/netinfo.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/netinfo.js index 2a736b21f0dea1..fe332acaf0a952 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/netinfo.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/netinfo.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","1028":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB","1028":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB dC eC fC gC zB NC hC 0B","1028":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"5C 9C AD","132":"4B I 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","132":"I","516":"BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"PD","260":"OD"}},B:7,C:"Network Information API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","1028":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB","1028":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB eC fC gC hC zB NC iC 0B","1028":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"6C AD BD","132":"4B I 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","132":"I","516":"CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"QD","260":"PD"}},B:7,C:"Network Information API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/notifications.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/notifications.js index 78d5a4a4402f81..17d4332fe51cf7 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/notifications.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/notifications.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n o RC SC"},D:{"1":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"I","36":"7 8 J E F G A B C K L H M N O n o"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC","516":"JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC","36":"D 9C AD"},J:{"1":"A","2":"E"},K:{"2":"A B C zB NC 0B","36":"r"},L:{"257":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"36":"I","130":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"130":"ND"},S:{"1":"OD PD"}},B:1,C:"Web Notifications",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o p SC TC"},D:{"1":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"I","36":"7 8 J E F G A B C K L H M N O o p"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC","516":"JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC","36":"D AD BD"},J:{"1":"A","2":"E"},K:{"2":"A B C zB NC 0B","36":"s"},L:{"257":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"36":"I","130":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"130":"OD"},S:{"1":"PD QD"}},B:1,C:"Web Notifications",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-entries.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-entries.js index cb0dfec10e188d..fcb3939e9bca91 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-entries.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-entries.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB RC SC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB dC eC fC gC zB NC hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","16":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Object.entries",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB SC TC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB eC fC gC hC zB NC iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E","16":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Object.entries",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-fit.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-fit.js index 655f3f1ece6efc..75c5db694a12a1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-fit.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-fit.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H","260":"M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB RC SC"},D:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC","132":"F G WC XC"},F:{"1":"8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G H M N O dC eC fC","33":"B C gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC","132":"F mC nC oC"},H:{"33":"4C"},I:{"1":"D AD","2":"4B I 5C 6C 7C 8C OC 9C"},J:{"2":"E A"},K:{"1":"r","2":"A","33":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS3 object-fit/object-position",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H","260":"M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB SC TC"},D:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC","132":"F G XC YC"},F:{"1":"8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G H M N O eC fC gC","33":"B C hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC","132":"F nC oC pC"},H:{"33":"5C"},I:{"1":"D BD","2":"4B I 6C 7C 8C 9C OC AD"},J:{"2":"E A"},K:{"1":"s","2":"A","33":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS3 object-fit/object-position",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-observe.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-observe.js index e2b0fee749d198..137a931109b91b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-observe.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-observe.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB","2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"9 q AB BB CB DB EB FB GB HB IB JB KB LB","2":"8 G B C H M N O n o p MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"I","2":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Object.observe data binding",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB","2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"9 r AB BB CB DB EB FB GB HB IB JB KB LB","2":"8 G B C H M N O o p q MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"I","2":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Object.observe data binding",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-values.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-values.js index 57c4a19b858c86..4452ec4a4df4db 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-values.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/object-values.js @@ -1 +1 @@ -module.exports={A:{A:{"8":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB RC SC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","8":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB dC eC fC gC zB NC hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","8":"F BC iC OC jC kC lC mC nC oC pC"},H:{"8":"4C"},I:{"1":"D","8":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"8":"E A"},K:{"1":"r","8":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","8":"I BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Object.values method",D:true}; +module.exports={A:{A:{"8":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","8":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB SC TC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","8":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","8":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB eC fC gC hC zB NC iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","8":"F BC jC OC kC lC mC nC oC pC qC"},H:{"8":"5C"},I:{"1":"D","8":"4B I 6C 7C 8C 9C OC AD BD"},J:{"8":"E A"},K:{"1":"s","8":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","8":"I CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Object.values method",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/objectrtc.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/objectrtc.js index 8c29ad5386031d..4614df817ff770 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/objectrtc.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/objectrtc.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"K L H M N O","2":"0 1 2 3 4 5 6 C P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"Object RTC (ORTC) API for WebRTC",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"K L H M N O","2":"0 1 2 3 4 5 6 C P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"Object RTC (ORTC) API for WebRTC",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/offline-apps.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/offline-apps.js index 0692ac938d443e..fc496eca27c571 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/offline-apps.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/offline-apps.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"G PC","8":"J E F"},B:{"1":"C K L H M N O P Q R S T","2":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S RC SC","2":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"4B","8":"QC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T","2":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB gC zB NC hC 0B","2":"G r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC","8":"eC fC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I 5C 6C 7C 8C OC 9C AD","2":"D"},J:{"1":"E A"},K:{"1":"B C zB NC 0B","2":"A r"},L:{"2":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"2":"ND"},S:{"1":"OD","2":"PD"}},B:7,C:"Offline web applications",D:true}; +module.exports={A:{A:{"1":"A B","2":"G PC","8":"J E F"},B:{"1":"C K L H M N O P Q R S T","2":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S SC TC","2":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","4":"4B","8":"QC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T","2":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB hC zB NC iC 0B","2":"G s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC","8":"fC gC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I 6C 7C 8C 9C OC AD BD","2":"D"},J:{"1":"E A"},K:{"1":"B C zB NC 0B","2":"A s"},L:{"2":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"2":"OD"},S:{"1":"PD","2":"QD"}},B:7,C:"Offline web applications",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/offscreencanvas.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/offscreencanvas.js index e85bdff0338cd2..2e239d1aa0840b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/offscreencanvas.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/offscreencanvas.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB RC SC","194":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s"},D:{"1":"0 1 2 3 4 5 6 qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","322":"hB 5B iB 6B jB kB lB mB nB oB pB"},E:{"1":"3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC","516":"HC IC JC KC bC"},F:{"1":"lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB dC eC fC gC zB NC hC 0B","322":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB"},G:{"1":"3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC","516":"HC IC JC KC 3C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"194":"OD PD"}},B:1,C:"OffscreenCanvas",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB SC TC","194":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},D:{"1":"0 1 2 3 4 5 6 qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","322":"hB 5B iB 6B jB kB lB mB nB oB pB"},E:{"1":"3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC","516":"HC IC JC KC cC"},F:{"1":"lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB eC fC gC hC zB NC iC 0B","322":"UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB"},G:{"1":"3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC","516":"HC IC JC KC 4C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"194":"PD QD"}},B:1,C:"OffscreenCanvas",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ogg-vorbis.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ogg-vorbis.js index d899cff16a8ccd..2e736bcae86bc4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ogg-vorbis.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ogg-vorbis.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L TC BC UC VC WC XC CC zB 0B DC","132":"H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC eC"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"A","2":"E"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Ogg Vorbis audio format",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L UC BC VC WC XC YC CC zB 0B DC","132":"H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC fC"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"A","2":"E"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Ogg Vorbis audio format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ogv.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ogv.js index fc99f4fc25c0e3..3c5cf23d44b1c4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ogv.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ogv.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","8":"G A B"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","8":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","194":"8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC eC"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"2":"ND"},S:{"1":"OD PD"}},B:6,C:"Ogg/Theora video format",D:true}; +module.exports={A:{A:{"2":"J E F PC","8":"G A B"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","8":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","194":"8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC fC"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"2":"OD"},S:{"1":"PD QD"}},B:6,C:"Ogg/Theora video format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ol-reversed.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ol-reversed.js index 63bfc470b090bf..7a5baf1ebcd9c8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ol-reversed.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ol-reversed.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M N RC SC"},D:{"1":"0 1 2 3 4 5 6 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H","16":"8 M N O"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","16":"J"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B dC eC fC gC zB NC hC","16":"C"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Reversed attribute of ordered lists",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M N SC TC"},D:{"1":"0 1 2 3 4 5 6 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H","16":"8 M N O"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","16":"J"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B eC fC gC hC zB NC iC","16":"C"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Reversed attribute of ordered lists",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/once-event-listener.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/once-event-listener.js index c310241a9fa150..8db2feca734562 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/once-event-listener.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/once-event-listener.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB RC SC"},D:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB dC eC fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:1,C:"\"once\" event listener option",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H"},C:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB SC TC"},D:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB eC fC gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:1,C:"\"once\" event listener option",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/online-status.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/online-status.js index 35e4b1c8775eda..bfca34aee4da64 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/online-status.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/online-status.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E PC","260":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC 4B","516":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},D:{"1":"0 1 2 3 4 5 6 8 9 L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K"},E:{"1":"7 J F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","1025":"E"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC","4":"0B"},G:{"1":"F OC jC kC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC","1025":"lC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"A","132":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Online/offline status",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E PC","260":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC 4B","516":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},D:{"1":"0 1 2 3 4 5 6 8 9 L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K"},E:{"1":"7 J F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","1025":"E"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC","4":"0B"},G:{"1":"F OC kC lC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC","1025":"mC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"A","132":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Online/offline status",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/opus.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/opus.js index 7fd74f125430de..4f8655ba832dae 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/opus.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/opus.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L RC SC"},D:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB"},E:{"2":"7 I J E F G A TC BC UC VC WC XC CC","132":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC","132":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Opus audio format",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L SC TC"},D:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB"},E:{"2":"7 I J E F G A UC BC VC WC XC YC CC","132":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC","132":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Opus audio format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/orientation-sensor.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/orientation-sensor.js index be202e917affa4..ff673c9bed2e75 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/orientation-sensor.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/orientation-sensor.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","194":"hB 5B iB 6B jB kB lB mB nB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:4,C:"Orientation Sensor",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB","194":"hB 5B iB 6B jB kB lB mB nB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:4,C:"Orientation Sensor",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/outline.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/outline.js index 7efacfb4455626..1f16529a43db5f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/outline.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/outline.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E PC","260":"F","388":"G A B"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","388":"C K L"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC","129":"0B","260":"G B dC eC fC gC zB NC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"C r 0B","260":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"388":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS outline properties",D:true}; +module.exports={A:{A:{"2":"J E PC","260":"F","388":"G A B"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","388":"C K L"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC","129":"0B","260":"G B eC fC gC hC zB NC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"C s 0B","260":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"388":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS outline properties",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pad-start-end.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pad-start-end.js index 2588aef06832f6..5e4fcb0a46bde6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pad-start-end.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pad-start-end.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB RC SC"},D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB dC eC fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"String.prototype.padStart(), String.prototype.padEnd()",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB SC TC"},D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB eC fC gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"String.prototype.padStart(), String.prototype.padEnd()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/page-transition-events.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/page-transition-events.js index 85e5ca08497f7a..aaea440c4faaf3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/page-transition-events.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/page-transition-events.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"PageTransitionEvent",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"PageTransitionEvent",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pagevisibility.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pagevisibility.js index d10d89ab6a459f..f527926d7b0788 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pagevisibility.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pagevisibility.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G RC SC","33":"A B C K L H M N"},D:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K","33":"8 9 L H M N O n o p q AB BB CB DB EB FB GB HB"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC"},F:{"1":"9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B C dC eC fC gC zB NC hC","33":"8 H M N O"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC","33":"9C AD"},J:{"1":"A","2":"E"},K:{"1":"r 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","33":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"Page Visibility",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G SC TC","33":"A B C K L H M N"},D:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K","33":"8 9 L H M N O o p q r AB BB CB DB EB FB GB HB"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC"},F:{"1":"9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B C eC fC gC hC zB NC iC","33":"8 H M N O"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC","33":"AD BD"},J:{"1":"A","2":"E"},K:{"1":"s 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","33":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"Page Visibility",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passive-event-listener.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passive-event-listener.js index 6c6bf5256ff255..fcf09debf03fe3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passive-event-listener.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passive-event-listener.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB RC SC"},D:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB dC eC fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:1,C:"Passive event listeners",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB SC TC"},D:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB eC fC gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:1,C:"Passive event listeners",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passkeys.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passkeys.js index 552238deea6f40..d4ab05e00fbc57 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passkeys.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passkeys.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v"},E:{"1":"GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B"},F:{"1":"g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f dC eC fC gC zB NC hC 0B"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q","2":"I BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","16":"n"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"Passkeys",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v"},E:{"1":"GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B"},F:{"1":"g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f eC fC gC hC zB NC iC 0B"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"p q r","2":"I CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","16":"o"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"Passkeys",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passwordrules.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passwordrules.js index e9d50a3839eaec..d10b485c274d77 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passwordrules.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/passwordrules.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","16":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D RC SC","16":"8B 9B AC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","16":"8B 9B AC"},E:{"1":"C K 0B","2":"7 I J E F G A B TC BC UC VC WC XC CC zB","16":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB dC eC fC gC zB NC hC 0B","16":"cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"16":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","16":"D"},J:{"2":"E","16":"A"},K:{"2":"A B C zB NC 0B","16":"r"},L:{"16":"D"},M:{"16":"D"},N:{"2":"A","16":"B"},O:{"16":"1B"},P:{"2":"I BD CD","16":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"16":"DC"},R:{"16":"ND"},S:{"2":"OD PD"}},B:1,C:"Password Rules",D:false}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","16":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B SC TC","16":"9B AC RC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","16":"8B 9B AC"},E:{"1":"C K 0B","2":"7 I J E F G A B UC BC VC WC XC YC CC zB","16":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB eC fC gC hC zB NC iC 0B","16":"cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"16":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","16":"D"},J:{"2":"E","16":"A"},K:{"2":"A B C zB NC 0B","16":"s"},L:{"16":"D"},M:{"16":"D"},N:{"2":"A","16":"B"},O:{"16":"1B"},P:{"2":"I CD DD","16":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"16":"DC"},R:{"16":"OD"},S:{"2":"PD QD"}},B:1,C:"Password Rules",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/path2d.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/path2d.js index a5d616e51114a5..53517d1dc2b0ae 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/path2d.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/path2d.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K","132":"L H M N O"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB RC SC","132":"GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},D:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB","132":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC VC","132":"F G WC"},F:{"1":"eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o p dC eC fC gC zB NC hC 0B","132":"9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC","16":"F","132":"mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CC GD HD ID JD KD 2B 3B LD MD","132":"I BD CD DD ED FD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Path2D",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K","132":"L H M N O"},C:{"1":"0 1 2 3 4 5 6 XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB SC TC","132":"GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB"},D:{"1":"0 1 2 3 4 5 6 pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB","132":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC WC","132":"F G XC"},F:{"1":"eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p q eC fC gC hC zB NC iC 0B","132":"9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC","16":"F","132":"nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CC HD ID JD KD LD 2B 3B MD ND","132":"I CD DD ED FD GD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Path2D",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/payment-request.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/payment-request.js index 87e98542dfac85..ff6ac4ab4d7ecc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/payment-request.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/payment-request.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K","322":"L","8196":"H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB RC SC","4162":"eB fB gB hB 5B iB 6B jB kB lB mB","16452":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB","194":"cB dB eB fB gB hB","1090":"5B iB","8196":"6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB"},E:{"1":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC","514":"A B CC","8196":"C zB"},F:{"1":"nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB dC eC fC gC zB NC hC 0B","194":"PB QB RB SB TB UB VB WB","8196":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB"},G:{"1":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC","514":"pC qC rC","8196":"sC tC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"2049":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q HD ID JD KD 2B 3B LD MD","2":"I","8196":"BD CD DD ED FD CC GD"},Q:{"8196":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:2,C:"Payment Request API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K","322":"L","8196":"H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB SC TC","4162":"eB fB gB hB 5B iB 6B jB kB lB mB","16452":"0 1 2 3 4 5 6 nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB","194":"cB dB eB fB gB hB","1090":"5B iB","8196":"6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB"},E:{"1":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC","514":"A B CC","8196":"C zB"},F:{"1":"nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB eC fC gC hC zB NC iC 0B","194":"PB QB RB SB TB UB VB WB","8196":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB"},G:{"1":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC","514":"qC rC sC","8196":"tC uC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"2049":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r ID JD KD LD 2B 3B MD ND","2":"I","8196":"CD DD ED FD GD CC HD"},Q:{"8196":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:2,C:"Payment Request API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pdf-viewer.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pdf-viewer.js index 3753e9ffb7e06d..a0ccaa5b042a08 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pdf-viewer.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pdf-viewer.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","16":"C K L"},C:{"1":"0 1 2 3 4 5 6 8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M N O RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC BC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B dC eC fC gC zB NC hC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"16":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"16":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"Built-in PDF viewer",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","16":"C K L"},C:{"1":"0 1 2 3 4 5 6 8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M N O SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC BC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B eC fC gC hC zB NC iC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"16":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"16":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"Built-in PDF viewer",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/permissions-api.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/permissions-api.js index b6f93ab8f5be9f..5c4ae388598b55 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/permissions-api.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/permissions-api.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB RC SC"},D:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC"},F:{"1":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB dC eC fC gC zB NC hC 0B"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Permissions API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB SC TC"},D:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC"},F:{"1":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB eC fC gC hC zB NC iC 0B"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Permissions API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/permissions-policy.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/permissions-policy.js index 145932f4c5d858..21c213ff8d7781 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/permissions-policy.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/permissions-policy.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","258":"P Q R S T U","322":"V W","388":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r RC SC","258":"0 1 2 3 4 5 6 uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","258":"iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U","322":"V W","388":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B TC BC UC VC WC XC CC","258":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB dC eC fC gC zB NC hC 0B","258":"WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB","322":"tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d","388":"e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC","258":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","258":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","388":"r"},L:{"388":"D"},M:{"258":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I BD CD DD","258":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"258":"DC"},R:{"388":"ND"},S:{"2":"OD","258":"PD"}},B:5,C:"Permissions Policy",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","258":"P Q R S T U","322":"V W","388":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s SC TC","258":"0 1 2 3 4 5 6 uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","258":"iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U","322":"V W","388":"0 1 2 3 4 5 6 X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B UC BC VC WC XC YC CC","258":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB eC fC gC hC zB NC iC 0B","258":"WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB","322":"tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d","388":"e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC","258":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","258":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","388":"s"},L:{"388":"D"},M:{"258":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I CD DD ED","258":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"258":"DC"},R:{"388":"OD"},S:{"2":"PD","258":"QD"}},B:5,C:"Permissions Policy",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/picture-in-picture.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/picture-in-picture.js index 145ab0296e478b..daa91ee92c5af9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/picture-in-picture.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/picture-in-picture.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB RC SC","132":"0 1 2 3 4 5 6 tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","1090":"oB","1412":"sB","1668":"pB qB rB"},D:{"1":"0 1 2 3 4 5 6 rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB","2114":"qB"},E:{"1":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC","4100":"A B C K CC zB 0B"},F:{"1":"r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB dC eC fC gC zB NC hC 0B","8196":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB"},G:{"1":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC","4100":"nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"16388":"D"},M:{"16388":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"Picture-in-Picture",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB SC TC","132":"0 1 2 3 4 5 6 tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","1090":"oB","1412":"sB","1668":"pB qB rB"},D:{"1":"0 1 2 3 4 5 6 rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB","2114":"qB"},E:{"1":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC","4100":"A B C K CC zB 0B"},F:{"1":"s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB eC fC gC hC zB NC iC 0B","8196":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB"},G:{"1":"0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC","4100":"oC pC qC rC sC tC uC vC wC xC yC zC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"16388":"D"},M:{"16388":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"Picture-in-Picture",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/picture.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/picture.js index 9b8ef064b74152..1b95c6a4a2859b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/picture.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/picture.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB RC SC","578":"JB KB LB MB"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB","194":"MB"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o p q dC eC fC gC zB NC hC 0B","322":"9"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Picture element",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB SC TC","578":"JB KB LB MB"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB","194":"MB"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p q r eC fC gC hC zB NC iC 0B","322":"9"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Picture element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ping.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ping.js index 8f217d295d9af6..3a773ae5cb0fbc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ping.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ping.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M"},C:{"2":"QC","194":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"194":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"194":"OD PD"}},B:1,C:"Ping attribute",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M"},C:{"2":"QC","194":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"194":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"194":"PD QD"}},B:1,C:"Ping attribute",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/png-alpha.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/png-alpha.js index 3e3de680a4860a..f9507157a761b5 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/png-alpha.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/png-alpha.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"E F G A B","2":"PC","8":"J"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"PNG alpha transparency",D:true}; +module.exports={A:{A:{"1":"E F G A B","2":"PC","8":"J"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"PNG alpha transparency",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointer-events.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointer-events.js index 501a290213d9b5..7472a03fa2efc0 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointer-events.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointer-events.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC SC","2":"QC 4B RC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:7,C:"CSS pointer-events (for HTML)",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC TC","2":"QC 4B SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:7,C:"CSS pointer-events (for HTML)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointer.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointer.js index 2fca5620f8ebd7..ad5bf175df8e4a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointer.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointer.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G PC","164":"A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC","8":"8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","328":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB"},D:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n o","8":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","584":"bB cB dB"},E:{"1":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC","8":"E F G A B C VC WC XC CC zB","1096":"0B"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","8":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB","584":"OB PB QB"},G:{"1":"wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","8":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC","6148":"vC"},H:{"2":"4C"},I:{"1":"D","8":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"8":"E A"},K:{"1":"r","2":"A","8":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","36":"A"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"BD","8":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","328":"OD"}},B:2,C:"Pointer events",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G PC","164":"A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC","8":"8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB","328":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB"},D:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o p","8":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","584":"bB cB dB"},E:{"1":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC","8":"E F G A B C WC XC YC CC zB","1096":"0B"},F:{"1":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","8":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB","584":"OB PB QB"},G:{"1":"xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","8":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC","6148":"wC"},H:{"2":"5C"},I:{"1":"D","8":"4B I 6C 7C 8C 9C OC AD BD"},J:{"8":"E A"},K:{"1":"s","2":"A","8":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","36":"A"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"CD","8":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","328":"PD"}},B:2,C:"Pointer events",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointerlock.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointerlock.js index d4a081f22e30a0..9b36fe18d48b8e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointerlock.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/pointerlock.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K RC SC","33":"8 9 L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H","33":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB","66":"8 M N O n o"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","33":"8 H M N O n o p q"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"Pointer Lock API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C"},C:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K SC TC","33":"8 9 L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},D:{"1":"0 1 2 3 4 5 6 MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H","33":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB","66":"8 M N O o p"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","33":"8 H M N O o p q r"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"Pointer Lock API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/portals.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/portals.js index 14fa5f2061042e..f90be9be0fea2f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/portals.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/portals.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T","322":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m s t u v w x y z D","450":"U V W X Y"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB","194":"vB wB xB yB P Q R S T","322":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","450":"U"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB dC eC fC gC zB NC hC 0B","194":"jB kB lB mB nB oB pB qB rB sB tB","322":"r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"450":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Portals",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O P Q R S T","322":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m n t u v w x y z D","450":"U V W X Y"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB","194":"vB wB xB yB P Q R S T","322":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","450":"U"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB eC fC gC hC zB NC iC 0B","194":"jB kB lB mB nB oB pB qB rB sB tB","322":"s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"450":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Portals",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/prefers-color-scheme.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/prefers-color-scheme.js index 58e69850ee6db4..fa11ee7987cfd2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/prefers-color-scheme.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/prefers-color-scheme.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB RC SC"},D:{"1":"0 1 2 3 4 5 6 wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB"},E:{"1":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB"},F:{"1":"jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB dC eC fC gC zB NC hC 0B"},G:{"1":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"prefers-color-scheme media query",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB SC TC"},D:{"1":"0 1 2 3 4 5 6 wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB"},E:{"1":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB"},F:{"1":"jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB eC fC gC hC zB NC iC 0B"},G:{"1":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"prefers-color-scheme media query",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js index 49a2467e653e71..f36be179874138 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/prefers-reduced-motion.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB RC SC"},D:{"1":"0 1 2 3 4 5 6 uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB dC eC fC gC zB NC hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"prefers-reduced-motion media query",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB SC TC"},D:{"1":"0 1 2 3 4 5 6 uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB eC fC gC hC zB NC iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"prefers-reduced-motion media query",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/progress.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/progress.js index 187f98cb287dbe..ef08a49db60c0f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/progress.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/progress.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","2":"G dC eC fC gC"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC","132":"lC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"progress element",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","2":"G eC fC gC hC"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC","132":"mC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"progress element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/promise-finally.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/promise-finally.js index 57bc567d83d165..09da103a76bb3d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/promise-finally.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/promise-finally.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB RC SC"},D:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC"},F:{"1":"ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB dC eC fC gC zB NC hC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:6,C:"Promise.prototype.finally",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB SC TC"},D:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC"},F:{"1":"ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB eC fC gC hC zB NC iC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:6,C:"Promise.prototype.finally",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/promises.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/promises.js index 2f80aac2e9c24f..62fa0e6182916d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/promises.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/promises.js @@ -1 +1 @@ -module.exports={A:{A:{"8":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"CB DB","8":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB RC SC"},D:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"HB","8":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB"},E:{"1":"F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"7 I J E TC BC UC VC"},F:{"1":"9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","4":"8","8":"G B C H M N O dC eC fC gC zB NC hC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","8":"BC iC OC jC kC lC"},H:{"8":"4C"},I:{"1":"D AD","8":"4B I 5C 6C 7C 8C OC 9C"},J:{"8":"E A"},K:{"1":"r","8":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Promises",D:true}; +module.exports={A:{A:{"8":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","4":"CB DB","8":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB SC TC"},D:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","4":"HB","8":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB"},E:{"1":"F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"7 I J E UC BC VC WC"},F:{"1":"9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","4":"8","8":"G B C H M N O eC fC gC hC zB NC iC 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","8":"BC jC OC kC lC mC"},H:{"8":"5C"},I:{"1":"D BD","8":"4B I 6C 7C 8C 9C OC AD"},J:{"8":"E A"},K:{"1":"s","8":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Promises",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/proximity.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/proximity.js index 6f9dedf712ad10..c193d5765a46f7 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/proximity.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/proximity.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"1":"OD PD"}},B:4,C:"Proximity API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"1":"PD QD"}},B:4,C:"Proximity API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/proxy.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/proxy.js index 5fa8cb467c47db..e63d0fbce3c3bd 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/proxy.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/proxy.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M N RC SC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N O NB OB PB QB RB SB TB UB VB WB XB","66":"8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C AB BB CB DB EB FB GB HB IB JB KB dC eC fC gC zB NC hC 0B","66":"8 9 H M N O n o p q"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Proxy object",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M N SC TC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N O NB OB PB QB RB SB TB UB VB WB XB","66":"8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C AB BB CB DB EB FB GB HB IB JB KB eC fC gC hC zB NC iC 0B","66":"8 9 H M N O o p q r"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Proxy object",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/publickeypinning.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/publickeypinning.js index 1074f44de4c268..399f53cbf21997 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/publickeypinning.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/publickeypinning.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB","2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB","2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB","2":"8 G B C H M N O nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","4":"q","16":"9 n o p"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"I BD CD DD ED FD CC","2":"n o p q GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"1":"OD","2":"PD"}},B:6,C:"HTTP Public Key Pinning",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB","2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB","2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB","2":"8 G B C H M N O nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","4":"r","16":"9 o p q"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"I CD DD ED FD GD CC","2":"o p q r HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"1":"PD","2":"QD"}},B:6,C:"HTTP Public Key Pinning",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/push-api.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/push-api.js index 52a60019c77dd2..1a0d4f6d403521 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/push-api.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/push-api.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"N O","2":"C K L H M","257":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB RC SC","257":"0 1 2 3 4 5 6 TB VB WB XB YB ZB aB cB dB eB fB gB hB 5B 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","1281":"UB bB iB"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB","257":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","388":"TB UB VB WB XB YB"},E:{"2":"7 I J TC BC UC VC","514":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B","2564":"GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB dC eC fC gC zB NC hC 0B","16":"MB NB OB PB QB","257":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC","4100":"JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"2":"ND"},S:{"257":"OD PD"}},B:5,C:"Push API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"N O","2":"C K L H M","257":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB SC TC","257":"0 1 2 3 4 5 6 TB VB WB XB YB ZB aB cB dB eB fB gB hB 5B 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","1281":"UB bB iB"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB","257":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","388":"TB UB VB WB XB YB"},E:{"2":"7 I J UC BC VC WC","514":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B","2564":"GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB eC fC gC hC zB NC iC 0B","16":"MB NB OB PB QB","257":"RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC","4100":"JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"2":"OD"},S:{"257":"PD QD"}},B:5,C:"Push API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/queryselector.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/queryselector.js index f82151f575faed..4ae410b6c55034 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/queryselector.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/queryselector.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E","132":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","8":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m eC fC gC zB NC hC 0B","8":"G dC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"querySelector/querySelectorAll",D:true}; +module.exports={A:{A:{"1":"G A B","2":"PC","8":"J E","132":"F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","8":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n fC gC hC zB NC iC 0B","8":"G eC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"querySelector/querySelectorAll",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/readonly-attr.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/readonly-attr.js index 16315bef1ea15d..2b77cc9d783695 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/readonly-attr.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/readonly-attr.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 8 9 I J E F G A B C K L H M N O n o p q AB"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G dC","132":"B C eC fC gC zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC jC kC"},H:{"1":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"r","132":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"257":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"readonly attribute of input and textarea elements",D:true}; +module.exports={A:{A:{"1":"J E F G A B","16":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","16":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 8 9 I J E F G A B C K L H M N O o p q r AB"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G eC","132":"B C fC gC hC zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC kC lC"},H:{"1":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"s","132":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"257":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"readonly attribute of input and textarea elements",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/referrer-policy.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/referrer-policy.js index bb22cd72b08081..c42f5542f8dea9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/referrer-policy.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/referrer-policy.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","132":"C K L H M N O","516":"P Q R S T"},C:{"1":"W X Y Z a","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB RC SC","516":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V","2049":"0 1 2 3 4 5 6 b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n","260":"9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB","516":"6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T"},E:{"2":"7 I J E TC BC UC VC","132":"F G A B WC XC CC","516":"C zB 0B","1025":"H ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","1540":"K L DC YC"},F:{"1":"r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","516":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB"},G:{"2":"BC iC OC jC kC lC","132":"F mC nC oC pC qC rC sC","516":"tC uC vC wC","1025":"1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","1540":"xC yC zC 0C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2049":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q JD KD 2B 3B LD MD","2":"I","516":"BD CD DD ED FD CC GD HD ID"},Q:{"1":"DC"},R:{"1":"ND"},S:{"516":"OD PD"}},B:4,C:"Referrer Policy",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","132":"C K L H M N O","516":"P Q R S T"},C:{"1":"W X Y Z a","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB SC TC","516":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V","2049":"0 1 2 3 4 5 6 b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o","260":"9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB","516":"6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T"},E:{"2":"7 I J E UC BC VC WC","132":"F G A B XC YC CC","516":"C zB 0B","1025":"H aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","1540":"K L DC ZC"},F:{"1":"s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","516":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB"},G:{"2":"BC jC OC kC lC mC","132":"F nC oC pC qC rC sC tC","516":"uC vC wC xC","1025":"2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","1540":"yC zC 0C 1C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2049":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r KD LD 2B 3B MD ND","2":"I","516":"CD DD ED FD GD CC HD ID JD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"516":"PD QD"}},B:4,C:"Referrer Policy",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/registerprotocolhandler.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/registerprotocolhandler.js index 0942cb84534229..85217b3a30edf4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/registerprotocolhandler.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/registerprotocolhandler.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","129":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC"},D:{"2":"7 I J E F G A B C","129":"0 1 2 3 4 5 6 8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B dC eC fC gC zB NC","129":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","129":"A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:1,C:"Custom protocol handling",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","129":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC"},D:{"2":"7 I J E F G A B C","129":"0 1 2 3 4 5 6 8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B eC fC gC hC zB NC","129":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E","129":"A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:1,C:"Custom protocol handling",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rel-noopener.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rel-noopener.js index 04710dab625b72..cf3a17a97cc728 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rel-noopener.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rel-noopener.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB RC SC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB dC eC fC gC zB NC hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:1,C:"rel=noopener",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB SC TC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB eC fC gC hC zB NC iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:1,C:"rel=noopener",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rel-noreferrer.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rel-noreferrer.js index 21f068098ed011..6518fea88967c1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rel-noreferrer.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rel-noreferrer.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","16":"C"},C:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L H"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Link type \"noreferrer\"",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","132":"B"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","16":"C"},C:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L H"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Link type \"noreferrer\"",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rellist.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rellist.js index 4a7ce12af3270c..34153a4d749a9d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rellist.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rellist.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M","132":"N"},C:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB RC SC"},D:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","132":"ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F TC BC UC VC WC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB dC eC fC gC zB NC hC 0B","132":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q FD CC GD HD ID JD KD 2B 3B LD MD","2":"I","132":"BD CD DD ED"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"relList (DOMTokenList)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M","132":"N"},C:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB SC TC"},D:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB","132":"ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F UC BC VC WC XC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB eC fC gC hC zB NC iC 0B","132":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r GD CC HD ID JD KD LD 2B 3B MD ND","2":"I","132":"CD DD ED FD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"relList (DOMTokenList)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rem.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rem.js index fec75b3546bd2f..fb1990917586f2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rem.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rem.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F PC","132":"G A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC SC","2":"QC 4B RC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G B dC eC fC gC zB NC"},G:{"1":"F iC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC","260":"jC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"C r 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"rem (root em) units",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F PC","132":"G A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC TC","2":"QC 4B SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G B eC fC gC hC zB NC"},G:{"1":"F jC OC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC","260":"kC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"C s 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"rem (root em) units",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/requestanimationframe.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/requestanimationframe.js index 3e3ff5c07548f5..56120d98066afe 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/requestanimationframe.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/requestanimationframe.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","33":"8 B C K L H M N O n o p","164":"7 I J E F G A"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G","33":"p q","164":"8 O n o","420":"A B C K L H M N"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","33":"J"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","33":"kC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"requestAnimationFrame",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","33":"8 B C K L H M N O o p q","164":"7 I J E F G A"},D:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G","33":"q r","164":"8 O o p","420":"A B C K L H M N"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","33":"J"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","33":"lC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"requestAnimationFrame",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/requestidlecallback.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/requestidlecallback.js index d4059ce196b1ff..ab2f71ffda4a57 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/requestidlecallback.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/requestidlecallback.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB RC SC","194":"cB dB"},D:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB"},E:{"1":"cC","2":"7 I J E F G A B C K TC BC UC VC WC XC CC zB 0B","322":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC"},F:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC","322":"yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"requestIdleCallback",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB SC TC","194":"cB dB"},D:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB"},E:{"1":"dC","2":"7 I J E F G A B C K UC BC VC WC XC YC CC zB 0B","322":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC"},F:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC","322":"zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"requestIdleCallback",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/resizeobserver.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/resizeobserver.js index a8cc5a71404cfc..04717a518693cc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/resizeobserver.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/resizeobserver.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB RC SC"},D:{"1":"0 1 2 3 4 5 6 lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB","194":"dB eB fB gB hB 5B iB 6B jB kB"},E:{"1":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB 0B","66":"K"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB dC eC fC gC zB NC hC 0B","194":"QB RB SB TB UB VB WB XB YB ZB aB"},G:{"1":"yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"Resize Observer",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB SC TC"},D:{"1":"0 1 2 3 4 5 6 lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB","194":"dB eB fB gB hB 5B iB 6B jB kB"},E:{"1":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB 0B","66":"K"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB eC fC gC hC zB NC iC 0B","194":"QB RB SB TB UB VB WB XB YB ZB aB"},G:{"1":"zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"Resize Observer",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/resource-timing.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/resource-timing.js index 39e95339b5bafc..613532fb98a2a9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/resource-timing.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/resource-timing.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB RC SC","194":"GB HB IB JB"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC","260":"B"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"Resource Timing",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB SC TC","194":"GB HB IB JB"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC","260":"B"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"Resource Timing",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rest-parameters.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rest-parameters.js index 208fa9bcebf1b5..3ab2f04d6e4078 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rest-parameters.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rest-parameters.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L RC SC"},D:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB","194":"TB UB VB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB dC eC fC gC zB NC hC 0B","194":"GB HB IB"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Rest parameters",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L SC TC"},D:{"1":"0 1 2 3 4 5 6 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB","194":"TB UB VB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB eC fC gC hC zB NC iC 0B","194":"GB HB IB"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Rest parameters",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rtcpeerconnection.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rtcpeerconnection.js index 1bc00fb74114f8..764c7ae8e037e0 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rtcpeerconnection.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/rtcpeerconnection.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L","260":"H M N O"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n o RC SC","33":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n o p","33":"9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C H M N dC eC fC gC zB NC hC 0B","33":"8 9 O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","130":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"33":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"WebRTC Peer-to-peer connections",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L","260":"H M N O"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o p SC TC","33":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o p q","33":"9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C H M N eC fC gC hC zB NC iC 0B","33":"8 9 O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E","130":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"33":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"WebRTC Peer-to-peer connections",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ruby.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ruby.js index 9754b2e3188647..458616fce929b3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ruby.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ruby.js @@ -1 +1 @@ -module.exports={A:{A:{"4":"J E F PC","132":"G A B"},B:{"4":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB RC SC"},D:{"4":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"I"},E:{"4":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"I TC BC"},F:{"4":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","8":"G B C dC eC fC gC zB NC hC 0B"},G:{"4":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","8":"BC iC OC"},H:{"8":"4C"},I:{"4":"4B I D 8C OC 9C AD","8":"5C 6C 7C"},J:{"4":"A","8":"E"},K:{"4":"r","8":"A B C zB NC 0B"},L:{"4":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"4":"1B"},P:{"4":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"4":"DC"},R:{"4":"ND"},S:{"1":"OD PD"}},B:1,C:"Ruby annotation",D:true}; +module.exports={A:{A:{"4":"J E F PC","132":"G A B"},B:{"4":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","8":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB SC TC"},D:{"4":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","8":"I"},E:{"4":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"I UC BC"},F:{"4":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","8":"G B C eC fC gC hC zB NC iC 0B"},G:{"4":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","8":"BC jC OC"},H:{"8":"5C"},I:{"4":"4B I D 9C OC AD BD","8":"6C 7C 8C"},J:{"4":"A","8":"E"},K:{"4":"s","8":"A B C zB NC 0B"},L:{"4":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"4":"1B"},P:{"4":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"4":"DC"},R:{"4":"OD"},S:{"1":"PD QD"}},B:1,C:"Ruby annotation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/run-in.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/run-in.js index 8a7ba3b218e9e7..55cc7b84f46f90 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/run-in.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/run-in.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"F G A B","2":"J E PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB","2":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 J UC","2":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"VC","129":"I TC BC"},F:{"1":"G B C H M N O dC eC fC gC zB NC hC 0B","2":"8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"iC OC jC kC lC","2":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","129":"BC"},H:{"1":"4C"},I:{"1":"4B I 5C 6C 7C 8C OC 9C","2":"D AD"},J:{"1":"E A"},K:{"1":"A B C zB NC 0B","2":"r"},L:{"2":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:4,C:"display: run-in",D:true}; +module.exports={A:{A:{"1":"F G A B","2":"J E PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB","2":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 J VC","2":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"WC","129":"I UC BC"},F:{"1":"G B C H M N O eC fC gC hC zB NC iC 0B","2":"8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"jC OC kC lC mC","2":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","129":"BC"},H:{"1":"5C"},I:{"1":"4B I 6C 7C 8C 9C OC AD","2":"D BD"},J:{"1":"E A"},K:{"1":"A B C zB NC 0B","2":"s"},L:{"2":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:4,C:"display: run-in",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js index c1ba948746c5af..3c73e6a01e8714 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/same-site-cookie-attribute.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","388":"B"},B:{"1":"O P Q R S T U","2":"C K L H","129":"M N","513":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B RC SC"},D:{"1":"aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","513":"0 1 2 3 4 5 6 Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"H ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC zB","2052":"L YC","3076":"C K 0B DC"},F:{"1":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB dC eC fC gC zB NC hC 0B","513":"sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC","2052":"tC uC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","513":"r"},L:{"513":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"16":"DC"},R:{"513":"ND"},S:{"1":"PD","2":"OD"}},B:6,C:"'SameSite' cookie attribute",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","388":"B"},B:{"1":"O P Q R S T U","2":"C K L H","129":"M N","513":"0 1 2 3 4 5 6 V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B SC TC"},D:{"1":"aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","513":"0 1 2 3 4 5 6 Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"H aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC zB","2052":"L ZC","3076":"C K 0B DC"},F:{"1":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB eC fC gC hC zB NC iC 0B","513":"sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC","2052":"uC vC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","513":"s"},L:{"513":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"16":"DC"},R:{"513":"OD"},S:{"1":"QD","2":"PD"}},B:6,C:"'SameSite' cookie attribute",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/screen-orientation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/screen-orientation.js index b182b63ff2b858..7d65105f7532a5 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/screen-orientation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/screen-orientation.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","164":"B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","36":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M N RC SC","36":"8 9 O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB"},E:{"1":"JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"1":"JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A","36":"B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","16":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"Screen Orientation",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","164":"B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","36":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M N SC TC","36":"8 9 O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB"},E:{"1":"JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"1":"JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A","36":"B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","16":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"Screen Orientation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/script-async.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/script-async.js index 50d98de29c3152..8c74e4f290fa23 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/script-async.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/script-async.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC SC","2":"QC 4B RC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","132":"7"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"2":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"async attribute for external scripts",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC TC","2":"QC 4B SC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","132":"7"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"2":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"async attribute for external scripts",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/script-defer.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/script-defer.js index bf5afc3a2c5a90..a9a03dc490dbdf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/script-defer.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/script-defer.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","132":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","257":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"2":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"defer attribute for external scripts",D:true}; +module.exports={A:{A:{"1":"A B","132":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","257":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"2":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"defer attribute for external scripts",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/scrollintoview.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/scrollintoview.js index 4449c75d840969..3233c41a4011ab 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/scrollintoview.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/scrollintoview.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E PC","132":"F G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","132":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB RC SC"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC","132":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC"},F:{"1":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G dC eC fC gC","16":"B zB NC","132":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB hC 0B"},G:{"1":"2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC","132":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"2":"4C"},I:{"1":"D","16":"5C 6C","132":"4B I 7C 8C OC 9C AD"},J:{"132":"E A"},K:{"1":"r","132":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"132":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"scrollIntoView",D:true}; +module.exports={A:{A:{"2":"J E PC","132":"F G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","132":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","132":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB SC TC"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","132":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC","132":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC"},F:{"1":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G eC fC gC hC","16":"B zB NC","132":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB iC 0B"},G:{"1":"2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC","132":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"2":"5C"},I:{"1":"D","16":"6C 7C","132":"4B I 8C 9C OC AD BD"},J:{"132":"E A"},K:{"1":"s","132":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"132":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"scrollIntoView",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js index 0648aae1338fab..ac5233cf55ed2d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/scrollintoviewifneeded.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"Element.scrollIntoViewIfNeeded()",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"Element.scrollIntoViewIfNeeded()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sdch.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sdch.js index 842b09df1fdc9c..b7c1e377b0eb02 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sdch.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sdch.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB","2":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB","2":"G B C r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"SDCH Accept-Encoding/Content-Encoding",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB","2":"0 1 2 3 4 5 6 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB","2":"G B C s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"SDCH Accept-Encoding/Content-Encoding",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/selection-api.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/selection-api.js index f76c753a0b8fc7..a758a0fc611df5 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/selection-api.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/selection-api.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","16":"PC","260":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB RC SC","2180":"SB TB UB VB WB XB YB ZB aB"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I TC BC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","132":"G B C dC eC fC gC zB NC hC 0B"},G:{"16":"OC","132":"BC iC","516":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D 9C AD","16":"4B I 5C 6C 7C 8C","1025":"OC"},J:{"1":"A","16":"E"},K:{"1":"r","16":"A B C zB NC","132":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","16":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2180":"OD"}},B:5,C:"Selection API",D:true}; +module.exports={A:{A:{"1":"G A B","16":"PC","260":"J E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","132":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SC TC","2180":"SB TB UB VB WB XB YB ZB aB"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I UC BC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","132":"G B C eC fC gC hC zB NC iC 0B"},G:{"16":"OC","132":"BC jC","516":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D AD BD","16":"4B I 6C 7C 8C 9C","1025":"OC"},J:{"1":"A","16":"E"},K:{"1":"s","16":"A B C zB NC","132":"0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","16":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2180":"PD"}},B:5,C:"Selection API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/server-timing.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/server-timing.js index 5e7a1b871c619c..bc9d2b31fadcc4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/server-timing.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/server-timing.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB RC SC"},D:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","196":"iB 6B jB kB","324":"lB"},E:{"2":"7 I J E F G A B C TC BC UC VC WC XC CC zB","516":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"Server Timing",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB SC TC"},D:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","196":"iB 6B jB kB","324":"lB"},E:{"2":"7 I J E F G A B C UC BC VC WC XC YC CC zB","516":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"Server Timing",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/serviceworkers.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/serviceworkers.js index 36f0bd8651d12b..0864495c9a0192 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/serviceworkers.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/serviceworkers.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L","322":"H M"},C:{"1":"0 1 2 3 4 5 6 TB VB WB XB YB ZB aB cB dB eB fB gB hB 5B 6B jB kB lB mB nB oB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB RC SC","194":"IB JB KB LB MB NB OB PB QB RB SB","513":"UB bB iB pB"},D:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB","4":"PB QB RB SB TB"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B TC BC UC VC WC XC CC"},F:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB dC eC fC gC zB NC hC 0B","4":"CB DB EB FB GB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","4":"D"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:4,C:"Service Workers",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L","322":"H M"},C:{"1":"0 1 2 3 4 5 6 TB VB WB XB YB ZB aB cB dB eB fB gB hB 5B 6B jB kB lB mB nB oB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB SC TC","194":"IB JB KB LB MB NB OB PB QB RB SB","513":"UB bB iB pB"},D:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB","4":"PB QB RB SB TB"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B UC BC VC WC XC YC CC"},F:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB eC fC gC hC zB NC iC 0B","4":"CB DB EB FB GB"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","4":"D"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:4,C:"Service Workers",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/setimmediate.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/setimmediate.js index 7b8bbc95e75f2e..1b657fc2ade1f3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/setimmediate.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/setimmediate.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Efficient Script Yielding: setImmediate()",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"C K L H M N O","2":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"1":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Efficient Script Yielding: setImmediate()",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/shadowdom.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/shadowdom.js index 3bc0bbdddcb75b..aa62c3fa75dbdb 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/shadowdom.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/shadowdom.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"P","2":"0 1 2 3 4 5 6 C K L H M N O Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","66":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},D:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P","2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"AB BB CB DB EB FB GB HB IB JB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB","2":"G B C oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","33":"8 H M N O n o"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC","33":"9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"BD CD DD ED FD CC GD HD","2":"n o p q ID JD KD 2B 3B LD MD","33":"I"},Q:{"1":"DC"},R:{"2":"ND"},S:{"1":"OD","2":"PD"}},B:7,C:"Shadow DOM (deprecated V0 spec)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"P","2":"0 1 2 3 4 5 6 C K L H M N O Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","66":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB"},D:{"1":"KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P","2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"AB BB CB DB EB FB GB HB IB JB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB","2":"G B C oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","33":"8 H M N O o p"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC","33":"AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"CD DD ED FD GD CC HD ID","2":"o p q r JD KD LD 2B 3B MD ND","33":"I"},Q:{"1":"DC"},R:{"2":"OD"},S:{"1":"PD","2":"QD"}},B:7,C:"Shadow DOM (deprecated V0 spec)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/shadowdomv1.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/shadowdomv1.js index 94c90b7c78f244..e65c4585b27b49 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/shadowdomv1.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/shadowdomv1.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB RC SC","322":"hB","578":"5B iB 6B jB"},D:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB"},E:{"1":"A B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC"},F:{"1":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB dC eC fC gC zB NC hC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC","132":"pC qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I","4":"BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"Shadow DOM (V1)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB SC TC","322":"hB","578":"5B iB 6B jB"},D:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB"},E:{"1":"A B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC"},F:{"1":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB eC fC gC hC zB NC iC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC","132":"qC rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I","4":"CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"Shadow DOM (V1)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sharedarraybuffer.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sharedarraybuffer.js index 46e870d790d0d2..91a944a5d41b42 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sharedarraybuffer.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sharedarraybuffer.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"P Q R S T U V W X Y Z","2":"C K L H","194":"M N O","513":"0 1 2 3 4 5 6 a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB RC SC","194":"gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r","450":"uB vB wB xB yB","513":"0 1 2 3 4 5 6 P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","194":"iB 6B jB kB lB mB nB oB","513":"0 1 2 3 4 5 6 a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A TC BC UC VC WC XC","194":"B C K L H CC zB 0B DC YC ZC","513":"EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"lB mB nB oB pB qB rB sB tB r uB vB wB xB","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB dC eC fC gC zB NC hC 0B","194":"WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB","513":"yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC","194":"qC rC sC tC uC vC wC xC yC zC 0C 1C","513":"EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","513":"r"},L:{"513":"D"},M:{"513":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I BD CD DD ED FD CC GD HD ID JD","513":"n o p q KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"513":"ND"},S:{"2":"OD","513":"PD"}},B:6,C:"Shared Array Buffer",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"P Q R S T U V W X Y Z","2":"C K L H","194":"M N O","513":"0 1 2 3 4 5 6 a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB SC TC","194":"gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s","450":"uB vB wB xB yB","513":"0 1 2 3 4 5 6 P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B","194":"iB 6B jB kB lB mB nB oB","513":"0 1 2 3 4 5 6 a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A UC BC VC WC XC YC","194":"B C K L H CC zB 0B DC ZC aC","513":"EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"lB mB nB oB pB qB rB sB tB s uB vB wB xB","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB eC fC gC hC zB NC iC 0B","194":"WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB","513":"yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC","194":"rC sC tC uC vC wC xC yC zC 0C 1C 2C","513":"EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","513":"s"},L:{"513":"D"},M:{"513":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I CD DD ED FD GD CC HD ID JD KD","513":"o p q r LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"513":"OD"},S:{"2":"PD","513":"QD"}},B:6,C:"Shared Array Buffer",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sharedworkers.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sharedworkers.js index 5a56c8cbb4273d..999b8f7b0d4640 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sharedworkers.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sharedworkers.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 J UC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I E F G A B C K L H TC BC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m gC zB NC hC 0B","2":"G dC eC fC"},G:{"1":"jC kC 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"B C zB NC 0B","2":"r","16":"A"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"I","2":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"1":"OD PD"}},B:1,C:"Shared Web Workers",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 J VC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I E F G A B C K L H UC BC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n hC zB NC iC 0B","2":"G eC fC gC"},G:{"1":"kC lC 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"B C zB NC 0B","2":"s","16":"A"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"I","2":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"1":"PD QD"}},B:1,C:"Shared Web Workers",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sni.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sni.js index 0d7e8cfa81db26..5883e6ef6c5fbf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sni.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sni.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J PC","132":"E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC"},H:{"1":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"A","2":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Server Name Indication",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J PC","132":"E F"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC"},H:{"1":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"A","2":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Server Name Indication",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/spdy.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/spdy.js index 4270f2afd49947..5a0035d5c1ef05 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/spdy.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/spdy.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","2":"0 1 2 3 4 5 6 7 QC 4B I J E F G A B C aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","2":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"F G A B C XC CC zB","2":"7 I J E TC BC UC VC WC","129":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB RB TB 0B","2":"G B C PB QB SB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC"},G:{"1":"F mC nC oC pC qC rC sC tC","2":"BC iC OC jC kC lC","257":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I 8C OC 9C AD","2":"D 5C 6C 7C"},J:{"2":"E A"},K:{"1":"0B","2":"A B C r zB NC"},L:{"2":"D"},M:{"2":"D"},N:{"1":"B","2":"A"},O:{"2":"1B"},P:{"1":"I","2":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"1":"OD","2":"PD"}},B:7,C:"SPDY protocol",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G A PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","2":"0 1 2 3 4 5 6 7 QC 4B I J E F G A B C aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","2":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"F G A B C YC CC zB","2":"7 I J E UC BC VC WC XC","129":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB RB TB 0B","2":"G B C PB QB SB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC"},G:{"1":"F nC oC pC qC rC sC tC uC","2":"BC jC OC kC lC mC","257":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I 9C OC AD BD","2":"D 6C 7C 8C"},J:{"2":"E A"},K:{"1":"0B","2":"A B C s zB NC"},L:{"2":"D"},M:{"2":"D"},N:{"1":"B","2":"A"},O:{"2":"1B"},P:{"1":"I","2":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"1":"PD","2":"QD"}},B:7,C:"SPDY protocol",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/speech-recognition.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/speech-recognition.js index 4ff391e3d589c3..60590021a1fc75 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/speech-recognition.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/speech-recognition.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","514":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 QC 4B I J E F G A B C K L H M N O n o RC SC","322":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q","164":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L TC BC UC VC WC XC CC zB 0B DC","1060":"H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB dC eC fC gC zB NC hC 0B","514":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC","1060":"0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","164":"r"},L:{"164":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"164":"1B"},P:{"164":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"164":"DC"},R:{"164":"ND"},S:{"322":"OD PD"}},B:7,C:"Speech Recognition API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","514":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 QC 4B I J E F G A B C K L H M N O o p SC TC","322":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r","164":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L UC BC VC WC XC YC CC zB 0B DC","1060":"H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB eC fC gC hC zB NC iC 0B","514":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C","1060":"1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","164":"s"},L:{"164":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"164":"1B"},P:{"164":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"164":"DC"},R:{"164":"OD"},S:{"322":"PD QD"}},B:7,C:"Speech Recognition API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/speech-synthesis.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/speech-synthesis.js index 617634a693ee67..44ff9c5ea13abb 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/speech-synthesis.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/speech-synthesis.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"L H M N O","2":"C K","257":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB RC SC","194":"GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},D:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB","257":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC VC"},F:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB","2":"8 9 G B C H M N O n o p q AB BB dC eC fC gC zB NC hC 0B","257":"lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"2":"ND"},S:{"1":"OD PD"}},B:7,C:"Speech Synthesis API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"L H M N O","2":"C K","257":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB SC TC","194":"GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},D:{"1":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB","257":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC WC"},F:{"1":"CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB","2":"8 9 G B C H M N O o p q r AB BB eC fC gC hC zB NC iC 0B","257":"lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"2":"OD"},S:{"1":"PD QD"}},B:7,C:"Speech Synthesis API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/spellcheck-attribute.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/spellcheck-attribute.js index be12f3cf572550..1e2a2baf5630a2 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/spellcheck-attribute.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/spellcheck-attribute.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC eC"},G:{"4":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"4":"4C"},I:{"4":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"A","4":"E"},K:{"4":"A B C r zB NC 0B"},L:{"4":"D"},M:{"4":"D"},N:{"4":"A B"},O:{"4":"1B"},P:{"4":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"4":"ND"},S:{"2":"OD PD"}},B:1,C:"Spellcheck attribute",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC fC"},G:{"4":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"4":"5C"},I:{"4":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"A","4":"E"},K:{"4":"A B C s zB NC 0B"},L:{"4":"D"},M:{"4":"D"},N:{"4":"A B"},O:{"4":"1B"},P:{"4":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"4":"OD"},S:{"2":"PD QD"}},B:1,C:"Spellcheck attribute",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sql-storage.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sql-storage.js index 3d4fdad668b32c..571c26fa4adb17 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sql-storage.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sql-storage.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"P Q R S T U V W X Y Z a b c d e f g h i j","2":"C K L H M N O","129":"k l m s t u v w x","385":"0 1 2 3 4 5 6 y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j","129":"k l m s t u v w x","385":"0 1 2 3 4 5 6 y z","897":"D 8B 9B AC"},E:{"1":"7 I J E F G A B C TC BC UC VC WC XC CC zB 0B","2":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z fC gC zB NC hC 0B","2":"G dC eC","257":"a b c d e f g h i j k l m"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC","2":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I 5C 6C 7C 8C OC 9C AD","257":"D"},J:{"1":"E A"},K:{"1":"B C zB NC 0B","2":"A","257":"r"},L:{"257":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"Web SQL Database",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"P Q R S T U V W X Y Z a b c d e f g h i j","2":"C K L H M N O","129":"k l m n t u v w x","385":"0 1 2 3 4 5 6 y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j","129":"k l m n t u v w x","385":"0 1 2 3 4 5 6 y z","897":"D 8B 9B AC"},E:{"1":"7 I J E F G A B C UC BC VC WC XC YC CC zB 0B","2":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z gC hC zB NC iC 0B","2":"G eC fC","257":"a b c d e f g h i j k l m n"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC","2":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I 6C 7C 8C 9C OC AD BD","257":"D"},J:{"1":"E A"},K:{"1":"B C zB NC 0B","2":"A","257":"s"},L:{"257":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"Web SQL Database",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/srcset.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/srcset.js index 10b9eae7aa288c..e7be449a3e55b0 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/srcset.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/srcset.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C","514":"K L H"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB RC SC","194":"HB IB JB KB LB MB"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB","260":"JB KB LB MB"},E:{"2":"7 I J E TC BC UC VC","260":"F WC","1028":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n dC eC fC gC zB NC hC 0B","260":"9 o p q"},G:{"2":"BC iC OC jC kC lC","260":"F mC","1028":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Srcset and sizes attributes",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C","514":"K L H"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB SC TC","194":"HB IB JB KB LB MB"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB","260":"JB KB LB MB"},E:{"2":"7 I J E UC BC VC WC","260":"F XC","1028":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o eC fC gC hC zB NC iC 0B","260":"9 p q r"},G:{"2":"BC jC OC kC lC mC","260":"F nC","1028":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Srcset and sizes attributes",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/stream.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/stream.js index c48f6edef2315b..4e1e8963cf39b8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/stream.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/stream.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M RC SC","129":"LB MB NB OB PB QB","420":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},D:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n","420":"9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC"},F:{"1":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B H M N dC eC fC gC zB NC hC","420":"8 9 C O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC","513":"yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","1537":"rC sC tC uC vC wC xC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","420":"A"},K:{"1":"r","2":"A B zB NC","420":"C 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","420":"I BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:4,C:"getUserMedia/Stream API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M SC TC","129":"LB MB NB OB PB QB","420":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},D:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o","420":"9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC"},F:{"1":"PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B H M N eC fC gC hC zB NC iC","420":"8 9 C O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC","513":"zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","1537":"sC tC uC vC wC xC yC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E","420":"A"},K:{"1":"s","2":"A B zB NC","420":"C 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","420":"I CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:4,C:"getUserMedia/Stream API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/streams.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/streams.js index 099f15b5b3d19d..48f06ff622b2c8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/streams.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/streams.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","130":"B"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D","16":"C K","260":"L H","1028":"P Q R S T U V W X","5124":"M N O"},C:{"1":"0 1 2 3 4 5 6 l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB RC SC","5124":"j k","7172":"mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i","7746":"gB hB 5B iB 6B jB kB lB"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","260":"bB cB dB eB fB gB hB","1028":"5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X"},E:{"2":"7 I J E F G TC BC UC VC WC XC","1028":"H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","3076":"A B C K L CC zB 0B DC"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB dC eC fC gC zB NC hC 0B","260":"OB PB QB RB SB TB UB","1028":"VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB"},G:{"2":"F BC iC OC jC kC lC mC nC oC","16":"pC","1028":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q KD 2B 3B LD MD","2":"I BD CD","1028":"DD ED FD CC GD HD ID JD"},Q:{"1028":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:1,C:"Streams",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","130":"B"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D","16":"C K","260":"L H","1028":"P Q R S T U V W X","5124":"M N O"},C:{"1":"0 1 2 3 4 5 6 l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB SC TC","5124":"j k","7172":"mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i","7746":"gB hB 5B iB 6B jB kB lB"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB","260":"bB cB dB eB fB gB hB","1028":"5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X"},E:{"2":"7 I J E F G UC BC VC WC XC YC","1028":"H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","3076":"A B C K L CC zB 0B DC"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB eC fC gC hC zB NC iC 0B","260":"OB PB QB RB SB TB UB","1028":"VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB"},G:{"2":"F BC jC OC kC lC mC nC oC pC","16":"qC","1028":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r LD 2B 3B MD ND","2":"I CD DD","1028":"ED FD GD CC HD ID JD KD"},Q:{"1028":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:1,C:"Streams",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/stricttransportsecurity.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/stricttransportsecurity.js index fa9be068684bdb..32d16d67f9ee59 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/stricttransportsecurity.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/stricttransportsecurity.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A PC","129":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC VC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B dC eC fC gC zB NC hC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Strict Transport Security",D:true}; +module.exports={A:{A:{"2":"J E F G A PC","129":"B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC WC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B eC fC gC hC zB NC iC"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Strict Transport Security",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/style-scoped.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/style-scoped.js index f304a1caa38dc0..9df756932f6768 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/style-scoped.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/style-scoped.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"9 o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB","2":"0 1 2 3 4 5 6 7 8 QC 4B I J E F G A B C K L H M N O n 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","322":"eB fB gB hB 5B iB"},D:{"2":"0 1 2 3 4 5 6 7 8 I J E F G A B C K L H M N O MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","194":"9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"1":"OD","2":"PD"}},B:7,C:"Scoped CSS",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"9 p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB","2":"0 1 2 3 4 5 6 7 8 QC 4B I J E F G A B C K L H M N O o 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","322":"eB fB gB hB 5B iB"},D:{"2":"0 1 2 3 4 5 6 7 8 I J E F G A B C K L H M N O MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","194":"9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"1":"PD","2":"QD"}},B:7,C:"Scoped CSS",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/subresource-bundling.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/subresource-bundling.js index a879b7356f4817..58b7773ff46033 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/subresource-bundling.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/subresource-bundling.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 s t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Subresource Loading with Web Bundles",D:false}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 n t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Subresource Loading with Web Bundles",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/subresource-integrity.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/subresource-integrity.js index 11583ba3e4dc43..460880fdc4810a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/subresource-integrity.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/subresource-integrity.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB RC SC"},D:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC"},F:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB dC eC fC gC zB NC hC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC","194":"rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"Subresource Integrity",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SC TC"},D:{"1":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC"},F:{"1":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB eC fC gC hC zB NC iC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC","194":"sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"Subresource Integrity",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-css.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-css.js index 1feb99b6a26eb6..f0ef1d74eaa923 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-css.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-css.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","516":"C K L H"},C:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","260":"7 8 I J E F G A B C K L H M N O n o p q"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"I"},E:{"1":"7 J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC","132":"I BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"1":"F OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","132":"BC iC"},H:{"260":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"E A"},K:{"1":"r","260":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"SVG in CSS backgrounds",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","516":"C K L H"},C:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","260":"7 8 I J E F G A B C K L H M N O o p q r"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","4":"I"},E:{"1":"7 J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC","132":"I BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"1":"F OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","132":"BC jC"},H:{"260":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"E A"},K:{"1":"s","260":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"SVG in CSS backgrounds",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-filters.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-filters.js index 55592acbc5b847..8063cdcfdac3a9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-filters.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-filters.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"I","4":"7 J E"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"SVG filters",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"I","4":"7 J E"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"SVG filters",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-fonts.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-fonts.js index 38ea3783ef3e65..80b039a9a61524 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-fonts.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-fonts.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"G A B PC","8":"J E F"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB","2":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","130":"NB OB PB QB RB SB TB UB VB WB XB YB ZB"},E:{"1":"7 I J E F G A B C K L H BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC"},F:{"1":"8 9 G B C H M N O n o p q dC eC fC gC zB NC hC 0B","2":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","130":"AB BB CB DB EB FB GB HB IB JB KB LB"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"258":"4C"},I:{"1":"4B I 8C OC 9C AD","2":"D 5C 6C 7C"},J:{"1":"E A"},K:{"1":"A B C zB NC 0B","2":"r"},L:{"130":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"I","130":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"130":"ND"},S:{"2":"OD PD"}},B:2,C:"SVG fonts",D:true}; +module.exports={A:{A:{"2":"G A B PC","8":"J E F"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB","2":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","130":"NB OB PB QB RB SB TB UB VB WB XB YB ZB"},E:{"1":"7 I J E F G A B C K L H BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC"},F:{"1":"8 9 G B C H M N O o p q r eC fC gC hC zB NC iC 0B","2":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","130":"AB BB CB DB EB FB GB HB IB JB KB LB"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"258":"5C"},I:{"1":"4B I 9C OC AD BD","2":"D 6C 7C 8C"},J:{"1":"E A"},K:{"1":"A B C zB NC 0B","2":"s"},L:{"130":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"I","130":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"130":"OD"},S:{"2":"PD QD"}},B:2,C:"SVG fonts",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-fragment.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-fragment.js index d0f816b4ecef06..7412cd7bf88aab 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-fragment.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-fragment.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","260":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L RC SC"},D:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB","132":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},E:{"1":"C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E G A B TC BC UC VC XC CC","132":"F WC"},F:{"1":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"8 H M N O n o p","4":"B C eC fC gC zB NC hC","16":"G dC","132":"9 q AB BB CB DB EB FB GB HB IB JB KB LB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC nC oC pC qC rC","132":"F mC"},H:{"1":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E","132":"A"},K:{"1":"r 0B","4":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","132":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"SVG fragment identifiers",D:true}; +module.exports={A:{A:{"2":"J E F PC","260":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L SC TC"},D:{"1":"0 1 2 3 4 5 6 ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB","132":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB"},E:{"1":"C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E G A B UC BC VC WC YC CC","132":"F XC"},F:{"1":"MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"8 H M N O o p q","4":"B C fC gC hC zB NC iC","16":"G eC","132":"9 r AB BB CB DB EB FB GB HB IB JB KB LB"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC oC pC qC rC sC","132":"F nC"},H:{"1":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E","132":"A"},K:{"1":"s 0B","4":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","132":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"SVG fragment identifiers",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-html.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-html.js index 747b646d7d0314..888878a2ec25dd 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-html.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-html.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","388":"G A B"},B:{"4":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC","4":"4B"},D:{"4":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"TC BC","4":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"4":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"4":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC","4":"D 9C AD"},J:{"1":"A","2":"E"},K:{"4":"A B C r zB NC 0B"},L:{"4":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"4":"1B"},P:{"4":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"4":"DC"},R:{"4":"ND"},S:{"1":"OD PD"}},B:2,C:"SVG effects for HTML",D:true}; +module.exports={A:{A:{"2":"J E F PC","388":"G A B"},B:{"4":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC","4":"4B"},D:{"4":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"UC BC","4":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"4":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"4":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC","4":"D AD BD"},J:{"1":"A","2":"E"},K:{"4":"A B C s zB NC 0B"},L:{"4":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"4":"1B"},P:{"4":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"4":"DC"},R:{"4":"OD"},S:{"1":"PD QD"}},B:2,C:"SVG effects for HTML",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-html5.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-html5.js index 44615d3be5e9d0..28ba6ae94b15f4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-html5.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-html5.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"PC","8":"J E F","129":"G A B"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","129":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"7 I J"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"7 I TC BC","129":"J E F UC VC WC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"B gC zB NC","8":"G dC eC fC"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","8":"BC iC OC","129":"F jC kC lC mC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"5C 6C 7C","129":"4B I 8C OC"},J:{"1":"A","129":"E"},K:{"1":"C r 0B","8":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"129":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Inline SVG in HTML5",D:true}; +module.exports={A:{A:{"2":"PC","8":"J E F","129":"G A B"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","129":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","8":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","8":"7 I J"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"7 I UC BC","129":"J E F VC WC XC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"B hC zB NC","8":"G eC fC gC"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","8":"BC jC OC","129":"F kC lC mC nC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"6C 7C 8C","129":"4B I 9C OC"},J:{"1":"A","129":"E"},K:{"1":"C s 0B","8":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"129":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Inline SVG in HTML5",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-img.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-img.js index bf543fcf0b0f1a..c0245e59ccb0cf 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-img.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-img.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC","4":"BC","132":"7 I J E F UC VC WC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","132":"F BC iC OC jC kC lC mC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"5C 6C 7C","132":"4B I 8C OC"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"SVG in HTML img element",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","132":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC","4":"BC","132":"7 I J E F VC WC XC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","132":"F BC jC OC kC lC mC nC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"6C 7C 8C","132":"4B I 9C OC"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"SVG in HTML img element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-smil.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-smil.js index df4a86ec0625cc..68faee9f00d5e3 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-smil.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg-smil.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"PC","8":"J E F G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","8":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"I"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"TC BC","132":"7 I UC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","132":"BC iC OC jC"},H:{"2":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"SVG SMIL animation",D:true}; +module.exports={A:{A:{"2":"PC","8":"J E F G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","8":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","8":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","4":"I"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"UC BC","132":"7 I VC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","132":"BC jC OC kC"},H:{"2":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"SVG SMIL animation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg.js index b390d9c12c1243..f019b5b1d60688 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/svg.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"PC","8":"J E F","772":"G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","513":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","4":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","4":"TC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"D 9C AD","2":"5C 6C 7C","132":"4B I 8C OC"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"257":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"SVG (basic support)",D:true}; +module.exports={A:{A:{"2":"PC","8":"J E F","772":"G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","513":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","4":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","4":"UC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"D AD BD","2":"6C 7C 8C","132":"4B I 9C OC"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"257":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"SVG (basic support)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sxg.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sxg.js index 66f82555bdd467..3558384bfe49ec 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sxg.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/sxg.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB","132":"sB tB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:6,C:"Signed HTTP Exchanges (SXG)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB","132":"sB tB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:6,C:"Signed HTTP Exchanges (SXG)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tabindex-attr.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tabindex-attr.js index 7fd7ae7038805d..5599c186659156 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tabindex-attr.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tabindex-attr.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"E F G A B","16":"J PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"16":"QC 4B RC SC","129":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"16":"7 I TC BC","257":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","16":"G"},G:{"769":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"16":"4C"},I:{"16":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"16":"E A"},K:{"1":"r","16":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"16":"A B"},O:{"1":"1B"},P:{"16":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"129":"OD PD"}},B:1,C:"tabindex global attribute",D:true}; +module.exports={A:{A:{"1":"E F G A B","16":"J PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"16":"QC 4B SC TC","129":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"16":"7 I UC BC","257":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","16":"G"},G:{"769":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"16":"5C"},I:{"16":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"16":"E A"},K:{"1":"s","16":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"16":"A B"},O:{"1":"1B"},P:{"16":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"129":"PD QD"}},B:1,C:"tabindex global attribute",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/template-literals.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/template-literals.js index 0030212778a698..a0812f0d5c02d9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/template-literals.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/template-literals.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","16":"C"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB RC SC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"1":"A B K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC","129":"C"},F:{"1":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB dC eC fC gC zB NC hC 0B"},G:{"1":"nC oC pC qC rC sC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC","129":"tC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"ES6 Template Literals (Template Strings)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","16":"C"},C:{"1":"0 1 2 3 4 5 6 JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB SC TC"},D:{"1":"0 1 2 3 4 5 6 QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},E:{"1":"A B K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC","129":"C"},F:{"1":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB eC fC gC hC zB NC iC 0B"},G:{"1":"oC pC qC rC sC tC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC","129":"uC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"ES6 Template Literals (Template Strings)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/template.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/template.js index f4457e1d67d53b..a6f0ccd0039e24 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/template.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/template.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C","388":"K L"},C:{"1":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n o RC SC"},D:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB","132":"BB CB DB EB FB GB HB IB JB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E TC BC UC","388":"F WC","514":"VC"},F:{"1":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","132":"8 H M N O n o"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC","388":"F mC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"HTML templates",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C","388":"K L"},C:{"1":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o p SC TC"},D:{"1":"0 1 2 3 4 5 6 KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB","132":"BB CB DB EB FB GB HB IB JB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E UC BC VC","388":"F XC","514":"WC"},F:{"1":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","132":"8 H M N O o p"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC","388":"F nC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"HTML templates",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/temporal.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/temporal.js index 64cdd8e8e9ff34..26def8b7fa6738 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/temporal.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/temporal.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"Temporal",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"Temporal",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/testfeat.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/testfeat.js index a7fb292c2690e4..df071de6509574 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/testfeat.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/testfeat.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F A B PC","16":"G"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 8 9 QC 4B J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","16":"7 I"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"B C"},E:{"2":"I J TC BC UC","16":"7 E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC NC hC 0B","16":"zB"},G:{"2":"BC iC OC jC kC","16":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 8C OC 9C AD","16":"7C"},J:{"2":"A","16":"E"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Test feature - updated",D:false}; +module.exports={A:{A:{"2":"J E F A B PC","16":"G"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 8 9 QC 4B J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","16":"7 I"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"B C"},E:{"2":"I J UC BC VC","16":"7 E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC NC iC 0B","16":"zB"},G:{"2":"BC jC OC kC lC","16":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 9C OC AD BD","16":"8C"},J:{"2":"A","16":"E"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Test feature - updated",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-decoration.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-decoration.js index 00db24ba61884e..dbc024c0fbd7cb 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-decoration.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-decoration.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","2052":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 QC 4B I RC SC","1028":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","1060":"8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB","226":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB","2052":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E TC BC UC VC","772":"K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","804":"F G A B C XC CC zB","1316":"WC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB dC eC fC gC zB NC hC 0B","226":"KB LB MB NB OB PB QB RB SB","2052":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"BC iC OC jC kC lC","292":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","2052":"r"},L:{"2052":"D"},M:{"1028":"D"},N:{"2":"A B"},O:{"2052":"1B"},P:{"2":"I BD CD","2052":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2052":"DC"},R:{"2052":"ND"},S:{"1028":"OD PD"}},B:4,C:"text-decoration styling",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","2052":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 QC 4B I SC TC","1028":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","1060":"8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB","226":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB","2052":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E UC BC VC WC","772":"K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","804":"F G A B C YC CC zB","1316":"XC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB eC fC gC hC zB NC iC 0B","226":"KB LB MB NB OB PB QB RB SB","2052":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"BC jC OC kC lC mC","292":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","2052":"s"},L:{"2052":"D"},M:{"1028":"D"},N:{"2":"A B"},O:{"2052":"1B"},P:{"2":"I CD DD","2052":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2052":"DC"},R:{"2052":"OD"},S:{"1028":"PD QD"}},B:4,C:"text-decoration styling",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-emphasis.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-emphasis.js index 933139bdb1a6ee..3c3b438da0463b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-emphasis.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-emphasis.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 i j k l m s t u v w x y z D","2":"C K L H M N O","164":"P Q R S T U V W X Y Z a b c d e f g h"},C:{"1":"0 1 2 3 4 5 6 VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB RC SC","322":"UB"},D:{"1":"0 1 2 3 4 5 6 i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q","164":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h"},E:{"1":"F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC","164":"E VC"},F:{"1":"V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","164":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC","164":"9C AD"},J:{"2":"E","164":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q LD MD","164":"I BD CD DD ED FD CC GD HD ID JD KD 2B 3B"},Q:{"164":"DC"},R:{"164":"ND"},S:{"1":"OD PD"}},B:4,C:"text-emphasis styling",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 i j k l m n t u v w x y z D","2":"C K L H M N O","164":"P Q R S T U V W X Y Z a b c d e f g h"},C:{"1":"0 1 2 3 4 5 6 VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB SC TC","322":"UB"},D:{"1":"0 1 2 3 4 5 6 i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r","164":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h"},E:{"1":"F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC","164":"E WC"},F:{"1":"V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","164":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC","164":"AD BD"},J:{"2":"E","164":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r MD ND","164":"I CD DD ED FD GD CC HD ID JD KD LD 2B 3B"},Q:{"164":"DC"},R:{"164":"OD"},S:{"1":"PD QD"}},B:4,C:"text-emphasis styling",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-overflow.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-overflow.js index 0bc107c6590bd1..322187b5d5fb6a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-overflow.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-overflow.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B","2":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","8":"7 QC 4B I J RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","33":"G dC eC fC gC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"r 0B","33":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"CSS3 Text-overflow",D:true}; +module.exports={A:{A:{"1":"J E F G A B","2":"PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","8":"7 QC 4B I J SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","33":"G eC fC gC hC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"s 0B","33":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"CSS3 Text-overflow",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-size-adjust.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-size-adjust.js index 505c7baec8ce15..ec6bfff4f15938 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-size-adjust.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-size-adjust.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","33":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB","258":"BB"},E:{"2":"7 I J E F G A B C K L H TC BC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","258":"UC"},F:{"1":"SB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB TB dC eC fC gC zB NC hC 0B"},G:{"2":"BC iC OC","33":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"33":"D"},N:{"161":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"CSS text-size-adjust",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","33":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB","258":"BB"},E:{"2":"7 I J E F G A B C K L H UC BC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","258":"VC"},F:{"1":"SB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB TB eC fC gC hC zB NC iC 0B"},G:{"2":"BC jC OC","33":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"33":"D"},N:{"161":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"CSS text-size-adjust",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-stroke.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-stroke.js index 277245764d14dc..98d73bdaeb3408 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-stroke.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/text-stroke.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","161":"H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB RC SC","161":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","450":"XB"},D:{"33":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"33":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"33":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","36":"BC"},H:{"2":"4C"},I:{"2":"4B","33":"I D 5C 6C 7C 8C OC 9C AD"},J:{"33":"E A"},K:{"2":"A B C zB NC 0B","33":"r"},L:{"33":"D"},M:{"161":"D"},N:{"2":"A B"},O:{"33":"1B"},P:{"33":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"33":"DC"},R:{"33":"ND"},S:{"161":"OD PD"}},B:7,C:"CSS text-stroke and text-fill",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L","33":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","161":"H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB SC TC","161":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","450":"XB"},D:{"33":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"33":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"33":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","36":"BC"},H:{"2":"5C"},I:{"2":"4B","33":"I D 6C 7C 8C 9C OC AD BD"},J:{"33":"E A"},K:{"2":"A B C zB NC 0B","33":"s"},L:{"33":"D"},M:{"161":"D"},N:{"2":"A B"},O:{"33":"1B"},P:{"33":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"33":"DC"},R:{"33":"OD"},S:{"161":"PD QD"}},B:7,C:"CSS text-stroke and text-fill",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/textcontent.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/textcontent.js index 0e618613e81de6..a74c6690670e0b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/textcontent.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/textcontent.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","16":"G"},G:{"1":"F iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC"},H:{"1":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Node.textContent",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","16":"G"},G:{"1":"F jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC"},H:{"1":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Node.textContent",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/textencoder.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/textencoder.js index 7b4acee43e462c..12968326d3f340 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/textencoder.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/textencoder.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M N O RC SC","132":"8"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"TextEncoder & TextDecoder",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M N O SC TC","132":"8"},D:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"TextEncoder & TextDecoder",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-1.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-1.js index 6116afaabdc7d5..fbb21d8b8e6702 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-1.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-1.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E PC","66":"F G A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB","2":"7 8 QC 4B I J E F G A B C K L H M N O n o p RC SC","66":"q","129":"pB qB rB sB tB r uB vB wB xB","388":"0 1 2 3 4 5 6 yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T","2":"7 8 I J E F G A B C K L H M N O n o","1540":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"E F G A B C K WC XC CC zB 0B","2":"7 I J TC BC UC VC","513":"L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB 0B","2":"G B C dC eC fC gC zB NC hC","1540":"r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"1":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"1":"A","2":"E"},K:{"1":"r 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"129":"D"},N:{"1":"B","66":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"TLS 1.1",D:true}; +module.exports={A:{A:{"1":"B","2":"J E PC","66":"F G A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB","2":"7 8 QC 4B I J E F G A B C K L H M N O o p q SC TC","66":"r","129":"pB qB rB sB tB s uB vB wB xB","388":"0 1 2 3 4 5 6 yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T","2":"7 8 I J E F G A B C K L H M N O o p","1540":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"E F G A B C K XC YC CC zB 0B","2":"7 I J UC BC VC WC","513":"L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB 0B","2":"G B C eC fC gC hC zB NC iC","1540":"s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"1":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"1":"A","2":"E"},K:{"1":"s 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"129":"D"},N:{"1":"B","66":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"TLS 1.1",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-2.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-2.js index a36c849614d95b..940b4304d13717 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-2.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-2.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E PC","66":"F G A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 QC 4B I J E F G A B C K L H M N O n o p q RC SC","66":"9 AB BB"},D:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC VC"},F:{"1":"8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G H dC","66":"B C eC fC gC zB NC hC 0B"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"1":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"1":"A","2":"E"},K:{"1":"r 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","66":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"TLS 1.2",D:true}; +module.exports={A:{A:{"1":"B","2":"J E PC","66":"F G A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 QC 4B I J E F G A B C K L H M N O o p q r SC TC","66":"9 AB BB"},D:{"1":"0 1 2 3 4 5 6 EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC WC"},F:{"1":"8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G H eC","66":"B C fC gC hC zB NC iC 0B"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"1":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"1":"A","2":"E"},K:{"1":"s 0B","2":"A B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","66":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"TLS 1.2",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-3.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-3.js index e9cefb7f1163fd..055d3ee812ae6b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-3.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/tls1-3.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB RC SC","132":"iB 6B jB","450":"aB bB cB dB eB fB gB hB 5B"},D:{"1":"0 1 2 3 4 5 6 rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB","706":"dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB"},E:{"1":"L H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB","1028":"K 0B DC"},F:{"1":"gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dC eC fC gC zB NC hC 0B","706":"dB eB fB"},G:{"1":"uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:6,C:"TLS 1.3",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB SC TC","132":"iB 6B jB","450":"aB bB cB dB eB fB gB hB 5B"},D:{"1":"0 1 2 3 4 5 6 rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB","706":"dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB"},E:{"1":"L H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB","1028":"K 0B DC"},F:{"1":"gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB eC fC gC hC zB NC iC 0B","706":"dB eB fB"},G:{"1":"vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:6,C:"TLS 1.3",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/touch.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/touch.js index c7147169b5696b..66e2d38debd039 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/touch.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/touch.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","8":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","578":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 O n o p q bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","4":"7 I J E F G A B C K L H M N","194":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},D:{"1":"0 1 2 3 4 5 6 9 p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n o"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A","260":"B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:2,C:"Touch events",D:true}; +module.exports={A:{A:{"2":"J E F G PC","8":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","578":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 O o p q r bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","4":"7 I J E F G A B C K L H M N","194":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB"},D:{"1":"0 1 2 3 4 5 6 9 q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o p"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A","260":"B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:2,C:"Touch events",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/transforms2d.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/transforms2d.js index 942402fa27f027..591a72f1b3737e 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/transforms2d.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/transforms2d.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"PC","8":"J E F","129":"A B","161":"G"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","129":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","33":"7 I J E F G A B C K L H RC SC"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","33":"7 I J E F TC BC UC VC WC"},F:{"1":"9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G dC eC","33":"8 B C H M N O n o p fC gC zB NC hC"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","33":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","33":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"33":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS3 2D Transforms",D:true}; +module.exports={A:{A:{"2":"PC","8":"J E F","129":"A B","161":"G"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","129":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","33":"7 I J E F G A B C K L H SC TC"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","33":"7 I J E F UC BC VC WC XC"},F:{"1":"9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G eC fC","33":"8 B C H M N O o p q gC hC zB NC iC"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","33":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","33":"4B I 6C 7C 8C 9C OC AD BD"},J:{"33":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS3 2D Transforms",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/transforms3d.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/transforms3d.js index 0bc735f7509d23..403a50e4febc73 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/transforms3d.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/transforms3d.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G RC SC","33":"A B C K L H"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B","33":"8 9 C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC","33":"7 I J E F UC VC WC","257":"G A B C K L H XC CC zB 0B DC YC ZC EC"},F:{"1":"9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","33":"8 H M N O n o p"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","33":"F BC iC OC jC kC lC mC","257":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},H:{"2":"4C"},I:{"1":"D","2":"5C 6C 7C","33":"4B I 8C OC 9C AD"},J:{"33":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:5,C:"CSS3 3D Transforms",D:true}; +module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G SC TC","33":"A B C K L H"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B","33":"8 9 C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC","33":"7 I J E F VC WC XC","257":"G A B C K L H YC CC zB 0B DC ZC aC EC"},F:{"1":"9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","33":"8 H M N O o p q"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","33":"F BC jC OC kC lC mC nC","257":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},H:{"2":"5C"},I:{"1":"D","2":"6C 7C 8C","33":"4B I 9C OC AD BD"},J:{"33":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:5,C:"CSS3 3D Transforms",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/trusted-types.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/trusted-types.js index 0ebd9d9a03425e..f795cbfa3a7f34 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/trusted-types.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/trusted-types.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O P Q R"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"Trusted Types for DOM manipulation",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O P Q R"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"Trusted Types for DOM manipulation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ttf.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ttf.js index 124a8c99430e79..337f7feb7faa61 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ttf.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/ttf.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","132":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m eC fC gC zB NC hC 0B","2":"G dC"},G:{"1":"F OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC"},H:{"2":"4C"},I:{"1":"4B I D 6C 7C 8C OC 9C AD","2":"5C"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"TTF/OTF - TrueType and OpenType font support",D:true}; +module.exports={A:{A:{"2":"J E F PC","132":"G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n fC gC hC zB NC iC 0B","2":"G eC"},G:{"1":"F OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC"},H:{"2":"5C"},I:{"1":"4B I D 7C 8C 9C OC AD BD","2":"6C"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"TTF/OTF - TrueType and OpenType font support",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/typedarrays.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/typedarrays.js index 537d5fb51dcaea..d6f5f2a0235057 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/typedarrays.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/typedarrays.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"B","2":"J E F G PC","132":"A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC","260":"UC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G B dC eC fC gC zB NC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC","260":"OC"},H:{"1":"4C"},I:{"1":"I D 8C OC 9C AD","2":"4B 5C 6C 7C"},J:{"1":"A","2":"E"},K:{"1":"C r 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Typed Arrays",D:true}; +module.exports={A:{A:{"1":"B","2":"J E F G PC","132":"A"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC","260":"VC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G B eC fC gC hC zB NC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC","260":"OC"},H:{"1":"5C"},I:{"1":"I D 9C OC AD BD","2":"4B 6C 7C 8C"},J:{"1":"A","2":"E"},K:{"1":"C s 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Typed Arrays",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/u2f.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/u2f.js index c14c91a16567b3..cb3e5065bed24a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/u2f.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/u2f.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O u v w x y z D","513":"P Q R S T U V W X Y Z a b c d e f g h i j k l m s t"},C:{"1":"oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","2":"2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB D 8B 9B AC RC SC","322":"0 1 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB u v w x y z D 8B 9B AC","130":"NB OB PB","513":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g","578":"h i j k l m s t"},E:{"1":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB 0B"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB QB dC eC fC gC zB NC hC 0B","513":"PB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"1":"PD","322":"OD"}},B:7,C:"FIDO U2F API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O u v w x y z D","513":"P Q R S T U V W X Y Z a b c d e f g h i j k l m n t"},C:{"1":"oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","2":"2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB D 8B 9B AC RC SC TC","322":"0 1 WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB u v w x y z D 8B 9B AC","130":"NB OB PB","513":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g","578":"h i j k l m n t"},E:{"1":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB 0B"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB QB eC fC gC hC zB NC iC 0B","513":"PB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"1":"QD","322":"PD"}},B:7,C:"FIDO U2F API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/unhandledrejection.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/unhandledrejection.js index c0c58b9af59c00..7edde838c93508 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/unhandledrejection.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/unhandledrejection.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB RC SC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB dC eC fC gC zB NC hC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC","16":"rC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:1,C:"unhandledrejection/rejectionhandled events",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB SC TC"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB eC fC gC hC zB NC iC 0B"},G:{"1":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC","16":"sC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:1,C:"unhandledrejection/rejectionhandled events",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js index d91328d4c302b0..f64a23996a3049 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/upgradeinsecurerequests.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RC SC"},D:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB dC eC fC gC zB NC hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"Upgrade Insecure Requests",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB SC TC"},D:{"1":"0 1 2 3 4 5 6 SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB eC fC gC hC zB NC iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"Upgrade Insecure Requests",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js index 8f37a8d1a53c48..184a97e6a11dae 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/url-scroll-to-text-fragment.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O","66":"P Q R"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r","66":"uB vB wB xB yB P Q"},E:{"1":"GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B"},F:{"1":"pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB dC eC fC gC zB NC hC 0B","66":"nB oB"},G:{"1":"GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q ID JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"URL Scroll-To-Text Fragment",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O","66":"P Q R"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s","66":"uB vB wB xB yB P Q"},E:{"1":"GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B"},F:{"1":"pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB eC fC gC hC zB NC iC 0B","66":"nB oB"},G:{"1":"GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r JD KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"URL Scroll-To-Text Fragment",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/url.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/url.js index ea1f4c9773b3b2..e1268b6afbca5d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/url.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/url.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB RC SC"},D:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O n o p","130":"9 q AB BB CB DB EB FB GB"},E:{"1":"F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC VC","130":"E"},F:{"1":"8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","130":"H M N O"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC","130":"lC"},H:{"2":"4C"},I:{"1":"D AD","2":"4B I 5C 6C 7C 8C OC","130":"9C"},J:{"2":"E","130":"A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"URL API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB SC TC"},D:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O o p q","130":"9 r AB BB CB DB EB FB GB"},E:{"1":"F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC WC","130":"E"},F:{"1":"8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","130":"H M N O"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC","130":"mC"},H:{"2":"5C"},I:{"1":"D BD","2":"4B I 6C 7C 8C 9C OC","130":"AD"},J:{"2":"E","130":"A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"URL API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/urlsearchparams.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/urlsearchparams.js index 56f335eef0e170..055884f85d3181 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/urlsearchparams.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/urlsearchparams.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC","132":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"1":"B C K L H CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB dC eC fC gC zB NC hC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"URLSearchParams",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M"},C:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC","132":"EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},D:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB"},E:{"1":"B C K L H CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC"},F:{"1":"LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB eC fC gC hC zB NC iC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"URLSearchParams",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/use-strict.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/use-strict.js index e30aacb20521af..76d05f2b8991bc 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/use-strict.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/use-strict.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","132":"7 UC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G B dC eC fC gC zB NC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"1":"4C"},I:{"1":"4B I D 8C OC 9C AD","2":"5C 6C 7C"},J:{"1":"E A"},K:{"1":"C r NC 0B","2":"A B zB"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"ECMAScript 5 Strict Mode",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","132":"7 VC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G B eC fC gC hC zB NC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"1":"5C"},I:{"1":"4B I D 9C OC AD BD","2":"6C 7C 8C"},J:{"1":"E A"},K:{"1":"C s NC 0B","2":"A B zB"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"ECMAScript 5 Strict Mode",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/user-select-none.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/user-select-none.js index 6463a297853a6d..bd1e59e3577237 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/user-select-none.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/user-select-none.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","33":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","33":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB RC SC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB"},E:{"1":"cC","33":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC"},F:{"1":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","33":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},G:{"33":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","33":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"33":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"33":"A B"},O:{"1":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","33":"I BD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","33":"OD"}},B:5,C:"CSS user-select: none",D:true}; +module.exports={A:{A:{"2":"J E F G PC","33":"A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","33":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","33":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB SC TC"},D:{"1":"0 1 2 3 4 5 6 dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","33":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB"},E:{"1":"dC","33":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC"},F:{"1":"QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","33":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB"},G:{"33":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","33":"4B I 6C 7C 8C 9C OC AD BD"},J:{"33":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"33":"A B"},O:{"1":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","33":"I CD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","33":"PD"}},B:5,C:"CSS user-select: none",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/user-timing.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/user-timing.js index 31ada559dc6f64..c53a535a6b9ee6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/user-timing.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/user-timing.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB RC SC"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"User Timing API",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB SC TC"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"User Timing API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/variable-fonts.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/variable-fonts.js index 668b5fa863e88b..4983ba87f8a186 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/variable-fonts.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/variable-fonts.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB RC SC","4609":"jB kB lB mB nB oB pB qB rB","4674":"6B","5698":"iB","7490":"cB dB eB fB gB","7746":"hB 5B","8705":"0 1 2 3 4 5 6 sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB","4097":"nB","4290":"5B iB 6B","6148":"jB kB lB mB"},E:{"1":"H ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC","4609":"B C zB 0B","8193":"K L DC YC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB dC eC fC gC zB NC hC 0B","4097":"cB","6148":"YB ZB aB bB"},G:{"1":"vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC","4097":"rC sC tC uC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"4097":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I BD CD DD","4097":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:5,C:"Variable fonts",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB SC TC","4609":"jB kB lB mB nB oB pB qB rB","4674":"6B","5698":"iB","7490":"cB dB eB fB gB","7746":"hB 5B","8705":"0 1 2 3 4 5 6 sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB","4097":"nB","4290":"5B iB 6B","6148":"jB kB lB mB"},E:{"1":"H aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC","4609":"B C zB 0B","8193":"K L DC ZC"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB eC fC gC hC zB NC iC 0B","4097":"cB","6148":"YB ZB aB bB"},G:{"1":"wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC","4097":"sC tC uC vC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"4097":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"2":"I CD DD ED","4097":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:5,C:"Variable fonts",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/vector-effect.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/vector-effect.js index d24350261b4d01..c15fdf8b905854 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/vector-effect.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/vector-effect.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L RC SC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","2":"G B dC eC fC gC zB NC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC"},H:{"1":"4C"},I:{"1":"D 9C AD","16":"4B I 5C 6C 7C 8C OC"},J:{"16":"E A"},K:{"1":"C r 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"SVG vector-effect: non-scaling-stroke",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L SC TC"},D:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J E F G A B C K L"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","2":"G B eC fC gC hC zB NC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC"},H:{"1":"5C"},I:{"1":"D AD BD","16":"4B I 6C 7C 8C 9C OC"},J:{"16":"E A"},K:{"1":"C s 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"SVG vector-effect: non-scaling-stroke",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/vibration.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/vibration.js index 10965fff07fac8..64183e19296960 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/vibration.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/vibration.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A RC SC","33":"B C K L H"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C H M dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"Vibration API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A SC TC","33":"B C K L H"},D:{"1":"0 1 2 3 4 5 6 FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C H M eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"Vibration API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/video.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/video.js index 3d6ac53fda513e..acfea940406024 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/video.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/video.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","260":"7 8 I J E F G A B C K L H M N O RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A UC VC WC XC CC","2":"TC BC","513":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC eC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC","513":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","132":"5C 6C"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Video element",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","260":"7 8 I J E F G A B C K L H M N O SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A VC WC XC YC CC","2":"UC BC","513":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC fC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC","513":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","132":"6C 7C"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Video element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/videotracks.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/videotracks.js index ebf247d454cccf..51b2ecb80f0184 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/videotracks.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/videotracks.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"C K L H M N O","322":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB RC SC","194":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB","322":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J TC BC UC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB dC eC fC gC zB NC hC 0B","322":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","322":"r"},L:{"322":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"322":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"322":"DC"},R:{"322":"ND"},S:{"194":"OD PD"}},B:1,C:"Video Tracks",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"C K L H M N O","322":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB SC TC","194":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB","322":"0 1 2 3 4 5 6 UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J UC BC VC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB eC fC gC hC zB NC iC 0B","322":"HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","322":"s"},L:{"322":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"322":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"322":"DC"},R:{"322":"OD"},S:{"194":"PD QD"}},B:1,C:"Video Tracks",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/view-transitions.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/view-transitions.js index a2b59f83e8e36f..246dda16a46524 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/view-transitions.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/view-transitions.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"q","2":"I n o p BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"View Transitions API (single-document)",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"r","2":"I o p q CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"View Transitions API (single-document)",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/viewport-unit-variants.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/viewport-unit-variants.js index 8e2ed04e1246fb..1f8a2f9b03cb56 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/viewport-unit-variants.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/viewport-unit-variants.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s","194":"t u v"},C:{"1":"0 1 2 3 4 5 6 k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j RC SC"},D:{"1":"0 1 2 3 4 5 6 w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i","194":"j k l m s t u v"},E:{"1":"FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC"},F:{"1":"d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z dC eC fC gC zB NC hC 0B","194":"a b c"},G:{"1":"FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q","2":"I n BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:5,C:"Small, Large, and Dynamic viewport units",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n","194":"t u v"},C:{"1":"0 1 2 3 4 5 6 k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j SC TC"},D:{"1":"0 1 2 3 4 5 6 w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i","194":"j k l m n t u v"},E:{"1":"FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC"},F:{"1":"d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z eC fC gC hC zB NC iC 0B","194":"a b c"},G:{"1":"FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"p q r","2":"I o CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:5,C:"Small, Large, and Dynamic viewport units",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/viewport-units.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/viewport-units.js index 407a7a8641523a..01b26d3a9cb8e7 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/viewport-units.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/viewport-units.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","132":"G","260":"A B"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","260":"C K L H"},C:{"1":"0 1 2 3 4 5 6 8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L H M N O RC SC"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O","260":"9 n o p q AB"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC","260":"J"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC","516":"lC","772":"kC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"260":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"Viewport units: vw, vh, vmin, vmax",D:true}; +module.exports={A:{A:{"2":"J E F PC","132":"G","260":"A B"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","260":"C K L H"},C:{"1":"0 1 2 3 4 5 6 8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L H M N O SC TC"},D:{"1":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 I J E F G A B C K L H M N O","260":"9 o p q r AB"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC","260":"J"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC","516":"mC","772":"lC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"260":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"Viewport units: vw, vh, vmin, vmax",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wai-aria.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wai-aria.js index f0e43a138c2b2b..0b35d1b83b59e9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wai-aria.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wai-aria.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E PC","4":"F G A B"},B:{"4":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"4":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"4":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"TC BC","4":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G","4":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"4":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"4":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC","4":"D 9C AD"},J:{"2":"E A"},K:{"4":"A B C r zB NC 0B"},L:{"4":"D"},M:{"4":"D"},N:{"4":"A B"},O:{"4":"1B"},P:{"4":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"4":"DC"},R:{"4":"ND"},S:{"4":"OD PD"}},B:2,C:"WAI-ARIA Accessibility features",D:true}; +module.exports={A:{A:{"2":"J E PC","4":"F G A B"},B:{"4":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"4":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"4":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"UC BC","4":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G","4":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"4":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"4":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC","4":"D AD BD"},J:{"2":"E A"},K:{"4":"A B C s zB NC 0B"},L:{"4":"D"},M:{"4":"D"},N:{"4":"A B"},O:{"4":"1B"},P:{"4":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"4":"DC"},R:{"4":"OD"},S:{"4":"PD QD"}},B:2,C:"WAI-ARIA Accessibility features",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wake-lock.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wake-lock.js index 899855f9c3ccad..9f6db618a96b37 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wake-lock.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wake-lock.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O","194":"P Q R S T U V W X Y"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB","194":"sB tB r uB vB wB xB yB P Q R S T"},E:{"1":"JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC"},F:{"1":"r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB dC eC fC gC zB NC hC 0B","194":"hB iB jB kB lB mB nB oB pB qB rB sB tB"},G:{"1":"JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q JD KD 2B 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:4,C:"Screen Wake Lock API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O","194":"P Q R S T U V W X Y"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB","194":"sB tB s uB vB wB xB yB P Q R S T"},E:{"1":"JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC"},F:{"1":"s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB eC fC gC hC zB NC iC 0B","194":"hB iB jB kB lB mB nB oB pB qB rB sB tB"},G:{"1":"JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r KD LD 2B 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:4,C:"Screen Wake Lock API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wasm.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wasm.js index 24ec7ba590741f..c27aaf23e67028 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wasm.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wasm.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L","578":"H"},C:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB RC SC","194":"WB XB YB ZB aB","1025":"bB"},D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","322":"aB bB cB dB eB fB"},E:{"1":"B C K L H zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB dC eC fC gC zB NC hC 0B","322":"NB OB PB QB RB SB"},G:{"1":"rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","194":"OD"}},B:6,C:"WebAssembly",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L","578":"H"},C:{"1":"0 1 2 3 4 5 6 cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB SC TC","194":"WB XB YB ZB aB","1025":"bB"},D:{"1":"0 1 2 3 4 5 6 gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB","322":"aB bB cB dB eB fB"},E:{"1":"B C K L H zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC"},F:{"1":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB eC fC gC hC zB NC iC 0B","322":"NB OB PB QB RB SB"},G:{"1":"sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","194":"PD"}},B:6,C:"WebAssembly",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wav.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wav.js index e2eb44195f2e09..42616a9cbeafac 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wav.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wav.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m fC gC zB NC hC 0B","2":"G dC eC"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","16":"A"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"Wav audio format",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n gC hC zB NC iC 0B","2":"G eC fC"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","16":"A"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"Wav audio format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wbr-element.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wbr-element.js index 87bc34b62f7127..a662547dce13ed 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wbr-element.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wbr-element.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E PC","2":"F G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"TC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","16":"G"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC"},H:{"1":"4C"},I:{"1":"4B I D 7C 8C OC 9C AD","16":"5C 6C"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"wbr (word break opportunity) element",D:true}; +module.exports={A:{A:{"1":"J E PC","2":"F G A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"UC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","16":"G"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC"},H:{"1":"5C"},I:{"1":"4B I D 8C 9C OC AD BD","16":"6C 7C"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"wbr (word break opportunity) element",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-animation.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-animation.js index c3f9e4ce63fdf9..77cde6fac09cff 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-animation.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-animation.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O","260":"P Q R S"},C:{"1":"0 1 2 3 4 5 6 R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB RC SC","260":"5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB","516":"WB XB YB ZB aB bB cB dB eB fB gB hB","580":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB","2049":"vB wB xB yB P Q"},D:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB","132":"LB MB NB","260":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S"},E:{"1":"H ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC CC","1090":"B C K zB 0B","2049":"L DC YC"},F:{"1":"sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o p dC eC fC gC zB NC hC 0B","132":"9 q AB","260":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC","1090":"rC sC tC uC vC wC xC","2049":"yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"260":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"260":"DC"},R:{"1":"ND"},S:{"1":"PD","516":"OD"}},B:5,C:"Web Animations API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O","260":"P Q R S"},C:{"1":"0 1 2 3 4 5 6 R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB SC TC","260":"5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB","516":"WB XB YB ZB aB bB cB dB eB fB gB hB","580":"IB JB KB LB MB NB OB PB QB RB SB TB UB VB","2049":"vB wB xB yB P Q"},D:{"1":"0 1 2 3 4 5 6 T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB","132":"LB MB NB","260":"OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S"},E:{"1":"H aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC CC","1090":"B C K zB 0B","2049":"L DC ZC"},F:{"1":"sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p q eC fC gC hC zB NC iC 0B","132":"9 r AB","260":"BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC","1090":"sC tC uC vC wC xC yC","2049":"zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"260":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"260":"DC"},R:{"1":"OD"},S:{"1":"QD","516":"PD"}},B:5,C:"Web Animations API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-app-manifest.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-app-manifest.js index db5d170a78029e..577d9496621b49 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-app-manifest.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-app-manifest.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M","130":"N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","578":"wB xB yB P Q R 7B S T U"},D:{"1":"0 1 2 3 4 5 6 OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC","4":"3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC","4":"JC KC 3C 3B LC MC","260":"sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:5,C:"Add to home screen (A2HS)",D:false}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M","130":"N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","578":"wB xB yB P Q R 7B S T U"},D:{"1":"0 1 2 3 4 5 6 OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC","4":"3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC","4":"JC KC 4C 3B LC MC","260":"tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:5,C:"Add to home screen (A2HS)",D:false}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-bluetooth.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-bluetooth.js index 031da2cf2cca7a..d157d20cddcbb4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-bluetooth.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-bluetooth.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","1025":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB","194":"UB VB WB XB YB ZB aB bB","706":"cB dB eB","1025":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB dC eC fC gC zB NC hC 0B","450":"LB MB NB OB","706":"PB QB RB","1025":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C AD","1025":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","1025":"r"},L:{"1025":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1025":"1B"},P:{"1":"n o p q CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD"},Q:{"2":"DC"},R:{"1025":"ND"},S:{"2":"OD PD"}},B:7,C:"Web Bluetooth",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","1025":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB","194":"UB VB WB XB YB ZB aB bB","706":"cB dB eB","1025":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB eC fC gC hC zB NC iC 0B","450":"LB MB NB OB","706":"PB QB RB","1025":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD BD","1025":"D"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","1025":"s"},L:{"1025":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1025":"1B"},P:{"1":"o p q r DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD"},Q:{"2":"DC"},R:{"1025":"OD"},S:{"2":"PD QD"}},B:7,C:"Web Bluetooth",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-serial.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-serial.js index 1f3880a68e5ece..aa3ba4f0aa1177 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-serial.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-serial.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O","66":"P Q R S T U V W X"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB","66":"yB P Q R S T U V W X"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB dC eC fC gC zB NC hC 0B","66":"mB nB oB pB qB rB sB tB r uB vB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"Web Serial API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O","66":"P Q R S T U V W X"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB","66":"yB P Q R S T U V W X"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB eC fC gC hC zB NC iC 0B","66":"mB nB oB pB qB rB sB tB s uB vB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"Web Serial API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-share.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-share.js index ad10ebdd1c6db4..1848a1abf15f7a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-share.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/web-share.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 e f g h i j k l m s t u v w x y z D","2":"C K L H M N O P Q","516":"R S T U V W X Y Z a b c d"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"7 I J E F G A B C K L H M N AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X","130":"8 9 O n o p q","1028":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"L H YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB","2049":"K 0B DC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC","2049":"uC vC wC xC yC"},H:{"2":"4C"},I:{"2":"4B I 5C 6C 7C 8C OC 9C","258":"D AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I","258":"BD CD DD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:4,C:"Web Share API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 e f g h i j k l m n t u v w x y z D","2":"C K L H M N O P Q","516":"R S T U V W X Y Z a b c d"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"7 I J E F G A B C K L H M N AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X","130":"8 9 O o p q r","1028":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"L H ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB","2049":"K 0B DC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC","2049":"vC wC xC yC zC"},H:{"2":"5C"},I:{"2":"4B I 6C 7C 8C 9C OC AD","258":"D BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I","258":"CD DD ED"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:4,C:"Web Share API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webauthn.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webauthn.js index bff06b14b2606d..127d869dd0eafa 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webauthn.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webauthn.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C","226":"K L H M N"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B RC SC","4100":"2 3 4 5 6 D 8B 9B AC","5124":"0 1 iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB"},E:{"1":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C TC BC UC VC WC XC CC zB","322":"0B"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dC eC fC gC zB NC hC 0B"},G:{"1":"0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC","578":"wC","2052":"zC","3076":"xC yC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1028":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID JD KD 2B"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2":"OD"}},B:2,C:"Web Authentication API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C","226":"K L H M N"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B SC TC","4100":"2 3 4 5 6 D 8B 9B AC RC","5124":"0 1 iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z"},D:{"1":"0 1 2 3 4 5 6 oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB"},E:{"1":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C UC BC VC WC XC YC CC zB","322":"0B"},F:{"1":"dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB eC fC gC hC zB NC iC 0B"},G:{"1":"1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC","578":"xC","2052":"0C","3076":"yC zC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1028":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD KD LD 2B"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2":"PD"}},B:2,C:"Web Authentication API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webcodecs.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webcodecs.js index de61033378ed1a..611bfea949ff0d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webcodecs.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webcodecs.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC","132":"JC KC bC 3B LC MC cC"},F:{"1":"Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC","132":"JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q 3B LD MD","2":"I BD CD DD ED FD CC GD HD ID JD KD 2B"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:5,C:"WebCodecs API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC","132":"JC KC cC 3B LC MC dC"},F:{"1":"Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC","132":"JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r 3B MD ND","2":"I CD DD ED FD GD CC HD ID JD KD LD 2B"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:5,C:"WebCodecs API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgl.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgl.js index b070fe1a1f8a65..55a5fb147c771a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgl.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgl.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"PC","8":"J E F G A","129":"B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","129":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","129":"7 8 I J E F G A B C K L H M N O n o p q"},D:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E","129":"8 9 F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB"},E:{"1":"F G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC","129":"J E UC VC WC"},F:{"1":"8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B dC eC fC gC zB NC hC","129":"C H M N O 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC lC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"1":"A","2":"E"},K:{"1":"C r 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A","129":"B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","129":"OD"}},B:6,C:"WebGL - 3D Canvas graphics",D:true}; +module.exports={A:{A:{"2":"PC","8":"J E F G A","129":"B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","129":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","129":"7 8 I J E F G A B C K L H M N O o p q r"},D:{"1":"0 1 2 3 4 5 6 IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E","129":"8 9 F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB"},E:{"1":"F G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC","129":"J E VC WC XC"},F:{"1":"8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B eC fC gC hC zB NC iC","129":"C H M N O 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC mC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"1":"A","2":"E"},K:{"1":"C s 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A","129":"B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","129":"PD"}},B:6,C:"WebGL - 3D Canvas graphics",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgl2.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgl2.js index f52187bebe6e29..b9dce560287c69 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgl2.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgl2.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q RC SC","194":"RB SB TB","450":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB","2242":"UB VB WB XB YB ZB"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","578":"SB TB UB VB WB XB YB ZB aB bB cB dB eB"},E:{"1":"H ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A TC BC UC VC WC XC","1090":"B C K L CC zB 0B DC YC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB dC eC fC gC zB NC hC 0B"},G:{"1":"1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC","1090":"tC uC vC wC xC yC zC 0C"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q DD ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","2242":"OD"}},B:6,C:"WebGL 2.0",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r SC TC","194":"RB SB TB","450":"AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB","2242":"UB VB WB XB YB ZB"},D:{"1":"0 1 2 3 4 5 6 fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB","578":"SB TB UB VB WB XB YB ZB aB bB cB dB eB"},E:{"1":"H aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A UC BC VC WC XC YC","1090":"B C K L CC zB 0B DC ZC"},F:{"1":"SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB eC fC gC hC zB NC iC 0B"},G:{"1":"2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC","1090":"uC vC wC xC yC zC 0C 1C"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r ED FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","2242":"PD"}},B:6,C:"WebGL 2.0",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgpu.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgpu.js index 1ba1d38a312aea..b574055e01e020 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgpu.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webgpu.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"1 2 3 4 5 6 D","2":"C K L H M N O P","578":"Q R S T U V W X Y Z a b c","1602":"0 d e f g h i j k l m s t u v w x y z"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB RC SC","194":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P","578":"Q R S T U V W X Y Z a b c","1602":"0 d e f g h i j k l m s t u v w x y z","2049":"1 2 3 4 5 6 D 8B 9B AC"},E:{"2":"7 I J E F G A B H TC BC UC VC WC XC CC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","322":"C K L zB 0B DC YC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB dC eC fC gC zB NC hC 0B","578":"r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h","2049":"i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"194":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD","194":"PD"}},B:5,C:"WebGPU",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"1 2 3 4 5 6 D","2":"C K L H M N O P","578":"Q R S T U V W X Y Z a b c","1602":"0 d e f g h i j k l m n t u v w x y z"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB SC TC","194":"0 1 2 3 4 5 6 kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P","578":"Q R S T U V W X Y Z a b c","1602":"0 d e f g h i j k l m n t u v w x y z","2049":"1 2 3 4 5 6 D 8B 9B AC"},E:{"2":"7 I J E F G A B H UC BC VC WC XC YC CC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","322":"C K L zB 0B DC ZC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB eC fC gC hC zB NC iC 0B","578":"s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h","2049":"i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"194":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD","194":"QD"}},B:5,C:"WebGPU",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webhid.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webhid.js index 88c4f135b3c1b3..457995af90f8f1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webhid.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webhid.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O","66":"P Q R S T U V W X"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB","66":"yB P Q R S T U V W X"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB dC eC fC gC zB NC hC 0B","66":"nB oB pB qB rB sB tB r uB vB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"WebHID API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O","66":"P Q R S T U V W X"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB","66":"yB P Q R S T U V W X"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB eC fC gC hC zB NC iC 0B","66":"nB oB pB qB rB sB tB s uB vB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"WebHID API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webkit-user-drag.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webkit-user-drag.js index b41fb381c819ca..ad4c20765a67ca 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webkit-user-drag.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webkit-user-drag.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"16":"7 I J E F G A B C K L H","132":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"G B C dC eC fC gC zB NC hC 0B","132":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"CSS -webkit-user-drag property",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"16":"7 I J E F G A B C K L H","132":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"G B C eC fC gC hC zB NC iC 0B","132":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"CSS -webkit-user-drag property",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webm.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webm.js index 43d54e912c532a..b01b80444ac8b6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webm.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webm.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F PC","520":"G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","8":"C K","388":"L H M N O"},C:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","132":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I","132":"8 9 J E F G A B C K L H M N O n o p q"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"TC","8":"7 I BC UC","520":"J E F G A B C VC WC XC CC zB","1028":"K 0B DC","7172":"L","8196":"H YC ZC EC FC 1B aC"},F:{"1":"8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G dC eC fC","132":"B C H gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC","1028":"uC vC wC xC yC","3076":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"5C 6C","132":"4B I 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD","132":"I"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:6,C:"WebM video format",D:true}; +module.exports={A:{A:{"2":"J E F PC","520":"G A B"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","8":"C K","388":"L H M N O"},C:{"1":"0 1 2 3 4 5 6 DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","132":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB"},D:{"1":"0 1 2 3 4 5 6 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I","132":"8 9 J E F G A B C K L H M N O o p q r"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"UC","8":"7 I BC VC","520":"J E F G A B C WC XC YC CC zB","1028":"K 0B DC","7172":"L","8196":"H ZC aC EC FC 1B bC"},F:{"1":"8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G eC fC gC","132":"B C H hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC","1028":"vC wC xC yC zC","3076":"0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"6C 7C","132":"4B I 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"8":"A B"},O:{"1":"1B"},P:{"1":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND","132":"I"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:6,C:"WebM video format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webnfc.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webnfc.js index eb6651a538ab8d..edac030a203fa8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webnfc.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webnfc.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Y Z a b c d e f g h i j k l m s t u v w x y z D","450":"Q R S T U V W X"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","450":"Q R S T U V W X"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","450":"oB pB qB rB sB tB r uB vB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"257":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"Web NFC",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L H M N O P Y Z a b c d e f g h i j k l m n t u v w x y z D","450":"Q R S T U V W X"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","450":"Q R S T U V W X"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","450":"oB pB qB rB sB tB s uB vB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"257":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"Web NFC",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webp.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webp.js index ccf754dec12c63..99f57e5e934212 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webp.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webp.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","8":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB"},D:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I","8":"J E F","132":"8 G A B C K L H M N O n o p","260":"9 q AB BB CB DB EB FB GB"},E:{"1":"2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G A B C K TC BC UC VC WC XC CC zB 0B DC","516":"L H YC ZC EC FC 1B aC"},F:{"1":"8 9 n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G dC eC fC","8":"B gC","132":"zB NC hC","260":"C H M N O 0B"},G:{"1":"zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC"},H:{"1":"4C"},I:{"1":"D OC 9C AD","2":"4B 5C 6C 7C","132":"I 8C"},J:{"2":"E A"},K:{"1":"C r zB NC 0B","2":"A","132":"B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","8":"OD"}},B:6,C:"WebP image format",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","8":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB"},D:{"1":"0 1 2 3 4 5 6 HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I","8":"J E F","132":"8 G A B C K L H M N O o p q","260":"9 r AB BB CB DB EB FB GB"},E:{"1":"2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G A B C K UC BC VC WC XC YC CC zB 0B DC","516":"L H ZC aC EC FC 1B bC"},F:{"1":"8 9 o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G eC fC gC","8":"B hC","132":"zB NC iC","260":"C H M N O 0B"},G:{"1":"0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC"},H:{"1":"5C"},I:{"1":"D OC AD BD","2":"4B 6C 7C 8C","132":"I 9C"},J:{"2":"E A"},K:{"1":"C s zB NC 0B","2":"A","132":"B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","8":"PD"}},B:6,C:"WebP image format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/websockets.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/websockets.js index e63b3f9e803b71..19e5661bdcabb6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/websockets.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/websockets.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B RC SC","132":"7 I","292":"J E F G A"},D:{"1":"0 1 2 3 4 5 6 8 9 M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 I J E F G A B C K L","260":"H"},E:{"1":"E F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","132":"7 UC","260":"J VC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G dC eC fC gC","132":"B C zB NC hC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC","132":"OC jC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","129":"E"},K:{"1":"r 0B","2":"A","132":"B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Web Sockets",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B SC TC","132":"7 I","292":"J E F G A"},D:{"1":"0 1 2 3 4 5 6 8 9 M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","132":"7 I J E F G A B C K L","260":"H"},E:{"1":"E F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","132":"7 VC","260":"J WC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G eC fC gC hC","132":"B C zB NC iC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC","132":"OC kC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","129":"E"},K:{"1":"s 0B","2":"A","132":"B C zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Web Sockets",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webtransport.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webtransport.js index e9ed8cff25631f..f6fa4c845e4bc9 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webtransport.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webtransport.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 h i j k l m s t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g"},C:{"1":"2 3 4 5 6 D 8B 9B AC","2":"0 1 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z RC SC"},D:{"1":"0 1 2 3 4 5 6 g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z e f","66":"a b c d"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q LD MD","2":"I BD CD DD ED FD CC GD HD ID JD KD 2B 3B"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:5,C:"WebTransport",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 h i j k l m n t u v w x y z D","2":"C K L H M N O P Q R S T U V W X Y Z a b c d e f g"},C:{"1":"2 3 4 5 6 D 8B 9B AC RC","2":"0 1 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z SC TC"},D:{"1":"0 1 2 3 4 5 6 g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z e f","66":"a b c d"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r MD ND","2":"I CD DD ED FD GD CC HD ID JD KD LD 2B 3B"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:5,C:"WebTransport",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webusb.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webusb.js index 95bc1255c001e2..3a0b75bfb2b48b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webusb.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webusb.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB","66":"dB eB fB gB hB 5B iB"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB dC eC fC gC zB NC hC 0B","66":"QB RB SB TB UB VB WB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"n o p q ED FD CC GD HD ID JD KD 2B 3B LD MD","2":"I BD CD DD"},Q:{"2":"DC"},R:{"1":"ND"},S:{"2":"OD PD"}},B:7,C:"WebUSB",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB","66":"dB eB fB gB hB 5B iB"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB eC fC gC hC zB NC iC 0B","66":"QB RB SB TB UB VB WB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"o p q r FD GD CC HD ID JD KD LD 2B 3B MD ND","2":"I CD DD ED"},Q:{"2":"DC"},R:{"1":"OD"},S:{"2":"PD QD"}},B:7,C:"WebUSB",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webvr.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webvr.js index 9c74edd15b45c6..84be87fcf48ab6 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webvr.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webvr.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","66":"P","257":"H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB RC SC","129":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","194":"dB"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","66":"gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","66":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"513":"I","516":"n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:7,C:"WebVR API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 6 C K L Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","66":"P","257":"H M N O"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB SC TC","129":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","194":"dB"},D:{"2":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","66":"gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","66":"TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"513":"I","516":"o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:7,C:"WebVR API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webvtt.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webvtt.js index 222820ee50a487..023ba5efb4e00f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webvtt.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webvtt.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 QC 4B I J E F G A B C K L H M N O n o p q RC SC","66":"9 AB BB CB DB EB FB","129":"GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB","257":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"1":"0 1 2 3 4 5 6 8 9 O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N"},E:{"1":"J E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC UC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC jC kC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","2":"E"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"129":"OD PD"}},B:4,C:"WebVTT - Web Video Text Tracks",D:true}; +module.exports={A:{A:{"1":"A B","2":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 QC 4B I J E F G A B C K L H M N O o p q r SC TC","66":"9 AB BB CB DB EB FB","129":"GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB","257":"0 1 2 3 4 5 6 eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"1":"0 1 2 3 4 5 6 8 9 O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 I J E F G A B C K L H M N"},E:{"1":"J E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC VC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC kC lC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","2":"E"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"B","2":"A"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"129":"PD QD"}},B:4,C:"WebVTT - Web Video Text Tracks",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webworkers.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webworkers.js index 31a12432eedf72..9c54587d5e442d 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webworkers.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webworkers.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","2":"PC","8":"J E F G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","8":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","8":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m gC zB NC hC 0B","2":"G dC","8":"eC fC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"2":"4C"},I:{"1":"D 5C 9C AD","2":"4B I 6C 7C 8C OC"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","8":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Web Workers",D:true}; +module.exports={A:{A:{"1":"A B","2":"PC","8":"J E F G"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","8":"QC 4B"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","8":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n hC zB NC iC 0B","2":"G eC","8":"fC gC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"2":"5C"},I:{"1":"D 6C AD BD","2":"4B I 7C 8C 9C OC"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","8":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Web Workers",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webxr.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webxr.js index d2c7c70b276f5f..da3e1ebb8f53b1 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webxr.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/webxr.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB RC SC","322":"0 1 2 3 4 5 6 xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB","66":"mB nB oB pB qB rB sB tB r uB vB wB xB yB","132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C TC BC UC VC WC XC CC zB 0B","578":"K L H DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB dC eC fC gC zB NC hC 0B","66":"bB cB dB eB fB gB hB iB jB kB lB mB","132":"nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","132":"r"},L:{"132":"D"},M:{"322":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I BD CD DD ED FD CC GD","132":"n o p q HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD","322":"PD"}},B:4,C:"WebXR Device API",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"C K L H M N O","132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB SC TC","322":"0 1 2 3 4 5 6 xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC"},D:{"2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB","66":"mB nB oB pB qB rB sB tB s uB vB wB xB yB","132":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"2":"7 I J E F G A B C UC BC VC WC XC YC CC zB 0B","578":"K L H DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB eC fC gC hC zB NC iC 0B","66":"bB cB dB eB fB gB hB iB jB kB lB mB","132":"nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C zB NC 0B","132":"s"},L:{"132":"D"},M:{"322":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I CD DD ED FD GD CC HD","132":"o p q r ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD","322":"QD"}},B:4,C:"WebXR Device API",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/will-change.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/will-change.js index 7911ddca63889e..d1e8ea5d17e3fe 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/will-change.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/will-change.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB RC SC","194":"EB FB GB HB IB JB KB"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o p q dC eC fC gC zB NC hC 0B"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS will-change property",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K L H M N O"},C:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB SC TC","194":"EB FB GB HB IB JB KB"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC"},F:{"1":"9 AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p q r eC fC gC hC zB NC iC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS will-change property",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/woff.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/woff.js index e961c954d2ee60..88bf815251777f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/woff.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/woff.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC SC","2":"QC 4B RC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"I"},E:{"1":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I TC BC"},F:{"1":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m zB NC hC 0B","2":"G B dC eC fC gC"},G:{"1":"F jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC"},H:{"2":"4C"},I:{"1":"D 9C AD","2":"4B 5C 6C 7C 8C OC","130":"I"},J:{"1":"E A"},K:{"1":"B C r zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"WOFF - Web Open Font Format",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC TC","2":"QC 4B SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"I"},E:{"1":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I UC BC"},F:{"1":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n zB NC iC 0B","2":"G B eC fC gC hC"},G:{"1":"F kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC"},H:{"2":"5C"},I:{"1":"D AD BD","2":"4B 6C 7C 8C 9C OC","130":"I"},J:{"1":"E A"},K:{"1":"B C s zB NC 0B","2":"A"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"WOFF - Web Open Font Format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/woff2.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/woff2.js index 98a56aea0d5206..981074d3affc24 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/woff2.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/woff2.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB RC SC"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"C K L H 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"7 I J E F G TC BC UC VC WC XC","132":"A B CC zB"},F:{"1":"9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"8 G B C H M N O n o p dC eC fC gC zB NC hC 0B"},G:{"1":"pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"F BC iC OC jC kC lC mC nC oC"},H:{"2":"4C"},I:{"1":"D","2":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:2,C:"WOFF 2.0 - Web Open Font Format",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","2":"C K"},C:{"1":"0 1 2 3 4 5 6 OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB SC TC"},D:{"1":"0 1 2 3 4 5 6 LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","2":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB"},E:{"1":"C K L H 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"7 I J E F G UC BC VC WC XC YC","132":"A B CC zB"},F:{"1":"9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"8 G B C H M N O o p q eC fC gC hC zB NC iC 0B"},G:{"1":"qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"F BC jC OC kC lC mC nC oC pC"},H:{"2":"5C"},I:{"1":"D","2":"4B I 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"2":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:2,C:"WOFF 2.0 - Web Open Font Format",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/word-break.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/word-break.js index 437c2e2b1ca59c..c0ade2930d9f3f 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/word-break.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/word-break.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"7 QC 4B I J E F G A B C K L RC SC"},D:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},E:{"1":"G A B C K L H XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","4":"7 I J E F TC BC UC VC WC"},F:{"1":"GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","2":"G B C dC eC fC gC zB NC hC 0B","4":"8 9 H M N O n o p q AB BB CB DB EB FB"},G:{"1":"nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","4":"F BC iC OC jC kC lC mC"},H:{"2":"4C"},I:{"1":"D","4":"4B I 5C 6C 7C 8C OC 9C AD"},J:{"4":"E A"},K:{"1":"r","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"CSS3 word-break",D:true}; +module.exports={A:{A:{"1":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"7 QC 4B I J E F G A B C K L SC TC"},D:{"1":"0 1 2 3 4 5 6 TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","4":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB"},E:{"1":"G A B C K L H YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","4":"7 I J E F UC BC VC WC XC"},F:{"1":"GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","2":"G B C eC fC gC hC zB NC iC 0B","4":"8 9 H M N O o p q r AB BB CB DB EB FB"},G:{"1":"oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","4":"F BC jC OC kC lC mC nC"},H:{"2":"5C"},I:{"1":"D","4":"4B I 6C 7C 8C 9C OC AD BD"},J:{"4":"E A"},K:{"1":"s","2":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"CSS3 word-break",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wordwrap.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wordwrap.js index df4fb212575def..74730b75228571 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wordwrap.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/wordwrap.js @@ -1 +1 @@ -module.exports={A:{A:{"4":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D","4":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","4":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB RC SC"},D:{"1":"0 1 2 3 4 5 6 9 q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","4":"7 8 I J E F G A B C K L H M N O n o p"},E:{"1":"E F G A B C K L H VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","4":"7 I J TC BC UC"},F:{"1":"8 9 H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G dC eC","4":"B C fC gC zB NC hC"},G:{"1":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","4":"BC iC OC jC kC"},H:{"4":"4C"},I:{"1":"D 9C AD","4":"4B I 5C 6C 7C 8C OC"},J:{"1":"A","4":"E"},K:{"1":"r","4":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"4":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"PD","4":"OD"}},B:4,C:"CSS3 Overflow-wrap",D:true}; +module.exports={A:{A:{"4":"J E F G A B PC"},B:{"1":"0 1 2 3 4 5 6 O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D","4":"C K L H M N"},C:{"1":"0 1 2 3 4 5 6 YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","4":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB SC TC"},D:{"1":"0 1 2 3 4 5 6 9 r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","4":"7 8 I J E F G A B C K L H M N O o p q"},E:{"1":"E F G A B C K L H WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","4":"7 I J UC BC VC"},F:{"1":"8 9 H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G eC fC","4":"B C gC hC zB NC iC"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","4":"BC jC OC kC lC"},H:{"4":"5C"},I:{"1":"D AD BD","4":"4B I 6C 7C 8C 9C OC"},J:{"1":"A","4":"E"},K:{"1":"s","4":"A B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"4":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"QD","4":"PD"}},B:4,C:"CSS3 Overflow-wrap",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/x-doc-messaging.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/x-doc-messaging.js index 8a571ede2ce0f1..aed7275884df3c 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/x-doc-messaging.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/x-doc-messaging.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E PC","132":"F G","260":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC","2":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"TC BC"},F:{"1":"8 9 B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B","2":"G"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"4":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"Cross-document messaging",D:true}; +module.exports={A:{A:{"2":"J E PC","132":"F G","260":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC","2":"QC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"UC BC"},F:{"1":"8 9 B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B","2":"G"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"4":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"Cross-document messaging",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/x-frame-options.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/x-frame-options.js index db5a0e78a20789..5c6192869bfbf8 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/x-frame-options.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/x-frame-options.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"F G A B","2":"J E PC"},B:{"1":"C K L H M N O","4":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"8 9 O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB","4":"0 1 2 3 4 5 6 7 I J E F G A B C K L H M N rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"QC 4B RC SC"},D:{"4":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 8 9 I J E F G A B C K L H M N O n o p q AB"},E:{"4":"J E F G A B C K L H UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","16":"7 I TC BC"},F:{"4":"8 9 C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m hC 0B","16":"G B dC eC fC gC zB NC"},G:{"4":"F lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","16":"BC iC OC jC kC"},H:{"2":"4C"},I:{"4":"I D 8C OC 9C AD","16":"4B 5C 6C 7C"},J:{"4":"E A"},K:{"4":"r 0B","16":"A B C zB NC"},L:{"4":"D"},M:{"4":"D"},N:{"1":"A B"},O:{"4":"1B"},P:{"4":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"4":"DC"},R:{"4":"ND"},S:{"1":"OD","4":"PD"}},B:6,C:"X-Frame-Options HTTP header",D:true}; +module.exports={A:{A:{"1":"F G A B","2":"J E PC"},B:{"1":"C K L H M N O","4":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"8 9 O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB","4":"0 1 2 3 4 5 6 7 I J E F G A B C K L H M N rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","16":"QC 4B SC TC"},D:{"4":"0 1 2 3 4 5 6 BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 8 9 I J E F G A B C K L H M N O o p q r AB"},E:{"4":"J E F G A B C K L H VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","16":"7 I UC BC"},F:{"4":"8 9 C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n iC 0B","16":"G B eC fC gC hC zB NC"},G:{"4":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","16":"BC jC OC kC lC"},H:{"2":"5C"},I:{"4":"I D 9C OC AD BD","16":"4B 6C 7C 8C"},J:{"4":"E A"},K:{"4":"s 0B","16":"A B C zB NC"},L:{"4":"D"},M:{"4":"D"},N:{"1":"A B"},O:{"4":"1B"},P:{"4":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"4":"DC"},R:{"4":"OD"},S:{"1":"PD","4":"QD"}},B:6,C:"X-Frame-Options HTTP header",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhr2.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhr2.js index 37b97b88e7cb67..496c92e3d9b816 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhr2.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhr2.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","2":"QC 4B","260":"A B","388":"J E F G","900":"7 I RC SC"},D:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","16":"7 I J","132":"EB FB","388":"8 9 E F G A B C K L H M N O n o p q AB BB CB DB"},E:{"1":"F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","2":"I TC BC","132":"E VC","388":"7 J UC"},F:{"1":"8 9 C O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m 0B","2":"G B dC eC fC gC zB NC hC","132":"H M N"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","2":"BC iC OC","132":"lC","388":"jC kC"},H:{"2":"4C"},I:{"1":"D AD","2":"5C 6C 7C","388":"9C","900":"4B I 8C OC"},J:{"132":"A","388":"E"},K:{"1":"C r 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"XMLHttpRequest advanced features",D:true}; +module.exports={A:{A:{"2":"J E F G PC","132":"A B"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","2":"QC 4B","260":"A B","388":"J E F G","900":"7 I SC TC"},D:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","16":"7 I J","132":"EB FB","388":"8 9 E F G A B C K L H M N O o p q r AB BB CB DB"},E:{"1":"F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","2":"I UC BC","132":"E WC","388":"7 J VC"},F:{"1":"8 9 C O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n 0B","2":"G B eC fC gC hC zB NC iC","132":"H M N"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","2":"BC jC OC","132":"mC","388":"kC lC"},H:{"2":"5C"},I:{"1":"D BD","2":"6C 7C 8C","388":"AD","900":"4B I 9C OC"},J:{"132":"A","388":"E"},K:{"1":"C s 0B","2":"A B zB NC"},L:{"1":"D"},M:{"1":"D"},N:{"132":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"XMLHttpRequest advanced features",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhtml.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhtml.js index 484a4a57e6a8ac..14afcd48971137 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhtml.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhtml.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"1":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"1":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"1":"4C"},I:{"1":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"1":"E A"},K:{"1":"A B C r zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:1,C:"XHTML served as application/xhtml+xml",D:true}; +module.exports={A:{A:{"1":"G A B","2":"J E F PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"1":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"1":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"1":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"1":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"1":"5C"},I:{"1":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"1":"E A"},K:{"1":"A B C s zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:1,C:"XHTML served as application/xhtml+xml",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhtmlsmil.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhtmlsmil.js index 339db9f810992a..f86129536531c4 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhtmlsmil.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xhtmlsmil.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"G A B PC","4":"J E F"},B:{"2":"C K L H M N O","8":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"8":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"8":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC"},E:{"8":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"8":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"8":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"8":"4C"},I:{"8":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"8":"E A"},K:{"8":"A B C r zB NC 0B"},L:{"8":"D"},M:{"8":"D"},N:{"2":"A B"},O:{"8":"1B"},P:{"8":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"8":"DC"},R:{"8":"ND"},S:{"8":"OD PD"}},B:7,C:"XHTML+SMIL animation",D:true}; +module.exports={A:{A:{"2":"G A B PC","4":"J E F"},B:{"2":"C K L H M N O","8":"0 1 2 3 4 5 6 P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"8":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"8":"0 1 2 3 4 5 6 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC"},E:{"8":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"8":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"8":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"8":"5C"},I:{"8":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"8":"E A"},K:{"8":"A B C s zB NC 0B"},L:{"8":"D"},M:{"8":"D"},N:{"2":"A B"},O:{"8":"1B"},P:{"8":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"8":"DC"},R:{"8":"OD"},S:{"8":"PD QD"}},B:7,C:"XHTML+SMIL animation",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xml-serializer.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xml-serializer.js index 844088a19f2b4d..92c7b6fb828d1a 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xml-serializer.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/xml-serializer.js @@ -1 +1 @@ -module.exports={A:{A:{"1":"A B","260":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"B","260":"7 QC 4B I J E RC SC","516":"F G A"},D:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC","132":"7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB"},E:{"1":"F G A B C K L H WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC","132":"7 I J E TC BC UC VC"},F:{"1":"8 9 O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m","16":"G dC","132":"B C H M N eC fC gC zB NC hC 0B"},G:{"1":"F mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC","132":"BC iC OC jC kC lC"},H:{"132":"4C"},I:{"1":"D 9C AD","132":"4B I 5C 6C 7C 8C OC"},J:{"132":"E A"},K:{"1":"r","16":"A","132":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"1":"DC"},R:{"1":"ND"},S:{"1":"OD PD"}},B:4,C:"DOM Parsing and Serialization",D:true}; +module.exports={A:{A:{"1":"A B","260":"J E F G PC"},B:{"1":"0 1 2 3 4 5 6 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D"},C:{"1":"0 1 2 3 4 5 6 8 9 C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC","132":"B","260":"7 QC 4B I J E SC TC","516":"F G A"},D:{"1":"0 1 2 3 4 5 6 GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC","132":"7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB"},E:{"1":"F G A B C K L H XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC","132":"7 I J E UC BC VC WC"},F:{"1":"8 9 O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n","16":"G eC","132":"B C H M N fC gC hC zB NC iC 0B"},G:{"1":"F nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC","132":"BC jC OC kC lC mC"},H:{"132":"5C"},I:{"1":"D AD BD","132":"4B I 6C 7C 8C 9C OC"},J:{"132":"E A"},K:{"1":"s","16":"A","132":"B C zB NC 0B"},L:{"1":"D"},M:{"1":"D"},N:{"1":"A B"},O:{"1":"1B"},P:{"1":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"1":"DC"},R:{"1":"OD"},S:{"1":"PD QD"}},B:4,C:"DOM Parsing and Serialization",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/zstd.js b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/zstd.js index 920a5ca2a90f3f..e9ad2a66b8c62b 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/zstd.js +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/data/features/zstd.js @@ -1 +1 @@ -module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","194":"6 D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z D 8B 9B AC RC SC"},D:{"2":"0 1 2 3 4 5 7 8 9 I J E F G A B C K L H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m s t u v w x y z","194":"6 D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H TC BC UC VC WC XC CC zB 0B DC YC ZC EC FC 1B aC 2B GC HC IC JC KC bC 3B LC MC cC"},F:{"2":"8 9 G B C H M N O n o p q AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB r uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m dC eC fC gC zB NC hC 0B"},G:{"2":"F BC iC OC jC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C EC FC 1B 2C 2B GC HC IC JC KC 3C 3B LC MC"},H:{"2":"4C"},I:{"2":"4B I D 5C 6C 7C 8C OC 9C AD"},J:{"2":"E A"},K:{"2":"A B C r zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I n o p q BD CD DD ED FD CC GD HD ID JD KD 2B 3B LD MD"},Q:{"2":"DC"},R:{"2":"ND"},S:{"2":"OD PD"}},B:6,C:"zstd (Zstandard) content-encoding",D:true}; +module.exports={A:{A:{"2":"J E F G A B PC"},B:{"2":"0 1 2 3 4 5 C K L H M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","194":"6 D"},C:{"2":"0 1 2 3 4 5 6 7 8 9 QC 4B I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z D 8B 9B AC RC SC TC"},D:{"2":"0 1 2 3 4 5 7 8 9 I J E F G A B C K L H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB 5B iB 6B jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R S T U V W X Y Z a b c d e f g h i j k l m n t u v w x y z","194":"6 D 8B 9B AC"},E:{"2":"7 I J E F G A B C K L H UC BC VC WC XC YC CC zB 0B DC ZC aC EC FC 1B bC 2B GC HC IC JC KC cC 3B LC MC dC"},F:{"2":"8 9 G B C H M N O o p q r AB BB CB DB EB FB GB HB IB JB KB LB MB NB OB PB QB RB SB TB UB VB WB XB YB ZB aB bB cB dB eB fB gB hB iB jB kB lB mB nB oB pB qB rB sB tB s uB vB wB xB yB P Q R 7B S T U V W X Y Z a b c d e f g h i j k l m n eC fC gC hC zB NC iC 0B"},G:{"2":"F BC jC OC kC lC mC nC oC pC qC rC sC tC uC vC wC xC yC zC 0C 1C 2C EC FC 1B 3C 2B GC HC IC JC KC 4C 3B LC MC"},H:{"2":"5C"},I:{"2":"4B I D 6C 7C 8C 9C OC AD BD"},J:{"2":"E A"},K:{"2":"A B C s zB NC 0B"},L:{"2":"D"},M:{"2":"D"},N:{"2":"A B"},O:{"2":"1B"},P:{"2":"I o p q r CD DD ED FD GD CC HD ID JD KD LD 2B 3B MD ND"},Q:{"2":"DC"},R:{"2":"OD"},S:{"2":"PD QD"}},B:6,C:"zstd (Zstandard) content-encoding",D:true}; diff --git a/tools/node_modules/eslint/node_modules/caniuse-lite/package.json b/tools/node_modules/eslint/node_modules/caniuse-lite/package.json index 1e61dfba23ccb9..c7d08b6197b210 100644 --- a/tools/node_modules/eslint/node_modules/caniuse-lite/package.json +++ b/tools/node_modules/eslint/node_modules/caniuse-lite/package.json @@ -1,6 +1,6 @@ { "name": "caniuse-lite", - "version": "1.0.30001561", + "version": "1.0.30001565", "description": "A smaller version of caniuse-db, with only the essentials!", "main": "dist/unpacker/index.js", "files": [ diff --git a/tools/node_modules/eslint/node_modules/comment-parser/package.json b/tools/node_modules/eslint/node_modules/comment-parser/package.json index 68080a65287a4a..f20c80355dbbba 100644 --- a/tools/node_modules/eslint/node_modules/comment-parser/package.json +++ b/tools/node_modules/eslint/node_modules/comment-parser/package.json @@ -1,6 +1,6 @@ { "name": "comment-parser", - "version": "1.4.0", + "version": "1.4.1", "description": "Generic JSDoc-like comment parser", "type": "module", "main": "lib/index.cjs", diff --git a/tools/node_modules/eslint/node_modules/electron-to-chromium/full-chromium-versions.js b/tools/node_modules/eslint/node_modules/electron-to-chromium/full-chromium-versions.js index 3a97ab6a3ae1f5..61dead4237d0b8 100644 --- a/tools/node_modules/eslint/node_modules/electron-to-chromium/full-chromium-versions.js +++ b/tools/node_modules/eslint/node_modules/electron-to-chromium/full-chromium-versions.js @@ -2632,7 +2632,11 @@ module.exports = { "25.9.0", "25.9.1", "25.9.2", - "25.9.3" + "25.9.3", + "25.9.4", + "25.9.5", + "25.9.6", + "25.9.7" ], "116.0.5791.0": [ "26.0.0-alpha.1", @@ -2735,7 +2739,11 @@ module.exports = { "26.4.0", "26.4.1", "26.4.2", - "26.4.3" + "26.4.3", + "26.5.0", + "26.6.0", + "26.6.1", + "26.6.2" ], "118.0.5949.0": [ "27.0.0-alpha.1", @@ -2832,6 +2840,16 @@ module.exports = { "118.0.5993.120": [ "27.0.3" ], + "118.0.5993.129": [ + "27.0.4" + ], + "118.0.5993.144": [ + "27.1.0", + "27.1.2" + ], + "118.0.5993.159": [ + "27.1.3" + ], "119.0.6045.0": [ "28.0.0-alpha.1", "28.0.0-alpha.2", @@ -2862,6 +2880,21 @@ module.exports = { "120.0.6099.0": [ "28.0.0-beta.2" ], + "120.0.6099.5": [ + "28.0.0-beta.3", + "28.0.0-beta.4" + ], + "120.0.6099.18": [ + "28.0.0-beta.5", + "28.0.0-beta.6", + "28.0.0-beta.7", + "28.0.0-beta.8", + "28.0.0-beta.9", + "28.0.0-beta.10" + ], + "120.0.6099.35": [ + "28.0.0-beta.11" + ], "118.0.5991.0": [ "28.0.0-nightly.20230906" ], @@ -2907,5 +2940,33 @@ module.exports = { "121.0.6100.0": [ "29.0.0-nightly.20231102", "29.0.0-nightly.20231103" + ], + "121.0.6104.0": [ + "29.0.0-nightly.20231106" + ], + "121.0.6110.0": [ + "29.0.0-nightly.20231107", + "29.0.0-nightly.20231108", + "29.0.0-nightly.20231109", + "29.0.0-nightly.20231110", + "29.0.0-nightly.20231113", + "29.0.0-nightly.20231114" + ], + "121.0.6116.0": [ + "29.0.0-nightly.20231115", + "29.0.0-nightly.20231116", + "29.0.0-nightly.20231117", + "29.0.0-nightly.20231120", + "29.0.0-nightly.20231121", + "29.0.0-nightly.20231122", + "29.0.0-nightly.20231123", + "29.0.0-nightly.20231124", + "29.0.0-nightly.20231127", + "29.0.0-nightly.20231128" + ], + "121.0.6147.0": [ + "29.0.0-nightly.20231129", + "29.0.0-nightly.20231130", + "29.0.0-nightly.20231201" ] }; \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/electron-to-chromium/full-chromium-versions.json b/tools/node_modules/eslint/node_modules/electron-to-chromium/full-chromium-versions.json index 6138c339f0a5e8..18389293fc9667 100644 --- a/tools/node_modules/eslint/node_modules/electron-to-chromium/full-chromium-versions.json +++ b/tools/node_modules/eslint/node_modules/electron-to-chromium/full-chromium-versions.json @@ -1 +1 @@ -{"39.0.2171.65":["0.20.0","0.20.1","0.20.2","0.20.3","0.20.4","0.20.5","0.20.6","0.20.7","0.20.8"],"40.0.2214.91":["0.21.0","0.21.1","0.21.2"],"41.0.2272.76":["0.21.3","0.22.1","0.22.2","0.22.3","0.23.0","0.24.0"],"42.0.2311.107":["0.25.0","0.25.1","0.25.2","0.25.3","0.26.0","0.26.1","0.27.0","0.27.1"],"43.0.2357.65":["0.27.2","0.27.3","0.28.0","0.28.1","0.28.2","0.28.3","0.29.1","0.29.2"],"44.0.2403.125":["0.30.4","0.31.0"],"45.0.2454.85":["0.31.2","0.32.2","0.32.3","0.33.0","0.33.1","0.33.2","0.33.3","0.33.4","0.33.6","0.33.7","0.33.8","0.33.9","0.34.0","0.34.1","0.34.2","0.34.3","0.34.4","0.35.1","0.35.2","0.35.3","0.35.4","0.35.5"],"47.0.2526.73":["0.36.0","0.36.2","0.36.3","0.36.4"],"47.0.2526.110":["0.36.5","0.36.6","0.36.7","0.36.8","0.36.9","0.36.10","0.36.11","0.36.12"],"49.0.2623.75":["0.37.0","0.37.1","0.37.3","0.37.4","0.37.5","0.37.6","0.37.7","0.37.8","1.0.0","1.0.1","1.0.2"],"50.0.2661.102":["1.1.0","1.1.1","1.1.2","1.1.3"],"51.0.2704.63":["1.2.0","1.2.1"],"51.0.2704.84":["1.2.2","1.2.3"],"51.0.2704.103":["1.2.4","1.2.5"],"51.0.2704.106":["1.2.6","1.2.7","1.2.8"],"52.0.2743.82":["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.9","1.3.10","1.3.13","1.3.14","1.3.15"],"53.0.2785.113":["1.4.0","1.4.1","1.4.2","1.4.3","1.4.4","1.4.5"],"53.0.2785.143":["1.4.6","1.4.7","1.4.8","1.4.10","1.4.11","1.4.13","1.4.14","1.4.15","1.4.16"],"54.0.2840.51":["1.4.12"],"54.0.2840.101":["1.5.0","1.5.1"],"56.0.2924.87":["1.6.0","1.6.1","1.6.2","1.6.3","1.6.4","1.6.5","1.6.6","1.6.7","1.6.8","1.6.9","1.6.10","1.6.11","1.6.12","1.6.13","1.6.14","1.6.15","1.6.16","1.6.17","1.6.18"],"58.0.3029.110":["1.7.0","1.7.1","1.7.2","1.7.3","1.7.4","1.7.5","1.7.6","1.7.7","1.7.8","1.7.9","1.7.10","1.7.11","1.7.12","1.7.13","1.7.14","1.7.15","1.7.16"],"59.0.3071.115":["1.8.0","1.8.1","1.8.2-beta.1","1.8.2-beta.2","1.8.2-beta.3","1.8.2-beta.4","1.8.2-beta.5","1.8.2","1.8.3","1.8.4","1.8.5","1.8.6","1.8.7","1.8.8"],"61.0.3163.100":["2.0.0-beta.1","2.0.0-beta.2","2.0.0-beta.3","2.0.0-beta.4","2.0.0-beta.5","2.0.0-beta.6","2.0.0-beta.7","2.0.0-beta.8","2.0.0","2.0.1","2.0.2","2.0.3","2.0.4","2.0.5","2.0.6","2.0.7","2.0.8-nightly.20180819","2.0.8-nightly.20180820","2.0.8","2.0.9","2.0.10","2.0.11","2.0.12","2.0.13","2.0.14","2.0.15","2.0.16","2.0.17","2.0.18","2.1.0-unsupported.20180809"],"66.0.3359.181":["3.0.0-beta.1","3.0.0-beta.2","3.0.0-beta.3","3.0.0-beta.4","3.0.0-beta.5","3.0.0-beta.6","3.0.0-beta.7","3.0.0-beta.8","3.0.0-beta.9","3.0.0-beta.10","3.0.0-beta.11","3.0.0-beta.12","3.0.0-beta.13","3.0.0-nightly.20180818","3.0.0-nightly.20180821","3.0.0-nightly.20180823","3.0.0-nightly.20180904","3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.0.5","3.0.6","3.0.7","3.0.8","3.0.9","3.0.10","3.0.11","3.0.12","3.0.13","3.0.14","3.0.15","3.0.16","3.1.0-beta.1","3.1.0-beta.2","3.1.0-beta.3","3.1.0-beta.4","3.1.0-beta.5","3.1.0","3.1.1","3.1.2","3.1.3","3.1.4","3.1.5","3.1.6","3.1.7","3.1.8","3.1.9","3.1.10","3.1.11","3.1.12","3.1.13","4.0.0-nightly.20180817","4.0.0-nightly.20180819","4.0.0-nightly.20180821"],"69.0.3497.106":["4.0.0-beta.1","4.0.0-beta.2","4.0.0-beta.3","4.0.0-beta.4","4.0.0-beta.5","4.0.0-beta.6","4.0.0-beta.7","4.0.0-beta.8","4.0.0-beta.9","4.0.0-beta.10","4.0.0-beta.11","4.0.0-nightly.20181010","4.0.0","4.0.1","4.0.2","4.0.3","4.0.4","4.0.5","4.0.6"],"67.0.3396.99":["4.0.0-nightly.20180929"],"68.0.3440.128":["4.0.0-nightly.20181006"],"69.0.3497.128":["4.0.7","4.0.8","4.1.0","4.1.1","4.1.2","4.1.3","4.1.4","4.1.5","4.2.0","4.2.1","4.2.2","4.2.3","4.2.4","4.2.5","4.2.6","4.2.7","4.2.8","4.2.9","4.2.10","4.2.11","4.2.12"],"72.0.3626.52":["5.0.0-beta.1","5.0.0-beta.2","6.0.0-nightly.20190123"],"73.0.3683.27":["5.0.0-beta.3"],"73.0.3683.54":["5.0.0-beta.4"],"73.0.3683.61":["5.0.0-beta.5"],"73.0.3683.84":["5.0.0-beta.6"],"73.0.3683.94":["5.0.0-beta.7"],"73.0.3683.104":["5.0.0-beta.8"],"73.0.3683.117":["5.0.0-beta.9"],"70.0.3538.110":["5.0.0-nightly.20190107"],"71.0.3578.98":["5.0.0-nightly.20190121","5.0.0-nightly.20190122"],"73.0.3683.119":["5.0.0"],"73.0.3683.121":["5.0.1","5.0.2","5.0.3","5.0.4","5.0.5","5.0.6","5.0.7","5.0.8","5.0.9","5.0.10","5.0.11","5.0.12","5.0.13"],"76.0.3774.1":["6.0.0-beta.1"],"76.0.3783.1":["6.0.0-beta.2","6.0.0-beta.3","6.0.0-beta.4"],"76.0.3805.4":["6.0.0-beta.5"],"76.0.3809.3":["6.0.0-beta.6"],"76.0.3809.22":["6.0.0-beta.7"],"76.0.3809.26":["6.0.0-beta.8","6.0.0-beta.9"],"76.0.3809.37":["6.0.0-beta.10"],"76.0.3809.42":["6.0.0-beta.11"],"76.0.3809.54":["6.0.0-beta.12"],"76.0.3809.60":["6.0.0-beta.13"],"76.0.3809.68":["6.0.0-beta.14"],"76.0.3809.74":["6.0.0-beta.15"],"72.0.3626.107":["6.0.0-nightly.20190212"],"72.0.3626.110":["6.0.0-nightly.20190213"],"74.0.3724.8":["6.0.0-nightly.20190311"],"76.0.3809.88":["6.0.0"],"76.0.3809.102":["6.0.1"],"76.0.3809.110":["6.0.2"],"76.0.3809.126":["6.0.3"],"76.0.3809.131":["6.0.4"],"76.0.3809.136":["6.0.5"],"76.0.3809.138":["6.0.6"],"76.0.3809.139":["6.0.7"],"76.0.3809.146":["6.0.8","6.0.9","6.0.10","6.0.11","6.0.12","6.1.0","6.1.1","6.1.2","6.1.3","6.1.4","6.1.5","6.1.6","6.1.7","6.1.8","6.1.9","6.1.10","6.1.11","6.1.12"],"78.0.3866.0":["7.0.0-beta.1","7.0.0-beta.2","7.0.0-beta.3","7.0.0-nightly.20190727","7.0.0-nightly.20190728","7.0.0-nightly.20190729","7.0.0-nightly.20190730","7.0.0-nightly.20190731","8.0.0-nightly.20190801","8.0.0-nightly.20190802"],"78.0.3896.6":["7.0.0-beta.4"],"78.0.3905.1":["7.0.0-beta.5","7.0.0-beta.6","7.0.0-beta.7","7.0.0"],"76.0.3784.0":["7.0.0-nightly.20190521"],"76.0.3806.0":["7.0.0-nightly.20190529","7.0.0-nightly.20190530","7.0.0-nightly.20190531","7.0.0-nightly.20190602","7.0.0-nightly.20190603"],"77.0.3814.0":["7.0.0-nightly.20190604"],"77.0.3815.0":["7.0.0-nightly.20190605","7.0.0-nightly.20190606","7.0.0-nightly.20190607","7.0.0-nightly.20190608","7.0.0-nightly.20190609","7.0.0-nightly.20190611","7.0.0-nightly.20190612","7.0.0-nightly.20190613","7.0.0-nightly.20190615","7.0.0-nightly.20190616","7.0.0-nightly.20190618","7.0.0-nightly.20190619","7.0.0-nightly.20190622","7.0.0-nightly.20190623","7.0.0-nightly.20190624","7.0.0-nightly.20190627","7.0.0-nightly.20190629","7.0.0-nightly.20190630","7.0.0-nightly.20190701","7.0.0-nightly.20190702"],"77.0.3843.0":["7.0.0-nightly.20190704","7.0.0-nightly.20190705"],"77.0.3848.0":["7.0.0-nightly.20190719","7.0.0-nightly.20190720","7.0.0-nightly.20190721"],"77.0.3864.0":["7.0.0-nightly.20190726"],"78.0.3904.92":["7.0.1"],"78.0.3904.94":["7.1.0"],"78.0.3904.99":["7.1.1"],"78.0.3904.113":["7.1.2"],"78.0.3904.126":["7.1.3"],"78.0.3904.130":["7.1.4","7.1.5","7.1.6","7.1.7","7.1.8","7.1.9","7.1.10","7.1.11","7.1.12","7.1.13","7.1.14","7.2.0","7.2.1","7.2.2","7.2.3","7.2.4","7.3.0","7.3.1","7.3.2","7.3.3"],"79.0.3931.0":["8.0.0-beta.1","8.0.0-beta.2","8.0.0-nightly.20191019","8.0.0-nightly.20191020","8.0.0-nightly.20191021","8.0.0-nightly.20191023"],"80.0.3955.0":["8.0.0-beta.3","8.0.0-beta.4"],"80.0.3987.14":["8.0.0-beta.5"],"80.0.3987.51":["8.0.0-beta.6"],"80.0.3987.59":["8.0.0-beta.7"],"80.0.3987.75":["8.0.0-beta.8","8.0.0-beta.9"],"78.0.3871.0":["8.0.0-nightly.20190803","8.0.0-nightly.20190806","8.0.0-nightly.20190807","8.0.0-nightly.20190808","8.0.0-nightly.20190809","8.0.0-nightly.20190810","8.0.0-nightly.20190811","8.0.0-nightly.20190812","8.0.0-nightly.20190813","8.0.0-nightly.20190814","8.0.0-nightly.20190815"],"78.0.3881.0":["8.0.0-nightly.20190816","8.0.0-nightly.20190817","8.0.0-nightly.20190818","8.0.0-nightly.20190819","8.0.0-nightly.20190820"],"78.0.3892.0":["8.0.0-nightly.20190824","8.0.0-nightly.20190825","8.0.0-nightly.20190827","8.0.0-nightly.20190828","8.0.0-nightly.20190830","8.0.0-nightly.20190901","8.0.0-nightly.20190902","8.0.0-nightly.20190907","8.0.0-nightly.20190909","8.0.0-nightly.20190910","8.0.0-nightly.20190911","8.0.0-nightly.20190912","8.0.0-nightly.20190913","8.0.0-nightly.20190914","8.0.0-nightly.20190915","8.0.0-nightly.20190917"],"79.0.3915.0":["8.0.0-nightly.20190919","8.0.0-nightly.20190920"],"79.0.3919.0":["8.0.0-nightly.20190922","8.0.0-nightly.20190923","8.0.0-nightly.20190924","8.0.0-nightly.20190926","8.0.0-nightly.20190928","8.0.0-nightly.20190929","8.0.0-nightly.20190930","8.0.0-nightly.20191001","8.0.0-nightly.20191004","8.0.0-nightly.20191005","8.0.0-nightly.20191006","8.0.0-nightly.20191009","8.0.0-nightly.20191011","8.0.0-nightly.20191012","8.0.0-nightly.20191017"],"80.0.3952.0":["8.0.0-nightly.20191101","8.0.0-nightly.20191103","8.0.0-nightly.20191105"],"80.0.3987.86":["8.0.0","8.0.1","8.0.2"],"80.0.3987.134":["8.0.3"],"80.0.3987.137":["8.1.0"],"80.0.3987.141":["8.1.1"],"80.0.3987.158":["8.2.0"],"80.0.3987.163":["8.2.1","8.2.2","8.2.3","8.5.3","8.5.4","8.5.5"],"80.0.3987.165":["8.2.4","8.2.5","8.3.0","8.3.1","8.3.2","8.3.3","8.3.4","8.4.0","8.4.1","8.5.0","8.5.1","8.5.2"],"82.0.4048.0":["9.0.0-beta.1","9.0.0-beta.2","9.0.0-beta.3","9.0.0-beta.4","9.0.0-beta.5"],"82.0.4058.2":["9.0.0-beta.6","9.0.0-beta.7","9.0.0-beta.9"],"82.0.4085.10":["9.0.0-beta.10"],"82.0.4085.14":["9.0.0-beta.11","9.0.0-beta.12","9.0.0-beta.13"],"82.0.4085.27":["9.0.0-beta.14"],"83.0.4102.3":["9.0.0-beta.15","9.0.0-beta.16"],"83.0.4103.14":["9.0.0-beta.17"],"83.0.4103.16":["9.0.0-beta.18"],"83.0.4103.24":["9.0.0-beta.19"],"83.0.4103.26":["9.0.0-beta.20","9.0.0-beta.21"],"83.0.4103.34":["9.0.0-beta.22"],"83.0.4103.44":["9.0.0-beta.23"],"83.0.4103.45":["9.0.0-beta.24"],"80.0.3954.0":["9.0.0-nightly.20191121","9.0.0-nightly.20191122","9.0.0-nightly.20191123","9.0.0-nightly.20191124","9.0.0-nightly.20191126","9.0.0-nightly.20191128","9.0.0-nightly.20191129","9.0.0-nightly.20191130","9.0.0-nightly.20191201","9.0.0-nightly.20191202","9.0.0-nightly.20191203","9.0.0-nightly.20191204","9.0.0-nightly.20191205","9.0.0-nightly.20191210"],"81.0.3994.0":["9.0.0-nightly.20191220","9.0.0-nightly.20191221","9.0.0-nightly.20191222","9.0.0-nightly.20191223","9.0.0-nightly.20191224","9.0.0-nightly.20191225","9.0.0-nightly.20191226","9.0.0-nightly.20191228","9.0.0-nightly.20191229","9.0.0-nightly.20191230","9.0.0-nightly.20191231","9.0.0-nightly.20200101","9.0.0-nightly.20200103","9.0.0-nightly.20200104","9.0.0-nightly.20200105","9.0.0-nightly.20200106","9.0.0-nightly.20200108","9.0.0-nightly.20200109","9.0.0-nightly.20200110","9.0.0-nightly.20200111","9.0.0-nightly.20200113","9.0.0-nightly.20200115","9.0.0-nightly.20200116","9.0.0-nightly.20200117"],"81.0.4030.0":["9.0.0-nightly.20200119","9.0.0-nightly.20200121"],"83.0.4103.64":["9.0.0"],"83.0.4103.94":["9.0.1","9.0.2"],"83.0.4103.100":["9.0.3"],"83.0.4103.104":["9.0.4"],"83.0.4103.119":["9.0.5"],"83.0.4103.122":["9.1.0","9.1.1","9.1.2","9.2.0","9.2.1","9.3.0","9.3.1","9.3.2","9.3.3","9.3.4","9.3.5","9.4.0","9.4.1","9.4.2","9.4.3","9.4.4"],"84.0.4129.0":["10.0.0-beta.1","10.0.0-beta.2","10.0.0-nightly.20200501","10.0.0-nightly.20200504","10.0.0-nightly.20200505","10.0.0-nightly.20200506","10.0.0-nightly.20200507","10.0.0-nightly.20200508","10.0.0-nightly.20200511","10.0.0-nightly.20200512","10.0.0-nightly.20200513","10.0.0-nightly.20200514","10.0.0-nightly.20200515","10.0.0-nightly.20200518","10.0.0-nightly.20200519","10.0.0-nightly.20200520","10.0.0-nightly.20200521","11.0.0-nightly.20200525","11.0.0-nightly.20200526"],"85.0.4161.2":["10.0.0-beta.3","10.0.0-beta.4"],"85.0.4181.1":["10.0.0-beta.8","10.0.0-beta.9"],"85.0.4183.19":["10.0.0-beta.10"],"85.0.4183.20":["10.0.0-beta.11"],"85.0.4183.26":["10.0.0-beta.12"],"85.0.4183.39":["10.0.0-beta.13","10.0.0-beta.14","10.0.0-beta.15","10.0.0-beta.17","10.0.0-beta.19","10.0.0-beta.20","10.0.0-beta.21"],"85.0.4183.70":["10.0.0-beta.23"],"85.0.4183.78":["10.0.0-beta.24"],"85.0.4183.80":["10.0.0-beta.25"],"82.0.4050.0":["10.0.0-nightly.20200209","10.0.0-nightly.20200210","10.0.0-nightly.20200211","10.0.0-nightly.20200216","10.0.0-nightly.20200217","10.0.0-nightly.20200218","10.0.0-nightly.20200221","10.0.0-nightly.20200222","10.0.0-nightly.20200223","10.0.0-nightly.20200226","10.0.0-nightly.20200303"],"82.0.4076.0":["10.0.0-nightly.20200304","10.0.0-nightly.20200305","10.0.0-nightly.20200306","10.0.0-nightly.20200309","10.0.0-nightly.20200310"],"82.0.4083.0":["10.0.0-nightly.20200311"],"83.0.4086.0":["10.0.0-nightly.20200316"],"83.0.4087.0":["10.0.0-nightly.20200317","10.0.0-nightly.20200318","10.0.0-nightly.20200320","10.0.0-nightly.20200323","10.0.0-nightly.20200324","10.0.0-nightly.20200325","10.0.0-nightly.20200326","10.0.0-nightly.20200327","10.0.0-nightly.20200330","10.0.0-nightly.20200331","10.0.0-nightly.20200401","10.0.0-nightly.20200402","10.0.0-nightly.20200403","10.0.0-nightly.20200406"],"83.0.4095.0":["10.0.0-nightly.20200408","10.0.0-nightly.20200410","10.0.0-nightly.20200413"],"84.0.4114.0":["10.0.0-nightly.20200414"],"84.0.4115.0":["10.0.0-nightly.20200415","10.0.0-nightly.20200416","10.0.0-nightly.20200417"],"84.0.4121.0":["10.0.0-nightly.20200422","10.0.0-nightly.20200423"],"84.0.4125.0":["10.0.0-nightly.20200427","10.0.0-nightly.20200428","10.0.0-nightly.20200429","10.0.0-nightly.20200430"],"85.0.4183.84":["10.0.0"],"85.0.4183.86":["10.0.1"],"85.0.4183.87":["10.1.0"],"85.0.4183.93":["10.1.1"],"85.0.4183.98":["10.1.2"],"85.0.4183.121":["10.1.3","10.1.4","10.1.5","10.1.6","10.1.7","10.2.0","10.3.0","10.3.1","10.3.2","10.4.0","10.4.1","10.4.2","10.4.3","10.4.4","10.4.5","10.4.6","10.4.7"],"86.0.4234.0":["11.0.0-beta.1","11.0.0-beta.3","11.0.0-beta.4","11.0.0-beta.5","11.0.0-beta.6","11.0.0-beta.7","11.0.0-nightly.20200822","11.0.0-nightly.20200824","11.0.0-nightly.20200825","11.0.0-nightly.20200826","12.0.0-nightly.20200827","12.0.0-nightly.20200831","12.0.0-nightly.20200902","12.0.0-nightly.20200903","12.0.0-nightly.20200907","12.0.0-nightly.20200910","12.0.0-nightly.20200911","12.0.0-nightly.20200914"],"87.0.4251.1":["11.0.0-beta.8","11.0.0-beta.9","11.0.0-beta.11"],"87.0.4280.11":["11.0.0-beta.12","11.0.0-beta.13"],"87.0.4280.27":["11.0.0-beta.16","11.0.0-beta.17","11.0.0-beta.18","11.0.0-beta.19"],"87.0.4280.40":["11.0.0-beta.20"],"87.0.4280.47":["11.0.0-beta.22","11.0.0-beta.23"],"85.0.4156.0":["11.0.0-nightly.20200529"],"85.0.4162.0":["11.0.0-nightly.20200602","11.0.0-nightly.20200603","11.0.0-nightly.20200604","11.0.0-nightly.20200609","11.0.0-nightly.20200610","11.0.0-nightly.20200611","11.0.0-nightly.20200615","11.0.0-nightly.20200616","11.0.0-nightly.20200617","11.0.0-nightly.20200618","11.0.0-nightly.20200619"],"85.0.4179.0":["11.0.0-nightly.20200701","11.0.0-nightly.20200702","11.0.0-nightly.20200703","11.0.0-nightly.20200706","11.0.0-nightly.20200707","11.0.0-nightly.20200708","11.0.0-nightly.20200709"],"86.0.4203.0":["11.0.0-nightly.20200716","11.0.0-nightly.20200717","11.0.0-nightly.20200720","11.0.0-nightly.20200721"],"86.0.4209.0":["11.0.0-nightly.20200723","11.0.0-nightly.20200724","11.0.0-nightly.20200729","11.0.0-nightly.20200730","11.0.0-nightly.20200731","11.0.0-nightly.20200803","11.0.0-nightly.20200804","11.0.0-nightly.20200805","11.0.0-nightly.20200811","11.0.0-nightly.20200812"],"87.0.4280.60":["11.0.0","11.0.1"],"87.0.4280.67":["11.0.2","11.0.3","11.0.4"],"87.0.4280.88":["11.0.5","11.1.0","11.1.1"],"87.0.4280.141":["11.2.0","11.2.1","11.2.2","11.2.3","11.3.0","11.4.0","11.4.1","11.4.2","11.4.3","11.4.4","11.4.5","11.4.6","11.4.7","11.4.8","11.4.9","11.4.10","11.4.11","11.4.12","11.5.0"],"89.0.4328.0":["12.0.0-beta.1","12.0.0-beta.3","12.0.0-beta.4","12.0.0-beta.5","12.0.0-beta.6","12.0.0-beta.7","12.0.0-beta.8","12.0.0-beta.9","12.0.0-beta.10","12.0.0-beta.11","12.0.0-beta.12","12.0.0-beta.14","13.0.0-nightly.20201119","13.0.0-nightly.20201123","13.0.0-nightly.20201124","13.0.0-nightly.20201126","13.0.0-nightly.20201127","13.0.0-nightly.20201130","13.0.0-nightly.20201201","13.0.0-nightly.20201202","13.0.0-nightly.20201203","13.0.0-nightly.20201204","13.0.0-nightly.20201207","13.0.0-nightly.20201208","13.0.0-nightly.20201209","13.0.0-nightly.20201210","13.0.0-nightly.20201211","13.0.0-nightly.20201214"],"89.0.4348.1":["12.0.0-beta.16","12.0.0-beta.18","12.0.0-beta.19","12.0.0-beta.20"],"89.0.4388.2":["12.0.0-beta.21","12.0.0-beta.22","12.0.0-beta.23","12.0.0-beta.24","12.0.0-beta.25","12.0.0-beta.26"],"89.0.4389.23":["12.0.0-beta.27","12.0.0-beta.28","12.0.0-beta.29"],"89.0.4389.58":["12.0.0-beta.30","12.0.0-beta.31"],"87.0.4268.0":["12.0.0-nightly.20201002","12.0.0-nightly.20201007","12.0.0-nightly.20201009","12.0.0-nightly.20201012","12.0.0-nightly.20201013","12.0.0-nightly.20201014","12.0.0-nightly.20201015"],"88.0.4292.0":["12.0.0-nightly.20201023","12.0.0-nightly.20201026"],"88.0.4306.0":["12.0.0-nightly.20201030","12.0.0-nightly.20201102","12.0.0-nightly.20201103","12.0.0-nightly.20201104","12.0.0-nightly.20201105","12.0.0-nightly.20201106","12.0.0-nightly.20201111","12.0.0-nightly.20201112"],"88.0.4324.0":["12.0.0-nightly.20201116"],"89.0.4389.69":["12.0.0"],"89.0.4389.82":["12.0.1"],"89.0.4389.90":["12.0.2"],"89.0.4389.114":["12.0.3","12.0.4"],"89.0.4389.128":["12.0.5","12.0.6","12.0.7","12.0.8","12.0.9","12.0.10","12.0.11","12.0.12","12.0.13","12.0.14","12.0.15","12.0.16","12.0.17","12.0.18","12.1.0","12.1.1","12.1.2","12.2.0","12.2.1","12.2.2","12.2.3"],"90.0.4402.0":["13.0.0-beta.2","13.0.0-beta.3","13.0.0-nightly.20210210","13.0.0-nightly.20210211","13.0.0-nightly.20210212","13.0.0-nightly.20210216","13.0.0-nightly.20210217","13.0.0-nightly.20210218","13.0.0-nightly.20210219","13.0.0-nightly.20210222","13.0.0-nightly.20210225","13.0.0-nightly.20210226","13.0.0-nightly.20210301","13.0.0-nightly.20210302","13.0.0-nightly.20210303","14.0.0-nightly.20210304"],"90.0.4415.0":["13.0.0-beta.4","13.0.0-beta.5","13.0.0-beta.6","13.0.0-beta.7","13.0.0-beta.8","13.0.0-beta.9","13.0.0-beta.10","13.0.0-beta.11","13.0.0-beta.12","13.0.0-beta.13","14.0.0-nightly.20210305","14.0.0-nightly.20210308","14.0.0-nightly.20210309","14.0.0-nightly.20210311","14.0.0-nightly.20210315","14.0.0-nightly.20210316","14.0.0-nightly.20210317","14.0.0-nightly.20210318","14.0.0-nightly.20210319","14.0.0-nightly.20210323","14.0.0-nightly.20210324","14.0.0-nightly.20210325","14.0.0-nightly.20210326","14.0.0-nightly.20210329","14.0.0-nightly.20210330"],"91.0.4448.0":["13.0.0-beta.14","13.0.0-beta.16","13.0.0-beta.17","13.0.0-beta.18","13.0.0-beta.20","14.0.0-nightly.20210331","14.0.0-nightly.20210401","14.0.0-nightly.20210402","14.0.0-nightly.20210406","14.0.0-nightly.20210407","14.0.0-nightly.20210408","14.0.0-nightly.20210409","14.0.0-nightly.20210413"],"91.0.4472.33":["13.0.0-beta.21","13.0.0-beta.22","13.0.0-beta.23"],"91.0.4472.38":["13.0.0-beta.24","13.0.0-beta.25","13.0.0-beta.26","13.0.0-beta.27","13.0.0-beta.28"],"89.0.4349.0":["13.0.0-nightly.20201215","13.0.0-nightly.20201216","13.0.0-nightly.20201221","13.0.0-nightly.20201222"],"89.0.4359.0":["13.0.0-nightly.20201223","13.0.0-nightly.20210104","13.0.0-nightly.20210108","13.0.0-nightly.20210111"],"89.0.4386.0":["13.0.0-nightly.20210113","13.0.0-nightly.20210114","13.0.0-nightly.20210118","13.0.0-nightly.20210122","13.0.0-nightly.20210125"],"89.0.4389.0":["13.0.0-nightly.20210127","13.0.0-nightly.20210128","13.0.0-nightly.20210129","13.0.0-nightly.20210201","13.0.0-nightly.20210202","13.0.0-nightly.20210203","13.0.0-nightly.20210205","13.0.0-nightly.20210208","13.0.0-nightly.20210209"],"91.0.4472.69":["13.0.0","13.0.1"],"91.0.4472.77":["13.1.0","13.1.1","13.1.2"],"91.0.4472.106":["13.1.3","13.1.4"],"91.0.4472.124":["13.1.5","13.1.6","13.1.7"],"91.0.4472.164":["13.1.8","13.1.9","13.2.0","13.2.1","13.2.2","13.2.3","13.3.0","13.4.0","13.5.0","13.5.1","13.5.2","13.6.0","13.6.1","13.6.2","13.6.3","13.6.6","13.6.7","13.6.8","13.6.9"],"92.0.4511.0":["14.0.0-beta.1","14.0.0-beta.2","14.0.0-beta.3","14.0.0-nightly.20210520","14.0.0-nightly.20210523","14.0.0-nightly.20210524","15.0.0-nightly.20210527","15.0.0-nightly.20210528","15.0.0-nightly.20210531","15.0.0-nightly.20210601","15.0.0-nightly.20210602"],"93.0.4536.0":["14.0.0-beta.5","14.0.0-beta.6","14.0.0-beta.7","14.0.0-beta.8","15.0.0-nightly.20210609","15.0.0-nightly.20210610","15.0.0-nightly.20210611","15.0.0-nightly.20210614","15.0.0-nightly.20210615","15.0.0-nightly.20210616"],"93.0.4539.0":["14.0.0-beta.9","14.0.0-beta.10","15.0.0-nightly.20210617","15.0.0-nightly.20210618","15.0.0-nightly.20210621","15.0.0-nightly.20210622"],"93.0.4557.4":["14.0.0-beta.11","14.0.0-beta.12"],"93.0.4566.0":["14.0.0-beta.13","14.0.0-beta.14","14.0.0-beta.15","14.0.0-beta.16","14.0.0-beta.17","15.0.0-alpha.1","15.0.0-alpha.2","15.0.0-nightly.20210706","15.0.0-nightly.20210707","15.0.0-nightly.20210708","15.0.0-nightly.20210709","15.0.0-nightly.20210712","15.0.0-nightly.20210713","15.0.0-nightly.20210714","15.0.0-nightly.20210715","15.0.0-nightly.20210716","15.0.0-nightly.20210719","15.0.0-nightly.20210720","15.0.0-nightly.20210721","16.0.0-nightly.20210722","16.0.0-nightly.20210723","16.0.0-nightly.20210726"],"93.0.4577.15":["14.0.0-beta.18","14.0.0-beta.19","14.0.0-beta.20","14.0.0-beta.21"],"93.0.4577.25":["14.0.0-beta.22","14.0.0-beta.23"],"93.0.4577.51":["14.0.0-beta.24","14.0.0-beta.25"],"92.0.4475.0":["14.0.0-nightly.20210426","14.0.0-nightly.20210427"],"92.0.4488.0":["14.0.0-nightly.20210430","14.0.0-nightly.20210503"],"92.0.4496.0":["14.0.0-nightly.20210505"],"92.0.4498.0":["14.0.0-nightly.20210506"],"92.0.4499.0":["14.0.0-nightly.20210507","14.0.0-nightly.20210510","14.0.0-nightly.20210511","14.0.0-nightly.20210512","14.0.0-nightly.20210513"],"92.0.4505.0":["14.0.0-nightly.20210514","14.0.0-nightly.20210517","14.0.0-nightly.20210518","14.0.0-nightly.20210519"],"93.0.4577.58":["14.0.0"],"93.0.4577.63":["14.0.1"],"93.0.4577.82":["14.0.2","14.1.0","14.1.1","14.2.0","14.2.1","14.2.2","14.2.3","14.2.4","14.2.5","14.2.6","14.2.7","14.2.8","14.2.9"],"94.0.4584.0":["15.0.0-alpha.3","15.0.0-alpha.4","15.0.0-alpha.5","15.0.0-alpha.6","16.0.0-nightly.20210727","16.0.0-nightly.20210728","16.0.0-nightly.20210729","16.0.0-nightly.20210730","16.0.0-nightly.20210802","16.0.0-nightly.20210803","16.0.0-nightly.20210804","16.0.0-nightly.20210805","16.0.0-nightly.20210806","16.0.0-nightly.20210809","16.0.0-nightly.20210810","16.0.0-nightly.20210811"],"94.0.4590.2":["15.0.0-alpha.7","15.0.0-alpha.8","15.0.0-alpha.9","16.0.0-nightly.20210812","16.0.0-nightly.20210813","16.0.0-nightly.20210816","16.0.0-nightly.20210817","16.0.0-nightly.20210818","16.0.0-nightly.20210819","16.0.0-nightly.20210820","16.0.0-nightly.20210823"],"94.0.4606.12":["15.0.0-alpha.10"],"94.0.4606.20":["15.0.0-beta.1","15.0.0-beta.2"],"94.0.4606.31":["15.0.0-beta.3","15.0.0-beta.4","15.0.0-beta.5","15.0.0-beta.6","15.0.0-beta.7"],"93.0.4530.0":["15.0.0-nightly.20210603","15.0.0-nightly.20210604"],"93.0.4535.0":["15.0.0-nightly.20210608"],"93.0.4550.0":["15.0.0-nightly.20210623","15.0.0-nightly.20210624"],"93.0.4552.0":["15.0.0-nightly.20210625","15.0.0-nightly.20210628","15.0.0-nightly.20210629"],"93.0.4558.0":["15.0.0-nightly.20210630","15.0.0-nightly.20210701","15.0.0-nightly.20210702","15.0.0-nightly.20210705"],"94.0.4606.51":["15.0.0"],"94.0.4606.61":["15.1.0","15.1.1"],"94.0.4606.71":["15.1.2"],"94.0.4606.81":["15.2.0","15.3.0","15.3.1","15.3.2","15.3.3","15.3.4","15.3.5","15.3.6","15.3.7","15.4.0","15.4.1","15.4.2","15.5.0","15.5.1","15.5.2","15.5.3","15.5.4","15.5.5","15.5.6","15.5.7"],"95.0.4629.0":["16.0.0-alpha.1","16.0.0-alpha.2","16.0.0-alpha.3","16.0.0-alpha.4","16.0.0-alpha.5","16.0.0-alpha.6","16.0.0-alpha.7","16.0.0-nightly.20210902","16.0.0-nightly.20210903","16.0.0-nightly.20210906","16.0.0-nightly.20210907","16.0.0-nightly.20210908","16.0.0-nightly.20210909","16.0.0-nightly.20210910","16.0.0-nightly.20210913","16.0.0-nightly.20210914","16.0.0-nightly.20210915","16.0.0-nightly.20210916","16.0.0-nightly.20210917","16.0.0-nightly.20210920","16.0.0-nightly.20210921","16.0.0-nightly.20210922","17.0.0-nightly.20210923","17.0.0-nightly.20210924","17.0.0-nightly.20210927","17.0.0-nightly.20210928","17.0.0-nightly.20210929","17.0.0-nightly.20210930","17.0.0-nightly.20211001","17.0.0-nightly.20211004","17.0.0-nightly.20211005"],"96.0.4647.0":["16.0.0-alpha.8","16.0.0-alpha.9","16.0.0-beta.1","16.0.0-beta.2","16.0.0-beta.3","17.0.0-nightly.20211006","17.0.0-nightly.20211007","17.0.0-nightly.20211008","17.0.0-nightly.20211011","17.0.0-nightly.20211012","17.0.0-nightly.20211013","17.0.0-nightly.20211014","17.0.0-nightly.20211015","17.0.0-nightly.20211018","17.0.0-nightly.20211019","17.0.0-nightly.20211020","17.0.0-nightly.20211021"],"96.0.4664.18":["16.0.0-beta.4","16.0.0-beta.5"],"96.0.4664.27":["16.0.0-beta.6","16.0.0-beta.7"],"96.0.4664.35":["16.0.0-beta.8","16.0.0-beta.9"],"95.0.4612.5":["16.0.0-nightly.20210824","16.0.0-nightly.20210825","16.0.0-nightly.20210826","16.0.0-nightly.20210827","16.0.0-nightly.20210830","16.0.0-nightly.20210831","16.0.0-nightly.20210901"],"96.0.4664.45":["16.0.0","16.0.1"],"96.0.4664.55":["16.0.2","16.0.3","16.0.4","16.0.5"],"96.0.4664.110":["16.0.6","16.0.7","16.0.8"],"96.0.4664.174":["16.0.9","16.0.10","16.1.0","16.1.1","16.2.0","16.2.1","16.2.2","16.2.3","16.2.4","16.2.5","16.2.6","16.2.7","16.2.8"],"96.0.4664.4":["17.0.0-alpha.1","17.0.0-alpha.2","17.0.0-alpha.3","17.0.0-nightly.20211022","17.0.0-nightly.20211025","17.0.0-nightly.20211026","17.0.0-nightly.20211027","17.0.0-nightly.20211028","17.0.0-nightly.20211029","17.0.0-nightly.20211101","17.0.0-nightly.20211102","17.0.0-nightly.20211103","17.0.0-nightly.20211104","17.0.0-nightly.20211105","17.0.0-nightly.20211108","17.0.0-nightly.20211109","17.0.0-nightly.20211110","17.0.0-nightly.20211111","17.0.0-nightly.20211112","17.0.0-nightly.20211115","17.0.0-nightly.20211116","17.0.0-nightly.20211117","18.0.0-nightly.20211118","18.0.0-nightly.20211119","18.0.0-nightly.20211122","18.0.0-nightly.20211123"],"98.0.4706.0":["17.0.0-alpha.4","17.0.0-alpha.5","17.0.0-alpha.6","17.0.0-beta.1","17.0.0-beta.2","18.0.0-nightly.20211124","18.0.0-nightly.20211125","18.0.0-nightly.20211126","18.0.0-nightly.20211129","18.0.0-nightly.20211130","18.0.0-nightly.20211201","18.0.0-nightly.20211202","18.0.0-nightly.20211203","18.0.0-nightly.20211206","18.0.0-nightly.20211207","18.0.0-nightly.20211208","18.0.0-nightly.20211209","18.0.0-nightly.20211210","18.0.0-nightly.20211213","18.0.0-nightly.20211214","18.0.0-nightly.20211215","18.0.0-nightly.20211216","18.0.0-nightly.20211217","18.0.0-nightly.20211220","18.0.0-nightly.20211221","18.0.0-nightly.20211222","18.0.0-nightly.20211223","18.0.0-nightly.20211228","18.0.0-nightly.20211229","18.0.0-nightly.20211231","18.0.0-nightly.20220103","18.0.0-nightly.20220104","18.0.0-nightly.20220105","18.0.0-nightly.20220106","18.0.0-nightly.20220107","18.0.0-nightly.20220110"],"98.0.4758.9":["17.0.0-beta.3"],"98.0.4758.11":["17.0.0-beta.4","17.0.0-beta.5","17.0.0-beta.6","17.0.0-beta.7","17.0.0-beta.8","17.0.0-beta.9"],"98.0.4758.74":["17.0.0"],"98.0.4758.82":["17.0.1"],"98.0.4758.102":["17.1.0"],"98.0.4758.109":["17.1.1","17.1.2","17.2.0"],"98.0.4758.141":["17.3.0","17.3.1","17.4.0","17.4.1","17.4.2","17.4.3","17.4.4","17.4.5","17.4.6","17.4.7","17.4.8","17.4.9","17.4.10","17.4.11"],"99.0.4767.0":["18.0.0-alpha.1","18.0.0-alpha.2","18.0.0-alpha.3","18.0.0-alpha.4","18.0.0-alpha.5","18.0.0-nightly.20220111","18.0.0-nightly.20220112","18.0.0-nightly.20220113","18.0.0-nightly.20220114","18.0.0-nightly.20220117","18.0.0-nightly.20220118","18.0.0-nightly.20220119","18.0.0-nightly.20220121","18.0.0-nightly.20220124","18.0.0-nightly.20220125","18.0.0-nightly.20220127","18.0.0-nightly.20220128","18.0.0-nightly.20220131","18.0.0-nightly.20220201","19.0.0-nightly.20220202","19.0.0-nightly.20220203","19.0.0-nightly.20220204","19.0.0-nightly.20220207","19.0.0-nightly.20220208","19.0.0-nightly.20220209"],"100.0.4894.0":["18.0.0-beta.1","18.0.0-beta.2","18.0.0-beta.3","18.0.0-beta.4","18.0.0-beta.5","18.0.0-beta.6","19.0.0-nightly.20220308","19.0.0-nightly.20220309","19.0.0-nightly.20220310","19.0.0-nightly.20220311","19.0.0-nightly.20220314","19.0.0-nightly.20220315","19.0.0-nightly.20220316","19.0.0-nightly.20220317","19.0.0-nightly.20220318","19.0.0-nightly.20220321","19.0.0-nightly.20220322","19.0.0-nightly.20220323","19.0.0-nightly.20220324"],"100.0.4896.56":["18.0.0"],"100.0.4896.60":["18.0.1","18.0.2"],"100.0.4896.75":["18.0.3","18.0.4"],"100.0.4896.127":["18.1.0"],"100.0.4896.143":["18.2.0","18.2.1","18.2.2","18.2.3"],"100.0.4896.160":["18.2.4","18.3.0","18.3.1","18.3.2","18.3.3","18.3.4","18.3.5","18.3.6","18.3.7","18.3.8","18.3.9","18.3.11","18.3.12","18.3.13","18.3.14","18.3.15"],"102.0.4962.3":["19.0.0-alpha.1","19.0.0-nightly.20220328","19.0.0-nightly.20220329","20.0.0-nightly.20220330"],"102.0.4971.0":["19.0.0-alpha.2","19.0.0-alpha.3","20.0.0-nightly.20220411"],"102.0.4989.0":["19.0.0-alpha.4","19.0.0-alpha.5","20.0.0-nightly.20220414","20.0.0-nightly.20220415","20.0.0-nightly.20220418","20.0.0-nightly.20220419","20.0.0-nightly.20220420","20.0.0-nightly.20220421"],"102.0.4999.0":["19.0.0-beta.1","19.0.0-beta.2","19.0.0-beta.3","20.0.0-nightly.20220425","20.0.0-nightly.20220426","20.0.0-nightly.20220427","20.0.0-nightly.20220428","20.0.0-nightly.20220429","20.0.0-nightly.20220502","20.0.0-nightly.20220503","20.0.0-nightly.20220504","20.0.0-nightly.20220505","20.0.0-nightly.20220506","20.0.0-nightly.20220509","20.0.0-nightly.20220511","20.0.0-nightly.20220512","20.0.0-nightly.20220513","20.0.0-nightly.20220516","20.0.0-nightly.20220517"],"102.0.5005.27":["19.0.0-beta.4"],"102.0.5005.40":["19.0.0-beta.5","19.0.0-beta.6","19.0.0-beta.7"],"102.0.5005.49":["19.0.0-beta.8"],"102.0.4961.0":["19.0.0-nightly.20220325"],"102.0.5005.61":["19.0.0","19.0.1"],"102.0.5005.63":["19.0.2","19.0.3","19.0.4"],"102.0.5005.115":["19.0.5","19.0.6"],"102.0.5005.134":["19.0.7"],"102.0.5005.148":["19.0.8"],"102.0.5005.167":["19.0.9","19.0.10","19.0.11","19.0.12","19.0.13","19.0.14","19.0.15","19.0.16","19.0.17","19.1.0","19.1.1","19.1.2","19.1.3","19.1.4","19.1.5","19.1.6","19.1.7","19.1.8","19.1.9"],"103.0.5044.0":["20.0.0-alpha.1","20.0.0-nightly.20220518","20.0.0-nightly.20220519","20.0.0-nightly.20220520","20.0.0-nightly.20220523","20.0.0-nightly.20220524","21.0.0-nightly.20220526","21.0.0-nightly.20220527","21.0.0-nightly.20220530","21.0.0-nightly.20220531"],"104.0.5073.0":["20.0.0-alpha.2","20.0.0-alpha.3","20.0.0-alpha.4","20.0.0-alpha.5","20.0.0-alpha.6","20.0.0-alpha.7","20.0.0-beta.1","20.0.0-beta.2","20.0.0-beta.3","20.0.0-beta.4","20.0.0-beta.5","20.0.0-beta.6","20.0.0-beta.7","20.0.0-beta.8","21.0.0-nightly.20220602","21.0.0-nightly.20220603","21.0.0-nightly.20220606","21.0.0-nightly.20220607","21.0.0-nightly.20220608","21.0.0-nightly.20220609","21.0.0-nightly.20220610","21.0.0-nightly.20220613","21.0.0-nightly.20220614","21.0.0-nightly.20220615","21.0.0-nightly.20220616","21.0.0-nightly.20220617","21.0.0-nightly.20220620","21.0.0-nightly.20220621","21.0.0-nightly.20220622","21.0.0-nightly.20220623","21.0.0-nightly.20220624","21.0.0-nightly.20220627"],"104.0.5112.39":["20.0.0-beta.9"],"104.0.5112.48":["20.0.0-beta.10","20.0.0-beta.11","20.0.0-beta.12"],"104.0.5112.57":["20.0.0-beta.13"],"104.0.5112.65":["20.0.0"],"104.0.5112.81":["20.0.1","20.0.2","20.0.3"],"104.0.5112.102":["20.1.0","20.1.1"],"104.0.5112.114":["20.1.2","20.1.3","20.1.4"],"104.0.5112.124":["20.2.0","20.3.0","20.3.1","20.3.2","20.3.3","20.3.4","20.3.5","20.3.6","20.3.7","20.3.8","20.3.9","20.3.10","20.3.11","20.3.12"],"105.0.5187.0":["21.0.0-alpha.1","21.0.0-alpha.2","21.0.0-alpha.3","21.0.0-alpha.4","21.0.0-alpha.5","21.0.0-nightly.20220720","21.0.0-nightly.20220721","21.0.0-nightly.20220722","21.0.0-nightly.20220725","21.0.0-nightly.20220726","21.0.0-nightly.20220727","21.0.0-nightly.20220728","21.0.0-nightly.20220801","21.0.0-nightly.20220802","22.0.0-nightly.20220808","22.0.0-nightly.20220809","22.0.0-nightly.20220810","22.0.0-nightly.20220811","22.0.0-nightly.20220812","22.0.0-nightly.20220815","22.0.0-nightly.20220816","22.0.0-nightly.20220817"],"106.0.5216.0":["21.0.0-alpha.6","21.0.0-beta.1","21.0.0-beta.2","21.0.0-beta.3","21.0.0-beta.4","21.0.0-beta.5","22.0.0-nightly.20220822","22.0.0-nightly.20220823","22.0.0-nightly.20220824","22.0.0-nightly.20220825","22.0.0-nightly.20220829","22.0.0-nightly.20220830","22.0.0-nightly.20220831","22.0.0-nightly.20220901","22.0.0-nightly.20220902","22.0.0-nightly.20220905"],"106.0.5249.40":["21.0.0-beta.6","21.0.0-beta.7","21.0.0-beta.8"],"105.0.5129.0":["21.0.0-nightly.20220628","21.0.0-nightly.20220629","21.0.0-nightly.20220630","21.0.0-nightly.20220701","21.0.0-nightly.20220704","21.0.0-nightly.20220705","21.0.0-nightly.20220706","21.0.0-nightly.20220707","21.0.0-nightly.20220708","21.0.0-nightly.20220711","21.0.0-nightly.20220712","21.0.0-nightly.20220713"],"105.0.5173.0":["21.0.0-nightly.20220715","21.0.0-nightly.20220718","21.0.0-nightly.20220719"],"106.0.5249.51":["21.0.0"],"106.0.5249.61":["21.0.1"],"106.0.5249.91":["21.1.0"],"106.0.5249.103":["21.1.1"],"106.0.5249.119":["21.2.0"],"106.0.5249.165":["21.2.1"],"106.0.5249.168":["21.2.2","21.2.3"],"106.0.5249.181":["21.3.0","21.3.1"],"106.0.5249.199":["21.3.3","21.3.4","21.3.5","21.4.0","21.4.1","21.4.2","21.4.3","21.4.4"],"107.0.5286.0":["22.0.0-alpha.1","22.0.0-nightly.20220909","22.0.0-nightly.20220912","22.0.0-nightly.20220913","22.0.0-nightly.20220914","22.0.0-nightly.20220915","22.0.0-nightly.20220916","22.0.0-nightly.20220919","22.0.0-nightly.20220920","22.0.0-nightly.20220921","22.0.0-nightly.20220922","22.0.0-nightly.20220923","22.0.0-nightly.20220926","22.0.0-nightly.20220927","22.0.0-nightly.20220928","23.0.0-nightly.20220929","23.0.0-nightly.20220930","23.0.0-nightly.20221003"],"108.0.5329.0":["22.0.0-alpha.3","22.0.0-alpha.4","22.0.0-alpha.5","22.0.0-alpha.6","23.0.0-nightly.20221004","23.0.0-nightly.20221005","23.0.0-nightly.20221006","23.0.0-nightly.20221007","23.0.0-nightly.20221010","23.0.0-nightly.20221011","23.0.0-nightly.20221012","23.0.0-nightly.20221013","23.0.0-nightly.20221014","23.0.0-nightly.20221017"],"108.0.5355.0":["22.0.0-alpha.7","23.0.0-nightly.20221018","23.0.0-nightly.20221019","23.0.0-nightly.20221020","23.0.0-nightly.20221021","23.0.0-nightly.20221024","23.0.0-nightly.20221026"],"108.0.5359.10":["22.0.0-alpha.8","22.0.0-beta.1","22.0.0-beta.2","22.0.0-beta.3"],"108.0.5359.29":["22.0.0-beta.4"],"108.0.5359.40":["22.0.0-beta.5","22.0.0-beta.6"],"108.0.5359.48":["22.0.0-beta.7","22.0.0-beta.8"],"107.0.5274.0":["22.0.0-nightly.20220908"],"108.0.5359.62":["22.0.0"],"108.0.5359.125":["22.0.1"],"108.0.5359.179":["22.0.2","22.0.3","22.1.0"],"108.0.5359.215":["22.2.0","22.2.1","22.3.0","22.3.1","22.3.2","22.3.3","22.3.4","22.3.5","22.3.6","22.3.7","22.3.8","22.3.9","22.3.10","22.3.11","22.3.12","22.3.13","22.3.14","22.3.15","22.3.16","22.3.17","22.3.18","22.3.20","22.3.21","22.3.22","22.3.23","22.3.24","22.3.25","22.3.26","22.3.27"],"110.0.5415.0":["23.0.0-alpha.1","23.0.0-nightly.20221118","23.0.0-nightly.20221121","23.0.0-nightly.20221122","23.0.0-nightly.20221123","23.0.0-nightly.20221124","23.0.0-nightly.20221125","23.0.0-nightly.20221128","23.0.0-nightly.20221129","23.0.0-nightly.20221130","24.0.0-nightly.20221201","24.0.0-nightly.20221202","24.0.0-nightly.20221205"],"110.0.5451.0":["23.0.0-alpha.2","23.0.0-alpha.3","24.0.0-nightly.20221206","24.0.0-nightly.20221207","24.0.0-nightly.20221208","24.0.0-nightly.20221213","24.0.0-nightly.20221214","24.0.0-nightly.20221215","24.0.0-nightly.20221216"],"110.0.5478.5":["23.0.0-beta.1","23.0.0-beta.2","23.0.0-beta.3"],"110.0.5481.30":["23.0.0-beta.4"],"110.0.5481.38":["23.0.0-beta.5"],"110.0.5481.52":["23.0.0-beta.6","23.0.0-beta.8"],"109.0.5382.0":["23.0.0-nightly.20221027","23.0.0-nightly.20221028","23.0.0-nightly.20221031","23.0.0-nightly.20221101","23.0.0-nightly.20221102","23.0.0-nightly.20221103","23.0.0-nightly.20221104","23.0.0-nightly.20221107","23.0.0-nightly.20221108","23.0.0-nightly.20221109","23.0.0-nightly.20221110","23.0.0-nightly.20221111","23.0.0-nightly.20221114","23.0.0-nightly.20221115","23.0.0-nightly.20221116","23.0.0-nightly.20221117"],"110.0.5481.77":["23.0.0"],"110.0.5481.100":["23.1.0"],"110.0.5481.104":["23.1.1"],"110.0.5481.177":["23.1.2"],"110.0.5481.179":["23.1.3"],"110.0.5481.192":["23.1.4","23.2.0"],"110.0.5481.208":["23.2.1","23.2.2","23.2.3","23.2.4","23.3.0","23.3.1","23.3.2","23.3.3","23.3.4","23.3.5","23.3.6","23.3.7","23.3.8","23.3.9","23.3.10","23.3.11","23.3.12","23.3.13"],"111.0.5560.0":["24.0.0-alpha.1","24.0.0-alpha.2","24.0.0-alpha.3","24.0.0-alpha.4","24.0.0-alpha.5","24.0.0-alpha.6","24.0.0-alpha.7","24.0.0-nightly.20230203","24.0.0-nightly.20230206","24.0.0-nightly.20230207","24.0.0-nightly.20230208","24.0.0-nightly.20230209","25.0.0-nightly.20230210","25.0.0-nightly.20230214","25.0.0-nightly.20230215","25.0.0-nightly.20230216","25.0.0-nightly.20230217","25.0.0-nightly.20230220","25.0.0-nightly.20230221","25.0.0-nightly.20230222","25.0.0-nightly.20230223","25.0.0-nightly.20230224","25.0.0-nightly.20230227","25.0.0-nightly.20230228","25.0.0-nightly.20230301","25.0.0-nightly.20230302","25.0.0-nightly.20230303","25.0.0-nightly.20230306","25.0.0-nightly.20230307","25.0.0-nightly.20230308","25.0.0-nightly.20230309","25.0.0-nightly.20230310"],"111.0.5563.50":["24.0.0-beta.1","24.0.0-beta.2"],"112.0.5615.20":["24.0.0-beta.3","24.0.0-beta.4"],"112.0.5615.29":["24.0.0-beta.5"],"112.0.5615.39":["24.0.0-beta.6","24.0.0-beta.7"],"111.0.5518.0":["24.0.0-nightly.20230109","24.0.0-nightly.20230110","24.0.0-nightly.20230111","24.0.0-nightly.20230112","24.0.0-nightly.20230113","24.0.0-nightly.20230116","24.0.0-nightly.20230117","24.0.0-nightly.20230118","24.0.0-nightly.20230119","24.0.0-nightly.20230120","24.0.0-nightly.20230123","24.0.0-nightly.20230124","24.0.0-nightly.20230125","24.0.0-nightly.20230126","24.0.0-nightly.20230127","24.0.0-nightly.20230131","24.0.0-nightly.20230201","24.0.0-nightly.20230202"],"112.0.5615.49":["24.0.0"],"112.0.5615.50":["24.1.0","24.1.1"],"112.0.5615.87":["24.1.2"],"112.0.5615.165":["24.1.3","24.2.0","24.3.0"],"112.0.5615.183":["24.3.1"],"112.0.5615.204":["24.4.0","24.4.1","24.5.0","24.5.1","24.6.0","24.6.1","24.6.2","24.6.3","24.6.4","24.6.5","24.7.0","24.7.1","24.8.0","24.8.1","24.8.2","24.8.3","24.8.4","24.8.5","24.8.6","24.8.7","24.8.8"],"114.0.5694.0":["25.0.0-alpha.1","25.0.0-alpha.2","25.0.0-nightly.20230405","26.0.0-nightly.20230406","26.0.0-nightly.20230407","26.0.0-nightly.20230410","26.0.0-nightly.20230411"],"114.0.5710.0":["25.0.0-alpha.3","25.0.0-alpha.4","26.0.0-nightly.20230413","26.0.0-nightly.20230414","26.0.0-nightly.20230417"],"114.0.5719.0":["25.0.0-alpha.5","25.0.0-alpha.6","25.0.0-beta.1","25.0.0-beta.2","25.0.0-beta.3","26.0.0-nightly.20230421","26.0.0-nightly.20230424","26.0.0-nightly.20230425","26.0.0-nightly.20230426","26.0.0-nightly.20230427","26.0.0-nightly.20230428","26.0.0-nightly.20230501","26.0.0-nightly.20230502","26.0.0-nightly.20230503","26.0.0-nightly.20230504","26.0.0-nightly.20230505","26.0.0-nightly.20230508","26.0.0-nightly.20230509","26.0.0-nightly.20230510"],"114.0.5735.16":["25.0.0-beta.4","25.0.0-beta.5","25.0.0-beta.6","25.0.0-beta.7"],"114.0.5735.35":["25.0.0-beta.8"],"114.0.5735.45":["25.0.0-beta.9","25.0.0","25.0.1"],"113.0.5636.0":["25.0.0-nightly.20230314"],"113.0.5651.0":["25.0.0-nightly.20230315"],"113.0.5653.0":["25.0.0-nightly.20230317"],"113.0.5660.0":["25.0.0-nightly.20230320"],"113.0.5664.0":["25.0.0-nightly.20230321"],"113.0.5666.0":["25.0.0-nightly.20230322"],"113.0.5668.0":["25.0.0-nightly.20230323"],"113.0.5670.0":["25.0.0-nightly.20230324","25.0.0-nightly.20230327","25.0.0-nightly.20230328","25.0.0-nightly.20230329","25.0.0-nightly.20230330"],"114.0.5684.0":["25.0.0-nightly.20230331","25.0.0-nightly.20230403"],"114.0.5692.0":["25.0.0-nightly.20230404"],"114.0.5735.106":["25.1.0","25.1.1"],"114.0.5735.134":["25.2.0"],"114.0.5735.199":["25.3.0"],"114.0.5735.243":["25.3.1"],"114.0.5735.248":["25.3.2","25.4.0"],"114.0.5735.289":["25.5.0","25.6.0","25.7.0","25.8.0","25.8.1","25.8.2","25.8.3","25.8.4","25.9.0","25.9.1","25.9.2","25.9.3"],"116.0.5791.0":["26.0.0-alpha.1","26.0.0-alpha.2","26.0.0-alpha.3","26.0.0-alpha.4","26.0.0-alpha.5","26.0.0-nightly.20230526","26.0.0-nightly.20230529","26.0.0-nightly.20230530","26.0.0-nightly.20230531","27.0.0-nightly.20230601","27.0.0-nightly.20230602","27.0.0-nightly.20230605","27.0.0-nightly.20230606","27.0.0-nightly.20230607","27.0.0-nightly.20230609"],"116.0.5815.0":["26.0.0-alpha.6","27.0.0-nightly.20230612","27.0.0-nightly.20230613"],"116.0.5831.0":["26.0.0-alpha.7","27.0.0-nightly.20230615"],"116.0.5845.0":["26.0.0-alpha.8","26.0.0-beta.1","27.0.0-nightly.20230622","27.0.0-nightly.20230623","27.0.0-nightly.20230626","27.0.0-nightly.20230627","27.0.0-nightly.20230628","27.0.0-nightly.20230629","27.0.0-nightly.20230630"],"116.0.5845.14":["26.0.0-beta.2","26.0.0-beta.3","26.0.0-beta.4","26.0.0-beta.5","26.0.0-beta.6","26.0.0-beta.7"],"116.0.5845.42":["26.0.0-beta.8","26.0.0-beta.9"],"116.0.5845.49":["26.0.0-beta.10","26.0.0-beta.11"],"116.0.5845.62":["26.0.0-beta.12"],"114.0.5708.0":["26.0.0-nightly.20230412"],"114.0.5715.0":["26.0.0-nightly.20230418"],"115.0.5760.0":["26.0.0-nightly.20230511","26.0.0-nightly.20230512","26.0.0-nightly.20230515","26.0.0-nightly.20230516","26.0.0-nightly.20230517","26.0.0-nightly.20230518","26.0.0-nightly.20230519","26.0.0-nightly.20230522","26.0.0-nightly.20230523"],"115.0.5786.0":["26.0.0-nightly.20230524"],"115.0.5790.0":["26.0.0-nightly.20230525"],"116.0.5845.82":["26.0.0"],"116.0.5845.97":["26.1.0"],"116.0.5845.179":["26.2.0"],"116.0.5845.188":["26.2.1"],"116.0.5845.190":["26.2.2","26.2.3","26.2.4"],"116.0.5845.228":["26.3.0","26.4.0","26.4.1","26.4.2","26.4.3"],"118.0.5949.0":["27.0.0-alpha.1","27.0.0-alpha.2","27.0.0-alpha.3","27.0.0-alpha.4","27.0.0-alpha.5","27.0.0-alpha.6","27.0.0-nightly.20230816","28.0.0-nightly.20230817","28.0.0-nightly.20230818","28.0.0-nightly.20230821","28.0.0-nightly.20230822","28.0.0-nightly.20230823","28.0.0-nightly.20230824","28.0.0-nightly.20230825","28.0.0-nightly.20230828","28.0.0-nightly.20230829","28.0.0-nightly.20230830","28.0.0-nightly.20230831"],"118.0.5993.5":["27.0.0-beta.1","27.0.0-beta.2","27.0.0-beta.3"],"118.0.5993.11":["27.0.0-beta.4"],"118.0.5993.18":["27.0.0-beta.5","27.0.0-beta.6","27.0.0-beta.7","27.0.0-beta.8","27.0.0-beta.9"],"116.0.5829.0":["27.0.0-nightly.20230614"],"116.0.5833.0":["27.0.0-nightly.20230616","27.0.0-nightly.20230619","27.0.0-nightly.20230620","27.0.0-nightly.20230621"],"117.0.5852.0":["27.0.0-nightly.20230703","27.0.0-nightly.20230704","27.0.0-nightly.20230705","27.0.0-nightly.20230706","27.0.0-nightly.20230707","27.0.0-nightly.20230710","27.0.0-nightly.20230711","27.0.0-nightly.20230712","27.0.0-nightly.20230713","27.0.0-nightly.20230714"],"117.0.5884.1":["27.0.0-nightly.20230717","27.0.0-nightly.20230718"],"117.0.5892.0":["27.0.0-nightly.20230719"],"117.0.5897.0":["27.0.0-nightly.20230720","27.0.0-nightly.20230721","27.0.0-nightly.20230724","27.0.0-nightly.20230725","27.0.0-nightly.20230726","27.0.0-nightly.20230727","27.0.0-nightly.20230728","27.0.0-nightly.20230731"],"117.0.5911.0":["27.0.0-nightly.20230801","27.0.0-nightly.20230802","27.0.0-nightly.20230803"],"117.0.5921.0":["27.0.0-nightly.20230804","27.0.0-nightly.20230807","27.0.0-nightly.20230808","27.0.0-nightly.20230814","27.0.0-nightly.20230815"],"118.0.5993.54":["27.0.0"],"118.0.5993.89":["27.0.1","27.0.2"],"118.0.5993.120":["27.0.3"],"119.0.6045.0":["28.0.0-alpha.1","28.0.0-alpha.2","28.0.0-nightly.20231006","28.0.0-nightly.20231009","28.0.0-nightly.20231010","28.0.0-nightly.20231011","29.0.0-nightly.20231012","29.0.0-nightly.20231013","29.0.0-nightly.20231016","29.0.0-nightly.20231017","29.0.0-nightly.20231018","29.0.0-nightly.20231019","29.0.0-nightly.20231020","29.0.0-nightly.20231023","29.0.0-nightly.20231024"],"119.0.6045.21":["28.0.0-alpha.3","28.0.0-alpha.4"],"119.0.6045.33":["28.0.0-alpha.5","28.0.0-alpha.6","28.0.0-alpha.7","28.0.0-beta.1"],"120.0.6099.0":["28.0.0-beta.2"],"118.0.5991.0":["28.0.0-nightly.20230906"],"118.0.5993.0":["28.0.0-nightly.20230907","28.0.0-nightly.20230908","28.0.0-nightly.20230911","28.0.0-nightly.20230912","28.0.0-nightly.20230913","28.0.0-nightly.20230914","28.0.0-nightly.20230915"],"119.0.6006.0":["28.0.0-nightly.20230919"],"119.0.6017.0":["28.0.0-nightly.20230920"],"119.0.6019.2":["28.0.0-nightly.20230921","28.0.0-nightly.20230925","28.0.0-nightly.20230926","28.0.0-nightly.20230927","28.0.0-nightly.20230928"],"119.0.6029.0":["28.0.0-nightly.20230929","28.0.0-nightly.20231002"],"119.0.6043.0":["28.0.0-nightly.20231003","28.0.0-nightly.20231004","28.0.0-nightly.20231005"],"120.0.6078.0":["29.0.0-nightly.20231025","29.0.0-nightly.20231026","29.0.0-nightly.20231027","29.0.0-nightly.20231030","29.0.0-nightly.20231031","29.0.0-nightly.20231101"],"121.0.6100.0":["29.0.0-nightly.20231102","29.0.0-nightly.20231103"]} \ No newline at end of file +{"39.0.2171.65":["0.20.0","0.20.1","0.20.2","0.20.3","0.20.4","0.20.5","0.20.6","0.20.7","0.20.8"],"40.0.2214.91":["0.21.0","0.21.1","0.21.2"],"41.0.2272.76":["0.21.3","0.22.1","0.22.2","0.22.3","0.23.0","0.24.0"],"42.0.2311.107":["0.25.0","0.25.1","0.25.2","0.25.3","0.26.0","0.26.1","0.27.0","0.27.1"],"43.0.2357.65":["0.27.2","0.27.3","0.28.0","0.28.1","0.28.2","0.28.3","0.29.1","0.29.2"],"44.0.2403.125":["0.30.4","0.31.0"],"45.0.2454.85":["0.31.2","0.32.2","0.32.3","0.33.0","0.33.1","0.33.2","0.33.3","0.33.4","0.33.6","0.33.7","0.33.8","0.33.9","0.34.0","0.34.1","0.34.2","0.34.3","0.34.4","0.35.1","0.35.2","0.35.3","0.35.4","0.35.5"],"47.0.2526.73":["0.36.0","0.36.2","0.36.3","0.36.4"],"47.0.2526.110":["0.36.5","0.36.6","0.36.7","0.36.8","0.36.9","0.36.10","0.36.11","0.36.12"],"49.0.2623.75":["0.37.0","0.37.1","0.37.3","0.37.4","0.37.5","0.37.6","0.37.7","0.37.8","1.0.0","1.0.1","1.0.2"],"50.0.2661.102":["1.1.0","1.1.1","1.1.2","1.1.3"],"51.0.2704.63":["1.2.0","1.2.1"],"51.0.2704.84":["1.2.2","1.2.3"],"51.0.2704.103":["1.2.4","1.2.5"],"51.0.2704.106":["1.2.6","1.2.7","1.2.8"],"52.0.2743.82":["1.3.0","1.3.1","1.3.2","1.3.3","1.3.4","1.3.5","1.3.6","1.3.7","1.3.9","1.3.10","1.3.13","1.3.14","1.3.15"],"53.0.2785.113":["1.4.0","1.4.1","1.4.2","1.4.3","1.4.4","1.4.5"],"53.0.2785.143":["1.4.6","1.4.7","1.4.8","1.4.10","1.4.11","1.4.13","1.4.14","1.4.15","1.4.16"],"54.0.2840.51":["1.4.12"],"54.0.2840.101":["1.5.0","1.5.1"],"56.0.2924.87":["1.6.0","1.6.1","1.6.2","1.6.3","1.6.4","1.6.5","1.6.6","1.6.7","1.6.8","1.6.9","1.6.10","1.6.11","1.6.12","1.6.13","1.6.14","1.6.15","1.6.16","1.6.17","1.6.18"],"58.0.3029.110":["1.7.0","1.7.1","1.7.2","1.7.3","1.7.4","1.7.5","1.7.6","1.7.7","1.7.8","1.7.9","1.7.10","1.7.11","1.7.12","1.7.13","1.7.14","1.7.15","1.7.16"],"59.0.3071.115":["1.8.0","1.8.1","1.8.2-beta.1","1.8.2-beta.2","1.8.2-beta.3","1.8.2-beta.4","1.8.2-beta.5","1.8.2","1.8.3","1.8.4","1.8.5","1.8.6","1.8.7","1.8.8"],"61.0.3163.100":["2.0.0-beta.1","2.0.0-beta.2","2.0.0-beta.3","2.0.0-beta.4","2.0.0-beta.5","2.0.0-beta.6","2.0.0-beta.7","2.0.0-beta.8","2.0.0","2.0.1","2.0.2","2.0.3","2.0.4","2.0.5","2.0.6","2.0.7","2.0.8-nightly.20180819","2.0.8-nightly.20180820","2.0.8","2.0.9","2.0.10","2.0.11","2.0.12","2.0.13","2.0.14","2.0.15","2.0.16","2.0.17","2.0.18","2.1.0-unsupported.20180809"],"66.0.3359.181":["3.0.0-beta.1","3.0.0-beta.2","3.0.0-beta.3","3.0.0-beta.4","3.0.0-beta.5","3.0.0-beta.6","3.0.0-beta.7","3.0.0-beta.8","3.0.0-beta.9","3.0.0-beta.10","3.0.0-beta.11","3.0.0-beta.12","3.0.0-beta.13","3.0.0-nightly.20180818","3.0.0-nightly.20180821","3.0.0-nightly.20180823","3.0.0-nightly.20180904","3.0.0","3.0.1","3.0.2","3.0.3","3.0.4","3.0.5","3.0.6","3.0.7","3.0.8","3.0.9","3.0.10","3.0.11","3.0.12","3.0.13","3.0.14","3.0.15","3.0.16","3.1.0-beta.1","3.1.0-beta.2","3.1.0-beta.3","3.1.0-beta.4","3.1.0-beta.5","3.1.0","3.1.1","3.1.2","3.1.3","3.1.4","3.1.5","3.1.6","3.1.7","3.1.8","3.1.9","3.1.10","3.1.11","3.1.12","3.1.13","4.0.0-nightly.20180817","4.0.0-nightly.20180819","4.0.0-nightly.20180821"],"69.0.3497.106":["4.0.0-beta.1","4.0.0-beta.2","4.0.0-beta.3","4.0.0-beta.4","4.0.0-beta.5","4.0.0-beta.6","4.0.0-beta.7","4.0.0-beta.8","4.0.0-beta.9","4.0.0-beta.10","4.0.0-beta.11","4.0.0-nightly.20181010","4.0.0","4.0.1","4.0.2","4.0.3","4.0.4","4.0.5","4.0.6"],"67.0.3396.99":["4.0.0-nightly.20180929"],"68.0.3440.128":["4.0.0-nightly.20181006"],"69.0.3497.128":["4.0.7","4.0.8","4.1.0","4.1.1","4.1.2","4.1.3","4.1.4","4.1.5","4.2.0","4.2.1","4.2.2","4.2.3","4.2.4","4.2.5","4.2.6","4.2.7","4.2.8","4.2.9","4.2.10","4.2.11","4.2.12"],"72.0.3626.52":["5.0.0-beta.1","5.0.0-beta.2","6.0.0-nightly.20190123"],"73.0.3683.27":["5.0.0-beta.3"],"73.0.3683.54":["5.0.0-beta.4"],"73.0.3683.61":["5.0.0-beta.5"],"73.0.3683.84":["5.0.0-beta.6"],"73.0.3683.94":["5.0.0-beta.7"],"73.0.3683.104":["5.0.0-beta.8"],"73.0.3683.117":["5.0.0-beta.9"],"70.0.3538.110":["5.0.0-nightly.20190107"],"71.0.3578.98":["5.0.0-nightly.20190121","5.0.0-nightly.20190122"],"73.0.3683.119":["5.0.0"],"73.0.3683.121":["5.0.1","5.0.2","5.0.3","5.0.4","5.0.5","5.0.6","5.0.7","5.0.8","5.0.9","5.0.10","5.0.11","5.0.12","5.0.13"],"76.0.3774.1":["6.0.0-beta.1"],"76.0.3783.1":["6.0.0-beta.2","6.0.0-beta.3","6.0.0-beta.4"],"76.0.3805.4":["6.0.0-beta.5"],"76.0.3809.3":["6.0.0-beta.6"],"76.0.3809.22":["6.0.0-beta.7"],"76.0.3809.26":["6.0.0-beta.8","6.0.0-beta.9"],"76.0.3809.37":["6.0.0-beta.10"],"76.0.3809.42":["6.0.0-beta.11"],"76.0.3809.54":["6.0.0-beta.12"],"76.0.3809.60":["6.0.0-beta.13"],"76.0.3809.68":["6.0.0-beta.14"],"76.0.3809.74":["6.0.0-beta.15"],"72.0.3626.107":["6.0.0-nightly.20190212"],"72.0.3626.110":["6.0.0-nightly.20190213"],"74.0.3724.8":["6.0.0-nightly.20190311"],"76.0.3809.88":["6.0.0"],"76.0.3809.102":["6.0.1"],"76.0.3809.110":["6.0.2"],"76.0.3809.126":["6.0.3"],"76.0.3809.131":["6.0.4"],"76.0.3809.136":["6.0.5"],"76.0.3809.138":["6.0.6"],"76.0.3809.139":["6.0.7"],"76.0.3809.146":["6.0.8","6.0.9","6.0.10","6.0.11","6.0.12","6.1.0","6.1.1","6.1.2","6.1.3","6.1.4","6.1.5","6.1.6","6.1.7","6.1.8","6.1.9","6.1.10","6.1.11","6.1.12"],"78.0.3866.0":["7.0.0-beta.1","7.0.0-beta.2","7.0.0-beta.3","7.0.0-nightly.20190727","7.0.0-nightly.20190728","7.0.0-nightly.20190729","7.0.0-nightly.20190730","7.0.0-nightly.20190731","8.0.0-nightly.20190801","8.0.0-nightly.20190802"],"78.0.3896.6":["7.0.0-beta.4"],"78.0.3905.1":["7.0.0-beta.5","7.0.0-beta.6","7.0.0-beta.7","7.0.0"],"76.0.3784.0":["7.0.0-nightly.20190521"],"76.0.3806.0":["7.0.0-nightly.20190529","7.0.0-nightly.20190530","7.0.0-nightly.20190531","7.0.0-nightly.20190602","7.0.0-nightly.20190603"],"77.0.3814.0":["7.0.0-nightly.20190604"],"77.0.3815.0":["7.0.0-nightly.20190605","7.0.0-nightly.20190606","7.0.0-nightly.20190607","7.0.0-nightly.20190608","7.0.0-nightly.20190609","7.0.0-nightly.20190611","7.0.0-nightly.20190612","7.0.0-nightly.20190613","7.0.0-nightly.20190615","7.0.0-nightly.20190616","7.0.0-nightly.20190618","7.0.0-nightly.20190619","7.0.0-nightly.20190622","7.0.0-nightly.20190623","7.0.0-nightly.20190624","7.0.0-nightly.20190627","7.0.0-nightly.20190629","7.0.0-nightly.20190630","7.0.0-nightly.20190701","7.0.0-nightly.20190702"],"77.0.3843.0":["7.0.0-nightly.20190704","7.0.0-nightly.20190705"],"77.0.3848.0":["7.0.0-nightly.20190719","7.0.0-nightly.20190720","7.0.0-nightly.20190721"],"77.0.3864.0":["7.0.0-nightly.20190726"],"78.0.3904.92":["7.0.1"],"78.0.3904.94":["7.1.0"],"78.0.3904.99":["7.1.1"],"78.0.3904.113":["7.1.2"],"78.0.3904.126":["7.1.3"],"78.0.3904.130":["7.1.4","7.1.5","7.1.6","7.1.7","7.1.8","7.1.9","7.1.10","7.1.11","7.1.12","7.1.13","7.1.14","7.2.0","7.2.1","7.2.2","7.2.3","7.2.4","7.3.0","7.3.1","7.3.2","7.3.3"],"79.0.3931.0":["8.0.0-beta.1","8.0.0-beta.2","8.0.0-nightly.20191019","8.0.0-nightly.20191020","8.0.0-nightly.20191021","8.0.0-nightly.20191023"],"80.0.3955.0":["8.0.0-beta.3","8.0.0-beta.4"],"80.0.3987.14":["8.0.0-beta.5"],"80.0.3987.51":["8.0.0-beta.6"],"80.0.3987.59":["8.0.0-beta.7"],"80.0.3987.75":["8.0.0-beta.8","8.0.0-beta.9"],"78.0.3871.0":["8.0.0-nightly.20190803","8.0.0-nightly.20190806","8.0.0-nightly.20190807","8.0.0-nightly.20190808","8.0.0-nightly.20190809","8.0.0-nightly.20190810","8.0.0-nightly.20190811","8.0.0-nightly.20190812","8.0.0-nightly.20190813","8.0.0-nightly.20190814","8.0.0-nightly.20190815"],"78.0.3881.0":["8.0.0-nightly.20190816","8.0.0-nightly.20190817","8.0.0-nightly.20190818","8.0.0-nightly.20190819","8.0.0-nightly.20190820"],"78.0.3892.0":["8.0.0-nightly.20190824","8.0.0-nightly.20190825","8.0.0-nightly.20190827","8.0.0-nightly.20190828","8.0.0-nightly.20190830","8.0.0-nightly.20190901","8.0.0-nightly.20190902","8.0.0-nightly.20190907","8.0.0-nightly.20190909","8.0.0-nightly.20190910","8.0.0-nightly.20190911","8.0.0-nightly.20190912","8.0.0-nightly.20190913","8.0.0-nightly.20190914","8.0.0-nightly.20190915","8.0.0-nightly.20190917"],"79.0.3915.0":["8.0.0-nightly.20190919","8.0.0-nightly.20190920"],"79.0.3919.0":["8.0.0-nightly.20190922","8.0.0-nightly.20190923","8.0.0-nightly.20190924","8.0.0-nightly.20190926","8.0.0-nightly.20190928","8.0.0-nightly.20190929","8.0.0-nightly.20190930","8.0.0-nightly.20191001","8.0.0-nightly.20191004","8.0.0-nightly.20191005","8.0.0-nightly.20191006","8.0.0-nightly.20191009","8.0.0-nightly.20191011","8.0.0-nightly.20191012","8.0.0-nightly.20191017"],"80.0.3952.0":["8.0.0-nightly.20191101","8.0.0-nightly.20191103","8.0.0-nightly.20191105"],"80.0.3987.86":["8.0.0","8.0.1","8.0.2"],"80.0.3987.134":["8.0.3"],"80.0.3987.137":["8.1.0"],"80.0.3987.141":["8.1.1"],"80.0.3987.158":["8.2.0"],"80.0.3987.163":["8.2.1","8.2.2","8.2.3","8.5.3","8.5.4","8.5.5"],"80.0.3987.165":["8.2.4","8.2.5","8.3.0","8.3.1","8.3.2","8.3.3","8.3.4","8.4.0","8.4.1","8.5.0","8.5.1","8.5.2"],"82.0.4048.0":["9.0.0-beta.1","9.0.0-beta.2","9.0.0-beta.3","9.0.0-beta.4","9.0.0-beta.5"],"82.0.4058.2":["9.0.0-beta.6","9.0.0-beta.7","9.0.0-beta.9"],"82.0.4085.10":["9.0.0-beta.10"],"82.0.4085.14":["9.0.0-beta.11","9.0.0-beta.12","9.0.0-beta.13"],"82.0.4085.27":["9.0.0-beta.14"],"83.0.4102.3":["9.0.0-beta.15","9.0.0-beta.16"],"83.0.4103.14":["9.0.0-beta.17"],"83.0.4103.16":["9.0.0-beta.18"],"83.0.4103.24":["9.0.0-beta.19"],"83.0.4103.26":["9.0.0-beta.20","9.0.0-beta.21"],"83.0.4103.34":["9.0.0-beta.22"],"83.0.4103.44":["9.0.0-beta.23"],"83.0.4103.45":["9.0.0-beta.24"],"80.0.3954.0":["9.0.0-nightly.20191121","9.0.0-nightly.20191122","9.0.0-nightly.20191123","9.0.0-nightly.20191124","9.0.0-nightly.20191126","9.0.0-nightly.20191128","9.0.0-nightly.20191129","9.0.0-nightly.20191130","9.0.0-nightly.20191201","9.0.0-nightly.20191202","9.0.0-nightly.20191203","9.0.0-nightly.20191204","9.0.0-nightly.20191205","9.0.0-nightly.20191210"],"81.0.3994.0":["9.0.0-nightly.20191220","9.0.0-nightly.20191221","9.0.0-nightly.20191222","9.0.0-nightly.20191223","9.0.0-nightly.20191224","9.0.0-nightly.20191225","9.0.0-nightly.20191226","9.0.0-nightly.20191228","9.0.0-nightly.20191229","9.0.0-nightly.20191230","9.0.0-nightly.20191231","9.0.0-nightly.20200101","9.0.0-nightly.20200103","9.0.0-nightly.20200104","9.0.0-nightly.20200105","9.0.0-nightly.20200106","9.0.0-nightly.20200108","9.0.0-nightly.20200109","9.0.0-nightly.20200110","9.0.0-nightly.20200111","9.0.0-nightly.20200113","9.0.0-nightly.20200115","9.0.0-nightly.20200116","9.0.0-nightly.20200117"],"81.0.4030.0":["9.0.0-nightly.20200119","9.0.0-nightly.20200121"],"83.0.4103.64":["9.0.0"],"83.0.4103.94":["9.0.1","9.0.2"],"83.0.4103.100":["9.0.3"],"83.0.4103.104":["9.0.4"],"83.0.4103.119":["9.0.5"],"83.0.4103.122":["9.1.0","9.1.1","9.1.2","9.2.0","9.2.1","9.3.0","9.3.1","9.3.2","9.3.3","9.3.4","9.3.5","9.4.0","9.4.1","9.4.2","9.4.3","9.4.4"],"84.0.4129.0":["10.0.0-beta.1","10.0.0-beta.2","10.0.0-nightly.20200501","10.0.0-nightly.20200504","10.0.0-nightly.20200505","10.0.0-nightly.20200506","10.0.0-nightly.20200507","10.0.0-nightly.20200508","10.0.0-nightly.20200511","10.0.0-nightly.20200512","10.0.0-nightly.20200513","10.0.0-nightly.20200514","10.0.0-nightly.20200515","10.0.0-nightly.20200518","10.0.0-nightly.20200519","10.0.0-nightly.20200520","10.0.0-nightly.20200521","11.0.0-nightly.20200525","11.0.0-nightly.20200526"],"85.0.4161.2":["10.0.0-beta.3","10.0.0-beta.4"],"85.0.4181.1":["10.0.0-beta.8","10.0.0-beta.9"],"85.0.4183.19":["10.0.0-beta.10"],"85.0.4183.20":["10.0.0-beta.11"],"85.0.4183.26":["10.0.0-beta.12"],"85.0.4183.39":["10.0.0-beta.13","10.0.0-beta.14","10.0.0-beta.15","10.0.0-beta.17","10.0.0-beta.19","10.0.0-beta.20","10.0.0-beta.21"],"85.0.4183.70":["10.0.0-beta.23"],"85.0.4183.78":["10.0.0-beta.24"],"85.0.4183.80":["10.0.0-beta.25"],"82.0.4050.0":["10.0.0-nightly.20200209","10.0.0-nightly.20200210","10.0.0-nightly.20200211","10.0.0-nightly.20200216","10.0.0-nightly.20200217","10.0.0-nightly.20200218","10.0.0-nightly.20200221","10.0.0-nightly.20200222","10.0.0-nightly.20200223","10.0.0-nightly.20200226","10.0.0-nightly.20200303"],"82.0.4076.0":["10.0.0-nightly.20200304","10.0.0-nightly.20200305","10.0.0-nightly.20200306","10.0.0-nightly.20200309","10.0.0-nightly.20200310"],"82.0.4083.0":["10.0.0-nightly.20200311"],"83.0.4086.0":["10.0.0-nightly.20200316"],"83.0.4087.0":["10.0.0-nightly.20200317","10.0.0-nightly.20200318","10.0.0-nightly.20200320","10.0.0-nightly.20200323","10.0.0-nightly.20200324","10.0.0-nightly.20200325","10.0.0-nightly.20200326","10.0.0-nightly.20200327","10.0.0-nightly.20200330","10.0.0-nightly.20200331","10.0.0-nightly.20200401","10.0.0-nightly.20200402","10.0.0-nightly.20200403","10.0.0-nightly.20200406"],"83.0.4095.0":["10.0.0-nightly.20200408","10.0.0-nightly.20200410","10.0.0-nightly.20200413"],"84.0.4114.0":["10.0.0-nightly.20200414"],"84.0.4115.0":["10.0.0-nightly.20200415","10.0.0-nightly.20200416","10.0.0-nightly.20200417"],"84.0.4121.0":["10.0.0-nightly.20200422","10.0.0-nightly.20200423"],"84.0.4125.0":["10.0.0-nightly.20200427","10.0.0-nightly.20200428","10.0.0-nightly.20200429","10.0.0-nightly.20200430"],"85.0.4183.84":["10.0.0"],"85.0.4183.86":["10.0.1"],"85.0.4183.87":["10.1.0"],"85.0.4183.93":["10.1.1"],"85.0.4183.98":["10.1.2"],"85.0.4183.121":["10.1.3","10.1.4","10.1.5","10.1.6","10.1.7","10.2.0","10.3.0","10.3.1","10.3.2","10.4.0","10.4.1","10.4.2","10.4.3","10.4.4","10.4.5","10.4.6","10.4.7"],"86.0.4234.0":["11.0.0-beta.1","11.0.0-beta.3","11.0.0-beta.4","11.0.0-beta.5","11.0.0-beta.6","11.0.0-beta.7","11.0.0-nightly.20200822","11.0.0-nightly.20200824","11.0.0-nightly.20200825","11.0.0-nightly.20200826","12.0.0-nightly.20200827","12.0.0-nightly.20200831","12.0.0-nightly.20200902","12.0.0-nightly.20200903","12.0.0-nightly.20200907","12.0.0-nightly.20200910","12.0.0-nightly.20200911","12.0.0-nightly.20200914"],"87.0.4251.1":["11.0.0-beta.8","11.0.0-beta.9","11.0.0-beta.11"],"87.0.4280.11":["11.0.0-beta.12","11.0.0-beta.13"],"87.0.4280.27":["11.0.0-beta.16","11.0.0-beta.17","11.0.0-beta.18","11.0.0-beta.19"],"87.0.4280.40":["11.0.0-beta.20"],"87.0.4280.47":["11.0.0-beta.22","11.0.0-beta.23"],"85.0.4156.0":["11.0.0-nightly.20200529"],"85.0.4162.0":["11.0.0-nightly.20200602","11.0.0-nightly.20200603","11.0.0-nightly.20200604","11.0.0-nightly.20200609","11.0.0-nightly.20200610","11.0.0-nightly.20200611","11.0.0-nightly.20200615","11.0.0-nightly.20200616","11.0.0-nightly.20200617","11.0.0-nightly.20200618","11.0.0-nightly.20200619"],"85.0.4179.0":["11.0.0-nightly.20200701","11.0.0-nightly.20200702","11.0.0-nightly.20200703","11.0.0-nightly.20200706","11.0.0-nightly.20200707","11.0.0-nightly.20200708","11.0.0-nightly.20200709"],"86.0.4203.0":["11.0.0-nightly.20200716","11.0.0-nightly.20200717","11.0.0-nightly.20200720","11.0.0-nightly.20200721"],"86.0.4209.0":["11.0.0-nightly.20200723","11.0.0-nightly.20200724","11.0.0-nightly.20200729","11.0.0-nightly.20200730","11.0.0-nightly.20200731","11.0.0-nightly.20200803","11.0.0-nightly.20200804","11.0.0-nightly.20200805","11.0.0-nightly.20200811","11.0.0-nightly.20200812"],"87.0.4280.60":["11.0.0","11.0.1"],"87.0.4280.67":["11.0.2","11.0.3","11.0.4"],"87.0.4280.88":["11.0.5","11.1.0","11.1.1"],"87.0.4280.141":["11.2.0","11.2.1","11.2.2","11.2.3","11.3.0","11.4.0","11.4.1","11.4.2","11.4.3","11.4.4","11.4.5","11.4.6","11.4.7","11.4.8","11.4.9","11.4.10","11.4.11","11.4.12","11.5.0"],"89.0.4328.0":["12.0.0-beta.1","12.0.0-beta.3","12.0.0-beta.4","12.0.0-beta.5","12.0.0-beta.6","12.0.0-beta.7","12.0.0-beta.8","12.0.0-beta.9","12.0.0-beta.10","12.0.0-beta.11","12.0.0-beta.12","12.0.0-beta.14","13.0.0-nightly.20201119","13.0.0-nightly.20201123","13.0.0-nightly.20201124","13.0.0-nightly.20201126","13.0.0-nightly.20201127","13.0.0-nightly.20201130","13.0.0-nightly.20201201","13.0.0-nightly.20201202","13.0.0-nightly.20201203","13.0.0-nightly.20201204","13.0.0-nightly.20201207","13.0.0-nightly.20201208","13.0.0-nightly.20201209","13.0.0-nightly.20201210","13.0.0-nightly.20201211","13.0.0-nightly.20201214"],"89.0.4348.1":["12.0.0-beta.16","12.0.0-beta.18","12.0.0-beta.19","12.0.0-beta.20"],"89.0.4388.2":["12.0.0-beta.21","12.0.0-beta.22","12.0.0-beta.23","12.0.0-beta.24","12.0.0-beta.25","12.0.0-beta.26"],"89.0.4389.23":["12.0.0-beta.27","12.0.0-beta.28","12.0.0-beta.29"],"89.0.4389.58":["12.0.0-beta.30","12.0.0-beta.31"],"87.0.4268.0":["12.0.0-nightly.20201002","12.0.0-nightly.20201007","12.0.0-nightly.20201009","12.0.0-nightly.20201012","12.0.0-nightly.20201013","12.0.0-nightly.20201014","12.0.0-nightly.20201015"],"88.0.4292.0":["12.0.0-nightly.20201023","12.0.0-nightly.20201026"],"88.0.4306.0":["12.0.0-nightly.20201030","12.0.0-nightly.20201102","12.0.0-nightly.20201103","12.0.0-nightly.20201104","12.0.0-nightly.20201105","12.0.0-nightly.20201106","12.0.0-nightly.20201111","12.0.0-nightly.20201112"],"88.0.4324.0":["12.0.0-nightly.20201116"],"89.0.4389.69":["12.0.0"],"89.0.4389.82":["12.0.1"],"89.0.4389.90":["12.0.2"],"89.0.4389.114":["12.0.3","12.0.4"],"89.0.4389.128":["12.0.5","12.0.6","12.0.7","12.0.8","12.0.9","12.0.10","12.0.11","12.0.12","12.0.13","12.0.14","12.0.15","12.0.16","12.0.17","12.0.18","12.1.0","12.1.1","12.1.2","12.2.0","12.2.1","12.2.2","12.2.3"],"90.0.4402.0":["13.0.0-beta.2","13.0.0-beta.3","13.0.0-nightly.20210210","13.0.0-nightly.20210211","13.0.0-nightly.20210212","13.0.0-nightly.20210216","13.0.0-nightly.20210217","13.0.0-nightly.20210218","13.0.0-nightly.20210219","13.0.0-nightly.20210222","13.0.0-nightly.20210225","13.0.0-nightly.20210226","13.0.0-nightly.20210301","13.0.0-nightly.20210302","13.0.0-nightly.20210303","14.0.0-nightly.20210304"],"90.0.4415.0":["13.0.0-beta.4","13.0.0-beta.5","13.0.0-beta.6","13.0.0-beta.7","13.0.0-beta.8","13.0.0-beta.9","13.0.0-beta.10","13.0.0-beta.11","13.0.0-beta.12","13.0.0-beta.13","14.0.0-nightly.20210305","14.0.0-nightly.20210308","14.0.0-nightly.20210309","14.0.0-nightly.20210311","14.0.0-nightly.20210315","14.0.0-nightly.20210316","14.0.0-nightly.20210317","14.0.0-nightly.20210318","14.0.0-nightly.20210319","14.0.0-nightly.20210323","14.0.0-nightly.20210324","14.0.0-nightly.20210325","14.0.0-nightly.20210326","14.0.0-nightly.20210329","14.0.0-nightly.20210330"],"91.0.4448.0":["13.0.0-beta.14","13.0.0-beta.16","13.0.0-beta.17","13.0.0-beta.18","13.0.0-beta.20","14.0.0-nightly.20210331","14.0.0-nightly.20210401","14.0.0-nightly.20210402","14.0.0-nightly.20210406","14.0.0-nightly.20210407","14.0.0-nightly.20210408","14.0.0-nightly.20210409","14.0.0-nightly.20210413"],"91.0.4472.33":["13.0.0-beta.21","13.0.0-beta.22","13.0.0-beta.23"],"91.0.4472.38":["13.0.0-beta.24","13.0.0-beta.25","13.0.0-beta.26","13.0.0-beta.27","13.0.0-beta.28"],"89.0.4349.0":["13.0.0-nightly.20201215","13.0.0-nightly.20201216","13.0.0-nightly.20201221","13.0.0-nightly.20201222"],"89.0.4359.0":["13.0.0-nightly.20201223","13.0.0-nightly.20210104","13.0.0-nightly.20210108","13.0.0-nightly.20210111"],"89.0.4386.0":["13.0.0-nightly.20210113","13.0.0-nightly.20210114","13.0.0-nightly.20210118","13.0.0-nightly.20210122","13.0.0-nightly.20210125"],"89.0.4389.0":["13.0.0-nightly.20210127","13.0.0-nightly.20210128","13.0.0-nightly.20210129","13.0.0-nightly.20210201","13.0.0-nightly.20210202","13.0.0-nightly.20210203","13.0.0-nightly.20210205","13.0.0-nightly.20210208","13.0.0-nightly.20210209"],"91.0.4472.69":["13.0.0","13.0.1"],"91.0.4472.77":["13.1.0","13.1.1","13.1.2"],"91.0.4472.106":["13.1.3","13.1.4"],"91.0.4472.124":["13.1.5","13.1.6","13.1.7"],"91.0.4472.164":["13.1.8","13.1.9","13.2.0","13.2.1","13.2.2","13.2.3","13.3.0","13.4.0","13.5.0","13.5.1","13.5.2","13.6.0","13.6.1","13.6.2","13.6.3","13.6.6","13.6.7","13.6.8","13.6.9"],"92.0.4511.0":["14.0.0-beta.1","14.0.0-beta.2","14.0.0-beta.3","14.0.0-nightly.20210520","14.0.0-nightly.20210523","14.0.0-nightly.20210524","15.0.0-nightly.20210527","15.0.0-nightly.20210528","15.0.0-nightly.20210531","15.0.0-nightly.20210601","15.0.0-nightly.20210602"],"93.0.4536.0":["14.0.0-beta.5","14.0.0-beta.6","14.0.0-beta.7","14.0.0-beta.8","15.0.0-nightly.20210609","15.0.0-nightly.20210610","15.0.0-nightly.20210611","15.0.0-nightly.20210614","15.0.0-nightly.20210615","15.0.0-nightly.20210616"],"93.0.4539.0":["14.0.0-beta.9","14.0.0-beta.10","15.0.0-nightly.20210617","15.0.0-nightly.20210618","15.0.0-nightly.20210621","15.0.0-nightly.20210622"],"93.0.4557.4":["14.0.0-beta.11","14.0.0-beta.12"],"93.0.4566.0":["14.0.0-beta.13","14.0.0-beta.14","14.0.0-beta.15","14.0.0-beta.16","14.0.0-beta.17","15.0.0-alpha.1","15.0.0-alpha.2","15.0.0-nightly.20210706","15.0.0-nightly.20210707","15.0.0-nightly.20210708","15.0.0-nightly.20210709","15.0.0-nightly.20210712","15.0.0-nightly.20210713","15.0.0-nightly.20210714","15.0.0-nightly.20210715","15.0.0-nightly.20210716","15.0.0-nightly.20210719","15.0.0-nightly.20210720","15.0.0-nightly.20210721","16.0.0-nightly.20210722","16.0.0-nightly.20210723","16.0.0-nightly.20210726"],"93.0.4577.15":["14.0.0-beta.18","14.0.0-beta.19","14.0.0-beta.20","14.0.0-beta.21"],"93.0.4577.25":["14.0.0-beta.22","14.0.0-beta.23"],"93.0.4577.51":["14.0.0-beta.24","14.0.0-beta.25"],"92.0.4475.0":["14.0.0-nightly.20210426","14.0.0-nightly.20210427"],"92.0.4488.0":["14.0.0-nightly.20210430","14.0.0-nightly.20210503"],"92.0.4496.0":["14.0.0-nightly.20210505"],"92.0.4498.0":["14.0.0-nightly.20210506"],"92.0.4499.0":["14.0.0-nightly.20210507","14.0.0-nightly.20210510","14.0.0-nightly.20210511","14.0.0-nightly.20210512","14.0.0-nightly.20210513"],"92.0.4505.0":["14.0.0-nightly.20210514","14.0.0-nightly.20210517","14.0.0-nightly.20210518","14.0.0-nightly.20210519"],"93.0.4577.58":["14.0.0"],"93.0.4577.63":["14.0.1"],"93.0.4577.82":["14.0.2","14.1.0","14.1.1","14.2.0","14.2.1","14.2.2","14.2.3","14.2.4","14.2.5","14.2.6","14.2.7","14.2.8","14.2.9"],"94.0.4584.0":["15.0.0-alpha.3","15.0.0-alpha.4","15.0.0-alpha.5","15.0.0-alpha.6","16.0.0-nightly.20210727","16.0.0-nightly.20210728","16.0.0-nightly.20210729","16.0.0-nightly.20210730","16.0.0-nightly.20210802","16.0.0-nightly.20210803","16.0.0-nightly.20210804","16.0.0-nightly.20210805","16.0.0-nightly.20210806","16.0.0-nightly.20210809","16.0.0-nightly.20210810","16.0.0-nightly.20210811"],"94.0.4590.2":["15.0.0-alpha.7","15.0.0-alpha.8","15.0.0-alpha.9","16.0.0-nightly.20210812","16.0.0-nightly.20210813","16.0.0-nightly.20210816","16.0.0-nightly.20210817","16.0.0-nightly.20210818","16.0.0-nightly.20210819","16.0.0-nightly.20210820","16.0.0-nightly.20210823"],"94.0.4606.12":["15.0.0-alpha.10"],"94.0.4606.20":["15.0.0-beta.1","15.0.0-beta.2"],"94.0.4606.31":["15.0.0-beta.3","15.0.0-beta.4","15.0.0-beta.5","15.0.0-beta.6","15.0.0-beta.7"],"93.0.4530.0":["15.0.0-nightly.20210603","15.0.0-nightly.20210604"],"93.0.4535.0":["15.0.0-nightly.20210608"],"93.0.4550.0":["15.0.0-nightly.20210623","15.0.0-nightly.20210624"],"93.0.4552.0":["15.0.0-nightly.20210625","15.0.0-nightly.20210628","15.0.0-nightly.20210629"],"93.0.4558.0":["15.0.0-nightly.20210630","15.0.0-nightly.20210701","15.0.0-nightly.20210702","15.0.0-nightly.20210705"],"94.0.4606.51":["15.0.0"],"94.0.4606.61":["15.1.0","15.1.1"],"94.0.4606.71":["15.1.2"],"94.0.4606.81":["15.2.0","15.3.0","15.3.1","15.3.2","15.3.3","15.3.4","15.3.5","15.3.6","15.3.7","15.4.0","15.4.1","15.4.2","15.5.0","15.5.1","15.5.2","15.5.3","15.5.4","15.5.5","15.5.6","15.5.7"],"95.0.4629.0":["16.0.0-alpha.1","16.0.0-alpha.2","16.0.0-alpha.3","16.0.0-alpha.4","16.0.0-alpha.5","16.0.0-alpha.6","16.0.0-alpha.7","16.0.0-nightly.20210902","16.0.0-nightly.20210903","16.0.0-nightly.20210906","16.0.0-nightly.20210907","16.0.0-nightly.20210908","16.0.0-nightly.20210909","16.0.0-nightly.20210910","16.0.0-nightly.20210913","16.0.0-nightly.20210914","16.0.0-nightly.20210915","16.0.0-nightly.20210916","16.0.0-nightly.20210917","16.0.0-nightly.20210920","16.0.0-nightly.20210921","16.0.0-nightly.20210922","17.0.0-nightly.20210923","17.0.0-nightly.20210924","17.0.0-nightly.20210927","17.0.0-nightly.20210928","17.0.0-nightly.20210929","17.0.0-nightly.20210930","17.0.0-nightly.20211001","17.0.0-nightly.20211004","17.0.0-nightly.20211005"],"96.0.4647.0":["16.0.0-alpha.8","16.0.0-alpha.9","16.0.0-beta.1","16.0.0-beta.2","16.0.0-beta.3","17.0.0-nightly.20211006","17.0.0-nightly.20211007","17.0.0-nightly.20211008","17.0.0-nightly.20211011","17.0.0-nightly.20211012","17.0.0-nightly.20211013","17.0.0-nightly.20211014","17.0.0-nightly.20211015","17.0.0-nightly.20211018","17.0.0-nightly.20211019","17.0.0-nightly.20211020","17.0.0-nightly.20211021"],"96.0.4664.18":["16.0.0-beta.4","16.0.0-beta.5"],"96.0.4664.27":["16.0.0-beta.6","16.0.0-beta.7"],"96.0.4664.35":["16.0.0-beta.8","16.0.0-beta.9"],"95.0.4612.5":["16.0.0-nightly.20210824","16.0.0-nightly.20210825","16.0.0-nightly.20210826","16.0.0-nightly.20210827","16.0.0-nightly.20210830","16.0.0-nightly.20210831","16.0.0-nightly.20210901"],"96.0.4664.45":["16.0.0","16.0.1"],"96.0.4664.55":["16.0.2","16.0.3","16.0.4","16.0.5"],"96.0.4664.110":["16.0.6","16.0.7","16.0.8"],"96.0.4664.174":["16.0.9","16.0.10","16.1.0","16.1.1","16.2.0","16.2.1","16.2.2","16.2.3","16.2.4","16.2.5","16.2.6","16.2.7","16.2.8"],"96.0.4664.4":["17.0.0-alpha.1","17.0.0-alpha.2","17.0.0-alpha.3","17.0.0-nightly.20211022","17.0.0-nightly.20211025","17.0.0-nightly.20211026","17.0.0-nightly.20211027","17.0.0-nightly.20211028","17.0.0-nightly.20211029","17.0.0-nightly.20211101","17.0.0-nightly.20211102","17.0.0-nightly.20211103","17.0.0-nightly.20211104","17.0.0-nightly.20211105","17.0.0-nightly.20211108","17.0.0-nightly.20211109","17.0.0-nightly.20211110","17.0.0-nightly.20211111","17.0.0-nightly.20211112","17.0.0-nightly.20211115","17.0.0-nightly.20211116","17.0.0-nightly.20211117","18.0.0-nightly.20211118","18.0.0-nightly.20211119","18.0.0-nightly.20211122","18.0.0-nightly.20211123"],"98.0.4706.0":["17.0.0-alpha.4","17.0.0-alpha.5","17.0.0-alpha.6","17.0.0-beta.1","17.0.0-beta.2","18.0.0-nightly.20211124","18.0.0-nightly.20211125","18.0.0-nightly.20211126","18.0.0-nightly.20211129","18.0.0-nightly.20211130","18.0.0-nightly.20211201","18.0.0-nightly.20211202","18.0.0-nightly.20211203","18.0.0-nightly.20211206","18.0.0-nightly.20211207","18.0.0-nightly.20211208","18.0.0-nightly.20211209","18.0.0-nightly.20211210","18.0.0-nightly.20211213","18.0.0-nightly.20211214","18.0.0-nightly.20211215","18.0.0-nightly.20211216","18.0.0-nightly.20211217","18.0.0-nightly.20211220","18.0.0-nightly.20211221","18.0.0-nightly.20211222","18.0.0-nightly.20211223","18.0.0-nightly.20211228","18.0.0-nightly.20211229","18.0.0-nightly.20211231","18.0.0-nightly.20220103","18.0.0-nightly.20220104","18.0.0-nightly.20220105","18.0.0-nightly.20220106","18.0.0-nightly.20220107","18.0.0-nightly.20220110"],"98.0.4758.9":["17.0.0-beta.3"],"98.0.4758.11":["17.0.0-beta.4","17.0.0-beta.5","17.0.0-beta.6","17.0.0-beta.7","17.0.0-beta.8","17.0.0-beta.9"],"98.0.4758.74":["17.0.0"],"98.0.4758.82":["17.0.1"],"98.0.4758.102":["17.1.0"],"98.0.4758.109":["17.1.1","17.1.2","17.2.0"],"98.0.4758.141":["17.3.0","17.3.1","17.4.0","17.4.1","17.4.2","17.4.3","17.4.4","17.4.5","17.4.6","17.4.7","17.4.8","17.4.9","17.4.10","17.4.11"],"99.0.4767.0":["18.0.0-alpha.1","18.0.0-alpha.2","18.0.0-alpha.3","18.0.0-alpha.4","18.0.0-alpha.5","18.0.0-nightly.20220111","18.0.0-nightly.20220112","18.0.0-nightly.20220113","18.0.0-nightly.20220114","18.0.0-nightly.20220117","18.0.0-nightly.20220118","18.0.0-nightly.20220119","18.0.0-nightly.20220121","18.0.0-nightly.20220124","18.0.0-nightly.20220125","18.0.0-nightly.20220127","18.0.0-nightly.20220128","18.0.0-nightly.20220131","18.0.0-nightly.20220201","19.0.0-nightly.20220202","19.0.0-nightly.20220203","19.0.0-nightly.20220204","19.0.0-nightly.20220207","19.0.0-nightly.20220208","19.0.0-nightly.20220209"],"100.0.4894.0":["18.0.0-beta.1","18.0.0-beta.2","18.0.0-beta.3","18.0.0-beta.4","18.0.0-beta.5","18.0.0-beta.6","19.0.0-nightly.20220308","19.0.0-nightly.20220309","19.0.0-nightly.20220310","19.0.0-nightly.20220311","19.0.0-nightly.20220314","19.0.0-nightly.20220315","19.0.0-nightly.20220316","19.0.0-nightly.20220317","19.0.0-nightly.20220318","19.0.0-nightly.20220321","19.0.0-nightly.20220322","19.0.0-nightly.20220323","19.0.0-nightly.20220324"],"100.0.4896.56":["18.0.0"],"100.0.4896.60":["18.0.1","18.0.2"],"100.0.4896.75":["18.0.3","18.0.4"],"100.0.4896.127":["18.1.0"],"100.0.4896.143":["18.2.0","18.2.1","18.2.2","18.2.3"],"100.0.4896.160":["18.2.4","18.3.0","18.3.1","18.3.2","18.3.3","18.3.4","18.3.5","18.3.6","18.3.7","18.3.8","18.3.9","18.3.11","18.3.12","18.3.13","18.3.14","18.3.15"],"102.0.4962.3":["19.0.0-alpha.1","19.0.0-nightly.20220328","19.0.0-nightly.20220329","20.0.0-nightly.20220330"],"102.0.4971.0":["19.0.0-alpha.2","19.0.0-alpha.3","20.0.0-nightly.20220411"],"102.0.4989.0":["19.0.0-alpha.4","19.0.0-alpha.5","20.0.0-nightly.20220414","20.0.0-nightly.20220415","20.0.0-nightly.20220418","20.0.0-nightly.20220419","20.0.0-nightly.20220420","20.0.0-nightly.20220421"],"102.0.4999.0":["19.0.0-beta.1","19.0.0-beta.2","19.0.0-beta.3","20.0.0-nightly.20220425","20.0.0-nightly.20220426","20.0.0-nightly.20220427","20.0.0-nightly.20220428","20.0.0-nightly.20220429","20.0.0-nightly.20220502","20.0.0-nightly.20220503","20.0.0-nightly.20220504","20.0.0-nightly.20220505","20.0.0-nightly.20220506","20.0.0-nightly.20220509","20.0.0-nightly.20220511","20.0.0-nightly.20220512","20.0.0-nightly.20220513","20.0.0-nightly.20220516","20.0.0-nightly.20220517"],"102.0.5005.27":["19.0.0-beta.4"],"102.0.5005.40":["19.0.0-beta.5","19.0.0-beta.6","19.0.0-beta.7"],"102.0.5005.49":["19.0.0-beta.8"],"102.0.4961.0":["19.0.0-nightly.20220325"],"102.0.5005.61":["19.0.0","19.0.1"],"102.0.5005.63":["19.0.2","19.0.3","19.0.4"],"102.0.5005.115":["19.0.5","19.0.6"],"102.0.5005.134":["19.0.7"],"102.0.5005.148":["19.0.8"],"102.0.5005.167":["19.0.9","19.0.10","19.0.11","19.0.12","19.0.13","19.0.14","19.0.15","19.0.16","19.0.17","19.1.0","19.1.1","19.1.2","19.1.3","19.1.4","19.1.5","19.1.6","19.1.7","19.1.8","19.1.9"],"103.0.5044.0":["20.0.0-alpha.1","20.0.0-nightly.20220518","20.0.0-nightly.20220519","20.0.0-nightly.20220520","20.0.0-nightly.20220523","20.0.0-nightly.20220524","21.0.0-nightly.20220526","21.0.0-nightly.20220527","21.0.0-nightly.20220530","21.0.0-nightly.20220531"],"104.0.5073.0":["20.0.0-alpha.2","20.0.0-alpha.3","20.0.0-alpha.4","20.0.0-alpha.5","20.0.0-alpha.6","20.0.0-alpha.7","20.0.0-beta.1","20.0.0-beta.2","20.0.0-beta.3","20.0.0-beta.4","20.0.0-beta.5","20.0.0-beta.6","20.0.0-beta.7","20.0.0-beta.8","21.0.0-nightly.20220602","21.0.0-nightly.20220603","21.0.0-nightly.20220606","21.0.0-nightly.20220607","21.0.0-nightly.20220608","21.0.0-nightly.20220609","21.0.0-nightly.20220610","21.0.0-nightly.20220613","21.0.0-nightly.20220614","21.0.0-nightly.20220615","21.0.0-nightly.20220616","21.0.0-nightly.20220617","21.0.0-nightly.20220620","21.0.0-nightly.20220621","21.0.0-nightly.20220622","21.0.0-nightly.20220623","21.0.0-nightly.20220624","21.0.0-nightly.20220627"],"104.0.5112.39":["20.0.0-beta.9"],"104.0.5112.48":["20.0.0-beta.10","20.0.0-beta.11","20.0.0-beta.12"],"104.0.5112.57":["20.0.0-beta.13"],"104.0.5112.65":["20.0.0"],"104.0.5112.81":["20.0.1","20.0.2","20.0.3"],"104.0.5112.102":["20.1.0","20.1.1"],"104.0.5112.114":["20.1.2","20.1.3","20.1.4"],"104.0.5112.124":["20.2.0","20.3.0","20.3.1","20.3.2","20.3.3","20.3.4","20.3.5","20.3.6","20.3.7","20.3.8","20.3.9","20.3.10","20.3.11","20.3.12"],"105.0.5187.0":["21.0.0-alpha.1","21.0.0-alpha.2","21.0.0-alpha.3","21.0.0-alpha.4","21.0.0-alpha.5","21.0.0-nightly.20220720","21.0.0-nightly.20220721","21.0.0-nightly.20220722","21.0.0-nightly.20220725","21.0.0-nightly.20220726","21.0.0-nightly.20220727","21.0.0-nightly.20220728","21.0.0-nightly.20220801","21.0.0-nightly.20220802","22.0.0-nightly.20220808","22.0.0-nightly.20220809","22.0.0-nightly.20220810","22.0.0-nightly.20220811","22.0.0-nightly.20220812","22.0.0-nightly.20220815","22.0.0-nightly.20220816","22.0.0-nightly.20220817"],"106.0.5216.0":["21.0.0-alpha.6","21.0.0-beta.1","21.0.0-beta.2","21.0.0-beta.3","21.0.0-beta.4","21.0.0-beta.5","22.0.0-nightly.20220822","22.0.0-nightly.20220823","22.0.0-nightly.20220824","22.0.0-nightly.20220825","22.0.0-nightly.20220829","22.0.0-nightly.20220830","22.0.0-nightly.20220831","22.0.0-nightly.20220901","22.0.0-nightly.20220902","22.0.0-nightly.20220905"],"106.0.5249.40":["21.0.0-beta.6","21.0.0-beta.7","21.0.0-beta.8"],"105.0.5129.0":["21.0.0-nightly.20220628","21.0.0-nightly.20220629","21.0.0-nightly.20220630","21.0.0-nightly.20220701","21.0.0-nightly.20220704","21.0.0-nightly.20220705","21.0.0-nightly.20220706","21.0.0-nightly.20220707","21.0.0-nightly.20220708","21.0.0-nightly.20220711","21.0.0-nightly.20220712","21.0.0-nightly.20220713"],"105.0.5173.0":["21.0.0-nightly.20220715","21.0.0-nightly.20220718","21.0.0-nightly.20220719"],"106.0.5249.51":["21.0.0"],"106.0.5249.61":["21.0.1"],"106.0.5249.91":["21.1.0"],"106.0.5249.103":["21.1.1"],"106.0.5249.119":["21.2.0"],"106.0.5249.165":["21.2.1"],"106.0.5249.168":["21.2.2","21.2.3"],"106.0.5249.181":["21.3.0","21.3.1"],"106.0.5249.199":["21.3.3","21.3.4","21.3.5","21.4.0","21.4.1","21.4.2","21.4.3","21.4.4"],"107.0.5286.0":["22.0.0-alpha.1","22.0.0-nightly.20220909","22.0.0-nightly.20220912","22.0.0-nightly.20220913","22.0.0-nightly.20220914","22.0.0-nightly.20220915","22.0.0-nightly.20220916","22.0.0-nightly.20220919","22.0.0-nightly.20220920","22.0.0-nightly.20220921","22.0.0-nightly.20220922","22.0.0-nightly.20220923","22.0.0-nightly.20220926","22.0.0-nightly.20220927","22.0.0-nightly.20220928","23.0.0-nightly.20220929","23.0.0-nightly.20220930","23.0.0-nightly.20221003"],"108.0.5329.0":["22.0.0-alpha.3","22.0.0-alpha.4","22.0.0-alpha.5","22.0.0-alpha.6","23.0.0-nightly.20221004","23.0.0-nightly.20221005","23.0.0-nightly.20221006","23.0.0-nightly.20221007","23.0.0-nightly.20221010","23.0.0-nightly.20221011","23.0.0-nightly.20221012","23.0.0-nightly.20221013","23.0.0-nightly.20221014","23.0.0-nightly.20221017"],"108.0.5355.0":["22.0.0-alpha.7","23.0.0-nightly.20221018","23.0.0-nightly.20221019","23.0.0-nightly.20221020","23.0.0-nightly.20221021","23.0.0-nightly.20221024","23.0.0-nightly.20221026"],"108.0.5359.10":["22.0.0-alpha.8","22.0.0-beta.1","22.0.0-beta.2","22.0.0-beta.3"],"108.0.5359.29":["22.0.0-beta.4"],"108.0.5359.40":["22.0.0-beta.5","22.0.0-beta.6"],"108.0.5359.48":["22.0.0-beta.7","22.0.0-beta.8"],"107.0.5274.0":["22.0.0-nightly.20220908"],"108.0.5359.62":["22.0.0"],"108.0.5359.125":["22.0.1"],"108.0.5359.179":["22.0.2","22.0.3","22.1.0"],"108.0.5359.215":["22.2.0","22.2.1","22.3.0","22.3.1","22.3.2","22.3.3","22.3.4","22.3.5","22.3.6","22.3.7","22.3.8","22.3.9","22.3.10","22.3.11","22.3.12","22.3.13","22.3.14","22.3.15","22.3.16","22.3.17","22.3.18","22.3.20","22.3.21","22.3.22","22.3.23","22.3.24","22.3.25","22.3.26","22.3.27"],"110.0.5415.0":["23.0.0-alpha.1","23.0.0-nightly.20221118","23.0.0-nightly.20221121","23.0.0-nightly.20221122","23.0.0-nightly.20221123","23.0.0-nightly.20221124","23.0.0-nightly.20221125","23.0.0-nightly.20221128","23.0.0-nightly.20221129","23.0.0-nightly.20221130","24.0.0-nightly.20221201","24.0.0-nightly.20221202","24.0.0-nightly.20221205"],"110.0.5451.0":["23.0.0-alpha.2","23.0.0-alpha.3","24.0.0-nightly.20221206","24.0.0-nightly.20221207","24.0.0-nightly.20221208","24.0.0-nightly.20221213","24.0.0-nightly.20221214","24.0.0-nightly.20221215","24.0.0-nightly.20221216"],"110.0.5478.5":["23.0.0-beta.1","23.0.0-beta.2","23.0.0-beta.3"],"110.0.5481.30":["23.0.0-beta.4"],"110.0.5481.38":["23.0.0-beta.5"],"110.0.5481.52":["23.0.0-beta.6","23.0.0-beta.8"],"109.0.5382.0":["23.0.0-nightly.20221027","23.0.0-nightly.20221028","23.0.0-nightly.20221031","23.0.0-nightly.20221101","23.0.0-nightly.20221102","23.0.0-nightly.20221103","23.0.0-nightly.20221104","23.0.0-nightly.20221107","23.0.0-nightly.20221108","23.0.0-nightly.20221109","23.0.0-nightly.20221110","23.0.0-nightly.20221111","23.0.0-nightly.20221114","23.0.0-nightly.20221115","23.0.0-nightly.20221116","23.0.0-nightly.20221117"],"110.0.5481.77":["23.0.0"],"110.0.5481.100":["23.1.0"],"110.0.5481.104":["23.1.1"],"110.0.5481.177":["23.1.2"],"110.0.5481.179":["23.1.3"],"110.0.5481.192":["23.1.4","23.2.0"],"110.0.5481.208":["23.2.1","23.2.2","23.2.3","23.2.4","23.3.0","23.3.1","23.3.2","23.3.3","23.3.4","23.3.5","23.3.6","23.3.7","23.3.8","23.3.9","23.3.10","23.3.11","23.3.12","23.3.13"],"111.0.5560.0":["24.0.0-alpha.1","24.0.0-alpha.2","24.0.0-alpha.3","24.0.0-alpha.4","24.0.0-alpha.5","24.0.0-alpha.6","24.0.0-alpha.7","24.0.0-nightly.20230203","24.0.0-nightly.20230206","24.0.0-nightly.20230207","24.0.0-nightly.20230208","24.0.0-nightly.20230209","25.0.0-nightly.20230210","25.0.0-nightly.20230214","25.0.0-nightly.20230215","25.0.0-nightly.20230216","25.0.0-nightly.20230217","25.0.0-nightly.20230220","25.0.0-nightly.20230221","25.0.0-nightly.20230222","25.0.0-nightly.20230223","25.0.0-nightly.20230224","25.0.0-nightly.20230227","25.0.0-nightly.20230228","25.0.0-nightly.20230301","25.0.0-nightly.20230302","25.0.0-nightly.20230303","25.0.0-nightly.20230306","25.0.0-nightly.20230307","25.0.0-nightly.20230308","25.0.0-nightly.20230309","25.0.0-nightly.20230310"],"111.0.5563.50":["24.0.0-beta.1","24.0.0-beta.2"],"112.0.5615.20":["24.0.0-beta.3","24.0.0-beta.4"],"112.0.5615.29":["24.0.0-beta.5"],"112.0.5615.39":["24.0.0-beta.6","24.0.0-beta.7"],"111.0.5518.0":["24.0.0-nightly.20230109","24.0.0-nightly.20230110","24.0.0-nightly.20230111","24.0.0-nightly.20230112","24.0.0-nightly.20230113","24.0.0-nightly.20230116","24.0.0-nightly.20230117","24.0.0-nightly.20230118","24.0.0-nightly.20230119","24.0.0-nightly.20230120","24.0.0-nightly.20230123","24.0.0-nightly.20230124","24.0.0-nightly.20230125","24.0.0-nightly.20230126","24.0.0-nightly.20230127","24.0.0-nightly.20230131","24.0.0-nightly.20230201","24.0.0-nightly.20230202"],"112.0.5615.49":["24.0.0"],"112.0.5615.50":["24.1.0","24.1.1"],"112.0.5615.87":["24.1.2"],"112.0.5615.165":["24.1.3","24.2.0","24.3.0"],"112.0.5615.183":["24.3.1"],"112.0.5615.204":["24.4.0","24.4.1","24.5.0","24.5.1","24.6.0","24.6.1","24.6.2","24.6.3","24.6.4","24.6.5","24.7.0","24.7.1","24.8.0","24.8.1","24.8.2","24.8.3","24.8.4","24.8.5","24.8.6","24.8.7","24.8.8"],"114.0.5694.0":["25.0.0-alpha.1","25.0.0-alpha.2","25.0.0-nightly.20230405","26.0.0-nightly.20230406","26.0.0-nightly.20230407","26.0.0-nightly.20230410","26.0.0-nightly.20230411"],"114.0.5710.0":["25.0.0-alpha.3","25.0.0-alpha.4","26.0.0-nightly.20230413","26.0.0-nightly.20230414","26.0.0-nightly.20230417"],"114.0.5719.0":["25.0.0-alpha.5","25.0.0-alpha.6","25.0.0-beta.1","25.0.0-beta.2","25.0.0-beta.3","26.0.0-nightly.20230421","26.0.0-nightly.20230424","26.0.0-nightly.20230425","26.0.0-nightly.20230426","26.0.0-nightly.20230427","26.0.0-nightly.20230428","26.0.0-nightly.20230501","26.0.0-nightly.20230502","26.0.0-nightly.20230503","26.0.0-nightly.20230504","26.0.0-nightly.20230505","26.0.0-nightly.20230508","26.0.0-nightly.20230509","26.0.0-nightly.20230510"],"114.0.5735.16":["25.0.0-beta.4","25.0.0-beta.5","25.0.0-beta.6","25.0.0-beta.7"],"114.0.5735.35":["25.0.0-beta.8"],"114.0.5735.45":["25.0.0-beta.9","25.0.0","25.0.1"],"113.0.5636.0":["25.0.0-nightly.20230314"],"113.0.5651.0":["25.0.0-nightly.20230315"],"113.0.5653.0":["25.0.0-nightly.20230317"],"113.0.5660.0":["25.0.0-nightly.20230320"],"113.0.5664.0":["25.0.0-nightly.20230321"],"113.0.5666.0":["25.0.0-nightly.20230322"],"113.0.5668.0":["25.0.0-nightly.20230323"],"113.0.5670.0":["25.0.0-nightly.20230324","25.0.0-nightly.20230327","25.0.0-nightly.20230328","25.0.0-nightly.20230329","25.0.0-nightly.20230330"],"114.0.5684.0":["25.0.0-nightly.20230331","25.0.0-nightly.20230403"],"114.0.5692.0":["25.0.0-nightly.20230404"],"114.0.5735.106":["25.1.0","25.1.1"],"114.0.5735.134":["25.2.0"],"114.0.5735.199":["25.3.0"],"114.0.5735.243":["25.3.1"],"114.0.5735.248":["25.3.2","25.4.0"],"114.0.5735.289":["25.5.0","25.6.0","25.7.0","25.8.0","25.8.1","25.8.2","25.8.3","25.8.4","25.9.0","25.9.1","25.9.2","25.9.3","25.9.4","25.9.5","25.9.6","25.9.7"],"116.0.5791.0":["26.0.0-alpha.1","26.0.0-alpha.2","26.0.0-alpha.3","26.0.0-alpha.4","26.0.0-alpha.5","26.0.0-nightly.20230526","26.0.0-nightly.20230529","26.0.0-nightly.20230530","26.0.0-nightly.20230531","27.0.0-nightly.20230601","27.0.0-nightly.20230602","27.0.0-nightly.20230605","27.0.0-nightly.20230606","27.0.0-nightly.20230607","27.0.0-nightly.20230609"],"116.0.5815.0":["26.0.0-alpha.6","27.0.0-nightly.20230612","27.0.0-nightly.20230613"],"116.0.5831.0":["26.0.0-alpha.7","27.0.0-nightly.20230615"],"116.0.5845.0":["26.0.0-alpha.8","26.0.0-beta.1","27.0.0-nightly.20230622","27.0.0-nightly.20230623","27.0.0-nightly.20230626","27.0.0-nightly.20230627","27.0.0-nightly.20230628","27.0.0-nightly.20230629","27.0.0-nightly.20230630"],"116.0.5845.14":["26.0.0-beta.2","26.0.0-beta.3","26.0.0-beta.4","26.0.0-beta.5","26.0.0-beta.6","26.0.0-beta.7"],"116.0.5845.42":["26.0.0-beta.8","26.0.0-beta.9"],"116.0.5845.49":["26.0.0-beta.10","26.0.0-beta.11"],"116.0.5845.62":["26.0.0-beta.12"],"114.0.5708.0":["26.0.0-nightly.20230412"],"114.0.5715.0":["26.0.0-nightly.20230418"],"115.0.5760.0":["26.0.0-nightly.20230511","26.0.0-nightly.20230512","26.0.0-nightly.20230515","26.0.0-nightly.20230516","26.0.0-nightly.20230517","26.0.0-nightly.20230518","26.0.0-nightly.20230519","26.0.0-nightly.20230522","26.0.0-nightly.20230523"],"115.0.5786.0":["26.0.0-nightly.20230524"],"115.0.5790.0":["26.0.0-nightly.20230525"],"116.0.5845.82":["26.0.0"],"116.0.5845.97":["26.1.0"],"116.0.5845.179":["26.2.0"],"116.0.5845.188":["26.2.1"],"116.0.5845.190":["26.2.2","26.2.3","26.2.4"],"116.0.5845.228":["26.3.0","26.4.0","26.4.1","26.4.2","26.4.3","26.5.0","26.6.0","26.6.1","26.6.2"],"118.0.5949.0":["27.0.0-alpha.1","27.0.0-alpha.2","27.0.0-alpha.3","27.0.0-alpha.4","27.0.0-alpha.5","27.0.0-alpha.6","27.0.0-nightly.20230816","28.0.0-nightly.20230817","28.0.0-nightly.20230818","28.0.0-nightly.20230821","28.0.0-nightly.20230822","28.0.0-nightly.20230823","28.0.0-nightly.20230824","28.0.0-nightly.20230825","28.0.0-nightly.20230828","28.0.0-nightly.20230829","28.0.0-nightly.20230830","28.0.0-nightly.20230831"],"118.0.5993.5":["27.0.0-beta.1","27.0.0-beta.2","27.0.0-beta.3"],"118.0.5993.11":["27.0.0-beta.4"],"118.0.5993.18":["27.0.0-beta.5","27.0.0-beta.6","27.0.0-beta.7","27.0.0-beta.8","27.0.0-beta.9"],"116.0.5829.0":["27.0.0-nightly.20230614"],"116.0.5833.0":["27.0.0-nightly.20230616","27.0.0-nightly.20230619","27.0.0-nightly.20230620","27.0.0-nightly.20230621"],"117.0.5852.0":["27.0.0-nightly.20230703","27.0.0-nightly.20230704","27.0.0-nightly.20230705","27.0.0-nightly.20230706","27.0.0-nightly.20230707","27.0.0-nightly.20230710","27.0.0-nightly.20230711","27.0.0-nightly.20230712","27.0.0-nightly.20230713","27.0.0-nightly.20230714"],"117.0.5884.1":["27.0.0-nightly.20230717","27.0.0-nightly.20230718"],"117.0.5892.0":["27.0.0-nightly.20230719"],"117.0.5897.0":["27.0.0-nightly.20230720","27.0.0-nightly.20230721","27.0.0-nightly.20230724","27.0.0-nightly.20230725","27.0.0-nightly.20230726","27.0.0-nightly.20230727","27.0.0-nightly.20230728","27.0.0-nightly.20230731"],"117.0.5911.0":["27.0.0-nightly.20230801","27.0.0-nightly.20230802","27.0.0-nightly.20230803"],"117.0.5921.0":["27.0.0-nightly.20230804","27.0.0-nightly.20230807","27.0.0-nightly.20230808","27.0.0-nightly.20230814","27.0.0-nightly.20230815"],"118.0.5993.54":["27.0.0"],"118.0.5993.89":["27.0.1","27.0.2"],"118.0.5993.120":["27.0.3"],"118.0.5993.129":["27.0.4"],"118.0.5993.144":["27.1.0","27.1.2"],"118.0.5993.159":["27.1.3"],"119.0.6045.0":["28.0.0-alpha.1","28.0.0-alpha.2","28.0.0-nightly.20231006","28.0.0-nightly.20231009","28.0.0-nightly.20231010","28.0.0-nightly.20231011","29.0.0-nightly.20231012","29.0.0-nightly.20231013","29.0.0-nightly.20231016","29.0.0-nightly.20231017","29.0.0-nightly.20231018","29.0.0-nightly.20231019","29.0.0-nightly.20231020","29.0.0-nightly.20231023","29.0.0-nightly.20231024"],"119.0.6045.21":["28.0.0-alpha.3","28.0.0-alpha.4"],"119.0.6045.33":["28.0.0-alpha.5","28.0.0-alpha.6","28.0.0-alpha.7","28.0.0-beta.1"],"120.0.6099.0":["28.0.0-beta.2"],"120.0.6099.5":["28.0.0-beta.3","28.0.0-beta.4"],"120.0.6099.18":["28.0.0-beta.5","28.0.0-beta.6","28.0.0-beta.7","28.0.0-beta.8","28.0.0-beta.9","28.0.0-beta.10"],"120.0.6099.35":["28.0.0-beta.11"],"118.0.5991.0":["28.0.0-nightly.20230906"],"118.0.5993.0":["28.0.0-nightly.20230907","28.0.0-nightly.20230908","28.0.0-nightly.20230911","28.0.0-nightly.20230912","28.0.0-nightly.20230913","28.0.0-nightly.20230914","28.0.0-nightly.20230915"],"119.0.6006.0":["28.0.0-nightly.20230919"],"119.0.6017.0":["28.0.0-nightly.20230920"],"119.0.6019.2":["28.0.0-nightly.20230921","28.0.0-nightly.20230925","28.0.0-nightly.20230926","28.0.0-nightly.20230927","28.0.0-nightly.20230928"],"119.0.6029.0":["28.0.0-nightly.20230929","28.0.0-nightly.20231002"],"119.0.6043.0":["28.0.0-nightly.20231003","28.0.0-nightly.20231004","28.0.0-nightly.20231005"],"120.0.6078.0":["29.0.0-nightly.20231025","29.0.0-nightly.20231026","29.0.0-nightly.20231027","29.0.0-nightly.20231030","29.0.0-nightly.20231031","29.0.0-nightly.20231101"],"121.0.6100.0":["29.0.0-nightly.20231102","29.0.0-nightly.20231103"],"121.0.6104.0":["29.0.0-nightly.20231106"],"121.0.6110.0":["29.0.0-nightly.20231107","29.0.0-nightly.20231108","29.0.0-nightly.20231109","29.0.0-nightly.20231110","29.0.0-nightly.20231113","29.0.0-nightly.20231114"],"121.0.6116.0":["29.0.0-nightly.20231115","29.0.0-nightly.20231116","29.0.0-nightly.20231117","29.0.0-nightly.20231120","29.0.0-nightly.20231121","29.0.0-nightly.20231122","29.0.0-nightly.20231123","29.0.0-nightly.20231124","29.0.0-nightly.20231127","29.0.0-nightly.20231128"],"121.0.6147.0":["29.0.0-nightly.20231129","29.0.0-nightly.20231130","29.0.0-nightly.20231201"]} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/electron-to-chromium/full-versions.js b/tools/node_modules/eslint/node_modules/electron-to-chromium/full-versions.js index b3593a4450df8d..2465f89719adab 100644 --- a/tools/node_modules/eslint/node_modules/electron-to-chromium/full-versions.js +++ b/tools/node_modules/eslint/node_modules/electron-to-chromium/full-versions.js @@ -1919,6 +1919,10 @@ module.exports = { "25.9.1": "114.0.5735.289", "25.9.2": "114.0.5735.289", "25.9.3": "114.0.5735.289", + "25.9.4": "114.0.5735.289", + "25.9.5": "114.0.5735.289", + "25.9.6": "114.0.5735.289", + "25.9.7": "114.0.5735.289", "26.0.0-alpha.1": "116.0.5791.0", "26.0.0-alpha.2": "116.0.5791.0", "26.0.0-alpha.3": "116.0.5791.0", @@ -1989,6 +1993,10 @@ module.exports = { "26.4.1": "116.0.5845.228", "26.4.2": "116.0.5845.228", "26.4.3": "116.0.5845.228", + "26.5.0": "116.0.5845.228", + "26.6.0": "116.0.5845.228", + "26.6.1": "116.0.5845.228", + "26.6.2": "116.0.5845.228", "27.0.0-alpha.1": "118.0.5949.0", "27.0.0-alpha.2": "118.0.5949.0", "27.0.0-alpha.3": "118.0.5949.0", @@ -2059,6 +2067,10 @@ module.exports = { "27.0.1": "118.0.5993.89", "27.0.2": "118.0.5993.89", "27.0.3": "118.0.5993.120", + "27.0.4": "118.0.5993.129", + "27.1.0": "118.0.5993.144", + "27.1.2": "118.0.5993.144", + "27.1.3": "118.0.5993.159", "28.0.0-alpha.1": "119.0.6045.0", "28.0.0-alpha.2": "119.0.6045.0", "28.0.0-alpha.3": "119.0.6045.21", @@ -2068,6 +2080,15 @@ module.exports = { "28.0.0-alpha.7": "119.0.6045.33", "28.0.0-beta.1": "119.0.6045.33", "28.0.0-beta.2": "120.0.6099.0", + "28.0.0-beta.3": "120.0.6099.5", + "28.0.0-beta.4": "120.0.6099.5", + "28.0.0-beta.5": "120.0.6099.18", + "28.0.0-beta.6": "120.0.6099.18", + "28.0.0-beta.7": "120.0.6099.18", + "28.0.0-beta.8": "120.0.6099.18", + "28.0.0-beta.9": "120.0.6099.18", + "28.0.0-beta.10": "120.0.6099.18", + "28.0.0-beta.11": "120.0.6099.35", "28.0.0-nightly.20230817": "118.0.5949.0", "28.0.0-nightly.20230818": "118.0.5949.0", "28.0.0-nightly.20230821": "118.0.5949.0", @@ -2119,5 +2140,25 @@ module.exports = { "29.0.0-nightly.20231031": "120.0.6078.0", "29.0.0-nightly.20231101": "120.0.6078.0", "29.0.0-nightly.20231102": "121.0.6100.0", - "29.0.0-nightly.20231103": "121.0.6100.0" + "29.0.0-nightly.20231103": "121.0.6100.0", + "29.0.0-nightly.20231106": "121.0.6104.0", + "29.0.0-nightly.20231107": "121.0.6110.0", + "29.0.0-nightly.20231108": "121.0.6110.0", + "29.0.0-nightly.20231109": "121.0.6110.0", + "29.0.0-nightly.20231110": "121.0.6110.0", + "29.0.0-nightly.20231113": "121.0.6110.0", + "29.0.0-nightly.20231114": "121.0.6110.0", + "29.0.0-nightly.20231115": "121.0.6116.0", + "29.0.0-nightly.20231116": "121.0.6116.0", + "29.0.0-nightly.20231117": "121.0.6116.0", + "29.0.0-nightly.20231120": "121.0.6116.0", + "29.0.0-nightly.20231121": "121.0.6116.0", + "29.0.0-nightly.20231122": "121.0.6116.0", + "29.0.0-nightly.20231123": "121.0.6116.0", + "29.0.0-nightly.20231124": "121.0.6116.0", + "29.0.0-nightly.20231127": "121.0.6116.0", + "29.0.0-nightly.20231128": "121.0.6116.0", + "29.0.0-nightly.20231129": "121.0.6147.0", + "29.0.0-nightly.20231130": "121.0.6147.0", + "29.0.0-nightly.20231201": "121.0.6147.0" }; \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/electron-to-chromium/full-versions.json b/tools/node_modules/eslint/node_modules/electron-to-chromium/full-versions.json index 175dcd649ad844..1470e3b28ff1be 100644 --- a/tools/node_modules/eslint/node_modules/electron-to-chromium/full-versions.json +++ b/tools/node_modules/eslint/node_modules/electron-to-chromium/full-versions.json @@ -1 +1 @@ -{"0.20.0":"39.0.2171.65","0.20.1":"39.0.2171.65","0.20.2":"39.0.2171.65","0.20.3":"39.0.2171.65","0.20.4":"39.0.2171.65","0.20.5":"39.0.2171.65","0.20.6":"39.0.2171.65","0.20.7":"39.0.2171.65","0.20.8":"39.0.2171.65","0.21.0":"40.0.2214.91","0.21.1":"40.0.2214.91","0.21.2":"40.0.2214.91","0.21.3":"41.0.2272.76","0.22.1":"41.0.2272.76","0.22.2":"41.0.2272.76","0.22.3":"41.0.2272.76","0.23.0":"41.0.2272.76","0.24.0":"41.0.2272.76","0.25.0":"42.0.2311.107","0.25.1":"42.0.2311.107","0.25.2":"42.0.2311.107","0.25.3":"42.0.2311.107","0.26.0":"42.0.2311.107","0.26.1":"42.0.2311.107","0.27.0":"42.0.2311.107","0.27.1":"42.0.2311.107","0.27.2":"43.0.2357.65","0.27.3":"43.0.2357.65","0.28.0":"43.0.2357.65","0.28.1":"43.0.2357.65","0.28.2":"43.0.2357.65","0.28.3":"43.0.2357.65","0.29.1":"43.0.2357.65","0.29.2":"43.0.2357.65","0.30.4":"44.0.2403.125","0.31.0":"44.0.2403.125","0.31.2":"45.0.2454.85","0.32.2":"45.0.2454.85","0.32.3":"45.0.2454.85","0.33.0":"45.0.2454.85","0.33.1":"45.0.2454.85","0.33.2":"45.0.2454.85","0.33.3":"45.0.2454.85","0.33.4":"45.0.2454.85","0.33.6":"45.0.2454.85","0.33.7":"45.0.2454.85","0.33.8":"45.0.2454.85","0.33.9":"45.0.2454.85","0.34.0":"45.0.2454.85","0.34.1":"45.0.2454.85","0.34.2":"45.0.2454.85","0.34.3":"45.0.2454.85","0.34.4":"45.0.2454.85","0.35.1":"45.0.2454.85","0.35.2":"45.0.2454.85","0.35.3":"45.0.2454.85","0.35.4":"45.0.2454.85","0.35.5":"45.0.2454.85","0.36.0":"47.0.2526.73","0.36.2":"47.0.2526.73","0.36.3":"47.0.2526.73","0.36.4":"47.0.2526.73","0.36.5":"47.0.2526.110","0.36.6":"47.0.2526.110","0.36.7":"47.0.2526.110","0.36.8":"47.0.2526.110","0.36.9":"47.0.2526.110","0.36.10":"47.0.2526.110","0.36.11":"47.0.2526.110","0.36.12":"47.0.2526.110","0.37.0":"49.0.2623.75","0.37.1":"49.0.2623.75","0.37.3":"49.0.2623.75","0.37.4":"49.0.2623.75","0.37.5":"49.0.2623.75","0.37.6":"49.0.2623.75","0.37.7":"49.0.2623.75","0.37.8":"49.0.2623.75","1.0.0":"49.0.2623.75","1.0.1":"49.0.2623.75","1.0.2":"49.0.2623.75","1.1.0":"50.0.2661.102","1.1.1":"50.0.2661.102","1.1.2":"50.0.2661.102","1.1.3":"50.0.2661.102","1.2.0":"51.0.2704.63","1.2.1":"51.0.2704.63","1.2.2":"51.0.2704.84","1.2.3":"51.0.2704.84","1.2.4":"51.0.2704.103","1.2.5":"51.0.2704.103","1.2.6":"51.0.2704.106","1.2.7":"51.0.2704.106","1.2.8":"51.0.2704.106","1.3.0":"52.0.2743.82","1.3.1":"52.0.2743.82","1.3.2":"52.0.2743.82","1.3.3":"52.0.2743.82","1.3.4":"52.0.2743.82","1.3.5":"52.0.2743.82","1.3.6":"52.0.2743.82","1.3.7":"52.0.2743.82","1.3.9":"52.0.2743.82","1.3.10":"52.0.2743.82","1.3.13":"52.0.2743.82","1.3.14":"52.0.2743.82","1.3.15":"52.0.2743.82","1.4.0":"53.0.2785.113","1.4.1":"53.0.2785.113","1.4.2":"53.0.2785.113","1.4.3":"53.0.2785.113","1.4.4":"53.0.2785.113","1.4.5":"53.0.2785.113","1.4.6":"53.0.2785.143","1.4.7":"53.0.2785.143","1.4.8":"53.0.2785.143","1.4.10":"53.0.2785.143","1.4.11":"53.0.2785.143","1.4.12":"54.0.2840.51","1.4.13":"53.0.2785.143","1.4.14":"53.0.2785.143","1.4.15":"53.0.2785.143","1.4.16":"53.0.2785.143","1.5.0":"54.0.2840.101","1.5.1":"54.0.2840.101","1.6.0":"56.0.2924.87","1.6.1":"56.0.2924.87","1.6.2":"56.0.2924.87","1.6.3":"56.0.2924.87","1.6.4":"56.0.2924.87","1.6.5":"56.0.2924.87","1.6.6":"56.0.2924.87","1.6.7":"56.0.2924.87","1.6.8":"56.0.2924.87","1.6.9":"56.0.2924.87","1.6.10":"56.0.2924.87","1.6.11":"56.0.2924.87","1.6.12":"56.0.2924.87","1.6.13":"56.0.2924.87","1.6.14":"56.0.2924.87","1.6.15":"56.0.2924.87","1.6.16":"56.0.2924.87","1.6.17":"56.0.2924.87","1.6.18":"56.0.2924.87","1.7.0":"58.0.3029.110","1.7.1":"58.0.3029.110","1.7.2":"58.0.3029.110","1.7.3":"58.0.3029.110","1.7.4":"58.0.3029.110","1.7.5":"58.0.3029.110","1.7.6":"58.0.3029.110","1.7.7":"58.0.3029.110","1.7.8":"58.0.3029.110","1.7.9":"58.0.3029.110","1.7.10":"58.0.3029.110","1.7.11":"58.0.3029.110","1.7.12":"58.0.3029.110","1.7.13":"58.0.3029.110","1.7.14":"58.0.3029.110","1.7.15":"58.0.3029.110","1.7.16":"58.0.3029.110","1.8.0":"59.0.3071.115","1.8.1":"59.0.3071.115","1.8.2-beta.1":"59.0.3071.115","1.8.2-beta.2":"59.0.3071.115","1.8.2-beta.3":"59.0.3071.115","1.8.2-beta.4":"59.0.3071.115","1.8.2-beta.5":"59.0.3071.115","1.8.2":"59.0.3071.115","1.8.3":"59.0.3071.115","1.8.4":"59.0.3071.115","1.8.5":"59.0.3071.115","1.8.6":"59.0.3071.115","1.8.7":"59.0.3071.115","1.8.8":"59.0.3071.115","2.0.0-beta.1":"61.0.3163.100","2.0.0-beta.2":"61.0.3163.100","2.0.0-beta.3":"61.0.3163.100","2.0.0-beta.4":"61.0.3163.100","2.0.0-beta.5":"61.0.3163.100","2.0.0-beta.6":"61.0.3163.100","2.0.0-beta.7":"61.0.3163.100","2.0.0-beta.8":"61.0.3163.100","2.0.0":"61.0.3163.100","2.0.1":"61.0.3163.100","2.0.2":"61.0.3163.100","2.0.3":"61.0.3163.100","2.0.4":"61.0.3163.100","2.0.5":"61.0.3163.100","2.0.6":"61.0.3163.100","2.0.7":"61.0.3163.100","2.0.8-nightly.20180819":"61.0.3163.100","2.0.8-nightly.20180820":"61.0.3163.100","2.0.8":"61.0.3163.100","2.0.9":"61.0.3163.100","2.0.10":"61.0.3163.100","2.0.11":"61.0.3163.100","2.0.12":"61.0.3163.100","2.0.13":"61.0.3163.100","2.0.14":"61.0.3163.100","2.0.15":"61.0.3163.100","2.0.16":"61.0.3163.100","2.0.17":"61.0.3163.100","2.0.18":"61.0.3163.100","2.1.0-unsupported.20180809":"61.0.3163.100","3.0.0-beta.1":"66.0.3359.181","3.0.0-beta.2":"66.0.3359.181","3.0.0-beta.3":"66.0.3359.181","3.0.0-beta.4":"66.0.3359.181","3.0.0-beta.5":"66.0.3359.181","3.0.0-beta.6":"66.0.3359.181","3.0.0-beta.7":"66.0.3359.181","3.0.0-beta.8":"66.0.3359.181","3.0.0-beta.9":"66.0.3359.181","3.0.0-beta.10":"66.0.3359.181","3.0.0-beta.11":"66.0.3359.181","3.0.0-beta.12":"66.0.3359.181","3.0.0-beta.13":"66.0.3359.181","3.0.0-nightly.20180818":"66.0.3359.181","3.0.0-nightly.20180821":"66.0.3359.181","3.0.0-nightly.20180823":"66.0.3359.181","3.0.0-nightly.20180904":"66.0.3359.181","3.0.0":"66.0.3359.181","3.0.1":"66.0.3359.181","3.0.2":"66.0.3359.181","3.0.3":"66.0.3359.181","3.0.4":"66.0.3359.181","3.0.5":"66.0.3359.181","3.0.6":"66.0.3359.181","3.0.7":"66.0.3359.181","3.0.8":"66.0.3359.181","3.0.9":"66.0.3359.181","3.0.10":"66.0.3359.181","3.0.11":"66.0.3359.181","3.0.12":"66.0.3359.181","3.0.13":"66.0.3359.181","3.0.14":"66.0.3359.181","3.0.15":"66.0.3359.181","3.0.16":"66.0.3359.181","3.1.0-beta.1":"66.0.3359.181","3.1.0-beta.2":"66.0.3359.181","3.1.0-beta.3":"66.0.3359.181","3.1.0-beta.4":"66.0.3359.181","3.1.0-beta.5":"66.0.3359.181","3.1.0":"66.0.3359.181","3.1.1":"66.0.3359.181","3.1.2":"66.0.3359.181","3.1.3":"66.0.3359.181","3.1.4":"66.0.3359.181","3.1.5":"66.0.3359.181","3.1.6":"66.0.3359.181","3.1.7":"66.0.3359.181","3.1.8":"66.0.3359.181","3.1.9":"66.0.3359.181","3.1.10":"66.0.3359.181","3.1.11":"66.0.3359.181","3.1.12":"66.0.3359.181","3.1.13":"66.0.3359.181","4.0.0-beta.1":"69.0.3497.106","4.0.0-beta.2":"69.0.3497.106","4.0.0-beta.3":"69.0.3497.106","4.0.0-beta.4":"69.0.3497.106","4.0.0-beta.5":"69.0.3497.106","4.0.0-beta.6":"69.0.3497.106","4.0.0-beta.7":"69.0.3497.106","4.0.0-beta.8":"69.0.3497.106","4.0.0-beta.9":"69.0.3497.106","4.0.0-beta.10":"69.0.3497.106","4.0.0-beta.11":"69.0.3497.106","4.0.0-nightly.20180817":"66.0.3359.181","4.0.0-nightly.20180819":"66.0.3359.181","4.0.0-nightly.20180821":"66.0.3359.181","4.0.0-nightly.20180929":"67.0.3396.99","4.0.0-nightly.20181006":"68.0.3440.128","4.0.0-nightly.20181010":"69.0.3497.106","4.0.0":"69.0.3497.106","4.0.1":"69.0.3497.106","4.0.2":"69.0.3497.106","4.0.3":"69.0.3497.106","4.0.4":"69.0.3497.106","4.0.5":"69.0.3497.106","4.0.6":"69.0.3497.106","4.0.7":"69.0.3497.128","4.0.8":"69.0.3497.128","4.1.0":"69.0.3497.128","4.1.1":"69.0.3497.128","4.1.2":"69.0.3497.128","4.1.3":"69.0.3497.128","4.1.4":"69.0.3497.128","4.1.5":"69.0.3497.128","4.2.0":"69.0.3497.128","4.2.1":"69.0.3497.128","4.2.2":"69.0.3497.128","4.2.3":"69.0.3497.128","4.2.4":"69.0.3497.128","4.2.5":"69.0.3497.128","4.2.6":"69.0.3497.128","4.2.7":"69.0.3497.128","4.2.8":"69.0.3497.128","4.2.9":"69.0.3497.128","4.2.10":"69.0.3497.128","4.2.11":"69.0.3497.128","4.2.12":"69.0.3497.128","5.0.0-beta.1":"72.0.3626.52","5.0.0-beta.2":"72.0.3626.52","5.0.0-beta.3":"73.0.3683.27","5.0.0-beta.4":"73.0.3683.54","5.0.0-beta.5":"73.0.3683.61","5.0.0-beta.6":"73.0.3683.84","5.0.0-beta.7":"73.0.3683.94","5.0.0-beta.8":"73.0.3683.104","5.0.0-beta.9":"73.0.3683.117","5.0.0-nightly.20190107":"70.0.3538.110","5.0.0-nightly.20190121":"71.0.3578.98","5.0.0-nightly.20190122":"71.0.3578.98","5.0.0":"73.0.3683.119","5.0.1":"73.0.3683.121","5.0.2":"73.0.3683.121","5.0.3":"73.0.3683.121","5.0.4":"73.0.3683.121","5.0.5":"73.0.3683.121","5.0.6":"73.0.3683.121","5.0.7":"73.0.3683.121","5.0.8":"73.0.3683.121","5.0.9":"73.0.3683.121","5.0.10":"73.0.3683.121","5.0.11":"73.0.3683.121","5.0.12":"73.0.3683.121","5.0.13":"73.0.3683.121","6.0.0-beta.1":"76.0.3774.1","6.0.0-beta.2":"76.0.3783.1","6.0.0-beta.3":"76.0.3783.1","6.0.0-beta.4":"76.0.3783.1","6.0.0-beta.5":"76.0.3805.4","6.0.0-beta.6":"76.0.3809.3","6.0.0-beta.7":"76.0.3809.22","6.0.0-beta.8":"76.0.3809.26","6.0.0-beta.9":"76.0.3809.26","6.0.0-beta.10":"76.0.3809.37","6.0.0-beta.11":"76.0.3809.42","6.0.0-beta.12":"76.0.3809.54","6.0.0-beta.13":"76.0.3809.60","6.0.0-beta.14":"76.0.3809.68","6.0.0-beta.15":"76.0.3809.74","6.0.0-nightly.20190123":"72.0.3626.52","6.0.0-nightly.20190212":"72.0.3626.107","6.0.0-nightly.20190213":"72.0.3626.110","6.0.0-nightly.20190311":"74.0.3724.8","6.0.0":"76.0.3809.88","6.0.1":"76.0.3809.102","6.0.2":"76.0.3809.110","6.0.3":"76.0.3809.126","6.0.4":"76.0.3809.131","6.0.5":"76.0.3809.136","6.0.6":"76.0.3809.138","6.0.7":"76.0.3809.139","6.0.8":"76.0.3809.146","6.0.9":"76.0.3809.146","6.0.10":"76.0.3809.146","6.0.11":"76.0.3809.146","6.0.12":"76.0.3809.146","6.1.0":"76.0.3809.146","6.1.1":"76.0.3809.146","6.1.2":"76.0.3809.146","6.1.3":"76.0.3809.146","6.1.4":"76.0.3809.146","6.1.5":"76.0.3809.146","6.1.6":"76.0.3809.146","6.1.7":"76.0.3809.146","6.1.8":"76.0.3809.146","6.1.9":"76.0.3809.146","6.1.10":"76.0.3809.146","6.1.11":"76.0.3809.146","6.1.12":"76.0.3809.146","7.0.0-beta.1":"78.0.3866.0","7.0.0-beta.2":"78.0.3866.0","7.0.0-beta.3":"78.0.3866.0","7.0.0-beta.4":"78.0.3896.6","7.0.0-beta.5":"78.0.3905.1","7.0.0-beta.6":"78.0.3905.1","7.0.0-beta.7":"78.0.3905.1","7.0.0-nightly.20190521":"76.0.3784.0","7.0.0-nightly.20190529":"76.0.3806.0","7.0.0-nightly.20190530":"76.0.3806.0","7.0.0-nightly.20190531":"76.0.3806.0","7.0.0-nightly.20190602":"76.0.3806.0","7.0.0-nightly.20190603":"76.0.3806.0","7.0.0-nightly.20190604":"77.0.3814.0","7.0.0-nightly.20190605":"77.0.3815.0","7.0.0-nightly.20190606":"77.0.3815.0","7.0.0-nightly.20190607":"77.0.3815.0","7.0.0-nightly.20190608":"77.0.3815.0","7.0.0-nightly.20190609":"77.0.3815.0","7.0.0-nightly.20190611":"77.0.3815.0","7.0.0-nightly.20190612":"77.0.3815.0","7.0.0-nightly.20190613":"77.0.3815.0","7.0.0-nightly.20190615":"77.0.3815.0","7.0.0-nightly.20190616":"77.0.3815.0","7.0.0-nightly.20190618":"77.0.3815.0","7.0.0-nightly.20190619":"77.0.3815.0","7.0.0-nightly.20190622":"77.0.3815.0","7.0.0-nightly.20190623":"77.0.3815.0","7.0.0-nightly.20190624":"77.0.3815.0","7.0.0-nightly.20190627":"77.0.3815.0","7.0.0-nightly.20190629":"77.0.3815.0","7.0.0-nightly.20190630":"77.0.3815.0","7.0.0-nightly.20190701":"77.0.3815.0","7.0.0-nightly.20190702":"77.0.3815.0","7.0.0-nightly.20190704":"77.0.3843.0","7.0.0-nightly.20190705":"77.0.3843.0","7.0.0-nightly.20190719":"77.0.3848.0","7.0.0-nightly.20190720":"77.0.3848.0","7.0.0-nightly.20190721":"77.0.3848.0","7.0.0-nightly.20190726":"77.0.3864.0","7.0.0-nightly.20190727":"78.0.3866.0","7.0.0-nightly.20190728":"78.0.3866.0","7.0.0-nightly.20190729":"78.0.3866.0","7.0.0-nightly.20190730":"78.0.3866.0","7.0.0-nightly.20190731":"78.0.3866.0","7.0.0":"78.0.3905.1","7.0.1":"78.0.3904.92","7.1.0":"78.0.3904.94","7.1.1":"78.0.3904.99","7.1.2":"78.0.3904.113","7.1.3":"78.0.3904.126","7.1.4":"78.0.3904.130","7.1.5":"78.0.3904.130","7.1.6":"78.0.3904.130","7.1.7":"78.0.3904.130","7.1.8":"78.0.3904.130","7.1.9":"78.0.3904.130","7.1.10":"78.0.3904.130","7.1.11":"78.0.3904.130","7.1.12":"78.0.3904.130","7.1.13":"78.0.3904.130","7.1.14":"78.0.3904.130","7.2.0":"78.0.3904.130","7.2.1":"78.0.3904.130","7.2.2":"78.0.3904.130","7.2.3":"78.0.3904.130","7.2.4":"78.0.3904.130","7.3.0":"78.0.3904.130","7.3.1":"78.0.3904.130","7.3.2":"78.0.3904.130","7.3.3":"78.0.3904.130","8.0.0-beta.1":"79.0.3931.0","8.0.0-beta.2":"79.0.3931.0","8.0.0-beta.3":"80.0.3955.0","8.0.0-beta.4":"80.0.3955.0","8.0.0-beta.5":"80.0.3987.14","8.0.0-beta.6":"80.0.3987.51","8.0.0-beta.7":"80.0.3987.59","8.0.0-beta.8":"80.0.3987.75","8.0.0-beta.9":"80.0.3987.75","8.0.0-nightly.20190801":"78.0.3866.0","8.0.0-nightly.20190802":"78.0.3866.0","8.0.0-nightly.20190803":"78.0.3871.0","8.0.0-nightly.20190806":"78.0.3871.0","8.0.0-nightly.20190807":"78.0.3871.0","8.0.0-nightly.20190808":"78.0.3871.0","8.0.0-nightly.20190809":"78.0.3871.0","8.0.0-nightly.20190810":"78.0.3871.0","8.0.0-nightly.20190811":"78.0.3871.0","8.0.0-nightly.20190812":"78.0.3871.0","8.0.0-nightly.20190813":"78.0.3871.0","8.0.0-nightly.20190814":"78.0.3871.0","8.0.0-nightly.20190815":"78.0.3871.0","8.0.0-nightly.20190816":"78.0.3881.0","8.0.0-nightly.20190817":"78.0.3881.0","8.0.0-nightly.20190818":"78.0.3881.0","8.0.0-nightly.20190819":"78.0.3881.0","8.0.0-nightly.20190820":"78.0.3881.0","8.0.0-nightly.20190824":"78.0.3892.0","8.0.0-nightly.20190825":"78.0.3892.0","8.0.0-nightly.20190827":"78.0.3892.0","8.0.0-nightly.20190828":"78.0.3892.0","8.0.0-nightly.20190830":"78.0.3892.0","8.0.0-nightly.20190901":"78.0.3892.0","8.0.0-nightly.20190902":"78.0.3892.0","8.0.0-nightly.20190907":"78.0.3892.0","8.0.0-nightly.20190909":"78.0.3892.0","8.0.0-nightly.20190910":"78.0.3892.0","8.0.0-nightly.20190911":"78.0.3892.0","8.0.0-nightly.20190912":"78.0.3892.0","8.0.0-nightly.20190913":"78.0.3892.0","8.0.0-nightly.20190914":"78.0.3892.0","8.0.0-nightly.20190915":"78.0.3892.0","8.0.0-nightly.20190917":"78.0.3892.0","8.0.0-nightly.20190919":"79.0.3915.0","8.0.0-nightly.20190920":"79.0.3915.0","8.0.0-nightly.20190922":"79.0.3919.0","8.0.0-nightly.20190923":"79.0.3919.0","8.0.0-nightly.20190924":"79.0.3919.0","8.0.0-nightly.20190926":"79.0.3919.0","8.0.0-nightly.20190928":"79.0.3919.0","8.0.0-nightly.20190929":"79.0.3919.0","8.0.0-nightly.20190930":"79.0.3919.0","8.0.0-nightly.20191001":"79.0.3919.0","8.0.0-nightly.20191004":"79.0.3919.0","8.0.0-nightly.20191005":"79.0.3919.0","8.0.0-nightly.20191006":"79.0.3919.0","8.0.0-nightly.20191009":"79.0.3919.0","8.0.0-nightly.20191011":"79.0.3919.0","8.0.0-nightly.20191012":"79.0.3919.0","8.0.0-nightly.20191017":"79.0.3919.0","8.0.0-nightly.20191019":"79.0.3931.0","8.0.0-nightly.20191020":"79.0.3931.0","8.0.0-nightly.20191021":"79.0.3931.0","8.0.0-nightly.20191023":"79.0.3931.0","8.0.0-nightly.20191101":"80.0.3952.0","8.0.0-nightly.20191103":"80.0.3952.0","8.0.0-nightly.20191105":"80.0.3952.0","8.0.0":"80.0.3987.86","8.0.1":"80.0.3987.86","8.0.2":"80.0.3987.86","8.0.3":"80.0.3987.134","8.1.0":"80.0.3987.137","8.1.1":"80.0.3987.141","8.2.0":"80.0.3987.158","8.2.1":"80.0.3987.163","8.2.2":"80.0.3987.163","8.2.3":"80.0.3987.163","8.2.4":"80.0.3987.165","8.2.5":"80.0.3987.165","8.3.0":"80.0.3987.165","8.3.1":"80.0.3987.165","8.3.2":"80.0.3987.165","8.3.3":"80.0.3987.165","8.3.4":"80.0.3987.165","8.4.0":"80.0.3987.165","8.4.1":"80.0.3987.165","8.5.0":"80.0.3987.165","8.5.1":"80.0.3987.165","8.5.2":"80.0.3987.165","8.5.3":"80.0.3987.163","8.5.4":"80.0.3987.163","8.5.5":"80.0.3987.163","9.0.0-beta.1":"82.0.4048.0","9.0.0-beta.2":"82.0.4048.0","9.0.0-beta.3":"82.0.4048.0","9.0.0-beta.4":"82.0.4048.0","9.0.0-beta.5":"82.0.4048.0","9.0.0-beta.6":"82.0.4058.2","9.0.0-beta.7":"82.0.4058.2","9.0.0-beta.9":"82.0.4058.2","9.0.0-beta.10":"82.0.4085.10","9.0.0-beta.11":"82.0.4085.14","9.0.0-beta.12":"82.0.4085.14","9.0.0-beta.13":"82.0.4085.14","9.0.0-beta.14":"82.0.4085.27","9.0.0-beta.15":"83.0.4102.3","9.0.0-beta.16":"83.0.4102.3","9.0.0-beta.17":"83.0.4103.14","9.0.0-beta.18":"83.0.4103.16","9.0.0-beta.19":"83.0.4103.24","9.0.0-beta.20":"83.0.4103.26","9.0.0-beta.21":"83.0.4103.26","9.0.0-beta.22":"83.0.4103.34","9.0.0-beta.23":"83.0.4103.44","9.0.0-beta.24":"83.0.4103.45","9.0.0-nightly.20191121":"80.0.3954.0","9.0.0-nightly.20191122":"80.0.3954.0","9.0.0-nightly.20191123":"80.0.3954.0","9.0.0-nightly.20191124":"80.0.3954.0","9.0.0-nightly.20191126":"80.0.3954.0","9.0.0-nightly.20191128":"80.0.3954.0","9.0.0-nightly.20191129":"80.0.3954.0","9.0.0-nightly.20191130":"80.0.3954.0","9.0.0-nightly.20191201":"80.0.3954.0","9.0.0-nightly.20191202":"80.0.3954.0","9.0.0-nightly.20191203":"80.0.3954.0","9.0.0-nightly.20191204":"80.0.3954.0","9.0.0-nightly.20191205":"80.0.3954.0","9.0.0-nightly.20191210":"80.0.3954.0","9.0.0-nightly.20191220":"81.0.3994.0","9.0.0-nightly.20191221":"81.0.3994.0","9.0.0-nightly.20191222":"81.0.3994.0","9.0.0-nightly.20191223":"81.0.3994.0","9.0.0-nightly.20191224":"81.0.3994.0","9.0.0-nightly.20191225":"81.0.3994.0","9.0.0-nightly.20191226":"81.0.3994.0","9.0.0-nightly.20191228":"81.0.3994.0","9.0.0-nightly.20191229":"81.0.3994.0","9.0.0-nightly.20191230":"81.0.3994.0","9.0.0-nightly.20191231":"81.0.3994.0","9.0.0-nightly.20200101":"81.0.3994.0","9.0.0-nightly.20200103":"81.0.3994.0","9.0.0-nightly.20200104":"81.0.3994.0","9.0.0-nightly.20200105":"81.0.3994.0","9.0.0-nightly.20200106":"81.0.3994.0","9.0.0-nightly.20200108":"81.0.3994.0","9.0.0-nightly.20200109":"81.0.3994.0","9.0.0-nightly.20200110":"81.0.3994.0","9.0.0-nightly.20200111":"81.0.3994.0","9.0.0-nightly.20200113":"81.0.3994.0","9.0.0-nightly.20200115":"81.0.3994.0","9.0.0-nightly.20200116":"81.0.3994.0","9.0.0-nightly.20200117":"81.0.3994.0","9.0.0-nightly.20200119":"81.0.4030.0","9.0.0-nightly.20200121":"81.0.4030.0","9.0.0":"83.0.4103.64","9.0.1":"83.0.4103.94","9.0.2":"83.0.4103.94","9.0.3":"83.0.4103.100","9.0.4":"83.0.4103.104","9.0.5":"83.0.4103.119","9.1.0":"83.0.4103.122","9.1.1":"83.0.4103.122","9.1.2":"83.0.4103.122","9.2.0":"83.0.4103.122","9.2.1":"83.0.4103.122","9.3.0":"83.0.4103.122","9.3.1":"83.0.4103.122","9.3.2":"83.0.4103.122","9.3.3":"83.0.4103.122","9.3.4":"83.0.4103.122","9.3.5":"83.0.4103.122","9.4.0":"83.0.4103.122","9.4.1":"83.0.4103.122","9.4.2":"83.0.4103.122","9.4.3":"83.0.4103.122","9.4.4":"83.0.4103.122","10.0.0-beta.1":"84.0.4129.0","10.0.0-beta.2":"84.0.4129.0","10.0.0-beta.3":"85.0.4161.2","10.0.0-beta.4":"85.0.4161.2","10.0.0-beta.8":"85.0.4181.1","10.0.0-beta.9":"85.0.4181.1","10.0.0-beta.10":"85.0.4183.19","10.0.0-beta.11":"85.0.4183.20","10.0.0-beta.12":"85.0.4183.26","10.0.0-beta.13":"85.0.4183.39","10.0.0-beta.14":"85.0.4183.39","10.0.0-beta.15":"85.0.4183.39","10.0.0-beta.17":"85.0.4183.39","10.0.0-beta.19":"85.0.4183.39","10.0.0-beta.20":"85.0.4183.39","10.0.0-beta.21":"85.0.4183.39","10.0.0-beta.23":"85.0.4183.70","10.0.0-beta.24":"85.0.4183.78","10.0.0-beta.25":"85.0.4183.80","10.0.0-nightly.20200209":"82.0.4050.0","10.0.0-nightly.20200210":"82.0.4050.0","10.0.0-nightly.20200211":"82.0.4050.0","10.0.0-nightly.20200216":"82.0.4050.0","10.0.0-nightly.20200217":"82.0.4050.0","10.0.0-nightly.20200218":"82.0.4050.0","10.0.0-nightly.20200221":"82.0.4050.0","10.0.0-nightly.20200222":"82.0.4050.0","10.0.0-nightly.20200223":"82.0.4050.0","10.0.0-nightly.20200226":"82.0.4050.0","10.0.0-nightly.20200303":"82.0.4050.0","10.0.0-nightly.20200304":"82.0.4076.0","10.0.0-nightly.20200305":"82.0.4076.0","10.0.0-nightly.20200306":"82.0.4076.0","10.0.0-nightly.20200309":"82.0.4076.0","10.0.0-nightly.20200310":"82.0.4076.0","10.0.0-nightly.20200311":"82.0.4083.0","10.0.0-nightly.20200316":"83.0.4086.0","10.0.0-nightly.20200317":"83.0.4087.0","10.0.0-nightly.20200318":"83.0.4087.0","10.0.0-nightly.20200320":"83.0.4087.0","10.0.0-nightly.20200323":"83.0.4087.0","10.0.0-nightly.20200324":"83.0.4087.0","10.0.0-nightly.20200325":"83.0.4087.0","10.0.0-nightly.20200326":"83.0.4087.0","10.0.0-nightly.20200327":"83.0.4087.0","10.0.0-nightly.20200330":"83.0.4087.0","10.0.0-nightly.20200331":"83.0.4087.0","10.0.0-nightly.20200401":"83.0.4087.0","10.0.0-nightly.20200402":"83.0.4087.0","10.0.0-nightly.20200403":"83.0.4087.0","10.0.0-nightly.20200406":"83.0.4087.0","10.0.0-nightly.20200408":"83.0.4095.0","10.0.0-nightly.20200410":"83.0.4095.0","10.0.0-nightly.20200413":"83.0.4095.0","10.0.0-nightly.20200414":"84.0.4114.0","10.0.0-nightly.20200415":"84.0.4115.0","10.0.0-nightly.20200416":"84.0.4115.0","10.0.0-nightly.20200417":"84.0.4115.0","10.0.0-nightly.20200422":"84.0.4121.0","10.0.0-nightly.20200423":"84.0.4121.0","10.0.0-nightly.20200427":"84.0.4125.0","10.0.0-nightly.20200428":"84.0.4125.0","10.0.0-nightly.20200429":"84.0.4125.0","10.0.0-nightly.20200430":"84.0.4125.0","10.0.0-nightly.20200501":"84.0.4129.0","10.0.0-nightly.20200504":"84.0.4129.0","10.0.0-nightly.20200505":"84.0.4129.0","10.0.0-nightly.20200506":"84.0.4129.0","10.0.0-nightly.20200507":"84.0.4129.0","10.0.0-nightly.20200508":"84.0.4129.0","10.0.0-nightly.20200511":"84.0.4129.0","10.0.0-nightly.20200512":"84.0.4129.0","10.0.0-nightly.20200513":"84.0.4129.0","10.0.0-nightly.20200514":"84.0.4129.0","10.0.0-nightly.20200515":"84.0.4129.0","10.0.0-nightly.20200518":"84.0.4129.0","10.0.0-nightly.20200519":"84.0.4129.0","10.0.0-nightly.20200520":"84.0.4129.0","10.0.0-nightly.20200521":"84.0.4129.0","10.0.0":"85.0.4183.84","10.0.1":"85.0.4183.86","10.1.0":"85.0.4183.87","10.1.1":"85.0.4183.93","10.1.2":"85.0.4183.98","10.1.3":"85.0.4183.121","10.1.4":"85.0.4183.121","10.1.5":"85.0.4183.121","10.1.6":"85.0.4183.121","10.1.7":"85.0.4183.121","10.2.0":"85.0.4183.121","10.3.0":"85.0.4183.121","10.3.1":"85.0.4183.121","10.3.2":"85.0.4183.121","10.4.0":"85.0.4183.121","10.4.1":"85.0.4183.121","10.4.2":"85.0.4183.121","10.4.3":"85.0.4183.121","10.4.4":"85.0.4183.121","10.4.5":"85.0.4183.121","10.4.6":"85.0.4183.121","10.4.7":"85.0.4183.121","11.0.0-beta.1":"86.0.4234.0","11.0.0-beta.3":"86.0.4234.0","11.0.0-beta.4":"86.0.4234.0","11.0.0-beta.5":"86.0.4234.0","11.0.0-beta.6":"86.0.4234.0","11.0.0-beta.7":"86.0.4234.0","11.0.0-beta.8":"87.0.4251.1","11.0.0-beta.9":"87.0.4251.1","11.0.0-beta.11":"87.0.4251.1","11.0.0-beta.12":"87.0.4280.11","11.0.0-beta.13":"87.0.4280.11","11.0.0-beta.16":"87.0.4280.27","11.0.0-beta.17":"87.0.4280.27","11.0.0-beta.18":"87.0.4280.27","11.0.0-beta.19":"87.0.4280.27","11.0.0-beta.20":"87.0.4280.40","11.0.0-beta.22":"87.0.4280.47","11.0.0-beta.23":"87.0.4280.47","11.0.0-nightly.20200525":"84.0.4129.0","11.0.0-nightly.20200526":"84.0.4129.0","11.0.0-nightly.20200529":"85.0.4156.0","11.0.0-nightly.20200602":"85.0.4162.0","11.0.0-nightly.20200603":"85.0.4162.0","11.0.0-nightly.20200604":"85.0.4162.0","11.0.0-nightly.20200609":"85.0.4162.0","11.0.0-nightly.20200610":"85.0.4162.0","11.0.0-nightly.20200611":"85.0.4162.0","11.0.0-nightly.20200615":"85.0.4162.0","11.0.0-nightly.20200616":"85.0.4162.0","11.0.0-nightly.20200617":"85.0.4162.0","11.0.0-nightly.20200618":"85.0.4162.0","11.0.0-nightly.20200619":"85.0.4162.0","11.0.0-nightly.20200701":"85.0.4179.0","11.0.0-nightly.20200702":"85.0.4179.0","11.0.0-nightly.20200703":"85.0.4179.0","11.0.0-nightly.20200706":"85.0.4179.0","11.0.0-nightly.20200707":"85.0.4179.0","11.0.0-nightly.20200708":"85.0.4179.0","11.0.0-nightly.20200709":"85.0.4179.0","11.0.0-nightly.20200716":"86.0.4203.0","11.0.0-nightly.20200717":"86.0.4203.0","11.0.0-nightly.20200720":"86.0.4203.0","11.0.0-nightly.20200721":"86.0.4203.0","11.0.0-nightly.20200723":"86.0.4209.0","11.0.0-nightly.20200724":"86.0.4209.0","11.0.0-nightly.20200729":"86.0.4209.0","11.0.0-nightly.20200730":"86.0.4209.0","11.0.0-nightly.20200731":"86.0.4209.0","11.0.0-nightly.20200803":"86.0.4209.0","11.0.0-nightly.20200804":"86.0.4209.0","11.0.0-nightly.20200805":"86.0.4209.0","11.0.0-nightly.20200811":"86.0.4209.0","11.0.0-nightly.20200812":"86.0.4209.0","11.0.0-nightly.20200822":"86.0.4234.0","11.0.0-nightly.20200824":"86.0.4234.0","11.0.0-nightly.20200825":"86.0.4234.0","11.0.0-nightly.20200826":"86.0.4234.0","11.0.0":"87.0.4280.60","11.0.1":"87.0.4280.60","11.0.2":"87.0.4280.67","11.0.3":"87.0.4280.67","11.0.4":"87.0.4280.67","11.0.5":"87.0.4280.88","11.1.0":"87.0.4280.88","11.1.1":"87.0.4280.88","11.2.0":"87.0.4280.141","11.2.1":"87.0.4280.141","11.2.2":"87.0.4280.141","11.2.3":"87.0.4280.141","11.3.0":"87.0.4280.141","11.4.0":"87.0.4280.141","11.4.1":"87.0.4280.141","11.4.2":"87.0.4280.141","11.4.3":"87.0.4280.141","11.4.4":"87.0.4280.141","11.4.5":"87.0.4280.141","11.4.6":"87.0.4280.141","11.4.7":"87.0.4280.141","11.4.8":"87.0.4280.141","11.4.9":"87.0.4280.141","11.4.10":"87.0.4280.141","11.4.11":"87.0.4280.141","11.4.12":"87.0.4280.141","11.5.0":"87.0.4280.141","12.0.0-beta.1":"89.0.4328.0","12.0.0-beta.3":"89.0.4328.0","12.0.0-beta.4":"89.0.4328.0","12.0.0-beta.5":"89.0.4328.0","12.0.0-beta.6":"89.0.4328.0","12.0.0-beta.7":"89.0.4328.0","12.0.0-beta.8":"89.0.4328.0","12.0.0-beta.9":"89.0.4328.0","12.0.0-beta.10":"89.0.4328.0","12.0.0-beta.11":"89.0.4328.0","12.0.0-beta.12":"89.0.4328.0","12.0.0-beta.14":"89.0.4328.0","12.0.0-beta.16":"89.0.4348.1","12.0.0-beta.18":"89.0.4348.1","12.0.0-beta.19":"89.0.4348.1","12.0.0-beta.20":"89.0.4348.1","12.0.0-beta.21":"89.0.4388.2","12.0.0-beta.22":"89.0.4388.2","12.0.0-beta.23":"89.0.4388.2","12.0.0-beta.24":"89.0.4388.2","12.0.0-beta.25":"89.0.4388.2","12.0.0-beta.26":"89.0.4388.2","12.0.0-beta.27":"89.0.4389.23","12.0.0-beta.28":"89.0.4389.23","12.0.0-beta.29":"89.0.4389.23","12.0.0-beta.30":"89.0.4389.58","12.0.0-beta.31":"89.0.4389.58","12.0.0-nightly.20200827":"86.0.4234.0","12.0.0-nightly.20200831":"86.0.4234.0","12.0.0-nightly.20200902":"86.0.4234.0","12.0.0-nightly.20200903":"86.0.4234.0","12.0.0-nightly.20200907":"86.0.4234.0","12.0.0-nightly.20200910":"86.0.4234.0","12.0.0-nightly.20200911":"86.0.4234.0","12.0.0-nightly.20200914":"86.0.4234.0","12.0.0-nightly.20201002":"87.0.4268.0","12.0.0-nightly.20201007":"87.0.4268.0","12.0.0-nightly.20201009":"87.0.4268.0","12.0.0-nightly.20201012":"87.0.4268.0","12.0.0-nightly.20201013":"87.0.4268.0","12.0.0-nightly.20201014":"87.0.4268.0","12.0.0-nightly.20201015":"87.0.4268.0","12.0.0-nightly.20201023":"88.0.4292.0","12.0.0-nightly.20201026":"88.0.4292.0","12.0.0-nightly.20201030":"88.0.4306.0","12.0.0-nightly.20201102":"88.0.4306.0","12.0.0-nightly.20201103":"88.0.4306.0","12.0.0-nightly.20201104":"88.0.4306.0","12.0.0-nightly.20201105":"88.0.4306.0","12.0.0-nightly.20201106":"88.0.4306.0","12.0.0-nightly.20201111":"88.0.4306.0","12.0.0-nightly.20201112":"88.0.4306.0","12.0.0-nightly.20201116":"88.0.4324.0","12.0.0":"89.0.4389.69","12.0.1":"89.0.4389.82","12.0.2":"89.0.4389.90","12.0.3":"89.0.4389.114","12.0.4":"89.0.4389.114","12.0.5":"89.0.4389.128","12.0.6":"89.0.4389.128","12.0.7":"89.0.4389.128","12.0.8":"89.0.4389.128","12.0.9":"89.0.4389.128","12.0.10":"89.0.4389.128","12.0.11":"89.0.4389.128","12.0.12":"89.0.4389.128","12.0.13":"89.0.4389.128","12.0.14":"89.0.4389.128","12.0.15":"89.0.4389.128","12.0.16":"89.0.4389.128","12.0.17":"89.0.4389.128","12.0.18":"89.0.4389.128","12.1.0":"89.0.4389.128","12.1.1":"89.0.4389.128","12.1.2":"89.0.4389.128","12.2.0":"89.0.4389.128","12.2.1":"89.0.4389.128","12.2.2":"89.0.4389.128","12.2.3":"89.0.4389.128","13.0.0-beta.2":"90.0.4402.0","13.0.0-beta.3":"90.0.4402.0","13.0.0-beta.4":"90.0.4415.0","13.0.0-beta.5":"90.0.4415.0","13.0.0-beta.6":"90.0.4415.0","13.0.0-beta.7":"90.0.4415.0","13.0.0-beta.8":"90.0.4415.0","13.0.0-beta.9":"90.0.4415.0","13.0.0-beta.10":"90.0.4415.0","13.0.0-beta.11":"90.0.4415.0","13.0.0-beta.12":"90.0.4415.0","13.0.0-beta.13":"90.0.4415.0","13.0.0-beta.14":"91.0.4448.0","13.0.0-beta.16":"91.0.4448.0","13.0.0-beta.17":"91.0.4448.0","13.0.0-beta.18":"91.0.4448.0","13.0.0-beta.20":"91.0.4448.0","13.0.0-beta.21":"91.0.4472.33","13.0.0-beta.22":"91.0.4472.33","13.0.0-beta.23":"91.0.4472.33","13.0.0-beta.24":"91.0.4472.38","13.0.0-beta.25":"91.0.4472.38","13.0.0-beta.26":"91.0.4472.38","13.0.0-beta.27":"91.0.4472.38","13.0.0-beta.28":"91.0.4472.38","13.0.0-nightly.20201119":"89.0.4328.0","13.0.0-nightly.20201123":"89.0.4328.0","13.0.0-nightly.20201124":"89.0.4328.0","13.0.0-nightly.20201126":"89.0.4328.0","13.0.0-nightly.20201127":"89.0.4328.0","13.0.0-nightly.20201130":"89.0.4328.0","13.0.0-nightly.20201201":"89.0.4328.0","13.0.0-nightly.20201202":"89.0.4328.0","13.0.0-nightly.20201203":"89.0.4328.0","13.0.0-nightly.20201204":"89.0.4328.0","13.0.0-nightly.20201207":"89.0.4328.0","13.0.0-nightly.20201208":"89.0.4328.0","13.0.0-nightly.20201209":"89.0.4328.0","13.0.0-nightly.20201210":"89.0.4328.0","13.0.0-nightly.20201211":"89.0.4328.0","13.0.0-nightly.20201214":"89.0.4328.0","13.0.0-nightly.20201215":"89.0.4349.0","13.0.0-nightly.20201216":"89.0.4349.0","13.0.0-nightly.20201221":"89.0.4349.0","13.0.0-nightly.20201222":"89.0.4349.0","13.0.0-nightly.20201223":"89.0.4359.0","13.0.0-nightly.20210104":"89.0.4359.0","13.0.0-nightly.20210108":"89.0.4359.0","13.0.0-nightly.20210111":"89.0.4359.0","13.0.0-nightly.20210113":"89.0.4386.0","13.0.0-nightly.20210114":"89.0.4386.0","13.0.0-nightly.20210118":"89.0.4386.0","13.0.0-nightly.20210122":"89.0.4386.0","13.0.0-nightly.20210125":"89.0.4386.0","13.0.0-nightly.20210127":"89.0.4389.0","13.0.0-nightly.20210128":"89.0.4389.0","13.0.0-nightly.20210129":"89.0.4389.0","13.0.0-nightly.20210201":"89.0.4389.0","13.0.0-nightly.20210202":"89.0.4389.0","13.0.0-nightly.20210203":"89.0.4389.0","13.0.0-nightly.20210205":"89.0.4389.0","13.0.0-nightly.20210208":"89.0.4389.0","13.0.0-nightly.20210209":"89.0.4389.0","13.0.0-nightly.20210210":"90.0.4402.0","13.0.0-nightly.20210211":"90.0.4402.0","13.0.0-nightly.20210212":"90.0.4402.0","13.0.0-nightly.20210216":"90.0.4402.0","13.0.0-nightly.20210217":"90.0.4402.0","13.0.0-nightly.20210218":"90.0.4402.0","13.0.0-nightly.20210219":"90.0.4402.0","13.0.0-nightly.20210222":"90.0.4402.0","13.0.0-nightly.20210225":"90.0.4402.0","13.0.0-nightly.20210226":"90.0.4402.0","13.0.0-nightly.20210301":"90.0.4402.0","13.0.0-nightly.20210302":"90.0.4402.0","13.0.0-nightly.20210303":"90.0.4402.0","13.0.0":"91.0.4472.69","13.0.1":"91.0.4472.69","13.1.0":"91.0.4472.77","13.1.1":"91.0.4472.77","13.1.2":"91.0.4472.77","13.1.3":"91.0.4472.106","13.1.4":"91.0.4472.106","13.1.5":"91.0.4472.124","13.1.6":"91.0.4472.124","13.1.7":"91.0.4472.124","13.1.8":"91.0.4472.164","13.1.9":"91.0.4472.164","13.2.0":"91.0.4472.164","13.2.1":"91.0.4472.164","13.2.2":"91.0.4472.164","13.2.3":"91.0.4472.164","13.3.0":"91.0.4472.164","13.4.0":"91.0.4472.164","13.5.0":"91.0.4472.164","13.5.1":"91.0.4472.164","13.5.2":"91.0.4472.164","13.6.0":"91.0.4472.164","13.6.1":"91.0.4472.164","13.6.2":"91.0.4472.164","13.6.3":"91.0.4472.164","13.6.6":"91.0.4472.164","13.6.7":"91.0.4472.164","13.6.8":"91.0.4472.164","13.6.9":"91.0.4472.164","14.0.0-beta.1":"92.0.4511.0","14.0.0-beta.2":"92.0.4511.0","14.0.0-beta.3":"92.0.4511.0","14.0.0-beta.5":"93.0.4536.0","14.0.0-beta.6":"93.0.4536.0","14.0.0-beta.7":"93.0.4536.0","14.0.0-beta.8":"93.0.4536.0","14.0.0-beta.9":"93.0.4539.0","14.0.0-beta.10":"93.0.4539.0","14.0.0-beta.11":"93.0.4557.4","14.0.0-beta.12":"93.0.4557.4","14.0.0-beta.13":"93.0.4566.0","14.0.0-beta.14":"93.0.4566.0","14.0.0-beta.15":"93.0.4566.0","14.0.0-beta.16":"93.0.4566.0","14.0.0-beta.17":"93.0.4566.0","14.0.0-beta.18":"93.0.4577.15","14.0.0-beta.19":"93.0.4577.15","14.0.0-beta.20":"93.0.4577.15","14.0.0-beta.21":"93.0.4577.15","14.0.0-beta.22":"93.0.4577.25","14.0.0-beta.23":"93.0.4577.25","14.0.0-beta.24":"93.0.4577.51","14.0.0-beta.25":"93.0.4577.51","14.0.0-nightly.20210304":"90.0.4402.0","14.0.0-nightly.20210305":"90.0.4415.0","14.0.0-nightly.20210308":"90.0.4415.0","14.0.0-nightly.20210309":"90.0.4415.0","14.0.0-nightly.20210311":"90.0.4415.0","14.0.0-nightly.20210315":"90.0.4415.0","14.0.0-nightly.20210316":"90.0.4415.0","14.0.0-nightly.20210317":"90.0.4415.0","14.0.0-nightly.20210318":"90.0.4415.0","14.0.0-nightly.20210319":"90.0.4415.0","14.0.0-nightly.20210323":"90.0.4415.0","14.0.0-nightly.20210324":"90.0.4415.0","14.0.0-nightly.20210325":"90.0.4415.0","14.0.0-nightly.20210326":"90.0.4415.0","14.0.0-nightly.20210329":"90.0.4415.0","14.0.0-nightly.20210330":"90.0.4415.0","14.0.0-nightly.20210331":"91.0.4448.0","14.0.0-nightly.20210401":"91.0.4448.0","14.0.0-nightly.20210402":"91.0.4448.0","14.0.0-nightly.20210406":"91.0.4448.0","14.0.0-nightly.20210407":"91.0.4448.0","14.0.0-nightly.20210408":"91.0.4448.0","14.0.0-nightly.20210409":"91.0.4448.0","14.0.0-nightly.20210413":"91.0.4448.0","14.0.0-nightly.20210426":"92.0.4475.0","14.0.0-nightly.20210427":"92.0.4475.0","14.0.0-nightly.20210430":"92.0.4488.0","14.0.0-nightly.20210503":"92.0.4488.0","14.0.0-nightly.20210505":"92.0.4496.0","14.0.0-nightly.20210506":"92.0.4498.0","14.0.0-nightly.20210507":"92.0.4499.0","14.0.0-nightly.20210510":"92.0.4499.0","14.0.0-nightly.20210511":"92.0.4499.0","14.0.0-nightly.20210512":"92.0.4499.0","14.0.0-nightly.20210513":"92.0.4499.0","14.0.0-nightly.20210514":"92.0.4505.0","14.0.0-nightly.20210517":"92.0.4505.0","14.0.0-nightly.20210518":"92.0.4505.0","14.0.0-nightly.20210519":"92.0.4505.0","14.0.0-nightly.20210520":"92.0.4511.0","14.0.0-nightly.20210523":"92.0.4511.0","14.0.0-nightly.20210524":"92.0.4511.0","14.0.0":"93.0.4577.58","14.0.1":"93.0.4577.63","14.0.2":"93.0.4577.82","14.1.0":"93.0.4577.82","14.1.1":"93.0.4577.82","14.2.0":"93.0.4577.82","14.2.1":"93.0.4577.82","14.2.2":"93.0.4577.82","14.2.3":"93.0.4577.82","14.2.4":"93.0.4577.82","14.2.5":"93.0.4577.82","14.2.6":"93.0.4577.82","14.2.7":"93.0.4577.82","14.2.8":"93.0.4577.82","14.2.9":"93.0.4577.82","15.0.0-alpha.1":"93.0.4566.0","15.0.0-alpha.2":"93.0.4566.0","15.0.0-alpha.3":"94.0.4584.0","15.0.0-alpha.4":"94.0.4584.0","15.0.0-alpha.5":"94.0.4584.0","15.0.0-alpha.6":"94.0.4584.0","15.0.0-alpha.7":"94.0.4590.2","15.0.0-alpha.8":"94.0.4590.2","15.0.0-alpha.9":"94.0.4590.2","15.0.0-alpha.10":"94.0.4606.12","15.0.0-beta.1":"94.0.4606.20","15.0.0-beta.2":"94.0.4606.20","15.0.0-beta.3":"94.0.4606.31","15.0.0-beta.4":"94.0.4606.31","15.0.0-beta.5":"94.0.4606.31","15.0.0-beta.6":"94.0.4606.31","15.0.0-beta.7":"94.0.4606.31","15.0.0-nightly.20210527":"92.0.4511.0","15.0.0-nightly.20210528":"92.0.4511.0","15.0.0-nightly.20210531":"92.0.4511.0","15.0.0-nightly.20210601":"92.0.4511.0","15.0.0-nightly.20210602":"92.0.4511.0","15.0.0-nightly.20210603":"93.0.4530.0","15.0.0-nightly.20210604":"93.0.4530.0","15.0.0-nightly.20210608":"93.0.4535.0","15.0.0-nightly.20210609":"93.0.4536.0","15.0.0-nightly.20210610":"93.0.4536.0","15.0.0-nightly.20210611":"93.0.4536.0","15.0.0-nightly.20210614":"93.0.4536.0","15.0.0-nightly.20210615":"93.0.4536.0","15.0.0-nightly.20210616":"93.0.4536.0","15.0.0-nightly.20210617":"93.0.4539.0","15.0.0-nightly.20210618":"93.0.4539.0","15.0.0-nightly.20210621":"93.0.4539.0","15.0.0-nightly.20210622":"93.0.4539.0","15.0.0-nightly.20210623":"93.0.4550.0","15.0.0-nightly.20210624":"93.0.4550.0","15.0.0-nightly.20210625":"93.0.4552.0","15.0.0-nightly.20210628":"93.0.4552.0","15.0.0-nightly.20210629":"93.0.4552.0","15.0.0-nightly.20210630":"93.0.4558.0","15.0.0-nightly.20210701":"93.0.4558.0","15.0.0-nightly.20210702":"93.0.4558.0","15.0.0-nightly.20210705":"93.0.4558.0","15.0.0-nightly.20210706":"93.0.4566.0","15.0.0-nightly.20210707":"93.0.4566.0","15.0.0-nightly.20210708":"93.0.4566.0","15.0.0-nightly.20210709":"93.0.4566.0","15.0.0-nightly.20210712":"93.0.4566.0","15.0.0-nightly.20210713":"93.0.4566.0","15.0.0-nightly.20210714":"93.0.4566.0","15.0.0-nightly.20210715":"93.0.4566.0","15.0.0-nightly.20210716":"93.0.4566.0","15.0.0-nightly.20210719":"93.0.4566.0","15.0.0-nightly.20210720":"93.0.4566.0","15.0.0-nightly.20210721":"93.0.4566.0","15.0.0":"94.0.4606.51","15.1.0":"94.0.4606.61","15.1.1":"94.0.4606.61","15.1.2":"94.0.4606.71","15.2.0":"94.0.4606.81","15.3.0":"94.0.4606.81","15.3.1":"94.0.4606.81","15.3.2":"94.0.4606.81","15.3.3":"94.0.4606.81","15.3.4":"94.0.4606.81","15.3.5":"94.0.4606.81","15.3.6":"94.0.4606.81","15.3.7":"94.0.4606.81","15.4.0":"94.0.4606.81","15.4.1":"94.0.4606.81","15.4.2":"94.0.4606.81","15.5.0":"94.0.4606.81","15.5.1":"94.0.4606.81","15.5.2":"94.0.4606.81","15.5.3":"94.0.4606.81","15.5.4":"94.0.4606.81","15.5.5":"94.0.4606.81","15.5.6":"94.0.4606.81","15.5.7":"94.0.4606.81","16.0.0-alpha.1":"95.0.4629.0","16.0.0-alpha.2":"95.0.4629.0","16.0.0-alpha.3":"95.0.4629.0","16.0.0-alpha.4":"95.0.4629.0","16.0.0-alpha.5":"95.0.4629.0","16.0.0-alpha.6":"95.0.4629.0","16.0.0-alpha.7":"95.0.4629.0","16.0.0-alpha.8":"96.0.4647.0","16.0.0-alpha.9":"96.0.4647.0","16.0.0-beta.1":"96.0.4647.0","16.0.0-beta.2":"96.0.4647.0","16.0.0-beta.3":"96.0.4647.0","16.0.0-beta.4":"96.0.4664.18","16.0.0-beta.5":"96.0.4664.18","16.0.0-beta.6":"96.0.4664.27","16.0.0-beta.7":"96.0.4664.27","16.0.0-beta.8":"96.0.4664.35","16.0.0-beta.9":"96.0.4664.35","16.0.0-nightly.20210722":"93.0.4566.0","16.0.0-nightly.20210723":"93.0.4566.0","16.0.0-nightly.20210726":"93.0.4566.0","16.0.0-nightly.20210727":"94.0.4584.0","16.0.0-nightly.20210728":"94.0.4584.0","16.0.0-nightly.20210729":"94.0.4584.0","16.0.0-nightly.20210730":"94.0.4584.0","16.0.0-nightly.20210802":"94.0.4584.0","16.0.0-nightly.20210803":"94.0.4584.0","16.0.0-nightly.20210804":"94.0.4584.0","16.0.0-nightly.20210805":"94.0.4584.0","16.0.0-nightly.20210806":"94.0.4584.0","16.0.0-nightly.20210809":"94.0.4584.0","16.0.0-nightly.20210810":"94.0.4584.0","16.0.0-nightly.20210811":"94.0.4584.0","16.0.0-nightly.20210812":"94.0.4590.2","16.0.0-nightly.20210813":"94.0.4590.2","16.0.0-nightly.20210816":"94.0.4590.2","16.0.0-nightly.20210817":"94.0.4590.2","16.0.0-nightly.20210818":"94.0.4590.2","16.0.0-nightly.20210819":"94.0.4590.2","16.0.0-nightly.20210820":"94.0.4590.2","16.0.0-nightly.20210823":"94.0.4590.2","16.0.0-nightly.20210824":"95.0.4612.5","16.0.0-nightly.20210825":"95.0.4612.5","16.0.0-nightly.20210826":"95.0.4612.5","16.0.0-nightly.20210827":"95.0.4612.5","16.0.0-nightly.20210830":"95.0.4612.5","16.0.0-nightly.20210831":"95.0.4612.5","16.0.0-nightly.20210901":"95.0.4612.5","16.0.0-nightly.20210902":"95.0.4629.0","16.0.0-nightly.20210903":"95.0.4629.0","16.0.0-nightly.20210906":"95.0.4629.0","16.0.0-nightly.20210907":"95.0.4629.0","16.0.0-nightly.20210908":"95.0.4629.0","16.0.0-nightly.20210909":"95.0.4629.0","16.0.0-nightly.20210910":"95.0.4629.0","16.0.0-nightly.20210913":"95.0.4629.0","16.0.0-nightly.20210914":"95.0.4629.0","16.0.0-nightly.20210915":"95.0.4629.0","16.0.0-nightly.20210916":"95.0.4629.0","16.0.0-nightly.20210917":"95.0.4629.0","16.0.0-nightly.20210920":"95.0.4629.0","16.0.0-nightly.20210921":"95.0.4629.0","16.0.0-nightly.20210922":"95.0.4629.0","16.0.0":"96.0.4664.45","16.0.1":"96.0.4664.45","16.0.2":"96.0.4664.55","16.0.3":"96.0.4664.55","16.0.4":"96.0.4664.55","16.0.5":"96.0.4664.55","16.0.6":"96.0.4664.110","16.0.7":"96.0.4664.110","16.0.8":"96.0.4664.110","16.0.9":"96.0.4664.174","16.0.10":"96.0.4664.174","16.1.0":"96.0.4664.174","16.1.1":"96.0.4664.174","16.2.0":"96.0.4664.174","16.2.1":"96.0.4664.174","16.2.2":"96.0.4664.174","16.2.3":"96.0.4664.174","16.2.4":"96.0.4664.174","16.2.5":"96.0.4664.174","16.2.6":"96.0.4664.174","16.2.7":"96.0.4664.174","16.2.8":"96.0.4664.174","17.0.0-alpha.1":"96.0.4664.4","17.0.0-alpha.2":"96.0.4664.4","17.0.0-alpha.3":"96.0.4664.4","17.0.0-alpha.4":"98.0.4706.0","17.0.0-alpha.5":"98.0.4706.0","17.0.0-alpha.6":"98.0.4706.0","17.0.0-beta.1":"98.0.4706.0","17.0.0-beta.2":"98.0.4706.0","17.0.0-beta.3":"98.0.4758.9","17.0.0-beta.4":"98.0.4758.11","17.0.0-beta.5":"98.0.4758.11","17.0.0-beta.6":"98.0.4758.11","17.0.0-beta.7":"98.0.4758.11","17.0.0-beta.8":"98.0.4758.11","17.0.0-beta.9":"98.0.4758.11","17.0.0-nightly.20210923":"95.0.4629.0","17.0.0-nightly.20210924":"95.0.4629.0","17.0.0-nightly.20210927":"95.0.4629.0","17.0.0-nightly.20210928":"95.0.4629.0","17.0.0-nightly.20210929":"95.0.4629.0","17.0.0-nightly.20210930":"95.0.4629.0","17.0.0-nightly.20211001":"95.0.4629.0","17.0.0-nightly.20211004":"95.0.4629.0","17.0.0-nightly.20211005":"95.0.4629.0","17.0.0-nightly.20211006":"96.0.4647.0","17.0.0-nightly.20211007":"96.0.4647.0","17.0.0-nightly.20211008":"96.0.4647.0","17.0.0-nightly.20211011":"96.0.4647.0","17.0.0-nightly.20211012":"96.0.4647.0","17.0.0-nightly.20211013":"96.0.4647.0","17.0.0-nightly.20211014":"96.0.4647.0","17.0.0-nightly.20211015":"96.0.4647.0","17.0.0-nightly.20211018":"96.0.4647.0","17.0.0-nightly.20211019":"96.0.4647.0","17.0.0-nightly.20211020":"96.0.4647.0","17.0.0-nightly.20211021":"96.0.4647.0","17.0.0-nightly.20211022":"96.0.4664.4","17.0.0-nightly.20211025":"96.0.4664.4","17.0.0-nightly.20211026":"96.0.4664.4","17.0.0-nightly.20211027":"96.0.4664.4","17.0.0-nightly.20211028":"96.0.4664.4","17.0.0-nightly.20211029":"96.0.4664.4","17.0.0-nightly.20211101":"96.0.4664.4","17.0.0-nightly.20211102":"96.0.4664.4","17.0.0-nightly.20211103":"96.0.4664.4","17.0.0-nightly.20211104":"96.0.4664.4","17.0.0-nightly.20211105":"96.0.4664.4","17.0.0-nightly.20211108":"96.0.4664.4","17.0.0-nightly.20211109":"96.0.4664.4","17.0.0-nightly.20211110":"96.0.4664.4","17.0.0-nightly.20211111":"96.0.4664.4","17.0.0-nightly.20211112":"96.0.4664.4","17.0.0-nightly.20211115":"96.0.4664.4","17.0.0-nightly.20211116":"96.0.4664.4","17.0.0-nightly.20211117":"96.0.4664.4","17.0.0":"98.0.4758.74","17.0.1":"98.0.4758.82","17.1.0":"98.0.4758.102","17.1.1":"98.0.4758.109","17.1.2":"98.0.4758.109","17.2.0":"98.0.4758.109","17.3.0":"98.0.4758.141","17.3.1":"98.0.4758.141","17.4.0":"98.0.4758.141","17.4.1":"98.0.4758.141","17.4.2":"98.0.4758.141","17.4.3":"98.0.4758.141","17.4.4":"98.0.4758.141","17.4.5":"98.0.4758.141","17.4.6":"98.0.4758.141","17.4.7":"98.0.4758.141","17.4.8":"98.0.4758.141","17.4.9":"98.0.4758.141","17.4.10":"98.0.4758.141","17.4.11":"98.0.4758.141","18.0.0-alpha.1":"99.0.4767.0","18.0.0-alpha.2":"99.0.4767.0","18.0.0-alpha.3":"99.0.4767.0","18.0.0-alpha.4":"99.0.4767.0","18.0.0-alpha.5":"99.0.4767.0","18.0.0-beta.1":"100.0.4894.0","18.0.0-beta.2":"100.0.4894.0","18.0.0-beta.3":"100.0.4894.0","18.0.0-beta.4":"100.0.4894.0","18.0.0-beta.5":"100.0.4894.0","18.0.0-beta.6":"100.0.4894.0","18.0.0-nightly.20211118":"96.0.4664.4","18.0.0-nightly.20211119":"96.0.4664.4","18.0.0-nightly.20211122":"96.0.4664.4","18.0.0-nightly.20211123":"96.0.4664.4","18.0.0-nightly.20211124":"98.0.4706.0","18.0.0-nightly.20211125":"98.0.4706.0","18.0.0-nightly.20211126":"98.0.4706.0","18.0.0-nightly.20211129":"98.0.4706.0","18.0.0-nightly.20211130":"98.0.4706.0","18.0.0-nightly.20211201":"98.0.4706.0","18.0.0-nightly.20211202":"98.0.4706.0","18.0.0-nightly.20211203":"98.0.4706.0","18.0.0-nightly.20211206":"98.0.4706.0","18.0.0-nightly.20211207":"98.0.4706.0","18.0.0-nightly.20211208":"98.0.4706.0","18.0.0-nightly.20211209":"98.0.4706.0","18.0.0-nightly.20211210":"98.0.4706.0","18.0.0-nightly.20211213":"98.0.4706.0","18.0.0-nightly.20211214":"98.0.4706.0","18.0.0-nightly.20211215":"98.0.4706.0","18.0.0-nightly.20211216":"98.0.4706.0","18.0.0-nightly.20211217":"98.0.4706.0","18.0.0-nightly.20211220":"98.0.4706.0","18.0.0-nightly.20211221":"98.0.4706.0","18.0.0-nightly.20211222":"98.0.4706.0","18.0.0-nightly.20211223":"98.0.4706.0","18.0.0-nightly.20211228":"98.0.4706.0","18.0.0-nightly.20211229":"98.0.4706.0","18.0.0-nightly.20211231":"98.0.4706.0","18.0.0-nightly.20220103":"98.0.4706.0","18.0.0-nightly.20220104":"98.0.4706.0","18.0.0-nightly.20220105":"98.0.4706.0","18.0.0-nightly.20220106":"98.0.4706.0","18.0.0-nightly.20220107":"98.0.4706.0","18.0.0-nightly.20220110":"98.0.4706.0","18.0.0-nightly.20220111":"99.0.4767.0","18.0.0-nightly.20220112":"99.0.4767.0","18.0.0-nightly.20220113":"99.0.4767.0","18.0.0-nightly.20220114":"99.0.4767.0","18.0.0-nightly.20220117":"99.0.4767.0","18.0.0-nightly.20220118":"99.0.4767.0","18.0.0-nightly.20220119":"99.0.4767.0","18.0.0-nightly.20220121":"99.0.4767.0","18.0.0-nightly.20220124":"99.0.4767.0","18.0.0-nightly.20220125":"99.0.4767.0","18.0.0-nightly.20220127":"99.0.4767.0","18.0.0-nightly.20220128":"99.0.4767.0","18.0.0-nightly.20220131":"99.0.4767.0","18.0.0-nightly.20220201":"99.0.4767.0","18.0.0":"100.0.4896.56","18.0.1":"100.0.4896.60","18.0.2":"100.0.4896.60","18.0.3":"100.0.4896.75","18.0.4":"100.0.4896.75","18.1.0":"100.0.4896.127","18.2.0":"100.0.4896.143","18.2.1":"100.0.4896.143","18.2.2":"100.0.4896.143","18.2.3":"100.0.4896.143","18.2.4":"100.0.4896.160","18.3.0":"100.0.4896.160","18.3.1":"100.0.4896.160","18.3.2":"100.0.4896.160","18.3.3":"100.0.4896.160","18.3.4":"100.0.4896.160","18.3.5":"100.0.4896.160","18.3.6":"100.0.4896.160","18.3.7":"100.0.4896.160","18.3.8":"100.0.4896.160","18.3.9":"100.0.4896.160","18.3.11":"100.0.4896.160","18.3.12":"100.0.4896.160","18.3.13":"100.0.4896.160","18.3.14":"100.0.4896.160","18.3.15":"100.0.4896.160","19.0.0-alpha.1":"102.0.4962.3","19.0.0-alpha.2":"102.0.4971.0","19.0.0-alpha.3":"102.0.4971.0","19.0.0-alpha.4":"102.0.4989.0","19.0.0-alpha.5":"102.0.4989.0","19.0.0-beta.1":"102.0.4999.0","19.0.0-beta.2":"102.0.4999.0","19.0.0-beta.3":"102.0.4999.0","19.0.0-beta.4":"102.0.5005.27","19.0.0-beta.5":"102.0.5005.40","19.0.0-beta.6":"102.0.5005.40","19.0.0-beta.7":"102.0.5005.40","19.0.0-beta.8":"102.0.5005.49","19.0.0-nightly.20220202":"99.0.4767.0","19.0.0-nightly.20220203":"99.0.4767.0","19.0.0-nightly.20220204":"99.0.4767.0","19.0.0-nightly.20220207":"99.0.4767.0","19.0.0-nightly.20220208":"99.0.4767.0","19.0.0-nightly.20220209":"99.0.4767.0","19.0.0-nightly.20220308":"100.0.4894.0","19.0.0-nightly.20220309":"100.0.4894.0","19.0.0-nightly.20220310":"100.0.4894.0","19.0.0-nightly.20220311":"100.0.4894.0","19.0.0-nightly.20220314":"100.0.4894.0","19.0.0-nightly.20220315":"100.0.4894.0","19.0.0-nightly.20220316":"100.0.4894.0","19.0.0-nightly.20220317":"100.0.4894.0","19.0.0-nightly.20220318":"100.0.4894.0","19.0.0-nightly.20220321":"100.0.4894.0","19.0.0-nightly.20220322":"100.0.4894.0","19.0.0-nightly.20220323":"100.0.4894.0","19.0.0-nightly.20220324":"100.0.4894.0","19.0.0-nightly.20220325":"102.0.4961.0","19.0.0-nightly.20220328":"102.0.4962.3","19.0.0-nightly.20220329":"102.0.4962.3","19.0.0":"102.0.5005.61","19.0.1":"102.0.5005.61","19.0.2":"102.0.5005.63","19.0.3":"102.0.5005.63","19.0.4":"102.0.5005.63","19.0.5":"102.0.5005.115","19.0.6":"102.0.5005.115","19.0.7":"102.0.5005.134","19.0.8":"102.0.5005.148","19.0.9":"102.0.5005.167","19.0.10":"102.0.5005.167","19.0.11":"102.0.5005.167","19.0.12":"102.0.5005.167","19.0.13":"102.0.5005.167","19.0.14":"102.0.5005.167","19.0.15":"102.0.5005.167","19.0.16":"102.0.5005.167","19.0.17":"102.0.5005.167","19.1.0":"102.0.5005.167","19.1.1":"102.0.5005.167","19.1.2":"102.0.5005.167","19.1.3":"102.0.5005.167","19.1.4":"102.0.5005.167","19.1.5":"102.0.5005.167","19.1.6":"102.0.5005.167","19.1.7":"102.0.5005.167","19.1.8":"102.0.5005.167","19.1.9":"102.0.5005.167","20.0.0-alpha.1":"103.0.5044.0","20.0.0-alpha.2":"104.0.5073.0","20.0.0-alpha.3":"104.0.5073.0","20.0.0-alpha.4":"104.0.5073.0","20.0.0-alpha.5":"104.0.5073.0","20.0.0-alpha.6":"104.0.5073.0","20.0.0-alpha.7":"104.0.5073.0","20.0.0-beta.1":"104.0.5073.0","20.0.0-beta.2":"104.0.5073.0","20.0.0-beta.3":"104.0.5073.0","20.0.0-beta.4":"104.0.5073.0","20.0.0-beta.5":"104.0.5073.0","20.0.0-beta.6":"104.0.5073.0","20.0.0-beta.7":"104.0.5073.0","20.0.0-beta.8":"104.0.5073.0","20.0.0-beta.9":"104.0.5112.39","20.0.0-beta.10":"104.0.5112.48","20.0.0-beta.11":"104.0.5112.48","20.0.0-beta.12":"104.0.5112.48","20.0.0-beta.13":"104.0.5112.57","20.0.0-nightly.20220330":"102.0.4962.3","20.0.0-nightly.20220411":"102.0.4971.0","20.0.0-nightly.20220414":"102.0.4989.0","20.0.0-nightly.20220415":"102.0.4989.0","20.0.0-nightly.20220418":"102.0.4989.0","20.0.0-nightly.20220419":"102.0.4989.0","20.0.0-nightly.20220420":"102.0.4989.0","20.0.0-nightly.20220421":"102.0.4989.0","20.0.0-nightly.20220425":"102.0.4999.0","20.0.0-nightly.20220426":"102.0.4999.0","20.0.0-nightly.20220427":"102.0.4999.0","20.0.0-nightly.20220428":"102.0.4999.0","20.0.0-nightly.20220429":"102.0.4999.0","20.0.0-nightly.20220502":"102.0.4999.0","20.0.0-nightly.20220503":"102.0.4999.0","20.0.0-nightly.20220504":"102.0.4999.0","20.0.0-nightly.20220505":"102.0.4999.0","20.0.0-nightly.20220506":"102.0.4999.0","20.0.0-nightly.20220509":"102.0.4999.0","20.0.0-nightly.20220511":"102.0.4999.0","20.0.0-nightly.20220512":"102.0.4999.0","20.0.0-nightly.20220513":"102.0.4999.0","20.0.0-nightly.20220516":"102.0.4999.0","20.0.0-nightly.20220517":"102.0.4999.0","20.0.0-nightly.20220518":"103.0.5044.0","20.0.0-nightly.20220519":"103.0.5044.0","20.0.0-nightly.20220520":"103.0.5044.0","20.0.0-nightly.20220523":"103.0.5044.0","20.0.0-nightly.20220524":"103.0.5044.0","20.0.0":"104.0.5112.65","20.0.1":"104.0.5112.81","20.0.2":"104.0.5112.81","20.0.3":"104.0.5112.81","20.1.0":"104.0.5112.102","20.1.1":"104.0.5112.102","20.1.2":"104.0.5112.114","20.1.3":"104.0.5112.114","20.1.4":"104.0.5112.114","20.2.0":"104.0.5112.124","20.3.0":"104.0.5112.124","20.3.1":"104.0.5112.124","20.3.2":"104.0.5112.124","20.3.3":"104.0.5112.124","20.3.4":"104.0.5112.124","20.3.5":"104.0.5112.124","20.3.6":"104.0.5112.124","20.3.7":"104.0.5112.124","20.3.8":"104.0.5112.124","20.3.9":"104.0.5112.124","20.3.10":"104.0.5112.124","20.3.11":"104.0.5112.124","20.3.12":"104.0.5112.124","21.0.0-alpha.1":"105.0.5187.0","21.0.0-alpha.2":"105.0.5187.0","21.0.0-alpha.3":"105.0.5187.0","21.0.0-alpha.4":"105.0.5187.0","21.0.0-alpha.5":"105.0.5187.0","21.0.0-alpha.6":"106.0.5216.0","21.0.0-beta.1":"106.0.5216.0","21.0.0-beta.2":"106.0.5216.0","21.0.0-beta.3":"106.0.5216.0","21.0.0-beta.4":"106.0.5216.0","21.0.0-beta.5":"106.0.5216.0","21.0.0-beta.6":"106.0.5249.40","21.0.0-beta.7":"106.0.5249.40","21.0.0-beta.8":"106.0.5249.40","21.0.0-nightly.20220526":"103.0.5044.0","21.0.0-nightly.20220527":"103.0.5044.0","21.0.0-nightly.20220530":"103.0.5044.0","21.0.0-nightly.20220531":"103.0.5044.0","21.0.0-nightly.20220602":"104.0.5073.0","21.0.0-nightly.20220603":"104.0.5073.0","21.0.0-nightly.20220606":"104.0.5073.0","21.0.0-nightly.20220607":"104.0.5073.0","21.0.0-nightly.20220608":"104.0.5073.0","21.0.0-nightly.20220609":"104.0.5073.0","21.0.0-nightly.20220610":"104.0.5073.0","21.0.0-nightly.20220613":"104.0.5073.0","21.0.0-nightly.20220614":"104.0.5073.0","21.0.0-nightly.20220615":"104.0.5073.0","21.0.0-nightly.20220616":"104.0.5073.0","21.0.0-nightly.20220617":"104.0.5073.0","21.0.0-nightly.20220620":"104.0.5073.0","21.0.0-nightly.20220621":"104.0.5073.0","21.0.0-nightly.20220622":"104.0.5073.0","21.0.0-nightly.20220623":"104.0.5073.0","21.0.0-nightly.20220624":"104.0.5073.0","21.0.0-nightly.20220627":"104.0.5073.0","21.0.0-nightly.20220628":"105.0.5129.0","21.0.0-nightly.20220629":"105.0.5129.0","21.0.0-nightly.20220630":"105.0.5129.0","21.0.0-nightly.20220701":"105.0.5129.0","21.0.0-nightly.20220704":"105.0.5129.0","21.0.0-nightly.20220705":"105.0.5129.0","21.0.0-nightly.20220706":"105.0.5129.0","21.0.0-nightly.20220707":"105.0.5129.0","21.0.0-nightly.20220708":"105.0.5129.0","21.0.0-nightly.20220711":"105.0.5129.0","21.0.0-nightly.20220712":"105.0.5129.0","21.0.0-nightly.20220713":"105.0.5129.0","21.0.0-nightly.20220715":"105.0.5173.0","21.0.0-nightly.20220718":"105.0.5173.0","21.0.0-nightly.20220719":"105.0.5173.0","21.0.0-nightly.20220720":"105.0.5187.0","21.0.0-nightly.20220721":"105.0.5187.0","21.0.0-nightly.20220722":"105.0.5187.0","21.0.0-nightly.20220725":"105.0.5187.0","21.0.0-nightly.20220726":"105.0.5187.0","21.0.0-nightly.20220727":"105.0.5187.0","21.0.0-nightly.20220728":"105.0.5187.0","21.0.0-nightly.20220801":"105.0.5187.0","21.0.0-nightly.20220802":"105.0.5187.0","21.0.0":"106.0.5249.51","21.0.1":"106.0.5249.61","21.1.0":"106.0.5249.91","21.1.1":"106.0.5249.103","21.2.0":"106.0.5249.119","21.2.1":"106.0.5249.165","21.2.2":"106.0.5249.168","21.2.3":"106.0.5249.168","21.3.0":"106.0.5249.181","21.3.1":"106.0.5249.181","21.3.3":"106.0.5249.199","21.3.4":"106.0.5249.199","21.3.5":"106.0.5249.199","21.4.0":"106.0.5249.199","21.4.1":"106.0.5249.199","21.4.2":"106.0.5249.199","21.4.3":"106.0.5249.199","21.4.4":"106.0.5249.199","22.0.0-alpha.1":"107.0.5286.0","22.0.0-alpha.3":"108.0.5329.0","22.0.0-alpha.4":"108.0.5329.0","22.0.0-alpha.5":"108.0.5329.0","22.0.0-alpha.6":"108.0.5329.0","22.0.0-alpha.7":"108.0.5355.0","22.0.0-alpha.8":"108.0.5359.10","22.0.0-beta.1":"108.0.5359.10","22.0.0-beta.2":"108.0.5359.10","22.0.0-beta.3":"108.0.5359.10","22.0.0-beta.4":"108.0.5359.29","22.0.0-beta.5":"108.0.5359.40","22.0.0-beta.6":"108.0.5359.40","22.0.0-beta.7":"108.0.5359.48","22.0.0-beta.8":"108.0.5359.48","22.0.0-nightly.20220808":"105.0.5187.0","22.0.0-nightly.20220809":"105.0.5187.0","22.0.0-nightly.20220810":"105.0.5187.0","22.0.0-nightly.20220811":"105.0.5187.0","22.0.0-nightly.20220812":"105.0.5187.0","22.0.0-nightly.20220815":"105.0.5187.0","22.0.0-nightly.20220816":"105.0.5187.0","22.0.0-nightly.20220817":"105.0.5187.0","22.0.0-nightly.20220822":"106.0.5216.0","22.0.0-nightly.20220823":"106.0.5216.0","22.0.0-nightly.20220824":"106.0.5216.0","22.0.0-nightly.20220825":"106.0.5216.0","22.0.0-nightly.20220829":"106.0.5216.0","22.0.0-nightly.20220830":"106.0.5216.0","22.0.0-nightly.20220831":"106.0.5216.0","22.0.0-nightly.20220901":"106.0.5216.0","22.0.0-nightly.20220902":"106.0.5216.0","22.0.0-nightly.20220905":"106.0.5216.0","22.0.0-nightly.20220908":"107.0.5274.0","22.0.0-nightly.20220909":"107.0.5286.0","22.0.0-nightly.20220912":"107.0.5286.0","22.0.0-nightly.20220913":"107.0.5286.0","22.0.0-nightly.20220914":"107.0.5286.0","22.0.0-nightly.20220915":"107.0.5286.0","22.0.0-nightly.20220916":"107.0.5286.0","22.0.0-nightly.20220919":"107.0.5286.0","22.0.0-nightly.20220920":"107.0.5286.0","22.0.0-nightly.20220921":"107.0.5286.0","22.0.0-nightly.20220922":"107.0.5286.0","22.0.0-nightly.20220923":"107.0.5286.0","22.0.0-nightly.20220926":"107.0.5286.0","22.0.0-nightly.20220927":"107.0.5286.0","22.0.0-nightly.20220928":"107.0.5286.0","22.0.0":"108.0.5359.62","22.0.1":"108.0.5359.125","22.0.2":"108.0.5359.179","22.0.3":"108.0.5359.179","22.1.0":"108.0.5359.179","22.2.0":"108.0.5359.215","22.2.1":"108.0.5359.215","22.3.0":"108.0.5359.215","22.3.1":"108.0.5359.215","22.3.2":"108.0.5359.215","22.3.3":"108.0.5359.215","22.3.4":"108.0.5359.215","22.3.5":"108.0.5359.215","22.3.6":"108.0.5359.215","22.3.7":"108.0.5359.215","22.3.8":"108.0.5359.215","22.3.9":"108.0.5359.215","22.3.10":"108.0.5359.215","22.3.11":"108.0.5359.215","22.3.12":"108.0.5359.215","22.3.13":"108.0.5359.215","22.3.14":"108.0.5359.215","22.3.15":"108.0.5359.215","22.3.16":"108.0.5359.215","22.3.17":"108.0.5359.215","22.3.18":"108.0.5359.215","22.3.20":"108.0.5359.215","22.3.21":"108.0.5359.215","22.3.22":"108.0.5359.215","22.3.23":"108.0.5359.215","22.3.24":"108.0.5359.215","22.3.25":"108.0.5359.215","22.3.26":"108.0.5359.215","22.3.27":"108.0.5359.215","23.0.0-alpha.1":"110.0.5415.0","23.0.0-alpha.2":"110.0.5451.0","23.0.0-alpha.3":"110.0.5451.0","23.0.0-beta.1":"110.0.5478.5","23.0.0-beta.2":"110.0.5478.5","23.0.0-beta.3":"110.0.5478.5","23.0.0-beta.4":"110.0.5481.30","23.0.0-beta.5":"110.0.5481.38","23.0.0-beta.6":"110.0.5481.52","23.0.0-beta.8":"110.0.5481.52","23.0.0-nightly.20220929":"107.0.5286.0","23.0.0-nightly.20220930":"107.0.5286.0","23.0.0-nightly.20221003":"107.0.5286.0","23.0.0-nightly.20221004":"108.0.5329.0","23.0.0-nightly.20221005":"108.0.5329.0","23.0.0-nightly.20221006":"108.0.5329.0","23.0.0-nightly.20221007":"108.0.5329.0","23.0.0-nightly.20221010":"108.0.5329.0","23.0.0-nightly.20221011":"108.0.5329.0","23.0.0-nightly.20221012":"108.0.5329.0","23.0.0-nightly.20221013":"108.0.5329.0","23.0.0-nightly.20221014":"108.0.5329.0","23.0.0-nightly.20221017":"108.0.5329.0","23.0.0-nightly.20221018":"108.0.5355.0","23.0.0-nightly.20221019":"108.0.5355.0","23.0.0-nightly.20221020":"108.0.5355.0","23.0.0-nightly.20221021":"108.0.5355.0","23.0.0-nightly.20221024":"108.0.5355.0","23.0.0-nightly.20221026":"108.0.5355.0","23.0.0-nightly.20221027":"109.0.5382.0","23.0.0-nightly.20221028":"109.0.5382.0","23.0.0-nightly.20221031":"109.0.5382.0","23.0.0-nightly.20221101":"109.0.5382.0","23.0.0-nightly.20221102":"109.0.5382.0","23.0.0-nightly.20221103":"109.0.5382.0","23.0.0-nightly.20221104":"109.0.5382.0","23.0.0-nightly.20221107":"109.0.5382.0","23.0.0-nightly.20221108":"109.0.5382.0","23.0.0-nightly.20221109":"109.0.5382.0","23.0.0-nightly.20221110":"109.0.5382.0","23.0.0-nightly.20221111":"109.0.5382.0","23.0.0-nightly.20221114":"109.0.5382.0","23.0.0-nightly.20221115":"109.0.5382.0","23.0.0-nightly.20221116":"109.0.5382.0","23.0.0-nightly.20221117":"109.0.5382.0","23.0.0-nightly.20221118":"110.0.5415.0","23.0.0-nightly.20221121":"110.0.5415.0","23.0.0-nightly.20221122":"110.0.5415.0","23.0.0-nightly.20221123":"110.0.5415.0","23.0.0-nightly.20221124":"110.0.5415.0","23.0.0-nightly.20221125":"110.0.5415.0","23.0.0-nightly.20221128":"110.0.5415.0","23.0.0-nightly.20221129":"110.0.5415.0","23.0.0-nightly.20221130":"110.0.5415.0","23.0.0":"110.0.5481.77","23.1.0":"110.0.5481.100","23.1.1":"110.0.5481.104","23.1.2":"110.0.5481.177","23.1.3":"110.0.5481.179","23.1.4":"110.0.5481.192","23.2.0":"110.0.5481.192","23.2.1":"110.0.5481.208","23.2.2":"110.0.5481.208","23.2.3":"110.0.5481.208","23.2.4":"110.0.5481.208","23.3.0":"110.0.5481.208","23.3.1":"110.0.5481.208","23.3.2":"110.0.5481.208","23.3.3":"110.0.5481.208","23.3.4":"110.0.5481.208","23.3.5":"110.0.5481.208","23.3.6":"110.0.5481.208","23.3.7":"110.0.5481.208","23.3.8":"110.0.5481.208","23.3.9":"110.0.5481.208","23.3.10":"110.0.5481.208","23.3.11":"110.0.5481.208","23.3.12":"110.0.5481.208","23.3.13":"110.0.5481.208","24.0.0-alpha.1":"111.0.5560.0","24.0.0-alpha.2":"111.0.5560.0","24.0.0-alpha.3":"111.0.5560.0","24.0.0-alpha.4":"111.0.5560.0","24.0.0-alpha.5":"111.0.5560.0","24.0.0-alpha.6":"111.0.5560.0","24.0.0-alpha.7":"111.0.5560.0","24.0.0-beta.1":"111.0.5563.50","24.0.0-beta.2":"111.0.5563.50","24.0.0-beta.3":"112.0.5615.20","24.0.0-beta.4":"112.0.5615.20","24.0.0-beta.5":"112.0.5615.29","24.0.0-beta.6":"112.0.5615.39","24.0.0-beta.7":"112.0.5615.39","24.0.0-nightly.20221201":"110.0.5415.0","24.0.0-nightly.20221202":"110.0.5415.0","24.0.0-nightly.20221205":"110.0.5415.0","24.0.0-nightly.20221206":"110.0.5451.0","24.0.0-nightly.20221207":"110.0.5451.0","24.0.0-nightly.20221208":"110.0.5451.0","24.0.0-nightly.20221213":"110.0.5451.0","24.0.0-nightly.20221214":"110.0.5451.0","24.0.0-nightly.20221215":"110.0.5451.0","24.0.0-nightly.20221216":"110.0.5451.0","24.0.0-nightly.20230109":"111.0.5518.0","24.0.0-nightly.20230110":"111.0.5518.0","24.0.0-nightly.20230111":"111.0.5518.0","24.0.0-nightly.20230112":"111.0.5518.0","24.0.0-nightly.20230113":"111.0.5518.0","24.0.0-nightly.20230116":"111.0.5518.0","24.0.0-nightly.20230117":"111.0.5518.0","24.0.0-nightly.20230118":"111.0.5518.0","24.0.0-nightly.20230119":"111.0.5518.0","24.0.0-nightly.20230120":"111.0.5518.0","24.0.0-nightly.20230123":"111.0.5518.0","24.0.0-nightly.20230124":"111.0.5518.0","24.0.0-nightly.20230125":"111.0.5518.0","24.0.0-nightly.20230126":"111.0.5518.0","24.0.0-nightly.20230127":"111.0.5518.0","24.0.0-nightly.20230131":"111.0.5518.0","24.0.0-nightly.20230201":"111.0.5518.0","24.0.0-nightly.20230202":"111.0.5518.0","24.0.0-nightly.20230203":"111.0.5560.0","24.0.0-nightly.20230206":"111.0.5560.0","24.0.0-nightly.20230207":"111.0.5560.0","24.0.0-nightly.20230208":"111.0.5560.0","24.0.0-nightly.20230209":"111.0.5560.0","24.0.0":"112.0.5615.49","24.1.0":"112.0.5615.50","24.1.1":"112.0.5615.50","24.1.2":"112.0.5615.87","24.1.3":"112.0.5615.165","24.2.0":"112.0.5615.165","24.3.0":"112.0.5615.165","24.3.1":"112.0.5615.183","24.4.0":"112.0.5615.204","24.4.1":"112.0.5615.204","24.5.0":"112.0.5615.204","24.5.1":"112.0.5615.204","24.6.0":"112.0.5615.204","24.6.1":"112.0.5615.204","24.6.2":"112.0.5615.204","24.6.3":"112.0.5615.204","24.6.4":"112.0.5615.204","24.6.5":"112.0.5615.204","24.7.0":"112.0.5615.204","24.7.1":"112.0.5615.204","24.8.0":"112.0.5615.204","24.8.1":"112.0.5615.204","24.8.2":"112.0.5615.204","24.8.3":"112.0.5615.204","24.8.4":"112.0.5615.204","24.8.5":"112.0.5615.204","24.8.6":"112.0.5615.204","24.8.7":"112.0.5615.204","24.8.8":"112.0.5615.204","25.0.0-alpha.1":"114.0.5694.0","25.0.0-alpha.2":"114.0.5694.0","25.0.0-alpha.3":"114.0.5710.0","25.0.0-alpha.4":"114.0.5710.0","25.0.0-alpha.5":"114.0.5719.0","25.0.0-alpha.6":"114.0.5719.0","25.0.0-beta.1":"114.0.5719.0","25.0.0-beta.2":"114.0.5719.0","25.0.0-beta.3":"114.0.5719.0","25.0.0-beta.4":"114.0.5735.16","25.0.0-beta.5":"114.0.5735.16","25.0.0-beta.6":"114.0.5735.16","25.0.0-beta.7":"114.0.5735.16","25.0.0-beta.8":"114.0.5735.35","25.0.0-beta.9":"114.0.5735.45","25.0.0-nightly.20230210":"111.0.5560.0","25.0.0-nightly.20230214":"111.0.5560.0","25.0.0-nightly.20230215":"111.0.5560.0","25.0.0-nightly.20230216":"111.0.5560.0","25.0.0-nightly.20230217":"111.0.5560.0","25.0.0-nightly.20230220":"111.0.5560.0","25.0.0-nightly.20230221":"111.0.5560.0","25.0.0-nightly.20230222":"111.0.5560.0","25.0.0-nightly.20230223":"111.0.5560.0","25.0.0-nightly.20230224":"111.0.5560.0","25.0.0-nightly.20230227":"111.0.5560.0","25.0.0-nightly.20230228":"111.0.5560.0","25.0.0-nightly.20230301":"111.0.5560.0","25.0.0-nightly.20230302":"111.0.5560.0","25.0.0-nightly.20230303":"111.0.5560.0","25.0.0-nightly.20230306":"111.0.5560.0","25.0.0-nightly.20230307":"111.0.5560.0","25.0.0-nightly.20230308":"111.0.5560.0","25.0.0-nightly.20230309":"111.0.5560.0","25.0.0-nightly.20230310":"111.0.5560.0","25.0.0-nightly.20230314":"113.0.5636.0","25.0.0-nightly.20230315":"113.0.5651.0","25.0.0-nightly.20230317":"113.0.5653.0","25.0.0-nightly.20230320":"113.0.5660.0","25.0.0-nightly.20230321":"113.0.5664.0","25.0.0-nightly.20230322":"113.0.5666.0","25.0.0-nightly.20230323":"113.0.5668.0","25.0.0-nightly.20230324":"113.0.5670.0","25.0.0-nightly.20230327":"113.0.5670.0","25.0.0-nightly.20230328":"113.0.5670.0","25.0.0-nightly.20230329":"113.0.5670.0","25.0.0-nightly.20230330":"113.0.5670.0","25.0.0-nightly.20230331":"114.0.5684.0","25.0.0-nightly.20230403":"114.0.5684.0","25.0.0-nightly.20230404":"114.0.5692.0","25.0.0-nightly.20230405":"114.0.5694.0","25.0.0":"114.0.5735.45","25.0.1":"114.0.5735.45","25.1.0":"114.0.5735.106","25.1.1":"114.0.5735.106","25.2.0":"114.0.5735.134","25.3.0":"114.0.5735.199","25.3.1":"114.0.5735.243","25.3.2":"114.0.5735.248","25.4.0":"114.0.5735.248","25.5.0":"114.0.5735.289","25.6.0":"114.0.5735.289","25.7.0":"114.0.5735.289","25.8.0":"114.0.5735.289","25.8.1":"114.0.5735.289","25.8.2":"114.0.5735.289","25.8.3":"114.0.5735.289","25.8.4":"114.0.5735.289","25.9.0":"114.0.5735.289","25.9.1":"114.0.5735.289","25.9.2":"114.0.5735.289","25.9.3":"114.0.5735.289","26.0.0-alpha.1":"116.0.5791.0","26.0.0-alpha.2":"116.0.5791.0","26.0.0-alpha.3":"116.0.5791.0","26.0.0-alpha.4":"116.0.5791.0","26.0.0-alpha.5":"116.0.5791.0","26.0.0-alpha.6":"116.0.5815.0","26.0.0-alpha.7":"116.0.5831.0","26.0.0-alpha.8":"116.0.5845.0","26.0.0-beta.1":"116.0.5845.0","26.0.0-beta.2":"116.0.5845.14","26.0.0-beta.3":"116.0.5845.14","26.0.0-beta.4":"116.0.5845.14","26.0.0-beta.5":"116.0.5845.14","26.0.0-beta.6":"116.0.5845.14","26.0.0-beta.7":"116.0.5845.14","26.0.0-beta.8":"116.0.5845.42","26.0.0-beta.9":"116.0.5845.42","26.0.0-beta.10":"116.0.5845.49","26.0.0-beta.11":"116.0.5845.49","26.0.0-beta.12":"116.0.5845.62","26.0.0-nightly.20230406":"114.0.5694.0","26.0.0-nightly.20230407":"114.0.5694.0","26.0.0-nightly.20230410":"114.0.5694.0","26.0.0-nightly.20230411":"114.0.5694.0","26.0.0-nightly.20230412":"114.0.5708.0","26.0.0-nightly.20230413":"114.0.5710.0","26.0.0-nightly.20230414":"114.0.5710.0","26.0.0-nightly.20230417":"114.0.5710.0","26.0.0-nightly.20230418":"114.0.5715.0","26.0.0-nightly.20230421":"114.0.5719.0","26.0.0-nightly.20230424":"114.0.5719.0","26.0.0-nightly.20230425":"114.0.5719.0","26.0.0-nightly.20230426":"114.0.5719.0","26.0.0-nightly.20230427":"114.0.5719.0","26.0.0-nightly.20230428":"114.0.5719.0","26.0.0-nightly.20230501":"114.0.5719.0","26.0.0-nightly.20230502":"114.0.5719.0","26.0.0-nightly.20230503":"114.0.5719.0","26.0.0-nightly.20230504":"114.0.5719.0","26.0.0-nightly.20230505":"114.0.5719.0","26.0.0-nightly.20230508":"114.0.5719.0","26.0.0-nightly.20230509":"114.0.5719.0","26.0.0-nightly.20230510":"114.0.5719.0","26.0.0-nightly.20230511":"115.0.5760.0","26.0.0-nightly.20230512":"115.0.5760.0","26.0.0-nightly.20230515":"115.0.5760.0","26.0.0-nightly.20230516":"115.0.5760.0","26.0.0-nightly.20230517":"115.0.5760.0","26.0.0-nightly.20230518":"115.0.5760.0","26.0.0-nightly.20230519":"115.0.5760.0","26.0.0-nightly.20230522":"115.0.5760.0","26.0.0-nightly.20230523":"115.0.5760.0","26.0.0-nightly.20230524":"115.0.5786.0","26.0.0-nightly.20230525":"115.0.5790.0","26.0.0-nightly.20230526":"116.0.5791.0","26.0.0-nightly.20230529":"116.0.5791.0","26.0.0-nightly.20230530":"116.0.5791.0","26.0.0-nightly.20230531":"116.0.5791.0","26.0.0":"116.0.5845.82","26.1.0":"116.0.5845.97","26.2.0":"116.0.5845.179","26.2.1":"116.0.5845.188","26.2.2":"116.0.5845.190","26.2.3":"116.0.5845.190","26.2.4":"116.0.5845.190","26.3.0":"116.0.5845.228","26.4.0":"116.0.5845.228","26.4.1":"116.0.5845.228","26.4.2":"116.0.5845.228","26.4.3":"116.0.5845.228","27.0.0-alpha.1":"118.0.5949.0","27.0.0-alpha.2":"118.0.5949.0","27.0.0-alpha.3":"118.0.5949.0","27.0.0-alpha.4":"118.0.5949.0","27.0.0-alpha.5":"118.0.5949.0","27.0.0-alpha.6":"118.0.5949.0","27.0.0-beta.1":"118.0.5993.5","27.0.0-beta.2":"118.0.5993.5","27.0.0-beta.3":"118.0.5993.5","27.0.0-beta.4":"118.0.5993.11","27.0.0-beta.5":"118.0.5993.18","27.0.0-beta.6":"118.0.5993.18","27.0.0-beta.7":"118.0.5993.18","27.0.0-beta.8":"118.0.5993.18","27.0.0-beta.9":"118.0.5993.18","27.0.0-nightly.20230601":"116.0.5791.0","27.0.0-nightly.20230602":"116.0.5791.0","27.0.0-nightly.20230605":"116.0.5791.0","27.0.0-nightly.20230606":"116.0.5791.0","27.0.0-nightly.20230607":"116.0.5791.0","27.0.0-nightly.20230609":"116.0.5791.0","27.0.0-nightly.20230612":"116.0.5815.0","27.0.0-nightly.20230613":"116.0.5815.0","27.0.0-nightly.20230614":"116.0.5829.0","27.0.0-nightly.20230615":"116.0.5831.0","27.0.0-nightly.20230616":"116.0.5833.0","27.0.0-nightly.20230619":"116.0.5833.0","27.0.0-nightly.20230620":"116.0.5833.0","27.0.0-nightly.20230621":"116.0.5833.0","27.0.0-nightly.20230622":"116.0.5845.0","27.0.0-nightly.20230623":"116.0.5845.0","27.0.0-nightly.20230626":"116.0.5845.0","27.0.0-nightly.20230627":"116.0.5845.0","27.0.0-nightly.20230628":"116.0.5845.0","27.0.0-nightly.20230629":"116.0.5845.0","27.0.0-nightly.20230630":"116.0.5845.0","27.0.0-nightly.20230703":"117.0.5852.0","27.0.0-nightly.20230704":"117.0.5852.0","27.0.0-nightly.20230705":"117.0.5852.0","27.0.0-nightly.20230706":"117.0.5852.0","27.0.0-nightly.20230707":"117.0.5852.0","27.0.0-nightly.20230710":"117.0.5852.0","27.0.0-nightly.20230711":"117.0.5852.0","27.0.0-nightly.20230712":"117.0.5852.0","27.0.0-nightly.20230713":"117.0.5852.0","27.0.0-nightly.20230714":"117.0.5852.0","27.0.0-nightly.20230717":"117.0.5884.1","27.0.0-nightly.20230718":"117.0.5884.1","27.0.0-nightly.20230719":"117.0.5892.0","27.0.0-nightly.20230720":"117.0.5897.0","27.0.0-nightly.20230721":"117.0.5897.0","27.0.0-nightly.20230724":"117.0.5897.0","27.0.0-nightly.20230725":"117.0.5897.0","27.0.0-nightly.20230726":"117.0.5897.0","27.0.0-nightly.20230727":"117.0.5897.0","27.0.0-nightly.20230728":"117.0.5897.0","27.0.0-nightly.20230731":"117.0.5897.0","27.0.0-nightly.20230801":"117.0.5911.0","27.0.0-nightly.20230802":"117.0.5911.0","27.0.0-nightly.20230803":"117.0.5911.0","27.0.0-nightly.20230804":"117.0.5921.0","27.0.0-nightly.20230807":"117.0.5921.0","27.0.0-nightly.20230808":"117.0.5921.0","27.0.0-nightly.20230814":"117.0.5921.0","27.0.0-nightly.20230815":"117.0.5921.0","27.0.0-nightly.20230816":"118.0.5949.0","27.0.0":"118.0.5993.54","27.0.1":"118.0.5993.89","27.0.2":"118.0.5993.89","27.0.3":"118.0.5993.120","28.0.0-alpha.1":"119.0.6045.0","28.0.0-alpha.2":"119.0.6045.0","28.0.0-alpha.3":"119.0.6045.21","28.0.0-alpha.4":"119.0.6045.21","28.0.0-alpha.5":"119.0.6045.33","28.0.0-alpha.6":"119.0.6045.33","28.0.0-alpha.7":"119.0.6045.33","28.0.0-beta.1":"119.0.6045.33","28.0.0-beta.2":"120.0.6099.0","28.0.0-nightly.20230817":"118.0.5949.0","28.0.0-nightly.20230818":"118.0.5949.0","28.0.0-nightly.20230821":"118.0.5949.0","28.0.0-nightly.20230822":"118.0.5949.0","28.0.0-nightly.20230823":"118.0.5949.0","28.0.0-nightly.20230824":"118.0.5949.0","28.0.0-nightly.20230825":"118.0.5949.0","28.0.0-nightly.20230828":"118.0.5949.0","28.0.0-nightly.20230829":"118.0.5949.0","28.0.0-nightly.20230830":"118.0.5949.0","28.0.0-nightly.20230831":"118.0.5949.0","28.0.0-nightly.20230906":"118.0.5991.0","28.0.0-nightly.20230907":"118.0.5993.0","28.0.0-nightly.20230908":"118.0.5993.0","28.0.0-nightly.20230911":"118.0.5993.0","28.0.0-nightly.20230912":"118.0.5993.0","28.0.0-nightly.20230913":"118.0.5993.0","28.0.0-nightly.20230914":"118.0.5993.0","28.0.0-nightly.20230915":"118.0.5993.0","28.0.0-nightly.20230919":"119.0.6006.0","28.0.0-nightly.20230920":"119.0.6017.0","28.0.0-nightly.20230921":"119.0.6019.2","28.0.0-nightly.20230925":"119.0.6019.2","28.0.0-nightly.20230926":"119.0.6019.2","28.0.0-nightly.20230927":"119.0.6019.2","28.0.0-nightly.20230928":"119.0.6019.2","28.0.0-nightly.20230929":"119.0.6029.0","28.0.0-nightly.20231002":"119.0.6029.0","28.0.0-nightly.20231003":"119.0.6043.0","28.0.0-nightly.20231004":"119.0.6043.0","28.0.0-nightly.20231005":"119.0.6043.0","28.0.0-nightly.20231006":"119.0.6045.0","28.0.0-nightly.20231009":"119.0.6045.0","28.0.0-nightly.20231010":"119.0.6045.0","28.0.0-nightly.20231011":"119.0.6045.0","29.0.0-nightly.20231012":"119.0.6045.0","29.0.0-nightly.20231013":"119.0.6045.0","29.0.0-nightly.20231016":"119.0.6045.0","29.0.0-nightly.20231017":"119.0.6045.0","29.0.0-nightly.20231018":"119.0.6045.0","29.0.0-nightly.20231019":"119.0.6045.0","29.0.0-nightly.20231020":"119.0.6045.0","29.0.0-nightly.20231023":"119.0.6045.0","29.0.0-nightly.20231024":"119.0.6045.0","29.0.0-nightly.20231025":"120.0.6078.0","29.0.0-nightly.20231026":"120.0.6078.0","29.0.0-nightly.20231027":"120.0.6078.0","29.0.0-nightly.20231030":"120.0.6078.0","29.0.0-nightly.20231031":"120.0.6078.0","29.0.0-nightly.20231101":"120.0.6078.0","29.0.0-nightly.20231102":"121.0.6100.0","29.0.0-nightly.20231103":"121.0.6100.0"} \ No newline at end of file +{"0.20.0":"39.0.2171.65","0.20.1":"39.0.2171.65","0.20.2":"39.0.2171.65","0.20.3":"39.0.2171.65","0.20.4":"39.0.2171.65","0.20.5":"39.0.2171.65","0.20.6":"39.0.2171.65","0.20.7":"39.0.2171.65","0.20.8":"39.0.2171.65","0.21.0":"40.0.2214.91","0.21.1":"40.0.2214.91","0.21.2":"40.0.2214.91","0.21.3":"41.0.2272.76","0.22.1":"41.0.2272.76","0.22.2":"41.0.2272.76","0.22.3":"41.0.2272.76","0.23.0":"41.0.2272.76","0.24.0":"41.0.2272.76","0.25.0":"42.0.2311.107","0.25.1":"42.0.2311.107","0.25.2":"42.0.2311.107","0.25.3":"42.0.2311.107","0.26.0":"42.0.2311.107","0.26.1":"42.0.2311.107","0.27.0":"42.0.2311.107","0.27.1":"42.0.2311.107","0.27.2":"43.0.2357.65","0.27.3":"43.0.2357.65","0.28.0":"43.0.2357.65","0.28.1":"43.0.2357.65","0.28.2":"43.0.2357.65","0.28.3":"43.0.2357.65","0.29.1":"43.0.2357.65","0.29.2":"43.0.2357.65","0.30.4":"44.0.2403.125","0.31.0":"44.0.2403.125","0.31.2":"45.0.2454.85","0.32.2":"45.0.2454.85","0.32.3":"45.0.2454.85","0.33.0":"45.0.2454.85","0.33.1":"45.0.2454.85","0.33.2":"45.0.2454.85","0.33.3":"45.0.2454.85","0.33.4":"45.0.2454.85","0.33.6":"45.0.2454.85","0.33.7":"45.0.2454.85","0.33.8":"45.0.2454.85","0.33.9":"45.0.2454.85","0.34.0":"45.0.2454.85","0.34.1":"45.0.2454.85","0.34.2":"45.0.2454.85","0.34.3":"45.0.2454.85","0.34.4":"45.0.2454.85","0.35.1":"45.0.2454.85","0.35.2":"45.0.2454.85","0.35.3":"45.0.2454.85","0.35.4":"45.0.2454.85","0.35.5":"45.0.2454.85","0.36.0":"47.0.2526.73","0.36.2":"47.0.2526.73","0.36.3":"47.0.2526.73","0.36.4":"47.0.2526.73","0.36.5":"47.0.2526.110","0.36.6":"47.0.2526.110","0.36.7":"47.0.2526.110","0.36.8":"47.0.2526.110","0.36.9":"47.0.2526.110","0.36.10":"47.0.2526.110","0.36.11":"47.0.2526.110","0.36.12":"47.0.2526.110","0.37.0":"49.0.2623.75","0.37.1":"49.0.2623.75","0.37.3":"49.0.2623.75","0.37.4":"49.0.2623.75","0.37.5":"49.0.2623.75","0.37.6":"49.0.2623.75","0.37.7":"49.0.2623.75","0.37.8":"49.0.2623.75","1.0.0":"49.0.2623.75","1.0.1":"49.0.2623.75","1.0.2":"49.0.2623.75","1.1.0":"50.0.2661.102","1.1.1":"50.0.2661.102","1.1.2":"50.0.2661.102","1.1.3":"50.0.2661.102","1.2.0":"51.0.2704.63","1.2.1":"51.0.2704.63","1.2.2":"51.0.2704.84","1.2.3":"51.0.2704.84","1.2.4":"51.0.2704.103","1.2.5":"51.0.2704.103","1.2.6":"51.0.2704.106","1.2.7":"51.0.2704.106","1.2.8":"51.0.2704.106","1.3.0":"52.0.2743.82","1.3.1":"52.0.2743.82","1.3.2":"52.0.2743.82","1.3.3":"52.0.2743.82","1.3.4":"52.0.2743.82","1.3.5":"52.0.2743.82","1.3.6":"52.0.2743.82","1.3.7":"52.0.2743.82","1.3.9":"52.0.2743.82","1.3.10":"52.0.2743.82","1.3.13":"52.0.2743.82","1.3.14":"52.0.2743.82","1.3.15":"52.0.2743.82","1.4.0":"53.0.2785.113","1.4.1":"53.0.2785.113","1.4.2":"53.0.2785.113","1.4.3":"53.0.2785.113","1.4.4":"53.0.2785.113","1.4.5":"53.0.2785.113","1.4.6":"53.0.2785.143","1.4.7":"53.0.2785.143","1.4.8":"53.0.2785.143","1.4.10":"53.0.2785.143","1.4.11":"53.0.2785.143","1.4.12":"54.0.2840.51","1.4.13":"53.0.2785.143","1.4.14":"53.0.2785.143","1.4.15":"53.0.2785.143","1.4.16":"53.0.2785.143","1.5.0":"54.0.2840.101","1.5.1":"54.0.2840.101","1.6.0":"56.0.2924.87","1.6.1":"56.0.2924.87","1.6.2":"56.0.2924.87","1.6.3":"56.0.2924.87","1.6.4":"56.0.2924.87","1.6.5":"56.0.2924.87","1.6.6":"56.0.2924.87","1.6.7":"56.0.2924.87","1.6.8":"56.0.2924.87","1.6.9":"56.0.2924.87","1.6.10":"56.0.2924.87","1.6.11":"56.0.2924.87","1.6.12":"56.0.2924.87","1.6.13":"56.0.2924.87","1.6.14":"56.0.2924.87","1.6.15":"56.0.2924.87","1.6.16":"56.0.2924.87","1.6.17":"56.0.2924.87","1.6.18":"56.0.2924.87","1.7.0":"58.0.3029.110","1.7.1":"58.0.3029.110","1.7.2":"58.0.3029.110","1.7.3":"58.0.3029.110","1.7.4":"58.0.3029.110","1.7.5":"58.0.3029.110","1.7.6":"58.0.3029.110","1.7.7":"58.0.3029.110","1.7.8":"58.0.3029.110","1.7.9":"58.0.3029.110","1.7.10":"58.0.3029.110","1.7.11":"58.0.3029.110","1.7.12":"58.0.3029.110","1.7.13":"58.0.3029.110","1.7.14":"58.0.3029.110","1.7.15":"58.0.3029.110","1.7.16":"58.0.3029.110","1.8.0":"59.0.3071.115","1.8.1":"59.0.3071.115","1.8.2-beta.1":"59.0.3071.115","1.8.2-beta.2":"59.0.3071.115","1.8.2-beta.3":"59.0.3071.115","1.8.2-beta.4":"59.0.3071.115","1.8.2-beta.5":"59.0.3071.115","1.8.2":"59.0.3071.115","1.8.3":"59.0.3071.115","1.8.4":"59.0.3071.115","1.8.5":"59.0.3071.115","1.8.6":"59.0.3071.115","1.8.7":"59.0.3071.115","1.8.8":"59.0.3071.115","2.0.0-beta.1":"61.0.3163.100","2.0.0-beta.2":"61.0.3163.100","2.0.0-beta.3":"61.0.3163.100","2.0.0-beta.4":"61.0.3163.100","2.0.0-beta.5":"61.0.3163.100","2.0.0-beta.6":"61.0.3163.100","2.0.0-beta.7":"61.0.3163.100","2.0.0-beta.8":"61.0.3163.100","2.0.0":"61.0.3163.100","2.0.1":"61.0.3163.100","2.0.2":"61.0.3163.100","2.0.3":"61.0.3163.100","2.0.4":"61.0.3163.100","2.0.5":"61.0.3163.100","2.0.6":"61.0.3163.100","2.0.7":"61.0.3163.100","2.0.8-nightly.20180819":"61.0.3163.100","2.0.8-nightly.20180820":"61.0.3163.100","2.0.8":"61.0.3163.100","2.0.9":"61.0.3163.100","2.0.10":"61.0.3163.100","2.0.11":"61.0.3163.100","2.0.12":"61.0.3163.100","2.0.13":"61.0.3163.100","2.0.14":"61.0.3163.100","2.0.15":"61.0.3163.100","2.0.16":"61.0.3163.100","2.0.17":"61.0.3163.100","2.0.18":"61.0.3163.100","2.1.0-unsupported.20180809":"61.0.3163.100","3.0.0-beta.1":"66.0.3359.181","3.0.0-beta.2":"66.0.3359.181","3.0.0-beta.3":"66.0.3359.181","3.0.0-beta.4":"66.0.3359.181","3.0.0-beta.5":"66.0.3359.181","3.0.0-beta.6":"66.0.3359.181","3.0.0-beta.7":"66.0.3359.181","3.0.0-beta.8":"66.0.3359.181","3.0.0-beta.9":"66.0.3359.181","3.0.0-beta.10":"66.0.3359.181","3.0.0-beta.11":"66.0.3359.181","3.0.0-beta.12":"66.0.3359.181","3.0.0-beta.13":"66.0.3359.181","3.0.0-nightly.20180818":"66.0.3359.181","3.0.0-nightly.20180821":"66.0.3359.181","3.0.0-nightly.20180823":"66.0.3359.181","3.0.0-nightly.20180904":"66.0.3359.181","3.0.0":"66.0.3359.181","3.0.1":"66.0.3359.181","3.0.2":"66.0.3359.181","3.0.3":"66.0.3359.181","3.0.4":"66.0.3359.181","3.0.5":"66.0.3359.181","3.0.6":"66.0.3359.181","3.0.7":"66.0.3359.181","3.0.8":"66.0.3359.181","3.0.9":"66.0.3359.181","3.0.10":"66.0.3359.181","3.0.11":"66.0.3359.181","3.0.12":"66.0.3359.181","3.0.13":"66.0.3359.181","3.0.14":"66.0.3359.181","3.0.15":"66.0.3359.181","3.0.16":"66.0.3359.181","3.1.0-beta.1":"66.0.3359.181","3.1.0-beta.2":"66.0.3359.181","3.1.0-beta.3":"66.0.3359.181","3.1.0-beta.4":"66.0.3359.181","3.1.0-beta.5":"66.0.3359.181","3.1.0":"66.0.3359.181","3.1.1":"66.0.3359.181","3.1.2":"66.0.3359.181","3.1.3":"66.0.3359.181","3.1.4":"66.0.3359.181","3.1.5":"66.0.3359.181","3.1.6":"66.0.3359.181","3.1.7":"66.0.3359.181","3.1.8":"66.0.3359.181","3.1.9":"66.0.3359.181","3.1.10":"66.0.3359.181","3.1.11":"66.0.3359.181","3.1.12":"66.0.3359.181","3.1.13":"66.0.3359.181","4.0.0-beta.1":"69.0.3497.106","4.0.0-beta.2":"69.0.3497.106","4.0.0-beta.3":"69.0.3497.106","4.0.0-beta.4":"69.0.3497.106","4.0.0-beta.5":"69.0.3497.106","4.0.0-beta.6":"69.0.3497.106","4.0.0-beta.7":"69.0.3497.106","4.0.0-beta.8":"69.0.3497.106","4.0.0-beta.9":"69.0.3497.106","4.0.0-beta.10":"69.0.3497.106","4.0.0-beta.11":"69.0.3497.106","4.0.0-nightly.20180817":"66.0.3359.181","4.0.0-nightly.20180819":"66.0.3359.181","4.0.0-nightly.20180821":"66.0.3359.181","4.0.0-nightly.20180929":"67.0.3396.99","4.0.0-nightly.20181006":"68.0.3440.128","4.0.0-nightly.20181010":"69.0.3497.106","4.0.0":"69.0.3497.106","4.0.1":"69.0.3497.106","4.0.2":"69.0.3497.106","4.0.3":"69.0.3497.106","4.0.4":"69.0.3497.106","4.0.5":"69.0.3497.106","4.0.6":"69.0.3497.106","4.0.7":"69.0.3497.128","4.0.8":"69.0.3497.128","4.1.0":"69.0.3497.128","4.1.1":"69.0.3497.128","4.1.2":"69.0.3497.128","4.1.3":"69.0.3497.128","4.1.4":"69.0.3497.128","4.1.5":"69.0.3497.128","4.2.0":"69.0.3497.128","4.2.1":"69.0.3497.128","4.2.2":"69.0.3497.128","4.2.3":"69.0.3497.128","4.2.4":"69.0.3497.128","4.2.5":"69.0.3497.128","4.2.6":"69.0.3497.128","4.2.7":"69.0.3497.128","4.2.8":"69.0.3497.128","4.2.9":"69.0.3497.128","4.2.10":"69.0.3497.128","4.2.11":"69.0.3497.128","4.2.12":"69.0.3497.128","5.0.0-beta.1":"72.0.3626.52","5.0.0-beta.2":"72.0.3626.52","5.0.0-beta.3":"73.0.3683.27","5.0.0-beta.4":"73.0.3683.54","5.0.0-beta.5":"73.0.3683.61","5.0.0-beta.6":"73.0.3683.84","5.0.0-beta.7":"73.0.3683.94","5.0.0-beta.8":"73.0.3683.104","5.0.0-beta.9":"73.0.3683.117","5.0.0-nightly.20190107":"70.0.3538.110","5.0.0-nightly.20190121":"71.0.3578.98","5.0.0-nightly.20190122":"71.0.3578.98","5.0.0":"73.0.3683.119","5.0.1":"73.0.3683.121","5.0.2":"73.0.3683.121","5.0.3":"73.0.3683.121","5.0.4":"73.0.3683.121","5.0.5":"73.0.3683.121","5.0.6":"73.0.3683.121","5.0.7":"73.0.3683.121","5.0.8":"73.0.3683.121","5.0.9":"73.0.3683.121","5.0.10":"73.0.3683.121","5.0.11":"73.0.3683.121","5.0.12":"73.0.3683.121","5.0.13":"73.0.3683.121","6.0.0-beta.1":"76.0.3774.1","6.0.0-beta.2":"76.0.3783.1","6.0.0-beta.3":"76.0.3783.1","6.0.0-beta.4":"76.0.3783.1","6.0.0-beta.5":"76.0.3805.4","6.0.0-beta.6":"76.0.3809.3","6.0.0-beta.7":"76.0.3809.22","6.0.0-beta.8":"76.0.3809.26","6.0.0-beta.9":"76.0.3809.26","6.0.0-beta.10":"76.0.3809.37","6.0.0-beta.11":"76.0.3809.42","6.0.0-beta.12":"76.0.3809.54","6.0.0-beta.13":"76.0.3809.60","6.0.0-beta.14":"76.0.3809.68","6.0.0-beta.15":"76.0.3809.74","6.0.0-nightly.20190123":"72.0.3626.52","6.0.0-nightly.20190212":"72.0.3626.107","6.0.0-nightly.20190213":"72.0.3626.110","6.0.0-nightly.20190311":"74.0.3724.8","6.0.0":"76.0.3809.88","6.0.1":"76.0.3809.102","6.0.2":"76.0.3809.110","6.0.3":"76.0.3809.126","6.0.4":"76.0.3809.131","6.0.5":"76.0.3809.136","6.0.6":"76.0.3809.138","6.0.7":"76.0.3809.139","6.0.8":"76.0.3809.146","6.0.9":"76.0.3809.146","6.0.10":"76.0.3809.146","6.0.11":"76.0.3809.146","6.0.12":"76.0.3809.146","6.1.0":"76.0.3809.146","6.1.1":"76.0.3809.146","6.1.2":"76.0.3809.146","6.1.3":"76.0.3809.146","6.1.4":"76.0.3809.146","6.1.5":"76.0.3809.146","6.1.6":"76.0.3809.146","6.1.7":"76.0.3809.146","6.1.8":"76.0.3809.146","6.1.9":"76.0.3809.146","6.1.10":"76.0.3809.146","6.1.11":"76.0.3809.146","6.1.12":"76.0.3809.146","7.0.0-beta.1":"78.0.3866.0","7.0.0-beta.2":"78.0.3866.0","7.0.0-beta.3":"78.0.3866.0","7.0.0-beta.4":"78.0.3896.6","7.0.0-beta.5":"78.0.3905.1","7.0.0-beta.6":"78.0.3905.1","7.0.0-beta.7":"78.0.3905.1","7.0.0-nightly.20190521":"76.0.3784.0","7.0.0-nightly.20190529":"76.0.3806.0","7.0.0-nightly.20190530":"76.0.3806.0","7.0.0-nightly.20190531":"76.0.3806.0","7.0.0-nightly.20190602":"76.0.3806.0","7.0.0-nightly.20190603":"76.0.3806.0","7.0.0-nightly.20190604":"77.0.3814.0","7.0.0-nightly.20190605":"77.0.3815.0","7.0.0-nightly.20190606":"77.0.3815.0","7.0.0-nightly.20190607":"77.0.3815.0","7.0.0-nightly.20190608":"77.0.3815.0","7.0.0-nightly.20190609":"77.0.3815.0","7.0.0-nightly.20190611":"77.0.3815.0","7.0.0-nightly.20190612":"77.0.3815.0","7.0.0-nightly.20190613":"77.0.3815.0","7.0.0-nightly.20190615":"77.0.3815.0","7.0.0-nightly.20190616":"77.0.3815.0","7.0.0-nightly.20190618":"77.0.3815.0","7.0.0-nightly.20190619":"77.0.3815.0","7.0.0-nightly.20190622":"77.0.3815.0","7.0.0-nightly.20190623":"77.0.3815.0","7.0.0-nightly.20190624":"77.0.3815.0","7.0.0-nightly.20190627":"77.0.3815.0","7.0.0-nightly.20190629":"77.0.3815.0","7.0.0-nightly.20190630":"77.0.3815.0","7.0.0-nightly.20190701":"77.0.3815.0","7.0.0-nightly.20190702":"77.0.3815.0","7.0.0-nightly.20190704":"77.0.3843.0","7.0.0-nightly.20190705":"77.0.3843.0","7.0.0-nightly.20190719":"77.0.3848.0","7.0.0-nightly.20190720":"77.0.3848.0","7.0.0-nightly.20190721":"77.0.3848.0","7.0.0-nightly.20190726":"77.0.3864.0","7.0.0-nightly.20190727":"78.0.3866.0","7.0.0-nightly.20190728":"78.0.3866.0","7.0.0-nightly.20190729":"78.0.3866.0","7.0.0-nightly.20190730":"78.0.3866.0","7.0.0-nightly.20190731":"78.0.3866.0","7.0.0":"78.0.3905.1","7.0.1":"78.0.3904.92","7.1.0":"78.0.3904.94","7.1.1":"78.0.3904.99","7.1.2":"78.0.3904.113","7.1.3":"78.0.3904.126","7.1.4":"78.0.3904.130","7.1.5":"78.0.3904.130","7.1.6":"78.0.3904.130","7.1.7":"78.0.3904.130","7.1.8":"78.0.3904.130","7.1.9":"78.0.3904.130","7.1.10":"78.0.3904.130","7.1.11":"78.0.3904.130","7.1.12":"78.0.3904.130","7.1.13":"78.0.3904.130","7.1.14":"78.0.3904.130","7.2.0":"78.0.3904.130","7.2.1":"78.0.3904.130","7.2.2":"78.0.3904.130","7.2.3":"78.0.3904.130","7.2.4":"78.0.3904.130","7.3.0":"78.0.3904.130","7.3.1":"78.0.3904.130","7.3.2":"78.0.3904.130","7.3.3":"78.0.3904.130","8.0.0-beta.1":"79.0.3931.0","8.0.0-beta.2":"79.0.3931.0","8.0.0-beta.3":"80.0.3955.0","8.0.0-beta.4":"80.0.3955.0","8.0.0-beta.5":"80.0.3987.14","8.0.0-beta.6":"80.0.3987.51","8.0.0-beta.7":"80.0.3987.59","8.0.0-beta.8":"80.0.3987.75","8.0.0-beta.9":"80.0.3987.75","8.0.0-nightly.20190801":"78.0.3866.0","8.0.0-nightly.20190802":"78.0.3866.0","8.0.0-nightly.20190803":"78.0.3871.0","8.0.0-nightly.20190806":"78.0.3871.0","8.0.0-nightly.20190807":"78.0.3871.0","8.0.0-nightly.20190808":"78.0.3871.0","8.0.0-nightly.20190809":"78.0.3871.0","8.0.0-nightly.20190810":"78.0.3871.0","8.0.0-nightly.20190811":"78.0.3871.0","8.0.0-nightly.20190812":"78.0.3871.0","8.0.0-nightly.20190813":"78.0.3871.0","8.0.0-nightly.20190814":"78.0.3871.0","8.0.0-nightly.20190815":"78.0.3871.0","8.0.0-nightly.20190816":"78.0.3881.0","8.0.0-nightly.20190817":"78.0.3881.0","8.0.0-nightly.20190818":"78.0.3881.0","8.0.0-nightly.20190819":"78.0.3881.0","8.0.0-nightly.20190820":"78.0.3881.0","8.0.0-nightly.20190824":"78.0.3892.0","8.0.0-nightly.20190825":"78.0.3892.0","8.0.0-nightly.20190827":"78.0.3892.0","8.0.0-nightly.20190828":"78.0.3892.0","8.0.0-nightly.20190830":"78.0.3892.0","8.0.0-nightly.20190901":"78.0.3892.0","8.0.0-nightly.20190902":"78.0.3892.0","8.0.0-nightly.20190907":"78.0.3892.0","8.0.0-nightly.20190909":"78.0.3892.0","8.0.0-nightly.20190910":"78.0.3892.0","8.0.0-nightly.20190911":"78.0.3892.0","8.0.0-nightly.20190912":"78.0.3892.0","8.0.0-nightly.20190913":"78.0.3892.0","8.0.0-nightly.20190914":"78.0.3892.0","8.0.0-nightly.20190915":"78.0.3892.0","8.0.0-nightly.20190917":"78.0.3892.0","8.0.0-nightly.20190919":"79.0.3915.0","8.0.0-nightly.20190920":"79.0.3915.0","8.0.0-nightly.20190922":"79.0.3919.0","8.0.0-nightly.20190923":"79.0.3919.0","8.0.0-nightly.20190924":"79.0.3919.0","8.0.0-nightly.20190926":"79.0.3919.0","8.0.0-nightly.20190928":"79.0.3919.0","8.0.0-nightly.20190929":"79.0.3919.0","8.0.0-nightly.20190930":"79.0.3919.0","8.0.0-nightly.20191001":"79.0.3919.0","8.0.0-nightly.20191004":"79.0.3919.0","8.0.0-nightly.20191005":"79.0.3919.0","8.0.0-nightly.20191006":"79.0.3919.0","8.0.0-nightly.20191009":"79.0.3919.0","8.0.0-nightly.20191011":"79.0.3919.0","8.0.0-nightly.20191012":"79.0.3919.0","8.0.0-nightly.20191017":"79.0.3919.0","8.0.0-nightly.20191019":"79.0.3931.0","8.0.0-nightly.20191020":"79.0.3931.0","8.0.0-nightly.20191021":"79.0.3931.0","8.0.0-nightly.20191023":"79.0.3931.0","8.0.0-nightly.20191101":"80.0.3952.0","8.0.0-nightly.20191103":"80.0.3952.0","8.0.0-nightly.20191105":"80.0.3952.0","8.0.0":"80.0.3987.86","8.0.1":"80.0.3987.86","8.0.2":"80.0.3987.86","8.0.3":"80.0.3987.134","8.1.0":"80.0.3987.137","8.1.1":"80.0.3987.141","8.2.0":"80.0.3987.158","8.2.1":"80.0.3987.163","8.2.2":"80.0.3987.163","8.2.3":"80.0.3987.163","8.2.4":"80.0.3987.165","8.2.5":"80.0.3987.165","8.3.0":"80.0.3987.165","8.3.1":"80.0.3987.165","8.3.2":"80.0.3987.165","8.3.3":"80.0.3987.165","8.3.4":"80.0.3987.165","8.4.0":"80.0.3987.165","8.4.1":"80.0.3987.165","8.5.0":"80.0.3987.165","8.5.1":"80.0.3987.165","8.5.2":"80.0.3987.165","8.5.3":"80.0.3987.163","8.5.4":"80.0.3987.163","8.5.5":"80.0.3987.163","9.0.0-beta.1":"82.0.4048.0","9.0.0-beta.2":"82.0.4048.0","9.0.0-beta.3":"82.0.4048.0","9.0.0-beta.4":"82.0.4048.0","9.0.0-beta.5":"82.0.4048.0","9.0.0-beta.6":"82.0.4058.2","9.0.0-beta.7":"82.0.4058.2","9.0.0-beta.9":"82.0.4058.2","9.0.0-beta.10":"82.0.4085.10","9.0.0-beta.11":"82.0.4085.14","9.0.0-beta.12":"82.0.4085.14","9.0.0-beta.13":"82.0.4085.14","9.0.0-beta.14":"82.0.4085.27","9.0.0-beta.15":"83.0.4102.3","9.0.0-beta.16":"83.0.4102.3","9.0.0-beta.17":"83.0.4103.14","9.0.0-beta.18":"83.0.4103.16","9.0.0-beta.19":"83.0.4103.24","9.0.0-beta.20":"83.0.4103.26","9.0.0-beta.21":"83.0.4103.26","9.0.0-beta.22":"83.0.4103.34","9.0.0-beta.23":"83.0.4103.44","9.0.0-beta.24":"83.0.4103.45","9.0.0-nightly.20191121":"80.0.3954.0","9.0.0-nightly.20191122":"80.0.3954.0","9.0.0-nightly.20191123":"80.0.3954.0","9.0.0-nightly.20191124":"80.0.3954.0","9.0.0-nightly.20191126":"80.0.3954.0","9.0.0-nightly.20191128":"80.0.3954.0","9.0.0-nightly.20191129":"80.0.3954.0","9.0.0-nightly.20191130":"80.0.3954.0","9.0.0-nightly.20191201":"80.0.3954.0","9.0.0-nightly.20191202":"80.0.3954.0","9.0.0-nightly.20191203":"80.0.3954.0","9.0.0-nightly.20191204":"80.0.3954.0","9.0.0-nightly.20191205":"80.0.3954.0","9.0.0-nightly.20191210":"80.0.3954.0","9.0.0-nightly.20191220":"81.0.3994.0","9.0.0-nightly.20191221":"81.0.3994.0","9.0.0-nightly.20191222":"81.0.3994.0","9.0.0-nightly.20191223":"81.0.3994.0","9.0.0-nightly.20191224":"81.0.3994.0","9.0.0-nightly.20191225":"81.0.3994.0","9.0.0-nightly.20191226":"81.0.3994.0","9.0.0-nightly.20191228":"81.0.3994.0","9.0.0-nightly.20191229":"81.0.3994.0","9.0.0-nightly.20191230":"81.0.3994.0","9.0.0-nightly.20191231":"81.0.3994.0","9.0.0-nightly.20200101":"81.0.3994.0","9.0.0-nightly.20200103":"81.0.3994.0","9.0.0-nightly.20200104":"81.0.3994.0","9.0.0-nightly.20200105":"81.0.3994.0","9.0.0-nightly.20200106":"81.0.3994.0","9.0.0-nightly.20200108":"81.0.3994.0","9.0.0-nightly.20200109":"81.0.3994.0","9.0.0-nightly.20200110":"81.0.3994.0","9.0.0-nightly.20200111":"81.0.3994.0","9.0.0-nightly.20200113":"81.0.3994.0","9.0.0-nightly.20200115":"81.0.3994.0","9.0.0-nightly.20200116":"81.0.3994.0","9.0.0-nightly.20200117":"81.0.3994.0","9.0.0-nightly.20200119":"81.0.4030.0","9.0.0-nightly.20200121":"81.0.4030.0","9.0.0":"83.0.4103.64","9.0.1":"83.0.4103.94","9.0.2":"83.0.4103.94","9.0.3":"83.0.4103.100","9.0.4":"83.0.4103.104","9.0.5":"83.0.4103.119","9.1.0":"83.0.4103.122","9.1.1":"83.0.4103.122","9.1.2":"83.0.4103.122","9.2.0":"83.0.4103.122","9.2.1":"83.0.4103.122","9.3.0":"83.0.4103.122","9.3.1":"83.0.4103.122","9.3.2":"83.0.4103.122","9.3.3":"83.0.4103.122","9.3.4":"83.0.4103.122","9.3.5":"83.0.4103.122","9.4.0":"83.0.4103.122","9.4.1":"83.0.4103.122","9.4.2":"83.0.4103.122","9.4.3":"83.0.4103.122","9.4.4":"83.0.4103.122","10.0.0-beta.1":"84.0.4129.0","10.0.0-beta.2":"84.0.4129.0","10.0.0-beta.3":"85.0.4161.2","10.0.0-beta.4":"85.0.4161.2","10.0.0-beta.8":"85.0.4181.1","10.0.0-beta.9":"85.0.4181.1","10.0.0-beta.10":"85.0.4183.19","10.0.0-beta.11":"85.0.4183.20","10.0.0-beta.12":"85.0.4183.26","10.0.0-beta.13":"85.0.4183.39","10.0.0-beta.14":"85.0.4183.39","10.0.0-beta.15":"85.0.4183.39","10.0.0-beta.17":"85.0.4183.39","10.0.0-beta.19":"85.0.4183.39","10.0.0-beta.20":"85.0.4183.39","10.0.0-beta.21":"85.0.4183.39","10.0.0-beta.23":"85.0.4183.70","10.0.0-beta.24":"85.0.4183.78","10.0.0-beta.25":"85.0.4183.80","10.0.0-nightly.20200209":"82.0.4050.0","10.0.0-nightly.20200210":"82.0.4050.0","10.0.0-nightly.20200211":"82.0.4050.0","10.0.0-nightly.20200216":"82.0.4050.0","10.0.0-nightly.20200217":"82.0.4050.0","10.0.0-nightly.20200218":"82.0.4050.0","10.0.0-nightly.20200221":"82.0.4050.0","10.0.0-nightly.20200222":"82.0.4050.0","10.0.0-nightly.20200223":"82.0.4050.0","10.0.0-nightly.20200226":"82.0.4050.0","10.0.0-nightly.20200303":"82.0.4050.0","10.0.0-nightly.20200304":"82.0.4076.0","10.0.0-nightly.20200305":"82.0.4076.0","10.0.0-nightly.20200306":"82.0.4076.0","10.0.0-nightly.20200309":"82.0.4076.0","10.0.0-nightly.20200310":"82.0.4076.0","10.0.0-nightly.20200311":"82.0.4083.0","10.0.0-nightly.20200316":"83.0.4086.0","10.0.0-nightly.20200317":"83.0.4087.0","10.0.0-nightly.20200318":"83.0.4087.0","10.0.0-nightly.20200320":"83.0.4087.0","10.0.0-nightly.20200323":"83.0.4087.0","10.0.0-nightly.20200324":"83.0.4087.0","10.0.0-nightly.20200325":"83.0.4087.0","10.0.0-nightly.20200326":"83.0.4087.0","10.0.0-nightly.20200327":"83.0.4087.0","10.0.0-nightly.20200330":"83.0.4087.0","10.0.0-nightly.20200331":"83.0.4087.0","10.0.0-nightly.20200401":"83.0.4087.0","10.0.0-nightly.20200402":"83.0.4087.0","10.0.0-nightly.20200403":"83.0.4087.0","10.0.0-nightly.20200406":"83.0.4087.0","10.0.0-nightly.20200408":"83.0.4095.0","10.0.0-nightly.20200410":"83.0.4095.0","10.0.0-nightly.20200413":"83.0.4095.0","10.0.0-nightly.20200414":"84.0.4114.0","10.0.0-nightly.20200415":"84.0.4115.0","10.0.0-nightly.20200416":"84.0.4115.0","10.0.0-nightly.20200417":"84.0.4115.0","10.0.0-nightly.20200422":"84.0.4121.0","10.0.0-nightly.20200423":"84.0.4121.0","10.0.0-nightly.20200427":"84.0.4125.0","10.0.0-nightly.20200428":"84.0.4125.0","10.0.0-nightly.20200429":"84.0.4125.0","10.0.0-nightly.20200430":"84.0.4125.0","10.0.0-nightly.20200501":"84.0.4129.0","10.0.0-nightly.20200504":"84.0.4129.0","10.0.0-nightly.20200505":"84.0.4129.0","10.0.0-nightly.20200506":"84.0.4129.0","10.0.0-nightly.20200507":"84.0.4129.0","10.0.0-nightly.20200508":"84.0.4129.0","10.0.0-nightly.20200511":"84.0.4129.0","10.0.0-nightly.20200512":"84.0.4129.0","10.0.0-nightly.20200513":"84.0.4129.0","10.0.0-nightly.20200514":"84.0.4129.0","10.0.0-nightly.20200515":"84.0.4129.0","10.0.0-nightly.20200518":"84.0.4129.0","10.0.0-nightly.20200519":"84.0.4129.0","10.0.0-nightly.20200520":"84.0.4129.0","10.0.0-nightly.20200521":"84.0.4129.0","10.0.0":"85.0.4183.84","10.0.1":"85.0.4183.86","10.1.0":"85.0.4183.87","10.1.1":"85.0.4183.93","10.1.2":"85.0.4183.98","10.1.3":"85.0.4183.121","10.1.4":"85.0.4183.121","10.1.5":"85.0.4183.121","10.1.6":"85.0.4183.121","10.1.7":"85.0.4183.121","10.2.0":"85.0.4183.121","10.3.0":"85.0.4183.121","10.3.1":"85.0.4183.121","10.3.2":"85.0.4183.121","10.4.0":"85.0.4183.121","10.4.1":"85.0.4183.121","10.4.2":"85.0.4183.121","10.4.3":"85.0.4183.121","10.4.4":"85.0.4183.121","10.4.5":"85.0.4183.121","10.4.6":"85.0.4183.121","10.4.7":"85.0.4183.121","11.0.0-beta.1":"86.0.4234.0","11.0.0-beta.3":"86.0.4234.0","11.0.0-beta.4":"86.0.4234.0","11.0.0-beta.5":"86.0.4234.0","11.0.0-beta.6":"86.0.4234.0","11.0.0-beta.7":"86.0.4234.0","11.0.0-beta.8":"87.0.4251.1","11.0.0-beta.9":"87.0.4251.1","11.0.0-beta.11":"87.0.4251.1","11.0.0-beta.12":"87.0.4280.11","11.0.0-beta.13":"87.0.4280.11","11.0.0-beta.16":"87.0.4280.27","11.0.0-beta.17":"87.0.4280.27","11.0.0-beta.18":"87.0.4280.27","11.0.0-beta.19":"87.0.4280.27","11.0.0-beta.20":"87.0.4280.40","11.0.0-beta.22":"87.0.4280.47","11.0.0-beta.23":"87.0.4280.47","11.0.0-nightly.20200525":"84.0.4129.0","11.0.0-nightly.20200526":"84.0.4129.0","11.0.0-nightly.20200529":"85.0.4156.0","11.0.0-nightly.20200602":"85.0.4162.0","11.0.0-nightly.20200603":"85.0.4162.0","11.0.0-nightly.20200604":"85.0.4162.0","11.0.0-nightly.20200609":"85.0.4162.0","11.0.0-nightly.20200610":"85.0.4162.0","11.0.0-nightly.20200611":"85.0.4162.0","11.0.0-nightly.20200615":"85.0.4162.0","11.0.0-nightly.20200616":"85.0.4162.0","11.0.0-nightly.20200617":"85.0.4162.0","11.0.0-nightly.20200618":"85.0.4162.0","11.0.0-nightly.20200619":"85.0.4162.0","11.0.0-nightly.20200701":"85.0.4179.0","11.0.0-nightly.20200702":"85.0.4179.0","11.0.0-nightly.20200703":"85.0.4179.0","11.0.0-nightly.20200706":"85.0.4179.0","11.0.0-nightly.20200707":"85.0.4179.0","11.0.0-nightly.20200708":"85.0.4179.0","11.0.0-nightly.20200709":"85.0.4179.0","11.0.0-nightly.20200716":"86.0.4203.0","11.0.0-nightly.20200717":"86.0.4203.0","11.0.0-nightly.20200720":"86.0.4203.0","11.0.0-nightly.20200721":"86.0.4203.0","11.0.0-nightly.20200723":"86.0.4209.0","11.0.0-nightly.20200724":"86.0.4209.0","11.0.0-nightly.20200729":"86.0.4209.0","11.0.0-nightly.20200730":"86.0.4209.0","11.0.0-nightly.20200731":"86.0.4209.0","11.0.0-nightly.20200803":"86.0.4209.0","11.0.0-nightly.20200804":"86.0.4209.0","11.0.0-nightly.20200805":"86.0.4209.0","11.0.0-nightly.20200811":"86.0.4209.0","11.0.0-nightly.20200812":"86.0.4209.0","11.0.0-nightly.20200822":"86.0.4234.0","11.0.0-nightly.20200824":"86.0.4234.0","11.0.0-nightly.20200825":"86.0.4234.0","11.0.0-nightly.20200826":"86.0.4234.0","11.0.0":"87.0.4280.60","11.0.1":"87.0.4280.60","11.0.2":"87.0.4280.67","11.0.3":"87.0.4280.67","11.0.4":"87.0.4280.67","11.0.5":"87.0.4280.88","11.1.0":"87.0.4280.88","11.1.1":"87.0.4280.88","11.2.0":"87.0.4280.141","11.2.1":"87.0.4280.141","11.2.2":"87.0.4280.141","11.2.3":"87.0.4280.141","11.3.0":"87.0.4280.141","11.4.0":"87.0.4280.141","11.4.1":"87.0.4280.141","11.4.2":"87.0.4280.141","11.4.3":"87.0.4280.141","11.4.4":"87.0.4280.141","11.4.5":"87.0.4280.141","11.4.6":"87.0.4280.141","11.4.7":"87.0.4280.141","11.4.8":"87.0.4280.141","11.4.9":"87.0.4280.141","11.4.10":"87.0.4280.141","11.4.11":"87.0.4280.141","11.4.12":"87.0.4280.141","11.5.0":"87.0.4280.141","12.0.0-beta.1":"89.0.4328.0","12.0.0-beta.3":"89.0.4328.0","12.0.0-beta.4":"89.0.4328.0","12.0.0-beta.5":"89.0.4328.0","12.0.0-beta.6":"89.0.4328.0","12.0.0-beta.7":"89.0.4328.0","12.0.0-beta.8":"89.0.4328.0","12.0.0-beta.9":"89.0.4328.0","12.0.0-beta.10":"89.0.4328.0","12.0.0-beta.11":"89.0.4328.0","12.0.0-beta.12":"89.0.4328.0","12.0.0-beta.14":"89.0.4328.0","12.0.0-beta.16":"89.0.4348.1","12.0.0-beta.18":"89.0.4348.1","12.0.0-beta.19":"89.0.4348.1","12.0.0-beta.20":"89.0.4348.1","12.0.0-beta.21":"89.0.4388.2","12.0.0-beta.22":"89.0.4388.2","12.0.0-beta.23":"89.0.4388.2","12.0.0-beta.24":"89.0.4388.2","12.0.0-beta.25":"89.0.4388.2","12.0.0-beta.26":"89.0.4388.2","12.0.0-beta.27":"89.0.4389.23","12.0.0-beta.28":"89.0.4389.23","12.0.0-beta.29":"89.0.4389.23","12.0.0-beta.30":"89.0.4389.58","12.0.0-beta.31":"89.0.4389.58","12.0.0-nightly.20200827":"86.0.4234.0","12.0.0-nightly.20200831":"86.0.4234.0","12.0.0-nightly.20200902":"86.0.4234.0","12.0.0-nightly.20200903":"86.0.4234.0","12.0.0-nightly.20200907":"86.0.4234.0","12.0.0-nightly.20200910":"86.0.4234.0","12.0.0-nightly.20200911":"86.0.4234.0","12.0.0-nightly.20200914":"86.0.4234.0","12.0.0-nightly.20201002":"87.0.4268.0","12.0.0-nightly.20201007":"87.0.4268.0","12.0.0-nightly.20201009":"87.0.4268.0","12.0.0-nightly.20201012":"87.0.4268.0","12.0.0-nightly.20201013":"87.0.4268.0","12.0.0-nightly.20201014":"87.0.4268.0","12.0.0-nightly.20201015":"87.0.4268.0","12.0.0-nightly.20201023":"88.0.4292.0","12.0.0-nightly.20201026":"88.0.4292.0","12.0.0-nightly.20201030":"88.0.4306.0","12.0.0-nightly.20201102":"88.0.4306.0","12.0.0-nightly.20201103":"88.0.4306.0","12.0.0-nightly.20201104":"88.0.4306.0","12.0.0-nightly.20201105":"88.0.4306.0","12.0.0-nightly.20201106":"88.0.4306.0","12.0.0-nightly.20201111":"88.0.4306.0","12.0.0-nightly.20201112":"88.0.4306.0","12.0.0-nightly.20201116":"88.0.4324.0","12.0.0":"89.0.4389.69","12.0.1":"89.0.4389.82","12.0.2":"89.0.4389.90","12.0.3":"89.0.4389.114","12.0.4":"89.0.4389.114","12.0.5":"89.0.4389.128","12.0.6":"89.0.4389.128","12.0.7":"89.0.4389.128","12.0.8":"89.0.4389.128","12.0.9":"89.0.4389.128","12.0.10":"89.0.4389.128","12.0.11":"89.0.4389.128","12.0.12":"89.0.4389.128","12.0.13":"89.0.4389.128","12.0.14":"89.0.4389.128","12.0.15":"89.0.4389.128","12.0.16":"89.0.4389.128","12.0.17":"89.0.4389.128","12.0.18":"89.0.4389.128","12.1.0":"89.0.4389.128","12.1.1":"89.0.4389.128","12.1.2":"89.0.4389.128","12.2.0":"89.0.4389.128","12.2.1":"89.0.4389.128","12.2.2":"89.0.4389.128","12.2.3":"89.0.4389.128","13.0.0-beta.2":"90.0.4402.0","13.0.0-beta.3":"90.0.4402.0","13.0.0-beta.4":"90.0.4415.0","13.0.0-beta.5":"90.0.4415.0","13.0.0-beta.6":"90.0.4415.0","13.0.0-beta.7":"90.0.4415.0","13.0.0-beta.8":"90.0.4415.0","13.0.0-beta.9":"90.0.4415.0","13.0.0-beta.10":"90.0.4415.0","13.0.0-beta.11":"90.0.4415.0","13.0.0-beta.12":"90.0.4415.0","13.0.0-beta.13":"90.0.4415.0","13.0.0-beta.14":"91.0.4448.0","13.0.0-beta.16":"91.0.4448.0","13.0.0-beta.17":"91.0.4448.0","13.0.0-beta.18":"91.0.4448.0","13.0.0-beta.20":"91.0.4448.0","13.0.0-beta.21":"91.0.4472.33","13.0.0-beta.22":"91.0.4472.33","13.0.0-beta.23":"91.0.4472.33","13.0.0-beta.24":"91.0.4472.38","13.0.0-beta.25":"91.0.4472.38","13.0.0-beta.26":"91.0.4472.38","13.0.0-beta.27":"91.0.4472.38","13.0.0-beta.28":"91.0.4472.38","13.0.0-nightly.20201119":"89.0.4328.0","13.0.0-nightly.20201123":"89.0.4328.0","13.0.0-nightly.20201124":"89.0.4328.0","13.0.0-nightly.20201126":"89.0.4328.0","13.0.0-nightly.20201127":"89.0.4328.0","13.0.0-nightly.20201130":"89.0.4328.0","13.0.0-nightly.20201201":"89.0.4328.0","13.0.0-nightly.20201202":"89.0.4328.0","13.0.0-nightly.20201203":"89.0.4328.0","13.0.0-nightly.20201204":"89.0.4328.0","13.0.0-nightly.20201207":"89.0.4328.0","13.0.0-nightly.20201208":"89.0.4328.0","13.0.0-nightly.20201209":"89.0.4328.0","13.0.0-nightly.20201210":"89.0.4328.0","13.0.0-nightly.20201211":"89.0.4328.0","13.0.0-nightly.20201214":"89.0.4328.0","13.0.0-nightly.20201215":"89.0.4349.0","13.0.0-nightly.20201216":"89.0.4349.0","13.0.0-nightly.20201221":"89.0.4349.0","13.0.0-nightly.20201222":"89.0.4349.0","13.0.0-nightly.20201223":"89.0.4359.0","13.0.0-nightly.20210104":"89.0.4359.0","13.0.0-nightly.20210108":"89.0.4359.0","13.0.0-nightly.20210111":"89.0.4359.0","13.0.0-nightly.20210113":"89.0.4386.0","13.0.0-nightly.20210114":"89.0.4386.0","13.0.0-nightly.20210118":"89.0.4386.0","13.0.0-nightly.20210122":"89.0.4386.0","13.0.0-nightly.20210125":"89.0.4386.0","13.0.0-nightly.20210127":"89.0.4389.0","13.0.0-nightly.20210128":"89.0.4389.0","13.0.0-nightly.20210129":"89.0.4389.0","13.0.0-nightly.20210201":"89.0.4389.0","13.0.0-nightly.20210202":"89.0.4389.0","13.0.0-nightly.20210203":"89.0.4389.0","13.0.0-nightly.20210205":"89.0.4389.0","13.0.0-nightly.20210208":"89.0.4389.0","13.0.0-nightly.20210209":"89.0.4389.0","13.0.0-nightly.20210210":"90.0.4402.0","13.0.0-nightly.20210211":"90.0.4402.0","13.0.0-nightly.20210212":"90.0.4402.0","13.0.0-nightly.20210216":"90.0.4402.0","13.0.0-nightly.20210217":"90.0.4402.0","13.0.0-nightly.20210218":"90.0.4402.0","13.0.0-nightly.20210219":"90.0.4402.0","13.0.0-nightly.20210222":"90.0.4402.0","13.0.0-nightly.20210225":"90.0.4402.0","13.0.0-nightly.20210226":"90.0.4402.0","13.0.0-nightly.20210301":"90.0.4402.0","13.0.0-nightly.20210302":"90.0.4402.0","13.0.0-nightly.20210303":"90.0.4402.0","13.0.0":"91.0.4472.69","13.0.1":"91.0.4472.69","13.1.0":"91.0.4472.77","13.1.1":"91.0.4472.77","13.1.2":"91.0.4472.77","13.1.3":"91.0.4472.106","13.1.4":"91.0.4472.106","13.1.5":"91.0.4472.124","13.1.6":"91.0.4472.124","13.1.7":"91.0.4472.124","13.1.8":"91.0.4472.164","13.1.9":"91.0.4472.164","13.2.0":"91.0.4472.164","13.2.1":"91.0.4472.164","13.2.2":"91.0.4472.164","13.2.3":"91.0.4472.164","13.3.0":"91.0.4472.164","13.4.0":"91.0.4472.164","13.5.0":"91.0.4472.164","13.5.1":"91.0.4472.164","13.5.2":"91.0.4472.164","13.6.0":"91.0.4472.164","13.6.1":"91.0.4472.164","13.6.2":"91.0.4472.164","13.6.3":"91.0.4472.164","13.6.6":"91.0.4472.164","13.6.7":"91.0.4472.164","13.6.8":"91.0.4472.164","13.6.9":"91.0.4472.164","14.0.0-beta.1":"92.0.4511.0","14.0.0-beta.2":"92.0.4511.0","14.0.0-beta.3":"92.0.4511.0","14.0.0-beta.5":"93.0.4536.0","14.0.0-beta.6":"93.0.4536.0","14.0.0-beta.7":"93.0.4536.0","14.0.0-beta.8":"93.0.4536.0","14.0.0-beta.9":"93.0.4539.0","14.0.0-beta.10":"93.0.4539.0","14.0.0-beta.11":"93.0.4557.4","14.0.0-beta.12":"93.0.4557.4","14.0.0-beta.13":"93.0.4566.0","14.0.0-beta.14":"93.0.4566.0","14.0.0-beta.15":"93.0.4566.0","14.0.0-beta.16":"93.0.4566.0","14.0.0-beta.17":"93.0.4566.0","14.0.0-beta.18":"93.0.4577.15","14.0.0-beta.19":"93.0.4577.15","14.0.0-beta.20":"93.0.4577.15","14.0.0-beta.21":"93.0.4577.15","14.0.0-beta.22":"93.0.4577.25","14.0.0-beta.23":"93.0.4577.25","14.0.0-beta.24":"93.0.4577.51","14.0.0-beta.25":"93.0.4577.51","14.0.0-nightly.20210304":"90.0.4402.0","14.0.0-nightly.20210305":"90.0.4415.0","14.0.0-nightly.20210308":"90.0.4415.0","14.0.0-nightly.20210309":"90.0.4415.0","14.0.0-nightly.20210311":"90.0.4415.0","14.0.0-nightly.20210315":"90.0.4415.0","14.0.0-nightly.20210316":"90.0.4415.0","14.0.0-nightly.20210317":"90.0.4415.0","14.0.0-nightly.20210318":"90.0.4415.0","14.0.0-nightly.20210319":"90.0.4415.0","14.0.0-nightly.20210323":"90.0.4415.0","14.0.0-nightly.20210324":"90.0.4415.0","14.0.0-nightly.20210325":"90.0.4415.0","14.0.0-nightly.20210326":"90.0.4415.0","14.0.0-nightly.20210329":"90.0.4415.0","14.0.0-nightly.20210330":"90.0.4415.0","14.0.0-nightly.20210331":"91.0.4448.0","14.0.0-nightly.20210401":"91.0.4448.0","14.0.0-nightly.20210402":"91.0.4448.0","14.0.0-nightly.20210406":"91.0.4448.0","14.0.0-nightly.20210407":"91.0.4448.0","14.0.0-nightly.20210408":"91.0.4448.0","14.0.0-nightly.20210409":"91.0.4448.0","14.0.0-nightly.20210413":"91.0.4448.0","14.0.0-nightly.20210426":"92.0.4475.0","14.0.0-nightly.20210427":"92.0.4475.0","14.0.0-nightly.20210430":"92.0.4488.0","14.0.0-nightly.20210503":"92.0.4488.0","14.0.0-nightly.20210505":"92.0.4496.0","14.0.0-nightly.20210506":"92.0.4498.0","14.0.0-nightly.20210507":"92.0.4499.0","14.0.0-nightly.20210510":"92.0.4499.0","14.0.0-nightly.20210511":"92.0.4499.0","14.0.0-nightly.20210512":"92.0.4499.0","14.0.0-nightly.20210513":"92.0.4499.0","14.0.0-nightly.20210514":"92.0.4505.0","14.0.0-nightly.20210517":"92.0.4505.0","14.0.0-nightly.20210518":"92.0.4505.0","14.0.0-nightly.20210519":"92.0.4505.0","14.0.0-nightly.20210520":"92.0.4511.0","14.0.0-nightly.20210523":"92.0.4511.0","14.0.0-nightly.20210524":"92.0.4511.0","14.0.0":"93.0.4577.58","14.0.1":"93.0.4577.63","14.0.2":"93.0.4577.82","14.1.0":"93.0.4577.82","14.1.1":"93.0.4577.82","14.2.0":"93.0.4577.82","14.2.1":"93.0.4577.82","14.2.2":"93.0.4577.82","14.2.3":"93.0.4577.82","14.2.4":"93.0.4577.82","14.2.5":"93.0.4577.82","14.2.6":"93.0.4577.82","14.2.7":"93.0.4577.82","14.2.8":"93.0.4577.82","14.2.9":"93.0.4577.82","15.0.0-alpha.1":"93.0.4566.0","15.0.0-alpha.2":"93.0.4566.0","15.0.0-alpha.3":"94.0.4584.0","15.0.0-alpha.4":"94.0.4584.0","15.0.0-alpha.5":"94.0.4584.0","15.0.0-alpha.6":"94.0.4584.0","15.0.0-alpha.7":"94.0.4590.2","15.0.0-alpha.8":"94.0.4590.2","15.0.0-alpha.9":"94.0.4590.2","15.0.0-alpha.10":"94.0.4606.12","15.0.0-beta.1":"94.0.4606.20","15.0.0-beta.2":"94.0.4606.20","15.0.0-beta.3":"94.0.4606.31","15.0.0-beta.4":"94.0.4606.31","15.0.0-beta.5":"94.0.4606.31","15.0.0-beta.6":"94.0.4606.31","15.0.0-beta.7":"94.0.4606.31","15.0.0-nightly.20210527":"92.0.4511.0","15.0.0-nightly.20210528":"92.0.4511.0","15.0.0-nightly.20210531":"92.0.4511.0","15.0.0-nightly.20210601":"92.0.4511.0","15.0.0-nightly.20210602":"92.0.4511.0","15.0.0-nightly.20210603":"93.0.4530.0","15.0.0-nightly.20210604":"93.0.4530.0","15.0.0-nightly.20210608":"93.0.4535.0","15.0.0-nightly.20210609":"93.0.4536.0","15.0.0-nightly.20210610":"93.0.4536.0","15.0.0-nightly.20210611":"93.0.4536.0","15.0.0-nightly.20210614":"93.0.4536.0","15.0.0-nightly.20210615":"93.0.4536.0","15.0.0-nightly.20210616":"93.0.4536.0","15.0.0-nightly.20210617":"93.0.4539.0","15.0.0-nightly.20210618":"93.0.4539.0","15.0.0-nightly.20210621":"93.0.4539.0","15.0.0-nightly.20210622":"93.0.4539.0","15.0.0-nightly.20210623":"93.0.4550.0","15.0.0-nightly.20210624":"93.0.4550.0","15.0.0-nightly.20210625":"93.0.4552.0","15.0.0-nightly.20210628":"93.0.4552.0","15.0.0-nightly.20210629":"93.0.4552.0","15.0.0-nightly.20210630":"93.0.4558.0","15.0.0-nightly.20210701":"93.0.4558.0","15.0.0-nightly.20210702":"93.0.4558.0","15.0.0-nightly.20210705":"93.0.4558.0","15.0.0-nightly.20210706":"93.0.4566.0","15.0.0-nightly.20210707":"93.0.4566.0","15.0.0-nightly.20210708":"93.0.4566.0","15.0.0-nightly.20210709":"93.0.4566.0","15.0.0-nightly.20210712":"93.0.4566.0","15.0.0-nightly.20210713":"93.0.4566.0","15.0.0-nightly.20210714":"93.0.4566.0","15.0.0-nightly.20210715":"93.0.4566.0","15.0.0-nightly.20210716":"93.0.4566.0","15.0.0-nightly.20210719":"93.0.4566.0","15.0.0-nightly.20210720":"93.0.4566.0","15.0.0-nightly.20210721":"93.0.4566.0","15.0.0":"94.0.4606.51","15.1.0":"94.0.4606.61","15.1.1":"94.0.4606.61","15.1.2":"94.0.4606.71","15.2.0":"94.0.4606.81","15.3.0":"94.0.4606.81","15.3.1":"94.0.4606.81","15.3.2":"94.0.4606.81","15.3.3":"94.0.4606.81","15.3.4":"94.0.4606.81","15.3.5":"94.0.4606.81","15.3.6":"94.0.4606.81","15.3.7":"94.0.4606.81","15.4.0":"94.0.4606.81","15.4.1":"94.0.4606.81","15.4.2":"94.0.4606.81","15.5.0":"94.0.4606.81","15.5.1":"94.0.4606.81","15.5.2":"94.0.4606.81","15.5.3":"94.0.4606.81","15.5.4":"94.0.4606.81","15.5.5":"94.0.4606.81","15.5.6":"94.0.4606.81","15.5.7":"94.0.4606.81","16.0.0-alpha.1":"95.0.4629.0","16.0.0-alpha.2":"95.0.4629.0","16.0.0-alpha.3":"95.0.4629.0","16.0.0-alpha.4":"95.0.4629.0","16.0.0-alpha.5":"95.0.4629.0","16.0.0-alpha.6":"95.0.4629.0","16.0.0-alpha.7":"95.0.4629.0","16.0.0-alpha.8":"96.0.4647.0","16.0.0-alpha.9":"96.0.4647.0","16.0.0-beta.1":"96.0.4647.0","16.0.0-beta.2":"96.0.4647.0","16.0.0-beta.3":"96.0.4647.0","16.0.0-beta.4":"96.0.4664.18","16.0.0-beta.5":"96.0.4664.18","16.0.0-beta.6":"96.0.4664.27","16.0.0-beta.7":"96.0.4664.27","16.0.0-beta.8":"96.0.4664.35","16.0.0-beta.9":"96.0.4664.35","16.0.0-nightly.20210722":"93.0.4566.0","16.0.0-nightly.20210723":"93.0.4566.0","16.0.0-nightly.20210726":"93.0.4566.0","16.0.0-nightly.20210727":"94.0.4584.0","16.0.0-nightly.20210728":"94.0.4584.0","16.0.0-nightly.20210729":"94.0.4584.0","16.0.0-nightly.20210730":"94.0.4584.0","16.0.0-nightly.20210802":"94.0.4584.0","16.0.0-nightly.20210803":"94.0.4584.0","16.0.0-nightly.20210804":"94.0.4584.0","16.0.0-nightly.20210805":"94.0.4584.0","16.0.0-nightly.20210806":"94.0.4584.0","16.0.0-nightly.20210809":"94.0.4584.0","16.0.0-nightly.20210810":"94.0.4584.0","16.0.0-nightly.20210811":"94.0.4584.0","16.0.0-nightly.20210812":"94.0.4590.2","16.0.0-nightly.20210813":"94.0.4590.2","16.0.0-nightly.20210816":"94.0.4590.2","16.0.0-nightly.20210817":"94.0.4590.2","16.0.0-nightly.20210818":"94.0.4590.2","16.0.0-nightly.20210819":"94.0.4590.2","16.0.0-nightly.20210820":"94.0.4590.2","16.0.0-nightly.20210823":"94.0.4590.2","16.0.0-nightly.20210824":"95.0.4612.5","16.0.0-nightly.20210825":"95.0.4612.5","16.0.0-nightly.20210826":"95.0.4612.5","16.0.0-nightly.20210827":"95.0.4612.5","16.0.0-nightly.20210830":"95.0.4612.5","16.0.0-nightly.20210831":"95.0.4612.5","16.0.0-nightly.20210901":"95.0.4612.5","16.0.0-nightly.20210902":"95.0.4629.0","16.0.0-nightly.20210903":"95.0.4629.0","16.0.0-nightly.20210906":"95.0.4629.0","16.0.0-nightly.20210907":"95.0.4629.0","16.0.0-nightly.20210908":"95.0.4629.0","16.0.0-nightly.20210909":"95.0.4629.0","16.0.0-nightly.20210910":"95.0.4629.0","16.0.0-nightly.20210913":"95.0.4629.0","16.0.0-nightly.20210914":"95.0.4629.0","16.0.0-nightly.20210915":"95.0.4629.0","16.0.0-nightly.20210916":"95.0.4629.0","16.0.0-nightly.20210917":"95.0.4629.0","16.0.0-nightly.20210920":"95.0.4629.0","16.0.0-nightly.20210921":"95.0.4629.0","16.0.0-nightly.20210922":"95.0.4629.0","16.0.0":"96.0.4664.45","16.0.1":"96.0.4664.45","16.0.2":"96.0.4664.55","16.0.3":"96.0.4664.55","16.0.4":"96.0.4664.55","16.0.5":"96.0.4664.55","16.0.6":"96.0.4664.110","16.0.7":"96.0.4664.110","16.0.8":"96.0.4664.110","16.0.9":"96.0.4664.174","16.0.10":"96.0.4664.174","16.1.0":"96.0.4664.174","16.1.1":"96.0.4664.174","16.2.0":"96.0.4664.174","16.2.1":"96.0.4664.174","16.2.2":"96.0.4664.174","16.2.3":"96.0.4664.174","16.2.4":"96.0.4664.174","16.2.5":"96.0.4664.174","16.2.6":"96.0.4664.174","16.2.7":"96.0.4664.174","16.2.8":"96.0.4664.174","17.0.0-alpha.1":"96.0.4664.4","17.0.0-alpha.2":"96.0.4664.4","17.0.0-alpha.3":"96.0.4664.4","17.0.0-alpha.4":"98.0.4706.0","17.0.0-alpha.5":"98.0.4706.0","17.0.0-alpha.6":"98.0.4706.0","17.0.0-beta.1":"98.0.4706.0","17.0.0-beta.2":"98.0.4706.0","17.0.0-beta.3":"98.0.4758.9","17.0.0-beta.4":"98.0.4758.11","17.0.0-beta.5":"98.0.4758.11","17.0.0-beta.6":"98.0.4758.11","17.0.0-beta.7":"98.0.4758.11","17.0.0-beta.8":"98.0.4758.11","17.0.0-beta.9":"98.0.4758.11","17.0.0-nightly.20210923":"95.0.4629.0","17.0.0-nightly.20210924":"95.0.4629.0","17.0.0-nightly.20210927":"95.0.4629.0","17.0.0-nightly.20210928":"95.0.4629.0","17.0.0-nightly.20210929":"95.0.4629.0","17.0.0-nightly.20210930":"95.0.4629.0","17.0.0-nightly.20211001":"95.0.4629.0","17.0.0-nightly.20211004":"95.0.4629.0","17.0.0-nightly.20211005":"95.0.4629.0","17.0.0-nightly.20211006":"96.0.4647.0","17.0.0-nightly.20211007":"96.0.4647.0","17.0.0-nightly.20211008":"96.0.4647.0","17.0.0-nightly.20211011":"96.0.4647.0","17.0.0-nightly.20211012":"96.0.4647.0","17.0.0-nightly.20211013":"96.0.4647.0","17.0.0-nightly.20211014":"96.0.4647.0","17.0.0-nightly.20211015":"96.0.4647.0","17.0.0-nightly.20211018":"96.0.4647.0","17.0.0-nightly.20211019":"96.0.4647.0","17.0.0-nightly.20211020":"96.0.4647.0","17.0.0-nightly.20211021":"96.0.4647.0","17.0.0-nightly.20211022":"96.0.4664.4","17.0.0-nightly.20211025":"96.0.4664.4","17.0.0-nightly.20211026":"96.0.4664.4","17.0.0-nightly.20211027":"96.0.4664.4","17.0.0-nightly.20211028":"96.0.4664.4","17.0.0-nightly.20211029":"96.0.4664.4","17.0.0-nightly.20211101":"96.0.4664.4","17.0.0-nightly.20211102":"96.0.4664.4","17.0.0-nightly.20211103":"96.0.4664.4","17.0.0-nightly.20211104":"96.0.4664.4","17.0.0-nightly.20211105":"96.0.4664.4","17.0.0-nightly.20211108":"96.0.4664.4","17.0.0-nightly.20211109":"96.0.4664.4","17.0.0-nightly.20211110":"96.0.4664.4","17.0.0-nightly.20211111":"96.0.4664.4","17.0.0-nightly.20211112":"96.0.4664.4","17.0.0-nightly.20211115":"96.0.4664.4","17.0.0-nightly.20211116":"96.0.4664.4","17.0.0-nightly.20211117":"96.0.4664.4","17.0.0":"98.0.4758.74","17.0.1":"98.0.4758.82","17.1.0":"98.0.4758.102","17.1.1":"98.0.4758.109","17.1.2":"98.0.4758.109","17.2.0":"98.0.4758.109","17.3.0":"98.0.4758.141","17.3.1":"98.0.4758.141","17.4.0":"98.0.4758.141","17.4.1":"98.0.4758.141","17.4.2":"98.0.4758.141","17.4.3":"98.0.4758.141","17.4.4":"98.0.4758.141","17.4.5":"98.0.4758.141","17.4.6":"98.0.4758.141","17.4.7":"98.0.4758.141","17.4.8":"98.0.4758.141","17.4.9":"98.0.4758.141","17.4.10":"98.0.4758.141","17.4.11":"98.0.4758.141","18.0.0-alpha.1":"99.0.4767.0","18.0.0-alpha.2":"99.0.4767.0","18.0.0-alpha.3":"99.0.4767.0","18.0.0-alpha.4":"99.0.4767.0","18.0.0-alpha.5":"99.0.4767.0","18.0.0-beta.1":"100.0.4894.0","18.0.0-beta.2":"100.0.4894.0","18.0.0-beta.3":"100.0.4894.0","18.0.0-beta.4":"100.0.4894.0","18.0.0-beta.5":"100.0.4894.0","18.0.0-beta.6":"100.0.4894.0","18.0.0-nightly.20211118":"96.0.4664.4","18.0.0-nightly.20211119":"96.0.4664.4","18.0.0-nightly.20211122":"96.0.4664.4","18.0.0-nightly.20211123":"96.0.4664.4","18.0.0-nightly.20211124":"98.0.4706.0","18.0.0-nightly.20211125":"98.0.4706.0","18.0.0-nightly.20211126":"98.0.4706.0","18.0.0-nightly.20211129":"98.0.4706.0","18.0.0-nightly.20211130":"98.0.4706.0","18.0.0-nightly.20211201":"98.0.4706.0","18.0.0-nightly.20211202":"98.0.4706.0","18.0.0-nightly.20211203":"98.0.4706.0","18.0.0-nightly.20211206":"98.0.4706.0","18.0.0-nightly.20211207":"98.0.4706.0","18.0.0-nightly.20211208":"98.0.4706.0","18.0.0-nightly.20211209":"98.0.4706.0","18.0.0-nightly.20211210":"98.0.4706.0","18.0.0-nightly.20211213":"98.0.4706.0","18.0.0-nightly.20211214":"98.0.4706.0","18.0.0-nightly.20211215":"98.0.4706.0","18.0.0-nightly.20211216":"98.0.4706.0","18.0.0-nightly.20211217":"98.0.4706.0","18.0.0-nightly.20211220":"98.0.4706.0","18.0.0-nightly.20211221":"98.0.4706.0","18.0.0-nightly.20211222":"98.0.4706.0","18.0.0-nightly.20211223":"98.0.4706.0","18.0.0-nightly.20211228":"98.0.4706.0","18.0.0-nightly.20211229":"98.0.4706.0","18.0.0-nightly.20211231":"98.0.4706.0","18.0.0-nightly.20220103":"98.0.4706.0","18.0.0-nightly.20220104":"98.0.4706.0","18.0.0-nightly.20220105":"98.0.4706.0","18.0.0-nightly.20220106":"98.0.4706.0","18.0.0-nightly.20220107":"98.0.4706.0","18.0.0-nightly.20220110":"98.0.4706.0","18.0.0-nightly.20220111":"99.0.4767.0","18.0.0-nightly.20220112":"99.0.4767.0","18.0.0-nightly.20220113":"99.0.4767.0","18.0.0-nightly.20220114":"99.0.4767.0","18.0.0-nightly.20220117":"99.0.4767.0","18.0.0-nightly.20220118":"99.0.4767.0","18.0.0-nightly.20220119":"99.0.4767.0","18.0.0-nightly.20220121":"99.0.4767.0","18.0.0-nightly.20220124":"99.0.4767.0","18.0.0-nightly.20220125":"99.0.4767.0","18.0.0-nightly.20220127":"99.0.4767.0","18.0.0-nightly.20220128":"99.0.4767.0","18.0.0-nightly.20220131":"99.0.4767.0","18.0.0-nightly.20220201":"99.0.4767.0","18.0.0":"100.0.4896.56","18.0.1":"100.0.4896.60","18.0.2":"100.0.4896.60","18.0.3":"100.0.4896.75","18.0.4":"100.0.4896.75","18.1.0":"100.0.4896.127","18.2.0":"100.0.4896.143","18.2.1":"100.0.4896.143","18.2.2":"100.0.4896.143","18.2.3":"100.0.4896.143","18.2.4":"100.0.4896.160","18.3.0":"100.0.4896.160","18.3.1":"100.0.4896.160","18.3.2":"100.0.4896.160","18.3.3":"100.0.4896.160","18.3.4":"100.0.4896.160","18.3.5":"100.0.4896.160","18.3.6":"100.0.4896.160","18.3.7":"100.0.4896.160","18.3.8":"100.0.4896.160","18.3.9":"100.0.4896.160","18.3.11":"100.0.4896.160","18.3.12":"100.0.4896.160","18.3.13":"100.0.4896.160","18.3.14":"100.0.4896.160","18.3.15":"100.0.4896.160","19.0.0-alpha.1":"102.0.4962.3","19.0.0-alpha.2":"102.0.4971.0","19.0.0-alpha.3":"102.0.4971.0","19.0.0-alpha.4":"102.0.4989.0","19.0.0-alpha.5":"102.0.4989.0","19.0.0-beta.1":"102.0.4999.0","19.0.0-beta.2":"102.0.4999.0","19.0.0-beta.3":"102.0.4999.0","19.0.0-beta.4":"102.0.5005.27","19.0.0-beta.5":"102.0.5005.40","19.0.0-beta.6":"102.0.5005.40","19.0.0-beta.7":"102.0.5005.40","19.0.0-beta.8":"102.0.5005.49","19.0.0-nightly.20220202":"99.0.4767.0","19.0.0-nightly.20220203":"99.0.4767.0","19.0.0-nightly.20220204":"99.0.4767.0","19.0.0-nightly.20220207":"99.0.4767.0","19.0.0-nightly.20220208":"99.0.4767.0","19.0.0-nightly.20220209":"99.0.4767.0","19.0.0-nightly.20220308":"100.0.4894.0","19.0.0-nightly.20220309":"100.0.4894.0","19.0.0-nightly.20220310":"100.0.4894.0","19.0.0-nightly.20220311":"100.0.4894.0","19.0.0-nightly.20220314":"100.0.4894.0","19.0.0-nightly.20220315":"100.0.4894.0","19.0.0-nightly.20220316":"100.0.4894.0","19.0.0-nightly.20220317":"100.0.4894.0","19.0.0-nightly.20220318":"100.0.4894.0","19.0.0-nightly.20220321":"100.0.4894.0","19.0.0-nightly.20220322":"100.0.4894.0","19.0.0-nightly.20220323":"100.0.4894.0","19.0.0-nightly.20220324":"100.0.4894.0","19.0.0-nightly.20220325":"102.0.4961.0","19.0.0-nightly.20220328":"102.0.4962.3","19.0.0-nightly.20220329":"102.0.4962.3","19.0.0":"102.0.5005.61","19.0.1":"102.0.5005.61","19.0.2":"102.0.5005.63","19.0.3":"102.0.5005.63","19.0.4":"102.0.5005.63","19.0.5":"102.0.5005.115","19.0.6":"102.0.5005.115","19.0.7":"102.0.5005.134","19.0.8":"102.0.5005.148","19.0.9":"102.0.5005.167","19.0.10":"102.0.5005.167","19.0.11":"102.0.5005.167","19.0.12":"102.0.5005.167","19.0.13":"102.0.5005.167","19.0.14":"102.0.5005.167","19.0.15":"102.0.5005.167","19.0.16":"102.0.5005.167","19.0.17":"102.0.5005.167","19.1.0":"102.0.5005.167","19.1.1":"102.0.5005.167","19.1.2":"102.0.5005.167","19.1.3":"102.0.5005.167","19.1.4":"102.0.5005.167","19.1.5":"102.0.5005.167","19.1.6":"102.0.5005.167","19.1.7":"102.0.5005.167","19.1.8":"102.0.5005.167","19.1.9":"102.0.5005.167","20.0.0-alpha.1":"103.0.5044.0","20.0.0-alpha.2":"104.0.5073.0","20.0.0-alpha.3":"104.0.5073.0","20.0.0-alpha.4":"104.0.5073.0","20.0.0-alpha.5":"104.0.5073.0","20.0.0-alpha.6":"104.0.5073.0","20.0.0-alpha.7":"104.0.5073.0","20.0.0-beta.1":"104.0.5073.0","20.0.0-beta.2":"104.0.5073.0","20.0.0-beta.3":"104.0.5073.0","20.0.0-beta.4":"104.0.5073.0","20.0.0-beta.5":"104.0.5073.0","20.0.0-beta.6":"104.0.5073.0","20.0.0-beta.7":"104.0.5073.0","20.0.0-beta.8":"104.0.5073.0","20.0.0-beta.9":"104.0.5112.39","20.0.0-beta.10":"104.0.5112.48","20.0.0-beta.11":"104.0.5112.48","20.0.0-beta.12":"104.0.5112.48","20.0.0-beta.13":"104.0.5112.57","20.0.0-nightly.20220330":"102.0.4962.3","20.0.0-nightly.20220411":"102.0.4971.0","20.0.0-nightly.20220414":"102.0.4989.0","20.0.0-nightly.20220415":"102.0.4989.0","20.0.0-nightly.20220418":"102.0.4989.0","20.0.0-nightly.20220419":"102.0.4989.0","20.0.0-nightly.20220420":"102.0.4989.0","20.0.0-nightly.20220421":"102.0.4989.0","20.0.0-nightly.20220425":"102.0.4999.0","20.0.0-nightly.20220426":"102.0.4999.0","20.0.0-nightly.20220427":"102.0.4999.0","20.0.0-nightly.20220428":"102.0.4999.0","20.0.0-nightly.20220429":"102.0.4999.0","20.0.0-nightly.20220502":"102.0.4999.0","20.0.0-nightly.20220503":"102.0.4999.0","20.0.0-nightly.20220504":"102.0.4999.0","20.0.0-nightly.20220505":"102.0.4999.0","20.0.0-nightly.20220506":"102.0.4999.0","20.0.0-nightly.20220509":"102.0.4999.0","20.0.0-nightly.20220511":"102.0.4999.0","20.0.0-nightly.20220512":"102.0.4999.0","20.0.0-nightly.20220513":"102.0.4999.0","20.0.0-nightly.20220516":"102.0.4999.0","20.0.0-nightly.20220517":"102.0.4999.0","20.0.0-nightly.20220518":"103.0.5044.0","20.0.0-nightly.20220519":"103.0.5044.0","20.0.0-nightly.20220520":"103.0.5044.0","20.0.0-nightly.20220523":"103.0.5044.0","20.0.0-nightly.20220524":"103.0.5044.0","20.0.0":"104.0.5112.65","20.0.1":"104.0.5112.81","20.0.2":"104.0.5112.81","20.0.3":"104.0.5112.81","20.1.0":"104.0.5112.102","20.1.1":"104.0.5112.102","20.1.2":"104.0.5112.114","20.1.3":"104.0.5112.114","20.1.4":"104.0.5112.114","20.2.0":"104.0.5112.124","20.3.0":"104.0.5112.124","20.3.1":"104.0.5112.124","20.3.2":"104.0.5112.124","20.3.3":"104.0.5112.124","20.3.4":"104.0.5112.124","20.3.5":"104.0.5112.124","20.3.6":"104.0.5112.124","20.3.7":"104.0.5112.124","20.3.8":"104.0.5112.124","20.3.9":"104.0.5112.124","20.3.10":"104.0.5112.124","20.3.11":"104.0.5112.124","20.3.12":"104.0.5112.124","21.0.0-alpha.1":"105.0.5187.0","21.0.0-alpha.2":"105.0.5187.0","21.0.0-alpha.3":"105.0.5187.0","21.0.0-alpha.4":"105.0.5187.0","21.0.0-alpha.5":"105.0.5187.0","21.0.0-alpha.6":"106.0.5216.0","21.0.0-beta.1":"106.0.5216.0","21.0.0-beta.2":"106.0.5216.0","21.0.0-beta.3":"106.0.5216.0","21.0.0-beta.4":"106.0.5216.0","21.0.0-beta.5":"106.0.5216.0","21.0.0-beta.6":"106.0.5249.40","21.0.0-beta.7":"106.0.5249.40","21.0.0-beta.8":"106.0.5249.40","21.0.0-nightly.20220526":"103.0.5044.0","21.0.0-nightly.20220527":"103.0.5044.0","21.0.0-nightly.20220530":"103.0.5044.0","21.0.0-nightly.20220531":"103.0.5044.0","21.0.0-nightly.20220602":"104.0.5073.0","21.0.0-nightly.20220603":"104.0.5073.0","21.0.0-nightly.20220606":"104.0.5073.0","21.0.0-nightly.20220607":"104.0.5073.0","21.0.0-nightly.20220608":"104.0.5073.0","21.0.0-nightly.20220609":"104.0.5073.0","21.0.0-nightly.20220610":"104.0.5073.0","21.0.0-nightly.20220613":"104.0.5073.0","21.0.0-nightly.20220614":"104.0.5073.0","21.0.0-nightly.20220615":"104.0.5073.0","21.0.0-nightly.20220616":"104.0.5073.0","21.0.0-nightly.20220617":"104.0.5073.0","21.0.0-nightly.20220620":"104.0.5073.0","21.0.0-nightly.20220621":"104.0.5073.0","21.0.0-nightly.20220622":"104.0.5073.0","21.0.0-nightly.20220623":"104.0.5073.0","21.0.0-nightly.20220624":"104.0.5073.0","21.0.0-nightly.20220627":"104.0.5073.0","21.0.0-nightly.20220628":"105.0.5129.0","21.0.0-nightly.20220629":"105.0.5129.0","21.0.0-nightly.20220630":"105.0.5129.0","21.0.0-nightly.20220701":"105.0.5129.0","21.0.0-nightly.20220704":"105.0.5129.0","21.0.0-nightly.20220705":"105.0.5129.0","21.0.0-nightly.20220706":"105.0.5129.0","21.0.0-nightly.20220707":"105.0.5129.0","21.0.0-nightly.20220708":"105.0.5129.0","21.0.0-nightly.20220711":"105.0.5129.0","21.0.0-nightly.20220712":"105.0.5129.0","21.0.0-nightly.20220713":"105.0.5129.0","21.0.0-nightly.20220715":"105.0.5173.0","21.0.0-nightly.20220718":"105.0.5173.0","21.0.0-nightly.20220719":"105.0.5173.0","21.0.0-nightly.20220720":"105.0.5187.0","21.0.0-nightly.20220721":"105.0.5187.0","21.0.0-nightly.20220722":"105.0.5187.0","21.0.0-nightly.20220725":"105.0.5187.0","21.0.0-nightly.20220726":"105.0.5187.0","21.0.0-nightly.20220727":"105.0.5187.0","21.0.0-nightly.20220728":"105.0.5187.0","21.0.0-nightly.20220801":"105.0.5187.0","21.0.0-nightly.20220802":"105.0.5187.0","21.0.0":"106.0.5249.51","21.0.1":"106.0.5249.61","21.1.0":"106.0.5249.91","21.1.1":"106.0.5249.103","21.2.0":"106.0.5249.119","21.2.1":"106.0.5249.165","21.2.2":"106.0.5249.168","21.2.3":"106.0.5249.168","21.3.0":"106.0.5249.181","21.3.1":"106.0.5249.181","21.3.3":"106.0.5249.199","21.3.4":"106.0.5249.199","21.3.5":"106.0.5249.199","21.4.0":"106.0.5249.199","21.4.1":"106.0.5249.199","21.4.2":"106.0.5249.199","21.4.3":"106.0.5249.199","21.4.4":"106.0.5249.199","22.0.0-alpha.1":"107.0.5286.0","22.0.0-alpha.3":"108.0.5329.0","22.0.0-alpha.4":"108.0.5329.0","22.0.0-alpha.5":"108.0.5329.0","22.0.0-alpha.6":"108.0.5329.0","22.0.0-alpha.7":"108.0.5355.0","22.0.0-alpha.8":"108.0.5359.10","22.0.0-beta.1":"108.0.5359.10","22.0.0-beta.2":"108.0.5359.10","22.0.0-beta.3":"108.0.5359.10","22.0.0-beta.4":"108.0.5359.29","22.0.0-beta.5":"108.0.5359.40","22.0.0-beta.6":"108.0.5359.40","22.0.0-beta.7":"108.0.5359.48","22.0.0-beta.8":"108.0.5359.48","22.0.0-nightly.20220808":"105.0.5187.0","22.0.0-nightly.20220809":"105.0.5187.0","22.0.0-nightly.20220810":"105.0.5187.0","22.0.0-nightly.20220811":"105.0.5187.0","22.0.0-nightly.20220812":"105.0.5187.0","22.0.0-nightly.20220815":"105.0.5187.0","22.0.0-nightly.20220816":"105.0.5187.0","22.0.0-nightly.20220817":"105.0.5187.0","22.0.0-nightly.20220822":"106.0.5216.0","22.0.0-nightly.20220823":"106.0.5216.0","22.0.0-nightly.20220824":"106.0.5216.0","22.0.0-nightly.20220825":"106.0.5216.0","22.0.0-nightly.20220829":"106.0.5216.0","22.0.0-nightly.20220830":"106.0.5216.0","22.0.0-nightly.20220831":"106.0.5216.0","22.0.0-nightly.20220901":"106.0.5216.0","22.0.0-nightly.20220902":"106.0.5216.0","22.0.0-nightly.20220905":"106.0.5216.0","22.0.0-nightly.20220908":"107.0.5274.0","22.0.0-nightly.20220909":"107.0.5286.0","22.0.0-nightly.20220912":"107.0.5286.0","22.0.0-nightly.20220913":"107.0.5286.0","22.0.0-nightly.20220914":"107.0.5286.0","22.0.0-nightly.20220915":"107.0.5286.0","22.0.0-nightly.20220916":"107.0.5286.0","22.0.0-nightly.20220919":"107.0.5286.0","22.0.0-nightly.20220920":"107.0.5286.0","22.0.0-nightly.20220921":"107.0.5286.0","22.0.0-nightly.20220922":"107.0.5286.0","22.0.0-nightly.20220923":"107.0.5286.0","22.0.0-nightly.20220926":"107.0.5286.0","22.0.0-nightly.20220927":"107.0.5286.0","22.0.0-nightly.20220928":"107.0.5286.0","22.0.0":"108.0.5359.62","22.0.1":"108.0.5359.125","22.0.2":"108.0.5359.179","22.0.3":"108.0.5359.179","22.1.0":"108.0.5359.179","22.2.0":"108.0.5359.215","22.2.1":"108.0.5359.215","22.3.0":"108.0.5359.215","22.3.1":"108.0.5359.215","22.3.2":"108.0.5359.215","22.3.3":"108.0.5359.215","22.3.4":"108.0.5359.215","22.3.5":"108.0.5359.215","22.3.6":"108.0.5359.215","22.3.7":"108.0.5359.215","22.3.8":"108.0.5359.215","22.3.9":"108.0.5359.215","22.3.10":"108.0.5359.215","22.3.11":"108.0.5359.215","22.3.12":"108.0.5359.215","22.3.13":"108.0.5359.215","22.3.14":"108.0.5359.215","22.3.15":"108.0.5359.215","22.3.16":"108.0.5359.215","22.3.17":"108.0.5359.215","22.3.18":"108.0.5359.215","22.3.20":"108.0.5359.215","22.3.21":"108.0.5359.215","22.3.22":"108.0.5359.215","22.3.23":"108.0.5359.215","22.3.24":"108.0.5359.215","22.3.25":"108.0.5359.215","22.3.26":"108.0.5359.215","22.3.27":"108.0.5359.215","23.0.0-alpha.1":"110.0.5415.0","23.0.0-alpha.2":"110.0.5451.0","23.0.0-alpha.3":"110.0.5451.0","23.0.0-beta.1":"110.0.5478.5","23.0.0-beta.2":"110.0.5478.5","23.0.0-beta.3":"110.0.5478.5","23.0.0-beta.4":"110.0.5481.30","23.0.0-beta.5":"110.0.5481.38","23.0.0-beta.6":"110.0.5481.52","23.0.0-beta.8":"110.0.5481.52","23.0.0-nightly.20220929":"107.0.5286.0","23.0.0-nightly.20220930":"107.0.5286.0","23.0.0-nightly.20221003":"107.0.5286.0","23.0.0-nightly.20221004":"108.0.5329.0","23.0.0-nightly.20221005":"108.0.5329.0","23.0.0-nightly.20221006":"108.0.5329.0","23.0.0-nightly.20221007":"108.0.5329.0","23.0.0-nightly.20221010":"108.0.5329.0","23.0.0-nightly.20221011":"108.0.5329.0","23.0.0-nightly.20221012":"108.0.5329.0","23.0.0-nightly.20221013":"108.0.5329.0","23.0.0-nightly.20221014":"108.0.5329.0","23.0.0-nightly.20221017":"108.0.5329.0","23.0.0-nightly.20221018":"108.0.5355.0","23.0.0-nightly.20221019":"108.0.5355.0","23.0.0-nightly.20221020":"108.0.5355.0","23.0.0-nightly.20221021":"108.0.5355.0","23.0.0-nightly.20221024":"108.0.5355.0","23.0.0-nightly.20221026":"108.0.5355.0","23.0.0-nightly.20221027":"109.0.5382.0","23.0.0-nightly.20221028":"109.0.5382.0","23.0.0-nightly.20221031":"109.0.5382.0","23.0.0-nightly.20221101":"109.0.5382.0","23.0.0-nightly.20221102":"109.0.5382.0","23.0.0-nightly.20221103":"109.0.5382.0","23.0.0-nightly.20221104":"109.0.5382.0","23.0.0-nightly.20221107":"109.0.5382.0","23.0.0-nightly.20221108":"109.0.5382.0","23.0.0-nightly.20221109":"109.0.5382.0","23.0.0-nightly.20221110":"109.0.5382.0","23.0.0-nightly.20221111":"109.0.5382.0","23.0.0-nightly.20221114":"109.0.5382.0","23.0.0-nightly.20221115":"109.0.5382.0","23.0.0-nightly.20221116":"109.0.5382.0","23.0.0-nightly.20221117":"109.0.5382.0","23.0.0-nightly.20221118":"110.0.5415.0","23.0.0-nightly.20221121":"110.0.5415.0","23.0.0-nightly.20221122":"110.0.5415.0","23.0.0-nightly.20221123":"110.0.5415.0","23.0.0-nightly.20221124":"110.0.5415.0","23.0.0-nightly.20221125":"110.0.5415.0","23.0.0-nightly.20221128":"110.0.5415.0","23.0.0-nightly.20221129":"110.0.5415.0","23.0.0-nightly.20221130":"110.0.5415.0","23.0.0":"110.0.5481.77","23.1.0":"110.0.5481.100","23.1.1":"110.0.5481.104","23.1.2":"110.0.5481.177","23.1.3":"110.0.5481.179","23.1.4":"110.0.5481.192","23.2.0":"110.0.5481.192","23.2.1":"110.0.5481.208","23.2.2":"110.0.5481.208","23.2.3":"110.0.5481.208","23.2.4":"110.0.5481.208","23.3.0":"110.0.5481.208","23.3.1":"110.0.5481.208","23.3.2":"110.0.5481.208","23.3.3":"110.0.5481.208","23.3.4":"110.0.5481.208","23.3.5":"110.0.5481.208","23.3.6":"110.0.5481.208","23.3.7":"110.0.5481.208","23.3.8":"110.0.5481.208","23.3.9":"110.0.5481.208","23.3.10":"110.0.5481.208","23.3.11":"110.0.5481.208","23.3.12":"110.0.5481.208","23.3.13":"110.0.5481.208","24.0.0-alpha.1":"111.0.5560.0","24.0.0-alpha.2":"111.0.5560.0","24.0.0-alpha.3":"111.0.5560.0","24.0.0-alpha.4":"111.0.5560.0","24.0.0-alpha.5":"111.0.5560.0","24.0.0-alpha.6":"111.0.5560.0","24.0.0-alpha.7":"111.0.5560.0","24.0.0-beta.1":"111.0.5563.50","24.0.0-beta.2":"111.0.5563.50","24.0.0-beta.3":"112.0.5615.20","24.0.0-beta.4":"112.0.5615.20","24.0.0-beta.5":"112.0.5615.29","24.0.0-beta.6":"112.0.5615.39","24.0.0-beta.7":"112.0.5615.39","24.0.0-nightly.20221201":"110.0.5415.0","24.0.0-nightly.20221202":"110.0.5415.0","24.0.0-nightly.20221205":"110.0.5415.0","24.0.0-nightly.20221206":"110.0.5451.0","24.0.0-nightly.20221207":"110.0.5451.0","24.0.0-nightly.20221208":"110.0.5451.0","24.0.0-nightly.20221213":"110.0.5451.0","24.0.0-nightly.20221214":"110.0.5451.0","24.0.0-nightly.20221215":"110.0.5451.0","24.0.0-nightly.20221216":"110.0.5451.0","24.0.0-nightly.20230109":"111.0.5518.0","24.0.0-nightly.20230110":"111.0.5518.0","24.0.0-nightly.20230111":"111.0.5518.0","24.0.0-nightly.20230112":"111.0.5518.0","24.0.0-nightly.20230113":"111.0.5518.0","24.0.0-nightly.20230116":"111.0.5518.0","24.0.0-nightly.20230117":"111.0.5518.0","24.0.0-nightly.20230118":"111.0.5518.0","24.0.0-nightly.20230119":"111.0.5518.0","24.0.0-nightly.20230120":"111.0.5518.0","24.0.0-nightly.20230123":"111.0.5518.0","24.0.0-nightly.20230124":"111.0.5518.0","24.0.0-nightly.20230125":"111.0.5518.0","24.0.0-nightly.20230126":"111.0.5518.0","24.0.0-nightly.20230127":"111.0.5518.0","24.0.0-nightly.20230131":"111.0.5518.0","24.0.0-nightly.20230201":"111.0.5518.0","24.0.0-nightly.20230202":"111.0.5518.0","24.0.0-nightly.20230203":"111.0.5560.0","24.0.0-nightly.20230206":"111.0.5560.0","24.0.0-nightly.20230207":"111.0.5560.0","24.0.0-nightly.20230208":"111.0.5560.0","24.0.0-nightly.20230209":"111.0.5560.0","24.0.0":"112.0.5615.49","24.1.0":"112.0.5615.50","24.1.1":"112.0.5615.50","24.1.2":"112.0.5615.87","24.1.3":"112.0.5615.165","24.2.0":"112.0.5615.165","24.3.0":"112.0.5615.165","24.3.1":"112.0.5615.183","24.4.0":"112.0.5615.204","24.4.1":"112.0.5615.204","24.5.0":"112.0.5615.204","24.5.1":"112.0.5615.204","24.6.0":"112.0.5615.204","24.6.1":"112.0.5615.204","24.6.2":"112.0.5615.204","24.6.3":"112.0.5615.204","24.6.4":"112.0.5615.204","24.6.5":"112.0.5615.204","24.7.0":"112.0.5615.204","24.7.1":"112.0.5615.204","24.8.0":"112.0.5615.204","24.8.1":"112.0.5615.204","24.8.2":"112.0.5615.204","24.8.3":"112.0.5615.204","24.8.4":"112.0.5615.204","24.8.5":"112.0.5615.204","24.8.6":"112.0.5615.204","24.8.7":"112.0.5615.204","24.8.8":"112.0.5615.204","25.0.0-alpha.1":"114.0.5694.0","25.0.0-alpha.2":"114.0.5694.0","25.0.0-alpha.3":"114.0.5710.0","25.0.0-alpha.4":"114.0.5710.0","25.0.0-alpha.5":"114.0.5719.0","25.0.0-alpha.6":"114.0.5719.0","25.0.0-beta.1":"114.0.5719.0","25.0.0-beta.2":"114.0.5719.0","25.0.0-beta.3":"114.0.5719.0","25.0.0-beta.4":"114.0.5735.16","25.0.0-beta.5":"114.0.5735.16","25.0.0-beta.6":"114.0.5735.16","25.0.0-beta.7":"114.0.5735.16","25.0.0-beta.8":"114.0.5735.35","25.0.0-beta.9":"114.0.5735.45","25.0.0-nightly.20230210":"111.0.5560.0","25.0.0-nightly.20230214":"111.0.5560.0","25.0.0-nightly.20230215":"111.0.5560.0","25.0.0-nightly.20230216":"111.0.5560.0","25.0.0-nightly.20230217":"111.0.5560.0","25.0.0-nightly.20230220":"111.0.5560.0","25.0.0-nightly.20230221":"111.0.5560.0","25.0.0-nightly.20230222":"111.0.5560.0","25.0.0-nightly.20230223":"111.0.5560.0","25.0.0-nightly.20230224":"111.0.5560.0","25.0.0-nightly.20230227":"111.0.5560.0","25.0.0-nightly.20230228":"111.0.5560.0","25.0.0-nightly.20230301":"111.0.5560.0","25.0.0-nightly.20230302":"111.0.5560.0","25.0.0-nightly.20230303":"111.0.5560.0","25.0.0-nightly.20230306":"111.0.5560.0","25.0.0-nightly.20230307":"111.0.5560.0","25.0.0-nightly.20230308":"111.0.5560.0","25.0.0-nightly.20230309":"111.0.5560.0","25.0.0-nightly.20230310":"111.0.5560.0","25.0.0-nightly.20230314":"113.0.5636.0","25.0.0-nightly.20230315":"113.0.5651.0","25.0.0-nightly.20230317":"113.0.5653.0","25.0.0-nightly.20230320":"113.0.5660.0","25.0.0-nightly.20230321":"113.0.5664.0","25.0.0-nightly.20230322":"113.0.5666.0","25.0.0-nightly.20230323":"113.0.5668.0","25.0.0-nightly.20230324":"113.0.5670.0","25.0.0-nightly.20230327":"113.0.5670.0","25.0.0-nightly.20230328":"113.0.5670.0","25.0.0-nightly.20230329":"113.0.5670.0","25.0.0-nightly.20230330":"113.0.5670.0","25.0.0-nightly.20230331":"114.0.5684.0","25.0.0-nightly.20230403":"114.0.5684.0","25.0.0-nightly.20230404":"114.0.5692.0","25.0.0-nightly.20230405":"114.0.5694.0","25.0.0":"114.0.5735.45","25.0.1":"114.0.5735.45","25.1.0":"114.0.5735.106","25.1.1":"114.0.5735.106","25.2.0":"114.0.5735.134","25.3.0":"114.0.5735.199","25.3.1":"114.0.5735.243","25.3.2":"114.0.5735.248","25.4.0":"114.0.5735.248","25.5.0":"114.0.5735.289","25.6.0":"114.0.5735.289","25.7.0":"114.0.5735.289","25.8.0":"114.0.5735.289","25.8.1":"114.0.5735.289","25.8.2":"114.0.5735.289","25.8.3":"114.0.5735.289","25.8.4":"114.0.5735.289","25.9.0":"114.0.5735.289","25.9.1":"114.0.5735.289","25.9.2":"114.0.5735.289","25.9.3":"114.0.5735.289","25.9.4":"114.0.5735.289","25.9.5":"114.0.5735.289","25.9.6":"114.0.5735.289","25.9.7":"114.0.5735.289","26.0.0-alpha.1":"116.0.5791.0","26.0.0-alpha.2":"116.0.5791.0","26.0.0-alpha.3":"116.0.5791.0","26.0.0-alpha.4":"116.0.5791.0","26.0.0-alpha.5":"116.0.5791.0","26.0.0-alpha.6":"116.0.5815.0","26.0.0-alpha.7":"116.0.5831.0","26.0.0-alpha.8":"116.0.5845.0","26.0.0-beta.1":"116.0.5845.0","26.0.0-beta.2":"116.0.5845.14","26.0.0-beta.3":"116.0.5845.14","26.0.0-beta.4":"116.0.5845.14","26.0.0-beta.5":"116.0.5845.14","26.0.0-beta.6":"116.0.5845.14","26.0.0-beta.7":"116.0.5845.14","26.0.0-beta.8":"116.0.5845.42","26.0.0-beta.9":"116.0.5845.42","26.0.0-beta.10":"116.0.5845.49","26.0.0-beta.11":"116.0.5845.49","26.0.0-beta.12":"116.0.5845.62","26.0.0-nightly.20230406":"114.0.5694.0","26.0.0-nightly.20230407":"114.0.5694.0","26.0.0-nightly.20230410":"114.0.5694.0","26.0.0-nightly.20230411":"114.0.5694.0","26.0.0-nightly.20230412":"114.0.5708.0","26.0.0-nightly.20230413":"114.0.5710.0","26.0.0-nightly.20230414":"114.0.5710.0","26.0.0-nightly.20230417":"114.0.5710.0","26.0.0-nightly.20230418":"114.0.5715.0","26.0.0-nightly.20230421":"114.0.5719.0","26.0.0-nightly.20230424":"114.0.5719.0","26.0.0-nightly.20230425":"114.0.5719.0","26.0.0-nightly.20230426":"114.0.5719.0","26.0.0-nightly.20230427":"114.0.5719.0","26.0.0-nightly.20230428":"114.0.5719.0","26.0.0-nightly.20230501":"114.0.5719.0","26.0.0-nightly.20230502":"114.0.5719.0","26.0.0-nightly.20230503":"114.0.5719.0","26.0.0-nightly.20230504":"114.0.5719.0","26.0.0-nightly.20230505":"114.0.5719.0","26.0.0-nightly.20230508":"114.0.5719.0","26.0.0-nightly.20230509":"114.0.5719.0","26.0.0-nightly.20230510":"114.0.5719.0","26.0.0-nightly.20230511":"115.0.5760.0","26.0.0-nightly.20230512":"115.0.5760.0","26.0.0-nightly.20230515":"115.0.5760.0","26.0.0-nightly.20230516":"115.0.5760.0","26.0.0-nightly.20230517":"115.0.5760.0","26.0.0-nightly.20230518":"115.0.5760.0","26.0.0-nightly.20230519":"115.0.5760.0","26.0.0-nightly.20230522":"115.0.5760.0","26.0.0-nightly.20230523":"115.0.5760.0","26.0.0-nightly.20230524":"115.0.5786.0","26.0.0-nightly.20230525":"115.0.5790.0","26.0.0-nightly.20230526":"116.0.5791.0","26.0.0-nightly.20230529":"116.0.5791.0","26.0.0-nightly.20230530":"116.0.5791.0","26.0.0-nightly.20230531":"116.0.5791.0","26.0.0":"116.0.5845.82","26.1.0":"116.0.5845.97","26.2.0":"116.0.5845.179","26.2.1":"116.0.5845.188","26.2.2":"116.0.5845.190","26.2.3":"116.0.5845.190","26.2.4":"116.0.5845.190","26.3.0":"116.0.5845.228","26.4.0":"116.0.5845.228","26.4.1":"116.0.5845.228","26.4.2":"116.0.5845.228","26.4.3":"116.0.5845.228","26.5.0":"116.0.5845.228","26.6.0":"116.0.5845.228","26.6.1":"116.0.5845.228","26.6.2":"116.0.5845.228","27.0.0-alpha.1":"118.0.5949.0","27.0.0-alpha.2":"118.0.5949.0","27.0.0-alpha.3":"118.0.5949.0","27.0.0-alpha.4":"118.0.5949.0","27.0.0-alpha.5":"118.0.5949.0","27.0.0-alpha.6":"118.0.5949.0","27.0.0-beta.1":"118.0.5993.5","27.0.0-beta.2":"118.0.5993.5","27.0.0-beta.3":"118.0.5993.5","27.0.0-beta.4":"118.0.5993.11","27.0.0-beta.5":"118.0.5993.18","27.0.0-beta.6":"118.0.5993.18","27.0.0-beta.7":"118.0.5993.18","27.0.0-beta.8":"118.0.5993.18","27.0.0-beta.9":"118.0.5993.18","27.0.0-nightly.20230601":"116.0.5791.0","27.0.0-nightly.20230602":"116.0.5791.0","27.0.0-nightly.20230605":"116.0.5791.0","27.0.0-nightly.20230606":"116.0.5791.0","27.0.0-nightly.20230607":"116.0.5791.0","27.0.0-nightly.20230609":"116.0.5791.0","27.0.0-nightly.20230612":"116.0.5815.0","27.0.0-nightly.20230613":"116.0.5815.0","27.0.0-nightly.20230614":"116.0.5829.0","27.0.0-nightly.20230615":"116.0.5831.0","27.0.0-nightly.20230616":"116.0.5833.0","27.0.0-nightly.20230619":"116.0.5833.0","27.0.0-nightly.20230620":"116.0.5833.0","27.0.0-nightly.20230621":"116.0.5833.0","27.0.0-nightly.20230622":"116.0.5845.0","27.0.0-nightly.20230623":"116.0.5845.0","27.0.0-nightly.20230626":"116.0.5845.0","27.0.0-nightly.20230627":"116.0.5845.0","27.0.0-nightly.20230628":"116.0.5845.0","27.0.0-nightly.20230629":"116.0.5845.0","27.0.0-nightly.20230630":"116.0.5845.0","27.0.0-nightly.20230703":"117.0.5852.0","27.0.0-nightly.20230704":"117.0.5852.0","27.0.0-nightly.20230705":"117.0.5852.0","27.0.0-nightly.20230706":"117.0.5852.0","27.0.0-nightly.20230707":"117.0.5852.0","27.0.0-nightly.20230710":"117.0.5852.0","27.0.0-nightly.20230711":"117.0.5852.0","27.0.0-nightly.20230712":"117.0.5852.0","27.0.0-nightly.20230713":"117.0.5852.0","27.0.0-nightly.20230714":"117.0.5852.0","27.0.0-nightly.20230717":"117.0.5884.1","27.0.0-nightly.20230718":"117.0.5884.1","27.0.0-nightly.20230719":"117.0.5892.0","27.0.0-nightly.20230720":"117.0.5897.0","27.0.0-nightly.20230721":"117.0.5897.0","27.0.0-nightly.20230724":"117.0.5897.0","27.0.0-nightly.20230725":"117.0.5897.0","27.0.0-nightly.20230726":"117.0.5897.0","27.0.0-nightly.20230727":"117.0.5897.0","27.0.0-nightly.20230728":"117.0.5897.0","27.0.0-nightly.20230731":"117.0.5897.0","27.0.0-nightly.20230801":"117.0.5911.0","27.0.0-nightly.20230802":"117.0.5911.0","27.0.0-nightly.20230803":"117.0.5911.0","27.0.0-nightly.20230804":"117.0.5921.0","27.0.0-nightly.20230807":"117.0.5921.0","27.0.0-nightly.20230808":"117.0.5921.0","27.0.0-nightly.20230814":"117.0.5921.0","27.0.0-nightly.20230815":"117.0.5921.0","27.0.0-nightly.20230816":"118.0.5949.0","27.0.0":"118.0.5993.54","27.0.1":"118.0.5993.89","27.0.2":"118.0.5993.89","27.0.3":"118.0.5993.120","27.0.4":"118.0.5993.129","27.1.0":"118.0.5993.144","27.1.2":"118.0.5993.144","27.1.3":"118.0.5993.159","28.0.0-alpha.1":"119.0.6045.0","28.0.0-alpha.2":"119.0.6045.0","28.0.0-alpha.3":"119.0.6045.21","28.0.0-alpha.4":"119.0.6045.21","28.0.0-alpha.5":"119.0.6045.33","28.0.0-alpha.6":"119.0.6045.33","28.0.0-alpha.7":"119.0.6045.33","28.0.0-beta.1":"119.0.6045.33","28.0.0-beta.2":"120.0.6099.0","28.0.0-beta.3":"120.0.6099.5","28.0.0-beta.4":"120.0.6099.5","28.0.0-beta.5":"120.0.6099.18","28.0.0-beta.6":"120.0.6099.18","28.0.0-beta.7":"120.0.6099.18","28.0.0-beta.8":"120.0.6099.18","28.0.0-beta.9":"120.0.6099.18","28.0.0-beta.10":"120.0.6099.18","28.0.0-beta.11":"120.0.6099.35","28.0.0-nightly.20230817":"118.0.5949.0","28.0.0-nightly.20230818":"118.0.5949.0","28.0.0-nightly.20230821":"118.0.5949.0","28.0.0-nightly.20230822":"118.0.5949.0","28.0.0-nightly.20230823":"118.0.5949.0","28.0.0-nightly.20230824":"118.0.5949.0","28.0.0-nightly.20230825":"118.0.5949.0","28.0.0-nightly.20230828":"118.0.5949.0","28.0.0-nightly.20230829":"118.0.5949.0","28.0.0-nightly.20230830":"118.0.5949.0","28.0.0-nightly.20230831":"118.0.5949.0","28.0.0-nightly.20230906":"118.0.5991.0","28.0.0-nightly.20230907":"118.0.5993.0","28.0.0-nightly.20230908":"118.0.5993.0","28.0.0-nightly.20230911":"118.0.5993.0","28.0.0-nightly.20230912":"118.0.5993.0","28.0.0-nightly.20230913":"118.0.5993.0","28.0.0-nightly.20230914":"118.0.5993.0","28.0.0-nightly.20230915":"118.0.5993.0","28.0.0-nightly.20230919":"119.0.6006.0","28.0.0-nightly.20230920":"119.0.6017.0","28.0.0-nightly.20230921":"119.0.6019.2","28.0.0-nightly.20230925":"119.0.6019.2","28.0.0-nightly.20230926":"119.0.6019.2","28.0.0-nightly.20230927":"119.0.6019.2","28.0.0-nightly.20230928":"119.0.6019.2","28.0.0-nightly.20230929":"119.0.6029.0","28.0.0-nightly.20231002":"119.0.6029.0","28.0.0-nightly.20231003":"119.0.6043.0","28.0.0-nightly.20231004":"119.0.6043.0","28.0.0-nightly.20231005":"119.0.6043.0","28.0.0-nightly.20231006":"119.0.6045.0","28.0.0-nightly.20231009":"119.0.6045.0","28.0.0-nightly.20231010":"119.0.6045.0","28.0.0-nightly.20231011":"119.0.6045.0","29.0.0-nightly.20231012":"119.0.6045.0","29.0.0-nightly.20231013":"119.0.6045.0","29.0.0-nightly.20231016":"119.0.6045.0","29.0.0-nightly.20231017":"119.0.6045.0","29.0.0-nightly.20231018":"119.0.6045.0","29.0.0-nightly.20231019":"119.0.6045.0","29.0.0-nightly.20231020":"119.0.6045.0","29.0.0-nightly.20231023":"119.0.6045.0","29.0.0-nightly.20231024":"119.0.6045.0","29.0.0-nightly.20231025":"120.0.6078.0","29.0.0-nightly.20231026":"120.0.6078.0","29.0.0-nightly.20231027":"120.0.6078.0","29.0.0-nightly.20231030":"120.0.6078.0","29.0.0-nightly.20231031":"120.0.6078.0","29.0.0-nightly.20231101":"120.0.6078.0","29.0.0-nightly.20231102":"121.0.6100.0","29.0.0-nightly.20231103":"121.0.6100.0","29.0.0-nightly.20231106":"121.0.6104.0","29.0.0-nightly.20231107":"121.0.6110.0","29.0.0-nightly.20231108":"121.0.6110.0","29.0.0-nightly.20231109":"121.0.6110.0","29.0.0-nightly.20231110":"121.0.6110.0","29.0.0-nightly.20231113":"121.0.6110.0","29.0.0-nightly.20231114":"121.0.6110.0","29.0.0-nightly.20231115":"121.0.6116.0","29.0.0-nightly.20231116":"121.0.6116.0","29.0.0-nightly.20231117":"121.0.6116.0","29.0.0-nightly.20231120":"121.0.6116.0","29.0.0-nightly.20231121":"121.0.6116.0","29.0.0-nightly.20231122":"121.0.6116.0","29.0.0-nightly.20231123":"121.0.6116.0","29.0.0-nightly.20231124":"121.0.6116.0","29.0.0-nightly.20231127":"121.0.6116.0","29.0.0-nightly.20231128":"121.0.6116.0","29.0.0-nightly.20231129":"121.0.6147.0","29.0.0-nightly.20231130":"121.0.6147.0","29.0.0-nightly.20231201":"121.0.6147.0"} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/electron-to-chromium/package.json b/tools/node_modules/eslint/node_modules/electron-to-chromium/package.json index b42fe452188977..665a193341236d 100644 --- a/tools/node_modules/eslint/node_modules/electron-to-chromium/package.json +++ b/tools/node_modules/eslint/node_modules/electron-to-chromium/package.json @@ -1,6 +1,6 @@ { "name": "electron-to-chromium", - "version": "1.4.576", + "version": "1.4.601", "description": "Provides a list of electron-to-chromium version mappings", "main": "index.js", "files": [ diff --git a/tools/node_modules/eslint/node_modules/electron-to-chromium/versions.js b/tools/node_modules/eslint/node_modules/electron-to-chromium/versions.js index cbf6e1a8eeb6a3..6bfa2c99a61024 100644 --- a/tools/node_modules/eslint/node_modules/electron-to-chromium/versions.js +++ b/tools/node_modules/eslint/node_modules/electron-to-chromium/versions.js @@ -136,6 +136,9 @@ module.exports = { "26.2": "116", "26.3": "116", "26.4": "116", + "26.5": "116", + "26.6": "116", "27.0": "118", + "27.1": "118", "28.0": "120" }; \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/electron-to-chromium/versions.json b/tools/node_modules/eslint/node_modules/electron-to-chromium/versions.json index 507b849f9cb003..183f79c12d754e 100644 --- a/tools/node_modules/eslint/node_modules/electron-to-chromium/versions.json +++ b/tools/node_modules/eslint/node_modules/electron-to-chromium/versions.json @@ -1 +1 @@ -{"0.20":"39","0.21":"41","0.22":"41","0.23":"41","0.24":"41","0.25":"42","0.26":"42","0.27":"43","0.28":"43","0.29":"43","0.30":"44","0.31":"45","0.32":"45","0.33":"45","0.34":"45","0.35":"45","0.36":"47","0.37":"49","1.0":"49","1.1":"50","1.2":"51","1.3":"52","1.4":"53","1.5":"54","1.6":"56","1.7":"58","1.8":"59","2.0":"61","2.1":"61","3.0":"66","3.1":"66","4.0":"69","4.1":"69","4.2":"69","5.0":"73","6.0":"76","6.1":"76","7.0":"78","7.1":"78","7.2":"78","7.3":"78","8.0":"80","8.1":"80","8.2":"80","8.3":"80","8.4":"80","8.5":"80","9.0":"83","9.1":"83","9.2":"83","9.3":"83","9.4":"83","10.0":"85","10.1":"85","10.2":"85","10.3":"85","10.4":"85","11.0":"87","11.1":"87","11.2":"87","11.3":"87","11.4":"87","11.5":"87","12.0":"89","12.1":"89","12.2":"89","13.0":"91","13.1":"91","13.2":"91","13.3":"91","13.4":"91","13.5":"91","13.6":"91","14.0":"93","14.1":"93","14.2":"93","15.0":"94","15.1":"94","15.2":"94","15.3":"94","15.4":"94","15.5":"94","16.0":"96","16.1":"96","16.2":"96","17.0":"98","17.1":"98","17.2":"98","17.3":"98","17.4":"98","18.0":"100","18.1":"100","18.2":"100","18.3":"100","19.0":"102","19.1":"102","20.0":"104","20.1":"104","20.2":"104","20.3":"104","21.0":"106","21.1":"106","21.2":"106","21.3":"106","21.4":"106","22.0":"108","22.1":"108","22.2":"108","22.3":"108","23.0":"110","23.1":"110","23.2":"110","23.3":"110","24.0":"112","24.1":"112","24.2":"112","24.3":"112","24.4":"112","24.5":"112","24.6":"112","24.7":"112","24.8":"112","25.0":"114","25.1":"114","25.2":"114","25.3":"114","25.4":"114","25.5":"114","25.6":"114","25.7":"114","25.8":"114","25.9":"114","26.0":"116","26.1":"116","26.2":"116","26.3":"116","26.4":"116","27.0":"118","28.0":"120"} \ No newline at end of file +{"0.20":"39","0.21":"41","0.22":"41","0.23":"41","0.24":"41","0.25":"42","0.26":"42","0.27":"43","0.28":"43","0.29":"43","0.30":"44","0.31":"45","0.32":"45","0.33":"45","0.34":"45","0.35":"45","0.36":"47","0.37":"49","1.0":"49","1.1":"50","1.2":"51","1.3":"52","1.4":"53","1.5":"54","1.6":"56","1.7":"58","1.8":"59","2.0":"61","2.1":"61","3.0":"66","3.1":"66","4.0":"69","4.1":"69","4.2":"69","5.0":"73","6.0":"76","6.1":"76","7.0":"78","7.1":"78","7.2":"78","7.3":"78","8.0":"80","8.1":"80","8.2":"80","8.3":"80","8.4":"80","8.5":"80","9.0":"83","9.1":"83","9.2":"83","9.3":"83","9.4":"83","10.0":"85","10.1":"85","10.2":"85","10.3":"85","10.4":"85","11.0":"87","11.1":"87","11.2":"87","11.3":"87","11.4":"87","11.5":"87","12.0":"89","12.1":"89","12.2":"89","13.0":"91","13.1":"91","13.2":"91","13.3":"91","13.4":"91","13.5":"91","13.6":"91","14.0":"93","14.1":"93","14.2":"93","15.0":"94","15.1":"94","15.2":"94","15.3":"94","15.4":"94","15.5":"94","16.0":"96","16.1":"96","16.2":"96","17.0":"98","17.1":"98","17.2":"98","17.3":"98","17.4":"98","18.0":"100","18.1":"100","18.2":"100","18.3":"100","19.0":"102","19.1":"102","20.0":"104","20.1":"104","20.2":"104","20.3":"104","21.0":"106","21.1":"106","21.2":"106","21.3":"106","21.4":"106","22.0":"108","22.1":"108","22.2":"108","22.3":"108","23.0":"110","23.1":"110","23.2":"110","23.3":"110","24.0":"112","24.1":"112","24.2":"112","24.3":"112","24.4":"112","24.5":"112","24.6":"112","24.7":"112","24.8":"112","25.0":"114","25.1":"114","25.2":"114","25.3":"114","25.4":"114","25.5":"114","25.6":"114","25.7":"114","25.8":"114","25.9":"114","26.0":"116","26.1":"116","26.2":"116","26.3":"116","26.4":"116","26.5":"116","26.6":"116","27.0":"118","27.1":"118","28.0":"120"} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/WarnSettings.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/WarnSettings.js index 7e31e6a0d8082a..78002918ab25eb 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/WarnSettings.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/WarnSettings.js @@ -33,7 +33,6 @@ const WarnSettings = function () { } }; }; -var _default = WarnSettings; -exports.default = _default; +var _default = exports.default = WarnSettings; module.exports = exports.default; //# sourceMappingURL=WarnSettings.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/alignTransform.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/alignTransform.js index 7bd5d755ec8056..7b65d761d17a97 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/alignTransform.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/alignTransform.js @@ -316,7 +316,6 @@ const alignTransform = ({ }); }; }; -var _default = alignTransform; -exports.default = _default; +var _default = exports.default = alignTransform; module.exports = exports.default; //# sourceMappingURL=alignTransform.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/defaultTagOrder.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/defaultTagOrder.js index 289ebb845c6e93..a42de8f08c4be3 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/defaultTagOrder.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/defaultTagOrder.js @@ -41,7 +41,6 @@ const defaultTagOrder = [{ // Non-Closure metadata 'ignore', 'author', 'version', 'variation', 'since', 'deprecated', 'todo'] }]; -var _default = defaultTagOrder; -exports.default = _default; +var _default = exports.default = defaultTagOrder; module.exports = exports.default; //# sourceMappingURL=defaultTagOrder.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/exportParser.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/exportParser.js index b30e22310a7b2b..30d66b03e4d837 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/exportParser.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/exportParser.js @@ -126,7 +126,6 @@ const getSymbol = function (node, globals, scope, opt) { /* eslint-enable complexity -- Temporary */ const opts = opt || {}; /* istanbul ignore next */ - // eslint-disable-next-line default-case switch (node.type) { case 'Identifier': { @@ -264,7 +263,6 @@ createSymbol = function (node, globals, value, scope, isGlobal) { return null; } let symbol; - // eslint-disable-next-line default-case switch (node.type) { case 'FunctionDeclaration': /* istanbul ignore next */ @@ -336,7 +334,6 @@ createSymbol = function (node, globals, value, scope, isGlobal) { * @returns {void} */ const initVariables = function (node, globals, opts) { - // eslint-disable-next-line default-case switch (node.type) { case 'Program': { @@ -732,10 +729,9 @@ const isUncommentedExport = function (node, sourceCode, opt, settings) { ast, node, opt); return isNodeExported(node, /** @type {CreatedNode} */parseResult.globalVars, opt); }; -var _default = { +var _default = exports.default = { isUncommentedExport, parse }; -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=exportParser.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/generateRule.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/generateRule.js index eb36b7718e27e5..eab69ff42fb09a 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/generateRule.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/generateRule.js @@ -6,14 +6,14 @@ var _promises = _interopRequireDefault(require("fs/promises")); var _openEditor = _interopRequireDefault(require("open-editor")); var _path = require("path"); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } /* eslint-disable no-console -- CLI */ /** - * @example - * - * ```shell - * npm run create-rule my-new-rule -- --recommended - * ``` - */ +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } /* eslint-disable no-console -- CLI */ /** + * @example + * + * ```shell + * npm run create-rule my-new-rule -- --recommended + * ``` + */ // Todo: Would ideally have prompts, e.g., to ask for whether // type was problem/layout, etc. const [,, ruleName, ...options] = process.argv; diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/getDefaultTagStructureForMode.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/getDefaultTagStructureForMode.js index 832a43eb246961..c7577d620d1685 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/getDefaultTagStructureForMode.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/getDefaultTagStructureForMode.js @@ -288,7 +288,6 @@ const getDefaultTagStructureForMode = mode => { // Shows curly brackets in the signature and in the examples ['typeAllowed', true]])]]); }; -var _default = getDefaultTagStructureForMode; -exports.default = _default; +var _default = exports.default = getDefaultTagStructureForMode; module.exports = exports.default; //# sourceMappingURL=getDefaultTagStructureForMode.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/index.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/index.js index 4bf1ef92624c3c..8dca7b25c0f72d 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/index.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/index.js @@ -249,7 +249,6 @@ index.configs['flat/recommended-typescript'] = createRecommendedTypeScriptRulese index.configs['flat/recommended-typescript-error'] = createRecommendedTypeScriptRuleset('error', true); index.configs['flat/recommended-typescript-flavor'] = createRecommendedTypeScriptFlavorRuleset('warn', true); index.configs['flat/recommended-typescript-flavor-error'] = createRecommendedTypeScriptFlavorRuleset('error', true); -var _default = index; -exports.default = _default; +var _default = exports.default = index; module.exports = exports.default; //# sourceMappingURL=index.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js index e1e5d21e8a7c4d..09fd1beed13191 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/iterateJsdoc.js @@ -128,7 +128,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * [key: string]: string * }} [data] */ -/* eslint-enable jsdoc/valid-types -- Old version */ /** * @callback GetRegexFromString @@ -176,7 +175,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * ) => import('comment-parser').Line[]} setter * @returns {void} */ -/* eslint-enable jsdoc/no-undefined-types -- Bug */ /** * @callback SetDescriptionLines @@ -191,7 +189,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @param {...Partial} tokens * @returns {void} */ -/* eslint-enable jsdoc/no-undefined-types -- TS */ /** * @callback SetTag @@ -201,7 +198,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @param {Partial} [tokens] * @returns {void} */ -/* eslint-enable jsdoc/no-undefined-types -- TS */ /** * @callback RemoveTag @@ -231,7 +227,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * tokens?: Partial | undefined * ) => import('comment-parser').Tokens} SeedTokens */ -/* eslint-enable jsdoc/no-undefined-types -- TS */ /** * Sets tokens to empty string. @@ -246,7 +241,6 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de * @param {Partial} tokens * @returns {void} */ -/* eslint-enable jsdoc/no-undefined-types -- TS */ /** * @callback AddLines @@ -580,7 +574,6 @@ const { * } * }} StateObject */ -/* eslint-enable jsdoc/valid-types -- Old version */ /** * The Node AST as supplied by the parser. @@ -664,7 +657,6 @@ const getBasicUtils = (context, { * }} [data] * @returns {void} */ -/* eslint-enable jsdoc/valid-types -- Old version of pratt */ /** * @param {Node|null} node @@ -673,13 +665,15 @@ const getBasicUtils = (context, { * @param {Settings} settings * @param {Report} report * @param {import('eslint').Rule.RuleContext} context + * @param {import('eslint').SourceCode} sc * @param {boolean|undefined} iteratingAll * @param {RuleConfig} ruleConfig * @param {string} indent * @returns {Utils} */ -const getUtils = (node, jsdoc, jsdocNode, settings, report, context, iteratingAll, ruleConfig, indent) => { - const ancestors = /** @type {import('eslint').Rule.Node[]} */context.getAncestors(); +const getUtils = (node, jsdoc, jsdocNode, settings, report, context, sc, iteratingAll, ruleConfig, indent) => { + /* istanbul ignore next */ + const ancestors = /** @type {import('eslint').Rule.Node[]} */node ? sc.getAncestors ? sc.getAncestors(node) : context.getAncestors() : []; // istanbul ignore next -- Fallback to deprecated method const { @@ -1552,7 +1546,6 @@ const getUtils = (node, jsdoc, jsdocNode, settings, report, context, iteratingAl * contexts?: Context[] * }} Settings */ -/* eslint-enable jsdoc/valid-types -- Old version */ /** * @param {import('eslint').Rule.RuleContext} context @@ -1623,7 +1616,6 @@ exports.getSettings = getSettings; const makeReport = (context, commentNode) => { /** @type {Report} */ const report = (message, fix = null, jsdocLoc = null, data = undefined) => { - /* eslint-enable jsdoc/valid-types -- Old version */ let loc; if (jsdocLoc) { if (!('line' in jsdocLoc)) { @@ -1710,8 +1702,6 @@ const makeReport = (context, commentNode) => { * } * ) => any } JsdocVisitor */ -/* eslint-enable jsdoc/valid-types -- Old version */ -/* eslint-enable jsdoc/no-undefined-types -- canonical still using an older version where not defined */ /** * @param {{ @@ -1738,7 +1728,7 @@ const iterate = (info, indent, jsdoc, ruleConfig, context, jsdocNode, node, sett const report = makeReport(context, /** @type {import('estree').Node} */ jsdocNde); const utils = getUtils(node, jsdoc, /** @type {import('eslint').AST.Token} */ - jsdocNode, settings, report, context, iteratingAll, ruleConfig, indent); + jsdocNode, settings, report, context, sourceCode, iteratingAll, ruleConfig, indent); if (!ruleConfig.checkInternal && settings.ignoreInternal && utils.hasTag('internal')) { return; } @@ -2044,7 +2034,6 @@ function iterateJsdoc(iterator, ruleConfig) { * @type {Context[]|undefined} */ let contexts; - /* eslint-enable jsdoc/valid-types -- Old version */ if (ruleConfig.contextDefaults || ruleConfig.contextSelected || ruleConfig.matchContext) { var _context$options$2, _contexts, _contexts2; contexts = ruleConfig.matchContext && (_context$options$2 = context.options[0]) !== null && _context$options$2 !== void 0 && _context$options$2.match ? context.options[0].match : _jsdocUtils.default.enforcedContexts(context, ruleConfig.contextDefaults, ruleConfig.nonGlobalSettings ? {} : settings); @@ -2081,7 +2070,6 @@ function iterateJsdoc(iterator, ruleConfig) { /** @type {Partial} */ const state = {}; - /* eslint-enable jsdoc/no-undefined-types -- TS */ /** @type {CheckJsdoc} */ const checkJsdoc = (info, handler, node) => { @@ -2124,10 +2112,8 @@ function iterateJsdoc(iterator, ruleConfig) { settings, state: ste }); - /* eslint-enable jsdoc/no-undefined-types -- Bug */ }; } - return contextObject; }, meta: ruleConfig.meta diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/jsdocUtils.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/jsdocUtils.js index a1395461bcf341..87228661ef2c25 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/jsdocUtils.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/jsdocUtils.js @@ -231,7 +231,6 @@ const getFunctionParameterNames = (functionNode, checkDefaultObjects) => { return [undefined, flattenRoots(roots)]; } if (param.type === 'Property') { - // eslint-disable-next-line default-case switch (param.value.type) { case 'ArrayPattern': { @@ -252,7 +251,6 @@ const getFunctionParameterNames = (functionNode, checkDefaultObjects) => { } case 'AssignmentPattern': { - // eslint-disable-next-line default-case switch (param.value.left.type) { case 'Identifier': // Default parameter @@ -1130,7 +1128,6 @@ const tagsWithNamesAndDescriptions = new Set(['param', 'arg', 'argument', 'prope * {message: string, replacement?: string} * }} TagNamePreference */ -/* eslint-enable jsdoc/valid-types -- Old version */ /** * @param {import('eslint').Rule.RuleContext} context @@ -1318,7 +1315,7 @@ const getRegexFromString = (regexString, requiredFlags) => { flags = uniqueFlags.join(''); return new RegExp(regex, flags); }; -var _default = { +var _default = exports.default = { comparePaths, dropPathSegmentQuotes, enforcedContexts, @@ -1360,6 +1357,5 @@ var _default = { tagMustHaveNamePosition, tagMustHaveTypePosition }; -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=jsdocUtils.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkAccess.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkAccess.js index 99089faf9a288e..38fd73b5a52279 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkAccess.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkAccess.js @@ -7,7 +7,7 @@ exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const accessLevels = ['package', 'private', 'protected', 'public']; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ report, utils }) => { @@ -36,6 +36,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=checkAccess.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkAlignment.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkAlignment.js index d3412a1c4ae6ad..6e88539ddf8b16 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkAlignment.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkAlignment.js @@ -13,7 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const trimStart = string => { return string.replace(/^\s+/u, ''); }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ sourceCode, jsdocNode, report, @@ -56,6 +56,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'layout' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=checkAlignment.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkExamples.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkExamples.js index 21dc648da99f54..d6b35e699a080f 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkExamples.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkExamples.js @@ -7,8 +7,8 @@ exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); var _eslint = _interopRequireWildcard(require("eslint")); var _semver = _interopRequireDefault(require("semver")); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // Todo: When replace `CLIEngine` with `ESLint` when feature set complete per https://github.com/eslint/eslint/issues/14745 // https://github.com/eslint/eslint/blob/master/docs/user-guide/migrating-to-7.0.0.md#-the-cliengine-class-has-been-deprecated @@ -93,7 +93,7 @@ const getLinesCols = text => { const colDelta = matchLines ? text.slice(text.lastIndexOf('\n') + 1).length : text.length; return [matchLines, colDelta]; }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ report, utils, context, @@ -508,6 +508,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=checkExamples.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkIndentation.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkIndentation.js index 2905f4c0a929c7..e97c47e2eec94b 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkIndentation.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkIndentation.js @@ -28,7 +28,7 @@ const maskCodeBlocks = str => { return (margin + '\n').repeat(code.match(/\n/gu).length); }); }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ sourceCode, jsdocNode, report, @@ -70,6 +70,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'layout' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=checkIndentation.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkLineAlignment.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkLineAlignment.js index ed7307ab9b8710..9cace5de19febe 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkLineAlignment.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkLineAlignment.js @@ -180,7 +180,7 @@ const checkAlignment = ({ }); } }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ indent, jsdoc, jsdocNode, @@ -309,6 +309,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'layout' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=checkLineAlignment.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkParamNames.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkParamNames.js index 6863bfefc88952..0f2fab6105ceb3 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkParamNames.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkParamNames.js @@ -229,7 +229,7 @@ const validateParameterNamesDeep = (targetTagName, _allowExtraTrailingParamDocs, return false; }); }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, report, @@ -295,6 +295,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=checkParamNames.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkPropertyNames.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkPropertyNames.js index 51c58f716e421b..9505f7fc9303e2 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkPropertyNames.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkPropertyNames.js @@ -71,7 +71,7 @@ const validatePropertyNamesDeep = (targetTagName, jsdocPropertyNames, jsdoc, rep return false; }); }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, report, @@ -112,6 +112,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=checkPropertyNames.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkSyntax.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkSyntax.js index be2df864e5442f..ce1c2a5d561e05 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkSyntax.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkSyntax.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ jsdoc, report, settings @@ -34,6 +34,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=checkSyntax.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkTagNames.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkTagNames.js index ab6ca180e3a260..65a9515640bfd6 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkTagNames.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkTagNames.js @@ -12,7 +12,7 @@ const jsxTagNames = new Set(['jsx', 'jsxFrag', 'jsxImportSource', 'jsxRuntime']) const typedTagsAlwaysUnnecessary = new Set(['augments', 'callback', 'class', 'enum', 'implements', 'private', 'property', 'protected', 'public', 'readonly', 'this', 'type', 'typedef']); const typedTagsNeedingName = new Set(['template']); const typedTagsUnnecessaryOutsideDeclare = new Set(['abstract', 'access', 'class', 'constant', 'constructs', 'default', 'enum', 'export', 'exports', 'function', 'global', 'inherits', 'instance', 'interface', 'member', 'memberof', 'memberOf', 'method', 'mixes', 'mixin', 'module', 'name', 'namespace', 'override', 'property', 'requires', 'static', 'this']); -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ sourceCode, jsdoc, report, @@ -211,6 +211,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=checkTagNames.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkTypes.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkTypes.js index 6cd2864c993a96..b78d5c2a9ec3fa 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkTypes.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkTypes.js @@ -66,7 +66,7 @@ const adjustNames = (type, preferred, isGenericMatch, typeNodeName, node, parent const getMessage = upperCase => { return 'Use object shorthand or index signatures instead of ' + '`' + (upperCase ? 'O' : 'o') + 'bject`, e.g., `{[key: string]: string}`'; }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ jsdocNode, sourceCode, report, @@ -90,8 +90,6 @@ var _default = (0, _iterateJsdoc.default)(({ structuredTags, mode } = settings; - /* eslint-enable jsdoc/valid-types -- Old version */ - const injectObjectPreferredTypes = !('Object' in preferredTypesOriginal || 'object' in preferredTypesOriginal || 'object.<>' in preferredTypesOriginal || 'Object.<>' in preferredTypesOriginal || 'object<>' in preferredTypesOriginal); /** @@ -394,6 +392,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=checkTypes.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkValues.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkValues.js index 4782882dfb42cc..91547983d2d0c5 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkValues.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/checkValues.js @@ -9,7 +9,7 @@ var _semver = _interopRequireDefault(require("semver")); var _spdxExpressionParse = _interopRequireDefault(require("spdx-expression-parse")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const allowedKinds = new Set(['class', 'constant', 'event', 'external', 'file', 'function', 'member', 'mixin', 'module', 'namespace', 'typedef']); -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ utils, report, context @@ -129,6 +129,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=checkValues.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/emptyTags.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/emptyTags.js index 32d1aaca45f1b6..a5751d7b6fdcef 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/emptyTags.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/emptyTags.js @@ -16,7 +16,7 @@ const emptyIfNotClosure = new Set(['package', 'private', 'protected', 'public', // Closure doesn't allow with this casing 'inheritdoc']); const emptyIfClosure = new Set(['interface']); -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ settings, jsdoc, utils @@ -71,6 +71,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=emptyTags.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/implementsOnClasses.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/implementsOnClasses.js index bd0a39961d6b79..63d1bc4d2eec64 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/implementsOnClasses.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/implementsOnClasses.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ report, utils }) => { @@ -56,6 +56,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=implementsOnClasses.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/importsAsDependencies.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/importsAsDependencies.js index 1f7041c118a494..71a45a4612302e 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/importsAsDependencies.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/importsAsDependencies.js @@ -35,7 +35,7 @@ const setDeps = function () { }; const moduleCheck = new Map(); -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ jsdoc, settings, utils @@ -105,6 +105,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=importsAsDependencies.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/informativeDocs.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/informativeDocs.js index 23f7c810338b77..c11727e9ba0bf1 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/informativeDocs.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/informativeDocs.js @@ -58,7 +58,7 @@ const getNamesFromNode = node => { } }; /* eslint-enable complexity -- Temporary */ -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, node, @@ -140,6 +140,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=informativeDocs.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/matchDescription.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/matchDescription.js index 3039167ebc1bc5..16d9bb5c8f8402 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/matchDescription.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/matchDescription.js @@ -18,7 +18,7 @@ const matchDescriptionDefault = '^\n?([A-Z`\\d_][\\s\\S]*[.?!`]\\s*)?$'; const stringOrDefault = (value, userDefault) => { return typeof value === 'string' ? value : userDefault || matchDescriptionDefault; }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ jsdoc, report, context, @@ -225,6 +225,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=matchDescription.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/matchName.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/matchName.js index ccb4ae94f9f8e1..0b77e47825c8c4 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/matchName.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/matchName.js @@ -7,7 +7,7 @@ exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // eslint-disable-next-line complexity -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, report, @@ -124,6 +124,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=matchName.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/multilineBlocks.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/multilineBlocks.js index b25aca055498c3..cd6d4e36d24053 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/multilineBlocks.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/multilineBlocks.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, utils @@ -233,6 +233,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=multilineBlocks.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBadBlocks.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBadBlocks.js index 19f21ea89d7740..ce6b55f73e987b 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBadBlocks.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBadBlocks.js @@ -11,7 +11,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de // https://jsdoc.app/about-getting-started.html#adding-documentation-comments-to-your-code const commentRegexp = /^\/\*(?!\*)/u; const extraAsteriskCommentRegexp = /^\/\*{3,}/u; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, sourceCode, allComments, @@ -83,6 +83,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'layout' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=noBadBlocks.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBlankBlockDescriptions.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBlankBlockDescriptions.js index e07ca72d613bc4..cf92a1dfbecd11 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBlankBlockDescriptions.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBlankBlockDescriptions.js @@ -8,7 +8,7 @@ var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } const anyWhitespaceLines = /^\s*$/u; const atLeastTwoLinesWhitespace = /^[ \t]*\n[ \t]*\n\s*$/u; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ jsdoc, utils }) => { @@ -59,6 +59,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'layout' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=noBlankBlockDescriptions.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBlankBlocks.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBlankBlocks.js index 38abb86917da8e..2d53a5cf56a618 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBlankBlocks.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noBlankBlocks.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, utils @@ -48,6 +48,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=noBlankBlocks.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noDefaults.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noDefaults.js index 3b63d129c77c35..14d4796aa9fc07 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noDefaults.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noDefaults.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, utils }) => { @@ -79,6 +79,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=noDefaults.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noMissingSyntax.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noMissingSyntax.js index 50acd7faa4c09b..822eaa03a66fcc 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noMissingSyntax.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noMissingSyntax.js @@ -43,7 +43,7 @@ const incrementSelector = (state, selector, comment) => { } state.selectorMap[selector][comment]++; }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, info: { comment @@ -171,6 +171,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=noMissingSyntax.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noMultiAsterisks.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noMultiAsterisks.js index 28d3de08ef7e44..7d147b75a142a8 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noMultiAsterisks.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noMultiAsterisks.js @@ -12,7 +12,7 @@ const endAsterisksSingleLineBlockWS = /\*((?:\*|(?: |\t))*)\*$/u; const endAsterisksMultipleLineBlockWS = /((?:\*|(?: |\t))*)\*$/u; const endAsterisksSingleLineNoBlockWS = /\*(\**)\*$/u; const endAsterisksMultipleLineNoBlockWS = /(\**)\*$/u; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, utils @@ -95,6 +95,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=noMultiAsterisks.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noRestrictedSyntax.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noRestrictedSyntax.js index 68d2344c6c6787..d21d4dcc671dbd 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noRestrictedSyntax.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noRestrictedSyntax.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, info: { comment @@ -79,6 +79,5 @@ var _default = (0, _iterateJsdoc.default)(({ }, nonGlobalSettings: true }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=noRestrictedSyntax.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noTypes.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noTypes.js index 5e9be31d128c8d..02c4ea26655786 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noTypes.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noTypes.js @@ -15,7 +15,7 @@ const removeType = ({ tokens.postTag = ''; tokens.type = ''; }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ utils }) => { if (!utils.isIteratingFunction() && !utils.isVirtualFunction()) { @@ -67,6 +67,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=noTypes.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noUndefinedTypes.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noUndefinedTypes.js index 11e67e570a79b6..baeda53a397d19 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noUndefinedTypes.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/noUndefinedTypes.js @@ -6,8 +6,8 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireWildcard(require("../iterateJsdoc.js")); var _jsdoccomment = require("@es-joy/jsdoccomment"); -function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); } -function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; } +function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); } +function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; } const extraTypes = ['null', 'undefined', 'void', 'string', 'boolean', 'object', 'function', 'symbol', 'number', 'bigint', 'NaN', 'Infinity', 'any', '*', 'never', 'unknown', 'const', 'this', 'true', 'false', 'Array', 'Object', 'RegExp', 'Date', 'Function']; const typescriptGlobals = [ // https://www.typescriptlang.org/docs/handbook/utility-types.html @@ -20,7 +20,7 @@ const typescriptGlobals = [ const stripPseudoTypes = str => { return str && str.replace(/(?:\.|<>|\.<>|\[\])$/u, ''); }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, node, report, @@ -206,7 +206,12 @@ var _default = (0, _iterateJsdoc.default)(({ report(`The type '${value}' is undefined.`, null, tag); } } else if (markVariablesAsUsed && !extraTypes.includes(value)) { - context.markVariableAsUsed(value); + /* istanbul ignore else */ + if (sourceCode.markVariableAsUsed) { + sourceCode.markVariableAsUsed(value); + } else { + context.markVariableAsUsed(value); + } } } }); @@ -239,6 +244,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=noUndefinedTypes.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireAsteriskPrefix.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireAsteriskPrefix.js index 49dec6bdc83d2a..36c71ad8b3d318 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireAsteriskPrefix.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireAsteriskPrefix.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, utils, @@ -162,6 +162,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'layout' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireAsteriskPrefix.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescription.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescription.js index bf276265856fb9..943c6f4a1ed337 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescription.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescription.js @@ -13,7 +13,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de const checkDescription = description => { return description.trim().split('\n').filter(Boolean).length; }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ jsdoc, report, utils, @@ -131,6 +131,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireDescription.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescriptionCompleteSentence.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescriptionCompleteSentence.js index 2cf64b37d7731f..0311c027f50c9a 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescriptionCompleteSentence.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireDescriptionCompleteSentence.js @@ -178,7 +178,7 @@ const validateDescription = (description, reportOrig, jsdocNode, abbreviationsRe return false; }); }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ sourceCode, context, jsdoc, @@ -277,6 +277,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireDescriptionCompleteSentence.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireExample.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireExample.js index 340b88e58219c9..16b176e46c974d 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireExample.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireExample.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, report, @@ -104,6 +104,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireExample.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireFileOverview.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireFileOverview.js index 988c79c15e068f..69368963329c3f 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireFileOverview.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireFileOverview.js @@ -27,7 +27,7 @@ const setDefaults = state => { state.hasNonCommentBeforeTag = {}; } }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ jsdocNode, state, utils, @@ -131,6 +131,5 @@ var _default = (0, _iterateJsdoc.default)(({ } } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireFileOverview.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireHyphenBeforeParamDescription.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireHyphenBeforeParamDescription.js index 1bfba184cfa74a..95192d19d1cef1 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireHyphenBeforeParamDescription.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireHyphenBeforeParamDescription.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ sourceCode, utils, report, @@ -22,7 +22,6 @@ var _default = (0, _iterateJsdoc.default)(({ * @type {null|"any"|{[key: string]: "always"|"never"}} */ tags; - /* eslint-enable jsdoc/valid-types -- Old version */ /** * @param {import('@es-joy/jsdoccomment').JsdocTagWithInline} jsdocTag @@ -138,6 +137,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'layout' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireHyphenBeforeParamDescription.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireJsdoc.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireJsdoc.js index 9944c57fcdf771..af9327d9260807 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireJsdoc.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireJsdoc.js @@ -159,7 +159,6 @@ const getOption = (context, baseObject, option, key) => { } return (/** @type {{[key: string]: {default?: boolean|undefined}}} */baseObject.properties[key].default ); - /* eslint-enable jsdoc/valid-types -- Old version */ }; /** @@ -181,7 +180,6 @@ const getOption = (context, baseObject, option, key) => { * }} */ const getOptions = (context, settings) => { - /* eslint-enable jsdoc/valid-types -- Old version */ const { publicOnly, contexts = settings.contexts || [], @@ -205,7 +203,6 @@ const getOptions = (context, settings) => { /** @type {{[key: string]: boolean|undefined}} */ const properties = {}; - /* eslint-enable jsdoc/valid-types -- Old version */ for (const prop of Object.keys( /** @type {import('json-schema').JSONSchema4Object} */ /** @type {import('json-schema').JSONSchema4Object} */baseObj.properties)) { const opt = getOption(context, /** @type {import('json-schema').JSONSchema4Object} */baseObj, 'publicOnly', prop); @@ -219,7 +216,6 @@ const getOptions = (context, settings) => { require: (baseObj => { /** @type {{[key: string]: boolean|undefined}} */ const properties = {}; - /* eslint-enable jsdoc/valid-types -- Old version */ for (const prop of Object.keys( /** @type {import('json-schema').JSONSchema4Object} */ /** @type {import('json-schema').JSONSchema4Object} */baseObj.properties)) { const opt = getOption(context, /** @type {import('json-schema').JSONSchema4Object} */ @@ -233,7 +229,7 @@ const getOptions = (context, settings) => { }; /** @type {import('eslint').Rule.RuleModule} */ -var _default = { +var _default = exports.default = { create(context) { // istanbul ignore next -- Fallback to deprecated method const { @@ -260,7 +256,6 @@ var _default = { * }} */ opts.publicOnly; - /* eslint-enable jsdoc/valid-types -- Old version */ /** * @type {import('../iterateJsdoc.js').CheckJsdoc} @@ -408,7 +403,6 @@ var _default = { report(); } }; - /* eslint-enable complexity -- Temporary */ /** * @param {string} prop @@ -503,6 +497,5 @@ var _default = { type: 'suggestion' } }; -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireJsdoc.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParam.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParam.js index 6dade9f545a1c6..117951df7e6097 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParam.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParam.js @@ -32,7 +32,7 @@ const rootNamer = (desiredRoots, currentIndex) => { }; /* eslint-disable complexity -- Temporary */ -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ jsdoc, utils, context @@ -521,6 +521,5 @@ var _default = (0, _iterateJsdoc.default)(({ // JS node to ensure we iterate its context noTracking: true }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireParam.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamDescription.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamDescription.js index 9eccc603eff1f6..c75f1086bf9466 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamDescription.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamDescription.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, report, settings, @@ -80,6 +80,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireParamDescription.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamName.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamName.js index b3b0a92804baf9..2a7fc9ba53762c 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamName.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamName.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ report, utils }) => { @@ -50,6 +50,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireParamName.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamType.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamType.js index 382bf2c07b75c0..aa2b209babd601 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamType.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireParamType.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, report, settings, @@ -80,6 +80,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireParamType.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireProperty.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireProperty.js index 8dc236962c4bee..bfcb35707167ad 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireProperty.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireProperty.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ utils }) => { const propertyAssociatedTags = utils.filterTags(({ @@ -42,6 +42,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireProperty.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyDescription.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyDescription.js index 6f7f54a4489e86..28cb8a16d8f537 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyDescription.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyDescription.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ report, utils }) => { @@ -25,6 +25,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requirePropertyDescription.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyName.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyName.js index f2a355ba9cd43b..5a82ea72ed67a7 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyName.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyName.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ report, utils }) => { @@ -25,6 +25,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requirePropertyName.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyType.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyType.js index 17ed16ce10ec0e..9b74ddd0a00d01 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyType.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requirePropertyType.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ report, utils }) => { @@ -25,6 +25,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requirePropertyType.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturns.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturns.js index e20e125ebcff05..1b3d1c426fe970 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturns.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturns.js @@ -33,7 +33,7 @@ const canSkip = utils => { // This seems to imply a class as well 'interface']) || utils.avoidDocs(); }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ info: { comment }, @@ -205,6 +205,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireReturns.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsCheck.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsCheck.js index 11aa5a26083e9d..cb1e0820d678c8 100755 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsCheck.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsCheck.js @@ -30,7 +30,7 @@ const canSkip = (utils, settings) => { }; // eslint-disable-next-line complexity -- Temporary -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, node, report, @@ -105,6 +105,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireReturnsCheck.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsDescription.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsDescription.js index 7bde405687881f..7a0e369b370f74 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsDescription.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsDescription.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ report, utils }) => { @@ -54,6 +54,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireReturnsDescription.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsType.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsType.js index 19af94f85e0bf1..f5547e647df3f5 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsType.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireReturnsType.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ report, utils }) => { @@ -50,6 +50,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireReturnsType.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireThrows.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireThrows.js index 68cdb0f6bd8677..f9ed6d26ab6ac0 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireThrows.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireThrows.js @@ -23,7 +23,7 @@ const canSkip = utils => { // The designated type can itself document `@throws` 'type']) || utils.avoidDocs(); }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ report, utils }) => { @@ -97,6 +97,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireThrows.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireYields.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireYields.js index a76c3c56e87ff4..21210912490345 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireYields.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireYields.js @@ -55,7 +55,7 @@ const checkTagName = (utils, report, tagName) => { const missingTag = typeof tag === 'undefined' || tag === null; return [preferredTagName, missingTag]; }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ report, utils, context @@ -171,6 +171,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireYields.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireYieldsCheck.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireYieldsCheck.js index af28ad8ae781d3..bae90a45af630c 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireYieldsCheck.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/requireYieldsCheck.js @@ -54,7 +54,7 @@ const checkTagName = (utils, report, tagName) => { } return [preferredTagName, tags[0]]; }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, report, settings, @@ -157,6 +157,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=requireYieldsCheck.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/sortTags.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/sortTags.js index 7173352f9161bb..99696d0dca232a 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/sortTags.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/sortTags.js @@ -8,7 +8,7 @@ var _defaultTagOrder = _interopRequireDefault(require("../defaultTagOrder.js")); var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // eslint-disable-next-line complexity -- Temporary -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, utils @@ -446,6 +446,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=sortTags.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/tagLines.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/tagLines.js index 0e8da05f0700ac..e55989290f86c1 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/tagLines.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/tagLines.js @@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", { exports.default = void 0; var _iterateJsdoc = _interopRequireDefault(require("../iterateJsdoc.js")); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, utils @@ -270,6 +270,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=tagLines.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/textEscaping.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/textEscaping.js index 2e9014ecb81ef2..c780ca7a72892d 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/textEscaping.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/textEscaping.js @@ -34,7 +34,7 @@ const markdownReplacer = desc => { return `\\${bookend}${encapsed}${bookend}`; }); }; -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ context, jsdoc, utils @@ -127,6 +127,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=textEscaping.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/validTypes.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/validTypes.js index 1f6a79975f18ac..7b9d16632c579c 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/validTypes.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/rules/validTypes.js @@ -31,7 +31,7 @@ const tryParsePathIgnoreError = path => { }; // eslint-disable-next-line complexity -var _default = (0, _iterateJsdoc.default)(({ +var _default = exports.default = (0, _iterateJsdoc.default)(({ jsdoc, report, utils, @@ -56,7 +56,6 @@ var _default = (0, _iterateJsdoc.default)(({ } let handled = false; if (tagName) { - // eslint-disable-next-line default-case switch (tagName) { case 'requires': case 'module': @@ -255,6 +254,5 @@ var _default = (0, _iterateJsdoc.default)(({ type: 'suggestion' } }); -exports.default = _default; module.exports = exports.default; //# sourceMappingURL=validTypes.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/tagNames.js b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/tagNames.js index 2064fd87ae6da6..4d2750851ece88 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/tagNames.js +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/dist/tagNames.js @@ -23,7 +23,7 @@ const jsdocTagsUndocumented = { /** * @type {AliasedTags} */ -const jsdocTags = { +const jsdocTags = exports.jsdocTags = { ...jsdocTagsUndocumented, abstract: ['virtual'], access: [], @@ -100,8 +100,7 @@ const jsdocTags = { /** * @type {AliasedTags} */ -exports.jsdocTags = jsdocTags; -const typeScriptTags = { +const typeScriptTags = exports.typeScriptTags = { ...jsdocTags, // https://www.typescriptlang.org/tsconfig/#stripInternal internal: [], @@ -117,7 +116,6 @@ const typeScriptTags = { /** * @type {AliasedTags} */ -exports.typeScriptTags = typeScriptTags; const undocumentedClosureTags = { // These are in Closure source but not in jsdoc source nor in the Closure // docs: https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/parsing/Annotation.java @@ -149,7 +147,7 @@ const { /** * @type {AliasedTags} */ -const closureTags = { +const closureTags = exports.closureTags = { ...typeScriptTagsInClosure, ...undocumentedClosureTags, // From https://github.com/google/closure-compiler/wiki/Annotating-JavaScript-for-the-Closure-Compiler @@ -179,5 +177,4 @@ const closureTags = { suppress: [], unrestricted: [] }; -exports.closureTags = closureTags; //# sourceMappingURL=tagNames.js.map \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/package.json b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/package.json index b703633a830ba6..1a204922b0e3e6 100644 --- a/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/package.json +++ b/tools/node_modules/eslint/node_modules/eslint-plugin-jsdoc/package.json @@ -5,9 +5,9 @@ "url": "http://gajus.com" }, "dependencies": { - "@es-joy/jsdoccomment": "~0.40.1", + "@es-joy/jsdoccomment": "~0.41.0", "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.0", + "comment-parser": "1.4.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", @@ -17,54 +17,54 @@ }, "description": "JSDoc linting rules for ESLint.", "devDependencies": { - "@babel/cli": "^7.22.10", - "@babel/core": "^7.22.10", - "@babel/eslint-parser": "^7.22.10", - "@babel/node": "^7.22.10", + "@babel/cli": "^7.23.0", + "@babel/core": "^7.23.3", + "@babel/eslint-parser": "^7.23.3", + "@babel/node": "^7.22.19", "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-transform-flow-strip-types": "^7.22.5", - "@babel/preset-env": "^7.22.10", - "@babel/register": "^7.22.5", + "@babel/plugin-transform-flow-strip-types": "^7.23.3", + "@babel/preset-env": "^7.23.3", + "@babel/register": "^7.22.15", "@es-joy/escodegen": "^3.5.1", "@es-joy/jsdoc-eslint-parser": "^0.19.0", "@hkdobrev/run-if-changed": "^0.3.1", - "@semantic-release/commit-analyzer": "^10.0.1", - "@semantic-release/github": "^9.0.4", - "@semantic-release/npm": "^10.0.4", - "@types/chai": "^4.3.5", - "@types/debug": "^4.1.8", - "@types/eslint": "^8.44.2", - "@types/esquery": "^1.5.0", - "@types/estree": "^1.0.1", - "@types/json-schema": "^7.0.12", - "@types/lodash.defaultsdeep": "^4.6.7", - "@types/mocha": "^10.0.1", - "@types/node": "^20.5.0", - "@types/semver": "^7.5.0", - "@types/spdx-expression-parse": "^3.0.2", - "@typescript-eslint/parser": "^6.4.0", + "@semantic-release/commit-analyzer": "^11.1.0", + "@semantic-release/github": "^9.2.3", + "@semantic-release/npm": "^11.0.1", + "@types/chai": "^4.3.10", + "@types/debug": "^4.1.12", + "@types/eslint": "^8.44.7", + "@types/esquery": "^1.5.3", + "@types/estree": "^1.0.5", + "@types/json-schema": "^7.0.15", + "@types/lodash.defaultsdeep": "^4.6.9", + "@types/mocha": "^10.0.4", + "@types/node": "^20.9.0", + "@types/semver": "^7.5.5", + "@types/spdx-expression-parse": "^3.0.5", + "@typescript-eslint/parser": "^6.10.0", "babel-plugin-add-module-exports": "^1.0.4", "babel-plugin-istanbul": "^6.1.1", "camelcase": "^6.3.0", - "chai": "^4.3.7", + "chai": "^4.3.10", "cross-env": "^7.0.3", "decamelize": "^5.0.1", - "eslint": "8.47.0", - "eslint-config-canonical": "~41.1.7", + "eslint": "8.53.0", + "eslint-config-canonical": "~42.3.0", "espree": "^9.6.1", "gitdown": "^3.1.5", - "glob": "^10.3.3", + "glob": "^10.3.10", "husky": "^8.0.3", "jsdoc-type-pratt-parser": "^4.0.0", "json-schema": "^0.4.0", - "lint-staged": "^14.0.0", + "lint-staged": "^15.0.2", "lodash.defaultsdeep": "^4.6.1", "mocha": "^10.2.0", "nyc": "^15.1.0", "open-editor": "^3.0.0", - "rimraf": "^5.0.1", - "semantic-release": "^21.0.7", - "typescript": "^5.1.6" + "rimraf": "^5.0.5", + "semantic-release": "^22.0.7", + "typescript": "5.2.2" }, "engines": { "node": ">=16" @@ -140,5 +140,5 @@ "test-cov": "cross-env TIMING=1 nyc --reporter text npm run test-no-cov", "test-index": "npm run test-no-cov -- test/rules/index.js" }, - "version": "46.8.2" + "version": "46.9.0" } diff --git a/tools/node_modules/eslint/node_modules/flat-cache/package.json b/tools/node_modules/eslint/node_modules/flat-cache/package.json index 938668256e9712..b7b9eb00b934f9 100644 --- a/tools/node_modules/eslint/node_modules/flat-cache/package.json +++ b/tools/node_modules/eslint/node_modules/flat-cache/package.json @@ -1,6 +1,6 @@ { "name": "flat-cache", - "version": "3.1.1", + "version": "3.2.0", "description": "A stupidly simple key/value storage using files to persist some data", "repository": "jaredwray/flat-cache", "license": "MIT", @@ -15,7 +15,7 @@ "src/utils.js" ], "engines": { - "node": ">=12.0.0" + "node": "^10.12.0 || >=12.0.0" }, "precommit": [ "npm run verify --silent" @@ -42,14 +42,14 @@ "cache" ], "devDependencies": { - "c8": "^8.0.1", + "c8": "^7.14.0", "chai": "^4.3.10", "eslint": "^7.13.0", "eslint-config-prettier": "^6.15.0", "eslint-plugin-mocha": "^8.0.0", "eslint-plugin-prettier": "^3.1.4", "glob-expand": "^0.2.1", - "mocha": "^10.2.0", + "mocha": "^8.4.0", "prettier": "^2.1.2", "write": "^2.0.0" }, diff --git a/tools/node_modules/eslint/node_modules/ignore/package.json b/tools/node_modules/eslint/node_modules/ignore/package.json index fe5498df001145..7c62cad9f41552 100644 --- a/tools/node_modules/eslint/node_modules/ignore/package.json +++ b/tools/node_modules/eslint/node_modules/ignore/package.json @@ -1,6 +1,6 @@ { "name": "ignore", - "version": "5.2.4", + "version": "5.3.0", "description": "Ignore is a manager and filter for .gitignore rules, the one used by eslint, gitbook and many others.", "files": [ "legacy.js", @@ -51,21 +51,21 @@ "url": "https://github.com/kaelzhang/node-ignore/issues" }, "devDependencies": { - "@babel/cli": "^7.19.3", - "@babel/core": "^7.20.5", - "@babel/preset-env": "^7.20.2", + "@babel/cli": "^7.22.9", + "@babel/core": "^7.22.9", + "@babel/preset-env": "^7.22.9", "codecov": "^3.8.2", "debug": "^4.3.4", - "eslint": "^8.30.0", + "eslint": "^8.46.0", "eslint-config-ostai": "^3.0.0", - "eslint-plugin-import": "^2.26.0", - "mkdirp": "^1.0.4", + "eslint-plugin-import": "^2.28.0", + "mkdirp": "^3.0.1", "pre-suf": "^1.1.1", - "rimraf": "^3.0.2", + "rimraf": "^5.0.1", "spawn-sync": "^2.0.0", - "tap": "^16.3.2", + "tap": "^16.3.9", "tmp": "0.2.1", - "typescript": "^4.9.4" + "typescript": "^5.1.6" }, "engines": { "node": ">= 4" diff --git a/tools/node_modules/eslint/node_modules/node-releases/data/processed/envs.json b/tools/node_modules/eslint/node_modules/node-releases/data/processed/envs.json index dfd2f15fea6666..00998c00a104fd 100644 --- a/tools/node_modules/eslint/node_modules/node-releases/data/processed/envs.json +++ b/tools/node_modules/eslint/node_modules/node-releases/data/processed/envs.json @@ -1 +1 @@ -[{"name":"nodejs","version":"0.2.0","date":"2011-08-26","lts":false,"security":false,"v8":"2.3.8.0"},{"name":"nodejs","version":"0.3.0","date":"2011-08-26","lts":false,"security":false,"v8":"2.5.1.0"},{"name":"nodejs","version":"0.4.0","date":"2011-08-26","lts":false,"security":false,"v8":"3.1.2.0"},{"name":"nodejs","version":"0.5.0","date":"2011-08-26","lts":false,"security":false,"v8":"3.1.8.25"},{"name":"nodejs","version":"0.6.0","date":"2011-11-04","lts":false,"security":false,"v8":"3.6.6.6"},{"name":"nodejs","version":"0.7.0","date":"2012-01-17","lts":false,"security":false,"v8":"3.8.6.0"},{"name":"nodejs","version":"0.8.0","date":"2012-06-22","lts":false,"security":false,"v8":"3.11.10.10"},{"name":"nodejs","version":"0.9.0","date":"2012-07-20","lts":false,"security":false,"v8":"3.11.10.15"},{"name":"nodejs","version":"0.10.0","date":"2013-03-11","lts":false,"security":false,"v8":"3.14.5.8"},{"name":"nodejs","version":"0.11.0","date":"2013-03-28","lts":false,"security":false,"v8":"3.17.13.0"},{"name":"nodejs","version":"0.12.0","date":"2015-02-06","lts":false,"security":false,"v8":"3.28.73.0"},{"name":"nodejs","version":"4.0.0","date":"2015-09-08","lts":false,"security":false,"v8":"4.5.103.30"},{"name":"nodejs","version":"4.1.0","date":"2015-09-17","lts":false,"security":false,"v8":"4.5.103.33"},{"name":"nodejs","version":"4.2.0","date":"2015-10-12","lts":"Argon","security":false,"v8":"4.5.103.35"},{"name":"nodejs","version":"4.3.0","date":"2016-02-09","lts":"Argon","security":false,"v8":"4.5.103.35"},{"name":"nodejs","version":"4.4.0","date":"2016-03-08","lts":"Argon","security":false,"v8":"4.5.103.35"},{"name":"nodejs","version":"4.5.0","date":"2016-08-16","lts":"Argon","security":false,"v8":"4.5.103.37"},{"name":"nodejs","version":"4.6.0","date":"2016-09-27","lts":"Argon","security":true,"v8":"4.5.103.37"},{"name":"nodejs","version":"4.7.0","date":"2016-12-06","lts":"Argon","security":false,"v8":"4.5.103.43"},{"name":"nodejs","version":"4.8.0","date":"2017-02-21","lts":"Argon","security":false,"v8":"4.5.103.45"},{"name":"nodejs","version":"4.9.0","date":"2018-03-28","lts":"Argon","security":true,"v8":"4.5.103.53"},{"name":"nodejs","version":"5.0.0","date":"2015-10-29","lts":false,"security":false,"v8":"4.6.85.28"},{"name":"nodejs","version":"5.1.0","date":"2015-11-17","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.2.0","date":"2015-12-09","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.3.0","date":"2015-12-15","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.4.0","date":"2016-01-06","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.5.0","date":"2016-01-21","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.6.0","date":"2016-02-09","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.7.0","date":"2016-02-23","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.8.0","date":"2016-03-09","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.9.0","date":"2016-03-16","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.10.0","date":"2016-04-01","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.11.0","date":"2016-04-21","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.12.0","date":"2016-06-23","lts":false,"security":false,"v8":"4.6.85.32"},{"name":"nodejs","version":"6.0.0","date":"2016-04-26","lts":false,"security":false,"v8":"5.0.71.35"},{"name":"nodejs","version":"6.1.0","date":"2016-05-05","lts":false,"security":false,"v8":"5.0.71.35"},{"name":"nodejs","version":"6.2.0","date":"2016-05-17","lts":false,"security":false,"v8":"5.0.71.47"},{"name":"nodejs","version":"6.3.0","date":"2016-07-06","lts":false,"security":false,"v8":"5.0.71.52"},{"name":"nodejs","version":"6.4.0","date":"2016-08-12","lts":false,"security":false,"v8":"5.0.71.60"},{"name":"nodejs","version":"6.5.0","date":"2016-08-26","lts":false,"security":false,"v8":"5.1.281.81"},{"name":"nodejs","version":"6.6.0","date":"2016-09-14","lts":false,"security":false,"v8":"5.1.281.83"},{"name":"nodejs","version":"6.7.0","date":"2016-09-27","lts":false,"security":true,"v8":"5.1.281.83"},{"name":"nodejs","version":"6.8.0","date":"2016-10-12","lts":false,"security":false,"v8":"5.1.281.84"},{"name":"nodejs","version":"6.9.0","date":"2016-10-18","lts":"Boron","security":false,"v8":"5.1.281.84"},{"name":"nodejs","version":"6.10.0","date":"2017-02-21","lts":"Boron","security":false,"v8":"5.1.281.93"},{"name":"nodejs","version":"6.11.0","date":"2017-06-06","lts":"Boron","security":false,"v8":"5.1.281.102"},{"name":"nodejs","version":"6.12.0","date":"2017-11-06","lts":"Boron","security":false,"v8":"5.1.281.108"},{"name":"nodejs","version":"6.13.0","date":"2018-02-10","lts":"Boron","security":false,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.14.0","date":"2018-03-28","lts":"Boron","security":true,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.15.0","date":"2018-11-27","lts":"Boron","security":true,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.16.0","date":"2018-12-26","lts":"Boron","security":false,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.17.0","date":"2019-02-28","lts":"Boron","security":true,"v8":"5.1.281.111"},{"name":"nodejs","version":"7.0.0","date":"2016-10-25","lts":false,"security":false,"v8":"5.4.500.36"},{"name":"nodejs","version":"7.1.0","date":"2016-11-08","lts":false,"security":false,"v8":"5.4.500.36"},{"name":"nodejs","version":"7.2.0","date":"2016-11-22","lts":false,"security":false,"v8":"5.4.500.43"},{"name":"nodejs","version":"7.3.0","date":"2016-12-20","lts":false,"security":false,"v8":"5.4.500.45"},{"name":"nodejs","version":"7.4.0","date":"2017-01-04","lts":false,"security":false,"v8":"5.4.500.45"},{"name":"nodejs","version":"7.5.0","date":"2017-01-31","lts":false,"security":false,"v8":"5.4.500.48"},{"name":"nodejs","version":"7.6.0","date":"2017-02-21","lts":false,"security":false,"v8":"5.5.372.40"},{"name":"nodejs","version":"7.7.0","date":"2017-02-28","lts":false,"security":false,"v8":"5.5.372.41"},{"name":"nodejs","version":"7.8.0","date":"2017-03-29","lts":false,"security":false,"v8":"5.5.372.43"},{"name":"nodejs","version":"7.9.0","date":"2017-04-11","lts":false,"security":false,"v8":"5.5.372.43"},{"name":"nodejs","version":"7.10.0","date":"2017-05-02","lts":false,"security":false,"v8":"5.5.372.43"},{"name":"nodejs","version":"8.0.0","date":"2017-05-30","lts":false,"security":false,"v8":"5.8.283.41"},{"name":"nodejs","version":"8.1.0","date":"2017-06-08","lts":false,"security":false,"v8":"5.8.283.41"},{"name":"nodejs","version":"8.2.0","date":"2017-07-19","lts":false,"security":false,"v8":"5.8.283.41"},{"name":"nodejs","version":"8.3.0","date":"2017-08-08","lts":false,"security":false,"v8":"6.0.286.52"},{"name":"nodejs","version":"8.4.0","date":"2017-08-15","lts":false,"security":false,"v8":"6.0.286.52"},{"name":"nodejs","version":"8.5.0","date":"2017-09-12","lts":false,"security":false,"v8":"6.0.287.53"},{"name":"nodejs","version":"8.6.0","date":"2017-09-26","lts":false,"security":false,"v8":"6.0.287.53"},{"name":"nodejs","version":"8.7.0","date":"2017-10-11","lts":false,"security":false,"v8":"6.1.534.42"},{"name":"nodejs","version":"8.8.0","date":"2017-10-24","lts":false,"security":false,"v8":"6.1.534.42"},{"name":"nodejs","version":"8.9.0","date":"2017-10-31","lts":"Carbon","security":false,"v8":"6.1.534.46"},{"name":"nodejs","version":"8.10.0","date":"2018-03-06","lts":"Carbon","security":false,"v8":"6.2.414.50"},{"name":"nodejs","version":"8.11.0","date":"2018-03-28","lts":"Carbon","security":true,"v8":"6.2.414.50"},{"name":"nodejs","version":"8.12.0","date":"2018-09-10","lts":"Carbon","security":false,"v8":"6.2.414.66"},{"name":"nodejs","version":"8.13.0","date":"2018-11-20","lts":"Carbon","security":false,"v8":"6.2.414.72"},{"name":"nodejs","version":"8.14.0","date":"2018-11-27","lts":"Carbon","security":true,"v8":"6.2.414.72"},{"name":"nodejs","version":"8.15.0","date":"2018-12-26","lts":"Carbon","security":false,"v8":"6.2.414.75"},{"name":"nodejs","version":"8.16.0","date":"2019-04-16","lts":"Carbon","security":false,"v8":"6.2.414.77"},{"name":"nodejs","version":"8.17.0","date":"2019-12-17","lts":"Carbon","security":true,"v8":"6.2.414.78"},{"name":"nodejs","version":"9.0.0","date":"2017-10-31","lts":false,"security":false,"v8":"6.2.414.32"},{"name":"nodejs","version":"9.1.0","date":"2017-11-07","lts":false,"security":false,"v8":"6.2.414.32"},{"name":"nodejs","version":"9.2.0","date":"2017-11-14","lts":false,"security":false,"v8":"6.2.414.44"},{"name":"nodejs","version":"9.3.0","date":"2017-12-12","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.4.0","date":"2018-01-10","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.5.0","date":"2018-01-31","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.6.0","date":"2018-02-21","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.7.0","date":"2018-03-01","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.8.0","date":"2018-03-07","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.9.0","date":"2018-03-21","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.10.0","date":"2018-03-28","lts":false,"security":true,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.11.0","date":"2018-04-04","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"10.0.0","date":"2018-04-24","lts":false,"security":false,"v8":"6.6.346.24"},{"name":"nodejs","version":"10.1.0","date":"2018-05-08","lts":false,"security":false,"v8":"6.6.346.27"},{"name":"nodejs","version":"10.2.0","date":"2018-05-23","lts":false,"security":false,"v8":"6.6.346.32"},{"name":"nodejs","version":"10.3.0","date":"2018-05-29","lts":false,"security":false,"v8":"6.6.346.32"},{"name":"nodejs","version":"10.4.0","date":"2018-06-06","lts":false,"security":false,"v8":"6.7.288.43"},{"name":"nodejs","version":"10.5.0","date":"2018-06-20","lts":false,"security":false,"v8":"6.7.288.46"},{"name":"nodejs","version":"10.6.0","date":"2018-07-04","lts":false,"security":false,"v8":"6.7.288.46"},{"name":"nodejs","version":"10.7.0","date":"2018-07-18","lts":false,"security":false,"v8":"6.7.288.49"},{"name":"nodejs","version":"10.8.0","date":"2018-08-01","lts":false,"security":false,"v8":"6.7.288.49"},{"name":"nodejs","version":"10.9.0","date":"2018-08-15","lts":false,"security":false,"v8":"6.8.275.24"},{"name":"nodejs","version":"10.10.0","date":"2018-09-06","lts":false,"security":false,"v8":"6.8.275.30"},{"name":"nodejs","version":"10.11.0","date":"2018-09-19","lts":false,"security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.12.0","date":"2018-10-10","lts":false,"security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.13.0","date":"2018-10-30","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.14.0","date":"2018-11-27","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.15.0","date":"2018-12-26","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.16.0","date":"2019-05-28","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.17.0","date":"2019-10-22","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.18.0","date":"2019-12-17","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.19.0","date":"2020-02-05","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.20.0","date":"2020-03-26","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.21.0","date":"2020-06-02","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.22.0","date":"2020-07-21","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.23.0","date":"2020-10-27","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.24.0","date":"2021-02-23","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"11.0.0","date":"2018-10-23","lts":false,"security":false,"v8":"7.0.276.28"},{"name":"nodejs","version":"11.1.0","date":"2018-10-30","lts":false,"security":false,"v8":"7.0.276.32"},{"name":"nodejs","version":"11.2.0","date":"2018-11-15","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.3.0","date":"2018-11-27","lts":false,"security":true,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.4.0","date":"2018-12-07","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.5.0","date":"2018-12-18","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.6.0","date":"2018-12-26","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.7.0","date":"2019-01-17","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.8.0","date":"2019-01-24","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.9.0","date":"2019-01-30","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.10.0","date":"2019-02-14","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.11.0","date":"2019-03-05","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.12.0","date":"2019-03-14","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.13.0","date":"2019-03-28","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.14.0","date":"2019-04-10","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.15.0","date":"2019-04-30","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"12.0.0","date":"2019-04-23","lts":false,"security":false,"v8":"7.4.288.21"},{"name":"nodejs","version":"12.1.0","date":"2019-04-29","lts":false,"security":false,"v8":"7.4.288.21"},{"name":"nodejs","version":"12.2.0","date":"2019-05-07","lts":false,"security":false,"v8":"7.4.288.21"},{"name":"nodejs","version":"12.3.0","date":"2019-05-21","lts":false,"security":false,"v8":"7.4.288.27"},{"name":"nodejs","version":"12.4.0","date":"2019-06-04","lts":false,"security":false,"v8":"7.4.288.27"},{"name":"nodejs","version":"12.5.0","date":"2019-06-26","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.6.0","date":"2019-07-03","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.7.0","date":"2019-07-23","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.8.0","date":"2019-08-06","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.9.0","date":"2019-08-20","lts":false,"security":false,"v8":"7.6.303.29"},{"name":"nodejs","version":"12.10.0","date":"2019-09-04","lts":false,"security":false,"v8":"7.6.303.29"},{"name":"nodejs","version":"12.11.0","date":"2019-09-25","lts":false,"security":false,"v8":"7.7.299.11"},{"name":"nodejs","version":"12.12.0","date":"2019-10-11","lts":false,"security":false,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.13.0","date":"2019-10-21","lts":"Erbium","security":false,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.14.0","date":"2019-12-17","lts":"Erbium","security":true,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.15.0","date":"2020-02-05","lts":"Erbium","security":true,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.16.0","date":"2020-02-11","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.17.0","date":"2020-05-26","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.18.0","date":"2020-06-02","lts":"Erbium","security":true,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.19.0","date":"2020-10-06","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.20.0","date":"2020-11-24","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.21.0","date":"2021-02-23","lts":"Erbium","security":true,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.22.0","date":"2021-03-30","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"13.0.0","date":"2019-10-22","lts":false,"security":false,"v8":"7.8.279.17"},{"name":"nodejs","version":"13.1.0","date":"2019-11-05","lts":false,"security":false,"v8":"7.8.279.17"},{"name":"nodejs","version":"13.2.0","date":"2019-11-21","lts":false,"security":false,"v8":"7.9.317.23"},{"name":"nodejs","version":"13.3.0","date":"2019-12-03","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.4.0","date":"2019-12-17","lts":false,"security":true,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.5.0","date":"2019-12-18","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.6.0","date":"2020-01-07","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.7.0","date":"2020-01-21","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.8.0","date":"2020-02-05","lts":false,"security":true,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.9.0","date":"2020-02-18","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.10.0","date":"2020-03-04","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.11.0","date":"2020-03-12","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.12.0","date":"2020-03-26","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.13.0","date":"2020-04-14","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.14.0","date":"2020-04-29","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"14.0.0","date":"2020-04-21","lts":false,"security":false,"v8":"8.1.307.30"},{"name":"nodejs","version":"14.1.0","date":"2020-04-29","lts":false,"security":false,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.2.0","date":"2020-05-05","lts":false,"security":false,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.3.0","date":"2020-05-19","lts":false,"security":false,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.4.0","date":"2020-06-02","lts":false,"security":true,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.5.0","date":"2020-06-30","lts":false,"security":false,"v8":"8.3.110.9"},{"name":"nodejs","version":"14.6.0","date":"2020-07-20","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.7.0","date":"2020-07-29","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.8.0","date":"2020-08-11","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.9.0","date":"2020-08-27","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.10.0","date":"2020-09-08","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.11.0","date":"2020-09-15","lts":false,"security":true,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.12.0","date":"2020-09-22","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.13.0","date":"2020-09-29","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.14.0","date":"2020-10-15","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.15.0","date":"2020-10-27","lts":"Fermium","security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.16.0","date":"2021-02-23","lts":"Fermium","security":true,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.17.0","date":"2021-05-11","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.18.0","date":"2021-09-28","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.19.0","date":"2022-02-01","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.20.0","date":"2022-07-07","lts":"Fermium","security":true,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.21.0","date":"2022-11-01","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"15.0.0","date":"2020-10-20","lts":false,"security":false,"v8":"8.6.395.16"},{"name":"nodejs","version":"15.1.0","date":"2020-11-04","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.2.0","date":"2020-11-10","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.3.0","date":"2020-11-24","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.4.0","date":"2020-12-09","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.5.0","date":"2020-12-22","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.6.0","date":"2021-01-14","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.7.0","date":"2021-01-25","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.8.0","date":"2021-02-02","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.9.0","date":"2021-02-18","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.10.0","date":"2021-02-23","lts":false,"security":true,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.11.0","date":"2021-03-03","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.12.0","date":"2021-03-17","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.13.0","date":"2021-03-31","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.14.0","date":"2021-04-06","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"16.0.0","date":"2021-04-20","lts":false,"security":false,"v8":"9.0.257.17"},{"name":"nodejs","version":"16.1.0","date":"2021-05-04","lts":false,"security":false,"v8":"9.0.257.24"},{"name":"nodejs","version":"16.2.0","date":"2021-05-19","lts":false,"security":false,"v8":"9.0.257.25"},{"name":"nodejs","version":"16.3.0","date":"2021-06-03","lts":false,"security":false,"v8":"9.0.257.25"},{"name":"nodejs","version":"16.4.0","date":"2021-06-23","lts":false,"security":false,"v8":"9.1.269.36"},{"name":"nodejs","version":"16.5.0","date":"2021-07-14","lts":false,"security":false,"v8":"9.1.269.38"},{"name":"nodejs","version":"16.6.0","date":"2021-07-29","lts":false,"security":true,"v8":"9.2.230.21"},{"name":"nodejs","version":"16.7.0","date":"2021-08-18","lts":false,"security":false,"v8":"9.2.230.21"},{"name":"nodejs","version":"16.8.0","date":"2021-08-25","lts":false,"security":false,"v8":"9.2.230.21"},{"name":"nodejs","version":"16.9.0","date":"2021-09-07","lts":false,"security":false,"v8":"9.3.345.16"},{"name":"nodejs","version":"16.10.0","date":"2021-09-22","lts":false,"security":false,"v8":"9.3.345.19"},{"name":"nodejs","version":"16.11.0","date":"2021-10-08","lts":false,"security":false,"v8":"9.4.146.19"},{"name":"nodejs","version":"16.12.0","date":"2021-10-20","lts":false,"security":false,"v8":"9.4.146.19"},{"name":"nodejs","version":"16.13.0","date":"2021-10-26","lts":"Gallium","security":false,"v8":"9.4.146.19"},{"name":"nodejs","version":"16.14.0","date":"2022-02-08","lts":"Gallium","security":false,"v8":"9.4.146.24"},{"name":"nodejs","version":"16.15.0","date":"2022-04-26","lts":"Gallium","security":false,"v8":"9.4.146.24"},{"name":"nodejs","version":"16.16.0","date":"2022-07-07","lts":"Gallium","security":true,"v8":"9.4.146.24"},{"name":"nodejs","version":"16.17.0","date":"2022-08-16","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"16.18.0","date":"2022-10-12","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"16.19.0","date":"2022-12-13","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"16.20.0","date":"2023-03-28","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"17.0.0","date":"2021-10-19","lts":false,"security":false,"v8":"9.5.172.21"},{"name":"nodejs","version":"17.1.0","date":"2021-11-09","lts":false,"security":false,"v8":"9.5.172.25"},{"name":"nodejs","version":"17.2.0","date":"2021-11-30","lts":false,"security":false,"v8":"9.6.180.14"},{"name":"nodejs","version":"17.3.0","date":"2021-12-17","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.4.0","date":"2022-01-18","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.5.0","date":"2022-02-10","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.6.0","date":"2022-02-22","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.7.0","date":"2022-03-09","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.8.0","date":"2022-03-22","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.9.0","date":"2022-04-07","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"18.0.0","date":"2022-04-18","lts":false,"security":false,"v8":"10.1.124.8"},{"name":"nodejs","version":"18.1.0","date":"2022-05-03","lts":false,"security":false,"v8":"10.1.124.8"},{"name":"nodejs","version":"18.2.0","date":"2022-05-17","lts":false,"security":false,"v8":"10.1.124.8"},{"name":"nodejs","version":"18.3.0","date":"2022-06-02","lts":false,"security":false,"v8":"10.2.154.4"},{"name":"nodejs","version":"18.4.0","date":"2022-06-16","lts":false,"security":false,"v8":"10.2.154.4"},{"name":"nodejs","version":"18.5.0","date":"2022-07-06","lts":false,"security":true,"v8":"10.2.154.4"},{"name":"nodejs","version":"18.6.0","date":"2022-07-13","lts":false,"security":false,"v8":"10.2.154.13"},{"name":"nodejs","version":"18.7.0","date":"2022-07-26","lts":false,"security":false,"v8":"10.2.154.13"},{"name":"nodejs","version":"18.8.0","date":"2022-08-24","lts":false,"security":false,"v8":"10.2.154.13"},{"name":"nodejs","version":"18.9.0","date":"2022-09-07","lts":false,"security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.10.0","date":"2022-09-28","lts":false,"security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.11.0","date":"2022-10-13","lts":false,"security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.12.0","date":"2022-10-25","lts":"Hydrogen","security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.13.0","date":"2023-01-05","lts":"Hydrogen","security":false,"v8":"10.2.154.23"},{"name":"nodejs","version":"18.14.0","date":"2023-02-01","lts":"Hydrogen","security":false,"v8":"10.2.154.23"},{"name":"nodejs","version":"18.15.0","date":"2023-03-05","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"18.16.0","date":"2023-04-12","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"19.0.0","date":"2022-10-17","lts":false,"security":false,"v8":"10.7.193.13"},{"name":"nodejs","version":"19.1.0","date":"2022-11-14","lts":false,"security":false,"v8":"10.7.193.20"},{"name":"nodejs","version":"19.2.0","date":"2022-11-29","lts":false,"security":false,"v8":"10.8.168.20"},{"name":"nodejs","version":"19.3.0","date":"2022-12-14","lts":false,"security":false,"v8":"10.8.168.21"},{"name":"nodejs","version":"19.4.0","date":"2023-01-05","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.5.0","date":"2023-01-24","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.6.0","date":"2023-02-01","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.7.0","date":"2023-02-21","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.8.0","date":"2023-03-14","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.9.0","date":"2023-04-10","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"20.0.0","date":"2023-04-17","lts":false,"security":false,"v8":"11.3.244.4"},{"name":"nodejs","version":"20.1.0","date":"2023-05-03","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.2.0","date":"2023-05-16","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.3.0","date":"2023-06-08","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.4.0","date":"2023-07-04","lts":false,"security":false,"v8":"11.3.244.8"}] \ No newline at end of file +[{"name":"nodejs","version":"0.2.0","date":"2011-08-26","lts":false,"security":false,"v8":"2.3.8.0"},{"name":"nodejs","version":"0.3.0","date":"2011-08-26","lts":false,"security":false,"v8":"2.5.1.0"},{"name":"nodejs","version":"0.4.0","date":"2011-08-26","lts":false,"security":false,"v8":"3.1.2.0"},{"name":"nodejs","version":"0.5.0","date":"2011-08-26","lts":false,"security":false,"v8":"3.1.8.25"},{"name":"nodejs","version":"0.6.0","date":"2011-11-04","lts":false,"security":false,"v8":"3.6.6.6"},{"name":"nodejs","version":"0.7.0","date":"2012-01-17","lts":false,"security":false,"v8":"3.8.6.0"},{"name":"nodejs","version":"0.8.0","date":"2012-06-22","lts":false,"security":false,"v8":"3.11.10.10"},{"name":"nodejs","version":"0.9.0","date":"2012-07-20","lts":false,"security":false,"v8":"3.11.10.15"},{"name":"nodejs","version":"0.10.0","date":"2013-03-11","lts":false,"security":false,"v8":"3.14.5.8"},{"name":"nodejs","version":"0.11.0","date":"2013-03-28","lts":false,"security":false,"v8":"3.17.13.0"},{"name":"nodejs","version":"0.12.0","date":"2015-02-06","lts":false,"security":false,"v8":"3.28.73.0"},{"name":"nodejs","version":"4.0.0","date":"2015-09-08","lts":false,"security":false,"v8":"4.5.103.30"},{"name":"nodejs","version":"4.1.0","date":"2015-09-17","lts":false,"security":false,"v8":"4.5.103.33"},{"name":"nodejs","version":"4.2.0","date":"2015-10-12","lts":"Argon","security":false,"v8":"4.5.103.35"},{"name":"nodejs","version":"4.3.0","date":"2016-02-09","lts":"Argon","security":false,"v8":"4.5.103.35"},{"name":"nodejs","version":"4.4.0","date":"2016-03-08","lts":"Argon","security":false,"v8":"4.5.103.35"},{"name":"nodejs","version":"4.5.0","date":"2016-08-16","lts":"Argon","security":false,"v8":"4.5.103.37"},{"name":"nodejs","version":"4.6.0","date":"2016-09-27","lts":"Argon","security":true,"v8":"4.5.103.37"},{"name":"nodejs","version":"4.7.0","date":"2016-12-06","lts":"Argon","security":false,"v8":"4.5.103.43"},{"name":"nodejs","version":"4.8.0","date":"2017-02-21","lts":"Argon","security":false,"v8":"4.5.103.45"},{"name":"nodejs","version":"4.9.0","date":"2018-03-28","lts":"Argon","security":true,"v8":"4.5.103.53"},{"name":"nodejs","version":"5.0.0","date":"2015-10-29","lts":false,"security":false,"v8":"4.6.85.28"},{"name":"nodejs","version":"5.1.0","date":"2015-11-17","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.2.0","date":"2015-12-09","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.3.0","date":"2015-12-15","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.4.0","date":"2016-01-06","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.5.0","date":"2016-01-21","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.6.0","date":"2016-02-09","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.7.0","date":"2016-02-23","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.8.0","date":"2016-03-09","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.9.0","date":"2016-03-16","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.10.0","date":"2016-04-01","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.11.0","date":"2016-04-21","lts":false,"security":false,"v8":"4.6.85.31"},{"name":"nodejs","version":"5.12.0","date":"2016-06-23","lts":false,"security":false,"v8":"4.6.85.32"},{"name":"nodejs","version":"6.0.0","date":"2016-04-26","lts":false,"security":false,"v8":"5.0.71.35"},{"name":"nodejs","version":"6.1.0","date":"2016-05-05","lts":false,"security":false,"v8":"5.0.71.35"},{"name":"nodejs","version":"6.2.0","date":"2016-05-17","lts":false,"security":false,"v8":"5.0.71.47"},{"name":"nodejs","version":"6.3.0","date":"2016-07-06","lts":false,"security":false,"v8":"5.0.71.52"},{"name":"nodejs","version":"6.4.0","date":"2016-08-12","lts":false,"security":false,"v8":"5.0.71.60"},{"name":"nodejs","version":"6.5.0","date":"2016-08-26","lts":false,"security":false,"v8":"5.1.281.81"},{"name":"nodejs","version":"6.6.0","date":"2016-09-14","lts":false,"security":false,"v8":"5.1.281.83"},{"name":"nodejs","version":"6.7.0","date":"2016-09-27","lts":false,"security":true,"v8":"5.1.281.83"},{"name":"nodejs","version":"6.8.0","date":"2016-10-12","lts":false,"security":false,"v8":"5.1.281.84"},{"name":"nodejs","version":"6.9.0","date":"2016-10-18","lts":"Boron","security":false,"v8":"5.1.281.84"},{"name":"nodejs","version":"6.10.0","date":"2017-02-21","lts":"Boron","security":false,"v8":"5.1.281.93"},{"name":"nodejs","version":"6.11.0","date":"2017-06-06","lts":"Boron","security":false,"v8":"5.1.281.102"},{"name":"nodejs","version":"6.12.0","date":"2017-11-06","lts":"Boron","security":false,"v8":"5.1.281.108"},{"name":"nodejs","version":"6.13.0","date":"2018-02-10","lts":"Boron","security":false,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.14.0","date":"2018-03-28","lts":"Boron","security":true,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.15.0","date":"2018-11-27","lts":"Boron","security":true,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.16.0","date":"2018-12-26","lts":"Boron","security":false,"v8":"5.1.281.111"},{"name":"nodejs","version":"6.17.0","date":"2019-02-28","lts":"Boron","security":true,"v8":"5.1.281.111"},{"name":"nodejs","version":"7.0.0","date":"2016-10-25","lts":false,"security":false,"v8":"5.4.500.36"},{"name":"nodejs","version":"7.1.0","date":"2016-11-08","lts":false,"security":false,"v8":"5.4.500.36"},{"name":"nodejs","version":"7.2.0","date":"2016-11-22","lts":false,"security":false,"v8":"5.4.500.43"},{"name":"nodejs","version":"7.3.0","date":"2016-12-20","lts":false,"security":false,"v8":"5.4.500.45"},{"name":"nodejs","version":"7.4.0","date":"2017-01-04","lts":false,"security":false,"v8":"5.4.500.45"},{"name":"nodejs","version":"7.5.0","date":"2017-01-31","lts":false,"security":false,"v8":"5.4.500.48"},{"name":"nodejs","version":"7.6.0","date":"2017-02-21","lts":false,"security":false,"v8":"5.5.372.40"},{"name":"nodejs","version":"7.7.0","date":"2017-02-28","lts":false,"security":false,"v8":"5.5.372.41"},{"name":"nodejs","version":"7.8.0","date":"2017-03-29","lts":false,"security":false,"v8":"5.5.372.43"},{"name":"nodejs","version":"7.9.0","date":"2017-04-11","lts":false,"security":false,"v8":"5.5.372.43"},{"name":"nodejs","version":"7.10.0","date":"2017-05-02","lts":false,"security":false,"v8":"5.5.372.43"},{"name":"nodejs","version":"8.0.0","date":"2017-05-30","lts":false,"security":false,"v8":"5.8.283.41"},{"name":"nodejs","version":"8.1.0","date":"2017-06-08","lts":false,"security":false,"v8":"5.8.283.41"},{"name":"nodejs","version":"8.2.0","date":"2017-07-19","lts":false,"security":false,"v8":"5.8.283.41"},{"name":"nodejs","version":"8.3.0","date":"2017-08-08","lts":false,"security":false,"v8":"6.0.286.52"},{"name":"nodejs","version":"8.4.0","date":"2017-08-15","lts":false,"security":false,"v8":"6.0.286.52"},{"name":"nodejs","version":"8.5.0","date":"2017-09-12","lts":false,"security":false,"v8":"6.0.287.53"},{"name":"nodejs","version":"8.6.0","date":"2017-09-26","lts":false,"security":false,"v8":"6.0.287.53"},{"name":"nodejs","version":"8.7.0","date":"2017-10-11","lts":false,"security":false,"v8":"6.1.534.42"},{"name":"nodejs","version":"8.8.0","date":"2017-10-24","lts":false,"security":false,"v8":"6.1.534.42"},{"name":"nodejs","version":"8.9.0","date":"2017-10-31","lts":"Carbon","security":false,"v8":"6.1.534.46"},{"name":"nodejs","version":"8.10.0","date":"2018-03-06","lts":"Carbon","security":false,"v8":"6.2.414.50"},{"name":"nodejs","version":"8.11.0","date":"2018-03-28","lts":"Carbon","security":true,"v8":"6.2.414.50"},{"name":"nodejs","version":"8.12.0","date":"2018-09-10","lts":"Carbon","security":false,"v8":"6.2.414.66"},{"name":"nodejs","version":"8.13.0","date":"2018-11-20","lts":"Carbon","security":false,"v8":"6.2.414.72"},{"name":"nodejs","version":"8.14.0","date":"2018-11-27","lts":"Carbon","security":true,"v8":"6.2.414.72"},{"name":"nodejs","version":"8.15.0","date":"2018-12-26","lts":"Carbon","security":false,"v8":"6.2.414.75"},{"name":"nodejs","version":"8.16.0","date":"2019-04-16","lts":"Carbon","security":false,"v8":"6.2.414.77"},{"name":"nodejs","version":"8.17.0","date":"2019-12-17","lts":"Carbon","security":true,"v8":"6.2.414.78"},{"name":"nodejs","version":"9.0.0","date":"2017-10-31","lts":false,"security":false,"v8":"6.2.414.32"},{"name":"nodejs","version":"9.1.0","date":"2017-11-07","lts":false,"security":false,"v8":"6.2.414.32"},{"name":"nodejs","version":"9.2.0","date":"2017-11-14","lts":false,"security":false,"v8":"6.2.414.44"},{"name":"nodejs","version":"9.3.0","date":"2017-12-12","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.4.0","date":"2018-01-10","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.5.0","date":"2018-01-31","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.6.0","date":"2018-02-21","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.7.0","date":"2018-03-01","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.8.0","date":"2018-03-07","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.9.0","date":"2018-03-21","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.10.0","date":"2018-03-28","lts":false,"security":true,"v8":"6.2.414.46"},{"name":"nodejs","version":"9.11.0","date":"2018-04-04","lts":false,"security":false,"v8":"6.2.414.46"},{"name":"nodejs","version":"10.0.0","date":"2018-04-24","lts":false,"security":false,"v8":"6.6.346.24"},{"name":"nodejs","version":"10.1.0","date":"2018-05-08","lts":false,"security":false,"v8":"6.6.346.27"},{"name":"nodejs","version":"10.2.0","date":"2018-05-23","lts":false,"security":false,"v8":"6.6.346.32"},{"name":"nodejs","version":"10.3.0","date":"2018-05-29","lts":false,"security":false,"v8":"6.6.346.32"},{"name":"nodejs","version":"10.4.0","date":"2018-06-06","lts":false,"security":false,"v8":"6.7.288.43"},{"name":"nodejs","version":"10.5.0","date":"2018-06-20","lts":false,"security":false,"v8":"6.7.288.46"},{"name":"nodejs","version":"10.6.0","date":"2018-07-04","lts":false,"security":false,"v8":"6.7.288.46"},{"name":"nodejs","version":"10.7.0","date":"2018-07-18","lts":false,"security":false,"v8":"6.7.288.49"},{"name":"nodejs","version":"10.8.0","date":"2018-08-01","lts":false,"security":false,"v8":"6.7.288.49"},{"name":"nodejs","version":"10.9.0","date":"2018-08-15","lts":false,"security":false,"v8":"6.8.275.24"},{"name":"nodejs","version":"10.10.0","date":"2018-09-06","lts":false,"security":false,"v8":"6.8.275.30"},{"name":"nodejs","version":"10.11.0","date":"2018-09-19","lts":false,"security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.12.0","date":"2018-10-10","lts":false,"security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.13.0","date":"2018-10-30","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.14.0","date":"2018-11-27","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.15.0","date":"2018-12-26","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.16.0","date":"2019-05-28","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.17.0","date":"2019-10-22","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.18.0","date":"2019-12-17","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.19.0","date":"2020-02-05","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.20.0","date":"2020-03-26","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.21.0","date":"2020-06-02","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.22.0","date":"2020-07-21","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.23.0","date":"2020-10-27","lts":"Dubnium","security":false,"v8":"6.8.275.32"},{"name":"nodejs","version":"10.24.0","date":"2021-02-23","lts":"Dubnium","security":true,"v8":"6.8.275.32"},{"name":"nodejs","version":"11.0.0","date":"2018-10-23","lts":false,"security":false,"v8":"7.0.276.28"},{"name":"nodejs","version":"11.1.0","date":"2018-10-30","lts":false,"security":false,"v8":"7.0.276.32"},{"name":"nodejs","version":"11.2.0","date":"2018-11-15","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.3.0","date":"2018-11-27","lts":false,"security":true,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.4.0","date":"2018-12-07","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.5.0","date":"2018-12-18","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.6.0","date":"2018-12-26","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.7.0","date":"2019-01-17","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.8.0","date":"2019-01-24","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.9.0","date":"2019-01-30","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.10.0","date":"2019-02-14","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.11.0","date":"2019-03-05","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.12.0","date":"2019-03-14","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.13.0","date":"2019-03-28","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.14.0","date":"2019-04-10","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"11.15.0","date":"2019-04-30","lts":false,"security":false,"v8":"7.0.276.38"},{"name":"nodejs","version":"12.0.0","date":"2019-04-23","lts":false,"security":false,"v8":"7.4.288.21"},{"name":"nodejs","version":"12.1.0","date":"2019-04-29","lts":false,"security":false,"v8":"7.4.288.21"},{"name":"nodejs","version":"12.2.0","date":"2019-05-07","lts":false,"security":false,"v8":"7.4.288.21"},{"name":"nodejs","version":"12.3.0","date":"2019-05-21","lts":false,"security":false,"v8":"7.4.288.27"},{"name":"nodejs","version":"12.4.0","date":"2019-06-04","lts":false,"security":false,"v8":"7.4.288.27"},{"name":"nodejs","version":"12.5.0","date":"2019-06-26","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.6.0","date":"2019-07-03","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.7.0","date":"2019-07-23","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.8.0","date":"2019-08-06","lts":false,"security":false,"v8":"7.5.288.22"},{"name":"nodejs","version":"12.9.0","date":"2019-08-20","lts":false,"security":false,"v8":"7.6.303.29"},{"name":"nodejs","version":"12.10.0","date":"2019-09-04","lts":false,"security":false,"v8":"7.6.303.29"},{"name":"nodejs","version":"12.11.0","date":"2019-09-25","lts":false,"security":false,"v8":"7.7.299.11"},{"name":"nodejs","version":"12.12.0","date":"2019-10-11","lts":false,"security":false,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.13.0","date":"2019-10-21","lts":"Erbium","security":false,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.14.0","date":"2019-12-17","lts":"Erbium","security":true,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.15.0","date":"2020-02-05","lts":"Erbium","security":true,"v8":"7.7.299.13"},{"name":"nodejs","version":"12.16.0","date":"2020-02-11","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.17.0","date":"2020-05-26","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.18.0","date":"2020-06-02","lts":"Erbium","security":true,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.19.0","date":"2020-10-06","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.20.0","date":"2020-11-24","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.21.0","date":"2021-02-23","lts":"Erbium","security":true,"v8":"7.8.279.23"},{"name":"nodejs","version":"12.22.0","date":"2021-03-30","lts":"Erbium","security":false,"v8":"7.8.279.23"},{"name":"nodejs","version":"13.0.0","date":"2019-10-22","lts":false,"security":false,"v8":"7.8.279.17"},{"name":"nodejs","version":"13.1.0","date":"2019-11-05","lts":false,"security":false,"v8":"7.8.279.17"},{"name":"nodejs","version":"13.2.0","date":"2019-11-21","lts":false,"security":false,"v8":"7.9.317.23"},{"name":"nodejs","version":"13.3.0","date":"2019-12-03","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.4.0","date":"2019-12-17","lts":false,"security":true,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.5.0","date":"2019-12-18","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.6.0","date":"2020-01-07","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.7.0","date":"2020-01-21","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.8.0","date":"2020-02-05","lts":false,"security":true,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.9.0","date":"2020-02-18","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.10.0","date":"2020-03-04","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.11.0","date":"2020-03-12","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.12.0","date":"2020-03-26","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.13.0","date":"2020-04-14","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"13.14.0","date":"2020-04-29","lts":false,"security":false,"v8":"7.9.317.25"},{"name":"nodejs","version":"14.0.0","date":"2020-04-21","lts":false,"security":false,"v8":"8.1.307.30"},{"name":"nodejs","version":"14.1.0","date":"2020-04-29","lts":false,"security":false,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.2.0","date":"2020-05-05","lts":false,"security":false,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.3.0","date":"2020-05-19","lts":false,"security":false,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.4.0","date":"2020-06-02","lts":false,"security":true,"v8":"8.1.307.31"},{"name":"nodejs","version":"14.5.0","date":"2020-06-30","lts":false,"security":false,"v8":"8.3.110.9"},{"name":"nodejs","version":"14.6.0","date":"2020-07-20","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.7.0","date":"2020-07-29","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.8.0","date":"2020-08-11","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.9.0","date":"2020-08-27","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.10.0","date":"2020-09-08","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.11.0","date":"2020-09-15","lts":false,"security":true,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.12.0","date":"2020-09-22","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.13.0","date":"2020-09-29","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.14.0","date":"2020-10-15","lts":false,"security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.15.0","date":"2020-10-27","lts":"Fermium","security":false,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.16.0","date":"2021-02-23","lts":"Fermium","security":true,"v8":"8.4.371.19"},{"name":"nodejs","version":"14.17.0","date":"2021-05-11","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.18.0","date":"2021-09-28","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.19.0","date":"2022-02-01","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.20.0","date":"2022-07-07","lts":"Fermium","security":true,"v8":"8.4.371.23"},{"name":"nodejs","version":"14.21.0","date":"2022-11-01","lts":"Fermium","security":false,"v8":"8.4.371.23"},{"name":"nodejs","version":"15.0.0","date":"2020-10-20","lts":false,"security":false,"v8":"8.6.395.16"},{"name":"nodejs","version":"15.1.0","date":"2020-11-04","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.2.0","date":"2020-11-10","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.3.0","date":"2020-11-24","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.4.0","date":"2020-12-09","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.5.0","date":"2020-12-22","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.6.0","date":"2021-01-14","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.7.0","date":"2021-01-25","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.8.0","date":"2021-02-02","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.9.0","date":"2021-02-18","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.10.0","date":"2021-02-23","lts":false,"security":true,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.11.0","date":"2021-03-03","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.12.0","date":"2021-03-17","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.13.0","date":"2021-03-31","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"15.14.0","date":"2021-04-06","lts":false,"security":false,"v8":"8.6.395.17"},{"name":"nodejs","version":"16.0.0","date":"2021-04-20","lts":false,"security":false,"v8":"9.0.257.17"},{"name":"nodejs","version":"16.1.0","date":"2021-05-04","lts":false,"security":false,"v8":"9.0.257.24"},{"name":"nodejs","version":"16.2.0","date":"2021-05-19","lts":false,"security":false,"v8":"9.0.257.25"},{"name":"nodejs","version":"16.3.0","date":"2021-06-03","lts":false,"security":false,"v8":"9.0.257.25"},{"name":"nodejs","version":"16.4.0","date":"2021-06-23","lts":false,"security":false,"v8":"9.1.269.36"},{"name":"nodejs","version":"16.5.0","date":"2021-07-14","lts":false,"security":false,"v8":"9.1.269.38"},{"name":"nodejs","version":"16.6.0","date":"2021-07-29","lts":false,"security":true,"v8":"9.2.230.21"},{"name":"nodejs","version":"16.7.0","date":"2021-08-18","lts":false,"security":false,"v8":"9.2.230.21"},{"name":"nodejs","version":"16.8.0","date":"2021-08-25","lts":false,"security":false,"v8":"9.2.230.21"},{"name":"nodejs","version":"16.9.0","date":"2021-09-07","lts":false,"security":false,"v8":"9.3.345.16"},{"name":"nodejs","version":"16.10.0","date":"2021-09-22","lts":false,"security":false,"v8":"9.3.345.19"},{"name":"nodejs","version":"16.11.0","date":"2021-10-08","lts":false,"security":false,"v8":"9.4.146.19"},{"name":"nodejs","version":"16.12.0","date":"2021-10-20","lts":false,"security":false,"v8":"9.4.146.19"},{"name":"nodejs","version":"16.13.0","date":"2021-10-26","lts":"Gallium","security":false,"v8":"9.4.146.19"},{"name":"nodejs","version":"16.14.0","date":"2022-02-08","lts":"Gallium","security":false,"v8":"9.4.146.24"},{"name":"nodejs","version":"16.15.0","date":"2022-04-26","lts":"Gallium","security":false,"v8":"9.4.146.24"},{"name":"nodejs","version":"16.16.0","date":"2022-07-07","lts":"Gallium","security":true,"v8":"9.4.146.24"},{"name":"nodejs","version":"16.17.0","date":"2022-08-16","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"16.18.0","date":"2022-10-12","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"16.19.0","date":"2022-12-13","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"16.20.0","date":"2023-03-28","lts":"Gallium","security":false,"v8":"9.4.146.26"},{"name":"nodejs","version":"17.0.0","date":"2021-10-19","lts":false,"security":false,"v8":"9.5.172.21"},{"name":"nodejs","version":"17.1.0","date":"2021-11-09","lts":false,"security":false,"v8":"9.5.172.25"},{"name":"nodejs","version":"17.2.0","date":"2021-11-30","lts":false,"security":false,"v8":"9.6.180.14"},{"name":"nodejs","version":"17.3.0","date":"2021-12-17","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.4.0","date":"2022-01-18","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.5.0","date":"2022-02-10","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.6.0","date":"2022-02-22","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.7.0","date":"2022-03-09","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.8.0","date":"2022-03-22","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"17.9.0","date":"2022-04-07","lts":false,"security":false,"v8":"9.6.180.15"},{"name":"nodejs","version":"18.0.0","date":"2022-04-18","lts":false,"security":false,"v8":"10.1.124.8"},{"name":"nodejs","version":"18.1.0","date":"2022-05-03","lts":false,"security":false,"v8":"10.1.124.8"},{"name":"nodejs","version":"18.2.0","date":"2022-05-17","lts":false,"security":false,"v8":"10.1.124.8"},{"name":"nodejs","version":"18.3.0","date":"2022-06-02","lts":false,"security":false,"v8":"10.2.154.4"},{"name":"nodejs","version":"18.4.0","date":"2022-06-16","lts":false,"security":false,"v8":"10.2.154.4"},{"name":"nodejs","version":"18.5.0","date":"2022-07-06","lts":false,"security":true,"v8":"10.2.154.4"},{"name":"nodejs","version":"18.6.0","date":"2022-07-13","lts":false,"security":false,"v8":"10.2.154.13"},{"name":"nodejs","version":"18.7.0","date":"2022-07-26","lts":false,"security":false,"v8":"10.2.154.13"},{"name":"nodejs","version":"18.8.0","date":"2022-08-24","lts":false,"security":false,"v8":"10.2.154.13"},{"name":"nodejs","version":"18.9.0","date":"2022-09-07","lts":false,"security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.10.0","date":"2022-09-28","lts":false,"security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.11.0","date":"2022-10-13","lts":false,"security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.12.0","date":"2022-10-25","lts":"Hydrogen","security":false,"v8":"10.2.154.15"},{"name":"nodejs","version":"18.13.0","date":"2023-01-05","lts":"Hydrogen","security":false,"v8":"10.2.154.23"},{"name":"nodejs","version":"18.14.0","date":"2023-02-01","lts":"Hydrogen","security":false,"v8":"10.2.154.23"},{"name":"nodejs","version":"18.15.0","date":"2023-03-05","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"18.16.0","date":"2023-04-12","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"18.17.0","date":"2023-07-18","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"18.18.0","date":"2023-09-18","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"18.19.0","date":"2023-11-29","lts":"Hydrogen","security":false,"v8":"10.2.154.26"},{"name":"nodejs","version":"19.0.0","date":"2022-10-17","lts":false,"security":false,"v8":"10.7.193.13"},{"name":"nodejs","version":"19.1.0","date":"2022-11-14","lts":false,"security":false,"v8":"10.7.193.20"},{"name":"nodejs","version":"19.2.0","date":"2022-11-29","lts":false,"security":false,"v8":"10.8.168.20"},{"name":"nodejs","version":"19.3.0","date":"2022-12-14","lts":false,"security":false,"v8":"10.8.168.21"},{"name":"nodejs","version":"19.4.0","date":"2023-01-05","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.5.0","date":"2023-01-24","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.6.0","date":"2023-02-01","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.7.0","date":"2023-02-21","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.8.0","date":"2023-03-14","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"19.9.0","date":"2023-04-10","lts":false,"security":false,"v8":"10.8.168.25"},{"name":"nodejs","version":"20.0.0","date":"2023-04-17","lts":false,"security":false,"v8":"11.3.244.4"},{"name":"nodejs","version":"20.1.0","date":"2023-05-03","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.2.0","date":"2023-05-16","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.3.0","date":"2023-06-08","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.4.0","date":"2023-07-04","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.5.0","date":"2023-07-19","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.6.0","date":"2023-08-23","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.7.0","date":"2023-09-18","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.8.0","date":"2023-09-28","lts":false,"security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.9.0","date":"2023-10-24","lts":"Iron","security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"20.10.0","date":"2023-11-22","lts":"Iron","security":false,"v8":"11.3.244.8"},{"name":"nodejs","version":"21.0.0","date":"2023-10-17","lts":false,"security":false,"v8":"11.8.172.13"},{"name":"nodejs","version":"21.1.0","date":"2023-10-24","lts":false,"security":false,"v8":"11.8.172.15"},{"name":"nodejs","version":"21.2.0","date":"2023-11-14","lts":false,"security":false,"v8":"11.8.172.17"},{"name":"nodejs","version":"21.3.0","date":"2023-11-30","lts":false,"security":false,"v8":"11.8.172.17"}] \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/node-releases/data/release-schedule/release-schedule.json b/tools/node_modules/eslint/node_modules/node-releases/data/release-schedule/release-schedule.json index 5eca422e2a5266..167314aa2ea19d 100644 --- a/tools/node_modules/eslint/node_modules/node-releases/data/release-schedule/release-schedule.json +++ b/tools/node_modules/eslint/node_modules/node-releases/data/release-schedule/release-schedule.json @@ -1 +1 @@ -{"v0.8":{"start":"2012-06-25","end":"2014-07-31"},"v0.10":{"start":"2013-03-11","end":"2016-10-31"},"v0.12":{"start":"2015-02-06","end":"2016-12-31"},"v4":{"start":"2015-09-08","lts":"2015-10-12","maintenance":"2017-04-01","end":"2018-04-30","codename":"Argon"},"v5":{"start":"2015-10-29","maintenance":"2016-04-30","end":"2016-06-30"},"v6":{"start":"2016-04-26","lts":"2016-10-18","maintenance":"2018-04-30","end":"2019-04-30","codename":"Boron"},"v7":{"start":"2016-10-25","maintenance":"2017-04-30","end":"2017-06-30"},"v8":{"start":"2017-05-30","lts":"2017-10-31","maintenance":"2019-01-01","end":"2019-12-31","codename":"Carbon"},"v9":{"start":"2017-10-01","maintenance":"2018-04-01","end":"2018-06-30"},"v10":{"start":"2018-04-24","lts":"2018-10-30","maintenance":"2020-05-19","end":"2021-04-30","codename":"Dubnium"},"v11":{"start":"2018-10-23","maintenance":"2019-04-22","end":"2019-06-01"},"v12":{"start":"2019-04-23","lts":"2019-10-21","maintenance":"2020-11-30","end":"2022-04-30","codename":"Erbium"},"v13":{"start":"2019-10-22","maintenance":"2020-04-01","end":"2020-06-01"},"v14":{"start":"2020-04-21","lts":"2020-10-27","maintenance":"2021-10-19","end":"2023-04-30","codename":"Fermium"},"v15":{"start":"2020-10-20","maintenance":"2021-04-01","end":"2021-06-01"},"v16":{"start":"2021-04-20","lts":"2021-10-26","maintenance":"2022-10-18","end":"2023-09-11","codename":"Gallium"},"v17":{"start":"2021-10-19","maintenance":"2022-04-01","end":"2022-06-01"},"v18":{"start":"2022-04-19","lts":"2022-10-25","maintenance":"2023-10-18","end":"2025-04-30","codename":"Hydrogen"},"v19":{"start":"2022-10-18","maintenance":"2023-04-01","end":"2023-06-01"},"v20":{"start":"2023-04-18","lts":"2023-10-24","maintenance":"2024-10-22","end":"2026-04-30","codename":""}} \ No newline at end of file +{"v0.8":{"start":"2012-06-25","end":"2014-07-31"},"v0.10":{"start":"2013-03-11","end":"2016-10-31"},"v0.12":{"start":"2015-02-06","end":"2016-12-31"},"v4":{"start":"2015-09-08","lts":"2015-10-12","maintenance":"2017-04-01","end":"2018-04-30","codename":"Argon"},"v5":{"start":"2015-10-29","maintenance":"2016-04-30","end":"2016-06-30"},"v6":{"start":"2016-04-26","lts":"2016-10-18","maintenance":"2018-04-30","end":"2019-04-30","codename":"Boron"},"v7":{"start":"2016-10-25","maintenance":"2017-04-30","end":"2017-06-30"},"v8":{"start":"2017-05-30","lts":"2017-10-31","maintenance":"2019-01-01","end":"2019-12-31","codename":"Carbon"},"v9":{"start":"2017-10-01","maintenance":"2018-04-01","end":"2018-06-30"},"v10":{"start":"2018-04-24","lts":"2018-10-30","maintenance":"2020-05-19","end":"2021-04-30","codename":"Dubnium"},"v11":{"start":"2018-10-23","maintenance":"2019-04-22","end":"2019-06-01"},"v12":{"start":"2019-04-23","lts":"2019-10-21","maintenance":"2020-11-30","end":"2022-04-30","codename":"Erbium"},"v13":{"start":"2019-10-22","maintenance":"2020-04-01","end":"2020-06-01"},"v14":{"start":"2020-04-21","lts":"2020-10-27","maintenance":"2021-10-19","end":"2023-04-30","codename":"Fermium"},"v15":{"start":"2020-10-20","maintenance":"2021-04-01","end":"2021-06-01"},"v16":{"start":"2021-04-20","lts":"2021-10-26","maintenance":"2022-10-18","end":"2023-09-11","codename":"Gallium"},"v17":{"start":"2021-10-19","maintenance":"2022-04-01","end":"2022-06-01"},"v18":{"start":"2022-04-19","lts":"2022-10-25","maintenance":"2023-10-18","end":"2025-04-30","codename":"Hydrogen"},"v19":{"start":"2022-10-18","maintenance":"2023-04-01","end":"2023-06-01"},"v20":{"start":"2023-04-18","lts":"2023-10-24","maintenance":"2024-10-22","end":"2026-04-30","codename":"Iron"},"v21":{"start":"2023-10-17","maintenance":"2024-04-01","end":"2024-06-01"},"v22":{"start":"2024-04-23","lts":"2024-10-29","maintenance":"2025-10-21","end":"2027-04-30","codename":""},"v23":{"start":"2024-10-15","maintenance":"2025-04-01","end":"2025-06-01"},"v24":{"start":"2025-04-22","lts":"2025-10-28","maintenance":"2026-10-20","end":"2028-04-30","codename":""}} \ No newline at end of file diff --git a/tools/node_modules/eslint/node_modules/node-releases/package.json b/tools/node_modules/eslint/node_modules/node-releases/package.json index c61ab94abdac4c..b3334e92900a73 100644 --- a/tools/node_modules/eslint/node_modules/node-releases/package.json +++ b/tools/node_modules/eslint/node_modules/node-releases/package.json @@ -1,6 +1,6 @@ { "name": "node-releases", - "version": "2.0.13", + "version": "2.0.14", "description": "Node.js releases data", "type": "module", "scripts": { diff --git a/tools/node_modules/eslint/package.json b/tools/node_modules/eslint/package.json index 38398a793d8b0d..298d76af39aeeb 100644 --- a/tools/node_modules/eslint/package.json +++ b/tools/node_modules/eslint/package.json @@ -1,6 +1,6 @@ { "name": "eslint", - "version": "8.53.0", + "version": "8.55.0", "author": "Nicholas C. Zakas ", "description": "An AST-based pattern checker for JavaScript.", "bin": { @@ -19,6 +19,7 @@ "build:readme": "node tools/update-readme.js", "lint": "node Makefile.js lint", "lint:docs:js": "node Makefile.js lintDocsJS", + "lint:docs:rule-examples": "node Makefile.js checkRuleExamples", "lint:fix": "node Makefile.js lint -- fix", "lint:fix:docs:js": "node Makefile.js lintDocsJS -- fix", "release:generate:alpha": "node Makefile.js generatePrerelease -- alpha", @@ -41,6 +42,11 @@ "node tools/update-eslint-all.js", "git add packages/js/src/configs/eslint-all.js" ], + "docs/src/rules/*.md": [ + "node tools/check-rule-examples.js", + "node tools/fetch-docs-links.js", + "git add docs/src/_data/further_reading_links.json" + ], "docs/**/*.svg": "npx svgo -r --multipass" }, "files": [ @@ -58,8 +64,8 @@ "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.3", - "@eslint/js": "8.53.0", + "@eslint/eslintrc": "^2.1.4", + "@eslint/js": "8.55.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -126,10 +132,18 @@ "gray-matter": "^4.0.3", "lint-staged": "^11.0.0", "load-perf": "^0.2.0", - "markdownlint": "^0.25.1", - "markdownlint-cli": "^0.31.1", + "markdown-it": "^12.2.0", + "markdown-it-container": "^3.0.0", + "markdownlint": "^0.31.1", + "markdownlint-cli": "^0.37.0", "marked": "^4.0.8", "memfs": "^3.0.1", + "metascraper": "^5.25.7", + "metascraper-description": "^5.25.7", + "metascraper-image": "^5.29.3", + "metascraper-logo": "^5.25.7", + "metascraper-logo-favicon": "^5.25.7", + "metascraper-title": "^5.25.7", "mocha": "^8.3.2", "mocha-junit-reporter": "^2.0.0", "node-polyfill-webpack-plugin": "^1.0.3", @@ -137,13 +151,13 @@ "pirates": "^4.0.5", "progress": "^2.0.3", "proxyquire": "^2.0.1", - "recast": "^0.20.4", - "regenerator-runtime": "^0.13.2", + "recast": "^0.23.0", + "regenerator-runtime": "^0.14.0", "rollup-plugin-node-polyfills": "^0.2.1", "semver": "^7.5.3", "shelljs": "^0.8.2", "sinon": "^11.0.0", - "vite-plugin-commonjs": "^0.8.2", + "vite-plugin-commonjs": "^0.10.0", "webdriverio": "^8.14.6", "webpack": "^5.23.0", "webpack-cli": "^4.5.0", diff --git a/tools/osx-gon-config.json.tmpl b/tools/osx-gon-config.json.tmpl deleted file mode 100644 index 3ea16465fc1de5..00000000000000 --- a/tools/osx-gon-config.json.tmpl +++ /dev/null @@ -1,12 +0,0 @@ -{ - "notarize": [{ - "path": "node-{{pkgid}}.pkg", - "bundle_id": "org.nodejs.pkg.{{pkgid}}", - "staple": true - }], - - "apple_id": { - "username": "{{appleid}}", - "password": "@env:NOTARIZATION_PASSWORD" - } -} diff --git a/tools/osx-notarize.sh b/tools/osx-notarize.sh index 300173dd7fe0e9..d860074bf7d64e 100755 --- a/tools/osx-notarize.sh +++ b/tools/osx-notarize.sh @@ -34,22 +34,26 @@ then exit 1 fi -# Submit the package for notarization -# TODO(@ulisesGascon): refactor to use --keychain-profile -# when https://github.com/nodejs/build/issues/3385#issuecomment-1729281269 is ready echo "Submitting node-$pkgid.pkg for notarization..." xcrun notarytool submit \ - --apple-id "$NOTARIZATION_ID" \ - --password "$NOTARIZATION_PASSWORD" \ - --team-id "$NOTARIZATION_TEAM_ID" \ + --keychain-profile "NODE_RELEASE_PROFILE" \ --wait \ "node-$pkgid.pkg" if [ $? -eq 0 ]; then echo "Notarization node-$pkgid.pkg submitted successfully." - exit 0 else echo "Notarization node-$pkgid.pkg failed." exit 1 fi + +if ! xcrun spctl --assess --type install --context context:primary-signature --ignore-cache --verbose=2 "node-$pkgid.pkg"; then + echo "error: Signature will not be accepted by Gatekeeper!" 1>&2 + exit 1 +else + echo "Verification was successful." +fi + +xcrun stapler staple "node-$pkgid.pkg" +echo "Stapler was successful." \ No newline at end of file diff --git a/tools/search_files.py b/tools/search_files.py new file mode 100755 index 00000000000000..65d0e1be42f0a8 --- /dev/null +++ b/tools/search_files.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 +# Copyright 2008 the V8 project authors. +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import os +import sys + +from utils import SearchFiles + + +if __name__ == '__main__': + try: + files = SearchFiles(*sys.argv[2:]) + files = [ os.path.relpath(x, sys.argv[1]) for x in files ] + print('\n'.join(files)) + except Exception as e: + print(str(e)) + sys.exit(1) diff --git a/tools/sign.bat b/tools/sign.bat index fae06583b4923f..f4d18d9f7a8a0d 100644 --- a/tools/sign.bat +++ b/tools/sign.bat @@ -1,15 +1,12 @@ @echo off -set timeservers=(http://timestamp.globalsign.com/scripts/timestamp.dll http://timestamp.comodoca.com/authenticode http://timestamp.verisign.com/scripts/timestamp.dll http://tsa.starfieldtech.com) - -for %%s in %timeservers% do ( - signtool sign /a /d "Node.js" /du "https://nodejs.org" /fd SHA256 /t %%s %1 - if not ERRORLEVEL 1 ( - echo Successfully signed %1 using timeserver %%s - exit /b 0 - ) - echo Signing %1 failed using %%s +@REM From December 2023, new certificates use DigiCert cloud HSM service for EV signing. +@REM They provide a client side app smctl.exe for managing certificates and signing process. +@REM Release CI machines are configured to have it in the PATH so this can be used safely. +smctl sign -k key_nodejs -i %1 +if not ERRORLEVEL 1 ( + echo Successfully signed %1 using smctl + exit /b 0 ) - -echo Could not sign %1 using any available timeserver -exit /b 1 +echo Could not sign %1 using smctl +exit /b 1 \ No newline at end of file diff --git a/tools/v8_gypfiles/features.gypi b/tools/v8_gypfiles/features.gypi index aa946a2774177f..be1dfe407a290d 100644 --- a/tools/v8_gypfiles/features.gypi +++ b/tools/v8_gypfiles/features.gypi @@ -155,6 +155,7 @@ # Enable pointer compression (sets -dV8_COMPRESS_POINTERS). 'v8_enable_pointer_compression%': 0, + 'v8_enable_pointer_compression_shared_cage%': 0, 'v8_enable_31bit_smis_on_64bit_arch%': 0, # Sets -dV8_SHORT_BUILTIN_CALLS @@ -197,6 +198,15 @@ # currently implemented. 'v8_use_perfetto%': 0, + # Enable map packing & unpacking (sets -dV8_MAP_PACKING). + 'v8_enable_map_packing%': 0, + + # Scan the call stack conservatively during garbage collection. + 'v8_enable_conservative_stack_scanning%': 0, + + # Use direct pointers in local handles. + 'v8_enable_direct_local%': 0, + # Controls the threshold for on-heap/off-heap Typed Arrays. 'v8_typed_array_max_size_in_heap%': 64, @@ -270,7 +280,7 @@ # Enable global allocation site tracking. 'v8_allocation_site_tracking%': 1, - 'v8_scriptormodule_legacy_lifetime%': 1, + 'v8_scriptormodule_legacy_lifetime%': 0, # Change code emission and runtime features to be CET shadow-stack compliant # (incomplete and experimental). @@ -345,10 +355,13 @@ 'defines': ['ENABLE_VTUNE_JIT_INTERFACE',], }], ['v8_enable_pointer_compression==1', { - 'defines': [ - 'V8_COMPRESS_POINTERS', - 'V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE', - ], + 'defines': ['V8_COMPRESS_POINTERS'], + }], + ['v8_enable_pointer_compression_shared_cage==1', { + 'defines': ['V8_COMPRESS_POINTERS_IN_SHARED_CAGE'], + }], + ['v8_enable_pointer_compression==1 and v8_enable_pointer_compression_shared_cage==0', { + 'defines': ['V8_COMPRESS_POINTERS_IN_ISOLATE_CAGE'], }], ['v8_enable_pointer_compression==1 or v8_enable_31bit_smis_on_64bit_arch==1', { 'defines': ['V8_31BIT_SMIS_ON_64BIT_ARCH',], @@ -392,13 +405,9 @@ }], ['v8_deprecation_warnings==1', { 'defines': ['V8_DEPRECATION_WARNINGS',], - },{ - 'defines!': ['V8_DEPRECATION_WARNINGS',], }], ['v8_imminent_deprecation_warnings==1', { 'defines': ['V8_IMMINENT_DEPRECATION_WARNINGS',], - },{ - 'defines!': ['V8_IMMINENT_DEPRECATION_WARNINGS',], }], ['v8_enable_i18n_support==1', { 'defines': ['V8_INTL_SUPPORT',], @@ -443,9 +452,21 @@ ['v8_use_perfetto==1', { 'defines': ['V8_USE_PERFETTO',], }], + ['v8_enable_map_packing==1', { + 'defines': ['V8_MAP_PACKING',], + }], ['v8_win64_unwinding_info==1', { 'defines': ['V8_WIN64_UNWINDING_INFO',], }], + ['tsan==1', { + 'defines': ['V8_IS_TSAN',], + }], + ['v8_enable_conservative_stack_scanning==1', { + 'defines': ['V8_ENABLE_CONSERVATIVE_STACK_SCANNING',], + }], + ['v8_enable_direct_local==1', { + 'defines': ['V8_ENABLE_DIRECT_LOCAL',], + }], ['v8_enable_regexp_interpreter_threaded_dispatch==1', { 'defines': ['V8_ENABLE_REGEXP_INTERPRETER_THREADED_DISPATCH',], }], diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 45323919348805..4d69a59fcbc5b5 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -552,6 +552,11 @@ '): void; function fstat(fd: number, useBigint: true, req: FSReqCallback): void; function fstat(fd: number, useBigint: false, req: FSReqCallback): void; - function fstat(fd: number, useBigint: boolean, req: undefined, ctx: FSSyncContext): Float64Array | BigUint64Array; - function fstat(fd: number, useBigint: true, req: undefined, ctx: FSSyncContext): BigUint64Array; - function fstat(fd: number, useBigint: false, req: undefined, ctx: FSSyncContext): Float64Array; + function fstat(fd: number, useBigint: boolean, req: undefined, shouldNotThrow: boolean): Float64Array | BigUint64Array; + function fstat(fd: number, useBigint: true, req: undefined, shouldNotThrow: boolean): BigUint64Array; + function fstat(fd: number, useBigint: false, req: undefined, shouldNotThrow: boolean): Float64Array; function fstat(fd: number, useBigint: boolean, usePromises: typeof kUsePromises): Promise; function fstat(fd: number, useBigint: true, usePromises: typeof kUsePromises): Promise; function fstat(fd: number, useBigint: false, usePromises: typeof kUsePromises): Promise; @@ -111,7 +111,6 @@ declare namespace InternalFSBinding { function futimes(fd: number, atime: number, mtime: number): void; function futimes(fd: number, atime: number, mtime: number, usePromises: typeof kUsePromises): Promise; - function internalModuleReadJSON(path: string): [] | [string, boolean]; function internalModuleStat(path: string): number; function lchown(path: string, uid: number, gid: number, req: FSReqCallback): void; @@ -127,9 +126,9 @@ declare namespace InternalFSBinding { function lstat(path: StringOrBuffer, useBigint: boolean, req: FSReqCallback): void; function lstat(path: StringOrBuffer, useBigint: true, req: FSReqCallback): void; function lstat(path: StringOrBuffer, useBigint: false, req: FSReqCallback): void; - function lstat(path: StringOrBuffer, useBigint: boolean, req: undefined, ctx: FSSyncContext): Float64Array | BigUint64Array; - function lstat(path: StringOrBuffer, useBigint: true, req: undefined, ctx: FSSyncContext): BigUint64Array; - function lstat(path: StringOrBuffer, useBigint: false, req: undefined, ctx: FSSyncContext): Float64Array; + function lstat(path: StringOrBuffer, useBigint: boolean, req: undefined, throwIfNoEntry: boolean): Float64Array | BigUint64Array; + function lstat(path: StringOrBuffer, useBigint: true, req: undefined, throwIfNoEntry: boolean): BigUint64Array; + function lstat(path: StringOrBuffer, useBigint: false, req: undefined, throwIfNoEntry: boolean): Float64Array; function lstat(path: StringOrBuffer, useBigint: boolean, usePromises: typeof kUsePromises): Promise; function lstat(path: StringOrBuffer, useBigint: true, usePromises: typeof kUsePromises): Promise; function lstat(path: StringOrBuffer, useBigint: false, usePromises: typeof kUsePromises): Promise; @@ -192,7 +191,7 @@ declare namespace InternalFSBinding { function rename(oldPath: string, newPath: string): void; function rmdir(path: string, req: FSReqCallback): void; - function rmdir(path: string, req: undefined, ctx: FSSyncContext): void; + function rmdir(path: string): void; function rmdir(path: string, usePromises: typeof kUsePromises): Promise; function stat(path: StringOrBuffer, useBigint: boolean, req: FSReqCallback): void; @@ -231,6 +230,9 @@ declare namespace InternalFSBinding { function writeString(fd: number, value: string, pos: unknown, encoding: unknown, usePromises: typeof kUsePromises): Promise; function getFormatOfExtensionlessFile(url: string): ConstantsBinding['fs']; + + function writeFileUtf8(path: string, data: string, flag: number, mode: number): void; + function writeFileUtf8(fd: number, data: string, flag: number, mode: number): void; } export interface FsBinding { diff --git a/typings/internalBinding/modules.d.ts b/typings/internalBinding/modules.d.ts new file mode 100644 index 00000000000000..ddbb3d02704908 --- /dev/null +++ b/typings/internalBinding/modules.d.ts @@ -0,0 +1,29 @@ +export type PackageType = 'commonjs' | 'module' | 'none' +export type PackageConfig = { + pjsonPath: string + exists: boolean + name?: string + main?: any + type: PackageType + exports?: string | string[] | Record + imports?: string | string[] | Record +} +export type SerializedPackageConfig = [ + PackageConfig['name'], + PackageConfig['main'], + PackageConfig['type'], + string | undefined, // exports + string | undefined, // imports + string | undefined, // raw json available for experimental policy +] + +export interface ModulesBinding { + readPackageJSON(path: string): SerializedPackageConfig | undefined; + getNearestParentPackageJSON(path: string): PackageConfig | undefined + getNearestParentPackageJSONType(path: string): [ + PackageConfig['type'], + string, // package.json path + string, // raw content + ] + getPackageScopeConfig(path: string): SerializedPackageConfig | undefined +} diff --git a/typings/internalBinding/util.d.ts b/typings/internalBinding/util.d.ts index 1ac9d3a39bbb31..9034b892b26549 100644 --- a/typings/internalBinding/util.d.ts +++ b/typings/internalBinding/util.d.ts @@ -43,5 +43,4 @@ export interface UtilBinding { shouldAbortOnUncaughtToggle: [shouldAbort: 0 | 1]; WeakReference: typeof InternalUtilBinding.WeakReference; guessHandleType(fd: number): 'TCP' | 'TTY' | 'UDP' | 'FILE' | 'PIPE' | 'UNKNOWN'; - toUSVString(str: string, start: number): string; } diff --git a/typings/primordials.d.ts b/typings/primordials.d.ts index ffce093458f2b5..ce6ca86f3e633d 100644 --- a/typings/primordials.d.ts +++ b/typings/primordials.d.ts @@ -420,6 +420,7 @@ declare namespace primordials { export const StringPrototypeToLocaleUpperCase: UncurryThis export const StringPrototypeToLowerCase: UncurryThis export const StringPrototypeToUpperCase: UncurryThis + export const StringPrototypeToWellFormed: UncurryThis export const StringPrototypeValueOf: UncurryThis export const StringPrototypeReplaceAll: UncurryThis export import Symbol = globalThis.Symbol; diff --git a/unofficial.gni b/unofficial.gni new file mode 100644 index 00000000000000..ee0a5f3c32dbcc --- /dev/null +++ b/unofficial.gni @@ -0,0 +1,354 @@ +# Copyright (c) 2013-2019 GitHub Inc. +# Copyright 2019 the V8 project authors. All rights reserved. +# Copyright 2023 Microsoft Inc. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# This file is used by GN for building, which is NOT the build system used for +# building official binaries. +# Please take a look at node.gyp if you are making changes to build system. + +import("node.gni") +import("$node_v8_path/gni/snapshot_toolchain.gni") +import("$node_v8_path/gni/v8.gni") + +# The actual configurations are put inside a template in unofficial.gni to +# prevent accidental edits from contributors. +template("node_gn_build") { + config("node_features") { + defines = [] + if (is_component_build) { + defines += [ + "USING_UV_SHARED", + "USING_V8_SHARED", + ] + } + if (node_use_openssl) { + defines += [ "HAVE_OPENSSL=1" ] + } else { + defines += [ "HAVE_OPENSSL=0" ] + } + if (node_use_v8_platform) { + defines += [ "NODE_USE_V8_PLATFORM=1" ] + } else { + defines += [ "NODE_USE_V8_PLATFORM=0" ] + } + if (node_enable_inspector) { + defines += [ "HAVE_INSPECTOR=1" ] + } else { + defines += [ "HAVE_INSPECTOR=0" ] + } + if (node_use_node_code_cache) { + defines += [ "NODE_USE_NODE_CODE_CACHE=1"] + } + if (v8_enable_i18n_support) { + defines += [ "NODE_HAVE_I18N_SUPPORT=1" ] + } else { + defines += [ "NODE_HAVE_I18N_SUPPORT=0" ] + } + } + + config("node_external_config") { + include_dirs = [ + target_gen_dir, + "src", + ] + defines = [ + "NODE_WANT_INTERNALS=1", + "NODE_EMBEDDER_MODULE_VERSION=$node_module_version", + ] + configs = [ + ":node_features", + "$node_v8_path:external_config", + ] + } + + config("node_internal_config") { + visibility = [ + ":*", + "src/inspector:*", + ] + configs = [ ":node_external_config" ] + libs = [] + cflags = [ "-Wno-microsoft-include" ] + cflags_cc = [ + "-Wno-deprecated-declarations", + "-Wno-extra-semi", + "-Wno-implicit-fallthrough", + "-Wno-macro-redefined", + "-Wno-return-type", + "-Wno-shadow", + "-Wno-sometimes-uninitialized", + "-Wno-string-plus-int", + "-Wno-string-conversion", + "-Wno-unreachable-code", + "-Wno-unreachable-code-break", + "-Wno-unreachable-code-return", + "-Wno-unused-label", + "-Wno-unused-private-field", + "-Wno-unused-variable", + "-Wno-unused-function", + ] + + if (target_cpu == "x86") { + node_arch = "ia32" + } else { + node_arch = target_cpu + } + if (target_os == "win") { + node_platform = "win32" + } else if (target_os == "mac") { + node_platform = "darwin" + } else { + node_platform = target_os + } + defines = [ + "NODE_ARCH=\"$node_arch\"", + "NODE_PLATFORM=\"$node_platform\"", + "NODE_REPORT" + ] + + if (is_win) { + defines += [ + "NOMINMAX", + "_UNICODE=1", + ] + } else { + defines += [ "__POSIX__" ] + } + if (node_tag != "") { + defines += [ "NODE_TAG=\"$node_tag\"" ] + } + if (node_v8_options != "") { + defines += [ "NODE_V8_OPTIONS=\"$node_v8_options\"" ] + } + if (node_release_urlbase != "") { + defines += [ "NODE_RELEASE_URLBASE=\"$node_release_urlbase\"" ] + } + if (node_use_openssl) { + defines += [ + "NODE_OPENSSL_SYSTEM_CERT_PATH=\"$node_openssl_system_ca_path\"", + ] + } + } + + gypi_values = exec_script("./tools/gypi_to_gn.py", + [ rebase_path("node.gyp"), + "--replace=<@(node_builtin_shareable_builtins)=" ], + "scope", + [ "node.gyp" ]) + + source_set("libnode") { + configs += [ ":node_internal_config" ] + public_configs = [ + ":node_external_config", + "deps/googletest:googletest_config", + ] + public_deps = [ + "deps/ada", + "deps/uv", + "deps/base64", + "$node_v8_path", + ] + deps = [ + ":run_node_js2c", + "deps/brotli", + "deps/cares", + "deps/histogram", + "deps/llhttp", + "deps/nghttp2", + "deps/ngtcp2", + "deps/postject", + "deps/simdjson", + "deps/simdutf", + "deps/uvwasi", + "//third_party/zlib", + "$node_v8_path:v8_libplatform", + ] + + sources = [ + "$target_gen_dir/node_javascript.cc", + ] + gypi_values.node_sources + + if (is_win) { + libs = [ "psapi.lib" ] + } + if (is_mac) { + frameworks = [ "CoreFoundation.framework" ] + } + + if (v8_enable_i18n_support) { + deps += [ "//third_party/icu" ] + } + if (node_use_openssl) { + public_deps += [ "deps/openssl" ] + sources += gypi_values.node_crypto_sources + } + if (node_enable_inspector) { + deps += [ + "src/inspector:node_protocol_generated_sources", + "src/inspector:v8_inspector_compress_protocol_json", + ] + include_dirs = [ + "$target_gen_dir/src", + "$target_gen_dir/src/inspector", + ] + node_inspector = exec_script( + "./tools/gypi_to_gn.py", + [ rebase_path("src/inspector/node_inspector.gypi"), + "--replace=<(SHARED_INTERMEDIATE_DIR)=$target_gen_dir" ], + "scope", + [ "src/inspector/node_inspector.gypi" ]) + sources += node_inspector.node_inspector_sources + + node_inspector.node_inspector_generated_sources + } + } + + executable(target_name) { + forward_variables_from(invoker, "*") + + sources = [ "src/node_main.cc" ] + deps = [ ":libnode" ] + if (node_use_node_snapshot) { + sources += [ "$target_gen_dir/node_snapshot.cc" ] + deps += [ ":run_node_mksnapshot" ] + if (is_clang || !is_win) { + cflags_cc = [ + "-Wno-c++11-narrowing", + "-Wno-shadow", + ] + } + } else { + sources += [ "src/node_snapshot_stub.cc" ] + } + output_name = "node" + } + + if (node_use_node_snapshot) { + if (current_toolchain == v8_snapshot_toolchain) { + executable("node_mksnapshot") { + configs += [ ":node_internal_config" ] + sources = [ + "src/node_snapshot_stub.cc", + "tools/snapshot/node_mksnapshot.cc", + ] + deps = [ ":libnode" ] + } + } + + action("run_node_mksnapshot") { + deps = [ ":node_mksnapshot($v8_snapshot_toolchain)" ] + script = "$node_v8_path/tools/run.py" + sources = [] + data = [] + + mksnapshot_dir = get_label_info(":node_mksnapshot($v8_snapshot_toolchain)", + "root_out_dir") + + outputs = [ "$target_gen_dir/node_snapshot.cc" ] + args = [ + "./" + rebase_path(mksnapshot_dir + "/node_mksnapshot", root_build_dir), + rebase_path("$target_gen_dir/node_snapshot.cc", root_build_dir), + ] + } + } + + action("generate_config_gypi") { + script = "tools/generate_config_gypi.py" + outputs = [ "$target_gen_dir/config.gypi" ] + depfile = "$target_gen_dir/$target_name.d" + args = rebase_path(outputs, root_build_dir) + [ + "--out-dir", rebase_path(root_build_dir, root_build_dir), + "--dep-file", rebase_path(depfile, root_build_dir), + "--node-gn-path", node_path, + ] + } + + executable("node_js2c") { + deps = [ + "deps/simdutf", + "deps/uv", + ] + sources = [ + "tools/js2c.cc", + "tools/executable_wrapper.h", + ] + } + + action("run_node_js2c") { + script = "$node_v8_path/tools/run.py" + deps = [ + ":node_js2c($host_toolchain)", + ":generate_config_gypi", + ] + + node_deps_files = gypi_values.deps_files + node_builtin_shareable_builtins + node_library_files = exec_script("./tools/search_files.py", + [ rebase_path(".", root_build_dir), + rebase_path("lib", root_build_dir), + "js" ], + "list lines") + + inputs = node_library_files + + node_deps_files + + [ "$target_gen_dir/config.gypi" ] + outputs = [ "$target_gen_dir/node_javascript.cc" ] + + # Get the path to node_js2c executable of the host toolchain. + if (host_os == "win") { + host_executable_suffix = ".exe" + } else { + host_executable_suffix = "" + } + node_js2c_path = + get_label_info(":node_js2c($host_toolchain)", "root_out_dir") + "/" + + get_label_info(":node_js2c($host_toolchain)", "name") + + host_executable_suffix + + args = [ rebase_path(node_js2c_path), + rebase_path("$target_gen_dir/node_javascript.cc"), + "--root", rebase_path("."), + "lib", rebase_path("$target_gen_dir/config.gypi") ] + + node_deps_files + } + + executable("node_cctest") { + testonly = true + configs += [ ":node_internal_config" ] + + deps = [ + ":libnode", + "deps/googletest", + "deps/googletest:gtest_main", + "deps/simdutf", + ] + + sources = gypi_values.node_cctest_sources + if (node_use_openssl) { + sources += gypi_values.node_cctest_openssl_sources + } + if (node_enable_inspector) { + sources += gypi_values.node_cctest_inspector_sources + } + } + + executable("node_embedtest") { + output_name = "embedtest" + testonly = true + deps = [ ":libnode" ] + sources = [ + "src/node_snapshot_stub.cc", + "test/embedding/embedtest.cc", + ] + } + + executable("overlapped_checker") { + output_name = "overlapped-checker" + testonly = true + if (is_win) { + sources = [ "test/overlapped-checker/main_win.c" ] + } else { + sources = [ "test/overlapped-checker/main_unix.c" ] + } + } +}